foldkit-ssr 0.9.0 → 0.11.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 (52) hide show
  1. package/README.md +402 -36
  2. package/dist/{client-F16QT0sc.d.ts → client-qmdYY-Eb.d.ts} +15 -5
  3. package/dist/client-qmdYY-Eb.d.ts.map +1 -0
  4. package/dist/client.d.ts +5 -5
  5. package/dist/client.js +126 -54
  6. package/dist/client.js.map +1 -1
  7. package/dist/context.d.ts +1 -1
  8. package/dist/context.js +12 -0
  9. package/dist/context.js.map +1 -1
  10. package/dist/diagnostics.d.ts +2 -2
  11. package/dist/diagnostics.js +8 -1
  12. package/dist/diagnostics.js.map +1 -1
  13. package/dist/index.d.ts +127 -25
  14. package/dist/index.d.ts.map +1 -1
  15. package/dist/index.js +317 -59
  16. package/dist/index.js.map +1 -1
  17. package/dist/keep.d.ts +36 -0
  18. package/dist/keep.d.ts.map +1 -0
  19. package/dist/keep.js +109 -0
  20. package/dist/keep.js.map +1 -0
  21. package/dist/{listen-zNd0IIAT.d.ts → listen-DaUPRKVR.d.ts} +4 -2
  22. package/dist/listen-DaUPRKVR.d.ts.map +1 -0
  23. package/dist/listen.d.ts +2 -2
  24. package/dist/listen.js +31 -23
  25. package/dist/listen.js.map +1 -1
  26. package/dist/pageCache-DO0pOgnc.d.ts +80 -0
  27. package/dist/pageCache-DO0pOgnc.d.ts.map +1 -0
  28. package/dist/pageCache.d.ts +2 -0
  29. package/dist/pageCache.js +112 -0
  30. package/dist/pageCache.js.map +1 -0
  31. package/dist/{requestContext-D9nsbGSJ.d.ts → requestContext-DmwmQeci.d.ts} +12 -2
  32. package/dist/requestContext-DmwmQeci.d.ts.map +1 -0
  33. package/dist/requestContext.d.ts +2 -2
  34. package/dist/requestContext.js +30 -13
  35. package/dist/requestContext.js.map +1 -1
  36. package/dist/{resumable-BWItJsxF.d.ts → resumable-BPN_qQHU.d.ts} +33 -12
  37. package/dist/resumable-BPN_qQHU.d.ts.map +1 -0
  38. package/dist/resumable.d.ts +2 -2
  39. package/dist/resumable.js +51 -8
  40. package/dist/resumable.js.map +1 -1
  41. package/dist/{shared-v1u-OEQI.d.ts → shared-CJN-m58Z.d.ts} +37 -10
  42. package/dist/shared-CJN-m58Z.d.ts.map +1 -0
  43. package/dist/shared.d.ts +2 -2
  44. package/dist/shared.js +31 -7
  45. package/dist/shared.js.map +1 -1
  46. package/dist/vite.d.ts +1 -1
  47. package/package.json +9 -9
  48. package/dist/client-F16QT0sc.d.ts.map +0 -1
  49. package/dist/listen-zNd0IIAT.d.ts.map +0 -1
  50. package/dist/requestContext-D9nsbGSJ.d.ts.map +0 -1
  51. package/dist/resumable-BWItJsxF.d.ts.map +0 -1
  52. package/dist/shared-v1u-OEQI.d.ts.map +0 -1
