@nucypher/taco 0.7.0-alpha.1 → 0.7.0-alpha.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.
Files changed (79) hide show
  1. package/dist/cjs/conditions/base/context-variable.d.ts +10 -0
  2. package/dist/cjs/conditions/base/context-variable.js +19 -0
  3. package/dist/cjs/conditions/base/context-variable.js.map +1 -0
  4. package/dist/cjs/conditions/base/index.d.ts +2 -1
  5. package/dist/cjs/conditions/base/index.js +3 -2
  6. package/dist/cjs/conditions/base/index.js.map +1 -1
  7. package/dist/cjs/conditions/base/json.d.ts +7 -0
  8. package/dist/cjs/conditions/base/json.js +18 -0
  9. package/dist/cjs/conditions/base/json.js.map +1 -0
  10. package/dist/cjs/conditions/condition-factory.js +6 -3
  11. package/dist/cjs/conditions/condition-factory.js.map +1 -1
  12. package/dist/cjs/conditions/schemas/context-variable.d.ts +45 -0
  13. package/dist/cjs/conditions/schemas/context-variable.js +17 -0
  14. package/dist/cjs/conditions/schemas/context-variable.js.map +1 -0
  15. package/dist/cjs/conditions/schemas/contract.d.ts +12 -12
  16. package/dist/cjs/conditions/schemas/export-for-zod-doc-gen.d.ts +2 -1
  17. package/dist/cjs/conditions/schemas/export-for-zod-doc-gen.js +2 -2
  18. package/dist/cjs/conditions/schemas/export-for-zod-doc-gen.js.map +1 -1
  19. package/dist/cjs/conditions/schemas/json-api.d.ts +8 -8
  20. package/dist/cjs/conditions/schemas/json-rpc.d.ts +8 -8
  21. package/dist/cjs/conditions/schemas/json.d.ts +48 -0
  22. package/dist/cjs/conditions/schemas/json.js +17 -0
  23. package/dist/cjs/conditions/schemas/json.js.map +1 -0
  24. package/dist/cjs/conditions/schemas/return-value-test.js +2 -1
  25. package/dist/cjs/conditions/schemas/return-value-test.js.map +1 -1
  26. package/dist/cjs/conditions/schemas/rpc.d.ts +4 -4
  27. package/dist/cjs/conditions/schemas/time.d.ts +1 -1
  28. package/dist/cjs/conditions/schemas/utils.js +4 -2
  29. package/dist/cjs/conditions/schemas/utils.js.map +1 -1
  30. package/dist/es/conditions/base/context-variable.d.ts +10 -0
  31. package/dist/es/conditions/base/context-variable.js +15 -0
  32. package/dist/es/conditions/base/context-variable.js.map +1 -0
  33. package/dist/es/conditions/base/index.d.ts +2 -1
  34. package/dist/es/conditions/base/index.js +2 -1
  35. package/dist/es/conditions/base/index.js.map +1 -1
  36. package/dist/es/conditions/base/json.d.ts +7 -0
  37. package/dist/es/conditions/base/json.js +12 -0
  38. package/dist/es/conditions/base/json.js.map +1 -0
  39. package/dist/es/conditions/condition-factory.js +6 -3
  40. package/dist/es/conditions/condition-factory.js.map +1 -1
  41. package/dist/es/conditions/schemas/context-variable.d.ts +45 -0
  42. package/dist/es/conditions/schemas/context-variable.js +14 -0
  43. package/dist/es/conditions/schemas/context-variable.js.map +1 -0
  44. package/dist/es/conditions/schemas/contract.d.ts +12 -12
  45. package/dist/es/conditions/schemas/export-for-zod-doc-gen.d.ts +2 -1
  46. package/dist/es/conditions/schemas/export-for-zod-doc-gen.js +2 -2
  47. package/dist/es/conditions/schemas/export-for-zod-doc-gen.js.map +1 -1
  48. package/dist/es/conditions/schemas/json-api.d.ts +8 -8
  49. package/dist/es/conditions/schemas/json-rpc.d.ts +8 -8
  50. package/dist/es/conditions/schemas/json.d.ts +48 -0
  51. package/dist/es/conditions/schemas/json.js +14 -0
  52. package/dist/es/conditions/schemas/json.js.map +1 -0
  53. package/dist/es/conditions/schemas/return-value-test.js +2 -1
  54. package/dist/es/conditions/schemas/return-value-test.js.map +1 -1
  55. package/dist/es/conditions/schemas/rpc.d.ts +4 -4
  56. package/dist/es/conditions/schemas/time.d.ts +1 -1
  57. package/dist/es/conditions/schemas/utils.js +4 -2
  58. package/dist/es/conditions/schemas/utils.js.map +1 -1
  59. package/dist/tsconfig.cjs.tsbuildinfo +1 -1
  60. package/dist/tsconfig.es.tsbuildinfo +1 -1
  61. package/package.json +3 -3
  62. package/dist/cjs/conditions/base/address-allowlist.d.ts +0 -10
  63. package/dist/cjs/conditions/base/address-allowlist.js +0 -19
  64. package/dist/cjs/conditions/base/address-allowlist.js.map +0 -1
  65. package/dist/cjs/conditions/schemas/address-allowlist.d.ts +0 -16
  66. package/dist/cjs/conditions/schemas/address-allowlist.js +0 -20
  67. package/dist/cjs/conditions/schemas/address-allowlist.js.map +0 -1
  68. package/dist/cjs/conditions/zod.d.ts +0 -3
  69. package/dist/cjs/conditions/zod.js +0 -19
  70. package/dist/cjs/conditions/zod.js.map +0 -1
  71. package/dist/es/conditions/base/address-allowlist.d.ts +0 -10
  72. package/dist/es/conditions/base/address-allowlist.js +0 -15
  73. package/dist/es/conditions/base/address-allowlist.js.map +0 -1
  74. package/dist/es/conditions/schemas/address-allowlist.d.ts +0 -16
  75. package/dist/es/conditions/schemas/address-allowlist.js +0 -17
  76. package/dist/es/conditions/schemas/address-allowlist.js.map +0 -1
  77. package/dist/es/conditions/zod.d.ts +0 -3
  78. package/dist/es/conditions/zod.js +0 -17
  79. package/dist/es/conditions/zod.js.map +0 -1
