@najemi-software/vitest-dom 0.26.0 → 0.27.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/CHANGELOG.md +7 -0
- package/esm/extend-expect.js +2 -0
- package/esm/extend-expect.js.map +1 -1
- package/esm/matchers/css-parse.d.ts +35 -35
- package/esm/matchers/css-parse.js +61 -64
- package/esm/matchers/css-parse.js.map +1 -1
- package/esm/matchers/to-be-checked.d.ts +2 -2
- package/esm/matchers/to-be-disabled.d.ts +3 -3
- package/esm/matchers/to-be-empty-dom-element.d.ts +2 -2
- package/esm/matchers/to-be-empty.d.ts +2 -2
- package/esm/matchers/to-be-in-the-document.d.ts +2 -2
- package/esm/matchers/to-be-in-the-dom.d.ts +2 -2
- package/esm/matchers/to-be-invalid.d.ts +3 -3
- package/esm/matchers/to-be-partially-checked.d.ts +2 -2
- package/esm/matchers/to-be-required.d.ts +2 -2
- package/esm/matchers/to-be-visible.d.ts +2 -2
- package/esm/matchers/to-contain-element.d.ts +2 -2
- package/esm/matchers/to-contain-html.d.ts +2 -2
- package/esm/matchers/to-have-accessible-description.d.ts +2 -2
- package/esm/matchers/to-have-accessible-description.js +1 -1
- package/esm/matchers/to-have-accessible-description.js.map +1 -1
- package/esm/matchers/to-have-accessible-errormessage.d.ts +2 -2
- package/esm/matchers/to-have-accessible-errormessage.js +3 -3
- package/esm/matchers/to-have-accessible-errormessage.js.map +1 -1
- package/esm/matchers/to-have-accessible-name.d.ts +2 -2
- package/esm/matchers/to-have-attribute.d.ts +2 -2
- package/esm/matchers/to-have-class.d.ts +2 -2
- package/esm/matchers/to-have-class.js.map +1 -1
- package/esm/matchers/to-have-description.d.ts +2 -2
- package/esm/matchers/to-have-description.js +1 -1
- package/esm/matchers/to-have-description.js.map +1 -1
- package/esm/matchers/to-have-display-value.d.ts +2 -2
- package/esm/matchers/to-have-errormessage.d.ts +2 -2
- package/esm/matchers/to-have-focus.d.ts +2 -2
- package/esm/matchers/to-have-form-values.d.ts +2 -2
- package/esm/matchers/to-have-form-values.js +6 -6
- package/esm/matchers/to-have-form-values.js.map +1 -1
- package/esm/matchers/to-have-style.d.ts +2 -2
- package/esm/matchers/to-have-text-content.d.ts +2 -2
- package/esm/matchers/to-have-text-content.js +1 -1
- package/esm/matchers/to-have-text-content.js.map +1 -1
- package/esm/matchers/to-have-value.d.ts +2 -2
- package/esm/matchers/types.d.ts +3 -4
- package/esm/matchers/utils.d.ts +7 -8
- package/esm/matchers/utils.js +4 -5
- package/esm/matchers/utils.js.map +1 -1
- package/esm/matchers.js +1 -0
- package/esm/matchers.js.map +1 -1
- package/package.json +16 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { IMatcherResult, MatcherState } from "./types.js";
|
|
2
2
|
/**
|
|
3
3
|
* @deprecated
|
|
4
4
|
* since v1.9.0
|
|
@@ -11,4 +11,4 @@ import type { MatcherResult, MatcherState } from "./types.js";
|
|
|
11
11
|
* does not check whether that element is contained anywhere.
|
|
12
12
|
* @see [testing-library/jest-dom#toBeInTheDom](https://github.com/testing-library/jest-dom#toBeInTheDom)
|
|
13
13
|
*/
|
|
14
|
-
export declare function toBeInTheDOM(this: MatcherState, element: Element, container?: HTMLElement | SVGElement):
|
|
14
|
+
export declare function toBeInTheDOM(this: MatcherState, element: Element, container?: HTMLElement | SVGElement): IMatcherResult;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { IMatcherResult, MatcherState } from "./types.js";
|
|
2
2
|
/**
|
|
3
3
|
* @description
|
|
4
4
|
* Check if a form element, or the entire `form`, is currently invalid.
|
|
@@ -17,7 +17,7 @@ import type { MatcherResult, MatcherState } from "./types.js";
|
|
|
17
17
|
* @see
|
|
18
18
|
* [testing-library/jest-dom#tobeinvalid](https://github.com/testing-library/jest-dom#tobeinvalid)
|
|
19
19
|
*/
|
|
20
|
-
export declare function toBeInvalid(this: MatcherState, element: Element):
|
|
20
|
+
export declare function toBeInvalid(this: MatcherState, element: Element): IMatcherResult;
|
|
21
21
|
/**
|
|
22
22
|
* @description
|
|
23
23
|
* Allows you to check if a form element is currently required.
|
|
@@ -36,4 +36,4 @@ export declare function toBeInvalid(this: MatcherState, element: Element): Match
|
|
|
36
36
|
* @see
|
|
37
37
|
* [testing-library/jest-dom#tobevalid](https://github.com/testing-library/jest-dom#tobevalid)
|
|
38
38
|
*/
|
|
39
|
-
export declare function toBeValid(this: MatcherState, element: Element):
|
|
39
|
+
export declare function toBeValid(this: MatcherState, element: Element): IMatcherResult;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { IMatcherResult, MatcherState } from "./types.js";
|
|
2
2
|
/**
|
|
3
3
|
* @description
|
|
4
4
|
* This allows you to check whether the given element is partially checked.
|
|
@@ -36,4 +36,4 @@ import type { MatcherResult, MatcherState } from "./types.js";
|
|
|
36
36
|
* @see
|
|
37
37
|
* [testing-library/jest-dom#tobepartiallychecked](https://github.com/testing-library/jest-dom#tobepartiallychecked)
|
|
38
38
|
*/
|
|
39
|
-
export declare function toBePartiallyChecked(this: MatcherState, element: Element):
|
|
39
|
+
export declare function toBePartiallyChecked(this: MatcherState, element: Element): IMatcherResult;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { IMatcherResult, MatcherState } from "./types.js";
|
|
2
2
|
/**
|
|
3
3
|
* @description
|
|
4
4
|
* This allows you to check if a form element is currently required.
|
|
@@ -16,4 +16,4 @@ import type { MatcherResult, MatcherState } from "./types.js";
|
|
|
16
16
|
* @see
|
|
17
17
|
* [testing-library/jest-dom#toberequired](https://github.com/testing-library/jest-dom#toberequired)
|
|
18
18
|
*/
|
|
19
|
-
export declare function toBeRequired(this: MatcherState, element: Element):
|
|
19
|
+
export declare function toBeRequired(this: MatcherState, element: Element): IMatcherResult;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { IMatcherResult, MatcherState } from "./types.js";
|
|
2
2
|
/**
|
|
3
3
|
* @description
|
|
4
4
|
* This allows you to check if an element is currently visible to the user.
|
|
@@ -25,4 +25,4 @@ import type { MatcherResult, MatcherState } from "./types.js";
|
|
|
25
25
|
* @see
|
|
26
26
|
* [testing-library/jest-dom#tobevisible](https://github.com/testing-library/jest-dom#tobevisible)
|
|
27
27
|
*/
|
|
28
|
-
export declare function toBeVisible(this: MatcherState, element: Element):
|
|
28
|
+
export declare function toBeVisible(this: MatcherState, element: Element): IMatcherResult;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { IMatcherResult, MatcherState } from "./types.js";
|
|
2
2
|
/**
|
|
3
3
|
* @description
|
|
4
4
|
* Allows you to assert whether an element contains another element as a descendant or not.
|
|
@@ -16,4 +16,4 @@ import type { MatcherResult, MatcherState } from "./types.js";
|
|
|
16
16
|
* @see
|
|
17
17
|
* [testing-library/jest-dom#tocontainelement](https://github.com/testing-library/jest-dom#tocontainelement)
|
|
18
18
|
*/
|
|
19
|
-
export declare function toContainElement(this: MatcherState, container: Element, element: HTMLElement | SVGElement | null):
|
|
19
|
+
export declare function toContainElement(this: MatcherState, container: Element, element: HTMLElement | SVGElement | null): IMatcherResult;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { IMatcherResult, MatcherState } from "./types.js";
|
|
2
2
|
/**
|
|
3
3
|
* @description
|
|
4
4
|
* Assert whether a string representing a HTML element is contained in another element.
|
|
@@ -9,4 +9,4 @@ import type { MatcherResult, MatcherState } from "./types.js";
|
|
|
9
9
|
* @see
|
|
10
10
|
* [testing-library/jest-dom#tocontainhtml](https://github.com/testing-library/jest-dom#tocontainhtml)
|
|
11
11
|
*/
|
|
12
|
-
export declare function toContainHTML(this: MatcherState, container: Element, htmlText: string):
|
|
12
|
+
export declare function toContainHTML(this: MatcherState, container: Element, htmlText: string): IMatcherResult;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { expect } from "vitest";
|
|
2
|
-
import type {
|
|
2
|
+
import type { IMatcherResult, MatcherState } from "./types.js";
|
|
3
3
|
/**
|
|
4
4
|
* @description
|
|
5
5
|
* This allows to assert that an element has the expected [accessible description](https://w3c.github.io/accname/).
|
|
@@ -25,4 +25,4 @@ import type { MatcherResult, MatcherState } from "./types.js";
|
|
|
25
25
|
* @see
|
|
26
26
|
* [testing-library/jest-dom#tohaveaccessibledescription](https://github.com/testing-library/jest-dom#tohaveaccessibledescription)
|
|
27
27
|
*/
|
|
28
|
-
export declare function toHaveAccessibleDescription(this: MatcherState, htmlElement: Element, expectedAccessibleDescription?: string | RegExp | typeof expect.stringContaining):
|
|
28
|
+
export declare function toHaveAccessibleDescription(this: MatcherState, htmlElement: Element, expectedAccessibleDescription?: string | RegExp | typeof expect.stringContaining): IMatcherResult;
|
|
@@ -29,7 +29,7 @@ export function toHaveAccessibleDescription(htmlElement, expectedAccessibleDescr
|
|
|
29
29
|
checkHtmlElement(htmlElement, toHaveAccessibleDescription, this);
|
|
30
30
|
const actualAccessibleDescription = computeAccessibleDescription(htmlElement);
|
|
31
31
|
const missingExpectedValue = arguments.length === 1;
|
|
32
|
-
let pass
|
|
32
|
+
let pass;
|
|
33
33
|
if (missingExpectedValue) {
|
|
34
34
|
// When called without an expected value we only want to validate that the element has an
|
|
35
35
|
// accessible description, whatever it may be.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"to-have-accessible-description.js","sourceRoot":"","sources":["../../src/matchers/to-have-accessible-description.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,uBAAuB,CAAC;AAIrE,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE1D;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,UAAU,2BAA2B,CAEvC,WAAoB,EACpB,6BAAgF;IAEhF,gBAAgB,CAAC,WAAW,EAAE,2BAA2B,EAAE,IAAI,CAAC,CAAC;IACjE,MAAM,2BAA2B,GAAG,4BAA4B,CAAC,WAAW,CAAC,CAAC;IAC9E,MAAM,oBAAoB,GAAG,SAAS,CAAC,MAAM,KAAK,CAAC,CAAC;IAEpD,IAAI,
|
|
1
|
+
{"version":3,"file":"to-have-accessible-description.js","sourceRoot":"","sources":["../../src/matchers/to-have-accessible-description.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,uBAAuB,CAAC;AAIrE,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE1D;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,UAAU,2BAA2B,CAEvC,WAAoB,EACpB,6BAAgF;IAEhF,gBAAgB,CAAC,WAAW,EAAE,2BAA2B,EAAE,IAAI,CAAC,CAAC;IACjE,MAAM,2BAA2B,GAAG,4BAA4B,CAAC,WAAW,CAAC,CAAC;IAC9E,MAAM,oBAAoB,GAAG,SAAS,CAAC,MAAM,KAAK,CAAC,CAAC;IAEpD,IAAI,IAAa,CAAC;IAClB,IAAI,oBAAoB,EAAE,CAAC;QACvB,yFAAyF;QACzF,8CAA8C;QAC9C,IAAI,GAAG,2BAA2B,KAAK,EAAE,CAAC;IAC9C,CAAC;SAAM,CAAC;QACJ,IAAI;YACA,6BAA6B,YAAY,MAAM;gBAC3C,CAAC,CAAC,6BAA6B,CAAC,IAAI,CAAC,2BAA2B,CAAC;gBACjE,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,2BAA2B,EAAE,6BAA6B,CAAC,CAAC;IACtF,CAAC;IAED,OAAO;QACH,IAAI;QAEJ,OAAO,EAAE,GAAG,EAAE;YACV,MAAM,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC;YACxC,OAAO,UAAU,CACb,IAAI,EACJ,IAAI,CAAC,KAAK,CAAC,WAAW,CAClB,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,IAAI,2BAA2B,CAAC,IAAI,EAAE,EACjE,SAAS,EACT,EAAE,CACL,EACD,oBAAoB,EAAE,8BAA8B,EACpD,6BAA6B,EAC7B,UAAU,EACV,2BAA2B,CAC9B,CAAC;QACN,CAAC;KACJ,CAAC;AACN,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { IMatcherResult, MatcherState } from "./types.js";
|
|
2
2
|
/**
|
|
3
3
|
* @description
|
|
4
4
|
* This allows you to assert that an element has the expected
|
|
@@ -37,4 +37,4 @@ import type { MatcherResult, MatcherState } from "./types.js";
|
|
|
37
37
|
* @see
|
|
38
38
|
* [testing-library/jest-dom#tohaveaccessibleerrormessage](https://github.com/testing-library/jest-dom#tohaveaccessibleerrormessage)
|
|
39
39
|
*/
|
|
40
|
-
export declare function toHaveAccessibleErrorMessage<State extends MatcherState>(this: State, htmlElement: HTMLElement, expectedAccessibleErrorMessage?: string | RegExp | State):
|
|
40
|
+
export declare function toHaveAccessibleErrorMessage<State extends MatcherState>(this: State, htmlElement: HTMLElement, expectedAccessibleErrorMessage?: string | RegExp | State): IMatcherResult;
|
|
@@ -69,9 +69,9 @@ export function toHaveAccessibleErrorMessage(htmlElement, expectedAccessibleErro
|
|
|
69
69
|
},
|
|
70
70
|
};
|
|
71
71
|
}
|
|
72
|
-
const error = normalize(errormessageId
|
|
73
|
-
?
|
|
74
|
-
: "");
|
|
72
|
+
const error = normalize(errormessageId == null
|
|
73
|
+
? ""
|
|
74
|
+
: (htmlElement.ownerDocument.getElementById(errormessageId)?.textContent ?? ""));
|
|
75
75
|
return {
|
|
76
76
|
pass: expectedAccessibleErrorMessage === undefined
|
|
77
77
|
? Boolean(error)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"to-have-accessible-errormessage.js","sourceRoot":"","sources":["../../src/matchers/to-have-accessible-errormessage.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AAC;IAEvG,yCAAyC;IACzC,IAAI,UAAU,EAAE,CAAC;QACb,OAAO;YACH,IAAI,EAAE,KAAK;YACX,OAAO,EAAE,GAAG,EAAE;gBACV,OAAO,UAAU,CACb,IAAI,EACJ,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,MAAM,EAAE,SAAS,CAAC,EACzC,yDAAyD,EACzD,GAAG,eAAe,KAAK,MAAM,CAAC,IAAI,CAAC,GAAG,EACtC,UAAU,EACV,WAAW,CAAC,YAAY,CAAC,cAAc,CAAC;oBACpC,CAAC,CAAC,GAAG,eAAe,KAAK,WAAW,CAAC,YAAY,CAAC,eAAe,CAAC,EAAE;oBACpE,CAAC,CAAC,IAAI,CACb,CAAC;YACN,CAAC;SACJ,CAAC;IACN,CAAC;IAED,MAAM,KAAK,GAAG,SAAS,CACnB,cAAc,IAAI,IAAI;QAClB,CAAC,CAAC,CAAC,WAAW,CAAC,aAAa,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,WAAW,IAAI,EAAE,CAAC
|
|
1
|
+
{"version":3,"file":"to-have-accessible-errormessage.js","sourceRoot":"","sources":["../../src/matchers/to-have-accessible-errormessage.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAErE,MAAM,eAAe,GAAG,cAAc,CAAC;AACvC,MAAM,WAAW,GAAG,CAAC,OAAO,CAAC,CAAC;AAE9B,wFAAwF;AACxF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,MAAM,UAAU,4BAA4B,CAExC,WAAwB,EACxB,8BAAwD;IAExD,gBAAgB,CAAC,WAAW,EAAE,4BAA4B,EAAE,IAAI,CAAC,CAAC;IAClE,MAAM,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC;IACxC,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,CAA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cAAc,IAAI,IAAI;QAClB,CAAC,CAAC,EAAE;QACJ,CAAC,CAAC,CAAC,WAAW,CAAC,aAAa,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,WAAW,IAAI,EAAE,CAAC,CACtF,CAAC;IAEF,OAAO;QACH,IAAI,EACA,8BAA8B,KAAK,SAAS;YACxC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC;YAChB,CAAC,CAAC,8BAA8B,YAAY,MAAM;gBAChD,CAAC,CAAC,8BAA8B,CAAC,IAAI,CAAC,KAAK,CAAC;gBAC5C,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,8BAA8B,CAAC;QAE9D,OAAO,EAAE,GAAG,EAAE;YACV,OAAO,UAAU,CACb,IAAI,EACJ,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,MAAM,EAAE,SAAS,CAAC,EACzC,oBAAoB,EAAE,gCAAgC,EACtD,8BAA8B,IAAI,EAAE,EACpC,UAAU,EACV,KAAK,CACR,CAAC;QACN,CAAC;KACJ,CAAC;AACN,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { expect } from "vitest";
|
|
2
|
-
import type {
|
|
2
|
+
import type { IMatcherResult, MatcherState } from "./types.js";
|
|
3
3
|
/**
|
|
4
4
|
* @description
|
|
5
5
|
* This allows to assert that an element has the expected [accessible name](https://w3c.github.io/accname/).
|
|
@@ -30,4 +30,4 @@ import type { MatcherResult, MatcherState } from "./types.js";
|
|
|
30
30
|
* @see
|
|
31
31
|
* [testing-library/jest-dom#tohaveaccessiblename](https://github.com/testing-library/jest-dom#tohaveaccessiblename)
|
|
32
32
|
*/
|
|
33
|
-
export declare function toHaveAccessibleName(this: MatcherState, htmlElement: Element, expectedAccessibleName?: string | RegExp | typeof expect.stringContaining):
|
|
33
|
+
export declare function toHaveAccessibleName(this: MatcherState, htmlElement: Element, expectedAccessibleName?: string | RegExp | typeof expect.stringContaining): IMatcherResult;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { IMatcherResult, MatcherState } from "./types.js";
|
|
2
2
|
/**
|
|
3
3
|
* @description
|
|
4
4
|
* Allows you to check if a given element has an attribute or not.
|
|
@@ -21,4 +21,4 @@ import type { MatcherResult, MatcherState } from "./types.js";
|
|
|
21
21
|
* @see
|
|
22
22
|
* [testing-library/jest-dom#tohaveattribute](https://github.com/testing-library/jest-dom#tohaveattribute)
|
|
23
23
|
*/
|
|
24
|
-
export declare function toHaveAttribute(this: MatcherState, htmlElement: Element, name: string, expectedValue?: unknown):
|
|
24
|
+
export declare function toHaveAttribute(this: MatcherState, htmlElement: Element, name: string, expectedValue?: unknown): IMatcherResult;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { IMatcherResult, MatcherState } from "./types.js";
|
|
2
2
|
/**
|
|
3
3
|
* @description
|
|
4
4
|
* Check whether the given element has certain classes within its `class` attribute.
|
|
@@ -24,4 +24,4 @@ import type { MatcherResult, MatcherState } from "./types.js";
|
|
|
24
24
|
* @see
|
|
25
25
|
* [testing-library/jest-dom#tohaveclass](https://github.com/testing-library/jest-dom#tohaveclass)
|
|
26
26
|
*/
|
|
27
|
-
export declare function toHaveClass(this: MatcherState, htmlElement: Element, ...params: string[]):
|
|
27
|
+
export declare function toHaveClass(this: MatcherState, htmlElement: Element, ...params: string[]): IMatcherResult;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"to-have-class.js","sourceRoot":"","sources":["../../src/matchers/to-have-class.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAM1D,SAAS,+BAA+B,CAAC,
|
|
1
|
+
{"version":3,"file":"to-have-class.js","sourceRoot":"","sources":["../../src/matchers/to-have-class.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAM1D,SAAS,+BAA+B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AE,cAAc,EACzC,SAAS,EACT,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAC/C,EACD,wBAAwB,EAAE,aAAa,EACvC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,EAClB,UAAU,EACV,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CACrB,CAAC;YACN,CAAC;SACJ;QACH,CAAC,CAAC;YACI,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK;YAC9C,OAAO,EAAE,GAAG,EAAE,CACV,IAAI,CAAC,KAAK;gBACN,CAAC,CAAC,UAAU,CACN,IAAI,EACJ,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,kBAAkB,EAAE,SAAS,EAAE,EAAE,CAAC,EACzD,sCAAsC,EACtC,QAAQ,EACR,UAAU,EACV,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CACrB;gBACH,CAAC,CAAC;oBACI,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,cAAc,EAAE,SAAS,CAAC;oBACjD,+CAA+C;iBAClD,CAAC,IAAI,CAAC,IAAI,CAAC;SACzB,CAAC;AACZ,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { expect } from "vitest";
|
|
2
|
-
import type {
|
|
2
|
+
import type { IMatcherResult, MatcherState } from "./types.js";
|
|
3
3
|
/**
|
|
4
4
|
* @deprecated
|
|
5
5
|
* since v5.14.1
|
|
@@ -48,4 +48,4 @@ import type { MatcherResult, MatcherState } from "./types.js";
|
|
|
48
48
|
* @see
|
|
49
49
|
* [testing-library/jest-dom#tohavedescription](https://github.com/testing-library/jest-dom#tohavedescription)
|
|
50
50
|
*/
|
|
51
|
-
export declare function toHaveDescription(this: MatcherState, htmlElement: Element, checkWith?: string | RegExp | typeof expect.stringContaining):
|
|
51
|
+
export declare function toHaveDescription(this: MatcherState, htmlElement: Element, checkWith?: string | RegExp | typeof expect.stringContaining): IMatcherResult;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { checkHtmlElement, getMessage, normalize
|
|
1
|
+
import { checkHtmlElement, deprecate, getMessage, normalize } from "./utils.js";
|
|
2
2
|
// See algoritm: https://www.w3.org/TR/accname-1.1/#mapping_additional_nd_description
|
|
3
3
|
/**
|
|
4
4
|
* @deprecated
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"to-have-description.js","sourceRoot":"","sources":["../../src/matchers/to-have-description.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,
|
|
1
|
+
{"version":3,"file":"to-have-description.js","sourceRoot":"","sources":["../../src/matchers/to-have-description.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEhF,qFAAqF;AACrF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AACH,MAAM,UAAU,iBAAiB,CAE7B,WAAoB,EACpB,SAA4D;IAE5D,SAAS,CAAC,mBAAmB,EAAE,yCAAyC,CAAC,CAAC;IAE1E,gBAAgB,CAAC,WAAW,EAAE,iBAAiB,EAAE,IAAI,CAAC,CAAC;IAEvD,MAAM,kBAAkB,GAAG,SAAS,KAAK,SAAS,CAAC;IAEnD,MAAM,gBAAgB,GAAG,WAAW,CAAC,YAAY,CAAC,kBAAkB,CAAC,IAAI,EAAE,CAAC;IAC5E,MAAM,cAAc,GAAG,gBAAgB,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IACrE,IAAI,WAAW,GAAG,EAAE,CAAC;IACrB,IAAI,cAAc,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC5B,MAAM,QAAQ,GAAG,WAAW,CAAC,aAAa,CAAC;QAC3C,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
* This allows you to check whether the given form element has the specified displayed value (the one the
|
|
@@ -40,4 +40,4 @@ import type { MatcherResult, MatcherState } from "./types.js";
|
|
|
40
40
|
* @see
|
|
41
41
|
* [testing-library/jest-dom#tohavedisplayvalue](https://github.com/testing-library/jest-dom#tohavedisplayvalue)
|
|
42
42
|
*/
|
|
43
|
-
export declare function toHaveDisplayValue(this: MatcherState, htmlElement: Element, expectedValue: string | RegExp | Array<string | RegExp>):
|
|
43
|
+
export declare function toHaveDisplayValue(this: MatcherState, htmlElement: Element, expectedValue: string | RegExp | Array<string | RegExp>): IMatcherResult;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { expect } from "vitest";
|
|
2
|
-
import type {
|
|
2
|
+
import type { IMatcherResult, MatcherState } from "./types.js";
|
|
3
3
|
/**
|
|
4
4
|
* @description
|
|
5
5
|
*
|
|
@@ -40,4 +40,4 @@ import type { MatcherResult, MatcherState } from "./types.js";
|
|
|
40
40
|
* @see
|
|
41
41
|
* [testing-library/jest-dom#tohaveerrormessage](https://github.com/testing-library/jest-dom#tohaveerrormessage)
|
|
42
42
|
*/
|
|
43
|
-
export declare function toHaveErrorMessage(this: MatcherState, htmlElement: Element, checkWith?: string | RegExp | typeof expect.stringContaining):
|
|
43
|
+
export declare function toHaveErrorMessage(this: MatcherState, htmlElement: Element, checkWith?: string | RegExp | typeof expect.stringContaining): IMatcherResult;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { IMatcherResult, MatcherState } from "./types.js";
|
|
2
2
|
/**
|
|
3
3
|
* @description
|
|
4
4
|
* Assert whether an element has focus or not.
|
|
@@ -15,4 +15,4 @@ import type { MatcherResult, MatcherState } from "./types.js";
|
|
|
15
15
|
* @see
|
|
16
16
|
* [testing-library/jest-dom#tohavefocus](https://github.com/testing-library/jest-dom#tohavefocus)
|
|
17
17
|
*/
|
|
18
|
-
export declare function toHaveFocus(this: MatcherState, element: Element):
|
|
18
|
+
export declare function toHaveFocus(this: MatcherState, element: Element): IMatcherResult;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { IMatcherResult, MatcherState } from "./types.js";
|
|
2
2
|
/**
|
|
3
3
|
* @description
|
|
4
4
|
* Check if a form or fieldset contains form controls for each given name, and having the specified value.
|
|
@@ -19,4 +19,4 @@ import type { MatcherResult, MatcherState } from "./types.js";
|
|
|
19
19
|
* @see
|
|
20
20
|
* [testing-library/jest-dom#tohaveformvalues](https://github.com/testing-library/jest-dom#tohaveformvalues)
|
|
21
21
|
*/
|
|
22
|
-
export declare function toHaveFormValues(this: MatcherState, formElement: Element, expectedValues: Record<string, unknown>):
|
|
22
|
+
export declare function toHaveFormValues(this: MatcherState, formElement: Element, expectedValues: Record<string, unknown>): IMatcherResult;
|
|
@@ -22,16 +22,16 @@ function getFormValue(container, name) {
|
|
|
22
22
|
if (elements.length === 0) {
|
|
23
23
|
return undefined; // shouldn't happen, but just in case
|
|
24
24
|
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
25
|
+
if (elements.length === 1) {
|
|
26
|
+
return getSingleElementValue(elements[0]);
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
return getMultiElementValue(elements);
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
// Strips the `[]` suffix off a form value name
|
|
33
33
|
function getPureName(name) {
|
|
34
|
-
return
|
|
34
|
+
return name.endsWith("[]") ? name.slice(0, -2) : name;
|
|
35
35
|
}
|
|
36
36
|
function getAllFormValues(container) {
|
|
37
37
|
const names = Array.from(container.elements).map((element) => element.name);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"to-have-form-values.js","sourceRoot":"","sources":["../../src/matchers/to-have-form-values.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAG9C,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EA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,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;YACpE,OAAO;gBACH,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,OAAO,EAAE,SAAS,EAAE,EAAE,CAAC;gBAC9C,wBAAwB,EAAE,mBAAmB;gBAC7C,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,cAAc,EAAE,eAAe,CAAC;aACnD,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACnB,CAAC;KACJ,CAAC;AACN,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { IMatcherResult, MatcherState } from "./types.js";
|
|
2
2
|
/**
|
|
3
3
|
* @description
|
|
4
4
|
* Check if an element has specific css properties with specific values applied.
|
|
@@ -21,4 +21,4 @@ import type { MatcherResult, MatcherState } from "./types.js";
|
|
|
21
21
|
* @see
|
|
22
22
|
* [testing-library/jest-dom#tohavestyle](https://github.com/testing-library/jest-dom#tohavestyle)
|
|
23
23
|
*/
|
|
24
|
-
export declare function toHaveStyle(this: MatcherState, htmlElement: Element, css: string | Record<string, unknown>):
|
|
24
|
+
export declare function toHaveStyle(this: MatcherState, htmlElement: Element, css: string | Record<string, unknown>): IMatcherResult;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { IMatcherResult, MatcherState } from "./types.js";
|
|
2
2
|
/**
|
|
3
3
|
* @description
|
|
4
4
|
* Check whether the given element has a text content or not.
|
|
@@ -24,4 +24,4 @@ import type { MatcherResult, MatcherState } from "./types.js";
|
|
|
24
24
|
*/
|
|
25
25
|
export declare function toHaveTextContent(this: MatcherState, node: Element, checkWith: string | RegExp, options?: {
|
|
26
26
|
normalizeWhitespace: boolean;
|
|
27
|
-
}):
|
|
27
|
+
}): IMatcherResult;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"to-have-text-content.js","sourceRoot":"","sources":["../../src/matchers/to-have-text-content.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"to-have-text-content.js","sourceRoot":"","sources":["../../src/matchers/to-have-text-content.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEvE;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,UAAU,iBAAiB,CAE7B,IAAa,EACb,SAA0B,EAC1B,UAA4C,EAAE,mBAAmB,EAAE,IAAI,EAAE;IAEzE,SAAS,CAAC,IAAI,EAAE,iBAAiB,EAAE,IAAI,CAAC,CAAC;IAEzC,MAAM,WAAW,GAAG,OAAO,CAAC,mBAAmB;QAC3C,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,WAAW,CAAC;QAC7B,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC,CAAC,oCAAoC;IAEpF,MAAM,uBAAuB,GAAG,WAAW,KAAK,EAAE,IAAI,SAAS,KAAK,EAAE,CAAC;IAEvE,OAAO;QACH,IAAI,EAAE,CAAC,uBAAuB,IAAI,OAAO,CAAC,WAAW,EAAE,SAAS,CAAC;QACjE,OAAO,EAAE,GAAG,EAAE;YACV,MAAM,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC;YACxC,OAAO,UAAU,CACb,IAAI,EACJ,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,oBAAoB,EAAE,SAAS,EAAE,EAAE,CAAC,EACtF,uBAAuB;gBACnB,CAAC,CAAC,kFAAkF;gBACpF,CAAC,CAAC,oBAAoB,EAAE,oBAAoB,EAChD,SAAS,EACT,UAAU,EACV,WAAW,CACd,CAAC;QACN,CAAC;KACJ,CAAC;AACN,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { IMatcherResult, MatcherState } from "./types.js";
|
|
2
2
|
/**
|
|
3
3
|
* @description
|
|
4
4
|
* Check whether the given form element has the specified value.
|
|
@@ -18,4 +18,4 @@ import type { MatcherResult, MatcherState } from "./types.js";
|
|
|
18
18
|
* @see
|
|
19
19
|
* [testing-library/jest-dom#tohavevalue](https://github.com/testing-library/jest-dom#tohavevalue)
|
|
20
20
|
*/
|
|
21
|
-
export declare function toHaveValue(this: MatcherState, htmlElement: Element, expectedValue?: string | string[] | number | null):
|
|
21
|
+
export declare function toHaveValue(this: MatcherState, htmlElement: Element, expectedValue?: string | string[] | number | null): IMatcherResult;
|
package/esm/matchers/types.d.ts
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import type { ExpectStatic } from "vitest";
|
|
2
|
-
export interface
|
|
2
|
+
export interface IMatcherResult {
|
|
3
3
|
pass: boolean;
|
|
4
4
|
message(): string;
|
|
5
5
|
actual?: unknown;
|
|
6
6
|
expected?: unknown;
|
|
7
7
|
}
|
|
8
|
-
export type ExpectationResult =
|
|
9
|
-
export interface
|
|
8
|
+
export type ExpectationResult = IMatcherResult | Promise<IMatcherResult>;
|
|
9
|
+
export interface IMatcherFn<T extends MatcherState = MatcherState> {
|
|
10
10
|
(this: T, received: any, expected: any, options?: any): ExpectationResult;
|
|
11
11
|
}
|
|
12
12
|
export type MatcherState = ReturnType<ExpectStatic["getState"]>;
|
|
13
|
-
export type InferredMatcher<T extends MatcherFn, R> = (...args: T extends (first: any, ...rest: infer P) => any ? P : never) => R;
|
package/esm/matchers/utils.d.ts
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { IMatcherFn, MatcherState } from "./types.js";
|
|
2
2
|
declare class GenericTypeError<State extends MatcherState> extends Error {
|
|
3
|
-
constructor(expectedString: string, received: unknown, matcherFn:
|
|
3
|
+
constructor(expectedString: string, received: unknown, matcherFn: IMatcherFn<State>, context: State);
|
|
4
4
|
}
|
|
5
5
|
declare class HtmlElementTypeError<State extends MatcherState = any> extends GenericTypeError<State> {
|
|
6
|
-
constructor(element: unknown, matcherFn:
|
|
6
|
+
constructor(element: unknown, matcherFn: IMatcherFn<State>, context: State);
|
|
7
7
|
}
|
|
8
8
|
declare class NodeTypeError<State extends MatcherState = any> extends GenericTypeError<State> {
|
|
9
|
-
constructor(element: unknown, matcherFn:
|
|
9
|
+
constructor(element: unknown, matcherFn: IMatcherFn<State>, context: State);
|
|
10
10
|
}
|
|
11
11
|
type ElementWithWindow = HTMLElement & {
|
|
12
12
|
ownerDocument: Document & {
|
|
13
13
|
defaultView: Window;
|
|
14
14
|
};
|
|
15
15
|
};
|
|
16
|
-
declare function checkNode<State extends MatcherState = any>(node: unknown, matcherFn:
|
|
17
|
-
declare function checkHtmlElement<State extends MatcherState>(htmlElement: unknown, matcher:
|
|
18
|
-
declare function parseCSS<State extends MatcherState>(css: string, matcherFn:
|
|
16
|
+
declare function checkNode<State extends MatcherState = any>(node: unknown, matcherFn: IMatcherFn<State>, context: State): asserts node is ElementWithWindow;
|
|
17
|
+
declare function checkHtmlElement<State extends MatcherState>(htmlElement: unknown, matcher: IMatcherFn<State>, context: State): asserts htmlElement is ElementWithWindow;
|
|
18
|
+
declare function parseCSS<State extends MatcherState>(css: string, matcherFn: IMatcherFn, context: State): Record<string, string>;
|
|
19
19
|
declare function getMessage(context: MatcherState, matcher: string, expectedLabel: string, expectedValue: any, receivedLabel: string, receivedValue: any): string;
|
|
20
20
|
declare function matches(textToMatch: string, matcher: string | RegExp): boolean;
|
|
21
21
|
declare function deprecate(name: string, replacementText?: string): void;
|
|
@@ -45,4 +45,3 @@ export { HtmlElementTypeError, NodeTypeError, checkHtmlElement, checkNode, parse
|
|
|
45
45
|
*/
|
|
46
46
|
type ValueType = "array" | "bigint" | "boolean" | "function" | "null" | "number" | "object" | "regexp" | "map" | "set" | "date" | "string" | "symbol" | "undefined";
|
|
47
47
|
export declare function getType(value: unknown): ValueType;
|
|
48
|
-
export declare const isPrimitive: (value: unknown) => boolean;
|
package/esm/matchers/utils.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import isEqual from "lodash-es/isEqual.js";
|
|
2
2
|
import isFunction from "lodash-es/isFunction.js";
|
|
3
3
|
import redent from "redent";
|
|
4
|
-
import cssParse from "./css-parse.js";
|
|
4
|
+
import { cssParse } from "./css-parse.js";
|
|
5
5
|
class GenericTypeError extends Error {
|
|
6
6
|
constructor(expectedString, received, matcherFn, context) {
|
|
7
7
|
super();
|
|
@@ -15,7 +15,7 @@ class GenericTypeError extends Error {
|
|
|
15
15
|
try {
|
|
16
16
|
withType = printWithType("Received", received, context.utils.printReceived);
|
|
17
17
|
}
|
|
18
|
-
catch
|
|
18
|
+
catch {
|
|
19
19
|
// Can throw for Document:
|
|
20
20
|
// https://github.com/jsdom/jsdom/issues/2304
|
|
21
21
|
}
|
|
@@ -53,7 +53,7 @@ function checkHtmlElement(htmlElement, matcher, context) {
|
|
|
53
53
|
checkHasWindow(htmlElement, HtmlElementTypeError, matcher, context);
|
|
54
54
|
const window = htmlElement.ownerDocument.defaultView;
|
|
55
55
|
if (!(htmlElement instanceof window.HTMLElement) &&
|
|
56
|
-
// @ts-expect-error
|
|
56
|
+
// @ts-expect-error htmlElement is narrowed to `never` here, but it may be an SVGElement at runtime
|
|
57
57
|
!(htmlElement instanceof window.SVGElement)) {
|
|
58
58
|
throw new HtmlElementTypeError(htmlElement, matcher, context);
|
|
59
59
|
}
|
|
@@ -113,7 +113,7 @@ function normalize(text) {
|
|
|
113
113
|
return text.replace(/\s+/g, " ").trim();
|
|
114
114
|
}
|
|
115
115
|
function getTag(element) {
|
|
116
|
-
return element.tagName
|
|
116
|
+
return element.tagName?.toLowerCase();
|
|
117
117
|
}
|
|
118
118
|
function getSelectValue({ multiple, options }) {
|
|
119
119
|
const selectedOptions = Array.from(options).filter((option) => option.selected);
|
|
@@ -213,5 +213,4 @@ export function getType(value) {
|
|
|
213
213
|
}
|
|
214
214
|
throw new Error(`value of unknown type: ${value}`);
|
|
215
215
|
}
|
|
216
|
-
export const isPrimitive = (value) => Object(value) !== value;
|
|
217
216
|
//# sourceMappingURL=utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/matchers/utils.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,sBAAsB,CAAC;AAC3C,OAAO,UAAU,MAAM,yBAAyB,CAAC;AACjD,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B,OAAO,
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/matchers/utils.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,sBAAsB,CAAC;AAC3C,OAAO,UAAU,MAAM,yBAAyB,CAAC;AACjD,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAiC,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAGzE,MAAM,gBAA6C,SAAQ,KAAK;IAC5D,YAAY,cAAsB,EAAE,QAAiB,EAAE,SAA4B,EAAE,OAAc;QAC/F,KAAK,EAAE,CAAC;QAER,MAAM,aAAa,GACf,eAAe,IAAI,OAAO,CAAC,KAAK,IAAI,UAAU,CAAC,OAAO,CAAC,KAAK,CAAC,aAAa,CAAC;YACvE,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,aAAa;YAC7B,CAAC,CAAC,cAAc,CAAC;QAEzB,IAAI,KAAK,CAAC,iBAAiB,EAAE,CAAC;YAC1B,KAAK,CAAC,iBAAiB,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;QAC7C,CAAC;QACD,IAAI,QAAQ,GAAG,EAAE,CAAC;QAClB,IAAI,CAAC;YACD,QAAQ,GAAG,aAAa,CAAC,UAAU,EAAE,QAAQ,EAAE,OAAO,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;QAChF,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