cursedauth 0.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 (108) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +87 -0
  3. package/dist/account/AccountMenu.d.ts +153 -0
  4. package/dist/account/AccountMenu.d.ts.map +1 -0
  5. package/dist/account/AccountMenu.js +388 -0
  6. package/dist/account/AccountMenu.js.map +1 -0
  7. package/dist/account/AccountNotice.d.ts +35 -0
  8. package/dist/account/AccountNotice.d.ts.map +1 -0
  9. package/dist/account/AccountNotice.js +133 -0
  10. package/dist/account/AccountNotice.js.map +1 -0
  11. package/dist/account/accountNotice.state.d.ts +20 -0
  12. package/dist/account/accountNotice.state.d.ts.map +1 -0
  13. package/dist/account/accountNotice.state.js +55 -0
  14. package/dist/account/accountNotice.state.js.map +1 -0
  15. package/dist/account/avatar.d.ts +37 -0
  16. package/dist/account/avatar.d.ts.map +1 -0
  17. package/dist/account/avatar.js +47 -0
  18. package/dist/account/avatar.js.map +1 -0
  19. package/dist/accountSlot.client.d.ts +113 -0
  20. package/dist/accountSlot.client.d.ts.map +1 -0
  21. package/dist/accountSlot.client.js +330 -0
  22. package/dist/accountSlot.client.js.map +1 -0
  23. package/dist/accountSlots.d.ts +192 -0
  24. package/dist/accountSlots.d.ts.map +1 -0
  25. package/dist/accountSlots.js +274 -0
  26. package/dist/accountSlots.js.map +1 -0
  27. package/dist/auth.d.ts +167 -0
  28. package/dist/auth.d.ts.map +1 -0
  29. package/dist/auth.js +310 -0
  30. package/dist/auth.js.map +1 -0
  31. package/dist/auth.server.d.ts +35 -0
  32. package/dist/auth.server.d.ts.map +1 -0
  33. package/dist/auth.server.js +67 -0
  34. package/dist/auth.server.js.map +1 -0
  35. package/dist/clientDescription.d.ts +186 -0
  36. package/dist/clientDescription.d.ts.map +1 -0
  37. package/dist/clientDescription.js +278 -0
  38. package/dist/clientDescription.js.map +1 -0
  39. package/dist/constantTime.d.ts +35 -0
  40. package/dist/constantTime.d.ts.map +1 -0
  41. package/dist/constantTime.js +46 -0
  42. package/dist/constantTime.js.map +1 -0
  43. package/dist/contentCensus.d.ts +59 -0
  44. package/dist/contentCensus.d.ts.map +1 -0
  45. package/dist/contentCensus.js +55 -0
  46. package/dist/contentCensus.js.map +1 -0
  47. package/dist/index.d.ts +25 -0
  48. package/dist/index.d.ts.map +1 -0
  49. package/dist/index.js +24 -0
  50. package/dist/index.js.map +1 -0
  51. package/dist/mountGatedApp.d.ts +128 -0
  52. package/dist/mountGatedApp.d.ts.map +1 -0
  53. package/dist/mountGatedApp.js +107 -0
  54. package/dist/mountGatedApp.js.map +1 -0
  55. package/dist/runtimeMode.d.ts +28 -0
  56. package/dist/runtimeMode.d.ts.map +1 -0
  57. package/dist/runtimeMode.js +37 -0
  58. package/dist/runtimeMode.js.map +1 -0
  59. package/dist/secureRequest.d.ts +22 -0
  60. package/dist/secureRequest.d.ts.map +1 -0
  61. package/dist/secureRequest.js +27 -0
  62. package/dist/secureRequest.js.map +1 -0
  63. package/dist/sso.d.ts +373 -0
  64. package/dist/sso.d.ts.map +1 -0
  65. package/dist/sso.js +420 -0
  66. package/dist/sso.js.map +1 -0
  67. package/dist/ssoAutoSignIn.d.ts +272 -0
  68. package/dist/ssoAutoSignIn.d.ts.map +1 -0
  69. package/dist/ssoAutoSignIn.js +431 -0
  70. package/dist/ssoAutoSignIn.js.map +1 -0
  71. package/dist/ssoConsumer.server.d.ts +295 -0
  72. package/dist/ssoConsumer.server.d.ts.map +1 -0
  73. package/dist/ssoConsumer.server.js +972 -0
  74. package/dist/ssoConsumer.server.js.map +1 -0
  75. package/dist/stageIdentity.d.ts +72 -0
  76. package/dist/stageIdentity.d.ts.map +1 -0
  77. package/dist/stageIdentity.js +74 -0
  78. package/dist/stageIdentity.js.map +1 -0
  79. package/dist/ui/popover.d.ts +190 -0
  80. package/dist/ui/popover.d.ts.map +1 -0
  81. package/dist/ui/popover.js +351 -0
  82. package/dist/ui/popover.js.map +1 -0
  83. package/dist/userSessions.d.ts +205 -0
  84. package/dist/userSessions.d.ts.map +1 -0
  85. package/dist/userSessions.js +419 -0
  86. package/dist/userSessions.js.map +1 -0
  87. package/package.json +115 -0
  88. package/src/account/AccountMenu.tsx +729 -0
  89. package/src/account/AccountNotice.tsx +223 -0
  90. package/src/account/accountNotice.state.ts +66 -0
  91. package/src/account/avatar.ts +50 -0
  92. package/src/accountSlot.client.ts +362 -0
  93. package/src/accountSlots.ts +305 -0
  94. package/src/auth.server.ts +89 -0
  95. package/src/auth.ts +515 -0
  96. package/src/clientDescription.ts +366 -0
  97. package/src/constantTime.ts +45 -0
  98. package/src/contentCensus.ts +106 -0
  99. package/src/index.ts +58 -0
  100. package/src/mountGatedApp.ts +240 -0
  101. package/src/runtimeMode.ts +37 -0
  102. package/src/secureRequest.ts +25 -0
  103. package/src/sso.ts +767 -0
  104. package/src/ssoAutoSignIn.ts +544 -0
  105. package/src/ssoConsumer.server.ts +1260 -0
  106. package/src/stageIdentity.ts +76 -0
  107. package/src/ui/popover.ts +390 -0
  108. package/src/userSessions.ts +678 -0