@@ -0,0 +1,10 @@
1
+ import { Condition } from '../condition';
2
+ import { ContextVariableConditionProps, ContextVariableConditionType } from '../schemas/context-variable';
3
+ import { OmitConditionType } from '../shared';
4
+ export { ContextVariableConditionProps, ContextVariableConditionType };
5
+ /**
6
+ * A condition that performs comparison operations on context variable values.
7
+ */
8
+ export declare class ContextVariableCondition extends Condition {
9
+ constructor(value: OmitConditionType<ContextVariableConditionProps>);
10
+ }
@@ -0,0 +1,15 @@
1
+ import { Condition } from '../condition';
2
+ import { contextVariableConditionSchema, ContextVariableConditionType, } from '../schemas/context-variable';
3
+ export { ContextVariableConditionType };
4
+ /**
5
+ * A condition that performs comparison operations on context variable values.
6
+ */
7
+ export class ContextVariableCondition extends Condition {
8
+ constructor(value) {
9
+ super(contextVariableConditionSchema, {
10
+ conditionType: ContextVariableConditionType,
11
+ ...value,
12
+ });
13
+ }
14
+ }
15
+ //# sourceMappingURL=context-variable.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context-variable.js","sourceRoot":"","sources":["../../../../src/conditions/base/context-variable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAEL,8BAA8B,EAC9B,4BAA4B,GAC7B,MAAM,6BAA6B,CAAC;AAGrC,OAAO,EAAiC,4BAA4B,EAAE,CAAC;AAEvE;;GAEG;AACH,MAAM,OAAO,wBAAyB,SAAQ,SAAS;IACrD,YAAY,KAAuD;QACjE,KAAK,CAAC,8BAA8B,EAAE;YACpC,aAAa,EAAE,4BAA4B;YAC3C,GAAG,KAAK;SACT,CAAC,CAAC;IACL,CAAC;CACF"}
@@ -1,6 +1,7 @@
1
- export * as addressAllowlist from './address-allowlist';
1
+ export * as contextVariable from './context-variable';
2
2
  export * as contract from './contract';
3
3
  export * as ecdsa from './ecdsa';
4
+ export * as json from './json';
4
5
  export * as jsonApi from './json-api';
5
6
  export * as jsonRpc from './json-rpc';
6
7
  export * as jwt from './jwt';
@@ -1,8 +1,9 @@
1
1
  // Exporting classes here instead of their respective schema files to
2
2
  // avoid circular dependency on Condition class.
3
- export * as addressAllowlist from './address-allowlist';
3
+ export * as contextVariable from './context-variable';
4
4
  export * as contract from './contract';
5
5
  export * as ecdsa from './ecdsa';
6
+ export * as json from './json';
6
7
  export * as jsonApi from './json-api';
7
8
  export * as jsonRpc from './json-rpc';
8
9
  export * as jwt from './jwt';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/conditions/base/index.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,gDAAgD;AAEhD,OAAO,KAAK,gBAAgB,MAAM,qBAAqB,CAAC;AACxD,OAAO,KAAK,QAAQ,MAAM,YAAY,CAAC;AACvC,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,OAAO,KAAK,OAAO,MAAM,YAAY,CAAC;AACtC,OAAO,KAAK,OAAO,MAAM,YAAY,CAAC;AACtC,OAAO,KAAK,GAAG,MAAM,OAAO,CAAC;AAC7B,OAAO,KAAK,GAAG,MAAM,OAAO,CAAC;AAC7B,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AACrC,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/conditions/base/index.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,gDAAgD;AAEhD,OAAO,KAAK,eAAe,MAAM,oBAAoB,CAAC;AACtD,OAAO,KAAK,QAAQ,MAAM,YAAY,CAAC;AACvC,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAC/B,OAAO,KAAK,OAAO,MAAM,YAAY,CAAC;AACtC,OAAO,KAAK,OAAO,MAAM,YAAY,CAAC;AACtC,OAAO,KAAK,GAAG,MAAM,OAAO,CAAC;AAC7B,OAAO,KAAK,GAAG,MAAM,OAAO,CAAC;AAC7B,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AACrC,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { Condition } from '../condition';
