effect-dynamodb 1.24.0 → 1.25.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 (77) hide show
  1. package/dist/Aggregate.d.ts +5 -2
  2. package/dist/Aggregate.d.ts.map +1 -1
  3. package/dist/Aggregate.js +136 -53
  4. package/dist/Aggregate.js.map +1 -1
  5. package/dist/Batch.d.ts +14 -5
  6. package/dist/Batch.d.ts.map +1 -1
  7. package/dist/Batch.js +184 -119
  8. package/dist/Batch.js.map +1 -1
  9. package/dist/Collection.d.ts.map +1 -1
  10. package/dist/Collection.js +2 -4
  11. package/dist/Collection.js.map +1 -1
  12. package/dist/DynamoClient.d.ts.map +1 -1
  13. package/dist/DynamoClient.js +42 -14
  14. package/dist/DynamoClient.js.map +1 -1
  15. package/dist/Entity.d.ts +19 -13
  16. package/dist/Entity.d.ts.map +1 -1
  17. package/dist/Entity.js +287 -226
  18. package/dist/Entity.js.map +1 -1
  19. package/dist/EventStore.d.ts +416 -73
  20. package/dist/EventStore.d.ts.map +1 -1
  21. package/dist/EventStore.js +525 -181
  22. package/dist/EventStore.js.map +1 -1
  23. package/dist/Query.d.ts +47 -14
  24. package/dist/Query.d.ts.map +1 -1
  25. package/dist/Query.js +190 -68
  26. package/dist/Query.js.map +1 -1
  27. package/dist/Table.d.ts +56 -6
  28. package/dist/Table.d.ts.map +1 -1
  29. package/dist/Table.js +134 -54
  30. package/dist/Table.js.map +1 -1
  31. package/dist/Transaction.d.ts +8 -0
  32. package/dist/Transaction.d.ts.map +1 -1
  33. package/dist/Transaction.js +67 -22
  34. package/dist/Transaction.js.map +1 -1
  35. package/dist/VectorSearchEmulation.d.ts +3 -2
  36. package/dist/VectorSearchEmulation.d.ts.map +1 -1
  37. package/dist/VectorSearchEmulation.js +14 -2
  38. package/dist/VectorSearchEmulation.js.map +1 -1
  39. package/dist/internal/BoundQuery.d.ts +3 -2
  40. package/dist/internal/BoundQuery.d.ts.map +1 -1
  41. package/dist/internal/BoundQuery.js.map +1 -1
  42. package/dist/internal/BoundVectorQuery.d.ts +5 -1
  43. package/dist/internal/BoundVectorQuery.d.ts.map +1 -1
  44. package/dist/internal/BoundVectorQuery.js +17 -5
  45. package/dist/internal/BoundVectorQuery.js.map +1 -1
  46. package/dist/internal/EntityCombinators.d.ts +8 -5
  47. package/dist/internal/EntityCombinators.d.ts.map +1 -1
  48. package/dist/internal/EntityCombinators.js +8 -5
  49. package/dist/internal/EntityCombinators.js.map +1 -1
  50. package/dist/internal/EntityOps.d.ts +1 -1
  51. package/dist/internal/Expr.d.ts +4 -0
  52. package/dist/internal/Expr.d.ts.map +1 -1
  53. package/dist/internal/Expr.js +6 -4
  54. package/dist/internal/Expr.js.map +1 -1
  55. package/dist/internal/ExpressionLimits.d.ts +45 -0
  56. package/dist/internal/ExpressionLimits.d.ts.map +1 -0
  57. package/dist/internal/ExpressionLimits.js +89 -0
  58. package/dist/internal/ExpressionLimits.js.map +1 -0
  59. package/dist/internal/Hydrate.d.ts +62 -0
  60. package/dist/internal/Hydrate.d.ts.map +1 -0
  61. package/dist/internal/Hydrate.js +191 -0
  62. package/dist/internal/Hydrate.js.map +1 -0
  63. package/dist/internal/ItemSize.d.ts +60 -24
  64. package/dist/internal/ItemSize.d.ts.map +1 -1
  65. package/dist/internal/ItemSize.js +122 -39
  66. package/dist/internal/ItemSize.js.map +1 -1
  67. package/dist/internal/TransactWriteOps.d.ts +22 -46
  68. package/dist/internal/TransactWriteOps.d.ts.map +1 -1
  69. package/dist/internal/TransactWriteOps.js +26 -95
  70. package/dist/internal/TransactWriteOps.js.map +1 -1
  71. package/dist/internal/WriteDiagnosis.d.ts +353 -0
  72. package/dist/internal/WriteDiagnosis.d.ts.map +1 -0
  73. package/dist/internal/WriteDiagnosis.js +1028 -0
  74. package/dist/internal/WriteDiagnosis.js.map +1 -0
  75. package/dist/internal/sparse_check.js +43 -79
  76. package/dist/internal/sparse_check.js.map +1 -1
  77. package/package.json +2 -2
