@noma.to/qwik-testing-library 1.0.4 → 1.1.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.
Files changed (100) hide show
  1. package/README.md +61 -0
  2. package/lib/_virtual/_commonjsHelpers.qwik.cjs +2 -0
  3. package/lib/_virtual/_commonjsHelpers.qwik.mjs +2 -0
  4. package/lib/_virtual/sourcemap-codec.umd.qwik.cjs +4 -0
  5. package/lib/_virtual/sourcemap-codec.umd.qwik.mjs +4 -0
  6. package/lib/index.qwik.cjs +4 -0
  7. package/lib/index.qwik.mjs +4 -0
  8. package/lib/lib/mock.qwik.cjs +14 -0
  9. package/lib/lib/mock.qwik.mjs +14 -0
  10. package/lib/lib/qwik-testing-library.qwik.cjs +4 -0
  11. package/lib/lib/qwik-testing-library.qwik.mjs +4 -0
  12. package/lib/node_modules/.pnpm/@jridgewell_sourcemap-codec@1.5.0/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.qwik.cjs +425 -0
  13. package/lib/node_modules/.pnpm/@jridgewell_sourcemap-codec@1.5.0/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.qwik.mjs +425 -0
  14. package/lib/node_modules/.pnpm/@vitest_expect@2.1.1/node_modules/@vitest/expect/dist/index.qwik.cjs +1967 -0
  15. package/lib/node_modules/.pnpm/@vitest_expect@2.1.1/node_modules/@vitest/expect/dist/index.qwik.mjs +1967 -0
  16. package/lib/node_modules/.pnpm/@vitest_pretty-format@2.1.1/node_modules/@vitest/pretty-format/dist/index.qwik.cjs +1202 -0
  17. package/lib/node_modules/.pnpm/@vitest_pretty-format@2.1.1/node_modules/@vitest/pretty-format/dist/index.qwik.mjs +1202 -0
  18. package/lib/node_modules/.pnpm/@vitest_runner@2.1.1/node_modules/@vitest/runner/dist/chunk-tasks.qwik.cjs +44 -0
  19. package/lib/node_modules/.pnpm/@vitest_runner@2.1.1/node_modules/@vitest/runner/dist/chunk-tasks.qwik.mjs +44 -0
  20. package/lib/node_modules/.pnpm/@vitest_runner@2.1.1/node_modules/@vitest/runner/dist/index.qwik.cjs +665 -0
  21. package/lib/node_modules/.pnpm/@vitest_runner@2.1.1/node_modules/@vitest/runner/dist/index.qwik.mjs +665 -0
  22. package/lib/node_modules/.pnpm/@vitest_snapshot@2.1.1/node_modules/@vitest/snapshot/dist/index.qwik.cjs +1641 -0
  23. package/lib/node_modules/.pnpm/@vitest_snapshot@2.1.1/node_modules/@vitest/snapshot/dist/index.qwik.mjs +1641 -0
  24. package/lib/node_modules/.pnpm/@vitest_spy@2.1.1/node_modules/@vitest/spy/dist/index.qwik.cjs +148 -0
  25. package/lib/node_modules/.pnpm/@vitest_spy@2.1.1/node_modules/@vitest/spy/dist/index.qwik.mjs +148 -0
  26. package/lib/node_modules/.pnpm/@vitest_utils@2.1.1/node_modules/@vitest/utils/dist/chunk-display.qwik.cjs +158 -0
  27. package/lib/node_modules/.pnpm/@vitest_utils@2.1.1/node_modules/@vitest/utils/dist/chunk-display.qwik.mjs +158 -0
  28. package/lib/node_modules/.pnpm/@vitest_utils@2.1.1/node_modules/@vitest/utils/dist/diff.qwik.cjs +1731 -0
  29. package/lib/node_modules/.pnpm/@vitest_utils@2.1.1/node_modules/@vitest/utils/dist/diff.qwik.mjs +1731 -0
  30. package/lib/node_modules/.pnpm/@vitest_utils@2.1.1/node_modules/@vitest/utils/dist/error.qwik.cjs +137 -0
  31. package/lib/node_modules/.pnpm/@vitest_utils@2.1.1/node_modules/@vitest/utils/dist/error.qwik.mjs +137 -0
  32. package/lib/node_modules/.pnpm/@vitest_utils@2.1.1/node_modules/@vitest/utils/dist/helpers.qwik.cjs +150 -0
  33. package/lib/node_modules/.pnpm/@vitest_utils@2.1.1/node_modules/@vitest/utils/dist/helpers.qwik.mjs +150 -0
  34. package/lib/node_modules/.pnpm/@vitest_utils@2.1.1/node_modules/@vitest/utils/dist/index.qwik.cjs +81 -0
  35. package/lib/node_modules/.pnpm/@vitest_utils@2.1.1/node_modules/@vitest/utils/dist/index.qwik.mjs +81 -0
  36. package/lib/node_modules/.pnpm/@vitest_utils@2.1.1/node_modules/@vitest/utils/dist/source-map.qwik.cjs +216 -0
  37. package/lib/node_modules/.pnpm/@vitest_utils@2.1.1/node_modules/@vitest/utils/dist/source-map.qwik.mjs +216 -0
  38. package/lib/node_modules/.pnpm/chai@5.1.1/node_modules/chai/chai.qwik.cjs +3905 -0
  39. package/lib/node_modules/.pnpm/chai@5.1.1/node_modules/chai/chai.qwik.mjs +3905 -0
  40. package/lib/node_modules/.pnpm/loupe@3.1.1/node_modules/loupe/lib/arguments.qwik.cjs +9 -0
  41. package/lib/node_modules/.pnpm/loupe@3.1.1/node_modules/loupe/lib/arguments.qwik.mjs +10 -0
  42. package/lib/node_modules/.pnpm/loupe@3.1.1/node_modules/loupe/lib/array.qwik.cjs +16 -0
  43. package/lib/node_modules/.pnpm/loupe@3.1.1/node_modules/loupe/lib/array.qwik.mjs +17 -0
  44. package/lib/node_modules/.pnpm/loupe@3.1.1/node_modules/loupe/lib/bigint.qwik.cjs +9 -0
  45. package/lib/node_modules/.pnpm/loupe@3.1.1/node_modules/loupe/lib/bigint.qwik.mjs +10 -0
  46. package/lib/node_modules/.pnpm/loupe@3.1.1/node_modules/loupe/lib/class.qwik.cjs +16 -0
  47. package/lib/node_modules/.pnpm/loupe@3.1.1/node_modules/loupe/lib/class.qwik.mjs +17 -0
  48. package/lib/node_modules/.pnpm/loupe@3.1.1/node_modules/loupe/lib/date.qwik.cjs +12 -0
  49. package/lib/node_modules/.pnpm/loupe@3.1.1/node_modules/loupe/lib/date.qwik.mjs +13 -0
  50. package/lib/node_modules/.pnpm/loupe@3.1.1/node_modules/loupe/lib/error.qwik.cjs +30 -0
  51. package/lib/node_modules/.pnpm/loupe@3.1.1/node_modules/loupe/lib/error.qwik.mjs +31 -0
  52. package/lib/node_modules/.pnpm/loupe@3.1.1/node_modules/loupe/lib/function.qwik.cjs +11 -0
  53. package/lib/node_modules/.pnpm/loupe@3.1.1/node_modules/loupe/lib/function.qwik.mjs +12 -0
  54. package/lib/node_modules/.pnpm/loupe@3.1.1/node_modules/loupe/lib/helpers.qwik.cjs +160 -0
  55. package/lib/node_modules/.pnpm/loupe@3.1.1/node_modules/loupe/lib/helpers.qwik.mjs +160 -0
  56. package/lib/node_modules/.pnpm/loupe@3.1.1/node_modules/loupe/lib/html.qwik.cjs +36 -0
  57. package/lib/node_modules/.pnpm/loupe@3.1.1/node_modules/loupe/lib/html.qwik.mjs +36 -0
  58. package/lib/node_modules/.pnpm/loupe@3.1.1/node_modules/loupe/lib/index.qwik.cjs +130 -0
  59. package/lib/node_modules/.pnpm/loupe@3.1.1/node_modules/loupe/lib/index.qwik.mjs +130 -0
  60. package/lib/node_modules/.pnpm/loupe@3.1.1/node_modules/loupe/lib/map.qwik.cjs +25 -0
  61. package/lib/node_modules/.pnpm/loupe@3.1.1/node_modules/loupe/lib/map.qwik.mjs +26 -0
  62. package/lib/node_modules/.pnpm/loupe@3.1.1/node_modules/loupe/lib/number.qwik.cjs +19 -0
  63. package/lib/node_modules/.pnpm/loupe@3.1.1/node_modules/loupe/lib/number.qwik.mjs +20 -0
  64. package/lib/node_modules/.pnpm/loupe@3.1.1/node_modules/loupe/lib/object.qwik.cjs +24 -0
  65. package/lib/node_modules/.pnpm/loupe@3.1.1/node_modules/loupe/lib/object.qwik.mjs +25 -0
  66. package/lib/node_modules/.pnpm/loupe@3.1.1/node_modules/loupe/lib/promise.qwik.cjs +17 -0
  67. package/lib/node_modules/.pnpm/loupe@3.1.1/node_modules/loupe/lib/promise.qwik.mjs +18 -0
  68. package/lib/node_modules/.pnpm/loupe@3.1.1/node_modules/loupe/lib/regexp.qwik.cjs +9 -0
  69. package/lib/node_modules/.pnpm/loupe@3.1.1/node_modules/loupe/lib/regexp.qwik.mjs +10 -0
  70. package/lib/node_modules/.pnpm/loupe@3.1.1/node_modules/loupe/lib/set.qwik.cjs +16 -0
  71. package/lib/node_modules/.pnpm/loupe@3.1.1/node_modules/loupe/lib/set.qwik.mjs +17 -0
  72. package/lib/node_modules/.pnpm/loupe@3.1.1/node_modules/loupe/lib/string.qwik.cjs +24 -0
  73. package/lib/node_modules/.pnpm/loupe@3.1.1/node_modules/loupe/lib/string.qwik.mjs +25 -0
  74. package/lib/node_modules/.pnpm/loupe@3.1.1/node_modules/loupe/lib/symbol.qwik.cjs +8 -0
  75. package/lib/node_modules/.pnpm/loupe@3.1.1/node_modules/loupe/lib/symbol.qwik.mjs +9 -0
  76. package/lib/node_modules/.pnpm/loupe@3.1.1/node_modules/loupe/lib/typedarray.qwik.cjs +34 -0
  77. package/lib/node_modules/.pnpm/loupe@3.1.1/node_modules/loupe/lib/typedarray.qwik.mjs +35 -0
  78. package/lib/node_modules/.pnpm/magic-string@0.30.11/node_modules/magic-string/dist/magic-string.es.qwik.cjs +968 -0
  79. package/lib/node_modules/.pnpm/magic-string@0.30.11/node_modules/magic-string/dist/magic-string.es.qwik.mjs +968 -0
  80. package/lib/node_modules/.pnpm/pathe@1.1.2/node_modules/pathe/dist/shared/pathe.ff20891b.qwik.cjs +101 -0
  81. package/lib/node_modules/.pnpm/pathe@1.1.2/node_modules/pathe/dist/shared/pathe.ff20891b.qwik.mjs +101 -0
  82. package/lib/node_modules/.pnpm/tinyrainbow@1.2.0/node_modules/tinyrainbow/dist/browser.qwik.cjs +7 -0
  83. package/lib/node_modules/.pnpm/tinyrainbow@1.2.0/node_modules/tinyrainbow/dist/browser.qwik.mjs +8 -0
  84. package/lib/node_modules/.pnpm/tinyrainbow@1.2.0/node_modules/tinyrainbow/dist/chunk-BVHSVHOK.qwik.cjs +80 -0
  85. package/lib/node_modules/.pnpm/tinyrainbow@1.2.0/node_modules/tinyrainbow/dist/chunk-BVHSVHOK.qwik.mjs +80 -0
  86. package/lib/node_modules/.pnpm/tinyspy@3.0.2/node_modules/tinyspy/dist/index.qwik.cjs +104 -0
  87. package/lib/node_modules/.pnpm/tinyspy@3.0.2/node_modules/tinyspy/dist/index.qwik.mjs +104 -0
  88. package/lib/node_modules/.pnpm/vitest@2.1.1_@types_node@22.7.4_@vitest_ui@2.1.1_jsdom@25.0.1/node_modules/vitest/dist/chunks/_commonjsHelpers.BFTU3MAI.qwik.cjs +8 -0
  89. package/lib/node_modules/.pnpm/vitest@2.1.1_@types_node@22.7.4_@vitest_ui@2.1.1_jsdom@25.0.1/node_modules/vitest/dist/chunks/_commonjsHelpers.BFTU3MAI.qwik.mjs +8 -0
  90. package/lib/node_modules/.pnpm/vitest@2.1.1_@types_node@22.7.4_@vitest_ui@2.1.1_jsdom@25.0.1/node_modules/vitest/dist/chunks/base.BlXpj3e_.qwik.cjs +6 -0
  91. package/lib/node_modules/.pnpm/vitest@2.1.1_@types_node@22.7.4_@vitest_ui@2.1.1_jsdom@25.0.1/node_modules/vitest/dist/chunks/base.BlXpj3e_.qwik.mjs +6 -0
  92. package/lib/node_modules/.pnpm/vitest@2.1.1_@types_node@22.7.4_@vitest_ui@2.1.1_jsdom@25.0.1/node_modules/vitest/dist/chunks/date.W2xKR2qe.qwik.cjs +56 -0
  93. package/lib/node_modules/.pnpm/vitest@2.1.1_@types_node@22.7.4_@vitest_ui@2.1.1_jsdom@25.0.1/node_modules/vitest/dist/chunks/date.W2xKR2qe.qwik.mjs +56 -0
  94. package/lib/node_modules/.pnpm/vitest@2.1.1_@types_node@22.7.4_@vitest_ui@2.1.1_jsdom@25.0.1/node_modules/vitest/dist/chunks/utils.Ck2hJTRs.qwik.cjs +16 -0
  95. package/lib/node_modules/.pnpm/vitest@2.1.1_@types_node@22.7.4_@vitest_ui@2.1.1_jsdom@25.0.1/node_modules/vitest/dist/chunks/utils.Ck2hJTRs.qwik.mjs +16 -0
  96. package/lib/node_modules/.pnpm/vitest@2.1.1_@types_node@22.7.4_@vitest_ui@2.1.1_jsdom@25.0.1/node_modules/vitest/dist/chunks/vi.D6IHiKAI.qwik.cjs +2556 -0
  97. package/lib/node_modules/.pnpm/vitest@2.1.1_@types_node@22.7.4_@vitest_ui@2.1.1_jsdom@25.0.1/node_modules/vitest/dist/chunks/vi.D6IHiKAI.qwik.mjs +2556 -0
  98. package/lib-types/lib/mock.d.ts +34 -0
  99. package/lib-types/lib/qwik-testing-library.d.ts +2 -1
  100. package/package.json +5 -4
