@nysds/nys-icon 1.21.0 → 1.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/nys-icon.js CHANGED
@@ -1,211 +1,222 @@
1
- import { LitElement as Jn, html as Qn, unsafeCSS as tr } from "lit";
2
- import { property as Q, state as er } from "lit/decorators.js";
1
+ import { LitElement as to, unsafeCSS as eo, html as no } from "lit";
2
+ import { property as J, state as oo } from "lit/decorators.js";
3
3
  /*!
4
4
  * █▄ █ █ █ █▀▀▀█ █▀▀▄ █▀▀▀█
5
5
  * █ █ █ █▄▄▄█ ▀▀▀▄▄ █ █ ▀▀▀▄▄
6
6
  * █ ▀█ █ █▄▄▄█ █▄▄▀ █▄▄▄█
7
7
  *
8
- * Icon Component v1.21.0
8
+ * Icon Component v1.22.0
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
- var nr = 0;
14
- function rr(r) {
15
- return `${r}-${Date.now()}-${nr++}`;
13
+ /*!
14
+ * New York State Design System v1.22.0
15
+ * Description: A design system for New York State's digital products.
16
+ * Repository: https://github.com/its-hcd/nysds
17
+ * License: MIT
18
+ */
19
+ let io = 0;
20
+ function ro(o) {
21
+ return `${o}-${Date.now()}-${io++}`;
16
22
  }
