@nxtedition/types 23.0.39 → 23.0.41

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.
Files changed (243) hide show
  1. package/dist/app.d.ts +0 -51
  2. package/dist/app.js +1 -823
  3. package/dist/common/block.d.ts +6 -13
  4. package/dist/common/block.js +597 -1607
  5. package/dist/common/clone.d.ts +0 -19
  6. package/dist/common/clone.js +1 -602
  7. package/dist/common/date.d.ts +0 -7
  8. package/dist/common/date.js +1 -59
  9. package/dist/common/error.d.ts +0 -7
  10. package/dist/common/error.js +1 -404
  11. package/dist/common/file.d.ts +1 -21
  12. package/dist/common/file.js +782 -2521
  13. package/dist/common/index.d.ts +20 -26
  14. package/dist/common/index.js +20 -134
  15. package/dist/common/location.d.ts +0 -6
  16. package/dist/common/location.js +73 -238
  17. package/dist/common/lock.d.ts +1 -8
  18. package/dist/common/lock.js +1 -211
  19. package/dist/common/media.d.ts +0 -7
  20. package/dist/common/media.js +1 -83
  21. package/dist/common/nxtpression.d.ts +2 -9
  22. package/dist/common/nxtpression.js +1 -277
  23. package/dist/common/pipeline.d.ts +0 -7
  24. package/dist/common/pipeline.js +1 -97
  25. package/dist/common/promoted-tag.d.ts +0 -7
  26. package/dist/common/promoted-tag.js +1 -147
  27. package/dist/common/render-preset.d.ts +2 -15
  28. package/dist/common/render-preset.js +1 -1202
  29. package/dist/common/render-profile.d.ts +0 -19
  30. package/dist/common/render-profile.js +1 -1052
  31. package/dist/common/render-query.d.ts +2 -9
  32. package/dist/common/render-query.js +1 -1754
  33. package/dist/common/render-scene.d.ts +2 -15
  34. package/dist/common/render-scene.js +1 -2230
  35. package/dist/common/rule.d.ts +1 -7
  36. package/dist/common/rule.js +84 -254
  37. package/dist/common/search.d.ts +0 -25
  38. package/dist/common/search.js +1 -1591
  39. package/dist/common/settings.d.ts +128 -121
  40. package/dist/common/settings.js +1 -6936
  41. package/dist/common/subtitle-style.d.ts +25 -0
  42. package/dist/common/user-notification.d.ts +0 -7
  43. package/dist/common/user-notification.js +1 -85
  44. package/dist/index.d.ts +5 -85
  45. package/dist/index.js +5 -187
  46. package/dist/nxtpression.d.ts +732 -344
  47. package/dist/nxtpression.js +1 -323
  48. package/dist/records/domains/asset.d.ts +106 -0
  49. package/dist/records/domains/bundle.d.ts +12 -0
  50. package/dist/records/domains/bundle.js +1 -0
  51. package/dist/records/domains/clone.d.ts +7 -0
  52. package/dist/records/domains/clone.js +1 -0
  53. package/dist/records/domains/comment-reaction.d.ts +8 -0
  54. package/dist/records/domains/comment-reaction.js +1 -0
  55. package/dist/records/domains/comment-read-mark.d.ts +8 -0
  56. package/dist/records/domains/comment-read-mark.js +1 -0
  57. package/dist/records/domains/comment.d.ts +81 -0
  58. package/dist/records/domains/comment.js +19 -0
  59. package/dist/records/domains/connection.d.ts +77 -0
  60. package/dist/records/domains/connection.js +1 -0
  61. package/dist/records/domains/contact.d.ts +9 -0
  62. package/dist/records/domains/contact.js +1 -0
  63. package/dist/records/domains/deepstream.d.ts +7 -0
  64. package/dist/records/domains/deepstream.js +1 -0
  65. package/dist/records/domains/design.d.ts +11 -0
  66. package/dist/records/domains/design.js +1 -0
  67. package/dist/records/domains/edit.d.ts +10 -0
  68. package/dist/records/domains/edit.js +1 -0
  69. package/dist/records/domains/event.d.ts +66 -0
  70. package/dist/records/domains/event.js +1 -0
  71. package/dist/records/domains/file.d.ts +26 -0
  72. package/dist/records/domains/file.js +1 -0
  73. package/dist/records/domains/general.d.ts +41 -0
  74. package/dist/records/domains/general.js +1 -0
  75. package/dist/records/domains/index.d.ts +77 -0
  76. package/dist/records/domains/index.js +38 -0
  77. package/dist/records/domains/media.d.ts +64 -0
  78. package/dist/records/domains/media.js +1 -0
  79. package/dist/records/domains/monitor.d.ts +116 -0
  80. package/dist/records/domains/monitor.js +1 -0
  81. package/dist/records/domains/panel.d.ts +55 -0
  82. package/dist/records/domains/panel.js +1 -0
  83. package/dist/records/domains/permission.d.ts +25 -0
  84. package/dist/records/domains/permission.js +2 -0
  85. package/dist/records/domains/pipeline-preset.d.ts +10 -0
  86. package/dist/records/domains/pipeline-preset.js +1 -0
  87. package/dist/records/domains/pipeline.d.ts +17 -0
  88. package/dist/records/domains/pipeline.js +1 -0
  89. package/dist/records/domains/planning.d.ts +14 -0
  90. package/dist/records/domains/planning.js +1 -0
  91. package/dist/records/domains/prompter.d.ts +18 -0
  92. package/dist/records/domains/prompter.js +1 -0
  93. package/dist/records/domains/publish.d.ts +145 -0
  94. package/dist/records/domains/publish.js +1 -0
  95. package/dist/records/domains/published.d.ts +12 -0
  96. package/dist/records/domains/published.js +1 -0
  97. package/dist/records/domains/render-preset.d.ts +5 -0
  98. package/dist/records/domains/render-preset.js +1 -0
  99. package/dist/records/domains/render.d.ts +115 -0
  100. package/dist/records/domains/render.js +1 -0
  101. package/dist/records/domains/revs.d.ts +6 -0
  102. package/dist/records/domains/revs.js +1 -0
  103. package/dist/records/domains/role.d.ts +6 -0
  104. package/dist/records/domains/role.js +1 -0
  105. package/dist/records/domains/script.d.ts +101 -0
  106. package/dist/records/domains/script.js +1 -0
  107. package/dist/records/domains/search.d.ts +9 -0
  108. package/dist/records/domains/search.js +1 -0
  109. package/dist/records/domains/settings.d.ts +5 -0
  110. package/dist/records/domains/settings.js +1 -0
  111. package/dist/records/domains/storyboard.d.ts +10 -0
  112. package/dist/records/domains/storyboard.js +1 -0
  113. package/dist/records/domains/subtitle-style.d.ts +13 -0
  114. package/dist/records/domains/subtitle-style.js +1 -0
  115. package/dist/records/domains/subtitle.d.ts +12 -0
  116. package/dist/records/domains/subtitle.js +1 -0
  117. package/dist/records/domains/template.d.ts +10 -0
  118. package/dist/records/domains/template.js +1 -0
  119. package/dist/records/domains/user-notification-status.d.ts +30 -0
  120. package/dist/records/domains/user-notification-status.js +1 -0
  121. package/dist/records/domains/user-notification.d.ts +69 -0
  122. package/dist/records/domains/user-notification.js +1 -0
  123. package/dist/records/domains/user.d.ts +23 -0
  124. package/dist/records/domains/user.js +1 -0
  125. package/dist/records/exact/asset.d.ts +83 -0
  126. package/dist/records/exact/asset.js +1 -0
  127. package/dist/records/exact/index.d.ts +36 -0
  128. package/dist/records/exact/index.js +4 -0
  129. package/dist/records/exact/media.d.ts +52 -0
  130. package/dist/records/exact/media.js +1 -0
  131. package/dist/records/exact/monitor.d.ts +46 -0
  132. package/dist/records/exact/monitor.js +1 -0
  133. package/dist/records/exact/storage.d.ts +32 -0
  134. package/dist/records/exact/storage.js +1 -0
  135. package/dist/records/index.d.ts +10 -0
  136. package/dist/records/index.js +2 -0
  137. package/dist/records/utils.d.ts +7 -0
  138. package/dist/records/utils.js +1 -0
  139. package/dist/records/utils.tds.d.ts +1 -0
  140. package/dist/records/utils.tds.js +7 -0
  141. package/dist/records/validate/assert-guard.d.ts +4 -0
  142. package/dist/records/validate/assert-guard.js +15861 -0
  143. package/dist/records/validate/assert.d.ts +4 -0
  144. package/dist/records/validate/assert.js +15990 -0
  145. package/dist/records/validate/is.d.ts +4 -0
  146. package/dist/records/validate/is.js +1017 -0
  147. package/dist/records/validate/schemas.d.ts +9 -0
  148. package/dist/records/validate/schemas.js +12613 -0
  149. package/dist/records/validate/stringify.d.ts +4 -0
  150. package/dist/records/validate/stringify.js +1904 -0
  151. package/dist/records/validate/utils.d.ts +15 -0
  152. package/dist/records/validate/utils.js +18 -0
  153. package/dist/records/validate/utils.test.d.ts +1 -0
  154. package/dist/records/validate/utils.test.js +35 -0
  155. package/dist/records/validate/validate.d.ts +5 -0
  156. package/dist/records/validate/validate.js +14943 -0
  157. package/dist/rpc.d.ts +13 -14
  158. package/dist/rpc.js +126 -511
  159. package/dist/tsdoc-metadata.json +1 -1
  160. package/package.json +26 -15
  161. package/dist/asset.d.ts +0 -72
  162. package/dist/domains/asset.d.ts +0 -227
  163. package/dist/domains/asset.js +0 -2672
  164. package/dist/domains/bundle.d.ts +0 -25
  165. package/dist/domains/bundle.js +0 -512
  166. package/dist/domains/clone.d.ts +0 -14
  167. package/dist/domains/clone.js +0 -192
  168. package/dist/domains/comment-reaction.d.ts +0 -15
  169. package/dist/domains/comment-reaction.js +0 -115
  170. package/dist/domains/comment-read-mark.d.ts +0 -15
  171. package/dist/domains/comment-read-mark.js +0 -115
  172. package/dist/domains/comment.d.ts +0 -153
  173. package/dist/domains/comment.js +0 -5906
  174. package/dist/domains/connection.d.ts +0 -141
  175. package/dist/domains/connection.js +0 -5860
  176. package/dist/domains/contact.d.ts +0 -16
  177. package/dist/domains/contact.js +0 -149
  178. package/dist/domains/deepstream.d.ts +0 -14
  179. package/dist/domains/deepstream.js +0 -139
  180. package/dist/domains/design.d.ts +0 -24
  181. package/dist/domains/design.js +0 -303
  182. package/dist/domains/edit.d.ts +0 -17
  183. package/dist/domains/edit.js +0 -224
  184. package/dist/domains/event.d.ts +0 -42
  185. package/dist/domains/event.js +0 -754
  186. package/dist/domains/file.d.ts +0 -51
  187. package/dist/domains/file.js +0 -2506
  188. package/dist/domains/general.d.ts +0 -84
  189. package/dist/domains/general.js +0 -906
  190. package/dist/domains/index.d.ts +0 -75
  191. package/dist/domains/index.js +0 -37
  192. package/dist/domains/media.d.ts +0 -113
  193. package/dist/domains/media.js +0 -4553
  194. package/dist/domains/monitor.d.ts +0 -416
  195. package/dist/domains/monitor.js +0 -6382
  196. package/dist/domains/panel.d.ts +0 -371
  197. package/dist/domains/panel.js +0 -3198
  198. package/dist/domains/permission.d.ts +0 -61
  199. package/dist/domains/permission.js +0 -1926
  200. package/dist/domains/pipeline-preset.d.ts +0 -17
  201. package/dist/domains/pipeline-preset.js +0 -236
  202. package/dist/domains/pipeline.d.ts +0 -30
  203. package/dist/domains/pipeline.js +0 -460
  204. package/dist/domains/planning.d.ts +0 -33
  205. package/dist/domains/planning.js +0 -324
  206. package/dist/domains/publish.d.ts +0 -1397
  207. package/dist/domains/publish.js +0 -34436
  208. package/dist/domains/published.d.ts +0 -19
  209. package/dist/domains/published.js +0 -204
  210. package/dist/domains/render-preset.d.ts +0 -4
  211. package/dist/domains/render.d.ts +0 -172
  212. package/dist/domains/render.js +0 -4783
  213. package/dist/domains/revs.d.ts +0 -13
  214. package/dist/domains/revs.js +0 -125
  215. package/dist/domains/role.d.ts +0 -13
  216. package/dist/domains/role.js +0 -119
  217. package/dist/domains/script.d.ts +0 -13
  218. package/dist/domains/script.js +0 -125
  219. package/dist/domains/search.d.ts +0 -16
  220. package/dist/domains/search.js +0 -168
  221. package/dist/domains/settings.d.ts +0 -12
  222. package/dist/domains/settings.js +0 -6624
  223. package/dist/domains/storyboard.d.ts +0 -14
  224. package/dist/domains/storyboard.js +0 -125
  225. package/dist/domains/subtitle-style.d.ts +0 -37
  226. package/dist/domains/subtitle-style.js +0 -485
  227. package/dist/domains/subtitle.d.ts +0 -19
  228. package/dist/domains/subtitle.js +0 -212
  229. package/dist/domains/template.d.ts +0 -23
  230. package/dist/domains/template.js +0 -372
  231. package/dist/domains/user-notification-status.d.ts +0 -55
  232. package/dist/domains/user-notification-status.js +0 -715
  233. package/dist/domains/user-notification.d.ts +0 -118
  234. package/dist/domains/user-notification.js +0 -3040
  235. package/dist/domains/user.d.ts +0 -48
  236. package/dist/domains/user.js +0 -481
  237. package/dist/monitor.d.ts +0 -71
  238. package/dist/monitor.js +0 -1942
  239. package/dist/schema.json +0 -9075
  240. package/dist/storage.d.ts +0 -51
  241. package/dist/storage.js +0 -1036
  242. /package/dist/{asset.js → common/subtitle-style.js} +0 -0
  243. /package/dist/{domains/render-preset.js → records/domains/asset.js} +0 -0