2
+ import { JsonConditionProps } from '../schemas/json';
3
+ import { OmitConditionType } from '../shared';
4
+ export { JsonConditionProps, jsonConditionSchema, JsonConditionType, } from '../schemas/json';
5
+ export declare class JsonCondition extends Condition {
6
+ constructor(value: OmitConditionType<JsonConditionProps>);
7
+ }
@@ -0,0 +1,12 @@
1
+ import { Condition } from '../condition';
2
+ import { jsonConditionSchema, JsonConditionType, } from '../schemas/json';
3
+ export { jsonConditionSchema, JsonConditionType, } from '../schemas/json';
4
+ export class JsonCondition extends Condition {
5
+ constructor(value) {
6
+ super(jsonConditionSchema, {
7
+ conditionType: JsonConditionType,
8
+ ...value,
9
+ });
10
+ }
11
+ }
12
+ //# sourceMappingURL=json.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"json.js","sourceRoot":"","sources":["../../../../src/conditions/base/json.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAEL,mBAAmB,EACnB,iBAAiB,GAClB,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EAEL,mBAAmB,EACnB,iBAAiB,GAClB,MAAM,iBAAiB,CAAC;AAEzB,MAAM,OAAO,aAAc,SAAQ,SAAS;IAC1C,YAAY,KAA4C;QACtD,KAAK,CAAC,mBAAmB,EAAE;YACzB,aAAa,EAAE,iBAAiB;YAChC,GAAG,KAAK;SACT,CAAC,CAAC;IACL,CAAC;CACF"}
@@ -1,6 +1,7 @@
1
- import { AddressAllowlistCondition, AddressAllowlistConditionType, } from './base/address-allowlist';
1
+ import { ContextVariableCondition, ContextVariableConditionType, } from './base/context-variable';
2
2
  import { ContractCondition, ContractConditionType, } from './base/contract';
3
3
  import { ECDSACondition, ECDSAConditionType, } from './base/ecdsa';
4
+ import { JsonCondition, JsonConditionType, } from './base/json';
4
5
  import { JsonApiCondition, JsonApiConditionType, } from './base/json-api';
5
6
  import { JsonRpcCondition, JsonRpcConditionType, } from './base/json-rpc';
6
7
  import { JWTCondition, JWTConditionType } from './base/jwt';
