@scrippsproduct/networks-ui-library 2.0.8 → 2.0.9

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.
Files changed (98) hide show
  1. package/dist/components/ActionButton/ActionButton.test.js +3 -3
  2. package/dist/components/AdBlock/AdBlock.test.js +2 -2
  3. package/dist/components/AdjustableTwoColumnGrid/AdjustableTwoColumnGrid.test.js +2 -2
  4. package/dist/components/AirDateFormatter/AirDateFormatter.test.js +2 -2
  5. package/dist/components/AnchorTag/AnchorTag.test.js +3 -3
  6. package/dist/components/BCVideoPlayer/BCVideoPlayer.test.js +2 -2
  7. package/dist/components/BasicGridModule/BasicGridModule.test.js +2 -2
  8. package/dist/components/Button/Button.test.js +3 -3
  9. package/dist/components/ButtonAnchor/ButtonAnchor.test.js +3 -3
  10. package/dist/components/Carousel/Carousel.suspense-regression.test.js +2 -2
  11. package/dist/components/Carousel/Carousel.test.js +2 -2
  12. package/dist/components/Carousel/navigations/Pagination.test.js +2 -2
  13. package/dist/components/CarouselSlide/CarouselSlide.test.js +2 -2
  14. package/dist/components/CarouselSlide/slide-layouts/TwoColumn/TwoColumnSlide.js +1 -1
  15. package/dist/components/CastInfoLayout/CastInfoLayout.test.js +2 -2
  16. package/dist/components/ChannelSearch/ChannelSearch.test.js +2 -2
  17. package/dist/components/ChoicesItem/ChoicesItem.test.js +2 -2
  18. package/dist/components/Concat/Concat.js +1 -1
  19. package/dist/components/Concat/Concat.test.js +2 -2
  20. package/dist/components/CtaBlock/CtaBlock.js +1 -1
  21. package/dist/components/CtaBlock/CtaBlock.test.js +3 -3
  22. package/dist/components/CustomSelect/CustomSelect.test.js +3 -3
  23. package/dist/components/DateNavigation/DateNavigation.test.js +3 -3
  24. package/dist/components/DatePicker/DatePicker.js +2309 -2324
  25. package/dist/components/DeviceAndPlatformLists/DeviceAndPlatformLists.test.js +2 -2
  26. package/dist/components/DrawerNavigation/DrawerNavigation.test.js +3 -3
  27. package/dist/components/EqualSizeFlexRow/EqualSizeFlexRow.test.js +2 -2
  28. package/dist/components/EqualSizeGrid/EqualSizeGrid.test.js +2 -2
  29. package/dist/components/ErrorHandler/ErrorHandler.js +1 -1
  30. package/dist/components/ErrorHandler/ErrorHandler.test.js +2 -2
  31. package/dist/components/FeaturedList/FeaturedList.test.js +3 -3
  32. package/dist/components/Figure/Figure.js +1 -1
  33. package/dist/components/Figure/Figure.test.js +2 -2
  34. package/dist/components/FindUs/FindUs.test.js +2 -2
  35. package/dist/components/FooterNavigation/FooterNavigation.test.js +2 -2
  36. package/dist/components/GenericList/GenericList.js +1 -1
  37. package/dist/components/GenericList/GenericList.test.js +2 -2
  38. package/dist/components/GetAirdateWrapper/GetAirdateWrapper.test.js +2 -2
  39. package/dist/components/GradientButton/GradientButton.test.js +2 -2
  40. package/dist/components/GridList/GridList.test.js +1 -1
  41. package/dist/components/ImageCard/ImageCard.test.js +2 -2
  42. package/dist/components/ImageCard/ImageCardCore.js +1 -1
  43. package/dist/components/ImageCard/ImageCardCore.test.js +2 -2
  44. package/dist/components/ImageReplacementAnchor/ImageReplacementAnchor.test.js +1 -1
  45. package/dist/components/InlineNavigation/InlineNavigation.test.js +1 -1
  46. package/dist/components/Input/Input.test.js +2 -2
  47. package/dist/components/InstructionsList/InstructionsList.js +1 -1
  48. package/dist/components/InstructionsList/InstructionsList.test.js +1 -1
  49. package/dist/components/LogoListItem/LogoListItem.test.js +1 -1
  50. package/dist/components/LogoNavigation/LogoNavigation.test.js +1 -1
  51. package/dist/components/ModalContainer/ModalContainer.js +1 -1
  52. package/dist/components/NavList/NavList.test.js +2 -2
  53. package/dist/components/Overlay/Overlay.js +1 -1
  54. package/dist/components/Overlay/Overlay.test.js +1 -1
  55. package/dist/components/PageHero/PageHero.test.js +1 -1
  56. package/dist/components/PageHero/page-hero-layouts/IONShow/IONShowHero.js +1 -1
  57. package/dist/components/ProgramAirdate/ProgramAirdate.js +1 -1
  58. package/dist/components/ProgramAirdate/ProgramAirdate.test.js +1 -1
  59. package/dist/components/PromotionsRowBlock/PromotionsRowBlock.test.js +2 -2
  60. package/dist/components/PromotionsRowModule/PromotionsRowModule.js +1 -1
  61. package/dist/components/PromotionsRowModule/PromotionsRowModule.test.js +2 -2
  62. package/dist/components/RescanInstructions/RescanInstructions.test.js +1 -1
  63. package/dist/components/ResponsiveImage/ResponsiveImage.test.js +2 -2
  64. package/dist/components/ResultsTable/ResultsTable.test.js +1 -1
  65. package/dist/components/ResultsTableBody/ResultsTableBody.test.js +1 -1
  66. package/dist/components/ResultsTableHeader/ResultsTableHeader.test.js +1 -1
  67. package/dist/components/ScheduleLayout/ScheduleContext.js +1893 -1123
  68. package/dist/components/SectionedContent/SectionedContent.js +1 -1
  69. package/dist/components/SectionedContent/SectionedContent.test.js +2 -2
  70. package/dist/components/Select/Select.test.js +2 -2
  71. package/dist/components/ShowAboutContent/ShowAboutContent.js +1 -1
  72. package/dist/components/ShowAboutContent/ShowAboutContent.test.js +2 -2
  73. package/dist/components/ShowAboutLayout/ShowAboutLayout.test.js +2 -2
  74. package/dist/components/StringList/StringList.js +1 -1
  75. package/dist/components/StringList/StringList.test.js +1 -1
  76. package/dist/components/TabContent/TabContent.js +1 -1
  77. package/dist/components/TabContent/TabContent.test.js +1 -1
  78. package/dist/components/TabNavigation/TabNavigation.test.js +1 -1
  79. package/dist/components/TabbedContent/TabbedContent.test.js +1 -1
  80. package/dist/components/UpcomingList/UpcomingList.test.js +2 -2
  81. package/dist/index-BCErBUQT.mjs +3 -0
  82. package/dist/{index-sxnwPHiC.mjs → index-CHzqLQze.mjs} +181 -166
  83. package/dist/index-DnEp_Vsr.mjs +3085 -0
  84. package/dist/{index-5kXULIVv.mjs → index-DrfkaNHX.mjs} +16 -16
  85. package/dist/{magic-string.es-uPKorP4O.mjs → magic-string.es-DDAFx1CP.mjs} +93 -93
  86. package/dist/matchers-35e4d3bd-CfhTZpyY.mjs +2572 -0
  87. package/dist/react.esm-CX7MGXBg.mjs +52738 -0
  88. package/dist/src/icons/Facebook.d.ts +2 -1
  89. package/dist/src/icons/Tiktok.d.ts +2 -1
  90. package/dist/src/icons/Twitter.d.ts +2 -1
  91. package/dist/src/utils/analytics.d.ts +24 -5
  92. package/dist/test/setupTests.js +2 -2
  93. package/dist/utils/analytics.js +247 -446
  94. package/package.json +3 -3
  95. package/dist/index-B03xsUba.mjs +0 -3
  96. package/dist/index-C-uizG4-.mjs +0 -3098
  97. package/dist/matchers-35e4d3bd-BckKR3wh.mjs +0 -2404
  98. package/dist/react.esm-CUNRDkfQ.mjs +0 -49632