@@ -1,1202 +1 @@
1
- import __typia from "typia";
2
- export const isRenderPresetObject = input => {
3
- const $io0 = input => "string" === typeof input.type && (null !== input.profile && undefined !== input.profile && ("string" === typeof input.profile || (Array.isArray(input.profile) && input.profile.every(elem => null !== elem && undefined !== elem && ("string" === typeof elem || "object" === typeof elem && null !== elem && $io1(elem))) || "object" === typeof input.profile && null !== input.profile && $io1(input.profile))));
4
- const $io1 = input => "string" === typeof input.format && (undefined === input.transcribe || "object" === typeof input.transcribe && null !== input.transcribe && $io2(input.transcribe)) && (undefined === input.translate || "object" === typeof input.translate && null !== input.translate && $io3(input.translate)) && (undefined === input.audio || "object" === typeof input.audio && null !== input.audio && false === Array.isArray(input.audio) && $io4(input.audio)) && true && (undefined === input.pick || Array.isArray(input.pick) && input.pick.every(elem => "string" === typeof elem)) && (null !== input.subtitle && (undefined === input.subtitle || "string" === typeof input.subtitle || "object" === typeof input.subtitle && null !== input.subtitle && false === Array.isArray(input.subtitle) && $io5(input.subtitle)));
5
- const $io2 = input => "string" === typeof input.engine;
6
- const $io3 = input => "string" === typeof input.language;
7
- const $io4 = input => undefined === input.pan || "string" === typeof input.pan;
8
- const $io5 = input => (undefined === input.lang || "string" === typeof input.lang) && (undefined === input.style || "string" === typeof input.style);
9
- return "object" === typeof input && null !== input && $io0(input);
10
- };
11
- export const assertRenderPresetObject = (input, errorFactory) => {
12
- const __is = input => {
13
- const $io0 = input => "string" === typeof input.type && (null !== input.profile && undefined !== input.profile && ("string" === typeof input.profile || (Array.isArray(input.profile) && input.profile.every(elem => null !== elem && undefined !== elem && ("string" === typeof elem || "object" === typeof elem && null !== elem && $io1(elem))) || "object" === typeof input.profile && null !== input.profile && $io1(input.profile))));
14
- const $io1 = input => "string" === typeof input.format && (undefined === input.transcribe || "object" === typeof input.transcribe && null !== input.transcribe && $io2(input.transcribe)) && (undefined === input.translate || "object" === typeof input.translate && null !== input.translate && $io3(input.translate)) && (undefined === input.audio || "object" === typeof input.audio && null !== input.audio && false === Array.isArray(input.audio) && $io4(input.audio)) && true && (undefined === input.pick || Array.isArray(input.pick) && input.pick.every(elem => "string" === typeof elem)) && (null !== input.subtitle && (undefined === input.subtitle || "string" === typeof input.subtitle || "object" === typeof input.subtitle && null !== input.subtitle && false === Array.isArray(input.subtitle) && $io5(input.subtitle)));
15
- const $io2 = input => "string" === typeof input.engine;
16
- const $io3 = input => "string" === typeof input.language;
17
- const $io4 = input => undefined === input.pan || "string" === typeof input.pan;
18
- const $io5 = input => (undefined === input.lang || "string" === typeof input.lang) && (undefined === input.style || "string" === typeof input.style);
19
- return "object" === typeof input && null !== input && $io0(input);
20
- };
21
- if (false === __is(input))
22
- ((input, _path, _exceptionable = true) => {
23
- const $guard = __typia.createAssert.guard;
24
- const $ao0 = (input, _path, _exceptionable = true) => ("string" === typeof input.type || $guard(_exceptionable, {
25
- path: _path + ".type",
26
- expected: "string",
27
- value: input.type
28
- }, errorFactory)) && ((null !== input.profile || $guard(_exceptionable, {
29
- path: _path + ".profile",
30
- expected: "(Array<string | RenderProfileObject> | RenderProfileObject | string)",
31
- value: input.profile
32
- }, errorFactory)) && (undefined !== input.profile || $guard(_exceptionable, {
33
- path: _path + ".profile",
34
- expected: "(Array<string | RenderProfileObject> | RenderProfileObject | string)",
35
- value: input.profile
36
- }, errorFactory)) && ("string" === typeof input.profile || (Array.isArray(input.profile) && input.profile.every((elem, _index1) => (null !== elem || $guard(_exceptionable, {
37
- path: _path + ".profile[" + _index1 + "]",
38
- expected: "(RenderProfileObject | string)",
39
- value: elem
40
- }, errorFactory)) && (undefined !== elem || $guard(_exceptionable, {
41
- path: _path + ".profile[" + _index1 + "]",
42
- expected: "(RenderProfileObject | string)",
43
- value: elem
44
- }, errorFactory)) && ("string" === typeof elem || ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
45
- path: _path + ".profile[" + _index1 + "]",
46
- expected: "(RenderProfileObject | string)",
47
- value: elem
48
- }, errorFactory)) && $ao1(elem, _path + ".profile[" + _index1 + "]", true && _exceptionable) || $guard(_exceptionable, {
49
- path: _path + ".profile[" + _index1 + "]",
50
- expected: "(RenderProfileObject | string)",
51
- value: elem
52
- }, errorFactory))) || "object" === typeof input.profile && null !== input.profile && $ao1(input.profile, _path + ".profile", true && _exceptionable) || $guard(_exceptionable, {
53
- path: _path + ".profile",
54
- expected: "(Array<string | RenderProfileObject> | RenderProfileObject | string)",
55
- value: input.profile
56
- }, errorFactory)) || $guard(_exceptionable, {
57
- path: _path + ".profile",
58
- expected: "(Array<string | RenderProfileObject> | RenderProfileObject | string)",
59
- value: input.profile
60
- }, errorFactory)));
61
- const $ao1 = (input, _path, _exceptionable = true) => ("string" === typeof input.format || $guard(_exceptionable, {
62
- path: _path + ".format",
63
- expected: "string",
64
- value: input.format
65
- }, errorFactory)) && (undefined === input.transcribe || ("object" === typeof input.transcribe && null !== input.transcribe || $guard(_exceptionable, {
66
- path: _path + ".transcribe",
67
- expected: "(__type | undefined)",
68
- value: input.transcribe
69
- }, errorFactory)) && $ao2(input.transcribe, _path + ".transcribe", true && _exceptionable) || $guard(_exceptionable, {
70
- path: _path + ".transcribe",
71
- expected: "(__type | undefined)",
72
- value: input.transcribe
73
- }, errorFactory)) && (undefined === input.translate || ("object" === typeof input.translate && null !== input.translate || $guard(_exceptionable, {
74
- path: _path + ".translate",
75
- expected: "(__type.o1 | undefined)",
76
- value: input.translate
77
- }, errorFactory)) && $ao3(input.translate, _path + ".translate", true && _exceptionable) || $guard(_exceptionable, {
78
- path: _path + ".translate",
79
- expected: "(__type.o1 | undefined)",
80
- value: input.translate
81
- }, errorFactory)) && (undefined === input.audio || ("object" === typeof input.audio && null !== input.audio && false === Array.isArray(input.audio) || $guard(_exceptionable, {
82
- path: _path + ".audio",
83
- expected: "(__type.o2 | undefined)",
84
- value: input.audio
85
- }, errorFactory)) && $ao4(input.audio, _path + ".audio", true && _exceptionable) || $guard(_exceptionable, {
86
- path: _path + ".audio",
87
- expected: "(__type.o2 | undefined)",
88
- value: input.audio
89
- }, errorFactory)) && true && (undefined === input.pick || (Array.isArray(input.pick) || $guard(_exceptionable, {
90
- path: _path + ".pick",
91
- expected: "(Array<string> | undefined)",
92
- value: input.pick
93
- }, errorFactory)) && input.pick.every((elem, _index2) => "string" === typeof elem || $guard(_exceptionable, {
94
- path: _path + ".pick[" + _index2 + "]",
95
- expected: "string",
96
- value: elem
97
- }, errorFactory)) || $guard(_exceptionable, {
98
- path: _path + ".pick",
99
- expected: "(Array<string> | undefined)",
100
- value: input.pick
101
- }, errorFactory)) && ((null !== input.subtitle || $guard(_exceptionable, {
102
- path: _path + ".subtitle",
103
- expected: "(SubtitleProfile | string | undefined)",
104
- value: input.subtitle
105
- }, errorFactory)) && (undefined === input.subtitle || "string" === typeof input.subtitle || ("object" === typeof input.subtitle && null !== input.subtitle && false === Array.isArray(input.subtitle) || $guard(_exceptionable, {
106
- path: _path + ".subtitle",
107
- expected: "(SubtitleProfile | string | undefined)",
108
- value: input.subtitle
109
- }, errorFactory)) && $ao5(input.subtitle, _path + ".subtitle", true && _exceptionable) || $guard(_exceptionable, {
110
- path: _path + ".subtitle",
111
- expected: "(SubtitleProfile | string | undefined)",
112
- value: input.subtitle
113
- }, errorFactory)));
114
- const $ao2 = (input, _path, _exceptionable = true) => "string" === typeof input.engine || $guard(_exceptionable, {
115
- path: _path + ".engine",
116
- expected: "string",
117
- value: input.engine
118
- }, errorFactory);
119
- const $ao3 = (input, _path, _exceptionable = true) => "string" === typeof input.language || $guard(_exceptionable, {
120
- path: _path + ".language",
121
- expected: "string",
122
- value: input.language
123
- }, errorFactory);
124
- const $ao4 = (input, _path, _exceptionable = true) => undefined === input.pan || "string" === typeof input.pan || $guard(_exceptionable, {
125
- path: _path + ".pan",
126
- expected: "(string | undefined)",
127
- value: input.pan
128
- }, errorFactory);
129
- const $ao5 = (input, _path, _exceptionable = true) => (undefined === input.lang || "string" === typeof input.lang || $guard(_exceptionable, {
130
- path: _path + ".lang",
131
- expected: "(string | undefined)",
132
- value: input.lang
133
- }, errorFactory)) && (undefined === input.style || "string" === typeof input.style || $guard(_exceptionable, {
134
- path: _path + ".style",
135
- expected: "(string | undefined)",
136
- value: input.style
137
- }, errorFactory));
138
- return ("object" === typeof input && null !== input || $guard(true, {
139
- path: _path + "",
140
- expected: "RenderPresetObject",
141
- value: input
142
- }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
143
- path: _path + "",
144
- expected: "RenderPresetObject",
145
- value: input
146
- }, errorFactory);
147
- })(input, "$input", true);
148
- return input;
149
- };
150
- export const randomRenderPresetObject = generator => {
151
- const $generator = __typia.createRandom.generator;
152
- const $pick = __typia.createRandom.pick;
153
- const $ro0 = (_recursive = false, _depth = 0) => ({
154
- type: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
155
- profile: $pick([
156
- () => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
157
- () => (generator?.array ?? $generator.array)(() => $pick([
158
- () => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
159
- () => $ro1(_recursive, _recursive ? 1 + _depth : _depth)
160
- ])()),
161
- () => $ro1(_recursive, _recursive ? 1 + _depth : _depth)
162
- ])()
163
- });
164
- const $ro1 = (_recursive = false, _depth = 0) => ({
165
- format: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
166
- transcribe: $pick([
167
- () => undefined,
168
- () => $ro2(_recursive, _recursive ? 1 + _depth : _depth)
169
- ])(),
170
- translate: $pick([
171
- () => undefined,
172
- () => $ro3(_recursive, _recursive ? 1 + _depth : _depth)
173
- ])(),
174
- audio: $pick([
175
- () => undefined,
176
- () => $ro4(_recursive, _recursive ? 1 + _depth : _depth)
177
- ])(),
178
- video: $pick([
179
- () => "any type used...",
180
- () => undefined
181
- ])(),
182
- pick: $pick([
183
- () => undefined,
184
- () => (generator?.array ?? $generator.array)(() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)())
185
- ])(),
186
- subtitle: $pick([
187
- () => undefined,
188
- () => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
189
- () => $ro5(_recursive, _recursive ? 1 + _depth : _depth)
190
- ])()
191
- });
192
- const $ro2 = (_recursive = false, _depth = 0) => ({
193
- engine: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
194
- });
195
- const $ro3 = (_recursive = false, _depth = 0) => ({
196
- language: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
197
- });
198
- const $ro4 = (_recursive = false, _depth = 0) => ({
199
- pan: $pick([
200
- () => undefined,
201
- () => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
202
- ])()
203
- });
204
- const $ro5 = (_recursive = false, _depth = 0) => ({
205
- lang: $pick([
206
- () => undefined,
207
- () => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
208
- ])(),
209
- style: $pick([
210
- () => undefined,
211
- () => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
212
- ])()
213
- });
214
- return $ro0();
215
- };
216
- export const assertGuardRenderPresetObject = (input, errorFactory) => {
217
- const __is = input => {
218
- const $io0 = input => "string" === typeof input.type && (null !== input.profile && undefined !== input.profile && ("string" === typeof input.profile || (Array.isArray(input.profile) && input.profile.every(elem => null !== elem && undefined !== elem && ("string" === typeof elem || "object" === typeof elem && null !== elem && $io1(elem))) || "object" === typeof input.profile && null !== input.profile && $io1(input.profile))));
219
- const $io1 = input => "string" === typeof input.format && (undefined === input.transcribe || "object" === typeof input.transcribe && null !== input.transcribe && $io2(input.transcribe)) && (undefined === input.translate || "object" === typeof input.translate && null !== input.translate && $io3(input.translate)) && (undefined === input.audio || "object" === typeof input.audio && null !== input.audio && false === Array.isArray(input.audio) && $io4(input.audio)) && true && (undefined === input.pick || Array.isArray(input.pick) && input.pick.every(elem => "string" === typeof elem)) && (null !== input.subtitle && (undefined === input.subtitle || "string" === typeof input.subtitle || "object" === typeof input.subtitle && null !== input.subtitle && false === Array.isArray(input.subtitle) && $io5(input.subtitle)));
220
- const $io2 = input => "string" === typeof input.engine;
221
- const $io3 = input => "string" === typeof input.language;
222
- const $io4 = input => undefined === input.pan || "string" === typeof input.pan;
223
- const $io5 = input => (undefined === input.lang || "string" === typeof input.lang) && (undefined === input.style || "string" === typeof input.style);
224
- return "object" === typeof input && null !== input && $io0(input);
225
- };
226
- if (false === __is(input))
227
- ((input, _path, _exceptionable = true) => {
228
- const $guard = __typia.createAssertGuard.guard;
229
- const $ao0 = (input, _path, _exceptionable = true) => ("string" === typeof input.type || $guard(_exceptionable, {
230
- path: _path + ".type",
231
- expected: "string",
232
- value: input.type
233
- }, errorFactory)) && ((null !== input.profile || $guard(_exceptionable, {
234
- path: _path + ".profile",
235
- expected: "(Array<string | RenderProfileObject> | RenderProfileObject | string)",
236
- value: input.profile
237
- }, errorFactory)) && (undefined !== input.profile || $guard(_exceptionable, {
238
- path: _path + ".profile",
239
- expected: "(Array<string | RenderProfileObject> | RenderProfileObject | string)",
240
- value: input.profile
241
- }, errorFactory)) && ("string" === typeof input.profile || (Array.isArray(input.profile) && input.profile.every((elem, _index1) => (null !== elem || $guard(_exceptionable, {
242
- path: _path + ".profile[" + _index1 + "]",
243
- expected: "(RenderProfileObject | string)",
244
- value: elem
245
- }, errorFactory)) && (undefined !== elem || $guard(_exceptionable, {
246
- path: _path + ".profile[" + _index1 + "]",
247
- expected: "(RenderProfileObject | string)",
248
- value: elem
249
- }, errorFactory)) && ("string" === typeof elem || ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
250
- path: _path + ".profile[" + _index1 + "]",
251
- expected: "(RenderProfileObject | string)",
252
- value: elem
253
- }, errorFactory)) && $ao1(elem, _path + ".profile[" + _index1 + "]", true && _exceptionable) || $guard(_exceptionable, {
254
- path: _path + ".profile[" + _index1 + "]",
255
- expected: "(RenderProfileObject | string)",
256
- value: elem
257
- }, errorFactory))) || "object" === typeof input.profile && null !== input.profile && $ao1(input.profile, _path + ".profile", true && _exceptionable) || $guard(_exceptionable, {
258
- path: _path + ".profile",
259
- expected: "(Array<string | RenderProfileObject> | RenderProfileObject | string)",
260
- value: input.profile
261
- }, errorFactory)) || $guard(_exceptionable, {
262
- path: _path + ".profile",
263
- expected: "(Array<string | RenderProfileObject> | RenderProfileObject | string)",
264
- value: input.profile
265
- }, errorFactory)));
266
- const $ao1 = (input, _path, _exceptionable = true) => ("string" === typeof input.format || $guard(_exceptionable, {
267
- path: _path + ".format",
268
- expected: "string",
269
- value: input.format
270
- }, errorFactory)) && (undefined === input.transcribe || ("object" === typeof input.transcribe && null !== input.transcribe || $guard(_exceptionable, {
271
- path: _path + ".transcribe",
272
- expected: "(__type | undefined)",
273
- value: input.transcribe
274
- }, errorFactory)) && $ao2(input.transcribe, _path + ".transcribe", true && _exceptionable) || $guard(_exceptionable, {
275
- path: _path + ".transcribe",
276
- expected: "(__type | undefined)",
277
- value: input.transcribe
278
- }, errorFactory)) && (undefined === input.translate || ("object" === typeof input.translate && null !== input.translate || $guard(_exceptionable, {
279
- path: _path + ".translate",
280
- expected: "(__type.o1 | undefined)",
281
- value: input.translate
282
- }, errorFactory)) && $ao3(input.translate, _path + ".translate", true && _exceptionable) || $guard(_exceptionable, {
283
- path: _path + ".translate",
284
- expected: "(__type.o1 | undefined)",
285
- value: input.translate
286
- }, errorFactory)) && (undefined === input.audio || ("object" === typeof input.audio && null !== input.audio && false === Array.isArray(input.audio) || $guard(_exceptionable, {
287
- path: _path + ".audio",
288
- expected: "(__type.o2 | undefined)",
289
- value: input.audio
290
- }, errorFactory)) && $ao4(input.audio, _path + ".audio", true && _exceptionable) || $guard(_exceptionable, {
291
- path: _path + ".audio",
292
- expected: "(__type.o2 | undefined)",
293
- value: input.audio
294
- }, errorFactory)) && true && (undefined === input.pick || (Array.isArray(input.pick) || $guard(_exceptionable, {
295
- path: _path + ".pick",
296
- expected: "(Array<string> | undefined)",
297
- value: input.pick
298
- }, errorFactory)) && input.pick.every((elem, _index2) => "string" === typeof elem || $guard(_exceptionable, {
299
- path: _path + ".pick[" + _index2 + "]",
300
- expected: "string",
301
- value: elem
302
- }, errorFactory)) || $guard(_exceptionable, {
303
- path: _path + ".pick",
304
- expected: "(Array<string> | undefined)",
305
- value: input.pick
306
- }, errorFactory)) && ((null !== input.subtitle || $guard(_exceptionable, {
307
- path: _path + ".subtitle",
308
- expected: "(SubtitleProfile | string | undefined)",
309
- value: input.subtitle
310
- }, errorFactory)) && (undefined === input.subtitle || "string" === typeof input.subtitle || ("object" === typeof input.subtitle && null !== input.subtitle && false === Array.isArray(input.subtitle) || $guard(_exceptionable, {
311
- path: _path + ".subtitle",
312
- expected: "(SubtitleProfile | string | undefined)",
313
- value: input.subtitle
314
- }, errorFactory)) && $ao5(input.subtitle, _path + ".subtitle", true && _exceptionable) || $guard(_exceptionable, {
315
- path: _path + ".subtitle",
316
- expected: "(SubtitleProfile | string | undefined)",
317
- value: input.subtitle
318
- }, errorFactory)));
319
- const $ao2 = (input, _path, _exceptionable = true) => "string" === typeof input.engine || $guard(_exceptionable, {
320
- path: _path + ".engine",
321
- expected: "string",
322
- value: input.engine
323
- }, errorFactory);
324
- const $ao3 = (input, _path, _exceptionable = true) => "string" === typeof input.language || $guard(_exceptionable, {
325
- path: _path + ".language",
326
- expected: "string",
327
- value: input.language
328
- }, errorFactory);
329
- const $ao4 = (input, _path, _exceptionable = true) => undefined === input.pan || "string" === typeof input.pan || $guard(_exceptionable, {
330
- path: _path + ".pan",
331
- expected: "(string | undefined)",
332
- value: input.pan
333
- }, errorFactory);
334
- const $ao5 = (input, _path, _exceptionable = true) => (undefined === input.lang || "string" === typeof input.lang || $guard(_exceptionable, {
335
- path: _path + ".lang",
336
- expected: "(string | undefined)",
337
- value: input.lang
338
- }, errorFactory)) && (undefined === input.style || "string" === typeof input.style || $guard(_exceptionable, {
339
- path: _path + ".style",
340
- expected: "(string | undefined)",
341
- value: input.style
342
- }, errorFactory));
343
- return ("object" === typeof input && null !== input || $guard(true, {
344
- path: _path + "",
345
- expected: "RenderPresetObject",
346
- value: input
347
- }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
348
- path: _path + "",
349
- expected: "RenderPresetObject",
350
- value: input
351
- }, errorFactory);
352
- })(input, "$input", true);
353
- };
354
- export const stringifyRenderPresetObject = input => {
355
- const $io1 = input => "string" === typeof input.format && (undefined === input.transcribe || "object" === typeof input.transcribe && null !== input.transcribe && $io2(input.transcribe)) && (undefined === input.translate || "object" === typeof input.translate && null !== input.translate && $io3(input.translate)) && (undefined === input.audio || "object" === typeof input.audio && null !== input.audio && false === Array.isArray(input.audio) && $io4(input.audio)) && true && (undefined === input.pick || Array.isArray(input.pick) && input.pick.every(elem => "string" === typeof elem)) && (null !== input.subtitle && (undefined === input.subtitle || "string" === typeof input.subtitle || "object" === typeof input.subtitle && null !== input.subtitle && false === Array.isArray(input.subtitle) && $io5(input.subtitle)));
356
- const $io2 = input => "string" === typeof input.engine;
357
- const $io3 = input => "string" === typeof input.language;
358
- const $io4 = input => undefined === input.pan || "string" === typeof input.pan;
359
- const $io5 = input => (undefined === input.lang || "string" === typeof input.lang) && (undefined === input.style || "string" === typeof input.style);
360
- const $string = __typia.json.createStringify.string;
361
- const $throws = __typia.json.createStringify.throws;
362
- const $tail = __typia.json.createStringify.tail;
363
- const $so0 = input => `{"type":${$string(input.type)},"profile":${(() => {
364
- if ("string" === typeof input.profile)
365
- return $string(input.profile);
366
- if (Array.isArray(input.profile))
367
- return `[${input.profile.map(elem => (() => {
368
- if ("string" === typeof elem)
369
- return $string(elem);
370
- if ("object" === typeof elem && null !== elem)
371
- return $so1(elem);
372
- $throws({
373
- expected: "(RenderProfileObject | string)",
374
- value: elem
375
- });
376
- })()).join(",")}]`;
377
- if ("object" === typeof input.profile && null !== input.profile)
378
- return $so1(input.profile);
379
- $throws({
380
- expected: "(Array<string | RenderProfileObject> | RenderProfileObject | string)",
381
- value: input.profile
382
- });
383
- })()}}`;
384
- const $so1 = input => `{${undefined === input.transcribe ? "" : `"transcribe":${undefined !== input.transcribe ? `{"engine":${$string(input.transcribe.engine)}}` : undefined},`}${undefined === input.translate ? "" : `"translate":${undefined !== input.translate ? `{"language":${$string(input.translate.language)}}` : undefined},`}${undefined === input.audio ? "" : `"audio":${undefined !== input.audio ? $so4(input.audio) : undefined},`}${undefined === input.video || "function" === typeof input.video ? "" : `"video":${undefined !== input.video ? JSON.stringify(input.video) : undefined},`}${undefined === input.pick ? "" : `"pick":${undefined !== input.pick ? `[${input.pick.map(elem => $string(elem)).join(",")}]` : undefined},`}${undefined === input.subtitle ? "" : `"subtitle":${undefined !== input.subtitle ? (() => {
385
- if ("string" === typeof input.subtitle)
386
- return $string(input.subtitle);
387
- if ("object" === typeof input.subtitle && null !== input.subtitle && false === Array.isArray(input.subtitle))
388
- return $so5(input.subtitle);
389
- $throws({
390
- expected: "(SubtitleProfile | string | undefined)",
391
- value: input.subtitle
392
- });
393
- })() : undefined},`}"format":${$string(input.format)}}`;
394
- const $so4 = input => `{${$tail(`${undefined === input.pan ? "" : `"pan":${undefined !== input.pan ? $string(input.pan) : undefined}`}`)}}`;
395
- const $so5 = input => `{${$tail(`${undefined === input.lang ? "" : `"lang":${undefined !== input.lang ? $string(input.lang) : undefined},`}${undefined === input.style ? "" : `"style":${undefined !== input.style ? $string(input.style) : undefined}`}`)}}`;
396
- return $so0(input);
397
- };
398
- export const assertStringifyRenderPresetObject = (input, errorFactory) => { const assert = (input, errorFactory) => {
399
- const __is = input => {
400
- const $io0 = input => "string" === typeof input.type && (null !== input.profile && undefined !== input.profile && ("string" === typeof input.profile || (Array.isArray(input.profile) && input.profile.every(elem => null !== elem && undefined !== elem && ("string" === typeof elem || "object" === typeof elem && null !== elem && $io1(elem))) || "object" === typeof input.profile && null !== input.profile && $io1(input.profile))));
401
- const $io1 = input => "string" === typeof input.format && (undefined === input.transcribe || "object" === typeof input.transcribe && null !== input.transcribe && $io2(input.transcribe)) && (undefined === input.translate || "object" === typeof input.translate && null !== input.translate && $io3(input.translate)) && (undefined === input.audio || "object" === typeof input.audio && null !== input.audio && false === Array.isArray(input.audio) && $io4(input.audio)) && true && (undefined === input.pick || Array.isArray(input.pick) && input.pick.every(elem => "string" === typeof elem)) && (null !== input.subtitle && (undefined === input.subtitle || "string" === typeof input.subtitle || "object" === typeof input.subtitle && null !== input.subtitle && false === Array.isArray(input.subtitle) && $io5(input.subtitle)));
402
- const $io2 = input => "string" === typeof input.engine;
403
- const $io3 = input => "string" === typeof input.language;
404
- const $io4 = input => undefined === input.pan || "string" === typeof input.pan;
405
- const $io5 = input => (undefined === input.lang || "string" === typeof input.lang) && (undefined === input.style || "string" === typeof input.style);
406
- return "object" === typeof input && null !== input && $io0(input);
407
- };
408
- if (false === __is(input))
409
- ((input, _path, _exceptionable = true) => {
410
- const $guard = __typia.json.createAssertStringify.guard;
411
- const $ao0 = (input, _path, _exceptionable = true) => ("string" === typeof input.type || $guard(_exceptionable, {
412
- path: _path + ".type",
413
- expected: "string",
414
- value: input.type
415
- }, errorFactory)) && ((null !== input.profile || $guard(_exceptionable, {
416
- path: _path + ".profile",
417
- expected: "(Array<string | RenderProfileObject> | RenderProfileObject | string)",
418
- value: input.profile
419
- }, errorFactory)) && (undefined !== input.profile || $guard(_exceptionable, {
420
- path: _path + ".profile",
421
- expected: "(Array<string | RenderProfileObject> | RenderProfileObject | string)",
422
- value: input.profile
423
- }, errorFactory)) && ("string" === typeof input.profile || (Array.isArray(input.profile) && input.profile.every((elem, _index1) => (null !== elem || $guard(_exceptionable, {
424
- path: _path + ".profile[" + _index1 + "]",
425
- expected: "(RenderProfileObject | string)",
426
- value: elem
427
- }, errorFactory)) && (undefined !== elem || $guard(_exceptionable, {
428
- path: _path + ".profile[" + _index1 + "]",
429
- expected: "(RenderProfileObject | string)",
430
- value: elem
431
- }, errorFactory)) && ("string" === typeof elem || ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
432
- path: _path + ".profile[" + _index1 + "]",
433
- expected: "(RenderProfileObject | string)",
434
- value: elem
435
- }, errorFactory)) && $ao1(elem, _path + ".profile[" + _index1 + "]", true && _exceptionable) || $guard(_exceptionable, {
436
- path: _path + ".profile[" + _index1 + "]",
437
- expected: "(RenderProfileObject | string)",
438
- value: elem
439
- }, errorFactory))) || "object" === typeof input.profile && null !== input.profile && $ao1(input.profile, _path + ".profile", true && _exceptionable) || $guard(_exceptionable, {
440
- path: _path + ".profile",
441
- expected: "(Array<string | RenderProfileObject> | RenderProfileObject | string)",
442
- value: input.profile
443
- }, errorFactory)) || $guard(_exceptionable, {
444
- path: _path + ".profile",
445
- expected: "(Array<string | RenderProfileObject> | RenderProfileObject | string)",
446
- value: input.profile
447
- }, errorFactory)));
448
- const $ao1 = (input, _path, _exceptionable = true) => ("string" === typeof input.format || $guard(_exceptionable, {
449
- path: _path + ".format",
450
- expected: "string",
451
- value: input.format
452
- }, errorFactory)) && (undefined === input.transcribe || ("object" === typeof input.transcribe && null !== input.transcribe || $guard(_exceptionable, {
453
- path: _path + ".transcribe",
454
- expected: "(__type | undefined)",
455
- value: input.transcribe
456
- }, errorFactory)) && $ao2(input.transcribe, _path + ".transcribe", true && _exceptionable) || $guard(_exceptionable, {
457
- path: _path + ".transcribe",
458
- expected: "(__type | undefined)",
459
- value: input.transcribe
460
- }, errorFactory)) && (undefined === input.translate || ("object" === typeof input.translate && null !== input.translate || $guard(_exceptionable, {
461
- path: _path + ".translate",
462
- expected: "(__type.o1 | undefined)",
463
- value: input.translate
464
- }, errorFactory)) && $ao3(input.translate, _path + ".translate", true && _exceptionable) || $guard(_exceptionable, {
465
- path: _path + ".translate",
466
- expected: "(__type.o1 | undefined)",
467
- value: input.translate
468
- }, errorFactory)) && (undefined === input.audio || ("object" === typeof input.audio && null !== input.audio && false === Array.isArray(input.audio) || $guard(_exceptionable, {
469
- path: _path + ".audio",
470
- expected: "(__type.o2 | undefined)",
471
- value: input.audio
472
- }, errorFactory)) && $ao4(input.audio, _path + ".audio", true && _exceptionable) || $guard(_exceptionable, {
473
- path: _path + ".audio",
474
- expected: "(__type.o2 | undefined)",
475
- value: input.audio
476
- }, errorFactory)) && true && (undefined === input.pick || (Array.isArray(input.pick) || $guard(_exceptionable, {
477
- path: _path + ".pick",
478
- expected: "(Array<string> | undefined)",
479
- value: input.pick
480
- }, errorFactory)) && input.pick.every((elem, _index2) => "string" === typeof elem || $guard(_exceptionable, {
481
- path: _path + ".pick[" + _index2 + "]",
482
- expected: "string",
483
- value: elem
484
- }, errorFactory)) || $guard(_exceptionable, {
485
- path: _path + ".pick",
486
- expected: "(Array<string> | undefined)",
487
- value: input.pick
488
- }, errorFactory)) && ((null !== input.subtitle || $guard(_exceptionable, {
489
- path: _path + ".subtitle",
490
- expected: "(SubtitleProfile | string | undefined)",
491
- value: input.subtitle
492
- }, errorFactory)) && (undefined === input.subtitle || "string" === typeof input.subtitle || ("object" === typeof input.subtitle && null !== input.subtitle && false === Array.isArray(input.subtitle) || $guard(_exceptionable, {
493
- path: _path + ".subtitle",
494
- expected: "(SubtitleProfile | string | undefined)",
495
- value: input.subtitle
496
- }, errorFactory)) && $ao5(input.subtitle, _path + ".subtitle", true && _exceptionable) || $guard(_exceptionable, {
497
- path: _path + ".subtitle",
498
- expected: "(SubtitleProfile | string | undefined)",
499
- value: input.subtitle
500
- }, errorFactory)));
501
- const $ao2 = (input, _path, _exceptionable = true) => "string" === typeof input.engine || $guard(_exceptionable, {
502
- path: _path + ".engine",
503
- expected: "string",
504
- value: input.engine
505
- }, errorFactory);
506
- const $ao3 = (input, _path, _exceptionable = true) => "string" === typeof input.language || $guard(_exceptionable, {
507
- path: _path + ".language",
508
- expected: "string",
509
- value: input.language
510
- }, errorFactory);
511
- const $ao4 = (input, _path, _exceptionable = true) => undefined === input.pan || "string" === typeof input.pan || $guard(_exceptionable, {
512
- path: _path + ".pan",
513
- expected: "(string | undefined)",
514
- value: input.pan
515
- }, errorFactory);
516
- const $ao5 = (input, _path, _exceptionable = true) => (undefined === input.lang || "string" === typeof input.lang || $guard(_exceptionable, {
517
- path: _path + ".lang",
518
- expected: "(string | undefined)",
519
- value: input.lang
520
- }, errorFactory)) && (undefined === input.style || "string" === typeof input.style || $guard(_exceptionable, {
521
- path: _path + ".style",
522
- expected: "(string | undefined)",
523
- value: input.style
524
- }, errorFactory));
525
- return ("object" === typeof input && null !== input || $guard(true, {
526
- path: _path + "",
527
- expected: "RenderPresetObject",
528
- value: input
529
- }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
530
- path: _path + "",
531
- expected: "RenderPresetObject",
532
- value: input
533
- }, errorFactory);
534
- })(input, "$input", true);
535
- return input;
536
- }; const stringify = input => {
537
- const $io1 = input => "string" === typeof input.format && (undefined === input.transcribe || "object" === typeof input.transcribe && null !== input.transcribe && $io2(input.transcribe)) && (undefined === input.translate || "object" === typeof input.translate && null !== input.translate && $io3(input.translate)) && (undefined === input.audio || "object" === typeof input.audio && null !== input.audio && false === Array.isArray(input.audio) && $io4(input.audio)) && true && (undefined === input.pick || Array.isArray(input.pick) && input.pick.every(elem => "string" === typeof elem)) && (null !== input.subtitle && (undefined === input.subtitle || "string" === typeof input.subtitle || "object" === typeof input.subtitle && null !== input.subtitle && false === Array.isArray(input.subtitle) && $io5(input.subtitle)));
538
- const $io2 = input => "string" === typeof input.engine;
539
- const $io3 = input => "string" === typeof input.language;
540
- const $io4 = input => undefined === input.pan || "string" === typeof input.pan;
541
- const $io5 = input => (undefined === input.lang || "string" === typeof input.lang) && (undefined === input.style || "string" === typeof input.style);
542
- const $string = __typia.json.createAssertStringify.string;
543
- const $throws = __typia.json.createAssertStringify.throws;
544
- const $tail = __typia.json.createAssertStringify.tail;
545
- const $so0 = input => `{"type":${$string(input.type)},"profile":${(() => {
546
- if ("string" === typeof input.profile)
547
- return $string(input.profile);
548
- if (Array.isArray(input.profile))
549
- return `[${input.profile.map(elem => (() => {
550
- if ("string" === typeof elem)
551
- return $string(elem);
552
- if ("object" === typeof elem && null !== elem)
553
- return $so1(elem);
554
- $throws({
555
- expected: "(RenderProfileObject | string)",
556
- value: elem
557
- });
558
- })()).join(",")}]`;
559
- if ("object" === typeof input.profile && null !== input.profile)
560
- return $so1(input.profile);
561
- $throws({
562
- expected: "(Array<string | RenderProfileObject> | RenderProfileObject | string)",
563
- value: input.profile
564
- });
565
- })()}}`;
566
- const $so1 = input => `{${undefined === input.transcribe ? "" : `"transcribe":${undefined !== input.transcribe ? `{"engine":${$string(input.transcribe.engine)}}` : undefined},`}${undefined === input.translate ? "" : `"translate":${undefined !== input.translate ? `{"language":${$string(input.translate.language)}}` : undefined},`}${undefined === input.audio ? "" : `"audio":${undefined !== input.audio ? $so4(input.audio) : undefined},`}${undefined === input.video || "function" === typeof input.video ? "" : `"video":${undefined !== input.video ? JSON.stringify(input.video) : undefined},`}${undefined === input.pick ? "" : `"pick":${undefined !== input.pick ? `[${input.pick.map(elem => $string(elem)).join(",")}]` : undefined},`}${undefined === input.subtitle ? "" : `"subtitle":${undefined !== input.subtitle ? (() => {
567
- if ("string" === typeof input.subtitle)
568
- return $string(input.subtitle);
569
- if ("object" === typeof input.subtitle && null !== input.subtitle && false === Array.isArray(input.subtitle))
570
- return $so5(input.subtitle);
571
- $throws({
572
- expected: "(SubtitleProfile | string | undefined)",
573
- value: input.subtitle
574
- });
575
- })() : undefined},`}"format":${$string(input.format)}}`;
576
- const $so4 = input => `{${$tail(`${undefined === input.pan ? "" : `"pan":${undefined !== input.pan ? $string(input.pan) : undefined}`}`)}}`;
577
- const $so5 = input => `{${$tail(`${undefined === input.lang ? "" : `"lang":${undefined !== input.lang ? $string(input.lang) : undefined},`}${undefined === input.style ? "" : `"style":${undefined !== input.style ? $string(input.style) : undefined}`}`)}}`;
578
- return $so0(input);
579
- }; return stringify(assert(input, errorFactory)); };
580
- export const isRenderPreset = input => {
581
- const $io0 = input => "string" === typeof input.type && (null !== input.profile && undefined !== input.profile && ("string" === typeof input.profile || (Array.isArray(input.profile) && input.profile.every(elem => null !== elem && undefined !== elem && ("string" === typeof elem || "object" === typeof elem && null !== elem && $io1(elem))) || "object" === typeof input.profile && null !== input.profile && $io1(input.profile))));
582
- const $io1 = input => "string" === typeof input.format && (undefined === input.transcribe || "object" === typeof input.transcribe && null !== input.transcribe && $io2(input.transcribe)) && (undefined === input.translate || "object" === typeof input.translate && null !== input.translate && $io3(input.translate)) && (undefined === input.audio || "object" === typeof input.audio && null !== input.audio && false === Array.isArray(input.audio) && $io4(input.audio)) && true && (undefined === input.pick || Array.isArray(input.pick) && input.pick.every(elem => "string" === typeof elem)) && (null !== input.subtitle && (undefined === input.subtitle || "string" === typeof input.subtitle || "object" === typeof input.subtitle && null !== input.subtitle && false === Array.isArray(input.subtitle) && $io5(input.subtitle)));
583
- const $io2 = input => "string" === typeof input.engine;
584
- const $io3 = input => "string" === typeof input.language;
585
- const $io4 = input => undefined === input.pan || "string" === typeof input.pan;
586
- const $io5 = input => (undefined === input.lang || "string" === typeof input.lang) && (undefined === input.style || "string" === typeof input.style);
587
- return null !== input && undefined !== input && ("string" === typeof input || "object" === typeof input && null !== input && $io0(input));
588
- };
589
- export const assertRenderPreset = (input, errorFactory) => {
590
- const __is = input => {
591
- const $io0 = input => "string" === typeof input.type && (null !== input.profile && undefined !== input.profile && ("string" === typeof input.profile || (Array.isArray(input.profile) && input.profile.every(elem => null !== elem && undefined !== elem && ("string" === typeof elem || "object" === typeof elem && null !== elem && $io1(elem))) || "object" === typeof input.profile && null !== input.profile && $io1(input.profile))));
592
- const $io1 = input => "string" === typeof input.format && (undefined === input.transcribe || "object" === typeof input.transcribe && null !== input.transcribe && $io2(input.transcribe)) && (undefined === input.translate || "object" === typeof input.translate && null !== input.translate && $io3(input.translate)) && (undefined === input.audio || "object" === typeof input.audio && null !== input.audio && false === Array.isArray(input.audio) && $io4(input.audio)) && true && (undefined === input.pick || Array.isArray(input.pick) && input.pick.every(elem => "string" === typeof elem)) && (null !== input.subtitle && (undefined === input.subtitle || "string" === typeof input.subtitle || "object" === typeof input.subtitle && null !== input.subtitle && false === Array.isArray(input.subtitle) && $io5(input.subtitle)));
593
- const $io2 = input => "string" === typeof input.engine;
594
- const $io3 = input => "string" === typeof input.language;
595
- const $io4 = input => undefined === input.pan || "string" === typeof input.pan;
596
- const $io5 = input => (undefined === input.lang || "string" === typeof input.lang) && (undefined === input.style || "string" === typeof input.style);
597
- return null !== input && undefined !== input && ("string" === typeof input || "object" === typeof input && null !== input && $io0(input));
598
- };
599
- if (false === __is(input))
600
- ((input, _path, _exceptionable = true) => {
601
- const $guard = __typia.createAssert.guard;
602
- const $ao0 = (input, _path, _exceptionable = true) => ("string" === typeof input.type || $guard(_exceptionable, {
603
- path: _path + ".type",
604
- expected: "string",
605
- value: input.type
606
- }, errorFactory)) && ((null !== input.profile || $guard(_exceptionable, {
607
- path: _path + ".profile",
608
- expected: "(Array<string | RenderProfileObject> | RenderProfileObject | string)",
609
- value: input.profile
610
- }, errorFactory)) && (undefined !== input.profile || $guard(_exceptionable, {
611
- path: _path + ".profile",
612
- expected: "(Array<string | RenderProfileObject> | RenderProfileObject | string)",
613
- value: input.profile
614
- }, errorFactory)) && ("string" === typeof input.profile || (Array.isArray(input.profile) && input.profile.every((elem, _index1) => (null !== elem || $guard(_exceptionable, {
615
- path: _path + ".profile[" + _index1 + "]",
616
- expected: "(RenderProfileObject | string)",
617
- value: elem
618
- }, errorFactory)) && (undefined !== elem || $guard(_exceptionable, {
619
- path: _path + ".profile[" + _index1 + "]",
620
- expected: "(RenderProfileObject | string)",
621
- value: elem
622
- }, errorFactory)) && ("string" === typeof elem || ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
623
- path: _path + ".profile[" + _index1 + "]",
624
- expected: "(RenderProfileObject | string)",
625
- value: elem
626
- }, errorFactory)) && $ao1(elem, _path + ".profile[" + _index1 + "]", true && _exceptionable) || $guard(_exceptionable, {
627
- path: _path + ".profile[" + _index1 + "]",
628
- expected: "(RenderProfileObject | string)",
629
- value: elem
630
- }, errorFactory))) || "object" === typeof input.profile && null !== input.profile && $ao1(input.profile, _path + ".profile", true && _exceptionable) || $guard(_exceptionable, {
631
- path: _path + ".profile",
632
- expected: "(Array<string | RenderProfileObject> | RenderProfileObject | string)",
633
- value: input.profile
634
- }, errorFactory)) || $guard(_exceptionable, {
635
- path: _path + ".profile",
636
- expected: "(Array<string | RenderProfileObject> | RenderProfileObject | string)",
637
- value: input.profile
638
- }, errorFactory)));
639
- const $ao1 = (input, _path, _exceptionable = true) => ("string" === typeof input.format || $guard(_exceptionable, {
640
- path: _path + ".format",
641
- expected: "string",
642
- value: input.format
643
- }, errorFactory)) && (undefined === input.transcribe || ("object" === typeof input.transcribe && null !== input.transcribe || $guard(_exceptionable, {
644
- path: _path + ".transcribe",
645
- expected: "(__type | undefined)",
646
- value: input.transcribe
647
- }, errorFactory)) && $ao2(input.transcribe, _path + ".transcribe", true && _exceptionable) || $guard(_exceptionable, {
648
- path: _path + ".transcribe",
649
- expected: "(__type | undefined)",
650
- value: input.transcribe
651
- }, errorFactory)) && (undefined === input.translate || ("object" === typeof input.translate && null !== input.translate || $guard(_exceptionable, {
652
- path: _path + ".translate",
653
- expected: "(__type.o1 | undefined)",
654
- value: input.translate
655
- }, errorFactory)) && $ao3(input.translate, _path + ".translate", true && _exceptionable) || $guard(_exceptionable, {
656
- path: _path + ".translate",
657
- expected: "(__type.o1 | undefined)",
658
- value: input.translate
659
- }, errorFactory)) && (undefined === input.audio || ("object" === typeof input.audio && null !== input.audio && false === Array.isArray(input.audio) || $guard(_exceptionable, {
660
- path: _path + ".audio",
661
- expected: "(__type.o2 | undefined)",
662
- value: input.audio
663
- }, errorFactory)) && $ao4(input.audio, _path + ".audio", true && _exceptionable) || $guard(_exceptionable, {
664
- path: _path + ".audio",
665
- expected: "(__type.o2 | undefined)",
666
- value: input.audio
667
- }, errorFactory)) && true && (undefined === input.pick || (Array.isArray(input.pick) || $guard(_exceptionable, {
668
- path: _path + ".pick",
669
- expected: "(Array<string> | undefined)",
670
- value: input.pick
671
- }, errorFactory)) && input.pick.every((elem, _index2) => "string" === typeof elem || $guard(_exceptionable, {
672
- path: _path + ".pick[" + _index2 + "]",
673
- expected: "string",
674
- value: elem
675
- }, errorFactory)) || $guard(_exceptionable, {
676
- path: _path + ".pick",
677
- expected: "(Array<string> | undefined)",
678
- value: input.pick
679
- }, errorFactory)) && ((null !== input.subtitle || $guard(_exceptionable, {
680
- path: _path + ".subtitle",
681
- expected: "(SubtitleProfile | string | undefined)",
682
- value: input.subtitle
683
- }, errorFactory)) && (undefined === input.subtitle || "string" === typeof input.subtitle || ("object" === typeof input.subtitle && null !== input.subtitle && false === Array.isArray(input.subtitle) || $guard(_exceptionable, {
684
- path: _path + ".subtitle",
685
- expected: "(SubtitleProfile | string | undefined)",
686
- value: input.subtitle
687
- }, errorFactory)) && $ao5(input.subtitle, _path + ".subtitle", true && _exceptionable) || $guard(_exceptionable, {
688
- path: _path + ".subtitle",
689
- expected: "(SubtitleProfile | string | undefined)",
690
- value: input.subtitle
691
- }, errorFactory)));
692
- const $ao2 = (input, _path, _exceptionable = true) => "string" === typeof input.engine || $guard(_exceptionable, {
693
- path: _path + ".engine",
694
- expected: "string",
695
- value: input.engine
696
- }, errorFactory);
697
- const $ao3 = (input, _path, _exceptionable = true) => "string" === typeof input.language || $guard(_exceptionable, {
698
- path: _path + ".language",
699
- expected: "string",
700
- value: input.language
701
- }, errorFactory);
702
- const $ao4 = (input, _path, _exceptionable = true) => undefined === input.pan || "string" === typeof input.pan || $guard(_exceptionable, {
703
- path: _path + ".pan",
704
- expected: "(string | undefined)",
705
- value: input.pan
706
- }, errorFactory);
707
- const $ao5 = (input, _path, _exceptionable = true) => (undefined === input.lang || "string" === typeof input.lang || $guard(_exceptionable, {
708
- path: _path + ".lang",
709
- expected: "(string | undefined)",
710
- value: input.lang
711
- }, errorFactory)) && (undefined === input.style || "string" === typeof input.style || $guard(_exceptionable, {
712
- path: _path + ".style",
713
- expected: "(string | undefined)",
714
- value: input.style
715
- }, errorFactory));
716
- return (null !== input || $guard(true, {
717
- path: _path + "",
718
- expected: "(RenderPresetObject | string)",
719
- value: input
720
- }, errorFactory)) && (undefined !== input || $guard(true, {
721
- path: _path + "",
722
- expected: "(RenderPresetObject | string)",
723
- value: input
724
- }, errorFactory)) && ("string" === typeof input || ("object" === typeof input && null !== input || $guard(true, {
725
- path: _path + "",
726
- expected: "(RenderPresetObject | string)",
727
- value: input
728
- }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
729
- path: _path + "",
730
- expected: "(RenderPresetObject | string)",
731
- value: input
732
- }, errorFactory));
733
- })(input, "$input", true);
734
- return input;
735
- };
736
- export const randomRenderPreset = generator => {
737
- const $generator = __typia.createRandom.generator;
738
- const $pick = __typia.createRandom.pick;
739
- const $ro0 = (_recursive = false, _depth = 0) => ({
740
- type: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
741
- profile: $pick([
742
- () => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
743
- () => (generator?.array ?? $generator.array)(() => $pick([
744
- () => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
745
- () => $ro1(_recursive, _recursive ? 1 + _depth : _depth)
746
- ])()),
747
- () => $ro1(_recursive, _recursive ? 1 + _depth : _depth)
748
- ])()
749
- });
750
- const $ro1 = (_recursive = false, _depth = 0) => ({
751
- format: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
752
- transcribe: $pick([
753
- () => undefined,
754
- () => $ro2(_recursive, _recursive ? 1 + _depth : _depth)
755
- ])(),
756
- translate: $pick([
757
- () => undefined,
758
- () => $ro3(_recursive, _recursive ? 1 + _depth : _depth)
759
- ])(),
760
- audio: $pick([
761
- () => undefined,
762
- () => $ro4(_recursive, _recursive ? 1 + _depth : _depth)
763
- ])(),
764
- video: $pick([
765
- () => "any type used...",
766
- () => undefined
767
- ])(),
768
- pick: $pick([
769
- () => undefined,
770
- () => (generator?.array ?? $generator.array)(() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)())
771
- ])(),
772
- subtitle: $pick([
773
- () => undefined,
774
- () => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
775
- () => $ro5(_recursive, _recursive ? 1 + _depth : _depth)
776
- ])()
777
- });
778
- const $ro2 = (_recursive = false, _depth = 0) => ({
779
- engine: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
780
- });
781
- const $ro3 = (_recursive = false, _depth = 0) => ({
782
- language: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
783
- });
784
- const $ro4 = (_recursive = false, _depth = 0) => ({
785
- pan: $pick([
786
- () => undefined,
787
- () => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
788
- ])()
789
- });
790
- const $ro5 = (_recursive = false, _depth = 0) => ({
791
- lang: $pick([
792
- () => undefined,
793
- () => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
794
- ])(),
795
- style: $pick([
796
- () => undefined,
797
- () => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
798
- ])()
799
- });
800
- return $pick([
801
- () => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
802
- () => $ro0()
803
- ])();
804
- };
805
- export const assertGuardRenderPreset = (input, errorFactory) => {
806
- const __is = input => {
807
- const $io0 = input => "string" === typeof input.type && (null !== input.profile && undefined !== input.profile && ("string" === typeof input.profile || (Array.isArray(input.profile) && input.profile.every(elem => null !== elem && undefined !== elem && ("string" === typeof elem || "object" === typeof elem && null !== elem && $io1(elem))) || "object" === typeof input.profile && null !== input.profile && $io1(input.profile))));
808
- const $io1 = input => "string" === typeof input.format && (undefined === input.transcribe || "object" === typeof input.transcribe && null !== input.transcribe && $io2(input.transcribe)) && (undefined === input.translate || "object" === typeof input.translate && null !== input.translate && $io3(input.translate)) && (undefined === input.audio || "object" === typeof input.audio && null !== input.audio && false === Array.isArray(input.audio) && $io4(input.audio)) && true && (undefined === input.pick || Array.isArray(input.pick) && input.pick.every(elem => "string" === typeof elem)) && (null !== input.subtitle && (undefined === input.subtitle || "string" === typeof input.subtitle || "object" === typeof input.subtitle && null !== input.subtitle && false === Array.isArray(input.subtitle) && $io5(input.subtitle)));
809
- const $io2 = input => "string" === typeof input.engine;
810
- const $io3 = input => "string" === typeof input.language;
811
- const $io4 = input => undefined === input.pan || "string" === typeof input.pan;
812
- const $io5 = input => (undefined === input.lang || "string" === typeof input.lang) && (undefined === input.style || "string" === typeof input.style);
813
- return null !== input && undefined !== input && ("string" === typeof input || "object" === typeof input && null !== input && $io0(input));
814
- };
815
- if (false === __is(input))
816
- ((input, _path, _exceptionable = true) => {
817
- const $guard = __typia.createAssertGuard.guard;
818
- const $ao0 = (input, _path, _exceptionable = true) => ("string" === typeof input.type || $guard(_exceptionable, {
819
- path: _path + ".type",
820
- expected: "string",
821
- value: input.type
822
- }, errorFactory)) && ((null !== input.profile || $guard(_exceptionable, {
823
- path: _path + ".profile",
824
- expected: "(Array<string | RenderProfileObject> | RenderProfileObject | string)",
825
- value: input.profile
826
- }, errorFactory)) && (undefined !== input.profile || $guard(_exceptionable, {
827
- path: _path + ".profile",
828
- expected: "(Array<string | RenderProfileObject> | RenderProfileObject | string)",
829
- value: input.profile
830
- }, errorFactory)) && ("string" === typeof input.profile || (Array.isArray(input.profile) && input.profile.every((elem, _index1) => (null !== elem || $guard(_exceptionable, {
831
- path: _path + ".profile[" + _index1 + "]",
832
- expected: "(RenderProfileObject | string)",
833
- value: elem
834
- }, errorFactory)) && (undefined !== elem || $guard(_exceptionable, {
835
- path: _path + ".profile[" + _index1 + "]",
836
- expected: "(RenderProfileObject | string)",
837
- value: elem
838
- }, errorFactory)) && ("string" === typeof elem || ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
839
- path: _path + ".profile[" + _index1 + "]",
840
- expected: "(RenderProfileObject | string)",
841
- value: elem
842
- }, errorFactory)) && $ao1(elem, _path + ".profile[" + _index1 + "]", true && _exceptionable) || $guard(_exceptionable, {
843
- path: _path + ".profile[" + _index1 + "]",
844
- expected: "(RenderProfileObject | string)",
845
- value: elem
846
- }, errorFactory))) || "object" === typeof input.profile && null !== input.profile && $ao1(input.profile, _path + ".profile", true && _exceptionable) || $guard(_exceptionable, {
847
- path: _path + ".profile",
848
- expected: "(Array<string | RenderProfileObject> | RenderProfileObject | string)",
849
- value: input.profile
850
- }, errorFactory)) || $guard(_exceptionable, {
851
- path: _path + ".profile",
852
- expected: "(Array<string | RenderProfileObject> | RenderProfileObject | string)",
853
- value: input.profile
854
- }, errorFactory)));
855
- const $ao1 = (input, _path, _exceptionable = true) => ("string" === typeof input.format || $guard(_exceptionable, {
856
- path: _path + ".format",
857
- expected: "string",
858
- value: input.format
859
- }, errorFactory)) && (undefined === input.transcribe || ("object" === typeof input.transcribe && null !== input.transcribe || $guard(_exceptionable, {
860
- path: _path + ".transcribe",
861
- expected: "(__type | undefined)",
862
- value: input.transcribe
863
- }, errorFactory)) && $ao2(input.transcribe, _path + ".transcribe", true && _exceptionable) || $guard(_exceptionable, {
864
- path: _path + ".transcribe",
865
- expected: "(__type | undefined)",
866
- value: input.transcribe
867
- }, errorFactory)) && (undefined === input.translate || ("object" === typeof input.translate && null !== input.translate || $guard(_exceptionable, {
868
- path: _path + ".translate",
869
- expected: "(__type.o1 | undefined)",
870
- value: input.translate
871
- }, errorFactory)) && $ao3(input.translate, _path + ".translate", true && _exceptionable) || $guard(_exceptionable, {
872
- path: _path + ".translate",
873
- expected: "(__type.o1 | undefined)",
874
- value: input.translate
875
- }, errorFactory)) && (undefined === input.audio || ("object" === typeof input.audio && null !== input.audio && false === Array.isArray(input.audio) || $guard(_exceptionable, {
876
- path: _path + ".audio",
877
- expected: "(__type.o2 | undefined)",
878
- value: input.audio
879
- }, errorFactory)) && $ao4(input.audio, _path + ".audio", true && _exceptionable) || $guard(_exceptionable, {
880
- path: _path + ".audio",
881
- expected: "(__type.o2 | undefined)",
882
- value: input.audio
883
- }, errorFactory)) && true && (undefined === input.pick || (Array.isArray(input.pick) || $guard(_exceptionable, {
884
- path: _path + ".pick",
885
- expected: "(Array<string> | undefined)",
886
- value: input.pick
887
- }, errorFactory)) && input.pick.every((elem, _index2) => "string" === typeof elem || $guard(_exceptionable, {
888
- path: _path + ".pick[" + _index2 + "]",
889
- expected: "string",
890
- value: elem
891
- }, errorFactory)) || $guard(_exceptionable, {
892
- path: _path + ".pick",
893
- expected: "(Array<string> | undefined)",
894
- value: input.pick
895
- }, errorFactory)) && ((null !== input.subtitle || $guard(_exceptionable, {
896
- path: _path + ".subtitle",
897
- expected: "(SubtitleProfile | string | undefined)",
898
- value: input.subtitle
899
- }, errorFactory)) && (undefined === input.subtitle || "string" === typeof input.subtitle || ("object" === typeof input.subtitle && null !== input.subtitle && false === Array.isArray(input.subtitle) || $guard(_exceptionable, {
900
- path: _path + ".subtitle",
901
- expected: "(SubtitleProfile | string | undefined)",
902
- value: input.subtitle
903
- }, errorFactory)) && $ao5(input.subtitle, _path + ".subtitle", true && _exceptionable) || $guard(_exceptionable, {
904
- path: _path + ".subtitle",
905
- expected: "(SubtitleProfile | string | undefined)",
906
- value: input.subtitle
907
- }, errorFactory)));
908
- const $ao2 = (input, _path, _exceptionable = true) => "string" === typeof input.engine || $guard(_exceptionable, {
909
- path: _path + ".engine",
910
- expected: "string",
911
- value: input.engine
912
- }, errorFactory);
913
- const $ao3 = (input, _path, _exceptionable = true) => "string" === typeof input.language || $guard(_exceptionable, {
914
- path: _path + ".language",
915
- expected: "string",
916
- value: input.language
917
- }, errorFactory);
918
- const $ao4 = (input, _path, _exceptionable = true) => undefined === input.pan || "string" === typeof input.pan || $guard(_exceptionable, {
919
- path: _path + ".pan",
920
- expected: "(string | undefined)",
921
- value: input.pan
922
- }, errorFactory);
923
- const $ao5 = (input, _path, _exceptionable = true) => (undefined === input.lang || "string" === typeof input.lang || $guard(_exceptionable, {
924
- path: _path + ".lang",
925
- expected: "(string | undefined)",
926
- value: input.lang
927
- }, errorFactory)) && (undefined === input.style || "string" === typeof input.style || $guard(_exceptionable, {
928
- path: _path + ".style",
929
- expected: "(string | undefined)",
930
- value: input.style
931
- }, errorFactory));
932
- return (null !== input || $guard(true, {
933
- path: _path + "",
934
- expected: "(RenderPresetObject | string)",
935
- value: input
936
- }, errorFactory)) && (undefined !== input || $guard(true, {
937
- path: _path + "",
938
- expected: "(RenderPresetObject | string)",
939
- value: input
940
- }, errorFactory)) && ("string" === typeof input || ("object" === typeof input && null !== input || $guard(true, {
941
- path: _path + "",
942
- expected: "(RenderPresetObject | string)",
943
- value: input
944
- }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
945
- path: _path + "",
946
- expected: "(RenderPresetObject | string)",
947
- value: input
948
- }, errorFactory));
949
- })(input, "$input", true);
950
- };
951
- export const stringifyRenderPreset = input => {
952
- const $io1 = input => "string" === typeof input.format && (undefined === input.transcribe || "object" === typeof input.transcribe && null !== input.transcribe && $io2(input.transcribe)) && (undefined === input.translate || "object" === typeof input.translate && null !== input.translate && $io3(input.translate)) && (undefined === input.audio || "object" === typeof input.audio && null !== input.audio && false === Array.isArray(input.audio) && $io4(input.audio)) && true && (undefined === input.pick || Array.isArray(input.pick) && input.pick.every(elem => "string" === typeof elem)) && (null !== input.subtitle && (undefined === input.subtitle || "string" === typeof input.subtitle || "object" === typeof input.subtitle && null !== input.subtitle && false === Array.isArray(input.subtitle) && $io5(input.subtitle)));
953
- const $io2 = input => "string" === typeof input.engine;
954
- const $io3 = input => "string" === typeof input.language;
955
- const $io4 = input => undefined === input.pan || "string" === typeof input.pan;
956
- const $io5 = input => (undefined === input.lang || "string" === typeof input.lang) && (undefined === input.style || "string" === typeof input.style);
957
- const $string = __typia.json.createStringify.string;
958
- const $throws = __typia.json.createStringify.throws;
959
- const $tail = __typia.json.createStringify.tail;
960
- const $so0 = input => `{"type":${$string(input.type)},"profile":${(() => {
961
- if ("string" === typeof input.profile)
962
- return $string(input.profile);
963
- if (Array.isArray(input.profile))
964
- return `[${input.profile.map(elem => (() => {
965
- if ("string" === typeof elem)
966
- return $string(elem);
967
- if ("object" === typeof elem && null !== elem)
968
- return $so1(elem);
969
- $throws({
970
- expected: "(RenderProfileObject | string)",
971
- value: elem
972
- });
973
- })()).join(",")}]`;
974
- if ("object" === typeof input.profile && null !== input.profile)
975
- return $so1(input.profile);
976
- $throws({
977
- expected: "(Array<string | RenderProfileObject> | RenderProfileObject | string)",
978
- value: input.profile
979
- });
980
- })()}}`;
981
- const $so1 = input => `{${undefined === input.transcribe ? "" : `"transcribe":${undefined !== input.transcribe ? `{"engine":${$string(input.transcribe.engine)}}` : undefined},`}${undefined === input.translate ? "" : `"translate":${undefined !== input.translate ? `{"language":${$string(input.translate.language)}}` : undefined},`}${undefined === input.audio ? "" : `"audio":${undefined !== input.audio ? $so4(input.audio) : undefined},`}${undefined === input.video || "function" === typeof input.video ? "" : `"video":${undefined !== input.video ? JSON.stringify(input.video) : undefined},`}${undefined === input.pick ? "" : `"pick":${undefined !== input.pick ? `[${input.pick.map(elem => $string(elem)).join(",")}]` : undefined},`}${undefined === input.subtitle ? "" : `"subtitle":${undefined !== input.subtitle ? (() => {
982
- if ("string" === typeof input.subtitle)
983
- return $string(input.subtitle);
984
- if ("object" === typeof input.subtitle && null !== input.subtitle && false === Array.isArray(input.subtitle))
985
- return $so5(input.subtitle);
986
- $throws({
987
- expected: "(SubtitleProfile | string | undefined)",
988
- value: input.subtitle
989
- });
990
- })() : undefined},`}"format":${$string(input.format)}}`;
991
- const $so4 = input => `{${$tail(`${undefined === input.pan ? "" : `"pan":${undefined !== input.pan ? $string(input.pan) : undefined}`}`)}}`;
992
- const $so5 = input => `{${$tail(`${undefined === input.lang ? "" : `"lang":${undefined !== input.lang ? $string(input.lang) : undefined},`}${undefined === input.style ? "" : `"style":${undefined !== input.style ? $string(input.style) : undefined}`}`)}}`;
993
- return (() => {
994
- if ("string" === typeof input)
995
- return $string(input);
996
- if ("object" === typeof input && null !== input)
997
- return $so0(input);
998
- $throws({
999
- expected: "(RenderPresetObject | string)",
1000
- value: input
1001
- });
1002
- })();
1003
- };
1004
- export const assertStringifyRenderPreset = (input, errorFactory) => { const assert = (input, errorFactory) => {
1005
- const __is = input => {
1006
- const $io0 = input => "string" === typeof input.type && (null !== input.profile && undefined !== input.profile && ("string" === typeof input.profile || (Array.isArray(input.profile) && input.profile.every(elem => null !== elem && undefined !== elem && ("string" === typeof elem || "object" === typeof elem && null !== elem && $io1(elem))) || "object" === typeof input.profile && null !== input.profile && $io1(input.profile))));
1007
- const $io1 = input => "string" === typeof input.format && (undefined === input.transcribe || "object" === typeof input.transcribe && null !== input.transcribe && $io2(input.transcribe)) && (undefined === input.translate || "object" === typeof input.translate && null !== input.translate && $io3(input.translate)) && (undefined === input.audio || "object" === typeof input.audio && null !== input.audio && false === Array.isArray(input.audio) && $io4(input.audio)) && true && (undefined === input.pick || Array.isArray(input.pick) && input.pick.every(elem => "string" === typeof elem)) && (null !== input.subtitle && (undefined === input.subtitle || "string" === typeof input.subtitle || "object" === typeof input.subtitle && null !== input.subtitle && false === Array.isArray(input.subtitle) && $io5(input.subtitle)));
1008
- const $io2 = input => "string" === typeof input.engine;
1009
- const $io3 = input => "string" === typeof input.language;
1010
- const $io4 = input => undefined === input.pan || "string" === typeof input.pan;
1011
- const $io5 = input => (undefined === input.lang || "string" === typeof input.lang) && (undefined === input.style || "string" === typeof input.style);
1012
- return null !== input && undefined !== input && ("string" === typeof input || "object" === typeof input && null !== input && $io0(input));
1013
- };
1014
- if (false === __is(input))
1015
- ((input, _path, _exceptionable = true) => {
1016
- const $guard = __typia.json.createAssertStringify.guard;
1017
- const $ao0 = (input, _path, _exceptionable = true) => ("string" === typeof input.type || $guard(_exceptionable, {
1018
- path: _path + ".type",
1019
- expected: "string",
1020
- value: input.type
1021
- }, errorFactory)) && ((null !== input.profile || $guard(_exceptionable, {
1022
- path: _path + ".profile",
1023
- expected: "(Array<string | RenderProfileObject> | RenderProfileObject | string)",
1024
- value: input.profile
1025
- }, errorFactory)) && (undefined !== input.profile || $guard(_exceptionable, {
1026
- path: _path + ".profile",
1027
- expected: "(Array<string | RenderProfileObject> | RenderProfileObject | string)",
1028
- value: input.profile
1029
- }, errorFactory)) && ("string" === typeof input.profile || (Array.isArray(input.profile) && input.profile.every((elem, _index1) => (null !== elem || $guard(_exceptionable, {
1030
- path: _path + ".profile[" + _index1 + "]",
1031
- expected: "(RenderProfileObject | string)",
1032
- value: elem
1033
- }, errorFactory)) && (undefined !== elem || $guard(_exceptionable, {
1034
- path: _path + ".profile[" + _index1 + "]",
1035
- expected: "(RenderProfileObject | string)",
1036
- value: elem
1037
- }, errorFactory)) && ("string" === typeof elem || ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
1038
- path: _path + ".profile[" + _index1 + "]",
1039
- expected: "(RenderProfileObject | string)",
1040
- value: elem
1041
- }, errorFactory)) && $ao1(elem, _path + ".profile[" + _index1 + "]", true && _exceptionable) || $guard(_exceptionable, {
1042
- path: _path + ".profile[" + _index1 + "]",
1043
- expected: "(RenderProfileObject | string)",
1044
- value: elem
1045
- }, errorFactory))) || "object" === typeof input.profile && null !== input.profile && $ao1(input.profile, _path + ".profile", true && _exceptionable) || $guard(_exceptionable, {
1046
- path: _path + ".profile",
1047
- expected: "(Array<string | RenderProfileObject> | RenderProfileObject | string)",
1048
- value: input.profile
1049
- }, errorFactory)) || $guard(_exceptionable, {
1050
- path: _path + ".profile",
1051
- expected: "(Array<string | RenderProfileObject> | RenderProfileObject | string)",
1052
- value: input.profile
1053
- }, errorFactory)));
1054
- const $ao1 = (input, _path, _exceptionable = true) => ("string" === typeof input.format || $guard(_exceptionable, {
1055
- path: _path + ".format",
1056
- expected: "string",
1057
- value: input.format
1058
- }, errorFactory)) && (undefined === input.transcribe || ("object" === typeof input.transcribe && null !== input.transcribe || $guard(_exceptionable, {
1059
- path: _path + ".transcribe",
1060
- expected: "(__type | undefined)",
1061
- value: input.transcribe
1062
- }, errorFactory)) && $ao2(input.transcribe, _path + ".transcribe", true && _exceptionable) || $guard(_exceptionable, {
1063
- path: _path + ".transcribe",
1064
- expected: "(__type | undefined)",
1065
- value: input.transcribe
1066
- }, errorFactory)) && (undefined === input.translate || ("object" === typeof input.translate && null !== input.translate || $guard(_exceptionable, {
1067
- path: _path + ".translate",
1068
- expected: "(__type.o1 | undefined)",
1069
- value: input.translate
1070
- }, errorFactory)) && $ao3(input.translate, _path + ".translate", true && _exceptionable) || $guard(_exceptionable, {
1071
- path: _path + ".translate",
1072
- expected: "(__type.o1 | undefined)",
1073
- value: input.translate
1074
- }, errorFactory)) && (undefined === input.audio || ("object" === typeof input.audio && null !== input.audio && false === Array.isArray(input.audio) || $guard(_exceptionable, {
1075
- path: _path + ".audio",
1076
- expected: "(__type.o2 | undefined)",
1077
- value: input.audio
1078
- }, errorFactory)) && $ao4(input.audio, _path + ".audio", true && _exceptionable) || $guard(_exceptionable, {
1079
- path: _path + ".audio",
1080
- expected: "(__type.o2 | undefined)",
1081
- value: input.audio
1082
- }, errorFactory)) && true && (undefined === input.pick || (Array.isArray(input.pick) || $guard(_exceptionable, {
1083
- path: _path + ".pick",
1084
- expected: "(Array<string> | undefined)",
1085
- value: input.pick
1086
- }, errorFactory)) && input.pick.every((elem, _index2) => "string" === typeof elem || $guard(_exceptionable, {
1087
- path: _path + ".pick[" + _index2 + "]",
1088
- expected: "string",
1089
- value: elem
1090
- }, errorFactory)) || $guard(_exceptionable, {
1091
- path: _path + ".pick",
1092
- expected: "(Array<string> | undefined)",
1093
- value: input.pick
1094
- }, errorFactory)) && ((null !== input.subtitle || $guard(_exceptionable, {
1095
- path: _path + ".subtitle",
1096
- expected: "(SubtitleProfile | string | undefined)",
1097
- value: input.subtitle
1098
- }, errorFactory)) && (undefined === input.subtitle || "string" === typeof input.subtitle || ("object" === typeof input.subtitle && null !== input.subtitle && false === Array.isArray(input.subtitle) || $guard(_exceptionable, {
1099
- path: _path + ".subtitle",
1100
- expected: "(SubtitleProfile | string | undefined)",
1101
- value: input.subtitle
1102
- }, errorFactory)) && $ao5(input.subtitle, _path + ".subtitle", true && _exceptionable) || $guard(_exceptionable, {
1103
- path: _path + ".subtitle",
1104
- expected: "(SubtitleProfile | string | undefined)",
1105
- value: input.subtitle
1106
- }, errorFactory)));
1107
- const $ao2 = (input, _path, _exceptionable = true) => "string" === typeof input.engine || $guard(_exceptionable, {
1108
- path: _path + ".engine",
1109
- expected: "string",
1110
- value: input.engine
1111
- }, errorFactory);
1112
- const $ao3 = (input, _path, _exceptionable = true) => "string" === typeof input.language || $guard(_exceptionable, {
1113
- path: _path + ".language",
1114
- expected: "string",
1115
- value: input.language
1116
- }, errorFactory);
1117
- const $ao4 = (input, _path, _exceptionable = true) => undefined === input.pan || "string" === typeof input.pan || $guard(_exceptionable, {
1118
- path: _path + ".pan",
1119
- expected: "(string | undefined)",
1120
- value: input.pan
1121
- }, errorFactory);
1122
- const $ao5 = (input, _path, _exceptionable = true) => (undefined === input.lang || "string" === typeof input.lang || $guard(_exceptionable, {
1123
- path: _path + ".lang",
1124
- expected: "(string | undefined)",
1125
- value: input.lang
1126
- }, errorFactory)) && (undefined === input.style || "string" === typeof input.style || $guard(_exceptionable, {
1127
- path: _path + ".style",
1128
- expected: "(string | undefined)",
1129
- value: input.style
1130
- }, errorFactory));
1131
- return (null !== input || $guard(true, {
1132
- path: _path + "",
1133
- expected: "(RenderPresetObject | string)",
1134
- value: input
1135
- }, errorFactory)) && (undefined !== input || $guard(true, {
1136
- path: _path + "",
1137
- expected: "(RenderPresetObject | string)",
1138
- value: input
1139
- }, errorFactory)) && ("string" === typeof input || ("object" === typeof input && null !== input || $guard(true, {
1140
- path: _path + "",
1141
- expected: "(RenderPresetObject | string)",
1142
- value: input
1143
- }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
1144
- path: _path + "",
1145
- expected: "(RenderPresetObject | string)",
1146
- value: input
1147
- }, errorFactory));
1148
- })(input, "$input", true);
1149
- return input;
1150
- }; const stringify = input => {
1151
- const $io1 = input => "string" === typeof input.format && (undefined === input.transcribe || "object" === typeof input.transcribe && null !== input.transcribe && $io2(input.transcribe)) && (undefined === input.translate || "object" === typeof input.translate && null !== input.translate && $io3(input.translate)) && (undefined === input.audio || "object" === typeof input.audio && null !== input.audio && false === Array.isArray(input.audio) && $io4(input.audio)) && true && (undefined === input.pick || Array.isArray(input.pick) && input.pick.every(elem => "string" === typeof elem)) && (null !== input.subtitle && (undefined === input.subtitle || "string" === typeof input.subtitle || "object" === typeof input.subtitle && null !== input.subtitle && false === Array.isArray(input.subtitle) && $io5(input.subtitle)));
1152
- const $io2 = input => "string" === typeof input.engine;
1153
- const $io3 = input => "string" === typeof input.language;
1154
- const $io4 = input => undefined === input.pan || "string" === typeof input.pan;
1155
- const $io5 = input => (undefined === input.lang || "string" === typeof input.lang) && (undefined === input.style || "string" === typeof input.style);
1156
- const $string = __typia.json.createAssertStringify.string;
1157
- const $throws = __typia.json.createAssertStringify.throws;
1158
- const $tail = __typia.json.createAssertStringify.tail;
1159
- const $so0 = input => `{"type":${$string(input.type)},"profile":${(() => {
1160
- if ("string" === typeof input.profile)
1161
- return $string(input.profile);
1162
- if (Array.isArray(input.profile))
1163
- return `[${input.profile.map(elem => (() => {
1164
- if ("string" === typeof elem)
1165
- return $string(elem);
1166
- if ("object" === typeof elem && null !== elem)
1167
- return $so1(elem);
1168
- $throws({
1169
- expected: "(RenderProfileObject | string)",
1170
- value: elem
1171
- });
1172
- })()).join(",")}]`;
1173
- if ("object" === typeof input.profile && null !== input.profile)
1174
- return $so1(input.profile);
1175
- $throws({
1176
- expected: "(Array<string | RenderProfileObject> | RenderProfileObject | string)",
1177
- value: input.profile
1178
- });
1179
- })()}}`;
1180
- const $so1 = input => `{${undefined === input.transcribe ? "" : `"transcribe":${undefined !== input.transcribe ? `{"engine":${$string(input.transcribe.engine)}}` : undefined},`}${undefined === input.translate ? "" : `"translate":${undefined !== input.translate ? `{"language":${$string(input.translate.language)}}` : undefined},`}${undefined === input.audio ? "" : `"audio":${undefined !== input.audio ? $so4(input.audio) : undefined},`}${undefined === input.video || "function" === typeof input.video ? "" : `"video":${undefined !== input.video ? JSON.stringify(input.video) : undefined},`}${undefined === input.pick ? "" : `"pick":${undefined !== input.pick ? `[${input.pick.map(elem => $string(elem)).join(",")}]` : undefined},`}${undefined === input.subtitle ? "" : `"subtitle":${undefined !== input.subtitle ? (() => {
1181
- if ("string" === typeof input.subtitle)
1182
- return $string(input.subtitle);
1183
- if ("object" === typeof input.subtitle && null !== input.subtitle && false === Array.isArray(input.subtitle))
1184
- return $so5(input.subtitle);
1185
- $throws({
1186
- expected: "(SubtitleProfile | string | undefined)",
1187
- value: input.subtitle
1188
- });
1189
- })() : undefined},`}"format":${$string(input.format)}}`;
1190
- const $so4 = input => `{${$tail(`${undefined === input.pan ? "" : `"pan":${undefined !== input.pan ? $string(input.pan) : undefined}`}`)}}`;
1191
- const $so5 = input => `{${$tail(`${undefined === input.lang ? "" : `"lang":${undefined !== input.lang ? $string(input.lang) : undefined},`}${undefined === input.style ? "" : `"style":${undefined !== input.style ? $string(input.style) : undefined}`}`)}}`;
1192
- return (() => {
1193
- if ("string" === typeof input)
1194
- return $string(input);
1195
- if ("object" === typeof input && null !== input)
1196
- return $so0(input);
1197
- $throws({
1198
- expected: "(RenderPresetObject | string)",
1199
- value: input
1200
- });
1201
- })();
1202
- }; return stringify(assert(input, errorFactory)); };
1
+ export {};