@langchain/langgraph 1.0.14 → 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 (184) hide show
  1. package/dist/channels/base.cjs +11 -0
  2. package/dist/channels/base.cjs.map +1 -1
  3. package/dist/channels/base.d.cts +9 -0
  4. package/dist/channels/base.d.cts.map +1 -1
  5. package/dist/channels/base.d.ts +9 -0
  6. package/dist/channels/base.d.ts.map +1 -1
  7. package/dist/channels/base.js +11 -0
  8. package/dist/channels/base.js.map +1 -1
  9. package/dist/channels/binop.cjs +13 -0
  10. package/dist/channels/binop.cjs.map +1 -1
  11. package/dist/channels/binop.d.cts +6 -0
  12. package/dist/channels/binop.d.cts.map +1 -1
  13. package/dist/channels/binop.d.ts +6 -0
  14. package/dist/channels/binop.d.ts.map +1 -1
  15. package/dist/channels/binop.js +13 -0
  16. package/dist/channels/binop.js.map +1 -1
  17. package/dist/channels/index.cjs +2 -0
  18. package/dist/channels/index.d.cts +2 -1
  19. package/dist/channels/index.d.ts +2 -1
  20. package/dist/channels/index.js +2 -1
  21. package/dist/channels/untracked_value.cjs +83 -0
  22. package/dist/channels/untracked_value.cjs.map +1 -0
  23. package/dist/channels/untracked_value.d.cts +64 -0
  24. package/dist/channels/untracked_value.d.cts.map +1 -0
  25. package/dist/channels/untracked_value.d.ts +64 -0
  26. package/dist/channels/untracked_value.d.ts.map +1 -0
  27. package/dist/channels/untracked_value.js +83 -0
  28. package/dist/channels/untracked_value.js.map +1 -0
  29. package/dist/constants.cjs.map +1 -1
  30. package/dist/constants.d.cts +2 -2
  31. package/dist/constants.d.cts.map +1 -1
  32. package/dist/constants.d.ts +2 -2
  33. package/dist/constants.d.ts.map +1 -1
  34. package/dist/constants.js.map +1 -1
  35. package/dist/errors.cjs +36 -0
  36. package/dist/errors.cjs.map +1 -1
  37. package/dist/errors.d.cts +30 -1
  38. package/dist/errors.d.cts.map +1 -1
  39. package/dist/errors.d.ts +30 -1
  40. package/dist/errors.d.ts.map +1 -1
  41. package/dist/errors.js +36 -1
  42. package/dist/errors.js.map +1 -1
  43. package/dist/func/index.cjs +1 -1
  44. package/dist/func/index.cjs.map +1 -1
  45. package/dist/func/index.js +1 -1
  46. package/dist/func/index.js.map +1 -1
  47. package/dist/graph/index.cjs +1 -0
  48. package/dist/graph/index.js +2 -1
  49. package/dist/graph/message.cjs +2 -47
  50. package/dist/graph/message.cjs.map +1 -1
  51. package/dist/graph/message.d.cts +4 -11
  52. package/dist/graph/message.d.cts.map +1 -1
  53. package/dist/graph/message.d.ts +4 -11
  54. package/dist/graph/message.d.ts.map +1 -1
  55. package/dist/graph/message.js +2 -45
  56. package/dist/graph/message.js.map +1 -1
  57. package/dist/graph/messages_annotation.cjs +3 -3
  58. package/dist/graph/messages_annotation.cjs.map +1 -1
  59. package/dist/graph/messages_annotation.d.cts +2 -2
  60. package/dist/graph/messages_annotation.d.cts.map +1 -1
  61. package/dist/graph/messages_annotation.d.ts +1 -1
  62. package/dist/graph/messages_annotation.d.ts.map +1 -1
  63. package/dist/graph/messages_annotation.js +1 -1
  64. package/dist/graph/messages_annotation.js.map +1 -1
  65. package/dist/graph/messages_reducer.cjs +85 -0
  66. package/dist/graph/messages_reducer.cjs.map +1 -0
  67. package/dist/graph/messages_reducer.d.cts +54 -0
  68. package/dist/graph/messages_reducer.d.cts.map +1 -0
  69. package/dist/graph/messages_reducer.d.ts +54 -0
  70. package/dist/graph/messages_reducer.d.ts.map +1 -0
  71. package/dist/graph/messages_reducer.js +84 -0
  72. package/dist/graph/messages_reducer.js.map +1 -0
  73. package/dist/graph/state.cjs +30 -10
  74. package/dist/graph/state.cjs.map +1 -1
  75. package/dist/graph/state.d.cts +24 -15
  76. package/dist/graph/state.d.cts.map +1 -1
  77. package/dist/graph/state.d.ts +24 -15
  78. package/dist/graph/state.d.ts.map +1 -1
  79. package/dist/graph/state.js +31 -11
  80. package/dist/graph/state.js.map +1 -1
  81. package/dist/graph/types.d.cts +127 -0
  82. package/dist/graph/types.d.cts.map +1 -0
  83. package/dist/graph/types.d.ts +127 -0
  84. package/dist/graph/types.d.ts.map +1 -0
  85. package/dist/graph/zod/plugin.cjs +2 -2
  86. package/dist/graph/zod/plugin.cjs.map +1 -1
  87. package/dist/graph/zod/plugin.js +3 -3
  88. package/dist/graph/zod/plugin.js.map +1 -1
  89. package/dist/graph/zod/zod-registry.d.cts.map +1 -1
  90. package/dist/hash.cjs +4 -4
  91. package/dist/hash.cjs.map +1 -1
  92. package/dist/hash.js +4 -4
  93. package/dist/hash.js.map +1 -1
  94. package/dist/index.cjs +21 -3
  95. package/dist/index.cjs.map +1 -1
  96. package/dist/index.d.cts +12 -3
  97. package/dist/index.d.ts +12 -3
  98. package/dist/index.js +11 -3
  99. package/dist/index.js.map +1 -1
  100. package/dist/prebuilt/agent_executor.d.cts +5 -5
  101. package/dist/prebuilt/agent_executor.d.cts.map +1 -1
  102. package/dist/prebuilt/agent_executor.d.ts +5 -5
  103. package/dist/prebuilt/agent_executor.d.ts.map +1 -1
  104. package/dist/prebuilt/react_agent_executor.cjs +7 -6
  105. package/dist/prebuilt/react_agent_executor.cjs.map +1 -1
  106. package/dist/prebuilt/react_agent_executor.d.cts +4 -4
  107. package/dist/prebuilt/react_agent_executor.d.cts.map +1 -1
  108. package/dist/prebuilt/react_agent_executor.d.ts +4 -4
  109. package/dist/prebuilt/react_agent_executor.d.ts.map +1 -1
  110. package/dist/prebuilt/react_agent_executor.js +5 -4
  111. package/dist/prebuilt/react_agent_executor.js.map +1 -1
  112. package/dist/pregel/algo.cjs +19 -0
  113. package/dist/pregel/algo.cjs.map +1 -1
  114. package/dist/pregel/algo.d.cts.map +1 -1
  115. package/dist/pregel/algo.d.ts.map +1 -1
  116. package/dist/pregel/algo.js +19 -1
  117. package/dist/pregel/algo.js.map +1 -1
  118. package/dist/pregel/loop.cjs +18 -3
  119. package/dist/pregel/loop.cjs.map +1 -1
  120. package/dist/pregel/loop.js +20 -5
  121. package/dist/pregel/loop.js.map +1 -1
  122. package/dist/pregel/runner.cjs +1 -1
  123. package/dist/pregel/runner.cjs.map +1 -1
  124. package/dist/pregel/runner.js +1 -1
  125. package/dist/pregel/runner.js.map +1 -1
  126. package/dist/state/adapter.cjs +53 -0
  127. package/dist/state/adapter.cjs.map +1 -0
  128. package/dist/state/adapter.d.cts +33 -0
  129. package/dist/state/adapter.d.cts.map +1 -0
  130. package/dist/state/adapter.d.ts +33 -0
  131. package/dist/state/adapter.d.ts.map +1 -0
  132. package/dist/state/adapter.js +52 -0
  133. package/dist/state/adapter.js.map +1 -0
  134. package/dist/state/index.cjs +8 -0
  135. package/dist/state/index.js +10 -0
  136. package/dist/state/prebuilt/index.cjs +1 -0
  137. package/dist/state/prebuilt/index.js +3 -0
  138. package/dist/state/prebuilt/messages.cjs +19 -0
  139. package/dist/state/prebuilt/messages.cjs.map +1 -0
  140. package/dist/state/prebuilt/messages.d.cts +10 -0
  141. package/dist/state/prebuilt/messages.d.cts.map +1 -0
  142. package/dist/state/prebuilt/messages.d.ts +10 -0
  143. package/dist/state/prebuilt/messages.d.ts.map +1 -0
  144. package/dist/state/prebuilt/messages.js +19 -0
  145. package/dist/state/prebuilt/messages.js.map +1 -0
  146. package/dist/state/schema.cjs +171 -0
  147. package/dist/state/schema.cjs.map +1 -0
  148. package/dist/state/schema.d.cts +208 -0
  149. package/dist/state/schema.d.cts.map +1 -0
  150. package/dist/state/schema.d.ts +208 -0
  151. package/dist/state/schema.d.ts.map +1 -0
  152. package/dist/state/schema.js +171 -0
  153. package/dist/state/schema.js.map +1 -0
  154. package/dist/state/types.cjs +17 -0
  155. package/dist/state/types.cjs.map +1 -0
  156. package/dist/state/types.d.cts +128 -0
  157. package/dist/state/types.d.cts.map +1 -0
  158. package/dist/state/types.d.ts +128 -0
  159. package/dist/state/types.d.ts.map +1 -0
  160. package/dist/state/types.js +14 -0
  161. package/dist/state/types.js.map +1 -0
  162. package/dist/state/values/index.cjs +2 -0
  163. package/dist/state/values/index.js +4 -0
  164. package/dist/state/values/reduced.cjs +72 -0
  165. package/dist/state/values/reduced.cjs.map +1 -0
  166. package/dist/state/values/reduced.d.cts +155 -0
  167. package/dist/state/values/reduced.d.cts.map +1 -0
  168. package/dist/state/values/reduced.d.ts +155 -0
  169. package/dist/state/values/reduced.d.ts.map +1 -0
  170. package/dist/state/values/reduced.js +71 -0
  171. package/dist/state/values/reduced.js.map +1 -0
  172. package/dist/state/values/untracked.cjs +64 -0
  173. package/dist/state/values/untracked.cjs.map +1 -0
  174. package/dist/state/values/untracked.d.cts +74 -0
  175. package/dist/state/values/untracked.d.cts.map +1 -0
  176. package/dist/state/values/untracked.d.ts +74 -0
  177. package/dist/state/values/untracked.d.ts.map +1 -0
  178. package/dist/state/values/untracked.js +63 -0
  179. package/dist/state/values/untracked.js.map +1 -0
  180. package/dist/web.cjs +26 -7
  181. package/dist/web.d.cts +12 -3
  182. package/dist/web.d.ts +12 -3
  183. package/dist/web.js +13 -4
  184. package/package.json +5 -4