package/dist/index.d.ts CHANGED
@@ -1,10 +1,11 @@
1
- import { n as DecodedBinding, r as EncodedBinding } from "./listen-zNd0IIAT.js";
2
- import { a as FALLBACK_FIELD, l as ResumableBuilder, n as BINDING_ATTRIBUTE, u as SLOT_ATTRIBUTE } from "./resumable-BWItJsxF.js";
3
- import { A as serving, D as resume, G as SsrDiagnostic, H as HandlerUnnamed, K as StaticRegionMissing, L as UnnamedHandler, M as staticRegion, U as PageContained, V as BundleUnloaded, W as PageFailed, c as ResumableConfig, d as ResumeRefused, f as RouteMatch, i as Meta, k as serializeJsonScript, l as ResumePart, m as Start, n as Loadable, o as PlanSurface, p as STATIC_ATTRIBUTE, r as META_ATTRIBUTE, s as RESUME_ATTRIBUTE, t as FOLDKIT_APP_ATTRIBUTE, u as ResumePlan, w as plan, x as metaMarkup } from "./shared-v1u-OEQI.js";
4
- import { i as Resume, n as Diagnostics, o as UNTIL_LIMIT_MS, r as ReportDiagnostic, t as Diagnostic } from "./client-F16QT0sc.js";
5
- import { n as requestContext, t as RequestContext } from "./requestContext-D9nsbGSJ.js";
6
- import { Cause, Effect, Layer, Schema } from "effect";
7
- import { Diagnostic as Diagnostic$1, MetadataSummary } from "foldkit-surface";
1
+ import { n as DecodedBinding, r as EncodedBinding } from "./listen-DaUPRKVR.js";
2
+ import { a as FALLBACK_FIELD, d as SLOT_ATTRIBUTE, n as BINDING_ATTRIBUTE, s as KEEP_ATTRIBUTE, u as ResumableBuilder } from "./resumable-BPN_qQHU.js";
3
+ import { C as metaMarkup, E as plan, G as HandlerUnnamed, J as SsrDiagnostic, K as PageContained, M as serving, P as staticRegion, U as BundleUnloaded, Y as StaticRegionMissing, c as ResumableConfig, d as ResumeRefused, f as RouteMatch, h as Start, i as Meta, j as serializeJsonScript, k as resume, l as ResumePart, n as Loadable, o as PlanSurface, p as STATIC_ATTRIBUTE, q as PageFailed, r as META_ATTRIBUTE, s as RESUME_ATTRIBUTE, t as FOLDKIT_APP_ATTRIBUTE, u as ResumePlan, z as UnnamedHandler } from "./shared-CJN-m58Z.js";
4
+ import { i as Resume, n as Diagnostics, o as UNTIL_LIMIT_MS, r as ReportDiagnostic, t as Diagnostic } from "./client-qmdYY-Eb.js";
5
+ import { s as keptDocuments } from "./pageCache-DO0pOgnc.js";
6
+ import { n as requestContext, t as RequestContext } from "./requestContext-DmwmQeci.js";
7
+ import { Cause, Effect, Layer, Option, Schema } from "effect";
8
+ import { CacheOptions, CacheStore, Diagnostic as Diagnostic$1, MetadataSummary } from "foldkit-surface";
8
9
  import { EntryModule, RenderError, RenderedApplication } from "foldkit/experimental/server";
9
10
  interface EnvelopeOptions {
10
11
  readonly route?: string | undefined;
@@ -75,7 +76,7 @@ export interface PlanInspection {
75
76
  */
76
77
  declare const inspect: <Model, Fields extends Schema.Struct.Fields>(plan: ResumePlan<Model, Fields>, model: Model) => PlanInspection;
77
78
  declare const ResumeUnsafe_base: Schema.Class<ResumeUnsafe, Schema.TaggedStruct<"ResumeUnsafe", {
78
- readonly reason: Schema.Literals<readonly ["UndeclaredStartup", "Uncovered", "ViewDependsOnUnsentState", "DuplicateStaticRegion", "UngeneratablePath", "UnrestorablePart", "UnencodableBinding", "EagerStartRequired", "UndeclaredSurfaces", "BindingInStaticRegion", "VoidRootWithStyles"]>;
79
+ readonly reason: Schema.Literals<readonly ["UndeclaredStartup", "Uncovered", "ViewDependsOnUnsentState", "DuplicateStaticRegion", "UngeneratablePath", "UnrestorablePart", "UnencodableBinding", "EagerStartRequired", "UndeclaredSurfaces", "BindingInStaticRegion", "VoidRootWithStyles", "UnkeepableField"]>;
79
80
  readonly message: Schema.String;
80
81
  }>, Cause.YieldableError>;
81
82
  /** Why a server refused to render a page against its plan. */
@@ -117,9 +118,9 @@ declare const render: <Model, Fields extends Schema.Struct.Fields, Message = any
117
118
  readonly flags?: unknown;
118
119
  /**
119
120
  * Markup for the first paint, given what was rendered, carried as the
120
- * root's last child: keep it to `<style>`, which the browser drops on
121
- * hydration. Anything a head owns (`meta`, links) stays with `SSR.page`
122
- * and `SSR.generate`.
121
+ * root's last children: `<style>` (or a stylesheet `<link>`), which
122
+ * `SSR.hydrate` moves into the head before adopting the page. Anything
123
+ * else a head owns (`meta`) stays with `SSR.page` and `SSR.generate`.
123
124
  */
124
125
  readonly styles?: Head | undefined;
125
126
  }) => Effect.Effect<RenderedPage, RenderError | ResumeUnsafe>;
