@nxtedition/types 23.0.30 → 23.0.32
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/app.d.ts +22 -1
- package/dist/app.js +254 -6
- package/dist/common/file.d.ts +2 -2
- package/dist/common/file.js +43 -37
- package/dist/common/render-preset.js +230 -22
- package/dist/common/render-profile.d.ts +17 -0
- package/dist/common/render-profile.js +344 -18
- package/dist/common/render-query.js +830 -169
- package/dist/common/render-scene.d.ts +7 -0
- package/dist/common/render-scene.js +1258 -144
- package/dist/common/settings.d.ts +20 -4
- package/dist/common/settings.js +1763 -1490
- package/dist/domains/event.d.ts +21 -19
- package/dist/domains/event.js +460 -44
- package/dist/domains/file.js +43 -37
- package/dist/domains/media.d.ts +4 -0
- package/dist/domains/media.js +827 -89
- package/dist/domains/publish.js +10806 -3560
- package/dist/domains/render.js +826 -163
- package/dist/domains/settings.js +1769 -1512
- package/dist/index.d.ts +12 -1
- package/dist/schema.json +335 -24
- package/package.json +1 -1
|
@@ -1,36 +1,55 @@
|
|
|
1
1
|
import __typia from "typia";
|
|
2
2
|
export const isRenderQuery = input => {
|
|
3
3
|
const $io0 = input => "string" === typeof input.type && "string" === typeof input.title && (undefined === input.parent || "string" === typeof input.parent) && (undefined === input.description || "object" === typeof input.description && null !== input.description && false === Array.isArray(input.description) && $io1(input.description));
|
|
4
|
-
const $io1 = input => null !== input.scene && (undefined === input.scene || "string" === typeof input.scene || (Array.isArray(input.scene) && input.scene.every(elem => null !== elem && undefined !== elem && ("string" === typeof elem || "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io2(elem))) || "object" === typeof input.scene && null !== input.scene && false === Array.isArray(input.scene) && $io2(input.scene))) && (null !== input.profile && (undefined === input.profile || "string" === typeof input.profile || (Array.isArray(input.profile) && input.profile.every(elem => null !== elem && undefined !== elem && ("string" === typeof elem || "object" === typeof elem && null !== elem && $
|
|
5
|
-
const $io2 = input => (undefined === input.id || "string" === typeof input.id) && (undefined === input.preset || "string" === typeof input.preset) && (undefined === input.input || "object" === typeof input.input && null !== input.input && false === Array.isArray(input.input) && $io3(input.input)) && (undefined === input.lang || "string" === typeof input.lang) && (undefined === input.subtitle || "string" === typeof input.subtitle) && (undefined === input.video || "object" === typeof input.video && null !== input.video && false === Array.isArray(input.video) && $
|
|
4
|
+
const $io1 = input => null !== input.scene && (undefined === input.scene || "string" === typeof input.scene || (Array.isArray(input.scene) && input.scene.every(elem => null !== elem && undefined !== elem && ("string" === typeof elem || "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io2(elem))) || "object" === typeof input.scene && null !== input.scene && false === Array.isArray(input.scene) && $io2(input.scene))) && (null !== input.profile && (undefined === input.profile || "string" === typeof input.profile || (Array.isArray(input.profile) && input.profile.every(elem => null !== elem && undefined !== elem && ("string" === typeof elem || "object" === typeof elem && null !== elem && $io10(elem))) || "object" === typeof input.profile && null !== input.profile && $io10(input.profile))));
|
|
5
|
+
const $io2 = input => (undefined === input.id || "string" === typeof input.id) && (undefined === input.preset || "string" === typeof input.preset) && (undefined === input.input || "object" === typeof input.input && null !== input.input && false === Array.isArray(input.input) && $io3(input.input)) && (undefined === input.lang || "string" === typeof input.lang) && (undefined === input.subtitle || "string" === typeof input.subtitle) && (undefined === input.subtitleTracks || "object" === typeof input.subtitleTracks && null !== input.subtitleTracks && false === Array.isArray(input.subtitleTracks) && $io4(input.subtitleTracks)) && (undefined === input.video || "object" === typeof input.video && null !== input.video && false === Array.isArray(input.video) && $io7(input.video)) && (undefined === input.start || "number" === typeof input.start) && (undefined === input.end || "number" === typeof input.end) && (undefined === input.transcribe || "object" === typeof input.transcribe && null !== input.transcribe && false === Array.isArray(input.transcribe) && $io9(input.transcribe));
|
|
6
6
|
const $io3 = input => (undefined === input.type || "string" === typeof input.type) && (null === input.file || undefined === input.file || "string" === typeof input.file);
|
|
7
|
-
const $io4 = input =>
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
const $
|
|
7
|
+
const $io4 = input => Object.keys(input).every(key => {
|
|
8
|
+
const value = input[key];
|
|
9
|
+
if (undefined === value)
|
|
10
|
+
return true;
|
|
11
|
+
return "object" === typeof value && null !== value && false === Array.isArray(value) && $io5(value);
|
|
12
|
+
});
|
|
13
|
+
const $io5 = input => (null === input.style || undefined === input.style || "string" === typeof input.style) && (undefined === input.styleOverrides || "object" === typeof input.styleOverrides && null !== input.styleOverrides && false === Array.isArray(input.styleOverrides) && $io6(input.styleOverrides));
|
|
14
|
+
const $io6 = input => (undefined === input.name || "string" === typeof input.name) && (undefined === input.fontname || "string" === typeof input.fontname) && (undefined === input.fontsize || "string" === typeof input.fontsize) && (undefined === input.primaryColour || "string" === typeof input.primaryColour) && (undefined === input.secondaryColour || "string" === typeof input.secondaryColour) && (undefined === input.outlineColour || "string" === typeof input.outlineColour) && (undefined === input.backColour || "string" === typeof input.backColour) && (undefined === input.bold || "string" === typeof input.bold) && (undefined === input.italic || "string" === typeof input.italic) && (undefined === input.underline || "string" === typeof input.underline) && (undefined === input.strikeOut || "string" === typeof input.strikeOut) && (undefined === input.scaleX || "string" === typeof input.scaleX) && (undefined === input.scaleY || "string" === typeof input.scaleY) && (undefined === input.spacing || "string" === typeof input.spacing) && (undefined === input.angle || "string" === typeof input.angle) && (undefined === input.borderStyle || "string" === typeof input.borderStyle) && (undefined === input.outline || "string" === typeof input.outline) && (undefined === input.shadow || "string" === typeof input.shadow) && (undefined === input.alignment || "string" === typeof input.alignment) && (undefined === input.marginL || "string" === typeof input.marginL) && (undefined === input.marginR || "string" === typeof input.marginR) && (undefined === input.marginV || "string" === typeof input.marginV) && (undefined === input.encoding || "string" === typeof input.encoding);
|
|
15
|
+
const $io7 = input => undefined === input.crop || "object" === typeof input.crop && null !== input.crop && false === Array.isArray(input.crop) && $io8(input.crop);
|
|
16
|
+
const $io8 = input => (undefined === input.x || "number" === typeof input.x) && (undefined === input.y || "number" === typeof input.y) && (undefined === input.width || "number" === typeof input.width) && (undefined === input.height || "number" === typeof input.height);
|
|
17
|
+
const $io9 = input => (undefined === input.language || "string" === typeof input.language) && (undefined === input.pan || Array.isArray(input.pan) && input.pan.every(elem => "number" === typeof elem));
|
|
18
|
+
const $io10 = input => "string" === typeof input.format && (undefined === input.transcribe || "object" === typeof input.transcribe && null !== input.transcribe && $io11(input.transcribe)) && (undefined === input.translate || "object" === typeof input.translate && null !== input.translate && $io12(input.translate)) && (undefined === input.audio || "object" === typeof input.audio && null !== input.audio && false === Array.isArray(input.audio) && $io13(input.audio)) && true && (undefined === input.pick || Array.isArray(input.pick) && input.pick.every(elem => "string" === typeof elem)) && (null !== input.subtitle && (undefined === input.subtitle || "string" === typeof input.subtitle || "object" === typeof input.subtitle && null !== input.subtitle && false === Array.isArray(input.subtitle) && $io14(input.subtitle)));
|
|
19
|
+
const $io11 = input => "string" === typeof input.engine;
|
|
20
|
+
const $io12 = input => "string" === typeof input.language;
|
|
21
|
+
const $io13 = input => undefined === input.pan || "string" === typeof input.pan;
|
|
22
|
+
const $io14 = input => (undefined === input.lang || "string" === typeof input.lang) && (undefined === input.style || "string" === typeof input.style);
|
|
14
23
|
return "object" === typeof input && null !== input && $io0(input);
|
|
15
24
|
};
|
|
16
25
|
export const assertRenderQuery = (input, errorFactory) => {
|
|
17
26
|
const __is = input => {
|
|
18
27
|
const $io0 = input => "string" === typeof input.type && "string" === typeof input.title && (undefined === input.parent || "string" === typeof input.parent) && (undefined === input.description || "object" === typeof input.description && null !== input.description && false === Array.isArray(input.description) && $io1(input.description));
|
|
19
|
-
const $io1 = input => null !== input.scene && (undefined === input.scene || "string" === typeof input.scene || (Array.isArray(input.scene) && input.scene.every(elem => null !== elem && undefined !== elem && ("string" === typeof elem || "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io2(elem))) || "object" === typeof input.scene && null !== input.scene && false === Array.isArray(input.scene) && $io2(input.scene))) && (null !== input.profile && (undefined === input.profile || "string" === typeof input.profile || (Array.isArray(input.profile) && input.profile.every(elem => null !== elem && undefined !== elem && ("string" === typeof elem || "object" === typeof elem && null !== elem && $
|
|
20
|
-
const $io2 = input => (undefined === input.id || "string" === typeof input.id) && (undefined === input.preset || "string" === typeof input.preset) && (undefined === input.input || "object" === typeof input.input && null !== input.input && false === Array.isArray(input.input) && $io3(input.input)) && (undefined === input.lang || "string" === typeof input.lang) && (undefined === input.subtitle || "string" === typeof input.subtitle) && (undefined === input.video || "object" === typeof input.video && null !== input.video && false === Array.isArray(input.video) && $
|
|
28
|
+
const $io1 = input => null !== input.scene && (undefined === input.scene || "string" === typeof input.scene || (Array.isArray(input.scene) && input.scene.every(elem => null !== elem && undefined !== elem && ("string" === typeof elem || "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io2(elem))) || "object" === typeof input.scene && null !== input.scene && false === Array.isArray(input.scene) && $io2(input.scene))) && (null !== input.profile && (undefined === input.profile || "string" === typeof input.profile || (Array.isArray(input.profile) && input.profile.every(elem => null !== elem && undefined !== elem && ("string" === typeof elem || "object" === typeof elem && null !== elem && $io10(elem))) || "object" === typeof input.profile && null !== input.profile && $io10(input.profile))));
|
|
29
|
+
const $io2 = input => (undefined === input.id || "string" === typeof input.id) && (undefined === input.preset || "string" === typeof input.preset) && (undefined === input.input || "object" === typeof input.input && null !== input.input && false === Array.isArray(input.input) && $io3(input.input)) && (undefined === input.lang || "string" === typeof input.lang) && (undefined === input.subtitle || "string" === typeof input.subtitle) && (undefined === input.subtitleTracks || "object" === typeof input.subtitleTracks && null !== input.subtitleTracks && false === Array.isArray(input.subtitleTracks) && $io4(input.subtitleTracks)) && (undefined === input.video || "object" === typeof input.video && null !== input.video && false === Array.isArray(input.video) && $io7(input.video)) && (undefined === input.start || "number" === typeof input.start) && (undefined === input.end || "number" === typeof input.end) && (undefined === input.transcribe || "object" === typeof input.transcribe && null !== input.transcribe && false === Array.isArray(input.transcribe) && $io9(input.transcribe));
|
|
21
30
|
const $io3 = input => (undefined === input.type || "string" === typeof input.type) && (null === input.file || undefined === input.file || "string" === typeof input.file);
|
|
22
|
-
const $io4 = input =>
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
const $
|
|
31
|
+
const $io4 = input => Object.keys(input).every(key => {
|
|
32
|
+
const value = input[key];
|
|
33
|
+
if (undefined === value)
|
|
34
|
+
return true;
|
|
35
|
+
return "object" === typeof value && null !== value && false === Array.isArray(value) && $io5(value);
|
|
36
|
+
});
|
|
37
|
+
const $io5 = input => (null === input.style || undefined === input.style || "string" === typeof input.style) && (undefined === input.styleOverrides || "object" === typeof input.styleOverrides && null !== input.styleOverrides && false === Array.isArray(input.styleOverrides) && $io6(input.styleOverrides));
|
|
38
|
+
const $io6 = input => (undefined === input.name || "string" === typeof input.name) && (undefined === input.fontname || "string" === typeof input.fontname) && (undefined === input.fontsize || "string" === typeof input.fontsize) && (undefined === input.primaryColour || "string" === typeof input.primaryColour) && (undefined === input.secondaryColour || "string" === typeof input.secondaryColour) && (undefined === input.outlineColour || "string" === typeof input.outlineColour) && (undefined === input.backColour || "string" === typeof input.backColour) && (undefined === input.bold || "string" === typeof input.bold) && (undefined === input.italic || "string" === typeof input.italic) && (undefined === input.underline || "string" === typeof input.underline) && (undefined === input.strikeOut || "string" === typeof input.strikeOut) && (undefined === input.scaleX || "string" === typeof input.scaleX) && (undefined === input.scaleY || "string" === typeof input.scaleY) && (undefined === input.spacing || "string" === typeof input.spacing) && (undefined === input.angle || "string" === typeof input.angle) && (undefined === input.borderStyle || "string" === typeof input.borderStyle) && (undefined === input.outline || "string" === typeof input.outline) && (undefined === input.shadow || "string" === typeof input.shadow) && (undefined === input.alignment || "string" === typeof input.alignment) && (undefined === input.marginL || "string" === typeof input.marginL) && (undefined === input.marginR || "string" === typeof input.marginR) && (undefined === input.marginV || "string" === typeof input.marginV) && (undefined === input.encoding || "string" === typeof input.encoding);
|
|
39
|
+
const $io7 = input => undefined === input.crop || "object" === typeof input.crop && null !== input.crop && false === Array.isArray(input.crop) && $io8(input.crop);
|
|
40
|
+
const $io8 = input => (undefined === input.x || "number" === typeof input.x) && (undefined === input.y || "number" === typeof input.y) && (undefined === input.width || "number" === typeof input.width) && (undefined === input.height || "number" === typeof input.height);
|
|
41
|
+
const $io9 = input => (undefined === input.language || "string" === typeof input.language) && (undefined === input.pan || Array.isArray(input.pan) && input.pan.every(elem => "number" === typeof elem));
|
|
42
|
+
const $io10 = input => "string" === typeof input.format && (undefined === input.transcribe || "object" === typeof input.transcribe && null !== input.transcribe && $io11(input.transcribe)) && (undefined === input.translate || "object" === typeof input.translate && null !== input.translate && $io12(input.translate)) && (undefined === input.audio || "object" === typeof input.audio && null !== input.audio && false === Array.isArray(input.audio) && $io13(input.audio)) && true && (undefined === input.pick || Array.isArray(input.pick) && input.pick.every(elem => "string" === typeof elem)) && (null !== input.subtitle && (undefined === input.subtitle || "string" === typeof input.subtitle || "object" === typeof input.subtitle && null !== input.subtitle && false === Array.isArray(input.subtitle) && $io14(input.subtitle)));
|
|
43
|
+
const $io11 = input => "string" === typeof input.engine;
|
|
44
|
+
const $io12 = input => "string" === typeof input.language;
|
|
45
|
+
const $io13 = input => undefined === input.pan || "string" === typeof input.pan;
|
|
46
|
+
const $io14 = input => (undefined === input.lang || "string" === typeof input.lang) && (undefined === input.style || "string" === typeof input.style);
|
|
29
47
|
return "object" === typeof input && null !== input && $io0(input);
|
|
30
48
|
};
|
|
31
49
|
if (false === __is(input))
|
|
32
50
|
((input, _path, _exceptionable = true) => {
|
|
33
51
|
const $guard = __typia.createAssert.guard;
|
|
52
|
+
const $join = __typia.createAssert.join;
|
|
34
53
|
const $ao0 = (input, _path, _exceptionable = true) => ("string" === typeof input.type || $guard(_exceptionable, {
|
|
35
54
|
path: _path + ".type",
|
|
36
55
|
expected: "string",
|
|
@@ -96,11 +115,11 @@ export const assertRenderQuery = (input, errorFactory) => {
|
|
|
96
115
|
path: _path + ".profile[" + _index2 + "]",
|
|
97
116
|
expected: "(RenderProfileObject | string)",
|
|
98
117
|
value: elem
|
|
99
|
-
}, errorFactory)) && $
|
|
118
|
+
}, errorFactory)) && $ao10(elem, _path + ".profile[" + _index2 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
|
100
119
|
path: _path + ".profile[" + _index2 + "]",
|
|
101
120
|
expected: "(RenderProfileObject | string)",
|
|
102
121
|
value: elem
|
|
103
|
-
}, errorFactory))) || "object" === typeof input.profile && null !== input.profile && $
|
|
122
|
+
}, errorFactory))) || "object" === typeof input.profile && null !== input.profile && $ao10(input.profile, _path + ".profile", true && _exceptionable) || $guard(_exceptionable, {
|
|
104
123
|
path: _path + ".profile",
|
|
105
124
|
expected: "(Array<string | RenderProfileObject> | RenderProfileObject | string | undefined)",
|
|
106
125
|
value: input.profile
|
|
@@ -133,13 +152,21 @@ export const assertRenderQuery = (input, errorFactory) => {
|
|
|
133
152
|
path: _path + ".subtitle",
|
|
134
153
|
expected: "(string | undefined)",
|
|
135
154
|
value: input.subtitle
|
|
155
|
+
}, errorFactory)) && (undefined === input.subtitleTracks || ("object" === typeof input.subtitleTracks && null !== input.subtitleTracks && false === Array.isArray(input.subtitleTracks) || $guard(_exceptionable, {
|
|
156
|
+
path: _path + ".subtitleTracks",
|
|
157
|
+
expected: "(__type.o2 | undefined)",
|
|
158
|
+
value: input.subtitleTracks
|
|
159
|
+
}, errorFactory)) && $ao4(input.subtitleTracks, _path + ".subtitleTracks", true && _exceptionable) || $guard(_exceptionable, {
|
|
160
|
+
path: _path + ".subtitleTracks",
|
|
161
|
+
expected: "(__type.o2 | undefined)",
|
|
162
|
+
value: input.subtitleTracks
|
|
136
163
|
}, errorFactory)) && (undefined === input.video || ("object" === typeof input.video && null !== input.video && false === Array.isArray(input.video) || $guard(_exceptionable, {
|
|
137
164
|
path: _path + ".video",
|
|
138
|
-
expected: "(__type.
|
|
165
|
+
expected: "(__type.o4 | undefined)",
|
|
139
166
|
value: input.video
|
|
140
|
-
}, errorFactory)) && $
|
|
167
|
+
}, errorFactory)) && $ao7(input.video, _path + ".video", true && _exceptionable) || $guard(_exceptionable, {
|
|
141
168
|
path: _path + ".video",
|
|
142
|
-
expected: "(__type.
|
|
169
|
+
expected: "(__type.o4 | undefined)",
|
|
143
170
|
value: input.video
|
|
144
171
|
}, errorFactory)) && (undefined === input.start || "number" === typeof input.start || $guard(_exceptionable, {
|
|
145
172
|
path: _path + ".start",
|
|
@@ -151,11 +178,11 @@ export const assertRenderQuery = (input, errorFactory) => {
|
|
|
151
178
|
value: input.end
|
|
152
179
|
}, errorFactory)) && (undefined === input.transcribe || ("object" === typeof input.transcribe && null !== input.transcribe && false === Array.isArray(input.transcribe) || $guard(_exceptionable, {
|
|
153
180
|
path: _path + ".transcribe",
|
|
154
|
-
expected: "(__type.
|
|
181
|
+
expected: "(__type.o6 | undefined)",
|
|
155
182
|
value: input.transcribe
|
|
156
|
-
}, errorFactory)) && $
|
|
183
|
+
}, errorFactory)) && $ao9(input.transcribe, _path + ".transcribe", true && _exceptionable) || $guard(_exceptionable, {
|
|
157
184
|
path: _path + ".transcribe",
|
|
158
|
-
expected: "(__type.
|
|
185
|
+
expected: "(__type.o6 | undefined)",
|
|
159
186
|
value: input.transcribe
|
|
160
187
|
}, errorFactory));
|
|
161
188
|
const $ao3 = (input, _path, _exceptionable = true) => (undefined === input.type || "string" === typeof input.type || $guard(_exceptionable, {
|
|
@@ -167,16 +194,136 @@ export const assertRenderQuery = (input, errorFactory) => {
|
|
|
167
194
|
expected: "(null | string | undefined)",
|
|
168
195
|
value: input.file
|
|
169
196
|
}, errorFactory));
|
|
170
|
-
const $ao4 = (input, _path, _exceptionable = true) =>
|
|
197
|
+
const $ao4 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
|
|
198
|
+
const value = input[key];
|
|
199
|
+
if (undefined === value)
|
|
200
|
+
return true;
|
|
201
|
+
return ("object" === typeof value && null !== value && false === Array.isArray(value) || $guard(_exceptionable, {
|
|
202
|
+
path: _path + $join(key),
|
|
203
|
+
expected: "__type.o3",
|
|
204
|
+
value: value
|
|
205
|
+
}, errorFactory)) && $ao5(value, _path + $join(key), true && _exceptionable) || $guard(_exceptionable, {
|
|
206
|
+
path: _path + $join(key),
|
|
207
|
+
expected: "__type.o3",
|
|
208
|
+
value: value
|
|
209
|
+
}, errorFactory);
|
|
210
|
+
});
|
|
211
|
+
const $ao5 = (input, _path, _exceptionable = true) => (null === input.style || undefined === input.style || "string" === typeof input.style || $guard(_exceptionable, {
|
|
212
|
+
path: _path + ".style",
|
|
213
|
+
expected: "(null | string | undefined)",
|
|
214
|
+
value: input.style
|
|
215
|
+
}, errorFactory)) && (undefined === input.styleOverrides || ("object" === typeof input.styleOverrides && null !== input.styleOverrides && false === Array.isArray(input.styleOverrides) || $guard(_exceptionable, {
|
|
216
|
+
path: _path + ".styleOverrides",
|
|
217
|
+
expected: "(Omit<SubtitleStyleDomainRecord, \"scaledBorderAndShadow\" | \"futureWordWrapping\"> | undefined)",
|
|
218
|
+
value: input.styleOverrides
|
|
219
|
+
}, errorFactory)) && $ao6(input.styleOverrides, _path + ".styleOverrides", true && _exceptionable) || $guard(_exceptionable, {
|
|
220
|
+
path: _path + ".styleOverrides",
|
|
221
|
+
expected: "(Omit<SubtitleStyleDomainRecord, \"scaledBorderAndShadow\" | \"futureWordWrapping\"> | undefined)",
|
|
222
|
+
value: input.styleOverrides
|
|
223
|
+
}, errorFactory));
|
|
224
|
+
const $ao6 = (input, _path, _exceptionable = true) => (undefined === input.name || "string" === typeof input.name || $guard(_exceptionable, {
|
|
225
|
+
path: _path + ".name",
|
|
226
|
+
expected: "(string | undefined)",
|
|
227
|
+
value: input.name
|
|
228
|
+
}, errorFactory)) && (undefined === input.fontname || "string" === typeof input.fontname || $guard(_exceptionable, {
|
|
229
|
+
path: _path + ".fontname",
|
|
230
|
+
expected: "(string | undefined)",
|
|
231
|
+
value: input.fontname
|
|
232
|
+
}, errorFactory)) && (undefined === input.fontsize || "string" === typeof input.fontsize || $guard(_exceptionable, {
|
|
233
|
+
path: _path + ".fontsize",
|
|
234
|
+
expected: "(string | undefined)",
|
|
235
|
+
value: input.fontsize
|
|
236
|
+
}, errorFactory)) && (undefined === input.primaryColour || "string" === typeof input.primaryColour || $guard(_exceptionable, {
|
|
237
|
+
path: _path + ".primaryColour",
|
|
238
|
+
expected: "(string | undefined)",
|
|
239
|
+
value: input.primaryColour
|
|
240
|
+
}, errorFactory)) && (undefined === input.secondaryColour || "string" === typeof input.secondaryColour || $guard(_exceptionable, {
|
|
241
|
+
path: _path + ".secondaryColour",
|
|
242
|
+
expected: "(string | undefined)",
|
|
243
|
+
value: input.secondaryColour
|
|
244
|
+
}, errorFactory)) && (undefined === input.outlineColour || "string" === typeof input.outlineColour || $guard(_exceptionable, {
|
|
245
|
+
path: _path + ".outlineColour",
|
|
246
|
+
expected: "(string | undefined)",
|
|
247
|
+
value: input.outlineColour
|
|
248
|
+
}, errorFactory)) && (undefined === input.backColour || "string" === typeof input.backColour || $guard(_exceptionable, {
|
|
249
|
+
path: _path + ".backColour",
|
|
250
|
+
expected: "(string | undefined)",
|
|
251
|
+
value: input.backColour
|
|
252
|
+
}, errorFactory)) && (undefined === input.bold || "string" === typeof input.bold || $guard(_exceptionable, {
|
|
253
|
+
path: _path + ".bold",
|
|
254
|
+
expected: "(string | undefined)",
|
|
255
|
+
value: input.bold
|
|
256
|
+
}, errorFactory)) && (undefined === input.italic || "string" === typeof input.italic || $guard(_exceptionable, {
|
|
257
|
+
path: _path + ".italic",
|
|
258
|
+
expected: "(string | undefined)",
|
|
259
|
+
value: input.italic
|
|
260
|
+
}, errorFactory)) && (undefined === input.underline || "string" === typeof input.underline || $guard(_exceptionable, {
|
|
261
|
+
path: _path + ".underline",
|
|
262
|
+
expected: "(string | undefined)",
|
|
263
|
+
value: input.underline
|
|
264
|
+
}, errorFactory)) && (undefined === input.strikeOut || "string" === typeof input.strikeOut || $guard(_exceptionable, {
|
|
265
|
+
path: _path + ".strikeOut",
|
|
266
|
+
expected: "(string | undefined)",
|
|
267
|
+
value: input.strikeOut
|
|
268
|
+
}, errorFactory)) && (undefined === input.scaleX || "string" === typeof input.scaleX || $guard(_exceptionable, {
|
|
269
|
+
path: _path + ".scaleX",
|
|
270
|
+
expected: "(string | undefined)",
|
|
271
|
+
value: input.scaleX
|
|
272
|
+
}, errorFactory)) && (undefined === input.scaleY || "string" === typeof input.scaleY || $guard(_exceptionable, {
|
|
273
|
+
path: _path + ".scaleY",
|
|
274
|
+
expected: "(string | undefined)",
|
|
275
|
+
value: input.scaleY
|
|
276
|
+
}, errorFactory)) && (undefined === input.spacing || "string" === typeof input.spacing || $guard(_exceptionable, {
|
|
277
|
+
path: _path + ".spacing",
|
|
278
|
+
expected: "(string | undefined)",
|
|
279
|
+
value: input.spacing
|
|
280
|
+
}, errorFactory)) && (undefined === input.angle || "string" === typeof input.angle || $guard(_exceptionable, {
|
|
281
|
+
path: _path + ".angle",
|
|
282
|
+
expected: "(string | undefined)",
|
|
283
|
+
value: input.angle
|
|
284
|
+
}, errorFactory)) && (undefined === input.borderStyle || "string" === typeof input.borderStyle || $guard(_exceptionable, {
|
|
285
|
+
path: _path + ".borderStyle",
|
|
286
|
+
expected: "(string | undefined)",
|
|
287
|
+
value: input.borderStyle
|
|
288
|
+
}, errorFactory)) && (undefined === input.outline || "string" === typeof input.outline || $guard(_exceptionable, {
|
|
289
|
+
path: _path + ".outline",
|
|
290
|
+
expected: "(string | undefined)",
|
|
291
|
+
value: input.outline
|
|
292
|
+
}, errorFactory)) && (undefined === input.shadow || "string" === typeof input.shadow || $guard(_exceptionable, {
|
|
293
|
+
path: _path + ".shadow",
|
|
294
|
+
expected: "(string | undefined)",
|
|
295
|
+
value: input.shadow
|
|
296
|
+
}, errorFactory)) && (undefined === input.alignment || "string" === typeof input.alignment || $guard(_exceptionable, {
|
|
297
|
+
path: _path + ".alignment",
|
|
298
|
+
expected: "(string | undefined)",
|
|
299
|
+
value: input.alignment
|
|
300
|
+
}, errorFactory)) && (undefined === input.marginL || "string" === typeof input.marginL || $guard(_exceptionable, {
|
|
301
|
+
path: _path + ".marginL",
|
|
302
|
+
expected: "(string | undefined)",
|
|
303
|
+
value: input.marginL
|
|
304
|
+
}, errorFactory)) && (undefined === input.marginR || "string" === typeof input.marginR || $guard(_exceptionable, {
|
|
305
|
+
path: _path + ".marginR",
|
|
306
|
+
expected: "(string | undefined)",
|
|
307
|
+
value: input.marginR
|
|
308
|
+
}, errorFactory)) && (undefined === input.marginV || "string" === typeof input.marginV || $guard(_exceptionable, {
|
|
309
|
+
path: _path + ".marginV",
|
|
310
|
+
expected: "(string | undefined)",
|
|
311
|
+
value: input.marginV
|
|
312
|
+
}, errorFactory)) && (undefined === input.encoding || "string" === typeof input.encoding || $guard(_exceptionable, {
|
|
313
|
+
path: _path + ".encoding",
|
|
314
|
+
expected: "(string | undefined)",
|
|
315
|
+
value: input.encoding
|
|
316
|
+
}, errorFactory));
|
|
317
|
+
const $ao7 = (input, _path, _exceptionable = true) => undefined === input.crop || ("object" === typeof input.crop && null !== input.crop && false === Array.isArray(input.crop) || $guard(_exceptionable, {
|
|
171
318
|
path: _path + ".crop",
|
|
172
|
-
expected: "(__type.
|
|
319
|
+
expected: "(__type.o5 | undefined)",
|
|
173
320
|
value: input.crop
|
|
174
|
-
}, errorFactory)) && $
|
|
321
|
+
}, errorFactory)) && $ao8(input.crop, _path + ".crop", true && _exceptionable) || $guard(_exceptionable, {
|
|
175
322
|
path: _path + ".crop",
|
|
176
|
-
expected: "(__type.
|
|
323
|
+
expected: "(__type.o5 | undefined)",
|
|
177
324
|
value: input.crop
|
|
178
325
|
}, errorFactory);
|
|
179
|
-
const $
|
|
326
|
+
const $ao8 = (input, _path, _exceptionable = true) => (undefined === input.x || "number" === typeof input.x || $guard(_exceptionable, {
|
|
180
327
|
path: _path + ".x",
|
|
181
328
|
expected: "(number | undefined)",
|
|
182
329
|
value: input.x
|
|
@@ -193,7 +340,7 @@ export const assertRenderQuery = (input, errorFactory) => {
|
|
|
193
340
|
expected: "(number | undefined)",
|
|
194
341
|
value: input.height
|
|
195
342
|
}, errorFactory));
|
|
196
|
-
const $
|
|
343
|
+
const $ao9 = (input, _path, _exceptionable = true) => (undefined === input.language || "string" === typeof input.language || $guard(_exceptionable, {
|
|
197
344
|
path: _path + ".language",
|
|
198
345
|
expected: "(string | undefined)",
|
|
199
346
|
value: input.language
|
|
@@ -210,33 +357,33 @@ export const assertRenderQuery = (input, errorFactory) => {
|
|
|
210
357
|
expected: "(Array<number> | undefined)",
|
|
211
358
|
value: input.pan
|
|
212
359
|
}, errorFactory));
|
|
213
|
-
const $
|
|
360
|
+
const $ao10 = (input, _path, _exceptionable = true) => ("string" === typeof input.format || $guard(_exceptionable, {
|
|
214
361
|
path: _path + ".format",
|
|
215
362
|
expected: "string",
|
|
216
363
|
value: input.format
|
|
217
364
|
}, errorFactory)) && (undefined === input.transcribe || ("object" === typeof input.transcribe && null !== input.transcribe || $guard(_exceptionable, {
|
|
218
365
|
path: _path + ".transcribe",
|
|
219
|
-
expected: "(__type.
|
|
366
|
+
expected: "(__type.o7 | undefined)",
|
|
220
367
|
value: input.transcribe
|
|
221
|
-
}, errorFactory)) && $
|
|
368
|
+
}, errorFactory)) && $ao11(input.transcribe, _path + ".transcribe", true && _exceptionable) || $guard(_exceptionable, {
|
|
222
369
|
path: _path + ".transcribe",
|
|
223
|
-
expected: "(__type.
|
|
370
|
+
expected: "(__type.o7 | undefined)",
|
|
224
371
|
value: input.transcribe
|
|
225
372
|
}, errorFactory)) && (undefined === input.translate || ("object" === typeof input.translate && null !== input.translate || $guard(_exceptionable, {
|
|
226
373
|
path: _path + ".translate",
|
|
227
|
-
expected: "(__type.
|
|
374
|
+
expected: "(__type.o8 | undefined)",
|
|
228
375
|
value: input.translate
|
|
229
|
-
}, errorFactory)) && $
|
|
376
|
+
}, errorFactory)) && $ao12(input.translate, _path + ".translate", true && _exceptionable) || $guard(_exceptionable, {
|
|
230
377
|
path: _path + ".translate",
|
|
231
|
-
expected: "(__type.
|
|
378
|
+
expected: "(__type.o8 | undefined)",
|
|
232
379
|
value: input.translate
|
|
233
380
|
}, errorFactory)) && (undefined === input.audio || ("object" === typeof input.audio && null !== input.audio && false === Array.isArray(input.audio) || $guard(_exceptionable, {
|
|
234
381
|
path: _path + ".audio",
|
|
235
|
-
expected: "(__type.
|
|
382
|
+
expected: "(__type.o9 | undefined)",
|
|
236
383
|
value: input.audio
|
|
237
|
-
}, errorFactory)) && $
|
|
384
|
+
}, errorFactory)) && $ao13(input.audio, _path + ".audio", true && _exceptionable) || $guard(_exceptionable, {
|
|
238
385
|
path: _path + ".audio",
|
|
239
|
-
expected: "(__type.
|
|
386
|
+
expected: "(__type.o9 | undefined)",
|
|
240
387
|
value: input.audio
|
|
241
388
|
}, errorFactory)) && true && (undefined === input.pick || (Array.isArray(input.pick) || $guard(_exceptionable, {
|
|
242
389
|
path: _path + ".pick",
|
|
@@ -250,22 +397,43 @@ export const assertRenderQuery = (input, errorFactory) => {
|
|
|
250
397
|
path: _path + ".pick",
|
|
251
398
|
expected: "(Array<string> | undefined)",
|
|
252
399
|
value: input.pick
|
|
253
|
-
}, errorFactory))
|
|
254
|
-
|
|
400
|
+
}, errorFactory)) && ((null !== input.subtitle || $guard(_exceptionable, {
|
|
401
|
+
path: _path + ".subtitle",
|
|
402
|
+
expected: "(SubtitleProfile | string | undefined)",
|
|
403
|
+
value: input.subtitle
|
|
404
|
+
}, errorFactory)) && (undefined === input.subtitle || "string" === typeof input.subtitle || ("object" === typeof input.subtitle && null !== input.subtitle && false === Array.isArray(input.subtitle) || $guard(_exceptionable, {
|
|
405
|
+
path: _path + ".subtitle",
|
|
406
|
+
expected: "(SubtitleProfile | string | undefined)",
|
|
407
|
+
value: input.subtitle
|
|
408
|
+
}, errorFactory)) && $ao14(input.subtitle, _path + ".subtitle", true && _exceptionable) || $guard(_exceptionable, {
|
|
409
|
+
path: _path + ".subtitle",
|
|
410
|
+
expected: "(SubtitleProfile | string | undefined)",
|
|
411
|
+
value: input.subtitle
|
|
412
|
+
}, errorFactory)));
|
|
413
|
+
const $ao11 = (input, _path, _exceptionable = true) => "string" === typeof input.engine || $guard(_exceptionable, {
|
|
255
414
|
path: _path + ".engine",
|
|
256
415
|
expected: "string",
|
|
257
416
|
value: input.engine
|
|
258
417
|
}, errorFactory);
|
|
259
|
-
const $
|
|
418
|
+
const $ao12 = (input, _path, _exceptionable = true) => "string" === typeof input.language || $guard(_exceptionable, {
|
|
260
419
|
path: _path + ".language",
|
|
261
420
|
expected: "string",
|
|
262
421
|
value: input.language
|
|
263
422
|
}, errorFactory);
|
|
264
|
-
const $
|
|
423
|
+
const $ao13 = (input, _path, _exceptionable = true) => undefined === input.pan || "string" === typeof input.pan || $guard(_exceptionable, {
|
|
265
424
|
path: _path + ".pan",
|
|
266
425
|
expected: "(string | undefined)",
|
|
267
426
|
value: input.pan
|
|
268
427
|
}, errorFactory);
|
|
428
|
+
const $ao14 = (input, _path, _exceptionable = true) => (undefined === input.lang || "string" === typeof input.lang || $guard(_exceptionable, {
|
|
429
|
+
path: _path + ".lang",
|
|
430
|
+
expected: "(string | undefined)",
|
|
431
|
+
value: input.lang
|
|
432
|
+
}, errorFactory)) && (undefined === input.style || "string" === typeof input.style || $guard(_exceptionable, {
|
|
433
|
+
path: _path + ".style",
|
|
434
|
+
expected: "(string | undefined)",
|
|
435
|
+
value: input.style
|
|
436
|
+
}, errorFactory));
|
|
269
437
|
return ("object" === typeof input && null !== input || $guard(true, {
|
|
270
438
|
path: _path + "",
|
|
271
439
|
expected: "RenderQuery",
|
|
@@ -308,9 +476,9 @@ export const randomRenderQuery = generator => {
|
|
|
308
476
|
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
|
|
309
477
|
() => (generator?.array ?? $generator.array)(() => $pick([
|
|
310
478
|
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
|
|
311
|
-
() => $
|
|
479
|
+
() => $ro10(_recursive, _recursive ? 1 + _depth : _depth)
|
|
312
480
|
])()),
|
|
313
|
-
() => $
|
|
481
|
+
() => $ro10(_recursive, _recursive ? 1 + _depth : _depth)
|
|
314
482
|
])()
|
|
315
483
|
});
|
|
316
484
|
const $ro2 = (_recursive = false, _depth = 0) => ({
|
|
@@ -334,10 +502,14 @@ export const randomRenderQuery = generator => {
|
|
|
334
502
|
() => undefined,
|
|
335
503
|
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
336
504
|
])(),
|
|
337
|
-
|
|
505
|
+
subtitleTracks: $pick([
|
|
338
506
|
() => undefined,
|
|
339
507
|
() => $ro4(_recursive, _recursive ? 1 + _depth : _depth)
|
|
340
508
|
])(),
|
|
509
|
+
video: $pick([
|
|
510
|
+
() => undefined,
|
|
511
|
+
() => $ro7(_recursive, _recursive ? 1 + _depth : _depth)
|
|
512
|
+
])(),
|
|
341
513
|
start: $pick([
|
|
342
514
|
() => undefined,
|
|
343
515
|
() => (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100)
|
|
@@ -348,7 +520,7 @@ export const randomRenderQuery = generator => {
|
|
|
348
520
|
])(),
|
|
349
521
|
transcribe: $pick([
|
|
350
522
|
() => undefined,
|
|
351
|
-
() => $
|
|
523
|
+
() => $ro9(_recursive, _recursive ? 1 + _depth : _depth)
|
|
352
524
|
])()
|
|
353
525
|
});
|
|
354
526
|
const $ro3 = (_recursive = false, _depth = 0) => ({
|
|
@@ -362,13 +534,123 @@ export const randomRenderQuery = generator => {
|
|
|
362
534
|
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
363
535
|
])()
|
|
364
536
|
});
|
|
365
|
-
const $ro4 = (_recursive = false, _depth = 0) =>
|
|
537
|
+
const $ro4 = (_recursive = false, _depth = 0) => {
|
|
538
|
+
const output = {};
|
|
539
|
+
(generator?.array ?? $generator.array)(() => output[(generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()] = $ro5(_recursive, _recursive ? 1 + _depth : _depth), (generator?.integer ?? $generator.integer)(0, 3));
|
|
540
|
+
return output;
|
|
541
|
+
};
|
|
542
|
+
const $ro5 = (_recursive = false, _depth = 0) => ({
|
|
543
|
+
style: $pick([
|
|
544
|
+
() => undefined,
|
|
545
|
+
() => null,
|
|
546
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
547
|
+
])(),
|
|
548
|
+
styleOverrides: $pick([
|
|
549
|
+
() => undefined,
|
|
550
|
+
() => $ro6(_recursive, _recursive ? 1 + _depth : _depth)
|
|
551
|
+
])()
|
|
552
|
+
});
|
|
553
|
+
const $ro6 = (_recursive = false, _depth = 0) => ({
|
|
554
|
+
name: $pick([
|
|
555
|
+
() => undefined,
|
|
556
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
557
|
+
])(),
|
|
558
|
+
fontname: $pick([
|
|
559
|
+
() => undefined,
|
|
560
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
561
|
+
])(),
|
|
562
|
+
fontsize: $pick([
|
|
563
|
+
() => undefined,
|
|
564
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
565
|
+
])(),
|
|
566
|
+
primaryColour: $pick([
|
|
567
|
+
() => undefined,
|
|
568
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
569
|
+
])(),
|
|
570
|
+
secondaryColour: $pick([
|
|
571
|
+
() => undefined,
|
|
572
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
573
|
+
])(),
|
|
574
|
+
outlineColour: $pick([
|
|
575
|
+
() => undefined,
|
|
576
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
577
|
+
])(),
|
|
578
|
+
backColour: $pick([
|
|
579
|
+
() => undefined,
|
|
580
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
581
|
+
])(),
|
|
582
|
+
bold: $pick([
|
|
583
|
+
() => undefined,
|
|
584
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
585
|
+
])(),
|
|
586
|
+
italic: $pick([
|
|
587
|
+
() => undefined,
|
|
588
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
589
|
+
])(),
|
|
590
|
+
underline: $pick([
|
|
591
|
+
() => undefined,
|
|
592
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
593
|
+
])(),
|
|
594
|
+
strikeOut: $pick([
|
|
595
|
+
() => undefined,
|
|
596
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
597
|
+
])(),
|
|
598
|
+
scaleX: $pick([
|
|
599
|
+
() => undefined,
|
|
600
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
601
|
+
])(),
|
|
602
|
+
scaleY: $pick([
|
|
603
|
+
() => undefined,
|
|
604
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
605
|
+
])(),
|
|
606
|
+
spacing: $pick([
|
|
607
|
+
() => undefined,
|
|
608
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
609
|
+
])(),
|
|
610
|
+
angle: $pick([
|
|
611
|
+
() => undefined,
|
|
612
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
613
|
+
])(),
|
|
614
|
+
borderStyle: $pick([
|
|
615
|
+
() => undefined,
|
|
616
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
617
|
+
])(),
|
|
618
|
+
outline: $pick([
|
|
619
|
+
() => undefined,
|
|
620
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
621
|
+
])(),
|
|
622
|
+
shadow: $pick([
|
|
623
|
+
() => undefined,
|
|
624
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
625
|
+
])(),
|
|
626
|
+
alignment: $pick([
|
|
627
|
+
() => undefined,
|
|
628
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
629
|
+
])(),
|
|
630
|
+
marginL: $pick([
|
|
631
|
+
() => undefined,
|
|
632
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
633
|
+
])(),
|
|
634
|
+
marginR: $pick([
|
|
635
|
+
() => undefined,
|
|
636
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
637
|
+
])(),
|
|
638
|
+
marginV: $pick([
|
|
639
|
+
() => undefined,
|
|
640
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
641
|
+
])(),
|
|
642
|
+
encoding: $pick([
|
|
643
|
+
() => undefined,
|
|
644
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
645
|
+
])()
|
|
646
|
+
});
|
|
647
|
+
const $ro7 = (_recursive = false, _depth = 0) => ({
|
|
366
648
|
crop: $pick([
|
|
367
649
|
() => undefined,
|
|
368
|
-
() => $
|
|
650
|
+
() => $ro8(_recursive, _recursive ? 1 + _depth : _depth)
|
|
369
651
|
])()
|
|
370
652
|
});
|
|
371
|
-
const $
|
|
653
|
+
const $ro8 = (_recursive = false, _depth = 0) => ({
|
|
372
654
|
x: $pick([
|
|
373
655
|
() => undefined,
|
|
374
656
|
() => (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100)
|
|
@@ -386,7 +668,7 @@ export const randomRenderQuery = generator => {
|
|
|
386
668
|
() => (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100)
|
|
387
669
|
])()
|
|
388
670
|
});
|
|
389
|
-
const $
|
|
671
|
+
const $ro9 = (_recursive = false, _depth = 0) => ({
|
|
390
672
|
language: $pick([
|
|
391
673
|
() => undefined,
|
|
392
674
|
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
@@ -396,19 +678,19 @@ export const randomRenderQuery = generator => {
|
|
|
396
678
|
() => (generator?.array ?? $generator.array)(() => (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100))
|
|
397
679
|
])()
|
|
398
680
|
});
|
|
399
|
-
const $
|
|
681
|
+
const $ro10 = (_recursive = false, _depth = 0) => ({
|
|
400
682
|
format: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
|
|
401
683
|
transcribe: $pick([
|
|
402
684
|
() => undefined,
|
|
403
|
-
() => $
|
|
685
|
+
() => $ro11(_recursive, _recursive ? 1 + _depth : _depth)
|
|
404
686
|
])(),
|
|
405
687
|
translate: $pick([
|
|
406
688
|
() => undefined,
|
|
407
|
-
() => $
|
|
689
|
+
() => $ro12(_recursive, _recursive ? 1 + _depth : _depth)
|
|
408
690
|
])(),
|
|
409
691
|
audio: $pick([
|
|
410
692
|
() => undefined,
|
|
411
|
-
() => $
|
|
693
|
+
() => $ro13(_recursive, _recursive ? 1 + _depth : _depth)
|
|
412
694
|
])(),
|
|
413
695
|
video: $pick([
|
|
414
696
|
() => "any type used...",
|
|
@@ -417,40 +699,65 @@ export const randomRenderQuery = generator => {
|
|
|
417
699
|
pick: $pick([
|
|
418
700
|
() => undefined,
|
|
419
701
|
() => (generator?.array ?? $generator.array)(() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)())
|
|
702
|
+
])(),
|
|
703
|
+
subtitle: $pick([
|
|
704
|
+
() => undefined,
|
|
705
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
|
|
706
|
+
() => $ro14(_recursive, _recursive ? 1 + _depth : _depth)
|
|
420
707
|
])()
|
|
421
708
|
});
|
|
422
|
-
const $
|
|
709
|
+
const $ro11 = (_recursive = false, _depth = 0) => ({
|
|
423
710
|
engine: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
424
711
|
});
|
|
425
|
-
const $
|
|
712
|
+
const $ro12 = (_recursive = false, _depth = 0) => ({
|
|
426
713
|
language: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
427
714
|
});
|
|
428
|
-
const $
|
|
715
|
+
const $ro13 = (_recursive = false, _depth = 0) => ({
|
|
429
716
|
pan: $pick([
|
|
430
717
|
() => undefined,
|
|
431
718
|
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
432
719
|
])()
|
|
433
720
|
});
|
|
721
|
+
const $ro14 = (_recursive = false, _depth = 0) => ({
|
|
722
|
+
lang: $pick([
|
|
723
|
+
() => undefined,
|
|
724
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
725
|
+
])(),
|
|
726
|
+
style: $pick([
|
|
727
|
+
() => undefined,
|
|
728
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
729
|
+
])()
|
|
730
|
+
});
|
|
434
731
|
return $ro0();
|
|
435
732
|
};
|
|
436
733
|
export const assertGuardRenderQuery = (input, errorFactory) => {
|
|
437
734
|
const __is = input => {
|
|
438
735
|
const $io0 = input => "string" === typeof input.type && "string" === typeof input.title && (undefined === input.parent || "string" === typeof input.parent) && (undefined === input.description || "object" === typeof input.description && null !== input.description && false === Array.isArray(input.description) && $io1(input.description));
|
|
439
|
-
const $io1 = input => null !== input.scene && (undefined === input.scene || "string" === typeof input.scene || (Array.isArray(input.scene) && input.scene.every(elem => null !== elem && undefined !== elem && ("string" === typeof elem || "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io2(elem))) || "object" === typeof input.scene && null !== input.scene && false === Array.isArray(input.scene) && $io2(input.scene))) && (null !== input.profile && (undefined === input.profile || "string" === typeof input.profile || (Array.isArray(input.profile) && input.profile.every(elem => null !== elem && undefined !== elem && ("string" === typeof elem || "object" === typeof elem && null !== elem && $
|
|
440
|
-
const $io2 = input => (undefined === input.id || "string" === typeof input.id) && (undefined === input.preset || "string" === typeof input.preset) && (undefined === input.input || "object" === typeof input.input && null !== input.input && false === Array.isArray(input.input) && $io3(input.input)) && (undefined === input.lang || "string" === typeof input.lang) && (undefined === input.subtitle || "string" === typeof input.subtitle) && (undefined === input.video || "object" === typeof input.video && null !== input.video && false === Array.isArray(input.video) && $
|
|
736
|
+
const $io1 = input => null !== input.scene && (undefined === input.scene || "string" === typeof input.scene || (Array.isArray(input.scene) && input.scene.every(elem => null !== elem && undefined !== elem && ("string" === typeof elem || "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io2(elem))) || "object" === typeof input.scene && null !== input.scene && false === Array.isArray(input.scene) && $io2(input.scene))) && (null !== input.profile && (undefined === input.profile || "string" === typeof input.profile || (Array.isArray(input.profile) && input.profile.every(elem => null !== elem && undefined !== elem && ("string" === typeof elem || "object" === typeof elem && null !== elem && $io10(elem))) || "object" === typeof input.profile && null !== input.profile && $io10(input.profile))));
|
|
737
|
+
const $io2 = input => (undefined === input.id || "string" === typeof input.id) && (undefined === input.preset || "string" === typeof input.preset) && (undefined === input.input || "object" === typeof input.input && null !== input.input && false === Array.isArray(input.input) && $io3(input.input)) && (undefined === input.lang || "string" === typeof input.lang) && (undefined === input.subtitle || "string" === typeof input.subtitle) && (undefined === input.subtitleTracks || "object" === typeof input.subtitleTracks && null !== input.subtitleTracks && false === Array.isArray(input.subtitleTracks) && $io4(input.subtitleTracks)) && (undefined === input.video || "object" === typeof input.video && null !== input.video && false === Array.isArray(input.video) && $io7(input.video)) && (undefined === input.start || "number" === typeof input.start) && (undefined === input.end || "number" === typeof input.end) && (undefined === input.transcribe || "object" === typeof input.transcribe && null !== input.transcribe && false === Array.isArray(input.transcribe) && $io9(input.transcribe));
|
|
441
738
|
const $io3 = input => (undefined === input.type || "string" === typeof input.type) && (null === input.file || undefined === input.file || "string" === typeof input.file);
|
|
442
|
-
const $io4 = input =>
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
const $
|
|
739
|
+
const $io4 = input => Object.keys(input).every(key => {
|
|
740
|
+
const value = input[key];
|
|
741
|
+
if (undefined === value)
|
|
742
|
+
return true;
|
|
743
|
+
return "object" === typeof value && null !== value && false === Array.isArray(value) && $io5(value);
|
|
744
|
+
});
|
|
745
|
+
const $io5 = input => (null === input.style || undefined === input.style || "string" === typeof input.style) && (undefined === input.styleOverrides || "object" === typeof input.styleOverrides && null !== input.styleOverrides && false === Array.isArray(input.styleOverrides) && $io6(input.styleOverrides));
|
|
746
|
+
const $io6 = input => (undefined === input.name || "string" === typeof input.name) && (undefined === input.fontname || "string" === typeof input.fontname) && (undefined === input.fontsize || "string" === typeof input.fontsize) && (undefined === input.primaryColour || "string" === typeof input.primaryColour) && (undefined === input.secondaryColour || "string" === typeof input.secondaryColour) && (undefined === input.outlineColour || "string" === typeof input.outlineColour) && (undefined === input.backColour || "string" === typeof input.backColour) && (undefined === input.bold || "string" === typeof input.bold) && (undefined === input.italic || "string" === typeof input.italic) && (undefined === input.underline || "string" === typeof input.underline) && (undefined === input.strikeOut || "string" === typeof input.strikeOut) && (undefined === input.scaleX || "string" === typeof input.scaleX) && (undefined === input.scaleY || "string" === typeof input.scaleY) && (undefined === input.spacing || "string" === typeof input.spacing) && (undefined === input.angle || "string" === typeof input.angle) && (undefined === input.borderStyle || "string" === typeof input.borderStyle) && (undefined === input.outline || "string" === typeof input.outline) && (undefined === input.shadow || "string" === typeof input.shadow) && (undefined === input.alignment || "string" === typeof input.alignment) && (undefined === input.marginL || "string" === typeof input.marginL) && (undefined === input.marginR || "string" === typeof input.marginR) && (undefined === input.marginV || "string" === typeof input.marginV) && (undefined === input.encoding || "string" === typeof input.encoding);
|
|
747
|
+
const $io7 = input => undefined === input.crop || "object" === typeof input.crop && null !== input.crop && false === Array.isArray(input.crop) && $io8(input.crop);
|
|
748
|
+
const $io8 = input => (undefined === input.x || "number" === typeof input.x) && (undefined === input.y || "number" === typeof input.y) && (undefined === input.width || "number" === typeof input.width) && (undefined === input.height || "number" === typeof input.height);
|
|
749
|
+
const $io9 = input => (undefined === input.language || "string" === typeof input.language) && (undefined === input.pan || Array.isArray(input.pan) && input.pan.every(elem => "number" === typeof elem));
|
|
750
|
+
const $io10 = input => "string" === typeof input.format && (undefined === input.transcribe || "object" === typeof input.transcribe && null !== input.transcribe && $io11(input.transcribe)) && (undefined === input.translate || "object" === typeof input.translate && null !== input.translate && $io12(input.translate)) && (undefined === input.audio || "object" === typeof input.audio && null !== input.audio && false === Array.isArray(input.audio) && $io13(input.audio)) && true && (undefined === input.pick || Array.isArray(input.pick) && input.pick.every(elem => "string" === typeof elem)) && (null !== input.subtitle && (undefined === input.subtitle || "string" === typeof input.subtitle || "object" === typeof input.subtitle && null !== input.subtitle && false === Array.isArray(input.subtitle) && $io14(input.subtitle)));
|
|
751
|
+
const $io11 = input => "string" === typeof input.engine;
|
|
752
|
+
const $io12 = input => "string" === typeof input.language;
|
|
753
|
+
const $io13 = input => undefined === input.pan || "string" === typeof input.pan;
|
|
754
|
+
const $io14 = input => (undefined === input.lang || "string" === typeof input.lang) && (undefined === input.style || "string" === typeof input.style);
|
|
449
755
|
return "object" === typeof input && null !== input && $io0(input);
|
|
450
756
|
};
|
|
451
757
|
if (false === __is(input))
|
|
452
758
|
((input, _path, _exceptionable = true) => {
|
|
453
759
|
const $guard = __typia.createAssertGuard.guard;
|
|
760
|
+
const $join = __typia.createAssertGuard.join;
|
|
454
761
|
const $ao0 = (input, _path, _exceptionable = true) => ("string" === typeof input.type || $guard(_exceptionable, {
|
|
455
762
|
path: _path + ".type",
|
|
456
763
|
expected: "string",
|
|
@@ -516,11 +823,11 @@ export const assertGuardRenderQuery = (input, errorFactory) => {
|
|
|
516
823
|
path: _path + ".profile[" + _index2 + "]",
|
|
517
824
|
expected: "(RenderProfileObject | string)",
|
|
518
825
|
value: elem
|
|
519
|
-
}, errorFactory)) && $
|
|
826
|
+
}, errorFactory)) && $ao10(elem, _path + ".profile[" + _index2 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
|
520
827
|
path: _path + ".profile[" + _index2 + "]",
|
|
521
828
|
expected: "(RenderProfileObject | string)",
|
|
522
829
|
value: elem
|
|
523
|
-
}, errorFactory))) || "object" === typeof input.profile && null !== input.profile && $
|
|
830
|
+
}, errorFactory))) || "object" === typeof input.profile && null !== input.profile && $ao10(input.profile, _path + ".profile", true && _exceptionable) || $guard(_exceptionable, {
|
|
524
831
|
path: _path + ".profile",
|
|
525
832
|
expected: "(Array<string | RenderProfileObject> | RenderProfileObject | string | undefined)",
|
|
526
833
|
value: input.profile
|
|
@@ -553,13 +860,21 @@ export const assertGuardRenderQuery = (input, errorFactory) => {
|
|
|
553
860
|
path: _path + ".subtitle",
|
|
554
861
|
expected: "(string | undefined)",
|
|
555
862
|
value: input.subtitle
|
|
863
|
+
}, errorFactory)) && (undefined === input.subtitleTracks || ("object" === typeof input.subtitleTracks && null !== input.subtitleTracks && false === Array.isArray(input.subtitleTracks) || $guard(_exceptionable, {
|
|
864
|
+
path: _path + ".subtitleTracks",
|
|
865
|
+
expected: "(__type.o2 | undefined)",
|
|
866
|
+
value: input.subtitleTracks
|
|
867
|
+
}, errorFactory)) && $ao4(input.subtitleTracks, _path + ".subtitleTracks", true && _exceptionable) || $guard(_exceptionable, {
|
|
868
|
+
path: _path + ".subtitleTracks",
|
|
869
|
+
expected: "(__type.o2 | undefined)",
|
|
870
|
+
value: input.subtitleTracks
|
|
556
871
|
}, errorFactory)) && (undefined === input.video || ("object" === typeof input.video && null !== input.video && false === Array.isArray(input.video) || $guard(_exceptionable, {
|
|
557
872
|
path: _path + ".video",
|
|
558
|
-
expected: "(__type.
|
|
873
|
+
expected: "(__type.o4 | undefined)",
|
|
559
874
|
value: input.video
|
|
560
|
-
}, errorFactory)) && $
|
|
875
|
+
}, errorFactory)) && $ao7(input.video, _path + ".video", true && _exceptionable) || $guard(_exceptionable, {
|
|
561
876
|
path: _path + ".video",
|
|
562
|
-
expected: "(__type.
|
|
877
|
+
expected: "(__type.o4 | undefined)",
|
|
563
878
|
value: input.video
|
|
564
879
|
}, errorFactory)) && (undefined === input.start || "number" === typeof input.start || $guard(_exceptionable, {
|
|
565
880
|
path: _path + ".start",
|
|
@@ -571,11 +886,11 @@ export const assertGuardRenderQuery = (input, errorFactory) => {
|
|
|
571
886
|
value: input.end
|
|
572
887
|
}, errorFactory)) && (undefined === input.transcribe || ("object" === typeof input.transcribe && null !== input.transcribe && false === Array.isArray(input.transcribe) || $guard(_exceptionable, {
|
|
573
888
|
path: _path + ".transcribe",
|
|
574
|
-
expected: "(__type.
|
|
889
|
+
expected: "(__type.o6 | undefined)",
|
|
575
890
|
value: input.transcribe
|
|
576
|
-
}, errorFactory)) && $
|
|
891
|
+
}, errorFactory)) && $ao9(input.transcribe, _path + ".transcribe", true && _exceptionable) || $guard(_exceptionable, {
|
|
577
892
|
path: _path + ".transcribe",
|
|
578
|
-
expected: "(__type.
|
|
893
|
+
expected: "(__type.o6 | undefined)",
|
|
579
894
|
value: input.transcribe
|
|
580
895
|
}, errorFactory));
|
|
581
896
|
const $ao3 = (input, _path, _exceptionable = true) => (undefined === input.type || "string" === typeof input.type || $guard(_exceptionable, {
|
|
@@ -587,16 +902,136 @@ export const assertGuardRenderQuery = (input, errorFactory) => {
|
|
|
587
902
|
expected: "(null | string | undefined)",
|
|
588
903
|
value: input.file
|
|
589
904
|
}, errorFactory));
|
|
590
|
-
const $ao4 = (input, _path, _exceptionable = true) =>
|
|
905
|
+
const $ao4 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
|
|
906
|
+
const value = input[key];
|
|
907
|
+
if (undefined === value)
|
|
908
|
+
return true;
|
|
909
|
+
return ("object" === typeof value && null !== value && false === Array.isArray(value) || $guard(_exceptionable, {
|
|
910
|
+
path: _path + $join(key),
|
|
911
|
+
expected: "__type.o3",
|
|
912
|
+
value: value
|
|
913
|
+
}, errorFactory)) && $ao5(value, _path + $join(key), true && _exceptionable) || $guard(_exceptionable, {
|
|
914
|
+
path: _path + $join(key),
|
|
915
|
+
expected: "__type.o3",
|
|
916
|
+
value: value
|
|
917
|
+
}, errorFactory);
|
|
918
|
+
});
|
|
919
|
+
const $ao5 = (input, _path, _exceptionable = true) => (null === input.style || undefined === input.style || "string" === typeof input.style || $guard(_exceptionable, {
|
|
920
|
+
path: _path + ".style",
|
|
921
|
+
expected: "(null | string | undefined)",
|
|
922
|
+
value: input.style
|
|
923
|
+
}, errorFactory)) && (undefined === input.styleOverrides || ("object" === typeof input.styleOverrides && null !== input.styleOverrides && false === Array.isArray(input.styleOverrides) || $guard(_exceptionable, {
|
|
924
|
+
path: _path + ".styleOverrides",
|
|
925
|
+
expected: "(Omit<SubtitleStyleDomainRecord, \"scaledBorderAndShadow\" | \"futureWordWrapping\"> | undefined)",
|
|
926
|
+
value: input.styleOverrides
|
|
927
|
+
}, errorFactory)) && $ao6(input.styleOverrides, _path + ".styleOverrides", true && _exceptionable) || $guard(_exceptionable, {
|
|
928
|
+
path: _path + ".styleOverrides",
|
|
929
|
+
expected: "(Omit<SubtitleStyleDomainRecord, \"scaledBorderAndShadow\" | \"futureWordWrapping\"> | undefined)",
|
|
930
|
+
value: input.styleOverrides
|
|
931
|
+
}, errorFactory));
|
|
932
|
+
const $ao6 = (input, _path, _exceptionable = true) => (undefined === input.name || "string" === typeof input.name || $guard(_exceptionable, {
|
|
933
|
+
path: _path + ".name",
|
|
934
|
+
expected: "(string | undefined)",
|
|
935
|
+
value: input.name
|
|
936
|
+
}, errorFactory)) && (undefined === input.fontname || "string" === typeof input.fontname || $guard(_exceptionable, {
|
|
937
|
+
path: _path + ".fontname",
|
|
938
|
+
expected: "(string | undefined)",
|
|
939
|
+
value: input.fontname
|
|
940
|
+
}, errorFactory)) && (undefined === input.fontsize || "string" === typeof input.fontsize || $guard(_exceptionable, {
|
|
941
|
+
path: _path + ".fontsize",
|
|
942
|
+
expected: "(string | undefined)",
|
|
943
|
+
value: input.fontsize
|
|
944
|
+
}, errorFactory)) && (undefined === input.primaryColour || "string" === typeof input.primaryColour || $guard(_exceptionable, {
|
|
945
|
+
path: _path + ".primaryColour",
|
|
946
|
+
expected: "(string | undefined)",
|
|
947
|
+
value: input.primaryColour
|
|
948
|
+
}, errorFactory)) && (undefined === input.secondaryColour || "string" === typeof input.secondaryColour || $guard(_exceptionable, {
|
|
949
|
+
path: _path + ".secondaryColour",
|
|
950
|
+
expected: "(string | undefined)",
|
|
951
|
+
value: input.secondaryColour
|
|
952
|
+
}, errorFactory)) && (undefined === input.outlineColour || "string" === typeof input.outlineColour || $guard(_exceptionable, {
|
|
953
|
+
path: _path + ".outlineColour",
|
|
954
|
+
expected: "(string | undefined)",
|
|
955
|
+
value: input.outlineColour
|
|
956
|
+
}, errorFactory)) && (undefined === input.backColour || "string" === typeof input.backColour || $guard(_exceptionable, {
|
|
957
|
+
path: _path + ".backColour",
|
|
958
|
+
expected: "(string | undefined)",
|
|
959
|
+
value: input.backColour
|
|
960
|
+
}, errorFactory)) && (undefined === input.bold || "string" === typeof input.bold || $guard(_exceptionable, {
|
|
961
|
+
path: _path + ".bold",
|
|
962
|
+
expected: "(string | undefined)",
|
|
963
|
+
value: input.bold
|
|
964
|
+
}, errorFactory)) && (undefined === input.italic || "string" === typeof input.italic || $guard(_exceptionable, {
|
|
965
|
+
path: _path + ".italic",
|
|
966
|
+
expected: "(string | undefined)",
|
|
967
|
+
value: input.italic
|
|
968
|
+
}, errorFactory)) && (undefined === input.underline || "string" === typeof input.underline || $guard(_exceptionable, {
|
|
969
|
+
path: _path + ".underline",
|
|
970
|
+
expected: "(string | undefined)",
|
|
971
|
+
value: input.underline
|
|
972
|
+
}, errorFactory)) && (undefined === input.strikeOut || "string" === typeof input.strikeOut || $guard(_exceptionable, {
|
|
973
|
+
path: _path + ".strikeOut",
|
|
974
|
+
expected: "(string | undefined)",
|
|
975
|
+
value: input.strikeOut
|
|
976
|
+
}, errorFactory)) && (undefined === input.scaleX || "string" === typeof input.scaleX || $guard(_exceptionable, {
|
|
977
|
+
path: _path + ".scaleX",
|
|
978
|
+
expected: "(string | undefined)",
|
|
979
|
+
value: input.scaleX
|
|
980
|
+
}, errorFactory)) && (undefined === input.scaleY || "string" === typeof input.scaleY || $guard(_exceptionable, {
|
|
981
|
+
path: _path + ".scaleY",
|
|
982
|
+
expected: "(string | undefined)",
|
|
983
|
+
value: input.scaleY
|
|
984
|
+
}, errorFactory)) && (undefined === input.spacing || "string" === typeof input.spacing || $guard(_exceptionable, {
|
|
985
|
+
path: _path + ".spacing",
|
|
986
|
+
expected: "(string | undefined)",
|
|
987
|
+
value: input.spacing
|
|
988
|
+
}, errorFactory)) && (undefined === input.angle || "string" === typeof input.angle || $guard(_exceptionable, {
|
|
989
|
+
path: _path + ".angle",
|
|
990
|
+
expected: "(string | undefined)",
|
|
991
|
+
value: input.angle
|
|
992
|
+
}, errorFactory)) && (undefined === input.borderStyle || "string" === typeof input.borderStyle || $guard(_exceptionable, {
|
|
993
|
+
path: _path + ".borderStyle",
|
|
994
|
+
expected: "(string | undefined)",
|
|
995
|
+
value: input.borderStyle
|
|
996
|
+
}, errorFactory)) && (undefined === input.outline || "string" === typeof input.outline || $guard(_exceptionable, {
|
|
997
|
+
path: _path + ".outline",
|
|
998
|
+
expected: "(string | undefined)",
|
|
999
|
+
value: input.outline
|
|
1000
|
+
}, errorFactory)) && (undefined === input.shadow || "string" === typeof input.shadow || $guard(_exceptionable, {
|
|
1001
|
+
path: _path + ".shadow",
|
|
1002
|
+
expected: "(string | undefined)",
|
|
1003
|
+
value: input.shadow
|
|
1004
|
+
}, errorFactory)) && (undefined === input.alignment || "string" === typeof input.alignment || $guard(_exceptionable, {
|
|
1005
|
+
path: _path + ".alignment",
|
|
1006
|
+
expected: "(string | undefined)",
|
|
1007
|
+
value: input.alignment
|
|
1008
|
+
}, errorFactory)) && (undefined === input.marginL || "string" === typeof input.marginL || $guard(_exceptionable, {
|
|
1009
|
+
path: _path + ".marginL",
|
|
1010
|
+
expected: "(string | undefined)",
|
|
1011
|
+
value: input.marginL
|
|
1012
|
+
}, errorFactory)) && (undefined === input.marginR || "string" === typeof input.marginR || $guard(_exceptionable, {
|
|
1013
|
+
path: _path + ".marginR",
|
|
1014
|
+
expected: "(string | undefined)",
|
|
1015
|
+
value: input.marginR
|
|
1016
|
+
}, errorFactory)) && (undefined === input.marginV || "string" === typeof input.marginV || $guard(_exceptionable, {
|
|
1017
|
+
path: _path + ".marginV",
|
|
1018
|
+
expected: "(string | undefined)",
|
|
1019
|
+
value: input.marginV
|
|
1020
|
+
}, errorFactory)) && (undefined === input.encoding || "string" === typeof input.encoding || $guard(_exceptionable, {
|
|
1021
|
+
path: _path + ".encoding",
|
|
1022
|
+
expected: "(string | undefined)",
|
|
1023
|
+
value: input.encoding
|
|
1024
|
+
}, errorFactory));
|
|
1025
|
+
const $ao7 = (input, _path, _exceptionable = true) => undefined === input.crop || ("object" === typeof input.crop && null !== input.crop && false === Array.isArray(input.crop) || $guard(_exceptionable, {
|
|
591
1026
|
path: _path + ".crop",
|
|
592
|
-
expected: "(__type.
|
|
1027
|
+
expected: "(__type.o5 | undefined)",
|
|
593
1028
|
value: input.crop
|
|
594
|
-
}, errorFactory)) && $
|
|
1029
|
+
}, errorFactory)) && $ao8(input.crop, _path + ".crop", true && _exceptionable) || $guard(_exceptionable, {
|
|
595
1030
|
path: _path + ".crop",
|
|
596
|
-
expected: "(__type.
|
|
1031
|
+
expected: "(__type.o5 | undefined)",
|
|
597
1032
|
value: input.crop
|
|
598
1033
|
}, errorFactory);
|
|
599
|
-
const $
|
|
1034
|
+
const $ao8 = (input, _path, _exceptionable = true) => (undefined === input.x || "number" === typeof input.x || $guard(_exceptionable, {
|
|
600
1035
|
path: _path + ".x",
|
|
601
1036
|
expected: "(number | undefined)",
|
|
602
1037
|
value: input.x
|
|
@@ -613,7 +1048,7 @@ export const assertGuardRenderQuery = (input, errorFactory) => {
|
|
|
613
1048
|
expected: "(number | undefined)",
|
|
614
1049
|
value: input.height
|
|
615
1050
|
}, errorFactory));
|
|
616
|
-
const $
|
|
1051
|
+
const $ao9 = (input, _path, _exceptionable = true) => (undefined === input.language || "string" === typeof input.language || $guard(_exceptionable, {
|
|
617
1052
|
path: _path + ".language",
|
|
618
1053
|
expected: "(string | undefined)",
|
|
619
1054
|
value: input.language
|
|
@@ -630,33 +1065,33 @@ export const assertGuardRenderQuery = (input, errorFactory) => {
|
|
|
630
1065
|
expected: "(Array<number> | undefined)",
|
|
631
1066
|
value: input.pan
|
|
632
1067
|
}, errorFactory));
|
|
633
|
-
const $
|
|
1068
|
+
const $ao10 = (input, _path, _exceptionable = true) => ("string" === typeof input.format || $guard(_exceptionable, {
|
|
634
1069
|
path: _path + ".format",
|
|
635
1070
|
expected: "string",
|
|
636
1071
|
value: input.format
|
|
637
1072
|
}, errorFactory)) && (undefined === input.transcribe || ("object" === typeof input.transcribe && null !== input.transcribe || $guard(_exceptionable, {
|
|
638
1073
|
path: _path + ".transcribe",
|
|
639
|
-
expected: "(__type.
|
|
1074
|
+
expected: "(__type.o7 | undefined)",
|
|
640
1075
|
value: input.transcribe
|
|
641
|
-
}, errorFactory)) && $
|
|
1076
|
+
}, errorFactory)) && $ao11(input.transcribe, _path + ".transcribe", true && _exceptionable) || $guard(_exceptionable, {
|
|
642
1077
|
path: _path + ".transcribe",
|
|
643
|
-
expected: "(__type.
|
|
1078
|
+
expected: "(__type.o7 | undefined)",
|
|
644
1079
|
value: input.transcribe
|
|
645
1080
|
}, errorFactory)) && (undefined === input.translate || ("object" === typeof input.translate && null !== input.translate || $guard(_exceptionable, {
|
|
646
1081
|
path: _path + ".translate",
|
|
647
|
-
expected: "(__type.
|
|
1082
|
+
expected: "(__type.o8 | undefined)",
|
|
648
1083
|
value: input.translate
|
|
649
|
-
}, errorFactory)) && $
|
|
1084
|
+
}, errorFactory)) && $ao12(input.translate, _path + ".translate", true && _exceptionable) || $guard(_exceptionable, {
|
|
650
1085
|
path: _path + ".translate",
|
|
651
|
-
expected: "(__type.
|
|
1086
|
+
expected: "(__type.o8 | undefined)",
|
|
652
1087
|
value: input.translate
|
|
653
1088
|
}, errorFactory)) && (undefined === input.audio || ("object" === typeof input.audio && null !== input.audio && false === Array.isArray(input.audio) || $guard(_exceptionable, {
|
|
654
1089
|
path: _path + ".audio",
|
|
655
|
-
expected: "(__type.
|
|
1090
|
+
expected: "(__type.o9 | undefined)",
|
|
656
1091
|
value: input.audio
|
|
657
|
-
}, errorFactory)) && $
|
|
1092
|
+
}, errorFactory)) && $ao13(input.audio, _path + ".audio", true && _exceptionable) || $guard(_exceptionable, {
|
|
658
1093
|
path: _path + ".audio",
|
|
659
|
-
expected: "(__type.
|
|
1094
|
+
expected: "(__type.o9 | undefined)",
|
|
660
1095
|
value: input.audio
|
|
661
1096
|
}, errorFactory)) && true && (undefined === input.pick || (Array.isArray(input.pick) || $guard(_exceptionable, {
|
|
662
1097
|
path: _path + ".pick",
|
|
@@ -670,22 +1105,43 @@ export const assertGuardRenderQuery = (input, errorFactory) => {
|
|
|
670
1105
|
path: _path + ".pick",
|
|
671
1106
|
expected: "(Array<string> | undefined)",
|
|
672
1107
|
value: input.pick
|
|
673
|
-
}, errorFactory))
|
|
674
|
-
|
|
1108
|
+
}, errorFactory)) && ((null !== input.subtitle || $guard(_exceptionable, {
|
|
1109
|
+
path: _path + ".subtitle",
|
|
1110
|
+
expected: "(SubtitleProfile | string | undefined)",
|
|
1111
|
+
value: input.subtitle
|
|
1112
|
+
}, errorFactory)) && (undefined === input.subtitle || "string" === typeof input.subtitle || ("object" === typeof input.subtitle && null !== input.subtitle && false === Array.isArray(input.subtitle) || $guard(_exceptionable, {
|
|
1113
|
+
path: _path + ".subtitle",
|
|
1114
|
+
expected: "(SubtitleProfile | string | undefined)",
|
|
1115
|
+
value: input.subtitle
|
|
1116
|
+
}, errorFactory)) && $ao14(input.subtitle, _path + ".subtitle", true && _exceptionable) || $guard(_exceptionable, {
|
|
1117
|
+
path: _path + ".subtitle",
|
|
1118
|
+
expected: "(SubtitleProfile | string | undefined)",
|
|
1119
|
+
value: input.subtitle
|
|
1120
|
+
}, errorFactory)));
|
|
1121
|
+
const $ao11 = (input, _path, _exceptionable = true) => "string" === typeof input.engine || $guard(_exceptionable, {
|
|
675
1122
|
path: _path + ".engine",
|
|
676
1123
|
expected: "string",
|
|
677
1124
|
value: input.engine
|
|
678
1125
|
}, errorFactory);
|
|
679
|
-
const $
|
|
1126
|
+
const $ao12 = (input, _path, _exceptionable = true) => "string" === typeof input.language || $guard(_exceptionable, {
|
|
680
1127
|
path: _path + ".language",
|
|
681
1128
|
expected: "string",
|
|
682
1129
|
value: input.language
|
|
683
1130
|
}, errorFactory);
|
|
684
|
-
const $
|
|
1131
|
+
const $ao13 = (input, _path, _exceptionable = true) => undefined === input.pan || "string" === typeof input.pan || $guard(_exceptionable, {
|
|
685
1132
|
path: _path + ".pan",
|
|
686
1133
|
expected: "(string | undefined)",
|
|
687
1134
|
value: input.pan
|
|
688
1135
|
}, errorFactory);
|
|
1136
|
+
const $ao14 = (input, _path, _exceptionable = true) => (undefined === input.lang || "string" === typeof input.lang || $guard(_exceptionable, {
|
|
1137
|
+
path: _path + ".lang",
|
|
1138
|
+
expected: "(string | undefined)",
|
|
1139
|
+
value: input.lang
|
|
1140
|
+
}, errorFactory)) && (undefined === input.style || "string" === typeof input.style || $guard(_exceptionable, {
|
|
1141
|
+
path: _path + ".style",
|
|
1142
|
+
expected: "(string | undefined)",
|
|
1143
|
+
value: input.style
|
|
1144
|
+
}, errorFactory));
|
|
689
1145
|
return ("object" === typeof input && null !== input || $guard(true, {
|
|
690
1146
|
path: _path + "",
|
|
691
1147
|
expected: "RenderQuery",
|
|
@@ -698,16 +1154,25 @@ export const assertGuardRenderQuery = (input, errorFactory) => {
|
|
|
698
1154
|
})(input, "$input", true);
|
|
699
1155
|
};
|
|
700
1156
|
export const stringifyRenderQuery = input => {
|
|
701
|
-
const $io1 = input => null !== input.scene && (undefined === input.scene || "string" === typeof input.scene || (Array.isArray(input.scene) && input.scene.every(elem => null !== elem && undefined !== elem && ("string" === typeof elem || "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io2(elem))) || "object" === typeof input.scene && null !== input.scene && false === Array.isArray(input.scene) && $io2(input.scene))) && (null !== input.profile && (undefined === input.profile || "string" === typeof input.profile || (Array.isArray(input.profile) && input.profile.every(elem => null !== elem && undefined !== elem && ("string" === typeof elem || "object" === typeof elem && null !== elem && $
|
|
702
|
-
const $io2 = input => (undefined === input.id || "string" === typeof input.id) && (undefined === input.preset || "string" === typeof input.preset) && (undefined === input.input || "object" === typeof input.input && null !== input.input && false === Array.isArray(input.input) && $io3(input.input)) && (undefined === input.lang || "string" === typeof input.lang) && (undefined === input.subtitle || "string" === typeof input.subtitle) && (undefined === input.video || "object" === typeof input.video && null !== input.video && false === Array.isArray(input.video) && $
|
|
1157
|
+
const $io1 = input => null !== input.scene && (undefined === input.scene || "string" === typeof input.scene || (Array.isArray(input.scene) && input.scene.every(elem => null !== elem && undefined !== elem && ("string" === typeof elem || "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io2(elem))) || "object" === typeof input.scene && null !== input.scene && false === Array.isArray(input.scene) && $io2(input.scene))) && (null !== input.profile && (undefined === input.profile || "string" === typeof input.profile || (Array.isArray(input.profile) && input.profile.every(elem => null !== elem && undefined !== elem && ("string" === typeof elem || "object" === typeof elem && null !== elem && $io10(elem))) || "object" === typeof input.profile && null !== input.profile && $io10(input.profile))));
|
|
1158
|
+
const $io2 = input => (undefined === input.id || "string" === typeof input.id) && (undefined === input.preset || "string" === typeof input.preset) && (undefined === input.input || "object" === typeof input.input && null !== input.input && false === Array.isArray(input.input) && $io3(input.input)) && (undefined === input.lang || "string" === typeof input.lang) && (undefined === input.subtitle || "string" === typeof input.subtitle) && (undefined === input.subtitleTracks || "object" === typeof input.subtitleTracks && null !== input.subtitleTracks && false === Array.isArray(input.subtitleTracks) && $io4(input.subtitleTracks)) && (undefined === input.video || "object" === typeof input.video && null !== input.video && false === Array.isArray(input.video) && $io7(input.video)) && (undefined === input.start || "number" === typeof input.start) && (undefined === input.end || "number" === typeof input.end) && (undefined === input.transcribe || "object" === typeof input.transcribe && null !== input.transcribe && false === Array.isArray(input.transcribe) && $io9(input.transcribe));
|
|
703
1159
|
const $io3 = input => (undefined === input.type || "string" === typeof input.type) && (null === input.file || undefined === input.file || "string" === typeof input.file);
|
|
704
|
-
const $io4 = input =>
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
const $
|
|
1160
|
+
const $io4 = input => Object.keys(input).every(key => {
|
|
1161
|
+
const value = input[key];
|
|
1162
|
+
if (undefined === value)
|
|
1163
|
+
return true;
|
|
1164
|
+
return "object" === typeof value && null !== value && false === Array.isArray(value) && $io5(value);
|
|
1165
|
+
});
|
|
1166
|
+
const $io5 = input => (null === input.style || undefined === input.style || "string" === typeof input.style) && (undefined === input.styleOverrides || "object" === typeof input.styleOverrides && null !== input.styleOverrides && false === Array.isArray(input.styleOverrides) && $io6(input.styleOverrides));
|
|
1167
|
+
const $io6 = input => (undefined === input.name || "string" === typeof input.name) && (undefined === input.fontname || "string" === typeof input.fontname) && (undefined === input.fontsize || "string" === typeof input.fontsize) && (undefined === input.primaryColour || "string" === typeof input.primaryColour) && (undefined === input.secondaryColour || "string" === typeof input.secondaryColour) && (undefined === input.outlineColour || "string" === typeof input.outlineColour) && (undefined === input.backColour || "string" === typeof input.backColour) && (undefined === input.bold || "string" === typeof input.bold) && (undefined === input.italic || "string" === typeof input.italic) && (undefined === input.underline || "string" === typeof input.underline) && (undefined === input.strikeOut || "string" === typeof input.strikeOut) && (undefined === input.scaleX || "string" === typeof input.scaleX) && (undefined === input.scaleY || "string" === typeof input.scaleY) && (undefined === input.spacing || "string" === typeof input.spacing) && (undefined === input.angle || "string" === typeof input.angle) && (undefined === input.borderStyle || "string" === typeof input.borderStyle) && (undefined === input.outline || "string" === typeof input.outline) && (undefined === input.shadow || "string" === typeof input.shadow) && (undefined === input.alignment || "string" === typeof input.alignment) && (undefined === input.marginL || "string" === typeof input.marginL) && (undefined === input.marginR || "string" === typeof input.marginR) && (undefined === input.marginV || "string" === typeof input.marginV) && (undefined === input.encoding || "string" === typeof input.encoding);
|
|
1168
|
+
const $io7 = input => undefined === input.crop || "object" === typeof input.crop && null !== input.crop && false === Array.isArray(input.crop) && $io8(input.crop);
|
|
1169
|
+
const $io8 = input => (undefined === input.x || "number" === typeof input.x) && (undefined === input.y || "number" === typeof input.y) && (undefined === input.width || "number" === typeof input.width) && (undefined === input.height || "number" === typeof input.height);
|
|
1170
|
+
const $io9 = input => (undefined === input.language || "string" === typeof input.language) && (undefined === input.pan || Array.isArray(input.pan) && input.pan.every(elem => "number" === typeof elem));
|
|
1171
|
+
const $io10 = input => "string" === typeof input.format && (undefined === input.transcribe || "object" === typeof input.transcribe && null !== input.transcribe && $io11(input.transcribe)) && (undefined === input.translate || "object" === typeof input.translate && null !== input.translate && $io12(input.translate)) && (undefined === input.audio || "object" === typeof input.audio && null !== input.audio && false === Array.isArray(input.audio) && $io13(input.audio)) && true && (undefined === input.pick || Array.isArray(input.pick) && input.pick.every(elem => "string" === typeof elem)) && (null !== input.subtitle && (undefined === input.subtitle || "string" === typeof input.subtitle || "object" === typeof input.subtitle && null !== input.subtitle && false === Array.isArray(input.subtitle) && $io14(input.subtitle)));
|
|
1172
|
+
const $io11 = input => "string" === typeof input.engine;
|
|
1173
|
+
const $io12 = input => "string" === typeof input.language;
|
|
1174
|
+
const $io13 = input => undefined === input.pan || "string" === typeof input.pan;
|
|
1175
|
+
const $io14 = input => (undefined === input.lang || "string" === typeof input.lang) && (undefined === input.style || "string" === typeof input.style);
|
|
711
1176
|
const $string = __typia.json.createStringify.string;
|
|
712
1177
|
const $throws = __typia.json.createStringify.throws;
|
|
713
1178
|
const $tail = __typia.json.createStringify.tail;
|
|
@@ -740,46 +1205,70 @@ export const stringifyRenderQuery = input => {
|
|
|
740
1205
|
if ("string" === typeof elem)
|
|
741
1206
|
return $string(elem);
|
|
742
1207
|
if ("object" === typeof elem && null !== elem)
|
|
743
|
-
return $
|
|
1208
|
+
return $so10(elem);
|
|
744
1209
|
$throws({
|
|
745
1210
|
expected: "(RenderProfileObject | string)",
|
|
746
1211
|
value: elem
|
|
747
1212
|
});
|
|
748
1213
|
})()).join(",")}]`;
|
|
749
1214
|
if ("object" === typeof input.profile && null !== input.profile)
|
|
750
|
-
return $
|
|
1215
|
+
return $so10(input.profile);
|
|
751
1216
|
$throws({
|
|
752
1217
|
expected: "(Array<string | RenderProfileObject> | RenderProfileObject | string | undefined)",
|
|
753
1218
|
value: input.profile
|
|
754
1219
|
});
|
|
755
1220
|
})() : undefined}`}`)}}`;
|
|
756
|
-
const $so2 = input => `{${$tail(`${undefined === input.id ? "" : `"id":${undefined !== input.id ? $string(input.id) : undefined},`}${undefined === input.preset ? "" : `"preset":${undefined !== input.preset ? $string(input.preset) : undefined},`}${undefined === input.input ? "" : `"input":${undefined !== input.input ? $so3(input.input) : undefined},`}${undefined === input.lang ? "" : `"lang":${undefined !== input.lang ? $string(input.lang) : undefined},`}${undefined === input.subtitle ? "" : `"subtitle":${undefined !== input.subtitle ? $string(input.subtitle) : undefined},`}${undefined === input.video ? "" : `"video":${undefined !== input.video ? $
|
|
1221
|
+
const $so2 = input => `{${$tail(`${undefined === input.id ? "" : `"id":${undefined !== input.id ? $string(input.id) : undefined},`}${undefined === input.preset ? "" : `"preset":${undefined !== input.preset ? $string(input.preset) : undefined},`}${undefined === input.input ? "" : `"input":${undefined !== input.input ? $so3(input.input) : undefined},`}${undefined === input.lang ? "" : `"lang":${undefined !== input.lang ? $string(input.lang) : undefined},`}${undefined === input.subtitle ? "" : `"subtitle":${undefined !== input.subtitle ? $string(input.subtitle) : undefined},`}${undefined === input.subtitleTracks ? "" : `"subtitleTracks":${undefined !== input.subtitleTracks ? $so4(input.subtitleTracks) : undefined},`}${undefined === input.video ? "" : `"video":${undefined !== input.video ? $so7(input.video) : undefined},`}${undefined === input.start ? "" : `"start":${undefined !== input.start ? input.start : undefined},`}${undefined === input.end ? "" : `"end":${undefined !== input.end ? input.end : undefined},`}${undefined === input.transcribe ? "" : `"transcribe":${undefined !== input.transcribe ? $so9(input.transcribe) : undefined}`}`)}}`;
|
|
757
1222
|
const $so3 = input => `{${$tail(`${undefined === input.type ? "" : `"type":${undefined !== input.type ? $string(input.type) : undefined},`}${undefined === input.file ? "" : `"file":${undefined !== input.file ? null !== input.file ? $string(input.file) : "null" : undefined}`}`)}}`;
|
|
758
|
-
const $so4 = input => `{${
|
|
759
|
-
|
|
760
|
-
const $
|
|
761
|
-
const $
|
|
762
|
-
const $
|
|
1223
|
+
const $so4 = input => `{${Object.entries(input).map(([key, value]) => { if (undefined === value)
|
|
1224
|
+
return ""; return `${JSON.stringify(key)}:${$so5(value)}`; }).filter(str => "" !== str).join(",")}}`;
|
|
1225
|
+
const $so5 = input => `{${$tail(`${undefined === input.style ? "" : `"style":${undefined !== input.style ? null !== input.style ? $string(input.style) : "null" : undefined},`}${undefined === input.styleOverrides ? "" : `"styleOverrides":${undefined !== input.styleOverrides ? $so6(input.styleOverrides) : undefined}`}`)}}`;
|
|
1226
|
+
const $so6 = input => `{${$tail(`${undefined === input.name ? "" : `"name":${undefined !== input.name ? $string(input.name) : undefined},`}${undefined === input.fontname ? "" : `"fontname":${undefined !== input.fontname ? $string(input.fontname) : undefined},`}${undefined === input.fontsize ? "" : `"fontsize":${undefined !== input.fontsize ? $string(input.fontsize) : undefined},`}${undefined === input.primaryColour ? "" : `"primaryColour":${undefined !== input.primaryColour ? $string(input.primaryColour) : undefined},`}${undefined === input.secondaryColour ? "" : `"secondaryColour":${undefined !== input.secondaryColour ? $string(input.secondaryColour) : undefined},`}${undefined === input.outlineColour ? "" : `"outlineColour":${undefined !== input.outlineColour ? $string(input.outlineColour) : undefined},`}${undefined === input.backColour ? "" : `"backColour":${undefined !== input.backColour ? $string(input.backColour) : undefined},`}${undefined === input.bold ? "" : `"bold":${undefined !== input.bold ? $string(input.bold) : undefined},`}${undefined === input.italic ? "" : `"italic":${undefined !== input.italic ? $string(input.italic) : undefined},`}${undefined === input.underline ? "" : `"underline":${undefined !== input.underline ? $string(input.underline) : undefined},`}${undefined === input.strikeOut ? "" : `"strikeOut":${undefined !== input.strikeOut ? $string(input.strikeOut) : undefined},`}${undefined === input.scaleX ? "" : `"scaleX":${undefined !== input.scaleX ? $string(input.scaleX) : undefined},`}${undefined === input.scaleY ? "" : `"scaleY":${undefined !== input.scaleY ? $string(input.scaleY) : undefined},`}${undefined === input.spacing ? "" : `"spacing":${undefined !== input.spacing ? $string(input.spacing) : undefined},`}${undefined === input.angle ? "" : `"angle":${undefined !== input.angle ? $string(input.angle) : undefined},`}${undefined === input.borderStyle ? "" : `"borderStyle":${undefined !== input.borderStyle ? $string(input.borderStyle) : undefined},`}${undefined === input.outline ? "" : `"outline":${undefined !== input.outline ? $string(input.outline) : undefined},`}${undefined === input.shadow ? "" : `"shadow":${undefined !== input.shadow ? $string(input.shadow) : undefined},`}${undefined === input.alignment ? "" : `"alignment":${undefined !== input.alignment ? $string(input.alignment) : undefined},`}${undefined === input.marginL ? "" : `"marginL":${undefined !== input.marginL ? $string(input.marginL) : undefined},`}${undefined === input.marginR ? "" : `"marginR":${undefined !== input.marginR ? $string(input.marginR) : undefined},`}${undefined === input.marginV ? "" : `"marginV":${undefined !== input.marginV ? $string(input.marginV) : undefined},`}${undefined === input.encoding ? "" : `"encoding":${undefined !== input.encoding ? $string(input.encoding) : undefined}`}`)}}`;
|
|
1227
|
+
const $so7 = input => `{${$tail(`${undefined === input.crop ? "" : `"crop":${undefined !== input.crop ? $so8(input.crop) : undefined}`}`)}}`;
|
|
1228
|
+
const $so8 = input => `{${$tail(`${undefined === input.x ? "" : `"x":${undefined !== input.x ? input.x : undefined},`}${undefined === input.y ? "" : `"y":${undefined !== input.y ? input.y : undefined},`}${undefined === input.width ? "" : `"width":${undefined !== input.width ? input.width : undefined},`}${undefined === input.height ? "" : `"height":${undefined !== input.height ? input.height : undefined}`}`)}}`;
|
|
1229
|
+
const $so9 = input => `{${$tail(`${undefined === input.language ? "" : `"language":${undefined !== input.language ? $string(input.language) : undefined},`}${undefined === input.pan ? "" : `"pan":${undefined !== input.pan ? `[${input.pan.map(elem => elem).join(",")}]` : undefined}`}`)}}`;
|
|
1230
|
+
const $so10 = input => `{${undefined === input.transcribe ? "" : `"transcribe":${undefined !== input.transcribe ? `{"engine":${$string(input.transcribe.engine)}}` : undefined},`}${undefined === input.translate ? "" : `"translate":${undefined !== input.translate ? `{"language":${$string(input.translate.language)}}` : undefined},`}${undefined === input.audio ? "" : `"audio":${undefined !== input.audio ? $so13(input.audio) : undefined},`}${undefined === input.video || "function" === typeof input.video ? "" : `"video":${undefined !== input.video ? JSON.stringify(input.video) : undefined},`}${undefined === input.pick ? "" : `"pick":${undefined !== input.pick ? `[${input.pick.map(elem => $string(elem)).join(",")}]` : undefined},`}${undefined === input.subtitle ? "" : `"subtitle":${undefined !== input.subtitle ? (() => {
|
|
1231
|
+
if ("string" === typeof input.subtitle)
|
|
1232
|
+
return $string(input.subtitle);
|
|
1233
|
+
if ("object" === typeof input.subtitle && null !== input.subtitle && false === Array.isArray(input.subtitle))
|
|
1234
|
+
return $so14(input.subtitle);
|
|
1235
|
+
$throws({
|
|
1236
|
+
expected: "(SubtitleProfile | string | undefined)",
|
|
1237
|
+
value: input.subtitle
|
|
1238
|
+
});
|
|
1239
|
+
})() : undefined},`}"format":${$string(input.format)}}`;
|
|
1240
|
+
const $so13 = input => `{${$tail(`${undefined === input.pan ? "" : `"pan":${undefined !== input.pan ? $string(input.pan) : undefined}`}`)}}`;
|
|
1241
|
+
const $so14 = input => `{${$tail(`${undefined === input.lang ? "" : `"lang":${undefined !== input.lang ? $string(input.lang) : undefined},`}${undefined === input.style ? "" : `"style":${undefined !== input.style ? $string(input.style) : undefined}`}`)}}`;
|
|
763
1242
|
return $so0(input);
|
|
764
1243
|
};
|
|
765
1244
|
export const assertStringifyRenderQuery = (input, errorFactory) => { const assert = (input, errorFactory) => {
|
|
766
1245
|
const __is = input => {
|
|
767
1246
|
const $io0 = input => "string" === typeof input.type && "string" === typeof input.title && (undefined === input.parent || "string" === typeof input.parent) && (undefined === input.description || "object" === typeof input.description && null !== input.description && false === Array.isArray(input.description) && $io1(input.description));
|
|
768
|
-
const $io1 = input => null !== input.scene && (undefined === input.scene || "string" === typeof input.scene || (Array.isArray(input.scene) && input.scene.every(elem => null !== elem && undefined !== elem && ("string" === typeof elem || "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io2(elem))) || "object" === typeof input.scene && null !== input.scene && false === Array.isArray(input.scene) && $io2(input.scene))) && (null !== input.profile && (undefined === input.profile || "string" === typeof input.profile || (Array.isArray(input.profile) && input.profile.every(elem => null !== elem && undefined !== elem && ("string" === typeof elem || "object" === typeof elem && null !== elem && $
|
|
769
|
-
const $io2 = input => (undefined === input.id || "string" === typeof input.id) && (undefined === input.preset || "string" === typeof input.preset) && (undefined === input.input || "object" === typeof input.input && null !== input.input && false === Array.isArray(input.input) && $io3(input.input)) && (undefined === input.lang || "string" === typeof input.lang) && (undefined === input.subtitle || "string" === typeof input.subtitle) && (undefined === input.video || "object" === typeof input.video && null !== input.video && false === Array.isArray(input.video) && $
|
|
1247
|
+
const $io1 = input => null !== input.scene && (undefined === input.scene || "string" === typeof input.scene || (Array.isArray(input.scene) && input.scene.every(elem => null !== elem && undefined !== elem && ("string" === typeof elem || "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io2(elem))) || "object" === typeof input.scene && null !== input.scene && false === Array.isArray(input.scene) && $io2(input.scene))) && (null !== input.profile && (undefined === input.profile || "string" === typeof input.profile || (Array.isArray(input.profile) && input.profile.every(elem => null !== elem && undefined !== elem && ("string" === typeof elem || "object" === typeof elem && null !== elem && $io10(elem))) || "object" === typeof input.profile && null !== input.profile && $io10(input.profile))));
|
|
1248
|
+
const $io2 = input => (undefined === input.id || "string" === typeof input.id) && (undefined === input.preset || "string" === typeof input.preset) && (undefined === input.input || "object" === typeof input.input && null !== input.input && false === Array.isArray(input.input) && $io3(input.input)) && (undefined === input.lang || "string" === typeof input.lang) && (undefined === input.subtitle || "string" === typeof input.subtitle) && (undefined === input.subtitleTracks || "object" === typeof input.subtitleTracks && null !== input.subtitleTracks && false === Array.isArray(input.subtitleTracks) && $io4(input.subtitleTracks)) && (undefined === input.video || "object" === typeof input.video && null !== input.video && false === Array.isArray(input.video) && $io7(input.video)) && (undefined === input.start || "number" === typeof input.start && !Number.isNaN(input.start)) && (undefined === input.end || "number" === typeof input.end && !Number.isNaN(input.end)) && (undefined === input.transcribe || "object" === typeof input.transcribe && null !== input.transcribe && false === Array.isArray(input.transcribe) && $io9(input.transcribe));
|
|
770
1249
|
const $io3 = input => (undefined === input.type || "string" === typeof input.type) && (null === input.file || undefined === input.file || "string" === typeof input.file);
|
|
771
|
-
const $io4 = input =>
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
const $
|
|
1250
|
+
const $io4 = input => Object.keys(input).every(key => {
|
|
1251
|
+
const value = input[key];
|
|
1252
|
+
if (undefined === value)
|
|
1253
|
+
return true;
|
|
1254
|
+
return "object" === typeof value && null !== value && false === Array.isArray(value) && $io5(value);
|
|
1255
|
+
});
|
|
1256
|
+
const $io5 = input => (null === input.style || undefined === input.style || "string" === typeof input.style) && (undefined === input.styleOverrides || "object" === typeof input.styleOverrides && null !== input.styleOverrides && false === Array.isArray(input.styleOverrides) && $io6(input.styleOverrides));
|
|
1257
|
+
const $io6 = input => (undefined === input.name || "string" === typeof input.name) && (undefined === input.fontname || "string" === typeof input.fontname) && (undefined === input.fontsize || "string" === typeof input.fontsize) && (undefined === input.primaryColour || "string" === typeof input.primaryColour) && (undefined === input.secondaryColour || "string" === typeof input.secondaryColour) && (undefined === input.outlineColour || "string" === typeof input.outlineColour) && (undefined === input.backColour || "string" === typeof input.backColour) && (undefined === input.bold || "string" === typeof input.bold) && (undefined === input.italic || "string" === typeof input.italic) && (undefined === input.underline || "string" === typeof input.underline) && (undefined === input.strikeOut || "string" === typeof input.strikeOut) && (undefined === input.scaleX || "string" === typeof input.scaleX) && (undefined === input.scaleY || "string" === typeof input.scaleY) && (undefined === input.spacing || "string" === typeof input.spacing) && (undefined === input.angle || "string" === typeof input.angle) && (undefined === input.borderStyle || "string" === typeof input.borderStyle) && (undefined === input.outline || "string" === typeof input.outline) && (undefined === input.shadow || "string" === typeof input.shadow) && (undefined === input.alignment || "string" === typeof input.alignment) && (undefined === input.marginL || "string" === typeof input.marginL) && (undefined === input.marginR || "string" === typeof input.marginR) && (undefined === input.marginV || "string" === typeof input.marginV) && (undefined === input.encoding || "string" === typeof input.encoding);
|
|
1258
|
+
const $io7 = input => undefined === input.crop || "object" === typeof input.crop && null !== input.crop && false === Array.isArray(input.crop) && $io8(input.crop);
|
|
1259
|
+
const $io8 = input => (undefined === input.x || "number" === typeof input.x && !Number.isNaN(input.x)) && (undefined === input.y || "number" === typeof input.y && !Number.isNaN(input.y)) && (undefined === input.width || "number" === typeof input.width && !Number.isNaN(input.width)) && (undefined === input.height || "number" === typeof input.height && !Number.isNaN(input.height));
|
|
1260
|
+
const $io9 = input => (undefined === input.language || "string" === typeof input.language) && (undefined === input.pan || Array.isArray(input.pan) && input.pan.every(elem => "number" === typeof elem && !Number.isNaN(elem)));
|
|
1261
|
+
const $io10 = input => "string" === typeof input.format && (undefined === input.transcribe || "object" === typeof input.transcribe && null !== input.transcribe && $io11(input.transcribe)) && (undefined === input.translate || "object" === typeof input.translate && null !== input.translate && $io12(input.translate)) && (undefined === input.audio || "object" === typeof input.audio && null !== input.audio && false === Array.isArray(input.audio) && $io13(input.audio)) && true && (undefined === input.pick || Array.isArray(input.pick) && input.pick.every(elem => "string" === typeof elem)) && (null !== input.subtitle && (undefined === input.subtitle || "string" === typeof input.subtitle || "object" === typeof input.subtitle && null !== input.subtitle && false === Array.isArray(input.subtitle) && $io14(input.subtitle)));
|
|
1262
|
+
const $io11 = input => "string" === typeof input.engine;
|
|
1263
|
+
const $io12 = input => "string" === typeof input.language;
|
|
1264
|
+
const $io13 = input => undefined === input.pan || "string" === typeof input.pan;
|
|
1265
|
+
const $io14 = input => (undefined === input.lang || "string" === typeof input.lang) && (undefined === input.style || "string" === typeof input.style);
|
|
778
1266
|
return "object" === typeof input && null !== input && $io0(input);
|
|
779
1267
|
};
|
|
780
1268
|
if (false === __is(input))
|
|
781
1269
|
((input, _path, _exceptionable = true) => {
|
|
782
1270
|
const $guard = __typia.json.createAssertStringify.guard;
|
|
1271
|
+
const $join = __typia.json.createAssertStringify.join;
|
|
783
1272
|
const $ao0 = (input, _path, _exceptionable = true) => ("string" === typeof input.type || $guard(_exceptionable, {
|
|
784
1273
|
path: _path + ".type",
|
|
785
1274
|
expected: "string",
|
|
@@ -845,11 +1334,11 @@ export const assertStringifyRenderQuery = (input, errorFactory) => { const asser
|
|
|
845
1334
|
path: _path + ".profile[" + _index2 + "]",
|
|
846
1335
|
expected: "(RenderProfileObject | string)",
|
|
847
1336
|
value: elem
|
|
848
|
-
}, errorFactory)) && $
|
|
1337
|
+
}, errorFactory)) && $ao10(elem, _path + ".profile[" + _index2 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
|
849
1338
|
path: _path + ".profile[" + _index2 + "]",
|
|
850
1339
|
expected: "(RenderProfileObject | string)",
|
|
851
1340
|
value: elem
|
|
852
|
-
}, errorFactory))) || "object" === typeof input.profile && null !== input.profile && $
|
|
1341
|
+
}, errorFactory))) || "object" === typeof input.profile && null !== input.profile && $ao10(input.profile, _path + ".profile", true && _exceptionable) || $guard(_exceptionable, {
|
|
853
1342
|
path: _path + ".profile",
|
|
854
1343
|
expected: "(Array<string | RenderProfileObject> | RenderProfileObject | string | undefined)",
|
|
855
1344
|
value: input.profile
|
|
@@ -882,13 +1371,21 @@ export const assertStringifyRenderQuery = (input, errorFactory) => { const asser
|
|
|
882
1371
|
path: _path + ".subtitle",
|
|
883
1372
|
expected: "(string | undefined)",
|
|
884
1373
|
value: input.subtitle
|
|
1374
|
+
}, errorFactory)) && (undefined === input.subtitleTracks || ("object" === typeof input.subtitleTracks && null !== input.subtitleTracks && false === Array.isArray(input.subtitleTracks) || $guard(_exceptionable, {
|
|
1375
|
+
path: _path + ".subtitleTracks",
|
|
1376
|
+
expected: "(__type.o2 | undefined)",
|
|
1377
|
+
value: input.subtitleTracks
|
|
1378
|
+
}, errorFactory)) && $ao4(input.subtitleTracks, _path + ".subtitleTracks", true && _exceptionable) || $guard(_exceptionable, {
|
|
1379
|
+
path: _path + ".subtitleTracks",
|
|
1380
|
+
expected: "(__type.o2 | undefined)",
|
|
1381
|
+
value: input.subtitleTracks
|
|
885
1382
|
}, errorFactory)) && (undefined === input.video || ("object" === typeof input.video && null !== input.video && false === Array.isArray(input.video) || $guard(_exceptionable, {
|
|
886
1383
|
path: _path + ".video",
|
|
887
|
-
expected: "(__type.
|
|
1384
|
+
expected: "(__type.o4 | undefined)",
|
|
888
1385
|
value: input.video
|
|
889
|
-
}, errorFactory)) && $
|
|
1386
|
+
}, errorFactory)) && $ao7(input.video, _path + ".video", true && _exceptionable) || $guard(_exceptionable, {
|
|
890
1387
|
path: _path + ".video",
|
|
891
|
-
expected: "(__type.
|
|
1388
|
+
expected: "(__type.o4 | undefined)",
|
|
892
1389
|
value: input.video
|
|
893
1390
|
}, errorFactory)) && (undefined === input.start || "number" === typeof input.start && !Number.isNaN(input.start) || $guard(_exceptionable, {
|
|
894
1391
|
path: _path + ".start",
|
|
@@ -900,11 +1397,11 @@ export const assertStringifyRenderQuery = (input, errorFactory) => { const asser
|
|
|
900
1397
|
value: input.end
|
|
901
1398
|
}, errorFactory)) && (undefined === input.transcribe || ("object" === typeof input.transcribe && null !== input.transcribe && false === Array.isArray(input.transcribe) || $guard(_exceptionable, {
|
|
902
1399
|
path: _path + ".transcribe",
|
|
903
|
-
expected: "(__type.
|
|
1400
|
+
expected: "(__type.o6 | undefined)",
|
|
904
1401
|
value: input.transcribe
|
|
905
|
-
}, errorFactory)) && $
|
|
1402
|
+
}, errorFactory)) && $ao9(input.transcribe, _path + ".transcribe", true && _exceptionable) || $guard(_exceptionable, {
|
|
906
1403
|
path: _path + ".transcribe",
|
|
907
|
-
expected: "(__type.
|
|
1404
|
+
expected: "(__type.o6 | undefined)",
|
|
908
1405
|
value: input.transcribe
|
|
909
1406
|
}, errorFactory));
|
|
910
1407
|
const $ao3 = (input, _path, _exceptionable = true) => (undefined === input.type || "string" === typeof input.type || $guard(_exceptionable, {
|
|
@@ -916,16 +1413,136 @@ export const assertStringifyRenderQuery = (input, errorFactory) => { const asser
|
|
|
916
1413
|
expected: "(null | string | undefined)",
|
|
917
1414
|
value: input.file
|
|
918
1415
|
}, errorFactory));
|
|
919
|
-
const $ao4 = (input, _path, _exceptionable = true) =>
|
|
1416
|
+
const $ao4 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
|
|
1417
|
+
const value = input[key];
|
|
1418
|
+
if (undefined === value)
|
|
1419
|
+
return true;
|
|
1420
|
+
return ("object" === typeof value && null !== value && false === Array.isArray(value) || $guard(_exceptionable, {
|
|
1421
|
+
path: _path + $join(key),
|
|
1422
|
+
expected: "__type.o3",
|
|
1423
|
+
value: value
|
|
1424
|
+
}, errorFactory)) && $ao5(value, _path + $join(key), true && _exceptionable) || $guard(_exceptionable, {
|
|
1425
|
+
path: _path + $join(key),
|
|
1426
|
+
expected: "__type.o3",
|
|
1427
|
+
value: value
|
|
1428
|
+
}, errorFactory);
|
|
1429
|
+
});
|
|
1430
|
+
const $ao5 = (input, _path, _exceptionable = true) => (null === input.style || undefined === input.style || "string" === typeof input.style || $guard(_exceptionable, {
|
|
1431
|
+
path: _path + ".style",
|
|
1432
|
+
expected: "(null | string | undefined)",
|
|
1433
|
+
value: input.style
|
|
1434
|
+
}, errorFactory)) && (undefined === input.styleOverrides || ("object" === typeof input.styleOverrides && null !== input.styleOverrides && false === Array.isArray(input.styleOverrides) || $guard(_exceptionable, {
|
|
1435
|
+
path: _path + ".styleOverrides",
|
|
1436
|
+
expected: "(Omit<SubtitleStyleDomainRecord, \"scaledBorderAndShadow\" | \"futureWordWrapping\"> | undefined)",
|
|
1437
|
+
value: input.styleOverrides
|
|
1438
|
+
}, errorFactory)) && $ao6(input.styleOverrides, _path + ".styleOverrides", true && _exceptionable) || $guard(_exceptionable, {
|
|
1439
|
+
path: _path + ".styleOverrides",
|
|
1440
|
+
expected: "(Omit<SubtitleStyleDomainRecord, \"scaledBorderAndShadow\" | \"futureWordWrapping\"> | undefined)",
|
|
1441
|
+
value: input.styleOverrides
|
|
1442
|
+
}, errorFactory));
|
|
1443
|
+
const $ao6 = (input, _path, _exceptionable = true) => (undefined === input.name || "string" === typeof input.name || $guard(_exceptionable, {
|
|
1444
|
+
path: _path + ".name",
|
|
1445
|
+
expected: "(string | undefined)",
|
|
1446
|
+
value: input.name
|
|
1447
|
+
}, errorFactory)) && (undefined === input.fontname || "string" === typeof input.fontname || $guard(_exceptionable, {
|
|
1448
|
+
path: _path + ".fontname",
|
|
1449
|
+
expected: "(string | undefined)",
|
|
1450
|
+
value: input.fontname
|
|
1451
|
+
}, errorFactory)) && (undefined === input.fontsize || "string" === typeof input.fontsize || $guard(_exceptionable, {
|
|
1452
|
+
path: _path + ".fontsize",
|
|
1453
|
+
expected: "(string | undefined)",
|
|
1454
|
+
value: input.fontsize
|
|
1455
|
+
}, errorFactory)) && (undefined === input.primaryColour || "string" === typeof input.primaryColour || $guard(_exceptionable, {
|
|
1456
|
+
path: _path + ".primaryColour",
|
|
1457
|
+
expected: "(string | undefined)",
|
|
1458
|
+
value: input.primaryColour
|
|
1459
|
+
}, errorFactory)) && (undefined === input.secondaryColour || "string" === typeof input.secondaryColour || $guard(_exceptionable, {
|
|
1460
|
+
path: _path + ".secondaryColour",
|
|
1461
|
+
expected: "(string | undefined)",
|
|
1462
|
+
value: input.secondaryColour
|
|
1463
|
+
}, errorFactory)) && (undefined === input.outlineColour || "string" === typeof input.outlineColour || $guard(_exceptionable, {
|
|
1464
|
+
path: _path + ".outlineColour",
|
|
1465
|
+
expected: "(string | undefined)",
|
|
1466
|
+
value: input.outlineColour
|
|
1467
|
+
}, errorFactory)) && (undefined === input.backColour || "string" === typeof input.backColour || $guard(_exceptionable, {
|
|
1468
|
+
path: _path + ".backColour",
|
|
1469
|
+
expected: "(string | undefined)",
|
|
1470
|
+
value: input.backColour
|
|
1471
|
+
}, errorFactory)) && (undefined === input.bold || "string" === typeof input.bold || $guard(_exceptionable, {
|
|
1472
|
+
path: _path + ".bold",
|
|
1473
|
+
expected: "(string | undefined)",
|
|
1474
|
+
value: input.bold
|
|
1475
|
+
}, errorFactory)) && (undefined === input.italic || "string" === typeof input.italic || $guard(_exceptionable, {
|
|
1476
|
+
path: _path + ".italic",
|
|
1477
|
+
expected: "(string | undefined)",
|
|
1478
|
+
value: input.italic
|
|
1479
|
+
}, errorFactory)) && (undefined === input.underline || "string" === typeof input.underline || $guard(_exceptionable, {
|
|
1480
|
+
path: _path + ".underline",
|
|
1481
|
+
expected: "(string | undefined)",
|
|
1482
|
+
value: input.underline
|
|
1483
|
+
}, errorFactory)) && (undefined === input.strikeOut || "string" === typeof input.strikeOut || $guard(_exceptionable, {
|
|
1484
|
+
path: _path + ".strikeOut",
|
|
1485
|
+
expected: "(string | undefined)",
|
|
1486
|
+
value: input.strikeOut
|
|
1487
|
+
}, errorFactory)) && (undefined === input.scaleX || "string" === typeof input.scaleX || $guard(_exceptionable, {
|
|
1488
|
+
path: _path + ".scaleX",
|
|
1489
|
+
expected: "(string | undefined)",
|
|
1490
|
+
value: input.scaleX
|
|
1491
|
+
}, errorFactory)) && (undefined === input.scaleY || "string" === typeof input.scaleY || $guard(_exceptionable, {
|
|
1492
|
+
path: _path + ".scaleY",
|
|
1493
|
+
expected: "(string | undefined)",
|
|
1494
|
+
value: input.scaleY
|
|
1495
|
+
}, errorFactory)) && (undefined === input.spacing || "string" === typeof input.spacing || $guard(_exceptionable, {
|
|
1496
|
+
path: _path + ".spacing",
|
|
1497
|
+
expected: "(string | undefined)",
|
|
1498
|
+
value: input.spacing
|
|
1499
|
+
}, errorFactory)) && (undefined === input.angle || "string" === typeof input.angle || $guard(_exceptionable, {
|
|
1500
|
+
path: _path + ".angle",
|
|
1501
|
+
expected: "(string | undefined)",
|
|
1502
|
+
value: input.angle
|
|
1503
|
+
}, errorFactory)) && (undefined === input.borderStyle || "string" === typeof input.borderStyle || $guard(_exceptionable, {
|
|
1504
|
+
path: _path + ".borderStyle",
|
|
1505
|
+
expected: "(string | undefined)",
|
|
1506
|
+
value: input.borderStyle
|
|
1507
|
+
}, errorFactory)) && (undefined === input.outline || "string" === typeof input.outline || $guard(_exceptionable, {
|
|
1508
|
+
path: _path + ".outline",
|
|
1509
|
+
expected: "(string | undefined)",
|
|
1510
|
+
value: input.outline
|
|
1511
|
+
}, errorFactory)) && (undefined === input.shadow || "string" === typeof input.shadow || $guard(_exceptionable, {
|
|
1512
|
+
path: _path + ".shadow",
|
|
1513
|
+
expected: "(string | undefined)",
|
|
1514
|
+
value: input.shadow
|
|
1515
|
+
}, errorFactory)) && (undefined === input.alignment || "string" === typeof input.alignment || $guard(_exceptionable, {
|
|
1516
|
+
path: _path + ".alignment",
|
|
1517
|
+
expected: "(string | undefined)",
|
|
1518
|
+
value: input.alignment
|
|
1519
|
+
}, errorFactory)) && (undefined === input.marginL || "string" === typeof input.marginL || $guard(_exceptionable, {
|
|
1520
|
+
path: _path + ".marginL",
|
|
1521
|
+
expected: "(string | undefined)",
|
|
1522
|
+
value: input.marginL
|
|
1523
|
+
}, errorFactory)) && (undefined === input.marginR || "string" === typeof input.marginR || $guard(_exceptionable, {
|
|
1524
|
+
path: _path + ".marginR",
|
|
1525
|
+
expected: "(string | undefined)",
|
|
1526
|
+
value: input.marginR
|
|
1527
|
+
}, errorFactory)) && (undefined === input.marginV || "string" === typeof input.marginV || $guard(_exceptionable, {
|
|
1528
|
+
path: _path + ".marginV",
|
|
1529
|
+
expected: "(string | undefined)",
|
|
1530
|
+
value: input.marginV
|
|
1531
|
+
}, errorFactory)) && (undefined === input.encoding || "string" === typeof input.encoding || $guard(_exceptionable, {
|
|
1532
|
+
path: _path + ".encoding",
|
|
1533
|
+
expected: "(string | undefined)",
|
|
1534
|
+
value: input.encoding
|
|
1535
|
+
}, errorFactory));
|
|
1536
|
+
const $ao7 = (input, _path, _exceptionable = true) => undefined === input.crop || ("object" === typeof input.crop && null !== input.crop && false === Array.isArray(input.crop) || $guard(_exceptionable, {
|
|
920
1537
|
path: _path + ".crop",
|
|
921
|
-
expected: "(__type.
|
|
1538
|
+
expected: "(__type.o5 | undefined)",
|
|
922
1539
|
value: input.crop
|
|
923
|
-
}, errorFactory)) && $
|
|
1540
|
+
}, errorFactory)) && $ao8(input.crop, _path + ".crop", true && _exceptionable) || $guard(_exceptionable, {
|
|
924
1541
|
path: _path + ".crop",
|
|
925
|
-
expected: "(__type.
|
|
1542
|
+
expected: "(__type.o5 | undefined)",
|
|
926
1543
|
value: input.crop
|
|
927
1544
|
}, errorFactory);
|
|
928
|
-
const $
|
|
1545
|
+
const $ao8 = (input, _path, _exceptionable = true) => (undefined === input.x || "number" === typeof input.x && !Number.isNaN(input.x) || $guard(_exceptionable, {
|
|
929
1546
|
path: _path + ".x",
|
|
930
1547
|
expected: "(number | undefined)",
|
|
931
1548
|
value: input.x
|
|
@@ -942,7 +1559,7 @@ export const assertStringifyRenderQuery = (input, errorFactory) => { const asser
|
|
|
942
1559
|
expected: "(number | undefined)",
|
|
943
1560
|
value: input.height
|
|
944
1561
|
}, errorFactory));
|
|
945
|
-
const $
|
|
1562
|
+
const $ao9 = (input, _path, _exceptionable = true) => (undefined === input.language || "string" === typeof input.language || $guard(_exceptionable, {
|
|
946
1563
|
path: _path + ".language",
|
|
947
1564
|
expected: "(string | undefined)",
|
|
948
1565
|
value: input.language
|
|
@@ -959,33 +1576,33 @@ export const assertStringifyRenderQuery = (input, errorFactory) => { const asser
|
|
|
959
1576
|
expected: "(Array<number> | undefined)",
|
|
960
1577
|
value: input.pan
|
|
961
1578
|
}, errorFactory));
|
|
962
|
-
const $
|
|
1579
|
+
const $ao10 = (input, _path, _exceptionable = true) => ("string" === typeof input.format || $guard(_exceptionable, {
|
|
963
1580
|
path: _path + ".format",
|
|
964
1581
|
expected: "string",
|
|
965
1582
|
value: input.format
|
|
966
1583
|
}, errorFactory)) && (undefined === input.transcribe || ("object" === typeof input.transcribe && null !== input.transcribe || $guard(_exceptionable, {
|
|
967
1584
|
path: _path + ".transcribe",
|
|
968
|
-
expected: "(__type.
|
|
1585
|
+
expected: "(__type.o7 | undefined)",
|
|
969
1586
|
value: input.transcribe
|
|
970
|
-
}, errorFactory)) && $
|
|
1587
|
+
}, errorFactory)) && $ao11(input.transcribe, _path + ".transcribe", true && _exceptionable) || $guard(_exceptionable, {
|
|
971
1588
|
path: _path + ".transcribe",
|
|
972
|
-
expected: "(__type.
|
|
1589
|
+
expected: "(__type.o7 | undefined)",
|
|
973
1590
|
value: input.transcribe
|
|
974
1591
|
}, errorFactory)) && (undefined === input.translate || ("object" === typeof input.translate && null !== input.translate || $guard(_exceptionable, {
|
|
975
1592
|
path: _path + ".translate",
|
|
976
|
-
expected: "(__type.
|
|
1593
|
+
expected: "(__type.o8 | undefined)",
|
|
977
1594
|
value: input.translate
|
|
978
|
-
}, errorFactory)) && $
|
|
1595
|
+
}, errorFactory)) && $ao12(input.translate, _path + ".translate", true && _exceptionable) || $guard(_exceptionable, {
|
|
979
1596
|
path: _path + ".translate",
|
|
980
|
-
expected: "(__type.
|
|
1597
|
+
expected: "(__type.o8 | undefined)",
|
|
981
1598
|
value: input.translate
|
|
982
1599
|
}, errorFactory)) && (undefined === input.audio || ("object" === typeof input.audio && null !== input.audio && false === Array.isArray(input.audio) || $guard(_exceptionable, {
|
|
983
1600
|
path: _path + ".audio",
|
|
984
|
-
expected: "(__type.
|
|
1601
|
+
expected: "(__type.o9 | undefined)",
|
|
985
1602
|
value: input.audio
|
|
986
|
-
}, errorFactory)) && $
|
|
1603
|
+
}, errorFactory)) && $ao13(input.audio, _path + ".audio", true && _exceptionable) || $guard(_exceptionable, {
|
|
987
1604
|
path: _path + ".audio",
|
|
988
|
-
expected: "(__type.
|
|
1605
|
+
expected: "(__type.o9 | undefined)",
|
|
989
1606
|
value: input.audio
|
|
990
1607
|
}, errorFactory)) && true && (undefined === input.pick || (Array.isArray(input.pick) || $guard(_exceptionable, {
|
|
991
1608
|
path: _path + ".pick",
|
|
@@ -999,22 +1616,43 @@ export const assertStringifyRenderQuery = (input, errorFactory) => { const asser
|
|
|
999
1616
|
path: _path + ".pick",
|
|
1000
1617
|
expected: "(Array<string> | undefined)",
|
|
1001
1618
|
value: input.pick
|
|
1002
|
-
}, errorFactory))
|
|
1003
|
-
|
|
1619
|
+
}, errorFactory)) && ((null !== input.subtitle || $guard(_exceptionable, {
|
|
1620
|
+
path: _path + ".subtitle",
|
|
1621
|
+
expected: "(SubtitleProfile | string | undefined)",
|
|
1622
|
+
value: input.subtitle
|
|
1623
|
+
}, errorFactory)) && (undefined === input.subtitle || "string" === typeof input.subtitle || ("object" === typeof input.subtitle && null !== input.subtitle && false === Array.isArray(input.subtitle) || $guard(_exceptionable, {
|
|
1624
|
+
path: _path + ".subtitle",
|
|
1625
|
+
expected: "(SubtitleProfile | string | undefined)",
|
|
1626
|
+
value: input.subtitle
|
|
1627
|
+
}, errorFactory)) && $ao14(input.subtitle, _path + ".subtitle", true && _exceptionable) || $guard(_exceptionable, {
|
|
1628
|
+
path: _path + ".subtitle",
|
|
1629
|
+
expected: "(SubtitleProfile | string | undefined)",
|
|
1630
|
+
value: input.subtitle
|
|
1631
|
+
}, errorFactory)));
|
|
1632
|
+
const $ao11 = (input, _path, _exceptionable = true) => "string" === typeof input.engine || $guard(_exceptionable, {
|
|
1004
1633
|
path: _path + ".engine",
|
|
1005
1634
|
expected: "string",
|
|
1006
1635
|
value: input.engine
|
|
1007
1636
|
}, errorFactory);
|
|
1008
|
-
const $
|
|
1637
|
+
const $ao12 = (input, _path, _exceptionable = true) => "string" === typeof input.language || $guard(_exceptionable, {
|
|
1009
1638
|
path: _path + ".language",
|
|
1010
1639
|
expected: "string",
|
|
1011
1640
|
value: input.language
|
|
1012
1641
|
}, errorFactory);
|
|
1013
|
-
const $
|
|
1642
|
+
const $ao13 = (input, _path, _exceptionable = true) => undefined === input.pan || "string" === typeof input.pan || $guard(_exceptionable, {
|
|
1014
1643
|
path: _path + ".pan",
|
|
1015
1644
|
expected: "(string | undefined)",
|
|
1016
1645
|
value: input.pan
|
|
1017
1646
|
}, errorFactory);
|
|
1647
|
+
const $ao14 = (input, _path, _exceptionable = true) => (undefined === input.lang || "string" === typeof input.lang || $guard(_exceptionable, {
|
|
1648
|
+
path: _path + ".lang",
|
|
1649
|
+
expected: "(string | undefined)",
|
|
1650
|
+
value: input.lang
|
|
1651
|
+
}, errorFactory)) && (undefined === input.style || "string" === typeof input.style || $guard(_exceptionable, {
|
|
1652
|
+
path: _path + ".style",
|
|
1653
|
+
expected: "(string | undefined)",
|
|
1654
|
+
value: input.style
|
|
1655
|
+
}, errorFactory));
|
|
1018
1656
|
return ("object" === typeof input && null !== input || $guard(true, {
|
|
1019
1657
|
path: _path + "",
|
|
1020
1658
|
expected: "RenderQuery",
|
|
@@ -1027,16 +1665,25 @@ export const assertStringifyRenderQuery = (input, errorFactory) => { const asser
|
|
|
1027
1665
|
})(input, "$input", true);
|
|
1028
1666
|
return input;
|
|
1029
1667
|
}; const stringify = input => {
|
|
1030
|
-
const $io1 = input => null !== input.scene && (undefined === input.scene || "string" === typeof input.scene || (Array.isArray(input.scene) && input.scene.every(elem => null !== elem && undefined !== elem && ("string" === typeof elem || "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io2(elem))) || "object" === typeof input.scene && null !== input.scene && false === Array.isArray(input.scene) && $io2(input.scene))) && (null !== input.profile && (undefined === input.profile || "string" === typeof input.profile || (Array.isArray(input.profile) && input.profile.every(elem => null !== elem && undefined !== elem && ("string" === typeof elem || "object" === typeof elem && null !== elem && $
|
|
1031
|
-
const $io2 = input => (undefined === input.id || "string" === typeof input.id) && (undefined === input.preset || "string" === typeof input.preset) && (undefined === input.input || "object" === typeof input.input && null !== input.input && false === Array.isArray(input.input) && $io3(input.input)) && (undefined === input.lang || "string" === typeof input.lang) && (undefined === input.subtitle || "string" === typeof input.subtitle) && (undefined === input.video || "object" === typeof input.video && null !== input.video && false === Array.isArray(input.video) && $
|
|
1668
|
+
const $io1 = input => null !== input.scene && (undefined === input.scene || "string" === typeof input.scene || (Array.isArray(input.scene) && input.scene.every(elem => null !== elem && undefined !== elem && ("string" === typeof elem || "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io2(elem))) || "object" === typeof input.scene && null !== input.scene && false === Array.isArray(input.scene) && $io2(input.scene))) && (null !== input.profile && (undefined === input.profile || "string" === typeof input.profile || (Array.isArray(input.profile) && input.profile.every(elem => null !== elem && undefined !== elem && ("string" === typeof elem || "object" === typeof elem && null !== elem && $io10(elem))) || "object" === typeof input.profile && null !== input.profile && $io10(input.profile))));
|
|
1669
|
+
const $io2 = input => (undefined === input.id || "string" === typeof input.id) && (undefined === input.preset || "string" === typeof input.preset) && (undefined === input.input || "object" === typeof input.input && null !== input.input && false === Array.isArray(input.input) && $io3(input.input)) && (undefined === input.lang || "string" === typeof input.lang) && (undefined === input.subtitle || "string" === typeof input.subtitle) && (undefined === input.subtitleTracks || "object" === typeof input.subtitleTracks && null !== input.subtitleTracks && false === Array.isArray(input.subtitleTracks) && $io4(input.subtitleTracks)) && (undefined === input.video || "object" === typeof input.video && null !== input.video && false === Array.isArray(input.video) && $io7(input.video)) && (undefined === input.start || "number" === typeof input.start) && (undefined === input.end || "number" === typeof input.end) && (undefined === input.transcribe || "object" === typeof input.transcribe && null !== input.transcribe && false === Array.isArray(input.transcribe) && $io9(input.transcribe));
|
|
1032
1670
|
const $io3 = input => (undefined === input.type || "string" === typeof input.type) && (null === input.file || undefined === input.file || "string" === typeof input.file);
|
|
1033
|
-
const $io4 = input =>
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
const $
|
|
1671
|
+
const $io4 = input => Object.keys(input).every(key => {
|
|
1672
|
+
const value = input[key];
|
|
1673
|
+
if (undefined === value)
|
|
1674
|
+
return true;
|
|
1675
|
+
return "object" === typeof value && null !== value && false === Array.isArray(value) && $io5(value);
|
|
1676
|
+
});
|
|
1677
|
+
const $io5 = input => (null === input.style || undefined === input.style || "string" === typeof input.style) && (undefined === input.styleOverrides || "object" === typeof input.styleOverrides && null !== input.styleOverrides && false === Array.isArray(input.styleOverrides) && $io6(input.styleOverrides));
|
|
1678
|
+
const $io6 = input => (undefined === input.name || "string" === typeof input.name) && (undefined === input.fontname || "string" === typeof input.fontname) && (undefined === input.fontsize || "string" === typeof input.fontsize) && (undefined === input.primaryColour || "string" === typeof input.primaryColour) && (undefined === input.secondaryColour || "string" === typeof input.secondaryColour) && (undefined === input.outlineColour || "string" === typeof input.outlineColour) && (undefined === input.backColour || "string" === typeof input.backColour) && (undefined === input.bold || "string" === typeof input.bold) && (undefined === input.italic || "string" === typeof input.italic) && (undefined === input.underline || "string" === typeof input.underline) && (undefined === input.strikeOut || "string" === typeof input.strikeOut) && (undefined === input.scaleX || "string" === typeof input.scaleX) && (undefined === input.scaleY || "string" === typeof input.scaleY) && (undefined === input.spacing || "string" === typeof input.spacing) && (undefined === input.angle || "string" === typeof input.angle) && (undefined === input.borderStyle || "string" === typeof input.borderStyle) && (undefined === input.outline || "string" === typeof input.outline) && (undefined === input.shadow || "string" === typeof input.shadow) && (undefined === input.alignment || "string" === typeof input.alignment) && (undefined === input.marginL || "string" === typeof input.marginL) && (undefined === input.marginR || "string" === typeof input.marginR) && (undefined === input.marginV || "string" === typeof input.marginV) && (undefined === input.encoding || "string" === typeof input.encoding);
|
|
1679
|
+
const $io7 = input => undefined === input.crop || "object" === typeof input.crop && null !== input.crop && false === Array.isArray(input.crop) && $io8(input.crop);
|
|
1680
|
+
const $io8 = input => (undefined === input.x || "number" === typeof input.x) && (undefined === input.y || "number" === typeof input.y) && (undefined === input.width || "number" === typeof input.width) && (undefined === input.height || "number" === typeof input.height);
|
|
1681
|
+
const $io9 = input => (undefined === input.language || "string" === typeof input.language) && (undefined === input.pan || Array.isArray(input.pan) && input.pan.every(elem => "number" === typeof elem));
|
|
1682
|
+
const $io10 = input => "string" === typeof input.format && (undefined === input.transcribe || "object" === typeof input.transcribe && null !== input.transcribe && $io11(input.transcribe)) && (undefined === input.translate || "object" === typeof input.translate && null !== input.translate && $io12(input.translate)) && (undefined === input.audio || "object" === typeof input.audio && null !== input.audio && false === Array.isArray(input.audio) && $io13(input.audio)) && true && (undefined === input.pick || Array.isArray(input.pick) && input.pick.every(elem => "string" === typeof elem)) && (null !== input.subtitle && (undefined === input.subtitle || "string" === typeof input.subtitle || "object" === typeof input.subtitle && null !== input.subtitle && false === Array.isArray(input.subtitle) && $io14(input.subtitle)));
|
|
1683
|
+
const $io11 = input => "string" === typeof input.engine;
|
|
1684
|
+
const $io12 = input => "string" === typeof input.language;
|
|
1685
|
+
const $io13 = input => undefined === input.pan || "string" === typeof input.pan;
|
|
1686
|
+
const $io14 = input => (undefined === input.lang || "string" === typeof input.lang) && (undefined === input.style || "string" === typeof input.style);
|
|
1040
1687
|
const $string = __typia.json.createAssertStringify.string;
|
|
1041
1688
|
const $throws = __typia.json.createAssertStringify.throws;
|
|
1042
1689
|
const $tail = __typia.json.createAssertStringify.tail;
|
|
@@ -1069,25 +1716,39 @@ export const assertStringifyRenderQuery = (input, errorFactory) => { const asser
|
|
|
1069
1716
|
if ("string" === typeof elem)
|
|
1070
1717
|
return $string(elem);
|
|
1071
1718
|
if ("object" === typeof elem && null !== elem)
|
|
1072
|
-
return $
|
|
1719
|
+
return $so10(elem);
|
|
1073
1720
|
$throws({
|
|
1074
1721
|
expected: "(RenderProfileObject | string)",
|
|
1075
1722
|
value: elem
|
|
1076
1723
|
});
|
|
1077
1724
|
})()).join(",")}]`;
|
|
1078
1725
|
if ("object" === typeof input.profile && null !== input.profile)
|
|
1079
|
-
return $
|
|
1726
|
+
return $so10(input.profile);
|
|
1080
1727
|
$throws({
|
|
1081
1728
|
expected: "(Array<string | RenderProfileObject> | RenderProfileObject | string | undefined)",
|
|
1082
1729
|
value: input.profile
|
|
1083
1730
|
});
|
|
1084
1731
|
})() : undefined}`}`)}}`;
|
|
1085
|
-
const $so2 = input => `{${$tail(`${undefined === input.id ? "" : `"id":${undefined !== input.id ? $string(input.id) : undefined},`}${undefined === input.preset ? "" : `"preset":${undefined !== input.preset ? $string(input.preset) : undefined},`}${undefined === input.input ? "" : `"input":${undefined !== input.input ? $so3(input.input) : undefined},`}${undefined === input.lang ? "" : `"lang":${undefined !== input.lang ? $string(input.lang) : undefined},`}${undefined === input.subtitle ? "" : `"subtitle":${undefined !== input.subtitle ? $string(input.subtitle) : undefined},`}${undefined === input.video ? "" : `"video":${undefined !== input.video ? $
|
|
1732
|
+
const $so2 = input => `{${$tail(`${undefined === input.id ? "" : `"id":${undefined !== input.id ? $string(input.id) : undefined},`}${undefined === input.preset ? "" : `"preset":${undefined !== input.preset ? $string(input.preset) : undefined},`}${undefined === input.input ? "" : `"input":${undefined !== input.input ? $so3(input.input) : undefined},`}${undefined === input.lang ? "" : `"lang":${undefined !== input.lang ? $string(input.lang) : undefined},`}${undefined === input.subtitle ? "" : `"subtitle":${undefined !== input.subtitle ? $string(input.subtitle) : undefined},`}${undefined === input.subtitleTracks ? "" : `"subtitleTracks":${undefined !== input.subtitleTracks ? $so4(input.subtitleTracks) : undefined},`}${undefined === input.video ? "" : `"video":${undefined !== input.video ? $so7(input.video) : undefined},`}${undefined === input.start ? "" : `"start":${undefined !== input.start ? input.start : undefined},`}${undefined === input.end ? "" : `"end":${undefined !== input.end ? input.end : undefined},`}${undefined === input.transcribe ? "" : `"transcribe":${undefined !== input.transcribe ? $so9(input.transcribe) : undefined}`}`)}}`;
|
|
1086
1733
|
const $so3 = input => `{${$tail(`${undefined === input.type ? "" : `"type":${undefined !== input.type ? $string(input.type) : undefined},`}${undefined === input.file ? "" : `"file":${undefined !== input.file ? null !== input.file ? $string(input.file) : "null" : undefined}`}`)}}`;
|
|
1087
|
-
const $so4 = input => `{${
|
|
1088
|
-
|
|
1089
|
-
const $
|
|
1090
|
-
const $
|
|
1091
|
-
const $
|
|
1734
|
+
const $so4 = input => `{${Object.entries(input).map(([key, value]) => { if (undefined === value)
|
|
1735
|
+
return ""; return `${JSON.stringify(key)}:${$so5(value)}`; }).filter(str => "" !== str).join(",")}}`;
|
|
1736
|
+
const $so5 = input => `{${$tail(`${undefined === input.style ? "" : `"style":${undefined !== input.style ? null !== input.style ? $string(input.style) : "null" : undefined},`}${undefined === input.styleOverrides ? "" : `"styleOverrides":${undefined !== input.styleOverrides ? $so6(input.styleOverrides) : undefined}`}`)}}`;
|
|
1737
|
+
const $so6 = input => `{${$tail(`${undefined === input.name ? "" : `"name":${undefined !== input.name ? $string(input.name) : undefined},`}${undefined === input.fontname ? "" : `"fontname":${undefined !== input.fontname ? $string(input.fontname) : undefined},`}${undefined === input.fontsize ? "" : `"fontsize":${undefined !== input.fontsize ? $string(input.fontsize) : undefined},`}${undefined === input.primaryColour ? "" : `"primaryColour":${undefined !== input.primaryColour ? $string(input.primaryColour) : undefined},`}${undefined === input.secondaryColour ? "" : `"secondaryColour":${undefined !== input.secondaryColour ? $string(input.secondaryColour) : undefined},`}${undefined === input.outlineColour ? "" : `"outlineColour":${undefined !== input.outlineColour ? $string(input.outlineColour) : undefined},`}${undefined === input.backColour ? "" : `"backColour":${undefined !== input.backColour ? $string(input.backColour) : undefined},`}${undefined === input.bold ? "" : `"bold":${undefined !== input.bold ? $string(input.bold) : undefined},`}${undefined === input.italic ? "" : `"italic":${undefined !== input.italic ? $string(input.italic) : undefined},`}${undefined === input.underline ? "" : `"underline":${undefined !== input.underline ? $string(input.underline) : undefined},`}${undefined === input.strikeOut ? "" : `"strikeOut":${undefined !== input.strikeOut ? $string(input.strikeOut) : undefined},`}${undefined === input.scaleX ? "" : `"scaleX":${undefined !== input.scaleX ? $string(input.scaleX) : undefined},`}${undefined === input.scaleY ? "" : `"scaleY":${undefined !== input.scaleY ? $string(input.scaleY) : undefined},`}${undefined === input.spacing ? "" : `"spacing":${undefined !== input.spacing ? $string(input.spacing) : undefined},`}${undefined === input.angle ? "" : `"angle":${undefined !== input.angle ? $string(input.angle) : undefined},`}${undefined === input.borderStyle ? "" : `"borderStyle":${undefined !== input.borderStyle ? $string(input.borderStyle) : undefined},`}${undefined === input.outline ? "" : `"outline":${undefined !== input.outline ? $string(input.outline) : undefined},`}${undefined === input.shadow ? "" : `"shadow":${undefined !== input.shadow ? $string(input.shadow) : undefined},`}${undefined === input.alignment ? "" : `"alignment":${undefined !== input.alignment ? $string(input.alignment) : undefined},`}${undefined === input.marginL ? "" : `"marginL":${undefined !== input.marginL ? $string(input.marginL) : undefined},`}${undefined === input.marginR ? "" : `"marginR":${undefined !== input.marginR ? $string(input.marginR) : undefined},`}${undefined === input.marginV ? "" : `"marginV":${undefined !== input.marginV ? $string(input.marginV) : undefined},`}${undefined === input.encoding ? "" : `"encoding":${undefined !== input.encoding ? $string(input.encoding) : undefined}`}`)}}`;
|
|
1738
|
+
const $so7 = input => `{${$tail(`${undefined === input.crop ? "" : `"crop":${undefined !== input.crop ? $so8(input.crop) : undefined}`}`)}}`;
|
|
1739
|
+
const $so8 = input => `{${$tail(`${undefined === input.x ? "" : `"x":${undefined !== input.x ? input.x : undefined},`}${undefined === input.y ? "" : `"y":${undefined !== input.y ? input.y : undefined},`}${undefined === input.width ? "" : `"width":${undefined !== input.width ? input.width : undefined},`}${undefined === input.height ? "" : `"height":${undefined !== input.height ? input.height : undefined}`}`)}}`;
|
|
1740
|
+
const $so9 = input => `{${$tail(`${undefined === input.language ? "" : `"language":${undefined !== input.language ? $string(input.language) : undefined},`}${undefined === input.pan ? "" : `"pan":${undefined !== input.pan ? `[${input.pan.map(elem => elem).join(",")}]` : undefined}`}`)}}`;
|
|
1741
|
+
const $so10 = input => `{${undefined === input.transcribe ? "" : `"transcribe":${undefined !== input.transcribe ? `{"engine":${$string(input.transcribe.engine)}}` : undefined},`}${undefined === input.translate ? "" : `"translate":${undefined !== input.translate ? `{"language":${$string(input.translate.language)}}` : undefined},`}${undefined === input.audio ? "" : `"audio":${undefined !== input.audio ? $so13(input.audio) : undefined},`}${undefined === input.video || "function" === typeof input.video ? "" : `"video":${undefined !== input.video ? JSON.stringify(input.video) : undefined},`}${undefined === input.pick ? "" : `"pick":${undefined !== input.pick ? `[${input.pick.map(elem => $string(elem)).join(",")}]` : undefined},`}${undefined === input.subtitle ? "" : `"subtitle":${undefined !== input.subtitle ? (() => {
|
|
1742
|
+
if ("string" === typeof input.subtitle)
|
|
1743
|
+
return $string(input.subtitle);
|
|
1744
|
+
if ("object" === typeof input.subtitle && null !== input.subtitle && false === Array.isArray(input.subtitle))
|
|
1745
|
+
return $so14(input.subtitle);
|
|
1746
|
+
$throws({
|
|
1747
|
+
expected: "(SubtitleProfile | string | undefined)",
|
|
1748
|
+
value: input.subtitle
|
|
1749
|
+
});
|
|
1750
|
+
})() : undefined},`}"format":${$string(input.format)}}`;
|
|
1751
|
+
const $so13 = input => `{${$tail(`${undefined === input.pan ? "" : `"pan":${undefined !== input.pan ? $string(input.pan) : undefined}`}`)}}`;
|
|
1752
|
+
const $so14 = input => `{${$tail(`${undefined === input.lang ? "" : `"lang":${undefined !== input.lang ? $string(input.lang) : undefined},`}${undefined === input.style ? "" : `"style":${undefined !== input.style ? $string(input.style) : undefined}`}`)}}`;
|
|
1092
1753
|
return $so0(input);
|
|
1093
1754
|
}; return stringify(assert(input, errorFactory)); };
|