@flock/wirespec 0.20.0-RC.8 → 0.20.2

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 (51) hide show
  1. package/arrow-arrow-atomic.mjs +12 -12
  2. package/arrow-arrow-core.mjs +163 -163
  3. package/clikt-clikt-mordant.mjs +80 -80
  4. package/clikt-clikt-mordant.mjs.map +1 -1
  5. package/clikt-clikt.mjs +1575 -1575
  6. package/clikt-clikt.mjs.map +1 -1
  7. package/colormath-root-colormath.mjs +444 -444
  8. package/kotlin-kotlin-stdlib.mjs +2001 -1948
  9. package/kotlin-kotlin-stdlib.mjs.map +1 -1
  10. package/kotlin-openapi-bindings.mjs +10254 -10254
  11. package/kotlin-rgxgen.mjs +1815 -1815
  12. package/kotlinx-io-kotlinx-io-core.mjs +440 -440
  13. package/kotlinx-serialization-kotlinx-serialization-core.mjs +1890 -1890
  14. package/kotlinx-serialization-kotlinx-serialization-json.mjs +1576 -1576
  15. package/mordant-mordant.mjs +1362 -1362
  16. package/package.json +2 -2
  17. package/wirespec-src-compiler-core.mjs +1768 -2207
  18. package/wirespec-src-compiler-core.mjs.map +1 -1
  19. package/wirespec-src-compiler-emitters-java.mjs +384 -1254
  20. package/wirespec-src-compiler-emitters-java.mjs.map +1 -1
  21. package/wirespec-src-compiler-emitters-kotlin.mjs +366 -1065
  22. package/wirespec-src-compiler-emitters-kotlin.mjs.map +1 -1
  23. package/wirespec-src-compiler-emitters-python.mjs +400 -1422
  24. package/wirespec-src-compiler-emitters-python.mjs.map +1 -1
  25. package/wirespec-src-compiler-emitters-rust.mjs +424 -422
  26. package/wirespec-src-compiler-emitters-rust.mjs.map +1 -1
  27. package/wirespec-src-compiler-emitters-scala.mjs +214 -189
  28. package/wirespec-src-compiler-emitters-scala.mjs.map +1 -1
  29. package/wirespec-src-compiler-emitters-typescript.mjs +529 -1409
  30. package/wirespec-src-compiler-emitters-typescript.mjs.map +1 -1
  31. package/wirespec-src-compiler-emitters-wirespec.mjs +92 -86
  32. package/wirespec-src-compiler-emitters-wirespec.mjs.map +1 -1
  33. package/wirespec-src-compiler-ir.mjs +4476 -4329
  34. package/wirespec-src-compiler-ir.mjs.map +1 -1
  35. package/wirespec-src-compiler-lib.mjs +250 -1120
  36. package/wirespec-src-compiler-lib.mjs.map +1 -1
  37. package/wirespec-src-converter-avro.mjs +512 -512
  38. package/wirespec-src-converter-avro.mjs.map +1 -1
  39. package/wirespec-src-converter-openapi.mjs +756 -756
  40. package/wirespec-src-converter-openapi.mjs.map +1 -1
  41. package/wirespec-src-ide-lsp.mjs +1408 -1393
  42. package/wirespec-src-ide-lsp.mjs.map +1 -1
  43. package/wirespec-src-plugin-arguments.mjs +185 -245
  44. package/wirespec-src-plugin-arguments.mjs.map +1 -1
  45. package/wirespec-src-plugin-cli.mjs +102 -128
  46. package/wirespec-src-plugin-cli.mjs.map +1 -1
  47. package/wirespec-src-plugin-npm.d.mts +0 -104
  48. package/wirespec-src-plugin-npm.mjs +40 -40
  49. package/wirespec-src-plugin-npm.mjs.map +1 -1
  50. package/wirespec-src-tools-generator.mjs +34 -34
  51. package/wirespec-src-tools-generator.mjs.map +1 -1
@@ -1,125 +1,63 @@
1
1
  import {
2
- importReferencesy4xv7r53sjjs as importReferences,
3
- LanguageEmitterxhzgykhux3qm as LanguageEmitter,
4
- Companion_instance1a2xqc448tlhh as Companion_instance,
5
- Companion_instance2ryk3262e300f as Companion_instance_0,
6
- FileExtension_Kotlin_getInstanceiz8k5f00lst9 as FileExtension_Kotlin_getInstance,
7
- Emitted12h24rpo4uifw as Emitted,
8
- plus3lrm73de10b42 as plus,
9
- Companion_instancebcq57hoyp8c2 as Companion_instance_1,
10
- get_pathParamsf41cxx5qebxt as get_pathParams,
11
- orNull2zq556ke3x99j as orNull,
12
- Spacer_instance1p6915grp4mfk as Spacer_instance,
13
- get_indexedPathParams2pzt0qs62068 as get_indexedPathParams,
14
- removeQuestionMark174e2l0zlwrek as removeQuestionMark,
15
- emit2koty5c8abmj3 as emit,
16
- concatGenerics2esceo9p1a45k as concatGenerics,
17
- Paramvfwnys2w6aj1 as Param,
18
- Literal331hu9r04vptz as Literal,
19
- distinctByStatus134zrt4nyr6p2 as distinctByStatus,
20
- fixStatus2l9jrn3538wpy as fixStatus,
21
- spacer28p2fwyb64afn as spacer,
22
- FieldIdentifier34k7iphndcnl0 as FieldIdentifier,
23
- DefinitionIdentifiervfasqdb33qef as DefinitionIdentifier,
24
- addBackticks1di5q03fw4yhx as addBackticks,
25
- Unionccsavx6nrdr2 as Union,
26
- Refined1lkzc0dg6wey7 as Refined,
27
- Enum3l2iuc342kle6 as Enum,
28
- Type12n1gx16iqtcu as Type,
29
- plus14o24vdaiongg as plus_0,
30
- Bytes_instance1o9u095wd3kx6 as Bytes_instance,
31
- Boolean_instance237vwt01w3hs8 as Boolean_instance,
32
- RegExpiyof7szm5zfu as RegExp_0,
33
- String1czvr8pxnm6on as String_0,
34
- Number1mui0heypwdhp as Number_0,
35
- Integer39lqx4uc63u28 as Integer,
36
- Bytes3eoc50vgt1uem as Bytes,
37
- Boolean1fpfi8m5jt3fg as Boolean_0,
38
- Primitive1i8my14jkp3nk as Primitive,
39
- Custom1lu6o8txpimqz as Custom,
40
- Anyv7qdq63z63rc as Any,
41
- Unit2z95clvxm08vr as Unit,
42
- Iterable29qbzfup67wqp as Iterable,
43
- Dict3g7w5wia7rncj as Dict,
44
- Bound2mp7s0560derz as Bound,
45
- TypeDefinitionEmitter18est4d94fpw8 as TypeDefinitionEmitter,
46
- } from './wirespec-src-compiler-core.mjs';
47
- import {
2
+ KProperty1ca4yb4wlo496 as KProperty1,
3
+ getPropertyCallableRef3hckxc0xueiaj as getPropertyCallableRef,
4
+ Unit_instance28fytmsmm6r23 as Unit_instance,
5
+ THROW_CCE2g6jy02ryeudk as THROW_CCE,
6
+ isInterface3d6p8outrmvmk as isInterface,
7
+ split2bvyvnrlcifjv as split,
48
8
  collectionSizeOrDefault36dulx8yinfqm as collectionSizeOrDefault,
49
9
  ArrayList_init_$Create$3ivpeip4ouddx as ArrayList_init_$Create$,
50
- Unit_instance28fytmsmm6r23 as Unit_instance,
51
- VOID3gxj6tk5isa35 as VOID,
10
+ checkIndexOverflow3frtmheghr0th as checkIndexOverflow,
52
11
  joinToString1cxrrlmo0chqs as joinToString,
53
- THROW_CCE2g6jy02ryeudk as THROW_CCE,
54
- isCharSequence1ju9jr1w86plq as isCharSequence,
55
- trimStart5ewg8zf6cs5u as trimStart,
56
- toString1pkumu07cwy4m as toString,
57
- trimMarginhyd3fsmh8iev as trimMargin,
58
- protoOf180f3jzyo7rfj as protoOf,
59
- initMetadataForInterface1egvbzx539z91 as initMetadataForInterface,
60
- initMetadataForClassbxx6q50dy2s7 as initMetadataForClass,
61
- charCodeAt1yspne1d8erbm as charCodeAt,
62
- Char19o2r8palgjof as Char,
63
- distinct10qe1scfdvu5k as distinct,
64
- listOfNotNull2woi2boe01ub4 as listOfNotNull,
65
- isBlank1dvkhjjvox3p0 as isBlank,
12
+ StringBuilder_init_$Create$322n630qt3r8c as StringBuilder_init_$Create$,
66
13
  charSequenceLength3278n89t01tmv as charSequenceLength,
67
- toString3dhdjl9yf50de as toString_0,
68
- noWhenBranchMatchedException2a6r7ubxgky5j as noWhenBranchMatchedException,
69
- first58ocm7j58k3q as first,
70
- ArrayList_init_$Create$1jemgvhi5v0js as ArrayList_init_$Create$_0,
71
- substring3saq8ornu0luv as substring,
72
- startsWith26w8qjqapeeq6 as startsWith,
73
- split2bvyvnrlcifjv as split,
74
- setOf45ia9pnfhe90 as setOf,
75
- initMetadataForCompanion1wyw17z38v6ac as initMetadataForCompanion,
14
+ charSequenceGet1vxk1y5n17t1z as charSequenceGet,
76
15
  isLetterOrDigit2kuxd9e198haf as isLetterOrDigit,
77
16
  _Char___init__impl__6a9atx1csff5kwtduxl as _Char___init__impl__6a9atx,
78
- listOfvhqybd2zx248 as listOf,
79
- checkIndexOverflow3frtmheghr0th as checkIndexOverflow,
80
- asSequence3lsvgkvyzox0q as asSequence,
81
- filter184huxd00uyfg as filter,
82
- joinToStringooja5rkatz3u as joinToString_0,
83
17
  firstOrNulltrxqttxfxqju as firstOrNull,
84
18
  isDigit3mimrri4wkzop as isDigit,
85
- KProperty1ca4yb4wlo496 as KProperty1,
86
- getPropertyCallableRef3hckxc0xueiaj as getPropertyCallableRef,
87
- StringBuilder_init_$Create$322n630qt3r8c as StringBuilder_init_$Create$,
88
- charSequenceGet1vxk1y5n17t1z as charSequenceGet,
89
- first3kg261hmihapu as first_0,
19
+ Char19o2r8palgjof as Char,
20
+ first3kg261hmihapu as first,
90
21
  isLettere1qnx5bysxbd as isLetter,
22
+ protoOf180f3jzyo7rfj as protoOf,
23
+ initMetadataForCompanion1wyw17z38v6ac as initMetadataForCompanion,
24
+ listOfvhqybd2zx248 as listOf,
91
25
  to2cs3ny02qtbcb as to,
92
26
  toMap1vec9topfei08 as toMap,
93
27
  emptyList1g2z5xcrvp2zy as emptyList,
28
+ VOID3gxj6tk5isa35 as VOID,
29
+ ArrayList_init_$Create$1jemgvhi5v0js as ArrayList_init_$Create$_0,
94
30
  Paire9pteg33gng7 as Pair,
95
- plus20p0vtfmu0596 as plus_1,
96
- plus310ted5e4i90h as plus_2,
31
+ plus20p0vtfmu0596 as plus,
32
+ plus310ted5e4i90h as plus_0,
33
+ startsWith26w8qjqapeeq6 as startsWith,
97
34
  substringBefore3n7kj60w69hju as substringBefore,
98
35
  listOf1jh22dvmctj1r as listOf_0,
99
36
  lazy2hsh8ze7j6ikd as lazy,
100
- isInterface3d6p8outrmvmk as isInterface,
101
- asSequence2phdjljfh9jhx as asSequence_0,
37
+ asSequence2phdjljfh9jhx as asSequence,
102
38
  filterNot56uwv8hfomaa as filterNot,
103
39
  mapsbvh18eqox7a as map,
104
- distinct17vua5ffe1cfv as distinct_0,
40
+ distinct17vua5ffe1cfv as distinct,
105
41
  toListx6x8nvfmvvht as toList,
106
42
  firstOrNull1982767dljvdy as firstOrNull_0,
107
- listOfNotNull1v4ggfackvuny as listOfNotNull_0,
43
+ listOfNotNull1v4ggfackvuny as listOfNotNull,
108
44
  ensureNotNull1e947j3ixpazm as ensureNotNull,
109
45
  addAll1k27qatfgp3k5 as addAll,
110
46
  HashSet_init_$Create$33p49hmosnvr4 as HashSet_init_$Create$,
111
- equals2au1ep9vhcato as equals,
112
- initMetadataForObject1cxne3s9w65el as initMetadataForObject,
113
- dropLastlqc2oyv04br0 as dropLast,
47
+ initMetadataForClassbxx6q50dy2s7 as initMetadataForClass,
48
+ trimMarginhyd3fsmh8iev as trimMargin,
49
+ noWhenBranchMatchedException2a6r7ubxgky5j as noWhenBranchMatchedException,
114
50
  } from './kotlin-kotlin-stdlib.mjs';
