@sunfall/arc-db 0.1.0-alpha.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 (150) hide show
  1. package/LICENSE +21 -0
  2. package/dist/change-feed-dispatcher.d.ts +21 -0
  3. package/dist/change-feed-dispatcher.d.ts.map +1 -0
  4. package/dist/change-feed-dispatcher.js +53 -0
  5. package/dist/change-feed-dispatcher.js.map +1 -0
  6. package/dist/collection-change-feed-runtime.d.ts +32 -0
  7. package/dist/collection-change-feed-runtime.d.ts.map +1 -0
  8. package/dist/collection-change-feed-runtime.js +50 -0
  9. package/dist/collection-change-feed-runtime.js.map +1 -0
  10. package/dist/collection-contract.d.ts +525 -0
  11. package/dist/collection-contract.d.ts.map +1 -0
  12. package/dist/collection-contract.js +4 -0
  13. package/dist/collection-contract.js.map +1 -0
  14. package/dist/collection-definition-snapshot.d.ts +64 -0
  15. package/dist/collection-definition-snapshot.d.ts.map +1 -0
  16. package/dist/collection-definition-snapshot.js +122 -0
  17. package/dist/collection-definition-snapshot.js.map +1 -0
  18. package/dist/collection-errors.d.ts +38 -0
  19. package/dist/collection-errors.d.ts.map +1 -0
  20. package/dist/collection-errors.js +17 -0
  21. package/dist/collection-errors.js.map +1 -0
  22. package/dist/collection-ids.d.ts +6 -0
  23. package/dist/collection-ids.d.ts.map +1 -0
  24. package/dist/collection-ids.js +6 -0
  25. package/dist/collection-ids.js.map +1 -0
  26. package/dist/collection-index-materialization.d.ts +29 -0
  27. package/dist/collection-index-materialization.d.ts.map +1 -0
  28. package/dist/collection-index-materialization.js +118 -0
  29. package/dist/collection-index-materialization.js.map +1 -0
  30. package/dist/collection-mutation-queue.d.ts +10 -0
  31. package/dist/collection-mutation-queue.d.ts.map +1 -0
  32. package/dist/collection-mutation-queue.js +46 -0
  33. package/dist/collection-mutation-queue.js.map +1 -0
  34. package/dist/collection-mutation-workflow.d.ts +18 -0
  35. package/dist/collection-mutation-workflow.d.ts.map +1 -0
  36. package/dist/collection-mutation-workflow.js +252 -0
  37. package/dist/collection-mutation-workflow.js.map +1 -0
  38. package/dist/collection-persistence.d.ts +48 -0
  39. package/dist/collection-persistence.d.ts.map +1 -0
  40. package/dist/collection-persistence.js +323 -0
  41. package/dist/collection-persistence.js.map +1 -0
  42. package/dist/collection-policy.d.ts +5 -0
  43. package/dist/collection-policy.d.ts.map +1 -0
  44. package/dist/collection-policy.js +7 -0
  45. package/dist/collection-policy.js.map +1 -0
  46. package/dist/collection-preload.d.ts +21 -0
  47. package/dist/collection-preload.d.ts.map +1 -0
  48. package/dist/collection-preload.js +4 -0
  49. package/dist/collection-preload.js.map +1 -0
  50. package/dist/collection-projection-callback-policy.d.ts +14 -0
  51. package/dist/collection-projection-callback-policy.d.ts.map +1 -0
  52. package/dist/collection-projection-callback-policy.js +25 -0
  53. package/dist/collection-projection-callback-policy.js.map +1 -0
  54. package/dist/collection-reactive-binding.d.ts +72 -0
  55. package/dist/collection-reactive-binding.d.ts.map +1 -0
  56. package/dist/collection-reactive-binding.js +95 -0
  57. package/dist/collection-reactive-binding.js.map +1 -0
  58. package/dist/collection-registry.d.ts +56 -0
  59. package/dist/collection-registry.d.ts.map +1 -0
  60. package/dist/collection-registry.js +123 -0
  61. package/dist/collection-registry.js.map +1 -0
  62. package/dist/collection-row-ingress.d.ts +16 -0
  63. package/dist/collection-row-ingress.d.ts.map +1 -0
  64. package/dist/collection-row-ingress.js +110 -0
  65. package/dist/collection-row-ingress.js.map +1 -0
  66. package/dist/collection-runtime.d.ts +20 -0
  67. package/dist/collection-runtime.d.ts.map +1 -0
  68. package/dist/collection-runtime.js +256 -0
  69. package/dist/collection-runtime.js.map +1 -0
  70. package/dist/collection-snapshot-codec.d.ts +62 -0
  71. package/dist/collection-snapshot-codec.d.ts.map +1 -0
  72. package/dist/collection-snapshot-codec.js +563 -0
  73. package/dist/collection-snapshot-codec.js.map +1 -0
  74. package/dist/collection-state.d.ts +72 -0
  75. package/dist/collection-state.d.ts.map +1 -0
  76. package/dist/collection-state.js +276 -0
  77. package/dist/collection-state.js.map +1 -0
  78. package/dist/collection-sync-load-policy.d.ts +17 -0
  79. package/dist/collection-sync-load-policy.d.ts.map +1 -0
  80. package/dist/collection-sync-load-policy.js +245 -0
  81. package/dist/collection-sync-load-policy.js.map +1 -0
  82. package/dist/collection-value-detachment.d.ts +34 -0
  83. package/dist/collection-value-detachment.d.ts.map +1 -0
  84. package/dist/collection-value-detachment.js +248 -0
  85. package/dist/collection-value-detachment.js.map +1 -0
  86. package/dist/collection-write-commit.d.ts +32 -0
  87. package/dist/collection-write-commit.d.ts.map +1 -0
  88. package/dist/collection-write-commit.js +51 -0
  89. package/dist/collection-write-commit.js.map +1 -0
  90. package/dist/flush-policy.d.ts +130 -0
  91. package/dist/flush-policy.d.ts.map +1 -0
  92. package/dist/flush-policy.js +96 -0
  93. package/dist/flush-policy.js.map +1 -0
  94. package/dist/index.d.ts +481 -0
  95. package/dist/index.d.ts.map +1 -0
  96. package/dist/index.js +251 -0
  97. package/dist/index.js.map +1 -0
  98. package/dist/live-query-collection-materialization.d.ts +47 -0
  99. package/dist/live-query-collection-materialization.d.ts.map +1 -0
  100. package/dist/live-query-collection-materialization.js +231 -0
  101. package/dist/live-query-collection-materialization.js.map +1 -0
  102. package/dist/live-query-collection.d.ts +23 -0
  103. package/dist/live-query-collection.d.ts.map +1 -0
  104. package/dist/live-query-collection.js +94 -0
  105. package/dist/live-query-collection.js.map +1 -0
  106. package/dist/live-query-runtime.d.ts +8 -0
  107. package/dist/live-query-runtime.d.ts.map +1 -0
  108. package/dist/live-query-runtime.js +228 -0
  109. package/dist/live-query-runtime.js.map +1 -0
  110. package/dist/live-query-state.d.ts +11 -0
  111. package/dist/live-query-state.d.ts.map +1 -0
  112. package/dist/live-query-state.js +130 -0
  113. package/dist/live-query-state.js.map +1 -0
  114. package/dist/query-builder.d.ts +294 -0
  115. package/dist/query-builder.d.ts.map +1 -0
  116. package/dist/query-builder.js +373 -0
  117. package/dist/query-builder.js.map +1 -0
  118. package/dist/query-context-identity.d.ts +19 -0
  119. package/dist/query-context-identity.d.ts.map +1 -0
  120. package/dist/query-context-identity.js +41 -0
  121. package/dist/query-context-identity.js.map +1 -0
  122. package/dist/query-execution-plan.d.ts +27 -0
  123. package/dist/query-execution-plan.d.ts.map +1 -0
  124. package/dist/query-execution-plan.js +69 -0
  125. package/dist/query-execution-plan.js.map +1 -0
  126. package/dist/query-plan.d.ts +200 -0
  127. package/dist/query-plan.d.ts.map +1 -0
  128. package/dist/query-plan.js +524 -0
  129. package/dist/query-plan.js.map +1 -0
  130. package/dist/query-source-adapter.d.ts +25 -0
  131. package/dist/query-source-adapter.d.ts.map +1 -0
  132. package/dist/query-source-adapter.js +14 -0
  133. package/dist/query-source-adapter.js.map +1 -0
  134. package/dist/runtime-collection-store.d.ts +38 -0
  135. package/dist/runtime-collection-store.d.ts.map +1 -0
  136. package/dist/runtime-collection-store.js +149 -0
  137. package/dist/runtime-collection-store.js.map +1 -0
  138. package/dist/server-collection.d.ts +84 -0
  139. package/dist/server-collection.d.ts.map +1 -0
  140. package/dist/server-collection.js +84 -0
  141. package/dist/server-collection.js.map +1 -0
  142. package/dist/sqlite-persistence.d.ts +239 -0
  143. package/dist/sqlite-persistence.d.ts.map +1 -0
  144. package/dist/sqlite-persistence.js +345 -0
  145. package/dist/sqlite-persistence.js.map +1 -0
  146. package/dist/sync-adapter.d.ts +233 -0
  147. package/dist/sync-adapter.d.ts.map +1 -0
  148. package/dist/sync-adapter.js +226 -0
  149. package/dist/sync-adapter.js.map +1 -0
  150. package/package.json +48 -0
