@nxtedition/types 23.0.31 → 23.0.33
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 +45 -3
- package/dist/app.js +254 -6
- package/dist/common/block.d.ts +1 -1
- package/dist/common/file.d.ts +10 -11
- 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 +41 -26
- package/dist/common/settings.js +1888 -1574
- package/dist/domains/event.d.ts +21 -19
- package/dist/domains/event.js +460 -44
- package/dist/domains/general.d.ts +6 -0
- package/dist/domains/media.d.ts +4 -0
- package/dist/domains/media.js +827 -89
- package/dist/domains/panel.d.ts +268 -1
- package/dist/domains/publish.d.ts +1128 -6
- package/dist/domains/publish.js +10806 -3560
- package/dist/domains/render.js +826 -163
- package/dist/domains/settings.d.ts +1 -10
- package/dist/domains/settings.js +1 -6649
- package/dist/index.d.ts +13 -1
- package/dist/index.js +1 -0
- package/dist/nxtpression.d.ts +110 -0
- package/dist/nxtpression.js +323 -0
- package/dist/schema.json +2183 -1904
- package/dist/tsdoc-metadata.json +11 -0
- package/package.json +10 -3
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
import __typia from "typia";
|
|
2
2
|
export const isRenderPresetObject = input => {
|
|
3
3
|
const $io0 = input => "string" === typeof input.type && (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 && $io1(elem))) || "object" === typeof input.profile && null !== input.profile && $io1(input.profile))));
|
|
4
|
-
const $io1 = input => "string" === typeof input.format && (undefined === input.transcribe || "object" === typeof input.transcribe && null !== input.transcribe && $io2(input.transcribe)) && (undefined === input.translate || "object" === typeof input.translate && null !== input.translate && $io3(input.translate)) && (undefined === input.audio || "object" === typeof input.audio && null !== input.audio && false === Array.isArray(input.audio) && $io4(input.audio)) && true && (undefined === input.pick || Array.isArray(input.pick) && input.pick.every(elem => "string" === typeof elem));
|
|
4
|
+
const $io1 = input => "string" === typeof input.format && (undefined === input.transcribe || "object" === typeof input.transcribe && null !== input.transcribe && $io2(input.transcribe)) && (undefined === input.translate || "object" === typeof input.translate && null !== input.translate && $io3(input.translate)) && (undefined === input.audio || "object" === typeof input.audio && null !== input.audio && false === Array.isArray(input.audio) && $io4(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) && $io5(input.subtitle)));
|
|
5
5
|
const $io2 = input => "string" === typeof input.engine;
|
|
6
6
|
const $io3 = input => "string" === typeof input.language;
|
|
7
7
|
const $io4 = input => undefined === input.pan || "string" === typeof input.pan;
|
|
8
|
+
const $io5 = input => (undefined === input.lang || "string" === typeof input.lang) && (undefined === input.style || "string" === typeof input.style);
|
|
8
9
|
return "object" === typeof input && null !== input && $io0(input);
|
|
9
10
|
};
|
|
10
11
|
export const assertRenderPresetObject = (input, errorFactory) => {
|
|
11
12
|
const __is = input => {
|
|
12
13
|
const $io0 = input => "string" === typeof input.type && (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 && $io1(elem))) || "object" === typeof input.profile && null !== input.profile && $io1(input.profile))));
|
|
13
|
-
const $io1 = input => "string" === typeof input.format && (undefined === input.transcribe || "object" === typeof input.transcribe && null !== input.transcribe && $io2(input.transcribe)) && (undefined === input.translate || "object" === typeof input.translate && null !== input.translate && $io3(input.translate)) && (undefined === input.audio || "object" === typeof input.audio && null !== input.audio && false === Array.isArray(input.audio) && $io4(input.audio)) && true && (undefined === input.pick || Array.isArray(input.pick) && input.pick.every(elem => "string" === typeof elem));
|
|
14
|
+
const $io1 = input => "string" === typeof input.format && (undefined === input.transcribe || "object" === typeof input.transcribe && null !== input.transcribe && $io2(input.transcribe)) && (undefined === input.translate || "object" === typeof input.translate && null !== input.translate && $io3(input.translate)) && (undefined === input.audio || "object" === typeof input.audio && null !== input.audio && false === Array.isArray(input.audio) && $io4(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) && $io5(input.subtitle)));
|
|
14
15
|
const $io2 = input => "string" === typeof input.engine;
|
|
15
16
|
const $io3 = input => "string" === typeof input.language;
|
|
16
17
|
const $io4 = input => undefined === input.pan || "string" === typeof input.pan;
|
|
18
|
+
const $io5 = input => (undefined === input.lang || "string" === typeof input.lang) && (undefined === input.style || "string" === typeof input.style);
|
|
17
19
|
return "object" === typeof input && null !== input && $io0(input);
|
|
18
20
|
};
|
|
19
21
|
if (false === __is(input))
|
|
@@ -96,7 +98,19 @@ export const assertRenderPresetObject = (input, errorFactory) => {
|
|
|
96
98
|
path: _path + ".pick",
|
|
97
99
|
expected: "(Array<string> | undefined)",
|
|
98
100
|
value: input.pick
|
|
99
|
-
}, errorFactory))
|
|
101
|
+
}, errorFactory)) && ((null !== input.subtitle || $guard(_exceptionable, {
|
|
102
|
+
path: _path + ".subtitle",
|
|
103
|
+
expected: "(SubtitleProfile | string | undefined)",
|
|
104
|
+
value: input.subtitle
|
|
105
|
+
}, errorFactory)) && (undefined === input.subtitle || "string" === typeof input.subtitle || ("object" === typeof input.subtitle && null !== input.subtitle && false === Array.isArray(input.subtitle) || $guard(_exceptionable, {
|
|
106
|
+
path: _path + ".subtitle",
|
|
107
|
+
expected: "(SubtitleProfile | string | undefined)",
|
|
108
|
+
value: input.subtitle
|
|
109
|
+
}, errorFactory)) && $ao5(input.subtitle, _path + ".subtitle", true && _exceptionable) || $guard(_exceptionable, {
|
|
110
|
+
path: _path + ".subtitle",
|
|
111
|
+
expected: "(SubtitleProfile | string | undefined)",
|
|
112
|
+
value: input.subtitle
|
|
113
|
+
}, errorFactory)));
|
|
100
114
|
const $ao2 = (input, _path, _exceptionable = true) => "string" === typeof input.engine || $guard(_exceptionable, {
|
|
101
115
|
path: _path + ".engine",
|
|
102
116
|
expected: "string",
|
|
@@ -112,6 +126,15 @@ export const assertRenderPresetObject = (input, errorFactory) => {
|
|
|
112
126
|
expected: "(string | undefined)",
|
|
113
127
|
value: input.pan
|
|
114
128
|
}, errorFactory);
|
|
129
|
+
const $ao5 = (input, _path, _exceptionable = true) => (undefined === input.lang || "string" === typeof input.lang || $guard(_exceptionable, {
|
|
130
|
+
path: _path + ".lang",
|
|
131
|
+
expected: "(string | undefined)",
|
|
132
|
+
value: input.lang
|
|
133
|
+
}, errorFactory)) && (undefined === input.style || "string" === typeof input.style || $guard(_exceptionable, {
|
|
134
|
+
path: _path + ".style",
|
|
135
|
+
expected: "(string | undefined)",
|
|
136
|
+
value: input.style
|
|
137
|
+
}, errorFactory));
|
|
115
138
|
return ("object" === typeof input && null !== input || $guard(true, {
|
|
116
139
|
path: _path + "",
|
|
117
140
|
expected: "RenderPresetObject",
|
|
@@ -159,6 +182,11 @@ export const randomRenderPresetObject = generator => {
|
|
|
159
182
|
pick: $pick([
|
|
160
183
|
() => undefined,
|
|
161
184
|
() => (generator?.array ?? $generator.array)(() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)())
|
|
185
|
+
])(),
|
|
186
|
+
subtitle: $pick([
|
|
187
|
+
() => undefined,
|
|
188
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
|
|
189
|
+
() => $ro5(_recursive, _recursive ? 1 + _depth : _depth)
|
|
162
190
|
])()
|
|
163
191
|
});
|
|
164
192
|
const $ro2 = (_recursive = false, _depth = 0) => ({
|
|
@@ -173,15 +201,26 @@ export const randomRenderPresetObject = generator => {
|
|
|
173
201
|
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
174
202
|
])()
|
|
175
203
|
});
|
|
204
|
+
const $ro5 = (_recursive = false, _depth = 0) => ({
|
|
205
|
+
lang: $pick([
|
|
206
|
+
() => undefined,
|
|
207
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
208
|
+
])(),
|
|
209
|
+
style: $pick([
|
|
210
|
+
() => undefined,
|
|
211
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
212
|
+
])()
|
|
213
|
+
});
|
|
176
214
|
return $ro0();
|
|
177
215
|
};
|
|
178
216
|
export const assertGuardRenderPresetObject = (input, errorFactory) => {
|
|
179
217
|
const __is = input => {
|
|
180
218
|
const $io0 = input => "string" === typeof input.type && (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 && $io1(elem))) || "object" === typeof input.profile && null !== input.profile && $io1(input.profile))));
|
|
181
|
-
const $io1 = input => "string" === typeof input.format && (undefined === input.transcribe || "object" === typeof input.transcribe && null !== input.transcribe && $io2(input.transcribe)) && (undefined === input.translate || "object" === typeof input.translate && null !== input.translate && $io3(input.translate)) && (undefined === input.audio || "object" === typeof input.audio && null !== input.audio && false === Array.isArray(input.audio) && $io4(input.audio)) && true && (undefined === input.pick || Array.isArray(input.pick) && input.pick.every(elem => "string" === typeof elem));
|
|
219
|
+
const $io1 = input => "string" === typeof input.format && (undefined === input.transcribe || "object" === typeof input.transcribe && null !== input.transcribe && $io2(input.transcribe)) && (undefined === input.translate || "object" === typeof input.translate && null !== input.translate && $io3(input.translate)) && (undefined === input.audio || "object" === typeof input.audio && null !== input.audio && false === Array.isArray(input.audio) && $io4(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) && $io5(input.subtitle)));
|
|
182
220
|
const $io2 = input => "string" === typeof input.engine;
|
|
183
221
|
const $io3 = input => "string" === typeof input.language;
|
|
184
222
|
const $io4 = input => undefined === input.pan || "string" === typeof input.pan;
|
|
223
|
+
const $io5 = input => (undefined === input.lang || "string" === typeof input.lang) && (undefined === input.style || "string" === typeof input.style);
|
|
185
224
|
return "object" === typeof input && null !== input && $io0(input);
|
|
186
225
|
};
|
|
187
226
|
if (false === __is(input))
|
|
@@ -264,7 +303,19 @@ export const assertGuardRenderPresetObject = (input, errorFactory) => {
|
|
|
264
303
|
path: _path + ".pick",
|
|
265
304
|
expected: "(Array<string> | undefined)",
|
|
266
305
|
value: input.pick
|
|
267
|
-
}, errorFactory))
|
|
306
|
+
}, errorFactory)) && ((null !== input.subtitle || $guard(_exceptionable, {
|
|
307
|
+
path: _path + ".subtitle",
|
|
308
|
+
expected: "(SubtitleProfile | string | undefined)",
|
|
309
|
+
value: input.subtitle
|
|
310
|
+
}, errorFactory)) && (undefined === input.subtitle || "string" === typeof input.subtitle || ("object" === typeof input.subtitle && null !== input.subtitle && false === Array.isArray(input.subtitle) || $guard(_exceptionable, {
|
|
311
|
+
path: _path + ".subtitle",
|
|
312
|
+
expected: "(SubtitleProfile | string | undefined)",
|
|
313
|
+
value: input.subtitle
|
|
314
|
+
}, errorFactory)) && $ao5(input.subtitle, _path + ".subtitle", true && _exceptionable) || $guard(_exceptionable, {
|
|
315
|
+
path: _path + ".subtitle",
|
|
316
|
+
expected: "(SubtitleProfile | string | undefined)",
|
|
317
|
+
value: input.subtitle
|
|
318
|
+
}, errorFactory)));
|
|
268
319
|
const $ao2 = (input, _path, _exceptionable = true) => "string" === typeof input.engine || $guard(_exceptionable, {
|
|
269
320
|
path: _path + ".engine",
|
|
270
321
|
expected: "string",
|
|
@@ -280,6 +331,15 @@ export const assertGuardRenderPresetObject = (input, errorFactory) => {
|
|
|
280
331
|
expected: "(string | undefined)",
|
|
281
332
|
value: input.pan
|
|
282
333
|
}, errorFactory);
|
|
334
|
+
const $ao5 = (input, _path, _exceptionable = true) => (undefined === input.lang || "string" === typeof input.lang || $guard(_exceptionable, {
|
|
335
|
+
path: _path + ".lang",
|
|
336
|
+
expected: "(string | undefined)",
|
|
337
|
+
value: input.lang
|
|
338
|
+
}, errorFactory)) && (undefined === input.style || "string" === typeof input.style || $guard(_exceptionable, {
|
|
339
|
+
path: _path + ".style",
|
|
340
|
+
expected: "(string | undefined)",
|
|
341
|
+
value: input.style
|
|
342
|
+
}, errorFactory));
|
|
283
343
|
return ("object" === typeof input && null !== input || $guard(true, {
|
|
284
344
|
path: _path + "",
|
|
285
345
|
expected: "RenderPresetObject",
|
|
@@ -292,10 +352,11 @@ export const assertGuardRenderPresetObject = (input, errorFactory) => {
|
|
|
292
352
|
})(input, "$input", true);
|
|
293
353
|
};
|
|
294
354
|
export const stringifyRenderPresetObject = input => {
|
|
295
|
-
const $io1 = input => "string" === typeof input.format && (undefined === input.transcribe || "object" === typeof input.transcribe && null !== input.transcribe && $io2(input.transcribe)) && (undefined === input.translate || "object" === typeof input.translate && null !== input.translate && $io3(input.translate)) && (undefined === input.audio || "object" === typeof input.audio && null !== input.audio && false === Array.isArray(input.audio) && $io4(input.audio)) && true && (undefined === input.pick || Array.isArray(input.pick) && input.pick.every(elem => "string" === typeof elem));
|
|
355
|
+
const $io1 = input => "string" === typeof input.format && (undefined === input.transcribe || "object" === typeof input.transcribe && null !== input.transcribe && $io2(input.transcribe)) && (undefined === input.translate || "object" === typeof input.translate && null !== input.translate && $io3(input.translate)) && (undefined === input.audio || "object" === typeof input.audio && null !== input.audio && false === Array.isArray(input.audio) && $io4(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) && $io5(input.subtitle)));
|
|
296
356
|
const $io2 = input => "string" === typeof input.engine;
|
|
297
357
|
const $io3 = input => "string" === typeof input.language;
|
|
298
358
|
const $io4 = input => undefined === input.pan || "string" === typeof input.pan;
|
|
359
|
+
const $io5 = input => (undefined === input.lang || "string" === typeof input.lang) && (undefined === input.style || "string" === typeof input.style);
|
|
299
360
|
const $string = __typia.json.createStringify.string;
|
|
300
361
|
const $throws = __typia.json.createStringify.throws;
|
|
301
362
|
const $tail = __typia.json.createStringify.tail;
|
|
@@ -320,17 +381,28 @@ export const stringifyRenderPresetObject = input => {
|
|
|
320
381
|
value: input.profile
|
|
321
382
|
});
|
|
322
383
|
})()}}`;
|
|
323
|
-
const $so1 = 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 ? $so4(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},`}"
|
|
384
|
+
const $so1 = 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 ? $so4(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 ? (() => {
|
|
385
|
+
if ("string" === typeof input.subtitle)
|
|
386
|
+
return $string(input.subtitle);
|
|
387
|
+
if ("object" === typeof input.subtitle && null !== input.subtitle && false === Array.isArray(input.subtitle))
|
|
388
|
+
return $so5(input.subtitle);
|
|
389
|
+
$throws({
|
|
390
|
+
expected: "(SubtitleProfile | string | undefined)",
|
|
391
|
+
value: input.subtitle
|
|
392
|
+
});
|
|
393
|
+
})() : undefined},`}"format":${$string(input.format)}}`;
|
|
324
394
|
const $so4 = input => `{${$tail(`${undefined === input.pan ? "" : `"pan":${undefined !== input.pan ? $string(input.pan) : undefined}`}`)}}`;
|
|
395
|
+
const $so5 = input => `{${$tail(`${undefined === input.lang ? "" : `"lang":${undefined !== input.lang ? $string(input.lang) : undefined},`}${undefined === input.style ? "" : `"style":${undefined !== input.style ? $string(input.style) : undefined}`}`)}}`;
|
|
325
396
|
return $so0(input);
|
|
326
397
|
};
|
|
327
398
|
export const assertStringifyRenderPresetObject = (input, errorFactory) => { const assert = (input, errorFactory) => {
|
|
328
399
|
const __is = input => {
|
|
329
400
|
const $io0 = input => "string" === typeof input.type && (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 && $io1(elem))) || "object" === typeof input.profile && null !== input.profile && $io1(input.profile))));
|
|
330
|
-
const $io1 = input => "string" === typeof input.format && (undefined === input.transcribe || "object" === typeof input.transcribe && null !== input.transcribe && $io2(input.transcribe)) && (undefined === input.translate || "object" === typeof input.translate && null !== input.translate && $io3(input.translate)) && (undefined === input.audio || "object" === typeof input.audio && null !== input.audio && false === Array.isArray(input.audio) && $io4(input.audio)) && true && (undefined === input.pick || Array.isArray(input.pick) && input.pick.every(elem => "string" === typeof elem));
|
|
401
|
+
const $io1 = input => "string" === typeof input.format && (undefined === input.transcribe || "object" === typeof input.transcribe && null !== input.transcribe && $io2(input.transcribe)) && (undefined === input.translate || "object" === typeof input.translate && null !== input.translate && $io3(input.translate)) && (undefined === input.audio || "object" === typeof input.audio && null !== input.audio && false === Array.isArray(input.audio) && $io4(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) && $io5(input.subtitle)));
|
|
331
402
|
const $io2 = input => "string" === typeof input.engine;
|
|
332
403
|
const $io3 = input => "string" === typeof input.language;
|
|
333
404
|
const $io4 = input => undefined === input.pan || "string" === typeof input.pan;
|
|
405
|
+
const $io5 = input => (undefined === input.lang || "string" === typeof input.lang) && (undefined === input.style || "string" === typeof input.style);
|
|
334
406
|
return "object" === typeof input && null !== input && $io0(input);
|
|
335
407
|
};
|
|
336
408
|
if (false === __is(input))
|
|
@@ -413,7 +485,19 @@ export const assertStringifyRenderPresetObject = (input, errorFactory) => { cons
|
|
|
413
485
|
path: _path + ".pick",
|
|
414
486
|
expected: "(Array<string> | undefined)",
|
|
415
487
|
value: input.pick
|
|
416
|
-
}, errorFactory))
|
|
488
|
+
}, errorFactory)) && ((null !== input.subtitle || $guard(_exceptionable, {
|
|
489
|
+
path: _path + ".subtitle",
|
|
490
|
+
expected: "(SubtitleProfile | string | undefined)",
|
|
491
|
+
value: input.subtitle
|
|
492
|
+
}, errorFactory)) && (undefined === input.subtitle || "string" === typeof input.subtitle || ("object" === typeof input.subtitle && null !== input.subtitle && false === Array.isArray(input.subtitle) || $guard(_exceptionable, {
|
|
493
|
+
path: _path + ".subtitle",
|
|
494
|
+
expected: "(SubtitleProfile | string | undefined)",
|
|
495
|
+
value: input.subtitle
|
|
496
|
+
}, errorFactory)) && $ao5(input.subtitle, _path + ".subtitle", true && _exceptionable) || $guard(_exceptionable, {
|
|
497
|
+
path: _path + ".subtitle",
|
|
498
|
+
expected: "(SubtitleProfile | string | undefined)",
|
|
499
|
+
value: input.subtitle
|
|
500
|
+
}, errorFactory)));
|
|
417
501
|
const $ao2 = (input, _path, _exceptionable = true) => "string" === typeof input.engine || $guard(_exceptionable, {
|
|
418
502
|
path: _path + ".engine",
|
|
419
503
|
expected: "string",
|
|
@@ -429,6 +513,15 @@ export const assertStringifyRenderPresetObject = (input, errorFactory) => { cons
|
|
|
429
513
|
expected: "(string | undefined)",
|
|
430
514
|
value: input.pan
|
|
431
515
|
}, errorFactory);
|
|
516
|
+
const $ao5 = (input, _path, _exceptionable = true) => (undefined === input.lang || "string" === typeof input.lang || $guard(_exceptionable, {
|
|
517
|
+
path: _path + ".lang",
|
|
518
|
+
expected: "(string | undefined)",
|
|
519
|
+
value: input.lang
|
|
520
|
+
}, errorFactory)) && (undefined === input.style || "string" === typeof input.style || $guard(_exceptionable, {
|
|
521
|
+
path: _path + ".style",
|
|
522
|
+
expected: "(string | undefined)",
|
|
523
|
+
value: input.style
|
|
524
|
+
}, errorFactory));
|
|
432
525
|
return ("object" === typeof input && null !== input || $guard(true, {
|
|
433
526
|
path: _path + "",
|
|
434
527
|
expected: "RenderPresetObject",
|
|
@@ -441,10 +534,11 @@ export const assertStringifyRenderPresetObject = (input, errorFactory) => { cons
|
|
|
441
534
|
})(input, "$input", true);
|
|
442
535
|
return input;
|
|
443
536
|
}; const stringify = input => {
|
|
444
|
-
const $io1 = input => "string" === typeof input.format && (undefined === input.transcribe || "object" === typeof input.transcribe && null !== input.transcribe && $io2(input.transcribe)) && (undefined === input.translate || "object" === typeof input.translate && null !== input.translate && $io3(input.translate)) && (undefined === input.audio || "object" === typeof input.audio && null !== input.audio && false === Array.isArray(input.audio) && $io4(input.audio)) && true && (undefined === input.pick || Array.isArray(input.pick) && input.pick.every(elem => "string" === typeof elem));
|
|
537
|
+
const $io1 = input => "string" === typeof input.format && (undefined === input.transcribe || "object" === typeof input.transcribe && null !== input.transcribe && $io2(input.transcribe)) && (undefined === input.translate || "object" === typeof input.translate && null !== input.translate && $io3(input.translate)) && (undefined === input.audio || "object" === typeof input.audio && null !== input.audio && false === Array.isArray(input.audio) && $io4(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) && $io5(input.subtitle)));
|
|
445
538
|
const $io2 = input => "string" === typeof input.engine;
|
|
446
539
|
const $io3 = input => "string" === typeof input.language;
|
|
447
540
|
const $io4 = input => undefined === input.pan || "string" === typeof input.pan;
|
|
541
|
+
const $io5 = input => (undefined === input.lang || "string" === typeof input.lang) && (undefined === input.style || "string" === typeof input.style);
|
|
448
542
|
const $string = __typia.json.createAssertStringify.string;
|
|
449
543
|
const $throws = __typia.json.createAssertStringify.throws;
|
|
450
544
|
const $tail = __typia.json.createAssertStringify.tail;
|
|
@@ -469,25 +563,37 @@ export const assertStringifyRenderPresetObject = (input, errorFactory) => { cons
|
|
|
469
563
|
value: input.profile
|
|
470
564
|
});
|
|
471
565
|
})()}}`;
|
|
472
|
-
const $so1 = 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 ? $so4(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},`}"
|
|
566
|
+
const $so1 = 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 ? $so4(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 ? (() => {
|
|
567
|
+
if ("string" === typeof input.subtitle)
|
|
568
|
+
return $string(input.subtitle);
|
|
569
|
+
if ("object" === typeof input.subtitle && null !== input.subtitle && false === Array.isArray(input.subtitle))
|
|
570
|
+
return $so5(input.subtitle);
|
|
571
|
+
$throws({
|
|
572
|
+
expected: "(SubtitleProfile | string | undefined)",
|
|
573
|
+
value: input.subtitle
|
|
574
|
+
});
|
|
575
|
+
})() : undefined},`}"format":${$string(input.format)}}`;
|
|
473
576
|
const $so4 = input => `{${$tail(`${undefined === input.pan ? "" : `"pan":${undefined !== input.pan ? $string(input.pan) : undefined}`}`)}}`;
|
|
577
|
+
const $so5 = input => `{${$tail(`${undefined === input.lang ? "" : `"lang":${undefined !== input.lang ? $string(input.lang) : undefined},`}${undefined === input.style ? "" : `"style":${undefined !== input.style ? $string(input.style) : undefined}`}`)}}`;
|
|
474
578
|
return $so0(input);
|
|
475
579
|
}; return stringify(assert(input, errorFactory)); };
|
|
476
580
|
export const isRenderPreset = input => {
|
|
477
581
|
const $io0 = input => "string" === typeof input.type && (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 && $io1(elem))) || "object" === typeof input.profile && null !== input.profile && $io1(input.profile))));
|
|
478
|
-
const $io1 = input => "string" === typeof input.format && (undefined === input.transcribe || "object" === typeof input.transcribe && null !== input.transcribe && $io2(input.transcribe)) && (undefined === input.translate || "object" === typeof input.translate && null !== input.translate && $io3(input.translate)) && (undefined === input.audio || "object" === typeof input.audio && null !== input.audio && false === Array.isArray(input.audio) && $io4(input.audio)) && true && (undefined === input.pick || Array.isArray(input.pick) && input.pick.every(elem => "string" === typeof elem));
|
|
582
|
+
const $io1 = input => "string" === typeof input.format && (undefined === input.transcribe || "object" === typeof input.transcribe && null !== input.transcribe && $io2(input.transcribe)) && (undefined === input.translate || "object" === typeof input.translate && null !== input.translate && $io3(input.translate)) && (undefined === input.audio || "object" === typeof input.audio && null !== input.audio && false === Array.isArray(input.audio) && $io4(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) && $io5(input.subtitle)));
|
|
479
583
|
const $io2 = input => "string" === typeof input.engine;
|
|
480
584
|
const $io3 = input => "string" === typeof input.language;
|
|
481
585
|
const $io4 = input => undefined === input.pan || "string" === typeof input.pan;
|
|
586
|
+
const $io5 = input => (undefined === input.lang || "string" === typeof input.lang) && (undefined === input.style || "string" === typeof input.style);
|
|
482
587
|
return null !== input && undefined !== input && ("string" === typeof input || "object" === typeof input && null !== input && $io0(input));
|
|
483
588
|
};
|
|
484
589
|
export const assertRenderPreset = (input, errorFactory) => {
|
|
485
590
|
const __is = input => {
|
|
486
591
|
const $io0 = input => "string" === typeof input.type && (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 && $io1(elem))) || "object" === typeof input.profile && null !== input.profile && $io1(input.profile))));
|
|
487
|
-
const $io1 = input => "string" === typeof input.format && (undefined === input.transcribe || "object" === typeof input.transcribe && null !== input.transcribe && $io2(input.transcribe)) && (undefined === input.translate || "object" === typeof input.translate && null !== input.translate && $io3(input.translate)) && (undefined === input.audio || "object" === typeof input.audio && null !== input.audio && false === Array.isArray(input.audio) && $io4(input.audio)) && true && (undefined === input.pick || Array.isArray(input.pick) && input.pick.every(elem => "string" === typeof elem));
|
|
592
|
+
const $io1 = input => "string" === typeof input.format && (undefined === input.transcribe || "object" === typeof input.transcribe && null !== input.transcribe && $io2(input.transcribe)) && (undefined === input.translate || "object" === typeof input.translate && null !== input.translate && $io3(input.translate)) && (undefined === input.audio || "object" === typeof input.audio && null !== input.audio && false === Array.isArray(input.audio) && $io4(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) && $io5(input.subtitle)));
|
|
488
593
|
const $io2 = input => "string" === typeof input.engine;
|
|
489
594
|
const $io3 = input => "string" === typeof input.language;
|
|
490
595
|
const $io4 = input => undefined === input.pan || "string" === typeof input.pan;
|
|
596
|
+
const $io5 = input => (undefined === input.lang || "string" === typeof input.lang) && (undefined === input.style || "string" === typeof input.style);
|
|
491
597
|
return null !== input && undefined !== input && ("string" === typeof input || "object" === typeof input && null !== input && $io0(input));
|
|
492
598
|
};
|
|
493
599
|
if (false === __is(input))
|
|
@@ -570,7 +676,19 @@ export const assertRenderPreset = (input, errorFactory) => {
|
|
|
570
676
|
path: _path + ".pick",
|
|
571
677
|
expected: "(Array<string> | undefined)",
|
|
572
678
|
value: input.pick
|
|
573
|
-
}, errorFactory))
|
|
679
|
+
}, errorFactory)) && ((null !== input.subtitle || $guard(_exceptionable, {
|
|
680
|
+
path: _path + ".subtitle",
|
|
681
|
+
expected: "(SubtitleProfile | string | undefined)",
|
|
682
|
+
value: input.subtitle
|
|
683
|
+
}, errorFactory)) && (undefined === input.subtitle || "string" === typeof input.subtitle || ("object" === typeof input.subtitle && null !== input.subtitle && false === Array.isArray(input.subtitle) || $guard(_exceptionable, {
|
|
684
|
+
path: _path + ".subtitle",
|
|
685
|
+
expected: "(SubtitleProfile | string | undefined)",
|
|
686
|
+
value: input.subtitle
|
|
687
|
+
}, errorFactory)) && $ao5(input.subtitle, _path + ".subtitle", true && _exceptionable) || $guard(_exceptionable, {
|
|
688
|
+
path: _path + ".subtitle",
|
|
689
|
+
expected: "(SubtitleProfile | string | undefined)",
|
|
690
|
+
value: input.subtitle
|
|
691
|
+
}, errorFactory)));
|
|
574
692
|
const $ao2 = (input, _path, _exceptionable = true) => "string" === typeof input.engine || $guard(_exceptionable, {
|
|
575
693
|
path: _path + ".engine",
|
|
576
694
|
expected: "string",
|
|
@@ -586,6 +704,15 @@ export const assertRenderPreset = (input, errorFactory) => {
|
|
|
586
704
|
expected: "(string | undefined)",
|
|
587
705
|
value: input.pan
|
|
588
706
|
}, errorFactory);
|
|
707
|
+
const $ao5 = (input, _path, _exceptionable = true) => (undefined === input.lang || "string" === typeof input.lang || $guard(_exceptionable, {
|
|
708
|
+
path: _path + ".lang",
|
|
709
|
+
expected: "(string | undefined)",
|
|
710
|
+
value: input.lang
|
|
711
|
+
}, errorFactory)) && (undefined === input.style || "string" === typeof input.style || $guard(_exceptionable, {
|
|
712
|
+
path: _path + ".style",
|
|
713
|
+
expected: "(string | undefined)",
|
|
714
|
+
value: input.style
|
|
715
|
+
}, errorFactory));
|
|
589
716
|
return (null !== input || $guard(true, {
|
|
590
717
|
path: _path + "",
|
|
591
718
|
expected: "(RenderPresetObject | string)",
|
|
@@ -641,6 +768,11 @@ export const randomRenderPreset = generator => {
|
|
|
641
768
|
pick: $pick([
|
|
642
769
|
() => undefined,
|
|
643
770
|
() => (generator?.array ?? $generator.array)(() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)())
|
|
771
|
+
])(),
|
|
772
|
+
subtitle: $pick([
|
|
773
|
+
() => undefined,
|
|
774
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
|
|
775
|
+
() => $ro5(_recursive, _recursive ? 1 + _depth : _depth)
|
|
644
776
|
])()
|
|
645
777
|
});
|
|
646
778
|
const $ro2 = (_recursive = false, _depth = 0) => ({
|
|
@@ -655,6 +787,16 @@ export const randomRenderPreset = generator => {
|
|
|
655
787
|
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
656
788
|
])()
|
|
657
789
|
});
|
|
790
|
+
const $ro5 = (_recursive = false, _depth = 0) => ({
|
|
791
|
+
lang: $pick([
|
|
792
|
+
() => undefined,
|
|
793
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
794
|
+
])(),
|
|
795
|
+
style: $pick([
|
|
796
|
+
() => undefined,
|
|
797
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
798
|
+
])()
|
|
799
|
+
});
|
|
658
800
|
return $pick([
|
|
659
801
|
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
|
|
660
802
|
() => $ro0()
|
|
@@ -663,10 +805,11 @@ export const randomRenderPreset = generator => {
|
|
|
663
805
|
export const assertGuardRenderPreset = (input, errorFactory) => {
|
|
664
806
|
const __is = input => {
|
|
665
807
|
const $io0 = input => "string" === typeof input.type && (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 && $io1(elem))) || "object" === typeof input.profile && null !== input.profile && $io1(input.profile))));
|
|
666
|
-
const $io1 = input => "string" === typeof input.format && (undefined === input.transcribe || "object" === typeof input.transcribe && null !== input.transcribe && $io2(input.transcribe)) && (undefined === input.translate || "object" === typeof input.translate && null !== input.translate && $io3(input.translate)) && (undefined === input.audio || "object" === typeof input.audio && null !== input.audio && false === Array.isArray(input.audio) && $io4(input.audio)) && true && (undefined === input.pick || Array.isArray(input.pick) && input.pick.every(elem => "string" === typeof elem));
|
|
808
|
+
const $io1 = input => "string" === typeof input.format && (undefined === input.transcribe || "object" === typeof input.transcribe && null !== input.transcribe && $io2(input.transcribe)) && (undefined === input.translate || "object" === typeof input.translate && null !== input.translate && $io3(input.translate)) && (undefined === input.audio || "object" === typeof input.audio && null !== input.audio && false === Array.isArray(input.audio) && $io4(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) && $io5(input.subtitle)));
|
|
667
809
|
const $io2 = input => "string" === typeof input.engine;
|
|
668
810
|
const $io3 = input => "string" === typeof input.language;
|
|
669
811
|
const $io4 = input => undefined === input.pan || "string" === typeof input.pan;
|
|
812
|
+
const $io5 = input => (undefined === input.lang || "string" === typeof input.lang) && (undefined === input.style || "string" === typeof input.style);
|
|
670
813
|
return null !== input && undefined !== input && ("string" === typeof input || "object" === typeof input && null !== input && $io0(input));
|
|
671
814
|
};
|
|
672
815
|
if (false === __is(input))
|
|
@@ -749,7 +892,19 @@ export const assertGuardRenderPreset = (input, errorFactory) => {
|
|
|
749
892
|
path: _path + ".pick",
|
|
750
893
|
expected: "(Array<string> | undefined)",
|
|
751
894
|
value: input.pick
|
|
752
|
-
}, errorFactory))
|
|
895
|
+
}, errorFactory)) && ((null !== input.subtitle || $guard(_exceptionable, {
|
|
896
|
+
path: _path + ".subtitle",
|
|
897
|
+
expected: "(SubtitleProfile | string | undefined)",
|
|
898
|
+
value: input.subtitle
|
|
899
|
+
}, errorFactory)) && (undefined === input.subtitle || "string" === typeof input.subtitle || ("object" === typeof input.subtitle && null !== input.subtitle && false === Array.isArray(input.subtitle) || $guard(_exceptionable, {
|
|
900
|
+
path: _path + ".subtitle",
|
|
901
|
+
expected: "(SubtitleProfile | string | undefined)",
|
|
902
|
+
value: input.subtitle
|
|
903
|
+
}, errorFactory)) && $ao5(input.subtitle, _path + ".subtitle", true && _exceptionable) || $guard(_exceptionable, {
|
|
904
|
+
path: _path + ".subtitle",
|
|
905
|
+
expected: "(SubtitleProfile | string | undefined)",
|
|
906
|
+
value: input.subtitle
|
|
907
|
+
}, errorFactory)));
|
|
753
908
|
const $ao2 = (input, _path, _exceptionable = true) => "string" === typeof input.engine || $guard(_exceptionable, {
|
|
754
909
|
path: _path + ".engine",
|
|
755
910
|
expected: "string",
|
|
@@ -765,6 +920,15 @@ export const assertGuardRenderPreset = (input, errorFactory) => {
|
|
|
765
920
|
expected: "(string | undefined)",
|
|
766
921
|
value: input.pan
|
|
767
922
|
}, errorFactory);
|
|
923
|
+
const $ao5 = (input, _path, _exceptionable = true) => (undefined === input.lang || "string" === typeof input.lang || $guard(_exceptionable, {
|
|
924
|
+
path: _path + ".lang",
|
|
925
|
+
expected: "(string | undefined)",
|
|
926
|
+
value: input.lang
|
|
927
|
+
}, errorFactory)) && (undefined === input.style || "string" === typeof input.style || $guard(_exceptionable, {
|
|
928
|
+
path: _path + ".style",
|
|
929
|
+
expected: "(string | undefined)",
|
|
930
|
+
value: input.style
|
|
931
|
+
}, errorFactory));
|
|
768
932
|
return (null !== input || $guard(true, {
|
|
769
933
|
path: _path + "",
|
|
770
934
|
expected: "(RenderPresetObject | string)",
|
|
@@ -785,10 +949,11 @@ export const assertGuardRenderPreset = (input, errorFactory) => {
|
|
|
785
949
|
})(input, "$input", true);
|
|
786
950
|
};
|
|
787
951
|
export const stringifyRenderPreset = input => {
|
|
788
|
-
const $io1 = input => "string" === typeof input.format && (undefined === input.transcribe || "object" === typeof input.transcribe && null !== input.transcribe && $io2(input.transcribe)) && (undefined === input.translate || "object" === typeof input.translate && null !== input.translate && $io3(input.translate)) && (undefined === input.audio || "object" === typeof input.audio && null !== input.audio && false === Array.isArray(input.audio) && $io4(input.audio)) && true && (undefined === input.pick || Array.isArray(input.pick) && input.pick.every(elem => "string" === typeof elem));
|
|
952
|
+
const $io1 = input => "string" === typeof input.format && (undefined === input.transcribe || "object" === typeof input.transcribe && null !== input.transcribe && $io2(input.transcribe)) && (undefined === input.translate || "object" === typeof input.translate && null !== input.translate && $io3(input.translate)) && (undefined === input.audio || "object" === typeof input.audio && null !== input.audio && false === Array.isArray(input.audio) && $io4(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) && $io5(input.subtitle)));
|
|
789
953
|
const $io2 = input => "string" === typeof input.engine;
|
|
790
954
|
const $io3 = input => "string" === typeof input.language;
|
|
791
955
|
const $io4 = input => undefined === input.pan || "string" === typeof input.pan;
|
|
956
|
+
const $io5 = input => (undefined === input.lang || "string" === typeof input.lang) && (undefined === input.style || "string" === typeof input.style);
|
|
792
957
|
const $string = __typia.json.createStringify.string;
|
|
793
958
|
const $throws = __typia.json.createStringify.throws;
|
|
794
959
|
const $tail = __typia.json.createStringify.tail;
|
|
@@ -813,8 +978,18 @@ export const stringifyRenderPreset = input => {
|
|
|
813
978
|
value: input.profile
|
|
814
979
|
});
|
|
815
980
|
})()}}`;
|
|
816
|
-
const $so1 = 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 ? $so4(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},`}"
|
|
981
|
+
const $so1 = 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 ? $so4(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 ? (() => {
|
|
982
|
+
if ("string" === typeof input.subtitle)
|
|
983
|
+
return $string(input.subtitle);
|
|
984
|
+
if ("object" === typeof input.subtitle && null !== input.subtitle && false === Array.isArray(input.subtitle))
|
|
985
|
+
return $so5(input.subtitle);
|
|
986
|
+
$throws({
|
|
987
|
+
expected: "(SubtitleProfile | string | undefined)",
|
|
988
|
+
value: input.subtitle
|
|
989
|
+
});
|
|
990
|
+
})() : undefined},`}"format":${$string(input.format)}}`;
|
|
817
991
|
const $so4 = input => `{${$tail(`${undefined === input.pan ? "" : `"pan":${undefined !== input.pan ? $string(input.pan) : undefined}`}`)}}`;
|
|
992
|
+
const $so5 = input => `{${$tail(`${undefined === input.lang ? "" : `"lang":${undefined !== input.lang ? $string(input.lang) : undefined},`}${undefined === input.style ? "" : `"style":${undefined !== input.style ? $string(input.style) : undefined}`}`)}}`;
|
|
818
993
|
return (() => {
|
|
819
994
|
if ("string" === typeof input)
|
|
820
995
|
return $string(input);
|
|
@@ -829,10 +1004,11 @@ export const stringifyRenderPreset = input => {
|
|
|
829
1004
|
export const assertStringifyRenderPreset = (input, errorFactory) => { const assert = (input, errorFactory) => {
|
|
830
1005
|
const __is = input => {
|
|
831
1006
|
const $io0 = input => "string" === typeof input.type && (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 && $io1(elem))) || "object" === typeof input.profile && null !== input.profile && $io1(input.profile))));
|
|
832
|
-
const $io1 = input => "string" === typeof input.format && (undefined === input.transcribe || "object" === typeof input.transcribe && null !== input.transcribe && $io2(input.transcribe)) && (undefined === input.translate || "object" === typeof input.translate && null !== input.translate && $io3(input.translate)) && (undefined === input.audio || "object" === typeof input.audio && null !== input.audio && false === Array.isArray(input.audio) && $io4(input.audio)) && true && (undefined === input.pick || Array.isArray(input.pick) && input.pick.every(elem => "string" === typeof elem));
|
|
1007
|
+
const $io1 = input => "string" === typeof input.format && (undefined === input.transcribe || "object" === typeof input.transcribe && null !== input.transcribe && $io2(input.transcribe)) && (undefined === input.translate || "object" === typeof input.translate && null !== input.translate && $io3(input.translate)) && (undefined === input.audio || "object" === typeof input.audio && null !== input.audio && false === Array.isArray(input.audio) && $io4(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) && $io5(input.subtitle)));
|
|
833
1008
|
const $io2 = input => "string" === typeof input.engine;
|
|
834
1009
|
const $io3 = input => "string" === typeof input.language;
|
|
835
1010
|
const $io4 = input => undefined === input.pan || "string" === typeof input.pan;
|
|
1011
|
+
const $io5 = input => (undefined === input.lang || "string" === typeof input.lang) && (undefined === input.style || "string" === typeof input.style);
|
|
836
1012
|
return null !== input && undefined !== input && ("string" === typeof input || "object" === typeof input && null !== input && $io0(input));
|
|
837
1013
|
};
|
|
838
1014
|
if (false === __is(input))
|
|
@@ -915,7 +1091,19 @@ export const assertStringifyRenderPreset = (input, errorFactory) => { const asse
|
|
|
915
1091
|
path: _path + ".pick",
|
|
916
1092
|
expected: "(Array<string> | undefined)",
|
|
917
1093
|
value: input.pick
|
|
918
|
-
}, errorFactory))
|
|
1094
|
+
}, errorFactory)) && ((null !== input.subtitle || $guard(_exceptionable, {
|
|
1095
|
+
path: _path + ".subtitle",
|
|
1096
|
+
expected: "(SubtitleProfile | string | undefined)",
|
|
1097
|
+
value: input.subtitle
|
|
1098
|
+
}, errorFactory)) && (undefined === input.subtitle || "string" === typeof input.subtitle || ("object" === typeof input.subtitle && null !== input.subtitle && false === Array.isArray(input.subtitle) || $guard(_exceptionable, {
|
|
1099
|
+
path: _path + ".subtitle",
|
|
1100
|
+
expected: "(SubtitleProfile | string | undefined)",
|
|
1101
|
+
value: input.subtitle
|
|
1102
|
+
}, errorFactory)) && $ao5(input.subtitle, _path + ".subtitle", true && _exceptionable) || $guard(_exceptionable, {
|
|
1103
|
+
path: _path + ".subtitle",
|
|
1104
|
+
expected: "(SubtitleProfile | string | undefined)",
|
|
1105
|
+
value: input.subtitle
|
|
1106
|
+
}, errorFactory)));
|
|
919
1107
|
const $ao2 = (input, _path, _exceptionable = true) => "string" === typeof input.engine || $guard(_exceptionable, {
|
|
920
1108
|
path: _path + ".engine",
|
|
921
1109
|
expected: "string",
|
|
@@ -931,6 +1119,15 @@ export const assertStringifyRenderPreset = (input, errorFactory) => { const asse
|
|
|
931
1119
|
expected: "(string | undefined)",
|
|
932
1120
|
value: input.pan
|
|
933
1121
|
}, errorFactory);
|
|
1122
|
+
const $ao5 = (input, _path, _exceptionable = true) => (undefined === input.lang || "string" === typeof input.lang || $guard(_exceptionable, {
|
|
1123
|
+
path: _path + ".lang",
|
|
1124
|
+
expected: "(string | undefined)",
|
|
1125
|
+
value: input.lang
|
|
1126
|
+
}, errorFactory)) && (undefined === input.style || "string" === typeof input.style || $guard(_exceptionable, {
|
|
1127
|
+
path: _path + ".style",
|
|
1128
|
+
expected: "(string | undefined)",
|
|
1129
|
+
value: input.style
|
|
1130
|
+
}, errorFactory));
|
|
934
1131
|
return (null !== input || $guard(true, {
|
|
935
1132
|
path: _path + "",
|
|
936
1133
|
expected: "(RenderPresetObject | string)",
|
|
@@ -951,10 +1148,11 @@ export const assertStringifyRenderPreset = (input, errorFactory) => { const asse
|
|
|
951
1148
|
})(input, "$input", true);
|
|
952
1149
|
return input;
|
|
953
1150
|
}; const stringify = input => {
|
|
954
|
-
const $io1 = input => "string" === typeof input.format && (undefined === input.transcribe || "object" === typeof input.transcribe && null !== input.transcribe && $io2(input.transcribe)) && (undefined === input.translate || "object" === typeof input.translate && null !== input.translate && $io3(input.translate)) && (undefined === input.audio || "object" === typeof input.audio && null !== input.audio && false === Array.isArray(input.audio) && $io4(input.audio)) && true && (undefined === input.pick || Array.isArray(input.pick) && input.pick.every(elem => "string" === typeof elem));
|
|
1151
|
+
const $io1 = input => "string" === typeof input.format && (undefined === input.transcribe || "object" === typeof input.transcribe && null !== input.transcribe && $io2(input.transcribe)) && (undefined === input.translate || "object" === typeof input.translate && null !== input.translate && $io3(input.translate)) && (undefined === input.audio || "object" === typeof input.audio && null !== input.audio && false === Array.isArray(input.audio) && $io4(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) && $io5(input.subtitle)));
|
|
955
1152
|
const $io2 = input => "string" === typeof input.engine;
|
|
956
1153
|
const $io3 = input => "string" === typeof input.language;
|
|
957
1154
|
const $io4 = input => undefined === input.pan || "string" === typeof input.pan;
|
|
1155
|
+
const $io5 = input => (undefined === input.lang || "string" === typeof input.lang) && (undefined === input.style || "string" === typeof input.style);
|
|
958
1156
|
const $string = __typia.json.createAssertStringify.string;
|
|
959
1157
|
const $throws = __typia.json.createAssertStringify.throws;
|
|
960
1158
|
const $tail = __typia.json.createAssertStringify.tail;
|
|
@@ -979,8 +1177,18 @@ export const assertStringifyRenderPreset = (input, errorFactory) => { const asse
|
|
|
979
1177
|
value: input.profile
|
|
980
1178
|
});
|
|
981
1179
|
})()}}`;
|
|
982
|
-
const $so1 = 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 ? $so4(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},`}"
|
|
1180
|
+
const $so1 = 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 ? $so4(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 ? (() => {
|
|
1181
|
+
if ("string" === typeof input.subtitle)
|
|
1182
|
+
return $string(input.subtitle);
|
|
1183
|
+
if ("object" === typeof input.subtitle && null !== input.subtitle && false === Array.isArray(input.subtitle))
|
|
1184
|
+
return $so5(input.subtitle);
|
|
1185
|
+
$throws({
|
|
1186
|
+
expected: "(SubtitleProfile | string | undefined)",
|
|
1187
|
+
value: input.subtitle
|
|
1188
|
+
});
|
|
1189
|
+
})() : undefined},`}"format":${$string(input.format)}}`;
|
|
983
1190
|
const $so4 = input => `{${$tail(`${undefined === input.pan ? "" : `"pan":${undefined !== input.pan ? $string(input.pan) : undefined}`}`)}}`;
|
|
1191
|
+
const $so5 = input => `{${$tail(`${undefined === input.lang ? "" : `"lang":${undefined !== input.lang ? $string(input.lang) : undefined},`}${undefined === input.style ? "" : `"style":${undefined !== input.style ? $string(input.style) : undefined}`}`)}}`;
|
|
984
1192
|
return (() => {
|
|
985
1193
|
if ("string" === typeof input)
|
|
986
1194
|
return $string(input);
|
|
@@ -19,6 +19,7 @@ export interface RenderProfileObject {
|
|
|
19
19
|
};
|
|
20
20
|
video?: unknown;
|
|
21
21
|
pick?: string[];
|
|
22
|
+
subtitle?: SubtitleProfile | SubtitleProfile["lang"];
|
|
22
23
|
}
|
|
23
24
|
export declare const isRenderProfileObject: (input: unknown) => input is RenderProfileObject;
|
|
24
25
|
export declare const assertRenderProfileObject: (input: unknown) => RenderProfileObject;
|
|
@@ -26,3 +27,19 @@ export declare const randomRenderProfileObject: () => RenderProfileObject;
|
|
|
26
27
|
export declare const assertGuardRenderProfileObject: __AssertionGuard<RenderProfileObject>;
|
|
27
28
|
export declare const stringifyRenderProfileObject: (input: RenderProfileObject) => string;
|
|
28
29
|
export declare const assertStringifyRenderProfileObject: (input: unknown) => string;
|
|
30
|
+
export interface SubtitleProfile {
|
|
31
|
+
/**
|
|
32
|
+
* Corresponds to a key in `media.subtitles?#languages`, or '_all' to render all languages.
|
|
33
|
+
*/
|
|
34
|
+
lang?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Will pick styling from the corresponding `${style}:subtitle-style` asset.
|
|
37
|
+
*/
|
|
38
|
+
style?: string;
|
|
39
|
+
}
|
|
40
|
+
export declare const isSubtitleProfile: (input: unknown) => input is SubtitleProfile;
|
|
41
|
+
export declare const assertSubtitleProfile: (input: unknown) => SubtitleProfile;
|
|
42
|
+
export declare const randomSubtitleProfile: () => SubtitleProfile;
|
|
43
|
+
export declare const assertGuardSubtitleProfile: __AssertionGuard<SubtitleProfile>;
|
|
44
|
+
export declare const stringifySubtitleProfile: (input: SubtitleProfile) => string;
|
|
45
|
+
export declare const assertStringifySubtitleProfile: (input: unknown) => string;
|