@@ -0,0 +1,1202 @@
1
+ import f from "../../../../../tinyrainbow@1.2.0/node_modules/tinyrainbow/dist/browser.qwik.mjs";
2
+ function getKeysOfEnumerableProperties(object, compareKeys) {
3
+ const rawKeys = Object.keys(object);
4
+ const keys = compareKeys === null ? rawKeys : rawKeys.sort(compareKeys);
5
+ if (Object.getOwnPropertySymbols) {
6
+ for (const symbol of Object.getOwnPropertySymbols(object)) {
7
+ if (Object.getOwnPropertyDescriptor(object, symbol).enumerable) {
8
+ keys.push(symbol);
9
+ }
10
+ }
11
+ }
12
+ return keys;
13
+ }
14
+ function printIteratorEntries(iterator, config, indentation, depth, refs, printer2, separator = ": ") {
15
+ let result = "";
16
+ let width = 0;
17
+ let current = iterator.next();
18
+ if (!current.done) {
19
+ result += config.spacingOuter;
20
+ const indentationNext = indentation + config.indent;
21
+ while (!current.done) {
22
+ result += indentationNext;
23
+ if (width++ === config.maxWidth) {
24
+ result += "…";
25
+ break;
26
+ }
27
+ const name = printer2(
28
+ current.value[0],
29
+ config,
30
+ indentationNext,
31
+ depth,
32
+ refs
33
+ );
34
+ const value = printer2(
35
+ current.value[1],
36
+ config,
37
+ indentationNext,
38
+ depth,
39
+ refs
40
+ );
41
+ result += name + separator + value;
42
+ current = iterator.next();
43
+ if (!current.done) {
44
+ result += `,${config.spacingInner}`;
45
+ } else if (!config.min) {
46
+ result += ",";
47
+ }
48
+ }
49
+ result += config.spacingOuter + indentation;
50
+ }
51
+ return result;
52
+ }
53
+ function printIteratorValues(iterator, config, indentation, depth, refs, printer2) {
54
+ let result = "";
55
+ let width = 0;
56
+ let current = iterator.next();
57
+ if (!current.done) {
58
+ result += config.spacingOuter;
59
+ const indentationNext = indentation + config.indent;
60
+ while (!current.done) {
61
+ result += indentationNext;
62
+ if (width++ === config.maxWidth) {
63
+ result += "…";
64
+ break;
65
+ }
66
+ result += printer2(current.value, config, indentationNext, depth, refs);
67
+ current = iterator.next();
68
+ if (!current.done) {
69
+ result += `,${config.spacingInner}`;
70
+ } else if (!config.min) {
71
+ result += ",";
72
+ }
73
+ }
74
+ result += config.spacingOuter + indentation;
75
+ }
76
+ return result;
77
+ }
78
+ function printListItems(list, config, indentation, depth, refs, printer2) {
79
+ let result = "";
80
+ list = list instanceof ArrayBuffer ? new DataView(list) : list;
81
+ const isDataView = (l) => l instanceof DataView;
82
+ const length = isDataView(list) ? list.byteLength : list.length;
83
+ if (length > 0) {
84
+ result += config.spacingOuter;
85
+ const indentationNext = indentation + config.indent;
86
+ for (let i = 0; i < length; i++) {
87
+ result += indentationNext;
88
+ if (i === config.maxWidth) {
89
+ result += "…";
90
+ break;
91
+ }
92
+ if (isDataView(list) || i in list) {
93
+ result += printer2(
94
+ isDataView(list) ? list.getInt8(i) : list[i],
95
+ config,
96
+ indentationNext,
97
+ depth,
98
+ refs
99
+ );
100
+ }
101
+ if (i < length - 1) {
102
+ result += `,${config.spacingInner}`;
103
+ } else if (!config.min) {
104
+ result += ",";
105
+ }
106
+ }
107
+ result += config.spacingOuter + indentation;
108
+ }
109
+ return result;
110
+ }
111
+ function printObjectProperties(val, config, indentation, depth, refs, printer2) {
112
+ let result = "";
113
+ const keys = getKeysOfEnumerableProperties(val, config.compareKeys);
114
+ if (keys.length > 0) {
115
+ result += config.spacingOuter;
116
+ const indentationNext = indentation + config.indent;
117
+ for (let i = 0; i < keys.length; i++) {
118
+ const key = keys[i];
119
+ const name = printer2(key, config, indentationNext, depth, refs);
120
+ const value = printer2(val[key], config, indentationNext, depth, refs);
121
+ result += `${indentationNext + name}: ${value}`;
122
+ if (i < keys.length - 1) {
123
+ result += `,${config.spacingInner}`;
124
+ } else if (!config.min) {
125
+ result += ",";
126
+ }
127
+ }
128
+ result += config.spacingOuter + indentation;
129
+ }
130
+ return result;
131
+ }
132
+ const asymmetricMatcher = typeof Symbol === "function" && Symbol.for ? Symbol.for("jest.asymmetricMatcher") : 1267621;
133
+ const SPACE$2 = " ";
134
+ const serialize$5 = (val, config, indentation, depth, refs, printer2) => {
135
+ const stringedValue = val.toString();
136
+ if (stringedValue === "ArrayContaining" || stringedValue === "ArrayNotContaining") {
137
+ if (++depth > config.maxDepth) {
138
+ return `[${stringedValue}]`;
139
+ }
140
+ return `${stringedValue + SPACE$2}[${printListItems(
141
+ val.sample,
142
+ config,
143
+ indentation,
144
+ depth,
145
+ refs,
146
+ printer2
147
+ )}]`;
148
+ }
149
+ if (stringedValue === "ObjectContaining" || stringedValue === "ObjectNotContaining") {
150
+ if (++depth > config.maxDepth) {
151
+ return `[${stringedValue}]`;
152
+ }
153
+ return `${stringedValue + SPACE$2}{${printObjectProperties(
154
+ val.sample,
155
+ config,
156
+ indentation,
157
+ depth,
158
+ refs,
159
+ printer2
160
+ )}}`;
161
+ }
162
+ if (stringedValue === "StringMatching" || stringedValue === "StringNotMatching") {
163
+ return stringedValue + SPACE$2 + printer2(val.sample, config, indentation, depth, refs);
164
+ }
165
+ if (stringedValue === "StringContaining" || stringedValue === "StringNotContaining") {
166
+ return stringedValue + SPACE$2 + printer2(val.sample, config, indentation, depth, refs);
167
+ }
168
+ if (typeof val.toAsymmetricMatcher !== "function") {
169
+ throw new TypeError(
170
+ `Asymmetric matcher ${val.constructor.name} does not implement toAsymmetricMatcher()`
171
+ );
172
+ }
173
+ return val.toAsymmetricMatcher();
174
+ };
175
+ const test$5 = (val) => val && val.$$typeof === asymmetricMatcher;
176
+ const plugin$5 = { serialize: serialize$5, test: test$5 };
177
+ const SPACE$1 = " ";
178
+ const OBJECT_NAMES = /* @__PURE__ */ new Set(["DOMStringMap", "NamedNodeMap"]);
179
+ const ARRAY_REGEXP = /^(?:HTML\w*Collection|NodeList)$/;
180
+ function testName(name) {
181
+ return OBJECT_NAMES.has(name) || ARRAY_REGEXP.test(name);
182
+ }
183
+ const test$4 = (val) => val && val.constructor && !!val.constructor.name && testName(val.constructor.name);
184
+ function isNamedNodeMap(collection) {
185
+ return collection.constructor.name === "NamedNodeMap";
186
+ }
187
+ const serialize$4 = (collection, config, indentation, depth, refs, printer2) => {
188
+ const name = collection.constructor.name;
189
+ if (++depth > config.maxDepth) {
190
+ return `[${name}]`;
191
+ }
192
+ return (config.min ? "" : name + SPACE$1) + (OBJECT_NAMES.has(name) ? `{${printObjectProperties(
193
+ isNamedNodeMap(collection) ? [...collection].reduce(
194
+ (props, attribute) => {
195
+ props[attribute.name] = attribute.value;
196
+ return props;
197
+ },
198
+ {}
199
+ ) : { ...collection },
200
+ config,
201
+ indentation,
202
+ depth,
203
+ refs,
204
+ printer2
205
+ )}}` : `[${printListItems(
206
+ [...collection],
207
+ config,
208
+ indentation,
209
+ depth,
210
+ refs,
211
+ printer2
212
+ )}]`);
213
+ };
214
+ const plugin$4 = { serialize: serialize$4, test: test$4 };
215
+ function escapeHTML(str) {
216
+ return str.replaceAll("<", "&lt;").replaceAll(">", "&gt;");
217
+ }
218
+ function printProps(keys, props, config, indentation, depth, refs, printer2) {
219
+ const indentationNext = indentation + config.indent;
220
+ const colors = config.colors;
221
+ return keys.map((key) => {
222
+ const value = props[key];
223
+ let printed = printer2(value, config, indentationNext, depth, refs);
224
+ if (typeof value !== "string") {
225
+ if (printed.includes("\n")) {
226
+ printed = config.spacingOuter + indentationNext + printed + config.spacingOuter + indentation;
227
+ }
228
+ printed = `{${printed}}`;
229
+ }
230
+ return `${config.spacingInner + indentation + colors.prop.open + key + colors.prop.close}=${colors.value.open}${printed}${colors.value.close}`;
231
+ }).join("");
232
+ }
233
+ function printChildren(children, config, indentation, depth, refs, printer2) {
234
+ return children.map(
235
+ (child) => config.spacingOuter + indentation + (typeof child === "string" ? printText(child, config) : printer2(child, config, indentation, depth, refs))
236
+ ).join("");
237
+ }
238
+ function printText(text, config) {
239
+ const contentColor = config.colors.content;
240
+ return contentColor.open + escapeHTML(text) + contentColor.close;
241
+ }
242
+ function printComment(comment, config) {
243
+ const commentColor = config.colors.comment;
244
+ return `${commentColor.open}<!--${escapeHTML(comment)}-->${commentColor.close}`;
245
+ }
246
+ function printElement(type, printedProps, printedChildren, config, indentation) {
247
+ const tagColor = config.colors.tag;
248
+ return `${tagColor.open}<${type}${printedProps && tagColor.close + printedProps + config.spacingOuter + indentation + tagColor.open}${printedChildren ? `>${tagColor.close}${printedChildren}${config.spacingOuter}${indentation}${tagColor.open}</${type}` : `${printedProps && !config.min ? "" : " "}/`}>${tagColor.close}`;
249
+ }
250
+ function printElementAsLeaf(type, config) {
251
+ const tagColor = config.colors.tag;
252
+ return `${tagColor.open}<${type}${tagColor.close} …${tagColor.open} />${tagColor.close}`;
253
+ }
254
+ const ELEMENT_NODE = 1;
255
+ const TEXT_NODE = 3;
256
+ const COMMENT_NODE = 8;
257
+ const FRAGMENT_NODE = 11;
258
+ const ELEMENT_REGEXP = /^(?:(?:HTML|SVG)\w*)?Element$/;
259
+ function testHasAttribute(val) {
260
+ try {
261
+ return typeof val.hasAttribute === "function" && val.hasAttribute("is");
262
+ } catch {
263
+ return false;
264
+ }
265
+ }
266
+ function testNode(val) {
267
+ const constructorName = val.constructor.name;
268
+ const { nodeType, tagName } = val;
269
+ const isCustomElement = typeof tagName === "string" && tagName.includes("-") || testHasAttribute(val);
270
+ return nodeType === ELEMENT_NODE && (ELEMENT_REGEXP.test(constructorName) || isCustomElement) || nodeType === TEXT_NODE && constructorName === "Text" || nodeType === COMMENT_NODE && constructorName === "Comment" || nodeType === FRAGMENT_NODE && constructorName === "DocumentFragment";
271
+ }
272
+ const test$3 = (val) => {
273
+ var _a;
274
+ return ((_a = val == null ? void 0 : val.constructor) == null ? void 0 : _a.name) && testNode(val);
275
+ };
276
+ function nodeIsText(node) {
277
+ return node.nodeType === TEXT_NODE;
278
+ }
279
+ function nodeIsComment(node) {
280
+ return node.nodeType === COMMENT_NODE;
281
+ }
282
+ function nodeIsFragment(node) {
283
+ return node.nodeType === FRAGMENT_NODE;
284
+ }
285
+ const serialize$3 = (node, config, indentation, depth, refs, printer2) => {
286
+ if (nodeIsText(node)) {
287
+ return printText(node.data, config);
288
+ }
289
+ if (nodeIsComment(node)) {
290
+ return printComment(node.data, config);
291
+ }
292
+ const type = nodeIsFragment(node) ? "DocumentFragment" : node.tagName.toLowerCase();
293
+ if (++depth > config.maxDepth) {
294
+ return printElementAsLeaf(type, config);
295
+ }
296
+ return printElement(
297
+ type,
298
+ printProps(
299
+ nodeIsFragment(node) ? [] : Array.from(node.attributes, (attr) => attr.name).sort(),
300
+ nodeIsFragment(node) ? {} : [...node.attributes].reduce(
301
+ (props, attribute) => {
302
+ props[attribute.name] = attribute.value;
303
+ return props;
304
+ },
305
+ {}
306
+ ),
307
+ config,
308
+ indentation + config.indent,
309
+ depth,
310
+ refs,
311
+ printer2
312
+ ),
313
+ printChildren(
314
+ Array.prototype.slice.call(node.childNodes || node.children),
315
+ config,
316
+ indentation + config.indent,
317
+ depth,
318
+ refs,
319
+ printer2
320
+ ),
321
+ config,
322
+ indentation
323
+ );
324
+ };
325
+ const plugin$3 = { serialize: serialize$3, test: test$3 };
326
+ const IS_ITERABLE_SENTINEL = "@@__IMMUTABLE_ITERABLE__@@";
327
+ const IS_LIST_SENTINEL = "@@__IMMUTABLE_LIST__@@";
328
+ const IS_KEYED_SENTINEL = "@@__IMMUTABLE_KEYED__@@";
329
+ const IS_MAP_SENTINEL = "@@__IMMUTABLE_MAP__@@";
330
+ const IS_ORDERED_SENTINEL = "@@__IMMUTABLE_ORDERED__@@";
331
+ const IS_RECORD_SENTINEL = "@@__IMMUTABLE_RECORD__@@";
332
+ const IS_SEQ_SENTINEL = "@@__IMMUTABLE_SEQ__@@";
333
+ const IS_SET_SENTINEL = "@@__IMMUTABLE_SET__@@";
334
+ const IS_STACK_SENTINEL = "@@__IMMUTABLE_STACK__@@";
335
+ const getImmutableName = (name) => `Immutable.${name}`;
336
+ const printAsLeaf = (name) => `[${name}]`;
337
+ const SPACE = " ";
338
+ const LAZY = "…";
339
+ function printImmutableEntries(val, config, indentation, depth, refs, printer2, type) {
340
+ return ++depth > config.maxDepth ? printAsLeaf(getImmutableName(type)) : `${getImmutableName(type) + SPACE}{${printIteratorEntries(
341
+ val.entries(),
342
+ config,
343
+ indentation,
344
+ depth,
345
+ refs,
346
+ printer2
347
+ )}}`;
348
+ }
349
+ function getRecordEntries(val) {
350
+ let i = 0;
351
+ return {
352
+ next() {
353
+ if (i < val._keys.length) {
354
+ const key = val._keys[i++];
355
+ return { done: false, value: [key, val.get(key)] };
356
+ }
357
+ return { done: true, value: void 0 };
358
+ }
359
+ };
360
+ }
361
+ function printImmutableRecord(val, config, indentation, depth, refs, printer2) {
362
+ const name = getImmutableName(val._name || "Record");
363
+ return ++depth > config.maxDepth ? printAsLeaf(name) : `${name + SPACE}{${printIteratorEntries(
364
+ getRecordEntries(val),
365
+ config,
366
+ indentation,
367
+ depth,
368
+ refs,
369
+ printer2
370
+ )}}`;
371
+ }
372
+ function printImmutableSeq(val, config, indentation, depth, refs, printer2) {
373
+ const name = getImmutableName("Seq");
374
+ if (++depth > config.maxDepth) {
375
+ return printAsLeaf(name);
376
+ }
377
+ if (val[IS_KEYED_SENTINEL]) {
378
+ return `${name + SPACE}{${// from Immutable collection of entries or from ECMAScript object
379
+ val._iter || val._object ? printIteratorEntries(
380
+ val.entries(),
381
+ config,
382
+ indentation,
383
+ depth,
384
+ refs,
385
+ printer2
386
+ ) : LAZY}}`;
387
+ }
388
+ return `${name + SPACE}[${val._iter || val._array || val._collection || val._iterable ? printIteratorValues(
389
+ val.values(),
390
+ config,
391
+ indentation,
392
+ depth,
393
+ refs,
394
+ printer2
395
+ ) : LAZY}]`;
396
+ }
397
+ function printImmutableValues(val, config, indentation, depth, refs, printer2, type) {
398
+ return ++depth > config.maxDepth ? printAsLeaf(getImmutableName(type)) : `${getImmutableName(type) + SPACE}[${printIteratorValues(
399
+ val.values(),
400
+ config,
401
+ indentation,
402
+ depth,
403
+ refs,
404
+ printer2
405
+ )}]`;
406
+ }
407
+ const serialize$2 = (val, config, indentation, depth, refs, printer2) => {
408
+ if (val[IS_MAP_SENTINEL]) {
409
+ return printImmutableEntries(
410
+ val,
411
+ config,
412
+ indentation,
413
+ depth,
414
+ refs,
415
+ printer2,
416
+ val[IS_ORDERED_SENTINEL] ? "OrderedMap" : "Map"
417
+ );
418
+ }
419
+ if (val[IS_LIST_SENTINEL]) {
420
+ return printImmutableValues(
421
+ val,
422
+ config,
423
+ indentation,
424
+ depth,
425
+ refs,
426
+ printer2,
427
+ "List"
428
+ );
429
+ }
430
+ if (val[IS_SET_SENTINEL]) {
431
+ return printImmutableValues(
432
+ val,
433
+ config,
434
+ indentation,
435
+ depth,
436
+ refs,
437
+ printer2,
438
+ val[IS_ORDERED_SENTINEL] ? "OrderedSet" : "Set"
439
+ );
440
+ }
441
+ if (val[IS_STACK_SENTINEL]) {
442
+ return printImmutableValues(
443
+ val,
444
+ config,
445
+ indentation,
446
+ depth,
447
+ refs,
448
+ printer2,
449
+ "Stack"
450
+ );
451
+ }
452
+ if (val[IS_SEQ_SENTINEL]) {
453
+ return printImmutableSeq(val, config, indentation, depth, refs, printer2);
454
+ }
455
+ return printImmutableRecord(val, config, indentation, depth, refs, printer2);
456
+ };
457
+ const test$2 = (val) => val && (val[IS_ITERABLE_SENTINEL] === true || val[IS_RECORD_SENTINEL] === true);
458
+ const plugin$2 = { serialize: serialize$2, test: test$2 };
459
+ var reactIs = { exports: {} };
460
+ var reactIs_production_min = {};
461
+ /**
462
+ * @license React
463
+ * react-is.production.min.js
464
+ *
465
+ * Copyright (c) Facebook, Inc. and its affiliates.
466
+ *
467
+ * This source code is licensed under the MIT license found in the
468
+ * LICENSE file in the root directory of this source tree.
469
+ */
470
+ var hasRequiredReactIs_production_min;
471
+ function requireReactIs_production_min() {
472
+ if (hasRequiredReactIs_production_min) return reactIs_production_min;
473
+ hasRequiredReactIs_production_min = 1;
474
+ var b = Symbol.for("react.element"), c = Symbol.for("react.portal"), d = Symbol.for("react.fragment"), e = Symbol.for("react.strict_mode"), f2 = Symbol.for("react.profiler"), g = Symbol.for("react.provider"), h = Symbol.for("react.context"), k = Symbol.for("react.server_context"), l = Symbol.for("react.forward_ref"), m = Symbol.for("react.suspense"), n = Symbol.for("react.suspense_list"), p = Symbol.for("react.memo"), q = Symbol.for("react.lazy"), t = Symbol.for("react.offscreen"), u;
475
+ u = Symbol.for("react.module.reference");
476
+ function v(a) {
477
+ if ("object" === typeof a && null !== a) {
478
+ var r = a.$$typeof;
479
+ switch (r) {
480
+ case b:
481
+ switch (a = a.type, a) {
482
+ case d:
483
+ case f2:
484
+ case e:
485
+ case m:
486
+ case n:
487
+ return a;
488
+ default:
489
+ switch (a = a && a.$$typeof, a) {
490
+ case k:
491
+ case h:
492
+ case l:
493
+ case q:
494
+ case p:
495
+ case g:
496
+ return a;
497
+ default:
498
+ return r;
499
+ }
500
+ }
501
+ case c:
502
+ return r;
503
+ }
504
+ }
505
+ }
506
+ reactIs_production_min.ContextConsumer = h;
507
+ reactIs_production_min.ContextProvider = g;
508
+ reactIs_production_min.Element = b;
509
+ reactIs_production_min.ForwardRef = l;
510
+ reactIs_production_min.Fragment = d;
511
+ reactIs_production_min.Lazy = q;
512
+ reactIs_production_min.Memo = p;
513
+ reactIs_production_min.Portal = c;
514
+ reactIs_production_min.Profiler = f2;
515
+ reactIs_production_min.StrictMode = e;
516
+ reactIs_production_min.Suspense = m;
517
+ reactIs_production_min.SuspenseList = n;
518
+ reactIs_production_min.isAsyncMode = function() {
519
+ return false;
520
+ };
521
+ reactIs_production_min.isConcurrentMode = function() {
522
+ return false;
523
+ };
524
+ reactIs_production_min.isContextConsumer = function(a) {
525
+ return v(a) === h;
526
+ };
527
+ reactIs_production_min.isContextProvider = function(a) {
528
+ return v(a) === g;
529
+ };
530
+ reactIs_production_min.isElement = function(a) {
531
+ return "object" === typeof a && null !== a && a.$$typeof === b;
532
+ };
533
+ reactIs_production_min.isForwardRef = function(a) {
534
+ return v(a) === l;
535
+ };
536
+ reactIs_production_min.isFragment = function(a) {
537
+ return v(a) === d;
538
+ };
539
+ reactIs_production_min.isLazy = function(a) {
540
+ return v(a) === q;
541
+ };
542
+ reactIs_production_min.isMemo = function(a) {
543
+ return v(a) === p;
544
+ };
545
+ reactIs_production_min.isPortal = function(a) {
546
+ return v(a) === c;
547
+ };
548
+ reactIs_production_min.isProfiler = function(a) {
549
+ return v(a) === f2;
550
+ };
551
+ reactIs_production_min.isStrictMode = function(a) {
552
+ return v(a) === e;
553
+ };
554
+ reactIs_production_min.isSuspense = function(a) {
555
+ return v(a) === m;
556
+ };
557
+ reactIs_production_min.isSuspenseList = function(a) {
558
+ return v(a) === n;
559
+ };
560
+ reactIs_production_min.isValidElementType = function(a) {
561
+ return "string" === typeof a || "function" === typeof a || a === d || a === f2 || a === e || a === m || a === n || a === t || "object" === typeof a && null !== a && (a.$$typeof === q || a.$$typeof === p || a.$$typeof === g || a.$$typeof === h || a.$$typeof === l || a.$$typeof === u || void 0 !== a.getModuleId) ? true : false;
562
+ };
563
+ reactIs_production_min.typeOf = v;
564
+ return reactIs_production_min;
565
+ }
566
+ var reactIs_development = {};
567
+ /**
568
+ * @license React
569
+ * react-is.development.js
570
+ *
571
+ * Copyright (c) Facebook, Inc. and its affiliates.
572
+ *
573
+ * This source code is licensed under the MIT license found in the
574
+ * LICENSE file in the root directory of this source tree.
575
+ */
576
+ var hasRequiredReactIs_development;
577
+ function requireReactIs_development() {
578
+ if (hasRequiredReactIs_development) return reactIs_development;
579
+ hasRequiredReactIs_development = 1;
580
+ if (process.env.NODE_ENV !== "production") {
581
+ (function() {
582
+ var REACT_ELEMENT_TYPE = Symbol.for("react.element");
583
+ var REACT_PORTAL_TYPE = Symbol.for("react.portal");
584
+ var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
585
+ var REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode");
586
+ var REACT_PROFILER_TYPE = Symbol.for("react.profiler");
587
+ var REACT_PROVIDER_TYPE = Symbol.for("react.provider");
588
+ var REACT_CONTEXT_TYPE = Symbol.for("react.context");
589
+ var REACT_SERVER_CONTEXT_TYPE = Symbol.for("react.server_context");
590
+ var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref");
591
+ var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense");
592
+ var REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list");
593
+ var REACT_MEMO_TYPE = Symbol.for("react.memo");
594
+ var REACT_LAZY_TYPE = Symbol.for("react.lazy");
595
+ var REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen");
596
+ var enableScopeAPI = false;
597
+ var enableCacheElement = false;
598
+ var enableTransitionTracing = false;
599
+ var enableLegacyHidden = false;
600
+ var enableDebugTracing = false;
601
+ var REACT_MODULE_REFERENCE;
602
+ {
603
+ REACT_MODULE_REFERENCE = Symbol.for("react.module.reference");
604
+ }
605
+ function isValidElementType(type) {
606
+ if (typeof type === "string" || typeof type === "function") {
607
+ return true;
608
+ }
609
+ if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing) {
610
+ return true;
611
+ }
612
+ if (typeof type === "object" && type !== null) {
613
+ if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object
614
+ // types supported by any Flight configuration anywhere since
615
+ // we don't know which Flight build this will end up being used
616
+ // with.
617
+ type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== void 0) {
618
+ return true;
619
+ }
620
+ }
621
+ return false;
622
+ }
623
+ function typeOf(object) {
624
+ if (typeof object === "object" && object !== null) {
625
+ var $$typeof = object.$$typeof;
626
+ switch ($$typeof) {
627
+ case REACT_ELEMENT_TYPE:
628
+ var type = object.type;
629
+ switch (type) {
630
+ case REACT_FRAGMENT_TYPE:
631
+ case REACT_PROFILER_TYPE:
632
+ case REACT_STRICT_MODE_TYPE:
633
+ case REACT_SUSPENSE_TYPE:
634
+ case REACT_SUSPENSE_LIST_TYPE:
635
+ return type;
636
+ default:
637
+ var $$typeofType = type && type.$$typeof;
638
+ switch ($$typeofType) {
639
+ case REACT_SERVER_CONTEXT_TYPE:
640
+ case REACT_CONTEXT_TYPE:
641
+ case REACT_FORWARD_REF_TYPE:
642
+ case REACT_LAZY_TYPE:
643
+ case REACT_MEMO_TYPE:
644
+ case REACT_PROVIDER_TYPE:
645
+ return $$typeofType;
646
+ default:
647
+ return $$typeof;
648
+ }
649
+ }
650
+ case REACT_PORTAL_TYPE:
651
+ return $$typeof;
652
+ }
653
+ }
654
+ return void 0;
655
+ }
656
+ var ContextConsumer = REACT_CONTEXT_TYPE;
657
+ var ContextProvider = REACT_PROVIDER_TYPE;
658
+ var Element = REACT_ELEMENT_TYPE;
659
+ var ForwardRef = REACT_FORWARD_REF_TYPE;
660
+ var Fragment = REACT_FRAGMENT_TYPE;
661
+ var Lazy = REACT_LAZY_TYPE;
662
+ var Memo = REACT_MEMO_TYPE;
663
+ var Portal = REACT_PORTAL_TYPE;
664
+ var Profiler = REACT_PROFILER_TYPE;
665
+ var StrictMode = REACT_STRICT_MODE_TYPE;
666
+ var Suspense = REACT_SUSPENSE_TYPE;
667
+ var SuspenseList = REACT_SUSPENSE_LIST_TYPE;
668
+ var hasWarnedAboutDeprecatedIsAsyncMode = false;
669
+ var hasWarnedAboutDeprecatedIsConcurrentMode = false;
670
+ function isAsyncMode(object) {
671
+ {
672
+ if (!hasWarnedAboutDeprecatedIsAsyncMode) {
673
+ hasWarnedAboutDeprecatedIsAsyncMode = true;
674
+ console["warn"]("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.");
675
+ }
676
+ }
677
+ return false;
678
+ }
679
+ function isConcurrentMode(object) {
680
+ {
681
+ if (!hasWarnedAboutDeprecatedIsConcurrentMode) {
682
+ hasWarnedAboutDeprecatedIsConcurrentMode = true;
683
+ console["warn"]("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.");
684
+ }
685
+ }
686
+ return false;
687
+ }
688
+ function isContextConsumer(object) {
689
+ return typeOf(object) === REACT_CONTEXT_TYPE;
690
+ }
691
+ function isContextProvider(object) {
692
+ return typeOf(object) === REACT_PROVIDER_TYPE;
693
+ }
694
+ function isElement(object) {
695
+ return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
696
+ }
697
+ function isForwardRef(object) {
698
+ return typeOf(object) === REACT_FORWARD_REF_TYPE;
699
+ }
700
+ function isFragment(object) {
701
+ return typeOf(object) === REACT_FRAGMENT_TYPE;
702
+ }
703
+ function isLazy(object) {
704
+ return typeOf(object) === REACT_LAZY_TYPE;
705
+ }
706
+ function isMemo(object) {
707
+ return typeOf(object) === REACT_MEMO_TYPE;
708
+ }
709
+ function isPortal(object) {
710
+ return typeOf(object) === REACT_PORTAL_TYPE;
711
+ }
712
+ function isProfiler(object) {
713
+ return typeOf(object) === REACT_PROFILER_TYPE;
714
+ }
715
+ function isStrictMode(object) {
716
+ return typeOf(object) === REACT_STRICT_MODE_TYPE;
717
+ }
718
+ function isSuspense(object) {
719
+ return typeOf(object) === REACT_SUSPENSE_TYPE;
720
+ }
721
+ function isSuspenseList(object) {
722
+ return typeOf(object) === REACT_SUSPENSE_LIST_TYPE;
723
+ }
724
+ reactIs_development.ContextConsumer = ContextConsumer;
725
+ reactIs_development.ContextProvider = ContextProvider;
726
+ reactIs_development.Element = Element;
727
+ reactIs_development.ForwardRef = ForwardRef;
728
+ reactIs_development.Fragment = Fragment;
729
+ reactIs_development.Lazy = Lazy;
730
+ reactIs_development.Memo = Memo;
731
+ reactIs_development.Portal = Portal;
732
+ reactIs_development.Profiler = Profiler;
733
+ reactIs_development.StrictMode = StrictMode;
734
+ reactIs_development.Suspense = Suspense;
735
+ reactIs_development.SuspenseList = SuspenseList;
736
+ reactIs_development.isAsyncMode = isAsyncMode;
737
+ reactIs_development.isConcurrentMode = isConcurrentMode;
738
+ reactIs_development.isContextConsumer = isContextConsumer;
739
+ reactIs_development.isContextProvider = isContextProvider;
740
+ reactIs_development.isElement = isElement;
741
+ reactIs_development.isForwardRef = isForwardRef;
742
+ reactIs_development.isFragment = isFragment;
743
+ reactIs_development.isLazy = isLazy;
744
+ reactIs_development.isMemo = isMemo;
745
+ reactIs_development.isPortal = isPortal;
746
+ reactIs_development.isProfiler = isProfiler;
747
+ reactIs_development.isStrictMode = isStrictMode;
748
+ reactIs_development.isSuspense = isSuspense;
749
+ reactIs_development.isSuspenseList = isSuspenseList;
750
+ reactIs_development.isValidElementType = isValidElementType;
751
+ reactIs_development.typeOf = typeOf;
752
+ })();
753
+ }
754
+ return reactIs_development;
755
+ }
756
+ if (process.env.NODE_ENV === "production") {
757
+ reactIs.exports = requireReactIs_production_min();
758
+ } else {
759
+ reactIs.exports = requireReactIs_development();
760
+ }
761
+ var reactIsExports = reactIs.exports;
762
+ function getChildren(arg, children = []) {
763
+ if (Array.isArray(arg)) {
764
+ for (const item of arg) {
765
+ getChildren(item, children);
766
+ }
767
+ } else if (arg != null && arg !== false && arg !== "") {
768
+ children.push(arg);
769
+ }
770
+ return children;
771
+ }
772
+ function getType(element) {
773
+ const type = element.type;
774
+ if (typeof type === "string") {
775
+ return type;
776
+ }
777
+ if (typeof type === "function") {
778
+ return type.displayName || type.name || "Unknown";
779
+ }
780
+ if (reactIsExports.isFragment(element)) {
781
+ return "React.Fragment";
782
+ }
783
+ if (reactIsExports.isSuspense(element)) {
784
+ return "React.Suspense";
785
+ }
786
+ if (typeof type === "object" && type !== null) {
787
+ if (reactIsExports.isContextProvider(element)) {
788
+ return "Context.Provider";
789
+ }
790
+ if (reactIsExports.isContextConsumer(element)) {
791
+ return "Context.Consumer";
792
+ }
793
+ if (reactIsExports.isForwardRef(element)) {
794
+ if (type.displayName) {
795
+ return type.displayName;
796
+ }
797
+ const functionName = type.render.displayName || type.render.name || "";
798
+ return functionName === "" ? "ForwardRef" : `ForwardRef(${functionName})`;
799
+ }
800
+ if (reactIsExports.isMemo(element)) {
801
+ const functionName = type.displayName || type.type.displayName || type.type.name || "";
802
+ return functionName === "" ? "Memo" : `Memo(${functionName})`;
803
+ }
804
+ }
805
+ return "UNDEFINED";
806
+ }
807
+ function getPropKeys$1(element) {
808
+ const { props } = element;
809
+ return Object.keys(props).filter((key) => key !== "children" && props[key] !== void 0).sort();
810
+ }
811
+ const serialize$1 = (element, config, indentation, depth, refs, printer2) => ++depth > config.maxDepth ? printElementAsLeaf(getType(element), config) : printElement(
812
+ getType(element),
813
+ printProps(
814
+ getPropKeys$1(element),
815
+ element.props,
816
+ config,
817
+ indentation + config.indent,
818
+ depth,
819
+ refs,
820
+ printer2
821
+ ),
822
+ printChildren(
823
+ getChildren(element.props.children),
824
+ config,
825
+ indentation + config.indent,
826
+ depth,
827
+ refs,
828
+ printer2
829
+ ),
830
+ config,
831
+ indentation
832
+ );
833
+ const test$1 = (val) => val != null && reactIsExports.isElement(val);
834
+ const plugin$1 = { serialize: serialize$1, test: test$1 };
835
+ const testSymbol = typeof Symbol === "function" && Symbol.for ? Symbol.for("react.test.json") : 245830487;
836
+ function getPropKeys(object) {
837
+ const { props } = object;
838
+ return props ? Object.keys(props).filter((key) => props[key] !== void 0).sort() : [];
839
+ }
840
+ const serialize = (object, config, indentation, depth, refs, printer2) => ++depth > config.maxDepth ? printElementAsLeaf(object.type, config) : printElement(
841
+ object.type,
842
+ object.props ? printProps(
843
+ getPropKeys(object),
844
+ object.props,
845
+ config,
846
+ indentation + config.indent,
847
+ depth,
848
+ refs,
849
+ printer2
850
+ ) : "",
851
+ object.children ? printChildren(
852
+ object.children,
853
+ config,
854
+ indentation + config.indent,
855
+ depth,
856
+ refs,
857
+ printer2
858
+ ) : "",
859
+ config,
860
+ indentation
861
+ );
862
+ const test = (val) => val && val.$$typeof === testSymbol;
863
+ const plugin = { serialize, test };
864
+ const toString = Object.prototype.toString;
865
+ const toISOString = Date.prototype.toISOString;
866
+ const errorToString = Error.prototype.toString;
867
+ const regExpToString = RegExp.prototype.toString;
868
+ function getConstructorName(val) {
869
+ return typeof val.constructor === "function" && val.constructor.name || "Object";
870
+ }
871
+ function isWindow(val) {
872
+ return typeof window !== "undefined" && val === window;
873
+ }
874
+ const SYMBOL_REGEXP = /^Symbol\((.*)\)(.*)$/;
875
+ const NEWLINE_REGEXP = /\n/g;
876
+ class PrettyFormatPluginError extends Error {
877
+ constructor(message, stack) {
878
+ super(message);
879
+ this.stack = stack;
880
+ this.name = this.constructor.name;
881
+ }
882
+ }
883
+ function isToStringedArrayType(toStringed) {
884
+ return toStringed === "[object Array]" || toStringed === "[object ArrayBuffer]" || toStringed === "[object DataView]" || toStringed === "[object Float32Array]" || toStringed === "[object Float64Array]" || toStringed === "[object Int8Array]" || toStringed === "[object Int16Array]" || toStringed === "[object Int32Array]" || toStringed === "[object Uint8Array]" || toStringed === "[object Uint8ClampedArray]" || toStringed === "[object Uint16Array]" || toStringed === "[object Uint32Array]";
885
+ }
886
+ function printNumber(val) {
887
+ return Object.is(val, -0) ? "-0" : String(val);
888
+ }
889
+ function printBigInt(val) {
890
+ return String(`${val}n`);
891
+ }
892
+ function printFunction(val, printFunctionName) {
893
+ if (!printFunctionName) {
894
+ return "[Function]";
895
+ }
896
+ return `[Function ${val.name || "anonymous"}]`;
897
+ }
898
+ function printSymbol(val) {
899
+ return String(val).replace(SYMBOL_REGEXP, "Symbol($1)");
900
+ }
901
+ function printError(val) {
902
+ return `[${errorToString.call(val)}]`;
903
+ }
904
+ function printBasicValue(val, printFunctionName, escapeRegex, escapeString) {
905
+ if (val === true || val === false) {
906
+ return `${val}`;
907
+ }
908
+ if (val === void 0) {
909
+ return "undefined";
910
+ }
911
+ if (val === null) {
912
+ return "null";
913
+ }
914
+ const typeOf = typeof val;
915
+ if (typeOf === "number") {
916
+ return printNumber(val);
917
+ }
918
+ if (typeOf === "bigint") {
919
+ return printBigInt(val);
920
+ }
921
+ if (typeOf === "string") {
922
+ if (escapeString) {
923
+ return `"${val.replaceAll(/"|\\/g, "\\$&")}"`;
924
+ }
925
+ return `"${val}"`;
926
+ }
927
+ if (typeOf === "function") {
928
+ return printFunction(val, printFunctionName);
929
+ }
930
+ if (typeOf === "symbol") {
931
+ return printSymbol(val);
932
+ }
933
+ const toStringed = toString.call(val);
934
+ if (toStringed === "[object WeakMap]") {
935
+ return "WeakMap {}";
936
+ }
937
+ if (toStringed === "[object WeakSet]") {
938
+ return "WeakSet {}";
939
+ }
940
+ if (toStringed === "[object Function]" || toStringed === "[object GeneratorFunction]") {
941
+ return printFunction(val, printFunctionName);
942
+ }
943
+ if (toStringed === "[object Symbol]") {
944
+ return printSymbol(val);
945
+ }
946
+ if (toStringed === "[object Date]") {
947
+ return Number.isNaN(+val) ? "Date { NaN }" : toISOString.call(val);
948
+ }
949
+ if (toStringed === "[object Error]") {
950
+ return printError(val);
951
+ }
952
+ if (toStringed === "[object RegExp]") {
953
+ if (escapeRegex) {
954
+ return regExpToString.call(val).replaceAll(/[$()*+.?[\\\]^{|}]/g, "\\$&");
955
+ }
956
+ return regExpToString.call(val);
957
+ }
958
+ if (val instanceof Error) {
959
+ return printError(val);
960
+ }
961
+ return null;
962
+ }
963
+ function printComplexValue(val, config, indentation, depth, refs, hasCalledToJSON) {
964
+ if (refs.includes(val)) {
965
+ return "[Circular]";
966
+ }
967
+ refs = [...refs];
968
+ refs.push(val);
969
+ const hitMaxDepth = ++depth > config.maxDepth;
970
+ const min = config.min;
971
+ if (config.callToJSON && !hitMaxDepth && val.toJSON && typeof val.toJSON === "function" && !hasCalledToJSON) {
972
+ return printer(val.toJSON(), config, indentation, depth, refs, true);
973
+ }
974
+ const toStringed = toString.call(val);
975
+ if (toStringed === "[object Arguments]") {
976
+ return hitMaxDepth ? "[Arguments]" : `${min ? "" : "Arguments "}[${printListItems(
977
+ val,
978
+ config,
979
+ indentation,
980
+ depth,
981
+ refs,
982
+ printer
983
+ )}]`;
984
+ }
985
+ if (isToStringedArrayType(toStringed)) {
986
+ return hitMaxDepth ? `[${val.constructor.name}]` : `${min ? "" : !config.printBasicPrototype && val.constructor.name === "Array" ? "" : `${val.constructor.name} `}[${printListItems(val, config, indentation, depth, refs, printer)}]`;
987
+ }
988
+ if (toStringed === "[object Map]") {
989
+ return hitMaxDepth ? "[Map]" : `Map {${printIteratorEntries(
990
+ val.entries(),
991
+ config,
992
+ indentation,
993
+ depth,
994
+ refs,
995
+ printer,
996
+ " => "
997
+ )}}`;
998
+ }
999
+ if (toStringed === "[object Set]") {
1000
+ return hitMaxDepth ? "[Set]" : `Set {${printIteratorValues(
1001
+ val.values(),
1002
+ config,
1003
+ indentation,
1004
+ depth,
1005
+ refs,
1006
+ printer
1007
+ )}}`;
1008
+ }
1009
+ return hitMaxDepth || isWindow(val) ? `[${getConstructorName(val)}]` : `${min ? "" : !config.printBasicPrototype && getConstructorName(val) === "Object" ? "" : `${getConstructorName(val)} `}{${printObjectProperties(
1010
+ val,
1011
+ config,
1012
+ indentation,
1013
+ depth,
1014
+ refs,
1015
+ printer
1016
+ )}}`;
1017
+ }
1018
+ function isNewPlugin(plugin2) {
1019
+ return plugin2.serialize != null;
1020
+ }
1021
+ function printPlugin(plugin2, val, config, indentation, depth, refs) {
1022
+ let printed;
1023
+ try {
1024
+ printed = isNewPlugin(plugin2) ? plugin2.serialize(val, config, indentation, depth, refs, printer) : plugin2.print(
1025
+ val,
1026
+ (valChild) => printer(valChild, config, indentation, depth, refs),
1027
+ (str) => {
1028
+ const indentationNext = indentation + config.indent;
1029
+ return indentationNext + str.replaceAll(NEWLINE_REGEXP, `
1030
+ ${indentationNext}`);
1031
+ },
1032
+ {
1033
+ edgeSpacing: config.spacingOuter,
1034
+ min: config.min,
1035
+ spacing: config.spacingInner
1036
+ },
1037
+ config.colors
1038
+ );
1039
+ } catch (error) {
1040
+ throw new PrettyFormatPluginError(error.message, error.stack);
1041
+ }
1042
+ if (typeof printed !== "string") {
1043
+ throw new TypeError(
1044
+ `pretty-format: Plugin must return type "string" but instead returned "${typeof printed}".`
1045
+ );
1046
+ }
1047
+ return printed;
1048
+ }
1049
+ function findPlugin(plugins2, val) {
1050
+ for (const plugin2 of plugins2) {
1051
+ try {
1052
+ if (plugin2.test(val)) {
1053
+ return plugin2;
1054
+ }
1055
+ } catch (error) {
1056
+ throw new PrettyFormatPluginError(error.message, error.stack);
1057
+ }
1058
+ }
1059
+ return null;
1060
+ }
1061
+ function printer(val, config, indentation, depth, refs, hasCalledToJSON) {
1062
+ const plugin2 = findPlugin(config.plugins, val);
1063
+ if (plugin2 !== null) {
1064
+ return printPlugin(plugin2, val, config, indentation, depth, refs);
1065
+ }
1066
+ const basicResult = printBasicValue(
1067
+ val,
1068
+ config.printFunctionName,
1069
+ config.escapeRegex,
1070
+ config.escapeString
1071
+ );
1072
+ if (basicResult !== null) {
1073
+ return basicResult;
1074
+ }
1075
+ return printComplexValue(
1076
+ val,
1077
+ config,
1078
+ indentation,
1079
+ depth,
1080
+ refs,
1081
+ hasCalledToJSON
1082
+ );
1083
+ }
1084
+ const DEFAULT_THEME = {
1085
+ comment: "gray",
1086
+ content: "reset",
1087
+ prop: "yellow",
1088
+ tag: "cyan",
1089
+ value: "green"
1090
+ };
1091
+ const DEFAULT_THEME_KEYS = Object.keys(DEFAULT_THEME);
1092
+ const DEFAULT_OPTIONS = {
1093
+ callToJSON: true,
1094
+ compareKeys: void 0,
1095
+ escapeRegex: false,
1096
+ escapeString: true,
1097
+ highlight: false,
1098
+ indent: 2,
1099
+ maxDepth: Number.POSITIVE_INFINITY,
1100
+ maxWidth: Number.POSITIVE_INFINITY,
1101
+ min: false,
1102
+ plugins: [],
1103
+ printBasicPrototype: true,
1104
+ printFunctionName: true,
1105
+ theme: DEFAULT_THEME
1106
+ };
1107
+ function validateOptions(options) {
1108
+ for (const key of Object.keys(options)) {
1109
+ if (!Object.prototype.hasOwnProperty.call(DEFAULT_OPTIONS, key)) {
1110
+ throw new Error(`pretty-format: Unknown option "${key}".`);
1111
+ }
1112
+ }
1113
+ if (options.min && options.indent !== void 0 && options.indent !== 0) {
1114
+ throw new Error(
1115
+ 'pretty-format: Options "min" and "indent" cannot be used together.'
1116
+ );
1117
+ }
1118
+ }
1119
+ function getColorsHighlight() {
1120
+ return DEFAULT_THEME_KEYS.reduce((colors, key) => {
1121
+ const value = DEFAULT_THEME[key];
1122
+ const color = value && f[value];
1123
+ if (color && typeof color.close === "string" && typeof color.open === "string") {
1124
+ colors[key] = color;
1125
+ } else {
1126
+ throw new Error(
1127
+ `pretty-format: Option "theme" has a key "${key}" whose value "${value}" is undefined in ansi-styles.`
1128
+ );
1129
+ }
1130
+ return colors;
1131
+ }, /* @__PURE__ */ Object.create(null));
1132
+ }
1133
+ function getColorsEmpty() {
1134
+ return DEFAULT_THEME_KEYS.reduce((colors, key) => {
1135
+ colors[key] = { close: "", open: "" };
1136
+ return colors;
1137
+ }, /* @__PURE__ */ Object.create(null));
1138
+ }
1139
+ function getPrintFunctionName(options) {
1140
+ return (options == null ? void 0 : options.printFunctionName) ?? DEFAULT_OPTIONS.printFunctionName;
1141
+ }
1142
+ function getEscapeRegex(options) {
1143
+ return (options == null ? void 0 : options.escapeRegex) ?? DEFAULT_OPTIONS.escapeRegex;
1144
+ }
1145
+ function getEscapeString(options) {
1146
+ return (options == null ? void 0 : options.escapeString) ?? DEFAULT_OPTIONS.escapeString;
1147
+ }
1148
+ function getConfig(options) {
1149
+ return {
1150
+ callToJSON: (options == null ? void 0 : options.callToJSON) ?? DEFAULT_OPTIONS.callToJSON,
1151
+ colors: (options == null ? void 0 : options.highlight) ? getColorsHighlight() : getColorsEmpty(),
1152
+ compareKeys: typeof (options == null ? void 0 : options.compareKeys) === "function" || (options == null ? void 0 : options.compareKeys) === null ? options.compareKeys : DEFAULT_OPTIONS.compareKeys,
1153
+ escapeRegex: getEscapeRegex(options),
1154
+ escapeString: getEscapeString(options),
1155
+ indent: (options == null ? void 0 : options.min) ? "" : createIndent((options == null ? void 0 : options.indent) ?? DEFAULT_OPTIONS.indent),
1156
+ maxDepth: (options == null ? void 0 : options.maxDepth) ?? DEFAULT_OPTIONS.maxDepth,
1157
+ maxWidth: (options == null ? void 0 : options.maxWidth) ?? DEFAULT_OPTIONS.maxWidth,
1158
+ min: (options == null ? void 0 : options.min) ?? DEFAULT_OPTIONS.min,
1159
+ plugins: (options == null ? void 0 : options.plugins) ?? DEFAULT_OPTIONS.plugins,
1160
+ printBasicPrototype: (options == null ? void 0 : options.printBasicPrototype) ?? true,
1161
+ printFunctionName: getPrintFunctionName(options),
1162
+ spacingInner: (options == null ? void 0 : options.min) ? " " : "\n",
1163
+ spacingOuter: (options == null ? void 0 : options.min) ? "" : "\n"
1164
+ };
1165
+ }
1166
+ function createIndent(indent) {
1167
+ return Array.from({ length: indent + 1 }).join(" ");
1168
+ }
1169
+ function format(val, options) {
1170
+ if (options) {
1171
+ validateOptions(options);
1172
+ if (options.plugins) {
1173
+ const plugin2 = findPlugin(options.plugins, val);
1174
+ if (plugin2 !== null) {
1175
+ return printPlugin(plugin2, val, getConfig(options), "", 0, []);
1176
+ }
1177
+ }
1178
+ }
1179
+ const basicResult = printBasicValue(
1180
+ val,
1181
+ getPrintFunctionName(options),
1182
+ getEscapeRegex(options),
1183
+ getEscapeString(options)
1184
+ );
1185
+ if (basicResult !== null) {
1186
+ return basicResult;
1187
+ }
1188
+ return printComplexValue(val, getConfig(options), "", 0, []);
1189
+ }
1190
+ const plugins = {
1191
+ AsymmetricMatcher: plugin$5,
1192
+ DOMCollection: plugin$4,
1193
+ DOMElement: plugin$3,
1194
+ Immutable: plugin$2,
1195
+ ReactElement: plugin$1,
1196
+ ReactTestComponent: plugin
1197
+ };
1198
+ export {
1199
+ DEFAULT_OPTIONS,
1200
+ format,
1201
+ plugins
1202
+ };