@nxtedition/types 23.0.38 → 23.0.40
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 +0 -18
- package/dist/app.js +5 -173
- package/dist/common/render-query.js +280 -191
- package/dist/common/render-scene.js +336 -158
- package/dist/common/settings.d.ts +33 -9
- package/dist/common/settings.js +2069 -1381
- package/dist/domains/event.d.ts +129 -1
- package/dist/domains/event.js +2025 -0
- package/dist/domains/media.js +168 -79
- package/dist/domains/publish.d.ts +55 -0
- package/dist/domains/publish.js +4668 -3689
- package/dist/domains/render.d.ts +10 -24
- package/dist/domains/render.js +497 -828
- package/dist/domains/script.d.ts +250 -0
- package/dist/domains/script.js +6652 -0
- package/dist/domains/settings.js +2022 -1351
- package/dist/domains/subtitle-style.d.ts +5 -0
- package/dist/domains/subtitle-style.js +95 -6
- package/dist/index.d.ts +23 -0
- package/dist/index.js +294 -12
- package/dist/nxtpression.d.ts +247 -30
- package/dist/rpc.d.ts +9 -0
- package/dist/schema.json +903 -124
- package/package.json +2 -1
package/dist/domains/event.js
CHANGED
|
@@ -1,4 +1,476 @@
|
|
|
1
1
|
import __typia from "typia";
|
|
2
|
+
export const isJsonPrimitive = input => {
|
|
3
|
+
return null === input || "string" === typeof input || "number" === typeof input || "boolean" === typeof input;
|
|
4
|
+
};
|
|
5
|
+
export const assertJsonPrimitive = (input, errorFactory) => {
|
|
6
|
+
const __is = input => {
|
|
7
|
+
return null === input || "string" === typeof input || "number" === typeof input || "boolean" === typeof input;
|
|
8
|
+
};
|
|
9
|
+
if (false === __is(input))
|
|
10
|
+
((input, _path, _exceptionable = true) => {
|
|
11
|
+
const $guard = __typia.createAssert.guard;
|
|
12
|
+
return null === input || "string" === typeof input || "number" === typeof input || "boolean" === typeof input || $guard(true, {
|
|
13
|
+
path: _path + "",
|
|
14
|
+
expected: "(boolean | null | number | string)",
|
|
15
|
+
value: input
|
|
16
|
+
}, errorFactory);
|
|
17
|
+
})(input, "$input", true);
|
|
18
|
+
return input;
|
|
19
|
+
};
|
|
20
|
+
export const randomJsonPrimitive = generator => {
|
|
21
|
+
const $generator = __typia.createRandom.generator;
|
|
22
|
+
const $pick = __typia.createRandom.pick;
|
|
23
|
+
return $pick([
|
|
24
|
+
() => null,
|
|
25
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
|
|
26
|
+
() => (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100),
|
|
27
|
+
() => (generator?.boolean ?? $generator.boolean)()
|
|
28
|
+
])();
|
|
29
|
+
};
|
|
30
|
+
export const assertGuardJsonPrimitive = (input, errorFactory) => {
|
|
31
|
+
const __is = input => {
|
|
32
|
+
return null === input || "string" === typeof input || "number" === typeof input || "boolean" === typeof input;
|
|
33
|
+
};
|
|
34
|
+
if (false === __is(input))
|
|
35
|
+
((input, _path, _exceptionable = true) => {
|
|
36
|
+
const $guard = __typia.createAssertGuard.guard;
|
|
37
|
+
return null === input || "string" === typeof input || "number" === typeof input || "boolean" === typeof input || $guard(true, {
|
|
38
|
+
path: _path + "",
|
|
39
|
+
expected: "(boolean | null | number | string)",
|
|
40
|
+
value: input
|
|
41
|
+
}, errorFactory);
|
|
42
|
+
})(input, "$input", true);
|
|
43
|
+
};
|
|
44
|
+
export const stringifyJsonPrimitive = input => {
|
|
45
|
+
const $string = __typia.json.createStringify.string;
|
|
46
|
+
const $throws = __typia.json.createStringify.throws;
|
|
47
|
+
return null !== input ? (() => {
|
|
48
|
+
if ("string" === typeof input)
|
|
49
|
+
return $string(input);
|
|
50
|
+
if ("number" === typeof input)
|
|
51
|
+
return input.toString();
|
|
52
|
+
if ("boolean" === typeof input)
|
|
53
|
+
return input.toString();
|
|
54
|
+
$throws({
|
|
55
|
+
expected: "(boolean | null | number | string)",
|
|
56
|
+
value: input
|
|
57
|
+
});
|
|
58
|
+
})() : "null";
|
|
59
|
+
};
|
|
60
|
+
export const assertStringifyJsonPrimitive = (input, errorFactory) => { const assert = (input, errorFactory) => {
|
|
61
|
+
const __is = input => {
|
|
62
|
+
return null === input || "string" === typeof input || "number" === typeof input && !Number.isNaN(input) || "boolean" === typeof input;
|
|
63
|
+
};
|
|
64
|
+
if (false === __is(input))
|
|
65
|
+
((input, _path, _exceptionable = true) => {
|
|
66
|
+
const $guard = __typia.json.createAssertStringify.guard;
|
|
67
|
+
return null === input || "string" === typeof input || "number" === typeof input && !Number.isNaN(input) || "boolean" === typeof input || $guard(true, {
|
|
68
|
+
path: _path + "",
|
|
69
|
+
expected: "(boolean | null | number | string)",
|
|
70
|
+
value: input
|
|
71
|
+
}, errorFactory);
|
|
72
|
+
})(input, "$input", true);
|
|
73
|
+
return input;
|
|
74
|
+
}; const stringify = input => {
|
|
75
|
+
const $string = __typia.json.createAssertStringify.string;
|
|
76
|
+
const $throws = __typia.json.createAssertStringify.throws;
|
|
77
|
+
return null !== input ? (() => {
|
|
78
|
+
if ("string" === typeof input)
|
|
79
|
+
return $string(input);
|
|
80
|
+
if ("number" === typeof input)
|
|
81
|
+
return input.toString();
|
|
82
|
+
if ("boolean" === typeof input)
|
|
83
|
+
return input.toString();
|
|
84
|
+
$throws({
|
|
85
|
+
expected: "(boolean | null | number | string)",
|
|
86
|
+
value: input
|
|
87
|
+
});
|
|
88
|
+
})() : "null";
|
|
89
|
+
}; return stringify(assert(input, errorFactory)); };
|
|
90
|
+
export const isJsonValue = input => {
|
|
91
|
+
const $io0 = input => Object.keys(input).every(key => {
|
|
92
|
+
const value = input[key];
|
|
93
|
+
if (undefined === value)
|
|
94
|
+
return true;
|
|
95
|
+
return undefined !== value && (null === value || "string" === typeof value || "number" === typeof value || "boolean" === typeof value || (Array.isArray(value) && ($ia0(value) || false) || "object" === typeof value && null !== value && false === Array.isArray(value) && $io0(value)));
|
|
96
|
+
});
|
|
97
|
+
const $ia0 = input => input.every(elem => undefined !== elem && (null === elem || "string" === typeof elem || "number" === typeof elem || "boolean" === typeof elem || (Array.isArray(elem) && ($ia0(elem) || false) || "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io0(elem))));
|
|
98
|
+
return undefined !== input && (null === input || "string" === typeof input || "number" === typeof input || "boolean" === typeof input || (Array.isArray(input) && ($ia0(input) || false) || "object" === typeof input && null !== input && false === Array.isArray(input) && $io0(input)));
|
|
99
|
+
};
|
|
100
|
+
export const assertJsonValue = (input, errorFactory) => {
|
|
101
|
+
const __is = input => {
|
|
102
|
+
const $io0 = input => Object.keys(input).every(key => {
|
|
103
|
+
const value = input[key];
|
|
104
|
+
if (undefined === value)
|
|
105
|
+
return true;
|
|
106
|
+
return undefined !== value && (null === value || "string" === typeof value || "number" === typeof value || "boolean" === typeof value || (Array.isArray(value) && ($ia0(value) || false) || "object" === typeof value && null !== value && false === Array.isArray(value) && $io0(value)));
|
|
107
|
+
});
|
|
108
|
+
const $ia0 = input => input.every(elem => undefined !== elem && (null === elem || "string" === typeof elem || "number" === typeof elem || "boolean" === typeof elem || (Array.isArray(elem) && ($ia0(elem) || false) || "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io0(elem))));
|
|
109
|
+
return undefined !== input && (null === input || "string" === typeof input || "number" === typeof input || "boolean" === typeof input || (Array.isArray(input) && ($ia0(input) || false) || "object" === typeof input && null !== input && false === Array.isArray(input) && $io0(input)));
|
|
110
|
+
};
|
|
111
|
+
if (false === __is(input))
|
|
112
|
+
((input, _path, _exceptionable = true) => {
|
|
113
|
+
const $guard = __typia.createAssert.guard;
|
|
114
|
+
const $join = __typia.createAssert.join;
|
|
115
|
+
const $ao0 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
|
|
116
|
+
const value = input[key];
|
|
117
|
+
if (undefined === value)
|
|
118
|
+
return true;
|
|
119
|
+
return (undefined !== value || $guard(_exceptionable, {
|
|
120
|
+
path: _path + $join(key),
|
|
121
|
+
expected: "(Array<JsonValue> | __type | boolean | null | number | string)",
|
|
122
|
+
value: value
|
|
123
|
+
}, errorFactory)) && (null === value || "string" === typeof value || "number" === typeof value || "boolean" === typeof value || (Array.isArray(value) && ($aa0(value, _path + $join(key), true && _exceptionable) || $guard(_exceptionable, {
|
|
124
|
+
path: _path + $join(key),
|
|
125
|
+
expected: "Array<JsonValue>",
|
|
126
|
+
value: value
|
|
127
|
+
}, errorFactory)) || "object" === typeof value && null !== value && false === Array.isArray(value) && $ao0(value, _path + $join(key), true && _exceptionable) || $guard(_exceptionable, {
|
|
128
|
+
path: _path + $join(key),
|
|
129
|
+
expected: "(Array<JsonValue> | __type | boolean | null | number | string)",
|
|
130
|
+
value: value
|
|
131
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
132
|
+
path: _path + $join(key),
|
|
133
|
+
expected: "(Array<JsonValue> | __type | boolean | null | number | string)",
|
|
134
|
+
value: value
|
|
135
|
+
}, errorFactory));
|
|
136
|
+
});
|
|
137
|
+
const $aa0 = (input, _path, _exceptionable = true) => input.every((elem, _index1) => (undefined !== elem || $guard(_exceptionable, {
|
|
138
|
+
path: _path + "[" + _index1 + "]",
|
|
139
|
+
expected: "(Array<JsonValue> | __type | boolean | null | number | string)",
|
|
140
|
+
value: elem
|
|
141
|
+
}, errorFactory)) && (null === elem || "string" === typeof elem || "number" === typeof elem || "boolean" === typeof elem || (Array.isArray(elem) && ($aa0(elem, _path + "[" + _index1 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
|
142
|
+
path: _path + "[" + _index1 + "]",
|
|
143
|
+
expected: "Array<JsonValue>",
|
|
144
|
+
value: elem
|
|
145
|
+
}, errorFactory)) || "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $ao0(elem, _path + "[" + _index1 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
|
146
|
+
path: _path + "[" + _index1 + "]",
|
|
147
|
+
expected: "(Array<JsonValue> | __type | boolean | null | number | string)",
|
|
148
|
+
value: elem
|
|
149
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
150
|
+
path: _path + "[" + _index1 + "]",
|
|
151
|
+
expected: "(Array<JsonValue> | __type | boolean | null | number | string)",
|
|
152
|
+
value: elem
|
|
153
|
+
}, errorFactory)));
|
|
154
|
+
return (undefined !== input || $guard(true, {
|
|
155
|
+
path: _path + "",
|
|
156
|
+
expected: "(Array<JsonValue> | __type | boolean | null | number | string)",
|
|
157
|
+
value: input
|
|
158
|
+
}, errorFactory)) && (null === input || "string" === typeof input || "number" === typeof input || "boolean" === typeof input || (Array.isArray(input) && ($aa0(input, _path + "", true && _exceptionable) || $guard(_exceptionable, {
|
|
159
|
+
path: _path + "",
|
|
160
|
+
expected: "Array<JsonValue>",
|
|
161
|
+
value: input
|
|
162
|
+
}, errorFactory)) || "object" === typeof input && null !== input && false === Array.isArray(input) && $ao0(input, _path + "", true) || $guard(true, {
|
|
163
|
+
path: _path + "",
|
|
164
|
+
expected: "(Array<JsonValue> | __type | boolean | null | number | string)",
|
|
165
|
+
value: input
|
|
166
|
+
}, errorFactory)) || $guard(true, {
|
|
167
|
+
path: _path + "",
|
|
168
|
+
expected: "(Array<JsonValue> | __type | boolean | null | number | string)",
|
|
169
|
+
value: input
|
|
170
|
+
}, errorFactory));
|
|
171
|
+
})(input, "$input", true);
|
|
172
|
+
return input;
|
|
173
|
+
};
|
|
174
|
+
export const randomJsonValue = generator => {
|
|
175
|
+
const $generator = __typia.createRandom.generator;
|
|
176
|
+
const $pick = __typia.createRandom.pick;
|
|
177
|
+
const $ro0 = (_recursive = true, _depth = 0) => {
|
|
178
|
+
const output = {};
|
|
179
|
+
if (5 >= _depth) {
|
|
180
|
+
(generator?.array ?? $generator.array)(() => output[(generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()] = $pick([
|
|
181
|
+
() => null,
|
|
182
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
|
|
183
|
+
() => (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100),
|
|
184
|
+
() => (generator?.boolean ?? $generator.boolean)(),
|
|
185
|
+
() => $ra0(generator?.length ?? $generator.length, false, true, 1 + _depth),
|
|
186
|
+
() => $ro0(true, _recursive ? 1 + _depth : _depth)
|
|
187
|
+
])(), (generator?.integer ?? $generator.integer)(0, 3));
|
|
188
|
+
}
|
|
189
|
+
return output;
|
|
190
|
+
};
|
|
191
|
+
const $ra0 = (length, unique, _recursive = true, _depth = 0) => 5 >= _depth ? (generator?.array ?? $generator.array)(() => $pick([
|
|
192
|
+
() => null,
|
|
193
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
|
|
194
|
+
() => (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100),
|
|
195
|
+
() => (generator?.boolean ?? $generator.boolean)(),
|
|
196
|
+
() => $ra0(generator?.length ?? $generator.length, false, true, 1 + _depth),
|
|
197
|
+
() => $ro0(true, _recursive ? 1 + _depth : _depth)
|
|
198
|
+
])(), length, unique) : [];
|
|
199
|
+
return $pick([
|
|
200
|
+
() => null,
|
|
201
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
|
|
202
|
+
() => (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100),
|
|
203
|
+
() => (generator?.boolean ?? $generator.boolean)(),
|
|
204
|
+
() => $ra0(generator?.length ?? $generator.length, false, true, 0),
|
|
205
|
+
() => $ro0()
|
|
206
|
+
])();
|
|
207
|
+
};
|
|
208
|
+
export const assertGuardJsonValue = (input, errorFactory) => {
|
|
209
|
+
const __is = input => {
|
|
210
|
+
const $io0 = input => Object.keys(input).every(key => {
|
|
211
|
+
const value = input[key];
|
|
212
|
+
if (undefined === value)
|
|
213
|
+
return true;
|
|
214
|
+
return undefined !== value && (null === value || "string" === typeof value || "number" === typeof value || "boolean" === typeof value || (Array.isArray(value) && ($ia0(value) || false) || "object" === typeof value && null !== value && false === Array.isArray(value) && $io0(value)));
|
|
215
|
+
});
|
|
216
|
+
const $ia0 = input => input.every(elem => undefined !== elem && (null === elem || "string" === typeof elem || "number" === typeof elem || "boolean" === typeof elem || (Array.isArray(elem) && ($ia0(elem) || false) || "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io0(elem))));
|
|
217
|
+
return undefined !== input && (null === input || "string" === typeof input || "number" === typeof input || "boolean" === typeof input || (Array.isArray(input) && ($ia0(input) || false) || "object" === typeof input && null !== input && false === Array.isArray(input) && $io0(input)));
|
|
218
|
+
};
|
|
219
|
+
if (false === __is(input))
|
|
220
|
+
((input, _path, _exceptionable = true) => {
|
|
221
|
+
const $guard = __typia.createAssertGuard.guard;
|
|
222
|
+
const $join = __typia.createAssertGuard.join;
|
|
223
|
+
const $ao0 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
|
|
224
|
+
const value = input[key];
|
|
225
|
+
if (undefined === value)
|
|
226
|
+
return true;
|
|
227
|
+
return (undefined !== value || $guard(_exceptionable, {
|
|
228
|
+
path: _path + $join(key),
|
|
229
|
+
expected: "(Array<JsonValue> | __type | boolean | null | number | string)",
|
|
230
|
+
value: value
|
|
231
|
+
}, errorFactory)) && (null === value || "string" === typeof value || "number" === typeof value || "boolean" === typeof value || (Array.isArray(value) && ($aa0(value, _path + $join(key), true && _exceptionable) || $guard(_exceptionable, {
|
|
232
|
+
path: _path + $join(key),
|
|
233
|
+
expected: "Array<JsonValue>",
|
|
234
|
+
value: value
|
|
235
|
+
}, errorFactory)) || "object" === typeof value && null !== value && false === Array.isArray(value) && $ao0(value, _path + $join(key), true && _exceptionable) || $guard(_exceptionable, {
|
|
236
|
+
path: _path + $join(key),
|
|
237
|
+
expected: "(Array<JsonValue> | __type | boolean | null | number | string)",
|
|
238
|
+
value: value
|
|
239
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
240
|
+
path: _path + $join(key),
|
|
241
|
+
expected: "(Array<JsonValue> | __type | boolean | null | number | string)",
|
|
242
|
+
value: value
|
|
243
|
+
}, errorFactory));
|
|
244
|
+
});
|
|
245
|
+
const $aa0 = (input, _path, _exceptionable = true) => input.every((elem, _index1) => (undefined !== elem || $guard(_exceptionable, {
|
|
246
|
+
path: _path + "[" + _index1 + "]",
|
|
247
|
+
expected: "(Array<JsonValue> | __type | boolean | null | number | string)",
|
|
248
|
+
value: elem
|
|
249
|
+
}, errorFactory)) && (null === elem || "string" === typeof elem || "number" === typeof elem || "boolean" === typeof elem || (Array.isArray(elem) && ($aa0(elem, _path + "[" + _index1 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
|
250
|
+
path: _path + "[" + _index1 + "]",
|
|
251
|
+
expected: "Array<JsonValue>",
|
|
252
|
+
value: elem
|
|
253
|
+
}, errorFactory)) || "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $ao0(elem, _path + "[" + _index1 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
|
254
|
+
path: _path + "[" + _index1 + "]",
|
|
255
|
+
expected: "(Array<JsonValue> | __type | boolean | null | number | string)",
|
|
256
|
+
value: elem
|
|
257
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
258
|
+
path: _path + "[" + _index1 + "]",
|
|
259
|
+
expected: "(Array<JsonValue> | __type | boolean | null | number | string)",
|
|
260
|
+
value: elem
|
|
261
|
+
}, errorFactory)));
|
|
262
|
+
return (undefined !== input || $guard(true, {
|
|
263
|
+
path: _path + "",
|
|
264
|
+
expected: "(Array<JsonValue> | __type | boolean | null | number | string)",
|
|
265
|
+
value: input
|
|
266
|
+
}, errorFactory)) && (null === input || "string" === typeof input || "number" === typeof input || "boolean" === typeof input || (Array.isArray(input) && ($aa0(input, _path + "", true && _exceptionable) || $guard(_exceptionable, {
|
|
267
|
+
path: _path + "",
|
|
268
|
+
expected: "Array<JsonValue>",
|
|
269
|
+
value: input
|
|
270
|
+
}, errorFactory)) || "object" === typeof input && null !== input && false === Array.isArray(input) && $ao0(input, _path + "", true) || $guard(true, {
|
|
271
|
+
path: _path + "",
|
|
272
|
+
expected: "(Array<JsonValue> | __type | boolean | null | number | string)",
|
|
273
|
+
value: input
|
|
274
|
+
}, errorFactory)) || $guard(true, {
|
|
275
|
+
path: _path + "",
|
|
276
|
+
expected: "(Array<JsonValue> | __type | boolean | null | number | string)",
|
|
277
|
+
value: input
|
|
278
|
+
}, errorFactory));
|
|
279
|
+
})(input, "$input", true);
|
|
280
|
+
};
|
|
281
|
+
export const stringifyJsonValue = input => {
|
|
282
|
+
const $io0 = input => Object.keys(input).every(key => {
|
|
283
|
+
const value = input[key];
|
|
284
|
+
if (undefined === value)
|
|
285
|
+
return true;
|
|
286
|
+
return undefined !== value && (null === value || "string" === typeof value || "number" === typeof value || "boolean" === typeof value || (Array.isArray(value) && ($ia0(value) || false) || "object" === typeof value && null !== value && false === Array.isArray(value) && $io0(value)));
|
|
287
|
+
});
|
|
288
|
+
const $ia0 = input => input.every(elem => undefined !== elem && (null === elem || "string" === typeof elem || "number" === typeof elem || "boolean" === typeof elem || (Array.isArray(elem) && ($ia0(elem) || false) || "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io0(elem))));
|
|
289
|
+
const $string = __typia.json.createStringify.string;
|
|
290
|
+
const $throws = __typia.json.createStringify.throws;
|
|
291
|
+
const $so0 = input => `{${Object.entries(input).map(([key, value]) => { if (undefined === value)
|
|
292
|
+
return ""; return `${JSON.stringify(key)}:${null !== value ? (() => {
|
|
293
|
+
if ("string" === typeof value)
|
|
294
|
+
return $string(value);
|
|
295
|
+
if ("number" === typeof value)
|
|
296
|
+
return value;
|
|
297
|
+
if ("boolean" === typeof value)
|
|
298
|
+
return value;
|
|
299
|
+
if (Array.isArray(value))
|
|
300
|
+
return $sa0(value);
|
|
301
|
+
if ("object" === typeof value && null !== value && false === Array.isArray(value))
|
|
302
|
+
return $so0(value);
|
|
303
|
+
$throws({
|
|
304
|
+
expected: "(Array<JsonValue> | __type | boolean | null | number | string)",
|
|
305
|
+
value: value
|
|
306
|
+
});
|
|
307
|
+
})() : "null"}`; }).filter(str => "" !== str).join(",")}}`;
|
|
308
|
+
const $sa0 = input => `[${input.map(elem => null !== elem ? (() => {
|
|
309
|
+
if ("string" === typeof elem)
|
|
310
|
+
return $string(elem);
|
|
311
|
+
if ("number" === typeof elem)
|
|
312
|
+
return elem;
|
|
313
|
+
if ("boolean" === typeof elem)
|
|
314
|
+
return elem;
|
|
315
|
+
if (Array.isArray(elem))
|
|
316
|
+
return $sa0(elem);
|
|
317
|
+
if ("object" === typeof elem && null !== elem && false === Array.isArray(elem))
|
|
318
|
+
return $so0(elem);
|
|
319
|
+
$throws({
|
|
320
|
+
expected: "(Array<JsonValue> | __type | boolean | null | number | string)",
|
|
321
|
+
value: elem
|
|
322
|
+
});
|
|
323
|
+
})() : "null").join(",")}]`;
|
|
324
|
+
return null !== input ? (() => {
|
|
325
|
+
if ("string" === typeof input)
|
|
326
|
+
return $string(input);
|
|
327
|
+
if ("number" === typeof input)
|
|
328
|
+
return input.toString();
|
|
329
|
+
if ("boolean" === typeof input)
|
|
330
|
+
return input.toString();
|
|
331
|
+
if (Array.isArray(input))
|
|
332
|
+
return $sa0(input);
|
|
333
|
+
if ("object" === typeof input && null !== input && false === Array.isArray(input))
|
|
334
|
+
return $so0(input);
|
|
335
|
+
$throws({
|
|
336
|
+
expected: "(Array<JsonValue> | __type | boolean | null | number | string)",
|
|
337
|
+
value: input
|
|
338
|
+
});
|
|
339
|
+
})() : "null";
|
|
340
|
+
};
|
|
341
|
+
export const assertStringifyJsonValue = (input, errorFactory) => { const assert = (input, errorFactory) => {
|
|
342
|
+
const __is = input => {
|
|
343
|
+
const $io0 = input => Object.keys(input).every(key => {
|
|
344
|
+
const value = input[key];
|
|
345
|
+
if (undefined === value)
|
|
346
|
+
return true;
|
|
347
|
+
return undefined !== value && (null === value || "string" === typeof value || "number" === typeof value && !Number.isNaN(value) || "boolean" === typeof value || (Array.isArray(value) && ($ia0(value) || false) || "object" === typeof value && null !== value && false === Array.isArray(value) && $io0(value)));
|
|
348
|
+
});
|
|
349
|
+
const $ia0 = input => input.every(elem => undefined !== elem && (null === elem || "string" === typeof elem || "number" === typeof elem && !Number.isNaN(elem) || "boolean" === typeof elem || (Array.isArray(elem) && ($ia0(elem) || false) || "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io0(elem))));
|
|
350
|
+
return undefined !== input && (null === input || "string" === typeof input || "number" === typeof input && !Number.isNaN(input) || "boolean" === typeof input || (Array.isArray(input) && ($ia0(input) || false) || "object" === typeof input && null !== input && false === Array.isArray(input) && $io0(input)));
|
|
351
|
+
};
|
|
352
|
+
if (false === __is(input))
|
|
353
|
+
((input, _path, _exceptionable = true) => {
|
|
354
|
+
const $guard = __typia.json.createAssertStringify.guard;
|
|
355
|
+
const $join = __typia.json.createAssertStringify.join;
|
|
356
|
+
const $ao0 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
|
|
357
|
+
const value = input[key];
|
|
358
|
+
if (undefined === value)
|
|
359
|
+
return true;
|
|
360
|
+
return (undefined !== value || $guard(_exceptionable, {
|
|
361
|
+
path: _path + $join(key),
|
|
362
|
+
expected: "(Array<JsonValue> | __type | boolean | null | number | string)",
|
|
363
|
+
value: value
|
|
364
|
+
}, errorFactory)) && (null === value || "string" === typeof value || "number" === typeof value && !Number.isNaN(value) || "boolean" === typeof value || (Array.isArray(value) && ($aa0(value, _path + $join(key), true && _exceptionable) || $guard(_exceptionable, {
|
|
365
|
+
path: _path + $join(key),
|
|
366
|
+
expected: "Array<JsonValue>",
|
|
367
|
+
value: value
|
|
368
|
+
}, errorFactory)) || "object" === typeof value && null !== value && false === Array.isArray(value) && $ao0(value, _path + $join(key), true && _exceptionable) || $guard(_exceptionable, {
|
|
369
|
+
path: _path + $join(key),
|
|
370
|
+
expected: "(Array<JsonValue> | __type | boolean | null | number | string)",
|
|
371
|
+
value: value
|
|
372
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
373
|
+
path: _path + $join(key),
|
|
374
|
+
expected: "(Array<JsonValue> | __type | boolean | null | number | string)",
|
|
375
|
+
value: value
|
|
376
|
+
}, errorFactory));
|
|
377
|
+
});
|
|
378
|
+
const $aa0 = (input, _path, _exceptionable = true) => input.every((elem, _index1) => (undefined !== elem || $guard(_exceptionable, {
|
|
379
|
+
path: _path + "[" + _index1 + "]",
|
|
380
|
+
expected: "(Array<JsonValue> | __type | boolean | null | number | string)",
|
|
381
|
+
value: elem
|
|
382
|
+
}, errorFactory)) && (null === elem || "string" === typeof elem || "number" === typeof elem && !Number.isNaN(elem) || "boolean" === typeof elem || (Array.isArray(elem) && ($aa0(elem, _path + "[" + _index1 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
|
383
|
+
path: _path + "[" + _index1 + "]",
|
|
384
|
+
expected: "Array<JsonValue>",
|
|
385
|
+
value: elem
|
|
386
|
+
}, errorFactory)) || "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $ao0(elem, _path + "[" + _index1 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
|
387
|
+
path: _path + "[" + _index1 + "]",
|
|
388
|
+
expected: "(Array<JsonValue> | __type | boolean | null | number | string)",
|
|
389
|
+
value: elem
|
|
390
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
391
|
+
path: _path + "[" + _index1 + "]",
|
|
392
|
+
expected: "(Array<JsonValue> | __type | boolean | null | number | string)",
|
|
393
|
+
value: elem
|
|
394
|
+
}, errorFactory)));
|
|
395
|
+
return (undefined !== input || $guard(true, {
|
|
396
|
+
path: _path + "",
|
|
397
|
+
expected: "(Array<JsonValue> | __type | boolean | null | number | string)",
|
|
398
|
+
value: input
|
|
399
|
+
}, errorFactory)) && (null === input || "string" === typeof input || "number" === typeof input && !Number.isNaN(input) || "boolean" === typeof input || (Array.isArray(input) && ($aa0(input, _path + "", true && _exceptionable) || $guard(_exceptionable, {
|
|
400
|
+
path: _path + "",
|
|
401
|
+
expected: "Array<JsonValue>",
|
|
402
|
+
value: input
|
|
403
|
+
}, errorFactory)) || "object" === typeof input && null !== input && false === Array.isArray(input) && $ao0(input, _path + "", true) || $guard(true, {
|
|
404
|
+
path: _path + "",
|
|
405
|
+
expected: "(Array<JsonValue> | __type | boolean | null | number | string)",
|
|
406
|
+
value: input
|
|
407
|
+
}, errorFactory)) || $guard(true, {
|
|
408
|
+
path: _path + "",
|
|
409
|
+
expected: "(Array<JsonValue> | __type | boolean | null | number | string)",
|
|
410
|
+
value: input
|
|
411
|
+
}, errorFactory));
|
|
412
|
+
})(input, "$input", true);
|
|
413
|
+
return input;
|
|
414
|
+
}; const stringify = input => {
|
|
415
|
+
const $io0 = input => Object.keys(input).every(key => {
|
|
416
|
+
const value = input[key];
|
|
417
|
+
if (undefined === value)
|
|
418
|
+
return true;
|
|
419
|
+
return undefined !== value && (null === value || "string" === typeof value || "number" === typeof value || "boolean" === typeof value || (Array.isArray(value) && ($ia0(value) || false) || "object" === typeof value && null !== value && false === Array.isArray(value) && $io0(value)));
|
|
420
|
+
});
|
|
421
|
+
const $ia0 = input => input.every(elem => undefined !== elem && (null === elem || "string" === typeof elem || "number" === typeof elem || "boolean" === typeof elem || (Array.isArray(elem) && ($ia0(elem) || false) || "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io0(elem))));
|
|
422
|
+
const $string = __typia.json.createAssertStringify.string;
|
|
423
|
+
const $throws = __typia.json.createAssertStringify.throws;
|
|
424
|
+
const $so0 = input => `{${Object.entries(input).map(([key, value]) => { if (undefined === value)
|
|
425
|
+
return ""; return `${JSON.stringify(key)}:${null !== value ? (() => {
|
|
426
|
+
if ("string" === typeof value)
|
|
427
|
+
return $string(value);
|
|
428
|
+
if ("number" === typeof value)
|
|
429
|
+
return value;
|
|
430
|
+
if ("boolean" === typeof value)
|
|
431
|
+
return value;
|
|
432
|
+
if (Array.isArray(value))
|
|
433
|
+
return $sa0(value);
|
|
434
|
+
if ("object" === typeof value && null !== value && false === Array.isArray(value))
|
|
435
|
+
return $so0(value);
|
|
436
|
+
$throws({
|
|
437
|
+
expected: "(Array<JsonValue> | __type | boolean | null | number | string)",
|
|
438
|
+
value: value
|
|
439
|
+
});
|
|
440
|
+
})() : "null"}`; }).filter(str => "" !== str).join(",")}}`;
|
|
441
|
+
const $sa0 = input => `[${input.map(elem => null !== elem ? (() => {
|
|
442
|
+
if ("string" === typeof elem)
|
|
443
|
+
return $string(elem);
|
|
444
|
+
if ("number" === typeof elem)
|
|
445
|
+
return elem;
|
|
446
|
+
if ("boolean" === typeof elem)
|
|
447
|
+
return elem;
|
|
448
|
+
if (Array.isArray(elem))
|
|
449
|
+
return $sa0(elem);
|
|
450
|
+
if ("object" === typeof elem && null !== elem && false === Array.isArray(elem))
|
|
451
|
+
return $so0(elem);
|
|
452
|
+
$throws({
|
|
453
|
+
expected: "(Array<JsonValue> | __type | boolean | null | number | string)",
|
|
454
|
+
value: elem
|
|
455
|
+
});
|
|
456
|
+
})() : "null").join(",")}]`;
|
|
457
|
+
return null !== input ? (() => {
|
|
458
|
+
if ("string" === typeof input)
|
|
459
|
+
return $string(input);
|
|
460
|
+
if ("number" === typeof input)
|
|
461
|
+
return input.toString();
|
|
462
|
+
if ("boolean" === typeof input)
|
|
463
|
+
return input.toString();
|
|
464
|
+
if (Array.isArray(input))
|
|
465
|
+
return $sa0(input);
|
|
466
|
+
if ("object" === typeof input && null !== input && false === Array.isArray(input))
|
|
467
|
+
return $so0(input);
|
|
468
|
+
$throws({
|
|
469
|
+
expected: "(Array<JsonValue> | __type | boolean | null | number | string)",
|
|
470
|
+
value: input
|
|
471
|
+
});
|
|
472
|
+
})() : "null";
|
|
473
|
+
}; return stringify(assert(input, errorFactory)); };
|
|
2
474
|
export const isEventRecord = input => {
|
|
3
475
|
const $io0 = input => (undefined === input.start || "number" === typeof input.start) && (undefined === input.end || "number" === typeof input.end) && (undefined === input.duration || "number" === typeof input.duration) && (undefined === input.text || "string" === typeof input.text) && (undefined === input.lang || "string" === typeof input.lang) && (undefined === input.style || "string" === typeof input.style) && (undefined === input.styleOverrides || "object" === typeof input.styleOverrides && null !== input.styleOverrides && false === Array.isArray(input.styleOverrides) && $io1(input.styleOverrides));
|
|
4
476
|
const $io1 = input => (undefined === input.marginL || "string" === typeof input.marginL) && (undefined === input.marginR || "string" === typeof input.marginR) && (undefined === input.marginV || "string" === typeof input.marginV) && (undefined === input.alignment || "string" === typeof input.alignment) && (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);
|
|
@@ -444,6 +916,1559 @@ export const assertStringifyEventRecord = (input, errorFactory) => { const asser
|
|
|
444
916
|
const $so1 = input => `{${$tail(`${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.alignment ? "" : `"alignment":${undefined !== input.alignment ? $string(input.alignment) : 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}`}`)}}`;
|
|
445
917
|
return $so0(input);
|
|
446
918
|
}; return stringify(assert(input, errorFactory)); };
|
|
919
|
+
export const isEventTemplateRecord = input => {
|
|
920
|
+
const $io0 = input => (undefined === input.mixin || Array.isArray(input.mixin) && input.mixin.every(elem => "string" === typeof elem)) && (undefined === input.properties || "object" === typeof input.properties && null !== input.properties && false === Array.isArray(input.properties) && $io1(input.properties)) && (undefined === input.layout || "object" === typeof input.layout && null !== input.layout && false === Array.isArray(input.layout) && $io2(input.layout));
|
|
921
|
+
const $io1 = input => true;
|
|
922
|
+
const $io2 = input => undefined === input.title || "string" === typeof input.title;
|
|
923
|
+
return "object" === typeof input && null !== input && false === Array.isArray(input) && $io0(input);
|
|
924
|
+
};
|
|
925
|
+
export const assertEventTemplateRecord = (input, errorFactory) => {
|
|
926
|
+
const __is = input => {
|
|
927
|
+
const $io0 = input => (undefined === input.mixin || Array.isArray(input.mixin) && input.mixin.every(elem => "string" === typeof elem)) && (undefined === input.properties || "object" === typeof input.properties && null !== input.properties && false === Array.isArray(input.properties) && $io1(input.properties)) && (undefined === input.layout || "object" === typeof input.layout && null !== input.layout && false === Array.isArray(input.layout) && $io2(input.layout));
|
|
928
|
+
const $io1 = input => true;
|
|
929
|
+
const $io2 = input => undefined === input.title || "string" === typeof input.title;
|
|
930
|
+
return "object" === typeof input && null !== input && false === Array.isArray(input) && $io0(input);
|
|
931
|
+
};
|
|
932
|
+
if (false === __is(input))
|
|
933
|
+
((input, _path, _exceptionable = true) => {
|
|
934
|
+
const $guard = __typia.createAssert.guard;
|
|
935
|
+
const $ao0 = (input, _path, _exceptionable = true) => (undefined === input.mixin || (Array.isArray(input.mixin) || $guard(_exceptionable, {
|
|
936
|
+
path: _path + ".mixin",
|
|
937
|
+
expected: "(Array<string> | undefined)",
|
|
938
|
+
value: input.mixin
|
|
939
|
+
}, errorFactory)) && input.mixin.every((elem, _index1) => "string" === typeof elem || $guard(_exceptionable, {
|
|
940
|
+
path: _path + ".mixin[" + _index1 + "]",
|
|
941
|
+
expected: "string",
|
|
942
|
+
value: elem
|
|
943
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
944
|
+
path: _path + ".mixin",
|
|
945
|
+
expected: "(Array<string> | undefined)",
|
|
946
|
+
value: input.mixin
|
|
947
|
+
}, errorFactory)) && (undefined === input.properties || ("object" === typeof input.properties && null !== input.properties && false === Array.isArray(input.properties) || $guard(_exceptionable, {
|
|
948
|
+
path: _path + ".properties",
|
|
949
|
+
expected: "(object | undefined)",
|
|
950
|
+
value: input.properties
|
|
951
|
+
}, errorFactory)) && $ao1(input.properties, _path + ".properties", true && _exceptionable) || $guard(_exceptionable, {
|
|
952
|
+
path: _path + ".properties",
|
|
953
|
+
expected: "(object | undefined)",
|
|
954
|
+
value: input.properties
|
|
955
|
+
}, errorFactory)) && (undefined === input.layout || ("object" === typeof input.layout && null !== input.layout && false === Array.isArray(input.layout) || $guard(_exceptionable, {
|
|
956
|
+
path: _path + ".layout",
|
|
957
|
+
expected: "(__type | undefined)",
|
|
958
|
+
value: input.layout
|
|
959
|
+
}, errorFactory)) && $ao2(input.layout, _path + ".layout", true && _exceptionable) || $guard(_exceptionable, {
|
|
960
|
+
path: _path + ".layout",
|
|
961
|
+
expected: "(__type | undefined)",
|
|
962
|
+
value: input.layout
|
|
963
|
+
}, errorFactory));
|
|
964
|
+
const $ao1 = (input, _path, _exceptionable = true) => true;
|
|
965
|
+
const $ao2 = (input, _path, _exceptionable = true) => undefined === input.title || "string" === typeof input.title || $guard(_exceptionable, {
|
|
966
|
+
path: _path + ".title",
|
|
967
|
+
expected: "(string | undefined)",
|
|
968
|
+
value: input.title
|
|
969
|
+
}, errorFactory);
|
|
970
|
+
return ("object" === typeof input && null !== input && false === Array.isArray(input) || $guard(true, {
|
|
971
|
+
path: _path + "",
|
|
972
|
+
expected: "EventTemplateRecord",
|
|
973
|
+
value: input
|
|
974
|
+
}, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
|
|
975
|
+
path: _path + "",
|
|
976
|
+
expected: "EventTemplateRecord",
|
|
977
|
+
value: input
|
|
978
|
+
}, errorFactory);
|
|
979
|
+
})(input, "$input", true);
|
|
980
|
+
return input;
|
|
981
|
+
};
|
|
982
|
+
export const randomEventTemplateRecord = generator => {
|
|
983
|
+
const $generator = __typia.createRandom.generator;
|
|
984
|
+
const $pick = __typia.createRandom.pick;
|
|
985
|
+
const $ro0 = (_recursive = false, _depth = 0) => ({
|
|
986
|
+
mixin: $pick([
|
|
987
|
+
() => undefined,
|
|
988
|
+
() => (generator?.array ?? $generator.array)(() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)())
|
|
989
|
+
])(),
|
|
990
|
+
properties: $pick([
|
|
991
|
+
() => undefined,
|
|
992
|
+
() => $ro1(_recursive, _recursive ? 1 + _depth : _depth)
|
|
993
|
+
])(),
|
|
994
|
+
layout: $pick([
|
|
995
|
+
() => undefined,
|
|
996
|
+
() => $ro2(_recursive, _recursive ? 1 + _depth : _depth)
|
|
997
|
+
])()
|
|
998
|
+
});
|
|
999
|
+
const $ro1 = (_recursive = false, _depth = 0) => {};
|
|
1000
|
+
const $ro2 = (_recursive = false, _depth = 0) => ({
|
|
1001
|
+
title: $pick([
|
|
1002
|
+
() => undefined,
|
|
1003
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
1004
|
+
])()
|
|
1005
|
+
});
|
|
1006
|
+
return $ro0();
|
|
1007
|
+
};
|
|
1008
|
+
export const assertGuardEventTemplateRecord = (input, errorFactory) => {
|
|
1009
|
+
const __is = input => {
|
|
1010
|
+
const $io0 = input => (undefined === input.mixin || Array.isArray(input.mixin) && input.mixin.every(elem => "string" === typeof elem)) && (undefined === input.properties || "object" === typeof input.properties && null !== input.properties && false === Array.isArray(input.properties) && $io1(input.properties)) && (undefined === input.layout || "object" === typeof input.layout && null !== input.layout && false === Array.isArray(input.layout) && $io2(input.layout));
|
|
1011
|
+
const $io1 = input => true;
|
|
1012
|
+
const $io2 = input => undefined === input.title || "string" === typeof input.title;
|
|
1013
|
+
return "object" === typeof input && null !== input && false === Array.isArray(input) && $io0(input);
|
|
1014
|
+
};
|
|
1015
|
+
if (false === __is(input))
|
|
1016
|
+
((input, _path, _exceptionable = true) => {
|
|
1017
|
+
const $guard = __typia.createAssertGuard.guard;
|
|
1018
|
+
const $ao0 = (input, _path, _exceptionable = true) => (undefined === input.mixin || (Array.isArray(input.mixin) || $guard(_exceptionable, {
|
|
1019
|
+
path: _path + ".mixin",
|
|
1020
|
+
expected: "(Array<string> | undefined)",
|
|
1021
|
+
value: input.mixin
|
|
1022
|
+
}, errorFactory)) && input.mixin.every((elem, _index1) => "string" === typeof elem || $guard(_exceptionable, {
|
|
1023
|
+
path: _path + ".mixin[" + _index1 + "]",
|
|
1024
|
+
expected: "string",
|
|
1025
|
+
value: elem
|
|
1026
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
1027
|
+
path: _path + ".mixin",
|
|
1028
|
+
expected: "(Array<string> | undefined)",
|
|
1029
|
+
value: input.mixin
|
|
1030
|
+
}, errorFactory)) && (undefined === input.properties || ("object" === typeof input.properties && null !== input.properties && false === Array.isArray(input.properties) || $guard(_exceptionable, {
|
|
1031
|
+
path: _path + ".properties",
|
|
1032
|
+
expected: "(object | undefined)",
|
|
1033
|
+
value: input.properties
|
|
1034
|
+
}, errorFactory)) && $ao1(input.properties, _path + ".properties", true && _exceptionable) || $guard(_exceptionable, {
|
|
1035
|
+
path: _path + ".properties",
|
|
1036
|
+
expected: "(object | undefined)",
|
|
1037
|
+
value: input.properties
|
|
1038
|
+
}, errorFactory)) && (undefined === input.layout || ("object" === typeof input.layout && null !== input.layout && false === Array.isArray(input.layout) || $guard(_exceptionable, {
|
|
1039
|
+
path: _path + ".layout",
|
|
1040
|
+
expected: "(__type | undefined)",
|
|
1041
|
+
value: input.layout
|
|
1042
|
+
}, errorFactory)) && $ao2(input.layout, _path + ".layout", true && _exceptionable) || $guard(_exceptionable, {
|
|
1043
|
+
path: _path + ".layout",
|
|
1044
|
+
expected: "(__type | undefined)",
|
|
1045
|
+
value: input.layout
|
|
1046
|
+
}, errorFactory));
|
|
1047
|
+
const $ao1 = (input, _path, _exceptionable = true) => true;
|
|
1048
|
+
const $ao2 = (input, _path, _exceptionable = true) => undefined === input.title || "string" === typeof input.title || $guard(_exceptionable, {
|
|
1049
|
+
path: _path + ".title",
|
|
1050
|
+
expected: "(string | undefined)",
|
|
1051
|
+
value: input.title
|
|
1052
|
+
}, errorFactory);
|
|
1053
|
+
return ("object" === typeof input && null !== input && false === Array.isArray(input) || $guard(true, {
|
|
1054
|
+
path: _path + "",
|
|
1055
|
+
expected: "EventTemplateRecord",
|
|
1056
|
+
value: input
|
|
1057
|
+
}, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
|
|
1058
|
+
path: _path + "",
|
|
1059
|
+
expected: "EventTemplateRecord",
|
|
1060
|
+
value: input
|
|
1061
|
+
}, errorFactory);
|
|
1062
|
+
})(input, "$input", true);
|
|
1063
|
+
};
|
|
1064
|
+
export const stringifyEventTemplateRecord = input => {
|
|
1065
|
+
const $io1 = input => true;
|
|
1066
|
+
const $io2 = input => undefined === input.title || "string" === typeof input.title;
|
|
1067
|
+
const $string = __typia.json.createStringify.string;
|
|
1068
|
+
const $tail = __typia.json.createStringify.tail;
|
|
1069
|
+
const $so0 = input => `{${$tail(`${undefined === input.mixin ? "" : `"mixin":${undefined !== input.mixin ? `[${input.mixin.map(elem => $string(elem)).join(",")}]` : undefined},`}${undefined === input.properties ? "" : `"properties":${undefined !== input.properties ? "{}" : undefined},`}${undefined === input.layout ? "" : `"layout":${undefined !== input.layout ? $so2(input.layout) : undefined}`}`)}}`;
|
|
1070
|
+
const $so2 = input => `{${$tail(`${undefined === input.title ? "" : `"title":${undefined !== input.title ? $string(input.title) : undefined}`}`)}}`;
|
|
1071
|
+
return $so0(input);
|
|
1072
|
+
};
|
|
1073
|
+
export const assertStringifyEventTemplateRecord = (input, errorFactory) => { const assert = (input, errorFactory) => {
|
|
1074
|
+
const __is = input => {
|
|
1075
|
+
const $io0 = input => (undefined === input.mixin || Array.isArray(input.mixin) && input.mixin.every(elem => "string" === typeof elem)) && (undefined === input.properties || "object" === typeof input.properties && null !== input.properties && false === Array.isArray(input.properties) && $io1(input.properties)) && (undefined === input.layout || "object" === typeof input.layout && null !== input.layout && false === Array.isArray(input.layout) && $io2(input.layout));
|
|
1076
|
+
const $io1 = input => true;
|
|
1077
|
+
const $io2 = input => undefined === input.title || "string" === typeof input.title;
|
|
1078
|
+
return "object" === typeof input && null !== input && false === Array.isArray(input) && $io0(input);
|
|
1079
|
+
};
|
|
1080
|
+
if (false === __is(input))
|
|
1081
|
+
((input, _path, _exceptionable = true) => {
|
|
1082
|
+
const $guard = __typia.json.createAssertStringify.guard;
|
|
1083
|
+
const $ao0 = (input, _path, _exceptionable = true) => (undefined === input.mixin || (Array.isArray(input.mixin) || $guard(_exceptionable, {
|
|
1084
|
+
path: _path + ".mixin",
|
|
1085
|
+
expected: "(Array<string> | undefined)",
|
|
1086
|
+
value: input.mixin
|
|
1087
|
+
}, errorFactory)) && input.mixin.every((elem, _index1) => "string" === typeof elem || $guard(_exceptionable, {
|
|
1088
|
+
path: _path + ".mixin[" + _index1 + "]",
|
|
1089
|
+
expected: "string",
|
|
1090
|
+
value: elem
|
|
1091
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
1092
|
+
path: _path + ".mixin",
|
|
1093
|
+
expected: "(Array<string> | undefined)",
|
|
1094
|
+
value: input.mixin
|
|
1095
|
+
}, errorFactory)) && (undefined === input.properties || ("object" === typeof input.properties && null !== input.properties && false === Array.isArray(input.properties) || $guard(_exceptionable, {
|
|
1096
|
+
path: _path + ".properties",
|
|
1097
|
+
expected: "(object | undefined)",
|
|
1098
|
+
value: input.properties
|
|
1099
|
+
}, errorFactory)) && $ao1(input.properties, _path + ".properties", true && _exceptionable) || $guard(_exceptionable, {
|
|
1100
|
+
path: _path + ".properties",
|
|
1101
|
+
expected: "(object | undefined)",
|
|
1102
|
+
value: input.properties
|
|
1103
|
+
}, errorFactory)) && (undefined === input.layout || ("object" === typeof input.layout && null !== input.layout && false === Array.isArray(input.layout) || $guard(_exceptionable, {
|
|
1104
|
+
path: _path + ".layout",
|
|
1105
|
+
expected: "(__type | undefined)",
|
|
1106
|
+
value: input.layout
|
|
1107
|
+
}, errorFactory)) && $ao2(input.layout, _path + ".layout", true && _exceptionable) || $guard(_exceptionable, {
|
|
1108
|
+
path: _path + ".layout",
|
|
1109
|
+
expected: "(__type | undefined)",
|
|
1110
|
+
value: input.layout
|
|
1111
|
+
}, errorFactory));
|
|
1112
|
+
const $ao1 = (input, _path, _exceptionable = true) => true;
|
|
1113
|
+
const $ao2 = (input, _path, _exceptionable = true) => undefined === input.title || "string" === typeof input.title || $guard(_exceptionable, {
|
|
1114
|
+
path: _path + ".title",
|
|
1115
|
+
expected: "(string | undefined)",
|
|
1116
|
+
value: input.title
|
|
1117
|
+
}, errorFactory);
|
|
1118
|
+
return ("object" === typeof input && null !== input && false === Array.isArray(input) || $guard(true, {
|
|
1119
|
+
path: _path + "",
|
|
1120
|
+
expected: "EventTemplateRecord",
|
|
1121
|
+
value: input
|
|
1122
|
+
}, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
|
|
1123
|
+
path: _path + "",
|
|
1124
|
+
expected: "EventTemplateRecord",
|
|
1125
|
+
value: input
|
|
1126
|
+
}, errorFactory);
|
|
1127
|
+
})(input, "$input", true);
|
|
1128
|
+
return input;
|
|
1129
|
+
}; const stringify = input => {
|
|
1130
|
+
const $io1 = input => true;
|
|
1131
|
+
const $io2 = input => undefined === input.title || "string" === typeof input.title;
|
|
1132
|
+
const $string = __typia.json.createAssertStringify.string;
|
|
1133
|
+
const $tail = __typia.json.createAssertStringify.tail;
|
|
1134
|
+
const $so0 = input => `{${$tail(`${undefined === input.mixin ? "" : `"mixin":${undefined !== input.mixin ? `[${input.mixin.map(elem => $string(elem)).join(",")}]` : undefined},`}${undefined === input.properties ? "" : `"properties":${undefined !== input.properties ? "{}" : undefined},`}${undefined === input.layout ? "" : `"layout":${undefined !== input.layout ? $so2(input.layout) : undefined}`}`)}}`;
|
|
1135
|
+
const $so2 = input => `{${$tail(`${undefined === input.title ? "" : `"title":${undefined !== input.title ? $string(input.title) : undefined}`}`)}}`;
|
|
1136
|
+
return $so0(input);
|
|
1137
|
+
}; return stringify(assert(input, errorFactory)); };
|
|
1138
|
+
export const isEventDurationRecord = input => {
|
|
1139
|
+
const $io0 = input => (undefined === input.scheduled || "number" === typeof input.scheduled) && (undefined === input.actual || "number" === typeof input.actual) && (undefined === input["in"] || "number" === typeof input["in"]) && (null === input.out || undefined === input.out || "number" === typeof input.out);
|
|
1140
|
+
return "object" === typeof input && null !== input && false === Array.isArray(input) && $io0(input);
|
|
1141
|
+
};
|
|
1142
|
+
export const assertEventDurationRecord = (input, errorFactory) => {
|
|
1143
|
+
const __is = input => {
|
|
1144
|
+
const $io0 = input => (undefined === input.scheduled || "number" === typeof input.scheduled) && (undefined === input.actual || "number" === typeof input.actual) && (undefined === input["in"] || "number" === typeof input["in"]) && (null === input.out || undefined === input.out || "number" === typeof input.out);
|
|
1145
|
+
return "object" === typeof input && null !== input && false === Array.isArray(input) && $io0(input);
|
|
1146
|
+
};
|
|
1147
|
+
if (false === __is(input))
|
|
1148
|
+
((input, _path, _exceptionable = true) => {
|
|
1149
|
+
const $guard = __typia.createAssert.guard;
|
|
1150
|
+
const $ao0 = (input, _path, _exceptionable = true) => (undefined === input.scheduled || "number" === typeof input.scheduled || $guard(_exceptionable, {
|
|
1151
|
+
path: _path + ".scheduled",
|
|
1152
|
+
expected: "(number | undefined)",
|
|
1153
|
+
value: input.scheduled
|
|
1154
|
+
}, errorFactory)) && (undefined === input.actual || "number" === typeof input.actual || $guard(_exceptionable, {
|
|
1155
|
+
path: _path + ".actual",
|
|
1156
|
+
expected: "(number | undefined)",
|
|
1157
|
+
value: input.actual
|
|
1158
|
+
}, errorFactory)) && (undefined === input["in"] || "number" === typeof input["in"] || $guard(_exceptionable, {
|
|
1159
|
+
path: _path + "[\"in\"]",
|
|
1160
|
+
expected: "(number | undefined)",
|
|
1161
|
+
value: input["in"]
|
|
1162
|
+
}, errorFactory)) && (null === input.out || undefined === input.out || "number" === typeof input.out || $guard(_exceptionable, {
|
|
1163
|
+
path: _path + ".out",
|
|
1164
|
+
expected: "(null | number | undefined)",
|
|
1165
|
+
value: input.out
|
|
1166
|
+
}, errorFactory));
|
|
1167
|
+
return ("object" === typeof input && null !== input && false === Array.isArray(input) || $guard(true, {
|
|
1168
|
+
path: _path + "",
|
|
1169
|
+
expected: "EventDurationRecord",
|
|
1170
|
+
value: input
|
|
1171
|
+
}, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
|
|
1172
|
+
path: _path + "",
|
|
1173
|
+
expected: "EventDurationRecord",
|
|
1174
|
+
value: input
|
|
1175
|
+
}, errorFactory);
|
|
1176
|
+
})(input, "$input", true);
|
|
1177
|
+
return input;
|
|
1178
|
+
};
|
|
1179
|
+
export const randomEventDurationRecord = generator => {
|
|
1180
|
+
const $generator = __typia.createRandom.generator;
|
|
1181
|
+
const $pick = __typia.createRandom.pick;
|
|
1182
|
+
const $ro0 = (_recursive = false, _depth = 0) => ({
|
|
1183
|
+
scheduled: $pick([
|
|
1184
|
+
() => undefined,
|
|
1185
|
+
() => (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100)
|
|
1186
|
+
])(),
|
|
1187
|
+
actual: $pick([
|
|
1188
|
+
() => undefined,
|
|
1189
|
+
() => (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100)
|
|
1190
|
+
])(),
|
|
1191
|
+
"in": $pick([
|
|
1192
|
+
() => undefined,
|
|
1193
|
+
() => (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100)
|
|
1194
|
+
])(),
|
|
1195
|
+
out: $pick([
|
|
1196
|
+
() => undefined,
|
|
1197
|
+
() => null,
|
|
1198
|
+
() => (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100)
|
|
1199
|
+
])()
|
|
1200
|
+
});
|
|
1201
|
+
return $ro0();
|
|
1202
|
+
};
|
|
1203
|
+
export const assertGuardEventDurationRecord = (input, errorFactory) => {
|
|
1204
|
+
const __is = input => {
|
|
1205
|
+
const $io0 = input => (undefined === input.scheduled || "number" === typeof input.scheduled) && (undefined === input.actual || "number" === typeof input.actual) && (undefined === input["in"] || "number" === typeof input["in"]) && (null === input.out || undefined === input.out || "number" === typeof input.out);
|
|
1206
|
+
return "object" === typeof input && null !== input && false === Array.isArray(input) && $io0(input);
|
|
1207
|
+
};
|
|
1208
|
+
if (false === __is(input))
|
|
1209
|
+
((input, _path, _exceptionable = true) => {
|
|
1210
|
+
const $guard = __typia.createAssertGuard.guard;
|
|
1211
|
+
const $ao0 = (input, _path, _exceptionable = true) => (undefined === input.scheduled || "number" === typeof input.scheduled || $guard(_exceptionable, {
|
|
1212
|
+
path: _path + ".scheduled",
|
|
1213
|
+
expected: "(number | undefined)",
|
|
1214
|
+
value: input.scheduled
|
|
1215
|
+
}, errorFactory)) && (undefined === input.actual || "number" === typeof input.actual || $guard(_exceptionable, {
|
|
1216
|
+
path: _path + ".actual",
|
|
1217
|
+
expected: "(number | undefined)",
|
|
1218
|
+
value: input.actual
|
|
1219
|
+
}, errorFactory)) && (undefined === input["in"] || "number" === typeof input["in"] || $guard(_exceptionable, {
|
|
1220
|
+
path: _path + "[\"in\"]",
|
|
1221
|
+
expected: "(number | undefined)",
|
|
1222
|
+
value: input["in"]
|
|
1223
|
+
}, errorFactory)) && (null === input.out || undefined === input.out || "number" === typeof input.out || $guard(_exceptionable, {
|
|
1224
|
+
path: _path + ".out",
|
|
1225
|
+
expected: "(null | number | undefined)",
|
|
1226
|
+
value: input.out
|
|
1227
|
+
}, errorFactory));
|
|
1228
|
+
return ("object" === typeof input && null !== input && false === Array.isArray(input) || $guard(true, {
|
|
1229
|
+
path: _path + "",
|
|
1230
|
+
expected: "EventDurationRecord",
|
|
1231
|
+
value: input
|
|
1232
|
+
}, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
|
|
1233
|
+
path: _path + "",
|
|
1234
|
+
expected: "EventDurationRecord",
|
|
1235
|
+
value: input
|
|
1236
|
+
}, errorFactory);
|
|
1237
|
+
})(input, "$input", true);
|
|
1238
|
+
};
|
|
1239
|
+
export const stringifyEventDurationRecord = input => {
|
|
1240
|
+
const $tail = __typia.json.createStringify.tail;
|
|
1241
|
+
const $so0 = input => `{${$tail(`${undefined === input.scheduled ? "" : `"scheduled":${undefined !== input.scheduled ? input.scheduled : undefined},`}${undefined === input.actual ? "" : `"actual":${undefined !== input.actual ? input.actual : undefined},`}${undefined === input["in"] ? "" : `"in":${undefined !== input["in"] ? input["in"] : undefined},`}${undefined === input.out ? "" : `"out":${undefined !== input.out ? null !== input.out ? input.out : "null" : undefined}`}`)}}`;
|
|
1242
|
+
return $so0(input);
|
|
1243
|
+
};
|
|
1244
|
+
export const assertStringifyEventDurationRecord = (input, errorFactory) => { const assert = (input, errorFactory) => {
|
|
1245
|
+
const __is = input => {
|
|
1246
|
+
const $io0 = input => (undefined === input.scheduled || "number" === typeof input.scheduled && !Number.isNaN(input.scheduled)) && (undefined === input.actual || "number" === typeof input.actual && !Number.isNaN(input.actual)) && (undefined === input["in"] || "number" === typeof input["in"] && !Number.isNaN(input["in"])) && (null === input.out || undefined === input.out || "number" === typeof input.out && !Number.isNaN(input.out));
|
|
1247
|
+
return "object" === typeof input && null !== input && false === Array.isArray(input) && $io0(input);
|
|
1248
|
+
};
|
|
1249
|
+
if (false === __is(input))
|
|
1250
|
+
((input, _path, _exceptionable = true) => {
|
|
1251
|
+
const $guard = __typia.json.createAssertStringify.guard;
|
|
1252
|
+
const $ao0 = (input, _path, _exceptionable = true) => (undefined === input.scheduled || "number" === typeof input.scheduled && !Number.isNaN(input.scheduled) || $guard(_exceptionable, {
|
|
1253
|
+
path: _path + ".scheduled",
|
|
1254
|
+
expected: "(number | undefined)",
|
|
1255
|
+
value: input.scheduled
|
|
1256
|
+
}, errorFactory)) && (undefined === input.actual || "number" === typeof input.actual && !Number.isNaN(input.actual) || $guard(_exceptionable, {
|
|
1257
|
+
path: _path + ".actual",
|
|
1258
|
+
expected: "(number | undefined)",
|
|
1259
|
+
value: input.actual
|
|
1260
|
+
}, errorFactory)) && (undefined === input["in"] || "number" === typeof input["in"] && !Number.isNaN(input["in"]) || $guard(_exceptionable, {
|
|
1261
|
+
path: _path + "[\"in\"]",
|
|
1262
|
+
expected: "(number | undefined)",
|
|
1263
|
+
value: input["in"]
|
|
1264
|
+
}, errorFactory)) && (null === input.out || undefined === input.out || "number" === typeof input.out && !Number.isNaN(input.out) || $guard(_exceptionable, {
|
|
1265
|
+
path: _path + ".out",
|
|
1266
|
+
expected: "(null | number | undefined)",
|
|
1267
|
+
value: input.out
|
|
1268
|
+
}, errorFactory));
|
|
1269
|
+
return ("object" === typeof input && null !== input && false === Array.isArray(input) || $guard(true, {
|
|
1270
|
+
path: _path + "",
|
|
1271
|
+
expected: "EventDurationRecord",
|
|
1272
|
+
value: input
|
|
1273
|
+
}, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
|
|
1274
|
+
path: _path + "",
|
|
1275
|
+
expected: "EventDurationRecord",
|
|
1276
|
+
value: input
|
|
1277
|
+
}, errorFactory);
|
|
1278
|
+
})(input, "$input", true);
|
|
1279
|
+
return input;
|
|
1280
|
+
}; const stringify = input => {
|
|
1281
|
+
const $tail = __typia.json.createAssertStringify.tail;
|
|
1282
|
+
const $so0 = input => `{${$tail(`${undefined === input.scheduled ? "" : `"scheduled":${undefined !== input.scheduled ? input.scheduled : undefined},`}${undefined === input.actual ? "" : `"actual":${undefined !== input.actual ? input.actual : undefined},`}${undefined === input["in"] ? "" : `"in":${undefined !== input["in"] ? input["in"] : undefined},`}${undefined === input.out ? "" : `"out":${undefined !== input.out ? null !== input.out ? input.out : "null" : undefined}`}`)}}`;
|
|
1283
|
+
return $so0(input);
|
|
1284
|
+
}; return stringify(assert(input, errorFactory)); };
|
|
1285
|
+
export const isEventPropsRecord = input => {
|
|
1286
|
+
const $io0 = input => (undefined === input.source || "string" === typeof input.source) && (undefined === input.cueCard || "string" === typeof input.cueCard || "boolean" === typeof input.cueCard) && Object.keys(input).every(key => {
|
|
1287
|
+
if (["source", "cueCard"].some(prop => key === prop))
|
|
1288
|
+
return true;
|
|
1289
|
+
const value = input[key];
|
|
1290
|
+
if (undefined === value)
|
|
1291
|
+
return true;
|
|
1292
|
+
return undefined !== value && (null === value || "string" === typeof value || "number" === typeof value || "boolean" === typeof value || (Array.isArray(value) && ($ia0(value) || false) || "object" === typeof value && null !== value && false === Array.isArray(value) && $io1(value)));
|
|
1293
|
+
});
|
|
1294
|
+
const $io1 = input => Object.keys(input).every(key => {
|
|
1295
|
+
const value = input[key];
|
|
1296
|
+
if (undefined === value)
|
|
1297
|
+
return true;
|
|
1298
|
+
return undefined !== value && (null === value || "string" === typeof value || "number" === typeof value || "boolean" === typeof value || (Array.isArray(value) && ($ia0(value) || false) || "object" === typeof value && null !== value && false === Array.isArray(value) && $io1(value)));
|
|
1299
|
+
});
|
|
1300
|
+
const $ia0 = input => input.every(elem => undefined !== elem && (null === elem || "string" === typeof elem || "number" === typeof elem || "boolean" === typeof elem || (Array.isArray(elem) && ($ia0(elem) || false) || "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io1(elem))));
|
|
1301
|
+
return "object" === typeof input && null !== input && false === Array.isArray(input) && $io0(input);
|
|
1302
|
+
};
|
|
1303
|
+
export const assertEventPropsRecord = (input, errorFactory) => {
|
|
1304
|
+
const __is = input => {
|
|
1305
|
+
const $io0 = input => (undefined === input.source || "string" === typeof input.source) && (undefined === input.cueCard || "string" === typeof input.cueCard || "boolean" === typeof input.cueCard) && Object.keys(input).every(key => {
|
|
1306
|
+
if (["source", "cueCard"].some(prop => key === prop))
|
|
1307
|
+
return true;
|
|
1308
|
+
const value = input[key];
|
|
1309
|
+
if (undefined === value)
|
|
1310
|
+
return true;
|
|
1311
|
+
return undefined !== value && (null === value || "string" === typeof value || "number" === typeof value || "boolean" === typeof value || (Array.isArray(value) && ($ia0(value) || false) || "object" === typeof value && null !== value && false === Array.isArray(value) && $io1(value)));
|
|
1312
|
+
});
|
|
1313
|
+
const $io1 = input => Object.keys(input).every(key => {
|
|
1314
|
+
const value = input[key];
|
|
1315
|
+
if (undefined === value)
|
|
1316
|
+
return true;
|
|
1317
|
+
return undefined !== value && (null === value || "string" === typeof value || "number" === typeof value || "boolean" === typeof value || (Array.isArray(value) && ($ia0(value) || false) || "object" === typeof value && null !== value && false === Array.isArray(value) && $io1(value)));
|
|
1318
|
+
});
|
|
1319
|
+
const $ia0 = input => input.every(elem => undefined !== elem && (null === elem || "string" === typeof elem || "number" === typeof elem || "boolean" === typeof elem || (Array.isArray(elem) && ($ia0(elem) || false) || "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io1(elem))));
|
|
1320
|
+
return "object" === typeof input && null !== input && false === Array.isArray(input) && $io0(input);
|
|
1321
|
+
};
|
|
1322
|
+
if (false === __is(input))
|
|
1323
|
+
((input, _path, _exceptionable = true) => {
|
|
1324
|
+
const $guard = __typia.createAssert.guard;
|
|
1325
|
+
const $join = __typia.createAssert.join;
|
|
1326
|
+
const $ao0 = (input, _path, _exceptionable = true) => (undefined === input.source || "string" === typeof input.source || $guard(_exceptionable, {
|
|
1327
|
+
path: _path + ".source",
|
|
1328
|
+
expected: "(string | undefined)",
|
|
1329
|
+
value: input.source
|
|
1330
|
+
}, errorFactory)) && (undefined === input.cueCard || "string" === typeof input.cueCard || "boolean" === typeof input.cueCard || $guard(_exceptionable, {
|
|
1331
|
+
path: _path + ".cueCard",
|
|
1332
|
+
expected: "(boolean | string | undefined)",
|
|
1333
|
+
value: input.cueCard
|
|
1334
|
+
}, errorFactory)) && (false === _exceptionable || Object.keys(input).every(key => {
|
|
1335
|
+
if (["source", "cueCard"].some(prop => key === prop))
|
|
1336
|
+
return true;
|
|
1337
|
+
const value = input[key];
|
|
1338
|
+
if (undefined === value)
|
|
1339
|
+
return true;
|
|
1340
|
+
return (undefined !== value || $guard(_exceptionable, {
|
|
1341
|
+
path: _path + $join(key),
|
|
1342
|
+
expected: "(Array<JsonValue> | __type | boolean | null | number | string)",
|
|
1343
|
+
value: value
|
|
1344
|
+
}, errorFactory)) && (null === value || "string" === typeof value || "number" === typeof value || "boolean" === typeof value || (Array.isArray(value) && ($aa0(value, _path + $join(key), true && _exceptionable) || $guard(_exceptionable, {
|
|
1345
|
+
path: _path + $join(key),
|
|
1346
|
+
expected: "Array<JsonValue>",
|
|
1347
|
+
value: value
|
|
1348
|
+
}, errorFactory)) || "object" === typeof value && null !== value && false === Array.isArray(value) && $ao1(value, _path + $join(key), true && _exceptionable) || $guard(_exceptionable, {
|
|
1349
|
+
path: _path + $join(key),
|
|
1350
|
+
expected: "(Array<JsonValue> | __type | boolean | null | number | string)",
|
|
1351
|
+
value: value
|
|
1352
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
1353
|
+
path: _path + $join(key),
|
|
1354
|
+
expected: "(Array<JsonValue> | __type | boolean | null | number | string)",
|
|
1355
|
+
value: value
|
|
1356
|
+
}, errorFactory));
|
|
1357
|
+
}));
|
|
1358
|
+
const $ao1 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
|
|
1359
|
+
const value = input[key];
|
|
1360
|
+
if (undefined === value)
|
|
1361
|
+
return true;
|
|
1362
|
+
return (undefined !== value || $guard(_exceptionable, {
|
|
1363
|
+
path: _path + $join(key),
|
|
1364
|
+
expected: "(Array<JsonValue> | __type | boolean | null | number | string)",
|
|
1365
|
+
value: value
|
|
1366
|
+
}, errorFactory)) && (null === value || "string" === typeof value || "number" === typeof value || "boolean" === typeof value || (Array.isArray(value) && ($aa0(value, _path + $join(key), true && _exceptionable) || $guard(_exceptionable, {
|
|
1367
|
+
path: _path + $join(key),
|
|
1368
|
+
expected: "Array<JsonValue>",
|
|
1369
|
+
value: value
|
|
1370
|
+
}, errorFactory)) || "object" === typeof value && null !== value && false === Array.isArray(value) && $ao1(value, _path + $join(key), true && _exceptionable) || $guard(_exceptionable, {
|
|
1371
|
+
path: _path + $join(key),
|
|
1372
|
+
expected: "(Array<JsonValue> | __type | boolean | null | number | string)",
|
|
1373
|
+
value: value
|
|
1374
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
1375
|
+
path: _path + $join(key),
|
|
1376
|
+
expected: "(Array<JsonValue> | __type | boolean | null | number | string)",
|
|
1377
|
+
value: value
|
|
1378
|
+
}, errorFactory));
|
|
1379
|
+
});
|
|
1380
|
+
const $aa0 = (input, _path, _exceptionable = true) => input.every((elem, _index1) => (undefined !== elem || $guard(_exceptionable, {
|
|
1381
|
+
path: _path + "[" + _index1 + "]",
|
|
1382
|
+
expected: "(Array<JsonValue> | __type | boolean | null | number | string)",
|
|
1383
|
+
value: elem
|
|
1384
|
+
}, errorFactory)) && (null === elem || "string" === typeof elem || "number" === typeof elem || "boolean" === typeof elem || (Array.isArray(elem) && ($aa0(elem, _path + "[" + _index1 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
|
1385
|
+
path: _path + "[" + _index1 + "]",
|
|
1386
|
+
expected: "Array<JsonValue>",
|
|
1387
|
+
value: elem
|
|
1388
|
+
}, errorFactory)) || "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $ao1(elem, _path + "[" + _index1 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
|
1389
|
+
path: _path + "[" + _index1 + "]",
|
|
1390
|
+
expected: "(Array<JsonValue> | __type | boolean | null | number | string)",
|
|
1391
|
+
value: elem
|
|
1392
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
1393
|
+
path: _path + "[" + _index1 + "]",
|
|
1394
|
+
expected: "(Array<JsonValue> | __type | boolean | null | number | string)",
|
|
1395
|
+
value: elem
|
|
1396
|
+
}, errorFactory)));
|
|
1397
|
+
return ("object" === typeof input && null !== input && false === Array.isArray(input) || $guard(true, {
|
|
1398
|
+
path: _path + "",
|
|
1399
|
+
expected: "EventPropsRecord",
|
|
1400
|
+
value: input
|
|
1401
|
+
}, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
|
|
1402
|
+
path: _path + "",
|
|
1403
|
+
expected: "EventPropsRecord",
|
|
1404
|
+
value: input
|
|
1405
|
+
}, errorFactory);
|
|
1406
|
+
})(input, "$input", true);
|
|
1407
|
+
return input;
|
|
1408
|
+
};
|
|
1409
|
+
export const randomEventPropsRecord = generator => {
|
|
1410
|
+
const $generator = __typia.createRandom.generator;
|
|
1411
|
+
const $pick = __typia.createRandom.pick;
|
|
1412
|
+
const $ro0 = (_recursive = false, _depth = 0) => {
|
|
1413
|
+
const output = {
|
|
1414
|
+
source: $pick([
|
|
1415
|
+
() => undefined,
|
|
1416
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
1417
|
+
])(),
|
|
1418
|
+
cueCard: $pick([
|
|
1419
|
+
() => undefined,
|
|
1420
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
|
|
1421
|
+
() => (generator?.boolean ?? $generator.boolean)()
|
|
1422
|
+
])()
|
|
1423
|
+
};
|
|
1424
|
+
(generator?.array ?? $generator.array)(() => output[(generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()] = $pick([
|
|
1425
|
+
() => null,
|
|
1426
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
|
|
1427
|
+
() => (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100),
|
|
1428
|
+
() => (generator?.boolean ?? $generator.boolean)(),
|
|
1429
|
+
() => $ra0(generator?.length ?? $generator.length, false, true, 0),
|
|
1430
|
+
() => $ro1(_recursive, _recursive ? 1 + _depth : _depth)
|
|
1431
|
+
])(), (generator?.integer ?? $generator.integer)(0, 3));
|
|
1432
|
+
return output;
|
|
1433
|
+
};
|
|
1434
|
+
const $ro1 = (_recursive = true, _depth = 0) => {
|
|
1435
|
+
const output = {};
|
|
1436
|
+
if (5 >= _depth) {
|
|
1437
|
+
(generator?.array ?? $generator.array)(() => output[(generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()] = $pick([
|
|
1438
|
+
() => null,
|
|
1439
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
|
|
1440
|
+
() => (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100),
|
|
1441
|
+
() => (generator?.boolean ?? $generator.boolean)(),
|
|
1442
|
+
() => $ra0(generator?.length ?? $generator.length, false, true, 1 + _depth),
|
|
1443
|
+
() => $ro1(true, _recursive ? 1 + _depth : _depth)
|
|
1444
|
+
])(), (generator?.integer ?? $generator.integer)(0, 3));
|
|
1445
|
+
}
|
|
1446
|
+
return output;
|
|
1447
|
+
};
|
|
1448
|
+
const $ra0 = (length, unique, _recursive = true, _depth = 0) => 5 >= _depth ? (generator?.array ?? $generator.array)(() => $pick([
|
|
1449
|
+
() => null,
|
|
1450
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
|
|
1451
|
+
() => (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100),
|
|
1452
|
+
() => (generator?.boolean ?? $generator.boolean)(),
|
|
1453
|
+
() => $ra0(generator?.length ?? $generator.length, false, true, 1 + _depth),
|
|
1454
|
+
() => $ro1(true, _recursive ? 1 + _depth : _depth)
|
|
1455
|
+
])(), length, unique) : [];
|
|
1456
|
+
return $ro0();
|
|
1457
|
+
};
|
|
1458
|
+
export const assertGuardEventPropsRecord = (input, errorFactory) => {
|
|
1459
|
+
const __is = input => {
|
|
1460
|
+
const $io0 = input => (undefined === input.source || "string" === typeof input.source) && (undefined === input.cueCard || "string" === typeof input.cueCard || "boolean" === typeof input.cueCard) && Object.keys(input).every(key => {
|
|
1461
|
+
if (["source", "cueCard"].some(prop => key === prop))
|
|
1462
|
+
return true;
|
|
1463
|
+
const value = input[key];
|
|
1464
|
+
if (undefined === value)
|
|
1465
|
+
return true;
|
|
1466
|
+
return undefined !== value && (null === value || "string" === typeof value || "number" === typeof value || "boolean" === typeof value || (Array.isArray(value) && ($ia0(value) || false) || "object" === typeof value && null !== value && false === Array.isArray(value) && $io1(value)));
|
|
1467
|
+
});
|
|
1468
|
+
const $io1 = input => Object.keys(input).every(key => {
|
|
1469
|
+
const value = input[key];
|
|
1470
|
+
if (undefined === value)
|
|
1471
|
+
return true;
|
|
1472
|
+
return undefined !== value && (null === value || "string" === typeof value || "number" === typeof value || "boolean" === typeof value || (Array.isArray(value) && ($ia0(value) || false) || "object" === typeof value && null !== value && false === Array.isArray(value) && $io1(value)));
|
|
1473
|
+
});
|
|
1474
|
+
const $ia0 = input => input.every(elem => undefined !== elem && (null === elem || "string" === typeof elem || "number" === typeof elem || "boolean" === typeof elem || (Array.isArray(elem) && ($ia0(elem) || false) || "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io1(elem))));
|
|
1475
|
+
return "object" === typeof input && null !== input && false === Array.isArray(input) && $io0(input);
|
|
1476
|
+
};
|
|
1477
|
+
if (false === __is(input))
|
|
1478
|
+
((input, _path, _exceptionable = true) => {
|
|
1479
|
+
const $guard = __typia.createAssertGuard.guard;
|
|
1480
|
+
const $join = __typia.createAssertGuard.join;
|
|
1481
|
+
const $ao0 = (input, _path, _exceptionable = true) => (undefined === input.source || "string" === typeof input.source || $guard(_exceptionable, {
|
|
1482
|
+
path: _path + ".source",
|
|
1483
|
+
expected: "(string | undefined)",
|
|
1484
|
+
value: input.source
|
|
1485
|
+
}, errorFactory)) && (undefined === input.cueCard || "string" === typeof input.cueCard || "boolean" === typeof input.cueCard || $guard(_exceptionable, {
|
|
1486
|
+
path: _path + ".cueCard",
|
|
1487
|
+
expected: "(boolean | string | undefined)",
|
|
1488
|
+
value: input.cueCard
|
|
1489
|
+
}, errorFactory)) && (false === _exceptionable || Object.keys(input).every(key => {
|
|
1490
|
+
if (["source", "cueCard"].some(prop => key === prop))
|
|
1491
|
+
return true;
|
|
1492
|
+
const value = input[key];
|
|
1493
|
+
if (undefined === value)
|
|
1494
|
+
return true;
|
|
1495
|
+
return (undefined !== value || $guard(_exceptionable, {
|
|
1496
|
+
path: _path + $join(key),
|
|
1497
|
+
expected: "(Array<JsonValue> | __type | boolean | null | number | string)",
|
|
1498
|
+
value: value
|
|
1499
|
+
}, errorFactory)) && (null === value || "string" === typeof value || "number" === typeof value || "boolean" === typeof value || (Array.isArray(value) && ($aa0(value, _path + $join(key), true && _exceptionable) || $guard(_exceptionable, {
|
|
1500
|
+
path: _path + $join(key),
|
|
1501
|
+
expected: "Array<JsonValue>",
|
|
1502
|
+
value: value
|
|
1503
|
+
}, errorFactory)) || "object" === typeof value && null !== value && false === Array.isArray(value) && $ao1(value, _path + $join(key), true && _exceptionable) || $guard(_exceptionable, {
|
|
1504
|
+
path: _path + $join(key),
|
|
1505
|
+
expected: "(Array<JsonValue> | __type | boolean | null | number | string)",
|
|
1506
|
+
value: value
|
|
1507
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
1508
|
+
path: _path + $join(key),
|
|
1509
|
+
expected: "(Array<JsonValue> | __type | boolean | null | number | string)",
|
|
1510
|
+
value: value
|
|
1511
|
+
}, errorFactory));
|
|
1512
|
+
}));
|
|
1513
|
+
const $ao1 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
|
|
1514
|
+
const value = input[key];
|
|
1515
|
+
if (undefined === value)
|
|
1516
|
+
return true;
|
|
1517
|
+
return (undefined !== value || $guard(_exceptionable, {
|
|
1518
|
+
path: _path + $join(key),
|
|
1519
|
+
expected: "(Array<JsonValue> | __type | boolean | null | number | string)",
|
|
1520
|
+
value: value
|
|
1521
|
+
}, errorFactory)) && (null === value || "string" === typeof value || "number" === typeof value || "boolean" === typeof value || (Array.isArray(value) && ($aa0(value, _path + $join(key), true && _exceptionable) || $guard(_exceptionable, {
|
|
1522
|
+
path: _path + $join(key),
|
|
1523
|
+
expected: "Array<JsonValue>",
|
|
1524
|
+
value: value
|
|
1525
|
+
}, errorFactory)) || "object" === typeof value && null !== value && false === Array.isArray(value) && $ao1(value, _path + $join(key), true && _exceptionable) || $guard(_exceptionable, {
|
|
1526
|
+
path: _path + $join(key),
|
|
1527
|
+
expected: "(Array<JsonValue> | __type | boolean | null | number | string)",
|
|
1528
|
+
value: value
|
|
1529
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
1530
|
+
path: _path + $join(key),
|
|
1531
|
+
expected: "(Array<JsonValue> | __type | boolean | null | number | string)",
|
|
1532
|
+
value: value
|
|
1533
|
+
}, errorFactory));
|
|
1534
|
+
});
|
|
1535
|
+
const $aa0 = (input, _path, _exceptionable = true) => input.every((elem, _index1) => (undefined !== elem || $guard(_exceptionable, {
|
|
1536
|
+
path: _path + "[" + _index1 + "]",
|
|
1537
|
+
expected: "(Array<JsonValue> | __type | boolean | null | number | string)",
|
|
1538
|
+
value: elem
|
|
1539
|
+
}, errorFactory)) && (null === elem || "string" === typeof elem || "number" === typeof elem || "boolean" === typeof elem || (Array.isArray(elem) && ($aa0(elem, _path + "[" + _index1 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
|
1540
|
+
path: _path + "[" + _index1 + "]",
|
|
1541
|
+
expected: "Array<JsonValue>",
|
|
1542
|
+
value: elem
|
|
1543
|
+
}, errorFactory)) || "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $ao1(elem, _path + "[" + _index1 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
|
1544
|
+
path: _path + "[" + _index1 + "]",
|
|
1545
|
+
expected: "(Array<JsonValue> | __type | boolean | null | number | string)",
|
|
1546
|
+
value: elem
|
|
1547
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
1548
|
+
path: _path + "[" + _index1 + "]",
|
|
1549
|
+
expected: "(Array<JsonValue> | __type | boolean | null | number | string)",
|
|
1550
|
+
value: elem
|
|
1551
|
+
}, errorFactory)));
|
|
1552
|
+
return ("object" === typeof input && null !== input && false === Array.isArray(input) || $guard(true, {
|
|
1553
|
+
path: _path + "",
|
|
1554
|
+
expected: "EventPropsRecord",
|
|
1555
|
+
value: input
|
|
1556
|
+
}, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
|
|
1557
|
+
path: _path + "",
|
|
1558
|
+
expected: "EventPropsRecord",
|
|
1559
|
+
value: input
|
|
1560
|
+
}, errorFactory);
|
|
1561
|
+
})(input, "$input", true);
|
|
1562
|
+
};
|
|
1563
|
+
export const stringifyEventPropsRecord = input => {
|
|
1564
|
+
const $io1 = input => Object.keys(input).every(key => {
|
|
1565
|
+
const value = input[key];
|
|
1566
|
+
if (undefined === value)
|
|
1567
|
+
return true;
|
|
1568
|
+
return undefined !== value && (null === value || "string" === typeof value || "number" === typeof value || "boolean" === typeof value || (Array.isArray(value) && ($ia0(value) || false) || "object" === typeof value && null !== value && false === Array.isArray(value) && $io1(value)));
|
|
1569
|
+
});
|
|
1570
|
+
const $ia0 = input => input.every(elem => undefined !== elem && (null === elem || "string" === typeof elem || "number" === typeof elem || "boolean" === typeof elem || (Array.isArray(elem) && ($ia0(elem) || false) || "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io1(elem))));
|
|
1571
|
+
const $string = __typia.json.createStringify.string;
|
|
1572
|
+
const $throws = __typia.json.createStringify.throws;
|
|
1573
|
+
const $tail = __typia.json.createStringify.tail;
|
|
1574
|
+
const $so0 = input => `{${$tail(`${undefined === input.source ? "" : `"source":${undefined !== input.source ? $string(input.source) : undefined},`}${undefined === input.cueCard ? "" : `"cueCard":${undefined !== input.cueCard ? (() => {
|
|
1575
|
+
if ("string" === typeof input.cueCard)
|
|
1576
|
+
return $string(input.cueCard);
|
|
1577
|
+
if ("boolean" === typeof input.cueCard)
|
|
1578
|
+
return input.cueCard;
|
|
1579
|
+
$throws({
|
|
1580
|
+
expected: "(boolean | string | undefined)",
|
|
1581
|
+
value: input.cueCard
|
|
1582
|
+
});
|
|
1583
|
+
})() : undefined},`}${Object.entries(input).map(([key, value]) => { if (undefined === value)
|
|
1584
|
+
return ""; if (["source", "cueCard"].some(regular => regular === key))
|
|
1585
|
+
return ""; return `${JSON.stringify(key)}:${null !== value ? (() => {
|
|
1586
|
+
if ("string" === typeof value)
|
|
1587
|
+
return $string(value);
|
|
1588
|
+
if ("number" === typeof value)
|
|
1589
|
+
return value;
|
|
1590
|
+
if ("boolean" === typeof value)
|
|
1591
|
+
return value;
|
|
1592
|
+
if (Array.isArray(value))
|
|
1593
|
+
return $sa0(value);
|
|
1594
|
+
if ("object" === typeof value && null !== value && false === Array.isArray(value))
|
|
1595
|
+
return $so1(value);
|
|
1596
|
+
$throws({
|
|
1597
|
+
expected: "(Array<JsonValue> | __type | boolean | null | number | string)",
|
|
1598
|
+
value: value
|
|
1599
|
+
});
|
|
1600
|
+
})() : "null"}`; }).filter(str => "" !== str).join(",")}`)}}`;
|
|
1601
|
+
const $so1 = input => `{${Object.entries(input).map(([key, value]) => { if (undefined === value)
|
|
1602
|
+
return ""; return `${JSON.stringify(key)}:${null !== value ? (() => {
|
|
1603
|
+
if ("string" === typeof value)
|
|
1604
|
+
return $string(value);
|
|
1605
|
+
if ("number" === typeof value)
|
|
1606
|
+
return value;
|
|
1607
|
+
if ("boolean" === typeof value)
|
|
1608
|
+
return value;
|
|
1609
|
+
if (Array.isArray(value))
|
|
1610
|
+
return $sa0(value);
|
|
1611
|
+
if ("object" === typeof value && null !== value && false === Array.isArray(value))
|
|
1612
|
+
return $so1(value);
|
|
1613
|
+
$throws({
|
|
1614
|
+
expected: "(Array<JsonValue> | __type | boolean | null | number | string)",
|
|
1615
|
+
value: value
|
|
1616
|
+
});
|
|
1617
|
+
})() : "null"}`; }).filter(str => "" !== str).join(",")}}`;
|
|
1618
|
+
const $sa0 = input => `[${input.map(elem => null !== elem ? (() => {
|
|
1619
|
+
if ("string" === typeof elem)
|
|
1620
|
+
return $string(elem);
|
|
1621
|
+
if ("number" === typeof elem)
|
|
1622
|
+
return elem;
|
|
1623
|
+
if ("boolean" === typeof elem)
|
|
1624
|
+
return elem;
|
|
1625
|
+
if (Array.isArray(elem))
|
|
1626
|
+
return $sa0(elem);
|
|
1627
|
+
if ("object" === typeof elem && null !== elem && false === Array.isArray(elem))
|
|
1628
|
+
return $so1(elem);
|
|
1629
|
+
$throws({
|
|
1630
|
+
expected: "(Array<JsonValue> | __type | boolean | null | number | string)",
|
|
1631
|
+
value: elem
|
|
1632
|
+
});
|
|
1633
|
+
})() : "null").join(",")}]`;
|
|
1634
|
+
return $so0(input);
|
|
1635
|
+
};
|
|
1636
|
+
export const assertStringifyEventPropsRecord = (input, errorFactory) => { const assert = (input, errorFactory) => {
|
|
1637
|
+
const __is = input => {
|
|
1638
|
+
const $io0 = input => (undefined === input.source || "string" === typeof input.source) && (undefined === input.cueCard || "string" === typeof input.cueCard || "boolean" === typeof input.cueCard) && Object.keys(input).every(key => {
|
|
1639
|
+
if (["source", "cueCard"].some(prop => key === prop))
|
|
1640
|
+
return true;
|
|
1641
|
+
const value = input[key];
|
|
1642
|
+
if (undefined === value)
|
|
1643
|
+
return true;
|
|
1644
|
+
return undefined !== value && (null === value || "string" === typeof value || "number" === typeof value && !Number.isNaN(value) || "boolean" === typeof value || (Array.isArray(value) && ($ia0(value) || false) || "object" === typeof value && null !== value && false === Array.isArray(value) && $io1(value)));
|
|
1645
|
+
});
|
|
1646
|
+
const $io1 = input => Object.keys(input).every(key => {
|
|
1647
|
+
const value = input[key];
|
|
1648
|
+
if (undefined === value)
|
|
1649
|
+
return true;
|
|
1650
|
+
return undefined !== value && (null === value || "string" === typeof value || "number" === typeof value && !Number.isNaN(value) || "boolean" === typeof value || (Array.isArray(value) && ($ia0(value) || false) || "object" === typeof value && null !== value && false === Array.isArray(value) && $io1(value)));
|
|
1651
|
+
});
|
|
1652
|
+
const $ia0 = input => input.every(elem => undefined !== elem && (null === elem || "string" === typeof elem || "number" === typeof elem && !Number.isNaN(elem) || "boolean" === typeof elem || (Array.isArray(elem) && ($ia0(elem) || false) || "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io1(elem))));
|
|
1653
|
+
return "object" === typeof input && null !== input && false === Array.isArray(input) && $io0(input);
|
|
1654
|
+
};
|
|
1655
|
+
if (false === __is(input))
|
|
1656
|
+
((input, _path, _exceptionable = true) => {
|
|
1657
|
+
const $guard = __typia.json.createAssertStringify.guard;
|
|
1658
|
+
const $join = __typia.json.createAssertStringify.join;
|
|
1659
|
+
const $ao0 = (input, _path, _exceptionable = true) => (undefined === input.source || "string" === typeof input.source || $guard(_exceptionable, {
|
|
1660
|
+
path: _path + ".source",
|
|
1661
|
+
expected: "(string | undefined)",
|
|
1662
|
+
value: input.source
|
|
1663
|
+
}, errorFactory)) && (undefined === input.cueCard || "string" === typeof input.cueCard || "boolean" === typeof input.cueCard || $guard(_exceptionable, {
|
|
1664
|
+
path: _path + ".cueCard",
|
|
1665
|
+
expected: "(boolean | string | undefined)",
|
|
1666
|
+
value: input.cueCard
|
|
1667
|
+
}, errorFactory)) && (false === _exceptionable || Object.keys(input).every(key => {
|
|
1668
|
+
if (["source", "cueCard"].some(prop => key === prop))
|
|
1669
|
+
return true;
|
|
1670
|
+
const value = input[key];
|
|
1671
|
+
if (undefined === value)
|
|
1672
|
+
return true;
|
|
1673
|
+
return (undefined !== value || $guard(_exceptionable, {
|
|
1674
|
+
path: _path + $join(key),
|
|
1675
|
+
expected: "(Array<JsonValue> | __type | boolean | null | number | string)",
|
|
1676
|
+
value: value
|
|
1677
|
+
}, errorFactory)) && (null === value || "string" === typeof value || "number" === typeof value && !Number.isNaN(value) || "boolean" === typeof value || (Array.isArray(value) && ($aa0(value, _path + $join(key), true && _exceptionable) || $guard(_exceptionable, {
|
|
1678
|
+
path: _path + $join(key),
|
|
1679
|
+
expected: "Array<JsonValue>",
|
|
1680
|
+
value: value
|
|
1681
|
+
}, errorFactory)) || "object" === typeof value && null !== value && false === Array.isArray(value) && $ao1(value, _path + $join(key), true && _exceptionable) || $guard(_exceptionable, {
|
|
1682
|
+
path: _path + $join(key),
|
|
1683
|
+
expected: "(Array<JsonValue> | __type | boolean | null | number | string)",
|
|
1684
|
+
value: value
|
|
1685
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
1686
|
+
path: _path + $join(key),
|
|
1687
|
+
expected: "(Array<JsonValue> | __type | boolean | null | number | string)",
|
|
1688
|
+
value: value
|
|
1689
|
+
}, errorFactory));
|
|
1690
|
+
}));
|
|
1691
|
+
const $ao1 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
|
|
1692
|
+
const value = input[key];
|
|
1693
|
+
if (undefined === value)
|
|
1694
|
+
return true;
|
|
1695
|
+
return (undefined !== value || $guard(_exceptionable, {
|
|
1696
|
+
path: _path + $join(key),
|
|
1697
|
+
expected: "(Array<JsonValue> | __type | boolean | null | number | string)",
|
|
1698
|
+
value: value
|
|
1699
|
+
}, errorFactory)) && (null === value || "string" === typeof value || "number" === typeof value && !Number.isNaN(value) || "boolean" === typeof value || (Array.isArray(value) && ($aa0(value, _path + $join(key), true && _exceptionable) || $guard(_exceptionable, {
|
|
1700
|
+
path: _path + $join(key),
|
|
1701
|
+
expected: "Array<JsonValue>",
|
|
1702
|
+
value: value
|
|
1703
|
+
}, errorFactory)) || "object" === typeof value && null !== value && false === Array.isArray(value) && $ao1(value, _path + $join(key), true && _exceptionable) || $guard(_exceptionable, {
|
|
1704
|
+
path: _path + $join(key),
|
|
1705
|
+
expected: "(Array<JsonValue> | __type | boolean | null | number | string)",
|
|
1706
|
+
value: value
|
|
1707
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
1708
|
+
path: _path + $join(key),
|
|
1709
|
+
expected: "(Array<JsonValue> | __type | boolean | null | number | string)",
|
|
1710
|
+
value: value
|
|
1711
|
+
}, errorFactory));
|
|
1712
|
+
});
|
|
1713
|
+
const $aa0 = (input, _path, _exceptionable = true) => input.every((elem, _index1) => (undefined !== elem || $guard(_exceptionable, {
|
|
1714
|
+
path: _path + "[" + _index1 + "]",
|
|
1715
|
+
expected: "(Array<JsonValue> | __type | boolean | null | number | string)",
|
|
1716
|
+
value: elem
|
|
1717
|
+
}, errorFactory)) && (null === elem || "string" === typeof elem || "number" === typeof elem && !Number.isNaN(elem) || "boolean" === typeof elem || (Array.isArray(elem) && ($aa0(elem, _path + "[" + _index1 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
|
1718
|
+
path: _path + "[" + _index1 + "]",
|
|
1719
|
+
expected: "Array<JsonValue>",
|
|
1720
|
+
value: elem
|
|
1721
|
+
}, errorFactory)) || "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $ao1(elem, _path + "[" + _index1 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
|
1722
|
+
path: _path + "[" + _index1 + "]",
|
|
1723
|
+
expected: "(Array<JsonValue> | __type | boolean | null | number | string)",
|
|
1724
|
+
value: elem
|
|
1725
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
1726
|
+
path: _path + "[" + _index1 + "]",
|
|
1727
|
+
expected: "(Array<JsonValue> | __type | boolean | null | number | string)",
|
|
1728
|
+
value: elem
|
|
1729
|
+
}, errorFactory)));
|
|
1730
|
+
return ("object" === typeof input && null !== input && false === Array.isArray(input) || $guard(true, {
|
|
1731
|
+
path: _path + "",
|
|
1732
|
+
expected: "EventPropsRecord",
|
|
1733
|
+
value: input
|
|
1734
|
+
}, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
|
|
1735
|
+
path: _path + "",
|
|
1736
|
+
expected: "EventPropsRecord",
|
|
1737
|
+
value: input
|
|
1738
|
+
}, errorFactory);
|
|
1739
|
+
})(input, "$input", true);
|
|
1740
|
+
return input;
|
|
1741
|
+
}; const stringify = input => {
|
|
1742
|
+
const $io1 = input => Object.keys(input).every(key => {
|
|
1743
|
+
const value = input[key];
|
|
1744
|
+
if (undefined === value)
|
|
1745
|
+
return true;
|
|
1746
|
+
return undefined !== value && (null === value || "string" === typeof value || "number" === typeof value || "boolean" === typeof value || (Array.isArray(value) && ($ia0(value) || false) || "object" === typeof value && null !== value && false === Array.isArray(value) && $io1(value)));
|
|
1747
|
+
});
|
|
1748
|
+
const $ia0 = input => input.every(elem => undefined !== elem && (null === elem || "string" === typeof elem || "number" === typeof elem || "boolean" === typeof elem || (Array.isArray(elem) && ($ia0(elem) || false) || "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io1(elem))));
|
|
1749
|
+
const $string = __typia.json.createAssertStringify.string;
|
|
1750
|
+
const $throws = __typia.json.createAssertStringify.throws;
|
|
1751
|
+
const $tail = __typia.json.createAssertStringify.tail;
|
|
1752
|
+
const $so0 = input => `{${$tail(`${undefined === input.source ? "" : `"source":${undefined !== input.source ? $string(input.source) : undefined},`}${undefined === input.cueCard ? "" : `"cueCard":${undefined !== input.cueCard ? (() => {
|
|
1753
|
+
if ("string" === typeof input.cueCard)
|
|
1754
|
+
return $string(input.cueCard);
|
|
1755
|
+
if ("boolean" === typeof input.cueCard)
|
|
1756
|
+
return input.cueCard;
|
|
1757
|
+
$throws({
|
|
1758
|
+
expected: "(boolean | string | undefined)",
|
|
1759
|
+
value: input.cueCard
|
|
1760
|
+
});
|
|
1761
|
+
})() : undefined},`}${Object.entries(input).map(([key, value]) => { if (undefined === value)
|
|
1762
|
+
return ""; if (["source", "cueCard"].some(regular => regular === key))
|
|
1763
|
+
return ""; return `${JSON.stringify(key)}:${null !== value ? (() => {
|
|
1764
|
+
if ("string" === typeof value)
|
|
1765
|
+
return $string(value);
|
|
1766
|
+
if ("number" === typeof value)
|
|
1767
|
+
return value;
|
|
1768
|
+
if ("boolean" === typeof value)
|
|
1769
|
+
return value;
|
|
1770
|
+
if (Array.isArray(value))
|
|
1771
|
+
return $sa0(value);
|
|
1772
|
+
if ("object" === typeof value && null !== value && false === Array.isArray(value))
|
|
1773
|
+
return $so1(value);
|
|
1774
|
+
$throws({
|
|
1775
|
+
expected: "(Array<JsonValue> | __type | boolean | null | number | string)",
|
|
1776
|
+
value: value
|
|
1777
|
+
});
|
|
1778
|
+
})() : "null"}`; }).filter(str => "" !== str).join(",")}`)}}`;
|
|
1779
|
+
const $so1 = input => `{${Object.entries(input).map(([key, value]) => { if (undefined === value)
|
|
1780
|
+
return ""; return `${JSON.stringify(key)}:${null !== value ? (() => {
|
|
1781
|
+
if ("string" === typeof value)
|
|
1782
|
+
return $string(value);
|
|
1783
|
+
if ("number" === typeof value)
|
|
1784
|
+
return value;
|
|
1785
|
+
if ("boolean" === typeof value)
|
|
1786
|
+
return value;
|
|
1787
|
+
if (Array.isArray(value))
|
|
1788
|
+
return $sa0(value);
|
|
1789
|
+
if ("object" === typeof value && null !== value && false === Array.isArray(value))
|
|
1790
|
+
return $so1(value);
|
|
1791
|
+
$throws({
|
|
1792
|
+
expected: "(Array<JsonValue> | __type | boolean | null | number | string)",
|
|
1793
|
+
value: value
|
|
1794
|
+
});
|
|
1795
|
+
})() : "null"}`; }).filter(str => "" !== str).join(",")}}`;
|
|
1796
|
+
const $sa0 = input => `[${input.map(elem => null !== elem ? (() => {
|
|
1797
|
+
if ("string" === typeof elem)
|
|
1798
|
+
return $string(elem);
|
|
1799
|
+
if ("number" === typeof elem)
|
|
1800
|
+
return elem;
|
|
1801
|
+
if ("boolean" === typeof elem)
|
|
1802
|
+
return elem;
|
|
1803
|
+
if (Array.isArray(elem))
|
|
1804
|
+
return $sa0(elem);
|
|
1805
|
+
if ("object" === typeof elem && null !== elem && false === Array.isArray(elem))
|
|
1806
|
+
return $so1(elem);
|
|
1807
|
+
$throws({
|
|
1808
|
+
expected: "(Array<JsonValue> | __type | boolean | null | number | string)",
|
|
1809
|
+
value: elem
|
|
1810
|
+
});
|
|
1811
|
+
})() : "null").join(",")}]`;
|
|
1812
|
+
return $so0(input);
|
|
1813
|
+
}; return stringify(assert(input, errorFactory)); };
|
|
1814
|
+
export const isEventOverlayRecord = input => {
|
|
1815
|
+
const $io0 = input => Object.keys(input).every(key => {
|
|
1816
|
+
const value = input[key];
|
|
1817
|
+
if (undefined === value)
|
|
1818
|
+
return true;
|
|
1819
|
+
return "object" === typeof value && null !== value && $io1(value);
|
|
1820
|
+
});
|
|
1821
|
+
const $io1 = input => "object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) && $io2(input.data);
|
|
1822
|
+
const $io2 = input => (undefined === input.source || "string" === typeof input.source) && (undefined === input.cueCard || "string" === typeof input.cueCard || "boolean" === typeof input.cueCard) && Object.keys(input).every(key => {
|
|
1823
|
+
if (["source", "cueCard"].some(prop => key === prop))
|
|
1824
|
+
return true;
|
|
1825
|
+
const value = input[key];
|
|
1826
|
+
if (undefined === value)
|
|
1827
|
+
return true;
|
|
1828
|
+
return undefined !== value && (null === value || "string" === typeof value || "number" === typeof value || "boolean" === typeof value || (Array.isArray(value) && ($ia0(value) || false) || "object" === typeof value && null !== value && false === Array.isArray(value) && $io3(value)));
|
|
1829
|
+
});
|
|
1830
|
+
const $io3 = input => Object.keys(input).every(key => {
|
|
1831
|
+
const value = input[key];
|
|
1832
|
+
if (undefined === value)
|
|
1833
|
+
return true;
|
|
1834
|
+
return undefined !== value && (null === value || "string" === typeof value || "number" === typeof value || "boolean" === typeof value || (Array.isArray(value) && ($ia0(value) || false) || "object" === typeof value && null !== value && false === Array.isArray(value) && $io3(value)));
|
|
1835
|
+
});
|
|
1836
|
+
const $ia0 = input => input.every(elem => undefined !== elem && (null === elem || "string" === typeof elem || "number" === typeof elem || "boolean" === typeof elem || (Array.isArray(elem) && ($ia0(elem) || false) || "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io3(elem))));
|
|
1837
|
+
return "object" === typeof input && null !== input && false === Array.isArray(input) && $io0(input);
|
|
1838
|
+
};
|
|
1839
|
+
export const assertEventOverlayRecord = (input, errorFactory) => {
|
|
1840
|
+
const __is = input => {
|
|
1841
|
+
const $io0 = input => Object.keys(input).every(key => {
|
|
1842
|
+
const value = input[key];
|
|
1843
|
+
if (undefined === value)
|
|
1844
|
+
return true;
|
|
1845
|
+
return "object" === typeof value && null !== value && $io1(value);
|
|
1846
|
+
});
|
|
1847
|
+
const $io1 = input => "object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) && $io2(input.data);
|
|
1848
|
+
const $io2 = input => (undefined === input.source || "string" === typeof input.source) && (undefined === input.cueCard || "string" === typeof input.cueCard || "boolean" === typeof input.cueCard) && Object.keys(input).every(key => {
|
|
1849
|
+
if (["source", "cueCard"].some(prop => key === prop))
|
|
1850
|
+
return true;
|
|
1851
|
+
const value = input[key];
|
|
1852
|
+
if (undefined === value)
|
|
1853
|
+
return true;
|
|
1854
|
+
return undefined !== value && (null === value || "string" === typeof value || "number" === typeof value || "boolean" === typeof value || (Array.isArray(value) && ($ia0(value) || false) || "object" === typeof value && null !== value && false === Array.isArray(value) && $io3(value)));
|
|
1855
|
+
});
|
|
1856
|
+
const $io3 = input => Object.keys(input).every(key => {
|
|
1857
|
+
const value = input[key];
|
|
1858
|
+
if (undefined === value)
|
|
1859
|
+
return true;
|
|
1860
|
+
return undefined !== value && (null === value || "string" === typeof value || "number" === typeof value || "boolean" === typeof value || (Array.isArray(value) && ($ia0(value) || false) || "object" === typeof value && null !== value && false === Array.isArray(value) && $io3(value)));
|
|
1861
|
+
});
|
|
1862
|
+
const $ia0 = input => input.every(elem => undefined !== elem && (null === elem || "string" === typeof elem || "number" === typeof elem || "boolean" === typeof elem || (Array.isArray(elem) && ($ia0(elem) || false) || "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io3(elem))));
|
|
1863
|
+
return "object" === typeof input && null !== input && false === Array.isArray(input) && $io0(input);
|
|
1864
|
+
};
|
|
1865
|
+
if (false === __is(input))
|
|
1866
|
+
((input, _path, _exceptionable = true) => {
|
|
1867
|
+
const $guard = __typia.createAssert.guard;
|
|
1868
|
+
const $join = __typia.createAssert.join;
|
|
1869
|
+
const $ao0 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
|
|
1870
|
+
const value = input[key];
|
|
1871
|
+
if (undefined === value)
|
|
1872
|
+
return true;
|
|
1873
|
+
return ("object" === typeof value && null !== value || $guard(_exceptionable, {
|
|
1874
|
+
path: _path + $join(key),
|
|
1875
|
+
expected: "__type",
|
|
1876
|
+
value: value
|
|
1877
|
+
}, errorFactory)) && $ao1(value, _path + $join(key), true && _exceptionable) || $guard(_exceptionable, {
|
|
1878
|
+
path: _path + $join(key),
|
|
1879
|
+
expected: "__type",
|
|
1880
|
+
value: value
|
|
1881
|
+
}, errorFactory);
|
|
1882
|
+
});
|
|
1883
|
+
const $ao1 = (input, _path, _exceptionable = true) => ("object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) || $guard(_exceptionable, {
|
|
1884
|
+
path: _path + ".data",
|
|
1885
|
+
expected: "EventPropsRecord",
|
|
1886
|
+
value: input.data
|
|
1887
|
+
}, errorFactory)) && $ao2(input.data, _path + ".data", true && _exceptionable) || $guard(_exceptionable, {
|
|
1888
|
+
path: _path + ".data",
|
|
1889
|
+
expected: "EventPropsRecord",
|
|
1890
|
+
value: input.data
|
|
1891
|
+
}, errorFactory);
|
|
1892
|
+
const $ao2 = (input, _path, _exceptionable = true) => (undefined === input.source || "string" === typeof input.source || $guard(_exceptionable, {
|
|
1893
|
+
path: _path + ".source",
|
|
1894
|
+
expected: "(string | undefined)",
|
|
1895
|
+
value: input.source
|
|
1896
|
+
}, errorFactory)) && (undefined === input.cueCard || "string" === typeof input.cueCard || "boolean" === typeof input.cueCard || $guard(_exceptionable, {
|
|
1897
|
+
path: _path + ".cueCard",
|
|
1898
|
+
expected: "(boolean | string | undefined)",
|
|
1899
|
+
value: input.cueCard
|
|
1900
|
+
}, errorFactory)) && (false === _exceptionable || Object.keys(input).every(key => {
|
|
1901
|
+
if (["source", "cueCard"].some(prop => key === prop))
|
|
1902
|
+
return true;
|
|
1903
|
+
const value = input[key];
|
|
1904
|
+
if (undefined === value)
|
|
1905
|
+
return true;
|
|
1906
|
+
return (undefined !== value || $guard(_exceptionable, {
|
|
1907
|
+
path: _path + $join(key),
|
|
1908
|
+
expected: "(Array<JsonValue> | __type.o1 | boolean | null | number | string)",
|
|
1909
|
+
value: value
|
|
1910
|
+
}, errorFactory)) && (null === value || "string" === typeof value || "number" === typeof value || "boolean" === typeof value || (Array.isArray(value) && ($aa0(value, _path + $join(key), true && _exceptionable) || $guard(_exceptionable, {
|
|
1911
|
+
path: _path + $join(key),
|
|
1912
|
+
expected: "Array<JsonValue>",
|
|
1913
|
+
value: value
|
|
1914
|
+
}, errorFactory)) || "object" === typeof value && null !== value && false === Array.isArray(value) && $ao3(value, _path + $join(key), true && _exceptionable) || $guard(_exceptionable, {
|
|
1915
|
+
path: _path + $join(key),
|
|
1916
|
+
expected: "(Array<JsonValue> | __type.o1 | boolean | null | number | string)",
|
|
1917
|
+
value: value
|
|
1918
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
1919
|
+
path: _path + $join(key),
|
|
1920
|
+
expected: "(Array<JsonValue> | __type.o1 | boolean | null | number | string)",
|
|
1921
|
+
value: value
|
|
1922
|
+
}, errorFactory));
|
|
1923
|
+
}));
|
|
1924
|
+
const $ao3 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
|
|
1925
|
+
const value = input[key];
|
|
1926
|
+
if (undefined === value)
|
|
1927
|
+
return true;
|
|
1928
|
+
return (undefined !== value || $guard(_exceptionable, {
|
|
1929
|
+
path: _path + $join(key),
|
|
1930
|
+
expected: "(Array<JsonValue> | __type.o1 | boolean | null | number | string)",
|
|
1931
|
+
value: value
|
|
1932
|
+
}, errorFactory)) && (null === value || "string" === typeof value || "number" === typeof value || "boolean" === typeof value || (Array.isArray(value) && ($aa0(value, _path + $join(key), true && _exceptionable) || $guard(_exceptionable, {
|
|
1933
|
+
path: _path + $join(key),
|
|
1934
|
+
expected: "Array<JsonValue>",
|
|
1935
|
+
value: value
|
|
1936
|
+
}, errorFactory)) || "object" === typeof value && null !== value && false === Array.isArray(value) && $ao3(value, _path + $join(key), true && _exceptionable) || $guard(_exceptionable, {
|
|
1937
|
+
path: _path + $join(key),
|
|
1938
|
+
expected: "(Array<JsonValue> | __type.o1 | boolean | null | number | string)",
|
|
1939
|
+
value: value
|
|
1940
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
1941
|
+
path: _path + $join(key),
|
|
1942
|
+
expected: "(Array<JsonValue> | __type.o1 | boolean | null | number | string)",
|
|
1943
|
+
value: value
|
|
1944
|
+
}, errorFactory));
|
|
1945
|
+
});
|
|
1946
|
+
const $aa0 = (input, _path, _exceptionable = true) => input.every((elem, _index1) => (undefined !== elem || $guard(_exceptionable, {
|
|
1947
|
+
path: _path + "[" + _index1 + "]",
|
|
1948
|
+
expected: "(Array<JsonValue> | __type.o1 | boolean | null | number | string)",
|
|
1949
|
+
value: elem
|
|
1950
|
+
}, errorFactory)) && (null === elem || "string" === typeof elem || "number" === typeof elem || "boolean" === typeof elem || (Array.isArray(elem) && ($aa0(elem, _path + "[" + _index1 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
|
1951
|
+
path: _path + "[" + _index1 + "]",
|
|
1952
|
+
expected: "Array<JsonValue>",
|
|
1953
|
+
value: elem
|
|
1954
|
+
}, errorFactory)) || "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $ao3(elem, _path + "[" + _index1 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
|
1955
|
+
path: _path + "[" + _index1 + "]",
|
|
1956
|
+
expected: "(Array<JsonValue> | __type.o1 | boolean | null | number | string)",
|
|
1957
|
+
value: elem
|
|
1958
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
1959
|
+
path: _path + "[" + _index1 + "]",
|
|
1960
|
+
expected: "(Array<JsonValue> | __type.o1 | boolean | null | number | string)",
|
|
1961
|
+
value: elem
|
|
1962
|
+
}, errorFactory)));
|
|
1963
|
+
return ("object" === typeof input && null !== input && false === Array.isArray(input) || $guard(true, {
|
|
1964
|
+
path: _path + "",
|
|
1965
|
+
expected: "EventOverlayRecord",
|
|
1966
|
+
value: input
|
|
1967
|
+
}, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
|
|
1968
|
+
path: _path + "",
|
|
1969
|
+
expected: "EventOverlayRecord",
|
|
1970
|
+
value: input
|
|
1971
|
+
}, errorFactory);
|
|
1972
|
+
})(input, "$input", true);
|
|
1973
|
+
return input;
|
|
1974
|
+
};
|
|
1975
|
+
export const randomEventOverlayRecord = generator => {
|
|
1976
|
+
const $generator = __typia.createRandom.generator;
|
|
1977
|
+
const $pick = __typia.createRandom.pick;
|
|
1978
|
+
const $ro0 = (_recursive = false, _depth = 0) => {
|
|
1979
|
+
const output = {};
|
|
1980
|
+
(generator?.array ?? $generator.array)(() => output[(generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()] = $ro1(_recursive, _recursive ? 1 + _depth : _depth), (generator?.integer ?? $generator.integer)(0, 3));
|
|
1981
|
+
return output;
|
|
1982
|
+
};
|
|
1983
|
+
const $ro1 = (_recursive = false, _depth = 0) => ({
|
|
1984
|
+
data: $ro2(_recursive, _recursive ? 1 + _depth : _depth)
|
|
1985
|
+
});
|
|
1986
|
+
const $ro2 = (_recursive = false, _depth = 0) => {
|
|
1987
|
+
const output = {
|
|
1988
|
+
source: $pick([
|
|
1989
|
+
() => undefined,
|
|
1990
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
1991
|
+
])(),
|
|
1992
|
+
cueCard: $pick([
|
|
1993
|
+
() => undefined,
|
|
1994
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
|
|
1995
|
+
() => (generator?.boolean ?? $generator.boolean)()
|
|
1996
|
+
])()
|
|
1997
|
+
};
|
|
1998
|
+
(generator?.array ?? $generator.array)(() => output[(generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()] = $pick([
|
|
1999
|
+
() => null,
|
|
2000
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
|
|
2001
|
+
() => (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100),
|
|
2002
|
+
() => (generator?.boolean ?? $generator.boolean)(),
|
|
2003
|
+
() => $ra0(generator?.length ?? $generator.length, false, true, 0),
|
|
2004
|
+
() => $ro3(_recursive, _recursive ? 1 + _depth : _depth)
|
|
2005
|
+
])(), (generator?.integer ?? $generator.integer)(0, 3));
|
|
2006
|
+
return output;
|
|
2007
|
+
};
|
|
2008
|
+
const $ro3 = (_recursive = true, _depth = 0) => {
|
|
2009
|
+
const output = {};
|
|
2010
|
+
if (5 >= _depth) {
|
|
2011
|
+
(generator?.array ?? $generator.array)(() => output[(generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()] = $pick([
|
|
2012
|
+
() => null,
|
|
2013
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
|
|
2014
|
+
() => (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100),
|
|
2015
|
+
() => (generator?.boolean ?? $generator.boolean)(),
|
|
2016
|
+
() => $ra0(generator?.length ?? $generator.length, false, true, 1 + _depth),
|
|
2017
|
+
() => $ro3(true, _recursive ? 1 + _depth : _depth)
|
|
2018
|
+
])(), (generator?.integer ?? $generator.integer)(0, 3));
|
|
2019
|
+
}
|
|
2020
|
+
return output;
|
|
2021
|
+
};
|
|
2022
|
+
const $ra0 = (length, unique, _recursive = true, _depth = 0) => 5 >= _depth ? (generator?.array ?? $generator.array)(() => $pick([
|
|
2023
|
+
() => null,
|
|
2024
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
|
|
2025
|
+
() => (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100),
|
|
2026
|
+
() => (generator?.boolean ?? $generator.boolean)(),
|
|
2027
|
+
() => $ra0(generator?.length ?? $generator.length, false, true, 1 + _depth),
|
|
2028
|
+
() => $ro3(true, _recursive ? 1 + _depth : _depth)
|
|
2029
|
+
])(), length, unique) : [];
|
|
2030
|
+
return $ro0();
|
|
2031
|
+
};
|
|
2032
|
+
export const assertGuardEventOverlayRecord = (input, errorFactory) => {
|
|
2033
|
+
const __is = input => {
|
|
2034
|
+
const $io0 = input => Object.keys(input).every(key => {
|
|
2035
|
+
const value = input[key];
|
|
2036
|
+
if (undefined === value)
|
|
2037
|
+
return true;
|
|
2038
|
+
return "object" === typeof value && null !== value && $io1(value);
|
|
2039
|
+
});
|
|
2040
|
+
const $io1 = input => "object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) && $io2(input.data);
|
|
2041
|
+
const $io2 = input => (undefined === input.source || "string" === typeof input.source) && (undefined === input.cueCard || "string" === typeof input.cueCard || "boolean" === typeof input.cueCard) && Object.keys(input).every(key => {
|
|
2042
|
+
if (["source", "cueCard"].some(prop => key === prop))
|
|
2043
|
+
return true;
|
|
2044
|
+
const value = input[key];
|
|
2045
|
+
if (undefined === value)
|
|
2046
|
+
return true;
|
|
2047
|
+
return undefined !== value && (null === value || "string" === typeof value || "number" === typeof value || "boolean" === typeof value || (Array.isArray(value) && ($ia0(value) || false) || "object" === typeof value && null !== value && false === Array.isArray(value) && $io3(value)));
|
|
2048
|
+
});
|
|
2049
|
+
const $io3 = input => Object.keys(input).every(key => {
|
|
2050
|
+
const value = input[key];
|
|
2051
|
+
if (undefined === value)
|
|
2052
|
+
return true;
|
|
2053
|
+
return undefined !== value && (null === value || "string" === typeof value || "number" === typeof value || "boolean" === typeof value || (Array.isArray(value) && ($ia0(value) || false) || "object" === typeof value && null !== value && false === Array.isArray(value) && $io3(value)));
|
|
2054
|
+
});
|
|
2055
|
+
const $ia0 = input => input.every(elem => undefined !== elem && (null === elem || "string" === typeof elem || "number" === typeof elem || "boolean" === typeof elem || (Array.isArray(elem) && ($ia0(elem) || false) || "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io3(elem))));
|
|
2056
|
+
return "object" === typeof input && null !== input && false === Array.isArray(input) && $io0(input);
|
|
2057
|
+
};
|
|
2058
|
+
if (false === __is(input))
|
|
2059
|
+
((input, _path, _exceptionable = true) => {
|
|
2060
|
+
const $guard = __typia.createAssertGuard.guard;
|
|
2061
|
+
const $join = __typia.createAssertGuard.join;
|
|
2062
|
+
const $ao0 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
|
|
2063
|
+
const value = input[key];
|
|
2064
|
+
if (undefined === value)
|
|
2065
|
+
return true;
|
|
2066
|
+
return ("object" === typeof value && null !== value || $guard(_exceptionable, {
|
|
2067
|
+
path: _path + $join(key),
|
|
2068
|
+
expected: "__type",
|
|
2069
|
+
value: value
|
|
2070
|
+
}, errorFactory)) && $ao1(value, _path + $join(key), true && _exceptionable) || $guard(_exceptionable, {
|
|
2071
|
+
path: _path + $join(key),
|
|
2072
|
+
expected: "__type",
|
|
2073
|
+
value: value
|
|
2074
|
+
}, errorFactory);
|
|
2075
|
+
});
|
|
2076
|
+
const $ao1 = (input, _path, _exceptionable = true) => ("object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) || $guard(_exceptionable, {
|
|
2077
|
+
path: _path + ".data",
|
|
2078
|
+
expected: "EventPropsRecord",
|
|
2079
|
+
value: input.data
|
|
2080
|
+
}, errorFactory)) && $ao2(input.data, _path + ".data", true && _exceptionable) || $guard(_exceptionable, {
|
|
2081
|
+
path: _path + ".data",
|
|
2082
|
+
expected: "EventPropsRecord",
|
|
2083
|
+
value: input.data
|
|
2084
|
+
}, errorFactory);
|
|
2085
|
+
const $ao2 = (input, _path, _exceptionable = true) => (undefined === input.source || "string" === typeof input.source || $guard(_exceptionable, {
|
|
2086
|
+
path: _path + ".source",
|
|
2087
|
+
expected: "(string | undefined)",
|
|
2088
|
+
value: input.source
|
|
2089
|
+
}, errorFactory)) && (undefined === input.cueCard || "string" === typeof input.cueCard || "boolean" === typeof input.cueCard || $guard(_exceptionable, {
|
|
2090
|
+
path: _path + ".cueCard",
|
|
2091
|
+
expected: "(boolean | string | undefined)",
|
|
2092
|
+
value: input.cueCard
|
|
2093
|
+
}, errorFactory)) && (false === _exceptionable || Object.keys(input).every(key => {
|
|
2094
|
+
if (["source", "cueCard"].some(prop => key === prop))
|
|
2095
|
+
return true;
|
|
2096
|
+
const value = input[key];
|
|
2097
|
+
if (undefined === value)
|
|
2098
|
+
return true;
|
|
2099
|
+
return (undefined !== value || $guard(_exceptionable, {
|
|
2100
|
+
path: _path + $join(key),
|
|
2101
|
+
expected: "(Array<JsonValue> | __type.o1 | boolean | null | number | string)",
|
|
2102
|
+
value: value
|
|
2103
|
+
}, errorFactory)) && (null === value || "string" === typeof value || "number" === typeof value || "boolean" === typeof value || (Array.isArray(value) && ($aa0(value, _path + $join(key), true && _exceptionable) || $guard(_exceptionable, {
|
|
2104
|
+
path: _path + $join(key),
|
|
2105
|
+
expected: "Array<JsonValue>",
|
|
2106
|
+
value: value
|
|
2107
|
+
}, errorFactory)) || "object" === typeof value && null !== value && false === Array.isArray(value) && $ao3(value, _path + $join(key), true && _exceptionable) || $guard(_exceptionable, {
|
|
2108
|
+
path: _path + $join(key),
|
|
2109
|
+
expected: "(Array<JsonValue> | __type.o1 | boolean | null | number | string)",
|
|
2110
|
+
value: value
|
|
2111
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
2112
|
+
path: _path + $join(key),
|
|
2113
|
+
expected: "(Array<JsonValue> | __type.o1 | boolean | null | number | string)",
|
|
2114
|
+
value: value
|
|
2115
|
+
}, errorFactory));
|
|
2116
|
+
}));
|
|
2117
|
+
const $ao3 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
|
|
2118
|
+
const value = input[key];
|
|
2119
|
+
if (undefined === value)
|
|
2120
|
+
return true;
|
|
2121
|
+
return (undefined !== value || $guard(_exceptionable, {
|
|
2122
|
+
path: _path + $join(key),
|
|
2123
|
+
expected: "(Array<JsonValue> | __type.o1 | boolean | null | number | string)",
|
|
2124
|
+
value: value
|
|
2125
|
+
}, errorFactory)) && (null === value || "string" === typeof value || "number" === typeof value || "boolean" === typeof value || (Array.isArray(value) && ($aa0(value, _path + $join(key), true && _exceptionable) || $guard(_exceptionable, {
|
|
2126
|
+
path: _path + $join(key),
|
|
2127
|
+
expected: "Array<JsonValue>",
|
|
2128
|
+
value: value
|
|
2129
|
+
}, errorFactory)) || "object" === typeof value && null !== value && false === Array.isArray(value) && $ao3(value, _path + $join(key), true && _exceptionable) || $guard(_exceptionable, {
|
|
2130
|
+
path: _path + $join(key),
|
|
2131
|
+
expected: "(Array<JsonValue> | __type.o1 | boolean | null | number | string)",
|
|
2132
|
+
value: value
|
|
2133
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
2134
|
+
path: _path + $join(key),
|
|
2135
|
+
expected: "(Array<JsonValue> | __type.o1 | boolean | null | number | string)",
|
|
2136
|
+
value: value
|
|
2137
|
+
}, errorFactory));
|
|
2138
|
+
});
|
|
2139
|
+
const $aa0 = (input, _path, _exceptionable = true) => input.every((elem, _index1) => (undefined !== elem || $guard(_exceptionable, {
|
|
2140
|
+
path: _path + "[" + _index1 + "]",
|
|
2141
|
+
expected: "(Array<JsonValue> | __type.o1 | boolean | null | number | string)",
|
|
2142
|
+
value: elem
|
|
2143
|
+
}, errorFactory)) && (null === elem || "string" === typeof elem || "number" === typeof elem || "boolean" === typeof elem || (Array.isArray(elem) && ($aa0(elem, _path + "[" + _index1 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
|
2144
|
+
path: _path + "[" + _index1 + "]",
|
|
2145
|
+
expected: "Array<JsonValue>",
|
|
2146
|
+
value: elem
|
|
2147
|
+
}, errorFactory)) || "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $ao3(elem, _path + "[" + _index1 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
|
2148
|
+
path: _path + "[" + _index1 + "]",
|
|
2149
|
+
expected: "(Array<JsonValue> | __type.o1 | boolean | null | number | string)",
|
|
2150
|
+
value: elem
|
|
2151
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
2152
|
+
path: _path + "[" + _index1 + "]",
|
|
2153
|
+
expected: "(Array<JsonValue> | __type.o1 | boolean | null | number | string)",
|
|
2154
|
+
value: elem
|
|
2155
|
+
}, errorFactory)));
|
|
2156
|
+
return ("object" === typeof input && null !== input && false === Array.isArray(input) || $guard(true, {
|
|
2157
|
+
path: _path + "",
|
|
2158
|
+
expected: "EventOverlayRecord",
|
|
2159
|
+
value: input
|
|
2160
|
+
}, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
|
|
2161
|
+
path: _path + "",
|
|
2162
|
+
expected: "EventOverlayRecord",
|
|
2163
|
+
value: input
|
|
2164
|
+
}, errorFactory);
|
|
2165
|
+
})(input, "$input", true);
|
|
2166
|
+
};
|
|
2167
|
+
export const stringifyEventOverlayRecord = input => {
|
|
2168
|
+
const $io1 = input => "object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) && $io2(input.data);
|
|
2169
|
+
const $io2 = input => (undefined === input.source || "string" === typeof input.source) && (undefined === input.cueCard || "string" === typeof input.cueCard || "boolean" === typeof input.cueCard) && Object.keys(input).every(key => {
|
|
2170
|
+
if (["source", "cueCard"].some(prop => key === prop))
|
|
2171
|
+
return true;
|
|
2172
|
+
const value = input[key];
|
|
2173
|
+
if (undefined === value)
|
|
2174
|
+
return true;
|
|
2175
|
+
return undefined !== value && (null === value || "string" === typeof value || "number" === typeof value || "boolean" === typeof value || (Array.isArray(value) && ($ia0(value) || false) || "object" === typeof value && null !== value && false === Array.isArray(value) && $io3(value)));
|
|
2176
|
+
});
|
|
2177
|
+
const $io3 = input => Object.keys(input).every(key => {
|
|
2178
|
+
const value = input[key];
|
|
2179
|
+
if (undefined === value)
|
|
2180
|
+
return true;
|
|
2181
|
+
return undefined !== value && (null === value || "string" === typeof value || "number" === typeof value || "boolean" === typeof value || (Array.isArray(value) && ($ia0(value) || false) || "object" === typeof value && null !== value && false === Array.isArray(value) && $io3(value)));
|
|
2182
|
+
});
|
|
2183
|
+
const $ia0 = input => input.every(elem => undefined !== elem && (null === elem || "string" === typeof elem || "number" === typeof elem || "boolean" === typeof elem || (Array.isArray(elem) && ($ia0(elem) || false) || "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io3(elem))));
|
|
2184
|
+
const $string = __typia.json.createStringify.string;
|
|
2185
|
+
const $throws = __typia.json.createStringify.throws;
|
|
2186
|
+
const $tail = __typia.json.createStringify.tail;
|
|
2187
|
+
const $so0 = input => `{${Object.entries(input).map(([key, value]) => { if (undefined === value)
|
|
2188
|
+
return ""; return `${JSON.stringify(key)}:${$so1(value)}`; }).filter(str => "" !== str).join(",")}}`;
|
|
2189
|
+
const $so1 = input => `{"data":${$so2(input.data)}}`;
|
|
2190
|
+
const $so2 = input => `{${$tail(`${undefined === input.source ? "" : `"source":${undefined !== input.source ? $string(input.source) : undefined},`}${undefined === input.cueCard ? "" : `"cueCard":${undefined !== input.cueCard ? (() => {
|
|
2191
|
+
if ("string" === typeof input.cueCard)
|
|
2192
|
+
return $string(input.cueCard);
|
|
2193
|
+
if ("boolean" === typeof input.cueCard)
|
|
2194
|
+
return input.cueCard;
|
|
2195
|
+
$throws({
|
|
2196
|
+
expected: "(boolean | string | undefined)",
|
|
2197
|
+
value: input.cueCard
|
|
2198
|
+
});
|
|
2199
|
+
})() : undefined},`}${Object.entries(input).map(([key, value]) => { if (undefined === value)
|
|
2200
|
+
return ""; if (["source", "cueCard"].some(regular => regular === key))
|
|
2201
|
+
return ""; return `${JSON.stringify(key)}:${null !== value ? (() => {
|
|
2202
|
+
if ("string" === typeof value)
|
|
2203
|
+
return $string(value);
|
|
2204
|
+
if ("number" === typeof value)
|
|
2205
|
+
return value;
|
|
2206
|
+
if ("boolean" === typeof value)
|
|
2207
|
+
return value;
|
|
2208
|
+
if (Array.isArray(value))
|
|
2209
|
+
return $sa0(value);
|
|
2210
|
+
if ("object" === typeof value && null !== value && false === Array.isArray(value))
|
|
2211
|
+
return $so3(value);
|
|
2212
|
+
$throws({
|
|
2213
|
+
expected: "(Array<JsonValue> | __type.o1 | boolean | null | number | string)",
|
|
2214
|
+
value: value
|
|
2215
|
+
});
|
|
2216
|
+
})() : "null"}`; }).filter(str => "" !== str).join(",")}`)}}`;
|
|
2217
|
+
const $so3 = input => `{${Object.entries(input).map(([key, value]) => { if (undefined === value)
|
|
2218
|
+
return ""; return `${JSON.stringify(key)}:${null !== value ? (() => {
|
|
2219
|
+
if ("string" === typeof value)
|
|
2220
|
+
return $string(value);
|
|
2221
|
+
if ("number" === typeof value)
|
|
2222
|
+
return value;
|
|
2223
|
+
if ("boolean" === typeof value)
|
|
2224
|
+
return value;
|
|
2225
|
+
if (Array.isArray(value))
|
|
2226
|
+
return $sa0(value);
|
|
2227
|
+
if ("object" === typeof value && null !== value && false === Array.isArray(value))
|
|
2228
|
+
return $so3(value);
|
|
2229
|
+
$throws({
|
|
2230
|
+
expected: "(Array<JsonValue> | __type.o1 | boolean | null | number | string)",
|
|
2231
|
+
value: value
|
|
2232
|
+
});
|
|
2233
|
+
})() : "null"}`; }).filter(str => "" !== str).join(",")}}`;
|
|
2234
|
+
const $sa0 = input => `[${input.map(elem => null !== elem ? (() => {
|
|
2235
|
+
if ("string" === typeof elem)
|
|
2236
|
+
return $string(elem);
|
|
2237
|
+
if ("number" === typeof elem)
|
|
2238
|
+
return elem;
|
|
2239
|
+
if ("boolean" === typeof elem)
|
|
2240
|
+
return elem;
|
|
2241
|
+
if (Array.isArray(elem))
|
|
2242
|
+
return $sa0(elem);
|
|
2243
|
+
if ("object" === typeof elem && null !== elem && false === Array.isArray(elem))
|
|
2244
|
+
return $so3(elem);
|
|
2245
|
+
$throws({
|
|
2246
|
+
expected: "(Array<JsonValue> | __type.o1 | boolean | null | number | string)",
|
|
2247
|
+
value: elem
|
|
2248
|
+
});
|
|
2249
|
+
})() : "null").join(",")}]`;
|
|
2250
|
+
return $so0(input);
|
|
2251
|
+
};
|
|
2252
|
+
export const assertStringifyEventOverlayRecord = (input, errorFactory) => { const assert = (input, errorFactory) => {
|
|
2253
|
+
const __is = input => {
|
|
2254
|
+
const $io0 = input => Object.keys(input).every(key => {
|
|
2255
|
+
const value = input[key];
|
|
2256
|
+
if (undefined === value)
|
|
2257
|
+
return true;
|
|
2258
|
+
return "object" === typeof value && null !== value && $io1(value);
|
|
2259
|
+
});
|
|
2260
|
+
const $io1 = input => "object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) && $io2(input.data);
|
|
2261
|
+
const $io2 = input => (undefined === input.source || "string" === typeof input.source) && (undefined === input.cueCard || "string" === typeof input.cueCard || "boolean" === typeof input.cueCard) && Object.keys(input).every(key => {
|
|
2262
|
+
if (["source", "cueCard"].some(prop => key === prop))
|
|
2263
|
+
return true;
|
|
2264
|
+
const value = input[key];
|
|
2265
|
+
if (undefined === value)
|
|
2266
|
+
return true;
|
|
2267
|
+
return undefined !== value && (null === value || "string" === typeof value || "number" === typeof value && !Number.isNaN(value) || "boolean" === typeof value || (Array.isArray(value) && ($ia0(value) || false) || "object" === typeof value && null !== value && false === Array.isArray(value) && $io3(value)));
|
|
2268
|
+
});
|
|
2269
|
+
const $io3 = input => Object.keys(input).every(key => {
|
|
2270
|
+
const value = input[key];
|
|
2271
|
+
if (undefined === value)
|
|
2272
|
+
return true;
|
|
2273
|
+
return undefined !== value && (null === value || "string" === typeof value || "number" === typeof value && !Number.isNaN(value) || "boolean" === typeof value || (Array.isArray(value) && ($ia0(value) || false) || "object" === typeof value && null !== value && false === Array.isArray(value) && $io3(value)));
|
|
2274
|
+
});
|
|
2275
|
+
const $ia0 = input => input.every(elem => undefined !== elem && (null === elem || "string" === typeof elem || "number" === typeof elem && !Number.isNaN(elem) || "boolean" === typeof elem || (Array.isArray(elem) && ($ia0(elem) || false) || "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io3(elem))));
|
|
2276
|
+
return "object" === typeof input && null !== input && false === Array.isArray(input) && $io0(input);
|
|
2277
|
+
};
|
|
2278
|
+
if (false === __is(input))
|
|
2279
|
+
((input, _path, _exceptionable = true) => {
|
|
2280
|
+
const $guard = __typia.json.createAssertStringify.guard;
|
|
2281
|
+
const $join = __typia.json.createAssertStringify.join;
|
|
2282
|
+
const $ao0 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
|
|
2283
|
+
const value = input[key];
|
|
2284
|
+
if (undefined === value)
|
|
2285
|
+
return true;
|
|
2286
|
+
return ("object" === typeof value && null !== value || $guard(_exceptionable, {
|
|
2287
|
+
path: _path + $join(key),
|
|
2288
|
+
expected: "__type",
|
|
2289
|
+
value: value
|
|
2290
|
+
}, errorFactory)) && $ao1(value, _path + $join(key), true && _exceptionable) || $guard(_exceptionable, {
|
|
2291
|
+
path: _path + $join(key),
|
|
2292
|
+
expected: "__type",
|
|
2293
|
+
value: value
|
|
2294
|
+
}, errorFactory);
|
|
2295
|
+
});
|
|
2296
|
+
const $ao1 = (input, _path, _exceptionable = true) => ("object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) || $guard(_exceptionable, {
|
|
2297
|
+
path: _path + ".data",
|
|
2298
|
+
expected: "EventPropsRecord",
|
|
2299
|
+
value: input.data
|
|
2300
|
+
}, errorFactory)) && $ao2(input.data, _path + ".data", true && _exceptionable) || $guard(_exceptionable, {
|
|
2301
|
+
path: _path + ".data",
|
|
2302
|
+
expected: "EventPropsRecord",
|
|
2303
|
+
value: input.data
|
|
2304
|
+
}, errorFactory);
|
|
2305
|
+
const $ao2 = (input, _path, _exceptionable = true) => (undefined === input.source || "string" === typeof input.source || $guard(_exceptionable, {
|
|
2306
|
+
path: _path + ".source",
|
|
2307
|
+
expected: "(string | undefined)",
|
|
2308
|
+
value: input.source
|
|
2309
|
+
}, errorFactory)) && (undefined === input.cueCard || "string" === typeof input.cueCard || "boolean" === typeof input.cueCard || $guard(_exceptionable, {
|
|
2310
|
+
path: _path + ".cueCard",
|
|
2311
|
+
expected: "(boolean | string | undefined)",
|
|
2312
|
+
value: input.cueCard
|
|
2313
|
+
}, errorFactory)) && (false === _exceptionable || Object.keys(input).every(key => {
|
|
2314
|
+
if (["source", "cueCard"].some(prop => key === prop))
|
|
2315
|
+
return true;
|
|
2316
|
+
const value = input[key];
|
|
2317
|
+
if (undefined === value)
|
|
2318
|
+
return true;
|
|
2319
|
+
return (undefined !== value || $guard(_exceptionable, {
|
|
2320
|
+
path: _path + $join(key),
|
|
2321
|
+
expected: "(Array<JsonValue> | __type.o1 | boolean | null | number | string)",
|
|
2322
|
+
value: value
|
|
2323
|
+
}, errorFactory)) && (null === value || "string" === typeof value || "number" === typeof value && !Number.isNaN(value) || "boolean" === typeof value || (Array.isArray(value) && ($aa0(value, _path + $join(key), true && _exceptionable) || $guard(_exceptionable, {
|
|
2324
|
+
path: _path + $join(key),
|
|
2325
|
+
expected: "Array<JsonValue>",
|
|
2326
|
+
value: value
|
|
2327
|
+
}, errorFactory)) || "object" === typeof value && null !== value && false === Array.isArray(value) && $ao3(value, _path + $join(key), true && _exceptionable) || $guard(_exceptionable, {
|
|
2328
|
+
path: _path + $join(key),
|
|
2329
|
+
expected: "(Array<JsonValue> | __type.o1 | boolean | null | number | string)",
|
|
2330
|
+
value: value
|
|
2331
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
2332
|
+
path: _path + $join(key),
|
|
2333
|
+
expected: "(Array<JsonValue> | __type.o1 | boolean | null | number | string)",
|
|
2334
|
+
value: value
|
|
2335
|
+
}, errorFactory));
|
|
2336
|
+
}));
|
|
2337
|
+
const $ao3 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
|
|
2338
|
+
const value = input[key];
|
|
2339
|
+
if (undefined === value)
|
|
2340
|
+
return true;
|
|
2341
|
+
return (undefined !== value || $guard(_exceptionable, {
|
|
2342
|
+
path: _path + $join(key),
|
|
2343
|
+
expected: "(Array<JsonValue> | __type.o1 | boolean | null | number | string)",
|
|
2344
|
+
value: value
|
|
2345
|
+
}, errorFactory)) && (null === value || "string" === typeof value || "number" === typeof value && !Number.isNaN(value) || "boolean" === typeof value || (Array.isArray(value) && ($aa0(value, _path + $join(key), true && _exceptionable) || $guard(_exceptionable, {
|
|
2346
|
+
path: _path + $join(key),
|
|
2347
|
+
expected: "Array<JsonValue>",
|
|
2348
|
+
value: value
|
|
2349
|
+
}, errorFactory)) || "object" === typeof value && null !== value && false === Array.isArray(value) && $ao3(value, _path + $join(key), true && _exceptionable) || $guard(_exceptionable, {
|
|
2350
|
+
path: _path + $join(key),
|
|
2351
|
+
expected: "(Array<JsonValue> | __type.o1 | boolean | null | number | string)",
|
|
2352
|
+
value: value
|
|
2353
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
2354
|
+
path: _path + $join(key),
|
|
2355
|
+
expected: "(Array<JsonValue> | __type.o1 | boolean | null | number | string)",
|
|
2356
|
+
value: value
|
|
2357
|
+
}, errorFactory));
|
|
2358
|
+
});
|
|
2359
|
+
const $aa0 = (input, _path, _exceptionable = true) => input.every((elem, _index1) => (undefined !== elem || $guard(_exceptionable, {
|
|
2360
|
+
path: _path + "[" + _index1 + "]",
|
|
2361
|
+
expected: "(Array<JsonValue> | __type.o1 | boolean | null | number | string)",
|
|
2362
|
+
value: elem
|
|
2363
|
+
}, errorFactory)) && (null === elem || "string" === typeof elem || "number" === typeof elem && !Number.isNaN(elem) || "boolean" === typeof elem || (Array.isArray(elem) && ($aa0(elem, _path + "[" + _index1 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
|
2364
|
+
path: _path + "[" + _index1 + "]",
|
|
2365
|
+
expected: "Array<JsonValue>",
|
|
2366
|
+
value: elem
|
|
2367
|
+
}, errorFactory)) || "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $ao3(elem, _path + "[" + _index1 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
|
2368
|
+
path: _path + "[" + _index1 + "]",
|
|
2369
|
+
expected: "(Array<JsonValue> | __type.o1 | boolean | null | number | string)",
|
|
2370
|
+
value: elem
|
|
2371
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
2372
|
+
path: _path + "[" + _index1 + "]",
|
|
2373
|
+
expected: "(Array<JsonValue> | __type.o1 | boolean | null | number | string)",
|
|
2374
|
+
value: elem
|
|
2375
|
+
}, errorFactory)));
|
|
2376
|
+
return ("object" === typeof input && null !== input && false === Array.isArray(input) || $guard(true, {
|
|
2377
|
+
path: _path + "",
|
|
2378
|
+
expected: "EventOverlayRecord",
|
|
2379
|
+
value: input
|
|
2380
|
+
}, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
|
|
2381
|
+
path: _path + "",
|
|
2382
|
+
expected: "EventOverlayRecord",
|
|
2383
|
+
value: input
|
|
2384
|
+
}, errorFactory);
|
|
2385
|
+
})(input, "$input", true);
|
|
2386
|
+
return input;
|
|
2387
|
+
}; const stringify = input => {
|
|
2388
|
+
const $io1 = input => "object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) && $io2(input.data);
|
|
2389
|
+
const $io2 = input => (undefined === input.source || "string" === typeof input.source) && (undefined === input.cueCard || "string" === typeof input.cueCard || "boolean" === typeof input.cueCard) && Object.keys(input).every(key => {
|
|
2390
|
+
if (["source", "cueCard"].some(prop => key === prop))
|
|
2391
|
+
return true;
|
|
2392
|
+
const value = input[key];
|
|
2393
|
+
if (undefined === value)
|
|
2394
|
+
return true;
|
|
2395
|
+
return undefined !== value && (null === value || "string" === typeof value || "number" === typeof value || "boolean" === typeof value || (Array.isArray(value) && ($ia0(value) || false) || "object" === typeof value && null !== value && false === Array.isArray(value) && $io3(value)));
|
|
2396
|
+
});
|
|
2397
|
+
const $io3 = input => Object.keys(input).every(key => {
|
|
2398
|
+
const value = input[key];
|
|
2399
|
+
if (undefined === value)
|
|
2400
|
+
return true;
|
|
2401
|
+
return undefined !== value && (null === value || "string" === typeof value || "number" === typeof value || "boolean" === typeof value || (Array.isArray(value) && ($ia0(value) || false) || "object" === typeof value && null !== value && false === Array.isArray(value) && $io3(value)));
|
|
2402
|
+
});
|
|
2403
|
+
const $ia0 = input => input.every(elem => undefined !== elem && (null === elem || "string" === typeof elem || "number" === typeof elem || "boolean" === typeof elem || (Array.isArray(elem) && ($ia0(elem) || false) || "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io3(elem))));
|
|
2404
|
+
const $string = __typia.json.createAssertStringify.string;
|
|
2405
|
+
const $throws = __typia.json.createAssertStringify.throws;
|
|
2406
|
+
const $tail = __typia.json.createAssertStringify.tail;
|
|
2407
|
+
const $so0 = input => `{${Object.entries(input).map(([key, value]) => { if (undefined === value)
|
|
2408
|
+
return ""; return `${JSON.stringify(key)}:${$so1(value)}`; }).filter(str => "" !== str).join(",")}}`;
|
|
2409
|
+
const $so1 = input => `{"data":${$so2(input.data)}}`;
|
|
2410
|
+
const $so2 = input => `{${$tail(`${undefined === input.source ? "" : `"source":${undefined !== input.source ? $string(input.source) : undefined},`}${undefined === input.cueCard ? "" : `"cueCard":${undefined !== input.cueCard ? (() => {
|
|
2411
|
+
if ("string" === typeof input.cueCard)
|
|
2412
|
+
return $string(input.cueCard);
|
|
2413
|
+
if ("boolean" === typeof input.cueCard)
|
|
2414
|
+
return input.cueCard;
|
|
2415
|
+
$throws({
|
|
2416
|
+
expected: "(boolean | string | undefined)",
|
|
2417
|
+
value: input.cueCard
|
|
2418
|
+
});
|
|
2419
|
+
})() : undefined},`}${Object.entries(input).map(([key, value]) => { if (undefined === value)
|
|
2420
|
+
return ""; if (["source", "cueCard"].some(regular => regular === key))
|
|
2421
|
+
return ""; return `${JSON.stringify(key)}:${null !== value ? (() => {
|
|
2422
|
+
if ("string" === typeof value)
|
|
2423
|
+
return $string(value);
|
|
2424
|
+
if ("number" === typeof value)
|
|
2425
|
+
return value;
|
|
2426
|
+
if ("boolean" === typeof value)
|
|
2427
|
+
return value;
|
|
2428
|
+
if (Array.isArray(value))
|
|
2429
|
+
return $sa0(value);
|
|
2430
|
+
if ("object" === typeof value && null !== value && false === Array.isArray(value))
|
|
2431
|
+
return $so3(value);
|
|
2432
|
+
$throws({
|
|
2433
|
+
expected: "(Array<JsonValue> | __type.o1 | boolean | null | number | string)",
|
|
2434
|
+
value: value
|
|
2435
|
+
});
|
|
2436
|
+
})() : "null"}`; }).filter(str => "" !== str).join(",")}`)}}`;
|
|
2437
|
+
const $so3 = input => `{${Object.entries(input).map(([key, value]) => { if (undefined === value)
|
|
2438
|
+
return ""; return `${JSON.stringify(key)}:${null !== value ? (() => {
|
|
2439
|
+
if ("string" === typeof value)
|
|
2440
|
+
return $string(value);
|
|
2441
|
+
if ("number" === typeof value)
|
|
2442
|
+
return value;
|
|
2443
|
+
if ("boolean" === typeof value)
|
|
2444
|
+
return value;
|
|
2445
|
+
if (Array.isArray(value))
|
|
2446
|
+
return $sa0(value);
|
|
2447
|
+
if ("object" === typeof value && null !== value && false === Array.isArray(value))
|
|
2448
|
+
return $so3(value);
|
|
2449
|
+
$throws({
|
|
2450
|
+
expected: "(Array<JsonValue> | __type.o1 | boolean | null | number | string)",
|
|
2451
|
+
value: value
|
|
2452
|
+
});
|
|
2453
|
+
})() : "null"}`; }).filter(str => "" !== str).join(",")}}`;
|
|
2454
|
+
const $sa0 = input => `[${input.map(elem => null !== elem ? (() => {
|
|
2455
|
+
if ("string" === typeof elem)
|
|
2456
|
+
return $string(elem);
|
|
2457
|
+
if ("number" === typeof elem)
|
|
2458
|
+
return elem;
|
|
2459
|
+
if ("boolean" === typeof elem)
|
|
2460
|
+
return elem;
|
|
2461
|
+
if (Array.isArray(elem))
|
|
2462
|
+
return $sa0(elem);
|
|
2463
|
+
if ("object" === typeof elem && null !== elem && false === Array.isArray(elem))
|
|
2464
|
+
return $so3(elem);
|
|
2465
|
+
$throws({
|
|
2466
|
+
expected: "(Array<JsonValue> | __type.o1 | boolean | null | number | string)",
|
|
2467
|
+
value: elem
|
|
2468
|
+
});
|
|
2469
|
+
})() : "null").join(",")}]`;
|
|
2470
|
+
return $so0(input);
|
|
2471
|
+
}; return stringify(assert(input, errorFactory)); };
|
|
447
2472
|
export const isSubtitleEventStyleOverrides = input => {
|
|
448
2473
|
const $io0 = input => (undefined === input.marginL || "string" === typeof input.marginL) && (undefined === input.marginR || "string" === typeof input.marginR) && (undefined === input.marginV || "string" === typeof input.marginV) && (undefined === input.alignment || "string" === typeof input.alignment) && (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);
|
|
449
2474
|
return "object" === typeof input && null !== input && false === Array.isArray(input) && $io0(input);
|