@danceroutine/tango-testing 1.1.3 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -16,3 +16,4 @@ export { ModelDataFactory } from './factories/index';
16
16
  export type { GenericModelFactory } from './factories/index';
17
17
  export { assertions } from './assertions/index';
18
18
  export * from './integration/index';
19
+ export { withGlobalTestApi } from './vitest/index';
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@ import { aManager, aQueryExecutor, aQueryResult, aQuerySet, aRequestContext, moc
3
3
  import { ModelDataFactory, factories_exports } from "./factories-Cl_CAzbj.js";
4
4
  import { assertions, assertions_exports } from "./assertions-CCFZ53Y-.js";
5
5
  import { AppProcessHarness, Dialect, HarnessStrategyRegistry, ResetMode, TestHarness, aTangoConfig, anIntegrationHarness, applyAndVerifyMigrations, assertMigrationPlan, conformance_exports, createQuerySetFixture, domain_exports, expectQueryResult, integration_exports, introspectSchema, migrations_exports, runDialectConformanceSuite, runtime_exports, seedTable, setupTestTangoRuntime, smoke_exports } from "./integration-BrJw6NzG.js";
6
- import { vitest_exports } from "./vitest-37qN8D93.js";
6
+ import { vitest_exports, withGlobalTestApi } from "./vitest-DmamRJ18.js";
7
7
  import { anExpressRequest, anExpressResponse, express_exports } from "./express-Czpfz_Ay.js";
8
8
 
9
- export { AppProcessHarness, Dialect, HarnessStrategyRegistry, ModelDataFactory, ResetMode, TestHarness, aDBClient, aManager, aQueryExecutor, aQueryResult, aQuerySet, aRequestContext, aTangoConfig, anExpressRequest, anExpressResponse, anIntegrationHarness, applyAndVerifyMigrations, assertMigrationPlan, assertions, assertions_exports as assertionsDomain, conformance_exports as conformance, createQuerySetFixture, domain_exports as domain, expectQueryResult, express_exports as express, factories_exports as factories, integration_exports as integration, introspectSchema, migrations_exports as migrations, mocks_exports as mocks, runDialectConformanceSuite, runtime_exports as runtime, seedTable, setupTestTangoRuntime, smoke_exports as smoke, vitest_exports as vitest };
9
+ export { AppProcessHarness, Dialect, HarnessStrategyRegistry, ModelDataFactory, ResetMode, TestHarness, aDBClient, aManager, aQueryExecutor, aQueryResult, aQuerySet, aRequestContext, aTangoConfig, anExpressRequest, anExpressResponse, anIntegrationHarness, applyAndVerifyMigrations, assertMigrationPlan, assertions, assertions_exports as assertionsDomain, conformance_exports as conformance, createQuerySetFixture, domain_exports as domain, expectQueryResult, express_exports as express, factories_exports as factories, integration_exports as integration, introspectSchema, migrations_exports as migrations, mocks_exports as mocks, runDialectConformanceSuite, runtime_exports as runtime, seedTable, setupTestTangoRuntime, smoke_exports as smoke, vitest_exports as vitest, withGlobalTestApi };
@@ -2,3 +2,4 @@
2
2
  * Domain boundary barrel: centralizes this subdomain's public contract.
3
3
  */
4
4
  export * from './registerVitestTango';
5
+ export * from './withGlobalTestApi';
@@ -1,3 +1,5 @@
1
1
  import "../aDBClient-W6eXsK3X.js";
2
2
  import "../integration-BrJw6NzG.js";
3
- import "../vitest-37qN8D93.js";
3
+ import { withGlobalTestApi } from "../vitest-DmamRJ18.js";
4
+
5
+ export { withGlobalTestApi };
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Install a temporary global test API for the duration of one callback.
3
+ *
4
+ * This is useful for module-loading tests that need a stable escape hatch into
5
+ * already-imported symbols without introducing a second copy of the same package.
6
+ */
7
+ export declare function withGlobalTestApi<TValue, TResult>(key: string, value: TValue, work: () => TResult | Promise<TResult>): Promise<TResult>;
@@ -1,3 +1,4 @@
1
+ import { __export } from "./chunk-BkvOhyD0.js";
1
2
  import { TestHarness, applyAndVerifyMigrations, assertMigrationPlan, createQuerySetFixture, expectQueryResult, introspectSchema, seedTable } from "./integration-BrJw6NzG.js";
2
3
  import { expect, vi } from "vitest";
3
4
 
@@ -72,10 +73,26 @@ expect.extend({ toMatchSchema(received, schema) {
72
73
  } });
73
74
  vi.tango = tangoHelpers;
74
75
 
76
+ //#endregion
77
+ //#region src/vitest/withGlobalTestApi.ts
78
+ async function withGlobalTestApi(key, value, work) {
79
+ const globalRecord = globalThis;
80
+ const previousValue = globalRecord[key];
81
+ const hadPreviousValue = Object.prototype.hasOwnProperty.call(globalRecord, key);
82
+ globalRecord[key] = value;
83
+ try {
84
+ return await work();
85
+ } finally {
86
+ if (hadPreviousValue) globalRecord[key] = previousValue;
87
+ else delete globalRecord[key];
88
+ }
89
+ }
90
+
75
91
  //#endregion
76
92
  //#region src/vitest/index.ts
77
93
  var vitest_exports = {};
94
+ __export(vitest_exports, { withGlobalTestApi: () => withGlobalTestApi });
78
95
 
79
96
  //#endregion
80
- export { vitest_exports };
81
- //# sourceMappingURL=vitest-37qN8D93.js.map
97
+ export { vitest_exports, withGlobalTestApi };
98
+ //# sourceMappingURL=vitest-DmamRJ18.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vitest-DmamRJ18.js","names":["value: unknown","activeHarness: IntegrationHarness | null","input: IntegrationHarness | (() => IntegrationHarness | Promise<IntegrationHarness>)","tangoHelpers: TangoVitestHelpers","harness?: IntegrationHarness","table: string","rows: T[]","options: {\n meta: import('@danceroutine/tango-orm/query').TableMeta;\n harness?: IntegrationHarness;\n }","actual: Promise<T> | T","expected: T","received: unknown","schema: Parseable","key: string","value: TValue","work: () => TResult | Promise<TResult>"],"sources":["../src/vitest/registerVitestTango.ts","../src/vitest/withGlobalTestApi.ts","../src/vitest/index.ts"],"sourcesContent":["/**\n * Vitest custom matchers and helpers for Tango.\n *\n * Import this module in your Vitest setup file:\n *\n * ```typescript\n * import '@danceroutine/tango-testing/vitest';\n * ```\n */\nimport { expect, vi } from 'vitest';\nimport {\n TestHarness,\n applyAndVerifyMigrations as applyAndVerifyMigrationsFn,\n assertMigrationPlan as assertMigrationPlanFn,\n createQuerySetFixture as createQuerySetFixtureFn,\n expectQueryResult as expectQueryResultFn,\n introspectSchema as introspectSchemaFn,\n seedTable as seedTableFn,\n type ApplyAndVerifyMigrationsOptions,\n type AssertMigrationPlanOptions,\n type HarnessStrategyRegistry,\n type IntegrationHarness,\n} from '../integration';\n\ninterface Parseable {\n parse(data: unknown): unknown;\n}\n\nfunction isError(value: unknown): value is Error {\n return (\n typeof value === 'object' &&\n value !== null &&\n typeof (value as { name?: unknown }).name === 'string' &&\n typeof (value as { message?: unknown }).message === 'string'\n );\n}\n\nlet activeHarness: IntegrationHarness | null = null;\n\nasync function resolveHarness(\n input: IntegrationHarness | (() => IntegrationHarness | Promise<IntegrationHarness>)\n): Promise<IntegrationHarness> {\n if (typeof input === 'function') {\n return input();\n }\n return input;\n}\n\nexport interface TangoVitestHelpers {\n useHarness(\n input: IntegrationHarness | (() => IntegrationHarness | Promise<IntegrationHarness>)\n ): Promise<IntegrationHarness>;\n getTestHarness(): IntegrationHarness;\n getRegistry(): HarnessStrategyRegistry;\n assertMigrationPlan(options: AssertMigrationPlanOptions & { harness?: IntegrationHarness }): Promise<string>;\n applyAndVerifyMigrations(\n options: ApplyAndVerifyMigrationsOptions & { harness?: IntegrationHarness }\n ): Promise<{ statuses: { id: string; applied: boolean }[] }>;\n introspectSchema(harness?: IntegrationHarness): Promise<unknown>;\n seedTable<T extends Record<string, unknown>>(table: string, rows: T[], harness?: IntegrationHarness): Promise<void>;\n createQuerySetFixture<TModel extends Record<string, unknown>>(options: {\n meta: import('@danceroutine/tango-orm/query').TableMeta;\n harness?: IntegrationHarness;\n }): import('@danceroutine/tango-orm').QuerySet<TModel>;\n expectQueryResult<T>(actual: Promise<T> | T, expected: T): Promise<void>;\n}\n\nconst tangoHelpers: TangoVitestHelpers = {\n async useHarness(input): Promise<IntegrationHarness> {\n const harness = await resolveHarness(input);\n await harness.setup();\n activeHarness = harness;\n return harness;\n },\n getTestHarness(): IntegrationHarness {\n if (!activeHarness) {\n throw new Error('No active test harness. Call vi.tango.useHarness(...) in beforeAll first.');\n }\n return activeHarness;\n },\n getRegistry(): HarnessStrategyRegistry {\n return TestHarness.getRegistry();\n },\n async assertMigrationPlan(options): Promise<string> {\n const harness = options.harness ?? tangoHelpers.getTestHarness();\n return assertMigrationPlanFn(harness, {\n migrationsDir: options.migrationsDir,\n expectSqlContains: options.expectSqlContains,\n });\n },\n async applyAndVerifyMigrations(options): Promise<{ statuses: { id: string; applied: boolean }[] }> {\n const harness = options.harness ?? tangoHelpers.getTestHarness();\n return applyAndVerifyMigrationsFn(harness, {\n migrationsDir: options.migrationsDir,\n toId: options.toId,\n expectedAppliedIds: options.expectedAppliedIds,\n });\n },\n async introspectSchema(harness?: IntegrationHarness): Promise<unknown> {\n return introspectSchemaFn(harness ?? tangoHelpers.getTestHarness());\n },\n async seedTable<T extends Record<string, unknown>>(\n table: string,\n rows: T[],\n harness?: IntegrationHarness\n ): Promise<void> {\n await seedTableFn(harness ?? tangoHelpers.getTestHarness(), table, rows);\n },\n createQuerySetFixture<TModel extends Record<string, unknown>>(options: {\n meta: import('@danceroutine/tango-orm/query').TableMeta;\n harness?: IntegrationHarness;\n }): import('@danceroutine/tango-orm').QuerySet<TModel> {\n return createQuerySetFixtureFn<TModel>({\n harness: options.harness ?? tangoHelpers.getTestHarness(),\n meta: options.meta,\n });\n },\n async expectQueryResult<T>(actual: Promise<T> | T, expected: T): Promise<void> {\n await expectQueryResultFn(actual, expected);\n },\n};\n\nexpect.extend({\n toMatchSchema(received: unknown, schema: Parseable) {\n try {\n schema.parse(received);\n return {\n pass: true,\n message: () => 'expected data not to match schema',\n };\n } catch (error) {\n const detail = isError(error) ? error.message : String(error);\n return {\n pass: false,\n message: () => `expected data to match schema\\n\\n${detail}`,\n };\n }\n },\n});\n\n(vi as unknown as { tango?: TangoVitestHelpers }).tango = tangoHelpers;\n\ndeclare module 'vitest' {\n // oxlint-disable-next-line no-unused-vars\n interface Assertion<T> {\n toMatchSchema(schema: Parseable): void;\n }\n\n interface AsymmetricMatchersContaining {\n toMatchSchema(schema: Parseable): void;\n }\n\n interface VitestUtils {\n tango: TangoVitestHelpers;\n }\n}\n","/**\n * Install a temporary global test API for the duration of one callback.\n *\n * This is useful for module-loading tests that need a stable escape hatch into\n * already-imported symbols without introducing a second copy of the same package.\n */\nexport async function withGlobalTestApi<TValue, TResult>(\n key: string,\n value: TValue,\n work: () => TResult | Promise<TResult>\n): Promise<TResult> {\n const globalRecord = globalThis as Record<string, unknown>;\n const previousValue = globalRecord[key];\n const hadPreviousValue = Object.prototype.hasOwnProperty.call(globalRecord, key);\n\n globalRecord[key] = value;\n try {\n return await work();\n } finally {\n if (hadPreviousValue) {\n globalRecord[key] = previousValue;\n } else {\n delete globalRecord[key];\n }\n }\n}\n","/**\n * Domain boundary barrel: centralizes this subdomain's public contract.\n */\n\nexport * from './registerVitestTango';\nexport * from './withGlobalTestApi';\n"],"mappings":";;;;;AA4BA,SAAS,QAAQA,OAAgC;AAC7C,eACW,UAAU,YACjB,UAAU,eACF,MAA6B,SAAS,mBACtC,MAAgC,YAAY;AAE3D;AAED,IAAIC,gBAA2C;AAE/C,eAAe,eACXC,OAC2B;AAC3B,YAAW,UAAU,WACjB,QAAO,OAAO;AAElB,QAAO;AACV;AAqBD,MAAMC,eAAmC;CACrC,MAAM,WAAW,OAAoC;EACjD,MAAM,UAAU,MAAM,eAAe,MAAM;AAC3C,QAAM,QAAQ,OAAO;AACrB,kBAAgB;AAChB,SAAO;CACV;CACD,iBAAqC;AACjC,OAAK,cACD,OAAM,IAAI,MAAM;AAEpB,SAAO;CACV;CACD,cAAuC;AACnC,SAAO,YAAY,aAAa;CACnC;CACD,MAAM,oBAAoB,SAA0B;EAChD,MAAM,UAAU,QAAQ,WAAW,aAAa,gBAAgB;AAChE,SAAO,oBAAsB,SAAS;GAClC,eAAe,QAAQ;GACvB,mBAAmB,QAAQ;EAC9B,EAAC;CACL;CACD,MAAM,yBAAyB,SAAoE;EAC/F,MAAM,UAAU,QAAQ,WAAW,aAAa,gBAAgB;AAChE,SAAO,yBAA2B,SAAS;GACvC,eAAe,QAAQ;GACvB,MAAM,QAAQ;GACd,oBAAoB,QAAQ;EAC/B,EAAC;CACL;CACD,MAAM,iBAAiBC,SAAgD;AACnE,SAAO,iBAAmB,WAAW,aAAa,gBAAgB,CAAC;CACtE;CACD,MAAM,UACFC,OACAC,MACAF,SACa;AACb,QAAM,UAAY,WAAW,aAAa,gBAAgB,EAAE,OAAO,KAAK;CAC3E;CACD,sBAA8DG,SAGP;AACnD,SAAO,sBAAgC;GACnC,SAAS,QAAQ,WAAW,aAAa,gBAAgB;GACzD,MAAM,QAAQ;EACjB,EAAC;CACL;CACD,MAAM,kBAAqBC,QAAwBC,UAA4B;AAC3E,QAAM,kBAAoB,QAAQ,SAAS;CAC9C;AACJ;AAED,OAAO,OAAO,EACV,cAAcC,UAAmBC,QAAmB;AAChD,KAAI;AACA,SAAO,MAAM,SAAS;AACtB,SAAO;GACH,MAAM;GACN,SAAS,MAAM;EAClB;CACJ,SAAQ,OAAO;EACZ,MAAM,SAAS,QAAQ,MAAM,GAAG,MAAM,UAAU,OAAO,MAAM;AAC7D,SAAO;GACH,MAAM;GACN,SAAS,OAAO,mCAAmC,OAAO;EAC7D;CACJ;AACJ,EACJ,EAAC;AAEF,GAAkD,QAAQ;;;;ACtInD,eAAe,kBAClBC,KACAC,OACAC,MACgB;CAChB,MAAM,eAAe;CACrB,MAAM,gBAAgB,aAAa;CACnC,MAAM,mBAAmB,OAAO,UAAU,eAAe,KAAK,cAAc,IAAI;AAEhF,cAAa,OAAO;AACpB,KAAI;AACA,SAAO,MAAM,MAAM;CACtB,UAAS;AACN,MAAI,iBACA,cAAa,OAAO;IAEpB,QAAO,aAAa;CAE3B;AACJ"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@danceroutine/tango-testing",
3
- "version": "1.1.3",
3
+ "version": "1.2.0",
4
4
  "description": "Testing utilities for Tango",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -52,11 +52,11 @@
52
52
  "directory": "packages/testing"
53
53
  },
