on-zero 0.9.2 → 0.9.3
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.
- package/dist/cjs/createZeroClient.cjs +111 -58
- package/dist/cjs/createZeroClient.headless.test.cjs +33 -0
- package/dist/cjs/createZeroClient.headless.test.native.js +38 -0
- package/dist/cjs/createZeroClient.headless.test.native.js.map +1 -0
- package/dist/cjs/createZeroClient.native.js +142 -90
- package/dist/cjs/createZeroClient.native.js.map +1 -1
- package/dist/cjs/zeroRunner.cjs +1 -1
- package/dist/cjs/zeroRunner.native.js +1 -1
- package/dist/esm/createZeroClient.headless.test.mjs +34 -0
- package/dist/esm/createZeroClient.headless.test.mjs.map +1 -0
- package/dist/esm/createZeroClient.headless.test.native.js +36 -0
- package/dist/esm/createZeroClient.headless.test.native.js.map +1 -0
- package/dist/esm/createZeroClient.mjs +112 -59
- package/dist/esm/createZeroClient.mjs.map +1 -1
- package/dist/esm/createZeroClient.native.js +143 -91
- package/dist/esm/createZeroClient.native.js.map +1 -1
- package/dist/esm/zeroRunner.mjs +1 -1
- package/dist/esm/zeroRunner.mjs.map +1 -1
- package/dist/esm/zeroRunner.native.js +1 -1
- package/package.json +1 -1
- package/src/createZeroClient.headless.test.tsx +47 -0
- package/src/createZeroClient.tsx +171 -78
- package/src/zeroRunner.ts +1 -1
- package/types/createZeroClient.d.ts +22 -0
- package/types/createZeroClient.d.ts.map +1 -1
- package/types/createZeroClient.headless.test.d.ts +2 -0
- package/types/createZeroClient.headless.test.d.ts.map +1 -0
package/src/createZeroClient.tsx
CHANGED
|
@@ -291,9 +291,116 @@ export function createZeroClientInternal<
|
|
|
291
291
|
|
|
292
292
|
const DisabledContext = createContext<QueryControlMode>(false)
|
|
293
293
|
|
|
294
|
+
// mutators never vary per mount: auth is read dynamically through
|
|
295
|
+
// getAuthData() at mutation time. built once, lazily, so the provider and
|
|
296
|
+
// connectHeadless construct identical instances without either one forcing
|
|
297
|
+
// the work at createZeroClient() time.
|
|
298
|
+
let clientMutators: ReturnType<typeof createMutators> | null = null
|
|
299
|
+
function getClientMutators() {
|
|
300
|
+
clientMutators ??= createMutators({
|
|
301
|
+
models,
|
|
302
|
+
environment: 'client',
|
|
303
|
+
authData: null,
|
|
304
|
+
can: permissionsHelpers.can,
|
|
305
|
+
})
|
|
306
|
+
return clientMutators
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
type ConstructZeroInstanceArgs = {
|
|
310
|
+
options: Omit<ZeroOptions<Schema, ZeroMutators>, 'schema' | 'mutators'>
|
|
311
|
+
transport?: ZeroProviderTransport
|
|
312
|
+
beforeReload?: () => Promise<void>
|
|
313
|
+
scheduleReload?: (ctx: ScheduleReloadContext) => void
|
|
314
|
+
guardStorage?: RecoveryGuardStorage
|
|
315
|
+
benignLogPatterns?: readonly ZeroLogPattern[]
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
// build a Zero instance with on-zero's recovery wiring. shared by the
|
|
319
|
+
// provider's rotation effect and by connectHeadless so a non-react host gets
|
|
320
|
+
// the same instance the app gets, rather than a parallel construction that
|
|
321
|
+
// can drift.
|
|
322
|
+
function constructZeroInstance({
|
|
323
|
+
options,
|
|
324
|
+
transport,
|
|
325
|
+
beforeReload,
|
|
326
|
+
scheduleReload,
|
|
327
|
+
guardStorage,
|
|
328
|
+
benignLogPatterns,
|
|
329
|
+
}: ConstructZeroInstanceArgs): ZeroInstance {
|
|
330
|
+
// install before construction so the instance's first connect goes through
|
|
331
|
+
// HTTP. ensureHttpPullTransport is per-origin idempotent by design (a
|
|
332
|
+
// rotation would otherwise chain shims), so repeat calls reuse.
|
|
333
|
+
if (transport) {
|
|
334
|
+
// same precedence as zero's own getServer (cacheURL is the current
|
|
335
|
+
// option name; server is its deprecated alias)
|
|
336
|
+
const serverURL = options.cacheURL ?? options.server
|
|
337
|
+
if (typeof serverURL !== 'string') {
|
|
338
|
+
throw new Error(`client transport requires a server URL`)
|
|
339
|
+
}
|
|
340
|
+
transport.install(serverURL)
|
|
341
|
+
}
|
|
342
|
+
// recovery closures reach the instance through this ref so they always
|
|
343
|
+
// delete the CURRENT instance's own store (set right after construction;
|
|
344
|
+
// the handlers only fire post-mount).
|
|
345
|
+
const instanceRef: { current: ZeroInstance | null } = { current: null }
|
|
346
|
+
const recoveryDeps: ZeroRecoveryDeps = {
|
|
347
|
+
deleteLocalState: () => deleteZeroInstance(instanceRef.current),
|
|
348
|
+
zeroEvents,
|
|
349
|
+
beforeReload,
|
|
350
|
+
scheduleReload,
|
|
351
|
+
guardStorage,
|
|
352
|
+
benignLogPatterns: [
|
|
353
|
+
...(transport?.logClassifications?.benign ?? []),
|
|
354
|
+
...(benignLogPatterns ?? []),
|
|
355
|
+
],
|
|
356
|
+
onRecovery: () => mutationLifecycle.fence(),
|
|
357
|
+
}
|
|
358
|
+
const recovery = makeZeroRecovery(recoveryDeps)
|
|
359
|
+
const createdInstance = new ZeroClient<Schema, ZeroMutators>({
|
|
360
|
+
kvStore: 'mem',
|
|
361
|
+
...options,
|
|
362
|
+
schema,
|
|
363
|
+
// @ts-expect-error same erasure ZeroProvider needed
|
|
364
|
+
mutators: getClientMutators(),
|
|
365
|
+
// when the consumer brings no logSink, install ours: it preserves Zero's
|
|
366
|
+
// console output AND watches for the local-store-lost signature. a
|
|
367
|
+
// consumer with its own logSink owns log-based recovery (no double-fire
|
|
368
|
+
// with e.g. soot's origin-gated recovery).
|
|
369
|
+
logSink: options.logSink ?? composeRecoveryLogSink(recoveryDeps),
|
|
370
|
+
// consumer handlers win; otherwise on-zero's default self-healing
|
|
371
|
+
// recovery covers EVERY reason (drop local state + reload, guarded) —
|
|
372
|
+
// passing these to Zero disables its built-in reload, so any reason we
|
|
373
|
+
// left unhandled would fatal-blank the app forever.
|
|
374
|
+
onUpdateNeeded: options.onUpdateNeeded ?? recovery.onUpdateNeeded,
|
|
375
|
+
onClientStateNotFound:
|
|
376
|
+
options.onClientStateNotFound ?? recovery.onClientStateNotFound,
|
|
377
|
+
})
|
|
378
|
+
instanceRef.current = createdInstance
|
|
379
|
+
return createdInstance
|
|
380
|
+
}
|
|
381
|
+
|
|
294
382
|
let latestZeroInstance: ZeroInstance | null = null
|
|
295
383
|
const zeroReadyWaiters = new Set<(instance: ZeroInstance) => void>()
|
|
296
384
|
|
|
385
|
+
// publish the active instance through the stable facade and query runner.
|
|
386
|
+
// the provider calls this during render (before descendant effects do
|
|
387
|
+
// imperative work) and connectHeadless calls it directly — the `zero` proxy,
|
|
388
|
+
// run(), and waitForZero() resolve identically either way.
|
|
389
|
+
function publishZeroInstance(zeroInstance: ZeroInstance): boolean {
|
|
390
|
+
if (zeroInstance === latestZeroInstance) return false
|
|
391
|
+
latestZeroInstance = zeroInstance
|
|
392
|
+
mutationLifecycle.activate()
|
|
393
|
+
const runner: ZeroRunner = (query, options) => zeroInstance.run(query as any, options)
|
|
394
|
+
// the instance-keyed runner is what run() dispatches owned namespaces to;
|
|
395
|
+
// the global runner stays as the ambient fallback (inline zql)
|
|
396
|
+
instance.runner = runner
|
|
397
|
+
setRunner(runner)
|
|
398
|
+
const waiters = [...zeroReadyWaiters]
|
|
399
|
+
zeroReadyWaiters.clear()
|
|
400
|
+
for (const onReady of waiters) onReady(zeroInstance)
|
|
401
|
+
return true
|
|
402
|
+
}
|
|
403
|
+
|
|
297
404
|
function waitForZero({ signal }: WaitForZeroOptions = {}): Promise<ZeroInstance> {
|
|
298
405
|
if (latestZeroInstance) return Promise.resolve(latestZeroInstance)
|
|
299
406
|
if (signal?.aborted) {
|
|
@@ -733,19 +840,6 @@ export function createZeroClientInternal<
|
|
|
733
840
|
// (mutations read auth dynamically via getAuthData() to avoid stale closure race condition)
|
|
734
841
|
setAuthData(authData)
|
|
735
842
|
|
|
736
|
-
// mutators are stable — auth is read dynamically via getAuthData() at mutation
|
|
737
|
-
// time, so we don't need to recreate them (or the Zero instance) on auth change.
|
|
738
|
-
// setAuthData() above already ensures getAuthData() returns current auth.
|
|
739
|
-
const mutators = useMemo(() => {
|
|
740
|
-
return createMutators({
|
|
741
|
-
models,
|
|
742
|
-
environment: 'client',
|
|
743
|
-
authData: null,
|
|
744
|
-
can: permissionsHelpers.can,
|
|
745
|
-
})
|
|
746
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
747
|
-
}, [])
|
|
748
|
-
|
|
749
843
|
// host-scoped storage: composed here so embedding hosts isolate co-located
|
|
750
844
|
// apps without app code carrying host globals. static per page load — the
|
|
751
845
|
// host injects the scope before the app's module graph evaluates.
|
|
@@ -839,19 +933,6 @@ export function createZeroClientInternal<
|
|
|
839
933
|
'schema' | 'mutators'
|
|
840
934
|
>
|
|
841
935
|
|
|
842
|
-
// install before construction so the instance's first connect goes
|
|
843
|
-
// through HTTP. per-origin idempotence is strict: a second provider may
|
|
844
|
-
// reuse this transport only when every behavior option matches.
|
|
845
|
-
if (transport) {
|
|
846
|
-
// same precedence as zero's own getServer (cacheURL is the current
|
|
847
|
-
// option name; server is its deprecated alias)
|
|
848
|
-
const serverURL = options.cacheURL ?? options.server
|
|
849
|
-
if (typeof serverURL !== 'string') {
|
|
850
|
-
throw new Error(`client transport requires a server URL`)
|
|
851
|
-
}
|
|
852
|
-
transport.install(serverURL)
|
|
853
|
-
}
|
|
854
|
-
|
|
855
936
|
if (cached?.key !== instanceKey) {
|
|
856
937
|
if (cached) {
|
|
857
938
|
// the replacement's SetZeroInstance effect publishes one version
|
|
@@ -860,44 +941,17 @@ export function createZeroClientInternal<
|
|
|
860
941
|
mutationLifecycle.fence()
|
|
861
942
|
cached.instance.close()
|
|
862
943
|
}
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
benignLogPatterns: [
|
|
874
|
-
...(transport?.logClassifications?.benign ?? []),
|
|
875
|
-
...(benignLogPatterns ?? []),
|
|
876
|
-
],
|
|
877
|
-
onRecovery: () => mutationLifecycle.fence(),
|
|
944
|
+
cached = {
|
|
945
|
+
key: instanceKey,
|
|
946
|
+
instance: constructZeroInstance({
|
|
947
|
+
options,
|
|
948
|
+
transport,
|
|
949
|
+
beforeReload,
|
|
950
|
+
scheduleReload,
|
|
951
|
+
guardStorage,
|
|
952
|
+
benignLogPatterns,
|
|
953
|
+
}),
|
|
878
954
|
}
|
|
879
|
-
const recovery = makeZeroRecovery(recoveryDeps)
|
|
880
|
-
const createdInstance = new ZeroClient<Schema, ZeroMutators>({
|
|
881
|
-
kvStore: 'mem',
|
|
882
|
-
...options,
|
|
883
|
-
schema,
|
|
884
|
-
// @ts-expect-error same erasure ZeroProvider needed
|
|
885
|
-
mutators,
|
|
886
|
-
// when the consumer brings no logSink, install ours: it preserves
|
|
887
|
-
// Zero's console output AND watches for the local-store-lost signature.
|
|
888
|
-
// a consumer with its own logSink owns log-based recovery (no
|
|
889
|
-
// double-fire with e.g. soot's origin-gated recovery).
|
|
890
|
-
logSink: options.logSink ?? composeRecoveryLogSink(recoveryDeps),
|
|
891
|
-
// consumer handlers win; otherwise on-zero's default self-healing
|
|
892
|
-
// recovery covers EVERY reason (drop local state + reload, guarded) —
|
|
893
|
-
// passing these to Zero disables its built-in reload, so any reason we
|
|
894
|
-
// left unhandled would fatal-blank the app forever.
|
|
895
|
-
onUpdateNeeded: options.onUpdateNeeded ?? recovery.onUpdateNeeded,
|
|
896
|
-
onClientStateNotFound:
|
|
897
|
-
options.onClientStateNotFound ?? recovery.onClientStateNotFound,
|
|
898
|
-
})
|
|
899
|
-
instanceRef.current = createdInstance
|
|
900
|
-
cached = { key: instanceKey, instance: createdInstance }
|
|
901
955
|
cachedZero = cached
|
|
902
956
|
}
|
|
903
957
|
setInstance(cached.instance)
|
|
@@ -964,21 +1018,8 @@ export function createZeroClientInternal<
|
|
|
964
1018
|
const SetZeroInstance = () => {
|
|
965
1019
|
const zeroInstance = useZero<Schema, ZeroMutators>()
|
|
966
1020
|
|
|
967
|
-
// publish
|
|
968
|
-
|
|
969
|
-
if (zeroInstance !== latestZeroInstance) {
|
|
970
|
-
latestZeroInstance = zeroInstance
|
|
971
|
-
mutationLifecycle.activate()
|
|
972
|
-
const runner: ZeroRunner = (query, options) =>
|
|
973
|
-
zeroInstance.run(query as any, options)
|
|
974
|
-
// the instance-keyed runner is what run() dispatches owned namespaces
|
|
975
|
-
// to; the global runner stays as the ambient fallback (inline zql)
|
|
976
|
-
instance.runner = runner
|
|
977
|
-
setRunner(runner)
|
|
978
|
-
const waiters = [...zeroReadyWaiters]
|
|
979
|
-
zeroReadyWaiters.clear()
|
|
980
|
-
for (const onReady of waiters) onReady(zeroInstance)
|
|
981
|
-
}
|
|
1021
|
+
// publish before descendant effects perform imperative work.
|
|
1022
|
+
publishZeroInstance(zeroInstance)
|
|
982
1023
|
|
|
983
1024
|
useEffect(() => {
|
|
984
1025
|
zeroInstanceVersion?.emit(zeroInstanceVersion.value + 1)
|
|
@@ -987,6 +1028,57 @@ export function createZeroClientInternal<
|
|
|
987
1028
|
return null
|
|
988
1029
|
}
|
|
989
1030
|
|
|
1031
|
+
// connect WITHOUT react. same construction and same publication the provider
|
|
1032
|
+
// uses, so `zero`, run(), getQuery(), and waitForZero() all resolve exactly as
|
|
1033
|
+
// they do in a mounted app — which is what lets code written against the
|
|
1034
|
+
// module-global facade run unchanged in a worker, a durable object, or a
|
|
1035
|
+
// script. the caller owns the lifetime and must close().
|
|
1036
|
+
//
|
|
1037
|
+
// there is no react tree here, so nothing owns rotation: an identity change
|
|
1038
|
+
// means close this instance and connect a new one. the host is expected to be
|
|
1039
|
+
// scoped to a single identity for its lifetime (one project, one user).
|
|
1040
|
+
function connectHeadless(
|
|
1041
|
+
props: Omit<ZeroOptions<Schema, ZeroMutators>, 'schema' | 'mutators'> & {
|
|
1042
|
+
authData?: AuthData | null
|
|
1043
|
+
transport?: ZeroProviderTransport
|
|
1044
|
+
beforeReload?: () => Promise<void>
|
|
1045
|
+
scheduleReload?: (ctx: ScheduleReloadContext) => void
|
|
1046
|
+
guardStorage?: RecoveryGuardStorage
|
|
1047
|
+
benignLogPatterns?: readonly ZeroLogPattern[]
|
|
1048
|
+
}
|
|
1049
|
+
): { zero: ZeroInstance; close: () => Promise<void> } {
|
|
1050
|
+
const {
|
|
1051
|
+
authData,
|
|
1052
|
+
transport,
|
|
1053
|
+
beforeReload,
|
|
1054
|
+
scheduleReload,
|
|
1055
|
+
guardStorage,
|
|
1056
|
+
benignLogPatterns,
|
|
1057
|
+
...options
|
|
1058
|
+
} = props
|
|
1059
|
+
// mutations read auth dynamically through getAuthData(), so this has to be
|
|
1060
|
+
// set before the first mutation exactly as the provider sets it in render.
|
|
1061
|
+
setAuthData((authData ?? null) as AuthData)
|
|
1062
|
+
const zeroInstance = constructZeroInstance({
|
|
1063
|
+
options,
|
|
1064
|
+
transport,
|
|
1065
|
+
beforeReload,
|
|
1066
|
+
scheduleReload,
|
|
1067
|
+
guardStorage,
|
|
1068
|
+
benignLogPatterns,
|
|
1069
|
+
})
|
|
1070
|
+
publishZeroInstance(zeroInstance)
|
|
1071
|
+
zeroInstanceVersion?.emit(zeroInstanceVersion.value + 1)
|
|
1072
|
+
return {
|
|
1073
|
+
zero: zeroInstance,
|
|
1074
|
+
close: async () => {
|
|
1075
|
+
clearZeroInstanceReferences(zeroInstance)
|
|
1076
|
+
mutationLifecycle.fence()
|
|
1077
|
+
await zeroInstance.close()
|
|
1078
|
+
},
|
|
1079
|
+
}
|
|
1080
|
+
}
|
|
1081
|
+
|
|
990
1082
|
// monitors connection state and emits events (replaces onError callback removed
|
|
991
1083
|
// in 0.25). also owns the generic-Zero connection recovery that used to live in
|
|
992
1084
|
// each consumer: stale-poke reconnect, needs-auth token refresh, and optional
|
|
@@ -1202,6 +1294,7 @@ export function createZeroClientInternal<
|
|
|
1202
1294
|
zeroEvents,
|
|
1203
1295
|
reloadPage,
|
|
1204
1296
|
ProvideZero,
|
|
1297
|
+
connectHeadless,
|
|
1205
1298
|
ControlQueries,
|
|
1206
1299
|
useQuery,
|
|
1207
1300
|
useQueryDirect,
|
package/src/zeroRunner.ts
CHANGED
|
@@ -37,7 +37,7 @@ export function getAmbientRunner(instance?: { runner: ZeroRunner | null }): Zero
|
|
|
37
37
|
|
|
38
38
|
if (!runner) {
|
|
39
39
|
throw new Error(
|
|
40
|
-
'Zero runner not initialized. Ensure ProvideZero is mounted or server bindings are active.'
|
|
40
|
+
'Zero runner not initialized. Ensure ProvideZero is mounted, connectHeadless() was called, or server bindings are active.'
|
|
41
41
|
)
|
|
42
42
|
}
|
|
43
43
|
|
|
@@ -50,6 +50,17 @@ export declare function createZeroClient<Schema extends ZeroSchema, Models exten
|
|
|
50
50
|
refreshAuth?: (() => Promise<string | undefined>) | undefined;
|
|
51
51
|
connectionDataset?: boolean;
|
|
52
52
|
}) => import("react").JSX.Element;
|
|
53
|
+
connectHeadless: (props: Omit<ZeroOptions<Schema, GetZeroMutators<Models>>, "schema" | "mutators"> & {
|
|
54
|
+
authData?: {} | null | undefined;
|
|
55
|
+
transport?: ZeroProviderTransport;
|
|
56
|
+
beforeReload?: (() => Promise<void>) | undefined;
|
|
57
|
+
scheduleReload?: ((ctx: ScheduleReloadContext) => void) | undefined;
|
|
58
|
+
guardStorage?: RecoveryGuardStorage;
|
|
59
|
+
benignLogPatterns?: readonly ZeroLogPattern[];
|
|
60
|
+
}) => {
|
|
61
|
+
zero: ZeroClient<Schema, GetZeroMutators<Models>, unknown>;
|
|
62
|
+
close: () => Promise<void>;
|
|
63
|
+
};
|
|
53
64
|
ControlQueries: ({ children, action, whenDisabled, }: {
|
|
54
65
|
children: ReactNode;
|
|
55
66
|
action?: "enable" | "disable";
|
|
@@ -100,6 +111,17 @@ export declare function createZeroClientInternal<Schema extends ZeroSchema, Mode
|
|
|
100
111
|
refreshAuth?: () => Promise<string | undefined>;
|
|
101
112
|
connectionDataset?: boolean;
|
|
102
113
|
}) => import("react").JSX.Element;
|
|
114
|
+
connectHeadless: (props: Omit<ZeroOptions<Schema, GetZeroMutators<Models>>, "schema" | "mutators"> & {
|
|
115
|
+
authData?: AuthData | null;
|
|
116
|
+
transport?: ZeroProviderTransport;
|
|
117
|
+
beforeReload?: () => Promise<void>;
|
|
118
|
+
scheduleReload?: (ctx: ScheduleReloadContext) => void;
|
|
119
|
+
guardStorage?: RecoveryGuardStorage;
|
|
120
|
+
benignLogPatterns?: readonly ZeroLogPattern[];
|
|
121
|
+
}) => {
|
|
122
|
+
zero: ZeroClient<Schema, GetZeroMutators<Models>, unknown>;
|
|
123
|
+
close: () => Promise<void>;
|
|
124
|
+
};
|
|
103
125
|
ControlQueries: ({ children, action, whenDisabled, }: {
|
|
104
126
|
children: ReactNode;
|
|
105
127
|
action?: "enable" | "disable";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createZeroClient.d.ts","sourceRoot":"","sources":["../src/createZeroClient.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,IAAI,IAAI,UAAU,EACnB,MAAM,gBAAgB,CAAA;AAOvB,OAAO,EASL,KAAK,OAAO,EACZ,KAAK,SAAS,EACf,MAAM,OAAO,CAAA;AAGd,OAAO,EAEL,KAAK,gBAAgB,EACrB,KAAK,YAAY,EAClB,MAAM,kBAAkB,CAAA;AAGzB,OAAO,EAAiB,KAAK,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAK/D,OAAO,EAIL,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAC1B,KAAK,cAAc,EAEpB,MAAM,6BAA6B,CAAA;AAIpC,OAAO,EAAE,YAAY,EAAE,KAAK,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAOhE,OAAO,KAAK,EACV,QAAQ,EACR,aAAa,EACb,eAAe,EAEf,iBAAiB,EAElB,MAAM,SAAS,CAAA;AAChB,OAAO,KAAK,EACV,gBAAgB,EAChB,KAAK,EACL,GAAG,EAEH,WAAW,EACX,MAAM,IAAI,UAAU,EACrB,MAAM,gBAAgB,CAAA;AAEvB,KAAK,cAAc,GAAG;IAAE,GAAG,CAAC,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