@@ -201,15 +202,18 @@ declare const generate: <Model, Fields extends Schema.Struct.Fields, const Paths
201
202
  * served by Node and Workers alike.
202
203
  *
203
204
  * `GET` and `HEAD` render the page against the plan, with the request's URL
204
- * and, when the application has Flags, `flags(request)`. `POST` goes to
205
+ * and, when the application has Flags, `flags(request)`; `prepare(model,
206
+ * request)` turns the Model `init` gave into the one rendered, a read made
207
+ * before the render (`Data.satisfy`). `POST` goes to
205
208
  * `SSR.handle` when the plan has a server fallback, and is answered `400` when
206
209
  * the post is unusable. `OPTIONS` is answered `204`, and any other method
207
210
  * `405`, each with the methods the entry answers in `allow` (`handleRequest`
208
211
  * passes every method through). A render that fails, or a plan the render
209
212
  * refuses, is answered `500` with the reason reported (`diagnostics`), never with a page the
210
- * browser cannot resume. `headers(request)` rides on the `Rendered` result, so
211
- * Foldkit's `toResponse` sets it over its own on the page: a cache policy, or
212
- * a CORS answer to a preflight.
213
+ * browser cannot resume. `headers(request, model)` is set over Foldkit's own
214
+ * on every answer: a cache policy, a CORS answer to a preflight, or a cookie
215
+ * written from the Model a post reached. `status(model, request)` gives a page
216
+ * its status from that Model, `404` for a route not found.
213
217
  *
214
218
  * The page is answered as `Rendered`: the rendered application carries the
215
219
  * envelope in its root, so the host injects it into its own template with