@@ -23,18 +24,20 @@ export class ConditionFactory {
23
24
  return new ContractCondition(props);
24
25
  case ECDSAConditionType:
25
26
  return new ECDSACondition(props);
27
+ case JsonConditionType:
28
+ return new JsonCondition(props);
26
29
  case JsonApiConditionType:
27
30
  return new JsonApiCondition(props);
28
31
  case JsonRpcConditionType:
29
32
  return new JsonRpcCondition(props);
30
33
  case JWTConditionType:
31
34
  return new JWTCondition(props);
32
- case AddressAllowlistConditionType:
33
- return new AddressAllowlistCondition(props);
34
35
  case SigningObjectAttributeConditionType:
35
36
  return new SigningObjectAttributeCondition(props);
36
37
  case SigningObjectAbiAttributeConditionType:
37
38
  return new SigningObjectAbiAttributeCondition(props);
39
+ case ContextVariableConditionType:
40
+ return new ContextVariableCondition(props);
38
41
  // Logical Conditions
39
42
  case CompoundConditionType:
40
43
  return new CompoundCondition(props);
@@ -1 +1 @@
1
- {"version":3,"file":"condition-factory.js","sourceRoot":"","sources":["../../../src/conditions/condition-factory.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,yBAAyB,EAEzB,6BAA6B,GAC9B,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,iBAAiB,EAEjB,qBAAqB,GACtB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,cAAc,EAEd,kBAAkB,GACnB,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,gBAAgB,EAEhB,oBAAoB,GACrB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,gBAAgB,EAEhB,oBAAoB,GACrB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,YAAY,EAAqB,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC/E,OAAO,EAAE,YAAY,EAAqB,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC/E,OAAO,EACL,kCAAkC,EAElC,sCAAsC,EACtC,+BAA+B,EAE/B,mCAAmC,GACpC,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,aAAa,EAEb,iBAAiB,GAClB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,iBAAiB,EAEjB,qBAAqB,GACtB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,mBAAmB,EAEnB,uBAAuB,GACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,mBAAmB,EAEnB,uBAAuB,GACxB,MAAM,cAAc,CAAC;AAEtB,MAAM,0BAA0B,GAAG,CAAC,IAAY,EAAE,EAAE,CAClD,2BAA2B,IAAI,EAAE,CAAC;AAEpC,MAAM,OAAO,gBAAgB;IACpB,MAAM,CAAC,kBAAkB,CAAC,KAAqB;QACpD,QAAQ,KAAK,CAAC,aAAa,EAAE,CAAC;YAC5B,kBAAkB;YAClB,KAAK,gBAAgB;gBACnB,OAAO,IAAI,YAAY,CAAC,KAA0B,CAAC,CAAC;YACtD,KAAK,iBAAiB;gBACpB,OAAO,IAAI,aAAa,CAAC,KAA2B,CAAC,CAAC;YACxD,KAAK,qBAAqB;gBACxB,OAAO,IAAI,iBAAiB,CAAC,KAA+B,CAAC,CAAC;YAChE,KAAK,kBAAkB;gBACrB,OAAO,IAAI,cAAc,CAAC,KAA4B,CAAC,CAAC;YAC1D,KAAK,oBAAoB;gBACvB,OAAO,IAAI,gBAAgB,CAAC,KAA8B,CAAC,CAAC;YAC9D,KAAK,oBAAoB;gBACvB,OAAO,IAAI,gBAAgB,CAAC,KAA8B,CAAC,CAAC;YAC9D,KAAK,gBAAgB;gBACnB,OAAO,IAAI,YAAY,CAAC,KAA0B,CAAC,CAAC;YACtD,KAAK,6BAA6B;gBAChC,OAAO,IAAI,yBAAyB,CAClC,KAAuC,CACxC,CAAC;YACJ,KAAK,mCAAmC;gBACtC,OAAO,IAAI,+BAA+B,CACxC,KAA6C,CAC9C,CAAC;YACJ,KAAK,sCAAsC;gBACzC,OAAO,IAAI,kCAAkC,CAC3C,KAAgD,CACjD,CAAC;YACJ,qBAAqB;YACrB,KAAK,qBAAqB;gBACxB,OAAO,IAAI,iBAAiB,CAAC,KAA+B,CAAC,CAAC;YAChE,KAAK,uBAAuB;gBAC1B,OAAO,IAAI,mBAAmB,CAAC,KAAiC,CAAC,CAAC;YACpE,KAAK,uBAAuB;gBAC1B,OAAO,IAAI,mBAAmB,CAAC,KAAiC,CAAC,CAAC;YACpE;gBACE,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC;QACrE,CAAC;IACH,CAAC;CACF"}
1
+ {"version":3,"file":"condition-factory.js","sourceRoot":"","sources":["../../../src/conditions/condition-factory.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EAExB,4BAA4B,GAC7B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,iBAAiB,EAEjB,qBAAqB,GACtB,MAAM,iBAAiB,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A4B,CAAC,CAAC;YAC1D,KAAK,iBAAiB;gBACpB,OAAO,IAAI,aAAa,CAAC,KAA2B,CAAC,CAAC;YACxD,KAAK,oBAAoB;gBACvB,OAAO,IAAI,gBAAgB,CAAC,KAA8B,CAAC,CAAC;YAC9D,KAAK,oBAAoB;gBACvB,OAAO,IAAI,gBAAgB,CAAC,KAA8B,CAAC,CAAC;YAC9D,KAAK,gBAAgB;gBACnB,OAAO,IAAI,YAAY,CAAC,KAA0B,CAAC,CAAC;YACtD,KAAK,mCAAmC;gBACtC,OAAO,IAAI,+BAA+B,CACxC,KAA6C,CAC9C,CAAC;YACJ,KAAK,sCAAsC;gBACzC,OAAO,IAAI,kCAAkC,CAC3C,KAAgD,CACjD,CAAC;YACJ,KAAK,4BAA4B;gBAC/B,OAAO,IAAI,wBAAwB,CACjC,KAAsC,CACvC,CAAC;YACJ,qBAAqB;YACrB,KAAK,qBAAqB;gBACxB,OAAO,IAAI,iBAAiB,CAAC,KAA+B,CAAC,CAAC;YAChE,KAAK,uBAAuB;gBAC1B,OAAO,IAAI,mBAAmB,CAAC,KAAiC,CAAC,CAAC;YACpE,KAAK,uBAAuB;gBAC1B,OAAO,IAAI,mBAAmB,CAAC,KAAiC,CAAC,CAAC;YACpE;gBACE,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC;QACrE,CAAC;IACH,CAAC;CACF"}
@@ -0,0 +1,45 @@
1
+ import { z } from 'zod';
2
+ export declare const ContextVariableConditionType = "context-variable";
3
+ export declare const contextVariableConditionSchema: z.ZodObject<{} & {
4
+ conditionType: z.ZodLiteral<"context-variable">;
5
+ contextVariable: z.ZodString;
6
+ returnValueTest: z.ZodEffects<z.ZodObject<{
7
+ index: z.ZodOptional<z.ZodNumber>;
8
+ comparator: z.ZodEnum<["==", ">", "<", ">=", "<=", "!=", "in", "!in"]>;
9
+ } & {
10
+ value: z.ZodType<any, z.ZodTypeDef, any>;
11
+ }, "strip", z.ZodTypeAny, {
12
+ comparator: "==" | ">" | "<" | ">=" | "<=" | "!=" | "in" | "!in";
13
+ value?: any;
14
+ index?: number | undefined;
15
+ }, {
16
+ comparator: "==" | ">" | "<" | ">=" | "<=" | "!=" | "in" | "!in";
17
+ value?: any;
18
+ index?: number | undefined;
19
+ }>, {
20
+ comparator: "==" | ">" | "<" | ">=" | "<=" | "!=" | "in" | "!in";
21
+ value?: any;
22
+ index?: number | undefined;
23
+ }, {
24
+ comparator: "==" | ">" | "<" | ">=" | "<=" | "!=" | "in" | "!in";
25
+ value?: any;
26
+ index?: number | undefined;
27
+ }>;
28
+ }, "strict", z.ZodTypeAny, {
29
+ conditionType: "context-variable";
30
+ contextVariable: string;
31
+ returnValueTest: {
32
+ comparator: "==" | ">" | "<" | ">=" | "<=" | "!=" | "in" | "!in";
33
+ value?: any;
34
+ index?: number | undefined;
35
+ };
36
+ }, {
37
+ conditionType: "context-variable";
38
+ contextVariable: string;
39
+ returnValueTest: {
40
+ comparator: "==" | ">" | "<" | ">=" | "<=" | "!=" | "in" | "!in";
41
+ value?: any;
42
+ index?: number | undefined;
43
+ };
44
+ }>;
45
+ export type ContextVariableConditionProps = z.infer<typeof contextVariableConditionSchema>;
@@ -0,0 +1,14 @@
1
+ import { z } from 'zod';
2
+ import { baseConditionSchema } from './common';
3
+ import { contextParamSchema } from './context';
4
+ import { returnValueTestSchema } from './return-value-test';
5
+ export const ContextVariableConditionType = 'context-variable';
6
+ export const contextVariableConditionSchema = baseConditionSchema
7
+ .extend({
8
+ conditionType: z.literal(ContextVariableConditionType),
9
+ contextVariable: contextParamSchema.describe('The context variable to check (e.g., ":userAddress", ":customParam")'),
10
+ returnValueTest: returnValueTestSchema,
11
+ })
12
+ .strict()
13
+ .describe('Context Variable Condition for performing comparison operations on context variable values.');
14
+ //# sourceMappingURL=context-variable.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context-variable.js","sourceRoot":"","sources":["../../../../src/conditions/schemas/context-variable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAE5D,MAAM,CAAC,MAAM,4BAA4B,GAAG,kBAAkB,CAAC;AAE/D,MAAM,CAAC,MAAM,8BAA8B,GAAG,mBAAmB;KAC9D,MAAM,CAAC;IACN,aAAa,EAAE,CAAC,CAAC,OAAO,CAAC,4BAA4B,CAAC;IACtD,eAAe,EAAE,kBAAkB,CAAC,QAAQ,CAC1C,sEAAsE,CACvE;IACD,eAAe,EAAE,qBAAqB;CACvC,CAAC;KACD,MAAM,EAAE;KACR,QAAQ,CACP,6FAA6F,CAC9F,CAAC"}
@@ -324,16 +324,15 @@ export declare const contractConditionSchema: z.ZodEffects<z.ZodObject<{
324
324
  parameters: z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">;
325
325
  }, "strip", z.ZodTypeAny, {
326
326
  conditionType: "contract";
327
- method: string;
328
327
  returnValueTest: {
329
328
  comparator: "==" | ">" | "<" | ">=" | "<=" | "!=" | "in" | "!in";
330
329
  value?: any;
331
330
  index?: number | undefined;
332
331
  };
333
- parameters: any[];
334
332
  chain: number;
333
+ method: string;
334
+ parameters: any[];
335
335
  contractAddress: string;
336
- standardContractType?: "ERC20" | "ERC721" | undefined;
337
336
  functionAbi?: {
338
337
  type: "function";
339
338
  name: string;
@@ -353,18 +352,18 @@ export declare const contractConditionSchema: z.ZodEffects<z.ZodObject<{
353
352
  }[]];
354
353
  stateMutability: "view" | "pure";
355
354
  } | undefined;
355
+ standardContractType?: "ERC20" | "ERC721" | undefined;
356
356
  }, {
357
- method: string;
358
357
  returnValueTest: {
359
358
  comparator: "==" | ">" | "<" | ">=" | "<=" | "!=" | "in" | "!in";
360
359
  value?: any;
361
360
  index?: number | undefined;
362
361
  };
363
- parameters: any[];
364
362
  chain: number;
363
+ method: string;
364
+ parameters: any[];
365
365
  contractAddress: string;
366
366
  conditionType?: "contract" | undefined;
367
- standardContractType?: "ERC20" | "ERC721" | undefined;
368
367
  functionAbi?: {
369
368
  type: "function";
370
369
  name: string;
@@ -384,18 +383,18 @@ export declare const contractConditionSchema: z.ZodEffects<z.ZodObject<{
384
383
  }[]];
385
384
  stateMutability: "view" | "pure";
386
385
  } | undefined;
386
+ standardContractType?: "ERC20" | "ERC721" | undefined;
387
387
  }>, {
388
388
  conditionType: "contract";
389
- method: string;
390
389
  returnValueTest: {
391
390
  comparator: "==" | ">" | "<" | ">=" | "<=" | "!=" | "in" | "!in";
392
391
  value?: any;
393
392
  index?: number | undefined;
394
393
  };
395
- parameters: any[];
396
394
  chain: number;
395
+ method: string;
396
+ parameters: any[];
397
397
  contractAddress: string;
398
- standardContractType?: "ERC20" | "ERC721" | undefined;
399
398
  functionAbi?: {
400
399
  type: "function";
401
400
  name: string;
@@ -415,18 +414,18 @@ export declare const contractConditionSchema: z.ZodEffects<z.ZodObject<{
415
414
  }[]];
416
415
  stateMutability: "view" | "pure";
417
416
  } | undefined;
417
+ standardContractType?: "ERC20" | "ERC721" | undefined;
418
418
  }, {
419
- method: string;
420
419
  returnValueTest: {
421
420
  comparator: "==" | ">" | "<" | ">=" | "<=" | "!=" | "in" | "!in";
422
421
  value?: any;
423
422
  index?: number | undefined;
424
423
  };
425
- parameters: any[];
426
424
  chain: number;
425
+ method: string;
426
+ parameters: any[];
427
427
  contractAddress: string;
428
428
  conditionType?: "contract" | undefined;
429
- standardContractType?: "ERC20" | "ERC721" | undefined;
430
429
  functionAbi?: {
431
430
  type: "function";
432
431
  name: string;
@@ -446,5 +445,6 @@ export declare const contractConditionSchema: z.ZodEffects<z.ZodObject<{
446
445
  }[]];
447
446
  stateMutability: "view" | "pure";
448
447
  } | undefined;