115
51
  import {
116
- NonEmptyList3ak25ihy2gcvs as NonEmptyList,
117
- NonEmptyList__plus_impl_xqmb92tle8a7jcf2wm as NonEmptyList__plus_impl_xqmb9,
118
- } from './arrow-arrow-core.mjs';
119
- import {
52
+ TransformScopeyrd3lf4zrk76 as TransformScope,
53
+ TransformerBuildera6a1gvlhjj9b as TransformerBuilder,
54
+ transform3eti8i2bqvifx as transform,
55
+ Elementitq62jg6fid3 as Element,
56
+ KotlinGenerator_getInstancefvxn1omjreod as KotlinGenerator_getInstance,
120
57
  Nameoqr8dt2fim9d as Name,
121
58
  FunctionCall30872kpnbr7op as FunctionCall,
122
59
  transformChildren2mszeagj5nq4c as transformChildren,
60
+ VariableReference2vlynnhaw1i64 as VariableReference,
123
61
  sanitizeFieldName1ptgy1kxy8u2m as sanitizeFieldName,
124
62
  ConstructorStatement1x4n4sr59iy4n as ConstructorStatement,
125
63
  SanitizationConfig11mmn3p2c03c1 as SanitizationConfig,
@@ -128,16 +66,17 @@ import {
128
66
  File3dimy4iqmuock as File,
129
67
  transformChildrend9p91tpcqdkx as transformChildren_0,
130
68
  Companion_getInstance3gvtuyxc9uhxj as Companion_getInstance,
131
- withElements2toq84v08e72 as withElements,
69
+ Mainb4yvz4x0nrxd as Main,
70
+ Enumlszg09mwd24f as Enum,
71
+ Interface3pn84xq686t2r as Interface,
132
72
  Namespace345pal554qu3j as Namespace,
133
- KotlinGenerator_instance3iknxuxfla2k5 as KotlinGenerator_instance,
134
- convertClientServer1w4pgeabrnbb9 as convertClientServer,
73
+ Struct39wf79cwtn4ty as Struct,
74
+ Visibility_PUBLIC_getInstancezzqdnyfgtpc3 as Visibility_PUBLIC_getInstance,
75
+ Function21cuq8qizkin7 as Function,
76
+ Union38f3pecvfcpxh as Union,
77
+ convertClientServer1346neky3bhls as convertClientServer,
135
78
  convertnty9x0e63d0u as convert,
136
- TransformScopeyrd3lf4zrk76 as TransformScope,
137
- TransformerBuildera6a1gvlhjj9b as TransformerBuilder,
138
- transform3eti8i2bqvifx as transform,
139
- Elementitq62jg6fid3 as Element,
140
- emitn3eihixilqyh as emit_0,
79
+ emitn3eihixilqyh as emit,
141
80
  prependImports32gcj3yb8voha as prependImports,
142
81
  placeInPackage1ffljbk9me4ug as placeInPackage,
143
82
  convertToGenerator2wzjrmaavxhph as convertToGenerator,
@@ -153,793 +92,73 @@ import {
153
92
  injectEnumLabelFieldyfohidz6c88i as injectEnumLabelField,
154
93
  convert37aabdzvtv9vg as convert_1,
155
94
  convert17zcptkz4mhr4 as convert_2,
156
- Struct39wf79cwtn4ty as Struct,
157
95
  markMembersAsOverride3r1zpft8nbmxg as markMembersAsOverride,
158
96
  convert32tuiui3czihh as convert_3,
159
97
  convert1cn4bolzoed8c as convert_4,
160
98
  emitEndpointClient1meajc90wf3el as emitEndpointClient,
161
99
  emitClient32kfwzg2hm5vj as emitClient,
162
100
  get_extensions31c4or738wbxz as get_extensions,
163
- emit1oxjujel6f3jb as emit_1,
164
- emit3bzdcd0f6nwtj as emit_2,
101
+ emit1oxjujel6f3jb as emit_0,
102
+ emit3bzdcd0f6nwtj as emit_1,
165
103
  beforeGenerate3o8idb3hey1b0 as beforeGenerate,
166
104
  IrEmitterh2m93ojzvkep as IrEmitter,
167
105
  rawttvqxl50flj9 as raw,
168
- Interface3pn84xq686t2r as Interface,
169
106
  } from './wirespec-src-compiler-ir.mjs';
107
+ import {
108
+ Companion_instancebcq57hoyp8c2 as Companion_instance,
109
+ FieldIdentifier34k7iphndcnl0 as FieldIdentifier,
110
+ addBackticks1di5q03fw4yhx as addBackticks,
111
+ Companion_instance1a2xqc448tlhh as Companion_instance_0,
112
+ Companion_instance2ryk3262e300f as Companion_instance_1,
113
+ FileExtension_Kotlin_getInstanceiz8k5f00lst9 as FileExtension_Kotlin_getInstance,
114
+ Unionccsavx6nrdr2 as Union_0,
115
+ Refined1lkzc0dg6wey7 as Refined,
116
+ Enum3l2iuc342kle6 as Enum_0,
117
+ Type12n1gx16iqtcu as Type,
118
+ plus14o24vdaiongg as plus_1,
119
+ importReferencesy4xv7r53sjjs as importReferences,
120
+ Paramvfwnys2w6aj1 as Param,
121
+ Literal331hu9r04vptz as Literal,
122
+ } from './wirespec-src-compiler-core.mjs';
170
123
  //region block: imports
171
124
  //endregion
172
125
  //region block: pre-declaration
173
- function emit_3(identifier) {
174
- var tmp;
175
- if (identifier instanceof DefinitionIdentifier) {
176
- tmp = this.x1x(identifier);
177
- } else {
178
- if (identifier instanceof FieldIdentifier) {
179
- tmp = this.n1x(this.x1x(identifier));
180
- } else {
181
- noWhenBranchMatchedException();
182
- }
183
- }
184
- return tmp;
185
- }
186
- function sanitize(_this__u8e3s4) {
187
- // Inline function 'kotlin.collections.mapIndexed' call
188
- var this_0 = split(_this__u8e3s4.l1(), ['.', ' ']);
189
- // Inline function 'kotlin.collections.mapIndexedTo' call
190
- var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
191
- var index = 0;
192
- var _iterator__ex2g4s = this_0.t();
193
- while (_iterator__ex2g4s.u()) {
194
- var item = _iterator__ex2g4s.v();
195
- var _unary__edvuaz = index;
196
- index = _unary__edvuaz + 1 | 0;
197
- var tmp$ret$0 = checkIndexOverflow(_unary__edvuaz) > 0 ? Companion_instance_1.fr(item) : item;
198
- destination.x(tmp$ret$0);
199
- }
200
- var tmp = asSequence(joinToString(destination, ''));
201
- return this.m1x(joinToString_0(filter(tmp, KotlinIdentifierEmitter$sanitize$lambda), ''));
202
- }
203
- function sanitizeFirstIsDigit(_this__u8e3s4) {
204
- var tmp;
205
- var tmp0_safe_receiver = firstOrNull(_this__u8e3s4);
206
- var tmp_0;
207
- var tmp_1 = tmp0_safe_receiver;
208
- if ((tmp_1 == null ? null : new Char(tmp_1)) == null) {
209
- tmp_0 = null;
210
- } else {
211
- tmp_0 = isDigit(tmp0_safe_receiver);
212
- }
213
- if (tmp_0 === true) {
214
- tmp = '_' + _this__u8e3s4;
215
- } else {
216
- tmp = _this__u8e3s4;
217
- }
218
- return tmp;
219
- }
220
- function sanitizeKeywords(_this__u8e3s4) {
221
- return Companion_getInstance_0().k1y_1.u1(_this__u8e3s4) ? addBackticks(_this__u8e3s4) : _this__u8e3s4;
222
- }
223
- initMetadataForInterface(KotlinIdentifierEmitter, 'KotlinIdentifierEmitter');
224
- function emit_4(type, module_0) {
225
- var tmp;
226
- if (type.np_1.jp_1.r()) {
227
- tmp = 'data object ' + this.or(type.mp_1);
228
- } else {
229
- var tmp_0 = this.or(type.mp_1);
230
- var tmp_1 = this.mq(type.np_1);
231
- // Inline function 'kotlin.run' call
232
- var $this$run = type.op_1;
233
- var tmp_2;
234
- if ($this$run.r()) {
235
- tmp_2 = '';
236
- } else {
237
- tmp_2 = ' : ' + joinToString($this$run, ', ', VOID, VOID, VOID, VOID, KotlinTypeDefinitionEmitter$emit$lambda(this));
238
- }
239
- var tmp$ret$1 = tmp_2;
240
- tmp = trimMargin('\n |data class ' + tmp_0 + '(\n |' + tmp_1 + '\n |)' + tmp$ret$1 + '\n |\n ');
241
- }
242
- return tmp;
243
- }
244
- function emit_5(_this__u8e3s4) {
245
- return dropLast(joinToString(_this__u8e3s4.jp_1, '\n', VOID, VOID, VOID, VOID, KotlinTypeDefinitionEmitter$emit$lambda_0(this)), 1);
246
- }
247
- function emit_6(_this__u8e3s4) {
248
- return this.or(_this__u8e3s4.rp_1) + ': ' + this.oq(_this__u8e3s4.sp_1);
249
- }
250
- function emit_7(_this__u8e3s4) {
251
- var tmp;
252
- if (_this__u8e3s4 instanceof Dict) {
253
- tmp = 'Map<String, ' + this.oq(_this__u8e3s4.so_1) + '>';
254
- } else {
255
- if (_this__u8e3s4 instanceof Iterable) {
256
- tmp = 'List<' + this.oq(_this__u8e3s4.po_1) + '>';
257
- } else {
258
- if (_this__u8e3s4 instanceof Unit) {
259
- tmp = 'Unit';
260
- } else {
261
- if (_this__u8e3s4 instanceof Any) {
262
- tmp = 'Any';
263
- } else {
264
- if (_this__u8e3s4 instanceof Custom) {
265
- tmp = _this__u8e3s4.cv_1;
266
- } else {
267
- if (_this__u8e3s4 instanceof Primitive) {
268
- var t = _this__u8e3s4.gv_1;
269
- var tmp_0;
270
- if (t instanceof String_0) {
271
- tmp_0 = 'String';
272
- } else {
273
- if (t instanceof Integer) {
274
- var tmp_1;
275
- switch (t.ku_1.b3_1) {
276
- case 0:
277
- tmp_1 = 'Int';
278
- break;
279
- case 1:
280
- tmp_1 = 'Long';
281
- break;
282
- default:
283
- noWhenBranchMatchedException();
284
- break;
285
- }
286
- tmp_0 = tmp_1;
287
- } else {
288
- if (t instanceof Number_0) {
289
- var tmp_2;
290
- switch (t.nu_1.b3_1) {
291
- case 0:
292
- tmp_2 = 'Float';
293
- break;
294
- case 1:
295
- tmp_2 = 'Double';
296
- break;
297
- default:
298
- noWhenBranchMatchedException();
299
- break;
300
- }
301
- tmp_0 = tmp_2;
302
- } else {
303
- if (t instanceof Boolean_0) {
304
- tmp_0 = 'Boolean';
305
- } else {
306
- if (t instanceof Bytes) {
307
- tmp_0 = 'ByteArray';
308
- } else {
309
- noWhenBranchMatchedException();
310
- }
311
- }
312
- }
313
- }
314
- }
315
- tmp = tmp_0;
316
- } else {
317
- noWhenBranchMatchedException();
318
- }
319
- }
320
- }
321
- }
322
- }
323
- }
324
- // Inline function 'kotlin.let' call
325
- var it = tmp;
326
- return _this__u8e3s4.uu() ? it + '?' : it;
327
- }
328
- function emit_8(_this__u8e3s4) {
329
- var tmp;
330
- if (_this__u8e3s4 instanceof RegExp_0) {
331
- tmp = 'Regex("""' + this.qq(_this__u8e3s4.qt_1) + '""").matches(value)';
332
- } else {
333
- if (_this__u8e3s4 instanceof Bound) {
334
- var tmp1_safe_receiver = _this__u8e3s4.gu_1;
335
- var tmp_0;
336
- if (tmp1_safe_receiver == null) {
337
- tmp_0 = null;
338
- } else {
339
- // Inline function 'kotlin.let' call
340
- tmp_0 = tmp1_safe_receiver + ' < value';
341
- }
342
- var minCheck = tmp_0;
343
- var tmp2_safe_receiver = _this__u8e3s4.hu_1;
344
- var tmp_1;
345
- if (tmp2_safe_receiver == null) {
346
- tmp_1 = null;
347
- } else {
348
- // Inline function 'kotlin.let' call
349
- tmp_1 = 'value < ' + tmp2_safe_receiver;
350
- }
351
- var maxCheck = tmp_1;
352
- // Inline function 'kotlin.let' call
353
- // Inline function 'kotlin.text.ifEmpty' call
354
- var this_0 = joinToString(listOfNotNull([minCheck, maxCheck]), ' && ');
355
- var tmp_2;
356
- // Inline function 'kotlin.text.isEmpty' call
357
- if (charSequenceLength(this_0) === 0) {
358
- tmp_2 = 'true';
359
- } else {
360
- tmp_2 = this_0;
361
- }
362
- tmp = tmp_2;
363
- } else {
364
- noWhenBranchMatchedException();
365
- }
366
- }
367
- return tmp;
368
- }
369
- initMetadataForInterface(KotlinTypeDefinitionEmitter, 'KotlinTypeDefinitionEmitter', VOID, VOID, [TypeDefinitionEmitter, KotlinIdentifierEmitter]);
370
- function emit_9(channel) {
371
- return trimMargin('\n |' + emitImports(this, channel) + '\n |\n |fun interface ' + this.or(channel.dp_1) + ' {\n | operator fun invoke(message: ' + this.oq(channel.ep_1) + ')\n |}\n |\n ');
372
- }
373
- initMetadataForInterface(KotlinChannelDefinitionEmitter, 'KotlinChannelDefinitionEmitter', VOID, VOID, [KotlinTypeDefinitionEmitter]);
374
- function emit_10(enum_0, module_0) {
375
- var tmp = this.x1x(enum_0.yr_1);
376
- return trimMargin('\n |enum class ' + tmp + ' (override val label: String): Wirespec.Enum {\n |' + spacer(joinToString(enum_0.zr_1, ',\n', VOID, VOID, VOID, VOID, KotlinEnumDefinitionEmitter$emit$lambda(this))) + ';\n |' + Spacer_instance.toString() + 'override fun toString(): String {\n |' + Spacer_instance.is(2) + 'return label\n |' + Spacer_instance.toString() + '}\n |}\n |\n ');
377
- }
378
- initMetadataForInterface(KotlinEnumDefinitionEmitter, 'KotlinEnumDefinitionEmitter', VOID, VOID, [KotlinIdentifierEmitter]);
379
- function emit_11(union) {
380
- return trimMargin('\n |sealed interface ' + this.or(union.hp_1) + '\n |\n ');
381
- }
382
- initMetadataForInterface(KotlinUnionDefinitionEmitter, 'KotlinUnionDefinitionEmitter', VOID, VOID, [KotlinIdentifierEmitter]);
383
- function emit_12(refined) {
384
- return trimMargin('\n |data class ' + this.x1x(refined.tr_1) + '(override val value: ' + this.oq(refined.ur_1) + '): Wirespec.Refined<' + this.oq(refined.ur_1) + '> {\n |' + Spacer_instance.toString() + 'override fun toString() = value.toString()\n |' + Spacer_instance.toString() + 'override fun validate() = ' + this.cs(refined) + '\n |}\n |\n ');
385
- }
386
- function emitValidator(_this__u8e3s4) {
387
- var defaultReturn = 'true';
388
- var type = _this__u8e3s4.ur_1.gv_1;
389
- var tmp;
390
- if (type instanceof Integer) {
391
- var tmp0_safe_receiver = type.lu_1;
392
- var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : this.pq(tmp0_safe_receiver);
393
- tmp = tmp1_elvis_lhs == null ? defaultReturn : tmp1_elvis_lhs;
394
- } else {
395
- if (type instanceof Number_0) {
396
- var tmp2_safe_receiver = type.ou_1;
397
- var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : this.pq(tmp2_safe_receiver);
398
- tmp = tmp3_elvis_lhs == null ? defaultReturn : tmp3_elvis_lhs;
399
- } else {
400
- if (type instanceof String_0) {
401
- var tmp4_safe_receiver = type.iu_1;
402
- var tmp_0;
403
- var tmp_1 = tmp4_safe_receiver;
404
- if ((tmp_1 == null ? null : new RegExp_0(tmp_1)) == null) {
405
- tmp_0 = null;
406
- } else {
407
- tmp_0 = this.pq(new RegExp_0(tmp4_safe_receiver));
408
- }
409
- var tmp5_elvis_lhs = tmp_0;
410
- tmp = tmp5_elvis_lhs == null ? defaultReturn : tmp5_elvis_lhs;
411
- } else {
412
- if (equals(type, Boolean_instance)) {
413
- tmp = defaultReturn;
414
- } else {
415
- if (equals(type, Bytes_instance)) {
416
- tmp = defaultReturn;
417
- } else {
418
- noWhenBranchMatchedException();
419
- }
420
- }
421
- }
422
- }
423
- }
424
- return tmp;
425
- }
426
- initMetadataForInterface(KotlinRefinedTypeDefinitionEmitter, 'KotlinRefinedTypeDefinitionEmitter', VOID, VOID, [KotlinIdentifierEmitter, KotlinTypeDefinitionEmitter]);
427
- function emit_13(endpoint) {
428
- // Inline function 'kotlin.collections.map' call
429
- var this_0 = importReferences(endpoint);
430
- // Inline function 'kotlin.collections.mapTo' call
431
- var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
432
- var _iterator__ex2g4s = this_0.t();
433
- while (_iterator__ex2g4s.u()) {
434
- var item = _iterator__ex2g4s.v();
435
- var tmp$ret$0 = 'import ' + this.x1w().es_1 + '.model.' + item.cv_1;
436
- destination.x(tmp$ret$0);
437
- }
438
- var tmp = destination;
439
- var tmp_0 = joinToString(tmp, '\n', VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emit$lambda);
440
- var tmp_1 = this.or(endpoint.vp_1);
441
- var tmp_2 = get_pathParams(endpoint);
442
- var tmp_3 = emitObject$default(this, tmp_2, 'Path', 'Wirespec.Path', VOID, KotlinEndpointDefinitionEmitter$emit$lambda_0(this));
443
- var tmp_4 = emitObject$default(this, endpoint.yp_1, 'Queries', 'Wirespec.Queries', VOID, KotlinEndpointDefinitionEmitter$emit$lambda_1(this));
444
- var tmp_5 = emitObject$default(this, endpoint.zp_1, 'Headers', 'Wirespec.Request.Headers', VOID, KotlinEndpointDefinitionEmitter$emit$lambda_2(this));
445
- var tmp_6 = this.k1x(first(endpoint.aq_1), endpoint);
446
- var tmp_7 = Spacer_instance.toString();
447
- var tmp_8 = emitStatusInterfaces(this, endpoint);
448
- var tmp_9 = emitResponseInterfaces(this, endpoint);
449
- var tmp_10 = distinctByStatus(endpoint.bq_1);
450
- var tmp_11 = joinToString(tmp_10, '\n\n', VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emit$lambda_3(this));
451
- var tmp_12 = Spacer_instance.toString();
452
- var tmp_13 = Spacer_instance.is(2);
453
- var tmp_14 = distinctByStatus(endpoint.bq_1);
454
- var tmp_15 = joinToString(tmp_14, '\n', VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emit$lambda_4(this));
455
- var tmp_16 = Spacer_instance.is(2);
456
- var tmp_17 = Spacer_instance.toString();
457
- var tmp_18 = Spacer_instance.is(2);
458
- // Inline function 'kotlin.collections.filter' call
459
- var tmp0 = distinctByStatus(endpoint.bq_1);
460
- // Inline function 'kotlin.collections.filterTo' call
461
- var destination_0 = ArrayList_init_$Create$_0();
462
- var _iterator__ex2g4s_0 = tmp0.t();
463
- while (_iterator__ex2g4s_0.u()) {
464
- var element = _iterator__ex2g4s_0.v();
465
- if (Companion_instance_1.jr(element.hq_1)) {
466
- destination_0.x(element);
467
- }
468
- }
469
- var tmp_19 = destination_0;
470
- var tmp_20 = joinToString(tmp_19, '\n', VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emit$lambda_5(this));
471
- var tmp_21 = Spacer_instance.is(3);
472
- var tmp_22 = Spacer_instance.is(2);
473
- var tmp_23 = Spacer_instance.toString();
474
- var tmp_24 = Spacer_instance.is(2);
475
- var tmp_25 = this.o1x(endpoint);
476
- var tmp_26 = Spacer_instance.is(2);
477
- var tmp_27 = Spacer_instance.is(3);
478
- return trimMargin('\n |' + tmp_0 + '\n |\n |object ' + tmp_1 + ' : Wirespec.Endpoint {\n |' + tmp_3 + '\n |\n |' + tmp_4 + '\n |\n |' + tmp_5 + '\n |\n |' + tmp_6 + '\n |\n |' + tmp_7 + 'sealed interface Response<T: Any> : Wirespec.Response<T>\n |\n |' + tmp_8 + '\n |\n |' + tmp_9 + '\n |\n |' + tmp_11 + '\n |\n |' + tmp_12 + 'fun toResponse(serialization: Wirespec.Serializer, response: Response<*>): Wirespec.RawResponse =\n |' + tmp_13 + 'when(response) {\n |' + tmp_15 + '\n |' + tmp_16 + '}\n |\n |' + tmp_17 + 'fun fromResponse(serialization: Wirespec.Deserializer, response: Wirespec.RawResponse): Response<*> =\n |' + tmp_18 + 'when (response.statusCode) {\n |' + tmp_20 + '\n |' + tmp_21 + 'else -> error("Cannot match response with status: ${response.statusCode}")\n |' + tmp_22 + '}\n |\n |' + tmp_23 + 'interface Handler: Wirespec.Handler {\n |' + tmp_24 + tmp_25 + '\n |' + tmp_26 + 'companion object: Wirespec.Server<Request, Response<*>>, Wirespec.Client<Request, Response<*>> {\n |' + tmp_27 + 'override val pathTemplate = "/' + joinToString(endpoint.xp_1, '/', VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emit$lambda_6) + '"\n |' + Spacer_instance.is(3) + 'override val method = "' + endpoint.wp_1.toString() + '"\n |' + Spacer_instance.is(3) + 'override fun server(serialization: Wirespec.Serialization) = object : Wirespec.ServerEdge<Request, Response<*>> {\n |' + Spacer_instance.is(4) + 'override fun from(request: Wirespec.RawRequest) = fromRequest(serialization, request)\n |' + Spacer_instance.is(4) + 'override fun to(response: Response<*>) = toResponse(serialization, response)\n |' + Spacer_instance.is(3) + '}\n |' + Spacer_instance.is(3) + 'override fun client(serialization: Wirespec.Serialization) = object : Wirespec.ClientEdge<Request, Response<*>> {\n |' + Spacer_instance.is(4) + 'override fun to(request: Request) = toRequest(serialization, request)\n |' + Spacer_instance.is(4) + 'override fun from(response: Wirespec.RawResponse) = fromResponse(serialization, response)\n |' + Spacer_instance.is(3) + '}\n |' + Spacer_instance.is(2) + '}\n |' + Spacer_instance.toString() + '}\n |}\n |\n ');
479
- }
480
- function emitHandleFunction(endpoint) {
481
- return 'suspend fun ' + Companion_instance_1.gr(this.or(endpoint.vp_1)) + '(request: Request): Response<*>';
482
- }
483
- function emit_14(_this__u8e3s4, endpoint) {
484
- var tmp = Spacer_instance.toString();
485
- var tmp_0 = emitConstructor(this, _this__u8e3s4, endpoint);
486
- var tmp_1 = Spacer_instance.is(2);
487
- var tmp_2 = get_pathParams(endpoint);
488
- var tmp_3 = brace(this, joinToString(tmp_2, VOID, VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emit$lambda_7(this)));
489
- var tmp_4 = Spacer_instance.is(2);
490
- var tmp_5 = Spacer_instance.is(2);
491
- var tmp_6 = brace(this, joinToString(endpoint.yp_1, VOID, VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emit$lambda_8(this)));
492
- var tmp_7 = Spacer_instance.is(2);
493
- var tmp_8 = brace(this, joinToString(endpoint.zp_1, VOID, VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emit$lambda_9(this)));
494
- var tmp_9 = _this__u8e3s4.eq_1 == null ? Spacer_instance.is(2) + 'override val body = Unit\n' + Spacer_instance.toString() + '}' : Spacer_instance.toString() + '}';
495
- var tmp_10 = Spacer_instance.toString();
496
- var tmp_11 = Spacer_instance.is(2);
497
- var tmp_12 = Spacer_instance.is(3);
498
- return trimMargin('\n |' + tmp + tmp_0 + '\n |' + tmp_1 + 'override val path = Path' + tmp_3 + '\n |' + tmp_4 + 'override val method = Wirespec.Method.' + endpoint.wp_1.a3_1 + '\n |' + tmp_5 + 'override val queries = Queries' + tmp_6 + '\n |' + tmp_7 + 'override val headers = Headers' + tmp_8 + '\n |' + tmp_9 + '\n |\n |' + tmp_10 + 'fun toRequest(serialization: Wirespec.Serializer, request: Request): Wirespec.RawRequest =\n |' + tmp_11 + 'Wirespec.RawRequest(\n |' + tmp_12 + 'path = listOf(' + joinToString(endpoint.xp_1, VOID, VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emit$lambda_10(this)) + '),\n |' + Spacer_instance.is(3) + 'method = request.method.name,\n |' + Spacer_instance.is(3) + 'queries = ' + this.h1y(endpoint) + ',\n |' + Spacer_instance.is(3) + 'headers = ' + this.g1y(endpoint) + ',\n |' + Spacer_instance.is(3) + 'body = ' + (!(_this__u8e3s4.eq_1 == null) ? 'serialization.serializeBody(request.body, typeOf<' + emit_16(this, _this__u8e3s4.eq_1) + '>())' : 'null') + ',\n |' + Spacer_instance.is(2) + ')\n |\n |' + Spacer_instance.toString() + 'fun fromRequest(serialization: Wirespec.Deserializer, request: Wirespec.RawRequest): Request =\n |' + Spacer_instance.is(2) + 'Request' + emitDeserializedParams(this, _this__u8e3s4, endpoint) + '\n ');
499
- }
500
- function emitRequestHeaders(_this__u8e3s4) {
501
- var tmp;
502
- if (_this__u8e3s4.zp_1.r()) {
503
- tmp = 'emptyMap()';
504
- } else {
505
- var tmp_0 = Spacer_instance.is(5);
506
- var tmp_1 = ',\n' + Spacer_instance.is(5);
507
- tmp = trimMargin('\n |mapOf(\n |' + tmp_0 + joinToString(_this__u8e3s4.zp_1, tmp_1, VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emitRequestHeaders$lambda(this)) + '\n |' + Spacer_instance.is(4) + ')\n ');
508
- }
509
- return tmp;
510
- }
511
- function emitQueries(endpoint) {
512
- var tmp;
513
- // Inline function 'kotlin.collections.isNotEmpty' call
514
- if (!endpoint.yp_1.r()) {
515
- var tmp_0 = Spacer_instance.is(5);
516
- var tmp_1 = ',\n' + Spacer_instance.is(5);
517
- tmp = trimMargin('\n |mapOf(\n |' + tmp_0 + joinToString(endpoint.yp_1, tmp_1, VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emitQueries$lambda(this)) + '\n |' + Spacer_instance.is(4) + ')\n ');
518
- } else {
519
- tmp = 'emptyMap()';
520
- }
521
- return tmp;
522
- }
523
- function emit_15(_this__u8e3s4) {
524
- // Inline function 'kotlin.let' call
525
- var it = joinToString(_this__u8e3s4.iq_1, ', ', VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emit$lambda_11(this));
526
- var responseHeaderFields = isBlank(it) ? '' : ', ' + it;
527
- var tmp = Spacer_instance.toString();
528
- var tmp_0 = emit_16(this, _this__u8e3s4.jq_1);
529
- var tmp_1 = toString_0(charCodeAt(_this__u8e3s4.hq_1, 0));
530
- var tmp_2 = emit_16(this, _this__u8e3s4.jq_1);
531
- var tmp_3 = concatGenerics(emit_16(this, _this__u8e3s4.jq_1));
532
- var tmp_4 = Spacer_instance.is(2);
533
- var tmp_5 = fixStatus(_this__u8e3s4.hq_1);
534
- var tmp_6 = Spacer_instance.is(2);
535
- var tmp_7 = brace(this, joinToString(_this__u8e3s4.iq_1, VOID, VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emit$lambda_12(this)));
536
- return trimMargin('\n |' + tmp + 'data class Response' + _this__u8e3s4.hq_1 + '(override val body: ' + tmp_0 + responseHeaderFields + ') : Response' + tmp_1 + 'XX<' + tmp_2 + '>, Response' + tmp_3 + ' {\n |' + tmp_4 + 'override val status = ' + tmp_5 + '\n |' + tmp_6 + 'override val headers = ResponseHeaders' + tmp_7 + '\n |' + emitObject(this, _this__u8e3s4.iq_1, 'ResponseHeaders', 'Wirespec.Response.Headers', 2, KotlinEndpointDefinitionEmitter$emit$lambda_13(this)) + '\n |' + Spacer_instance.toString() + '}\n ');
537
- }
538
- function emitBody(_this__u8e3s4, content) {
539
- return 'serialization.serializeBody(response.body, typeOf<' + emit_16(_this__u8e3s4, content) + '>())';
540
- }
541
- function emitHeaders(_this__u8e3s4) {
542
- var tmp;
543
- if (_this__u8e3s4.iq_1.r()) {
544
- tmp = 'emptyMap()';
545
- } else {
546
- var tmp_0 = Spacer_instance.is(5);
547
- var tmp_1 = ',\n' + Spacer_instance.is(5);
548
- tmp = trimMargin('\n |mapOf(\n |' + tmp_0 + joinToString(_this__u8e3s4.iq_1, tmp_1, VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emitHeaders$lambda(this)) + '\n |' + Spacer_instance.is(4) + ')\n ');
549
- }
550
- return tmp;
551
- }
552
- initMetadataForInterface(KotlinEndpointDefinitionEmitter, 'KotlinEndpointDefinitionEmitter', VOID, VOID, [KotlinTypeDefinitionEmitter]);
553
- initMetadataForClass(KotlinEmitter, 'KotlinEmitter', KotlinEmitter, LanguageEmitter, [LanguageEmitter, KotlinEnumDefinitionEmitter, KotlinUnionDefinitionEmitter, KotlinChannelDefinitionEmitter, KotlinRefinedTypeDefinitionEmitter, KotlinEndpointDefinitionEmitter, KotlinIdentifierEmitter, KotlinTypeDefinitionEmitter]);
554
126
  initMetadataForCompanion(Companion);
555
- initMetadataForCompanion(Companion_0);
556
127
  initMetadataForClass(KotlinIrEmitter, 'KotlinIrEmitter', KotlinIrEmitter, VOID, [IrEmitter]);
557
- initMetadataForObject(KotlinShared, 'KotlinShared');
558
128
  //endregion
559
- function emitImports($this, _this__u8e3s4) {
560
- // Inline function 'kotlin.collections.map' call
561
- var this_0 = importReferences(_this__u8e3s4);
562
- // Inline function 'kotlin.collections.mapTo' call
563
- var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
564
- var _iterator__ex2g4s = this_0.t();
565
- while (_iterator__ex2g4s.u()) {
566
- var item = _iterator__ex2g4s.v();
567
- var tmp$ret$0 = 'import ' + $this.x1w().es_1 + '.model.' + item.cv_1 + ';';
568
- destination.x(tmp$ret$0);
569
- }
570
- var tmp = destination;
571
- return joinToString(tmp, '\n', VOID, VOID, VOID, VOID, KotlinChannelDefinitionEmitter$emitImports$lambda);
572
- }
573
- function KotlinChannelDefinitionEmitter$emitImports$lambda(it) {
574
- // Inline function 'kotlin.text.trimStart' call
575
- return toString(trimStart(isCharSequence(it) ? it : THROW_CCE()));
576
- }
577
- function KotlinChannelDefinitionEmitter() {
578
- }
579
- function KotlinEmitter(packageName, emitShared) {
580
- packageName = packageName === VOID ? Companion_instance.ds('community.flock.wirespec.generated') : packageName;
581
- emitShared = emitShared === VOID ? Companion_instance_0.wo() : emitShared;
582
- LanguageEmitter.call(this);
583
- this.y1x_1 = packageName;
584
- this.z1x_1 = emitShared;
585
- this.a1y_1 = '\nimport community.flock.wirespec.kotlin.Wirespec\nimport kotlin.reflect.typeOf\n';
586
- this.b1y_1 = FileExtension_Kotlin_getInstance();
587
- this.c1y_1 = KotlinShared_getInstance();
588
- this.d1y_1 = '//';
589
- }
590
- protoOf(KotlinEmitter).x1w = function () {
591
- return this.y1x_1;
592
- };
593
- protoOf(KotlinEmitter).vq = function () {
594
- return this.b1y_1;
595
- };
596
- protoOf(KotlinEmitter).g1x = function () {
597
- return this.c1y_1;
598
- };
599
- protoOf(KotlinEmitter).wq = function () {
600
- return this.d1y_1;
601
- };
602
- protoOf(KotlinEmitter).lr = function (module_0, logger) {
603
- // Inline function 'kotlin.let' call
604
- var it = protoOf(LanguageEmitter).lr.call(this, module_0, logger);
605
- return this.z1x_1.xo_1 ? NonEmptyList__plus_impl_xqmb9(it, new Emitted(Companion_instance.ds('community.flock.wirespec.kotlin').gs() + 'Wirespec', this.g1x().f1y_1)) : it;
606
- };
607
- protoOf(KotlinEmitter).mr = function (definition, module_0, logger) {
608
- // Inline function 'kotlin.let' call
609
- var it = protoOf(LanguageEmitter).mr.call(this, definition, module_0, logger);
610
- var subPackageName = plus(this.x1w(), definition);
611
- var tmp = subPackageName.gs() + it.yo_1;
612
- // Inline function 'kotlin.text.trimStart' call
613
- var this_0 = trimMargin('\n |package ' + subPackageName.toString() + '\n |' + (Companion_instance_1.hr(module_0) ? this.a1y_1 : '') + '\n |' + it.zo_1 + '\n ');
614
- var tmp$ret$0 = toString(trimStart(isCharSequence(this_0) ? this_0 : THROW_CCE()));
615
- return new Emitted(tmp, tmp$ret$0);
616
- };
617
- function emitStatusInterfaces($this, _this__u8e3s4) {
618
- // Inline function 'kotlin.collections.map' call
619
- var this_0 = _this__u8e3s4.bq_1;
620
- // Inline function 'kotlin.collections.mapTo' call
621
- var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
622
- var _iterator__ex2g4s = this_0.t();
623
- while (_iterator__ex2g4s.u()) {
624
- var item = _iterator__ex2g4s.v();
625
- var tmp$ret$0 = new Char(charCodeAt(item.hq_1, 0));
626
- destination.x(tmp$ret$0);
627
- }
628
- var tmp = distinct(destination);
629
- return joinToString(tmp, '\n', VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emitStatusInterfaces$lambda);
630
- }
631
- function emitResponseInterfaces($this, _this__u8e3s4) {
632
- // Inline function 'kotlin.collections.map' call
633
- var this_0 = _this__u8e3s4.bq_1;
634
- // Inline function 'kotlin.collections.mapTo' call
635
- var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
636
- var _iterator__ex2g4s = this_0.t();
637
- while (_iterator__ex2g4s.u()) {
638
- var item = _iterator__ex2g4s.v();
639
- var tmp$ret$0 = emit_16($this, item.jq_1);
640
- destination.x(tmp$ret$0);
641
- }
642
- var tmp = distinct(destination);
643
- return joinToString(tmp, '\n', VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emitResponseInterfaces$lambda);
644
- }
645
- function emitConstructor($this, _this__u8e3s4, endpoint) {
646
- var tmp = get_pathParams(endpoint);
647
- var tmp_0 = orNull(joinToString(tmp, VOID, VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emitConstructor$lambda($this)));
648
- var tmp_1 = orNull(joinToString(endpoint.yp_1, VOID, VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emitConstructor$lambda_0($this)));
649
- var tmp_2 = orNull(joinToString(endpoint.zp_1, VOID, VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emitConstructor$lambda_1($this)));
650
- var tmp0_safe_receiver = _this__u8e3s4.eq_1;
651
- var tmp_3;
652
- if (tmp0_safe_receiver == null) {
653
- tmp_3 = null;
654
- } else {
655
- // Inline function 'kotlin.let' call
656
- tmp_3 = Spacer_instance.is(2) + 'override val body: ' + emit_16($this, tmp0_safe_receiver) + ',';
657
- }
658
- // Inline function 'kotlin.let' call
659
- var it = joinToString(listOfNotNull([tmp_0, tmp_1, tmp_2, tmp_3]), ',\n');
660
- return isBlank(it) ? 'object Request : Wirespec.Request<' + emit_16($this, _this__u8e3s4.eq_1) + '> {' : 'class Request(\n' + it + '\n' + Spacer_instance.toString() + ') : Wirespec.Request<' + emit_16($this, _this__u8e3s4.eq_1) + '> {';
661
- }
662
- function emitDeserializedParams($this, _this__u8e3s4, endpoint) {
663
- var tmp = get_indexedPathParams(endpoint);
664
- var tmp_0 = orNull(joinToString(tmp, VOID, VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emitDeserializedParams$lambda($this)));
665
- var tmp_1 = orNull(joinToString(endpoint.yp_1, ',\n', VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emitDeserializedParams$lambda_0($this)));
666
- var tmp_2 = orNull(joinToString(endpoint.zp_1, ',\n', VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emitDeserializedParams$lambda_1($this)));
667
- var tmp0_safe_receiver = _this__u8e3s4.eq_1;
668
- var tmp_3;
669
- if (tmp0_safe_receiver == null) {
670
- tmp_3 = null;
671
- } else {
672
- // Inline function 'kotlin.let' call
673
- tmp_3 = Spacer_instance.is(3) + 'body = serialization.deserializeBody(requireNotNull(request.body) { "body is null" }, typeOf<' + emit_16($this, tmp0_safe_receiver) + '>()),';
674
- }
675
- // Inline function 'kotlin.let' call
676
- var it = joinToString(listOfNotNull([tmp_0, tmp_1, tmp_2, tmp_3]), ',\n');
677
- return isBlank(it) ? '' : '(\n' + it + '\n' + Spacer_instance.is(2) + ')';
678
- }
679
- function emitSerialized($this, _this__u8e3s4) {
680
- return trimMargin('\n |' + Spacer_instance.is(3) + 'is Response' + _this__u8e3s4.hq_1 + ' -> Wirespec.RawResponse(\n |' + Spacer_instance.is(4) + 'statusCode = response.status,\n |' + Spacer_instance.is(4) + 'headers = ' + $this.j1y(_this__u8e3s4) + ',\n |' + Spacer_instance.is(4) + 'body = ' + (!(_this__u8e3s4.jq_1 == null) ? $this.i1y($this, _this__u8e3s4.jq_1) : 'null') + ',\n |' + Spacer_instance.is(3) + ')\n ');
681
- }
682
- function emitDeserialized($this, _this__u8e3s4) {
683
- var tmp = Spacer_instance.is(3) + _this__u8e3s4.hq_1 + ' -> Response' + _this__u8e3s4.hq_1 + '(';
684
- var tmp_0;
685
- if (!(_this__u8e3s4.jq_1 == null)) {
686
- tmp_0 = Spacer_instance.is(4) + 'body = serialization.deserializeBody(requireNotNull(response.body) { "body is null" }, typeOf<' + emit_16($this, _this__u8e3s4.jq_1) + '>()),';
687
- } else {
688
- tmp_0 = Spacer_instance.is(4) + 'body = Unit,';
689
- }
690
- var tmp_1 = tmp_0;
691
- return joinToString(listOfNotNull([tmp, tmp_1, orNull(joinToString(_this__u8e3s4.iq_1, ',\n', VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emitDeserialized$lambda($this))), Spacer_instance.is(3) + ')']), '\n');
692
- }
693
- function emitSerializedMapEntry($this, _this__u8e3s4, type, fields) {
694
- return '"' + _this__u8e3s4.rp_1.l1() + '" to ' + type + '.' + fields + '.' + $this.or(_this__u8e3s4.rp_1) + '?.let{ serialization.serializeParam(it, typeOf<' + $this.oq(_this__u8e3s4.sp_1) + '>()) }.orEmpty()';
695
- }
696
- function emitDeserialized_0($this, _this__u8e3s4) {
697
- return Spacer_instance.is(3) + $this.or(_this__u8e3s4.ue_1.cq_1) + ' = serialization.deserializePath(request.path[' + _this__u8e3s4.te_1 + '], typeOf<' + $this.oq(_this__u8e3s4.ue_1.dq_1) + '>())';
698
- }
699
- function emitDeserializedParams_0($this, _this__u8e3s4, type, fields, spaces, caseSensitive) {
700
- var trimMargin_0 = trimMargin('\n |' + Spacer_instance.is(spaces) + $this.or(_this__u8e3s4.rp_1) + ' =\n |' + Spacer_instance.is(spaces + 1 | 0) + type + '.' + fields + '\n |' + Spacer_instance.is(spaces + 2 | 0) + '.entries\n |' + Spacer_instance.is(spaces + 2 | 0) + '.find { it.key.equals("' + _this__u8e3s4.rp_1.l1() + '", ignoreCase = ' + !caseSensitive + ') }\n |' + Spacer_instance.is(spaces + 2 | 0) + '?.let { serialization.deserializeParam(it.value, typeOf<' + $this.oq(_this__u8e3s4.sp_1) + '>()) }\n ');
701
- var tmp;
702
- if (_this__u8e3s4.sp_1.uu()) {
703
- tmp = trimMargin_0;
704
- } else {
705
- tmp = trimMargin_0 + '\n' + Spacer_instance.is(spaces + 2 | 0) + '?: throw IllegalArgumentException("' + $this.or(_this__u8e3s4.rp_1) + ' is null")';
706
- }
707
- return tmp;
708
- }
709
- function emitDeserializedParams$default($this, _this__u8e3s4, type, fields, spaces, caseSensitive, $super) {
710
- spaces = spaces === VOID ? 3 : spaces;
711
- caseSensitive = caseSensitive === VOID ? true : caseSensitive;
712
- return emitDeserializedParams_0($this, _this__u8e3s4, type, fields, spaces, caseSensitive);
713
- }
714
- function emitIdentifier($this, _this__u8e3s4) {
715
- return 'request.path.' + $this.or(_this__u8e3s4.cq_1) + '.let{serialization.serializePath(it, typeOf<' + $this.oq(_this__u8e3s4.dq_1) + '>())}';
716
- }
717
- function emit_16($this, _this__u8e3s4) {
718
- var tmp1_safe_receiver = _this__u8e3s4 == null ? null : _this__u8e3s4.gq_1;
719
- var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : $this.oq(tmp1_safe_receiver);
720
- var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : removeQuestionMark(tmp2_safe_receiver);
721
- return tmp3_elvis_lhs == null ? 'Unit' : tmp3_elvis_lhs;
722
- }
723
- function emit_17($this, _this__u8e3s4) {
724
- return $this.or(_this__u8e3s4.cq_1) + ': ' + $this.oq(_this__u8e3s4.dq_1);
725
- }
726
- function brace($this, _this__u8e3s4) {
727
- return wrap($this, _this__u8e3s4, '(', ')');
728
- }
729
- function wrap($this, _this__u8e3s4, prefix, postfix) {
730
- var tmp;
731
- // Inline function 'kotlin.text.isEmpty' call
732
- if (charSequenceLength(_this__u8e3s4) === 0) {
733
- tmp = '';
734
- } else {
735
- tmp = prefix + _this__u8e3s4 + postfix;
736
- }
737
- return tmp;
738
- }
739
- function emitObject($this, _this__u8e3s4, name, extends_0, spaces, block) {
740
- var tmp;
741
- if (_this__u8e3s4.r()) {
742
- tmp = Spacer_instance.is(spaces) + 'data object ' + name + ' : ' + extends_0;
743
- } else {
744
- var tmp_0 = Spacer_instance.is(spaces);
745
- tmp = trimMargin('\n |' + tmp_0 + 'data class ' + name + '(\n |' + joinToString(_this__u8e3s4, ',\n', VOID, VOID, VOID, VOID, KotlinEndpointDefinitionEmitter$emitObject$lambda(spaces, block)) + ',\n |' + Spacer_instance.is(spaces) + ') : ' + extends_0 + '\n ');
746
- }
747
- return tmp;
748
- }
749
- function emitObject$default($this, _this__u8e3s4, name, extends_0, spaces, block, $super) {
750
- spaces = spaces === VOID ? 1 : spaces;
751
- return emitObject($this, _this__u8e3s4, name, extends_0, spaces, block);
752
- }
753
- function KotlinEndpointDefinitionEmitter$emit$lambda(it) {
754
- // Inline function 'kotlin.text.trimStart' call
755
- return toString(trimStart(isCharSequence(it) ? it : THROW_CCE()));
756
- }
757
- function KotlinEndpointDefinitionEmitter$emit$lambda_0(this$0) {
758
- return function (it) {
759
- return emit_17(this$0, it);
760
- };
761
- }
762
- function KotlinEndpointDefinitionEmitter$emit$lambda_1(this$0) {
763
- return function (it) {
764
- return this$0.nq(it);
765
- };
766
- }
767
- function KotlinEndpointDefinitionEmitter$emit$lambda_2(this$0) {
768
- return function (it) {
769
- return this$0.nq(it);
770
- };
771
- }
772
- function KotlinEndpointDefinitionEmitter$emit$lambda_3(this$0) {
773
- return function (it) {
774
- return this$0.l1x(it);
775
- };
776
- }
777
- function KotlinEndpointDefinitionEmitter$emit$lambda_4(this$0) {
778
- return function (it) {
779
- return emitSerialized(this$0, it);
780
- };
781
- }
782
- function KotlinEndpointDefinitionEmitter$emit$lambda_5(this$0) {
783
- return function (it) {
784
- return emitDeserialized(this$0, it);
785
- };
786
- }
787
- function KotlinEndpointDefinitionEmitter$emit$lambda_6(it) {
788
- return emit(it);
789
- }
790
- function KotlinEndpointDefinitionEmitter$emitStatusInterfaces$lambda(it) {
791
- return Spacer_instance.toString() + 'sealed interface Response' + toString_0(it.h1_1) + 'XX<T: Any> : Response<T>';
792
- }
793
- function KotlinEndpointDefinitionEmitter$emitResponseInterfaces$lambda(it) {
794
- return Spacer_instance.toString() + 'sealed interface Response' + concatGenerics(it) + ' : Response<' + it + '>';
795
- }
796
- function KotlinEndpointDefinitionEmitter$emit$lambda_7(this$0) {
797
- return function (it) {
798
- return this$0.or(it.cq_1);
799
- };
800
- }
801
- function KotlinEndpointDefinitionEmitter$emit$lambda_8(this$0) {
802
- return function (it) {
803
- return this$0.or(it.rp_1);
804
- };
805
- }
806
- function KotlinEndpointDefinitionEmitter$emit$lambda_9(this$0) {
807
- return function (it) {
808
- return this$0.or(it.rp_1);
809
- };
810
- }
811
- function KotlinEndpointDefinitionEmitter$emit$lambda_10(this$0) {
812
- return function (it) {
813
- var tmp;
814
- if (it instanceof Literal) {
815
- tmp = '"' + it.yq_1 + '"';
816
- } else {
817
- if (it instanceof Param) {
818
- tmp = emitIdentifier(this$0, it);
819
- } else {
820
- noWhenBranchMatchedException();
821
- }
822
- }
823
- return tmp;
824
- };
825
- }
826
- function KotlinEndpointDefinitionEmitter$emitRequestHeaders$lambda(this$0) {
827
- return function (it) {
828
- return emitSerializedMapEntry(this$0, it, 'request', 'headers');
829
- };
830
- }
831
- function KotlinEndpointDefinitionEmitter$emitQueries$lambda(this$0) {
832
- return function (it) {
833
- return emitSerializedMapEntry(this$0, it, 'request', 'queries');
834
- };
835
- }
836
- function KotlinEndpointDefinitionEmitter$emit$lambda_11(this$0) {
837
- return function (it) {
838
- return 'val ' + this$0.nq(it);
839
- };
840
- }
841
- function KotlinEndpointDefinitionEmitter$emit$lambda_12(this$0) {
842
- return function (it) {
843
- return this$0.or(it.rp_1);
844
- };
845
- }
846
- function KotlinEndpointDefinitionEmitter$emit$lambda_13(this$0) {
847
- return function (it) {
848
- return this$0.nq(it);
849
- };
850
- }
851
- function KotlinEndpointDefinitionEmitter$emitConstructor$lambda(this$0) {
852
- return function (it) {
853
- return Spacer_instance.is(2) + emit_17(this$0, it);
854
- };
855
- }
856
- function KotlinEndpointDefinitionEmitter$emitConstructor$lambda_0(this$0) {
857
- return function (it) {
858
- return Spacer_instance.is(2) + this$0.nq(it);
859
- };
860
- }
861
- function KotlinEndpointDefinitionEmitter$emitConstructor$lambda_1(this$0) {
862
- return function (it) {
863
- return Spacer_instance.is(2) + this$0.nq(it);
864
- };
865
- }
866
- function KotlinEndpointDefinitionEmitter$emitDeserializedParams$lambda(this$0) {
867
- return function (it) {
868
- return emitDeserialized_0(this$0, it);
869
- };
870
- }
871
- function KotlinEndpointDefinitionEmitter$emitDeserializedParams$lambda_0(this$0) {
872
- return function (it) {
873
- return emitDeserializedParams$default(this$0, it, 'request', 'queries');
874
- };
875
- }
876
- function KotlinEndpointDefinitionEmitter$emitDeserializedParams$lambda_1(this$0) {
877
- return function (it) {
878
- return emitDeserializedParams$default(this$0, it, 'request', 'headers', VOID, false);
879
- };
880
- }
881
- function KotlinEndpointDefinitionEmitter$emitHeaders$lambda(this$0) {
882
- return function (it) {
883
- return emitSerializedMapEntry(this$0, it, 'response', 'headers');
884
- };
885
- }
886
- function KotlinEndpointDefinitionEmitter$emitDeserialized$lambda(this$0) {
887
- return function (it) {
888
- return emitDeserializedParams_0(this$0, it, 'response', 'headers', 4, false);
889
- };
890
- }
891
- function KotlinEndpointDefinitionEmitter$emitObject$lambda($spaces, $block) {
892
- return function (it) {
893
- return Spacer_instance.is($spaces + 1 | 0) + 'val ' + $block(it);
894
- };
895
- }
896
- function KotlinEndpointDefinitionEmitter() {
897
- }
898
- function sanitizeNegative($this, _this__u8e3s4) {
899
- return startsWith(_this__u8e3s4, '-') ? '__' + substring(_this__u8e3s4, 1) : _this__u8e3s4;
900
- }
901
- function sanitizeEnum($this, _this__u8e3s4) {
902
- return $this.m1x(joinToString(split(sanitizeNegative($this, _this__u8e3s4), ['-', ', ', '.', ' ', '//']), '_'));
903
- }
904
- function KotlinEnumDefinitionEmitter$emit$lambda(this$0) {
905
- return function (it) {
906
- return this$0.n1x(sanitizeEnum(this$0, it)) + '("' + it + '")';
907
- };
908
- }
909
- function KotlinEnumDefinitionEmitter() {
910
- }
911
- function Companion() {
912
- Companion_instance_2 = this;
913
- this.k1y_1 = setOf(['as', 'break', 'class', 'continue', 'do', 'else', 'false', 'for', 'fun', 'if', 'in', 'interface', 'internal', 'is', 'null', 'object', 'open', 'package', 'return', 'super', 'this', 'throw', 'true', 'try', 'typealias', 'typeof', 'val', 'var', 'when', 'while', 'private', 'public']);
914
- }
915
- var Companion_instance_2;
916
- function Companion_getInstance_0() {
917
- if (Companion_instance_2 == null)
918
- new Companion();
919
- return Companion_instance_2;
920
- }
921
- function KotlinIdentifierEmitter$sanitize$lambda(it) {
922
- return isLetterOrDigit(it.h1_1) || listOf(new Char(_Char___init__impl__6a9atx(95))).u1(it);
923
- }
924
- function KotlinIdentifierEmitter() {
925
- }
926
129
  function _get_sanitizationConfig__sns434($this) {
927
- var tmp0 = $this.q1y_1;
130
+ var tmp0 = $this.y1x_1;
928
131
  var tmp = KProperty1;
929
132
  // Inline function 'kotlin.getValue' call
930
133
  getPropertyCallableRef('sanitizationConfig', 1, tmp, KotlinIrEmitter$_get_sanitizationConfig_$ref_tnafwf(), null);
931
- return tmp0.l1();
134
+ return tmp0.m1();
932
135
  }
933
136
  function _get_modelSanitizationConfig__vgg831($this) {
934
- var tmp0 = $this.r1y_1;
137
+ var tmp0 = $this.z1x_1;
935
138
  var tmp = KProperty1;
936
139
  // Inline function 'kotlin.getValue' call
937
140
  getPropertyCallableRef('modelSanitizationConfig', 1, tmp, KotlinIrEmitter$_get_modelSanitizationConfig_$ref_iulb4s(), null);
938
- return tmp0.l1();
141
+ return tmp0.m1();
142
+ }
143
+ function withExplicitVisibility($this, _this__u8e3s4) {
144
+ // Inline function 'community.flock.wirespec.ir.core.transform' call
145
+ var scope = new TransformScope(_this__u8e3s4);
146
+ // Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
147
+ var tmp = scope;
148
+ // Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
149
+ var this_0 = scope.q1v_1;
150
+ // Inline function 'community.flock.wirespec.ir.core.transformer' call
151
+ // Inline function 'kotlin.apply' call
152
+ var this_1 = new TransformerBuilder();
153
+ this_1.k1i(KotlinIrEmitter$withExplicitVisibility$lambda);
154
+ var tmp$ret$2 = this_1.l1i();
155
+ tmp.q1v_1 = transform(this_0, tmp$ret$2);
156
+ var tmp_0 = scope.q1v_1;
157
+ return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
939
158
  }
940
- function sanitize_0($this, _this__u8e3s4) {
159
+ function sanitize($this, _this__u8e3s4) {
941
160
  // Inline function 'kotlin.collections.mapIndexed' call
942
- var this_0 = split(_this__u8e3s4.l1(), ['.', ' ']);
161
+ var this_0 = split(_this__u8e3s4.m1(), ['.', ' ']);
943
162
  // Inline function 'kotlin.collections.mapIndexedTo' call
944
163
  var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
945
164
  var index = 0;
@@ -948,7 +167,7 @@ function sanitize_0($this, _this__u8e3s4) {
948
167
  var item = _iterator__ex2g4s.v();
949
168
  var _unary__edvuaz = index;
950
169
  index = _unary__edvuaz + 1 | 0;
951
- var tmp$ret$0 = checkIndexOverflow(_unary__edvuaz) > 0 ? Companion_instance_1.fr(item) : item;
170
+ var tmp$ret$0 = checkIndexOverflow(_unary__edvuaz) > 0 ? Companion_instance.xq(item) : item;
952
171
  destination.x(tmp$ret$0);
953
172
  }
954
173
  // Inline function 'kotlin.text.filter' call
@@ -969,16 +188,16 @@ function sanitize_0($this, _this__u8e3s4) {
969
188
  while (inductionVariable < last);
970
189
  var tmp$ret$5 = destination_0.toString();
971
190
  // Inline function 'kotlin.let' call
972
- var it = sanitizeFirstIsDigit_0($this, tmp$ret$5);
191
+ var it = sanitizeFirstIsDigit($this, tmp$ret$5);
973
192
  var tmp;
974
193
  if (_this__u8e3s4 instanceof FieldIdentifier) {
975
- tmp = sanitizeKeywords_0($this, it);
194
+ tmp = sanitizeKeywords($this, it);
976
195
  } else {
977
196
  tmp = it;
978
197
  }
979
198
  return tmp;
980
199
  }
981
- function sanitizeFirstIsDigit_0($this, _this__u8e3s4) {
200
+ function sanitizeFirstIsDigit($this, _this__u8e3s4) {
982
201
  var tmp;
983
202
  var tmp0_safe_receiver = firstOrNull(_this__u8e3s4);
984
203
  var tmp_0;
@@ -995,8 +214,8 @@ function sanitizeFirstIsDigit_0($this, _this__u8e3s4) {
995
214
  }
996
215
  return tmp;
997
216
  }
998
- function sanitizeKeywords_0($this, _this__u8e3s4) {
999
- return Companion_getInstance_1().s1y_1.u1(_this__u8e3s4) ? addBackticks(_this__u8e3s4) : _this__u8e3s4;
217
+ function sanitizeKeywords($this, _this__u8e3s4) {
218
+ return Companion_getInstance_0().l1x().v1(_this__u8e3s4) ? addBackticks(_this__u8e3s4) : _this__u8e3s4;
1000
219
  }
1001
220
  function sanitizeSymbol($this, _this__u8e3s4) {
1002
221
  // Inline function 'kotlin.collections.mapIndexed' call
@@ -1009,7 +228,7 @@ function sanitizeSymbol($this, _this__u8e3s4) {
1009
228
  var item = _iterator__ex2g4s.v();
1010
229
  var _unary__edvuaz = index;
1011
230
  index = _unary__edvuaz + 1 | 0;
1012
- var tmp$ret$0 = checkIndexOverflow(_unary__edvuaz) > 0 ? Companion_instance_1.fr(item) : item;
231
+ var tmp$ret$0 = checkIndexOverflow(_unary__edvuaz) > 0 ? Companion_instance.xq(item) : item;
1013
232
  destination.x(tmp$ret$0);
1014
233
  }
1015
234
  // Inline function 'kotlin.text.filter' call
@@ -1029,7 +248,7 @@ function sanitizeSymbol($this, _this__u8e3s4) {
1029
248
  }
1030
249
  while (inductionVariable < last);
1031
250
  var tmp$ret$5 = destination_0.toString();
1032
- return sanitizeFirstIsDigit_0($this, tmp$ret$5);
251
+ return sanitizeFirstIsDigit($this, tmp$ret$5);
1033
252
  }
1034
253
  function sanitizeFieldSymbol($this, _this__u8e3s4) {
1035
254
  return isBareIdentifier($this, _this__u8e3s4) ? _this__u8e3s4 : addBackticks(_this__u8e3s4);
@@ -1039,7 +258,7 @@ function isBareIdentifier($this, _this__u8e3s4) {
1039
258
  var tmp_0;
1040
259
  // Inline function 'kotlin.text.isNotEmpty' call
1041
260
  if (charSequenceLength(_this__u8e3s4) > 0) {
1042
- tmp_0 = isLetter(first_0(_this__u8e3s4)) || first_0(_this__u8e3s4) === _Char___init__impl__6a9atx(95);
261
+ tmp_0 = isLetter(first(_this__u8e3s4)) || first(_this__u8e3s4) === _Char___init__impl__6a9atx(95);
1043
262
  } else {
1044
263
  tmp_0 = false;
1045
264
  }
@@ -1064,31 +283,35 @@ function isBareIdentifier($this, _this__u8e3s4) {
1064
283
  }
1065
284
  return tmp;
1066
285
  }
1067
- function sanitizeEnum_0($this, _this__u8e3s4) {
1068
- return sanitizeKeywords_0($this, sanitizeFirstIsDigit_0($this, joinToString(split(_this__u8e3s4, ['-', ', ', '.', ' ', '//']), '_')));
286
+ function sanitizeEnum($this, _this__u8e3s4) {
287
+ return sanitizeKeywords($this, sanitizeFirstIsDigit($this, joinToString(split(_this__u8e3s4, ['-', ', ', '.', ' ', '//']), '_')));
1069
288
  }
1070
- function Companion_0() {
1071
- Companion_instance_3 = this;
1072
- this.s1y_1 = setOf(['as', 'break', 'class', 'continue', 'do', 'else', 'false', 'for', 'fun', 'if', 'in', 'interface', 'internal', 'is', 'null', 'object', 'open', 'package', 'return', 'super', 'this', 'throw', 'true', 'try', 'typealias', 'typeof', 'val', 'var', 'when', 'while', 'private', 'public']);
289
+ function Companion() {
290
+ Companion_instance_2 = this;
291
+ this.a1y_1 = KotlinGenerator_getInstance();
1073
292
  }
1074
- var Companion_instance_3;
1075
- function Companion_getInstance_1() {
1076
- if (Companion_instance_3 == null)
1077
- new Companion_0();
1078
- return Companion_instance_3;
293
+ protoOf(Companion).l1x = function () {
294
+ return this.a1y_1.p1w_1;
295
+ };
296
+ var Companion_instance_2;
297
+ function Companion_getInstance_0() {
298
+ if (Companion_instance_2 == null)
299
+ new Companion();
300
+ return Companion_instance_2;
1079
301
  }
1080
302
  function KotlinIrEmitter$sanitizationConfig$delegate$lambda$lambda(it) {
1081
303
  return addBackticks(it);
1082
304
  }
1083
305
  function KotlinIrEmitter$sanitizationConfig$delegate$lambda$lambda_0(this$0) {
1084
306
  return function (name) {
1085
- var sanitized = name.q1h_1.a1() > 1 ? name.u1m() : sanitizeSymbol(this$0, name.o1j());
307
+ var sanitized = name.v1g_1.b1() > 1 ? name.j1m() : sanitizeSymbol(this$0, name.w1i());
1086
308
  return new Name(listOf(sanitized));
1087
309
  };
1088
310
  }
1089
311
  function KotlinIrEmitter$sanitizationConfig$delegate$lambda$lambda_1(this$0) {
1090
312
  return function (name) {
1091
- return new Name(listOf(sanitizeSymbol(this$0, name.u1m())));
313
+ var sanitized = name.v1g_1.b1() > 1 ? name.j1m() : sanitizeSymbol(this$0, name.w1i());
314
+ return new Name(listOf(sanitized));
1092
315
  };
1093
316
  }
1094
317
  function KotlinIrEmitter$sanitizationConfig$delegate$lambda$lambda_2(this$0) {
@@ -1101,33 +324,40 @@ function KotlinIrEmitter$sanitizationConfig$delegate$lambda$lambda_3(this$0) {
1101
324
  var tmp;
1102
325
  var tmp_0;
1103
326
  if (stmt instanceof FunctionCall) {
1104
- tmp_0 = stmt.e1n_1.o1j() === 'validate';
327
+ tmp_0 = stmt.t1m_1.w1i() === 'validate';
1105
328
  } else {
1106
329
  tmp_0 = false;
1107
330
  }
1108
331
  if (tmp_0) {
1109
- tmp = transformChildren(stmt.i1n(VOID, emptyList()), tr);
332
+ tmp = transformChildren(stmt.x1m(VOID, emptyList()), tr);
1110
333
  } else {
1111
334
  if (stmt instanceof ConstructorStatement) {
1112
- var tmp_1 = tr.b1v(stmt.w1n_1);
335
+ var tmp_1 = tr.i1v(stmt.o1n_1);
1113
336
  // Inline function 'kotlin.collections.map' call
1114
- var this_0 = stmt.x1n_1;
337
+ var this_0 = stmt.p1n_1;
1115
338
  // Inline function 'kotlin.collections.mapTo' call
1116
- var destination = ArrayList_init_$Create$(this_0.a1());
339
+ var destination = ArrayList_init_$Create$(this_0.b1());
1117
340
  // Inline function 'kotlin.collections.iterator' call
1118
- var _iterator__ex2g4s = this_0.j1().t();
341
+ var _iterator__ex2g4s = this_0.k1().t();
1119
342
  while (_iterator__ex2g4s.u()) {
1120
343
  var item = _iterator__ex2g4s.v();
1121
344
  // Inline function 'kotlin.collections.component1' call
1122
- var name = item.k1();
345
+ var name = item.l1();
1123
346
  // Inline function 'kotlin.collections.component2' call
1124
- var expr = item.l1();
1125
- var tmp$ret$3 = to(sanitizeFieldName(_get_sanitizationConfig__sns434(this$0), name), tr.e1v(expr));
347
+ var expr = item.m1();
348
+ var tmp$ret$3 = to(sanitizeFieldName(_get_sanitizationConfig__sns434(this$0), name), tr.l1v(expr));
1126
349
  destination.x(tmp$ret$3);
1127
350
  }
1128
351
  tmp = new ConstructorStatement(tmp_1, toMap(destination));
1129
352
  } else {
1130
- tmp = transformChildren(stmt, tr);
353
+ if (stmt instanceof VariableReference) {
354
+ var cased = _get_sanitizationConfig__sns434(this$0).e1x_1(stmt.r1n_1);
355
+ var sanitized = _get_sanitizationConfig__sns434(this$0).f1x_1(cased.w1i());
356
+ var escaped = Companion_getInstance_0().l1x().v1(sanitized) ? addBackticks(sanitized) : sanitized;
357
+ tmp = new VariableReference(new Name(listOf(escaped)));
358
+ } else {
359
+ tmp = transformChildren(stmt, tr);
360
+ }
1131
361
  }
1132
362
  }
1133
363
  return tmp;
@@ -1135,7 +365,7 @@ function KotlinIrEmitter$sanitizationConfig$delegate$lambda$lambda_3(this$0) {
1135
365
  }
1136
366
  function KotlinIrEmitter$sanitizationConfig$delegate$lambda(this$0) {
1137
367
  return function () {
1138
- var tmp = Companion_getInstance_1().s1y_1;
368
+ var tmp = Companion_getInstance_0().l1x();
1139
369
  var tmp_0 = KotlinIrEmitter$sanitizationConfig$delegate$lambda$lambda;
1140
370
  var tmp_1 = KotlinIrEmitter$sanitizationConfig$delegate$lambda$lambda_0(this$0);
1141
371
  var tmp_2 = KotlinIrEmitter$sanitizationConfig$delegate$lambda$lambda_1(this$0);
@@ -1149,7 +379,7 @@ function KotlinIrEmitter$_get_sanitizationConfig_$ref_tnafwf() {
1149
379
  };
1150
380
  }
1151
381
  function KotlinIrEmitter$modelSanitizationConfig$delegate$lambda$lambda(name) {
1152
- return new Name(listOf(name.o1j()));
382
+ return new Name(listOf(name.w1i()));
1153
383
  }
1154
384
  function KotlinIrEmitter$modelSanitizationConfig$delegate$lambda$lambda_0(this$0) {
1155
385
  return function (it) {
@@ -1160,7 +390,7 @@ function KotlinIrEmitter$modelSanitizationConfig$delegate$lambda(this$0) {
1160
390
  return function () {
1161
391
  var tmp = _get_sanitizationConfig__sns434(this$0);
1162
392
  var tmp_0 = KotlinIrEmitter$modelSanitizationConfig$delegate$lambda$lambda;
1163
- return tmp.w1w(VOID, VOID, tmp_0, VOID, KotlinIrEmitter$modelSanitizationConfig$delegate$lambda$lambda_0(this$0));
393
+ return tmp.j1x(VOID, VOID, tmp_0, VOID, KotlinIrEmitter$modelSanitizationConfig$delegate$lambda$lambda_0(this$0));
1164
394
  };
1165
395
  }
1166
396
  function KotlinIrEmitter$_get_modelSanitizationConfig_$ref_iulb4s() {
@@ -1172,7 +402,7 @@ function KotlinIrEmitter$emitShared$lambda(element, transformer) {
1172
402
  var tmp;
1173
403
  if (element instanceof File) {
1174
404
  // Inline function 'kotlin.collections.partition' call
1175
- var this_0 = element.a1o_1;
405
+ var this_0 = element.t1n_1;
1176
406
  var first = ArrayList_init_$Create$_0();
1177
407
  var second = ArrayList_init_$Create$_0();
1178
408
  var _iterator__ex2g4s = this_0.t();
@@ -1185,9 +415,9 @@ function KotlinIrEmitter$emitShared$lambda(element, transformer) {
1185
415
  }
1186
416
  }
1187
417
  var _destruct__k2r9zo = new Pair(first, second);
1188
- var packageElements = _destruct__k2r9zo.ve();
1189
- var rest = _destruct__k2r9zo.we();
1190
- tmp = element.d1o(VOID, plus_2(plus_1(packageElements, import_0('kotlin.reflect', 'KType')), rest));
418
+ var packageElements = _destruct__k2r9zo.we();
419
+ var rest = _destruct__k2r9zo.xe();
420
+ tmp = element.w1n(VOID, plus_0(plus(packageElements, import_0('kotlin.reflect', 'KType')), rest));
1191
421
  } else {
1192
422
  tmp = element;
1193
423
  }
@@ -1198,11 +428,40 @@ function KotlinIrEmitter$emitShared$lambda_0($clientServer) {
1198
428
  return function (element, transformer) {
1199
429
  var tmp;
1200
430
  if (element instanceof Namespace) {
1201
- var injected = element.f1o_1.equals(Companion_getInstance().s1h('Wirespec')) ? $clientServer : emptyList();
431
+ var injected = element.y1n_1.equals(Companion_getInstance().x1g('Wirespec')) ? $clientServer : emptyList();
1202
432
  var tmp_0;
1203
433
  // Inline function 'kotlin.collections.isNotEmpty' call
1204
434
  if (!injected.r()) {
1205
- tmp_0 = withElements(element, plus_2(element.b1o(), injected));
435
+ // Inline function 'community.flock.wirespec.ir.core.withElements' call
436
+ var elements = plus_0(element.u1n(), injected);
437
+ var tmp_1;
438
+ if (element instanceof File) {
439
+ tmp_1 = element.w1n(VOID, elements);
440
+ } else {
441
+ if (element instanceof Struct) {
442
+ tmp_1 = element.d1q(VOID, VOID, VOID, VOID, elements);
443
+ } else {
444
+ if (element instanceof Namespace) {
445
+ tmp_1 = element.d1o(VOID, elements);
446
+ } else {
447
+ if (element instanceof Interface) {
448
+ tmp_1 = element.m1o(VOID, elements);
449
+ } else {
450
+ if (element instanceof Enum) {
451
+ tmp_1 = element.r1p(VOID, VOID, VOID, VOID, VOID, elements);
452
+ } else {
453
+ if (element instanceof Main) {
454
+ tmp_1 = element;
455
+ } else {
456
+ tmp_1 = element;
457
+ }
458
+ }
459
+ }
460
+ }
461
+ }
462
+ }
463
+ var tmp_2 = tmp_1;
464
+ tmp_0 = tmp_2 instanceof Namespace ? tmp_2 : THROW_CCE();
1206
465
  } else {
1207
466
  tmp_0 = element;
1208
467
  }
@@ -1214,6 +473,53 @@ function KotlinIrEmitter$emitShared$lambda_0($clientServer) {
1214
473
  return transformChildren_0(transformed, transformer);
1215
474
  };
1216
475
  }
476
+ function KotlinIrEmitter$withExplicitVisibility$lambda(element, transformer) {
477
+ var tmp;
478
+ if (isInterface(element, Element)) {
479
+ var tmp_0;
480
+ if (element instanceof Namespace) {
481
+ tmp_0 = element.d1o(VOID, VOID, VOID, Visibility_PUBLIC_getInstance());
482
+ } else {
483
+ if (element instanceof Interface) {
484
+ var tmp2_visibility = Visibility_PUBLIC_getInstance();
485
+ // Inline function 'kotlin.collections.map' call
486
+ var this_0 = element.j1o_1;
487
+ // Inline function 'kotlin.collections.mapTo' call
488
+ var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
489
+ var _iterator__ex2g4s = this_0.t();
490
+ while (_iterator__ex2g4s.u()) {
491
+ var item = _iterator__ex2g4s.v();
492
+ var tmp$ret$0 = item.x1o(VOID, VOID, VOID, VOID, Visibility_PUBLIC_getInstance());
493
+ destination.x(tmp$ret$0);
494
+ }
495
+ tmp_0 = element.m1o(VOID, VOID, VOID, VOID, VOID, destination, tmp2_visibility);
496
+ } else {
497
+ if (element instanceof Union) {
498
+ tmp_0 = element.e1p(VOID, VOID, VOID, VOID, Visibility_PUBLIC_getInstance());
499
+ } else {
500
+ if (element instanceof Enum) {
501
+ tmp_0 = element.r1p(VOID, VOID, VOID, VOID, VOID, VOID, Visibility_PUBLIC_getInstance());
502
+ } else {
503
+ if (element instanceof Struct) {
504
+ tmp_0 = element.d1q(VOID, VOID, VOID, VOID, VOID, VOID, Visibility_PUBLIC_getInstance());
505
+ } else {
506
+ if (element instanceof Function) {
507
+ tmp_0 = element.f1l(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, Visibility_PUBLIC_getInstance());
508
+ } else {
509
+ tmp_0 = element;
510
+ }
511
+ }
512
+ }
513
+ }
514
+ }
515
+ }
516
+ tmp = tmp_0;
517
+ } else {
518
+ tmp = element;
519
+ }
520
+ var transformed = tmp;
521
+ return transformChildren_0(transformed, transformer);
522
+ }
1217
523
  function KotlinIrEmitter$emitGenerator$lambda(it) {
1218
524
  return startsWith(it, 'Wirespec.') || it === 'Wirespec';
1219
525
  }
@@ -1227,99 +533,99 @@ function KotlinIrEmitter$emitGenerator$lambda_1(it) {
1227
533
  }
1228
534
  function KotlinIrEmitter$emitGenerator$lambda_2(this$0) {
1229
535
  return function (it) {
1230
- return import_0(this$0.x1w().es_1 + '.model', it);
536
+ return import_0(this$0.s1x().cs_1 + '.model', it);
1231
537
  };
1232
538
  }
1233
539
  function KotlinIrEmitter$emit$lambda(this$0) {
1234
540
  return function (it) {
1235
- return sanitizeEnum_0(this$0, it);
541
+ return sanitizeEnum(this$0, it);
1236
542
  };
1237
543
  }
1238
544
  function KotlinIrEmitter(packageName, emitShared) {
1239
- Companion_getInstance_1();
1240
- packageName = packageName === VOID ? Companion_instance.ds('community.flock.wirespec.generated') : packageName;
1241
- emitShared = emitShared === VOID ? Companion_instance_0.wo() : emitShared;
1242
- this.l1y_1 = packageName;
1243
- this.m1y_1 = emitShared;
1244
- this.n1y_1 = KotlinGenerator_instance;
1245
- this.o1y_1 = FileExtension_Kotlin_getInstance();
1246
- this.p1y_1 = listOf_0([import_0('community.flock.wirespec.kotlin', 'Wirespec'), import_0('kotlin.reflect', 'typeOf')]);
545
+ Companion_getInstance_0();
546
+ packageName = packageName === VOID ? Companion_instance_0.bs('community.flock.wirespec.generated') : packageName;
547
+ emitShared = emitShared === VOID ? Companion_instance_1.fp() : emitShared;
548
+ this.t1x_1 = packageName;
549
+ this.u1x_1 = emitShared;
550
+ this.v1x_1 = KotlinGenerator_getInstance();
551
+ this.w1x_1 = FileExtension_Kotlin_getInstance();
552
+ this.x1x_1 = listOf_0([import_0('community.flock.wirespec.kotlin', 'Wirespec'), import_0('kotlin.reflect', 'typeOf')]);
1247
553
  var tmp = this;
1248
- tmp.q1y_1 = lazy(KotlinIrEmitter$sanitizationConfig$delegate$lambda(this));
554
+ tmp.y1x_1 = lazy(KotlinIrEmitter$sanitizationConfig$delegate$lambda(this));
1249
555
  var tmp_0 = this;
1250
- tmp_0.r1y_1 = lazy(KotlinIrEmitter$modelSanitizationConfig$delegate$lambda(this));
556
+ tmp_0.z1x_1 = lazy(KotlinIrEmitter$modelSanitizationConfig$delegate$lambda(this));
1251
557
  }
1252
- protoOf(KotlinIrEmitter).x1w = function () {
1253
- return this.l1y_1;
558
+ protoOf(KotlinIrEmitter).s1x = function () {
559
+ return this.t1x_1;
1254
560
  };
1255
- protoOf(KotlinIrEmitter).w1v = function () {
1256
- return this.n1y_1;
561
+ protoOf(KotlinIrEmitter).d1w = function () {
562
+ return this.v1x_1;
1257
563
  };
1258
- protoOf(KotlinIrEmitter).vq = function () {
1259
- return this.o1y_1;
564
+ protoOf(KotlinIrEmitter).er = function () {
565
+ return this.w1x_1;
1260
566
  };
1261
- protoOf(KotlinIrEmitter).a1w = function () {
1262
- var packageName = Companion_instance.ds('community.flock.wirespec.kotlin');
1263
- var clientServer = convertClientServer(packageName);
567
+ protoOf(KotlinIrEmitter).h1w = function () {
568
+ var packageName = Companion_instance_0.bs('community.flock.wirespec.kotlin');
569
+ var clientServer = convertClientServer();
1264
570
  // Inline function 'community.flock.wirespec.ir.core.transform' call
1265
571
  var this_0 = convert(packageName);
1266
572
  var scope = new TransformScope(this_0);
1267
573
  // Inline function 'community.flock.wirespec.ir.core.TransformScope.matchingElements' call
1268
574
  var tmp = scope;
1269
575
  // Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
1270
- var this_1 = scope.j1v_1;
576
+ var this_1 = scope.q1v_1;
1271
577
  // Inline function 'community.flock.wirespec.ir.core.transformer' call
1272
578
  // Inline function 'kotlin.apply' call
1273
579
  var this_2 = new TransformerBuilder();
1274
- this_2.c1j(KotlinIrEmitter$emitShared$lambda);
1275
- var tmp$ret$2 = this_2.d1j();
1276
- tmp.j1v_1 = transform(this_1, tmp$ret$2);
580
+ this_2.k1i(KotlinIrEmitter$emitShared$lambda);
581
+ var tmp$ret$2 = this_2.l1i();
582
+ tmp.q1v_1 = transform(this_1, tmp$ret$2);
1277
583
  // Inline function 'community.flock.wirespec.ir.core.TransformScope.injectAfter' call
1278
584
  var tmp_0 = scope;
1279
585
  // Inline function 'community.flock.wirespec.ir.core.injectAfter' call
1280
586
  // Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
1281
- var this_3 = scope.j1v_1;
587
+ var this_3 = scope.q1v_1;
1282
588
  // Inline function 'community.flock.wirespec.ir.core.transformer' call
1283
589
  // Inline function 'kotlin.apply' call
1284
590
  var this_4 = new TransformerBuilder();
1285
- this_4.c1j(KotlinIrEmitter$emitShared$lambda_0(clientServer));
1286
- var tmp$ret$7 = this_4.d1j();
1287
- tmp_0.j1v_1 = transform(this_3, tmp$ret$7);
1288
- var tmp_1 = scope.j1v_1;
591
+ this_4.k1i(KotlinIrEmitter$emitShared$lambda_0(clientServer));
592
+ var tmp$ret$7 = this_4.l1i();
593
+ tmp_0.q1v_1 = transform(this_3, tmp$ret$7);
594
+ var tmp_1 = scope.q1v_1;
1289
595
  var wirespecShared = isInterface(tmp_1, Element) ? tmp_1 : THROW_CCE();
1290
596
  var tmp_2;
1291
- if (this.m1y_1.xo_1) {
1292
- tmp_2 = wirespecShared;
597
+ if (this.u1x_1.gp_1) {
598
+ tmp_2 = withExplicitVisibility(this, wirespecShared);
1293
599
  } else {
1294
600
  tmp_2 = null;
1295
601
  }
1296
602
  return tmp_2;
1297
603
  };
1298
- protoOf(KotlinIrEmitter).mr = function (definition, module_0, logger) {
1299
- var file = emit_0.call(this, definition, module_0, logger);
604
+ protoOf(KotlinIrEmitter).fr = function (definition, module_0, logger) {
605
+ var file = emit.call(this, definition, module_0, logger);
1300
606
  // Inline function 'kotlin.takeIf' call
1301
- var this_0 = this.p1y_1;
607
+ var this_0 = this.x1x_1;
1302
608
  var tmp;
1303
- if (Companion_instance_1.ir(module_0)) {
609
+ if (Companion_instance.yq(module_0)) {
1304
610
  tmp = this_0;
1305
611
  } else {
1306
612
  tmp = null;
1307
613
  }
1308
614
  var tmp$ret$1 = tmp;
1309
- return placeInPackage(prependImports(file, tmp$ret$1), this.x1w(), definition);
615
+ return placeInPackage(prependImports(file, tmp$ret$1), this.s1x(), definition);
1310
616
  };
1311
- protoOf(KotlinIrEmitter).f1w = function (definition, module_0) {
617
+ protoOf(KotlinIrEmitter).m1w = function (definition, module_0) {
1312
618
  var tmp;
1313
619
  if (definition instanceof Type) {
1314
620
  tmp = convertToGenerator_2(definition, module_0);
1315
621
  } else {
1316
- if (definition instanceof Enum) {
622
+ if (definition instanceof Enum_0) {
1317
623
  tmp = convertToGenerator_1(definition);
1318
624
  } else {
1319
625
  if (definition instanceof Refined) {
1320
626
  tmp = convertToGenerator_0(definition);
1321
627
  } else {
1322
- if (definition instanceof Union) {
628
+ if (definition instanceof Union_0) {
1323
629
  tmp = convertToGenerator(definition);
1324
630
  } else {
1325
631
  return null;
@@ -1329,29 +635,29 @@ protoOf(KotlinIrEmitter).f1w = function (definition, module_0) {
1329
635
  }
1330
636
  var generatorFile = tmp;
1331
637
  var sanitized = sanitizeNames(generatorFile, _get_sanitizationConfig__sns434(this));
1332
- var generatorOwnName = definition.nr().l1() + 'Generator';
1333
- var tmp_0 = asSequence_0(collectCustomTypeNames(sanitized));
638
+ var generatorOwnName = definition.gr().m1() + 'Generator';
639
+ var tmp_0 = asSequence(collectCustomTypeNames(sanitized));
1334
640
  var tmp_1 = filterNot(tmp_0, KotlinIrEmitter$emitGenerator$lambda);
1335
641
  var tmp_2 = filterNot(tmp_1, KotlinIrEmitter$emitGenerator$lambda_0(generatorOwnName));
1336
- var tmp_3 = distinct_0(map(tmp_2, KotlinIrEmitter$emitGenerator$lambda_1));
642
+ var tmp_3 = distinct(map(tmp_2, KotlinIrEmitter$emitGenerator$lambda_1));
1337
643
  var modelImports = toList(map(tmp_3, KotlinIrEmitter$emitGenerator$lambda_2(this)));
1338
- return placeInPackage_0(prependImports(sanitized, plus_2(this.p1y_1, modelImports)), this.x1w(), 'generator');
644
+ return placeInPackage_0(prependImports(sanitized, plus_0(this.x1x_1, modelImports)), this.s1x(), 'generator');
1339
645
  };
1340
- protoOf(KotlinIrEmitter).lq = function (type, module_0) {
646
+ protoOf(KotlinIrEmitter).vr = function (type, module_0) {
1341
647
  return ensureEmptyStructHasConstructor(sanitizeNames(convertWithValidation(type, module_0), _get_modelSanitizationConfig__vgg831(this)));
1342
648
  };
1343
- protoOf(KotlinIrEmitter).as = function (enum_0, module_0) {
649
+ protoOf(KotlinIrEmitter).tr = function (enum_0, module_0) {
1344
650
  var tmp = sanitizeNames(convert_0(enum_0), _get_sanitizationConfig__sns434(this));
1345
651
  return injectEnumLabelField(tmp, KotlinIrEmitter$emit$lambda(this));
1346
652
  };
1347
- protoOf(KotlinIrEmitter).qr = function (union) {
653
+ protoOf(KotlinIrEmitter).jr = function (union) {
1348
654
  return sanitizeNames(convert_1(union), _get_sanitizationConfig__sns434(this));
1349
655
  };
1350
- protoOf(KotlinIrEmitter).vr = function (refined) {
656
+ protoOf(KotlinIrEmitter).or = function (refined) {
1351
657
  var file = sanitizeNames(convert_2(refined), _get_sanitizationConfig__sns434(this));
1352
658
  // Inline function 'community.flock.wirespec.ir.core.findElement' call
1353
659
  // Inline function 'kotlin.collections.filterIsInstance' call
1354
- var tmp0 = file.b1o();
660
+ var tmp0 = file.u1n();
1355
661
  // Inline function 'kotlin.collections.filterIsInstanceTo' call
1356
662
  var destination = ArrayList_init_$Create$_0();
1357
663
  var _iterator__ex2g4s = tmp0.t();
@@ -1363,13 +669,13 @@ protoOf(KotlinIrEmitter).vr = function (refined) {
1363
669
  }
1364
670
  var tmp0_safe_receiver = firstOrNull_0(destination);
1365
671
  var updatedStruct = tmp0_safe_receiver == null ? null : markMembersAsOverride(tmp0_safe_receiver);
1366
- return new File(Companion_getInstance().s1h(sanitize_0(this, refined.tr_1)), listOfNotNull_0(updatedStruct));
672
+ return new File(Companion_getInstance().x1g(sanitize(this, refined.mr_1)), listOfNotNull(updatedStruct));
1367
673
  };
1368
- protoOf(KotlinIrEmitter).bs = function (endpoint) {
1369
- var imports = buildModelImports(endpoint, this.x1w());
674
+ protoOf(KotlinIrEmitter).ur = function (endpoint) {
675
+ var imports = buildModelImports(endpoint, this.s1x());
1370
676
  // Inline function 'community.flock.wirespec.ir.core.findElement' call
1371
677
  // Inline function 'kotlin.collections.filterIsInstance' call
1372
- var tmp0 = convert_3(endpoint).b1o();
678
+ var tmp0 = convert_3(endpoint).u1n();
1373
679
  // Inline function 'kotlin.collections.filterIsInstanceTo' call
1374
680
  var destination = ArrayList_init_$Create$_0();
1375
681
  var _iterator__ex2g4s = tmp0.t();
@@ -1382,7 +688,7 @@ protoOf(KotlinIrEmitter).bs = function (endpoint) {
1382
688
  var tmp$ret$2 = firstOrNull_0(destination);
1383
689
  var endpointNamespace = ensureNotNull(tmp$ret$2);
1384
690
  var body = injectApiAlias(injectCompanionObject(endpointNamespace, endpoint));
1385
- var tmp = sanitizeNames(new File(Companion_getInstance().s1h(sanitize_0(this, endpoint.vp_1)), listOf(body)), _get_sanitizationConfig__sns434(this));
691
+ var tmp = sanitizeNames(new File(Companion_getInstance().x1g(sanitize(this, endpoint.eq_1)), listOf(body)), _get_sanitizationConfig__sns434(this));
1386
692
  // Inline function 'kotlin.takeIf' call
1387
693
  var tmp_0;
1388
694
  // Inline function 'kotlin.collections.isNotEmpty' call
@@ -1394,10 +700,10 @@ protoOf(KotlinIrEmitter).bs = function (endpoint) {
1394
700
  var tmp$ret$5 = tmp_0;
1395
701
  return prependImports(tmp, tmp$ret$5);
1396
702
  };
1397
- protoOf(KotlinIrEmitter).pr = function (channel) {
703
+ protoOf(KotlinIrEmitter).ir = function (channel) {
1398
704
  var tmp = sanitizeNames(convert_4(channel), _get_sanitizationConfig__sns434(this));
1399
705
  // Inline function 'kotlin.takeIf' call
1400
- var this_0 = buildModelImports(channel, this.x1w());
706
+ var this_0 = buildModelImports(channel, this.s1x());
1401
707
  var tmp_0;
1402
708
  // Inline function 'kotlin.collections.isNotEmpty' call
1403
709
  if (!this_0.r()) {
@@ -1408,25 +714,25 @@ protoOf(KotlinIrEmitter).pr = function (channel) {
1408
714
  var tmp$ret$2 = tmp_0;
1409
715
  return prependImports(tmp, tmp$ret$2);
1410
716
  };
1411
- protoOf(KotlinIrEmitter).e1w = function (endpoint) {
1412
- var imports = buildModelImports(endpoint, this.x1w());
1413
- var endpointImport = import_0(this.x1w().es_1 + '.endpoint', endpoint.vp_1.l1());
717
+ protoOf(KotlinIrEmitter).l1w = function (endpoint) {
718
+ var imports = buildModelImports(endpoint, this.s1x());
719
+ var endpointImport = import_0(this.s1x().cs_1 + '.endpoint', endpoint.eq_1.m1());
1414
720
  var file = sanitizeNames(emitEndpointClient.call(this, endpoint), _get_sanitizationConfig__sns434(this));
1415
- var subPackageName = plus_0(this.x1w(), 'client');
1416
- var tmp = Companion_getInstance().s1h(subPackageName.gs() + file.z1n_1.t1h());
721
+ var subPackageName = plus_1(this.s1x(), 'client');
722
+ var tmp = Companion_getInstance().x1g(subPackageName.es() + file.s1n_1.y1g());
1417
723
  // Inline function 'kotlin.collections.buildList' call
1418
724
  // Inline function 'kotlin.collections.buildListInternal' call
1419
725
  // Inline function 'kotlin.apply' call
1420
726
  var this_0 = ArrayList_init_$Create$_0();
1421
- this_0.x(new Package(subPackageName.es_1));
1422
- this_0.f1(this.p1y_1);
1423
- this_0.f1(imports);
727
+ this_0.x(new Package(subPackageName.cs_1));
728
+ this_0.g1(this.x1x_1);
729
+ this_0.g1(imports);
1424
730
  this_0.x(endpointImport);
1425
- this_0.f1(file.a1o_1);
1426
- var tmp$ret$3 = this_0.o5();
731
+ this_0.g1(file.t1n_1);
732
+ var tmp$ret$3 = this_0.p5();
1427
733
  return new File(tmp, tmp$ret$3);
1428
734
  };
1429
- protoOf(KotlinIrEmitter).b1w = function (endpoints, logger) {
735
+ protoOf(KotlinIrEmitter).i1w = function (endpoints, logger) {
1430
736
  // Inline function 'kotlin.collections.flatMap' call
1431
737
  // Inline function 'kotlin.collections.flatMapTo' call
1432
738
  var destination = ArrayList_init_$Create$_0();
@@ -1442,7 +748,7 @@ protoOf(KotlinIrEmitter).b1w = function (endpoints, logger) {
1442
748
  var _iterator__ex2g4s_0 = destination.t();
1443
749
  while (_iterator__ex2g4s_0.u()) {
1444
750
  var e = _iterator__ex2g4s_0.v();
1445
- var key = e.cv_1;
751
+ var key = e.dv_1;
1446
752
  if (set.x(key)) {
1447
753
  list_0.x(e);
1448
754
  }
@@ -1453,7 +759,7 @@ protoOf(KotlinIrEmitter).b1w = function (endpoints, logger) {
1453
759
  var _iterator__ex2g4s_1 = list_0.t();
1454
760
  while (_iterator__ex2g4s_1.u()) {
1455
761
  var item = _iterator__ex2g4s_1.v();
1456
- var tmp$ret$5 = import_0(this.x1w().es_1 + '.model', item.cv_1);
762
+ var tmp$ret$5 = import_0(this.s1x().cs_1 + '.model', item.dv_1);
1457
763
  destination_0.x(tmp$ret$5);
1458
764
  }
1459
765
  var imports = destination_0;
@@ -1463,7 +769,7 @@ protoOf(KotlinIrEmitter).b1w = function (endpoints, logger) {
1463
769
  var _iterator__ex2g4s_2 = endpoints.t();
1464
770
  while (_iterator__ex2g4s_2.u()) {
1465
771
  var item_0 = _iterator__ex2g4s_2.v();
1466
- var tmp$ret$8 = import_0(this.x1w().es_1 + '.endpoint', item_0.vp_1.l1());
772
+ var tmp$ret$8 = import_0(this.s1x().cs_1 + '.endpoint', item_0.eq_1.m1());
1467
773
  destination_1.x(tmp$ret$8);
1468
774
  }
1469
775
  var endpointImports = destination_1;
@@ -1473,22 +779,22 @@ protoOf(KotlinIrEmitter).b1w = function (endpoints, logger) {
1473
779
  var _iterator__ex2g4s_3 = endpoints.t();
1474
780
  while (_iterator__ex2g4s_3.u()) {
1475
781
  var item_1 = _iterator__ex2g4s_3.v();
1476
- var tmp$ret$11 = import_0(this.x1w().es_1 + '.client', item_1.vp_1.l1() + 'Client');
782
+ var tmp$ret$11 = import_0(this.s1x().cs_1 + '.client', item_1.eq_1.m1() + 'Client');
1477
783
  destination_2.x(tmp$ret$11);
1478
784
  }
1479
785
  var clientImports = destination_2;
1480
- var allImports = plus_2(plus_2(imports, endpointImports), clientImports);
786
+ var allImports = plus_0(plus_0(imports, endpointImports), clientImports);
1481
787
  var file = sanitizeNames(emitClient.call(this, endpoints, logger), _get_sanitizationConfig__sns434(this));
1482
- var tmp = Companion_getInstance().s1h(this.x1w().gs() + file.z1n_1.t1h());
788
+ var tmp = Companion_getInstance().x1g(this.s1x().es() + file.s1n_1.y1g());
1483
789
  // Inline function 'kotlin.collections.buildList' call
1484
790
  // Inline function 'kotlin.collections.buildListInternal' call
1485
791
  // Inline function 'kotlin.apply' call
1486
792
  var this_0 = ArrayList_init_$Create$_0();
1487
- this_0.x(new Package(this.x1w().es_1));
1488
- this_0.f1(this.p1y_1);
1489
- this_0.f1(allImports);
1490
- this_0.f1(file.a1o_1);
1491
- var tmp$ret$17 = this_0.o5();
793
+ this_0.x(new Package(this.s1x().cs_1));
794
+ this_0.g1(this.x1x_1);
795
+ this_0.g1(allImports);
796
+ this_0.g1(file.t1n_1);
797
+ var tmp$ret$17 = this_0.p5();
1492
798
  return new File(tmp, tmp$ret$17);
1493
799
  };
1494
800
  function buildModelImports(_this__u8e3s4, packageName) {
@@ -1499,7 +805,7 @@ function buildModelImports(_this__u8e3s4, packageName) {
1499
805
  var _iterator__ex2g4s = this_0.t();
1500
806
  while (_iterator__ex2g4s.u()) {
1501
807
  var e = _iterator__ex2g4s.v();
1502
- var key = e.cv_1;
808
+ var key = e.dv_1;
1503
809
  if (set.x(key)) {
1504
810
  list.x(e);
1505
811
  }
@@ -1510,7 +816,7 @@ function buildModelImports(_this__u8e3s4, packageName) {
1510
816
  var _iterator__ex2g4s_0 = list.t();
1511
817
  while (_iterator__ex2g4s_0.u()) {
1512
818
  var item = _iterator__ex2g4s_0.v();
1513
- var tmp$ret$2 = import_0(packageName.es_1 + '.model', Companion_getInstance().s1h(item.cv_1).t1h());
819
+ var tmp$ret$2 = import_0(packageName.cs_1 + '.model', Companion_getInstance().x1g(item.dv_1).y1g());
1514
820
  destination.x(tmp$ret$2);
1515
821
  }
1516
822
  return destination;
@@ -1522,14 +828,14 @@ function injectApiAlias(_this__u8e3s4) {
1522
828
  var tmp = scope;
1523
829
  // Inline function 'community.flock.wirespec.ir.core.injectAfter' call
1524
830
  // Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
1525
- var this_0 = scope.j1v_1;
831
+ var this_0 = scope.q1v_1;
1526
832
  // Inline function 'community.flock.wirespec.ir.core.transformer' call
1527
833
  // Inline function 'kotlin.apply' call
1528
834
  var this_1 = new TransformerBuilder();
1529
- this_1.c1j(injectApiAlias$lambda);
1530
- var tmp$ret$2 = this_1.d1j();
1531
- tmp.j1v_1 = transform(this_0, tmp$ret$2);
1532
- var tmp_0 = scope.j1v_1;
835
+ this_1.k1i(injectApiAlias$lambda);
836
+ var tmp$ret$2 = this_1.l1i();
837
+ tmp.q1v_1 = transform(this_0, tmp$ret$2);
838
+ var tmp_0 = scope.q1v_1;
1533
839
  return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
1534
840
  }
1535
841
  function injectCompanionObject(_this__u8e3s4, endpoint) {
@@ -1539,20 +845,20 @@ function injectCompanionObject(_this__u8e3s4, endpoint) {
1539
845
  var tmp = scope;
1540
846
  // Inline function 'community.flock.wirespec.ir.core.injectAfter' call
1541
847
  // Inline function 'community.flock.wirespec.ir.core.transformMatchingElements' call
1542
- var this_0 = scope.j1v_1;
848
+ var this_0 = scope.q1v_1;
1543
849
  // Inline function 'community.flock.wirespec.ir.core.transformer' call
1544
850
  // Inline function 'kotlin.apply' call
1545
851
  var this_1 = new TransformerBuilder();
1546
- this_1.c1j(injectCompanionObject$lambda(endpoint));
1547
- var tmp$ret$2 = this_1.d1j();
1548
- tmp.j1v_1 = transform(this_0, tmp$ret$2);
1549
- var tmp_0 = scope.j1v_1;
852
+ this_1.k1i(injectCompanionObject$lambda(endpoint));
853
+ var tmp$ret$2 = this_1.l1i();
854
+ tmp.q1v_1 = transform(this_0, tmp$ret$2);
855
+ var tmp_0 = scope.q1v_1;
1550
856
  return isInterface(tmp_0, Element) ? tmp_0 : THROW_CCE();
1551
857
  }
1552
858
  function buildCompanionObject(endpoint) {
1553
- var pathTemplate = '/' + joinToString(endpoint.xp_1, '/', VOID, VOID, VOID, VOID, buildCompanionObject$lambda);
859
+ var pathTemplate = '/' + joinToString(endpoint.gq_1, '/', VOID, VOID, VOID, VOID, buildCompanionObject$lambda);
1554
860
  // Inline function 'kotlin.let' call
1555
- var p0 = trimMargin('\n |companion object: Wirespec.Server<Request, Response<*>>, Wirespec.Client<Request, Response<*>> {\n | override val pathTemplate = "' + pathTemplate + '"\n | override val method = "' + endpoint.wp_1.toString() + '"\n | override fun server(serialization: Wirespec.Serialization) = object : Wirespec.ServerEdge<Request, Response<*>> {\n | override fun from(request: Wirespec.RawRequest) = fromRawRequest(serialization, request)\n | override fun to(response: Response<*>) = toRawResponse(serialization, response)\n | }\n | override fun client(serialization: Wirespec.Serialization) = object : Wirespec.ClientEdge<Request, Response<*>> {\n | override fun to(request: Request) = toRawRequest(serialization, request)\n | override fun from(response: Wirespec.RawResponse) = fromRawResponse(serialization, response)\n | }\n |}\n ');
861
+ var p0 = trimMargin('\n |companion object: Wirespec.Server<Request, Response<*>>, Wirespec.Client<Request, Response<*>> {\n | override val pathTemplate = "' + pathTemplate + '"\n | override val method = "' + endpoint.fq_1.toString() + '"\n | override fun server(serialization: Wirespec.Serialization) = object : Wirespec.ServerEdge<Request, Response<*>> {\n | override fun from(request: Wirespec.RawRequest) = fromRawRequest(serialization, request)\n | override fun to(response: Response<*>) = toRawResponse(serialization, response)\n | }\n | override fun client(serialization: Wirespec.Serialization) = object : Wirespec.ClientEdge<Request, Response<*>> {\n | override fun to(request: Request) = toRawRequest(serialization, request)\n | override fun from(response: Wirespec.RawResponse) = fromRawResponse(serialization, response)\n | }\n |}\n ');
1556
862
  return raw(p0);
1557
863
  }
1558
864
  function injectApiAlias$lambda(element, transformer) {
@@ -1562,7 +868,36 @@ function injectApiAlias$lambda(element, transformer) {
1562
868
  var tmp_0;
1563
869
  // Inline function 'kotlin.collections.isNotEmpty' call
1564
870
  if (!injected.r()) {
1565
- tmp_0 = withElements(element, plus_2(element.b1o(), injected));
871
+ // Inline function 'community.flock.wirespec.ir.core.withElements' call
872
+ var elements = plus_0(element.u1n(), injected);
873
+ var tmp_1;
874
+ if (element instanceof File) {
875
+ tmp_1 = element.w1n(VOID, elements);
876
+ } else {
877
+ if (element instanceof Struct) {
878
+ tmp_1 = element.d1q(VOID, VOID, VOID, VOID, elements);
879
+ } else {
880
+ if (element instanceof Namespace) {
881
+ tmp_1 = element.d1o(VOID, elements);
882
+ } else {
883
+ if (element instanceof Interface) {
884
+ tmp_1 = element.m1o(VOID, elements);
885
+ } else {
886
+ if (element instanceof Enum) {
887
+ tmp_1 = element.r1p(VOID, VOID, VOID, VOID, VOID, elements);
888
+ } else {
889
+ if (element instanceof Main) {
890
+ tmp_1 = element;
891
+ } else {
892
+ tmp_1 = element;
893
+ }
894
+ }
895
+ }
896
+ }
897
+ }
898
+ }
899
+ var tmp_2 = tmp_1;
900
+ tmp_0 = tmp_2 instanceof Namespace ? tmp_2 : THROW_CCE();
1566
901
  } else {
1567
902
  tmp_0 = element;
1568
903
  }
@@ -1577,11 +912,40 @@ function injectCompanionObject$lambda($endpoint) {
1577
912
  return function (element, transformer) {
1578
913
  var tmp;
1579
914
  if (element instanceof Interface) {
1580
- var injected = element.t1o_1.equals(Companion_getInstance().s1h('Handler')) ? listOf(buildCompanionObject($endpoint)) : emptyList();
915
+ var injected = element.e1o_1.equals(Companion_getInstance().x1g('Handler')) ? listOf(buildCompanionObject($endpoint)) : emptyList();
1581
916
  var tmp_0;
1582
917
  // Inline function 'kotlin.collections.isNotEmpty' call
1583
918
  if (!injected.r()) {
1584
- tmp_0 = withElements(element, plus_2(element.b1o(), injected));
919
+ // Inline function 'community.flock.wirespec.ir.core.withElements' call
920
+ var elements = plus_0(element.u1n(), injected);
921
+ var tmp_1;
922
+ if (element instanceof File) {
923
+ tmp_1 = element.w1n(VOID, elements);
924
+ } else {
925
+ if (element instanceof Struct) {
926
+ tmp_1 = element.d1q(VOID, VOID, VOID, VOID, elements);
927
+ } else {
928
+ if (element instanceof Namespace) {
929
+ tmp_1 = element.d1o(VOID, elements);
930
+ } else {
931
+ if (element instanceof Interface) {
932
+ tmp_1 = element.m1o(VOID, elements);
933
+ } else {
934
+ if (element instanceof Enum) {
935
+ tmp_1 = element.r1p(VOID, VOID, VOID, VOID, VOID, elements);
936
+ } else {
937
+ if (element instanceof Main) {
938
+ tmp_1 = element;
939
+ } else {
940
+ tmp_1 = element;
941
+ }
942
+ }
943
+ }
944
+ }
945
+ }
946
+ }
947
+ var tmp_2 = tmp_1;
948
+ tmp_0 = tmp_2 instanceof Interface ? tmp_2 : THROW_CCE();
1585
949
  } else {
1586
950
  tmp_0 = element;
1587
951
  }
@@ -1596,87 +960,24 @@ function injectCompanionObject$lambda($endpoint) {
1596
960
  function buildCompanionObject$lambda(it) {
1597
961
  var tmp;
1598
962
  if (it instanceof Literal) {
1599
- tmp = it.yq_1;
963
+ tmp = it.tt_1;
1600
964
  } else {
1601
965
  if (it instanceof Param) {
1602
- tmp = '{' + it.cq_1.l1() + '}';
966
+ tmp = '{' + it.lq_1.m1() + '}';
1603
967
  } else {
1604
968
  noWhenBranchMatchedException();
1605
969
  }
1606
970
  }
1607
971
  return tmp;
1608
972
  }
1609
- function KotlinRefinedTypeDefinitionEmitter() {
1610
- }
1611
- function KotlinShared() {
1612
- KotlinShared_instance = this;
1613
- this.e1y_1 = 'community.flock.wirespec.kotlin';
1614
- this.f1y_1 = trimMargin('\n |package ' + this.e1y_1 + '\n |\n |import kotlin.reflect.KType\n |\n |object Wirespec {\n |' + Spacer_instance.toString() + 'interface Enum { val label: String }\n |' + Spacer_instance.toString() + 'interface Endpoint\n |' + Spacer_instance.toString() + 'interface Refined<T> {\n |' + Spacer_instance.is(2) + 'val value: T\n |' + Spacer_instance.is(2) + 'fun validate(): Boolean\n |' + Spacer_instance.toString() + '}\n |' + Spacer_instance.toString() + 'interface Path\n |' + Spacer_instance.toString() + 'interface Queries\n |' + Spacer_instance.toString() + 'interface Headers\n |' + Spacer_instance.toString() + 'interface Handler\n |' + Spacer_instance.toString() + 'interface ServerEdge<Req: Request<*>, Res: Response<*>> { \n |' + Spacer_instance.toString() + 'fun from(request: RawRequest): Req \n |' + Spacer_instance.toString() + 'fun to(response: Res): RawResponse\n |' + Spacer_instance.toString() + '}\n |' + Spacer_instance.toString() + 'interface ClientEdge<Req: Request<*>, Res: Response<*>> { \n |' + Spacer_instance.is(2) + 'fun to(request: Req): RawRequest\n |' + Spacer_instance.is(2) + 'fun from(response: RawResponse): Res\n |' + Spacer_instance.toString() + '}\n |' + Spacer_instance.toString() + 'interface Client<Req : Request<*>, Res : Response<*>> {\n |' + Spacer_instance.is(2) + 'val pathTemplate: String\n |' + Spacer_instance.is(2) + 'val method: String\n |' + Spacer_instance.is(2) + 'fun client(serialization: Serialization): ClientEdge<Req, Res>\n |' + Spacer_instance.toString() + '}\n |' + Spacer_instance.toString() + 'interface Server<Req : Request<*>, Res : Response<*>> {\n |' + Spacer_instance.is(2) + 'val pathTemplate: String\n |' + Spacer_instance.is(2) + 'val method: String\n |' + Spacer_instance.is(2) + 'fun server(serialization: Serialization): ServerEdge<Req, Res>\n |' + Spacer_instance.toString() + '}\n |' + Spacer_instance.toString() + 'enum class Method { GET, PUT, POST, DELETE, OPTIONS, HEAD, PATCH, TRACE }\n |' + Spacer_instance.toString() + 'interface Request<T : Any> { val path: Path; val method: Method; val queries: Queries; val headers: Headers; val body: T; interface Headers : Wirespec.Headers }\n |' + Spacer_instance.toString() + 'interface Response<T : Any> { val status: Int; val headers: Headers; val body: T; interface Headers : Wirespec.Headers }\n |' + Spacer_instance.toString() + 'interface Serialization : Serializer, Deserializer\n |' + Spacer_instance.toString() + 'interface Serializer : BodySerializer, PathSerializer, ParamSerializer\n |' + Spacer_instance.toString() + 'interface Deserializer : BodyDeserializer, PathDeserializer, ParamDeserializer\n |' + Spacer_instance.toString() + 'interface BodySerialization : BodySerializer, BodyDeserializer\n |' + Spacer_instance.toString() + 'interface BodySerializer { fun <T : Any> serializeBody(t: T, kType: KType): ByteArray }\n |' + Spacer_instance.toString() + 'interface BodyDeserializer { fun <T : Any> deserializeBody(raw: ByteArray, kType: KType): T }\n |' + Spacer_instance.toString() + 'interface PathSerialization : PathSerializer, PathDeserializer\n |' + Spacer_instance.toString() + 'interface PathSerializer { fun <T : Any> serializePath(t: T, kType: KType): String }\n |' + Spacer_instance.toString() + 'interface PathDeserializer { fun <T : Any> deserializePath(raw: String, kType: KType): T }\n |' + Spacer_instance.toString() + 'interface ParamSerialization : ParamSerializer, ParamDeserializer\n |' + Spacer_instance.toString() + 'interface ParamSerializer { fun <T : Any> serializeParam(value: T, kType: KType): List<String> }\n |' + Spacer_instance.toString() + 'interface ParamDeserializer { fun <T : Any> deserializeParam(values: List<String>, kType: KType): T }\n |' + Spacer_instance.toString() + 'data class RawRequest(val method: String, val path: List<String>, val queries: Map<String, List<String>>, val headers: Map<String, List<String>>, val body: ByteArray?) \n |' + Spacer_instance.toString() + 'data class RawResponse(val statusCode: Int, val headers: Map<String, List<String>>, val body: ByteArray?)\n |}\n ');
1615
- }
1616
- protoOf(KotlinShared).toString = function () {
1617
- return 'KotlinShared';
1618
- };
1619
- protoOf(KotlinShared).hashCode = function () {
1620
- return -563306154;
1621
- };
1622
- protoOf(KotlinShared).equals = function (other) {
1623
- if (this === other)
1624
- return true;
1625
- if (!(other instanceof KotlinShared))
1626
- return false;
1627
- return true;
1628
- };
1629
- var KotlinShared_instance;
1630
- function KotlinShared_getInstance() {
1631
- if (KotlinShared_instance == null)
1632
- new KotlinShared();
1633
- return KotlinShared_instance;
1634
- }
1635
- function KotlinTypeDefinitionEmitter$emit$lambda(this$0) {
1636
- return function (it) {
1637
- return this$0.oq(it);
1638
- };
1639
- }
1640
- function KotlinTypeDefinitionEmitter$emit$lambda_0(this$0) {
1641
- return function (it) {
1642
- return Spacer_instance.toString() + 'val ' + this$0.nq(it) + ',';
1643
- };
1644
- }
1645
- function KotlinTypeDefinitionEmitter() {
1646
- }
1647
- function KotlinUnionDefinitionEmitter() {
1648
- }
1649
973
  //region block: post-declaration
1650
- protoOf(KotlinEmitter).lq = emit_4;
1651
- protoOf(KotlinEmitter).mq = emit_5;
1652
- protoOf(KotlinEmitter).nq = emit_6;
1653
- protoOf(KotlinEmitter).oq = emit_7;
1654
- protoOf(KotlinEmitter).pq = emit_8;
1655
- protoOf(KotlinEmitter).as = emit_10;
1656
- protoOf(KotlinEmitter).vr = emit_12;
1657
- protoOf(KotlinEmitter).bs = emit_13;
1658
- protoOf(KotlinEmitter).qr = emit_11;
1659
- protoOf(KotlinEmitter).or = emit_3;
1660
- protoOf(KotlinEmitter).pr = emit_9;
1661
- protoOf(KotlinEmitter).k1x = emit_14;
1662
- protoOf(KotlinEmitter).l1x = emit_15;
1663
- protoOf(KotlinEmitter).cs = emitValidator;
1664
- protoOf(KotlinEmitter).x1x = sanitize;
1665
- protoOf(KotlinEmitter).m1x = sanitizeFirstIsDigit;
1666
- protoOf(KotlinEmitter).n1x = sanitizeKeywords;
1667
- protoOf(KotlinEmitter).o1x = emitHandleFunction;
1668
- protoOf(KotlinEmitter).g1y = emitRequestHeaders;
1669
- protoOf(KotlinEmitter).h1y = emitQueries;
1670
- protoOf(KotlinEmitter).i1y = emitBody;
1671
- protoOf(KotlinEmitter).j1y = emitHeaders;
1672
- protoOf(KotlinIrEmitter).y1v = get_extensions;
1673
- protoOf(KotlinIrEmitter).eo = emit_1;
1674
- protoOf(KotlinIrEmitter).z1v = emit_2;
1675
- protoOf(KotlinIrEmitter).d1w = beforeGenerate;
974
+ protoOf(KotlinIrEmitter).f1w = get_extensions;
975
+ protoOf(KotlinIrEmitter).no = emit_0;
976
+ protoOf(KotlinIrEmitter).g1w = emit_1;
977
+ protoOf(KotlinIrEmitter).k1w = beforeGenerate;
1676
978
  //endregion
1677
979
  //region block: exports
1678
980
  export {
1679
- KotlinEmitter as KotlinEmitterddb8247fx90i,
1680
981
  KotlinIrEmitter as KotlinIrEmitterbehcpsqpuupy,
1681
982
  };
1682
983
  //endregion