@@ -225,7 +229,26 @@ declare const generate: <Model, Fields extends Schema.Struct.Fields, const Paths
225
229
  declare const entry: <Model, Fields extends Schema.Struct.Fields, Message = any>(config: ResumableConfig<Model, Message>, plan: ResumePlan<Model, Fields>, options: {
226
230
  readonly buildId: string;
227
231
  readonly flags?: ((request: Request) => unknown | PromiseLike<unknown>) | undefined;
228
- readonly headers?: ((request: Request) => HeadersInit) | undefined;
232
+ /**
233
+ * The Model a request starts from, from the one `init` gave: what the page
234
+ * shows read first (`Data.satisfy`), or what the request carries (a
235
+ * cookie). Run for `GET`, `HEAD` and a posted form, before the post's
236
+ * Message is checked or `update` runs, so the entry is made once. A
237
+ * failure is answered `500` and reported; to draw the page unread
238
+ * instead, recover inside the Effect.
239
+ */
240
+ readonly prepare?: Prepare<Model> | undefined;
241
+ /**
242
+ * Headers set over the entry's own on every answer. `model` is the Model
243
+ * the server reached for a rendered page, a posted form's after `update`;
244
+ * it is `none` for an answer that rendered nothing (`OPTIONS`, `405`, a
245
+ * refused post, a `500`). So a cookie kept from the Model is written here.
246
+ * A name or value no `Headers` takes (a CR or LF in a value), a header that
247
+ * frames the response (`content-length`, `transfer-encoding`, `connection`
248
+ * and the like) or `location`, which only the entry writes, is answered
249
+ * `500` and reported, as `headers` that throw are.
250
+ */
251
+ readonly headers?: ((request: Request, model: Option.Option<Model>) => HeadersInit) | undefined;
229
252
  /**
230
253
  * A posted form's own services, from its request (who is asking, a
231
254
  * client bound to them), for the Commands the fallback runs; where one is
@@ -243,15 +266,48 @@ declare const entry: <Model, Fields extends Schema.Struct.Fields, Message = any>
243
266
  * form cannot carry a CSRF header; this is its check. A post with no
244
267
  * `Origin` or `Origin: null` (a page served with `Referrer-Policy:
245
268
  * no-referrer`) is taken when `Sec-Fetch-Site` says `same-origin`. Each must be an origin exactly as
246
- * a browser sends it (`https://example.com`).
269
+ * a browser sends it (`https://example.com`). `'same-origin'` takes a
270
+ * post from the origin the request was addressed to and no other, for a
271
+ * site served at addresses not known when the entry is made (a dev
272
+ * server's port). It compares with the request's own URL, so behind a
273
+ * proxy that terminates TLS (the server sees `http://`, the browser
274
+ * sends `Origin: https://`) or rewrites the host, every post is refused
275
+ * 403: there, name the public origin (`['https://example.com']`).
247
276
  */
248
- readonly origins?: ReadonlyArray<string> | undefined;
277
+ readonly origins?: ReadonlyArray<string> | 'same-origin' | undefined;
249
278
  /**
250
- * Markup for the first paint, carried as the rendered root's last child.
251
- * The host owns the template in dynamic serving, so this is where
252
- * per-page styles go; anything a head owns stays with `SSR.generate`.
279
+ * Markup for the first paint, carried as the rendered root's last
280
+ * children, which `SSR.hydrate` moves into the head. The host owns the
281
+ * template in dynamic serving, so this is where per-page styles go;
282
+ * anything else a head owns stays with `SSR.generate`.
253
283
  */
254
284
  readonly styles?: Head | undefined;
285
+ /**
286
+ * The status a rendered page is answered with, from the Model the server
287
+ * reached and the request: `404` for a route the Model says is not found.
288
+ * Omitted, every page is `200`. One outside `200`–`599`, a `204`, `205`
289
+ * or `304` that carries no body, or a `status` that throws, is answered
290
+ * `500` and reported, as a failed render is.
291
+ */
292
+ readonly status?: ((model: Model, request: Request) => number) | undefined;
293
+ /**
294
+ * How a posted form is answered. `'page'`, the default, is the page
295
+ * `update` reached, at the address the form posted to, so a reload posts
296
+ * again. `'redirect'` is a `303` to that address, which the browser then
297
+ * asks for with a `GET` (Post/Redirect/Get): what the post changed must
298
+ * outlive it where the next request reads it, a cookie `headers` writes
299
+ * from the Model the post reached. A refused post is still a `400`.
300
+ */
301
+ readonly answerPost?: 'page' | 'redirect' | undefined;
302
+ /**
303
+ * The paths a build prerenders through this entry (Foldkit's plugin,
304
+ * `ssr.build.prerender`), whose files a static host serves for every
305
+ * query. A request for one of them with no query records its path alone,
306
+ * as `SSR.generate` does, so the file resumes at `/?q=…` and the
307
+ * application starts from that URL. Export the same list as the entry
308
+ * module's `prerenderPaths`, which the plugin reads.
309
+ */
310
+ readonly prerendered?: ReadonlyArray<string> | undefined;
255
311
  /**
256
312
  * Where this request's diagnostics go, with the request: a request
257
313
  * answered 500 (`PageFailed`), a handler the page cannot name, and what
@@ -259,33 +315,76 @@ declare const entry: <Model, Fields extends Schema.Struct.Fields, Message = any>
259
315
  * (`Diagnostics.Reporter`) when not given, by default the log.
260
316
  */
261
317
  readonly diagnostics?: ((diagnostic: Diagnostic$1, request: Request) => Effect.Effect<void>) | undefined;
318
+ /**
319
+ * Keeps rendered `GET` and `HEAD` pages in `store` by build and URL
320
+ * (#428). A page is kept only when every read the render made through
321
+ * `foldkit-remote-server`'s `pageReader` was public, every request
322
+ * header `flags`, `prepare`, `headers` or `status` read was absent (the
323
+ * request's `cookie` included), `headers` set no `cookie` or
324
+ * `cache-control` of its own, and the status is `200`: drawn from the
325
+ * URL alone. It is kept for `maxAge` or its reads' shortest, and serves
326
+ * each later request that also lacks the headers it read; it says
327
+ * `cache-control: public, max-age=…` and `vary` with those names. Every
328
+ * other page says `private, no-store`. A read made other than through
329
+ * `pageReader` is not seen, so `maxAge` is all that bounds it.
330
+ *
331
+ * The render reads a request that records its headers: one handed to
332
+ * `fetch` or `new Request` fails the render. With `check`, for
333
+ * development and tests, a kept page is drawn again for the request it
334
+ * serves, and a difference is reported (`CachedPageDiffers`) and
335
+ * answered with the page drawn again.
336
+ */
337
+ readonly cache?: PageCache | undefined;
262
338
  }) => EntryModule;