448
+ standardContractType?: "ERC20" | "ERC721" | undefined;
449
449
  }>;
450
450
  export type ContractConditionProps = z.infer<typeof contractConditionSchema>;
@@ -7,9 +7,11 @@ export * from './utils';
7
7
  export * from './common';
8
8
  export * from './context';
9
9
  export * from './compound';
10
+ export * from './context-variable';
10
11
  export * from './contract';
11
12
  export * from './ecdsa';
12
13
  export * from './if-then-else';
14
+ export * from './json';
13
15
  export * from './json-api';
14
16
  export * from './json-rpc';
15
17
  export * from './jwt';
@@ -18,4 +20,3 @@ export * from './rpc';
18
20
  export * from './sequential';
19
21
  export * from './signing';
20
22
  export * from './time';
21
- export * from './address-allowlist';
@@ -9,9 +9,11 @@ export * from './common';
9
9
  export * from './context';
10
10
  // ts-unused-exports:disable-next-line - this comment line is added to prevent lint from changing or objecting the export order.
11
11
  export * from './compound';
12
+ export * from './context-variable';
12
13
  export * from './contract';
13
14
  export * from './ecdsa';
14
15
  export * from './if-then-else';
16
+ export * from './json';
15
17
  export * from './json-api';
16
18
  export * from './json-rpc';
