@flock/wirespec 0.21.1 → 0.22.1

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 (66) hide show
  1. package/arrow-arrow-atomic.mjs +14 -14
  2. package/arrow-arrow-atomic.mjs.map +1 -1
  3. package/arrow-arrow-core.mjs +187 -182
  4. package/arrow-arrow-core.mjs.map +1 -1
  5. package/clikt-clikt-mordant.mjs +89 -89
  6. package/clikt-clikt-mordant.mjs.map +1 -1
  7. package/clikt-clikt.mjs +1704 -1706
  8. package/clikt-clikt.mjs.map +1 -1
  9. package/colormath-root-colormath.mjs +465 -465
  10. package/colormath-root-colormath.mjs.map +1 -1
  11. package/kotlin-kotlin-stdlib.mjs +2644 -2481
  12. package/kotlin-kotlin-stdlib.mjs.map +1 -1
  13. package/kotlin-openapi-bindings.mjs +10373 -10346
  14. package/kotlin-openapi-bindings.mjs.map +1 -1
  15. package/kotlin-rgxgen.mjs +1851 -1855
  16. package/kotlin-rgxgen.mjs.map +1 -1
  17. package/kotlinx-io-kotlinx-io-core.mjs +469 -469
  18. package/kotlinx-io-kotlinx-io-core.mjs.map +1 -1
  19. package/kotlinx-serialization-kotlinx-serialization-core.mjs +2038 -2046
  20. package/kotlinx-serialization-kotlinx-serialization-core.mjs.map +1 -1
  21. package/kotlinx-serialization-kotlinx-serialization-json.mjs +1859 -1813
  22. package/kotlinx-serialization-kotlinx-serialization-json.mjs.map +1 -1
  23. package/mordant-mordant.mjs +1452 -1447
  24. package/mordant-mordant.mjs.map +1 -1
  25. package/package.json +1 -1
  26. package/wirespec-src-compiler-core.mjs +25964 -3598
  27. package/wirespec-src-compiler-core.mjs.map +1 -1
  28. package/wirespec-src-compiler-emitters-java.mjs +373 -469
  29. package/wirespec-src-compiler-emitters-java.mjs.map +1 -1
  30. package/wirespec-src-compiler-emitters-kotlin.mjs +327 -382
  31. package/wirespec-src-compiler-emitters-kotlin.mjs.map +1 -1
  32. package/wirespec-src-compiler-emitters-python.mjs +355 -354
  33. package/wirespec-src-compiler-emitters-python.mjs.map +1 -1
  34. package/wirespec-src-compiler-emitters-rust.mjs +756 -754
  35. package/wirespec-src-compiler-emitters-rust.mjs.map +1 -1
  36. package/wirespec-src-compiler-emitters-scala.mjs +361 -361
  37. package/wirespec-src-compiler-emitters-scala.mjs.map +1 -1
  38. package/wirespec-src-compiler-emitters-typescript.mjs +484 -472
  39. package/wirespec-src-compiler-emitters-typescript.mjs.map +1 -1
  40. package/wirespec-src-compiler-emitters-wirespec.mjs +434 -153
  41. package/wirespec-src-compiler-emitters-wirespec.mjs.map +1 -1
  42. package/wirespec-src-compiler-lib.mjs +978 -441
  43. package/wirespec-src-compiler-lib.mjs.map +1 -1
  44. package/wirespec-src-converter-asyncapi.mjs +5382 -0
  45. package/wirespec-src-converter-asyncapi.mjs.map +1 -0
  46. package/wirespec-src-converter-avro.mjs +1297 -725
  47. package/wirespec-src-converter-avro.mjs.map +1 -1
  48. package/wirespec-src-converter-common.mjs +267 -0
  49. package/wirespec-src-converter-common.mjs.map +1 -1
  50. package/wirespec-src-converter-graphql.mjs +5691 -0
  51. package/wirespec-src-converter-graphql.mjs.map +1 -0
  52. package/wirespec-src-converter-openapi.mjs +1304 -1225
  53. package/wirespec-src-converter-openapi.mjs.map +1 -1
  54. package/wirespec-src-ide-lsp.mjs +1728 -1642
  55. package/wirespec-src-ide-lsp.mjs.map +1 -1
  56. package/wirespec-src-plugin-arguments.mjs +301 -240
  57. package/wirespec-src-plugin-arguments.mjs.map +1 -1
  58. package/wirespec-src-plugin-cli.mjs +161 -133
  59. package/wirespec-src-plugin-cli.mjs.map +1 -1
  60. package/wirespec-src-plugin-npm.d.mts +216 -29
  61. package/wirespec-src-plugin-npm.mjs +188 -95
  62. package/wirespec-src-plugin-npm.mjs.map +1 -1
  63. package/wirespec-src-tools-generator.mjs +61 -53
  64. package/wirespec-src-tools-generator.mjs.map +1 -1
  65. package/wirespec-src-compiler-ir.mjs +0 -18912
  66. package/wirespec-src-compiler-ir.mjs.map +0 -1
@@ -2,46 +2,67 @@ import {
2
2
  protoOf180f3jzyo7rfj as protoOf,
3
3
  initMetadataForInterface1egvbzx539z91 as initMetadataForInterface,
4
4
  VOID3gxj6tk5isa35 as VOID,
5
+ isInterface3d6p8outrmvmk as isInterface,
6
+ emptyList1g2z5xcrvp2zy as emptyList,
5
7
  collectionSizeOrDefault36dulx8yinfqm as collectionSizeOrDefault,
6
- ArrayList_init_$Create$3ivpeip4ouddx as ArrayList_init_$Create$,
7
- Unit_instance28fytmsmm6r23 as Unit_instance,
8
+ ArrayList_init_$Create$2byt5m5yn22yy as ArrayList_init_$Create$,
9
+ Unit_instancev9v8hjid95df as Unit_instance,
10
+ listOfNotNull1v4ggfackvuny as listOfNotNull,
11
+ plus310ted5e4i90h as plus,
8
12
  joinToString1cxrrlmo0chqs as joinToString,
9
13
  listOfvhqybd2zx248 as listOf,
10
14
  noWhenBranchMatchedException2a6r7ubxgky5j as noWhenBranchMatchedException,
11
15
  initMetadataForClassbxx6q50dy2s7 as initMetadataForClass,
12
16
  firstOrNull1982767dljvdy as firstOrNull,
13
17
  trimMarginhyd3fsmh8iev as trimMargin,
14
- charSequenceLength3278n89t01tmv as charSequenceLength,
15
- charCodeAt1yspne1d8erbm as charCodeAt,
16
- toString3dhdjl9yf50de as toString,
17
- toString1pkumu07cwy4m as toString_0,
18
- substring3saq8ornu0luv as substring,
18
+ Regex_init_$Create$17zqsmfd15n8x as Regex_init_$Create$,
19
+ toSet2orjxp16sotqu as toSet,
19
20
  setOf45ia9pnfhe90 as setOf,
20
21
  initMetadataForCompanion1wyw17z38v6ac as initMetadataForCompanion,
21
- first3kg261hmihapu as first,
22
- isUpperCase16ivdixranflt as isUpperCase,
22
+ StringBuilder_init_$Create$3ds9zx2kx9u4d as StringBuilder_init_$Create$,
23
+ charCodeAt1yspne1d8erbm as charCodeAt,
24
+ _Char___init__impl__6a9atx2gndcvjvc5pke as _Char___init__impl__6a9atx,
25
+ getOrNull1cdnsfrisdp41 as getOrNull,
26
+ Char19o2r8palgjof as Char,
27
+ toString22rbkbhdb5cl2 as toString,
23
28
  contains3ue2qo8xhmpf1 as contains,
24
29
  equals2au1ep9vhcato as equals,
30
+ replace3le3ie7l9k8aq as replace,
25
31
  } from './kotlin-kotlin-stdlib.mjs';