339
+ /** Where `SSR.entry` keeps pages, for how long, and whether it checks them (`cache`). */
340
+ export type PageCache = CacheOptions & {
341
+ readonly store: CacheStore;
342
+ readonly check?: boolean | undefined;
343
+ };
344
+ /**
345
+ * The page cache's checker, for a test: builds the entry with `make`, given a
346
+ * store in memory and `check`, and answers each request twice, so a page
347
+ * kept for one request is drawn again for every later one it serves.
348
+ * Rejects naming each page drawn otherwise for a request it served, and
349
+ * when no page was kept, which would check nothing. Give requests that
350
+ * differ in who asks (a visitor's, and one with someone's cookie); each is a
351
+ * function, since a request is read once.
352
+ */
353
+ declare const checkCache: (make: (options: {
354
+ readonly cache: PageCache;
355
+ readonly diagnostics: (diagnostic: Diagnostic$1) => Effect.Effect<void>;
356
+ }) => EntryModule, requests: ReadonlyArray<() => Request>) => Promise<void>;
263
357
  declare const FallbackRefused_base: Schema.Class<FallbackRefused, Schema.TaggedStruct<"FallbackRefused", {
264
358
  readonly reason: Schema.Literals<readonly ["Missing", "Unreadable", "Invalid", "Unlisted", "NoFallback"]>;
265
359
  readonly message: Schema.String;
266
360
  }>, Cause.YieldableError>;
267
361
  /** Why a posted form was not handled: the request, not the page or the plan, is at fault. */
268
362
  export declare class FallbackRefused extends FallbackRefused_base {}
363
+ /** Turns the Model `init` gave into the one a request starts from. */
364
+ export type Prepare<Model> = (model: Model, request: Request) => Effect.Effect<Model, unknown>;
269
365
  /**
270
366
  * Answers a form posted by a page rendered with `fallback: 'server'`: the
271
367
  * posted Message is decoded through the plan's Message Schema, with posted
272
368
  * fields of the same names as its own overriding them, and must be one the
273
369
  * Surfaces active for the request's Model may send. The server then rebuilds
274
- * the Model the browser had, `init` and then the plan's `boot` with every
370
+ * the Model the browser had, `init`, `prepare` and then the plan's `boot` with every
275
371
  * Command it leads to, runs `update` with the Message and every Command that
276
372
  * follows, and renders the result as a fresh page.
277
373
  */
278
- declare const handle: <Model, Fields extends Schema.Struct.Fields, Message = any>(request: Request, config: ResumableConfig<Model, Message>, plan: ResumePlan<Model, Fields>, options: {
374
+ declare const handle: <Model, Fields extends Schema.Struct.Fields, Message = any>(request: Request, config: ResumableConfig<Model, Message>, plan: ResumePlan<Model, Fields>, options: HandleOptions<Model>) => Effect.Effect<RenderedPage, RenderError | ResumeUnsafe | FallbackRefused>;
375
+ interface HandleOptions<Model> {
279
376
  readonly buildId: string;
280
377
  readonly flags?: unknown;
281
378
  readonly styles?: Head | undefined;
379
+ /** The Model the post starts from, from `init`'s, as `SSR.entry`'s `prepare`. */
380
+ readonly prepare?: Prepare<Model> | undefined;
282
381
  /**
283
382
  * This post's own services, beside the config's `resources`: who is
284
383
  * asking, a client bound to them. Built once for the post; where both
285
384
  * provide a service, the post's is the one its Commands get.
286
385
  */
287
386
  readonly resources?: Layer.Layer<never, never, never> | undefined;
288
- }) => Effect.Effect<RenderedPage, RenderError | ResumeUnsafe | FallbackRefused>;
387
+ }
289
388
  export declare const SSR: {
290
389
  plan: typeof plan;
291
390
  envelope: typeof envelope;
@@ -298,6 +397,7 @@ export declare const SSR: {
298
397
  readonly otherwise?: 'render' | undefined;
299
398
  readonly until?: ((model: Model) => boolean) | undefined;
300
399
  readonly fresh?: ((version: unknown) => boolean) | undefined;
400
+ readonly prepare?: ((model: Model) => Effect.Effect<Model>) | undefined;
301
401
  readonly diagnostics?: import("foldkit-surface").ReportDiagnostic | undefined;
302
402
  }) => void;