17
19
  export * from './jwt';
@@ -20,6 +22,4 @@ export * from './rpc';
20
22
  export * from './sequential';
21
23
  export * from './signing';
22
24
  export * from './time';
23
- // ts-unused-exports:disable-next-line - this comment line is added to prevent lint from changing or objecting the export order.
24
- export * from './address-allowlist';
25
25
  //# sourceMappingURL=export-for-zod-doc-gen.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"export-for-zod-doc-gen.js","sourceRoot":"","sources":["../../../../src/conditions/schemas/export-for-zod-doc-gen.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,SAAS,CAAC;AACxB,gIAAgI;AAChI,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,gIAAgI;AAChI,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,OAAO,CAAC;AACtB,cAAc,qBAAqB,CAAC;AACpC,cAAc,OAAO,CAAC;AACtB,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,gIAAgI;AAChI,cAAc,qBAAqB,CAAC"}
1
+ {"version":3,"file":"export-for-zod-doc-gen.js","sourceRoot":"","sources":["../../../../src/conditions/schemas/export-for-zod-doc-gen.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,SAAS,CAAC;AACxB,gIAAgI;AAChI,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,gIAAgI;AAChI,cAAc,YAAY,CAAC;AAC3B,cAAc,oBAAoB,CAAC;AACnC,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,OAAO,CAAC;AACtB,cAAc,qBAAqB,CAAC;AACpC,cAAc,OAAO,CAAC;AACtB,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC"}
@@ -31,51 +31,51 @@ export declare const jsonApiConditionSchema: z.ZodEffects<z.ZodObject<{} & {
31
31
  }>;
32
32
  }, "strip", z.ZodTypeAny, {
33
33
  conditionType: "json-api";
34
- endpoint: string;
35
34
  returnValueTest: {
36
35
  comparator: "==" | ">" | "<" | ">=" | "<=" | "!=" | "in" | "!in";
37
36
  value?: any;
38
37
  index?: number | undefined;
39
38
  };
39
+ endpoint: string;
40
+ parameters?: Record<string, unknown> | undefined;
40
41
  query?: string | undefined;
41
42
  authorizationToken?: string | undefined;
42
43
  authorizationType?: "Bearer" | "Basic" | "X-API-Key" | undefined;
43
- parameters?: Record<string, unknown> | undefined;
44
44
  }, {
45
- endpoint: string;
46
45
  returnValueTest: {
47
46
  comparator: "==" | ">" | "<" | ">=" | "<=" | "!=" | "in" | "!in";
48
47
  value?: any;
49
48
  index?: number | undefined;
50
49
  };
50
+ endpoint: string;
51
51
  conditionType?: "json-api" | undefined;
52
+ parameters?: Record<string, unknown> | undefined;
52
53
  query?: string | undefined;
53
54
  authorizationToken?: string | undefined;
54
55
  authorizationType?: "Bearer" | "Basic" | "X-API-Key" | undefined;
55
- parameters?: Record<string, unknown> | undefined;
56
56
  }>, {
57
57
  conditionType: "json-api";
58
- endpoint: string;
59
58
  returnValueTest: {
60
59
  comparator: "==" | ">" | "<" | ">=" | "<=" | "!=" | "in" | "!in";
61
60
  value?: any;
62
61
  index?: number | undefined;
63
62
  };
63
+ endpoint: string;
64
+ parameters?: Record<string, unknown> | undefined;
64
65
  query?: string | undefined;
65
66
  authorizationToken?: string | undefined;
66
67
  authorizationType?: "Bearer" | "Basic" | "X-API-Key" | undefined;
67
- parameters?: Record<string, unknown> | undefined;
68
68
  }, {
69
- endpoint: string;
70
69
  returnValueTest: {
71
70
  comparator: "==" | ">" | "<" | ">=" | "<=" | "!=" | "in" | "!in";
72
71
  value?: any;
73
72
  index?: number | undefined;
74
73
  };
74
+ endpoint: string;
75
75
  conditionType?: "json-api" | undefined;
76
+ parameters?: Record<string, unknown> | undefined;
76
77
  query?: string | undefined;
77
78
  authorizationToken?: string | undefined;
78
79
  authorizationType?: "Bearer" | "Basic" | "X-API-Key" | undefined;
79
- parameters?: Record<string, unknown> | undefined;
80
80
  }>;
81
81
  export type JsonApiConditionProps = z.infer<typeof jsonApiConditionSchema>;
@@ -32,25 +32,25 @@ export declare const jsonRpcConditionSchema: z.ZodEffects<z.ZodObject<{} & {
32
32
  }>;