@@ -0,0 +1,200 @@
1
+ import { type PlainValue } from "@sunfall/arc-core";
2
+ import type { AnyCollection, CollectionError, CollectionRuntimeError, CollectionRequirements, CollectionRow, CollectionRowValue } from "./collection-contract.js";
3
+ import { type QueryCollectionSourceAdapter } from "./query-source-adapter.js";
4
+ declare const UnsupportedLiveQuery_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
5
+ readonly _tag: "UnsupportedLiveQuery";
6
+ } & Readonly<A>;
7
+ /**
8
+ * Error raised when the query builder cannot be represented as a live query.
9
+ */
10
+ export declare class UnsupportedLiveQuery extends UnsupportedLiveQuery_base<{
11
+ readonly reason: string;
12
+ }> {
13
+ }
14
+ /** Query pipeline phase where a synchronous callback failure occurred. */
15
+ export type QueryEvaluationOperation = "source" | "filter" | "join" | "aggregate" | "order" | "projection" | "evaluate";
16
+ declare const QueryEvaluationError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
17
+ readonly _tag: "QueryEvaluationError";
18
+ } & Readonly<A>;
19
+ /**
20
+ * Error raised when query factories, plan validation, or user-provided
21
+ * synchronous query callbacks fail during evaluation.
22
+ *
23
+ * Query factory throws are normalized with operation `"evaluate"`. One-shot
24
+ * query Effects report this value in their error channel, while synchronous
25
+ * diagnostics/live-query constructors throw the typed error directly.
26
+ */
27
+ export declare class QueryEvaluationError extends QueryEvaluationError_base<{
28
+ readonly operation: QueryEvaluationOperation;
29
+ readonly message: string;
30
+ readonly cause: unknown;
31
+ }> {
32
+ }
33
+ /** Sort direction accepted by Query order clauses. */
34
+ export type QuerySortDirection = "asc" | "desc";
35
+ /** Comparable scalar value accepted by Query ordering; numbers must not be NaN and Dates must be valid. */
36
+ export type QuerySortValue = string | number | boolean | Date | null | undefined;
37
+ /** Scalar join key before stable string normalization. */
38
+ export type QueryJoinKey = string | number | boolean | Date | null | undefined;
39
+ /** Execution strategy selected for one Query join. */
40
+ export type QueryJoinStrategy = "collection-scan" | "collection-index";
41
+ /** Named collection source map supplied to Query execution. */
42
+ export type SourceRecord = Record<string, AnyCollection>;
43
+ /** Erased row context carried through query filter/join/project stages. */
44
+ export type AnyQueryContext = Record<string, any>;
45
+ /** Erased Collection row used by query joins. */
46
+ export type AnyCollectionRow = CollectionRow<any, any>;
47
+ /** Union of source collection runtime errors for a query source map. */
48
+ export type QuerySourcesError<Sources extends SourceRecord> = CollectionRuntimeError<CollectionError<Sources[keyof Sources]>>;
49
+ /** Union of source collection service requirements for a query source map. */
50
+ export type QuerySourcesRequirements<Sources extends SourceRecord> = CollectionRequirements<Sources[keyof Sources]>;
51
+ /** Row context produced from the source alias map. */
52
+ export type QueryContext<Sources extends SourceRecord> = {
53
+ readonly [Key in keyof Sources]: CollectionRowValue<Sources[Key]>;
54
+ };
55
+ /** Row context after joining collection `C` under alias `Alias`. */
56
+ export type QueryJoinedContext<TContext extends AnyQueryContext, Alias extends string, C extends AnyCollection> = TContext & {
57
+ readonly [Key in Alias]: CollectionRowValue<C>;
58
+ };
59
+ /** Result context chosen after a join projection. */
60
+ export type QueryJoinResult<TContext, TResult, TNextContext> = [TResult] extends [TContext] ? [TContext] extends [TResult] ? TNextContext : TResult : TResult;
61
+ /** Compiled order clause used by the query execution plan. */
62
+ export interface QueryOrder<TContext> {
63
+ readonly direction: QuerySortDirection;
64
+ readonly selector: (row: TContext) => QuerySortValue;
65
+ }
66
+ /** Compiled join clause used by the query execution plan. */
67
+ export interface QueryJoin {
68
+ readonly alias: string;
69
+ readonly collection: AnyCollection;
70
+ readonly leftKey: (row: AnyQueryContext) => QueryJoinKey;
71
+ readonly rightKeys: (row: AnyCollectionRow) => ReadonlyArray<QueryJoinKey>;
72
+ readonly rightIndex?: string;
73
+ }
74
+ /** Runtime diagnostics for one source collection in a query plan. */
75
+ export interface QueryPlanSourceDiagnostics {
76
+ readonly alias: string;
77
+ readonly collection: string;
78
+ readonly rows: number;
79
+ }
80
+ /** Runtime diagnostics for one join stage in a query plan. */
81
+ export interface QueryPlanJoinDiagnostics {
82
+ readonly alias: string;
83
+ readonly collection: string;
84
+ readonly strategy: QueryJoinStrategy;
85
+ readonly index?: string;
86
+ readonly leftRows: number;
87
+ readonly rightRows: number;
88
+ readonly outputRows: number;
89
+ readonly estimatedComparisons: number;
90
+ }
91
+ /** Query plan execution summary exposed to diagnostics and LSP hovers. */
92
+ export interface QueryPlanDiagnostics {
93
+ readonly sources: ReadonlyArray<QueryPlanSourceDiagnostics>;
94
+ readonly joins: ReadonlyArray<QueryPlanJoinDiagnostics>;
95
+ readonly filters: number;
96
+ readonly orders: number;
97
+ readonly grouped: boolean;
98
+ readonly offset: number;
99
+ readonly limit?: number;
100
+ readonly contextRows: number;
101
+ }
102
+ /** Query execution result plus diagnostics for the evaluated context rows. */
103
+ export interface QueryExecution<TContext> {
104
+ readonly contexts: Array<TContext>;
105
+ readonly diagnostics: QueryPlanDiagnostics;
106
+ }
107
+ /** Source role selected by the compiled Query Stage Plan. */
108
+ export type QueryStageSourceRole = "base" | "join";
109
+ /** Source collection and adapter facts used by snapshot and live query stages. */
110
+ export interface QueryStageSource {
111
+ readonly alias: string;
112
+ readonly collection: AnyCollection;
113
+ readonly adapter: QueryCollectionSourceAdapter;
114
+ readonly role: QueryStageSourceRole;
115
+ }
116
+ /** Window stage selected by the compiled Query Stage Plan. */
117
+ export interface QueryStageWindow {
118
+ readonly offset: number;
119
+ readonly limit?: number;
120
+ }
121
+ /**
122
+ * Compiled Query stage facts shared by snapshot execution and Live Query Runtime.
123
+ *
124
+ * The builder remains the fluent public Interface. This internal plan owns the
125
+ * stage ordering facts so one-shot and live execution do not independently
126
+ * decide which sources are base sources, which sources are joins, and where
127
+ * filtering, ordering, grouping, and windowing belong.
128
+ */
129
+ export interface QueryStagePlan<TContext extends AnyQueryContext> {
130
+ readonly sources: ReadonlyArray<QueryStageSource>;
131
+ readonly baseSources: ReadonlyArray<QueryStageSource>;
132
+ readonly sourceAdapters: ReadonlyArray<QueryCollectionSourceAdapter>;
133
+ readonly sourceByAlias: ReadonlyMap<string, QueryStageSource>;
134
+ readonly identityAliases: ReadonlyArray<string>;
135
+ readonly joins: ReadonlyArray<QueryJoin>;
136
+ readonly grouping: AnyQueryGrouping | undefined;
137
+ readonly filters: ReadonlyArray<(row: TContext) => boolean>;
138
+ readonly orders: ReadonlyArray<QueryOrder<TContext>>;
139
+ readonly window: QueryStageWindow;
140
+ }
141
+ /**
142
+ * Aggregate definition used by `Query.groupBy`.
143
+ */
144
+ export interface QueryAggregate<TContext, R, V = unknown> {
145
+ readonly preMap: (row: TContext) => V & RejectPlainQueryRecord<V>;
146
+ readonly reduce: (values: Array<[V, number]>) => V & RejectPlainQueryRecord<V>;
147
+ readonly postMap?: (value: V) => R & RejectPlainQueryRecord<R>;
148
+ }
149
+ export type QueryAggregateRecord<TContext> = Record<string, QueryAggregate<TContext, any, any>>;
150
+ export type AnyQueryAggregateRecord = QueryAggregateRecord<any>;
151
+ /** Recursively rejects executable-shaped values inside query result data structures. */
152
+ export type RejectPlainQueryRecord<Value> = [PlainValue<Value>] extends [never] ? never : Value extends (...args: any) => unknown ? Value : Value extends Date | URL | ArrayBuffer | DataView ? Value : Value extends readonly (infer Item)[] ? readonly RejectPlainQueryRecord<Item>[] : Value extends ReadonlyMap<infer Key, infer Item> ? ReadonlyMap<RejectPlainQueryRecord<Key>, RejectPlainQueryRecord<Item>> : Value extends ReadonlySet<infer Item> ? ReadonlySet<RejectPlainQueryRecord<Item>> : Value extends object ? {
153
+ readonly [Key in keyof Value]: RejectPlainQueryRecord<Value[Key]>;
154
+ } : Value;
155
+ /** Public grouped-query key shape accepted by `Query.groupBy(...)`. */
156
+ export type QueryGroupKey<TKey extends Record<string, unknown> = Record<string, unknown>> = TKey & RejectPlainQueryRecord<TKey>;
157
+ export type QueryAggregateResult<TKey extends Record<string, unknown>, Aggregates extends AnyQueryAggregateRecord> = TKey & {
158
+ readonly [Key in keyof Aggregates]: Aggregates[Key] extends QueryAggregate<infer _Context, infer R, infer _Value> ? R : never;
159
+ };
160
+ export interface QueryGrouping<TSource extends AnyQueryContext, _TResult extends Record<string, unknown>> {
161
+ readonly key: (row: TSource) => Record<string, unknown>;
162
+ readonly aggregates: QueryAggregateRecord<TSource>;
163
+ readonly sourceFilters: ReadonlyArray<(row: TSource) => boolean>;
164
+ }
165
+ export type AnyQueryGrouping = QueryGrouping<AnyQueryContext, Record<string, unknown>>;
166
+ export interface QueryProjectOptions {
167
+ readonly filter?: boolean;
168
+ readonly order?: boolean;
169
+ readonly window?: boolean;
170
+ }
171
+ export interface QueryPlanBuilder<TContext extends AnyQueryContext> {
172
+ readonly sources: ReadonlyArray<readonly [string, AnyCollection]>;
173
+ readonly filters: ReadonlyArray<(row: TContext) => boolean>;
174
+ readonly orders: ReadonlyArray<QueryOrder<TContext>>;
175
+ readonly offsetCount: number;
176
+ readonly limitCount: number | undefined;
177
+ readonly joins: ReadonlyArray<QueryJoin>;
178
+ readonly grouping: AnyQueryGrouping | undefined;
179
+ }
180
+ export declare const projectCurrentContext: <TContext, TResult>(row: TContext) => TResult;
181
+ export declare const toQueryEvaluationError: (operation: QueryEvaluationOperation, cause: unknown) => QueryEvaluationError;
182
+ export declare const evaluateQueryOperation: <A>(operation: QueryEvaluationOperation, evaluate: () => A) => A;
183
+ export declare const evaluateQueryStructuredOperation: <A>(operation: QueryEvaluationOperation, evaluate: () => A) => A;
184
+ export declare const joinKey: (value: QueryJoinKey) => string;
185
+ export declare const evaluateQueryJoinKey: (value: QueryJoinKey) => string;
186
+ export declare const evaluateQueryGroupKey: (value: Record<string, unknown>) => string;
187
+ /** Builds the diagnostic message for a source alias that cannot safely key a row context. */
188
+ export declare const reservedQuerySourceAliasReason: (alias: string) => string;
189
+ /** Rejects source aliases that would collide with object prototype mechanics. */
190
+ export declare const validateQuerySourceAlias: (alias: string) => void;
191
+ /** Validates alias and join invariants before a Query plan reads source rows. */
192
+ export declare const validateQueryPlan: <TContext extends AnyQueryContext>(builder: QueryPlanBuilder<TContext>) => void;
193
+ /** Compiles validated Query builder facts into the shared snapshot/live stage plan. */
194
+ export declare const compileQueryStagePlan: <TContext extends AnyQueryContext>(builder: QueryPlanBuilder<TContext>) => QueryStagePlan<TContext>;
195
+ export declare const buildQueryExecutionFromStagePlan: <TContext extends AnyQueryContext>(stagePlan: QueryStagePlan<TContext>) => QueryExecution<TContext>;
196
+ export declare const groupContexts: (contexts: ReadonlyArray<AnyQueryContext>, grouping: AnyQueryGrouping) => Array<Record<string, unknown>>;
197
+ export declare const compareValue: (left: QuerySortValue, right: QuerySortValue) => number;
198
+ export declare const compareRows: <TContext>(left: TContext, right: TContext, leftIndex: number, rightIndex: number, orders: ReadonlyArray<QueryOrder<TContext>>) => number;
199
+ export {};
200
+ //# sourceMappingURL=query-plan.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"query-plan.d.ts","sourceRoot":"","sources":["../src/query-plan.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,UAAU,EAChB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,KAAK,EACV,aAAa,EACb,eAAe,EACf,sBAAsB,EACtB,sBAAsB,EACtB,aAAa,EACb,kBAAkB,EACnB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAEL,KAAK,4BAA4B,EAClC,MAAM,2BAA2B,CAAC;;;;AAEnC;;GAEG;AACH,qBAAa,oBAAqB,SAAQ,0BAAyC;IACjF,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB,CAAC;CAAG;AAEL,0EAA0E;AAC1E,MAAM,MAAM,wBAAwB,GAChC,QAAQ,GACR,QAAQ,GACR,MAAM,GACN,WAAW,GACX,OAAO,GACP,YAAY,GACZ,UAAU,CAAC;;;;AAEf;;;;;;;GAOG;AACH,qBAAa,oBAAqB,SAAQ,0BAAyC;IACjF,QAAQ,CAAC,SAAS,EAAE,wBAAwB,CAAC;IAC7C,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;CACzB,CAAC;CAAG;AAUL,sDAAsD;AACtD,MAAM,MAAM,kBAAkB,GAAG,KAAK,GAAG,MAAM,CAAC;AAChD,2GAA2G;AAC3G,MAAM,MAAM,cAAc,GAA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