17
- var ir = (r) => {
18
- class n extends r {
23
+ const so = (o) => {
24
+ class n extends o {
19
25
  get idPrefix() {
20
26
  return this.localName || "nys-element";
21
27
  }
22
28
  ensureId() {
23
- this.id || (this.id = rr(this.idPrefix));
29
+ this.id || (this.id = ro(this.idPrefix));
24
30
  }
25
31
  connectedCallback() {
26
32
  super.connectedCallback(), this.ensureId();
27
33
  }
28
34
  }
29
35
  return n;
30
- }, or = /* @__PURE__ */ ir(Jn), vt = globalThis.__nysIconRegistry ??= /* @__PURE__ */ new Map(), pt = globalThis.__nysIconWatchers ??= /* @__PURE__ */ new Map(), se = null, Ke = null;
31
- async function ar() {
32
- return se || (Ke ??= import("./nys-icon.library-Bi_7DKlD.js").then((r) => se = r.default), Ke);
36
+ }, ao = /* @__PURE__ */ so(to), Rt = globalThis.__nysIconRegistry ??= /* @__PURE__ */ new Map(), mt = globalThis.__nysIconWatchers ??= /* @__PURE__ */ new Map();
37
+ let ce = null, Qe = null;
38
+ async function lo() {
39
+ return ce || (Qe ??= import("./nys-icon.library-DYsQ8Tiv.js").then(
40
+ (o) => ce = o.default
41
+ ), Qe);
33
42
  }
34
- function sr() {
35
- if (globalThis.__nysIconDefaultRegistered || vt.has("default")) {
43
+ function co() {
44
+ if (globalThis.__nysIconDefaultRegistered || Rt.has("default")) {
36
45
  globalThis.__nysIconDefaultRegistered = !0;
37
46
  return;
38
47
  }
39
- globalThis.__nysIconDefaultRegistered = !0, vt.set("default", { resolver: async (r) => {
40
- if (!r) return;
41
- const n = (await ar())[r];
42
- return n ? {
43
- type: "svg",
44
- content: n
45
- } : void 0;
46
- } });
48
+ globalThis.__nysIconDefaultRegistered = !0, Rt.set("default", {
49
+ resolver: async (o) => {
50
+ if (!o) return;
51
+ const a = (await lo())[o];
52
+ return a ? { type: "svg", content: a } : void 0;
53
+ }
54
+ });
47
55
  }
48
- function qr(r, n) {
49
- vt.set(r, n), pt.get(r)?.forEach((s) => s.redraw());
56
+ function ti(o, n) {
57
+ Rt.set(o, n), mt.get(o)?.forEach((a) => a.redraw());
50
58
  }
51
- function Kr(r) {
52
- vt.delete(r), pt.get(r)?.forEach((n) => n.redraw());
59
+ function ei(o) {
60
+ Rt.delete(o), mt.get(o)?.forEach((n) => n.redraw());
53
61
  }
54
- function lr(r) {
55
- return sr(), vt.get(r);
62
+ function uo(o) {
63
+ return co(), Rt.get(o);
56
64
  }
57
- function Ze(r, n) {
58
- pt.has(r) || pt.set(r, /* @__PURE__ */ new Set()), pt.get(r).add(n);
65
+ function tn(o, n) {
66
+ mt.has(o) || mt.set(o, /* @__PURE__ */ new Set()), mt.get(o).add(n);
59
67
  }
60
- function Je(r, n) {
61
- pt.get(r)?.delete(n);
68
+ function en(o, n) {
69
+ mt.get(o)?.delete(n);
62
70
  }
63
- function Qe(r, n) {
64
- (n == null || n > r.length) && (n = r.length);
65
- for (var s = 0, l = Array(n); s < n; s++) l[s] = r[s];
71
+ /*! @license DOMPurify 3.4.16 | (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.16/LICENSE */
72
+ function nn(o, n) {
73
+ (n == null || n > o.length) && (n = o.length);
74
+ for (var a = 0, l = Array(n); a < n; a++) l[a] = o[a];
66
75
  return l;
67
76
  }
68
- function cr(r) {
69
- if (Array.isArray(r)) return r;
77
+ function fo(o) {
78
+ if (Array.isArray(o)) return o;
70
79
  }
71
- function ur(r, n) {
72
- var s = r == null ? null : typeof Symbol < "u" && r[Symbol.iterator] || r["@@iterator"];
73
- if (s != null) {
74
- var l, u, p, y, k = [], I = !0, wt = !1;
80
+ function po(o, n) {
81
+ var a = o == null ? null : typeof Symbol < "u" && o[Symbol.iterator] || o["@@iterator"];
82
+ if (a != null) {
83
+ var l, u, d, y, ht = [], I = !0, Lt = !1;
75
84
  try {
76
- if (p = (s = s.call(r)).next, n !== 0) for (; !(I = (l = p.call(s)).done) && (k.push(l.value), k.length !== n); I = !0) ;
77
- } catch (tt) {
78
- wt = !0, u = tt;
85
+ if (d = (a = a.call(o)).next, n !== 0) for (; !(I = (l = d.call(a)).done) && (ht.push(l.value), ht.length !== n); I = !0) ;
86
+ } catch (Q) {
87
+ Lt = !0, u = Q;
79
88
  } finally {
80
89
  try {
81
- if (!I && s.return != null && (y = s.return(), Object(y) !== y)) return;
90
+ if (!I && a.return != null && (y = a.return(), Object(y) !== y)) return;
82
91
  } finally {
83
- if (wt) throw u;
92
+ if (Lt) throw u;
84
93
  }
85
94
  }
86
- return k;
95
+ return ht;
87
96
  }
88
97
  }
89
- function fr() {
98
+ function mo() {
90
99
  throw new TypeError(`Invalid attempt to destructure non-iterable instance.
91
100
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
92
101
  }
93
- function pr(r, n) {
94
- return cr(r) || ur(r, n) || mr(r, n) || fr();
102
+ /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
103
+ function ho(o, n) {
104
+ return fo(o) || po(o, n) || _o(o, n) || mo();
95
105
  }
96
- function mr(r, n) {
97
- if (r) {
98
- if (typeof r == "string") return Qe(r, n);
99
- var s = {}.toString.call(r).slice(8, -1);
100
- return s === "Object" && r.constructor && (s = r.constructor.name), s === "Map" || s === "Set" ? Array.from(r) : s === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s) ? Qe(r, n) : void 0;
106
+ function _o(o, n) {
107
+ if (o) {
108
+ if (typeof o == "string") return nn(o, n);
109
+ var a = {}.toString.call(o).slice(8, -1);
110
+ return a === "Object" && o.constructor && (a = o.constructor.name), a === "Map" || a === "Set" ? Array.from(o) : a === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a) ? nn(o, n) : void 0;
101
111
  }
102
112
  }
103
- var _n = Object.entries, tn = Object.setPrototypeOf, dr = Object.isFrozen, hr = Object.getPrototypeOf, _r = Object.getOwnPropertyDescriptor, A = Object.freeze, E = Object.seal, ft = Object.create, gn = typeof Reflect < "u" && Reflect, de = gn.apply, he = gn.construct;
104
- A || (A = function(n) {
113
+ const yn = Object.entries, on = Object.setPrototypeOf, go = Object.isFrozen, To = Object.getPrototypeOf, yo = Object.getOwnPropertyDescriptor;
114
+ let b = Object.freeze, S = Object.seal, pt = Object.create, An = typeof Reflect < "u" && Reflect, _e = An.apply, ge = An.construct;
115
+ b || (b = function(n) {
105
116
  return n;
106
117
  });
107
- E || (E = function(n) {
118
+ S || (S = function(n) {
108
119
  return n;
109
120
  });
110
- de || (de = function(n, s) {
111
- for (var l = arguments.length, u = new Array(l > 2 ? l - 2 : 0), p = 2; p < l; p++) u[p - 2] = arguments[p];
112
- return n.apply(s, u);
121
+ _e || (_e = function(n, a) {
122
+ for (var l = arguments.length, u = new Array(l > 2 ? l - 2 : 0), d = 2; d < l; d++) u[d - 2] = arguments[d];
123
+ return n.apply(a, u);
113
124
  });
114
- he || (he = function(n) {
115
- for (var s = arguments.length, l = new Array(s > 1 ? s - 1 : 0), u = 1; u < s; u++) l[u - 1] = arguments[u];
125
+ ge || (ge = function(n) {
126
+ for (var a = arguments.length, l = new Array(a > 1 ? a - 1 : 0), u = 1; u < a; u++) l[u - 1] = arguments[u];
116
127
  return new n(...l);
117
128
  });
118
- var J = b(Array.prototype.forEach), gr = b(Array.prototype.lastIndexOf), en = b(Array.prototype.pop), Tt = b(Array.prototype.push), yr = b(Array.prototype.splice), mt = Array.isArray, Et = b(String.prototype.toLowerCase), le = b(String.prototype.toString), nn = b(String.prototype.match), bt = b(String.prototype.replace), rn = b(String.prototype.indexOf), Tr = b(String.prototype.trim), br = b(Number.prototype.toString), Ar = b(Boolean.prototype.toString), on = typeof BigInt > "u" ? null : b(BigInt.prototype.toString), an = typeof Symbol > "u" ? null : b(Symbol.prototype.toString), L = b(Object.prototype.hasOwnProperty), At = b(Object.prototype.toString), S = b(RegExp.prototype.test), Z = Er(TypeError);
119
- function b(r) {
129
+ const Z = E(Array.prototype.forEach), Ao = E(Array.prototype.lastIndexOf), rn = E(Array.prototype.pop), Et = E(Array.prototype.push), Eo = E(Array.prototype.splice), dt = Array.isArray, wt = E(String.prototype.toLowerCase), ue = E(String.prototype.toString), sn = E(String.prototype.match), bt = E(String.prototype.replace), an = E(String.prototype.indexOf), bo = E(String.prototype.trim), So = E(Number.prototype.toString), wo = E(Boolean.prototype.toString), ln = typeof BigInt > "u" ? null : E(BigInt.prototype.toString), cn = typeof Symbol > "u" ? null : E(Symbol.prototype.toString), L = E(Object.prototype.hasOwnProperty), St = E(Object.prototype.toString), w = E(RegExp.prototype.test), W = Oo(TypeError);
130
+ function E(o) {
120
131
  return function(n) {
121
132
  n instanceof RegExp && (n.lastIndex = 0);
122
- for (var s = arguments.length, l = new Array(s > 1 ? s - 1 : 0), u = 1; u < s; u++) l[u - 1] = arguments[u];
123
- return de(r, n, l);
133
+ for (var a = arguments.length, l = new Array(a > 1 ? a - 1 : 0), u = 1; u < a; u++) l[u - 1] = arguments[u];
134
+ return _e(o, n, l);
124
135
  };
125
136
  }
126
- function Er(r) {
137
+ function Oo(o) {
127
138
  return function() {
128
- for (var n = arguments.length, s = new Array(n), l = 0; l < n; l++) s[l] = arguments[l];
129
- return he(r, s);
139
+ for (var n = arguments.length, a = new Array(n), l = 0; l < n; l++) a[l] = arguments[l];
140
+ return ge(o, a);
130
141
  };
131
142
  }
132
- function d(r, n) {
133
- let s = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : Et;
134
- if (tn && tn(r, null), !mt(n)) return r;
143
+ function m(o, n) {
144
+ let a = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : wt;
145
+ if (on && on(o, null), !dt(n)) return o;
135
146
  let l = n.length;
136
147
  for (; l--; ) {
137
148
  let u = n[l];
138
149
  if (typeof u == "string") {
139
- const p = s(u);
140
- p !== u && (dr(n) || (n[l] = p), u = p);
150
+ const d = a(u);
151
+ d !== u && (go(n) || (n[l] = d), u = d);
141
152
  }
142
- r[u] = !0;
153
+ o[u] = !0;
143
154
  }
144
- return r;
155
+ return o;
145
156
  }
146
- function Sr(r) {
147
- for (let n = 0; n < r.length; n++) L(r, n) || (r[n] = null);
148
- return r;
157
+ function Ro(o) {
158
+ for (let n = 0; n < o.length; n++) L(o, n) || (o[n] = null);
159
+ return o;
149
160
  }
150
- function N(r) {
151
- const n = ft(null);
152
- for (const l of _n(r)) {
153
- var s = pr(l, 2);
154
- const u = s[0], p = s[1];
155
- L(r, u) && (mt(p) ? n[u] = Sr(p) : p && typeof p == "object" && p.constructor === Object ? n[u] = N(p) : n[u] = p);
161
+ function N(o) {
162
+ const n = pt(null);
163
+ for (const l of yn(o)) {
164
+ var a = ho(l, 2);
165
+ const u = a[0], d = a[1];
166
+ L(o, u) && (dt(d) ? n[u] = Ro(d) : d && typeof d == "object" && d.constructor === Object ? n[u] = N(d) : n[u] = d);
156
167
  }
157
168
  return n;
158
169
  }
159
- function vr(r) {
160
- switch (typeof r) {
170
+ function Lo(o) {
171
+ switch (typeof o) {
161
172
  case "string":
162
- return r;
173
+ return o;
163
174
  case "number":
164
- return br(r);
175
+ return So(o);
165
176
  case "boolean":
166
- return Ar(r);
177
+ return wo(o);
167
178
  case "bigint":
168
- return on ? on(r) : "0";
179
+ return ln ? ln(o) : "0";
169
180
  case "symbol":
170
- return an ? an(r) : "Symbol()";
181
+ return cn ? cn(o) : "Symbol()";
171
182
  case "undefined":
172
- return At(r);
183
+ return St(o);
173
184
  case "function":
174
185
  case "object": {
175
- if (r === null) return At(r);
176
- const n = r, s = M(n, "toString");
177
- if (typeof s == "function") {
178
- const l = s(n);
179
- return typeof l == "string" ? l : At(l);
186
+ if (o === null) return St(o);
187
+ const n = o, a = M(n, "toString");
188
+ if (typeof a == "function") {
189
+ const l = a(n);
190
+ return typeof l == "string" ? l : St(l);
180
191
  }
181
- return At(r);
192
+ return St(o);
182
193
  }
183
194
  default:
184
- return At(r);
195
+ return St(o);
185
196
  }
186
197
  }
187
- function M(r, n) {
188
- for (; r !== null; ) {
189
- const l = _r(r, n);
198
+ function M(o, n) {
199
+ for (; o !== null; ) {
200
+ const l = yo(o, n);
190
201
  if (l) {
191
- if (l.get) return b(l.get);
192
- if (typeof l.value == "function") return b(l.value);
202
+ if (l.get) return E(l.get);
203
+ if (typeof l.value == "function") return E(l.value);
193
204
  }
194
- r = hr(r);
205
+ o = To(o);
195
206
  }
196
- function s() {
207
+ function a() {
197
208
  return null;
198
209
  }
199
- return s;
210
+ return a;
200
211
  }
201
- function wr(r) {
212
+ function Io(o) {
202
213
  try {
203
- return S(r, ""), !0;
214
+ return w(o, ""), !0;
204
215
  } catch {
205
216
  return !1;
206
217
  }
207
218
  }
208
- var sn = A([
219
+ const un = b([
209
220
  "a",
210
221
  "abbr",
211
222
  "acronym",
@@ -325,7 +336,7 @@ var sn = A([
325
336
  "var",
326
337
  "video",
327
338
  "wbr"
328
- ]), ce = A([
339
+ ]), fe = b([
329
340
  "svg",
330
341
  "a",
331
342
  "altglyph",
@@ -373,7 +384,7 @@ var sn = A([
373
384
  "tspan",
374
385
  "view",
375
386
  "vkern"
376
- ]), ue = A([
387
+ ]), pe = b([
377
388
  "feBlend",
378
389
  "feColorMatrix",
379
390
  "feComponentTransfer",
@@ -399,7 +410,7 @@ var sn = A([
399
410
  "feSpotLight",
400
411
  "feTile",
401
412
  "feTurbulence"
402
- ]), Or = A([
413
+ ]), Do = b([
403
414
  "animate",
404
415
  "color-profile",
405
416
  "cursor",
@@ -422,7 +433,7 @@ var sn = A([
422
433
  "solidcolor",
423
434
  "unknown",
424
435
  "use"
425
- ]), fe = A([
436
+ ]), me = b([
426
437
  "math",
427
438
  "menclose",
428
439
  "merror",
@@ -453,7 +464,7 @@ var sn = A([
453
464
  "munder",
454
465
  "munderover",
455
466
  "mprescripts"
456
- ]), Rr = A([
467
+ ]), vo = b([
457
468
  "maction",
458
469
  "maligngroup",
459
470
  "malignmark",
@@ -469,7 +480,7 @@ var sn = A([
469
480
  "annotation-xml",
470
481
  "mprescripts",
471
482
  "none"
472
- ]), ln = A(["#text"]), cn = A([
483
+ ]), fn = b(["#text"]), pn = b([
473
484
  "accept",
474
485
  "action",
475
486
  "align",
@@ -588,7 +599,7 @@ var sn = A([
588
599
  "width",
589
600
  "wrap",
590
601
  "xmlns"
591
- ]), pe = A([
602
+ ]), de = b([
592
603
  "accent-height",
593
604
  "accumulate",
594
605
  "additive",
@@ -781,7 +792,7 @@ var sn = A([
781
792
  "y2",
782
793
  "z",
783
794
  "zoomandpan"
784
- ]), un = A([
795
+ ]), mn = b([
785
796
  "accent",
786
797
  "accentunder",
787
798
  "align",
@@ -836,13 +847,13 @@ var sn = A([
836
847
  "voffset",
837
848
  "width",
838
849
  "xmlns"
839
- ]), Ht = A([
850
+ ]), Wt = b([
840
851
  "xlink:href",
841
852
  "xml:id",
842
853
  "xlink:title",
843
854
  "xml:space",
844
855
  "xmlns:xlink"
845
- ]), Lr = E(/{{[\w\W]*|^[\w\W]*}}/g), Ir = E(/<%[\w\W]*|^[\w\W]*%>/g), Dr = E(/\${[\w\W]*/g), Nr = E(/^data-[\-\w.\u00B7-\uFFFF]+$/), Cr = E(/^aria-[\-\w]+$/), fn = E(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), Mr = E(/^(?:\w+script|data):/i), xr = E(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), Pr = E(/^html$/i), zr = E(/^[a-z][.\w]*(-[.\w]+)+$/i), pn = E(/<[/\w!]/g), mn = E(/<[/\w]/g), kr = E(/<\/no(script|embed|frames)/i), Ur = E(/\/>/i), D = {
856
+ ]), No = S(/{{[\w\W]*|^[\w\W]*}}/g), Co = S(/<%[\w\W]*|^[\w\W]*%>/g), Mo = S(/\${[\w\W]*/g), xo = S(/^data-[\-\w.\u00B7-\uFFFF]+$/), Po = S(/^aria-[\-\w]+$/), dn = S(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), zo = S(/^(?:\w+script|data):/i), ko = S(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), Uo = S(/^html$/i), Fo = S(/^[a-z][.\w]*(-[.\w]+)+$/i), hn = S(/<[/\w!]/g), _n = S(/<[/\w]/g), Ho = S(/<\/no(script|embed|frames)/i), Go = S(/\/>/i), v = {
846
857
  element: 1,
847
858
  attribute: 2,
848
859
  text: 3,
@@ -855,7 +866,7 @@ var sn = A([
855
866
  documentType: 10,
856
867
  documentFragment: 11,
857
868
  notation: 12
858
- }, yn = [
869
+ }, En = [
859
870
  "style",
860
871
  "script",
861
872
  "xmp",
@@ -864,21 +875,21 @@ var sn = A([
864
875
  "noframes",
865
876
  "plaintext",
866
877
  "noscript"
867
- ], Fr = A(d({}, yn)), Hr = (function() {
868
- const r = {};
869
- return J(yn, (n) => {
870
- r[n] = E(new RegExp("</" + n + "(?=[\\t\\n\\f\\r />])", "i"));
871
- }), A(r);
872
- })(), Gr = function() {
878
+ ], Wo = b(m({}, En)), Bo = (function() {
879
+ const o = {};
880
+ return Z(En, (n) => {
881
+ o[n] = S(new RegExp("</" + n + "(?=[\\t\\n\\f\\r />])", "i"));
882
+ }), b(o);
883
+ })(), Yo = function() {
873
884
  return typeof window > "u" ? null : window;
874
- }, Wr = function(n, s) {
885
+ }, jo = function(n, a) {
875
886
  if (typeof n != "object" || typeof n.createPolicy != "function") return null;
876
887
  let l = null;
877
888
  const u = "data-tt-policy-suffix";
878
- s && s.hasAttribute(u) && (l = s.getAttribute(u));
879
- const p = "dompurify" + (l ? "#" + l : "");
889
+ a && a.hasAttribute(u) && (l = a.getAttribute(u));
890
+ const d = "dompurify" + (l ? "#" + l : "");
880
891
  try {
881
- return n.createPolicy(p, {
892
+ return n.createPolicy(d, {
882
893
  createHTML(y) {
883
894
  return y;
884
895
  },
@@ -887,9 +898,9 @@ var sn = A([
887
898
  }
888
899
  });
889
900
  } catch {
890
- return console.warn("TrustedTypes policy " + p + " could not be created."), null;
901
+ return console.warn("TrustedTypes policy " + d + " could not be created."), null;
891
902
  }
892
- }, dn = function() {
903
+ }, gn = function() {
893
904
  return {
894
905
  afterSanitizeAttributes: [],
895
906
  afterSanitizeElements: [],
@@ -901,70 +912,70 @@ var sn = A([
901
912
  uponSanitizeElement: [],
902
913
  uponSanitizeShadowNode: []
903
914
  };
904
- }, W = function(n, s, l, u) {
905
- return L(n, s) && mt(n[s]) ? d(u.base ? N(u.base) : {}, n[s], u.transform) : l;
906
- }, me = function(n, s, l) {
907
- const u = L(n, s) ? n[s] : void 0;
915
+ }, B = function(n, a, l, u) {
916
+ return L(n, a) && dt(n[a]) ? m(u.base ? N(u.base) : {}, n[a], u.transform) : l;
917
+ }, he = function(n, a, l) {
918
+ const u = L(n, a) ? n[a] : void 0;
908
919
  return u && typeof u == "object" ? N(u) : l();
909
920
  };
910
- function Tn() {
911
- let r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Gr();
912
- const n = (o) => Tn(o);
913
- if (n.version = "3.4.14", n.removed = [], !r || !r.document || r.document.nodeType !== D.document || !r.Element)
921
+ function bn() {
922
+ let o = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Yo();
923
+ const n = (r) => bn(r);
924
+ if (n.version = "3.4.16", n.removed = [], !o || !o.document || o.document.nodeType !== v.document || !o.Element)
914
925
  return n.isSupported = !1, n;
915
- let s = r.document;
916
- const l = s, u = l.currentScript;
917
- r.DocumentFragment;
918
- const p = r.HTMLTemplateElement, y = r.Node, k = r.Element, I = r.NodeFilter;
919
- r.NamedNodeMap === void 0 && (r.NamedNodeMap || r.MozNamedAttrMap), r.HTMLFormElement;
920
- const wt = r.DOMParser, tt = r.trustedTypes, Y = k.prototype, En = M(Y, "cloneNode"), Gt = M(Y, "remove"), Sn = M(Y, "nextSibling"), et = M(Y, "childNodes"), nt = M(Y, "parentNode"), ge = M(Y, "shadowRoot"), Wt = M(Y, "attributes"), $ = y && y.prototype ? M(y.prototype, "nodeType") : null, rt = y && y.prototype ? M(y.prototype, "nodeName") : null, Ot = y && y.prototype ? M(y.prototype, "ownerDocument") : null, dt = function(t) {
926
+ let a = o.document;
927
+ const l = a, u = l.currentScript;
928
+ o.DocumentFragment;
929
+ const d = o.HTMLTemplateElement, y = o.Node, ht = o.Element, I = o.NodeFilter;
930
+ o.NamedNodeMap === void 0 && (o.NamedNodeMap || o.MozNamedAttrMap), o.HTMLFormElement;
931
+ const Lt = o.DOMParser, Q = o.trustedTypes, U = ht.prototype, wn = M(U, "cloneNode"), Bt = M(U, "remove"), ye = M(U, "removeAttributeNode"), On = M(U, "nextSibling"), tt = M(U, "childNodes"), et = M(U, "parentNode"), Ae = M(U, "shadowRoot"), Yt = M(U, "attributes"), $ = y && y.prototype ? M(y.prototype, "nodeType") : null, nt = y && y.prototype ? M(y.prototype, "nodeName") : null, It = y && y.prototype ? M(y.prototype, "ownerDocument") : null, _t = function(t) {
921
932
  return $ ? $(t) : t.nodeType;
922
- }, Bt = function(t) {
923
- return rt ? rt(t) : t.nodeName;
933
+ }, jt = function(t) {
934
+ return nt ? nt(t) : t.nodeName;
924
935
  };
925
- if (typeof p == "function") {
926
- const o = s.createElement("template");
927
- o.content && o.content.ownerDocument && (s = o.content.ownerDocument);
936
+ if (typeof d == "function") {
937
+ const r = a.createElement("template");
938
+ r.content && r.content.ownerDocument && (a = r.content.ownerDocument);
928
939
  }
929
- let O, X = "", jt, ye = !1, ht = 0;
930
- const Te = function() {
931
- if (ht > 0) throw Z('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.');
932
- }, it = function(t) {
933
- Te(), ht++;
940
+ let R, X = "", $t, Ee = !1, gt = 0;
941
+ const be = function() {
942
+ if (gt > 0) throw W('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.');
943
+ }, ot = function(t) {
944
+ be(), gt++;
934
945
  try {
935
- return O.createHTML(t);
946
+ return R.createHTML(t);
936
947
  } finally {
937
- ht--;
948
+ gt--;
938
949
  }
939
- }, vn = function(t) {
940
- Te(), ht++;
950
+ }, Rn = function(t) {
951
+ be(), gt++;
941
952
  try {
942
- return O.createScriptURL(t);
953
+ return R.createScriptURL(t);
943
954
  } finally {
944
- ht--;
955
+ gt--;
945
956
  }
946
- }, wn = function() {
947
- return ye || (jt = Wr(tt, u), ye = !0), jt;
948
- }, Rt = s, Yt = Rt.implementation, be = Rt.createNodeIterator, On = Rt.createDocumentFragment, Rn = Rt.getElementsByTagName, Ln = l.importNode;
949
- let h = dn();
950
- n.isSupported = typeof _n == "function" && typeof nt == "function" && Yt && Yt.createHTMLDocument !== void 0;
951
- const In = Lr, Dn = Ir, Nn = Dr, Cn = Nr, Mn = Cr, xn = Mr, Ae = xr, Pn = zr;
952
- let Ee = fn, _ = null;
953
- const $t = d({}, [
954
- ...sn,
955
- ...ce,
956
- ...ue,
957
+ }, Ln = function() {
958
+ return Ee || ($t = jo(Q, u), Ee = !0), $t;
959
+ }, Dt = a, Xt = Dt.implementation, Se = Dt.createNodeIterator, In = Dt.createDocumentFragment, Dn = Dt.getElementsByTagName, vn = l.importNode;
960
+ let h = gn();
961
+ n.isSupported = typeof yn == "function" && typeof et == "function" && Xt && Xt.createHTMLDocument !== void 0;
962
+ const Nn = No, Cn = Co, Mn = Mo, xn = xo, Pn = Po, zn = zo, we = ko, kn = Fo;
963
+ let Oe = dn, _ = null;
964
+ const Vt = m({}, [
965
+ ...un,
957
966
  ...fe,
958
- ...ln
967
+ ...pe,
968
+ ...me,
969
+ ...fn
959
970
  ]);
960
971
  let g = null;
961
- const Xt = d({}, [
962
- ...cn,
963
- ...pe,
964
- ...un,
965
- ...Ht
972
+ const qt = m({}, [
973
+ ...pn,
974
+ ...de,
975
+ ...mn,
976
+ ...Wt
966
977
  ]);
967
- let x = Object.seal(ft(null, {
978
+ let x = Object.seal(pt(null, {
968
979
  tagNameCheck: {
969
980
  writable: !0,
970
981
  configurable: !1,
@@ -983,8 +994,8 @@ function Tn() {
983
994
  enumerable: !0,
984
995
  value: !1
985
996
  }
986
- })), _t = null, Se = null;
987
- const F = Object.seal(ft(null, {
997
+ })), Tt = null, Re = null;
998
+ const F = Object.seal(pt(null, {
988
999
  tagCheck: {
989
1000
  writable: !0,
990
1001
  configurable: !1,
@@ -998,10 +1009,10 @@ function Tn() {
998
1009
  value: null
999
1010
  }
1000
1011
  }));
1001
- let ve = !0, Vt = !0, we = !1, Oe = !0, H = !1, V = !0, q = !1, qt = !1, Lt = null, It = null, Kt = !1, ot = !1, Dt = !1, Nt = !1, Re = !0, Le = !1;
1002
- const Ie = "user-content-";
1003
- let Zt = !0, Jt = !1, at = {}, st = null;
1004
- const De = d({}, [
1012
+ let Le = !0, Kt = !0, Ie = !1, De = !0, H = !1, V = !0, q = !1, Zt = !1, vt = null, Nt = null, Jt = !1, it = !1, Ct = !1, Mt = !1, ve = !0, Ne = !1;
1013
+ const Ce = "user-content-";
1014
+ let Qt = !0, te = !1, rt = {}, st = null;
1015
+ const Me = m({}, [
1005
1016
  "annotation-xml",
1006
1017
  "audio",
1007
1018
  "colgroup",
@@ -1029,8 +1040,8 @@ function Tn() {
1029
1040
  "video",
1030
1041
  "xmp"
1031
1042
  ]);
1032
- let Ne = null;
1033
- const Ce = d({}, [
1043
+ let xe = null;
1044
+ const Pe = m({}, [
1034
1045
  "audio",
1035
1046
  "video",
1036
1047
  "img",
@@ -1038,8 +1049,8 @@ function Tn() {
1038
1049
  "image",
1039
1050
  "track"
1040
1051
  ]);
1041
- let Me = null;
1042
- const xe = d({}, [
1052
+ let ze = null;
1053
+ const ke = m({}, [
1043
1054
  "alt",
1044
1055
  "class",
1045
1056
  "for",
@@ -1054,113 +1065,113 @@ function Tn() {
1054
1065
  "value",
1055
1066
  "style",
1056
1067
  "xmlns"
1057
- ]), Ct = "http://www.w3.org/1998/Math/MathML", Mt = "http://www.w3.org/2000/svg", P = "http://www.w3.org/1999/xhtml";
1058
- let lt = P, Qt = !1, te = null;
1059
- const zn = d({}, [
1060
- Ct,
1061
- Mt,
1068
+ ]), xt = "http://www.w3.org/1998/Math/MathML", Pt = "http://www.w3.org/2000/svg", P = "http://www.w3.org/1999/xhtml";
1069
+ let at = P, ee = !1, ne = null;
1070
+ const Un = m({}, [
1071
+ xt,
1072
+ Pt,
1062
1073
  P
1063
- ], le), Pe = A([
1074
+ ], ue), Ue = b([
1064
1075
  "mi",
1065
1076
  "mo",
1066
1077
  "mn",
1067
1078
  "ms",
1068
1079
  "mtext"
1069
1080
  ]);
1070
- let ee = d({}, Pe);
1071
- const ze = A(["annotation-xml"]);
1072
- let ne = d({}, ze);
1073
- const kn = d({}, [
1081
+ let oe = m({}, Ue);
1082
+ const Fe = b(["annotation-xml"]);
1083
+ let ie = m({}, Fe);
1084
+ const Fn = m({}, [
1074
1085
  "title",
1075
1086
  "style",
1076
1087
  "font",
1077
1088
  "a",
1078
1089
  "script"
1079
1090
  ]);
1080
- let gt = null;
1081
- const Un = ["application/xhtml+xml", "text/html"], Fn = "text/html";
1082
- let T = null, ct = null;
1083
- const Hn = s.createElement("form"), ke = function(t) {
1091
+ let yt = null;
1092
+ const Hn = ["application/xhtml+xml", "text/html"], Gn = "text/html";
1093
+ let A = null, lt = null;
1094
+ const Wn = a.createElement("form"), He = function(t) {
1084
1095
  return t instanceof RegExp || t instanceof Function;
1085
1096
  }, re = function() {
1086
1097
  let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
1087
- if (ct && ct === t) return;
1088
- (!t || typeof t != "object") && (t = {}), t = N(t), gt = Un.indexOf(t.PARSER_MEDIA_TYPE) === -1 ? Fn : t.PARSER_MEDIA_TYPE, T = gt === "application/xhtml+xml" ? le : Et, _ = W(t, "ALLOWED_TAGS", $t, { transform: T }), g = W(t, "ALLOWED_ATTR", Xt, { transform: T }), te = W(t, "ALLOWED_NAMESPACES", zn, { transform: le }), Me = W(t, "ADD_URI_SAFE_ATTR", xe, {
1089
- transform: T,
1090
- base: xe
1091
- }), Ne = W(t, "ADD_DATA_URI_TAGS", Ce, {
1092
- transform: T,
1093
- base: Ce
1094
- }), st = W(t, "FORBID_CONTENTS", De, { transform: T }), _t = W(t, "FORBID_TAGS", N({}), { transform: T }), Se = W(t, "FORBID_ATTR", N({}), { transform: T }), at = L(t, "USE_PROFILES") ? t.USE_PROFILES && typeof t.USE_PROFILES == "object" ? N(t.USE_PROFILES) : t.USE_PROFILES : !1, ve = t.ALLOW_ARIA_ATTR !== !1, Vt = t.ALLOW_DATA_ATTR !== !1, we = t.ALLOW_UNKNOWN_PROTOCOLS || !1, Oe = t.ALLOW_SELF_CLOSE_IN_ATTR !== !1, H = t.SAFE_FOR_TEMPLATES || !1, V = t.SAFE_FOR_XML !== !1, q = t.WHOLE_DOCUMENT || !1, ot = t.RETURN_DOM || !1, Dt = t.RETURN_DOM_FRAGMENT || !1, Nt = t.RETURN_TRUSTED_TYPE || !1, Kt = t.FORCE_BODY || !1, Re = t.SANITIZE_DOM !== !1, Le = t.SANITIZE_NAMED_PROPS || !1, Zt = t.KEEP_CONTENT !== !1, Jt = t.IN_PLACE || !1, Ee = wr(t.ALLOWED_URI_REGEXP) ? t.ALLOWED_URI_REGEXP : fn, lt = typeof t.NAMESPACE == "string" ? t.NAMESPACE : P, ee = me(t, "MATHML_TEXT_INTEGRATION_POINTS", () => d({}, Pe)), ne = me(t, "HTML_INTEGRATION_POINTS", () => d({}, ze));
1095
- const e = me(t, "CUSTOM_ELEMENT_HANDLING", () => ft(null));
1096
- if (x = ft(null), L(e, "tagNameCheck") && ke(e.tagNameCheck) && (x.tagNameCheck = e.tagNameCheck), L(e, "attributeNameCheck") && ke(e.attributeNameCheck) && (x.attributeNameCheck = e.attributeNameCheck), L(e, "allowCustomizedBuiltInElements") && typeof e.allowCustomizedBuiltInElements == "boolean" && (x.allowCustomizedBuiltInElements = e.allowCustomizedBuiltInElements), E(x), H && (Vt = !1), Dt && (ot = !0), at && (_ = d({}, ln), g = ft(null), at.html === !0 && (d(_, sn), d(g, cn)), at.svg === !0 && (d(_, ce), d(g, pe), d(g, Ht)), at.svgFilters === !0 && (d(_, ue), d(g, pe), d(g, Ht)), at.mathMl === !0 && (d(_, fe), d(g, un), d(g, Ht))), F.tagCheck = null, F.attributeCheck = null, L(t, "ADD_TAGS") && (typeof t.ADD_TAGS == "function" ? F.tagCheck = t.ADD_TAGS : mt(t.ADD_TAGS) && (_ === $t && (_ = N(_)), d(_, t.ADD_TAGS, T))), L(t, "ADD_ATTR") && (typeof t.ADD_ATTR == "function" ? F.attributeCheck = t.ADD_ATTR : mt(t.ADD_ATTR) && (g === Xt && (g = N(g)), d(g, t.ADD_ATTR, T))), L(t, "ADD_FORBID_CONTENTS") && mt(t.ADD_FORBID_CONTENTS) && (st === De && (st = N(st)), d(st, t.ADD_FORBID_CONTENTS, T)), Zt && (_["#text"] = !0), q && d(_, [
1098
+ if (lt && lt === t) return;
1099
+ (!t || typeof t != "object") && (t = {}), t = N(t), yt = Hn.indexOf(t.PARSER_MEDIA_TYPE) === -1 ? Gn : t.PARSER_MEDIA_TYPE, A = yt === "application/xhtml+xml" ? ue : wt, _ = B(t, "ALLOWED_TAGS", Vt, { transform: A }), g = B(t, "ALLOWED_ATTR", qt, { transform: A }), ne = B(t, "ALLOWED_NAMESPACES", Un, { transform: ue }), ze = B(t, "ADD_URI_SAFE_ATTR", ke, {
1100
+ transform: A,
1101
+ base: ke
1102
+ }), xe = B(t, "ADD_DATA_URI_TAGS", Pe, {
1103
+ transform: A,
1104
+ base: Pe
1105
+ }), st = B(t, "FORBID_CONTENTS", Me, { transform: A }), Tt = B(t, "FORBID_TAGS", N({}), { transform: A }), Re = B(t, "FORBID_ATTR", N({}), { transform: A }), rt = L(t, "USE_PROFILES") ? t.USE_PROFILES && typeof t.USE_PROFILES == "object" ? N(t.USE_PROFILES) : t.USE_PROFILES : !1, Le = t.ALLOW_ARIA_ATTR !== !1, Kt = t.ALLOW_DATA_ATTR !== !1, Ie = t.ALLOW_UNKNOWN_PROTOCOLS || !1, De = t.ALLOW_SELF_CLOSE_IN_ATTR !== !1, H = t.SAFE_FOR_TEMPLATES || !1, V = t.SAFE_FOR_XML !== !1, q = t.WHOLE_DOCUMENT || !1, it = t.RETURN_DOM || !1, Ct = t.RETURN_DOM_FRAGMENT || !1, Mt = t.RETURN_TRUSTED_TYPE || !1, Jt = t.FORCE_BODY || !1, ve = t.SANITIZE_DOM !== !1, Ne = t.SANITIZE_NAMED_PROPS || !1, Qt = t.KEEP_CONTENT !== !1, te = t.IN_PLACE || !1, Oe = Io(t.ALLOWED_URI_REGEXP) ? t.ALLOWED_URI_REGEXP : dn, at = typeof t.NAMESPACE == "string" ? t.NAMESPACE : P, oe = he(t, "MATHML_TEXT_INTEGRATION_POINTS", () => m({}, Ue)), ie = he(t, "HTML_INTEGRATION_POINTS", () => m({}, Fe));
1106
+ const e = he(t, "CUSTOM_ELEMENT_HANDLING", () => pt(null));
1107
+ if (x = pt(null), L(e, "tagNameCheck") && He(e.tagNameCheck) && (x.tagNameCheck = e.tagNameCheck), L(e, "attributeNameCheck") && He(e.attributeNameCheck) && (x.attributeNameCheck = e.attributeNameCheck), L(e, "allowCustomizedBuiltInElements") && typeof e.allowCustomizedBuiltInElements == "boolean" && (x.allowCustomizedBuiltInElements = e.allowCustomizedBuiltInElements), S(x), H && (Kt = !1), Ct && (it = !0), rt && (_ = m({}, fn), g = pt(null), rt.html === !0 && (m(_, un), m(g, pn)), rt.svg === !0 && (m(_, fe), m(g, de), m(g, Wt)), rt.svgFilters === !0 && (m(_, pe), m(g, de), m(g, Wt)), rt.mathMl === !0 && (m(_, me), m(g, mn), m(g, Wt))), F.tagCheck = null, F.attributeCheck = null, L(t, "ADD_TAGS") && (typeof t.ADD_TAGS == "function" ? F.tagCheck = t.ADD_TAGS : dt(t.ADD_TAGS) && (_ === Vt && (_ = N(_)), m(_, t.ADD_TAGS, A))), L(t, "ADD_ATTR") && (typeof t.ADD_ATTR == "function" ? F.attributeCheck = t.ADD_ATTR : dt(t.ADD_ATTR) && (g === qt && (g = N(g)), m(g, t.ADD_ATTR, A))), L(t, "ADD_FORBID_CONTENTS") && dt(t.ADD_FORBID_CONTENTS) && (st === Me && (st = N(st)), m(st, t.ADD_FORBID_CONTENTS, A)), Qt && (_["#text"] = !0), q && m(_, [
1097
1108
  "html",
1098
1109
  "head",
1099
1110
  "body"
1100
- ]), _.table && (d(_, ["tbody"]), delete _t.tbody), t.TRUSTED_TYPES_POLICY) {
1101
- if (typeof t.TRUSTED_TYPES_POLICY.createHTML != "function") throw Z('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
1102
- if (typeof t.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw Z('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
1103
- const i = O;
1104
- O = t.TRUSTED_TYPES_POLICY;
1111
+ ]), _.table && (m(_, ["tbody"]), delete Tt.tbody), t.TRUSTED_TYPES_POLICY) {
1112
+ if (typeof t.TRUSTED_TYPES_POLICY.createHTML != "function") throw W('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
1113
+ if (typeof t.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw W('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
1114
+ const i = R;
1115
+ R = t.TRUSTED_TYPES_POLICY;
1105
1116
  try {
1106
- X = it("");
1107
- } catch (a) {
1108
- throw O = i, a;
1117
+ X = ot("");
1118
+ } catch (s) {
1119
+ throw R = i, s;
1109
1120
  }
1110
- } else t.TRUSTED_TYPES_POLICY === null ? (O = void 0, X = "") : (O === void 0 && (O = wn()), O && typeof X == "string" && (X = it("")));
1111
- A && A(t), ct = t;
1112
- }, Ue = d({}, [
1113
- ...ce,
1114
- ...ue,
1115
- ...Or
1116
- ]), Fe = d({}, [...fe, ...Rr]), Gn = function(t, e, i) {
1117
- return e.namespaceURI === P ? t === "svg" : e.namespaceURI === Ct ? t === "svg" && (i === "annotation-xml" || ee[i]) : !!Ue[t];
1118
- }, Wn = function(t, e, i) {
1119
- return e.namespaceURI === P ? t === "math" : e.namespaceURI === Mt ? t === "math" && ne[i] : !!Fe[t];
1120
- }, Bn = function(t, e, i) {
1121
- return e.namespaceURI === Mt && !ne[i] || e.namespaceURI === Ct && !ee[i] ? !1 : !Fe[t] && (kn[t] || !Ue[t]);
1122
- }, jn = function(t) {
1123
- let e = nt(t);
1121
+ } else t.TRUSTED_TYPES_POLICY === null ? (R = void 0, X = "") : (R === void 0 && (R = Ln()), R && typeof X == "string" && (X = ot("")));
1122
+ b && b(t), lt = t;
1123
+ }, Ge = m({}, [
1124
+ ...fe,
1125
+ ...pe,
1126
+ ...Do
1127
+ ]), We = m({}, [...me, ...vo]), Bn = function(t, e, i) {
1128
+ return e.namespaceURI === P ? t === "svg" : e.namespaceURI === xt ? t === "svg" && (i === "annotation-xml" || oe[i]) : !!Ge[t];
1129
+ }, Yn = function(t, e, i) {
1130
+ return e.namespaceURI === P ? t === "math" : e.namespaceURI === Pt ? t === "math" && ie[i] : !!We[t];
1131
+ }, jn = function(t, e, i) {
1132
+ return e.namespaceURI === Pt && !ie[i] || e.namespaceURI === xt && !oe[i] ? !1 : !We[t] && (Fn[t] || !Ge[t]);
1133
+ }, $n = function(t) {
1134
+ let e = et(t);
1124
1135
  (!e || !e.tagName) && (e = {
1125
- namespaceURI: lt,
1136
+ namespaceURI: at,
1126
1137
  tagName: "template"
1127
1138
  });
1128
- const i = Et(t.tagName), a = Et(e.tagName);
1129
- return te[t.namespaceURI] ? t.namespaceURI === Mt ? Gn(i, e, a) : t.namespaceURI === Ct ? Wn(i, e, a) : t.namespaceURI === P ? Bn(i, e, a) : !!(gt === "application/xhtml+xml" && te[t.namespaceURI]) : !1;
1139
+ const i = wt(t.tagName), s = wt(e.tagName);
1140
+ return ne[t.namespaceURI] ? t.namespaceURI === Pt ? Bn(i, e, s) : t.namespaceURI === xt ? Yn(i, e, s) : t.namespaceURI === P ? jn(i, e, s) : !!(yt === "application/xhtml+xml" && ne[t.namespaceURI]) : !1;
1130
1141
  }, G = function(t) {
1131
- Tt(n.removed, { element: t });
1142
+ Et(n.removed, { element: t });
1132
1143
  try {
1133
- nt(t).removeChild(t);
1144
+ et(t).removeChild(t);
1134
1145
  } catch {
1135
- if (Gt(t), !nt(t)) throw Z("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place");
1146
+ if (Bt(t), !et(t)) throw W("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place");
1136
1147
  }
1137
- }, He = function(t, e, i) {
1148
+ }, Be = function(t, e, i) {
1138
1149
  try {
1139
- t.removeAttributeNode(e);
1150
+ ye(t, e);
1140
1151
  } catch {
1141
1152
  try {
1142
1153
  t.removeAttribute(i);
1143
1154
  } catch {
1144
1155
  }
1145
1156
  }
1146
- }, xt = function(t) {
1147
- Pt(t);
1148
- const e = et(t);
1157
+ }, zt = function(t) {
1158
+ kt(t);
1159
+ const e = tt(t);
1149
1160
  if (e) {
1150
- const a = [];
1151
- J(e, (c) => {
1152
- Tt(a, c);
1153
- }), J(a, (c) => {
1161
+ const s = [];
1162
+ Z(e, (c) => {
1163
+ Et(s, c);
1164
+ }), Z(s, (c) => {
1154
1165
  try {
1155
- Gt(c);
1166
+ Bt(c);
1156
1167
  } catch {
1157
1168
  }
1158
1169
  });
1159
1170
  }
1160
- const i = Wt(t);
1161
- if (i) for (let a = i.length - 1; a >= 0; --a) {
1162
- const c = i[a], f = c && c.name;
1163
- typeof f == "string" && He(t, c, f);
1171
+ const i = Yt(t);
1172
+ if (i) for (let s = i.length - 1; s >= 0; --s) {
1173
+ const c = i[s], f = c && c.name;
1174
+ typeof f == "string" && Be(t, c, f);
1164
1175
  }
1165
1176
  }, K = function(t, e, i) {
1166
1177
  if (!i) try {
@@ -1168,12 +1179,12 @@ function Tn() {
1168
1179
  } catch {
1169
1180
  i = null;
1170
1181
  }
1171
- Tt(n.removed, {
1182
+ Et(n.removed, {
1172
1183
  attribute: i || null,
1173
1184
  from: e
1174
1185
  });
1175
1186
  try {
1176
- i ? e.removeAttributeNode(i) : e.removeAttribute(t);
1187
+ i ? ye(e, i) : e.removeAttribute(t);
1177
1188
  } catch {
1178
1189
  try {
1179
1190
  e.removeAttribute(t);
@@ -1181,7 +1192,7 @@ function Tn() {
1181
1192
  }
1182
1193
  }
1183
1194
  if (t === "is")
1184
- if (ot || Dt) try {
1195
+ if (it || Ct) try {
1185
1196
  G(e);
1186
1197
  } catch {
1187
1198
  }
@@ -1189,94 +1200,94 @@ function Tn() {
1189
1200
  e.setAttribute(t, "");
1190
1201
  } catch {
1191
1202
  }
1192
- }, Yn = function(t) {
1193
- const e = Wt(t);
1203
+ }, Xn = function(t) {
1204
+ const e = Yt(t);
1194
1205
  if (e)
1195
1206
  for (let i = e.length - 1; i >= 0; --i) {
1196
- const a = e[i], c = a && a.name;
1197
- typeof c != "string" || g[T(c)] || He(t, a, c);
1207
+ const s = e[i], c = s && s.name;
1208
+ typeof c != "string" || g[A(c)] || Be(t, s, c);
1198
1209
  }
1199
- }, Pt = function(t) {
1210
+ }, kt = function(t) {
1200
1211
  const e = [t];
1201
1212
  for (; e.length > 0; ) {
1202
1213
  const i = e.pop();
1203
- dt(i) === D.element && Yn(i);
1204
- const a = et(i);
1205
- if (a) for (let c = a.length - 1; c >= 0; --c) e.push(a[c]);
1214
+ _t(i) === v.element && Xn(i);
1215
+ const s = tt(i);
1216
+ if (s) for (let c = s.length - 1; c >= 0; --c) e.push(s[c]);
1206
1217
  }
1207
- }, Ge = function(t, e) {
1218
+ }, Ye = function(t, e) {
1208
1219
  return V ? t === "patchsrc" ? !0 : t === "for" && e !== "label" && e !== "output" : !1;
1209
- }, $n = function(t) {
1220
+ }, Vn = function(t) {
1210
1221
  if (!V) return;
1211
1222
  const e = [t];
1212
1223
  for (; e.length > 0; ) {
1213
- const i = e.pop(), a = dt(i);
1214
- if (a === D.processingInstruction || a === D.comment && S(mn, i.data)) {
1224
+ const i = e.pop(), s = _t(i);
1225
+ if (s === v.processingInstruction || s === v.comment && w(_n, i.data)) {
1215
1226
  try {
1216
- Gt(i);
1227
+ Bt(i);
1217
1228
  } catch {
1218
1229
  }
1219
1230
  continue;
1220
1231
  }
1221
- if (a === D.element) {
1222
- const f = i, m = T(Bt(i));
1232
+ if (s === v.element) {
1233
+ const f = i, p = A(jt(i));
1223
1234
  try {
1224
- f.hasAttribute && f.hasAttribute("patchsrc") && f.removeAttribute("patchsrc"), f.hasAttribute && f.hasAttribute("for") && Ge("for", m) && f.removeAttribute("for");
1235
+ f.hasAttribute && f.hasAttribute("patchsrc") && f.removeAttribute("patchsrc"), f.hasAttribute && f.hasAttribute("for") && Ye("for", p) && f.removeAttribute("for");
1225
1236
  } catch {
1226
1237
  }
1227
1238
  }
1228
- const c = et(i);
1239
+ const c = tt(i);
1229
1240
  if (c) for (let f = c.length - 1; f >= 0; --f) e.push(c[f]);
1230
1241
  }
1231
- }, We = function(t) {
1242
+ }, je = function(t) {
1232
1243
  let e = null, i = null;
1233
- if (Kt) t = "<remove></remove>" + t;
1244
+ if (Jt) t = "<remove></remove>" + t;
1234
1245
  else {
1235
- const f = nn(t, /^[\r\n\t ]+/);
1246
+ const f = sn(t, /^[\r\n\t ]+/);
1236
1247
  i = f && f[0];
1237
1248
  }
1238
- gt === "application/xhtml+xml" && lt === P && (t = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + t + "</body></html>");
1239
- const a = O ? it(t) : t;
1240
- if (lt === P) try {
1241
- e = new wt().parseFromString(a, gt);
1249
+ yt === "application/xhtml+xml" && at === P && (t = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + t + "</body></html>");
1250
+ const s = R ? ot(t) : t;
1251
+ if (at === P) try {
1252
+ e = new Lt().parseFromString(s, yt);
1242
1253
  } catch {
1243
1254
  }
1244
1255
  if (!e || !e.documentElement) {
1245
- e = Yt.createDocument(lt, "template", null);
1256
+ e = Xt.createDocument(at, "template", null);
1246
1257
  try {
1247
- e.documentElement.innerHTML = Qt ? X : a;
1258
+ e.documentElement.innerHTML = ee ? X : s;
1248
1259
  } catch {
1249
1260
  }
1250
1261
  }
1251
1262
  const c = e.body || e.documentElement;
1252
- return t && i && c.insertBefore(s.createTextNode(i), c.childNodes[0] || null), lt === P ? Rn.call(e, q ? "html" : "body")[0] : q ? e.documentElement : c;
1253
- }, Be = function(t) {
1254
- const e = Ot ? Ot(t) : t.ownerDocument;
1255
- return be.call(e || t, t, I.SHOW_ELEMENT | I.SHOW_COMMENT | I.SHOW_TEXT | I.SHOW_PROCESSING_INSTRUCTION | I.SHOW_CDATA_SECTION, null);
1256
- }, zt = function(t) {
1257
- return t = bt(t, In, " "), t = bt(t, Dn, " "), t = bt(t, Nn, " "), t;
1258
- }, ie = function(t) {
1263
+ return t && i && c.insertBefore(a.createTextNode(i), c.childNodes[0] || null), at === P ? Dn.call(e, q ? "html" : "body")[0] : q ? e.documentElement : c;
1264
+ }, $e = function(t) {
1265
+ const e = It ? It(t) : t.ownerDocument;
1266
+ return Se.call(e || t, t, I.SHOW_ELEMENT | I.SHOW_COMMENT | I.SHOW_TEXT | I.SHOW_PROCESSING_INSTRUCTION | I.SHOW_CDATA_SECTION, null);
1267
+ }, Ut = function(t) {
1268
+ return t = bt(t, Nn, " "), t = bt(t, Cn, " "), t = bt(t, Mn, " "), t;
1269
+ }, se = function(t) {
1259
1270
  var e;
1260
1271
  t.normalize();
1261
- const i = Ot ? Ot(t) : t.ownerDocument, a = be.call(i || t, t, I.SHOW_TEXT | I.SHOW_COMMENT | I.SHOW_CDATA_SECTION | I.SHOW_PROCESSING_INSTRUCTION, null);
1262
- let c = a.nextNode();
1272
+ const i = It ? It(t) : t.ownerDocument, s = Se.call(i || t, t, I.SHOW_TEXT | I.SHOW_COMMENT | I.SHOW_CDATA_SECTION | I.SHOW_PROCESSING_INSTRUCTION, null);
1273
+ let c = s.nextNode();
1263
1274
  for (; c; )
1264
- c.data = zt(c.data), c = a.nextNode();
1275
+ c.data = Ut(c.data), c = s.nextNode();
1265
1276
  const f = (e = t.querySelectorAll) === null || e === void 0 ? void 0 : e.call(t, "template");
1266
- f && J(f, (m) => {
1267
- ut(m.content) && ie(m.content);
1277
+ f && Z(f, (p) => {
1278
+ ct(p.content) && se(p.content);
1268
1279
  });
1269
- }, kt = function(t) {
1270
- const e = rt ? rt(t) : null;
1271
- return typeof e != "string" || T(e) !== "form" ? !1 : typeof t.nodeName != "string" || typeof t.textContent != "string" || typeof t.removeChild != "function" || t.attributes !== Wt(t) || typeof t.removeAttribute != "function" || typeof t.setAttribute != "function" || typeof t.namespaceURI != "string" || typeof t.insertBefore != "function" || typeof t.hasChildNodes != "function" || t.nodeType !== $(t) || t.childNodes !== et(t);
1272
- }, ut = function(t) {
1280
+ }, Ft = function(t) {
1281
+ const e = nt ? nt(t) : null;
1282
+ return typeof e != "string" || A(e) !== "form" ? !1 : typeof t.nodeName != "string" || typeof t.textContent != "string" || typeof t.removeChild != "function" || t.attributes !== Yt(t) || typeof t.removeAttribute != "function" || typeof t.removeAttributeNode != "function" || typeof t.getAttributeNode != "function" || typeof t.setAttribute != "function" || typeof t.namespaceURI != "string" || typeof t.insertBefore != "function" || typeof t.hasChildNodes != "function" || t.nodeType !== $(t) || t.childNodes !== tt(t);
1283
+ }, ct = function(t) {
1273
1284
  if (!$ || typeof t != "object" || t === null) return !1;
1274
1285
  try {
1275
- return $(t) === D.documentFragment;
1286
+ return $(t) === v.documentFragment;
1276
1287
  } catch {
1277
1288
  return !1;
1278
1289
  }
1279
- }, yt = function(t) {
1290
+ }, At = function(t) {
1280
1291
  if (!$ || typeof t != "object" || t === null) return !1;
1281
1292
  try {
1282
1293
  return typeof $(t) == "number";
@@ -1284,64 +1295,64 @@ function Tn() {
1284
1295
  return !1;
1285
1296
  }
1286
1297
  };
1287
- function z(o, t, e) {
1288
- o.length !== 0 && J(o, (i) => {
1289
- i.call(n, t, e, ct);
1298
+ function z(r, t, e) {
1299
+ r.length !== 0 && Z(r, (i) => {
1300
+ i.call(n, t, e, lt);
1290
1301
  });
1291
1302
  }
1292
- const Xn = function(t, e) {
1293
- return !!(V && t.hasChildNodes() && !yt(t.firstElementChild) && S(pn, t.textContent) && S(pn, t.innerHTML) || V && t.namespaceURI === P && Fr[e] && (yt(t.firstElementChild) || typeof t.textContent == "string" && S(Hr[e], t.textContent)) || t.nodeType === D.processingInstruction || V && t.nodeType === D.comment && S(mn, t.data));
1294
- }, Ut = function(t, e) {
1295
- if (t instanceof RegExp) return S(t, e);
1303
+ const qn = function(t, e) {
1304
+ return !!(V && t.hasChildNodes() && !At(t.firstElementChild) && w(hn, t.textContent) && w(hn, t.innerHTML) || V && t.namespaceURI === P && Wo[e] && (At(t.firstElementChild) || typeof t.textContent == "string" && w(Bo[e], t.textContent)) || t.nodeType === v.processingInstruction || V && t.nodeType === v.comment && w(_n, t.data));
1305
+ }, Ht = function(t, e) {
1306
+ if (t instanceof RegExp) return w(t, e);
1296
1307
  if (t instanceof Function) {
1297
- for (var i = arguments.length, a = new Array(i > 2 ? i - 2 : 0), c = 2; c < i; c++) a[c - 2] = arguments[c];
1298
- return !!t(e, ...a);
1308
+ for (var i = arguments.length, s = new Array(i > 2 ? i - 2 : 0), c = 2; c < i; c++) s[c - 2] = arguments[c];
1309
+ return !!t(e, ...s);
1299
1310
  }
1300
1311
  return !1;
1301
- }, Vn = function(t, e, i) {
1302
- if (!_t[e] && Ve(e) && Ut(x.tagNameCheck, e)) return !1;
1303
- if (Zt && !st[e]) {
1304
- const a = nt(t), c = et(t);
1305
- if (c && a) {
1312
+ }, Kn = function(t, e, i) {
1313
+ if (!Tt[e] && Ke(e) && Ht(x.tagNameCheck, e)) return !1;
1314
+ if (Qt && !st[e]) {
1315
+ const s = et(t), c = tt(t);
1316
+ if (c && s) {
1306
1317
  const f = c.length;
1307
- for (let m = f - 1; m >= 0; --m) {
1308
- const v = t === i ? En(c[m], !0) : c[m];
1309
- a.insertBefore(v, Sn(t));
1318
+ for (let p = f - 1; p >= 0; --p) {
1319
+ const T = t === i ? wn(c[p], !0) : c[p];
1320
+ s.insertBefore(T, On(t));
1310
1321
  }
1311
1322
  }
1312
1323
  }
1313
1324
  return G(t), !0;
1314
- }, je = function(t, e, i, a) {
1315
- return t.length === 0 ? e : e === i || e === a ? N(e) : e;
1316
- }, Ye = function(t, e) {
1317
- return t === e || nt(t) !== null ? !1 : (Jt && Pt(t), !0);
1318
- }, $e = function(t, e) {
1319
- if (z(h.beforeSanitizeElements, t, null), Ye(t, e)) return !0;
1320
- if (kt(t))
1325
+ }, Xe = function(t, e, i, s) {
1326
+ return t.length === 0 ? e : e === i || e === s ? N(e) : e;
1327
+ }, ut = function(t, e) {
1328
+ return t === e || et(t) !== null ? !1 : (te && kt(t), !0);
1329
+ }, Ve = function(t, e) {
1330
+ if (z(h.beforeSanitizeElements, t, null), ut(t, e)) return !0;
1331
+ if (Ft(t))
1321
1332
  return G(t), !0;
1322
- const i = T(Bt(t));
1323
- if (_ = je(h.uponSanitizeElement, _, $t, Lt), z(h.uponSanitizeElement, t, {
1333
+ const i = A(jt(t));
1334
+ if (_ = Xe(h.uponSanitizeElement, _, Vt, vt), z(h.uponSanitizeElement, t, {
1324
1335
  tagName: i,
1325
1336
  allowedTags: _
1326
- }), Ye(t, e)) return !0;
1327
- if (Xn(t, i))
1337
+ }), ut(t, e)) return !0;
1338
+ if (qn(t, i))
1328
1339
  return G(t), !0;
1329
- if (_t[i] || !(F.tagCheck instanceof Function && F.tagCheck(i)) && !_[i]) {
1330
- const a = Vn(t, i, e);
1331
- return a === !1 && z(h.afterSanitizeElements, t, null), a;
1340
+ if (Tt[i] || !(F.tagCheck instanceof Function && F.tagCheck(i)) && !_[i]) {
1341
+ const s = Kn(t, i, e);
1342
+ return s === !1 && (z(h.afterSanitizeElements, t, null), ut(t, e)) ? !0 : s;
1332
1343
  }
1333
- if (dt(t) === D.element && !jn(t) || (i === "noscript" || i === "noembed" || i === "noframes") && S(kr, t.innerHTML))
1344
+ if (_t(t) === v.element && !$n(t) || (i === "noscript" || i === "noembed" || i === "noframes") && w(Ho, t.innerHTML))
1334
1345
  return G(t), !0;
1335
- if (H && t.nodeType === D.text) {
1336
- const a = zt(t.textContent);
1337
- t.textContent !== a && (Tt(n.removed, { element: t.cloneNode() }), t.textContent = a);
1346
+ if (H && t.nodeType === v.text) {
1347
+ const s = Ut(t.textContent);
1348
+ t.textContent !== s && (Et(n.removed, { element: t.cloneNode() }), t.textContent = s);
1338
1349
  }
1339
- return z(h.afterSanitizeElements, t, null), !1;
1340
- }, Xe = function(t, e, i) {
1341
- if (Se[e] || Ge(e, t) || Re && (e === "id" || e === "name") && (i in s || i in Hn)) return !1;
1342
- const a = g[e] || F.attributeCheck instanceof Function && F.attributeCheck(e, t);
1343
- return Vt && S(Cn, e) || ve && S(Mn, e) ? !0 : a ? Me[e] || S(Ee, bt(i, Ae, "")) || (e === "src" || e === "xlink:href" || e === "href") && t !== "script" && rn(i, "data:") === 0 && Ne[t] || we && !S(xn, bt(i, Ae, "")) ? !0 : !i : Ve(t) && Ut(x.tagNameCheck, t) && Ut(x.attributeNameCheck, e, t) || e === "is" && x.allowCustomizedBuiltInElements && Ut(x.tagNameCheck, i);
1344
- }, qn = d({}, [
1350
+ return z(h.afterSanitizeElements, t, null), ut(t, e);
1351
+ }, qe = function(t, e, i) {
1352
+ if (Re[e] || Ye(e, t) || ve && (e === "id" || e === "name") && (i in a || i in Wn)) return !1;
1353
+ const s = g[e] || F.attributeCheck instanceof Function && F.attributeCheck(e, t);
1354
+ return Kt && w(xn, e) || Le && w(Pn, e) ? !0 : s ? ze[e] || w(Oe, bt(i, we, "")) || (e === "src" || e === "xlink:href" || e === "href") && t !== "script" && an(i, "data:") === 0 && xe[t] || Ie && !w(zn, bt(i, we, "")) ? !0 : !i : Ke(t) && Ht(x.tagNameCheck, t) && Ht(x.attributeNameCheck, e, t) || e === "is" && x.allowCustomizedBuiltInElements && Ht(x.tagNameCheck, i);
1355
+ }, Zn = m({}, [
1345
1356
  "annotation-xml",
1346
1357
  "color-profile",
1347
1358
  "font-face",
@@ -1350,74 +1361,74 @@ function Tn() {
1350
1361
  "font-face-src",
1351
1362
  "font-face-uri",
1352
1363
  "missing-glyph"
1353
- ]), Ve = function(t) {
1354
- return !qn[Et(t)] && S(Pn, t);
1355
- }, Kn = function(t, e, i, a) {
1356
- if (O && typeof tt == "object" && typeof tt.getAttributeType == "function" && !i) switch (tt.getAttributeType(t, e)) {
1364
+ ]), Ke = function(t) {
1365
+ return !Zn[wt(t)] && w(kn, t);
1366
+ }, Jn = function(t, e, i, s) {
1367
+ if (R && typeof Q == "object" && typeof Q.getAttributeType == "function" && !i) switch (Q.getAttributeType(t, e)) {
1357
1368
  case "TrustedHTML":
1358
- return it(a);
1369
+ return ot(s);
1359
1370
  case "TrustedScriptURL":
1360
- return vn(a);
1371
+ return Rn(s);
1361
1372
  }
1362
- return a;
1363
- }, Zn = function(t, e, i, a) {
1373
+ return s;
1374
+ }, Qn = function(t, e, i, s) {
1364
1375
  try {
1365
- i ? t.setAttributeNS(i, e, a) : t.setAttribute(e, a), kt(t) ? G(t) : en(n.removed);
1376
+ return i ? t.setAttributeNS(i, e, s) : t.setAttribute(e, s), Ft(t) ? (G(t), !1) : !0;
1366
1377
  } catch {
1367
- K(e, t);
1378
+ return K(e, t), !1;
1368
1379
  }
1369
- }, qe = function(t) {
1370
- z(h.beforeSanitizeAttributes, t, null);
1371
- const e = t.attributes;
1372
- if (!e || kt(t)) return;
1373
- g = je(h.uponSanitizeAttribute, g, Xt, It);
1374
- const i = {
1380
+ }, Ze = function(t, e) {
1381
+ if (z(h.beforeSanitizeAttributes, t, null), ut(t, e)) return;
1382
+ const i = t.attributes;
1383
+ if (!i || Ft(t)) return;
1384
+ g = Xe(h.uponSanitizeAttribute, g, qt, Nt);
1385
+ const s = {
1375
1386
  attrName: "",
1376
1387
  attrValue: "",
1377
1388
  keepAttr: !0,
1378
1389
  allowedAttributes: g,
1379
1390
  forceKeepAttr: void 0
1380
1391
  };
1381
- let a = e.length;
1382
- const c = T(t.nodeName);
1383
- for (; a--; ) {
1384
- const f = e[a], m = f.name, v = f.namespaceURI, C = f.value, R = T(m), ae = C;
1385
- let w = m === "value" ? ae : Tr(ae);
1386
- if (i.attrName = R, i.attrValue = w, i.keepAttr = !0, i.forceKeepAttr = void 0, z(h.uponSanitizeAttribute, t, i), w = i.attrValue, Le && (R === "id" || R === "name") && rn(w, Ie) !== 0 && (K(m, t, f), w = Ie + w), V && S(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, w)) {
1387
- K(m, t, f);
1392
+ let c = i.length;
1393
+ const f = A(t.nodeName);
1394
+ for (; c--; ) {
1395
+ const p = i[c], T = p.name, C = p.namespaceURI, D = p.value, ft = A(T), le = D;
1396
+ let O = T === "value" ? le : bo(le), Je = !1;
1397
+ if (s.attrName = ft, s.attrValue = O, s.keepAttr = !0, s.forceKeepAttr = void 0, z(h.uponSanitizeAttribute, t, s), O = s.attrValue, Ne && (ft === "id" || ft === "name") && an(O, Ce) !== 0 && (K(T, t, p), O = Ce + O, Je = !0), V && w(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, O)) {
1398
+ K(T, t, p);
1388
1399
  continue;
1389
1400
  }
1390
- if (R === "attributename" && nn(w, "href")) {
1391
- K(m, t, f);
1401
+ if (ft === "attributename" && sn(O, "href")) {
1402
+ K(T, t, p);
1392
1403
  continue;
1393
1404
  }
1394
- if (!i.forceKeepAttr) {
1395
- if (!i.keepAttr) {
1396
- K(m, t, f);
1405
+ if (!s.forceKeepAttr) {
1406
+ if (!s.keepAttr) {
1407
+ K(T, t, p);
1397
1408
  continue;
1398
1409
  }
1399
- if (!Oe && S(Ur, w)) {
1400
- K(m, t, f);
1410
+ if (!De && w(Go, O)) {
1411
+ K(T, t, p);
1401
1412
  continue;
1402
1413
  }
1403
- if (H && (w = zt(w)), !Xe(c, R, w)) {
1404
- K(m, t, f);
1414
+ if (H && (O = Ut(O)), !qe(f, ft, O)) {
1415
+ K(T, t, p);
1405
1416
  continue;
1406
1417
  }
1407
- w = Kn(c, R, v, w), w !== ae && Zn(t, m, v, w);
1418
+ O = Jn(f, ft, C, O), O !== le && Qn(t, T, C, O) && Je && rn(n.removed);
1408
1419
  }
1409
1420
  }
1410
- z(h.afterSanitizeAttributes, t, null);
1411
- }, Ft = function(t) {
1421
+ z(h.afterSanitizeAttributes, t, null), ut(t, e);
1422
+ }, Gt = function(t) {
1412
1423
  let e = null;
1413
- const i = Be(t);
1424
+ const i = $e(t);
1414
1425
  for (z(h.beforeSanitizeShadowDOM, t, null); e = i.nextNode(); )
1415
- if (z(h.uponSanitizeShadowNode, e, null), $e(e, t), qe(e), ut(e.content) && Ft(e.content), dt(e) === D.element) {
1416
- const a = ge(e);
1417
- ut(a) && (oe(a), Ft(a));
1426
+ if (z(h.uponSanitizeShadowNode, e, null), Ve(e, t), Ze(e, t), ct(e.content) && Gt(e.content), _t(e) === v.element) {
1427
+ const s = Ae(e);
1428
+ ct(s) && (ae(s), Gt(s));
1418
1429
  }
1419
1430
  z(h.afterSanitizeShadowDOM, t, null);
1420
- }, oe = function(t) {
1431
+ }, ae = function(t) {
1421
1432
  const e = [{
1422
1433
  node: t,
1423
1434
  shadow: null
@@ -1425,164 +1436,156 @@ function Tn() {
1425
1436
  for (; e.length > 0; ) {
1426
1437
  const i = e.pop();
1427
1438
  if (i.shadow) {
1428
- Ft(i.shadow);
1439
+ Gt(i.shadow);
1429
1440
  continue;
1430
1441
  }
1431
- const a = i.node, c = dt(a) === D.element, f = et(a);
1432
- if (f) for (let m = f.length - 1; m >= 0; --m) e.push({
1433
- node: f[m],
1442
+ const s = i.node, c = _t(s) === v.element, f = tt(s);
1443
+ if (f) for (let p = f.length - 1; p >= 0; --p) e.push({
1444
+ node: f[p],
1434
1445
  shadow: null
1435
1446
  });
1436
1447
  if (c) {
1437
- const m = rt ? rt(a) : null;
1438
- if (typeof m == "string" && T(m) === "template") {
1439
- const v = a.content;
1440
- ut(v) && e.push({
1441
- node: v,
1448
+ const p = nt ? nt(s) : null;
1449
+ if (typeof p == "string" && A(p) === "template") {
1450
+ const T = s.content;
1451
+ ct(T) && e.push({
1452
+ node: T,
1442
1453
  shadow: null
1443
1454
  });
1444
1455
  }
1445
1456
  }
1446
1457
  if (c) {
1447
- const m = ge(a);
1448
- ut(m) && e.push({
1458
+ const p = Ae(s);
1459
+ ct(p) && e.push({
1449
1460
  node: null,
1450
- shadow: m
1461
+ shadow: p
1451
1462
  }, {
1452
- node: m,
1463
+ node: p,
1453
1464
  shadow: null
1454
1465
  });
1455
1466
  }
1456
1467
  }
1457
1468
  };
1458
- return n.sanitize = function(o) {
1459
- let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, e = null, i = null, a = null, c = null;
1460
- if (Qt = !o, Qt && (o = "<!-->"), typeof o != "string" && !yt(o) && (o = vr(o), typeof o != "string"))
1461
- throw Z("dirty is not a string, aborting");
1462
- if (!n.isSupported) return o;
1463
- qt ? (_ = Lt, g = It) : re(t), (h.uponSanitizeElement.length > 0 || h.uponSanitizeAttribute.length > 0) && (_ = N(_)), h.uponSanitizeAttribute.length > 0 && (g = N(g)), n.removed = [];
1464
- const f = Jt && typeof o != "string" && yt(o);
1469
+ return n.sanitize = function(r) {
1470
+ let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, e = null, i = null, s = null, c = null;
1471
+ if (ee = !r, ee && (r = "<!-->"), typeof r != "string" && !At(r) && (r = Lo(r), typeof r != "string"))
1472
+ throw W("dirty is not a string, aborting");
1473
+ if (!n.isSupported) return r;
1474
+ Zt ? (_ = vt, g = Nt) : re(t), (h.uponSanitizeElement.length > 0 || h.uponSanitizeAttribute.length > 0) && (_ = N(_)), h.uponSanitizeAttribute.length > 0 && (g = N(g)), n.removed = [];
1475
+ const f = te && typeof r != "string" && At(r);
1465
1476
  if (f) {
1466
- $n(o);
1467
- const C = Bt(o);
1477
+ Vn(r);
1478
+ const C = jt(r);
1468
1479
  if (typeof C == "string") {
1469
- const R = T(C);
1470
- if (!_[R] || _t[R])
1471
- throw xt(o), Z("root node is forbidden and cannot be sanitized in-place");
1480
+ const D = A(C);
1481
+ if (!_[D] || Tt[D])
1482
+ throw zt(r), W("root node is forbidden and cannot be sanitized in-place");
1472
1483
  }
1473
- if (kt(o))
1474
- throw xt(o), Z("root node is clobbered and cannot be sanitized in-place");
1484
+ if (Ft(r))
1485
+ throw zt(r), W("root node is clobbered and cannot be sanitized in-place");
1475
1486
  try {
1476
- oe(o);
1477
- } catch (R) {
1478
- throw xt(o), R;
1487
+ ae(r);
1488
+ } catch (D) {
1489
+ throw zt(r), D;
1479
1490
  }
1480
- } else if (yt(o))
1481
- e = We("<!---->"), i = e.ownerDocument.importNode(o, !0), i.nodeType === D.element && i.nodeName === "BODY" || i.nodeName === "HTML" ? e = i : e.appendChild(i), oe(i);
1491
+ } else if (At(r))
1492
+ e = je("<!---->"), i = e.ownerDocument.importNode(r, !0), i.nodeType === v.element && i.nodeName === "BODY" || i.nodeName === "HTML" ? e = i : e.appendChild(i), ae(e);
1482
1493
  else {
1483
- if (!ot && !H && !q && o.indexOf("<") === -1) return O && Nt ? it(o) : o;
1484
- if (e = We(o), !e) return ot ? null : Nt ? X : "";
1494
+ if (!it && !H && !q && r.indexOf("<") === -1) return R && Mt ? ot(r) : r;
1495
+ if (e = je(r), !e) return it ? null : Mt ? X : "";
1485
1496
  }
1486
- e && Kt && G(e.firstChild);
1487
- const m = f ? o : e;
1497
+ e && Jt && G(e.firstChild);
1498
+ const p = f ? r : e;
1488
1499
  try {
1489
- const C = Be(m);
1490
- for (; a = C.nextNode(); )
1491
- $e(a, m), qe(a), ut(a.content) && Ft(a.content);
1500
+ const C = $e(p);
1501
+ for (; s = C.nextNode(); )
1502
+ Ve(s, p), Ze(s, p), ct(s.content) && Gt(s.content);
1492
1503
  } catch (C) {
1493
- throw f && (xt(o), J(n.removed, (R) => {
1494
- R.element && Pt(R.element);
1504
+ throw f && (zt(r), Z(n.removed, (D) => {
1505
+ D.element && kt(D.element);
1495
1506
  })), C;
1496
1507
  }
1497
- if (f)
1498
- return J(n.removed, (C) => {
1499
- C.element && Pt(C.element);
1500
- }), H && ie(o), o;
1501
- if (ot) {
1502
- if (H && ie(e), Dt)
1503
- for (c = On.call(e.ownerDocument); e.firstChild; ) c.appendChild(e.firstChild);
1508
+ if (f) {
1509
+ let C = !1;
1510
+ if (Z(n.removed, (D) => {
1511
+ D.element && (D.element === r && (C = !0), kt(D.element));
1512
+ }), C) throw W("a node selected for removal could not be safely returned; refusing to sanitize in place");
1513
+ return H && se(r), r;
1514
+ }
1515
+ if (it) {
1516
+ if (H && se(e), Ct)
1517
+ for (c = In.call(e.ownerDocument); e.firstChild; ) c.appendChild(e.firstChild);
1504
1518
  else c = e;
1505
- return (g.shadowroot || g.shadowrootmode) && (c = Ln.call(l, c, !0)), c;
1519
+ return (g.shadowroot || g.shadowrootmode) && (c = vn.call(l, c, !0)), c;
1506
1520
  }
1507
- let v = q ? e.outerHTML : e.innerHTML;
1508
- return q && _["!doctype"] && e.ownerDocument && e.ownerDocument.doctype && e.ownerDocument.doctype.name && S(Pr, e.ownerDocument.doctype.name) && (v = "<!DOCTYPE " + e.ownerDocument.doctype.name + `>
1509
- ` + v), H && (v = zt(v)), O && Nt ? it(v) : v;
1521
+ let T = q ? e.outerHTML : e.innerHTML;
1522
+ return q && _["!doctype"] && e.ownerDocument && e.ownerDocument.doctype && e.ownerDocument.doctype.name && w(Uo, e.ownerDocument.doctype.name) && (T = "<!DOCTYPE " + e.ownerDocument.doctype.name + `>
1523
+ ` + T), H && (T = Ut(T)), R && Mt ? ot(T) : T;
1510
1524
  }, n.setConfig = function() {
1511
- let o = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
1512
- re(o), qt = !0, Lt = _, It = g;
1525
+ let r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
1526
+ re(r), Zt = !0, vt = _, Nt = g;
1513
1527
  }, n.clearConfig = function() {
1514
- ct = null, qt = !1, Lt = null, It = null, O = jt, X = "";
1515
- }, n.isValidAttribute = function(o, t, e) {
1516
- ct || re({});
1517
- const i = T(o), a = T(t);
1518
- return Xe(i, a, e);
1519
- }, n.addHook = function(o, t) {
1520
- typeof t == "function" && L(h, o) && Tt(h[o], t);
1521
- }, n.removeHook = function(o, t) {
1522
- if (L(h, o)) {
1528
+ lt = null, Zt = !1, vt = null, Nt = null, R = $t, X = "";
1529
+ }, n.isValidAttribute = function(r, t, e) {
1530
+ lt || re({});
1531
+ const i = A(r), s = A(t);
1532
+ return qe(i, s, e);
1533
+ }, n.addHook = function(r, t) {
1534
+ typeof t == "function" && L(h, r) && Et(h[r], t);
1535
+ }, n.removeHook = function(r, t) {
1536
+ if (L(h, r)) {
1523
1537
  if (t !== void 0) {
1524
- const e = gr(h[o], t);
1525
- return e === -1 ? void 0 : yr(h[o], e, 1)[0];
1538
+ const e = Ao(h[r], t);
1539
+ return e === -1 ? void 0 : Eo(h[r], e, 1)[0];
1526
1540
  }
1527
- return en(h[o]);
1541
+ return rn(h[r]);
1528
1542
  }
1529
- }, n.removeHooks = function(o) {
1530
- L(h, o) && (h[o] = []);
1543
+ }, n.removeHooks = function(r) {
1544
+ L(h, r) && (h[r] = []);
1531
1545
  }, n.removeAllHooks = function() {
1532
- h = dn();
1546
+ h = gn();
1533
1547
  }, n;
1534
1548
  }
1535
- var Br = Tn(), St = /* @__PURE__ */ new Map(), _e = /* @__PURE__ */ new Map();
1536
- function bn(r, n) {
1537
- const s = Br.sanitize(r, {
1538
- USE_PROFILES: {
1539
- svg: !0,
1540
- svgFilters: !0
1541
- },
1549
+ var $o = bn();
1550
+ const Ot = /* @__PURE__ */ new Map(), Te = /* @__PURE__ */ new Map();
1551
+ function Sn(o, n) {
1552
+ const a = $o.sanitize(o, {
1553
+ USE_PROFILES: { svg: !0, svgFilters: !0 },
1542
1554
  FORBID_TAGS: ["script", "use"],
1543
- FORBID_ATTR: [
1544
- "onload",
1545
- "onerror",
1546
- "onbegin",
1547
- "href",
1548
- "xlink:href"
1549
- ]
1550
- }), l = new DOMParser().parseFromString(s, "image/svg+xml").documentElement;
1551
- if (!(l instanceof SVGElement)) throw new Error(`Invalid SVG from ${n}`);
1552
- return l;
1553
- }
1554
- async function jr(r) {
1555
- const n = await fetch(r);
1556
- if (!n.ok) throw new Error(`Failed to load icon: ${n.status}`);
1557
- return bn(await n.text(), r);
1555
+ // <use> can SSRF to external hrefs
1556
+ FORBID_ATTR: ["onload", "onerror", "onbegin", "href", "xlink:href"]
1557
+ }), d = new DOMParser().parseFromString(a, "image/svg+xml").documentElement;
1558
+ if (!(d instanceof SVGElement))
1559
+ throw new Error(`Invalid SVG from ${n}`);
1560
+ return d;
1558
1561
  }
1559
- async function hn(r) {
1560
- return St.has(r) || St.set(r, jr(r)), (await St.get(r)).cloneNode(!0);
1562
+ async function Xo(o) {
1563
+ const n = await fetch(o);
1564
+ if (!n.ok)
1565
+ throw new Error(`Failed to load icon: ${n.status}`);
1566
+ return Sn(await n.text(), o);
1561
1567
  }
1562
- function Yr(r) {
1563
- let n = _e.get(r);
1564
- return n || (n = bn(r, "inline SVG source"), _e.set(r, n)), n.cloneNode(!0);
1568
+ async function Tn(o) {
1569
+ return Ot.has(o) || Ot.set(o, Xo(o)), (await Ot.get(o)).cloneNode(!0);
1565
1570
  }
1566
- function Zr(r) {
1567
- r ? St.delete(r) : (St.clear(), _e.clear());
1571
+ function Vo(o) {
1572
+ let n = Te.get(o);
1573
+ return n || (n = Sn(o, "inline SVG source"), Te.set(o, n)), n.cloneNode(!0);
1568
1574
  }
1569
- var $r = ":host{--_nys-icon-size:var(--nys-icon-size,.7em);vertical-align:middle;width:fit-content;height:fit-content;display:inline-block;box-sizing:content-box!important}@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);white-space:nowrap;display:block}.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)}";
1570
- function B(r, n) {
1571
- if (typeof Reflect == "object" && typeof Reflect.metadata == "function") return Reflect.metadata(r, n);
1575
+ function ni(o) {
1576
+ o ? Ot.delete(o) : (Ot.clear(), Te.clear());
1572
1577
  }
1573
- function j(r, n, s, l) {
1574
- var u = arguments.length, p = u < 3 ? n : l === null ? l = Object.getOwnPropertyDescriptor(n, s) : l, y;
1575
- if (typeof Reflect == "object" && typeof Reflect.decorate == "function") p = Reflect.decorate(r, n, s, l);
1576
- else for (var k = r.length - 1; k >= 0; k--) (y = r[k]) && (p = (u < 3 ? y(p) : u > 3 ? y(n, s, p) : y(n, s)) || p);
1577
- return u > 3 && p && Object.defineProperty(n, s, p), p;
1578
- }
1579
- var U = class An extends or {
1580
- constructor(...n) {
1581
- super(...n), 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;
1582
- }
1583
- static {
1584
- this.styles = tr($r);
1578
+ const qo = ":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)}";
1579
+ var Ko = Object.defineProperty, j = (o, n, a, l) => {
1580
+ for (var u = void 0, d = o.length - 1, y; d >= 0; d--)
1581
+ (y = o[d]) && (u = y(n, a, u) || u);
1582
+ return u && Ko(n, a, u), u;
1583
+ }, Y;
1584
+ const k = (Y = class extends ao {
1585
+ constructor() {
1586
+ 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;
1585
1587
  }
1588
+ /** Resolves when the current icon load (if any) is complete. */
1586
1589
  get updateComplete() {
1587
1590
  return (async () => {
1588
1591
  const n = await super.updateComplete;
@@ -1590,29 +1593,34 @@ var U = class An extends or {
1590
1593
  })();
1591
1594
  }
1592
1595
  connectedCallback() {
1593
- super.connectedCallback(), this._reflectHostSemantics(), Ze(this.library, this);
1596
+ super.connectedCallback(), this._reflectHostSemantics(), tn(this.library, this);
1594
1597
  }
1595
1598
  disconnectedCallback() {
1596
- super.disconnectedCallback(), Je(this.library, this);
1599
+ super.disconnectedCallback(), en(this.library, this);
1597
1600
  }
1601
+ /** Called by the icon library registry when the current library changes. */
1598
1602
  redraw() {
1599
1603
  this._loadIcon();
1600
1604
  }
1605
+ /**
1606
+ * Lit calls firstUpdated after the first render, once all reactive
1607
+ * properties (including those set from the template) are resolved.
1608
+ * This guarantees the initial _loadIcon runs with the correct name
1609
+ * and library values, avoiding the race where updated() might not
1610
+ * fire for properties that equal their defaults.
1611
+ */
1601
1612
  firstUpdated() {
1602
1613
  this._loadIcon();
1603
1614
  }
1604
- static {
1605
- this._validName = /^[a-zA-Z0-9_-]+$/;
1606
- }
1607
1615
  updated(n) {
1608
- if (n.has("name") && !An._validName.test(this.name)) {
1616
+ if (n.has("name") && !Y._validName.test(this.name)) {
1609
1617
  console.warn(`nys-icon: invalid name "${this.name}" — ignored`), this._svg = null;
1610
1618
  return;
1611
1619
  }
1612
1620
  if (n.has("name") || n.has("library")) {
1613
1621
  if (n.has("library")) {
1614
- const s = n.get("library");
1615
- s && Je(s, this), Ze(this.library, this);
1622
+ const a = n.get("library");
1623
+ a && en(a, this), tn(this.library, this);
1616
1624
  }
1617
1625
  this._loadIcon();
1618
1626
  }
@@ -1621,21 +1629,21 @@ var U = class An extends or {
1621
1629
  _loadIcon() {
1622
1630
  const n = ++this._loadSeq;
1623
1631
  this._loadPromise = (async () => {
1624
- const s = lr(this.library);
1625
- if (!s || !this.name) {
1632
+ const a = uo(this.library);
1633
+ if (!a || !this.name) {
1626
1634
  this._svg = null;
1627
1635
  return;
1628
1636
  }
1629
1637
  try {
1630
- const l = await s.resolver(this.name);
1638
+ const l = await a.resolver(this.name);
1631
1639
  if (n !== this._loadSeq) return;
1632
1640
  if (!l) {
1633
1641
  this._svg = null;
1634
1642
  return;
1635
1643
  }
1636
- const u = typeof l == "string" ? await hn(l) : l.type === "url" ? await hn(l.href) : Yr(l.content);
1644
+ const u = typeof l == "string" ? await Tn(l) : l.type === "url" ? await Tn(l.href) : Vo(l.content);
1637
1645
  if (n !== this._loadSeq) return;
1638
- s.mutator?.(u), this._applyAttributes(u), this._svg = u;
1646
+ a.mutator?.(u), this._applyAttributes(u), this._svg = u;
1639
1647
  } catch {
1640
1648
  n === this._loadSeq && (this._svg = null);
1641
1649
  }
@@ -1644,34 +1652,56 @@ var U = class An extends or {
1644
1652
  _applyAttributes(n) {
1645
1653
  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}`), this._reflectHostSemantics();
1646
1654
  }
1655
+ /**
1656
+ * Reflects the icon's accessible state onto the host:
1657
+ * - Labeled icon -> role="img" + aria-label, no aria-hidden.
1658
+ * - Decorative -> aria-hidden="true", no role/label.
1659
+ *
1660
+ * These are reflected as host *attributes* (rather than via
1661
+ * ElementInternals) on purpose: aria-hidden / role / aria-label in
1662
+ * attribute form have universal, consistent assistive-technology support,
1663
+ * whereas AT support for these states set through ElementInternals is still
1664
+ * uneven across browser/screen-reader combinations. The host role/label
1665
+ * therefore depend on runtime state (ariaLabel), so defaultRole stays null.
1666
+ */
1647
1667
  _reflectHostSemantics() {
1648
1668
  this.ariaLabel ? (this.setAttribute("role", "img"), this.setAttribute("aria-label", this.ariaLabel), this.removeAttribute("aria-hidden")) : (this.removeAttribute("role"), this.removeAttribute("aria-label"), this.setAttribute("aria-hidden", "true"));
1649
1669
  }
1650
1670
  render() {
1651
- return this._svg ? Qn`${this._svg}` : null;
1671
+ return this._svg ? no`${this._svg}` : null;
1652
1672
  }
1653
- };
1654
- j([Q({
1655
- type: String,
1656
- reflect: !0
1657
- }), B("design:type", Object)], U.prototype, "name", void 0);
1658
- j([Q({
1659
- type: String,
1660
- reflect: !0
1661
- }), B("design:type", Object)], U.prototype, "library", void 0);
1662
- j([Q({ type: String }), B("design:type", Object)], U.prototype, "ariaLabel", void 0);
1663
- j([Q({ type: String }), B("design:type", Object)], U.prototype, "rotate", void 0);
1664
- j([Q({ type: String }), B("design:type", Object)], U.prototype, "flip", void 0);
1665
- j([Q({ type: String }), B("design:type", Object)], U.prototype, "color", void 0);
1666
- j([Q({ type: String }), B("design:type", String)], U.prototype, "size", void 0);
1667
- j([er(), B("design:type", Object)], U.prototype, "_svg", void 0);
1668
- customElements.get("nys-icon") || customElements.define("nys-icon", U);
1673
+ }, Y.styles = eo(qo), Y._validName = /^[a-zA-Z0-9_-]+$/, Y);
1674
+ j([
1675
+ J({ type: String, reflect: !0 })
1676
+ ], k.prototype, "name");
1677
+ j([
1678
+ J({ type: String, reflect: !0 })
1679
+ ], k.prototype, "library");
1680
+ j([
1681
+ J({ type: String })
1682
+ ], k.prototype, "ariaLabel");
1683
+ j([
1684
+ J({ type: String })
1685
+ ], k.prototype, "rotate");
1686
+ j([
1687
+ J({ type: String })
1688
+ ], k.prototype, "flip");
1689
+ j([
1690
+ J({ type: String })
1691
+ ], k.prototype, "color");
1692
+ j([
1693
+ J({ type: String })
1694
+ ], k.prototype, "size");
1695
+ j([
1696
+ oo()
1697
+ ], k.prototype, "_svg");
1698
+ let Zo = k;
1699
+ customElements.get("nys-icon") || customElements.define("nys-icon", Zo);
1669
1700
  export {
1670
- U as NysIcon,
1671
- Zr as clearIconCache,
1672
- lr as getIconLibrary,
1673
- qr as registerIconLibrary,
1674
- Kr as unregisterIconLibrary
1701
+ Zo as NysIcon,
1702
+ ni as clearIconCache,
1703
+ uo as getIconLibrary,
1704
+ ti as registerIconLibrary,
1705
+ ei as unregisterIconLibrary
1675
1706
  };
1676
-
1677
- //# sourceMappingURL=nys-icon.js.map
1707
+ //# sourceMappingURL=nys-icon.js.map