@@ -0,0 +1,353 @@
1
+ /**
2
+ * @internal Failure-time diagnosis of DynamoDB's rejections (#144).
3
+ *
4
+ * The library does not pre-check limits or request rules DynamoDB enforces
5
+ * itself — the 400 KB item, the 4 MB and 100-item transaction, the 2048-byte
6
+ * partition key and 1024-byte sort key, one operation per item, the limits on
7
+ * one expression, an `IN ()` with no operands, an empty key value, a reversed
8
+ * `BETWEEN`, a consistent read of a GSI, a table's vector index limits, a
9
+ * vector search's `TopK`. It sends the request; when DynamoDB rejects it, this
10
+ * module:
11
+ *
12
+ * 1. **recognises** the rejection by a stable fragment of its message (a
13
+ * request-wide `ValidationException` or `LimitExceededException`, or a
14
+ * `TransactionCanceledException` whose positional reason carries
15
+ * `Code: "ValidationError"`);
16
+ * 2. **confirms** it against the request the site sent — an item count, a
17
+ * key's UTF-8 bytes, an expression's length or operators, two entries
18
+ * naming one item, an empty key value, the order of two bounds (each
19
+ * confirmed only when the request breaks the rule), or, for item and
20
+ * transaction sizes, by checking the request holds something the message
21
+ * can apply to and measuring it exactly (`ItemSize.ts`);
22
+ * 3. **attributes** it to the culprit, using the targets the site built.
23
+ *
24
+ * A site turns the {@link Diagnosis} into its own tagged error with
25
+ * DynamoDB's error kept as the cause ({@link withCause}); anything
26
+ * unrecognised or unconfirmed passes through unchanged. Nothing is measured,
27
+ * and no target is built, unless DynamoDB has rejected the request.
28
+ *
29
+ * Every site goes through {@link diagnoseFailure}: writes ({@link SentWrite}),
30
+ * reads ({@link SentRead}), table management ({@link SentTable}) and vector
31
+ * searches ({@link SentSearch}) share the one recognise / confirm / rewrite
32
+ * path.
33
+ */
34
+ import type { AttributeValue, TransactGetItem, TransactWriteItem, WriteRequest } from "@aws-sdk/client-dynamodb";
35
+ import { ValidationError } from "@effect-dynamodb/schema/Errors.js";
36
+ import { Effect } from "effect";
37
+ /** DynamoDB's limit on a partition (hash) key value, in UTF-8 bytes. */
38
+ export declare const PARTITION_KEY_MAX_BYTES = 2048;
39
+ /** DynamoDB's limit on a sort (range) key value, in UTF-8 bytes. */
40
+ export declare const SORT_KEY_MAX_BYTES = 1024;
41
+ /**
42
+ * The key attributes a write can carry — its table's and its indexes' — by
43
+ * kind, so an over-long key value can be measured against its limit.
44
+ */
45
+ export type KeyAttributes = {
46
+ readonly partition: ReadonlyArray<string>;
47
+ readonly sort: ReadonlyArray<string>;
48
+ };
49
+ /** The item a transact entry writes or checks, and how to name it in an error. */
50
+ export type TransactItemTarget = {
51
+ /** Its table and primary key, as one comparable string. */
52
+ readonly identity: string;
53
+ /** The entity (or stream) it belongs to. */
54
+ readonly entityType: string;
55
+ /** What put it in the transaction: `operation 2 (User)`, `the event at version 4`. */
56
+ readonly source: string;
57
+ /** The key, readable: `pk=…, sk=…`. */
58
+ readonly key: string;
59
+ };
60
+ /**
61
+ * The target of a transact entry in `tableName`, keyed by `keyFields` (the
62
+ * table's primary key attributes): read from a Put's item, or any other
63
+ * entry's `Key` (a `TransactGetItems` entry's included).
64
+ */
65
+ export declare const transactItemTarget: (item: TransactWriteItem | TransactGetItem, tableName: string, keyFields: ReadonlyArray<string>, entityType: string, source: string) => TransactItemTarget;
66
+ /**
67
+ * What a writing site sent, as the diagnosis needs it. A single-item write is
68
+ * given in its transact-entry form (`{ Put }`, `{ Update }`, `{ Delete }`); a
69
+ * batch as its requests flattened to the same form ({@link batchEntries}).
70
+ * Targets are thunks: built only once DynamoDB has rejected the request.
71
+ *
72
+ * `callerCondition` is the caller's own `.condition()` on the entry at an
73
+ * index (the rest of its `ConditionExpression` is the library's guard), to
74
+ * say how much of an expression rejected for its size is the caller's.
75
+ */
76
+ export type SentWrite = {
77
+ readonly _tag: "Item";
78
+ readonly item: TransactWriteItem;
79
+ readonly target: () => TransactItemTarget;
80
+ readonly callerCondition?: (() => string | undefined) | undefined;
81
+ } | {
82
+ readonly _tag: "Transaction";
83
+ readonly items: ReadonlyArray<TransactWriteItem>;
84
+ readonly targets: () => ReadonlyArray<TransactItemTarget>;
85
+ readonly callerCondition?: ((index: number) => string | undefined) | undefined;
86
+ } | {
87
+ readonly _tag: "Batch";
88
+ readonly items: ReadonlyArray<TransactWriteItem>;
89
+ readonly targets: () => ReadonlyArray<TransactItemTarget>;
90
+ } | {
91
+ readonly _tag: "TransactGet";
92
+ readonly count: number;
93
+ /** The item each `Get` reads, to name a repeated one. */
94
+ readonly targets?: (() => ReadonlyArray<TransactItemTarget>) | undefined;
95
+ } | {
96
+ /** A `BatchGetItem` request: the item each of its keys reads, in request order. */
97
+ readonly _tag: "BatchGet";
98
+ readonly targets: () => ReadonlyArray<TransactItemTarget>;
99
+ };
100
+ /** What a reading site sent: the `Query` / `Scan` request, as sent. */
101
+ export type SentRead = {
102
+ readonly _tag: "Read";
103
+ readonly scan: boolean;
104
+ readonly input: {
105
+ readonly IndexName?: string | undefined;
106
+ readonly KeyConditionExpression?: string | undefined;
107
+ readonly FilterExpression?: string | undefined;
108
+ readonly ExpressionAttributeNames?: Record<string, string> | undefined;
109
+ readonly ExpressionAttributeValues?: Record<string, AttributeValue> | undefined;
110
+ readonly ConsistentRead?: boolean | undefined;
111
+ };
112
+ };
113
+ /** What a vector search sent: its `SearchVectors` request's `TopK`. */
114
+ export type SentSearch = {
115
+ readonly _tag: "Search";
116
+ readonly index: string;
117
+ readonly topK: number;
118
+ };
119
+ /** A vector index as a `CreateTable` / `UpdateTable` request declares it. */
120
+ export type SentVectorIndex = {
121
+ readonly IndexName?: string | undefined;
122
+ readonly Dimensions?: number | undefined;
123
+ readonly SearchSchema?: ReadonlyArray<{
124
+ readonly AttributeName?: string | undefined;
125
+ readonly SearchSchemaElementType?: string | undefined;
126
+ }> | undefined;
127
+ };
128
+ /** What a table-management site sent: the vector indexes of its request. */
129
+ export type SentTable = {
130
+ readonly _tag: "Table";
131
+ readonly operation: "CreateTable" | "UpdateTable";
132
+ /** The vector indexes the request creates. */
133
+ readonly vectorIndexes: ReadonlyArray<SentVectorIndex>;
134
+ /** The entities sharing a physical vector index, to name them. */
135
+ readonly sharers: (indexName: string) => ReadonlyArray<string>;
136
+ /** How many vector indexes the table's entities declare in all. */
137
+ readonly declared: number;
138
+ /**
139
+ * `UpdateTable` only: how many vector indexes the table had when DynamoDB
140
+ * rejected the request, read back (`DescribeTable`) after the rejection.
141
+ * The request shows only the index it adds, so a count rejection is
142
+ * confirmed only when these plus the request's exceed the limit; unknown
143
+ * (the read failed) means unconfirmed.
144
+ */
145
+ readonly existing?: number | undefined;
146
+ };
147
+ /** Any request a site sent. */
148
+ export type Sent = SentWrite | SentRead | SentTable | SentSearch;
149
+ /** A confirmed reading of DynamoDB's rejection, naming the culprit. */
150
+ export type Diagnosis = {
151
+ readonly _tag: "ItemTooLarge";
152
+ readonly target: TransactItemTarget;
153
+ /** The item's exact size (`itemBytes`), when the request carries the item. */
154
+ readonly bytes: number | undefined;
155
+ /** No item measures over the limit: this is the largest, named as the likely culprit. */
156
+ readonly likely: boolean;
157
+ } | {
158
+ readonly _tag: "TooManyItems";
159
+ readonly count: number;
160
+ readonly limit: number;
161
+ } | {
162
+ readonly _tag: "TransactionTooLarge";
163
+ /** DynamoDB's `Payload Size`, when its message carries one. */
164
+ readonly reported: number | undefined;
165
+ /**
166
+ * The request's exact size by the library's model (`transactItemBytes`
167
+ * summed). At or under the limit, the model disagrees with DynamoDB for
168
+ * this request — the error says so and gives both numbers.
169
+ */
170
+ readonly measured: number;
171
+ /** The largest contributors, largest first (at most three). */
172
+ readonly largest: ReadonlyArray<{
173
+ readonly target: TransactItemTarget;
174
+ readonly bytes: number;
175
+ }>;
176
+ } | {
177
+ /** A key value over its limit: 2048 bytes for a partition key, 1024 for a sort key. */
178
+ readonly _tag: "KeyTooLong";
179
+ readonly target: TransactItemTarget;
180
+ readonly kind: "partition" | "sort";
181
+ readonly attribute: string;
182
+ readonly bytes: number;
183
+ } | {
184
+ /** Two entries of one request target one item (DynamoDB allows one each). */
185
+ readonly _tag: "RepeatedItem";
186
+ readonly first: TransactItemTarget;
187
+ readonly second: TransactItemTarget;
188
+ /** The request was a `BatchWriteItem`, not a transaction. */
189
+ readonly batch: boolean;
190
+ } | {
191
+ readonly _tag: "ExpressionTooLarge";
192
+ readonly target: TransactItemTarget;
193
+ readonly expression: "ConditionExpression" | "UpdateExpression";
194
+ readonly limit: "length" | "operators" | "inOperands";
195
+ /** The expression's length, operators, or largest `IN`, as DynamoDB counts them. */
196
+ readonly measured: number;
197
+ /** The caller's own `.condition()` within it, when the site knows it. */
198
+ readonly caller: {
199
+ readonly length: number;
200
+ readonly operators: number;
201
+ readonly inOperands: number;
202
+ } | undefined;
203
+ } | {
204
+ /** A write puts an empty string (or binary) in a key attribute. */
205
+ readonly _tag: "EmptyKey";
206
+ readonly target: TransactItemTarget;
207
+ readonly attribute: string;
208
+ /** The secondary index whose key it is, as DynamoDB named it. */
209
+ readonly index: string | undefined;
210
+ } | {
211
+ /**
212
+ * An `isIn()` with no values: its `IN ()`, which DynamoDB rejects as a
213
+ * syntax error, in a write's condition or a read's filter.
214
+ */
215
+ readonly _tag: "EmptyIn";
216
+ readonly expression: "ConditionExpression" | "FilterExpression";
217
+ /** The attribute (path) the `isIn()` tests. */
218
+ readonly attribute: string;
219
+ /** The write whose condition holds it; `undefined` for a read's filter. */
220
+ readonly target: TransactItemTarget | undefined;
221
+ } | {
222
+ /** A query's key condition compares a key attribute with an empty value. */
223
+ readonly _tag: "EmptyKeyBound";
224
+ readonly attribute: string;
225
+ readonly index: string | undefined;
226
+ } | {
227
+ /** A query's `BETWEEN` whose lower bound sorts after its upper bound. */
228
+ readonly _tag: "BetweenReversed";
229
+ readonly attribute: string;
230
+ readonly index: string | undefined;
231
+ readonly low: string;
232
+ readonly high: string;
233
+ } | {
234
+ /** A consistent read of a GSI, which DynamoDB reads only eventually consistently. */
235
+ readonly _tag: "ConsistentReadOnGsi";
236
+ readonly index: string;
237
+ readonly scan: boolean;
238
+ } | {
239
+ /** A vector index with more `INLINE_FILTER` attributes than DynamoDB allows. */
240
+ readonly _tag: "VectorIndexFilters";
241
+ readonly operation: "CreateTable" | "UpdateTable";
242
+ readonly index: string;
243
+ readonly filters: ReadonlyArray<string>;
244
+ readonly sharers: ReadonlyArray<string>;
245
+ readonly limit: number;
246
+ } | {
247
+ /** A vector index whose dimensions are outside the range DynamoDB accepts. */
248
+ readonly _tag: "VectorIndexDimensions";
249
+ readonly operation: "CreateTable" | "UpdateTable";
250
+ readonly index: string;
251
+ readonly dimensions: number;
252
+ readonly sharers: ReadonlyArray<string>;
253
+ } | {
254
+ /** A vector search's `TopK` outside the range DynamoDB accepts. */
255
+ readonly _tag: "TopKOutOfRange";
256
+ readonly index: string;
257
+ readonly topK: number;
258
+ } | {
259
+ /** More vector indexes on one table than DynamoDB allows the account. */
260
+ readonly _tag: "VectorIndexCount";
261
+ readonly operation: "CreateTable" | "UpdateTable";
262
+ /** The vector indexes the request creates, with the entities sharing each. */
263
+ readonly indexes: ReadonlyArray<{
264
+ readonly index: string;
265
+ readonly sharers: ReadonlyArray<string>;
266
+ }>;
267
+ /** How many vector indexes the table's entities declare in all. */
268
+ readonly declared: number;
269
+ /** `UpdateTable`: how many vector indexes the table already had. */
270
+ readonly existing: number | undefined;
271
+ /** The limit DynamoDB stated, if its message carries one. */
272
+ readonly stated: number | undefined;
273
+ };
274
+ /** Whether `error` is a rejection this module could diagnose at all. */
275
+ export declare const isDiagnosable: (error: unknown) => boolean;
276
+ export declare const compareUtf8: (a: string, b: string) => number;
277
+ /**
278
+ * Read DynamoDB's rejection of `sent`. `keys` names the key attributes a write
279
+ * writes (the table's and its indexes', by kind), for the key-size shape.
280
+ * `undefined`: unrecognised or unconfirmed — the site fails with `error`
281
+ * unchanged.
282
+ */
283
+ export declare const diagnoseRejection: (error: unknown, sent: Sent, keys?: KeyAttributes) => Diagnosis | undefined;
284
+ /** How a site describes what its operation had written before the rejected request. */
285
+ export type ExplainOptions = {
286
+ /**
287
+ * What earlier requests of the operation are known to have written, as a
288
+ * clause: `"2 earlier transactions of versioned puts (200 items) were
289
+ * already written"`. A multi-request operation always says exactly what it
290
+ * wrote; never a vague "may have been written".
291
+ */
292
+ readonly committed?: string | undefined;
293
+ };
294
+ /**
295
+ * The explanation every site puts in its error, so the wording is identical
296
+ * library-wide. See {@link ExplainOptions} for a multi-request operation.
297
+ */
298
+ export declare const explainDiagnosis: (diagnosis: Diagnosis, operation: string, options?: ExplainOptions) => string;
299
+ /**
300
+ * An `Error` carrying `message`, with DynamoDB's error one step down as its
301
+ * own `cause` — what a diagnosed error stores in its `cause`, so the readable
302
+ * text stays where callers look and the original is kept.
303
+ */
304
+ export declare const withCause: (message: string, original: unknown) => Error;
305
+ /** The entity (or stream) a diagnosis names, for an error's `entityType`. */
306
+ export declare const diagnosedEntityType: (diagnosis: Diagnosis, fallback: string) => string;
307
+ /** The `ValidationError` a diagnosis becomes at most sites. */
308
+ export declare const diagnosedValidationError: (diagnosis: Diagnosis, original: unknown, options: ExplainOptions & {
309
+ readonly operation: string;
310
+ readonly entityType: string;
311
+ }) => ValidationError;
312
+ /**
313
+ * Wrap a site's request so that, on failure only, a diagnosable error is read
314
+ * against what was sent and — when confirmed — rewritten by `rewrite`.
315
+ * Everything else, and every success, passes through untouched.
316
+ *
317
+ * Placed after the site's own conditional-failure mapping, so it only ever
318
+ * sees what that mapping could not explain — except for a repeated item: a
319
+ * site whose mapping reads conditional failures (and may retry them) wraps its
320
+ * request a second time, BEFORE that mapping, with `only: ["RepeatedItem"]`,
321
+ * because DynamoDB can report a repeat as a conditional failure that reads as
322
+ * a lost race. A diagnosis is terminal: no retry loop sees it.
323
+ *
324
+ * `only` limits the rewrite to those diagnoses; any other passes through.
325
+ */
326
+ export declare const diagnoseFailure: <E2>(options: {
327
+ readonly sent: () => Sent;
328
+ readonly keys?: (() => KeyAttributes) | undefined;
329
+ readonly only?: ReadonlyArray<Diagnosis["_tag"]> | undefined;
330
+ readonly rewrite: (diagnosis: Diagnosis, original: unknown) => E2;
331
+ }) => <A, E, R>(self: Effect.Effect<A, E, R>) => Effect.Effect<A, E | E2, R>;
332
+ /**
333
+ * Targets for entries that all share one primary key schema (`keyFields`),
334
+ * named by `source(index, item)`. Each entry's own `TableName` is used.
335
+ */
336
+ export declare const targetsFor: (items: ReadonlyArray<TransactWriteItem>, keyFields: ReadonlyArray<string>, entityType: string | ((index: number) => string), source: (index: number, item: TransactWriteItem) => string) => ReadonlyArray<TransactItemTarget>;
337
+ /** A `BatchWriteItem` request map, flattened to transact-entry form in request order. */
338
+ export declare const batchEntries: (requestItems: Record<string, ReadonlyArray<WriteRequest>>) => ReadonlyArray<TransactWriteItem>;
339
+ /**
340
+ * The key attributes an entity writes, by kind: its primary key's and each
341
+ * index's partition and sort keys. `indexes` is an entity's `indexes` record.
342
+ */
343
+ export declare const keyAttributesOf: (indexes: Readonly<Record<string, {
344
+ readonly pk?: {
345
+ readonly field: string;
346
+ } | undefined;
347
+ readonly sk?: {
348
+ readonly field: string;
349
+ } | undefined;
350
+ }>>) => KeyAttributes;
351
+ /** Key attributes from several sources, each attribute once per kind. */
352
+ export declare const mergeKeyAttributes: (...all: ReadonlyArray<KeyAttributes>) => KeyAttributes;
353
+ //# sourceMappingURL=WriteDiagnosis.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WriteDiagnosis.d.ts","sourceRoot":"","sources":["../../src/internal/WriteDiagnosis.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,OAAO,KAAK,EACV,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,YAAY,EACb,MAAM,0BAA0B,CAAA;AACjC,OAAO,EAIL,eAAe,EAChB,MAAM,mCAAmC,CAAA;AAS1C,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAiB/B,wEAAwE;AACxE,eAAO,MAAM,uBAAuB,OAAO,CAAA;AAE3C,oEAAoE;AACpE,eAAO,MAAM,kBAAkB,OAAO,CAAA;AAEtC;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B,QAAQ,CAAC,SAAS,EAAE,aAAa,CAA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