@@ -0,0 +1,128 @@
1
+ import { StandardJSONSchemaV1, StandardSchemaV1, StandardTypedV1 } from "@standard-schema/spec";
2
+
3
+ //#region src/state/types.d.ts
4
+ interface CombinedProps<Input = unknown, Output = Input> extends StandardSchemaV1.Props<Input, Output>, StandardJSONSchemaV1.Props<Input, Output> {}
5
+ /**
6
+ * SerializableSchema is the core interface for any schema used by LangGraph state.
7
+ *
8
+ * @template Input - The type of input data the schema can be used to validate.
9
+ * @template Output - The type of output produced after validation, post-refinement/coercion.
10
+ *
11
+ * @remarks
12
+ * - SerializableSchema provides a single property, `~standard`, which must conform to
13
+ * both `StandardSchemaV1.Props` and `StandardJSONSchemaV1.Props`.
14
+ * - This ensures all schemas are compatible with both runtime validation (e.g., type checks,
15
+ * coercion, custom refinements) and structured schema export/generation (e.g., producing
16
+ * a compatible JSON Schema).
17
+ * - A value matching SerializableSchema can be passed directly to LangGraph state
18
+ * definitions, reducers, or other schema-accepting APIs.
19
+ *
20
+ * @example
21
+ * ```ts
22
+ * import { z } from "zod";
23
+ *
24
+ * // complies with SerializableSchema
25
+ * const zodSchema = z.object({ x: z.string() });
26
+ *
27
+ * // Use in a StateObject definition:
28
+ * const AgentState = new StateObject({
29
+ * data: schema
30
+ * });
31
+ * ```
32
+ */
33
+ interface SerializableSchema<Input = unknown, Output = Input> {
34
+ "~standard": CombinedProps<Input, Output>;
35
+ }
36
+ declare namespace SerializableSchema {
37
+ /**
38
+ * Infers the type of input expected by a SerializableSchema.
39
+ *
40
+ * @template T - A SerializableSchema instance.
41
+ * @returns The type of data that may be passed to the schema for validation.
42
+ *
43
+ * @example
44
+ * ```ts
45
+ * type MyInput = SerializableSchema.InferInput<typeof schema>;
46
+ * ```
47
+ */
48
+ type InferInput<T extends SerializableSchema> = StandardTypedV1.InferInput<T>;
49
+ /**
50
+ * Infers the output type yielded by a SerializableSchema, after parsing or coercion.
51
+ *
52
+ * @template T - A SerializableSchema instance.
53
+ * @returns The type produced by successfully validating/coercing input data.
54
+ *
55
+ * @example
56
+ * ```ts
57
+ * type MyOutput = SerializableSchema.InferOutput<typeof schema>;
58
+ * ```
59
+ */
60
+ type InferOutput<T extends SerializableSchema> = StandardTypedV1.InferOutput<T>;
61
+ }
62
+ /**
63
+ * Type guard to check if a given value is a Standard Schema V1 object.
64
+ *
65
+ * @remarks
66
+ * A Standard Schema object is expected to have a `~standard` property with a `validate` function.
67
+ * This guard does NOT check for JSON schema support.
68
+ *
69
+ * @typeParam Input - The type of input validated by this schema.
70
+ * @typeParam Output - The type of output produced after validation.
71
+ * @param schema - The value to test.
72
+ * @returns True if the schema conforms to the Standard Schema interface.
73
+ *
74
+ * @example
75
+ * ```ts
76
+ * if (isStandardSchema(mySchema)) {
77
+ * const result = mySchema["~standard"].validate(input);
78
+ * }
79
+ * ```
80
+ */
81
+ declare function isStandardSchema<Input = unknown, Output = Input>(schema: StandardSchemaV1<Input, Output>): schema is StandardSchemaV1<Input, Output>;
82
+ declare function isStandardSchema<Input = unknown, Output = Input>(schema: unknown): schema is StandardSchemaV1<Input, Output>;
83
+ /**
84
+ * Type guard to check if a given value is a Standard JSON Schema V1 object.
85
+ *
86
+ * @remarks
87
+ * A Standard JSON Schema object is expected to have a `~standard` property with a `jsonSchema` function.
88
+ * This may be used to generate a JSON Schema (for UI/form tooling, documentation, etc).
89
+ *
90
+ * @typeParam Input - The type of input described by this JSON schema.
91
+ * @typeParam Output - The type of output described by this JSON schema.
92
+ * @param schema - The value to test.
93
+ * @returns True if the schema exposes JSON schema generation.
94
+ *
95
+ * @example
96
+ * ```ts
97
+ * if (isStandardJSONSchema(mySchema)) {
98
+ * const jschema = mySchema["~standard"].jsonSchema();
99
+ * }
100
+ * ```
101
+ */
102
+
103
+ /**
104
+ * Type guard to check if a given value is a `SerializableSchema`, i.e.
105
+ * both a Standard Schema and a Standard JSON Schema object.
106
+ *
107
+ * @remarks
108
+ * This checks for both the presence of a Standard Schema V1 interface
109
+ * and the ability to generate a JSON schema.
110
+ *
111
+ * @typeParam Input - The type of input described by the schema.
112
+ * @typeParam Output - The type of output described by the schema.
113
+ * @param schema - The value to test.
114
+ * @returns True if the schema is a valid `SerializableSchema`.
115
+ *
116
+ * @example
117
+ * ```ts
118
+ * if (isSerializableSchema(schema)) {
119
+ * schema["~standard"].validate(data);
120
+ * const json = schema["~standard"].jsonSchema();
121
+ * }
122
+ * ```
123
+ */
124
+ declare function isSerializableSchema<Input = unknown, Output = Input>(schema: SerializableSchema<Input, Output>): schema is SerializableSchema<Input, Output>;
125
+ declare function isSerializableSchema<Input = unknown, Output = Input>(schema: unknown): schema is SerializableSchema<Input, Output>;
126
+ //#endregion
127
+ export { SerializableSchema, isSerializableSchema, isStandardSchema };
128
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","names":["StandardSchemaV1","StandardJSONSchemaV1","StandardTypedV1","CombinedProps","Input","Output","Props","SerializableSchema","T","InferInput","InferOutput","isStandardSchema","isStandardJSONSchema","isSerializableSchema"],"sources":["../../src/state/types.d.ts"],"sourcesContent":["import type { StandardSchemaV1, StandardJSONSchemaV1, StandardTypedV1 } from \"@standard-schema/spec\";\ninterface CombinedProps<Input = unknown, Output = Input> extends StandardSchemaV1.Props<Input, Output>, StandardJSONSchemaV1.Props<Input, Output> {\n}\n/**\n * SerializableSchema is the core interface for any schema used by LangGraph state.\n *\n * @template Input - The type of input data the schema can be used to validate.\n * @template Output - The type of output produced after validation, post-refinement/coercion.\n *\n * @remarks\n * - SerializableSchema provides a single property, `~standard`, which must conform to\n * both `StandardSchemaV1.Props` and `StandardJSONSchemaV1.Props`.\n * - This ensures all schemas are compatible with both runtime validation (e.g., type checks,\n * coercion, custom refinements) and structured schema export/generation (e.g., producing\n * a compatible JSON Schema).\n * - A value matching SerializableSchema can be passed directly to LangGraph state\n * definitions, reducers, or other schema-accepting APIs.\n *\n * @example\n * ```ts\n * import { z } from \"zod\";\n *\n * // complies with SerializableSchema\n * const zodSchema = z.object({ x: z.string() });\n *\n * // Use in a StateObject definition:\n * const AgentState = new StateObject({\n * data: schema\n * });\n * ```\n */\nexport interface SerializableSchema<Input = unknown, Output = Input> {\n \"~standard\": CombinedProps<Input, Output>;\n}\nexport declare namespace SerializableSchema {\n /**\n * Infers the type of input expected by a SerializableSchema.\n *\n * @template T - A SerializableSchema instance.\n * @returns The type of data that may be passed to the schema for validation.\n *\n * @example\n * ```ts\n * type MyInput = SerializableSchema.InferInput<typeof schema>;\n * ```\n */\n type InferInput<T extends SerializableSchema> = StandardTypedV1.InferInput<T>;\n /**\n * Infers the output type yielded by a SerializableSchema, after parsing or coercion.\n *\n * @template T - A SerializableSchema instance.\n * @returns The type produced by successfully validating/coercing input data.\n *\n * @example\n * ```ts\n * type MyOutput = SerializableSchema.InferOutput<typeof schema>;\n * ```\n */\n type InferOutput<T extends SerializableSchema> = StandardTypedV1.InferOutput<T>;\n}\n/**\n * Type guard to check if a given value is a Standard Schema V1 object.\n *\n * @remarks\n * A Standard Schema object is expected to have a `~standard` property with a `validate` function.\n * This guard does NOT check for JSON schema support.\n *\n * @typeParam Input - The type of input validated by this schema.\n * @typeParam Output - The type of output produced after validation.\n * @param schema - The value to test.\n * @returns True if the schema conforms to the Standard Schema interface.\n *\n * @example\n * ```ts\n * if (isStandardSchema(mySchema)) {\n * const result = mySchema[\"~standard\"].validate(input);\n * }\n * ```\n */\nexport declare function isStandardSchema<Input = unknown, Output = Input>(schema: StandardSchemaV1<Input, Output>): schema is StandardSchemaV1<Input, Output>;\nexport declare function isStandardSchema<Input = unknown, Output = Input>(schema: unknown): schema is StandardSchemaV1<Input, Output>;\n/**\n * Type guard to check if a given value is a Standard JSON Schema V1 object.\n *\n * @remarks\n * A Standard JSON Schema object is expected to have a `~standard` property with a `jsonSchema` function.\n * This may be used to generate a JSON Schema (for UI/form tooling, documentation, etc).\n *\n * @typeParam Input - The type of input described by this JSON schema.\n * @typeParam Output - The type of output described by this JSON schema.\n * @param schema - The value to test.\n * @returns True if the schema exposes JSON schema generation.\n *\n * @example\n * ```ts\n * if (isStandardJSONSchema(mySchema)) {\n * const jschema = mySchema[\"~standard\"].jsonSchema();\n * }\n * ```\n */\nexport declare function isStandardJSONSchema<Input = unknown, Output = Input>(schema: StandardJSONSchemaV1<Input, Output>): schema is StandardJSONSchemaV1<Input, Output>;\nexport declare function isStandardJSONSchema<Input = unknown, Output = Input>(schema: unknown): schema is StandardJSONSchemaV1<Input, Output>;\n/**\n * Type guard to check if a given value is a `SerializableSchema`, i.e.\n * both a Standard Schema and a Standard JSON Schema object.\n *\n * @remarks\n * This checks for both the presence of a Standard Schema V1 interface\n * and the ability to generate a JSON schema.\n *\n * @typeParam Input - The type of input described by the schema.\n * @typeParam Output - The type of output described by the schema.\n * @param schema - The value to test.\n * @returns True if the schema is a valid `SerializableSchema`.\n *\n * @example\n * ```ts\n * if (isSerializableSchema(schema)) {\n * schema[\"~standard\"].validate(data);\n * const json = schema[\"~standard\"].jsonSchema();\n * }\n * ```\n */\nexport declare function isSerializableSchema<Input = unknown, Output = Input>(schema: SerializableSchema<Input, Output>): schema is SerializableSchema<Input, Output>;\nexport declare function isSerializableSchema<Input = unknown, Output = Input>(schema: unknown): schema is SerializableSchema<Input, Output>;\nexport {};\n"],"mappings":";;;UACUG,wCAAwCC,eAAeJ,gBAAAA,CAAiBM,MAAMF,OAAOC,SAASJ,oBAAAA,CAAqBK,MAAMF,OAAOC;AADrC;;;;;;;;;;AA+BrG;;;;;;;AAGA;;;;;;;;;AA6CA;;AAAmED,UAhDlDG,kBAgDkDH,CAAAA,QAAAA,OAAAA,EAAAA,SAhDLA,KAgDKA,CAAAA,CAAAA;aAAgCA,EA/ClFD,aA+CkFC,CA/CpEA,KA+CoEA,EA/C7DC,MA+C6DD,CAAAA;;AAAjBJ,kBA7CzDO,kBAAAA,CA6CyDP;;;;;AAClF;;;;;;;EA2CwBa,KAAAA,UAAAA,CAAAA,UA7EMN,kBA6Ec,CAAA,GA7EQL,eAAAA,CAAgBO,UA6ExB,CA7EmCD,CA6EnC,CAAA;EAAA;;;;;;;;;AAC5C;;OAAuEJ,WAAAA,CAAAA,UAlExCG,kBAkEwCH,CAAAA,GAlElBF,eAAAA,CAAgBQ,WAkEEN,CAlEUI,CAkEVJ,CAAAA;;;;;;;;;;;;;;;;;;;;;iBA7C/CO,2CAA2CP,eAAeJ,iBAAiBI,OAAOC,oBAAoBL,iBAAiBI,OAAOC;iBAC9HM,2CAA2CP,mCAAmCJ,iBAAiBI,OAAOC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA2CtGQ,+CAA+CT,eAAeG,mBAAmBH,OAAOC,oBAAoBE,mBAAmBH,OAAOC;iBACtIQ,+CAA+CT,mCAAmCG,mBAAmBH,OAAOC"}
@@ -0,0 +1,14 @@
1
+ //#region src/state/types.ts
2
+ function isStandardSchema(schema) {
3
+ return typeof schema === "object" && schema !== null && "~standard" in schema && typeof schema["~standard"] === "object" && schema["~standard"] !== null && "validate" in schema["~standard"];
4
+ }
5
+ function isStandardJSONSchema(schema) {
6
+ return typeof schema === "object" && schema !== null && "~standard" in schema && typeof schema["~standard"] === "object" && schema["~standard"] !== null && "jsonSchema" in schema["~standard"];
7
+ }
8
+ function isSerializableSchema(schema) {
9
+ return isStandardSchema(schema) && isStandardJSONSchema(schema);
10
+ }
11
+
12
+ //#endregion
13
+ export { isSerializableSchema, isStandardJSONSchema, isStandardSchema };
14
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","names":[],"sources":["../../src/state/types.ts"],"sourcesContent":["import type {\n StandardSchemaV1,\n StandardJSONSchemaV1,\n StandardTypedV1,\n} from \"@standard-schema/spec\";\n\ninterface CombinedProps<Input = unknown, Output = Input>\n extends StandardSchemaV1.Props<Input, Output>,\n StandardJSONSchemaV1.Props<Input, Output> {}\n\n/**\n * SerializableSchema is the core interface for any schema used by LangGraph state.\n *\n * @template Input - The type of input data the schema can be used to validate.\n * @template Output - The type of output produced after validation, post-refinement/coercion.\n *\n * @remarks\n * - SerializableSchema provides a single property, `~standard`, which must conform to\n * both `StandardSchemaV1.Props` and `StandardJSONSchemaV1.Props`.\n * - This ensures all schemas are compatible with both runtime validation (e.g., type checks,\n * coercion, custom refinements) and structured schema export/generation (e.g., producing\n * a compatible JSON Schema).\n * - A value matching SerializableSchema can be passed directly to LangGraph state\n * definitions, reducers, or other schema-accepting APIs.\n *\n * @example\n * ```ts\n * import { z } from \"zod\";\n *\n * // complies with SerializableSchema\n * const zodSchema = z.object({ x: z.string() });\n *\n * // Use in a StateObject definition:\n * const AgentState = new StateObject({\n * data: schema\n * });\n * ```\n */\nexport interface SerializableSchema<Input = unknown, Output = Input> {\n \"~standard\": CombinedProps<Input, Output>;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-namespace\nexport declare namespace SerializableSchema {\n /**\n * Infers the type of input expected by a SerializableSchema.\n *\n * @template T - A SerializableSchema instance.\n * @returns The type of data that may be passed to the schema for validation.\n *\n * @example\n * ```ts\n * type MyInput = SerializableSchema.InferInput<typeof schema>;\n * ```\n */\n export type InferInput<T extends SerializableSchema> =\n StandardTypedV1.InferInput<T>;\n\n /**\n * Infers the output type yielded by a SerializableSchema, after parsing or coercion.\n *\n * @template T - A SerializableSchema instance.\n * @returns The type produced by successfully validating/coercing input data.\n *\n * @example\n * ```ts\n * type MyOutput = SerializableSchema.InferOutput<typeof schema>;\n * ```\n */\n export type InferOutput<T extends SerializableSchema> =\n StandardTypedV1.InferOutput<T>;\n}\n\n/**\n * Type guard to check if a given value is a Standard Schema V1 object.\n *\n * @remarks\n * A Standard Schema object is expected to have a `~standard` property with a `validate` function.\n * This guard does NOT check for JSON schema support.\n *\n * @typeParam Input - The type of input validated by this schema.\n * @typeParam Output - The type of output produced after validation.\n * @param schema - The value to test.\n * @returns True if the schema conforms to the Standard Schema interface.\n *\n * @example\n * ```ts\n * if (isStandardSchema(mySchema)) {\n * const result = mySchema[\"~standard\"].validate(input);\n * }\n * ```\n */\nexport function isStandardSchema<Input = unknown, Output = Input>(\n schema: StandardSchemaV1<Input, Output>\n): schema is StandardSchemaV1<Input, Output>;\nexport function isStandardSchema<Input = unknown, Output = Input>(\n schema: unknown\n): schema is StandardSchemaV1<Input, Output>;\nexport function isStandardSchema<Input = unknown, Output = Input>(\n schema: StandardSchemaV1<Input, Output> | unknown\n): schema is StandardSchemaV1<Input, Output> {\n return (\n typeof schema === \"object\" &&\n schema !== null &&\n \"~standard\" in schema &&\n typeof schema[\"~standard\"] === \"object\" &&\n schema[\"~standard\"] !== null &&\n \"validate\" in schema[\"~standard\"]\n );\n}\n\n/**\n * Type guard to check if a given value is a Standard JSON Schema V1 object.\n *\n * @remarks\n * A Standard JSON Schema object is expected to have a `~standard` property with a `jsonSchema` function.\n * This may be used to generate a JSON Schema (for UI/form tooling, documentation, etc).\n *\n * @typeParam Input - The type of input described by this JSON schema.\n * @typeParam Output - The type of output described by this JSON schema.\n * @param schema - The value to test.\n * @returns True if the schema exposes JSON schema generation.\n *\n * @example\n * ```ts\n * if (isStandardJSONSchema(mySchema)) {\n * const jschema = mySchema[\"~standard\"].jsonSchema();\n * }\n * ```\n */\nexport function isStandardJSONSchema<Input = unknown, Output = Input>(\n schema: StandardJSONSchemaV1<Input, Output>\n): schema is StandardJSONSchemaV1<Input, Output>;\nexport function isStandardJSONSchema<Input = unknown, Output = Input>(\n schema: unknown\n): schema is StandardJSONSchemaV1<Input, Output>;\nexport function isStandardJSONSchema<Input = unknown, Output = Input>(\n schema: StandardJSONSchemaV1<Input, Output> | unknown\n): schema is StandardJSONSchemaV1<Input, Output> {\n return (\n typeof schema === \"object\" &&\n schema !== null &&\n \"~standard\" in schema &&\n typeof schema[\"~standard\"] === \"object\" &&\n schema[\"~standard\"] !== null &&\n \"jsonSchema\" in schema[\"~standard\"]\n );\n}\n\n/**\n * Type guard to check if a given value is a `SerializableSchema`, i.e.\n * both a Standard Schema and a Standard JSON Schema object.\n *\n * @remarks\n * This checks for both the presence of a Standard Schema V1 interface\n * and the ability to generate a JSON schema.\n *\n * @typeParam Input - The type of input described by the schema.\n * @typeParam Output - The type of output described by the schema.\n * @param schema - The value to test.\n * @returns True if the schema is a valid `SerializableSchema`.\n *\n * @example\n * ```ts\n * if (isSerializableSchema(schema)) {\n * schema[\"~standard\"].validate(data);\n * const json = schema[\"~standard\"].jsonSchema();\n * }\n * ```\n */\nexport function isSerializableSchema<Input = unknown, Output = Input>(\n schema: SerializableSchema<Input, Output>\n): schema is SerializableSchema<Input, Output>;\nexport function isSerializableSchema<Input = unknown, Output = Input>(\n schema: unknown\n): schema is SerializableSchema<Input, Output>;\nexport function isSerializableSchema<Input = unknown, Output = Input>(\n schema: SerializableSchema<Input, Output> | unknown\n): schema is SerializableSchema<Input, Output> {\n return isStandardSchema(schema) && isStandardJSONSchema(schema);\n}\n"],"mappings":";AAkGA,SAAgB,iBACd,QAC2C;AAC3C,QACE,OAAO,WAAW,YAClB,WAAW,QACX,eAAe,UACf,OAAO,OAAO,iBAAiB,YAC/B,OAAO,iBAAiB,QACxB,cAAc,OAAO;;AA6BzB,SAAgB,qBACd,QAC+C;AAC/C,QACE,OAAO,WAAW,YAClB,WAAW,QACX,eAAe,UACf,OAAO,OAAO,iBAAiB,YAC/B,OAAO,iBAAiB,QACxB,gBAAgB,OAAO;;AA+B3B,SAAgB,qBACd,QAC6C;AAC7C,QAAO,iBAAiB,OAAO,IAAI,qBAAqB,OAAO"}
@@ -0,0 +1,2 @@
1
+ const require_reduced = require('./reduced.cjs');
2
+ const require_untracked = require('./untracked.cjs');
@@ -0,0 +1,4 @@
1
+ import { ReducedValue } from "./reduced.js";
2
+ import { UntrackedValue } from "./untracked.js";
3
+
4
+ export { };
@@ -0,0 +1,72 @@
1
+
2
+ //#region src/state/values/reduced.ts
3
+ /**
4
+ * Symbol for runtime identification of ReducedValue instances.
5
+ */
6
+ const REDUCED_VALUE_SYMBOL = Symbol.for("langgraph.state.reduced_value");
7
+ /**
8
+ * Represents a state field whose value is computed and updated using a reducer function.
9
+ *
10
+ * {@link ReducedValue} allows you to define accumulators, counters, aggregators, or other fields
11
+ * whose value is determined incrementally by applying a reducer to incoming updates.
12
+ *
13
+ * Each time a new input is provided, the reducer function is called with the current output
14
+ * and the new input, producing an updated value. Input validation can be controlled separately
15
+ * from output validation by providing an explicit input schema.
16
+ *
17
+ * @template Value - The type of the value stored in state and produced by reduction.
18
+ * @template Input - The type of updates accepted by the reducer.
19
+ *
20
+ * @example
21
+ * // Accumulator with distinct input validation
22
+ * const Sum = new ReducedValue(z.number(), {
23
+ * inputSchema: z.number().min(1),
24
+ * reducer: (total, toAdd) => total + toAdd
25
+ * });
26
+ *
27
+ * @example
28
+ * // Simple running max, using only the value schema
29
+ * const Max = new ReducedValue(z.number(), {
30
+ * reducer: (current, next) => Math.max(current, next)
31
+ * });
32
+ */
33
+ var ReducedValue = class {
34
+ /**
35
+ * Instance marker for runtime identification.
36
+ * @internal
37
+ */
38
+ [REDUCED_VALUE_SYMBOL] = true;
39
+ /**
40
+ * The schema that describes the type of value stored in state (i.e., after reduction).
41
+ * Note: We use `unknown` for the input type to allow schemas with `.default()` wrappers,
42
+ * where the input type includes `undefined`.
43
+ */
44
+ valueSchema;
45
+ /**
46
+ * The schema used to validate reducer inputs.
47
+ * If not specified explicitly, this defaults to `valueSchema`.
48
+ */
49
+ inputSchema;
50
+ /**
51
+ * The reducer function that combines a current output value and an incoming input.
52
+ */
53
+ reducer;
54
+ /**
55
+ * Optional extra fields to merge into the generated JSON Schema (e.g., for documentation or constraints).
56
+ */
57
+ jsonSchemaExtra;
58
+ constructor(valueSchema, init) {
59
+ this.reducer = init.reducer;
60
+ this.jsonSchemaExtra = init.jsonSchemaExtra;
61
+ this.valueSchema = valueSchema;
62
+ this.inputSchema = "inputSchema" in init ? init.inputSchema : valueSchema;
63
+ this.jsonSchemaExtra = init.jsonSchemaExtra;
64
+ }
65
+ static isInstance(value) {
66
+ return typeof value === "object" && value !== null && REDUCED_VALUE_SYMBOL in value && value[REDUCED_VALUE_SYMBOL] === true;
67
+ }
68
+ };
69
+
70
+ //#endregion
71
+ exports.ReducedValue = ReducedValue;
72
+ //# sourceMappingURL=reduced.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reduced.cjs","names":[],"sources":["../../../src/state/values/reduced.ts"],"sourcesContent":["import type { SerializableSchema } from \"../types.js\";\n\n/**\n * Symbol for runtime identification of ReducedValue instances.\n */\nexport const REDUCED_VALUE_SYMBOL = Symbol.for(\"langgraph.state.reduced_value\");\n\ninterface ReducedValueInitBase<Value = unknown> {\n /**\n * The reducer function that determines how new input values are combined with the current state.\n * Receives the current output value and a new input value, and must return the updated output.\n *\n * @param current - The current value held in state.\n * @param next - The new input value to apply to the reducer.\n * @returns The next value to be stored in state.\n *\n * @remarks\n * - The logic for updating state in response to new inputs lives in this function.\n */\n reducer: (current: Value, next: Value) => Value;\n\n /**\n * Optional extra fields to be added to the exported JSON Schema for documentation or additional constraints.\n *\n * @remarks\n * - Use this property to attach metadata or documentation to the generated JSON Schema representation\n * of this value.\n * - These fields are merged into the generated schema, which can assist with code generation, UI hints,\n * or external documentation.\n */\n jsonSchemaExtra?: Record<string, unknown>;\n}\n\ninterface ReducedValueInitWithSchema<Value = unknown, Input = Value> {\n /**\n * Schema describing the type and validation logic for reducer input values.\n *\n * @remarks\n * - If provided, new values passed to the reducer will be validated using this schema before reduction.\n * - This allows the reducer to accept inputs distinct from the type stored in the state (output type).\n */\n inputSchema: SerializableSchema<unknown, Input>;\n\n /**\n * The reducer function that determines how new input values are combined with the current state.\n * Receives the current output value and a new input value (validated using `inputSchema`), and returns the updated output.\n *\n * @param current - The current value held in state.\n * @param next - The new validated input value to be applied.\n * @returns The next value to be stored in state.\n *\n * @remarks\n * - The logic for updating state in response to new inputs lives in this function.\n */\n reducer: (current: Value, next: Input) => Value;\n\n /**\n * Optional extra fields to be added to the exported JSON Schema for documentation or additional constraints.\n *\n * @remarks\n * - Use this property to attach metadata or documentation to the generated JSON Schema representation\n * of this value.\n * - These fields are merged into the generated schema, which can assist with code generation, UI hints,\n * or external documentation.\n */\n jsonSchemaExtra?: Record<string, unknown>;\n}\n\n/**\n * Initialization options for {@link ReducedValue}.\n *\n * Two forms are supported:\n * 1. Provide only a reducer (and optionally `jsonSchemaExtra`)—in this case, the reducer's inputs are validated using the output value schema.\n * 2. Provide an explicit `inputSchema` field to distinguish the reducer's input type from the stored/output type.\n *\n * @template Value - The type of value stored and produced after reduction.\n * @template Input - The type of inputs accepted by the reducer.\n *\n * @property inputSchema - The schema describing reducer inputs. If omitted, will use the value schema.\n * @property reducer - A function that receives the current output value and a new input, and returns the new output.\n * @property jsonSchemaExtra - (Optional) Extra fields to merge into the exported JSON Schema for documentation or additional constraints.\n */\nexport type ReducedValueInit<Value = unknown, Input = Value> =\n | ReducedValueInitWithSchema<Value, Input>\n | ReducedValueInitBase<Value>;\n\n/**\n * Represents a state field whose value is computed and updated using a reducer function.\n *\n * {@link ReducedValue} allows you to define accumulators, counters, aggregators, or other fields\n * whose value is determined incrementally by applying a reducer to incoming updates.\n *\n * Each time a new input is provided, the reducer function is called with the current output\n * and the new input, producing an updated value. Input validation can be controlled separately\n * from output validation by providing an explicit input schema.\n *\n * @template Value - The type of the value stored in state and produced by reduction.\n * @template Input - The type of updates accepted by the reducer.\n *\n * @example\n * // Accumulator with distinct input validation\n * const Sum = new ReducedValue(z.number(), {\n * inputSchema: z.number().min(1),\n * reducer: (total, toAdd) => total + toAdd\n * });\n *\n * @example\n * // Simple running max, using only the value schema\n * const Max = new ReducedValue(z.number(), {\n * reducer: (current, next) => Math.max(current, next)\n * });\n */\nexport class ReducedValue<Value = unknown, Input = Value> {\n /**\n * Instance marker for runtime identification.\n * @internal\n */\n protected readonly [REDUCED_VALUE_SYMBOL] = true as const;\n\n /**\n * The schema that describes the type of value stored in state (i.e., after reduction).\n * Note: We use `unknown` for the input type to allow schemas with `.default()` wrappers,\n * where the input type includes `undefined`.\n */\n readonly valueSchema: SerializableSchema<unknown, Value>;\n\n /**\n * The schema used to validate reducer inputs.\n * If not specified explicitly, this defaults to `valueSchema`.\n */\n readonly inputSchema: SerializableSchema<unknown, Input | Value>;\n\n /**\n * The reducer function that combines a current output value and an incoming input.\n */\n readonly reducer: (current: Value, next: Input) => Value;\n\n /**\n * Optional extra fields to merge into the generated JSON Schema (e.g., for documentation or constraints).\n */\n readonly jsonSchemaExtra?: Record<string, unknown>;\n\n /**\n * Represents the value stored after all reductions.\n */\n declare ValueType: Value;\n\n /**\n * Represents the type that may be provided as input on each update.\n */\n declare InputType: Input;\n\n /**\n * Constructs a ReducedValue instance, which combines a value schema and a reducer function (plus optional input schema).\n *\n * @param valueSchema - The schema that describes the type of value stored in state (the \"running total\").\n * @param init - An object specifying the reducer function (required), inputSchema (optional), and jsonSchemaExtra (optional).\n */\n constructor(\n valueSchema: SerializableSchema<unknown, Value>,\n init: ReducedValueInitWithSchema<Value, Input>\n );\n\n constructor(\n valueSchema: SerializableSchema<unknown, Value>,\n init: ReducedValueInitBase<Value>\n );\n\n constructor(\n valueSchema: SerializableSchema<unknown, Value>,\n init: ReducedValueInit<Value, Input>\n ) {\n this.reducer = init.reducer as (current: Value, next: Input) => Value;\n this.jsonSchemaExtra = init.jsonSchemaExtra;\n this.valueSchema = valueSchema;\n this.inputSchema = \"inputSchema\" in init ? init.inputSchema : valueSchema;\n this.jsonSchemaExtra = init.jsonSchemaExtra;\n }\n\n /**\n * Type guard to check if a value is a ReducedValue instance.\n */\n static isInstance<Value = unknown, Input = Value>(\n value: ReducedValue<Value, Input>\n ): value is ReducedValue<Value, Input>;\n\n static isInstance(value: unknown): value is ReducedValue;\n\n static isInstance<Value = unknown, Input = Value>(\n value: ReducedValue<Value, Input> | unknown\n ): value is ReducedValue<Value, Input> {\n return (\n typeof value === \"object\" &&\n value !== null &&\n REDUCED_VALUE_SYMBOL in value &&\n value[REDUCED_VALUE_SYMBOL] === true\n );\n }\n}\n"],"mappings":";;;;;AAKA,MAAa,uBAAuB,OAAO,IAAI,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2G/E,IAAa,eAAb,MAA0D;;;;;CAKxD,CAAoB,wBAAwB;;;;;;CAO5C,AAAS;;;;;CAMT,AAAS;;;;CAKT,AAAS;;;;CAKT,AAAS;CA4BT,YACE,aACA,MACA;AACA,OAAK,UAAU,KAAK;AACpB,OAAK,kBAAkB,KAAK;AAC5B,OAAK,cAAc;AACnB,OAAK,cAAc,iBAAiB,OAAO,KAAK,cAAc;AAC9D,OAAK,kBAAkB,KAAK;;CAY9B,OAAO,WACL,OACqC;AACrC,SACE,OAAO,UAAU,YACjB,UAAU,QACV,wBAAwB,SACxB,MAAM,0BAA0B"}
@@ -0,0 +1,155 @@
1
+ import { SerializableSchema } from "../types.cjs";
2
+
3
+ //#region src/state/values/reduced.d.ts
4
+
5
+ /**
6
+ * Symbol for runtime identification of ReducedValue instances.
7
+ */
8
+ declare const REDUCED_VALUE_SYMBOL: unique symbol;
9
+ interface ReducedValueInitBase<Value = unknown> {
10
+ /**
11
+ * The reducer function that determines how new input values are combined with the current state.
12
+ * Receives the current output value and a new input value, and must return the updated output.
13
+ *
14
+ * @param current - The current value held in state.
15
+ * @param next - The new input value to apply to the reducer.
16
+ * @returns The next value to be stored in state.
17
+ *
18
+ * @remarks
19
+ * - The logic for updating state in response to new inputs lives in this function.
20
+ */
21
+ reducer: (current: Value, next: Value) => Value;
22
+ /**
23
+ * Optional extra fields to be added to the exported JSON Schema for documentation or additional constraints.
24
+ *
25
+ * @remarks
26
+ * - Use this property to attach metadata or documentation to the generated JSON Schema representation
27
+ * of this value.
28
+ * - These fields are merged into the generated schema, which can assist with code generation, UI hints,
29
+ * or external documentation.
30
+ */
31
+ jsonSchemaExtra?: Record<string, unknown>;
32
+ }
33
+ interface ReducedValueInitWithSchema<Value = unknown, Input = Value> {
34
+ /**
35
+ * Schema describing the type and validation logic for reducer input values.
36
+ *
37
+ * @remarks
38
+ * - If provided, new values passed to the reducer will be validated using this schema before reduction.
39
+ * - This allows the reducer to accept inputs distinct from the type stored in the state (output type).
40
+ */
41
+ inputSchema: SerializableSchema<unknown, Input>;
42
+ /**
43
+ * The reducer function that determines how new input values are combined with the current state.
44
+ * Receives the current output value and a new input value (validated using `inputSchema`), and returns the updated output.
45
+ *
46
+ * @param current - The current value held in state.
47
+ * @param next - The new validated input value to be applied.
48
+ * @returns The next value to be stored in state.
49
+ *
50
+ * @remarks
51
+ * - The logic for updating state in response to new inputs lives in this function.
52
+ */
53
+ reducer: (current: Value, next: Input) => Value;
54
+ /**
55
+ * Optional extra fields to be added to the exported JSON Schema for documentation or additional constraints.
56
+ *
57
+ * @remarks
58
+ * - Use this property to attach metadata or documentation to the generated JSON Schema representation
59
+ * of this value.
60
+ * - These fields are merged into the generated schema, which can assist with code generation, UI hints,
61
+ * or external documentation.
62
+ */
63
+ jsonSchemaExtra?: Record<string, unknown>;
64
+ }
65
+ /**
66
+ * Initialization options for {@link ReducedValue}.
67
+ *
68
+ * Two forms are supported:
69
+ * 1. Provide only a reducer (and optionally `jsonSchemaExtra`)—in this case, the reducer's inputs are validated using the output value schema.
70
+ * 2. Provide an explicit `inputSchema` field to distinguish the reducer's input type from the stored/output type.
71
+ *
72
+ * @template Value - The type of value stored and produced after reduction.
73
+ * @template Input - The type of inputs accepted by the reducer.
74
+ *
75
+ * @property inputSchema - The schema describing reducer inputs. If omitted, will use the value schema.
76
+ * @property reducer - A function that receives the current output value and a new input, and returns the new output.
77
+ * @property jsonSchemaExtra - (Optional) Extra fields to merge into the exported JSON Schema for documentation or additional constraints.
78
+ */
79
+ type ReducedValueInit<Value = unknown, Input = Value> = ReducedValueInitWithSchema<Value, Input> | ReducedValueInitBase<Value>;
80
+ /**
81
+ * Represents a state field whose value is computed and updated using a reducer function.
82
+ *
83
+ * {@link ReducedValue} allows you to define accumulators, counters, aggregators, or other fields
84
+ * whose value is determined incrementally by applying a reducer to incoming updates.
85
+ *
86
+ * Each time a new input is provided, the reducer function is called with the current output
87
+ * and the new input, producing an updated value. Input validation can be controlled separately
88
+ * from output validation by providing an explicit input schema.
89
+ *
90
+ * @template Value - The type of the value stored in state and produced by reduction.
91
+ * @template Input - The type of updates accepted by the reducer.
92
+ *
93
+ * @example
94
+ * // Accumulator with distinct input validation
95
+ * const Sum = new ReducedValue(z.number(), {
96
+ * inputSchema: z.number().min(1),
97
+ * reducer: (total, toAdd) => total + toAdd
98
+ * });
99
+ *
100
+ * @example
101
+ * // Simple running max, using only the value schema
102
+ * const Max = new ReducedValue(z.number(), {
103
+ * reducer: (current, next) => Math.max(current, next)
104
+ * });
105
+ */
106
+ declare class ReducedValue<Value = unknown, Input = Value> {
107
+ /**
108
+ * Instance marker for runtime identification.
109
+ * @internal
110
+ */
111
+ protected readonly [REDUCED_VALUE_SYMBOL]: true;
112
+ /**
113
+ * The schema that describes the type of value stored in state (i.e., after reduction).
114
+ * Note: We use `unknown` for the input type to allow schemas with `.default()` wrappers,
115
+ * where the input type includes `undefined`.
116
+ */
117
+ readonly valueSchema: SerializableSchema<unknown, Value>;
118
+ /**
119
+ * The schema used to validate reducer inputs.
120
+ * If not specified explicitly, this defaults to `valueSchema`.
121
+ */
122
+ readonly inputSchema: SerializableSchema<unknown, Input | Value>;
123
+ /**
124
+ * The reducer function that combines a current output value and an incoming input.
125
+ */
126
+ readonly reducer: (current: Value, next: Input) => Value;
127
+ /**
128
+ * Optional extra fields to merge into the generated JSON Schema (e.g., for documentation or constraints).
129
+ */
130
+ readonly jsonSchemaExtra?: Record<string, unknown>;
131
+ /**
132
+ * Represents the value stored after all reductions.
133
+ */
134
+ ValueType: Value;
135
+ /**
136
+ * Represents the type that may be provided as input on each update.
137
+ */
138
+ InputType: Input;
139
+ /**
140
+ * Constructs a ReducedValue instance, which combines a value schema and a reducer function (plus optional input schema).
141
+ *
142
+ * @param valueSchema - The schema that describes the type of value stored in state (the "running total").
143
+ * @param init - An object specifying the reducer function (required), inputSchema (optional), and jsonSchemaExtra (optional).
144
+ */
145
+ constructor(valueSchema: SerializableSchema<unknown, Value>, init: ReducedValueInitWithSchema<Value, Input>);
146
+ constructor(valueSchema: SerializableSchema<unknown, Value>, init: ReducedValueInitBase<Value>);
147
+ /**
148
+ * Type guard to check if a value is a ReducedValue instance.
149
+ */
150
+ static isInstance<Value = unknown, Input = Value>(value: ReducedValue<Value, Input>): value is ReducedValue<Value, Input>;
151
+ static isInstance(value: unknown): value is ReducedValue;
152
+ }
153
+ //#endregion
154
+ export { ReducedValue, ReducedValueInit };
155
+ //# sourceMappingURL=reduced.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reduced.d.cts","names":["SerializableSchema","REDUCED_VALUE_SYMBOL","ReducedValueInitBase","Value","Record","ReducedValueInitWithSchema","Input","ReducedValueInit","ReducedValue"],"sources":["../../../src/state/values/reduced.d.ts"],"sourcesContent":["import type { SerializableSchema } from \"../types.js\";\n/**\n * Symbol for runtime identification of ReducedValue instances.\n */\nexport declare const REDUCED_VALUE_SYMBOL: unique symbol;\ninterface ReducedValueInitBase<Value = unknown> {\n /**\n * The reducer function that determines how new input values are combined with the current state.\n * Receives the current output value and a new input value, and must return the updated output.\n *\n * @param current - The current value held in state.\n * @param next - The new input value to apply to the reducer.\n * @returns The next value to be stored in state.\n *\n * @remarks\n * - The logic for updating state in response to new inputs lives in this function.\n */\n reducer: (current: Value, next: Value) => Value;\n /**\n * Optional extra fields to be added to the exported JSON Schema for documentation or additional constraints.\n *\n * @remarks\n * - Use this property to attach metadata or documentation to the generated JSON Schema representation\n * of this value.\n * - These fields are merged into the generated schema, which can assist with code generation, UI hints,\n * or external documentation.\n */\n jsonSchemaExtra?: Record<string, unknown>;\n}\ninterface ReducedValueInitWithSchema<Value = unknown, Input = Value> {\n /**\n * Schema describing the type and validation logic for reducer input values.\n *\n * @remarks\n * - If provided, new values passed to the reducer will be validated using this schema before reduction.\n * - This allows the reducer to accept inputs distinct from the type stored in the state (output type).\n */\n inputSchema: SerializableSchema<unknown, Input>;\n /**\n * The reducer function that determines how new input values are combined with the current state.\n * Receives the current output value and a new input value (validated using `inputSchema`), and returns the updated output.\n *\n * @param current - The current value held in state.\n * @param next - The new validated input value to be applied.\n * @returns The next value to be stored in state.\n *\n * @remarks\n * - The logic for updating state in response to new inputs lives in this function.\n */\n reducer: (current: Value, next: Input) => Value;\n /**\n * Optional extra fields to be added to the exported JSON Schema for documentation or additional constraints.\n *\n * @remarks\n * - Use this property to attach metadata or documentation to the generated JSON Schema representation\n * of this value.\n * - These fields are merged into the generated schema, which can assist with code generation, UI hints,\n * or external documentation.\n */\n jsonSchemaExtra?: Record<string, unknown>;\n}\n/**\n * Initialization options for {@link ReducedValue}.\n *\n * Two forms are supported:\n * 1. Provide only a reducer (and optionally `jsonSchemaExtra`)—in this case, the reducer's inputs are validated using the output value schema.\n * 2. Provide an explicit `inputSchema` field to distinguish the reducer's input type from the stored/output type.\n *\n * @template Value - The type of value stored and produced after reduction.\n * @template Input - The type of inputs accepted by the reducer.\n *\n * @property inputSchema - The schema describing reducer inputs. If omitted, will use the value schema.\n * @property reducer - A function that receives the current output value and a new input, and returns the new output.\n * @property jsonSchemaExtra - (Optional) Extra fields to merge into the exported JSON Schema for documentation or additional constraints.\n */\nexport type ReducedValueInit<Value = unknown, Input = Value> = ReducedValueInitWithSchema<Value, Input> | ReducedValueInitBase<Value>;\n/**\n * Represents a state field whose value is computed and updated using a reducer function.\n *\n * {@link ReducedValue} allows you to define accumulators, counters, aggregators, or other fields\n * whose value is determined incrementally by applying a reducer to incoming updates.\n *\n * Each time a new input is provided, the reducer function is called with the current output\n * and the new input, producing an updated value. Input validation can be controlled separately\n * from output validation by providing an explicit input schema.\n *\n * @template Value - The type of the value stored in state and produced by reduction.\n * @template Input - The type of updates accepted by the reducer.\n *\n * @example\n * // Accumulator with distinct input validation\n * const Sum = new ReducedValue(z.number(), {\n * inputSchema: z.number().min(1),\n * reducer: (total, toAdd) => total + toAdd\n * });\n *\n * @example\n * // Simple running max, using only the value schema\n * const Max = new ReducedValue(z.number(), {\n * reducer: (current, next) => Math.max(current, next)\n * });\n */\nexport declare class ReducedValue<Value = unknown, Input = Value> {\n /**\n * Instance marker for runtime identification.\n * @internal\n */\n protected readonly [REDUCED_VALUE_SYMBOL]: true;\n /**\n * The schema that describes the type of value stored in state (i.e., after reduction).\n * Note: We use `unknown` for the input type to allow schemas with `.default()` wrappers,\n * where the input type includes `undefined`.\n */\n readonly valueSchema: SerializableSchema<unknown, Value>;\n /**\n * The schema used to validate reducer inputs.\n * If not specified explicitly, this defaults to `valueSchema`.\n */\n readonly inputSchema: SerializableSchema<unknown, Input | Value>;\n /**\n * The reducer function that combines a current output value and an incoming input.\n */\n readonly reducer: (current: Value, next: Input) => Value;\n /**\n * Optional extra fields to merge into the generated JSON Schema (e.g., for documentation or constraints).\n */\n readonly jsonSchemaExtra?: Record<string, unknown>;\n /**\n * Represents the value stored after all reductions.\n */\n ValueType: Value;\n /**\n * Represents the type that may be provided as input on each update.\n */\n InputType: Input;\n /**\n * Constructs a ReducedValue instance, which combines a value schema and a reducer function (plus optional input schema).\n *\n * @param valueSchema - The schema that describes the type of value stored in state (the \"running total\").\n * @param init - An object specifying the reducer function (required), inputSchema (optional), and jsonSchemaExtra (optional).\n */\n constructor(valueSchema: SerializableSchema<unknown, Value>, init: ReducedValueInitWithSchema<Value, Input>);\n constructor(valueSchema: SerializableSchema<unknown, Value>, init: ReducedValueInitBase<Value>);\n /**\n * Type guard to check if a value is a ReducedValue instance.\n */\n static isInstance<Value = unknown, Input = Value>(value: ReducedValue<Value, Input>): value is ReducedValue<Value, Input>;\n static isInstance(value: unknown): value is ReducedValue;\n}\nexport {};\n"],"mappings":";;;;;;AAIA;AACUE,cADWD,oBACS,EAAA,OAAA,MAAA;UAApBC,oBAAoB,CAAA,QAAA,OAAA,CAAA,CAAA;;;;;;AAsBF;;;;;;SAsBQI,EAAAA,CAAAA,OAAAA,EAhCbH,KAgCaG,EAAAA,IAAAA,EAhCAH,KAgCAG,EAAAA,GAhCUH,KAgCVG;;;;AA0BpC;;;;;;iBAA+HH,CAAAA,EAhDzGC,MAgDyGD,CAAAA,MAAAA,EAAAA,OAAAA,CAAAA;;UA9CrHE,0BA8CoH,CAAA,QAAA,OAAA,EAAA,QA9ChEF,KA8CgE,CAAA,CAAA;EA2BzGK;;;;;;;aAgByCL,EAjF7CH,kBAiF6CG,CAAAA,OAAAA,EAjFjBG,KAiFiBH,CAAAA;;;;;;;;;;;;SAuBSE,EAAAA,CAAAA,OAAAA,EA5FhDF,KA4FgDE,EAAAA,IAAAA,EA5FnCC,KA4FmCD,EAAAA,GA5FzBF,KA4FyBE;;;;;;;;;;iBAKgDC,CAAAA,EAvFjGF,MAuFiGE,CAAAA,MAAAA,EAAAA,OAAAA,CAAAA;;;;;;;;;;;;;;;;KAvE3GC,0CAA0CJ,SAASE,2BAA2BF,OAAOG,SAASJ,qBAAqBC;;;;;;;;;;;;;;;;;;;;;;;;;;;cA2B1GK,sCAAsCL;;;;;sBAKnCF,oBAAAA;;;;;;wBAMED,4BAA4BG;;;;;wBAK5BH,4BAA4BM,QAAQH;;;;8BAI9BA,aAAaG,UAAUH;;;;6BAIxBC;;;;aAIhBD;;;;aAIAG;;;;;;;2BAOcN,4BAA4BG,cAAcE,2BAA2BF,OAAOG;2BAC5EN,4BAA4BG,cAAcD,qBAAqBC;;;;6CAI7CA,cAAcK,aAAaL,OAAOG,kBAAkBE,aAAaL,OAAOG;8CACvEE"}
@@ -0,0 +1,155 @@
1
+ import { SerializableSchema } from "../types.js";
2
+
3
+ //#region src/state/values/reduced.d.ts
4
+
5
+ /**
6
+ * Symbol for runtime identification of ReducedValue instances.
7
+ */
8
+ declare const REDUCED_VALUE_SYMBOL: unique symbol;
9
+ interface ReducedValueInitBase<Value = unknown> {
10
+ /**
11
+ * The reducer function that determines how new input values are combined with the current state.
12
+ * Receives the current output value and a new input value, and must return the updated output.
13
+ *
14
+ * @param current - The current value held in state.
15
+ * @param next - The new input value to apply to the reducer.
16
+ * @returns The next value to be stored in state.
17
+ *
18
+ * @remarks
19
+ * - The logic for updating state in response to new inputs lives in this function.
20
+ */
21
+ reducer: (current: Value, next: Value) => Value;
22
+ /**
23
+ * Optional extra fields to be added to the exported JSON Schema for documentation or additional constraints.
24
+ *
25
+ * @remarks
26
+ * - Use this property to attach metadata or documentation to the generated JSON Schema representation
27
+ * of this value.
28
+ * - These fields are merged into the generated schema, which can assist with code generation, UI hints,
29
+ * or external documentation.
30
+ */
31
+ jsonSchemaExtra?: Record<string, unknown>;
32
+ }
33
+ interface ReducedValueInitWithSchema<Value = unknown, Input = Value> {
34
+ /**
35
+ * Schema describing the type and validation logic for reducer input values.
36
+ *
37
+ * @remarks
38
+ * - If provided, new values passed to the reducer will be validated using this schema before reduction.
39
+ * - This allows the reducer to accept inputs distinct from the type stored in the state (output type).
40
+ */
41
+ inputSchema: SerializableSchema<unknown, Input>;
42
+ /**
43
+ * The reducer function that determines how new input values are combined with the current state.
44
+ * Receives the current output value and a new input value (validated using `inputSchema`), and returns the updated output.
45
+ *
46
+ * @param current - The current value held in state.
47
+ * @param next - The new validated input value to be applied.
48
+ * @returns The next value to be stored in state.
49
+ *
50
+ * @remarks
51
+ * - The logic for updating state in response to new inputs lives in this function.
52
+ */
53
+ reducer: (current: Value, next: Input) => Value;
54
+ /**
55
+ * Optional extra fields to be added to the exported JSON Schema for documentation or additional constraints.
56
+ *
57
+ * @remarks
58
+ * - Use this property to attach metadata or documentation to the generated JSON Schema representation
59
+ * of this value.
60
+ * - These fields are merged into the generated schema, which can assist with code generation, UI hints,
61
+ * or external documentation.
62
+ */
63
+ jsonSchemaExtra?: Record<string, unknown>;
64
+ }
65
+ /**
66
+ * Initialization options for {@link ReducedValue}.
67
+ *
68
+ * Two forms are supported:
69
+ * 1. Provide only a reducer (and optionally `jsonSchemaExtra`)—in this case, the reducer's inputs are validated using the output value schema.
70
+ * 2. Provide an explicit `inputSchema` field to distinguish the reducer's input type from the stored/output type.
71
+ *
72
+ * @template Value - The type of value stored and produced after reduction.
73
+ * @template Input - The type of inputs accepted by the reducer.
74
+ *
75
+ * @property inputSchema - The schema describing reducer inputs. If omitted, will use the value schema.
76
+ * @property reducer - A function that receives the current output value and a new input, and returns the new output.
77
+ * @property jsonSchemaExtra - (Optional) Extra fields to merge into the exported JSON Schema for documentation or additional constraints.
78
+ */
79
+ type ReducedValueInit<Value = unknown, Input = Value> = ReducedValueInitWithSchema<Value, Input> | ReducedValueInitBase<Value>;
80
+ /**
81
+ * Represents a state field whose value is computed and updated using a reducer function.
82
+ *
83
+ * {@link ReducedValue} allows you to define accumulators, counters, aggregators, or other fields
84
+ * whose value is determined incrementally by applying a reducer to incoming updates.
85
+ *
86
+ * Each time a new input is provided, the reducer function is called with the current output
87
+ * and the new input, producing an updated value. Input validation can be controlled separately
88
+ * from output validation by providing an explicit input schema.
89
+ *
90
+ * @template Value - The type of the value stored in state and produced by reduction.
91
+ * @template Input - The type of updates accepted by the reducer.
92
+ *
93
+ * @example
94
+ * // Accumulator with distinct input validation
95
+ * const Sum = new ReducedValue(z.number(), {
96
+ * inputSchema: z.number().min(1),
97
+ * reducer: (total, toAdd) => total + toAdd
98
+ * });
99
+ *
100
+ * @example
101
+ * // Simple running max, using only the value schema
102
+ * const Max = new ReducedValue(z.number(), {
103
+ * reducer: (current, next) => Math.max(current, next)
104
+ * });
105
+ */
106
+ declare class ReducedValue<Value = unknown, Input = Value> {
107
+ /**
108
+ * Instance marker for runtime identification.
109
+ * @internal
110
+ */
111
+ protected readonly [REDUCED_VALUE_SYMBOL]: true;
112
+ /**
113
+ * The schema that describes the type of value stored in state (i.e., after reduction).
114
+ * Note: We use `unknown` for the input type to allow schemas with `.default()` wrappers,
115
+ * where the input type includes `undefined`.
116
+ */
117
+ readonly valueSchema: SerializableSchema<unknown, Value>;
118
+ /**
119
+ * The schema used to validate reducer inputs.
120
+ * If not specified explicitly, this defaults to `valueSchema`.
121
+ */
122
+ readonly inputSchema: SerializableSchema<unknown, Input | Value>;
123
+ /**
124
+ * The reducer function that combines a current output value and an incoming input.
125
+ */
126
+ readonly reducer: (current: Value, next: Input) => Value;
127
+ /**
128
+ * Optional extra fields to merge into the generated JSON Schema (e.g., for documentation or constraints).
129
+ */
130
+ readonly jsonSchemaExtra?: Record<string, unknown>;
131
+ /**
132
+ * Represents the value stored after all reductions.
133
+ */
134
+ ValueType: Value;
135
+ /**
136
+ * Represents the type that may be provided as input on each update.
137
+ */
138
+ InputType: Input;
139
+ /**
140
+ * Constructs a ReducedValue instance, which combines a value schema and a reducer function (plus optional input schema).
141
+ *
142
+ * @param valueSchema - The schema that describes the type of value stored in state (the "running total").
143
+ * @param init - An object specifying the reducer function (required), inputSchema (optional), and jsonSchemaExtra (optional).
144
+ */
145
+ constructor(valueSchema: SerializableSchema<unknown, Value>, init: ReducedValueInitWithSchema<Value, Input>);
146
+ constructor(valueSchema: SerializableSchema<unknown, Value>, init: ReducedValueInitBase<Value>);
147
+ /**
148
+ * Type guard to check if a value is a ReducedValue instance.
149
+ */
150
+ static isInstance<Value = unknown, Input = Value>(value: ReducedValue<Value, Input>): value is ReducedValue<Value, Input>;
151
+ static isInstance(value: unknown): value is ReducedValue;
152
+ }
153
+ //#endregion
154
+ export { ReducedValue, ReducedValueInit };
155
+ //# sourceMappingURL=reduced.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reduced.d.ts","names":["SerializableSchema","REDUCED_VALUE_SYMBOL","ReducedValueInitBase","Value","Record","ReducedValueInitWithSchema","Input","ReducedValueInit","ReducedValue"],"sources":["../../../src/state/values/reduced.d.ts"],"sourcesContent":["import type { SerializableSchema } from \"../types.js\";\n/**\n * Symbol for runtime identification of ReducedValue instances.\n */\nexport declare const REDUCED_VALUE_SYMBOL: unique symbol;\ninterface ReducedValueInitBase<Value = unknown> {\n /**\n * The reducer function that determines how new input values are combined with the current state.\n * Receives the current output value and a new input value, and must return the updated output.\n *\n * @param current - The current value held in state.\n * @param next - The new input value to apply to the reducer.\n * @returns The next value to be stored in state.\n *\n * @remarks\n * - The logic for updating state in response to new inputs lives in this function.\n */\n reducer: (current: Value, next: Value) => Value;\n /**\n * Optional extra fields to be added to the exported JSON Schema for documentation or additional constraints.\n *\n * @remarks\n * - Use this property to attach metadata or documentation to the generated JSON Schema representation\n * of this value.\n * - These fields are merged into the generated schema, which can assist with code generation, UI hints,\n * or external documentation.\n */\n jsonSchemaExtra?: Record<string, unknown>;\n}\ninterface ReducedValueInitWithSchema<Value = unknown, Input = Value> {\n /**\n * Schema describing the type and validation logic for reducer input values.\n *\n * @remarks\n * - If provided, new values passed to the reducer will be validated using this schema before reduction.\n * - This allows the reducer to accept inputs distinct from the type stored in the state (output type).\n */\n inputSchema: SerializableSchema<unknown, Input>;\n /**\n * The reducer function that determines how new input values are combined with the current state.\n * Receives the current output value and a new input value (validated using `inputSchema`), and returns the updated output.\n *\n * @param current - The current value held in state.\n * @param next - The new validated input value to be applied.\n * @returns The next value to be stored in state.\n *\n * @remarks\n * - The logic for updating state in response to new inputs lives in this function.\n */\n reducer: (current: Value, next: Input) => Value;\n /**\n * Optional extra fields to be added to the exported JSON Schema for documentation or additional constraints.\n *\n * @remarks\n * - Use this property to attach metadata or documentation to the generated JSON Schema representation\n * of this value.\n * - These fields are merged into the generated schema, which can assist with code generation, UI hints,\n * or external documentation.\n */\n jsonSchemaExtra?: Record<string, unknown>;\n}\n/**\n * Initialization options for {@link ReducedValue}.\n *\n * Two forms are supported:\n * 1. Provide only a reducer (and optionally `jsonSchemaExtra`)—in this case, the reducer's inputs are validated using the output value schema.\n * 2. Provide an explicit `inputSchema` field to distinguish the reducer's input type from the stored/output type.\n *\n * @template Value - The type of value stored and produced after reduction.\n * @template Input - The type of inputs accepted by the reducer.\n *\n * @property inputSchema - The schema describing reducer inputs. If omitted, will use the value schema.\n * @property reducer - A function that receives the current output value and a new input, and returns the new output.\n * @property jsonSchemaExtra - (Optional) Extra fields to merge into the exported JSON Schema for documentation or additional constraints.\n */\nexport type ReducedValueInit<Value = unknown, Input = Value> = ReducedValueInitWithSchema<Value, Input> | ReducedValueInitBase<Value>;\n/**\n * Represents a state field whose value is computed and updated using a reducer function.\n *\n * {@link ReducedValue} allows you to define accumulators, counters, aggregators, or other fields\n * whose value is determined incrementally by applying a reducer to incoming updates.\n *\n * Each time a new input is provided, the reducer function is called with the current output\n * and the new input, producing an updated value. Input validation can be controlled separately\n * from output validation by providing an explicit input schema.\n *\n * @template Value - The type of the value stored in state and produced by reduction.\n * @template Input - The type of updates accepted by the reducer.\n *\n * @example\n * // Accumulator with distinct input validation\n * const Sum = new ReducedValue(z.number(), {\n * inputSchema: z.number().min(1),\n * reducer: (total, toAdd) => total + toAdd\n * });\n *\n * @example\n * // Simple running max, using only the value schema\n * const Max = new ReducedValue(z.number(), {\n * reducer: (current, next) => Math.max(current, next)\n * });\n */\nexport declare class ReducedValue<Value = unknown, Input = Value> {\n /**\n * Instance marker for runtime identification.\n * @internal\n */\n protected readonly [REDUCED_VALUE_SYMBOL]: true;\n /**\n * The schema that describes the type of value stored in state (i.e., after reduction).\n * Note: We use `unknown` for the input type to allow schemas with `.default()` wrappers,\n * where the input type includes `undefined`.\n */\n readonly valueSchema: SerializableSchema<unknown, Value>;\n /**\n * The schema used to validate reducer inputs.\n * If not specified explicitly, this defaults to `valueSchema`.\n */\n readonly inputSchema: SerializableSchema<unknown, Input | Value>;\n /**\n * The reducer function that combines a current output value and an incoming input.\n */\n readonly reducer: (current: Value, next: Input) => Value;\n /**\n * Optional extra fields to merge into the generated JSON Schema (e.g., for documentation or constraints).\n */\n readonly jsonSchemaExtra?: Record<string, unknown>;\n /**\n * Represents the value stored after all reductions.\n */\n ValueType: Value;\n /**\n * Represents the type that may be provided as input on each update.\n */\n InputType: Input;\n /**\n * Constructs a ReducedValue instance, which combines a value schema and a reducer function (plus optional input schema).\n *\n * @param valueSchema - The schema that describes the type of value stored in state (the \"running total\").\n * @param init - An object specifying the reducer function (required), inputSchema (optional), and jsonSchemaExtra (optional).\n */\n constructor(valueSchema: SerializableSchema<unknown, Value>, init: ReducedValueInitWithSchema<Value, Input>);\n constructor(valueSchema: SerializableSchema<unknown, Value>, init: ReducedValueInitBase<Value>);\n /**\n * Type guard to check if a value is a ReducedValue instance.\n */\n static isInstance<Value = unknown, Input = Value>(value: ReducedValue<Value, Input>): value is ReducedValue<Value, Input>;\n static isInstance(value: unknown): value is ReducedValue;\n}\nexport {};\n"],"mappings":";;;;;;AAIA;AACUE,cADWD,oBACS,EAAA,OAAA,MAAA;UAApBC,oBAAoB,CAAA,QAAA,OAAA,CAAA,CAAA;;;;;;AAsBF;;;;;;SAsBQI,EAAAA,CAAAA,OAAAA,EAhCbH,KAgCaG,EAAAA,IAAAA,EAhCAH,KAgCAG,EAAAA,GAhCUH,KAgCVG;;;;AA0BpC;;;;;;iBAA+HH,CAAAA,EAhDzGC,MAgDyGD,CAAAA,MAAAA,EAAAA,OAAAA,CAAAA;;UA9CrHE,0BA8CoH,CAAA,QAAA,OAAA,EAAA,QA9ChEF,KA8CgE,CAAA,CAAA;EA2BzGK;;;;;;;aAgByCL,EAjF7CH,kBAiF6CG,CAAAA,OAAAA,EAjFjBG,KAiFiBH,CAAAA;;;;;;;;;;;;SAuBSE,EAAAA,CAAAA,OAAAA,EA5FhDF,KA4FgDE,EAAAA,IAAAA,EA5FnCC,KA4FmCD,EAAAA,GA5FzBF,KA4FyBE;;;;;;;;;;iBAKgDC,CAAAA,EAvFjGF,MAuFiGE,CAAAA,MAAAA,EAAAA,OAAAA,CAAAA;;;;;;;;;;;;;;;;KAvE3GC,0CAA0CJ,SAASE,2BAA2BF,OAAOG,SAASJ,qBAAqBC;;;;;;;;;;;;;;;;;;;;;;;;;;;cA2B1GK,sCAAsCL;;;;;sBAKnCF,oBAAAA;;;;;;wBAMED,4BAA4BG;;;;;wBAK5BH,4BAA4BM,QAAQH;;;;8BAI9BA,aAAaG,UAAUH;;;;6BAIxBC;;;;aAIhBD;;;;aAIAG;;;;;;;2BAOcN,4BAA4BG,cAAcE,2BAA2BF,OAAOG;2BAC5EN,4BAA4BG,cAAcD,qBAAqBC;;;;6CAI7CA,cAAcK,aAAaL,OAAOG,kBAAkBE,aAAaL,OAAOG;8CACvEE"}