@lit-protocol/vincent-e2e-test-utils 1.1.0 → 1.2.1

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 (59) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/README.md +51 -9
  3. package/dist/package.json +15 -2
  4. package/dist/src/index.d.ts +2 -3
  5. package/dist/src/index.d.ts.map +1 -1
  6. package/dist/src/index.js +4 -1
  7. package/dist/src/index.js.map +1 -1
  8. package/dist/src/lib/env.d.ts +4 -0
  9. package/dist/src/lib/env.d.ts.map +1 -1
  10. package/dist/src/lib/env.js +3 -0
  11. package/dist/src/lib/env.js.map +1 -1
  12. package/dist/src/lib/environment/crossmint.d.ts +3 -0
  13. package/dist/src/lib/environment/crossmint.d.ts.map +1 -0
  14. package/dist/src/lib/environment/crossmint.js +23 -0
  15. package/dist/src/lib/environment/crossmint.js.map +1 -0
  16. package/dist/src/lib/environment/safe.d.ts +567 -0
  17. package/dist/src/lib/environment/safe.d.ts.map +1 -0
  18. package/dist/src/lib/environment/safe.js +41 -0
  19. package/dist/src/lib/environment/safe.js.map +1 -0
  20. package/dist/src/lib/environment/zerodev.d.ts +49 -0
  21. package/dist/src/lib/environment/zerodev.d.ts.map +1 -0
  22. package/dist/src/lib/environment/zerodev.js +32 -0
  23. package/dist/src/lib/environment/zerodev.js.map +1 -0
  24. package/dist/src/lib/index.d.ts +2 -1
  25. package/dist/src/lib/index.d.ts.map +1 -1
  26. package/dist/src/lib/index.js +5 -1
  27. package/dist/src/lib/index.js.map +1 -1
  28. package/dist/src/lib/setup-vincent-development-environment.d.ts +26 -2
  29. package/dist/src/lib/setup-vincent-development-environment.d.ts.map +1 -1
  30. package/dist/src/lib/setup-vincent-development-environment.js +70 -2
  31. package/dist/src/lib/setup-vincent-development-environment.js.map +1 -1
  32. package/dist/src/lib/smartAccount/crossmint/setup-crossmint-account.d.ts +3 -0
  33. package/dist/src/lib/smartAccount/crossmint/setup-crossmint-account.d.ts.map +1 -0
  34. package/dist/src/lib/smartAccount/crossmint/setup-crossmint-account.js +95 -0
  35. package/dist/src/lib/smartAccount/crossmint/setup-crossmint-account.js.map +1 -0
  36. package/dist/src/lib/smartAccount/index.d.ts +5 -0
  37. package/dist/src/lib/smartAccount/index.d.ts.map +1 -0
  38. package/dist/src/lib/smartAccount/index.js +10 -0
  39. package/dist/src/lib/smartAccount/index.js.map +1 -0
  40. package/dist/src/lib/smartAccount/safe/setup-safe-account.d.ts +15 -0
  41. package/dist/src/lib/smartAccount/safe/setup-safe-account.d.ts.map +1 -0
  42. package/dist/src/lib/smartAccount/safe/setup-safe-account.js +92 -0
  43. package/dist/src/lib/smartAccount/safe/setup-safe-account.js.map +1 -0
  44. package/dist/src/lib/smartAccount/types.d.ts +26 -0
  45. package/dist/src/lib/smartAccount/types.d.ts.map +1 -0
  46. package/dist/src/lib/smartAccount/types.js +3 -0
  47. package/dist/src/lib/smartAccount/types.js.map +1 -0
  48. package/dist/src/lib/smartAccount/zerodev/get-permission-empty-validator.d.ts +3 -0
  49. package/dist/src/lib/smartAccount/zerodev/get-permission-empty-validator.d.ts.map +1 -0
  50. package/dist/src/lib/smartAccount/zerodev/get-permission-empty-validator.js +24 -0
  51. package/dist/src/lib/smartAccount/zerodev/get-permission-empty-validator.js.map +1 -0
  52. package/dist/src/lib/smartAccount/zerodev/setup-zerodev-account.d.ts +15 -0
  53. package/dist/src/lib/smartAccount/zerodev/setup-zerodev-account.d.ts.map +1 -0
  54. package/dist/src/lib/smartAccount/zerodev/setup-zerodev-account.js +107 -0
  55. package/dist/src/lib/smartAccount/zerodev/setup-zerodev-account.js.map +1 -0
  56. package/package.json +16 -3
  57. package/dist/CHANGELOG.md +0 -29
  58. package/dist/CONTRIBUTING.md +0 -0
  59. package/dist/README.md +0 -17