54
54
  "dependencies": {
55
- "@danceroutine/tango-config": "1.1.3",
56
- "@danceroutine/tango-migrations": "1.1.3",
57
- "@danceroutine/tango-core": "1.1.3",
58
- "@danceroutine/tango-resources": "1.1.3",
59
- "@danceroutine/tango-orm": "1.1.3"
55
+ "@danceroutine/tango-config": "1.2.0",
56
+ "@danceroutine/tango-core": "1.2.0",
57
+ "@danceroutine/tango-migrations": "1.2.0",
58
+ "@danceroutine/tango-orm": "1.2.0",
59
+ "@danceroutine/tango-resources": "1.2.0"
60
60
  },
61
61
  "peerDependencies": {
62
62
  "@types/express": "^5.0.0",
@@ -1 +0,0 @@
1
- {"version":3,"file":"vitest-37qN8D93.js","names":["value: unknown","activeHarness: IntegrationHarness | null","input: IntegrationHarness | (() => IntegrationHarness | Promise<IntegrationHarness>)","tangoHelpers: TangoVitestHelpers","harness?: IntegrationHarness","table: string","rows: T[]","options: {\n meta: import('@danceroutine/tango-orm/query').TableMeta;\n harness?: IntegrationHarness;\n }","actual: Promise<T> | T","expected: T","received: unknown","schema: Parseable"],"sources":["../src/vitest/registerVitestTango.ts","../src/vitest/index.ts"],"sourcesContent":["/**\n * Vitest custom matchers and helpers for Tango.\n *\n * Import this module in your Vitest setup file:\n *\n * ```typescript\n * import '@danceroutine/tango-testing/vitest';\n * ```\n */\nimport { expect, vi } from 'vitest';\nimport {\n TestHarness,\n applyAndVerifyMigrations as applyAndVerifyMigrationsFn,\n assertMigrationPlan as assertMigrationPlanFn,\n createQuerySetFixture as createQuerySetFixtureFn,\n expectQueryResult as expectQueryResultFn,\n introspectSchema as introspectSchemaFn,\n seedTable as seedTableFn,\n type ApplyAndVerifyMigrationsOptions,\n type AssertMigrationPlanOptions,\n type HarnessStrategyRegistry,\n type IntegrationHarness,\n} from '../integration';\n\ninterface Parseable {\n parse(data: unknown): unknown;\n}\n\nfunction isError(value: unknown): value is Error {\n return (\n typeof value === 'object' &&\n value !== null &&\n typeof (value as { name?: unknown }).name === 'string' &&\n typeof (value as { message?: unknown }).message === 'string'\n );\n}\n\nlet activeHarness: IntegrationHarness | null = null;\n\nasync function resolveHarness(\n input: IntegrationHarness | (() => IntegrationHarness | Promise<IntegrationHarness>)\n): Promise<IntegrationHarness> {\n if (typeof input === 'function') {\n return input();\n }\n return input;\n}\n\nexport interface TangoVitestHelpers {\n useHarness(\n input: IntegrationHarness | (() => IntegrationHarness | Promise<IntegrationHarness>)\n ): Promise<IntegrationHarness>;\n getTestHarness(): IntegrationHarness;\n getRegistry(): HarnessStrategyRegistry;\n assertMigrationPlan(options: AssertMigrationPlanOptions & { harness?: IntegrationHarness }): Promise<string>;\n applyAndVerifyMigrations(\n options: ApplyAndVerifyMigrationsOptions & { harness?: IntegrationHarness }\n ): Promise<{ statuses: { id: string; applied: boolean }[] }>;\n introspectSchema(harness?: IntegrationHarness): Promise<unknown>;\n seedTable<T extends Record<string, unknown>>(table: string, rows: T[], harness?: IntegrationHarness): Promise<void>;\n createQuerySetFixture<TModel extends Record<string, unknown>>(options: {\n meta: import('@danceroutine/tango-orm/query').TableMeta;\n harness?: IntegrationHarness;\n }): import('@danceroutine/tango-orm').QuerySet<TModel>;\n expectQueryResult<T>(actual: Promise<T> | T, expected: T): Promise<void>;\n}\n\nconst tangoHelpers: TangoVitestHelpers = {\n async useHarness(input): Promise<IntegrationHarness> {\n const harness = await resolveHarness(input);\n await harness.setup();\n activeHarness = harness;\n return harness;\n },\n getTestHarness(): IntegrationHarness {\n if (!activeHarness) {\n throw new Error('No active test harness. Call vi.tango.useHarness(...) in beforeAll first.');\n }\n return activeHarness;\n },\n getRegistry(): HarnessStrategyRegistry {\n return TestHarness.getRegistry();\n },\n async assertMigrationPlan(options): Promise<string> {\n const harness = options.harness ?? tangoHelpers.getTestHarness();\n return assertMigrationPlanFn(harness, {\n migrationsDir: options.migrationsDir,\n expectSqlContains: options.expectSqlContains,\n });\n },\n async applyAndVerifyMigrations(options): Promise<{ statuses: { id: string; applied: boolean }[] }> {\n const harness = options.harness ?? tangoHelpers.getTestHarness();\n return applyAndVerifyMigrationsFn(harness, {\n migrationsDir: options.migrationsDir,\n toId: options.toId,\n expectedAppliedIds: options.expectedAppliedIds,\n });\n },\n async introspectSchema(harness?: IntegrationHarness): Promise<unknown> {\n return introspectSchemaFn(harness ?? tangoHelpers.getTestHarness());\n },\n async seedTable<T extends Record<string, unknown>>(\n table: string,\n rows: T[],\n harness?: IntegrationHarness\n ): Promise<void> {\n await seedTableFn(harness ?? tangoHelpers.getTestHarness(), table, rows);\n },\n createQuerySetFixture<TModel extends Record<string, unknown>>(options: {\n meta: import('@danceroutine/tango-orm/query').TableMeta;\n harness?: IntegrationHarness;\n }): import('@danceroutine/tango-orm').QuerySet<TModel> {\n return createQuerySetFixtureFn<TModel>({\n harness: options.harness ?? tangoHelpers.getTestHarness(),\n meta: options.meta,\n });\n },\n async expectQueryResult<T>(actual: Promise<T> | T, expected: T): Promise<void> {\n await expectQueryResultFn(actual, expected);\n },\n};\n\nexpect.extend({\n toMatchSchema(received: unknown, schema: Parseable) {\n try {\n schema.parse(received);\n return {\n pass: true,\n message: () => 'expected data not to match schema',\n };\n } catch (error) {\n const detail = isError(error) ? error.message : String(error);\n return {\n pass: false,\n message: () => `expected data to match schema\\n\\n${detail}`,\n };\n }\n },\n});\n\n(vi as unknown as { tango?: TangoVitestHelpers }).tango = tangoHelpers;\n\ndeclare module 'vitest' {\n // oxlint-disable-next-line no-unused-vars\n interface Assertion<T> {\n toMatchSchema(schema: Parseable): void;\n }\n\n interface AsymmetricMatchersContaining {\n toMatchSchema(schema: Parseable): void;\n }\n\n interface VitestUtils {\n tango: TangoVitestHelpers;\n }\n}\n","/**\n * Domain boundary barrel: centralizes this subdomain's public contract.\n */\n\nexport * from './registerVitestTango';\n"],"mappings":";;;;AA4BA,SAAS,QAAQA,OAAgC;AAC7C,eACW,UAAU,YACjB,UAAU,eACF,MAA6B,SAAS,mBACtC,MAAgC,YAAY;AAE3D;AAED,IAAIC,gBAA2C;AAE/C,eAAe,eACXC,OAC2B;AAC3B,YAAW,UAAU,WACjB,QAAO,OAAO;AAElB,QAAO;AACV;AAqBD,MAAMC,eAAmC;CACrC,MAAM,WAAW,OAAoC;EACjD,MAAM,UAAU,MAAM,eAAe,MAAM;AAC3C,QAAM,QAAQ,OAAO;AACrB,kBAAgB;AAChB,SAAO;CACV;CACD,iBAAqC;AACjC,OAAK,cACD,OAAM,IAAI,MAAM;AAEpB,SAAO;CACV;CACD,cAAuC;AACnC,SAAO,YAAY,aAAa;CACnC;CACD,MAAM,oBAAoB,SAA0B;EAChD,MAAM,UAAU,QAAQ,WAAW,aAAa,gBAAgB;AAChE,SAAO,oBAAsB,SAAS;GAClC,eAAe,QAAQ;GACvB,mBAAmB,QAAQ;EAC9B,EAAC;CACL;CACD,MAAM,yBAAyB,SAAoE;EAC/F,MAAM,UAAU,QAAQ,WAAW,aAAa,gBAAgB;AAChE,SAAO,yBAA2B,SAAS;GACvC,eAAe,QAAQ;GACvB,MAAM,QAAQ;GACd,oBAAoB,QAAQ;EAC/B,EAAC;CACL;CACD,MAAM,iBAAiBC,SAAgD;AACnE,SAAO,iBAAmB,WAAW,aAAa,gBAAgB,CAAC;CACtE;CACD,MAAM,UACFC,OACAC,MACAF,SACa;AACb,QAAM,UAAY,WAAW,aAAa,gBAAgB,EAAE,OAAO,KAAK;CAC3E;CACD,sBAA8DG,SAGP;AACnD,SAAO,sBAAgC;GACnC,SAAS,QAAQ,WAAW,aAAa,gBAAgB;GACzD,MAAM,QAAQ;EACjB,EAAC;CACL;CACD,MAAM,kBAAqBC,QAAwBC,UAA4B;AAC3E,QAAM,kBAAoB,QAAQ,SAAS;CAC9C;AACJ;AAED,OAAO,OAAO,EACV,cAAcC,UAAmBC,QAAmB;AAChD,KAAI;AACA,SAAO,MAAM,SAAS;AACtB,SAAO;GACH,MAAM;GACN,SAAS,MAAM;EAClB;CACJ,SAAQ,OAAO;EACZ,MAAM,SAAS,QAAQ,MAAM,GAAG,MAAM,UAAU,OAAO,MAAM;AAC7D,SAAO;GACH,MAAM;GACN,SAAS,OAAO,mCAAmC,OAAO;EAC7D;CACJ;AACJ,EACJ,EAAC;AAEF,GAAkD,QAAQ"}