26
32
  import {
33
+ HasAnnotations19ciafy30ttxa as HasAnnotations,
34
+ Comment3jy4x02mtqi9b as Comment,
27
35
  LanguageEmitterxhzgykhux3qm as LanguageEmitter,
28
- FileExtension_Wirespec_getInstance29avtvqk6h59d as FileExtension_Wirespec_getInstance,
36
+ FileExtension_Wirespec_getInstance3awesett59616 as FileExtension_Wirespec_getInstance,
29
37
  Emitted12h24rpo4uifw as Emitted,
30
38
  Bound2mp7s0560derz as Bound,
31
- _RegExp___get_value__impl__7o76182iqk274prw39c as _RegExp___get_value__impl__7o7618,
39
+ _RegExp___get_value__impl__7o7618olm3t8d4plkj as _RegExp___get_value__impl__7o7618,
32
40
  RegExpiyof7szm5zfu as RegExp_0,
33
- Spacer_instance1p6915grp4mfk as Spacer_instance,
41
+ Spacer_instance2xdqev5aku2zw as Spacer_instance,
34
42
  fixStatus2l9jrn3538wpy as fixStatus,
35
43
  Literal331hu9r04vptz as Literal,
36
44
  Paramvfwnys2w6aj1 as Param,
37
45
  addBackticks1di5q03fw4yhx as addBackticks,
46
+ get_entriesolr3gz3d9pa6 as get_entries,
38
47
  FieldIdentifier34k7iphndcnl0 as FieldIdentifier,
39
48
  DefinitionIdentifiervfasqdb33qef as DefinitionIdentifier,
40
- Bytes_instance1o9u095wd3kx6 as Bytes_instance,
41
- Boolean_instance237vwt01w3hs8 as Boolean_instance,
49
+ Dict1p2r7i6z7n6zc as Dict,
50
+ Array3mbygx5cfsbdr as Array_0,
51
+ Singleuujp8ld3qd71 as Single,
52
+ _Comment___get_value__impl__8r3pla1b4ywrwtg22m7 as _Comment___get_value__impl__8r3pla,
53
+ Bytes_instance1cqd1xiwjq94x as Bytes_instance,
54
+ Boolean_instance15wa4iqeayn6f as Boolean_instance,
42
55
  String1czvr8pxnm6on as String_0,
43
56
  Number1mui0heypwdhp as Number_0,
44
57
  Integer39lqx4uc63u28 as Integer,
58
+ NullValue1yefsnnipmi9o as NullValue,
59
+ EnumValue2b3i6n6mki85b as EnumValue,
60
+ BooleanValue16k4clmclm2vt as BooleanValue,
61
+ NumberValuefyqx55jb6ctt as NumberValue,
62
+ IntegerValue3ck98dwr2y2gy as IntegerValue,
63
+ StringValue1xt3p65w95v1r as StringValue,
64
+ Spread2iwdfqumb33es as Spread,
65
+ Field2nwjpxu9j2svq as Field,
45
66
  Bytes3eoc50vgt1uem as Bytes,
46
67
  Boolean1fpfi8m5jt3fg as Boolean_0,
47
68
  Primitive1i8my14jkp3nk as Primitive,
@@ -49,12 +70,12 @@ import {
49
70
  Anyv7qdq63z63rc as Any,
50
71
  Unit2z95clvxm08vr as Unit,
51
72
  Iterable29qbzfup67wqp as Iterable,
52
- Dict3g7w5wia7rncj as Dict,
73
+ Dict3g7w5wia7rncj as Dict_0,
53
74
  } from './wirespec-src-compiler-core.mjs';
54
75
  import {
55
76
  NonEmptyList3ak25ihy2gcvs as NonEmptyList,
56
- _NonEmptyList___get_all__impl__pmf5092svcdxelgy1aa as _NonEmptyList___get_all__impl__pmf509,
57
- _NonEmptyList___init__impl__fxd0xp3qwfhfa83yk9f as _NonEmptyList___init__impl__fxd0xp,
77
+ _NonEmptyList___get_all__impl__pmf5092xnz0i2teaa6d as _NonEmptyList___get_all__impl__pmf509,
78
+ _NonEmptyList___init__impl__fxd0xprpnd63likgzm as _NonEmptyList___init__impl__fxd0xp,
58
79
  } from './arrow-arrow-core.mjs';
59
80
  //region block: imports
60
81
  //endregion
@@ -63,11 +84,11 @@ function emit(identifier) {
63
84
  var tmp;
64
85
  if (identifier instanceof DefinitionIdentifier) {
65
86
  // Inline function 'kotlin.run' call
66
- tmp = Companion_getInstance().g20_1.v1(identifier.m1()) ? addBackticks(identifier.m1()) : identifier.m1();
87
+ tmp = Companion_getInstance().h22_1.i1(identifier.o1()) ? addBackticks(identifier.o1()) : identifier.o1();
67
88
  } else {
68
89
  if (identifier instanceof FieldIdentifier) {
69
90
  // Inline function 'kotlin.run' call
70
- tmp = Companion_getInstance().g20_1.v1(identifier.m1()) || isUpperCase(first(identifier.m1())) ? addBackticks(identifier.m1()) : identifier.m1();
91
+ tmp = Companion_getInstance().h22_1.i1(identifier.o1()) || !Companion_getInstance().i22_1.rc(identifier.o1()) ? addBackticks(identifier.o1()) : identifier.o1();
71
92
  } else {
72
93
  noWhenBranchMatchedException();
73
94
  }
@@ -75,22 +96,61 @@ function emit(identifier) {
75
96
  return tmp;
76
97
  }
77
98
  initMetadataForInterface(WirespecIdentifierEmitter, 'WirespecIdentifierEmitter');
78
- function emit_0(type, module_0) {
79
- return trimMargin('\n |type ' + this.nr(type.eq_1) + ' {\n |' + this.ds(type.fq_1) + '\n |}\n |');
99
+ function emit_0(_this__u8e3s4) {
100
+ // Inline function 'kotlin.takeIf' call
101
+ var this_0 = _this__u8e3s4.g19_1;
102
+ var tmp;
103
+ // Inline function 'kotlin.collections.isNotEmpty' call
104
+ if (!this_0.r()) {
105
+ tmp = this_0;
106
+ } else {
107
+ tmp = null;
108
+ }
109
+ var tmp0_safe_receiver = tmp;
110
+ var tmp_0;
111
+ if (tmp0_safe_receiver == null) {
112
+ tmp_0 = null;
113
+ } else {
114
+ tmp_0 = joinToString(tmp0_safe_receiver, ', ', '(', ')', VOID, VOID, WirespecMetaDataEmitter$emit$lambda(this));
115
+ }
116
+ // Inline function 'kotlin.text.orEmpty' call
117
+ var tmp0_elvis_lhs = tmp_0;
118
+ var tmp$ret$3 = tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs;
119
+ return '@' + _this__u8e3s4.f19_1 + tmp$ret$3;
80
120
  }
81
121
  function emit_1(_this__u8e3s4) {
82
- return joinToString(_this__u8e3s4.kp_1, ',\n', VOID, VOID, VOID, VOID, WirespecTypeDefinitionEmitter$emit$lambda(this));
122
+ return '/* ' + _Comment___get_value__impl__8r3pla(_this__u8e3s4) + ' */';
83
123
  }
84
- function emit_2(_this__u8e3s4) {
85
- return this.nr(_this__u8e3s4.sp_1) + ': ' + this.fs(_this__u8e3s4.tp_1);
124
+ initMetadataForInterface(WirespecMetaDataEmitter, 'WirespecMetaDataEmitter');
125
+ function emit_2(type, module_0) {
126
+ return trimMargin('\n |type ' + this.ds(type.jp_1) + ' {\n |' + this.us(type.kp_1) + '\n |}\n |');
86
127
  }
87
128
  function emit_3(_this__u8e3s4) {
129
+ return joinToString(_this__u8e3s4.l1c_1, ',\n', VOID, VOID, VOID, VOID, WirespecTypeDefinitionEmitter$emit$lambda(this));
130
+ }
131
+ function emit_4(_this__u8e3s4) {
132
+ return joinToString(_this__u8e3s4.mp_1, '', VOID, VOID, VOID, VOID, WirespecTypeDefinitionEmitter$emit$lambda_0(this)) + emitDeclaration(this, _this__u8e3s4);
133
+ }
134
+ function emit_5(_this__u8e3s4) {
135
+ var tmp;
136
+ if (_this__u8e3s4 instanceof Field) {
137
+ tmp = this.vs(_this__u8e3s4);
138
+ } else {
139
+ if (_this__u8e3s4 instanceof Spread) {
140
+ tmp = '...' + this.ws(_this__u8e3s4.r1c_1);
141
+ } else {
142
+ noWhenBranchMatchedException();
143
+ }
144
+ }
145
+ return tmp;
146
+ }
147
+ function emit_6(_this__u8e3s4) {
88
148
  var tmp;
89
- if (_this__u8e3s4 instanceof Dict) {
90
- tmp = '{ ' + this.fs(_this__u8e3s4.bp_1) + ' }';
149
+ if (_this__u8e3s4 instanceof Dict_0) {
150
+ tmp = '{ ' + this.ws(_this__u8e3s4.aq_1) + ' }';
91
151
  } else {
92
152
  if (_this__u8e3s4 instanceof Iterable) {
93
- tmp = this.fs(_this__u8e3s4.yo_1) + '[]';
153
+ tmp = this.ws(_this__u8e3s4.xp_1) + '[]';
94
154
  } else {
95
155
  if (_this__u8e3s4 instanceof Unit) {
96
156
  tmp = 'Unit';
@@ -99,10 +159,10 @@ function emit_3(_this__u8e3s4) {
99
159
  tmp = 'Any';
100
160
  } else {
101
161
  if (_this__u8e3s4 instanceof Custom) {
102
- tmp = _this__u8e3s4.lv_1;
162
+ tmp = _this__u8e3s4.q18_1;
103
163
  } else {
104
164
  if (_this__u8e3s4 instanceof Primitive) {
105
- var t = _this__u8e3s4.wt_1;
165
+ var t = _this__u8e3s4.s18_1;
106
166
  var tmp_0;
107
167
  if (t instanceof String_0) {
108
168
  tmp_0 = 'String';
@@ -115,7 +175,7 @@ function emit_3(_this__u8e3s4) {
115
175
  } else {
116
176
  if (t instanceof Integer) {
117
177
  var tmp_1;
118
- switch (t.tu_1.c3_1) {
178
+ switch (t.a19_1.e3_1) {
119
179
  case 0:
120
180
  tmp_1 = 'Integer32';
121
181
  break;
@@ -130,7 +190,7 @@ function emit_3(_this__u8e3s4) {
130
190
  } else {
131
191
  if (t instanceof Number_0) {
132
192
  var tmp_2;
133
- switch (t.wu_1.c3_1) {
193
+ switch (t.v18_1.e3_1) {
134
194
  case 0:
135
195
  tmp_2 = 'Number32';
136
196
  break;
@@ -160,37 +220,51 @@ function emit_3(_this__u8e3s4) {
160
220
  }
161
221
  // Inline function 'kotlin.let' call
162
222
  var it = tmp;
163
- return _this__u8e3s4.dv() ? it + '?' : it;
223
+ return _this__u8e3s4.nt() ? it + '?' : it;
164
224
  }
165
- initMetadataForInterface(WirespecTypeDefinitionEmitter, 'WirespecTypeDefinitionEmitter', VOID, VOID, [WirespecIdentifierEmitter]);
166
- function emit_4(channel) {
167
- return 'channel ' + this.nr(channel.wp_1) + ' -> ' + this.fs(channel.xp_1);
225
+ initMetadataForInterface(WirespecTypeDefinitionEmitter, 'WirespecTypeDefinitionEmitter', VOID, VOID, [WirespecIdentifierEmitter, WirespecMetaDataEmitter]);
226
+ function emit_7(channel) {
227
+ return 'channel ' + this.ds(channel.wq_1) + ' -> ' + this.ws(channel.xq_1) + '\n';
168
228
  }
169
229
  initMetadataForInterface(WirespecChannelDefinitionEmitter, 'WirespecChannelDefinitionEmitter', VOID, VOID, [WirespecTypeDefinitionEmitter]);
170
- function emit_5(refined) {
171
- return 'type ' + this.nr(refined.tr_1) + ' = ' + this.fs(refined.ur_1.qv(VOID, false)) + this.hs(refined) + '\n';
230
+ function emit_8(rpc) {
231
+ return rpc.rq_1.l1c_1.r() ? 'rpc ' + this.ds(rpc.qq_1) + ' {} -> ' + emitReturn(this, rpc) + '\n' : trimMargin('\n |rpc ' + this.ds(rpc.qq_1) + ' {\n |' + this.us(rpc.rq_1) + '\n |} -> ' + emitReturn(this, rpc) + '\n |');
232
+ }
233
+ initMetadataForInterface(WirespecRpcDefinitionEmitter, 'WirespecRpcDefinitionEmitter', VOID, VOID, [WirespecTypeDefinitionEmitter]);
234
+ function emit_9(endpoint) {
235
+ var tmp = this.ds(endpoint.er_1);
236
+ var tmp_0 = endpoint.fr_1.toString();
237
+ var tmp_1 = emitRequest(this, endpoint.jr_1);
238
+ var tmp_2 = emitPath(this, endpoint.gr_1);
239
+ var tmp_3 = emitQuery(this, endpoint.hr_1);
240
+ var tmp_4 = emitHeader(this, endpoint.ir_1);
241
+ return trimMargin('\n |endpoint ' + tmp + ' ' + tmp_0 + tmp_1 + ' ' + tmp_2 + tmp_3 + tmp_4 + ' -> {\n |' + joinToString(endpoint.kr_1, '\n', VOID, VOID, VOID, VOID, WirespecEndpointDefinitionEmitter$emit$lambda(this)) + '\n |}\n |\n ');
242
+ }
243
+ initMetadataForInterface(WirespecEndpointDefinitionEmitter, 'WirespecEndpointDefinitionEmitter', VOID, VOID, [WirespecTypeDefinitionEmitter]);
244
+ function emit_10(refined) {
245
+ return 'type ' + this.ds(refined.ks_1) + ' = ' + this.ws(refined.ls_1.t1d(VOID, false)) + this.ys(refined) + '\n';
172
246
  }
173
247
  function emitValidator(_this__u8e3s4) {
174
- var type = _this__u8e3s4.ur_1.wt_1;
248
+ var type = _this__u8e3s4.ls_1.s18_1;
175
249
  var tmp;
176
250
  if (type instanceof Integer) {
177
- var tmp0_safe_receiver = type.uu_1;
178
- var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : this.gs(tmp0_safe_receiver);
251
+ var tmp0_safe_receiver = type.b19_1;
252
+ var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : this.xs(tmp0_safe_receiver);
179
253
  tmp = tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs;
180
254
  } else {
181
255
  if (type instanceof Number_0) {
182
- var tmp2_safe_receiver = type.xu_1;
256
+ var tmp2_safe_receiver = type.w18_1;
183
257
  var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : emitDecimal(this, tmp2_safe_receiver);
184
258
  tmp = tmp3_elvis_lhs == null ? '' : tmp3_elvis_lhs;
185
259
  } else {
186
260
  if (type instanceof String_0) {
187
- var tmp4_safe_receiver = type.ru_1;
261
+ var tmp4_safe_receiver = type.d19_1;
188
262
  var tmp_0;
189
263
  var tmp_1 = tmp4_safe_receiver;
190
264
  if ((tmp_1 == null ? null : new RegExp_0(tmp_1)) == null) {
191
265
  tmp_0 = null;
192
266
  } else {
193
- tmp_0 = this.gs(new RegExp_0(tmp4_safe_receiver));
267
+ tmp_0 = this.xs(new RegExp_0(tmp4_safe_receiver));
194
268
  }
195
269
  var tmp5_elvis_lhs = tmp_0;
196
270
  tmp = tmp5_elvis_lhs == null ? '' : tmp5_elvis_lhs;
@@ -210,49 +284,72 @@ function emitValidator(_this__u8e3s4) {
210
284
  return tmp;
211
285
  }
212
286
  initMetadataForInterface(WirespecRefinedTypeDefinitionEmitter, 'WirespecRefinedTypeDefinitionEmitter', VOID, VOID, [WirespecTypeDefinitionEmitter]);
213
- function emit_6(rpc) {
214
- return rpc.op_1.kp_1.r() ? 'rpc ' + this.nr(rpc.np_1) + ' {} -> ' + emitReturn(this, rpc) + '\n' : trimMargin('\n |rpc ' + this.nr(rpc.np_1) + ' {\n |' + this.ds(rpc.op_1) + '\n |} -> ' + emitReturn(this, rpc) + '\n |');
215
- }
216
- initMetadataForInterface(WirespecRpcDefinitionEmitter, 'WirespecRpcDefinitionEmitter', VOID, VOID, [WirespecTypeDefinitionEmitter]);
217
- function emit_7(union) {
218
- var tmp = this.nr(union.aq_1);
219
- return 'type ' + tmp + ' = ' + joinToString(union.bq_1, ' | ', VOID, VOID, VOID, VOID, WirespecUnionDefinitionEmitter$emit$lambda(this)) + '\n';
287
+ function emit_11(union) {
288
+ var tmp = this.ds(union.ar_1);
289
+ return 'type ' + tmp + ' = ' + joinToString(union.br_1, ' | ', VOID, VOID, VOID, VOID, WirespecUnionDefinitionEmitter$emit$lambda(this)) + '\n';
220
290
  }
221
291
  initMetadataForInterface(WirespecUnionDefinitionEmitter, 'WirespecUnionDefinitionEmitter', VOID, VOID, [WirespecTypeDefinitionEmitter]);
222
- function emit_8(endpoint) {
223
- var tmp = this.nr(endpoint.kq_1);
224
- var tmp_0 = endpoint.lq_1.toString();
225
- var tmp_1 = emitRequest(this, endpoint.pq_1);
226
- var tmp_2 = emitPath(this, endpoint.mq_1);
227
- var tmp_3 = emitQuery(this, endpoint.nq_1);
228
- var tmp_4 = emitHeader(this, endpoint.oq_1);
229
- return trimMargin('\n |endpoint ' + tmp + ' ' + tmp_0 + tmp_1 + ' ' + tmp_2 + tmp_3 + tmp_4 + ' -> {\n |' + joinToString(endpoint.qq_1, '\n', VOID, VOID, VOID, VOID, WirespecEndpointDefinitionEmitter$emit$lambda(this)) + '\n |}\n |\n ');
292
+ function emit_12(part) {
293
+ return trimMargin('\n |part ' + this.ds(part.mq_1) + ' {\n |' + this.us(part.nq_1) + '\n |}\n |');
230
294
  }
231
- initMetadataForInterface(WirespecEndpointDefinitionEmitter, 'WirespecEndpointDefinitionEmitter', VOID, VOID, [WirespecTypeDefinitionEmitter]);
232
- function emit_9(enum_0, module_0) {
233
- var tmp = this.nr(enum_0.yr_1);
295
+ initMetadataForInterface(WirespecPartDefinitionEmitter, 'WirespecPartDefinitionEmitter', VOID, VOID, [WirespecTypeDefinitionEmitter]);
296
+ function emit_13(enum_0, module_0) {
297
+ var tmp = this.ds(enum_0.ps_1);
234
298
  var tmp_0 = Spacer_instance.toString();
235
- return 'enum ' + tmp + ' {\n' + tmp_0 + joinToString(enum_0.zr_1, ', ', VOID, VOID, VOID, VOID, WirespecEnumDefinitionEmitter$emit$lambda(this)) + '\n}\n';
299
+ return 'enum ' + tmp + ' {\n' + tmp_0 + joinToString(enum_0.qs_1, ', ', VOID, VOID, VOID, VOID, WirespecEnumDefinitionEmitter$emit$lambda) + '\n}\n';
236
300
  }
237
301
  initMetadataForInterface(WirespecEnumDefinitionEmitter, 'WirespecEnumDefinitionEmitter', VOID, VOID, [WirespecIdentifierEmitter]);
238
- initMetadataForClass(WirespecEmitter, 'WirespecEmitter', WirespecEmitter, LanguageEmitter, [LanguageEmitter, WirespecRefinedTypeDefinitionEmitter, WirespecTypeDefinitionEmitter, WirespecRpcDefinitionEmitter, WirespecUnionDefinitionEmitter, WirespecIdentifierEmitter, WirespecChannelDefinitionEmitter, WirespecEndpointDefinitionEmitter, WirespecEnumDefinitionEmitter]);
302
+ initMetadataForClass(WirespecEmitter, 'WirespecEmitter', WirespecEmitter, LanguageEmitter, [WirespecTypeDefinitionEmitter, WirespecRpcDefinitionEmitter, WirespecEndpointDefinitionEmitter, WirespecChannelDefinitionEmitter, WirespecRefinedTypeDefinitionEmitter, WirespecIdentifierEmitter, WirespecUnionDefinitionEmitter, WirespecPartDefinitionEmitter, WirespecEnumDefinitionEmitter]);
239
303
  initMetadataForCompanion(Companion);
240
304
  //endregion
241
305
  function WirespecChannelDefinitionEmitter() {
242
306
  }
307
+ function emitMetaData($this, $receiver) {
308
+ var tmp0_safe_receiver = isInterface($receiver, HasAnnotations) ? $receiver : null;
309
+ // Inline function 'kotlin.collections.orEmpty' call
310
+ var tmp0_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.j1c();
311
+ // Inline function 'kotlin.collections.map' call
312
+ var this_0 = tmp0_elvis_lhs == null ? emptyList() : tmp0_elvis_lhs;
313
+ // Inline function 'kotlin.collections.mapTo' call
314
+ var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
315
+ var _iterator__ex2g4s = this_0.t();
316
+ while (_iterator__ex2g4s.u()) {
317
+ var item = _iterator__ex2g4s.v();
318
+ var tmp$ret$3 = $this.b22(item);
319
+ destination.x(tmp$ret$3);
320
+ }
321
+ var tmp = destination;
322
+ var tmp1_safe_receiver = $receiver.i1c();
323
+ var tmp_0;
324
+ var tmp_1 = tmp1_safe_receiver;
325
+ if ((tmp_1 == null ? null : new Comment(tmp_1)) == null) {
326
+ tmp_0 = null;
327
+ } else {
328
+ tmp_0 = $this.c22(tmp1_safe_receiver);
329
+ }
330
+ var tmp_2 = plus(tmp, listOfNotNull(tmp_0));
331
+ return joinToString(tmp_2, '', VOID, VOID, VOID, VOID, WirespecEmitter$emitMetaData$lambda);
332
+ }
333
+ function WirespecEmitter$emitMetaData$lambda(it) {
334
+ return it + '\n';
335
+ }
243
336
  function WirespecEmitter() {
244
337
  LanguageEmitter.call(this);
245
- this.d20_1 = FileExtension_Wirespec_getInstance();
246
- this.e20_1 = null;
247
- this.f20_1 = '\n';
338
+ this.d22_1 = FileExtension_Wirespec_getInstance();
339
+ this.e22_1 = true;
340
+ this.f22_1 = null;
341
+ this.g22_1 = '\n';
248
342
  }
249
- protoOf(WirespecEmitter).kr = function () {
250
- return this.d20_1;
343
+ protoOf(WirespecEmitter).vp = function () {
344
+ return this.d22_1;
345
+ };
346
+ protoOf(WirespecEmitter).up = function () {
347
+ return this.e22_1;
251
348
  };
252
- protoOf(WirespecEmitter).no = function (ast, logger) {
349
+ protoOf(WirespecEmitter).to = function (ast, logger) {
253
350
  // Inline function 'kotlin.let' call
254
- var e = protoOf(LanguageEmitter).no.call(this, ast, logger);
255
- var tmp = 'wirespec.' + this.kr().cr_1;
351
+ var e = protoOf(LanguageEmitter).to.call(this, ast, logger);
352
+ var tmp = 'wirespec.' + this.vp().wr_1;
256
353
  // Inline function 'arrow.core.NonEmptyList.map' call
257
354
  // Inline function 'kotlin.collections.map' call
258
355
  var this_0 = _NonEmptyList___get_all__impl__pmf509(e);
@@ -261,23 +358,28 @@ protoOf(WirespecEmitter).no = function (ast, logger) {
261
358
  var _iterator__ex2g4s = this_0.t();
262
359
  while (_iterator__ex2g4s.u()) {
263
360
  var item = _iterator__ex2g4s.v();
264
- var tmp$ret$0 = item.ip_1;
265
- destination.x(tmp$ret$0);
361
+ var tmp$ret$5 = item.hq_1;
362
+ destination.x(tmp$ret$5);
266
363
  }
267
- var tmp$ret$3 = _NonEmptyList___init__impl__fxd0xp(destination);
364
+ var tmp$ret$2 = _NonEmptyList___init__impl__fxd0xp(destination);
268
365
  // Inline function 'arrow.core.nel' call
269
- var this_1 = new Emitted(tmp, joinToString(new NonEmptyList(tmp$ret$3), '\n'));
366
+ var this_1 = new Emitted(tmp, joinToString(new NonEmptyList(tmp$ret$2), '\n'));
270
367
  return _NonEmptyList___init__impl__fxd0xp(listOf(this_1));
271
368
  };
272
- protoOf(WirespecEmitter).gs = function (_this__u8e3s4) {
369
+ protoOf(WirespecEmitter).bs = function (definition, module_0, logger) {
370
+ // Inline function 'kotlin.let' call
371
+ var emitted = protoOf(LanguageEmitter).bs.call(this, definition, module_0, logger);
372
+ return emitted.kq(VOID, emitMetaData(this, definition) + emitted.hq_1);
373
+ };
374
+ protoOf(WirespecEmitter).xs = function (_this__u8e3s4) {
273
375
  var tmp;
274
376
  if (_this__u8e3s4 instanceof RegExp_0) {
275
- tmp = '(' + _RegExp___get_value__impl__7o7618(_this__u8e3s4.vt_1) + ')';
377
+ tmp = '(' + _RegExp___get_value__impl__7o7618(_this__u8e3s4.t19_1) + ')';
276
378
  } else {
277
379
  if (_this__u8e3s4 instanceof Bound) {
278
- var tmp1_elvis_lhs = _this__u8e3s4.pu_1;
380
+ var tmp1_elvis_lhs = _this__u8e3s4.y18_1;
279
381
  var tmp_0 = tmp1_elvis_lhs == null ? '_' : tmp1_elvis_lhs;
280
- var tmp2_elvis_lhs = _this__u8e3s4.qu_1;
382
+ var tmp2_elvis_lhs = _this__u8e3s4.z18_1;
281
383
  tmp = '(' + tmp_0 + ', ' + (tmp2_elvis_lhs == null ? '_' : tmp2_elvis_lhs) + ')';
282
384
  } else {
283
385
  noWhenBranchMatchedException();
@@ -285,14 +387,14 @@ protoOf(WirespecEmitter).gs = function (_this__u8e3s4) {
285
387
  }
286
388
  return tmp;
287
389
  };
288
- function emitPath($this, _this__u8e3s4) {
289
- return '/' + joinToString(_this__u8e3s4, '/', VOID, VOID, VOID, VOID, WirespecEndpointDefinitionEmitter$emitPath$lambda($this));
290
- }
291
- function emitRequest($this, _this__u8e3s4) {
292
- var tmp0_safe_receiver = firstOrNull(_this__u8e3s4);
293
- var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.tq_1;
294
- var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.vq_1;
295
- var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : $this.fs(tmp2_safe_receiver);
390
+ function emitPath($this, $receiver) {
391
+ return '/' + joinToString($receiver, '/', VOID, VOID, VOID, VOID, WirespecEndpointDefinitionEmitter$emitPath$lambda($this));
392
+ }
393
+ function emitRequest($this, $receiver) {
394
+ var tmp0_safe_receiver = firstOrNull($receiver);
395
+ var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.nr_1;
396
+ var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.pr_1;
397
+ var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : $this.ws(tmp2_safe_receiver);
296
398
  var tmp;
297
399
  if (tmp3_safe_receiver == null) {
298
400
  tmp = null;
@@ -304,12 +406,13 @@ function emitRequest($this, _this__u8e3s4) {
304
406
  var tmp0_elvis_lhs = tmp;
305
407
  return tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs;
306
408
  }
307
- function emitQuery($this, _this__u8e3s4) {
409
+ function emitQuery($this, $receiver) {
308
410
  // Inline function 'kotlin.takeIf' call
411
+ var this_0 = $receiver.l1c_1;
309
412
  var tmp;
310
413
  // Inline function 'kotlin.collections.isNotEmpty' call
311
- if (!_this__u8e3s4.r()) {
312
- tmp = _this__u8e3s4;
414
+ if (!this_0.r()) {
415
+ tmp = this_0;
313
416
  } else {
314
417
  tmp = null;
315
418
  }
@@ -332,12 +435,13 @@ function emitQuery($this, _this__u8e3s4) {
332
435
  var tmp0_elvis_lhs = tmp_1;
333
436
  return tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs;
334
437
  }
335
- function emitHeader($this, _this__u8e3s4) {
438
+ function emitHeader($this, $receiver) {
336
439
  // Inline function 'kotlin.takeIf' call
440
+ var this_0 = $receiver.l1c_1;
337
441
  var tmp;
338
442
  // Inline function 'kotlin.collections.isNotEmpty' call
339
- if (!_this__u8e3s4.r()) {
340
- tmp = _this__u8e3s4;
443
+ if (!this_0.r()) {
444
+ tmp = this_0;
341
445
  } else {
342
446
  tmp = null;
343
447
  }
@@ -360,33 +464,30 @@ function emitHeader($this, _this__u8e3s4) {
360
464
  var tmp0_elvis_lhs = tmp_1;
361
465
  return tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs;
362
466
  }
467
+ function WirespecEndpointDefinitionEmitter$emit$lambda$lambda(this$0) {
468
+ return function (annotation) {
469
+ return this$0.b22(annotation) + ' ';
470
+ };
471
+ }
363
472
  function WirespecEndpointDefinitionEmitter$emit$lambda(this$0) {
364
473
  return function (it) {
365
474
  var tmp = Spacer_instance.toString();
366
- var tmp_0 = fixStatus(it.wq_1);
367
- var tmp0_safe_receiver = it.yq_1;
368
- var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.vq_1;
369
- var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : this$0.fs(tmp1_safe_receiver);
370
- var tmp_1 = tmp2_elvis_lhs == null ? 'Unit' : tmp2_elvis_lhs;
371
- var tmp_2;
372
- var tmp3_safe_receiver = it.yq_1;
373
- var tmp4_safe_receiver = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.vq_1;
374
- if ((tmp4_safe_receiver == null ? null : tmp4_safe_receiver.dv()) === true) {
375
- tmp_2 = '?';
376
- } else {
377
- tmp_2 = '';
378
- }
379
- return tmp + tmp_0 + ' -> ' + tmp_1 + tmp_2 + emitHeader(this$0, it.xq_1);
475
+ var tmp_0 = joinToString(it.tr_1, '', VOID, VOID, VOID, VOID, WirespecEndpointDefinitionEmitter$emit$lambda$lambda(this$0));
476
+ var tmp_1 = fixStatus(it.qr_1);
477
+ var tmp0_safe_receiver = it.sr_1;
478
+ var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.pr_1;
479
+ var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : this$0.ws(tmp1_safe_receiver);
480
+ return tmp + tmp_0 + tmp_1 + ' -> ' + (tmp2_elvis_lhs == null ? 'Unit' : tmp2_elvis_lhs) + emitHeader(this$0, it.rr_1);
380
481
  };
381
482
  }
382
483
  function WirespecEndpointDefinitionEmitter$emitPath$lambda(this$0) {
383
484
  return function (it) {
384
485
  var tmp;
385
486
  if (it instanceof Param) {
386
- tmp = '{' + it.rq_1.m1() + ': ' + this$0.fs(it.sq_1) + '}';
487
+ tmp = '{' + it.lr_1.o1() + ': ' + this$0.ws(it.mr_1) + '}';
387
488
  } else {
388
489
  if (it instanceof Literal) {
389
- tmp = it.bu_1;
490
+ tmp = it.z19_1;
390
491
  } else {
391
492
  noWhenBranchMatchedException();
392
493
  }
@@ -396,42 +497,57 @@ function WirespecEndpointDefinitionEmitter$emitPath$lambda(this$0) {
396
497
  }
397
498
  function WirespecEndpointDefinitionEmitter$emitQuery$lambda(this$0) {
398
499
  return function (it) {
399
- return this$0.es(it);
500
+ return this$0.a22(it);
400
501
  };
401
502
  }
402
503
  function WirespecEndpointDefinitionEmitter$emitHeader$lambda(this$0) {
403
504
  return function (it) {
404
- return this$0.es(it);
505
+ return this$0.a22(it);
405
506
  };
406
507
  }
407
508
  function WirespecEndpointDefinitionEmitter() {
408
509
  }
409
- function capitalize($this, _this__u8e3s4) {
410
- // Inline function 'kotlin.text.replaceFirstChar' call
411
- var tmp;
412
- // Inline function 'kotlin.text.isNotEmpty' call
413
- if (charSequenceLength(_this__u8e3s4) > 0) {
414
- // Inline function 'kotlin.text.uppercase' call
415
- var this_0 = charCodeAt(_this__u8e3s4, 0);
416
- // Inline function 'kotlin.js.asDynamic' call
417
- // Inline function 'kotlin.js.unsafeCast' call
418
- var tmp$ret$4 = toString(this_0).toUpperCase();
419
- tmp = toString_0(tmp$ret$4) + substring(_this__u8e3s4, 1);
420
- } else {
421
- tmp = _this__u8e3s4;
422
- }
423
- return tmp;
510
+ function get_entry() {
511
+ _init_properties_WirespecEnumDefinitionEmitter_kt__y5oa4o();
512
+ return entry;
424
513
  }
425
- function WirespecEnumDefinitionEmitter$emit$lambda(this$0) {
426
- return function (it) {
427
- return capitalize(this$0, it);
428
- };
514
+ var entry;
515
+ function get_methods() {
516
+ _init_properties_WirespecEnumDefinitionEmitter_kt__y5oa4o();
517
+ return methods;
518
+ }
519
+ var methods;
520
+ function WirespecEnumDefinitionEmitter$emit$lambda(it) {
521
+ return emitEnumEntry(it);
429
522
  }
430
523
  function WirespecEnumDefinitionEmitter() {
431
524
  }
525
+ function emitEnumEntry(_this__u8e3s4) {
526
+ _init_properties_WirespecEnumDefinitionEmitter_kt__y5oa4o();
527
+ return get_entry().rc(_this__u8e3s4) && !get_methods().i1(_this__u8e3s4) ? _this__u8e3s4 : addBackticks(_this__u8e3s4);
528
+ }
529
+ var properties_initialized_WirespecEnumDefinitionEmitter_kt_wa4jx2;
530
+ function _init_properties_WirespecEnumDefinitionEmitter_kt__y5oa4o() {
531
+ if (!properties_initialized_WirespecEnumDefinitionEmitter_kt_wa4jx2) {
532
+ properties_initialized_WirespecEnumDefinitionEmitter_kt_wa4jx2 = true;
533
+ entry = Regex_init_$Create$('[A-Z][a-zA-Z0-9_]*|-?[0-9]+');
534
+ // Inline function 'kotlin.collections.map' call
535
+ var this_0 = get_entries();
536
+ // Inline function 'kotlin.collections.mapTo' call
537
+ var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
538
+ var _iterator__ex2g4s = this_0.t();
539
+ while (_iterator__ex2g4s.u()) {
540
+ var item = _iterator__ex2g4s.v();
541
+ var tmp$ret$2 = item.d3_1;
542
+ destination.x(tmp$ret$2);
543
+ }
544
+ methods = toSet(destination);
545
+ }
546
+ }
432
547
  function Companion() {
433
548
  Companion_instance = this;
434
- this.g20_1 = setOf(['type', 'enum', 'endpoint']);
549
+ this.h22_1 = setOf(['type', 'enum', 'endpoint', 'channel', 'rpc', 'part']);
550
+ this.i22_1 = Regex_init_$Create$('[a-z][a-zA-Z0-9_\\-]*');
435
551
  }
436
552
  var Companion_instance;
437
553
  function Companion_getInstance() {
@@ -441,23 +557,117 @@ function Companion_getInstance() {
441
557
  }
442
558
  function WirespecIdentifierEmitter() {
443
559
  }
444
- function emitDecimal($this, _this__u8e3s4) {
445
- return '(' + toBoundDecimal($this, _this__u8e3s4.pu_1) + ', ' + toBoundDecimal($this, _this__u8e3s4.qu_1) + ')';
560
+ function get_KEY() {
561
+ _init_properties_WirespecMetaDataEmitter_kt__6x4knh();
562
+ return KEY;
446
563
  }
447
- function toBoundDecimal($this, _this__u8e3s4) {
448
- return _this__u8e3s4 == null ? '_' : contains(_this__u8e3s4, '.') ? _this__u8e3s4 : _this__u8e3s4 + '.0';
564
+ var KEY;
565
+ function emit_14($this, $receiver) {
566
+ return $receiver.h19_1 === 'default' ? emit_15($this, $receiver.i19_1) : emitEntry($this, $receiver);
567
+ }
568
+ function emitEntry($this, $receiver) {
569
+ return emitKey($this, $receiver.h19_1) + ': ' + emit_15($this, $receiver.i19_1);
570
+ }
571
+ function emit_15($this, $receiver) {
572
+ var tmp;
573
+ if ($receiver instanceof Single) {
574
+ tmp = '"' + escapeQuotes($this, $receiver.l19_1) + '"';
575
+ } else {
576
+ if ($receiver instanceof Array_0) {
577
+ var tmp_0;
578
+ if ($receiver.k19_1.r()) {
579
+ tmp_0 = '[ ]';
580
+ } else {
581
+ tmp_0 = joinToString($receiver.k19_1, ', ', '[', ']', VOID, VOID, WirespecMetaDataEmitter$emit$lambda_0($this));
582
+ }
583
+ tmp = tmp_0;
584
+ } else {
585
+ if ($receiver instanceof Dict) {
586
+ tmp = joinToString($receiver.j19_1, ', ', '{ ', ' }', VOID, VOID, WirespecMetaDataEmitter$emit$lambda_1($this));
587
+ } else {
588
+ noWhenBranchMatchedException();
589
+ }
590
+ }
591
+ }
592
+ return tmp;
593
+ }
594
+ function emitKey($this, $receiver) {
595
+ return get_KEY().rc($receiver) ? $receiver : '"' + escapeQuotes($this, $receiver) + '"';
596
+ }
597
+ function escapeQuotes($this, $receiver) {
598
+ // Inline function 'kotlin.text.buildString' call
599
+ // Inline function 'kotlin.apply' call
600
+ var this_0 = StringBuilder_init_$Create$();
601
+ var index = 0;
602
+ while (index < $receiver.length) {
603
+ var char = charCodeAt($receiver, index);
604
+ if (char === _Char___init__impl__6a9atx(92)) {
605
+ var tmp0_safe_receiver = getOrNull($receiver, index + 1 | 0);
606
+ var tmp;
607
+ var tmp_0 = tmp0_safe_receiver;
608
+ if ((tmp_0 == null ? null : new Char(tmp_0)) == null) {
609
+ tmp = null;
610
+ } else {
611
+ var tmp_1 = tmp0_safe_receiver;
612
+ // Inline function 'kotlin.let' call
613
+ var it = (tmp_1 == null ? null : new Char(tmp_1)).k1_1;
614
+ tmp = '\\' + toString(it);
615
+ }
616
+ var tmp1_elvis_lhs = tmp;
617
+ // Inline function 'kotlin.also' call
618
+ this_0.q(tmp1_elvis_lhs == null ? '\\\\' : tmp1_elvis_lhs);
619
+ index = index + 1 | 0;
620
+ } else if (char === _Char___init__impl__6a9atx(34))
621
+ this_0.q('\\"');
622
+ else
623
+ this_0.s(char);
624
+ index = index + 1 | 0;
625
+ }
626
+ return this_0.toString();
627
+ }
628
+ function WirespecMetaDataEmitter$emit$lambda(this$0) {
629
+ return function (it) {
630
+ return emit_14(this$0, it);
631
+ };
632
+ }
633
+ function WirespecMetaDataEmitter$emit$lambda_0(this$0) {
634
+ return function (it) {
635
+ return emit_15(this$0, it);
636
+ };
637
+ }
638
+ function WirespecMetaDataEmitter$emit$lambda_1(this$0) {
639
+ return function (it) {
640
+ return emitEntry(this$0, it);
641
+ };
642
+ }
643
+ function WirespecMetaDataEmitter() {
644
+ }
645
+ var properties_initialized_WirespecMetaDataEmitter_kt_rbtd69;
646
+ function _init_properties_WirespecMetaDataEmitter_kt__6x4knh() {
647
+ if (!properties_initialized_WirespecMetaDataEmitter_kt_rbtd69) {
648
+ properties_initialized_WirespecMetaDataEmitter_kt_rbtd69 = true;
649
+ KEY = Regex_init_$Create$('(?!(?:type|enum|endpoint|channel|rpc|part)-)[a-z][a-zA-Z0-9_\\-]*|[A-Z][a-zA-Z0-9_]*');
650
+ }
651
+ }
652
+ function WirespecPartDefinitionEmitter() {
653
+ }
654
+ function emitDecimal($this, $receiver) {
655
+ return '(' + toBoundDecimal($this, $receiver.y18_1) + ', ' + toBoundDecimal($this, $receiver.z18_1) + ')';
656
+ }
657
+ function toBoundDecimal($this, $receiver) {
658
+ return $receiver == null ? '_' : contains($receiver, '.') ? $receiver : $receiver + '.0';
449
659
  }
450
660
  function WirespecRefinedTypeDefinitionEmitter() {
451
661
  }
452
- function emitReturn($this, _this__u8e3s4) {
453
- var tmp = $this.fs(_this__u8e3s4.pp_1);
454
- var tmp0_safe_receiver = _this__u8e3s4.qp_1;
662
+ function emitReturn($this, $receiver) {
663
+ var tmp = $this.ws($receiver.sq_1);
664
+ var tmp0_safe_receiver = $receiver.tq_1;
455
665
  var tmp_0;
456
666
  if (tmp0_safe_receiver == null) {
457
667
  tmp_0 = null;
458
668
  } else {
459
669
  // Inline function 'kotlin.let' call
460
- tmp_0 = ' ! ' + $this.fs(tmp0_safe_receiver);
670
+ tmp_0 = ' ! ' + $this.ws(tmp0_safe_receiver);
461
671
  }
462
672
  // Inline function 'kotlin.text.orEmpty' call
463
673
  var tmp0_elvis_lhs = tmp_0;
@@ -465,33 +675,104 @@ function emitReturn($this, _this__u8e3s4) {
465
675
  }
466
676
  function WirespecRpcDefinitionEmitter() {
467
677
  }
678
+ function emitDeclaration($this, $receiver) {
679
+ var tmp = $this.ds($receiver.np_1);
680
+ var tmp_0 = $this.ws($receiver.op_1);
681
+ var tmp0_safe_receiver = $receiver.pp_1;
682
+ var tmp_1;
683
+ if (tmp0_safe_receiver == null) {
684
+ tmp_1 = null;
685
+ } else {
686
+ // Inline function 'kotlin.let' call
687
+ tmp_1 = ' = ' + emit_16($this, tmp0_safe_receiver);
688
+ }
689
+ // Inline function 'kotlin.text.orEmpty' call
690
+ var tmp0_elvis_lhs = tmp_1;
691
+ return tmp + ': ' + tmp_0 + (tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs);
692
+ }
693
+ function emit_16($this, $receiver) {
694
+ var tmp;
695
+ if ($receiver instanceof StringValue) {
696
+ tmp = '"' + escape($this, $receiver.y19_1) + '"';
697
+ } else {
698
+ if ($receiver instanceof IntegerValue) {
699
+ tmp = $receiver.w19_1;
700
+ } else {
701
+ if ($receiver instanceof NumberValue) {
702
+ tmp = $receiver.v19_1;
703
+ } else {
704
+ if ($receiver instanceof BooleanValue) {
705
+ tmp = $receiver.x19_1.toString();
706
+ } else {
707
+ if ($receiver instanceof EnumValue) {
708
+ tmp = emitEnumEntry($receiver.u19_1);
709
+ } else {
710
+ if ($receiver instanceof NullValue) {
711
+ tmp = 'null';
712
+ } else {
713
+ noWhenBranchMatchedException();
714
+ }
715
+ }
716
+ }
717
+ }
718
+ }
719
+ }
720
+ return tmp;
721
+ }
722
+ function escape($this, $receiver) {
723
+ return replace(replace(replace(replace(replace($receiver, '\\', '\\\\'), '"', '\\"'), '\n', '\\n'), '\r', '\\r'), '\t', '\\t');
724
+ }
725
+ function WirespecTypeDefinitionEmitter$emit$lambda$lambda(this$0) {
726
+ return function (it) {
727
+ return Spacer_instance.toString() + this$0.b22(it) + '\n';
728
+ };
729
+ }
468
730
  function WirespecTypeDefinitionEmitter$emit$lambda(this$0) {
731
+ return function (entry) {
732
+ var tmp;
733
+ if (entry instanceof Field) {
734
+ tmp = joinToString(entry.mp_1, '', VOID, VOID, VOID, VOID, WirespecTypeDefinitionEmitter$emit$lambda$lambda(this$0)) + (Spacer_instance.toString() + emitDeclaration(this$0, entry));
735
+ } else {
736
+ if (entry instanceof Spread) {
737
+ tmp = Spacer_instance.toString() + this$0.a22(entry);
738
+ } else {
739
+ noWhenBranchMatchedException();
740
+ }
741
+ }
742
+ return tmp;
743
+ };
744
+ }
745
+ function WirespecTypeDefinitionEmitter$emit$lambda_0(this$0) {
469
746
  return function (it) {
470
- return Spacer_instance.toString() + this$0.es(it);
747
+ return this$0.b22(it) + ' ';
471
748
  };
472
749
  }
473
750
  function WirespecTypeDefinitionEmitter() {
474
751
  }
475
752
  function WirespecUnionDefinitionEmitter$emit$lambda(this$0) {
476
753
  return function (it) {
477
- return this$0.fs(it);
754
+ return this$0.ws(it);
478
755
  };
479
756
  }
480
757
  function WirespecUnionDefinitionEmitter() {
481
758
  }
482
759
  //region block: post-declaration
483
- protoOf(WirespecEmitter).cs = emit_0;
484
- protoOf(WirespecEmitter).ds = emit_1;
485
- protoOf(WirespecEmitter).es = emit_2;
486
- protoOf(WirespecEmitter).fs = emit_3;
487
- protoOf(WirespecEmitter).as = emit_9;
488
- protoOf(WirespecEmitter).vr = emit_5;
489
- protoOf(WirespecEmitter).bs = emit_8;
490
- protoOf(WirespecEmitter).qr = emit_7;
491
- protoOf(WirespecEmitter).nr = emit;
492
- protoOf(WirespecEmitter).pr = emit_4;
493
- protoOf(WirespecEmitter).or = emit_6;
494
- protoOf(WirespecEmitter).hs = emitValidator;
760
+ protoOf(WirespecEmitter).ts = emit_2;
761
+ protoOf(WirespecEmitter).us = emit_3;
762
+ protoOf(WirespecEmitter).vs = emit_4;
763
+ protoOf(WirespecEmitter).ws = emit_6;
764
+ protoOf(WirespecEmitter).rs = emit_13;
765
+ protoOf(WirespecEmitter).ms = emit_10;
766
+ protoOf(WirespecEmitter).ss = emit_9;
767
+ protoOf(WirespecEmitter).hs = emit_11;
768
+ protoOf(WirespecEmitter).ds = emit;
769
+ protoOf(WirespecEmitter).gs = emit_7;
770
+ protoOf(WirespecEmitter).fs = emit_8;
771
+ protoOf(WirespecEmitter).es = emit_12;
772
+ protoOf(WirespecEmitter).a22 = emit_5;
773
+ protoOf(WirespecEmitter).b22 = emit_0;
774
+ protoOf(WirespecEmitter).c22 = emit_1;
775
+ protoOf(WirespecEmitter).ys = emitValidator;
495
776
  //endregion
496
777
  //region block: exports
497
778
  export {