package/CHANGELOG.md CHANGED
@@ -1,3 +1,21 @@
1
+ ## 1.2.1 (2025-12-10)
2
+
3
+ ### 🩹 Fixes
4
+
5
+ - Fix published package to include smart account functionality that was missing from the 1.2.0 release build. ([f327df67](https://github.com/LIT-Protocol/Vincent/commit/f327df67))
6
+
7
+ ## 1.2.0 (2025-12-09)
8
+
9
+ ### 🚀 Features
10
+
11
+ - Adds a `smartAccountType` parameter to the `setupVincentDevelopmentEnvironment`. Supports `safe`, `crossmint` and `zerodev` smart accounts. When the parameter is set, the development environment will create a Smart Account owned by the `agentWalletOwner` (currently owns the Agent PKP for development). It will then add the Agent PKP as a signer on the Smart Account. ([fe037134](https://github.com/LIT-Protocol/Vincent/commit/fe037134))
12
+
13
+ ## 1.1.3 (2025-11-23)
14
+
15
+ ### 🧱 Updated Dependencies
16
+
17
+ - Updated contracts-sdk to 5.0.0
18
+
1
19
  ## 1.1.0 (2025-11-07)
2
20
 
3
21
  ### 🚀 Features
package/README.md CHANGED
@@ -1,17 +1,59 @@
1
- # @lit-protocol/vincent-e2e-test-utils
1
+ E2E test utilities for the Vincent protocol, providing helper functions for setting up test environments, managing wallets, minting PKPs, and handling permissions.
2
2
 
3
- This library was generated with [Nx](https://nx.dev).
3
+ ## Installation
4
4
 
5
- ## Building
5
+ <CodeGroup>
6
6
 
7
- Run `nx build e2e-test-utils` to build the library.
7
+ ```bash npm
8
+ npm install @lit-protocol/vincent-e2e-test-utils
9
+ ```
8
10
 
9
- ## Usage
11
+ ```bash yarn
12
+ yarn add @lit-protocol/vincent-e2e-test-utils
13
+ ```
10
14
 
11
- This package provides E2E test utilities for the Vincent protocol.
15
+ ```bash pnpm
16
+ pnpm add @lit-protocol/vincent-e2e-test-utils
17
+ ```
12
18
 
13
- ## Development
19
+ </CodeGroup>
14
20
 
15
- ### Documentation
21
+ ## Features
16
22
 
17
- Documentation is generated using TypeDoc. Build the docs with the appropriate Nx command.
23
+ - **Quick Environment Setup**: `setupVincentDevelopmentEnvironment()` handles all the boilerplate for setting up a complete Vincent test environment
24
+ - **Wallet Management**: Create random wallets and manage test accounts with automatic funding
25
+ - **PKP Management**: Mint new PKPs and configure permissions
26
+ - **Capacity Token Handling**: Ensure unexpired capacity tokens for testing
27
+ - **Chain Helpers**: Access pre-configured providers and wallets for different networks
28
+
29
+ ## Quick Start
30
+
31
+ The easiest way to get started is with `setupVincentDevelopmentEnvironment()`:
32
+
33
+ ```typescript
34
+ import { setupVincentDevelopmentEnvironment } from '@lit-protocol/vincent-e2e-test-utils';
35
+
36
+ // Define your abilities and policies
37
+ const permissionData = {
38
+ [myAbility.ipfsCid]: {
39
+ [myPolicy.ipfsCid]: {
40
+ // policy configuration
41
+ },
42
+ },
43
+ };
44
+
45
+ // Set up everything with one call
46
+ const { agentPkpInfo, wallets, appId, appVersion } = await setupVincentDevelopmentEnvironment({
47
+ permissionData,
48
+ });
49
+
50
+ // Now you're ready to test!
51
+ ```
52
+
53
+ This single function:
54
+
55
+ - Checks and funds all required accounts (funder, app delegatee, app manager)
56
+ - Registers or updates your app with abilities and policies
57
+ - Creates or uses an existing agent PKP
58
+ - Sets up permissions for the agent PKP
59
+ - Ensures a valid capacity token exists
package/dist/package.json CHANGED
@@ -1,16 +1,28 @@
1
1
  {
2
2
  "name": "@lit-protocol/vincent-e2e-test-utils",
3
- "version": "1.1.0",
3
+ "version": "1.2.1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
+ "scripts": {
8
+ "test:smartAccount": "NODE_OPTIONS=--experimental-vm-modules dotenv -e .env jest test/smartAccount/all.spec.ts",
9
+ "test:crossmint": "NODE_OPTIONS=--experimental-vm-modules dotenv -e .env jest test/smartAccount/crossmint.spec.ts",
10
+ "test:zerodev": "NODE_OPTIONS=--experimental-vm-modules dotenv -e .env jest test/smartAccount/zerodev.spec.ts",
11
+ "test:safe": "NODE_OPTIONS=--experimental-vm-modules dotenv -e .env jest test/smartAccount/safe.spec.ts"
12
+ },
7
13
  "dependencies": {
14
+ "@crossmint/wallets-sdk": "^0.18.7",
8
15
  "@lit-protocol/constants": "^8.0.4",
9
16
  "@lit-protocol/contracts-sdk": "^7.2.3",
10
- "@lit-protocol/vincent-contracts-sdk": "^2.0.0",
17
+ "@lit-protocol/vincent-contracts-sdk": "workspace:*",
11
18
  "@t3-oss/env-core": "^0.13.8",
19
+ "@zerodev/ecdsa-validator": "^5.4.9",
20
+ "@zerodev/permissions": "^5.6.2",
21
+ "@zerodev/sdk": "^5.5.3",
12
22
  "ethers": "^5.7.2",
23
+ "permissionless": "^0.2.57",
13
24
  "tslib": "^2.8.1",
25
+ "viem": "^2.38.3",
14
26
  "zod": "^3.25.64"
15
27
  },
16
28
  "main": "./dist/src/index.js",
@@ -28,6 +40,7 @@
28
40
  "devDependencies": {
29
41
  "@types/semver": "^7.7.0",
30
42
  "chokidar-cli": "^3.0.0",
43
+ "dotenv-cli": "^7.4.2",
31
44
  "ipfs-only-hash": "^4.0.0",
32
45
  "jsonc-eslint-parser": "^2.4.0",
33
46
  "typedoc": "0.27.9",
@@ -1,4 +1,3 @@
1
- export { delegator, delegatee, funder, chain, appManager, mintNewPkp, ensureUnexpiredCapacityToken, getEnv, getChainHelpers, createRandomVincentWallets, setupVincentDevelopmentEnvironment, } from './lib';
2
- export type { PkpInfo } from './lib/mint-new-pkp';
3
- export type { VincentDevEnvironment } from './lib/setup-vincent-development-environment';
1
+ export { delegator, delegatee, funder, chain, appManager, mintNewPkp, ensureUnexpiredCapacityToken, getEnv, getChainHelpers, createRandomVincentWallets, setupVincentDevelopmentEnvironment, setupZerodevAccount, setupCrossmintAccount, setupSafeAccount, } from './lib';
2
+ export type { PkpInfo, SmartAccountInfo, VincentDevEnvironment } from './lib';
4
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,SAAS,EACT,MAAM,EACN,KAAK,EACL,UAAU,EACV,UAAU,EACV,4BAA4B,EAC5B,MAAM,EACN,eAAe,EACf,0BAA0B,EAC1B,kCAAkC,GACnC,MAAM,OAAO,CAAC;AAEf,YAAY,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAClD,YAAY,EAAE,qBAAqB,EAAE,MAAM,6CAA6C,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,SAAS,EACT,MAAM,EACN,KAAK,EACL,UAAU,EACV,UAAU,EACV,4BAA4B,EAC5B,MAAM,EACN,eAAe,EACf,0BAA0B,EAC1B,kCAAkC,EAClC,mBAAmB,EACnB,qBAAqB,EACrB,gBAAgB,GACjB,MAAM,OAAO,CAAC;AAEf,YAAY,EAAE,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,OAAO,CAAC"}
package/dist/src/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.setupVincentDevelopmentEnvironment = exports.createRandomVincentWallets = exports.getChainHelpers = exports.getEnv = exports.ensureUnexpiredCapacityToken = exports.mintNewPkp = exports.appManager = exports.chain = exports.funder = exports.delegatee = exports.delegator = void 0;
3
+ exports.setupSafeAccount = exports.setupCrossmintAccount = exports.setupZerodevAccount = exports.setupVincentDevelopmentEnvironment = exports.createRandomVincentWallets = exports.getChainHelpers = exports.getEnv = exports.ensureUnexpiredCapacityToken = exports.mintNewPkp = exports.appManager = exports.chain = exports.funder = exports.delegatee = exports.delegator = void 0;
4
4
  var lib_1 = require("./lib");
5
5
  Object.defineProperty(exports, "delegator", { enumerable: true, get: function () { return lib_1.delegator; } });
6
6
  Object.defineProperty(exports, "delegatee", { enumerable: true, get: function () { return lib_1.delegatee; } });
@@ -13,4 +13,7 @@ Object.defineProperty(exports, "getEnv", { enumerable: true, get: function () {
13
13
  Object.defineProperty(exports, "getChainHelpers", { enumerable: true, get: function () { return lib_1.getChainHelpers; } });
14
14
  Object.defineProperty(exports, "createRandomVincentWallets", { enumerable: true, get: function () { return lib_1.createRandomVincentWallets; } });
15
15
  Object.defineProperty(exports, "setupVincentDevelopmentEnvironment", { enumerable: true, get: function () { return lib_1.setupVincentDevelopmentEnvironment; } });
16
+ Object.defineProperty(exports, "setupZerodevAccount", { enumerable: true, get: function () { return lib_1.setupZerodevAccount; } });
17
+ Object.defineProperty(exports, "setupCrossmintAccount", { enumerable: true, get: function () { return lib_1.setupCrossmintAccount; } });
18
+ Object.defineProperty(exports, "setupSafeAccount", { enumerable: true, get: function () { return lib_1.setupSafeAccount; } });
16
19
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA,6BAYe;AAXb,gGAAA,SAAS,OAAA;AACT,gGAAA,SAAS,OAAA;AACT,6FAAA,MAAM,OAAA;AACN,4FAAA,KAAK,OAAA;AACL,iGAAA,UAAU,OAAA;AACV,iGAAA,UAAU,OAAA;AACV,mHAAA,4BAA4B,OAAA;AAC5B,6FAAA,MAAM,OAAA;AACN,sGAAA,eAAe,OAAA;AACf,iHAAA,0BAA0B,OAAA;AAC1B,yHAAA,kCAAkC,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA,6BAee;AAdb,gGAAA,SAAS,OAAA;AACT,gGAAA,SAAS,OAAA;AACT,6FAAA,MAAM,OAAA;AACN,4FAAA,KAAK,OAAA;AACL,iGAAA,UAAU,OAAA;AACV,iGAAA,UAAU,OAAA;AACV,mHAAA,4BAA4B,OAAA;AAC5B,6FAAA,MAAM,OAAA;AACN,sGAAA,eAAe,OAAA;AACf,iHAAA,0BAA0B,OAAA;AAC1B,yHAAA,kCAAkC,OAAA;AAClC,0GAAA,mBAAmB,OAAA;AACnB,4GAAA,qBAAqB,OAAA;AACrB,uGAAA,gBAAgB,OAAA"}
@@ -7,6 +7,8 @@ declare const baseEnvSchema: {
7
7
  TEST_AGENT_WALLET_PKP_OWNER_PRIVATE_KEY: z.ZodString;
8
8
  YELLOWSTONE_RPC_URL: z.ZodDefault<z.ZodOptional<z.ZodString>>;
9
9
  BASE_RPC_URL: z.ZodDefault<z.ZodOptional<z.ZodString>>;
10
+ SMART_ACCOUNT_CHAIN_ID: z.ZodOptional<z.ZodString>;
11
+ ZERODEV_RPC_URL: z.ZodOptional<z.ZodString>;
10
12
  };
11
13
  export declare const getEnv: <T extends ZodRawShape = typeof baseEnvSchema>(additionalSchema?: T) => {
12
14
  TEST_FUNDER_PRIVATE_KEY: string;
@@ -15,6 +17,8 @@ export declare const getEnv: <T extends ZodRawShape = typeof baseEnvSchema>(addi
15
17
  TEST_AGENT_WALLET_PKP_OWNER_PRIVATE_KEY: string;
16
18
  YELLOWSTONE_RPC_URL: string;
17
19
  BASE_RPC_URL: string;
20
+ SMART_ACCOUNT_CHAIN_ID?: string | undefined;
21
+ ZERODEV_RPC_URL?: string | undefined;
18
22
  } & (z.objectUtil.addQuestionMarks<z.baseObjectOutputType<T>, any> extends infer T_1 ? { [k in keyof T_1]: z.objectUtil.addQuestionMarks<z.baseObjectOutputType<T>, any>[k]; } : never);
19
23
  export {};
20
24
  //# sourceMappingURL=env.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../../../src/lib/env.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,KAAK,CAAC;AAGvC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAoBxB,QAAA,MAAM,aAAa;;;;;;;CAOlB,CAAC;AAIF,eAAO,MAAM,MAAM,GAAI,CAAC,SAAS,WAAW,GAAG,OAAO,aAAa,EAAE,mBAAmB,CAAC;;;;;;;uLAaxF,CAAC"}
1
+ {"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../../../src/lib/env.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,KAAK,CAAC;AAGvC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAoBxB,QAAA,MAAM,aAAa;;;;;;;;;CAUlB,CAAC;AAIF,eAAO,MAAM,MAAM,GAAI,CAAC,SAAS,WAAW,GAAG,OAAO,aAAa,EAAE,mBAAmB,CAAC;;;;;;;;;uLAaxF,CAAC"}
@@ -30,6 +30,9 @@ const baseEnvSchema = {
30
30
  TEST_AGENT_WALLET_PKP_OWNER_PRIVATE_KEY: zod_1.z.string(),
31
31
  YELLOWSTONE_RPC_URL: zod_1.z.string().optional().default('https://yellowstone-rpc.litprotocol.com/'),
32
32
  BASE_RPC_URL: zod_1.z.string().optional().default('https://base.llamarpc.com'),
33
+ // Smart Account (optional - only needed when enableSmartAccount=true)
34
+ SMART_ACCOUNT_CHAIN_ID: zod_1.z.string().optional(),
35
+ ZERODEV_RPC_URL: zod_1.z.string().optional(),
33
36
  };
34
37
  const getEnv = (additionalSchema) => {
35
38
  try {
@@ -1 +1 @@
1
- {"version":3,"file":"env.js","sourceRoot":"","sources":["../../../src/lib/env.ts"],"names":[],"mappings":";;;AAEA,+CAA6C;AAC7C,6BAAwB;AAExB,iDAAiD;AACjD,MAAM,cAAc,GAAG,CAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;AACpG,6FAA6F;AAC7F,6DAA6D;AAC7D,MAAM,4BAA4B,GAAG,OAAC;KACnC,GAAG,EAAE;KACL,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,cAAc,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,EAAE,OAAO,EAAE,iBAAiB,EAAE,CAAC;KAC7E,SAAS,CAAC,CAAC,GAAG,EAAE,EAAE;IACjB,IAAI,OAAO,GAAG,KAAK,SAAS;QAAE,OAAO,GAAG,CAAC;IACzC,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE,CAAC;QAC5B,MAAM,UAAU,G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Client(): WalletsApiClient;
3
+ //# sourceMappingURL=crossmint.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"crossmint.d.ts","sourceRoot":"","sources":["../../../../src/lib/environment/crossmint.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAa3E,wBAAgB,2BAA2B,IAAI,gBAAgB,CAQ9D"}
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getCrossmintWalletApiClient = getCrossmintWalletApiClient;
4
+ const wallets_sdk_1 = require("@crossmint/wallets-sdk");
5
+ function getCrossmintApiKey() {
6
+ const CROSSMINT_API_KEY = process.env.CROSSMINT_API_KEY;
7
+ if (!CROSSMINT_API_KEY) {
8
+ throw new Error('Missing CROSSMINT_API_KEY env variable');
9
+ }
10
+ return CROSSMINT_API_KEY;
11
+ }
12
+ // Lazy initialization - only validates when accessed
13
+ let _crossmintWalletApiClient = null;
14
+ function getCrossmintWalletApiClient() {
15
+ if (!_crossmintWalletApiClient) {
16
+ const crossmint = (0, wallets_sdk_1.createCrossmint)({
17
+ apiKey: getCrossmintApiKey(),
18
+ });
19
+ _crossmintWalletApiClient = new wallets_sdk_1.WalletsApiClient(crossmint);
20
+ }
21
+ return _crossmintWalletApiClient;
22
+ }
23
+ //# sourceMappingURL=crossmint.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"crossmint.js","sourceRoot":"","sources":["../../../../src/lib/environment/crossmint.ts"],"names":[],"mappings":";;AAaA,kEAQC;AArBD,wDAA2E;AAE3E,SAAS,kBAAkB;IACzB,MAAM,iBAAiB,GAAG,OAAO,CAAC,GAAG,CAAC,iBAAuC,CAAC;IAC9E,IAAI,CAAC,iBAAiB,EAAE,CAAC;QACvB,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAC;IAC5D,CAAC;IACD,OAAO,iBAAiB,CAAC;AAC3B,CAAC;AAED,qDAAqD;AACrD,IAAI,yBAAyB,GAA4B,IAAI,CAAC;AAE9D,SAAgB,2BAA2B;IACzC,IAAI,CAAC,yBAAyB,EAAE,CAAC;QAC/B,MAAM,SAAS,GAAG,IAAA,6BAAe,EAAC;YAChC,MAAM,EAAE,kBAAkB,EAAE;SAC7B,CAAC,CAAC;QACH,yBAAyB,GAAG,IAAI,8BAAgB,CAAC,SAAS,CAAC,CAAC;IAC9D,CAAC;IACD,OAAO,yBAAyB,CAAC;AACnC,CAAC"}