@@ -0,0 +1,2572 @@
1
+ var It = Object.defineProperty;
2
+ var Tt = (e, t, n) => t in e ? It(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
+ var L = (e, t, n) => Tt(e, typeof t != "symbol" ? t + "" : t, n);
4
+ import { g as ge, c as ye } from "./_commonjsHelpers-DaMA6jEr.mjs";
5
+ import { l as me } from "./react.esm-CX7MGXBg.mjs";
6
+ var te, ve;
7
+ function Ht() {
8
+ return ve || (ve = 1, te = (e) => {
9
+ const t = e.match(/^[ \t]*(?=\S)/gm);
10
+ return t ? t.reduce((n, i) => Math.min(n, i.length), 1 / 0) : 0;
11
+ }), te;
12
+ }
13
+ var ne, Ee;
14
+ function Dt() {
15
+ if (Ee) return ne;
16
+ Ee = 1;
17
+ const e = Ht();
18
+ return ne = (t) => {
19
+ const n = e(t);
20
+ if (n === 0)
21
+ return t;
22
+ const i = new RegExp(`^[ \\t]{${n}}`, "gm");
23
+ return t.replace(i, "");
24
+ }, ne;
25
+ }
26
+ var ie, we;
27
+ function Bt() {
28
+ return we || (we = 1, ie = (e, t = 1, n) => {
29
+ if (n = {
30
+ indent: " ",
31
+ includeEmptyLines: !1,
32
+ ...n
33
+ }, typeof e != "string")
34
+ throw new TypeError(
35
+ `Expected \`input\` to be a \`string\`, got \`${typeof e}\``
36
+ );
37
+ if (typeof t != "number")
38
+ throw new TypeError(
39
+ `Expected \`count\` to be a \`number\`, got \`${typeof t}\``
40
+ );
41
+ if (typeof n.indent != "string")
42
+ throw new TypeError(
43
+ `Expected \`options.indent\` to be a \`string\`, got \`${typeof n.indent}\``
44
+ );
45
+ if (t === 0)
46
+ return e;
47
+ const i = n.includeEmptyLines ? /^/gm : /^(?!\s*$)/gm;
48
+ return e.replace(i, n.indent.repeat(t));
49
+ }), ie;
50
+ }
51
+ var re, xe;
52
+ function Pt() {
53
+ if (xe) return re;
54
+ xe = 1;
55
+ const e = Dt(), t = Bt();
56
+ return re = (n, i = 0, r) => t(e(n), i, r), re;
57
+ }
58
+ var kt = Pt();
59
+ const Ne = /* @__PURE__ */ ge(kt);
60
+ class Mt extends Error {
61
+ constructor(n, i, r, u, s) {
62
+ super(`${n}:${r}:${u}: ${i}`);
63
+ L(this, "reason");
64
+ L(this, "filename");
65
+ L(this, "line");
66
+ L(this, "column");
67
+ L(this, "source");
68
+ this.reason = i, this.filename = n, this.line = r, this.column = u, this.source = s;
69
+ }
70
+ }
71
+ class Vt {
72
+ constructor(t, n, i) {
73
+ L(this, "start");
74
+ L(this, "end");
75
+ L(this, "source");
76
+ this.start = t, this.end = n, this.source = i;
77
+ }
78
+ }
79
+ var v;
80
+ (function(e) {
81
+ e.stylesheet = "stylesheet", e.rule = "rule", e.declaration = "declaration", e.comment = "comment", e.atRule = "at-rule", e.container = "container", e.charset = "charset", e.counterStyle = "counter-style", e.document = "document", e.customMedia = "custom-media", e.fontFace = "font-face", e.fontFeatureValues = "font-feature-values", e.host = "host", e.import = "import", e.keyframes = "keyframes", e.keyframe = "keyframe", e.layer = "layer", e.media = "media", e.namespace = "namespace", e.page = "page", e.pageMarginBox = "page-margin-box", e.positionTry = "position-try", e.property = "property", e.scope = "scope", e.startingStyle = "starting-style", e.supports = "supports", e.viewTransition = "view-transition";
82
+ })(v || (v = {}));
83
+ const Ae = (e, t, n) => {
84
+ let i = n, r = 1e4;
85
+ do {
86
+ const u = t.map((l) => e.indexOf(l, i));
87
+ u.push(e.indexOf("\\", i));
88
+ const s = u.filter((l) => l !== -1);
89
+ if (s.length === 0) return -1;
90
+ const d = Math.min(...s);
91
+ if (e[d] !== "\\") return d;
92
+ i = d + 2, r--;
93
+ } while (r > 0);
94
+ throw new Error("Too many escaping");
95
+ }, _ = (e, t, n) => {
96
+ let i = n, r = 1e4;
97
+ do {
98
+ const u = t.map((l) => e.indexOf(l, i));
99
+ u.push(e.indexOf("(", i)), u.push(e.indexOf('"', i)), u.push(e.indexOf("'", i)), u.push(e.indexOf("\\", i));
100
+ const s = u.filter((l) => l !== -1);
101
+ if (s.length === 0) return -1;
102
+ const d = Math.min(...s);
103
+ switch (e[d]) {
104
+ case "\\":
105
+ i = d + 2;
106
+ break;
107
+ case "(":
108
+ {
109
+ const l = _(e, [")"], d + 1);
110
+ if (l === -1) return -1;
111
+ i = l + 1;
112
+ }
113
+ break;
114
+ case '"':
115
+ {
116
+ const l = Ae(e, ['"'], d + 1);
117
+ if (l === -1) return -1;
118
+ i = l + 1;
119
+ }
120
+ break;
121
+ case "'":
122
+ {
123
+ const l = Ae(e, ["'"], d + 1);
124
+ if (l === -1) return -1;
125
+ i = l + 1;
126
+ }
127
+ break;
128
+ default:
129
+ return d;
130
+ }
131
+ r--;
132
+ } while (r > 0);
133
+ throw new Error("Too many escaping");
134
+ }, se = /\/\*[^]*?(?:\*\/|$)/g;
135
+ function O(e) {
136
+ return e ? e.trim() : "";
137
+ }
138
+ function oe(e, t) {
139
+ const n = e && typeof e.type == "string", i = n ? e : t;
140
+ for (const r in e) {
141
+ const u = e[r];
142
+ Array.isArray(u) ? u.forEach((s) => {
143
+ oe(s, i);
144
+ }) : u && typeof u == "object" && oe(u, i);
145
+ }
146
+ return n && Object.defineProperty(e, "parent", { configurable: !0, writable: !0, enumerable: !1, value: t || null }), e;
147
+ }
148
+ const Lt = (e, t) => {
149
+ t = t || {};
150
+ let n = 1, i = 1;
151
+ function r() {
152
+ const o = { line: n, column: i };
153
+ return (a) => (a.position = new Vt(o, { line: n, column: i }, (t == null ? void 0 : t.source) || ""), N(), a);
154
+ }
155
+ const u = [];
156
+ function s(o) {
157
+ const a = new Mt((t == null ? void 0 : t.source) || "", o, n, i, e);
158
+ if (!(t != null && t.silent)) throw a;
159
+ u.push(a);
160
+ }
161
+ function d() {
162
+ const o = /^{\s*/.exec(e);
163
+ return !!o && (h(o), !0);
164
+ }
165
+ function l() {
166
+ const o = /^}/.exec(e);
167
+ return !!o && (h(o), !0);
168
+ }
169
+ function h(o) {
170
+ const a = o[0];
171
+ return (function(c) {
172
+ const p = c.match(/\n/g);
173
+ p && (n += p.length);
174
+ const g = c.lastIndexOf(`
175
+ `);
176
+ i = ~g ? c.length - g : i + c.length;
177
+ })(a), e = e.slice(a.length), o;
178
+ }
179
+ function N() {
180
+ const o = /^\s*/.exec(e);
181
+ o && h(o);
182
+ }
183
+ function m(o) {
184
+ o = o || [];
185
+ let a = F();
186
+ for (; a; ) o.push(a), a = F();
187
+ return o;
188
+ }
189
+ function F() {
190
+ const o = r();
191
+ if (e.charAt(0) !== "/" || e.charAt(1) !== "*") return;
192
+ const a = /^\/\*[^]*?\*\//.exec(e);
193
+ return a ? (h(a), o({ type: v.comment, comment: a[0].slice(2, -2) })) : s("End of comment missing");
194
+ }
195
+ function P() {
196
+ const o = _(e, ["{"]);
197
+ if (o === -1 || o === 0) return;
198
+ const a = e.substring(0, o);
199
+ return h([a]), ((c, p) => {
200
+ const g = [];
201
+ let E = 0;
202
+ for (; E < c.length; ) {
203
+ const C = _(c, p, E);
204
+ if (C === -1) return g.push(c.substring(E)), g;
205
+ g.push(c.substring(E, C)), E = C + 1;
206
+ }
207
+ return g;
208
+ })(O(a).replace(se, ""), [","]).map((c) => O(c));
209
+ }
210
+ function A() {
211
+ const o = r(), a = /^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/.exec(e);
212
+ if (!a) return;
213
+ h(a);
214
+ const c = O(a[0]), p = /^:\s*/.exec(e);
215
+ if (!p) return s("property missing ':'");
216
+ h(p);
217
+ let g = "";
218
+ const E = _(e, [";", "}"]);
219
+ E !== -1 && (g = e.substring(0, E), h([g]), g = O(g).replace(se, ""));
220
+ const C = o({ type: v.declaration, property: c.replace(se, ""), value: g }), U = /^[;\s]*/.exec(e);
221
+ return U && h(U), C;
222
+ }
223
+ function ee() {
224
+ const o = [];
225
+ if (!d()) return s("missing '{'");
226
+ m(o);
227
+ let a = A();
228
+ for (; a; ) o.push(a), m(o), a = A();
229
+ for (; t != null && t.silent && e.length && e.charAt(0) !== "}"; ) {
230
+ const c = e.indexOf(";"), p = e.indexOf("}");
231
+ if (c === -1 || !(p === -1 || c < p)) break;
232
+ for (h([e.substring(0, c + 1)]), N(), m(o), a = A(); a; ) o.push(a), m(o), a = A();
233
+ }
234
+ return l() ? o : s("missing '}'");
235
+ }
236
+ function D() {
237
+ const o = _(e, ["{"]);
238
+ if (o === -1) return !1;
239
+ const a = _(e, [";"]), c = _(e, ["}"]);
240
+ return !(a !== -1 && a < o) && !(c !== -1 && c < o);
241
+ }
242
+ function f() {
243
+ const o = [];
244
+ if (!d()) return s("missing '{'");
245
+ for (m(o); e.length && e.charAt(0) !== "}"; ) {
246
+ if (e.charAt(0) === "@") {
247
+ const c = $();
248
+ if (c) {
249
+ o.push(c), m(o);
250
+ continue;
251
+ }
252
+ }
253
+ if (D()) {
254
+ const c = T();
255
+ if (c) {
256
+ o.push(c), m(o);
257
+ continue;
258
+ }
259
+ }
260
+ const a = A();
261
+ if (!a) {
262
+ if (t != null && t.silent) {
263
+ const c = e.indexOf(";"), p = e.indexOf("}");
264
+ if (c !== -1 && (p === -1 || c < p)) {
265
+ h([e.substring(0, c + 1)]), N(), m(o);
266
+ continue;
267
+ }
268
+ }
269
+ break;
270
+ }
271
+ o.push(a), m(o);
272
+ }
273
+ return l() ? o : s("missing '}'");
274
+ }
275
+ function y() {
276
+ const o = [];
277
+ for (N(), m(o); e.length && e.charAt(0) !== "}"; ) {
278
+ if (e.charAt(0) === "@") {
279
+ const c = $();
280
+ if (c) {
281
+ o.push(c), m(o);
282
+ continue;
283
+ }
284
+ }
285
+ if (D()) {
286
+ const c = T();
287
+ if (c) {
288
+ o.push(c), m(o);
289
+ continue;
290
+ }
291
+ }
292
+ const a = A();
293
+ if (!a) {
294
+ if (t != null && t.silent) {
295
+ const c = e.indexOf(";"), p = e.indexOf("}");
296
+ if (c !== -1 && (p === -1 || c < p)) {
297
+ h([e.substring(0, c + 1)]), N(), m(o);
298
+ continue;
299
+ }
300
+ }
301
+ break;
302
+ }
303
+ o.push(a), m(o);
304
+ }
305
+ return o;
306
+ }
307
+ function x() {
308
+ const o = [], a = r();
309
+ let c = /^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/.exec(e);
310
+ for (; c; ) {
311
+ const p = h(c);
312
+ o.push(p[1]);
313
+ const g = /^,\s*/.exec(e);
314
+ g && h(g), c = /^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/.exec(e);
315
+ }
316
+ if (o.length) return a({ type: v.keyframe, values: o, declarations: ee() || [] });
317
+ }
318
+ const k = new RegExp(`^@(${["top-left-corner", "top-left", "top-center", "top-right", "top-right-corner", "bottom-left-corner", "bottom-left", "bottom-center", "bottom-right", "bottom-right-corner", "left-top", "left-middle", "left-bottom", "right-top", "right-middle", "right-bottom"].join("|")})(?![\\w-])\\s*`), M = I("import"), B = I("charset"), V = I("namespace");
319
+ function I(o) {
320
+ const a = new RegExp("^@" + o + `\\s*((?::?[^;'"]|"(?:\\\\"|[^"])*?"|'(?:\\\\'|[^'])*?')+)(?:;|$)`);
321
+ return () => {
322
+ const c = r(), p = a.exec(e);
323
+ if (!p) return;
324
+ const g = h(p), E = { type: o };
325
+ return E[o] = g[1].trim(), c(E);
326
+ };
327
+ }
328
+ function $() {
329
+ if (e[0] === "@") return (function() {
330
+ const o = r(), a = /^@([-\w]+)?keyframes\s*/.exec(e);
331
+ if (!a) return;
332
+ const c = h(a)[1], p = /^([-\w]+)\s*/.exec(e);
333
+ if (!p) return s("@keyframes missing name");
334
+ const g = h(p)[1];
335
+ if (!d()) return s("@keyframes missing '{'");
336
+ let E = m(), C = x();
337
+ for (; C; ) E.push(C), E = E.concat(m()), C = x();
338
+ return l() ? o({ type: v.keyframes, name: g, vendor: c, keyframes: E }) : s("@keyframes missing '}'");
339
+ })() || (function() {
340
+ const o = r(), a = /^@media *([^{]+)/.exec(e);
341
+ if (!a) return;
342
+ const c = O(h(a)[1]);
343
+ if (!d()) return s("@media missing '{'");
344
+ const p = y();
345
+ return l() ? o({ type: v.media, media: c, rules: p }) : s("@media missing '}'");
346
+ })() || (function() {
347
+ const o = r(), a = /^@custom-media\s+(--\S+)\s+([^{;\s][^{;]*);/.exec(e);
348
+ if (!a) return;
349
+ const c = h(a);
350
+ return o({ type: v.customMedia, name: O(c[1]), media: O(c[2]) });
351
+ })() || (function() {
352
+ const o = r(), a = /^@supports *([^{]+)/.exec(e);
353
+ if (!a) return;
354
+ const c = O(h(a)[1]);
355
+ if (!d()) return s("@supports missing '{'");
356
+ const p = y();
357
+ return l() ? o({ type: v.supports, supports: c, rules: p }) : s("@supports missing '}'");
358
+ })() || M() || B() || V() || (function() {
359
+ const o = r(), a = /^@([-\w]+)?document *([^{]+)/.exec(e);
360
+ if (!a) return;
361
+ const c = h(a), p = O(c[1]), g = O(c[2]);
362
+ if (!d()) return s("@document missing '{'");
363
+ const E = y();
364
+ return l() ? o({ type: v.document, document: g, vendor: p, rules: E }) : s("@document missing '}'");
365
+ })() || (function() {
366
+ const o = r(), a = /^@page */.exec(e);
367
+ if (!a) return;
368
+ h(a);
369
+ const c = P() || [];
370
+ if (!d()) return s("@page missing '{'");
371
+ const p = [];
372
+ for (m(p); e.length && e.charAt(0) !== "}"; ) {
373
+ if (e.charAt(0) === "@") {
374
+ const E = $();
375
+ if (E) {
376
+ p.push(E), m(p);
377
+ continue;
378
+ }
379
+ }
380
+ const g = A();
381
+ if (!g) break;
382
+ p.push(g), m(p);
383
+ }
384
+ return l() ? o({ type: v.page, selectors: c, declarations: p }) : s("@page missing '}'");
385
+ })() || (function() {
386
+ const o = r(), a = /^@host\s*/.exec(e);
387
+ if (!a) return;
388
+ if (h(a), !d()) return s("@host missing '{'");
389
+ const c = y();
390
+ return l() ? o({ type: v.host, rules: c }) : s("@host missing '}'");
391
+ })() || (function() {
392
+ const o = r(), a = /^@font-face\s*/.exec(e);
393
+ if (!a) return;
394
+ if (h(a), !d()) return s("@font-face missing '{'");
395
+ let c = m(), p = A();
396
+ for (; p; ) c.push(p), c = c.concat(m()), p = A();
397
+ return l() ? o({ type: v.fontFace, declarations: c }) : s("@font-face missing '}'");
398
+ })() || (function() {
399
+ const o = r(), a = /^@font-feature-values\s+([^{]+)/.exec(e);
400
+ if (!a) return;
401
+ const c = O(h(a)[1]);
402
+ if (!d()) return s("@font-feature-values missing '{'");
403
+ const p = y();
404
+ return l() ? o({ type: v.fontFeatureValues, fontFamily: c, rules: p }) : s("@font-feature-values missing '}'");
405
+ })() || (function() {
406
+ const o = r(), a = /^@container *([^{]+)/.exec(e);
407
+ if (!a) return;
408
+ const c = O(h(a)[1]);
409
+ if (!d()) return s("@container missing '{'");
410
+ const p = y();
411
+ return l() ? o({ type: v.container, container: c, rules: p }) : s("@container missing '}'");
412
+ })() || (function() {
413
+ const o = r(), a = /^@starting-style\s*/.exec(e);
414
+ if (!a) return;
415
+ if (h(a), !d()) return s("@starting-style missing '{'");
416
+ const c = y();
417
+ return l() ? o({ type: v.startingStyle, rules: c }) : s("@starting-style missing '}'");
418
+ })() || (function() {
419
+ const o = r(), a = /^@layer *([^{;@]+)/.exec(e);
420
+ if (!a) return;
421
+ const c = O(h(a)[1]);
422
+ if (!d()) {
423
+ const g = /^[;\s]*/.exec(e);
424
+ return g && h(g), o({ type: v.layer, layer: c });
425
+ }
426
+ const p = y();
427
+ return l() ? o({ type: v.layer, layer: c, rules: p }) : s("@layer missing '}'");
428
+ })() || (function() {
429
+ const o = r(), a = /^@property\s+(--[-\w]+)\s*/.exec(e);
430
+ if (!a) return;
431
+ const c = h(a)[1];
432
+ if (!d()) return s("@property missing '{'");
433
+ let p = m(), g = A();
434
+ for (; g; ) p.push(g), p = p.concat(m()), g = A();
435
+ return l() ? o({ type: v.property, name: c, declarations: p }) : s("@property missing '}'");
436
+ })() || (function() {
437
+ const o = r(), a = /^@counter-style\s+([-\w]+)\s*/.exec(e);
438
+ if (!a) return;
439
+ const c = h(a)[1];
440
+ if (!d()) return s("@counter-style missing '{'");
441
+ let p = m(), g = A();
442
+ for (; g; ) p.push(g), p = p.concat(m()), g = A();
443
+ return l() ? o({ type: v.counterStyle, name: c, declarations: p }) : s("@counter-style missing '}'");
444
+ })() || (function() {
445
+ const o = r(), a = /^@scope\s*([^{]*)/.exec(e);
446
+ if (!a) return;
447
+ const c = O(h(a)[1]);
448
+ if (!d()) return s("@scope missing '{'");
449
+ const p = y();
450
+ return l() ? o({ type: v.scope, scope: c, rules: p }) : s("@scope missing '}'");
451
+ })() || (function() {
452
+ const o = r(), a = /^@view-transition\s*/.exec(e);
453
+ if (!a) return;
454
+ if (h(a), !d()) return s("@view-transition missing '{'");
455
+ let c = m(), p = A();
456
+ for (; p; ) c.push(p), c = c.concat(m()), p = A();
457
+ return l() ? o({ type: v.viewTransition, declarations: c }) : s("@view-transition missing '}'");
458
+ })() || (function() {
459
+ const o = r(), a = /^@position-try\s+(--[-\w]+)\s*/.exec(e);
460
+ if (!a) return;
461
+ const c = h(a)[1];
462
+ if (!d()) return s("@position-try missing '{'");
463
+ let p = m(), g = A();
464
+ for (; g; ) p.push(g), p = p.concat(m()), g = A();
465
+ return l() ? o({ type: v.positionTry, name: c, declarations: p }) : s("@position-try missing '}'");
466
+ })() || (function() {
467
+ const o = r(), a = k.exec(e);
468
+ if (!a) return;
469
+ const c = h(a)[1];
470
+ if (!d()) return s(`@${c} missing '{'`);
471
+ let p = m(), g = A();
472
+ for (; g; ) p.push(g), p = p.concat(m()), g = A();
473
+ return l() ? o({ type: v.pageMarginBox, name: c, declarations: p }) : s(`@${c} missing '}'`);
474
+ })() || (function() {
475
+ const o = r(), a = /^@([-\w]+)\s*/.exec(e);
476
+ if (!a) return;
477
+ const c = h(a)[1];
478
+ let p = "";
479
+ const g = _(e, ["{", ";"]);
480
+ if (g !== -1 && g > 0 && (p = O(e.substring(0, g)), h([e.substring(0, g)])), d()) {
481
+ const C = y();
482
+ return l() ? o({ type: v.atRule, name: c, prelude: p, rules: C }) : s(`@${c} missing '}'`);
483
+ }
484
+ const E = /^[;\s]*/.exec(e);
485
+ return E && h(E), o({ type: v.atRule, name: c, prelude: p });
486
+ })();
487
+ }
488
+ function T() {
489
+ const o = r(), a = P();
490
+ return a ? (m(), o({ type: v.rule, selectors: a, declarations: f() || [] })) : s("selector missing");
491
+ }
492
+ return oe((function() {
493
+ const o = (function() {
494
+ let a;
495
+ const c = [];
496
+ for (N(), m(c); e.length; ) {
497
+ if (e.charAt(0) === "}") {
498
+ if (t != null && t.silent) {
499
+ s("extra '}'"), h(["}"]), N(), m(c);
500
+ continue;
501
+ }
502
+ break;
503
+ }
504
+ if (a = $() || T(), !a) {
505
+ if (t != null && t.silent) {
506
+ h([e.charAt(0)]), N(), m(c);
507
+ continue;
508
+ }
509
+ break;
510
+ }
511
+ c.push(a), m(c);
512
+ }
513
+ return c;
514
+ })();
515
+ return { type: v.stylesheet, stylesheet: { source: t == null ? void 0 : t.source, rules: o, parsingErrors: u } };
516
+ })());
517
+ };
518
+ var jt = Object.prototype.toString;
519
+ function _t(e) {
520
+ return typeof e == "function" || jt.call(e) === "[object Function]";
521
+ }
522
+ function qt(e) {
523
+ var t = Number(e);
524
+ return isNaN(t) ? 0 : t === 0 || !isFinite(t) ? t : (t > 0 ? 1 : -1) * Math.floor(Math.abs(t));
525
+ }
526
+ var Ft = Math.pow(2, 53) - 1;
527
+ function Ut(e) {
528
+ var t = qt(e);
529
+ return Math.min(Math.max(t, 0), Ft);
530
+ }
531
+ function H(e, t) {
532
+ var n = Array, i = Object(e);
533
+ if (e == null)
534
+ throw new TypeError("Array.from requires an array-like object - not null or undefined");
535
+ for (var r = Ut(i.length), u = _t(n) ? Object(new n(r)) : new Array(r), s = 0, d; s < r; )
536
+ d = i[s], u[s] = d, s += 1;
537
+ return u.length = r, u;
538
+ }
539
+ function z(e) {
540
+ "@babel/helpers - typeof";
541
+ return z = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
542
+ return typeof t;
543
+ } : function(t) {
544
+ return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
545
+ }, z(e);
546
+ }
547
+ function Gt(e, t) {
548
+ if (!(e instanceof t))
549
+ throw new TypeError("Cannot call a class as a function");
550
+ }
551
+ function zt(e, t) {
552
+ for (var n = 0; n < t.length; n++) {
553
+ var i = t[n];
554
+ i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(e, Le(i.key), i);
555
+ }
556
+ }
557
+ function Wt(e, t, n) {
558
+ return t && zt(e.prototype, t), Object.defineProperty(e, "prototype", { writable: !1 }), e;
559
+ }
560
+ function Yt(e, t, n) {
561
+ return t = Le(t), t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
562
+ }
563
+ function Le(e) {
564
+ var t = Kt(e, "string");
565
+ return z(t) === "symbol" ? t : String(t);
566
+ }
567
+ function Kt(e, t) {
568
+ if (z(e) !== "object" || e === null) return e;
569
+ var n = e[Symbol.toPrimitive];
570
+ if (n !== void 0) {
571
+ var i = n.call(e, t);
572
+ if (z(i) !== "object") return i;
573
+ throw new TypeError("@@toPrimitive must return a primitive value.");
574
+ }
575
+ return (t === "string" ? String : Number)(e);
576
+ }
577
+ var Xt = /* @__PURE__ */ (function() {
578
+ function e() {
579
+ var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
580
+ Gt(this, e), Yt(this, "items", void 0), this.items = t;
581
+ }
582
+ return Wt(e, [{
583
+ key: "add",
584
+ value: function(n) {
585
+ return this.has(n) === !1 && this.items.push(n), this;
586
+ }
587
+ }, {
588
+ key: "clear",
589
+ value: function() {
590
+ this.items = [];
591
+ }
592
+ }, {
593
+ key: "delete",
594
+ value: function(n) {
595
+ var i = this.items.length;
596
+ return this.items = this.items.filter(function(r) {
597
+ return r !== n;
598
+ }), i !== this.items.length;
599
+ }
600
+ }, {
601
+ key: "forEach",
602
+ value: function(n) {
603
+ var i = this;
604
+ this.items.forEach(function(r) {
605
+ n(r, r, i);
606
+ });
607
+ }
608
+ }, {
609
+ key: "has",
610
+ value: function(n) {
611
+ return this.items.indexOf(n) !== -1;
612
+ }
613
+ }, {
614
+ key: "size",
615
+ get: function() {
616
+ return this.items.length;
617
+ }
618
+ }]), e;
619
+ })();
620
+ const Qt = typeof Set > "u" ? Set : Xt;
621
+ function R(e) {
622
+ var t;
623
+ return (
624
+ // eslint-disable-next-line no-restricted-properties -- actual guard for environments without localName
625
+ (t = e.localName) !== null && t !== void 0 ? t : (
626
+ // eslint-disable-next-line no-restricted-properties -- required for the fallback
627
+ e.tagName.toLowerCase()
628
+ )
629
+ );
630
+ }
631
+ var Jt = {
632
+ article: "article",
633
+ aside: "complementary",
634
+ button: "button",
635
+ datalist: "listbox",
636
+ dd: "definition",
637
+ details: "group",
638
+ dialog: "dialog",
639
+ dt: "term",
640
+ fieldset: "group",
641
+ figure: "figure",
642
+ // WARNING: Only with an accessible name
643
+ form: "form",
644
+ footer: "contentinfo",
645
+ h1: "heading",
646
+ h2: "heading",
647
+ h3: "heading",
648
+ h4: "heading",
649
+ h5: "heading",
650
+ h6: "heading",
651
+ header: "banner",
652
+ hr: "separator",
653
+ html: "document",
654
+ legend: "legend",
655
+ li: "listitem",
656
+ math: "math",
657
+ main: "main",
658
+ menu: "list",
659
+ nav: "navigation",
660
+ ol: "list",
661
+ optgroup: "group",
662
+ // WARNING: Only in certain context
663
+ option: "option",
664
+ output: "status",
665
+ progress: "progressbar",
666
+ // WARNING: Only with an accessible name
667
+ section: "region",
668
+ summary: "button",
669
+ table: "table",
670
+ tbody: "rowgroup",
671
+ textarea: "textbox",
672
+ tfoot: "rowgroup",
673
+ // WARNING: Only in certain context
674
+ td: "cell",
675
+ th: "columnheader",
676
+ thead: "rowgroup",
677
+ tr: "row",
678
+ ul: "list"
679
+ }, Zt = {
680
+ caption: /* @__PURE__ */ new Set(["aria-label", "aria-labelledby"]),
681
+ code: /* @__PURE__ */ new Set(["aria-label", "aria-labelledby"]),
682
+ deletion: /* @__PURE__ */ new Set(["aria-label", "aria-labelledby"]),
683
+ emphasis: /* @__PURE__ */ new Set(["aria-label", "aria-labelledby"]),
684
+ generic: /* @__PURE__ */ new Set(["aria-label", "aria-labelledby", "aria-roledescription"]),
685
+ insertion: /* @__PURE__ */ new Set(["aria-label", "aria-labelledby"]),
686
+ none: /* @__PURE__ */ new Set(["aria-label", "aria-labelledby"]),
687
+ paragraph: /* @__PURE__ */ new Set(["aria-label", "aria-labelledby"]),
688
+ presentation: /* @__PURE__ */ new Set(["aria-label", "aria-labelledby"]),
689
+ strong: /* @__PURE__ */ new Set(["aria-label", "aria-labelledby"]),
690
+ subscript: /* @__PURE__ */ new Set(["aria-label", "aria-labelledby"]),
691
+ superscript: /* @__PURE__ */ new Set(["aria-label", "aria-labelledby"])
692
+ };
693
+ function en(e, t) {
694
+ return [
695
+ "aria-atomic",
696
+ "aria-busy",
697
+ "aria-controls",
698
+ "aria-current",
699
+ "aria-description",
700
+ "aria-describedby",
701
+ "aria-details",
702
+ // "disabled",
703
+ "aria-dropeffect",
704
+ // "errormessage",
705
+ "aria-flowto",
706
+ "aria-grabbed",
707
+ // "haspopup",
708
+ "aria-hidden",
709
+ // "invalid",
710
+ "aria-keyshortcuts",
711
+ "aria-label",
712
+ "aria-labelledby",
713
+ "aria-live",
714
+ "aria-owns",
715
+ "aria-relevant",
716
+ "aria-roledescription"
717
+ ].some(function(n) {
718
+ var i;
719
+ return e.hasAttribute(n) && !((i = Zt[t]) !== null && i !== void 0 && i.has(n));
720
+ });
721
+ }
722
+ function je(e, t) {
723
+ return en(e, t);
724
+ }
725
+ function tn(e) {
726
+ var t = rn(e);
727
+ if (t === null || ae.indexOf(t) !== -1) {
728
+ var n = nn(e);
729
+ if (ae.indexOf(t || "") === -1 || je(e, n || ""))
730
+ return n;
731
+ }
732
+ return t;
733
+ }
734
+ function nn(e) {
735
+ var t = Jt[R(e)];
736
+ if (t !== void 0)
737
+ return t;
738
+ switch (R(e)) {
739
+ case "a":
740
+ case "area":
741
+ case "link":
742
+ if (e.hasAttribute("href"))
743
+ return "link";
744
+ break;
745
+ case "img":
746
+ return e.getAttribute("alt") === "" && !je(e, "img") ? "presentation" : "img";
747
+ case "input": {
748
+ var n = e, i = n.type;
749
+ switch (i) {
750
+ case "button":
751
+ case "image":
752
+ case "reset":
753
+ case "submit":
754
+ return "button";
755
+ case "checkbox":
756
+ case "radio":
757
+ return i;
758
+ case "range":
759
+ return "slider";
760
+ case "email":
761
+ case "tel":
762
+ case "text":
763
+ case "url":
764
+ return e.hasAttribute("list") ? "combobox" : "textbox";
765
+ case "search":
766
+ return e.hasAttribute("list") ? "combobox" : "searchbox";
767
+ case "number":
768
+ return "spinbutton";
769
+ default:
770
+ return null;
771
+ }
772
+ }
773
+ case "select":
774
+ return e.hasAttribute("multiple") || e.size > 1 ? "listbox" : "combobox";
775
+ }
776
+ return null;
777
+ }
778
+ function rn(e) {
779
+ var t = e.getAttribute("role");
780
+ if (t !== null) {
781
+ var n = t.trim().split(" ")[0];
782
+ if (n.length > 0)
783
+ return n;
784
+ }
785
+ return null;
786
+ }
787
+ var ae = ["presentation", "none"];
788
+ function w(e) {
789
+ return e !== null && e.nodeType === e.ELEMENT_NODE;
790
+ }
791
+ function _e(e) {
792
+ return w(e) && R(e) === "caption";
793
+ }
794
+ function K(e) {
795
+ return w(e) && R(e) === "input";
796
+ }
797
+ function sn(e) {
798
+ return w(e) && R(e) === "optgroup";
799
+ }
800
+ function on(e) {
801
+ return w(e) && R(e) === "select";
802
+ }
803
+ function an(e) {
804
+ return w(e) && R(e) === "table";
805
+ }
806
+ function un(e) {
807
+ return w(e) && R(e) === "textarea";
808
+ }
809
+ function cn(e) {
810
+ var t = e.ownerDocument === null ? e : e.ownerDocument, n = t.defaultView;
811
+ if (n === null)
812
+ throw new TypeError("no window available");
813
+ return n;
814
+ }
815
+ function ln(e) {
816
+ return w(e) && R(e) === "fieldset";
817
+ }
818
+ function fn(e) {
819
+ return w(e) && R(e) === "legend";
820
+ }
821
+ function dn(e) {
822
+ return w(e) && R(e) === "slot";
823
+ }
824
+ function pn(e) {
825
+ return w(e) && e.ownerSVGElement !== void 0;
826
+ }
827
+ function hn(e) {
828
+ return w(e) && R(e) === "svg";
829
+ }
830
+ function gn(e) {
831
+ return pn(e) && R(e) === "title";
832
+ }
833
+ function Q(e, t) {
834
+ if (w(e) && e.hasAttribute(t)) {
835
+ var n = e.getAttribute(t).split(" "), i = e.getRootNode ? e.getRootNode() : e.ownerDocument;
836
+ return n.map(function(r) {
837
+ return i.getElementById(r);
838
+ }).filter(
839
+ function(r) {
840
+ return r !== null;
841
+ }
842
+ // TODO: why does this not narrow?
843
+ );
844
+ }
845
+ return [];
846
+ }
847
+ function j(e, t) {
848
+ return w(e) ? t.indexOf(tn(e)) !== -1 : !1;
849
+ }
850
+ function mn(e) {
851
+ return e.trim().replace(/\s\s+/g, " ");
852
+ }
853
+ function bn(e, t) {
854
+ if (!w(e))
855
+ return !1;
856
+ if (e.hasAttribute("hidden") || e.getAttribute("aria-hidden") === "true")
857
+ return !0;
858
+ var n = t(e);
859
+ return n.getPropertyValue("display") === "none" || n.getPropertyValue("visibility") === "hidden";
860
+ }
861
+ function yn(e) {
862
+ return j(e, ["button", "combobox", "listbox", "textbox"]) || qe(e, "range");
863
+ }
864
+ function qe(e, t) {
865
+ if (!w(e))
866
+ return !1;
867
+ switch (t) {
868
+ case "range":
869
+ return j(e, ["meter", "progressbar", "scrollbar", "slider", "spinbutton"]);
870
+ default:
871
+ throw new TypeError("No knowledge about abstract role '".concat(t, "'. This is likely a bug :("));
872
+ }
873
+ }
874
+ function Se(e, t) {
875
+ var n = H(e.querySelectorAll(t));
876
+ return Q(e, "aria-owns").forEach(function(i) {
877
+ n.push.apply(n, H(i.querySelectorAll(t)));
878
+ }), n;
879
+ }
880
+ function vn(e) {
881
+ return on(e) ? e.selectedOptions || Se(e, "[selected]") : Se(e, '[aria-selected="true"]');
882
+ }
883
+ function En(e) {
884
+ return j(e, ae);
885
+ }
886
+ function wn(e) {
887
+ return _e(e);
888
+ }
889
+ function xn(e) {
890
+ return j(e, ["button", "cell", "checkbox", "columnheader", "gridcell", "heading", "label", "legend", "link", "menuitem", "menuitemcheckbox", "menuitemradio", "option", "radio", "row", "rowheader", "switch", "tab", "tooltip", "treeitem"]);
891
+ }
892
+ function Nn(e) {
893
+ return !1;
894
+ }
895
+ function An(e) {
896
+ return K(e) || un(e) ? e.value : e.textContent || "";
897
+ }
898
+ function Re(e) {
899
+ var t = e.getPropertyValue("content");
900
+ return /^["'].*["']$/.test(t) ? t.slice(1, -1) : "";
901
+ }
902
+ function Fe(e) {
903
+ var t = R(e);
904
+ return t === "button" || t === "input" && e.getAttribute("type") !== "hidden" || t === "meter" || t === "output" || t === "progress" || t === "select" || t === "textarea";
905
+ }
906
+ function Ue(e) {
907
+ if (Fe(e))
908
+ return e;
909
+ var t = null;
910
+ return e.childNodes.forEach(function(n) {
911
+ if (t === null && w(n)) {
912
+ var i = Ue(n);
913
+ i !== null && (t = i);
914
+ }
915
+ }), t;
916
+ }
917
+ function Sn(e) {
918
+ if (e.control !== void 0)
919
+ return e.control;
920
+ var t = e.getAttribute("for");
921
+ return t !== null ? e.ownerDocument.getElementById(t) : Ue(e);
922
+ }
923
+ function Rn(e) {
924
+ var t = e.labels;
925
+ if (t === null)
926
+ return t;
927
+ if (t !== void 0)
928
+ return H(t);
929
+ if (!Fe(e))
930
+ return null;
931
+ var n = e.ownerDocument;
932
+ return H(n.querySelectorAll("label")).filter(function(i) {
933
+ return Sn(i) === e;
934
+ });
935
+ }
936
+ function $n(e) {
937
+ var t = e.assignedNodes();
938
+ return t.length === 0 ? H(e.childNodes) : t;
939
+ }
940
+ function Ge(e) {
941
+ var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = new Qt(), i = cn(e), r = t.compute, u = r === void 0 ? "name" : r, s = t.computedStyleSupportsPseudoElements, d = s === void 0 ? t.getComputedStyle !== void 0 : s, l = t.getComputedStyle, h = l === void 0 ? i.getComputedStyle.bind(i) : l, N = t.hidden, m = N === void 0 ? !1 : N;
942
+ function F(f, y) {
943
+ var x = "";
944
+ if (w(f) && d) {
945
+ var k = h(f, "::before"), M = Re(k);
946
+ x = "".concat(M, " ").concat(x);
947
+ }
948
+ var B = dn(f) ? $n(f) : H(f.childNodes).concat(Q(f, "aria-owns"));
949
+ if (B.forEach(function($) {
950
+ var T = D($, {
951
+ isEmbeddedInLabel: y.isEmbeddedInLabel,
952
+ isReferenced: !1,
953
+ recursion: !0
954
+ }), o = w($) ? h($).getPropertyValue("display") : "inline", a = o !== "inline" ? " " : "";
955
+ x += "".concat(a).concat(T).concat(a);
956
+ }), w(f) && d) {
957
+ var V = h(f, "::after"), I = Re(V);
958
+ x = "".concat(x, " ").concat(I);
959
+ }
960
+ return x.trim();
961
+ }
962
+ function P(f, y) {
963
+ var x = f.getAttributeNode(y);
964
+ return x !== null && !n.has(x) && x.value.trim() !== "" ? (n.add(x), x.value) : null;
965
+ }
966
+ function A(f) {
967
+ return w(f) ? P(f, "title") : null;
968
+ }
969
+ function ee(f) {
970
+ if (!w(f))
971
+ return null;
972
+ if (ln(f)) {
973
+ n.add(f);
974
+ for (var y = H(f.childNodes), x = 0; x < y.length; x += 1) {
975
+ var k = y[x];
976
+ if (fn(k))
977
+ return D(k, {
978
+ isEmbeddedInLabel: !1,
979
+ isReferenced: !1,
980
+ recursion: !1
981
+ });
982
+ }
983
+ } else if (an(f)) {
984
+ n.add(f);
985
+ for (var M = H(f.childNodes), B = 0; B < M.length; B += 1) {
986
+ var V = M[B];
987
+ if (_e(V))
988
+ return D(V, {
989
+ isEmbeddedInLabel: !1,
990
+ isReferenced: !1,
991
+ recursion: !1
992
+ });
993
+ }
994
+ } else if (hn(f)) {
995
+ n.add(f);
996
+ for (var I = H(f.childNodes), $ = 0; $ < I.length; $ += 1) {
997
+ var T = I[$];
998
+ if (gn(T))
999
+ return T.textContent;
1000
+ }
1001
+ return null;
1002
+ } else if (R(f) === "img" || R(f) === "area") {
1003
+ var o = P(f, "alt");
1004
+ if (o !== null)
1005
+ return o;
1006
+ } else if (sn(f)) {
1007
+ var a = P(f, "label");
1008
+ if (a !== null)
1009
+ return a;
1010
+ }
1011
+ if (K(f) && (f.type === "button" || f.type === "submit" || f.type === "reset")) {
1012
+ var c = P(f, "value");
1013
+ if (c !== null)
1014
+ return c;
1015
+ if (f.type === "submit")
1016
+ return "Submit";
1017
+ if (f.type === "reset")
1018
+ return "Reset";
1019
+ }
1020
+ var p = Rn(f);
1021
+ if (p !== null && p.length !== 0)
1022
+ return n.add(f), H(p).map(function(U) {
1023
+ return D(U, {
1024
+ isEmbeddedInLabel: !0,
1025
+ isReferenced: !1,
1026
+ recursion: !0
1027
+ });
1028
+ }).filter(function(U) {
1029
+ return U.length > 0;
1030
+ }).join(" ");
1031
+ if (K(f) && f.type === "image") {
1032
+ var g = P(f, "alt");
1033
+ if (g !== null)
1034
+ return g;
1035
+ var E = P(f, "title");
1036
+ return E !== null ? E : "Submit Query";
1037
+ }
1038
+ if (j(f, ["button"])) {
1039
+ var C = F(f, {
1040
+ isEmbeddedInLabel: !1
1041
+ });
1042
+ if (C !== "")
1043
+ return C;
1044
+ }
1045
+ return null;
1046
+ }
1047
+ function D(f, y) {
1048
+ if (n.has(f))
1049
+ return "";
1050
+ if (!m && bn(f, h) && !y.isReferenced)
1051
+ return n.add(f), "";
1052
+ var x = w(f) ? f.getAttributeNode("aria-labelledby") : null, k = x !== null && !n.has(x) ? Q(f, "aria-labelledby") : [];
1053
+ if (u === "name" && !y.isReferenced && k.length > 0)
1054
+ return n.add(x), k.map(function(o) {
1055
+ return D(o, {
1056
+ isEmbeddedInLabel: y.isEmbeddedInLabel,
1057
+ isReferenced: !0,
1058
+ // this isn't recursion as specified, otherwise we would skip
1059
+ // `aria-label` in
1060
+ // <input id="myself" aria-label="foo" aria-labelledby="myself"
1061
+ recursion: !1
1062
+ });
1063
+ }).join(" ");
1064
+ var M = y.recursion && yn(f) && u === "name";
1065
+ if (!M) {
1066
+ var B = (w(f) && f.getAttribute("aria-label") || "").trim();
1067
+ if (B !== "" && u === "name")
1068
+ return n.add(f), B;
1069
+ if (!En(f)) {
1070
+ var V = ee(f);
1071
+ if (V !== null)
1072
+ return n.add(f), V;
1073
+ }
1074
+ }
1075
+ if (j(f, ["menu"]))
1076
+ return n.add(f), "";
1077
+ if (M || y.isEmbeddedInLabel || y.isReferenced) {
1078
+ if (j(f, ["combobox", "listbox"])) {
1079
+ n.add(f);
1080
+ var I = vn(f);
1081
+ return I.length === 0 ? K(f) ? f.value : "" : H(I).map(function(o) {
1082
+ return D(o, {
1083
+ isEmbeddedInLabel: y.isEmbeddedInLabel,
1084
+ isReferenced: !1,
1085
+ recursion: !0
1086
+ });
1087
+ }).join(" ");
1088
+ }
1089
+ if (qe(f, "range"))
1090
+ return n.add(f), f.hasAttribute("aria-valuetext") ? f.getAttribute("aria-valuetext") : f.hasAttribute("aria-valuenow") ? f.getAttribute("aria-valuenow") : f.getAttribute("value") || "";
1091
+ if (j(f, ["textbox"]))
1092
+ return n.add(f), An(f);
1093
+ }
1094
+ if (xn(f) || w(f) && y.isReferenced || wn(f) || Nn()) {
1095
+ var $ = F(f, {
1096
+ isEmbeddedInLabel: y.isEmbeddedInLabel
1097
+ });
1098
+ if ($ !== "")
1099
+ return n.add(f), $;
1100
+ }
1101
+ if (f.nodeType === f.TEXT_NODE)
1102
+ return n.add(f), f.textContent || "";
1103
+ if (y.recursion)
1104
+ return n.add(f), F(f, {
1105
+ isEmbeddedInLabel: y.isEmbeddedInLabel
1106
+ });
1107
+ var T = A(f);
1108
+ return T !== null ? (n.add(f), T) : (n.add(f), "");
1109
+ }
1110
+ return mn(D(e, {
1111
+ isEmbeddedInLabel: !1,
1112
+ // by spec computeAccessibleDescription starts with the referenced elements as roots
1113
+ isReferenced: u === "description",
1114
+ recursion: !1
1115
+ }));
1116
+ }
1117
+ function W(e) {
1118
+ "@babel/helpers - typeof";
1119
+ return W = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
1120
+ return typeof t;
1121
+ } : function(t) {
1122
+ return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
1123
+ }, W(e);
1124
+ }
1125
+ function $e(e, t) {
1126
+ var n = Object.keys(e);
1127
+ if (Object.getOwnPropertySymbols) {
1128
+ var i = Object.getOwnPropertySymbols(e);
1129
+ t && (i = i.filter(function(r) {
1130
+ return Object.getOwnPropertyDescriptor(e, r).enumerable;
1131
+ })), n.push.apply(n, i);
1132
+ }
1133
+ return n;
1134
+ }
1135
+ function Oe(e) {
1136
+ for (var t = 1; t < arguments.length; t++) {
1137
+ var n = arguments[t] != null ? arguments[t] : {};
1138
+ t % 2 ? $e(Object(n), !0).forEach(function(i) {
1139
+ On(e, i, n[i]);
1140
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : $e(Object(n)).forEach(function(i) {
1141
+ Object.defineProperty(e, i, Object.getOwnPropertyDescriptor(n, i));
1142
+ });
1143
+ }
1144
+ return e;
1145
+ }
1146
+ function On(e, t, n) {
1147
+ return t = Cn(t), t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
1148
+ }
1149
+ function Cn(e) {
1150
+ var t = In(e, "string");
1151
+ return W(t) === "symbol" ? t : String(t);
1152
+ }
1153
+ function In(e, t) {
1154
+ if (W(e) !== "object" || e === null) return e;
1155
+ var n = e[Symbol.toPrimitive];
1156
+ if (n !== void 0) {
1157
+ var i = n.call(e, t);
1158
+ if (W(i) !== "object") return i;
1159
+ throw new TypeError("@@toPrimitive must return a primitive value.");
1160
+ }
1161
+ return (t === "string" ? String : Number)(e);
1162
+ }
1163
+ function Tn(e) {
1164
+ var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = Q(e, "aria-describedby").map(function(u) {
1165
+ return Ge(u, Oe(Oe({}, t), {}, {
1166
+ compute: "description"
1167
+ }));
1168
+ }).join(" ");
1169
+ if (n === "") {
1170
+ var i = e.getAttribute("aria-description");
1171
+ n = i === null ? "" : i;
1172
+ }
1173
+ if (n === "") {
1174
+ var r = e.getAttribute("title");
1175
+ n = r === null ? "" : r;
1176
+ }
1177
+ return n;
1178
+ }
1179
+ function Hn(e) {
1180
+ return j(e, ["caption", "code", "deletion", "emphasis", "generic", "insertion", "none", "paragraph", "presentation", "strong", "subscript", "superscript"]);
1181
+ }
1182
+ function Dn(e) {
1183
+ var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
1184
+ return Hn(e) ? "" : Ge(e, t);
1185
+ }
1186
+ var Y = { exports: {} }, Ce;
1187
+ function Bn() {
1188
+ if (Ce) return Y.exports;
1189
+ Ce = 1;
1190
+ var e = String, t = function() {
1191
+ return { isColorSupported: !1, reset: e, bold: e, dim: e, italic: e, underline: e, inverse: e, hidden: e, strikethrough: e, black: e, red: e, green: e, yellow: e, blue: e, magenta: e, cyan: e, white: e, gray: e, bgBlack: e, bgRed: e, bgGreen: e, bgYellow: e, bgBlue: e, bgMagenta: e, bgCyan: e, bgWhite: e, blackBright: e, redBright: e, greenBright: e, yellowBright: e, blueBright: e, magentaBright: e, cyanBright: e, whiteBright: e, bgBlackBright: e, bgRedBright: e, bgGreenBright: e, bgYellowBright: e, bgBlueBright: e, bgMagentaBright: e, bgCyanBright: e, bgWhiteBright: e };
1192
+ };
1193
+ return Y.exports = t(), Y.exports.createColors = t, Y.exports;
1194
+ }
1195
+ var Pn = /* @__PURE__ */ Bn();
1196
+ const kn = /* @__PURE__ */ ge(Pn);
1197
+ var X = { exports: {} };
1198
+ /*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */
1199
+ var Mn = X.exports, Ie;
1200
+ function Vn() {
1201
+ return Ie || (Ie = 1, (function(e, t) {
1202
+ (function(n, i) {
1203
+ e.exports = i(n);
1204
+ })(typeof ye < "u" ? ye : Mn, function(n) {
1205
+ if (n.CSS && n.CSS.escape)
1206
+ return n.CSS.escape;
1207
+ var i = function(r) {
1208
+ if (arguments.length == 0)
1209
+ throw new TypeError("`CSS.escape` requires an argument.");
1210
+ for (var u = String(r), s = u.length, d = -1, l, h = "", N = u.charCodeAt(0); ++d < s; ) {
1211
+ if (l = u.charCodeAt(d), l == 0) {
1212
+ h += "�";
1213
+ continue;
1214
+ }
1215
+ if (
1216
+ // If the character is in the range [\1-\1F] (U+0001 to U+001F) or is
1217
+ // U+007F, […]
1218
+ l >= 1 && l <= 31 || l == 127 || // If the character is the first character and is in the range [0-9]
1219
+ // (U+0030 to U+0039), […]
1220
+ d == 0 && l >= 48 && l <= 57 || // If the character is the second character and is in the range [0-9]
1221
+ // (U+0030 to U+0039) and the first character is a `-` (U+002D), […]
1222
+ d == 1 && l >= 48 && l <= 57 && N == 45
1223
+ ) {
1224
+ h += "\\" + l.toString(16) + " ";
1225
+ continue;
1226
+ }
1227
+ if (
1228
+ // If the character is the first character and is a `-` (U+002D), and
1229
+ // there is no second character, […]
1230
+ d == 0 && s == 1 && l == 45
1231
+ ) {
1232
+ h += "\\" + u.charAt(d);
1233
+ continue;
1234
+ }
1235
+ if (l >= 128 || l == 45 || l == 95 || l >= 48 && l <= 57 || l >= 65 && l <= 90 || l >= 97 && l <= 122) {
1236
+ h += u.charAt(d);
1237
+ continue;
1238
+ }
1239
+ h += "\\" + u.charAt(d);
1240
+ }
1241
+ return h;
1242
+ };
1243
+ return n.CSS || (n.CSS = {}), n.CSS.escape = i, i;
1244
+ });
1245
+ })(X)), X.exports;
1246
+ }
1247
+ var Ln = Vn();
1248
+ const jn = /* @__PURE__ */ ge(Ln);
1249
+ class ze extends Error {
1250
+ constructor(t, n, i, r) {
1251
+ super(), Error.captureStackTrace && Error.captureStackTrace(this, i);
1252
+ let u = "";
1253
+ try {
1254
+ u = r.utils.printWithType(
1255
+ "Received",
1256
+ n,
1257
+ r.utils.printReceived
1258
+ );
1259
+ } catch {
1260
+ }
1261
+ this.message = [
1262
+ r.utils.matcherHint(
1263
+ `${r.isNot ? ".not" : ""}.${i.name}`,
1264
+ "received",
1265
+ ""
1266
+ ),
1267
+ "",
1268
+ // eslint-disable-next-line new-cap
1269
+ `${r.utils.RECEIVED_COLOR(
1270
+ "received"
1271
+ )} value must ${t}.`,
1272
+ u
1273
+ ].join(`
1274
+ `);
1275
+ }
1276
+ }
1277
+ class Te extends ze {
1278
+ constructor(...t) {
1279
+ super("be an HTMLElement or an SVGElement", ...t);
1280
+ }
1281
+ }
1282
+ class He extends ze {
1283
+ constructor(...t) {
1284
+ super("be a Node", ...t);
1285
+ }
1286
+ }
1287
+ function We(e, t, ...n) {
1288
+ if (!e || !e.ownerDocument || !e.ownerDocument.defaultView)
1289
+ throw new t(e, ...n);
1290
+ }
1291
+ function _n(e, ...t) {
1292
+ We(e, He, ...t);
1293
+ const n = e.ownerDocument.defaultView;
1294
+ if (!(e instanceof n.Node))
1295
+ throw new He(e, ...t);
1296
+ }
1297
+ function b(e, ...t) {
1298
+ We(e, Te, ...t);
1299
+ const n = e.ownerDocument.defaultView;
1300
+ if (!(e instanceof n.HTMLElement) && !(e instanceof n.SVGElement))
1301
+ throw new Te(e, ...t);
1302
+ }
1303
+ class qn extends Error {
1304
+ constructor(t, n, i) {
1305
+ super(), Error.captureStackTrace && Error.captureStackTrace(this, n), this.message = [
1306
+ t.message,
1307
+ "",
1308
+ // eslint-disable-next-line new-cap
1309
+ i.utils.RECEIVED_COLOR("Failing css:"),
1310
+ // eslint-disable-next-line new-cap
1311
+ i.utils.RECEIVED_COLOR(`${t.css}`)
1312
+ ].join(`
1313
+ `);
1314
+ }
1315
+ }
1316
+ function Fn(e, ...t) {
1317
+ const n = Lt(`selector { ${e} }`, { silent: !0 }).stylesheet;
1318
+ if (n.parsingErrors && n.parsingErrors.length > 0) {
1319
+ const { reason: r, line: u } = n.parsingErrors[0];
1320
+ throw new qn(
1321
+ {
1322
+ css: e,
1323
+ message: `Syntax error parsing expected css: ${r} on line: ${u}`
1324
+ },
1325
+ ...t
1326
+ );
1327
+ }
1328
+ return n.rules[0].declarations.filter((r) => r.type === "declaration").reduce(
1329
+ (r, { property: u, value: s }) => Object.assign(r, { [u]: s }),
1330
+ {}
1331
+ );
1332
+ }
1333
+ function De(e, t) {
1334
+ return typeof t == "string" ? t : e.utils.stringify(t);
1335
+ }
1336
+ function S(e, t, n, i, r, u) {
1337
+ return [
1338
+ `${t}
1339
+ `,
1340
+ // eslint-disable-next-line new-cap
1341
+ `${n}:
1342
+ ${e.utils.EXPECTED_COLOR(
1343
+ Ne(De(e, i), 2)
1344
+ )}`,
1345
+ // eslint-disable-next-line new-cap
1346
+ `${r}:
1347
+ ${e.utils.RECEIVED_COLOR(
1348
+ Ne(De(e, u), 2)
1349
+ )}`
1350
+ ].join(`
1351
+ `);
1352
+ }
1353
+ function Un(e, t) {
1354
+ return t instanceof RegExp ? t.test(e) : e.includes(String(t));
1355
+ }
1356
+ function J(e, t) {
1357
+ console.warn(
1358
+ `Warning: ${e} has been deprecated and will be removed in future updates.`,
1359
+ t
1360
+ );
1361
+ }
1362
+ function Z(e) {
1363
+ return e.replace(/\s+/g, " ").trim();
1364
+ }
1365
+ function q(e) {
1366
+ return e.tagName && e.tagName.toLowerCase();
1367
+ }
1368
+ function Gn({ multiple: e, options: t }) {
1369
+ const n = [...t].filter((i) => i.selected);
1370
+ if (e)
1371
+ return [...n].map((i) => i.value);
1372
+ if (n.length !== 0)
1373
+ return n[0].value;
1374
+ }
1375
+ function zn(e) {
1376
+ switch (e.type) {
1377
+ case "number":
1378
+ return e.value === "" ? null : Number(e.value);
1379
+ case "checkbox":
1380
+ return e.checked;
1381
+ default:
1382
+ return e.value;
1383
+ }
1384
+ }
1385
+ const Wn = ["meter", "progressbar", "slider", "spinbutton"];
1386
+ function Yn(e) {
1387
+ if (Wn.includes(e.getAttribute("role")))
1388
+ return Number(e.getAttribute("aria-valuenow"));
1389
+ }
1390
+ function Ye(e) {
1391
+ if (e)
1392
+ switch (e.tagName.toLowerCase()) {
1393
+ case "input":
1394
+ return zn(e);
1395
+ case "select":
1396
+ return Gn(e);
1397
+ default:
1398
+ return e.value ?? Yn(e);
1399
+ }
1400
+ }
1401
+ function Kn(e, { wordConnector: t = ", ", lastWordConnector: n = " and " } = {}) {
1402
+ return [e.slice(0, -1).join(t), e[e.length - 1]].join(
1403
+ e.length > 1 ? n : ""
1404
+ );
1405
+ }
1406
+ function be(e, t) {
1407
+ return Array.isArray(e) && Array.isArray(t) ? [...new Set(e)].every((n) => new Set(t).has(n)) : e === t;
1408
+ }
1409
+ function ue(e, t) {
1410
+ return J(
1411
+ "toBeInTheDOM",
1412
+ "Please use toBeInTheDocument for searching the entire document and toContainElement for searching a specific container."
1413
+ ), e && b(e, ue, this), t && b(t, ue, this), {
1414
+ pass: t ? t.contains(e) : !!e,
1415
+ message: () => [
1416
+ this.utils.matcherHint(
1417
+ `${this.isNot ? ".not" : ""}.toBeInTheDOM`,
1418
+ "element",
1419
+ ""
1420
+ ),
1421
+ "",
1422
+ "Received:",
1423
+ ` ${this.utils.printReceived(
1424
+ e && e.cloneNode(!1)
1425
+ )}`
1426
+ ].join(`
1427
+ `)
1428
+ };
1429
+ }
1430
+ function Ke(e) {
1431
+ (e !== null || !this.isNot) && b(e, Ke, this);
1432
+ const t = e === null ? !1 : e.ownerDocument === e.getRootNode({ composed: !0 }), n = () => `expected document not to contain element, found ${this.utils.stringify(
1433
+ e.cloneNode(!0)
1434
+ )} instead`, i = () => "element could not be found in the document";
1435
+ return {
1436
+ pass: t,
1437
+ message: () => [
1438
+ this.utils.matcherHint(
1439
+ `${this.isNot ? ".not" : ""}.toBeInTheDocument`,
1440
+ "element",
1441
+ ""
1442
+ ),
1443
+ "",
1444
+ // eslint-disable-next-line new-cap
1445
+ this.utils.RECEIVED_COLOR(this.isNot ? n() : i())
1446
+ ].join(`
1447
+ `)
1448
+ };
1449
+ }
1450
+ function Xe(e) {
1451
+ return J(
1452
+ "toBeEmpty",
1453
+ "Please use instead toBeEmptyDOMElement for finding empty nodes in the DOM."
1454
+ ), b(e, Xe, this), {
1455
+ pass: e.innerHTML === "",
1456
+ message: () => [
1457
+ this.utils.matcherHint(
1458
+ `${this.isNot ? ".not" : ""}.toBeEmpty`,
1459
+ "element",
1460
+ ""
1461
+ ),
1462
+ "",
1463
+ "Received:",
1464
+ ` ${this.utils.printReceived(e.innerHTML)}`
1465
+ ].join(`
1466
+ `)
1467
+ };
1468
+ }
1469
+ function Qe(e) {
1470
+ return b(e, Qe, this), {
1471
+ pass: Xn(e),
1472
+ message: () => [
1473
+ this.utils.matcherHint(
1474
+ `${this.isNot ? ".not" : ""}.toBeEmptyDOMElement`,
1475
+ "element",
1476
+ ""
1477
+ ),
1478
+ "",
1479
+ "Received:",
1480
+ ` ${this.utils.printReceived(e.innerHTML)}`
1481
+ ].join(`
1482
+ `)
1483
+ };
1484
+ }
1485
+ function Xn(e) {
1486
+ return [...e.childNodes].filter((n) => n.nodeType !== 8).length === 0;
1487
+ }
1488
+ function ce(e, t) {
1489
+ return b(e, ce, this), t !== null && b(t, ce, this), {
1490
+ pass: e.contains(t),
1491
+ message: () => [
1492
+ this.utils.matcherHint(
1493
+ `${this.isNot ? ".not" : ""}.toContainElement`,
1494
+ "element",
1495
+ "element"
1496
+ ),
1497
+ "",
1498
+ // eslint-disable-next-line new-cap
1499
+ this.utils.RECEIVED_COLOR(`${this.utils.stringify(
1500
+ e.cloneNode(!1)
1501
+ )} ${this.isNot ? "contains:" : "does not contain:"} ${this.utils.stringify(t && t.cloneNode(!1))}
1502
+ `)
1503
+ ].join(`
1504
+ `)
1505
+ };
1506
+ }
1507
+ function Qn(e, t) {
1508
+ const n = e.ownerDocument.createElement("div");
1509
+ return n.innerHTML = t, n.innerHTML;
1510
+ }
1511
+ function Je(e, t) {
1512
+ if (b(e, Je, this), typeof t != "string")
1513
+ throw new Error(`.toContainHTML() expects a string value, got ${t}`);
1514
+ return {
1515
+ pass: e.outerHTML.includes(Qn(e, t)),
1516
+ message: () => [
1517
+ this.utils.matcherHint(
1518
+ `${this.isNot ? ".not" : ""}.toContainHTML`,
1519
+ "element",
1520
+ ""
1521
+ ),
1522
+ "Expected:",
1523
+ // eslint-disable-next-line new-cap
1524
+ ` ${this.utils.EXPECTED_COLOR(t)}`,
1525
+ "Received:",
1526
+ ` ${this.utils.printReceived(e.cloneNode(!0))}`
1527
+ ].join(`
1528
+ `)
1529
+ };
1530
+ }
1531
+ function Ze(e, t, n = { normalizeWhitespace: !0 }) {
1532
+ _n(e, Ze, this);
1533
+ const i = n.normalizeWhitespace ? Z(e.textContent) : e.textContent.replace(/\u00a0/g, " "), r = i !== "" && t === "";
1534
+ return {
1535
+ pass: !r && Un(i, t),
1536
+ message: () => {
1537
+ const u = this.isNot ? "not to" : "to";
1538
+ return S(
1539
+ this,
1540
+ this.utils.matcherHint(
1541
+ `${this.isNot ? ".not" : ""}.toHaveTextContent`,
1542
+ "element",
1543
+ ""
1544
+ ),
1545
+ r ? "Checking with empty string will always match, use .toBeEmptyDOMElement() instead" : `Expected element ${u} have text content`,
1546
+ t,
1547
+ "Received",
1548
+ i
1549
+ );
1550
+ }
1551
+ };
1552
+ }
1553
+ function le(e, t) {
1554
+ b(e, le, this);
1555
+ const n = Tn(e), i = arguments.length === 1;
1556
+ let r = !1;
1557
+ return i ? r = n !== "" : r = t instanceof RegExp ? t.test(n) : this.equals(
1558
+ n,
1559
+ t
1560
+ ), {
1561
+ pass: r,
1562
+ message: () => {
1563
+ const u = this.isNot ? "not to" : "to";
1564
+ return S(
1565
+ this,
1566
+ this.utils.matcherHint(
1567
+ `${this.isNot ? ".not" : ""}.${le.name}`,
1568
+ "element",
1569
+ ""
1570
+ ),
1571
+ `Expected element ${u} have accessible description`,
1572
+ t,
1573
+ "Received",
1574
+ n
1575
+ );
1576
+ }
1577
+ };
1578
+ }
1579
+ const G = "aria-invalid", Jn = ["false"];
1580
+ function et(e, t) {
1581
+ var h;
1582
+ b(e, et, this);
1583
+ const n = this.isNot ? "not to" : "to", i = this.isNot ? ".not.toHaveAccessibleErrorMessage" : ".toHaveAccessibleErrorMessage", r = e.getAttribute("aria-errormessage");
1584
+ if (!!r && /\s+/.test(r))
1585
+ return {
1586
+ pass: !1,
1587
+ message: () => S(
1588
+ this,
1589
+ this.utils.matcherHint(i, "element"),
1590
+ "Expected element's `aria-errormessage` attribute to be empty or a single, valid ID",
1591
+ "",
1592
+ "Received",
1593
+ `aria-errormessage="${r}"`
1594
+ )
1595
+ };
1596
+ const s = e.getAttribute(G);
1597
+ if (!e.hasAttribute(G) || Jn.includes(s))
1598
+ return {
1599
+ pass: !1,
1600
+ message: () => S(
1601
+ this,
1602
+ this.utils.matcherHint(i, "element"),
1603
+ "Expected element to be marked as invalid with attribute",
1604
+ `${G}="${String(!0)}"`,
1605
+ "Received",
1606
+ e.hasAttribute("aria-invalid") ? `${G}="${e.getAttribute(G)}` : null
1607
+ )
1608
+ };
1609
+ const l = Z(
1610
+ ((h = e.ownerDocument.getElementById(r)) == null ? void 0 : h.textContent) ?? ""
1611
+ );
1612
+ return {
1613
+ pass: t === void 0 ? !!l : t instanceof RegExp ? t.test(l) : this.equals(l, t),
1614
+ message: () => S(
1615
+ this,
1616
+ this.utils.matcherHint(i, "element"),
1617
+ `Expected element ${n} have accessible error message`,
1618
+ t ?? "",
1619
+ "Received",
1620
+ l
1621
+ )
1622
+ };
1623
+ }
1624
+ const Zn = ni(me.elementRoles);
1625
+ function fe(e, t) {
1626
+ b(e, fe, this);
1627
+ const n = ei(e);
1628
+ return {
1629
+ pass: n.some((r) => r === t),
1630
+ message: () => {
1631
+ const r = this.isNot ? "not to" : "to";
1632
+ return S(
1633
+ this,
1634
+ this.utils.matcherHint(
1635
+ `${this.isNot ? ".not" : ""}.${fe.name}`,
1636
+ "element",
1637
+ ""
1638
+ ),
1639
+ `Expected element ${r} have role`,
1640
+ t,
1641
+ "Received",
1642
+ n.join(", ")
1643
+ );
1644
+ }
1645
+ };
1646
+ }
1647
+ function ei(e) {
1648
+ return e.hasAttribute("role") ? e.getAttribute("role").split(" ").filter(Boolean) : ti(e);
1649
+ }
1650
+ function ti(e) {
1651
+ for (const { match: t, roles: n } of Zn)
1652
+ if (t(e))
1653
+ return [...n];
1654
+ return [];
1655
+ }
1656
+ function ni(e) {
1657
+ function t({ name: s, attributes: d }) {
1658
+ return `${s}${d.map(({ name: l, value: h, constraints: N = [] }) => N.indexOf("undefined") !== -1 ? `:not([${l}])` : h ? `[${l}="${h}"]` : `[${l}]`).join("")}`;
1659
+ }
1660
+ function n({ attributes: s = [] }) {
1661
+ return s.length;
1662
+ }
1663
+ function i({ specificity: s }, { specificity: d }) {
1664
+ return d - s;
1665
+ }
1666
+ function r(s) {
1667
+ let { attributes: d = [] } = s;
1668
+ const l = d.findIndex(
1669
+ (N) => N.value && N.name === "type" && N.value === "text"
1670
+ );
1671
+ l >= 0 && (d = [
1672
+ ...d.slice(0, l),
1673
+ ...d.slice(l + 1)
1674
+ ]);
1675
+ const h = t({ ...s, attributes: d });
1676
+ return (N) => l >= 0 && N.type !== "text" ? !1 : N.matches(h);
1677
+ }
1678
+ let u = [];
1679
+ for (const [s, d] of e.entries())
1680
+ u = [
1681
+ ...u,
1682
+ {
1683
+ match: r(s),
1684
+ roles: Array.from(d),
1685
+ specificity: n(s)
1686
+ }
1687
+ ];
1688
+ return u.sort(i);
1689
+ }
1690
+ function de(e, t) {
1691
+ b(e, de, this);
1692
+ const n = Dn(e), i = arguments.length === 1;
1693
+ let r = !1;
1694
+ return i ? r = n !== "" : r = t instanceof RegExp ? t.test(n) : this.equals(n, t), {
1695
+ pass: r,
1696
+ message: () => {
1697
+ const u = this.isNot ? "not to" : "to";
1698
+ return S(
1699
+ this,
1700
+ this.utils.matcherHint(
1701
+ `${this.isNot ? ".not" : ""}.${de.name}`,
1702
+ "element",
1703
+ ""
1704
+ ),
1705
+ `Expected element ${u} have accessible name`,
1706
+ t,
1707
+ "Received",
1708
+ n
1709
+ );
1710
+ }
1711
+ };
1712
+ }
1713
+ function Be(e, t, n) {
1714
+ return n === void 0 ? t : `${t}=${e(n)}`;
1715
+ }
1716
+ function ii(e, t, n) {
1717
+ return n === void 0 ? `element.hasAttribute(${e(t)})` : `element.getAttribute(${e(t)}) === ${e(n)}`;
1718
+ }
1719
+ function tt(e, t, n) {
1720
+ b(e, tt, this);
1721
+ const i = n !== void 0, r = e.hasAttribute(t), u = e.getAttribute(t);
1722
+ return {
1723
+ pass: i ? r && this.equals(u, n) : r,
1724
+ message: () => {
1725
+ const s = this.isNot ? "not to" : "to", d = r ? Be(this.utils.stringify, t, u) : null, l = this.utils.matcherHint(
1726
+ `${this.isNot ? ".not" : ""}.toHaveAttribute`,
1727
+ "element",
1728
+ this.utils.printExpected(t),
1729
+ {
1730
+ secondArgument: i ? this.utils.printExpected(n) : void 0,
1731
+ comment: ii(
1732
+ this.utils.stringify,
1733
+ t,
1734
+ n
1735
+ )
1736
+ }
1737
+ );
1738
+ return S(
1739
+ this,
1740
+ l,
1741
+ `Expected the element ${s} have attribute`,
1742
+ Be(this.utils.stringify, t, n),
1743
+ "Received",
1744
+ d
1745
+ );
1746
+ }
1747
+ };
1748
+ }
1749
+ function ri(e) {
1750
+ const t = e.pop();
1751
+ let n, i;
1752
+ return typeof t == "object" && !(t instanceof RegExp) ? (n = e, i = t) : (n = e.concat(t), i = { exact: !1 }), { expectedClassNames: n, options: i };
1753
+ }
1754
+ function Pe(e) {
1755
+ return e ? e.split(/\s+/).filter((t) => t.length > 0) : [];
1756
+ }
1757
+ function ke(e, t) {
1758
+ return e.every(
1759
+ (n) => typeof n == "string" ? t.includes(n) : t.some((i) => n.test(i))
1760
+ );
1761
+ }
1762
+ function nt(e, ...t) {
1763
+ b(e, nt, this);
1764
+ const { expectedClassNames: n, options: i } = ri(t), r = Pe(e.getAttribute("class")), u = n.reduce(
1765
+ (d, l) => d.concat(
1766
+ typeof l == "string" || !l ? Pe(l) : l
1767
+ ),
1768
+ []
1769
+ ), s = u.some((d) => d instanceof RegExp);
1770
+ if (i.exact && s)
1771
+ throw new Error("Exact option does not support RegExp expected class names");
1772
+ return i.exact ? {
1773
+ pass: ke(u, r) && u.length === r.length,
1774
+ message: () => {
1775
+ const d = this.isNot ? "not to" : "to";
1776
+ return S(
1777
+ this,
1778
+ this.utils.matcherHint(
1779
+ `${this.isNot ? ".not" : ""}.toHaveClass`,
1780
+ "element",
1781
+ this.utils.printExpected(u.join(" "))
1782
+ ),
1783
+ `Expected the element ${d} have EXACTLY defined classes`,
1784
+ u.join(" "),
1785
+ "Received",
1786
+ r.join(" ")
1787
+ );
1788
+ }
1789
+ } : u.length > 0 ? {
1790
+ pass: ke(u, r),
1791
+ message: () => {
1792
+ const d = this.isNot ? "not to" : "to";
1793
+ return S(
1794
+ this,
1795
+ this.utils.matcherHint(
1796
+ `${this.isNot ? ".not" : ""}.toHaveClass`,
1797
+ "element",
1798
+ this.utils.printExpected(u.join(" "))
1799
+ ),
1800
+ `Expected the element ${d} have class`,
1801
+ u.join(" "),
1802
+ "Received",
1803
+ r.join(" ")
1804
+ );
1805
+ }
1806
+ } : {
1807
+ pass: this.isNot ? r.length > 0 : !1,
1808
+ message: () => this.isNot ? S(
1809
+ this,
1810
+ this.utils.matcherHint(".not.toHaveClass", "element", ""),
1811
+ "Expected the element to have classes",
1812
+ "(none)",
1813
+ "Received",
1814
+ r.join(" ")
1815
+ ) : [
1816
+ this.utils.matcherHint(".toHaveClass", "element"),
1817
+ "At least one expected class must be provided."
1818
+ ].join(`
1819
+ `)
1820
+ };
1821
+ }
1822
+ function si(e, t) {
1823
+ const n = {}, i = e.createElement("div");
1824
+ return Object.keys(t).forEach((r) => {
1825
+ i.style[r] = t[r], n[r] = i.style[r];
1826
+ }), n;
1827
+ }
1828
+ function oi(e, t) {
1829
+ return !!Object.keys(e).length && Object.entries(e).every(([n, i]) => {
1830
+ const r = n.startsWith("--"), u = [n];
1831
+ return r || u.push(n.toLowerCase()), u.some(
1832
+ (s) => t[s] === i || t.getPropertyValue(s) === i
1833
+ );
1834
+ });
1835
+ }
1836
+ function Me(e) {
1837
+ return Object.keys(e).sort().map((t) => `${t}: ${e[t]};`).join(`
1838
+ `);
1839
+ }
1840
+ function ai(e, t, n) {
1841
+ const i = Array.from(n).filter((u) => t[u] !== void 0).reduce(
1842
+ (u, s) => Object.assign(u, { [s]: n.getPropertyValue(s) }),
1843
+ {}
1844
+ );
1845
+ return e(Me(t), Me(i)).replace(`${kn.red("+ Received")}
1846
+ `, "");
1847
+ }
1848
+ function pe(e, t) {
1849
+ b(e, pe, this);
1850
+ const n = typeof t == "object" ? t : Fn(t, pe, this), { getComputedStyle: i } = e.ownerDocument.defaultView, r = si(e.ownerDocument, n), u = i(e);
1851
+ return {
1852
+ pass: oi(r, u),
1853
+ message: () => {
1854
+ const s = `${this.isNot ? ".not" : ""}.toHaveStyle`;
1855
+ return [
1856
+ this.utils.matcherHint(s, "element", ""),
1857
+ ai(this.utils.diff, r, u)
1858
+ ].join(`
1859
+
1860
+ `);
1861
+ }
1862
+ };
1863
+ }
1864
+ function it(e) {
1865
+ return b(e, it, this), {
1866
+ pass: e.ownerDocument.activeElement === e,
1867
+ message: () => [
1868
+ this.utils.matcherHint(
1869
+ `${this.isNot ? ".not" : ""}.toHaveFocus`,
1870
+ "element",
1871
+ ""
1872
+ ),
1873
+ "",
1874
+ ...this.isNot ? [
1875
+ "Received element is focused:",
1876
+ ` ${this.utils.printReceived(e)}`
1877
+ ] : [
1878
+ "Expected element with focus:",
1879
+ ` ${this.utils.printExpected(e)}`,
1880
+ "Received element with focus:",
1881
+ ` ${this.utils.printReceived(
1882
+ e.ownerDocument.activeElement
1883
+ )}`
1884
+ ]
1885
+ ].join(`
1886
+ `)
1887
+ };
1888
+ }
1889
+ function ui(e) {
1890
+ const t = [...new Set(e.map((n) => n.type))];
1891
+ if (t.length !== 1)
1892
+ throw new Error(
1893
+ "Multiple form elements with the same name must be of the same type"
1894
+ );
1895
+ switch (t[0]) {
1896
+ case "radio": {
1897
+ const n = e.find((i) => i.checked);
1898
+ return n ? n.value : void 0;
1899
+ }
1900
+ case "checkbox":
1901
+ return e.filter((n) => n.checked).map((n) => n.value);
1902
+ default:
1903
+ return e.map((n) => n.value);
1904
+ }
1905
+ }
1906
+ function ci(e, t) {
1907
+ const n = [...e.querySelectorAll(`[name="${jn(t)}"]`)];
1908
+ if (n.length !== 0)
1909
+ switch (n.length) {
1910
+ case 1:
1911
+ return Ye(n[0]);
1912
+ default:
1913
+ return ui(n);
1914
+ }
1915
+ }
1916
+ function li(e) {
1917
+ return /\[\]$/.test(e) ? e.slice(0, -2) : e;
1918
+ }
1919
+ function fi(e) {
1920
+ return Array.from(e.elements).map((n) => n.name).reduce(
1921
+ (n, i) => ({
1922
+ ...n,
1923
+ [li(i)]: ci(e, i)
1924
+ }),
1925
+ {}
1926
+ );
1927
+ }
1928
+ function rt(e, t) {
1929
+ if (b(e, rt, this), !e.elements)
1930
+ throw new Error("toHaveFormValues must be called on a form or a fieldset");
1931
+ const n = fi(e);
1932
+ return {
1933
+ pass: Object.entries(t).every(
1934
+ ([i, r]) => be(n[i], r)
1935
+ ),
1936
+ message: () => {
1937
+ const i = this.isNot ? "not to" : "to", r = `${this.isNot ? ".not" : ""}.toHaveFormValues`, u = Object.keys(n).filter((s) => t.hasOwnProperty(s)).reduce((s, d) => ({ ...s, [d]: n[d] }), {});
1938
+ return [
1939
+ this.utils.matcherHint(r, "element", ""),
1940
+ `Expected the element ${i} have form values`,
1941
+ this.utils.diff(t, u)
1942
+ ].join(`
1943
+
1944
+ `);
1945
+ }
1946
+ };
1947
+ }
1948
+ function di(e) {
1949
+ const { getComputedStyle: t } = e.ownerDocument.defaultView, { display: n, visibility: i, opacity: r } = t(e);
1950
+ return n !== "none" && i !== "hidden" && i !== "collapse" && r !== "0" && r !== 0;
1951
+ }
1952
+ function pi(e, t) {
1953
+ let n;
1954
+ return t ? n = e.nodeName === "DETAILS" && t.nodeName !== "SUMMARY" ? e.hasAttribute("open") : !0 : n = e.nodeName === "DETAILS" ? e.hasAttribute("open") : !0, !e.hasAttribute("hidden") && n;
1955
+ }
1956
+ function st(e, t) {
1957
+ return di(e) && pi(e, t) && (!e.parentElement || st(e.parentElement, e));
1958
+ }
1959
+ function ot(e) {
1960
+ b(e, ot, this);
1961
+ const t = e.ownerDocument === e.getRootNode({ composed: !0 }), n = t && st(e);
1962
+ return {
1963
+ pass: n,
1964
+ message: () => {
1965
+ const i = n ? "is" : "is not";
1966
+ return [
1967
+ this.utils.matcherHint(
1968
+ `${this.isNot ? ".not" : ""}.toBeVisible`,
1969
+ "element",
1970
+ ""
1971
+ ),
1972
+ "",
1973
+ `Received element ${i} visible${t ? "" : " (element is not in the document)"}:`,
1974
+ ` ${this.utils.printReceived(e.cloneNode(!1))}`
1975
+ ].join(`
1976
+ `);
1977
+ }
1978
+ };
1979
+ }
1980
+ const hi = [
1981
+ "fieldset",
1982
+ "input",
1983
+ "select",
1984
+ "optgroup",
1985
+ "option",
1986
+ "button",
1987
+ "textarea"
1988
+ ];
1989
+ function gi(e, t) {
1990
+ return q(e) === "legend" && q(t) === "fieldset" && e.isSameNode(
1991
+ Array.from(t.children).find((n) => q(n) === "legend")
1992
+ );
1993
+ }
1994
+ function mi(e, t) {
1995
+ return ut(t) && !gi(e, t);
1996
+ }
1997
+ function bi(e) {
1998
+ return e.includes("-");
1999
+ }
2000
+ function at(e) {
2001
+ const t = q(e);
2002
+ return hi.includes(t) || bi(t);
2003
+ }
2004
+ function ut(e) {
2005
+ return at(e) && e.hasAttribute("disabled");
2006
+ }
2007
+ function ct(e) {
2008
+ const t = e.parentElement;
2009
+ return !!t && (mi(e, t) || ct(t));
2010
+ }
2011
+ function lt(e) {
2012
+ return at(e) && (ut(e) || ct(e));
2013
+ }
2014
+ function ft(e) {
2015
+ b(e, ft, this);
2016
+ const t = lt(e);
2017
+ return {
2018
+ pass: t,
2019
+ message: () => {
2020
+ const n = t ? "is" : "is not";
2021
+ return [
2022
+ this.utils.matcherHint(
2023
+ `${this.isNot ? ".not" : ""}.toBeDisabled`,
2024
+ "element",
2025
+ ""
2026
+ ),
2027
+ "",
2028
+ `Received element ${n} disabled:`,
2029
+ ` ${this.utils.printReceived(e.cloneNode(!1))}`
2030
+ ].join(`
2031
+ `);
2032
+ }
2033
+ };
2034
+ }
2035
+ function dt(e) {
2036
+ b(e, dt, this);
2037
+ const t = !lt(e);
2038
+ return {
2039
+ pass: t,
2040
+ message: () => {
2041
+ const n = t ? "is" : "is not";
2042
+ return [
2043
+ this.utils.matcherHint(
2044
+ `${this.isNot ? ".not" : ""}.toBeEnabled`,
2045
+ "element",
2046
+ ""
2047
+ ),
2048
+ "",
2049
+ `Received element ${n} enabled:`,
2050
+ ` ${this.utils.printReceived(e.cloneNode(!1))}`
2051
+ ].join(`
2052
+ `);
2053
+ }
2054
+ };
2055
+ }
2056
+ const yi = ["select", "textarea"], vi = ["input", "select", "textarea"], Ei = [
2057
+ "color",
2058
+ "hidden",
2059
+ "range",
2060
+ "submit",
2061
+ "image",
2062
+ "reset"
2063
+ ], wi = [
2064
+ "checkbox",
2065
+ "combobox",
2066
+ "gridcell",
2067
+ "listbox",
2068
+ "radiogroup",
2069
+ "spinbutton",
2070
+ "textbox",
2071
+ "tree"
2072
+ ];
2073
+ function xi(e) {
2074
+ return yi.includes(q(e)) && e.hasAttribute("required");
2075
+ }
2076
+ function Ni(e) {
2077
+ return q(e) === "input" && e.hasAttribute("required") && (e.hasAttribute("type") && !Ei.includes(e.getAttribute("type")) || !e.hasAttribute("type"));
2078
+ }
2079
+ function Ai(e) {
2080
+ return e.hasAttribute("aria-required") && e.getAttribute("aria-required") === "true" && (vi.includes(q(e)) || e.hasAttribute("role") && wi.includes(e.getAttribute("role")));
2081
+ }
2082
+ function pt(e) {
2083
+ b(e, pt, this);
2084
+ const t = xi(e) || Ni(e) || Ai(e);
2085
+ return {
2086
+ pass: t,
2087
+ message: () => {
2088
+ const n = t ? "is" : "is not";
2089
+ return [
2090
+ this.utils.matcherHint(
2091
+ `${this.isNot ? ".not" : ""}.toBeRequired`,
2092
+ "element",
2093
+ ""
2094
+ ),
2095
+ "",
2096
+ `Received element ${n} required:`,
2097
+ ` ${this.utils.printReceived(e.cloneNode(!1))}`
2098
+ ].join(`
2099
+ `);
2100
+ }
2101
+ };
2102
+ }
2103
+ const Si = ["form", "input", "select", "textarea"];
2104
+ function Ri(e) {
2105
+ return e.hasAttribute("aria-invalid") && e.getAttribute("aria-invalid") !== "false";
2106
+ }
2107
+ function $i(e) {
2108
+ return Si.includes(q(e));
2109
+ }
2110
+ function ht(e) {
2111
+ const t = Ri(e);
2112
+ return $i(e) ? t || !e.checkValidity() : t;
2113
+ }
2114
+ function gt(e) {
2115
+ b(e, gt, this);
2116
+ const t = ht(e);
2117
+ return {
2118
+ pass: t,
2119
+ message: () => {
2120
+ const n = t ? "is" : "is not";
2121
+ return [
2122
+ this.utils.matcherHint(
2123
+ `${this.isNot ? ".not" : ""}.toBeInvalid`,
2124
+ "element",
2125
+ ""
2126
+ ),
2127
+ "",
2128
+ `Received element ${n} currently invalid:`,
2129
+ ` ${this.utils.printReceived(e.cloneNode(!1))}`
2130
+ ].join(`
2131
+ `);
2132
+ }
2133
+ };
2134
+ }
2135
+ function mt(e) {
2136
+ b(e, mt, this);
2137
+ const t = !ht(e);
2138
+ return {
2139
+ pass: t,
2140
+ message: () => {
2141
+ const n = t ? "is" : "is not";
2142
+ return [
2143
+ this.utils.matcherHint(
2144
+ `${this.isNot ? ".not" : ""}.toBeValid`,
2145
+ "element",
2146
+ ""
2147
+ ),
2148
+ "",
2149
+ `Received element ${n} currently valid:`,
2150
+ ` ${this.utils.printReceived(e.cloneNode(!1))}`
2151
+ ].join(`
2152
+ `);
2153
+ }
2154
+ };
2155
+ }
2156
+ function bt(e, t) {
2157
+ if (b(e, bt, this), e.tagName.toLowerCase() === "input" && ["checkbox", "radio"].includes(e.type))
2158
+ throw new Error(
2159
+ "input with type=checkbox or type=radio cannot be used with .toHaveValue(). Use .toBeChecked() for type=checkbox or .toHaveFormValues() instead"
2160
+ );
2161
+ const n = Ye(e), i = t !== void 0;
2162
+ let r = t, u = n;
2163
+ return t == n && t !== n && (r = `${t} (${typeof t})`, u = `${n} (${typeof n})`), {
2164
+ pass: i ? be(n, t) : !!n,
2165
+ message: () => {
2166
+ const s = this.isNot ? "not to" : "to", d = this.utils.matcherHint(
2167
+ `${this.isNot ? ".not" : ""}.toHaveValue`,
2168
+ "element",
2169
+ t
2170
+ );
2171
+ return S(
2172
+ this,
2173
+ d,
2174
+ `Expected the element ${s} have value`,
2175
+ i ? r : "(any)",
2176
+ "Received",
2177
+ u
2178
+ );
2179
+ }
2180
+ };
2181
+ }
2182
+ function yt(e, t) {
2183
+ b(e, yt, this);
2184
+ const n = e.tagName.toLowerCase();
2185
+ if (!["select", "input", "textarea"].includes(n))
2186
+ throw new Error(
2187
+ ".toHaveDisplayValue() currently supports only input, textarea or select elements, try with another matcher instead."
2188
+ );
2189
+ if (n === "input" && ["radio", "checkbox"].includes(e.type))
2190
+ throw new Error(
2191
+ `.toHaveDisplayValue() currently does not support input[type="${e.type}"], try with another matcher instead.`
2192
+ );
2193
+ const i = Oi(n, e), r = Ci(t), u = r.filter(
2194
+ (l) => i.some(
2195
+ (h) => l instanceof RegExp ? l.test(h) : this.equals(h, String(l))
2196
+ )
2197
+ ).length, s = u === i.length, d = u === r.length;
2198
+ return {
2199
+ pass: s && d,
2200
+ message: () => S(
2201
+ this,
2202
+ this.utils.matcherHint(
2203
+ `${this.isNot ? ".not" : ""}.toHaveDisplayValue`,
2204
+ "element",
2205
+ ""
2206
+ ),
2207
+ `Expected element ${this.isNot ? "not " : ""}to have display value`,
2208
+ t,
2209
+ "Received",
2210
+ i
2211
+ )
2212
+ };
2213
+ }
2214
+ function Oi(e, t) {
2215
+ return e === "select" ? Array.from(t).filter((n) => n.selected).map((n) => n.textContent) : [t.value];
2216
+ }
2217
+ function Ci(e) {
2218
+ return e instanceof Array ? e : [e];
2219
+ }
2220
+ function vt(e) {
2221
+ b(e, vt, this);
2222
+ const t = () => e.tagName.toLowerCase() === "input" && ["checkbox", "radio"].includes(e.type), n = () => Et(e.getAttribute("role")) && ["true", "false"].includes(e.getAttribute("aria-checked"));
2223
+ if (!t() && !n())
2224
+ return {
2225
+ pass: !1,
2226
+ message: () => `only inputs with type="checkbox" or type="radio" or elements with ${Ii()} and a valid aria-checked attribute can be used with .toBeChecked(). Use .toHaveValue() instead`
2227
+ };
2228
+ const i = () => t() ? e.checked : e.getAttribute("aria-checked") === "true";
2229
+ return {
2230
+ pass: i(),
2231
+ message: () => {
2232
+ const r = i() ? "is" : "is not";
2233
+ return [
2234
+ this.utils.matcherHint(
2235
+ `${this.isNot ? ".not" : ""}.toBeChecked`,
2236
+ "element",
2237
+ ""
2238
+ ),
2239
+ "",
2240
+ `Received element ${r} checked:`,
2241
+ ` ${this.utils.printReceived(e.cloneNode(!1))}`
2242
+ ].join(`
2243
+ `);
2244
+ }
2245
+ };
2246
+ }
2247
+ function Ii() {
2248
+ return Kn(
2249
+ Ti().map((e) => `role="${e}"`),
2250
+ { lastWordConnector: " or " }
2251
+ );
2252
+ }
2253
+ function Ti() {
2254
+ return me.roles.keys().filter(Et);
2255
+ }
2256
+ function Et(e) {
2257
+ var t;
2258
+ return ((t = me.roles.get(e)) == null ? void 0 : t.props["aria-checked"]) !== void 0;
2259
+ }
2260
+ function wt(e) {
2261
+ b(e, wt, this);
2262
+ const t = () => e.tagName.toLowerCase() === "input" && e.type === "checkbox", n = () => e.getAttribute("role") === "checkbox";
2263
+ if (!t() && !n())
2264
+ return {
2265
+ pass: !1,
2266
+ message: () => 'only inputs with type="checkbox" or elements with role="checkbox" and a valid aria-checked attribute can be used with .toBePartiallyChecked(). Use .toHaveValue() instead'
2267
+ };
2268
+ const i = () => {
2269
+ const r = e.getAttribute("aria-checked") === "mixed";
2270
+ return t() && e.indeterminate || r;
2271
+ };
2272
+ return {
2273
+ pass: i(),
2274
+ message: () => {
2275
+ const r = i() ? "is" : "is not";
2276
+ return [
2277
+ this.utils.matcherHint(
2278
+ `${this.isNot ? ".not" : ""}.toBePartiallyChecked`,
2279
+ "element",
2280
+ ""
2281
+ ),
2282
+ "",
2283
+ `Received element ${r} partially checked:`,
2284
+ ` ${this.utils.printReceived(e.cloneNode(!1))}`
2285
+ ].join(`
2286
+ `);
2287
+ }
2288
+ };
2289
+ }
2290
+ function xt(e, t) {
2291
+ J(
2292
+ "toHaveDescription",
2293
+ "Please use toHaveAccessibleDescription."
2294
+ ), b(e, xt, this);
2295
+ const n = t !== void 0, r = (e.getAttribute("aria-describedby") || "").split(/\s+/).filter(Boolean);
2296
+ let u = "";
2297
+ if (r.length > 0) {
2298
+ const s = e.ownerDocument, d = r.map((l) => s.getElementById(l)).filter(Boolean);
2299
+ u = Z(d.map((l) => l.textContent).join(" "));
2300
+ }
2301
+ return {
2302
+ pass: n ? t instanceof RegExp ? t.test(u) : this.equals(u, t) : !!u,
2303
+ message: () => {
2304
+ const s = this.isNot ? "not to" : "to";
2305
+ return S(
2306
+ this,
2307
+ this.utils.matcherHint(
2308
+ `${this.isNot ? ".not" : ""}.toHaveDescription`,
2309
+ "element",
2310
+ ""
2311
+ ),
2312
+ `Expected the element ${s} have description`,
2313
+ this.utils.printExpected(t),
2314
+ "Received",
2315
+ this.utils.printReceived(u)
2316
+ );
2317
+ }
2318
+ };
2319
+ }
2320
+ function Nt(e, t) {
2321
+ if (J("toHaveErrorMessage", "Please use toHaveAccessibleErrorMessage."), b(e, Nt, this), !e.hasAttribute("aria-invalid") || e.getAttribute("aria-invalid") === "false") {
2322
+ const s = this.isNot ? ".not" : "";
2323
+ return {
2324
+ pass: !1,
2325
+ message: () => S(
2326
+ this,
2327
+ this.utils.matcherHint(`${s}.toHaveErrorMessage`, "element", ""),
2328
+ "Expected the element to have invalid state indicated by",
2329
+ 'aria-invalid="true"',
2330
+ "Received",
2331
+ e.hasAttribute("aria-invalid") ? `aria-invalid="${e.getAttribute("aria-invalid")}"` : this.utils.printReceived("")
2332
+ )
2333
+ };
2334
+ }
2335
+ const n = t !== void 0, r = (e.getAttribute("aria-errormessage") || "").split(/\s+/).filter(Boolean);
2336
+ let u = "";
2337
+ if (r.length > 0) {
2338
+ const s = e.ownerDocument, d = r.map((l) => s.getElementById(l)).filter(Boolean);
2339
+ u = Z(
2340
+ d.map((l) => l.textContent).join(" ")
2341
+ );
2342
+ }
2343
+ return {
2344
+ pass: n ? t instanceof RegExp ? t.test(u) : this.equals(u, t) : !!u,
2345
+ message: () => {
2346
+ const s = this.isNot ? "not to" : "to";
2347
+ return S(
2348
+ this,
2349
+ this.utils.matcherHint(
2350
+ `${this.isNot ? ".not" : ""}.toHaveErrorMessage`,
2351
+ "element",
2352
+ ""
2353
+ ),
2354
+ `Expected the element ${s} have error message`,
2355
+ this.utils.printExpected(t),
2356
+ "Received",
2357
+ this.utils.printReceived(u)
2358
+ );
2359
+ }
2360
+ };
2361
+ }
2362
+ function Hi(e) {
2363
+ const t = e.ownerDocument.getSelection();
2364
+ if (["input", "textarea"].includes(e.tagName.toLowerCase()))
2365
+ return ["radio", "checkbox"].includes(e.type) ? "" : e.value.toString().substring(e.selectionStart, e.selectionEnd);
2366
+ if (t.anchorNode === null || t.focusNode === null)
2367
+ return "";
2368
+ const n = t.getRangeAt(0), i = e.ownerDocument.createRange();
2369
+ if (t.containsNode(e, !1))
2370
+ i.selectNodeContents(e), t.removeAllRanges(), t.addRange(i);
2371
+ else if (!(e.contains(t.anchorNode) && e.contains(t.focusNode))) {
2372
+ const u = e === n.startContainer || e.contains(n.startContainer), s = e === n.endContainer || e.contains(n.endContainer);
2373
+ t.removeAllRanges(), (u || s) && (i.selectNodeContents(e), u && i.setStart(
2374
+ n.startContainer,
2375
+ n.startOffset
2376
+ ), s && i.setEnd(
2377
+ n.endContainer,
2378
+ n.endOffset
2379
+ ), t.addRange(i));
2380
+ }
2381
+ const r = t.toString();
2382
+ return t.removeAllRanges(), t.addRange(n), r;
2383
+ }
2384
+ function At(e, t) {
2385
+ b(e, At, this);
2386
+ const n = t !== void 0;
2387
+ if (n && typeof t != "string")
2388
+ throw new Error("expected selection must be a string or undefined");
2389
+ const i = Hi(e);
2390
+ return {
2391
+ pass: n ? be(i, t) : !!i,
2392
+ message: () => {
2393
+ const r = this.isNot ? "not to" : "to", u = this.utils.matcherHint(
2394
+ `${this.isNot ? ".not" : ""}.toHaveSelection`,
2395
+ "element",
2396
+ t
2397
+ );
2398
+ return S(
2399
+ this,
2400
+ u,
2401
+ `Expected the element ${r} have selection`,
2402
+ n ? t : "(any)",
2403
+ "Received",
2404
+ i
2405
+ );
2406
+ }
2407
+ };
2408
+ }
2409
+ function St(e) {
2410
+ b(e, St, this);
2411
+ const t = (e.getAttribute("role") || "").split(" ").map((s) => s.trim()), n = e.tagName.toLowerCase() === "button" || e.tagName.toLowerCase() === "input" && e.type === "button" || t.includes("button"), i = e.getAttribute("aria-pressed");
2412
+ return !n || !(i === "true" || i === "false") ? {
2413
+ pass: !1,
2414
+ message: () => 'Only button or input with type="button" or element with role="button" and a valid aria-pressed attribute can be used with .toBePressed()'
2415
+ } : {
2416
+ pass: n && i === "true",
2417
+ message: () => {
2418
+ const s = this.utils.matcherHint(
2419
+ `${this.isNot ? ".not" : ""}.toBePressed`,
2420
+ "element",
2421
+ ""
2422
+ );
2423
+ return S(
2424
+ this,
2425
+ s,
2426
+ "Expected element to have",
2427
+ `aria-pressed="${this.isNot ? "false" : "true"}"`,
2428
+ "Received",
2429
+ `aria-pressed="${i}"`
2430
+ );
2431
+ }
2432
+ };
2433
+ }
2434
+ function Rt(e) {
2435
+ b(e, Rt, this);
2436
+ const t = (e.getAttribute("role") || "").split(" ").map((s) => s.trim()), n = e.tagName.toLowerCase() === "button" || e.tagName.toLowerCase() === "input" && e.type === "button" || t.includes("button"), i = e.getAttribute("aria-pressed");
2437
+ return !n || !(i === "true" || i === "false" || i === "mixed") ? {
2438
+ pass: !1,
2439
+ message: () => 'Only button or input with type="button" or element with role="button" and a valid aria-pressed attribute can be used with .toBePartiallyPressed()'
2440
+ } : {
2441
+ pass: n && i === "mixed",
2442
+ message: () => {
2443
+ const s = this.isNot ? "not to" : "to", d = this.utils.matcherHint(
2444
+ `${this.isNot ? ".not" : ""}.toBePartiallyPressed`,
2445
+ "element",
2446
+ ""
2447
+ );
2448
+ return S(
2449
+ this,
2450
+ d,
2451
+ `Expected element ${s} have`,
2452
+ 'aria-pressed="mixed"',
2453
+ "Received",
2454
+ `aria-pressed="${i}"`
2455
+ );
2456
+ }
2457
+ };
2458
+ }
2459
+ const Di = 1, $t = 2, Ot = 4, Bi = 8, Pi = 16, ki = 32, Ve = {
2460
+ [Di]: "Node.DOCUMENT_POSITION_DISCONNECTED",
2461
+ [$t]: "Node.DOCUMENT_POSITION_PRECEDING",
2462
+ [Ot]: "Node.DOCUMENT_POSITION_FOLLOWING",
2463
+ [Bi]: "Node.DOCUMENT_POSITION_CONTAINS",
2464
+ [Pi]: "Node.DOCUMENT_POSITION_CONTAINED_BY",
2465
+ [ki]: "Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC"
2466
+ };
2467
+ function Mi(e) {
2468
+ return e in Ve ? `${Ve[e]} (${e})` : `Unknown document position (${e})`;
2469
+ }
2470
+ function Ct(e, t) {
2471
+ return function(n, i) {
2472
+ b(n, he, this), b(i, he, this);
2473
+ const r = n.compareDocumentPosition(i);
2474
+ return {
2475
+ pass: r === t,
2476
+ message: () => [
2477
+ this.utils.matcherHint(
2478
+ `${this.isNot ? ".not" : ""}.${e}`,
2479
+ "element",
2480
+ "secondElement"
2481
+ ),
2482
+ "",
2483
+ `Received: ${Mi(r)}`
2484
+ ].join(`
2485
+ `)
2486
+ };
2487
+ };
2488
+ }
2489
+ function he(e, t) {
2490
+ return Ct("toAppearBefore", Ot).apply(
2491
+ this,
2492
+ [e, t]
2493
+ );
2494
+ }
2495
+ function Vi(e, t) {
2496
+ return Ct("toAppearAfter", $t).apply(
2497
+ this,
2498
+ [e, t]
2499
+ );
2500
+ }
2501
+ var qi = /* @__PURE__ */ Object.freeze({
2502
+ __proto__: null,
2503
+ toAppearAfter: Vi,
2504
+ toAppearBefore: he,
2505
+ toBeChecked: vt,
2506
+ toBeDisabled: ft,
2507
+ toBeEmpty: Xe,
2508
+ toBeEmptyDOMElement: Qe,
2509
+ toBeEnabled: dt,
2510
+ toBeInTheDOM: ue,
2511
+ toBeInTheDocument: Ke,
2512
+ toBeInvalid: gt,
2513
+ toBePartiallyChecked: wt,
2514
+ toBePartiallyPressed: Rt,
2515
+ toBePressed: St,
2516
+ toBeRequired: pt,
2517
+ toBeValid: mt,
2518
+ toBeVisible: ot,
2519
+ toContainElement: ce,
2520
+ toContainHTML: Je,
2521
+ toHaveAccessibleDescription: le,
2522
+ toHaveAccessibleErrorMessage: et,
2523
+ toHaveAccessibleName: de,
2524
+ toHaveAttribute: tt,
2525
+ toHaveClass: nt,
2526
+ toHaveDescription: xt,
2527
+ toHaveDisplayValue: yt,
2528
+ toHaveErrorMessage: Nt,
2529
+ toHaveFocus: it,
2530
+ toHaveFormValues: rt,
2531
+ toHaveRole: fe,
2532
+ toHaveSelection: At,
2533
+ toHaveStyle: pe,
2534
+ toHaveTextContent: Ze,
2535
+ toHaveValue: bt
2536
+ });
2537
+ export {
2538
+ Nt as A,
2539
+ it as B,
2540
+ rt as C,
2541
+ fe as D,
2542
+ At as E,
2543
+ pe as F,
2544
+ Ze as G,
2545
+ bt as H,
2546
+ he as a,
2547
+ vt as b,
2548
+ ft as c,
2549
+ Xe as d,
2550
+ qi as e,
2551
+ Qe as f,
2552
+ dt as g,
2553
+ ue as h,
2554
+ Ke as i,
2555
+ gt as j,
2556
+ wt as k,
2557
+ Rt as l,
2558
+ St as m,
2559
+ pt as n,
2560
+ mt as o,
2561
+ ot as p,
2562
+ ce as q,
2563
+ Je as r,
2564
+ le as s,
2565
+ Vi as t,
2566
+ et as u,
2567
+ de as v,
2568
+ tt as w,
2569
+ nt as x,
2570
+ xt as y,
2571
+ yt as z
2572
+ };