@norskvideo/norsk-studio-alpha 1.27.0-2025-12-23-ec7c5041 → 1.27.0-2026-01-08-2828c8f7
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/client/info.js +19236 -42372
- package/client/style.css +351 -241
- package/lib/info.js +13 -9
- package/lib/info.js.map +1 -1
- package/lib/output.fileMp4/_gen/schema.d.ts +13 -0
- package/lib/output.fileMp4/_gen/schema.js +17 -0
- package/lib/output.fileMp4/_gen/schema.js.map +1 -0
- package/lib/output.fileMp4/_gen/types.d.ts +75 -0
- package/lib/output.fileMp4/_gen/types.js +3 -0
- package/lib/output.fileMp4/_gen/types.js.map +1 -0
- package/lib/output.fileMp4/_gen/zod.d.ts +2 -0
- package/lib/output.fileMp4/_gen/zod.js +34 -0
- package/lib/output.fileMp4/_gen/zod.js.map +1 -0
- package/lib/output.fileMp4/info.d.ts +27 -0
- package/lib/output.fileMp4/info.js +73 -0
- package/lib/output.fileMp4/info.js.map +1 -0
- package/lib/output.fileMp4/inline-view.d.ts +7 -0
- package/lib/output.fileMp4/inline-view.js +8 -0
- package/lib/output.fileMp4/inline-view.js.map +1 -0
- package/lib/output.fileMp4/runtime.d.ts +42 -0
- package/lib/output.fileMp4/runtime.js +109 -0
- package/lib/output.fileMp4/runtime.js.map +1 -0
- package/lib/output.fileMp4/summary-view.d.ts +4 -0
- package/lib/output.fileMp4/summary-view.js +16 -0
- package/lib/output.fileMp4/summary-view.js.map +1 -0
- package/lib/output.fileMp4/types.yaml +75 -0
- package/lib/processor.hardSourceSwitch/_gen/schema.d.ts +16 -0
- package/lib/processor.hardSourceSwitch/_gen/schema.js +20 -0
- package/lib/processor.hardSourceSwitch/_gen/schema.js.map +1 -0
- package/lib/processor.hardSourceSwitch/_gen/types.d.ts +224 -0
- package/lib/processor.hardSourceSwitch/_gen/types.js +3 -0
- package/lib/processor.hardSourceSwitch/_gen/types.js.map +1 -0
- package/lib/processor.hardSourceSwitch/_gen/zod.d.ts +2 -0
- package/lib/processor.hardSourceSwitch/_gen/zod.js +147 -0
- package/lib/processor.hardSourceSwitch/_gen/zod.js.map +1 -0
- package/lib/processor.hardSourceSwitch/fullscreen.d.ts +3 -0
- package/lib/processor.hardSourceSwitch/fullscreen.js +23 -0
- package/lib/processor.hardSourceSwitch/fullscreen.js.map +1 -0
- package/lib/processor.hardSourceSwitch/info.d.ts +69 -0
- package/lib/processor.hardSourceSwitch/info.js +170 -0
- package/lib/processor.hardSourceSwitch/info.js.map +1 -0
- package/lib/processor.hardSourceSwitch/inline-view.d.ts +3 -0
- package/lib/processor.hardSourceSwitch/inline-view.js +8 -0
- package/lib/processor.hardSourceSwitch/inline-view.js.map +1 -0
- package/lib/processor.hardSourceSwitch/runtime.d.ts +77 -0
- package/lib/processor.hardSourceSwitch/runtime.js +430 -0
- package/lib/processor.hardSourceSwitch/runtime.js.map +1 -0
- package/lib/processor.hardSourceSwitch/types.yaml +255 -0
- package/lib/test/output.tams.js +17 -7
- package/lib/test/output.tams.js.map +1 -1
- package/lib/util.agent/fullscreen-view.js +17 -7
- package/lib/util.agent/fullscreen-view.js.map +1 -1
- package/package.json +12 -12
package/lib/info.js
CHANGED
|
@@ -17,22 +17,26 @@ function getNodeInfo(r, type) {
|
|
|
17
17
|
}
|
|
18
18
|
return InitialisedComponents[type];
|
|
19
19
|
}
|
|
20
|
-
const info_1 = __importDefault(require("./output.
|
|
20
|
+
const info_1 = __importDefault(require("./output.fileMp4/info"));
|
|
21
21
|
AllComponents.push((r) => (0, info_1.default)(r));
|
|
22
|
-
const info_2 = __importDefault(require("./
|
|
22
|
+
const info_2 = __importDefault(require("./output.tams/info"));
|
|
23
23
|
AllComponents.push((r) => (0, info_2.default)(r));
|
|
24
|
-
const info_3 = __importDefault(require("./processor.
|
|
24
|
+
const info_3 = __importDefault(require("./processor.actionReplay/info"));
|
|
25
25
|
AllComponents.push((r) => (0, info_3.default)(r));
|
|
26
|
-
const info_4 = __importDefault(require("./processor.
|
|
26
|
+
const info_4 = __importDefault(require("./processor.audioLevel/info"));
|
|
27
27
|
AllComponents.push((r) => (0, info_4.default)(r));
|
|
28
|
-
const info_5 = __importDefault(require("./processor.
|
|
28
|
+
const info_5 = __importDefault(require("./processor.chaos/info"));
|
|
29
29
|
AllComponents.push((r) => (0, info_5.default)(r));
|
|
30
|
-
const info_6 = __importDefault(require("./processor.
|
|
30
|
+
const info_6 = __importDefault(require("./processor.delayAll/info"));
|
|
31
31
|
AllComponents.push((r) => (0, info_6.default)(r));
|
|
32
|
-
const info_7 = __importDefault(require("./
|
|
32
|
+
const info_7 = __importDefault(require("./processor.hardSourceSwitch/info"));
|
|
33
33
|
AllComponents.push((r) => (0, info_7.default)(r));
|
|
34
|
-
const info_8 = __importDefault(require("./
|
|
34
|
+
const info_8 = __importDefault(require("./processor.whisper-transcribe/info"));
|
|
35
35
|
AllComponents.push((r) => (0, info_8.default)(r));
|
|
36
|
-
const info_9 = __importDefault(require("./util.
|
|
36
|
+
const info_9 = __importDefault(require("./util.agent/info"));
|
|
37
37
|
AllComponents.push((r) => (0, info_9.default)(r));
|
|
38
|
+
const info_10 = __importDefault(require("./util.aiChat/info"));
|
|
39
|
+
AllComponents.push((r) => (0, info_10.default)(r));
|
|
40
|
+
const info_11 = __importDefault(require("./util.timestamps/info"));
|
|
41
|
+
AllComponents.push((r) => (0, info_11.default)(r));
|
|
38
42
|
//# sourceMappingURL=info.js.map
|
package/lib/info.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"info.js","sourceRoot":"","sources":["../../src/info.ts"],"names":[],"mappings":";;;;;AAYA,8BASC;AAdD,MAAM,qBAAqB,GAA4C,EAAE,CAAC;AAC1E,IAAI,WAAW,GAAG,KAAK,CAAC;AAExB,MAAM,aAAa,GAAkD,EAAE,CAAC;AAExE,SAAwB,WAAW,CAAC,CAAe,EAAE,IAAY;IAC/D,IAAG,CAAC,WAAW,EAAE,CAAC;QAChB,aAAa,CAAC,O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Ae,EAAE,EAAE,CAAC,IAAA,cAA0B,EAAC,CAAC,CAAoC,CAAC,CAAC;AAC1G,+EAA+E;AAC/E,aAAa,CAAC,IAAI,CAAC,CAAC,CAAe,EAAE,EAAE,CAAC,IAAA,cAA4B,EAAC,CAAC,CAAoC,CAAC,CAAC;AAC5G,6DAA2C;AAC3C,aAAa,CAAC,IAAI,CAAC,CAAC,CAAe,EAAE,EAAE,CAAC,IAAA,cAAU,EAAC,CAAC,CAAoC,CAAC,CAAC;AAC1F,+DAA6C;AAC7C,aAAa,CAAC,IAAI,CAAC,CAAC,CAAe,EAAE,EAAE,CAAC,IAAA,eAAW,EAAC,CAAC,CAAoC,CAAC,CAAC;AAC3F,mEAAqD;AACrD,aAAa,CAAC,IAAI,CAAC,CAAC,CAAe,EAAE,EAAE,CAAC,IAAA,eAAe,EAAC,CAAC,CAAoC,CAAC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { components } from "./types";
|
|
2
|
+
import { schemas } from "./zod";
|
|
3
|
+
type Schema<T extends keyof typeof schemas> = {
|
|
4
|
+
schema: (typeof schemas)[T];
|
|
5
|
+
type: T extends keyof components["schemas"] ? components["schemas"][T] : unknown;
|
|
6
|
+
};
|
|
7
|
+
export declare const Config: Schema<"Config">;
|
|
8
|
+
export declare const State: Schema<"State">;
|
|
9
|
+
export declare const Commands: Schema<"Commands">;
|
|
10
|
+
export declare const WriteFileCommand: Schema<"WriteFileCommand">;
|
|
11
|
+
export declare const Events: Schema<"Events">;
|
|
12
|
+
export declare const FileWriteEvent: Schema<"FileWriteEvent">;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FileWriteEvent = exports.Events = exports.WriteFileCommand = exports.Commands = exports.State = exports.Config = void 0;
|
|
4
|
+
const zod_1 = require("./zod");
|
|
5
|
+
function createSchema(name) {
|
|
6
|
+
return {
|
|
7
|
+
schema: zod_1.schemas[name],
|
|
8
|
+
type: {},
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
exports.Config = createSchema("Config");
|
|
12
|
+
exports.State = createSchema("State");
|
|
13
|
+
exports.Commands = createSchema("Commands");
|
|
14
|
+
exports.WriteFileCommand = createSchema("WriteFileCommand");
|
|
15
|
+
exports.Events = createSchema("Events");
|
|
16
|
+
exports.FileWriteEvent = createSchema("FileWriteEvent");
|
|
17
|
+
//# sourceMappingURL=schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../src/output.fileMp4/_gen/schema.ts"],"names":[],"mappings":";;;AAKA,+BAAgC;AAOhC,SAAS,YAAY,CACnB,IAAO;IAEP,OAAO;QACL,MAAM,EAAE,aAAO,CAAC,IAAI,CAAC;QAErB,IAAI,EAAE,EAAgF;KACvF,CAAC;AACJ,CAAC;AAEY,QAAA,MAAM,GAAG,YAAY,CAAC,QAAQ,CAAC,CAAC;AAChC,QAAA,KAAK,GAAG,YAAY,CAAC,OAAO,CAAC,CAAC;AAC9B,QAAA,QAAQ,GAAG,YAAY,CAAC,UAAU,CAAC,CAAC;AACpC,QAAA,gBAAgB,GAAG,YAAY,CAAC,kBAAkB,CAAC,CAAC;AACpD,QAAA,MAAM,GAAG,YAAY,CAAC,QAAQ,CAAC,CAAC;AAChC,QAAA,cAAc,GAAG,YAAY,CAAC,gBAAgB,CAAC,CAAC"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
export interface paths {
|
|
2
|
+
"/write": {
|
|
3
|
+
parameters: {
|
|
4
|
+
query?: never;
|
|
5
|
+
header?: never;
|
|
6
|
+
path?: never;
|
|
7
|
+
cookie?: never;
|
|
8
|
+
};
|
|
9
|
+
get?: never;
|
|
10
|
+
put?: never;
|
|
11
|
+
post: {
|
|
12
|
+
parameters: {
|
|
13
|
+
query?: never;
|
|
14
|
+
header?: never;
|
|
15
|
+
path?: never;
|
|
16
|
+
cookie?: never;
|
|
17
|
+
};
|
|
18
|
+
requestBody?: never;
|
|
19
|
+
responses: {
|
|
20
|
+
204: {
|
|
21
|
+
headers: {
|
|
22
|
+
[name: string]: unknown;
|
|
23
|
+
};
|
|
24
|
+
content?: never;
|
|
25
|
+
};
|
|
26
|
+
500: {
|
|
27
|
+
headers: {
|
|
28
|
+
[name: string]: unknown;
|
|
29
|
+
};
|
|
30
|
+
content: {
|
|
31
|
+
"application/json": {
|
|
32
|
+
error: string;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
delete?: never;
|
|
39
|
+
options?: never;
|
|
40
|
+
head?: never;
|
|
41
|
+
patch?: never;
|
|
42
|
+
trace?: never;
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
export type webhooks = Record<string, never>;
|
|
46
|
+
export interface components {
|
|
47
|
+
schemas: {
|
|
48
|
+
Config: {
|
|
49
|
+
id: string;
|
|
50
|
+
displayName: string;
|
|
51
|
+
notes?: string;
|
|
52
|
+
fileName: string;
|
|
53
|
+
};
|
|
54
|
+
State: Record<string, never>;
|
|
55
|
+
Commands: {
|
|
56
|
+
type: "write-file";
|
|
57
|
+
};
|
|
58
|
+
WriteFileCommand: {
|
|
59
|
+
type: "write-file";
|
|
60
|
+
};
|
|
61
|
+
Events: {
|
|
62
|
+
type: "file-write";
|
|
63
|
+
};
|
|
64
|
+
FileWriteEvent: {
|
|
65
|
+
type: "file-write";
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
responses: never;
|
|
69
|
+
parameters: never;
|
|
70
|
+
requestBodies: never;
|
|
71
|
+
headers: never;
|
|
72
|
+
pathItems: never;
|
|
73
|
+
}
|
|
74
|
+
export type $defs = Record<string, never>;
|
|
75
|
+
export type operations = Record<string, never>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/output.fileMp4/_gen/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.schemas = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const Config = zod_1.z
|
|
6
|
+
.object({
|
|
7
|
+
id: zod_1.z.string(),
|
|
8
|
+
displayName: zod_1.z.string(),
|
|
9
|
+
notes: zod_1.z.string().optional(),
|
|
10
|
+
fileName: zod_1.z.string(),
|
|
11
|
+
})
|
|
12
|
+
.strict();
|
|
13
|
+
const State = zod_1.z.object({}).partial().strict();
|
|
14
|
+
const Commands = zod_1.z
|
|
15
|
+
.object({ type: zod_1.z.literal("write-file") })
|
|
16
|
+
.strict();
|
|
17
|
+
const WriteFileCommand = zod_1.z
|
|
18
|
+
.object({ type: zod_1.z.literal("write-file") })
|
|
19
|
+
.strict();
|
|
20
|
+
const Events = zod_1.z
|
|
21
|
+
.object({ type: zod_1.z.literal("file-write") })
|
|
22
|
+
.strict();
|
|
23
|
+
const FileWriteEvent = zod_1.z
|
|
24
|
+
.object({ type: zod_1.z.literal("file-write") })
|
|
25
|
+
.strict();
|
|
26
|
+
exports.schemas = {
|
|
27
|
+
Config,
|
|
28
|
+
State,
|
|
29
|
+
Commands,
|
|
30
|
+
WriteFileCommand,
|
|
31
|
+
Events,
|
|
32
|
+
FileWriteEvent,
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=zod.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zod.js","sourceRoot":"","sources":["../../../../src/output.fileMp4/_gen/zod.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAExB,MAAM,MAAM,GAAG,OAAC;KACb,MAAM,CAAC;IACN,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE;IACd,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE;IACvB,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC5B,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE;CACrB,CAAC;KACD,MAAM,EAAE,CACR;AACH,MAAM,KAAK,GAAG,OAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,MAAM,EAAE,CAAC;AAC9C,MAAM,QAAQ,GAAG,OAAC;KACf,MAAM,CAAC,EAAE,IAAI,EAAE,OAAC,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE,CAAC;KACzC,MAAM,EAAE,CACR;AACH,MAAM,gBAAgB,GAAG,OAAC;KACvB,MAAM,CAAC,EAAE,IAAI,EAAE,OAAC,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE,CAAC;KACzC,MAAM,EAAE,CACR;AACH,MAAM,MAAM,GAAG,OAAC;KACb,MAAM,CAAC,EAAE,IAAI,EAAE,OAAC,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE,CAAC;KACzC,MAAM,EAAE,CACR;AACH,MAAM,cAAc,GAAG,OAAC;KACrB,MAAM,CAAC,EAAE,IAAI,EAAE,OAAC,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE,CAAC;KACzC,MAAM,EAAE,CACR;AAEU,QAAA,OAAO,GAA8B;IAChD,MAAM;IACN,KAAK;IACL,QAAQ;IACR,gBAAgB;IAChB,MAAM;IACN,cAAc;CACf,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { BaseConfig, NodeInfoConfigForm } from "@norskvideo/norsk-studio/lib/extension/client-types";
|
|
2
|
+
import type Registration from "@norskvideo/norsk-studio/lib/extension/registration";
|
|
3
|
+
import { NodeValidationContext } from "@norskvideo/norsk-studio/lib/shared/document";
|
|
4
|
+
import { FaFileVideo } from "@react-icons/all-files/fa/FaFileVideo";
|
|
5
|
+
export default function (r: Registration): import("@norskvideo/norsk-studio/lib/extension/client-types").NodeInfo<{
|
|
6
|
+
id: string;
|
|
7
|
+
displayName: string;
|
|
8
|
+
notes?: string;
|
|
9
|
+
fileName: string;
|
|
10
|
+
}, Record<string, never>, {
|
|
11
|
+
type: "write-file";
|
|
12
|
+
}, {
|
|
13
|
+
type: "file-write";
|
|
14
|
+
}>;
|
|
15
|
+
export declare function defineFileOutputComponent<Settings extends BaseConfig>({ defineComponent, }: Registration, settings: {
|
|
16
|
+
identifier: string;
|
|
17
|
+
name: string;
|
|
18
|
+
icon?: typeof FaFileVideo;
|
|
19
|
+
description: string;
|
|
20
|
+
searchTags?: string[];
|
|
21
|
+
configForm: NodeInfoConfigForm<Settings>;
|
|
22
|
+
extraValidation?: (context: NodeValidationContext<Settings>) => void;
|
|
23
|
+
}): import("@norskvideo/norsk-studio/lib/extension/client-types").NodeInfo<Settings, Record<string, never>, {
|
|
24
|
+
type: "write-file";
|
|
25
|
+
}, {
|
|
26
|
+
type: "file-write";
|
|
27
|
+
}>;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.default = default_1;
|
|
7
|
+
exports.defineFileOutputComponent = defineFileOutputComponent;
|
|
8
|
+
const FaFileVideo_1 = require("@react-icons/all-files/fa/FaFileVideo");
|
|
9
|
+
const inline_view_1 = __importDefault(require("./inline-view"));
|
|
10
|
+
const summary_view_1 = __importDefault(require("./summary-view"));
|
|
11
|
+
function default_1(r) {
|
|
12
|
+
const { validation: { Z } } = r;
|
|
13
|
+
return defineFileOutputComponent(r, {
|
|
14
|
+
identifier: 'output.fileMp4',
|
|
15
|
+
name: "MP4 File",
|
|
16
|
+
description: "Sends audio and video streams to one or more remote RTMP servers simultaneously",
|
|
17
|
+
searchTags: ["mp4", "egest"],
|
|
18
|
+
icon: FaFileVideo_1.FaFileVideo,
|
|
19
|
+
configForm: {
|
|
20
|
+
form: {
|
|
21
|
+
fileName: {
|
|
22
|
+
help: "The base filename to write (without extension/path)",
|
|
23
|
+
hint: {
|
|
24
|
+
type: "text",
|
|
25
|
+
defaultValue: "output",
|
|
26
|
+
envOverride: true,
|
|
27
|
+
validation: Z.string().min(1).max(256).regex(/^[^./]+/, "Filename should not contain a path or extension")
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
notes: {
|
|
31
|
+
help: "Additional notes about this component",
|
|
32
|
+
hint: { type: 'text', optional: true }
|
|
33
|
+
},
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
function defineFileOutputComponent({ defineComponent, }, settings) {
|
|
39
|
+
return defineComponent({
|
|
40
|
+
...settings,
|
|
41
|
+
category: 'output',
|
|
42
|
+
subscription: {
|
|
43
|
+
accepts: {
|
|
44
|
+
type: 'simple-stream',
|
|
45
|
+
audio: true,
|
|
46
|
+
video: true,
|
|
47
|
+
subtitle: true,
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
extraValidation: function (ctx) {
|
|
51
|
+
ctx.requireExactVideo(1);
|
|
52
|
+
ctx.requireExactAudio(1);
|
|
53
|
+
if (settings.extraValidation) {
|
|
54
|
+
settings.extraValidation(ctx);
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
display: (_desc) => {
|
|
58
|
+
return {};
|
|
59
|
+
},
|
|
60
|
+
runtime: {
|
|
61
|
+
initialState: () => ({}),
|
|
62
|
+
handleEvent: (ev, state) => {
|
|
63
|
+
return { ...state };
|
|
64
|
+
},
|
|
65
|
+
inline: inline_view_1.default,
|
|
66
|
+
summary: summary_view_1.default
|
|
67
|
+
},
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
function _ssertUnreachable(_) {
|
|
71
|
+
throw new Error("Didn't expect to get here");
|
|
72
|
+
}
|
|
73
|
+
//# sourceMappingURL=info.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"info.js","source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,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC;YACzB,GAAG,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC;YACzB,IAAI,QAAQ,CAAC,eAAe,EAAE,CAAC;gBAC7B,QAAQ,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC;YAChC,CAAC;QACH,CAAC;QACD,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE;YACjB,OAAO,EAEN,CAAC;QACJ,CAAC;QACD,OAAO,EAAE;YACP,YAAY,EAAE,GAAG,EAAE,CAAC,CAAC,EACpB,CAAC;YACF,WAAW,EAAE,CAAC,EAAE,EAAE,KAAyB,EAAE,EAAE;gBAC7C,OAAO,EAAE,GAAG,KAAK,EAAE,CAAC;YACtB,CAAC;YACD,MAAM,EAAE,qBAAU;YAClB,OAAO,EAAE,sBAAW;SACrB;KACF,CAAC,CAAA;AACJ,CAAC;AAED,SAAS,iBAAiB,CAAC,CAAQ;IACjC,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;AAC/C,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { BaseConfig } from "@norskvideo/norsk-studio/lib/extension/client-types";
|
|
2
|
+
import type { FileMp4OutputState } from "./runtime";
|
|
3
|
+
declare function InlineView({ state: _, config }: {
|
|
4
|
+
state: FileMp4OutputState;
|
|
5
|
+
config: BaseConfig;
|
|
6
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default InlineView;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
4
|
+
function InlineView({ state: _, config }) {
|
|
5
|
+
return (0, jsx_runtime_1.jsx)("div", { className: "file-output", id: `file-output-${config.id}` });
|
|
6
|
+
}
|
|
7
|
+
exports.default = InlineView;
|
|
8
|
+
//# sourceMappingURL=inline-view.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inline-view.js","sourceRoot":"","sources":["../../../src/output.fileMp4/inline-view.tsx"],"names":[],"mappings":";;;AAGA,SAAS,UAAU,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAqD;IACzF,OAAO,gCAAK,SAAS,EAAC,aAAa,EAAC,EAAE,EAAE,eAAe,MAAM,CAAC,EAAE,EAAE,GAE5D,CAAA;AACR,CAAC;AAED,kBAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { FileMp4OutputNode, Norsk } from '@norskvideo/norsk-sdk';
|
|
2
|
+
import { BaseConfig } from '@norskvideo/norsk-studio/lib/extension/client-types';
|
|
3
|
+
import { CreatedMediaNode, InstanceRouteInfo, OnCreated, RelatedMediaNodes, ServerComponentDefinition, ServerComponentSchemas, StudioComponentInputStream, StudioRuntime } from '@norskvideo/norsk-studio/lib/extension/runtime-types';
|
|
4
|
+
import { components } from './_gen/types';
|
|
5
|
+
export type FileMp4OutputSettings = components['schemas']['Config'];
|
|
6
|
+
export type FileMp4OutputState = components['schemas']['State'];
|
|
7
|
+
export type FileMp4OutputEvent = components['schemas']['Events'];
|
|
8
|
+
export type FileMp4OutputCommand = components['schemas']['Commands'];
|
|
9
|
+
export declare abstract class BaseFileMp4OutputDefinition<Settings extends BaseConfig> implements ServerComponentDefinition<Settings, FileMp4Output, FileMp4OutputState, FileMp4OutputCommand, FileMp4OutputEvent> {
|
|
10
|
+
abstract getConfig(input: Settings): Promise<{
|
|
11
|
+
fileName?: string;
|
|
12
|
+
}>;
|
|
13
|
+
create(norsk: Norsk, cfg: Settings, cb: OnCreated<FileMp4Output>, runtime: StudioRuntime<FileMp4OutputState, FileMp4OutputCommand, FileMp4OutputEvent>): Promise<void>;
|
|
14
|
+
handleCommand(output: FileMp4Output, command: FileMp4OutputCommand): Promise<void>;
|
|
15
|
+
handleMetricsUpdate(_node: FileMp4Output): Promise<void>;
|
|
16
|
+
instanceRoutes(): Promise<InstanceRouteInfo<Settings, FileMp4Output, FileMp4OutputState, FileMp4OutputCommand, FileMp4OutputEvent>[]>;
|
|
17
|
+
schemas(): Promise<ServerComponentSchemas>;
|
|
18
|
+
}
|
|
19
|
+
export default class FileMp4OutputDefinition extends BaseFileMp4OutputDefinition<FileMp4OutputSettings> {
|
|
20
|
+
getConfig(cfg: FileMp4OutputSettings): Promise<{
|
|
21
|
+
fileName: string;
|
|
22
|
+
}>;
|
|
23
|
+
}
|
|
24
|
+
export declare class FileMp4Output implements CreatedMediaNode {
|
|
25
|
+
private cfg;
|
|
26
|
+
private fn;
|
|
27
|
+
initialised: Promise<void>;
|
|
28
|
+
norsk: Norsk;
|
|
29
|
+
runtime: StudioRuntime<FileMp4OutputState, FileMp4OutputCommand, FileMp4OutputEvent>;
|
|
30
|
+
resolvedFileName?: string;
|
|
31
|
+
fileOutput?: FileMp4OutputNode;
|
|
32
|
+
enabled: boolean;
|
|
33
|
+
relatedMediaNodes: RelatedMediaNodes;
|
|
34
|
+
id: string;
|
|
35
|
+
currentSources: StudioComponentInputStream[];
|
|
36
|
+
constructor(norsk: Norsk, runtime: StudioRuntime<FileMp4OutputState, FileMp4OutputCommand, FileMp4OutputEvent>, cfg: FileMp4OutputSettings, fn: () => Promise<{
|
|
37
|
+
fileName?: string;
|
|
38
|
+
}>);
|
|
39
|
+
private init;
|
|
40
|
+
subscribe(sources: StudioComponentInputStream[]): Promise<void>;
|
|
41
|
+
writeFile(): Promise<void>;
|
|
42
|
+
}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.FileMp4Output = exports.BaseFileMp4OutputDefinition = void 0;
|
|
7
|
+
const runtime_types_1 = require("@norskvideo/norsk-studio/lib/extension/runtime-types");
|
|
8
|
+
const api_1 = require("@norskvideo/norsk-studio/lib/server/api");
|
|
9
|
+
const path_1 = __importDefault(require("path"));
|
|
10
|
+
const files_1 = require("@norskvideo/norsk-studio/lib/server/files");
|
|
11
|
+
const logging_1 = require("@norskvideo/norsk-studio/lib/server/logging");
|
|
12
|
+
const util_1 = require("@norskvideo/norsk-studio/lib/shared/util");
|
|
13
|
+
const api_validation_1 = require("@norskvideo/norsk-studio/lib/server/api-validation");
|
|
14
|
+
class BaseFileMp4OutputDefinition {
|
|
15
|
+
async create(norsk, cfg, cb, runtime) {
|
|
16
|
+
const node = new FileMp4Output(norsk, runtime, cfg, async () => this.getConfig(cfg));
|
|
17
|
+
await node.initialised;
|
|
18
|
+
cb(node);
|
|
19
|
+
}
|
|
20
|
+
async handleCommand(output, command) {
|
|
21
|
+
switch (command.type) {
|
|
22
|
+
case 'write-file':
|
|
23
|
+
void output.writeFile();
|
|
24
|
+
break;
|
|
25
|
+
default:
|
|
26
|
+
(0, util_1.assertUnreachable)(command.type);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
async handleMetricsUpdate(_node) {
|
|
30
|
+
}
|
|
31
|
+
async instanceRoutes() {
|
|
32
|
+
return (0, api_1.defineJsonApi)(path_1.default.join(__dirname, 'types.yaml'), {
|
|
33
|
+
"/write": {
|
|
34
|
+
post: ({ node }) => ({
|
|
35
|
+
swt: api_validation_1.NoBody,
|
|
36
|
+
handler: async (_req) => {
|
|
37
|
+
const _result = await node.writeFile();
|
|
38
|
+
return { statusCode: 204 };
|
|
39
|
+
}
|
|
40
|
+
})
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
async schemas() {
|
|
45
|
+
return (0, runtime_types_1.schemaFromTypes)(path_1.default.join(__dirname, 'types.yaml'), {
|
|
46
|
+
config: 'Config'
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
exports.BaseFileMp4OutputDefinition = BaseFileMp4OutputDefinition;
|
|
51
|
+
class FileMp4OutputDefinition extends BaseFileMp4OutputDefinition {
|
|
52
|
+
async getConfig(cfg) {
|
|
53
|
+
return {
|
|
54
|
+
fileName: cfg.fileName,
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
exports.default = FileMp4OutputDefinition;
|
|
59
|
+
class FileMp4Output {
|
|
60
|
+
cfg;
|
|
61
|
+
fn;
|
|
62
|
+
initialised;
|
|
63
|
+
norsk;
|
|
64
|
+
runtime;
|
|
65
|
+
resolvedFileName;
|
|
66
|
+
fileOutput = undefined;
|
|
67
|
+
enabled = true;
|
|
68
|
+
relatedMediaNodes = new runtime_types_1.RelatedMediaNodes();
|
|
69
|
+
id;
|
|
70
|
+
currentSources = [];
|
|
71
|
+
constructor(norsk, runtime, cfg, fn) {
|
|
72
|
+
this.cfg = cfg;
|
|
73
|
+
this.fn = fn;
|
|
74
|
+
this.id = cfg.id;
|
|
75
|
+
this.norsk = norsk;
|
|
76
|
+
this.runtime = runtime;
|
|
77
|
+
this.initialised = this.init();
|
|
78
|
+
const pathResult = (0, files_1.validatePath)(cfg.fileName);
|
|
79
|
+
if (pathResult.status === 'error') {
|
|
80
|
+
(0, logging_1.errorlog)(pathResult.error);
|
|
81
|
+
}
|
|
82
|
+
else {
|
|
83
|
+
this.resolvedFileName = pathResult.path;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
async init() {
|
|
87
|
+
}
|
|
88
|
+
async subscribe(sources) {
|
|
89
|
+
this.currentSources = sources;
|
|
90
|
+
if (!this.fileOutput && this.resolvedFileName) {
|
|
91
|
+
this.fileOutput = await this.norsk.output.fileMp4({
|
|
92
|
+
fragmentedFileName: `${this.resolvedFileName}.fmp4`
|
|
93
|
+
});
|
|
94
|
+
this.fileOutput.subscribe(sources.map(x => x.select()), ctx => ctx.streams.length === sources.length);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
async writeFile() {
|
|
98
|
+
if (!this.fileOutput) {
|
|
99
|
+
(0, logging_1.errorlog)("Trying to write a file without an output!?");
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
const outputFileName = `${this.resolvedFileName}.mp4`;
|
|
103
|
+
(0, logging_1.debuglog)("Writing MP4 file", { outputFileName });
|
|
104
|
+
this.fileOutput.writeFile(outputFileName);
|
|
105
|
+
this.runtime.updates.raiseEvent({ type: "file-write" });
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
exports.FileMp4Output = FileMp4Output;
|
|
109
|
+
//# sourceMappingURL=runtime.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime.js","sourceRoot":"","sources":["../../../src/output.fileMp4/runtime.ts"],"names":[],"mappings":";;;;;;AAGA,wFAA2Q;AAC3Q,iEAAwE;AACxE,gDAAwB;AAExB,qEAAyE;AACzE,yEAAiF;AACjF,mEAA6E;AAC7E,uFAA4E;AAY5E,MAAsB,2BAA2B;IAG/C,KAAK,CAAC,MAAM,CAAC,KAAY,EAAE,GAAa,EAAE,EAA4B,EAAE,OAAoF;QAC1J,MAAM,IAAI,GAAG,IAAI,aAAa,CAAC,KAAK,EAAE,OAAO,EAAE,GAAuC,EAAE,KAAK,IAAI,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAA;QACxH,MAAM,IAAI,CAAC,WAAW,CAAC;QACvB,EAAE,CAAC,IAAI,CAAC,CAAC;IACX,CAAC;IAED,KAAK,CAAC,aAAa,CAAC,MAAqB,EAAE,OAA6B;QACtE,QAAQ,OAAO,CAAC,IAAI,EAAE,CAAC;YACrB,KAAK,YAAY;gBACf,KAAK,MAAM,CAAC,SAAS,EAAE,CAAC;gBACxB,MAAM;YACR;gBACE,IAAA,wBAAiB,EAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QACpC,CAAC;IACH,CAAC;IAED,KAAK,CAAC,mBAAmB,CAAC,KAAoB;IAE9C,CAAC;IAED,KAAK,CAAC,cAAc;QACl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,EAAE,cAAc,EAAE,CAAC,CAAC;QAEjD,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,cAAc,CAAC,CAAA;QACzC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC,CAAC;IAC1D,CAAC;CACF;AAtDD,sCAsDC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { FileMp4OutputCommand, FileMp4OutputState } from "./runtime";
|
|
2
|
+
import type { BaseConfig, ViewProps } from "@norskvideo/norsk-studio/lib/extension/client-types";
|
|
3
|
+
declare function SummaryView({ state: _, sendCommand, }: ViewProps<BaseConfig, FileMp4OutputState, FileMp4OutputCommand>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export default SummaryView;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
4
|
+
function SummaryView({ state: _, sendCommand, }) {
|
|
5
|
+
const handleWriteFile = () => {
|
|
6
|
+
void writeFile();
|
|
7
|
+
};
|
|
8
|
+
const writeFile = async () => {
|
|
9
|
+
sendCommand({
|
|
10
|
+
type: "write-file",
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
return ((0, jsx_runtime_1.jsx)("div", { className: "mb-5", children: (0, jsx_runtime_1.jsx)("div", { className: "flex items-center justify-between mb-3", children: (0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)("button", { onClick: handleWriteFile, className: "px-3 py-1 text-sm bg-red-600 hover:bg-red-700 text-white rounded", children: "Write Mp4 File" }) }) }) }));
|
|
14
|
+
}
|
|
15
|
+
exports.default = SummaryView;
|
|
16
|
+
//# sourceMappingURL=summary-view.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"summary-view.js","sourceRoot":"","sources":["../../../src/output.fileMp4/summary-view.tsx"],"names":[],"mappings":";;;AAOA,SAAS,WAAW,CAAC,EACnB,KAAK,EAAE,CAAC,EACR,WAAW,GACqD;IAEhE,MAAM,eAAe,GAAG,GAAS,EAAE;QACjC,KAAK,SAAS,EAAE,CAAC;IACnB,CAAC,CAAC;IAEF,MAAM,SAAS,GAAG,KAAK,IAAI,EAAE;QAC3B,WAAW,CAAC;YACV,IAAI,EAAE,YAAY;SACnB,CAAC,CAAC;IACL,CAAC,CAAC;IAGF,OAAO,CACL,gCAAK,SAAS,EAAC,MAAM,YACnB,gCAAK,SAAS,EAAC,wCAAwC,YACrD,0CACE,mCACE,OAAO,EAAE,eAAe,EACxB,SAAS,EAAC,kEAAkE,+BAGrE,GAEL,GACF,GACF,CACP,CAAC;AACJ,CAAC;AAED,kBAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# This file has been generated, please edit types.source.yaml instead
|
|
2
|
+
|
|
3
|
+
openapi: 3.1.0
|
|
4
|
+
info:
|
|
5
|
+
title: Mp4 File Output Component
|
|
6
|
+
version: 1.0.0
|
|
7
|
+
paths:
|
|
8
|
+
/write:
|
|
9
|
+
post:
|
|
10
|
+
summary: Write Output File
|
|
11
|
+
description: Write non-fragmented MP4 output file
|
|
12
|
+
x-route-type: instance
|
|
13
|
+
responses:
|
|
14
|
+
"204":
|
|
15
|
+
description: Output successfully written
|
|
16
|
+
"500":
|
|
17
|
+
description: Server error while writing file
|
|
18
|
+
content:
|
|
19
|
+
application/json:
|
|
20
|
+
schema:
|
|
21
|
+
type: object
|
|
22
|
+
properties:
|
|
23
|
+
error:
|
|
24
|
+
type: string
|
|
25
|
+
required:
|
|
26
|
+
- error
|
|
27
|
+
components:
|
|
28
|
+
schemas:
|
|
29
|
+
Config:
|
|
30
|
+
type: object
|
|
31
|
+
properties:
|
|
32
|
+
id:
|
|
33
|
+
type: string
|
|
34
|
+
description: Component ID
|
|
35
|
+
displayName:
|
|
36
|
+
type: string
|
|
37
|
+
description: Component display name
|
|
38
|
+
notes:
|
|
39
|
+
type: string
|
|
40
|
+
description: Optional notes about the component
|
|
41
|
+
fileName:
|
|
42
|
+
type: string
|
|
43
|
+
description: Base file name
|
|
44
|
+
required:
|
|
45
|
+
- id
|
|
46
|
+
- displayName
|
|
47
|
+
- fileName
|
|
48
|
+
State:
|
|
49
|
+
type: object
|
|
50
|
+
properties: {}
|
|
51
|
+
required: []
|
|
52
|
+
Commands:
|
|
53
|
+
oneOf:
|
|
54
|
+
- &a1
|
|
55
|
+
type: object
|
|
56
|
+
properties:
|
|
57
|
+
type:
|
|
58
|
+
type: string
|
|
59
|
+
enum:
|
|
60
|
+
- write-file
|
|
61
|
+
required:
|
|
62
|
+
- type
|
|
63
|
+
WriteFileCommand: *a1
|
|
64
|
+
Events:
|
|
65
|
+
oneOf:
|
|
66
|
+
- &a2
|
|
67
|
+
type: object
|
|
68
|
+
properties:
|
|
69
|
+
type:
|
|
70
|
+
type: string
|
|
71
|
+
enum:
|
|
72
|
+
- file-write
|
|
73
|
+
required:
|
|
74
|
+
- type
|
|
75
|
+
FileWriteEvent: *a2
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { components } from "./types";
|
|
2
|
+
import { schemas } from "./zod";
|
|
3
|
+
type Schema<T extends keyof typeof schemas> = {
|
|
4
|
+
schema: (typeof schemas)[T];
|
|
5
|
+
type: T extends keyof components["schemas"] ? components["schemas"][T] : unknown;
|
|
6
|
+
};
|
|
7
|
+
export declare const Config: Schema<"Config">;
|
|
8
|
+
export declare const State: Schema<"State">;
|
|
9
|
+
export declare const SourceFormat: Schema<"SourceFormat">;
|
|
10
|
+
export declare const Events: Schema<"Events">;
|
|
11
|
+
export declare const Commands: Schema<"Commands">;
|
|
12
|
+
export declare const SwitchSourceBody: Schema<"SwitchSourceBody">;
|
|
13
|
+
export declare const ActiveSourceResponse: Schema<"ActiveSourceResponse">;
|
|
14
|
+
export declare const AvailableSourcesResponse: Schema<"AvailableSourcesResponse">;
|
|
15
|
+
export declare const ErrorResponse: Schema<"ErrorResponse">;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ErrorResponse = exports.AvailableSourcesResponse = exports.ActiveSourceResponse = exports.SwitchSourceBody = exports.Commands = exports.Events = exports.SourceFormat = exports.State = exports.Config = void 0;
|
|
4
|
+
const zod_1 = require("./zod");
|
|
5
|
+
function createSchema(name) {
|
|
6
|
+
return {
|
|
7
|
+
schema: zod_1.schemas[name],
|
|
8
|
+
type: {},
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
exports.Config = createSchema("Config");
|
|
12
|
+
exports.State = createSchema("State");
|
|
13
|
+
exports.SourceFormat = createSchema("SourceFormat");
|
|
14
|
+
exports.Events = createSchema("Events");
|
|
15
|
+
exports.Commands = createSchema("Commands");
|
|
16
|
+
exports.SwitchSourceBody = createSchema("SwitchSourceBody");
|
|
17
|
+
exports.ActiveSourceResponse = createSchema("ActiveSourceResponse");
|
|
18
|
+
exports.AvailableSourcesResponse = createSchema("AvailableSourcesResponse");
|
|
19
|
+
exports.ErrorResponse = createSchema("ErrorResponse");
|
|
20
|
+
//# sourceMappingURL=schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../src/processor.hardSourceSwitch/_gen/schema.ts"],"names":[],"mappings":";;;AAKA,+BAAgC;AAOhC,SAAS,YAAY,CACnB,IAAO;IAEP,OAAO;QACL,MAAM,EAAE,aAAO,CAAC,IAAI,CAAC;QAErB,IAAI,EAAE,EAAgF;KACvF,CAAC;AACJ,CAAC;AAEY,QAAA,MAAM,GAAG,YAAY,CAAC,QAAQ,CAAC,CAAC;AAChC,QAAA,KAAK,GAAG,YAAY,CAAC,OAAO,CAAC,CAAC;AAC9B,QAAA,YAAY,GAAG,YAAY,CAAC,cAAc,CAAC,CAAC;AAC5C,QAAA,MAAM,GAAG,YAAY,CAAC,QAAQ,CAAC,CAAC;AAChC,QAAA,QAAQ,GAAG,YAAY,CAAC,UAAU,CAAC,CAAC;AACpC,QAAA,gBAAgB,GAAG,YAAY,CAAC,kBAAkB,CAAC,CAAC;AACpD,QAAA,oBAAoB,GAAG,YAAY,CAAC,sBAAsB,CAAC,CAAC;AAC5D,QAAA,wBAAwB,GAAG,YAAY,CAAC,0BAA0B,CAAC,CAAC;AACpE,QAAA,aAAa,GAAG,YAAY,CAAC,eAAe,CAAC,CAAC"}
|