@xyo-network/xl1-protocol-sdk 3.0.15 → 3.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.
- package/dist/neutral/index.mjs +126 -36
- package/dist/neutral/index.mjs.map +4 -4
- package/dist/neutral/model/CreatableProviderContext.zod.d.ts +9 -10
- package/dist/neutral/model/CreatableProviderContext.zod.d.ts.map +1 -1
- package/dist/neutral/simple/index.d.ts +1 -0
- package/dist/neutral/simple/index.d.ts.map +1 -1
- package/dist/neutral/simple/systemStatus/SimpleSystemStatusViewer.d.ts +27 -0
- package/dist/neutral/simple/systemStatus/SimpleSystemStatusViewer.d.ts.map +1 -0
- package/dist/neutral/simple/systemStatus/index.d.ts +2 -0
- package/dist/neutral/simple/systemStatus/index.d.ts.map +1 -0
- package/dist/neutral/status/SimpleSystemStatusRunner.d.ts +35 -0
- package/dist/neutral/status/SimpleSystemStatusRunner.d.ts.map +1 -0
- package/dist/neutral/status/index.d.ts +1 -1
- package/dist/neutral/status/index.d.ts.map +1 -1
- package/package.json +7 -7
- package/dist/neutral/status/RuntimeStatusMonitor.d.ts +0 -34
- package/dist/neutral/status/RuntimeStatusMonitor.d.ts.map +0 -1
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import type { CachingContext } from '@xyo-network/xl1-protocol-lib';
|
|
1
|
+
import type { CachingContext, SystemStatusRunner } from '@xyo-network/xl1-protocol-lib';
|
|
2
2
|
import { z } from 'zod/mini';
|
|
3
3
|
import { type BaseConfig } from '../config/index.ts';
|
|
4
4
|
import type { ProviderFactoryLocatorInstance } from '../CreatableProvider/index.ts';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export declare const RuntimeStatusMonitorZod: z.ZodMiniCustom<RuntimeStatusMonitor, RuntimeStatusMonitor>;
|
|
5
|
+
/** SystemStatusRunnerZod constant. */
|
|
6
|
+
export declare const SystemStatusRunnerZod: z.ZodMiniCustom<SystemStatusRunner, SystemStatusRunner>;
|
|
8
7
|
/** ProviderFactoryLocatorZod constant. */
|
|
9
8
|
export declare const ProviderFactoryLocatorZod: z.ZodMiniType<ProviderFactoryLocatorInstance>;
|
|
10
9
|
/** CreatableProviderContextType type. */
|
|
@@ -12,7 +11,7 @@ export type CreatableProviderContextType = CachingContext & {
|
|
|
12
11
|
_id?: string;
|
|
13
12
|
config: BaseConfig;
|
|
14
13
|
locator: ProviderFactoryLocatorInstance;
|
|
15
|
-
statusReporter?:
|
|
14
|
+
statusReporter?: SystemStatusRunner;
|
|
16
15
|
};
|
|
17
16
|
/** BaseConfigContextZod constant. */
|
|
18
17
|
export declare const BaseConfigContextZod: z.ZodMiniObject<{
|
|
@@ -640,7 +639,7 @@ export declare const isCreatableProviderContext: <T>(value: T) => value is T & {
|
|
|
640
639
|
_id?: string;
|
|
641
640
|
config: BaseConfig;
|
|
642
641
|
locator: ProviderFactoryLocatorInstance;
|
|
643
|
-
statusReporter?:
|
|
642
|
+
statusReporter?: SystemStatusRunner;
|
|
644
643
|
};
|
|
645
644
|
/** Converts a value to CreatableProviderContext, throwing if invalid. */
|
|
646
645
|
export declare const asCreatableProviderContext: {
|
|
@@ -655,7 +654,7 @@ export declare const asCreatableProviderContext: {
|
|
|
655
654
|
_id?: string;
|
|
656
655
|
config: BaseConfig;
|
|
657
656
|
locator: ProviderFactoryLocatorInstance;
|
|
658
|
-
statusReporter?:
|
|
657
|
+
statusReporter?: SystemStatusRunner;
|
|
659
658
|
}) | undefined;
|
|
660
659
|
<T>(value: T, assert: import("@xylabs/sdk-js").ZodFactoryConfig): T & {
|
|
661
660
|
singletons: Record<string | symbol, unknown>;
|
|
@@ -668,7 +667,7 @@ export declare const asCreatableProviderContext: {
|
|
|
668
667
|
_id?: string;
|
|
669
668
|
config: BaseConfig;
|
|
670
669
|
locator: ProviderFactoryLocatorInstance;
|
|
671
|
-
statusReporter?:
|
|
670
|
+
statusReporter?: SystemStatusRunner;
|
|
672
671
|
};
|
|
673
672
|
};
|
|
674
673
|
/** toCreatableProviderContext constant. */
|
|
@@ -684,7 +683,7 @@ export declare const toCreatableProviderContext: {
|
|
|
684
683
|
_id?: string;
|
|
685
684
|
config: BaseConfig;
|
|
686
685
|
locator: ProviderFactoryLocatorInstance;
|
|
687
|
-
statusReporter?:
|
|
686
|
+
statusReporter?: SystemStatusRunner;
|
|
688
687
|
}) | undefined;
|
|
689
688
|
<T>(value: T, assert: import("@xylabs/sdk-js").ZodFactoryConfig): T & {
|
|
690
689
|
singletons: Record<string | symbol, unknown>;
|
|
@@ -697,7 +696,7 @@ export declare const toCreatableProviderContext: {
|
|
|
697
696
|
_id?: string;
|
|
698
697
|
config: BaseConfig;
|
|
699
698
|
locator: ProviderFactoryLocatorInstance;
|
|
700
|
-
statusReporter?:
|
|
699
|
+
statusReporter?: SystemStatusRunner;
|
|
701
700
|
};
|
|
702
701
|
};
|
|
703
702
|
//# sourceMappingURL=CreatableProviderContext.zod.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CreatableProviderContext.zod.d.ts","sourceRoot":"","sources":["../../../src/model/CreatableProviderContext.zod.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAA;
|
|
1
|
+
{"version":3,"file":"CreatableProviderContext.zod.d.ts","sourceRoot":"","sources":["../../../src/model/CreatableProviderContext.zod.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAA;AAEvF,OAAO,EAAE,CAAC,EAAE,MAAM,UAAU,CAAA;AAE5B,OAAO,EAAE,KAAK,UAAU,EAAiB,MAAM,oBAAoB,CAAA;AACnE,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,+BAA+B,CAAA;AAEnF,sCAAsC;AACtC,eAAO,MAAM,qBAAqB,yDAAoG,CAAA;AAEtI,0CAA0C;AAC1C,eAAO,MAAM,yBAAyB,EAAE,CAAC,CAAC,WAAW,CAAC,8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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAA4D,CAAA;AAE5F,6EAA6E;AAC7E,eAAO,MAAM,0BAA0B;;;;;;;;UA9B/B,MAAM;YACJ,UAAU;aACT,8BAA8B;qBACtB,kBAAkB;CA2B8C,CAAA;AACnF,yEAAyE;AACzE,eAAO,MAAM,0BAA0B;;;;;;;;;cAhC/B,MAAM;gBACJ,UAAU;iBACT,8BAA8B;yBACtB,kBAAkB;;;;;;;;;;cAH7B,MAAM;gBACJ,UAAU;iBACT,8BAA8B;yBACtB,kBAAkB;;CA6B4E,CAAA;AACjH,2CAA2C;AAC3C,eAAO,MAAM,0BAA0B;;;;;;;;;cAlC/B,MAAM;gBACJ,UAAU;iBACT,8BAA8B;yBACtB,kBAAkB;;;;;;;;;;cAH7B,MAAM;gBACJ,UAAU;iBACT,8BAA8B;yBACtB,kBAAkB;;CA+B4E,CAAA"}
|
|
@@ -16,6 +16,7 @@ export * from './StakeEventsViewer/index.ts';
|
|
|
16
16
|
export * from './StakeTotalsViewer/index.ts';
|
|
17
17
|
export * from './StakeViewer/index.ts';
|
|
18
18
|
export * from './sync/index.ts';
|
|
19
|
+
export * from './systemStatus/index.ts';
|
|
19
20
|
export * from './timeSync2/index.ts';
|
|
20
21
|
export * from './transactionValidation/index.ts';
|
|
21
22
|
export * from './TransactionViewer/index.ts';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/simple/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAA;AACzC,cAAc,kBAAkB,CAAA;AAChC,cAAc,wBAAwB,CAAA;AACtC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,gCAAgC,CAAA;AAC9C,cAAc,mBAAmB,CAAA;AACjC,cAAc,qBAAqB,CAAA;AACnC,cAAc,yBAAyB,CAAA;AACvC,cAAc,oBAAoB,CAAA;AAClC,cAAc,oBAAoB,CAAA;AAClC,cAAc,oBAAoB,CAAA;AAClC,cAAc,wBAAwB,CAAA;AACtC,cAAc,mBAAmB,CAAA;AACjC,cAAc,mBAAmB,CAAA;AACjC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,8BAA8B,CAAA;AAC5C,cAAc,wBAAwB,CAAA;AACtC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,sBAAsB,CAAA;AACpC,cAAc,kCAAkC,CAAA;AAChD,cAAc,8BAA8B,CAAA;AAC5C,cAAc,0BAA0B,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/simple/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAA;AACzC,cAAc,kBAAkB,CAAA;AAChC,cAAc,wBAAwB,CAAA;AACtC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,gCAAgC,CAAA;AAC9C,cAAc,mBAAmB,CAAA;AACjC,cAAc,qBAAqB,CAAA;AACnC,cAAc,yBAAyB,CAAA;AACvC,cAAc,oBAAoB,CAAA;AAClC,cAAc,oBAAoB,CAAA;AAClC,cAAc,oBAAoB,CAAA;AAClC,cAAc,wBAAwB,CAAA;AACtC,cAAc,mBAAmB,CAAA;AACjC,cAAc,mBAAmB,CAAA;AACjC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,8BAA8B,CAAA;AAC5C,cAAc,wBAAwB,CAAA;AACtC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,yBAAyB,CAAA;AACvC,cAAc,sBAAsB,CAAA;AACpC,cAAc,kCAAkC,CAAA;AAChD,cAAc,8BAA8B,CAAA;AAC5C,cAAc,0BAA0B,CAAA"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { CreatableName, CreatableStatus } from '@xylabs/sdk-js';
|
|
2
|
+
import type { SystemStatusSnapshot, SystemStatusViewer } from '@xyo-network/xl1-protocol-lib';
|
|
3
|
+
import type { CreatableProviderParams } from '../../CreatableProvider/index.ts';
|
|
4
|
+
import { AbstractCreatableProvider } from '../../CreatableProvider/index.ts';
|
|
5
|
+
/** Parameters for SimpleSystemStatusViewer. */
|
|
6
|
+
export interface SimpleSystemStatusViewerParams extends CreatableProviderParams {
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Read-only view over the process-wide `SystemStatusRunner`. The Runner is the
|
|
10
|
+
* `context.statusReporter` singleton (created before the locator), so the
|
|
11
|
+
* viewer reads it from the context rather than locating it by moniker.
|
|
12
|
+
*/
|
|
13
|
+
export declare class SimpleSystemStatusViewer extends AbstractCreatableProvider<SimpleSystemStatusViewerParams> implements SystemStatusViewer {
|
|
14
|
+
static readonly connectionTypes: readonly ["memory"];
|
|
15
|
+
static readonly defaultMoniker: "SystemStatusViewer";
|
|
16
|
+
static readonly dependencies: never[];
|
|
17
|
+
static readonly monikers: "SystemStatusViewer"[];
|
|
18
|
+
static readonly surface: "node";
|
|
19
|
+
moniker: "SystemStatusViewer";
|
|
20
|
+
private get runner();
|
|
21
|
+
getGlobalStatus(): CreatableStatus;
|
|
22
|
+
getStatus(name: CreatableName): CreatableStatus | undefined;
|
|
23
|
+
isReady(): boolean;
|
|
24
|
+
isShuttingDown(): boolean;
|
|
25
|
+
snapshot(): SystemStatusSnapshot;
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=SimpleSystemStatusViewer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SimpleSystemStatusViewer.d.ts","sourceRoot":"","sources":["../../../../src/simple/systemStatus/SimpleSystemStatusViewer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAEpE,OAAO,KAAK,EACU,oBAAoB,EAAE,kBAAkB,EAC7D,MAAM,+BAA+B,CAAA;AAGtC,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAA;AAC/E,OAAO,EAAE,yBAAyB,EAAqB,MAAM,kCAAkC,CAAA;AAE/F,+CAA+C;AAC/C,MAAM,WAAW,8BAA+B,SAAQ,uBAAuB;CAAG;AAElF;;;;GAIG;AACH,qBACa,wBAAyB,SAAQ,yBAAyB,CAAC,8BAA8B,CAAE,YAAW,kBAAkB;IACnI,MAAM,CAAC,QAAQ,CAAC,eAAe,sBAAsB;IACrD,MAAM,CAAC,QAAQ,CAAC,cAAc,uBAA4B;IAC1D,MAAM,CAAC,QAAQ,CAAC,YAAY,UAAK;IACjC,MAAM,CAAC,QAAQ,CAAC,QAAQ,yBAA8B;IACtD,MAAM,CAAC,QAAQ,CAAC,OAAO,EAAG,MAAM,CAAS;IACzC,OAAO,uBAA0C;IAEjD,OAAO,KAAK,MAAM,GAEjB;IAED,eAAe,IAAI,eAAe;IAIlC,SAAS,CAAC,IAAI,EAAE,aAAa,GAAG,eAAe,GAAG,SAAS;IAI3D,OAAO,IAAI,OAAO;IAIlB,cAAc,IAAI,OAAO;IAIzB,QAAQ,IAAI,oBAAoB;CAGjC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/simple/systemStatus/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAA"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { CreatableName, CreatableStatus } from '@xylabs/sdk-js';
|
|
2
|
+
import type { SystemReadyState, SystemStatusGlobalTransitionMatch, SystemStatusRunner, SystemStatusSnapshot, SystemStatusTransitionListener, SystemStatusTransitionMatch } from '@xyo-network/xl1-protocol-lib';
|
|
3
|
+
import { LoggerStatusReporter } from './ServiceStatus.ts';
|
|
4
|
+
/**
|
|
5
|
+
* The process-wide status hub. Replaces the former `RuntimeStatusMonitor`:
|
|
6
|
+
* it collects lifecycle reports (`report`) and readiness reports
|
|
7
|
+
* (`reportReady`) from every actor/provider, computes the global status,
|
|
8
|
+
* fires transition callbacks, and answers readiness / snapshot queries.
|
|
9
|
+
*
|
|
10
|
+
* It is a plain class (not a `CreatableProvider`) because it must be
|
|
11
|
+
* constructed before the provider locator exists — it is wired into the
|
|
12
|
+
* context as `statusReporter` so `AbstractCreatable` can report into it.
|
|
13
|
+
*/
|
|
14
|
+
export declare class SimpleSystemStatusRunner extends LoggerStatusReporter implements SystemStatusRunner {
|
|
15
|
+
readonly moniker: "SystemStatusRunner";
|
|
16
|
+
private globalTransitions;
|
|
17
|
+
private progressMap;
|
|
18
|
+
private readinessMap;
|
|
19
|
+
private reportErrorMap;
|
|
20
|
+
private shuttingDown;
|
|
21
|
+
private transitions;
|
|
22
|
+
private updatedAtMap;
|
|
23
|
+
getGlobalStatus(): CreatableStatus;
|
|
24
|
+
getStatus(name: CreatableName): CreatableStatus | undefined;
|
|
25
|
+
isReady(): boolean;
|
|
26
|
+
isShuttingDown(): boolean;
|
|
27
|
+
onGlobalTransition(match: SystemStatusGlobalTransitionMatch, handler: SystemStatusTransitionListener): void;
|
|
28
|
+
onTransition(match: SystemStatusTransitionMatch, handler: SystemStatusTransitionListener): void;
|
|
29
|
+
report(name: CreatableName, status: CreatableStatus, progress?: Error | number): void;
|
|
30
|
+
reportReady(name: CreatableName, readiness: SystemReadyState, error?: Error | string): void;
|
|
31
|
+
setShuttingDown(shuttingDown: boolean): void;
|
|
32
|
+
snapshot(): SystemStatusSnapshot;
|
|
33
|
+
private runTransitions;
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=SimpleSystemStatusRunner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SimpleSystemStatusRunner.d.ts","sourceRoot":"","sources":["../../../src/status/SimpleSystemStatusRunner.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AACpE,OAAO,KAAK,EACV,gBAAgB,EAChB,iCAAiC,EAEjC,kBAAkB,EAClB,oBAAoB,EACpB,8BAA8B,E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","sources":["../../../src/status/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA;AAClC,cAAc,+BAA+B,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyo-network/xl1-protocol-sdk",
|
|
3
|
-
"version": "3.0
|
|
3
|
+
"version": "3.1.0",
|
|
4
4
|
"description": "XYO Layer One SDK Protocol",
|
|
5
5
|
"homepage": "https://xylabs.com",
|
|
6
6
|
"bugs": {
|
|
@@ -42,11 +42,11 @@
|
|
|
42
42
|
"README.md"
|
|
43
43
|
],
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@xyo-network/xl1-
|
|
46
|
-
"@xyo-network/xl1-
|
|
47
|
-
"@xyo-network/xl1-
|
|
48
|
-
"@xyo-network/xl1-
|
|
49
|
-
"@xyo-network/xl1-
|
|
45
|
+
"@xyo-network/xl1-driver-memory": "~3.1.0",
|
|
46
|
+
"@xyo-network/xl1-protocol-lib": "~3.1.0",
|
|
47
|
+
"@xyo-network/xl1-protocol-model": "~3.1.0",
|
|
48
|
+
"@xyo-network/xl1-schema": "~3.1.0",
|
|
49
|
+
"@xyo-network/xl1-validation": "~3.1.0"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@bitauth/libauth": "~3.0.0",
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"vitest": "~4.1.9",
|
|
81
81
|
"webextension-polyfill": "^0.12.0",
|
|
82
82
|
"zod": "~4.4.3",
|
|
83
|
-
"@xyo-network/xl1-network-model": "~3.0
|
|
83
|
+
"@xyo-network/xl1-network-model": "~3.1.0"
|
|
84
84
|
},
|
|
85
85
|
"peerDependencies": {
|
|
86
86
|
"@bitauth/libauth": "~3.0",
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import type { CreatableName, CreatableStatus } from '@xylabs/sdk-js';
|
|
2
|
-
import { LoggerStatusReporter } from './ServiceStatus.ts';
|
|
3
|
-
/** Handler for global status transitions with optional from/to filters */
|
|
4
|
-
export interface GlobalTransitionHandler {
|
|
5
|
-
from?: CreatableStatus;
|
|
6
|
-
handler: (from: CreatableStatus, to: CreatableStatus) => void;
|
|
7
|
-
to?: CreatableStatus;
|
|
8
|
-
}
|
|
9
|
-
/** Handler for named service status transitions with optional from/to filters */
|
|
10
|
-
export type TransitionHandler = GlobalTransitionHandler & {
|
|
11
|
-
name?: string;
|
|
12
|
-
};
|
|
13
|
-
/** Monitors runtime service statuses and fires transition callbacks on status changes */
|
|
14
|
-
export declare class RuntimeStatusMonitor extends LoggerStatusReporter {
|
|
15
|
-
private globalTransitions;
|
|
16
|
-
private transitions;
|
|
17
|
-
getGlobalStatus(): CreatableStatus;
|
|
18
|
-
getStatus(name: CreatableName): CreatableStatus | undefined;
|
|
19
|
-
onGlobalTransition(match: {
|
|
20
|
-
from?: CreatableStatus;
|
|
21
|
-
to?: CreatableStatus;
|
|
22
|
-
}, handler: (from: CreatableStatus, to: CreatableStatus) => void): void;
|
|
23
|
-
/**
|
|
24
|
-
* Register a callback to be called on a specific transition.
|
|
25
|
-
*/
|
|
26
|
-
onTransition(match: {
|
|
27
|
-
from?: CreatableStatus;
|
|
28
|
-
name: string;
|
|
29
|
-
to?: CreatableStatus;
|
|
30
|
-
}, handler: (from: CreatableStatus, to: CreatableStatus) => void): void;
|
|
31
|
-
report(name: CreatableName, status: CreatableStatus, progress?: number | Error): void;
|
|
32
|
-
private runTransitions;
|
|
33
|
-
}
|
|
34
|
-
//# sourceMappingURL=RuntimeStatusMonitor.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RuntimeStatusMonitor.d.ts","sourceRoot":"","sources":["../../../src/status/RuntimeStatusMonitor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAEpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAA;AA8Cz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