@@ -0,0 +1,295 @@
1
+ import type { Database } from "bun:sqlite";
2
+ import type { Context, Hono, MiddlewareHandler } from "hono";
3
+ import { type ContentCensus } from "./sso";
4
+ import type { UserSessionStore } from "./userSessions";
5
+ export declare const SSO_CALLBACK_PATH = "/api/auth/sso/callback";
6
+ export declare const SSO_START_PATH = "/api/auth/sso/start";
7
+ /**
8
+ * The GLOBAL sign-out door (2026-08-10) — this app's session AND auth's.
9
+ *
10
+ * 🔴 GET, unlike `POST /api/auth/logout` right below it, and the difference is
11
+ * forced: this route ends in a redirect to ANOTHER ORIGIN, so it has to be a
12
+ * top-level navigation the browser drives, and a form POST cannot carry auth's
13
+ * cookie back on the return hop. That re-opens the CSRF surface the POST
14
+ * logout was written to close, and the trade is deliberate: the whole damage a
15
+ * forged sign-out can do is sign somebody out, which they can undo in one
16
+ * click. It is the same shape as OIDC RP-initiated logout for the same reason.
17
+ * Prefetching is not a concern the way it is for `<a href>` — the only caller
18
+ * is `startSsoSignOut`, which navigates from a click handler.
19
+ *
20
+ * The mirror of this constant lives in `ssoAutoSignIn.ts` (browser-side, which
21
+ * must not import `bun:sqlite`); `ssoAutoSignIn.test.ts` pins them equal.
22
+ */
23
+ export declare const SSO_SIGNOUT_PATH = "/api/auth/sso/signout";
24
+ /**
25
+ * Where auth pushes a revocation. Server-to-server, not a browser redirect: no
26
+ * cookie, no session, no CSRF surface — the signed ticket IS the authorization,
27
+ * so this route sits OUTSIDE `requireUser` by construction.
28
+ */
29
+ export declare const SSO_REVOKE_PATH = "/api/auth/sso/revoke";
30
+ /**
31
+ * Where auth ASKS this app what the named accounts have made here, before it
32
+ * takes their access away (2026-08-10). Same shape as the revoke route — a
33
+ * signed, single-audience ticket IS the authorization, so no cookie and no
34
+ * session — and read-only: it counts rows and answers, never writes.
35
+ */
36
+ export declare const SSO_CENSUS_PATH = "/api/auth/sso/census";
37
+ /**
38
+ * Where auth ASKS this app which of an account's sessions are alive here
39
+ * (2026-08-12) — the read half of the fleet-wide Login Sessions list.
40
+ *
41
+ * Same shape and same posture as the two above: a signed, single-audience,
42
+ * 60-second ticket IS the authorization, so no cookie, no session, and the
43
+ * route sits outside `requireUser`. Read-only — ENDING a session is the
44
+ * revocation ticket narrowed by `sid`, never a second door here.
45
+ *
46
+ * 🔴 A new server-to-server path is a new thing an edge gate can silently eat.
47
+ * Five hostnames sit behind Cloudflare Access, whose bypass list is enumerated
48
+ * per path (see `AS-BUILT-cloudflare-access.md`); this path is on it for the
49
+ * same reason `/revoke` and `/census` are, and auth reads any 3xx here as a
50
+ * failure rather than as an empty list.
51
+ */
52
+ export declare const SSO_SESSIONS_PATH = "/api/auth/sso/sessions";
53
+ /**
54
+ * The one-shot cookie that carries a signed-out deep link across the grant round
55
+ * trip (2026-08-05). A shared `/play/<name>` link opened signed out used to land
56
+ * on the app's index after the SSO hop, because the callback's redirect target
57
+ * belonged to this module, not to the app. The return path now rides HERE — a
58
+ * cookie on THIS app's own origin, set at `/sso/start`, read at the callback —
59
+ * so it never passes through the auth satellite and can never be smuggled
60
+ * through it into an open redirect. It is validated on the way in AND again on
61
+ * the way back (`sanitizeReturnPath`), so only a same-origin path of this app
62
+ * can ever survive to become a redirect target.
63
+ */
64
+ export declare const SSO_RETURN_COOKIE = "sso_return";
65
+ /**
66
+ * The one-shot cookie that carries the target ACCOUNT SLOT across the same
67
+ * round trip (2026-08-12).
68
+ *
69
+ * 🔴 It has to be a cookie, for a reason that is easy to miss: the callback URL
70
+ * is the app's REGISTERED `redirect_uri`, matched at auth by exact string, and
71
+ * auth appends nothing but `?grant=`. So there is no way for the hop to tell
72
+ * the callback which slot it was started from — the query param that names the
73
+ * slot everywhere else in the fleet cannot survive a registered redirect. The
74
+ * same one-shot mechanism the deep link already uses carries it instead.
75
+ *
76
+ * Two values, and the difference matters:
77
+ *
78
+ * `add` — "put this person in a NEW slot, keep everyone else signed in".
79
+ * The slot is chosen at the CALLBACK, not here, because the browser
80
+ * can gain or lose a session during the round trip and a number
81
+ * pinned at the start would then evict somebody.
82
+ * `<n>` — "put them in slot n", which is the tab that started the hop.
83
+ *
84
+ * Absent means slot 0: an old cookie jar, an expired one-shot, or a plain first
85
+ * sign-in. All three are the single-account path this fleet already had.
86
+ *
87
+ * Like the slot param itself this is a HINT, never an authorization. The worst
88
+ * a tampered value achieves is landing your own new session in a different slot
89
+ * of your own browser.
90
+ */
91
+ export declare const SSO_SLOT_COOKIE = "sso_slot";
92
+ /**
93
+ * THE open-redirect gate for every private satellite. The only return target a
94
+ * signed-out deep link may resume to is a same-origin PATH on this app; anything
95
+ * that could send the browser to another origin is refused and the caller falls
96
+ * back to the index. It fails closed by construction — every branch that is not
97
+ * a provably-safe relative path returns null:
98
+ *
99
+ * - absolute URLs (`https://evil.com/x`, `javascript:…`) → not `/`-rooted
100
+ * - protocol-relative `//evil.com` → second char `/`
101
+ * - `\`-smuggled authority (`/\evil.com`, browsers fold `\`→`/`)
102
+ * - control characters (NUL/CR/LF/TAB — header splitting / re-parsing)
103
+ * - percent-encoded slash/backslash/dot that could hide `//` or `..`
104
+ * - `..` path traversal
105
+ *
106
+ * Exported so `ssoConsumer.server.test.ts` can hammer each form directly — an
107
+ * open redirect on every private satellite at once is the primary risk of this
108
+ * change, so it is tested as a unit, not only through the routes.
109
+ */
110
+ export declare function sanitizeReturnPath(raw: string | null | undefined): string | null;
111
+ export interface SsoUser {
112
+ id: string;
113
+ email: string;
114
+ name: string;
115
+ isAdmin: boolean;
116
+ /** The machine's owner — decides who is shown localhost links in the fleet
117
+ * directory. Never inferred from `isAdmin`; see `fleet/access.ts`. */
118
+ isOwner: boolean;
119
+ /** Auth explicitly granted this account access to THIS app, rather than the
120
+ * app's default tier admitting them. Lets a household member into an
121
+ * admin-tier app without being made an admin of the user registry. */
122
+ isGranted: boolean;
123
+ }
124
+ export interface SsoConsumerOptions {
125
+ /**
126
+ * This app's registered key at auth (e.g. "hobbies"). Doubles as `aud` — except
127
+ * on a staged artifact, where the audience becomes `<app>-local`; see
128
+ * {@link resolveSsoAudience}. This value stays the app's own identity for
129
+ * session scopes, log prefixes and the fleet row either way.
130
+ */
131
+ app: string;
132
+ /** The auth satellite's origin, no trailing slash. */
133
+ authUrl: string;
134
+ /**
135
+ * The environment the audience switch is read from. Defaults to `process.env`;
136
+ * threaded so a test can prove both branches without mutating the process, the
137
+ * same reason `readSatelliteConfig` takes one.
138
+ */
139
+ env?: NodeJS.ProcessEnv;
140
+ /** THIS app's own origin — what the callback URL is built from. Configured,
141
+ * not derived from the request: a Host-header value must never choose where
142
+ * a credential gets redirected. */
143
+ publicUrl: string;
144
+ sessions: UserSessionStore;
145
+ /** The app's own database — the `sso_users` snapshot lives here so app
146
+ * tables can foreign-key the user id. */
147
+ db: Database;
148
+ /** Static verification key (SPKI PEM). Set → JWKS is never fetched. */
149
+ publicKeyPem?: string;
150
+ /**
151
+ * Admin accounts only (2026-07-28, for the orchestrator's companion). The
152
+ * registry is one HOUSEHOLD user set — an account that may open ROMs must
153
+ * not automatically open an app that mirrors every task on the owner's
154
+ * machine. Enforced at BOTH doors: a non-admin grant never mints a session
155
+ * (callback), and a session whose snapshot row has since lost the flag is
156
+ * refused per request (requireUser).
157
+ */
158
+ requireAdmin?: boolean;
159
+ /**
160
+ * Restrict sign-in to specific accounts by email (2026-08-01, for the station —
161
+ * the control plane is the OWNER's, and "admin" is a grantable flag, not a
162
+ * structural one-person guarantee). Case-insensitive; composes with
163
+ * `requireAdmin` (both must pass). Enforced at BOTH doors, exactly like
164
+ * `requireAdmin`: the callback never mints a session for an unlisted account,
165
+ * and a session whose snapshot email has since left the list is refused per
166
+ * request. An empty array means "nobody" and is almost certainly a config
167
+ * error — prefer omitting the option to allow all registered users.
168
+ */
169
+ allowedEmails?: string[];
170
+ /**
171
+ * What the named accounts have MADE in this app (2026-08-10).
172
+ *
173
+ * Auth calls it while the owner is deciding whether to close this app to
174
+ * somebody, and puts the answer in the confirmation dialog — "Sam would lose
175
+ * access to 34 save states" is a different decision from "Sam has nothing
176
+ * here". Auth cannot work this out itself: it holds no app data, by design.
177
+ *
178
+ * Implement it wherever rows are keyed on the user id, and implement it as
179
+ * `{ scope: "shared" }` where they are NOT — an app with one shared library
180
+ * (the notes corpus, the family tree) should say so rather than stay silent,
181
+ * because silence reads as "could not find out" and stalls a decision that
182
+ * nothing was ever at risk in.
183
+ *
184
+ * Rules for an implementation: COUNT, never read content (auth is not
185
+ * entitled to what the rows say, only to how many there are), and never
186
+ * write. Throwing is safe — auth reports the app as unreachable rather than
187
+ * as empty.
188
+ */
189
+ contentCensus?: (userIds: string[]) => ContentCensus | Promise<ContentCensus>;
190
+ /**
191
+ * Every audience auth will mint a grant for on THIS app's behalf — its prod
192
+ * key and, if it has one, its local-stage twin (`["flix", "flix-local"]`).
193
+ *
194
+ * 🔴 The app declares this, and that is a deliberate change from the
195
+ * previous generation (2026-09-14). There, the list came from a 777-line
196
+ * fleet-wide registry compiled into the library: every app carried a table
197
+ * of every other app, and adding a satellite meant editing the shared
198
+ * platform. Here a consumer knows only its own doors. Omitted, the audience
199
+ * is always {@link SsoConsumerOptions.app} — which is the correct answer for
200
+ * any app that has no local stage, and the safe answer for one that does.
201
+ */
202
+ registeredAudiences?: readonly string[];
203
+ fetchImpl?: typeof fetch;
204
+ now?: () => number;
205
+ }
206
+ export interface SsoConsumer {
207
+ /** 401 gate for `/api/*`: resolves the cookie to a user, sets claims. */
208
+ requireUser: MiddlewareHandler;
209
+ /** The signed-in user, for handlers behind `requireUser`. */
210
+ userOf(c: Context): SsoUser | null;
211
+ /**
212
+ * The same authorization decision `requireUser` makes, for a door that has no
213
+ * Hono `Context` — today that means a WebSocket upgrade.
214
+ *
215
+ * 🔴 It exists because "a socket is not a lesser door" is only true if both
216
+ * doors ask the same question, and an app that re-implements the rule against
217
+ * the `sso_users` snapshot gets a DIFFERENT answer. Measured in apps/orch on
218
+ * 2026-08-12: its handshake accepted `is_admin = 1` only, so every HTTP route
219
+ * served the deploy smoke's session (200) while the WS upgrade refused it —
220
+ * the smoke account is GRANTED this app, not an admin, and `requireAdmin` has
221
+ * meant "admin OR granted" since 2026-08-02. The owner is an admin, so no
222
+ * human ever saw it; it only ever failed the smoke, which then failed and
223
+ * rolled back every orch-local deploy.
224
+ *
225
+ * Returns the user when the request may proceed, `null` for every refusal —
226
+ * the same collapse `requireUser` already makes (all three of its rejection
227
+ * branches return an identical 401, deliberately: a door that explains WHICH
228
+ * check failed is a door that helps enumerate accounts).
229
+ */
230
+ authorizeRequest(req: Request): SsoUser | null;
231
+ /**
232
+ * The same decision again, for a door that has only HEADERS — a WebSocket
233
+ * upgrade, whose only credential is the cookie the browser attaches itself
234
+ * (a browser `WebSocket` cannot send an `Authorization` header).
235
+ *
236
+ * 🔴 This is {@link authorizeRequest} with an adapter, deliberately, and the
237
+ * adapter is the whole feature: every app that had to write one wrote a
238
+ * DIFFERENT rule. `apps/arcade` resolved the cookie to an `sso_users` row and
239
+ * stopped there — no `adminOrGranted`, no `emailAllowed` — so a person whose
240
+ * grant had been revoked, or whose address had left the allow-list, was
241
+ * refused by every HTTP route and still opened a socket. Its own comment said
242
+ * the check "goes through the SAME session store the HTTP routes do", which
243
+ * was true and not the point.
244
+ *
245
+ * That is the shape a second authorization path always has: it drifts silently,
246
+ * because a socket that authenticates wrongly still opens and nothing 401s. The
247
+ * fix is not a better copy, it is no copy — which is why this delegates rather
248
+ * than reimplementing, and why the delegation must not be "simplified" into a
249
+ * cookie lookup here.
250
+ */
251
+ verifyHandshake(headers: Headers): SsoUser | null;
252
+ mountSsoRoutes(app: Hono): void;
253
+ }
254
+ /**
255
+ * THE GRANT AUDIENCE — this app's own key, or its LOCAL twin on a staged artifact.
256
+ *
257
+ * ## What this buys, and why it is the audience rather than just the URL
258
+ *
259
+ * Pointing a staged artifact at the local accounts daemon (`appConfig`'s forced
260
+ * `authUrl`) stops it writing sessions into the owner's real registry. That is one
261
+ * direction. This function is the OTHER direction, and it is the half that makes the
262
+ * isolation mutual: a grant minted by `auth-local` carries `aud: "<app>-local"`, and
263
+ * the production deployment of that app verifies `aud: "<app>"` — so a credential
264
+ * minted on this Mac is **structurally unusable against production**, not merely
265
+ * unlikely to be sent there. `<app>-local` additionally has an EMPTY `prodOrigin` in
266
+ * the roster, so even a registry that allows local consumers has no callback for it on
267
+ * the internet. That is the `orch-local` / `station-local` shape, which those two apps
268
+ * have carried since 2026-07-31; this is the thirteen others adopting it without each
269
+ * hand-writing a second `createSsoConsumer` branch.
270
+ *
271
+ * ## Three conditions, all required, and each one closes a different door
272
+ *
273
+ * 1. **the stage marker** — `APP_STAGE_IDENTITY=local`, written only by
274
+ * `smoke/localStage.ts`. Without it an ordinary `bun run dev` shell keeps signing
275
+ * in as `<app>` through the dev-gateway alias (`http://<app>.localhost:3300`),
276
+ * which is registered on the PROD key and deliberately not on the local one — the
277
+ * `*.localhost` exclusion `sso.test.ts` pins. Deriving the switch from "authUrl is
278
+ * loopback" alone would have silently broken gateway sign-in in every app.
279
+ * 2. **a loopback registry** — belt and braces on the marker. A stray marker on a
280
+ * real release cannot move the audience while `authUrl` is the internet.
281
+ * 3. **`<app>-local` is actually in the roster** — so an app whose local door has not
282
+ * been registered keeps its own key and fails visibly at the ROSTER, instead of
283
+ * asking auth for an audience nobody has heard of and getting 400 `unknown app` at
284
+ * the far end of a browser hop. It is also what keeps `station-local` and
285
+ * `orch-local` unchanged when they pass through here: `station-local-local` is not
286
+ * a key, so their explicit audience wins, as it must.
287
+ *
288
+ * 🔴 It moves the AUDIENCE only. `appKey` stays the app's own identity everywhere else
289
+ * — the session `scopes`, the log prefixes, the fleet row — because those are read by
290
+ * app code that has no idea it is on a stage, and a scope string that changed shape
291
+ * under the app would be a permissions bug wearing a stage costume.
292
+ */
293
+ export declare function resolveSsoAudience(appKey: string, authUrl: string, env?: NodeJS.ProcessEnv, registered?: readonly string[]): string;
294
+ export declare function createSsoConsumer(options: SsoConsumerOptions): SsoConsumer;
295
+ //# sourceMappingURL=ssoConsumer.server.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ssoConsumer.server.d.ts","sourceRoot":"","sources":["../src/ssoConsumer.server.ts"],"names":[],"mappings":"AA+BA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,iBAAiB,EAAQ,MAAM,MAAM,CAAC;AAInE,OAAO,EAEN,KAAK,aAAa,EAUlB,MAAM,OAAO,CAAC;AASf,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAEvD,eAAO,MAAM,iBAAiB,2BAA2B,CAAC;AAC1D,eAAO,MAAM,cAAc,wBAAwB,CAAC;AACpD;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,gBAAgB,0BAA0B,CAAC;AACxD;;;;GAIG;AACH,eAAO,MAAM,eAAe,yBAAyB,CAAC;AACtD;;;;;GAKG;AACH,eAAO,MAAM,eAA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