303
403
  inspect: typeof inspect;
@@ -305,11 +405,13 @@ export declare const SSR: {
305
405
  serving: typeof serving;
306
406
  generate: typeof generate;
307
407
  entry: typeof entry;
408
+ checkCache: typeof checkCache;
409
+ keptDocuments: typeof keptDocuments;
308
410
  handle: typeof handle;
309
411
  serializeJsonScript: typeof serializeJsonScript;
310
412
  sitemap: typeof sitemap;
311
413
  robots: typeof robots;
312
414
  requestContext: typeof requestContext;
313
415
  };
314
- export { BINDING_ATTRIBUTE, type BundleUnloaded, type DecodedBinding, type Diagnostic, Diagnostics, FALLBACK_FIELD, FOLDKIT_APP_ATTRIBUTE, type HandlerUnnamed, type Loadable, META_ATTRIBUTE, type Meta, type PageContained, type PageFailed, type PlanSurface, RESUME_ATTRIBUTE, type ReportDiagnostic, type RequestContext, type ResumableBuilder, type ResumableConfig, Resume, type ResumePart, type ResumePlan, ResumeRefused, SLOT_ATTRIBUTE, STATIC_ATTRIBUTE, type SsrDiagnostic, type Start, type StaticRegionMissing, UNTIL_LIMIT_MS, type UnnamedHandler, metaMarkup };
416
+ export { BINDING_ATTRIBUTE, type BundleUnloaded, type DecodedBinding, type Diagnostic, Diagnostics, FALLBACK_FIELD, FOLDKIT_APP_ATTRIBUTE, type HandlerUnnamed, KEEP_ATTRIBUTE, type Loadable, META_ATTRIBUTE, type Meta, type PageContained, type PageFailed, type PlanSurface, RESUME_ATTRIBUTE, type ReportDiagnostic, type RequestContext, type ResumableBuilder, type ResumableConfig, Resume, type ResumePart, type ResumePlan, ResumeRefused, SLOT_ATTRIBUTE, STATIC_ATTRIBUTE, type SsrDiagnostic, type Start, type StaticRegionMissing, UNTIL_LIMIT_MS, type UnnamedHandler, metaMarkup };
315
417
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":["Diagnostic"],"sources":["../src/index.ts"],"mappings":";;;;;;;;UA8FU;WACC;WACA,QAAQ;WACR,WAAW,cAAc;;WAEzB,SAAS;;;;;;;;;cAUd,WAAY,OAAO,eAAe,OAAO,OAAO,QAAM,QAClD,WAAW,OAAO,SAAO,OAC1B,OAAK,UACH;;YAgHC;;iBAGK;WACN;;WAEA;;WAEA;;;;;WAKA;aAEM;aACA;eAAwB;eAAuB,OAAO;;;;WAI5D;aAAwB;aAAuB,OAAO;;;WAEtD,OAAO;aAAyB;aAAuB,OAAO;;;;;;WAK9D,WAAW,cAAc;;WAEzB;;;iBAIM;WACN;WACA,OAAO;WACP,OAAO;;WAEP,OAAO;WACP,UAAU,cAAc;;;;;;;cA4C7B,UAAW,OAAO,eAAe,OAAO,OAAO,QAAM,MACnD,WAAW,OAAO,SAAO,OACxB,UACN;;;;;;qBAyKU,qBAAqB;;iBA+HjB;;;;;;WAMN,UAAU;;WAEV;;WAEA;;;;;WAKA,SAAS,cAAc;;;;;;;;;;;;;;;cAgB5B,SAAU,OAAO,eAAe,OAA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