33
33
  }, "strip", z.ZodTypeAny, {
34
34
  conditionType: "json-rpc";
35
- endpoint: string;
36
- method: string;
37
35
  returnValueTest: {
38
36
  comparator: "==" | ">" | "<" | ">=" | "<=" | "!=" | "in" | "!in";
39
37
  value?: any;
40
38
  index?: number | undefined;
41
39
  };
40
+ method: string;
41
+ endpoint: string;
42
42
  params?: unknown[] | Record<string, unknown> | undefined;
43
43
  query?: string | undefined;
44
44
  authorizationToken?: string | undefined;
45
45
  authorizationType?: "Bearer" | "Basic" | "X-API-Key" | undefined;
46
46
  }, {
47
- endpoint: string;
48
- method: string;
49
47
  returnValueTest: {
50
48
  comparator: "==" | ">" | "<" | ">=" | "<=" | "!=" | "in" | "!in";
51
49
  value?: any;
52
50
  index?: number | undefined;
53
51
  };
52
+ method: string;
53
+ endpoint: string;
54
54
  params?: unknown[] | Record<string, unknown> | undefined;
55
55
  conditionType?: "json-rpc" | undefined;
56
56
  query?: string | undefined;
@@ -58,25 +58,25 @@ export declare const jsonRpcConditionSchema: z.ZodEffects<z.ZodObject<{} & {
58
58
  authorizationType?: "Bearer" | "Basic" | "X-API-Key" | undefined;
59
59
  }>, {
60
60
  conditionType: "json-rpc";
61
- endpoint: string;
62
- method: string;
63
61
  returnValueTest: {
64
62
  comparator: "==" | ">" | "<" | ">=" | "<=" | "!=" | "in" | "!in";
65
63
  value?: any;
66
64
  index?: number | undefined;
67
65
  };
66
+ method: string;
67
+ endpoint: string;
68
68
  params?: unknown[] | Record<string, unknown> | undefined;
69
69
  query?: string | undefined;
70
70
  authorizationToken?: string | undefined;
71
71
  authorizationType?: "Bearer" | "Basic" | "X-API-Key" | undefined;
72
72
  }, {
73
- endpoint: string;
74
- method: string;
75
73
  returnValueTest: {
76
74
  comparator: "==" | ">" | "<" | ">=" | "<=" | "!=" | "in" | "!in";
77
75
  value?: any;
78
76
  index?: number | undefined;
79
77
  };
78
+ method: string;
79
+ endpoint: string;
80
80
  params?: unknown[] | Record<string, unknown> | undefined;
81
81
  conditionType?: "json-rpc" | undefined;
82
82
  query?: string | undefined;
@@ -0,0 +1,48 @@
1
+ import { z } from 'zod';
2
+ export declare const JsonConditionType = "json";
3
+ export declare const jsonConditionSchema: z.ZodObject<{} & {
4
+ conditionType: z.ZodDefault<z.ZodLiteral<"json">>;
5
+ data: z.ZodString;
6
+ query: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
7
+ returnValueTest: z.ZodEffects<z.ZodObject<{
8
+ index: z.ZodOptional<z.ZodNumber>;
9
+ comparator: z.ZodEnum<["==", ">", "<", ">=", "<=", "!=", "in", "!in"]>;
10
+ } & {
11
+ value: z.ZodType<any, z.ZodTypeDef, any>;
12
+ }, "strip", z.ZodTypeAny, {
13
+ comparator: "==" | ">" | "<" | ">=" | "<=" | "!=" | "in" | "!in";
14
+ value?: any;
15
+ index?: number | undefined;
16
+ }, {
17
+ comparator: "==" | ">" | "<" | ">=" | "<=" | "!=" | "in" | "!in";
18
+ value?: any;
19
+ index?: number | undefined;
20
+ }>, {
21
+ comparator: "==" | ">" | "<" | ">=" | "<=" | "!=" | "in" | "!in";
22
+ value?: any;
23
+ index?: number | undefined;
24
+ }, {
25
+ comparator: "==" | ">" | "<" | ">=" | "<=" | "!=" | "in" | "!in";
26
+ value?: any;
27
+ index?: number | undefined;
28
+ }>;
29
+ }, "strip", z.ZodTypeAny, {
30
+ conditionType: "json";
31
+ data: string;
32
+ returnValueTest: {
33
+ comparator: "==" | ">" | "<" | ">=" | "<=" | "!=" | "in" | "!in";
34
+ value?: any;
35
+ index?: number | undefined;
36
+ };
37
+ query?: string | undefined;
38
+ }, {
39
+ data: string;
40
+ returnValueTest: {
41
+ comparator: "==" | ">" | "<" | ">=" | "<=" | "!=" | "in" | "!in";
42
+ value?: any;
43
+ index?: number | undefined;
44
+ };
45
+ conditionType?: "json" | undefined;
46
+ query?: string | undefined;
47
+ }>;
48
+ export type JsonConditionProps = z.infer<typeof jsonConditionSchema>;
@@ -0,0 +1,14 @@
1
+ import { z } from 'zod';
2
+ import { baseConditionSchema, jsonPathSchema } from './common';
3
+ import { contextParamSchema } from './context';
4
+ import { returnValueTestSchema } from './return-value-test';
5
+ export const JsonConditionType = 'json';
6
+ export const jsonConditionSchema = baseConditionSchema.extend({
7
+ conditionType: z.literal(JsonConditionType).default(JsonConditionType),
8
+ data: contextParamSchema.describe('Context variable that resolves to JSON data at decryption time.'),
9
+ query: jsonPathSchema
10
+ .optional()
11
+ .describe('Optional JSONPath query to extract a specific value from the data.'),
12
+ returnValueTest: returnValueTestSchema,
13
+ });
14
+ //# sourceMappingURL=json.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"json.js","sourceRoot":"","sources":["../../../../src/conditions/schemas/json.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAE5D,MAAM,CAAC,MAAM,iBAAiB,GAAG,MAAM,CAAC;AAExC,MAAM,CAAC,MAAM,mBAAmB,GAAG,mBAAmB,CAAC,MAAM,CAAC;IAC5D,aAAa,EAAE,CAAC,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC,OAAO,CAAC,iBAAiB,CAAC;IACtE,IAAI,EAAE,kBAAkB,CAAC,QAAQ,CAC/B,iEAAiE,CAClE;IACD,KAAK,EAAE,cAAc;SAClB,QAAQ,EAAE;SACV,QAAQ,CACP,oEAAoE,CACrE;IACH,eAAe,EAAE,qBAAqB;CACvC,CAAC,CAAC"}
@@ -18,7 +18,8 @@ export const returnValueTestSchema = returnValueTestBaseSchema
18
18
  .extend({
19
19
  value: paramOrContextParamSchema,
20
20
  })
21
- .refine(requireNonEmptyArrayIfComparatorIsIn, inComparatorErrorConfig);
21
+ .refine(requireNonEmptyArrayIfComparatorIsIn, inComparatorErrorConfig)
22
+ .describe('Test to perform on a value. Supports comparison operators like ==, >, <, >=, <=, !=, in, !in');
22
23
  export const blockchainReturnValueTestSchema = returnValueTestBaseSchema
23
24
  .extend({
24
25
  value: blockchainParamOrContextParamSchema,
@@ -1 +1 @@
1
- {"version":3,"file":"return-value-test.js","sourceRoot":"","sources":["../../../../src/conditions/schemas/return-value-test.ts"],"names":[],"mappings":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ConditionSchema: z.ZodObject<{} & {
29
29
  }>;
30
30
  }, "strip", z.ZodTypeAny, {
31
31
  conditionType: "rpc";
32
- method: "eth_getBalance";
33
32
  returnValueTest: {
34
33
  comparator: "==" | ">" | "<" | ">=" | "<=" | "!=" | "in" | "!in";
35
34
  value?: any;
36
35
  index?: number | undefined;
37
36
  };
38
- parameters: [string] | [string, string | number];
39
37
  chain: number;
40
- }, {
41
38
  method: "eth_getBalance";
39
+ parameters: [string, string | number] | [string];
40
+ }, {
42
41
  returnValueTest: {
43
42
  comparator: "==" | ">" | "<" | ">=" | "<=" | "!=" | "in" | "!in";
44
43
  value?: any;
45
44
  index?: number | undefined;
46
45
  };
47
- parameters: [string] | [string, string | number];
48
46
  chain: number;
47
+ method: "eth_getBalance";
48
+ parameters: [string, string | number] | [string];
49
49
  conditionType?: "rpc" | undefined;
50
50
  }>;
51
51
  export type RpcConditionProps = z.infer<typeof rpcConditionSchema>;
@@ -29,13 +29,13 @@ export declare const timeConditionSchema: z.ZodObject<{
29
29
  }>;
30
30
  }, "strip", z.ZodTypeAny, {
31
31
  conditionType: "time";
32
- method: "blocktime";
33
32
  returnValueTest: {
34
33
  comparator: "==" | ">" | "<" | ">=" | "<=" | "!=" | "in" | "!in";
35
34
  value?: any;
36
35
  index?: number | undefined;
37
36
  };
38
37
  chain: number;
38
+ method: "blocktime";
39
39
  }, {
40
40
  returnValueTest: {
41
41
  comparator: "==" | ">" | "<" | ">=" | "<=" | "!=" | "in" | "!in";
@@ -1,9 +1,10 @@
1
1
  import { z } from 'zod';
2
2
  import { compoundConditionSchema } from '../compound-condition';
3
- import { addressAllowlistConditionSchema } from './address-allowlist';
3
+ import { contextVariableConditionSchema } from './context-variable';
4
4
  import { contractConditionSchema } from './contract';
5
5
  import { ecdsaConditionSchema } from './ecdsa';
6
6
  import { ifThenElseConditionSchema } from './if-then-else';
7
+ import { jsonConditionSchema } from './json';
7
8
  import { jsonApiConditionSchema } from './json-api';
8
9
  import { jsonRpcConditionSchema } from './json-rpc';
9
10
  import { jwtConditionSchema } from './jwt';
@@ -14,9 +15,10 @@ import { timeConditionSchema } from './time';
14
15
  export const anyConditionSchema = z.lazy(() => z.union([
15
16
  rpcConditionSchema,
16
17
  timeConditionSchema,
17
- addressAllowlistConditionSchema,
18
+ contextVariableConditionSchema,
18
19
  contractConditionSchema,
19
20
  ecdsaConditionSchema,
21
+ jsonConditionSchema,
20
22
  jsonApiConditionSchema,
21
23
  jsonRpcConditionSchema,
22
24
  jwtConditionSchema,
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../src/conditions/schemas/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAEhE,OAAO,EAAE,+BAA+B,EAAE,MAAM,qBAAqB,CAAC;AACtE,OAAO,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AACpD,OAAO,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,EAAE,kBAAkB,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,EACL,wCAAwC,EACxC,qCAAqC,GACtC,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,mBAAmB,EAAE,MAAM,QAAQ,CAAC;AAE7C,MAAM,CAAC,MAAM,kBAAkB,GAAgB,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CACzD,CAAC,CAAC,KAAK,CAAC;IACN,kBAAkB;IAClB,mBAAmB;IACnB,+BA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