zeitzeuge 0.3.2 → 0.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/analysis/agent.d.ts.map +1 -1
- package/dist/cli.js +12 -23
- package/dist/output/progress.d.ts +2 -2
- package/dist/output/progress.d.ts.map +1 -1
- package/dist/schema.d.ts.map +1 -1
- package/dist/types.d.ts +2 -2
- package/dist/types.d.ts.map +1 -1
- package/dist/vitest/heap-profile-parser.d.ts.map +1 -1
- package/dist/vitest/index.js +62 -48
- package/dist/vitest/plugin.d.ts.map +1 -1
- package/dist/vitest/workspace.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../src/analysis/agent.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../src/analysis/agent.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,eAAe,EAGrB,MAAM,YAAY,CAAC;AAEpB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6CAA6C,CAAC;AACjF,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAM/B,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAwC3C;;;GAGG;AACH,wBAAsB,OAAO,CAC3B,KAAK,EAAE,aAAa,EACpB,OAAO,EAAE,eAAe,EACxB,OAAO,EAAE,GAAG,GACX,OAAO,CAAC,OAAO,EAAE,CAAC,CAoCpB;AAED;;;GAGG;AACH,wBAAsB,sBAAsB,CAC1C,KAAK,EAAE,aAAa,EACpB,OAAO,EAAE,eAAe,EACxB,OAAO,EAAE,GAAG,GACX,OAAO,CAAC,OAAO,EAAE,CAAC,CAgCpB;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAIjD"}
|
package/dist/cli.js
CHANGED
|
@@ -260,20 +260,15 @@ class TodoProgressRenderer {
|
|
|
260
260
|
printedHeader = false;
|
|
261
261
|
constructor(spinner) {
|
|
262
262
|
this.spinner = spinner;
|
|
263
|
-
this.baseSpinnerText = spinner
|
|
263
|
+
this.baseSpinnerText = spinner.text;
|
|
264
264
|
}
|
|
265
265
|
printHeaderOnce() {
|
|
266
266
|
if (this.printedHeader)
|
|
267
267
|
return;
|
|
268
268
|
this.printedHeader = true;
|
|
269
|
-
const header = "
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
this.spinner.start();
|
|
273
|
-
} else {
|
|
274
|
-
console.log(`
|
|
275
|
-
${header}`);
|
|
276
|
-
}
|
|
269
|
+
const header = "Performance analysis progress:";
|
|
270
|
+
this.spinner.stopAndPersist({ symbol: " ", text: header });
|
|
271
|
+
this.spinner.start();
|
|
277
272
|
}
|
|
278
273
|
handleChunk(chunk) {
|
|
279
274
|
const todos = extractTodosFromStreamChunk(chunk);
|
|
@@ -287,22 +282,14 @@ ${header}`);
|
|
|
287
282
|
this.lastStatusByKey.set(key, nextStatus);
|
|
288
283
|
if (nextStatus === "completed" && prevStatus !== "completed") {
|
|
289
284
|
this.printHeaderOnce();
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
this.spinner.start();
|
|
293
|
-
} else {
|
|
294
|
-
console.log(` ✓ ${todo.content}`);
|
|
295
|
-
}
|
|
285
|
+
this.spinner.stopAndPersist({ symbol: " ", text: ` ✓ ${todo.content}` });
|
|
286
|
+
this.spinner.start();
|
|
296
287
|
}
|
|
297
288
|
if (nextStatus === "in_progress" && this.lastInProgressKey !== key) {
|
|
298
289
|
this.lastInProgressKey = key;
|
|
299
290
|
this.printHeaderOnce();
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
this.spinner.text = base ? `${base} (${todo.content})` : todo.content;
|
|
303
|
-
} else {
|
|
304
|
-
console.log(` → Next: ${todo.content}`);
|
|
305
|
-
}
|
|
291
|
+
const base = this.baseSpinnerText ?? this.spinner.text;
|
|
292
|
+
this.spinner.text = base ? `${base} (${todo.content})` : todo.content;
|
|
306
293
|
}
|
|
307
294
|
}
|
|
308
295
|
}
|
|
@@ -330,7 +317,9 @@ __export(exports_agent, {
|
|
|
330
317
|
analyzeTestPerformance: () => analyzeTestPerformance,
|
|
331
318
|
analyze: () => analyze
|
|
332
319
|
});
|
|
333
|
-
import {
|
|
320
|
+
import {
|
|
321
|
+
createDeepAgent
|
|
322
|
+
} from "deepagents";
|
|
334
323
|
import { providerStrategy } from "langchain";
|
|
335
324
|
async function invokeWithTodoStreaming(agent, userMessage, spinner) {
|
|
336
325
|
const renderer = new TodoProgressRenderer(spinner);
|
|
@@ -1845,7 +1834,7 @@ async function main() {
|
|
|
1845
1834
|
throw new Error(`Failed to create workspace.
|
|
1846
1835
|
` + (err instanceof Error ? ` Details: ${err.message}` : ""));
|
|
1847
1836
|
}
|
|
1848
|
-
const agentSpinner = createSpinner("
|
|
1837
|
+
const agentSpinner = createSpinner("Analyzing...");
|
|
1849
1838
|
let findings;
|
|
1850
1839
|
try {
|
|
1851
1840
|
findings = await analyze(model, workspace.backend, agentSpinner);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { Ora } from 'ora';
|
|
2
2
|
export declare class TodoProgressRenderer {
|
|
3
|
-
private spinner
|
|
3
|
+
private spinner;
|
|
4
4
|
private lastStatusByKey;
|
|
5
5
|
private lastInProgressKey;
|
|
6
6
|
private baseSpinnerText;
|
|
7
7
|
private printedHeader;
|
|
8
|
-
constructor(spinner
|
|
8
|
+
constructor(spinner: Ora);
|
|
9
9
|
private printHeaderOnce;
|
|
10
10
|
handleChunk(chunk: unknown): void;
|
|
11
11
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"progress.d.ts","sourceRoot":"","sources":["../../src/output/progress.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAU/B,qBAAa,oBAAoB;
|
|
1
|
+
{"version":3,"file":"progress.d.ts","sourceRoot":"","sources":["../../src/output/progress.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAU/B,qBAAa,oBAAoB;IAMnB,OAAO,CAAC,OAAO;IAL3B,OAAO,CAAC,eAAe,CAA6B;IACpD,OAAO,CAAC,iBAAiB,CAAqB;IAC9C,OAAO,CAAC,eAAe,CAAqB;IAC5C,OAAO,CAAC,aAAa,CAAS;gBAEV,OAAO,EAAE,GAAG;IAIhC,OAAO,CAAC,eAAe;IASvB,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI;CA2BlC"}
|
package/dist/schema.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;;GAUG;AACH,eAAO,MAAM,cAAc,iaA2BjB,CAAC;AAEX,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;;GAUG;AACH,eAAO,MAAM,cAAc,iaA2BjB,CAAC;AAEX,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;iBAwBxB,CAAC;AAEH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;iBAEzB,CAAC"}
|
package/dist/types.d.ts
CHANGED
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,aAAa,EAA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|
|
1
|
-
{"version":3,"file":"heap-profile-parser.d.ts","sourceRoot":"","sources":["../../src/vitest/heap-profile-parser.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,kBAAkB,EAClB,aAAa,EAId,MAAM,YAAY,CAAC;AAEpB;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,GAAG,kBAAkB,
|
|
1
|
+
{"version":3,"file":"heap-profile-parser.d.ts","sourceRoot":"","sources":["../../src/vitest/heap-profile-parser.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,kBAAkB,EAClB,aAAa,EAId,MAAM,YAAY,CAAC;AAEpB;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,GAAG,kBAAkB,CA2E5F"}
|
package/dist/vitest/index.js
CHANGED
|
@@ -259,20 +259,15 @@ class TodoProgressRenderer {
|
|
|
259
259
|
printedHeader = false;
|
|
260
260
|
constructor(spinner) {
|
|
261
261
|
this.spinner = spinner;
|
|
262
|
-
this.baseSpinnerText = spinner
|
|
262
|
+
this.baseSpinnerText = spinner.text;
|
|
263
263
|
}
|
|
264
264
|
printHeaderOnce() {
|
|
265
265
|
if (this.printedHeader)
|
|
266
266
|
return;
|
|
267
267
|
this.printedHeader = true;
|
|
268
|
-
const header = "
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
this.spinner.start();
|
|
272
|
-
} else {
|
|
273
|
-
console.log(`
|
|
274
|
-
${header}`);
|
|
275
|
-
}
|
|
268
|
+
const header = "Performance analysis progress:";
|
|
269
|
+
this.spinner.stopAndPersist({ symbol: " ", text: header });
|
|
270
|
+
this.spinner.start();
|
|
276
271
|
}
|
|
277
272
|
handleChunk(chunk) {
|
|
278
273
|
const todos = extractTodosFromStreamChunk(chunk);
|
|
@@ -286,22 +281,14 @@ ${header}`);
|
|
|
286
281
|
this.lastStatusByKey.set(key, nextStatus);
|
|
287
282
|
if (nextStatus === "completed" && prevStatus !== "completed") {
|
|
288
283
|
this.printHeaderOnce();
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
this.spinner.start();
|
|
292
|
-
} else {
|
|
293
|
-
console.log(` ✓ ${todo.content}`);
|
|
294
|
-
}
|
|
284
|
+
this.spinner.stopAndPersist({ symbol: " ", text: ` ✓ ${todo.content}` });
|
|
285
|
+
this.spinner.start();
|
|
295
286
|
}
|
|
296
287
|
if (nextStatus === "in_progress" && this.lastInProgressKey !== key) {
|
|
297
288
|
this.lastInProgressKey = key;
|
|
298
289
|
this.printHeaderOnce();
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
this.spinner.text = base ? `${base} (${todo.content})` : todo.content;
|
|
302
|
-
} else {
|
|
303
|
-
console.log(` → Next: ${todo.content}`);
|
|
304
|
-
}
|
|
290
|
+
const base = this.baseSpinnerText ?? this.spinner.text;
|
|
291
|
+
this.spinner.text = base ? `${base} (${todo.content})` : todo.content;
|
|
305
292
|
}
|
|
306
293
|
}
|
|
307
294
|
}
|
|
@@ -329,7 +316,9 @@ __export(exports_agent, {
|
|
|
329
316
|
analyzeTestPerformance: () => analyzeTestPerformance,
|
|
330
317
|
analyze: () => analyze
|
|
331
318
|
});
|
|
332
|
-
import {
|
|
319
|
+
import {
|
|
320
|
+
createDeepAgent
|
|
321
|
+
} from "deepagents";
|
|
333
322
|
import { providerStrategy } from "langchain";
|
|
334
323
|
async function invokeWithTodoStreaming(agent, userMessage, spinner) {
|
|
335
324
|
const renderer = new TodoProgressRenderer(spinner);
|
|
@@ -1371,7 +1360,7 @@ function classifyScript(scriptUrl, projectRoot, testFiles) {
|
|
|
1371
1360
|
// package.json
|
|
1372
1361
|
var package_default = {
|
|
1373
1362
|
name: "zeitzeuge",
|
|
1374
|
-
version: "0.3.
|
|
1363
|
+
version: "0.3.2",
|
|
1375
1364
|
description: "A deepagent to witnessing slowdowns in your test runs.",
|
|
1376
1365
|
keywords: [
|
|
1377
1366
|
"analysis",
|
|
@@ -1415,6 +1404,7 @@ var package_default = {
|
|
|
1415
1404
|
"fmt:check": "oxfmt --check",
|
|
1416
1405
|
lint: "bun ./node_modules/oxlint/dist/cli.js",
|
|
1417
1406
|
"lint:fix": "bun ./node_modules/oxlint/dist/cli.js --fix",
|
|
1407
|
+
prepare: "simple-git-hooks",
|
|
1418
1408
|
test: "bun test"
|
|
1419
1409
|
},
|
|
1420
1410
|
dependencies: {
|
|
@@ -1435,13 +1425,27 @@ var package_default = {
|
|
|
1435
1425
|
devDependencies: {
|
|
1436
1426
|
"@types/bun": "latest",
|
|
1437
1427
|
"@types/yargs": "^17",
|
|
1428
|
+
"lint-staged": "^16.2.7",
|
|
1438
1429
|
oxfmt: "^0.32.0",
|
|
1439
1430
|
oxlint: "^1.47.0",
|
|
1431
|
+
"simple-git-hooks": "^2.13.1",
|
|
1440
1432
|
typescript: "^5"
|
|
1441
1433
|
},
|
|
1442
1434
|
peerDependencies: {
|
|
1443
1435
|
vitest: ">=3.1.0"
|
|
1444
1436
|
},
|
|
1437
|
+
"simple-git-hooks": {
|
|
1438
|
+
"pre-commit": "bunx lint-staged"
|
|
1439
|
+
},
|
|
1440
|
+
"lint-staged": {
|
|
1441
|
+
"*.{js,jsx,ts,tsx,mjs,cjs}": [
|
|
1442
|
+
"oxfmt",
|
|
1443
|
+
"bun ./node_modules/oxlint/dist/cli.js"
|
|
1444
|
+
],
|
|
1445
|
+
"*.{json,md,css,html,yaml,yml}": [
|
|
1446
|
+
"oxfmt"
|
|
1447
|
+
]
|
|
1448
|
+
},
|
|
1445
1449
|
engines: {
|
|
1446
1450
|
node: ">=24"
|
|
1447
1451
|
}
|
|
@@ -1509,7 +1513,7 @@ class ZeitZeugeReporter {
|
|
|
1509
1513
|
wsSpinner?.succeed("zeitzeuge: Workspace ready");
|
|
1510
1514
|
if (this.options.analyzeOnFinish) {
|
|
1511
1515
|
const agentSpinner = ora2({
|
|
1512
|
-
text: "zeitzeuge:
|
|
1516
|
+
text: "zeitzeuge: Analyzing test performance...",
|
|
1513
1517
|
color: "cyan",
|
|
1514
1518
|
isEnabled: !this.isCI
|
|
1515
1519
|
}).start();
|
|
@@ -1749,6 +1753,9 @@ zeitzeuge: Performance Analysis
|
|
|
1749
1753
|
}
|
|
1750
1754
|
|
|
1751
1755
|
// src/vitest/plugin.ts
|
|
1756
|
+
function uniq(values) {
|
|
1757
|
+
return Array.from(new Set(values));
|
|
1758
|
+
}
|
|
1752
1759
|
function zeitzeuge(options = {}) {
|
|
1753
1760
|
const {
|
|
1754
1761
|
enabled = true,
|
|
@@ -1759,47 +1766,54 @@ function zeitzeuge(options = {}) {
|
|
|
1759
1766
|
verbose = false,
|
|
1760
1767
|
projectRoot = process.cwd()
|
|
1761
1768
|
} = options;
|
|
1769
|
+
let reporterAttached = false;
|
|
1762
1770
|
return {
|
|
1763
1771
|
name: "vitest:zeitzeuge",
|
|
1764
1772
|
configureVitest(context) {
|
|
1765
1773
|
if (!enabled)
|
|
1766
1774
|
return;
|
|
1767
|
-
const { vitest } = context;
|
|
1775
|
+
const { vitest, project } = context;
|
|
1768
1776
|
const resolvedProfileDir = resolve3(profileDir);
|
|
1769
1777
|
try {
|
|
1770
1778
|
mkdirSync2(resolvedProfileDir, { recursive: true });
|
|
1771
1779
|
} catch {}
|
|
1780
|
+
const targetConfig = project?.config ?? vitest.config;
|
|
1772
1781
|
const cpuProfArgs = ["--cpu-prof", `--cpu-prof-dir=${resolvedProfileDir}`];
|
|
1773
1782
|
const heapProfArgs = heapProf ? ["--heap-prof", `--heap-prof-dir=${resolvedProfileDir}`] : [];
|
|
1774
1783
|
const profilingArgs = [...cpuProfArgs, ...heapProfArgs];
|
|
1775
|
-
const existingArgv =
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
if (!
|
|
1779
|
-
|
|
1784
|
+
const existingArgv = targetConfig.execArgv ?? [];
|
|
1785
|
+
targetConfig.execArgv = uniq([...existingArgv, ...profilingArgs]);
|
|
1786
|
+
targetConfig.pool = "forks";
|
|
1787
|
+
if (!targetConfig.poolOptions) {
|
|
1788
|
+
targetConfig.poolOptions = {};
|
|
1780
1789
|
}
|
|
1781
|
-
if (!
|
|
1782
|
-
|
|
1790
|
+
if (!targetConfig.poolOptions.forks) {
|
|
1791
|
+
targetConfig.poolOptions.forks = {};
|
|
1783
1792
|
}
|
|
1784
|
-
const existingForksArgv =
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
vitest.config.reporters
|
|
1796
|
-
|
|
1797
|
-
|
|
1793
|
+
const existingForksArgv = targetConfig.poolOptions.forks.execArgv ?? [];
|
|
1794
|
+
targetConfig.poolOptions.forks.execArgv = uniq([...existingForksArgv, ...profilingArgs]);
|
|
1795
|
+
targetConfig.fileParallelism = false;
|
|
1796
|
+
if (!reporterAttached) {
|
|
1797
|
+
const reporter = new ZeitZeugeReporter({
|
|
1798
|
+
output: resolve3(output),
|
|
1799
|
+
profileDir: resolvedProfileDir,
|
|
1800
|
+
analyzeOnFinish,
|
|
1801
|
+
verbose,
|
|
1802
|
+
projectRoot: resolve3(projectRoot)
|
|
1803
|
+
});
|
|
1804
|
+
if (Array.isArray(vitest.config.reporters)) {
|
|
1805
|
+
vitest.config.reporters.push(reporter);
|
|
1806
|
+
} else {
|
|
1807
|
+
vitest.config.reporters = [reporter];
|
|
1808
|
+
}
|
|
1809
|
+
reporterAttached = true;
|
|
1798
1810
|
}
|
|
1799
1811
|
if (verbose) {
|
|
1812
|
+
const projectName = project?.name ? String(project.name) : "(root)";
|
|
1800
1813
|
console.log(`[zeitzeuge] Plugin enabled — CPU profiling to ${resolvedProfileDir}`);
|
|
1801
|
-
console.log(`[zeitzeuge]
|
|
1802
|
-
console.log(`[zeitzeuge]
|
|
1814
|
+
console.log(`[zeitzeuge] project: ${projectName}`);
|
|
1815
|
+
console.log(`[zeitzeuge] execArgv: ${JSON.stringify(targetConfig.execArgv)}`);
|
|
1816
|
+
console.log(`[zeitzeuge] pool: ${targetConfig.pool}`);
|
|
1803
1817
|
}
|
|
1804
1818
|
}
|
|
1805
1819
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../src/vitest/plugin.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../src/vitest/plugin.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAMzD;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,OAAO,GAAE,sBAA2B;;6BAkBjC,GAAG;EA2E/B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workspace.d.ts","sourceRoot":"","sources":["../../src/vitest/workspace.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAqB,KAAK,eAAe,EAAE,MAAM,YAAY,CAAC;AAKrE,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"workspace.d.ts","sourceRoot":"","sources":["../../src/vitest/workspace.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAqB,KAAK,eAAe,EAAE,MAAM,YAAY,CAAC;AAKrE,OAAO,KAAK,EAAE,iBAAiB,EAAE,WAAW,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAEzF,MAAM,WAAW,qBAAqB;IACpC,2CAA2C;IAC3C,OAAO,EAAE,eAAe,CAAC;IACzB,iDAAiD;IACjD,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAQD;;;GAGG;AACH,wBAAsB,qBAAqB,CACzC,OAAO,EAAE,sBAAsB,GAC9B,OAAO,CAAC,qBAAqB,CAAC,CAqNhC;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,iBAAiB,EAAE,GAAG,WAAW,EAAE,CA+B9E"}
|