@dmarket/p2p-tracker-headless 0.0.0-bootstrap.0

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 (102) hide show
  1. package/Kotlin-DateTime-library-kotlinx-datetime.mjs +4 -0
  2. package/Kotlin-DateTime-library-kotlinx-datetime.mjs.map +1 -0
  3. package/VERSION +14 -0
  4. package/dmarket-p2p-tracker-core-domain.mjs +16699 -0
  5. package/dmarket-p2p-tracker-core-domain.mjs.map +1 -0
  6. package/index.d.ts +195 -0
  7. package/kotlin-kotlin-stdlib.mjs +18834 -0
  8. package/kotlin-kotlin-stdlib.mjs.map +1 -0
  9. package/kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.mjs +4 -0
  10. package/kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.mjs.map +1 -0
  11. package/kotlinx-atomicfu.mjs +251 -0
  12. package/kotlinx-atomicfu.mjs.map +1 -0
  13. package/kotlinx-browser.mjs +8 -0
  14. package/kotlinx-browser.mjs.map +1 -0
  15. package/kotlinx-coroutines-core.mjs +12437 -0
  16. package/kotlinx-coroutines-core.mjs.map +1 -0
  17. package/kotlinx-io-kotlinx-io-bytestring.mjs +202 -0
  18. package/kotlinx-io-kotlinx-io-bytestring.mjs.map +1 -0
  19. package/kotlinx-io-kotlinx-io-core.mjs +2034 -0
  20. package/kotlinx-io-kotlinx-io-core.mjs.map +1 -0
  21. package/kotlinx-serialization-kotlinx-serialization-core.mjs +6163 -0
  22. package/kotlinx-serialization-kotlinx-serialization-core.mjs.map +1 -0
  23. package/kotlinx-serialization-kotlinx-serialization-json-io.mjs +4 -0
  24. package/kotlinx-serialization-kotlinx-serialization-json-io.mjs.map +1 -0
  25. package/kotlinx-serialization-kotlinx-serialization-json.mjs +5957 -0
  26. package/kotlinx-serialization-kotlinx-serialization-json.mjs.map +1 -0
  27. package/ktor-ktor-client-content-negotiation.mjs +4 -0
  28. package/ktor-ktor-client-content-negotiation.mjs.map +1 -0
  29. package/ktor-ktor-client-core.mjs +9986 -0
  30. package/ktor-ktor-client-core.mjs.map +1 -0
  31. package/ktor-ktor-events.mjs +82 -0
  32. package/ktor-ktor-events.mjs.map +1 -0
  33. package/ktor-ktor-http-cio.mjs +2253 -0
  34. package/ktor-ktor-http-cio.mjs.map +1 -0
  35. package/ktor-ktor-http.mjs +3261 -0
  36. package/ktor-ktor-http.mjs.map +1 -0
  37. package/ktor-ktor-io.mjs +3546 -0
  38. package/ktor-ktor-io.mjs.map +1 -0
  39. package/ktor-ktor-openapi-schema.mjs +4 -0
  40. package/ktor-ktor-openapi-schema.mjs.map +1 -0
  41. package/ktor-ktor-serialization-kotlinx-json.mjs +4 -0
  42. package/ktor-ktor-serialization-kotlinx-json.mjs.map +1 -0
  43. package/ktor-ktor-serialization-kotlinx.mjs +4 -0
  44. package/ktor-ktor-serialization-kotlinx.mjs.map +1 -0
  45. package/ktor-ktor-serialization.mjs +4 -0
  46. package/ktor-ktor-serialization.mjs.map +1 -0
  47. package/ktor-ktor-sse.mjs +4 -0
  48. package/ktor-ktor-sse.mjs.map +1 -0
  49. package/ktor-ktor-utils.mjs +3427 -0
  50. package/ktor-ktor-utils.mjs.map +1 -0
  51. package/ktor-ktor-websocket-serialization.mjs +4 -0
  52. package/ktor-ktor-websocket-serialization.mjs.map +1 -0
  53. package/ktor-ktor-websockets.mjs +2589 -0
  54. package/ktor-ktor-websockets.mjs.map +1 -0
  55. package/p2p-tracker-core.mjs +41977 -0
  56. package/p2p-tracker-core.mjs.map +1 -0
  57. package/p2p-tracker-headless.mjs +4939 -0
  58. package/p2p-tracker-headless.mjs.map +1 -0
  59. package/package.json +58 -0
  60. package/pkg/README.md +104 -0
  61. package/pkg/client_wasm.d.ts +316 -0
  62. package/pkg/client_wasm.js +1199 -0
  63. package/pkg/client_wasm_bg.wasm +0 -0
  64. package/pkg/client_wasm_bg.wasm.d.ts +32 -0
  65. package/pkg/package.json +19 -0
  66. package/pkg/snippets/web-spawn-05868593a72e2d44/js/spawn.js +73 -0
  67. package/pkg/spawn.js +73 -0
  68. package/prover-child.mjs +2 -0
  69. package/transport/README.md +240 -0
  70. package/transport/dist/channel.d.ts +48 -0
  71. package/transport/dist/channel.d.ts.map +1 -0
  72. package/transport/dist/channel.js +150 -0
  73. package/transport/dist/channel.js.map +1 -0
  74. package/transport/dist/index.d.ts +10 -0
  75. package/transport/dist/index.d.ts.map +1 -0
  76. package/transport/dist/index.js +19 -0
  77. package/transport/dist/index.js.map +1 -0
  78. package/transport/dist/node.d.ts +4 -0
  79. package/transport/dist/node.d.ts.map +1 -0
  80. package/transport/dist/node.js +62 -0
  81. package/transport/dist/node.js.map +1 -0
  82. package/transport/dist/prover.d.ts +105 -0
  83. package/transport/dist/prover.d.ts.map +1 -0
  84. package/transport/dist/prover.js +139 -0
  85. package/transport/dist/prover.js.map +1 -0
  86. package/transport/dist/tcp.d.ts +38 -0
  87. package/transport/dist/tcp.d.ts.map +1 -0
  88. package/transport/dist/tcp.js +88 -0
  89. package/transport/dist/tcp.js.map +1 -0
  90. package/transport/dist/transport.d.ts +31 -0
  91. package/transport/dist/transport.d.ts.map +1 -0
  92. package/transport/dist/transport.js +75 -0
  93. package/transport/dist/transport.js.map +1 -0
  94. package/transport/dist/types.d.ts +162 -0
  95. package/transport/dist/types.d.ts.map +1 -0
  96. package/transport/dist/types.js +21 -0
  97. package/transport/dist/types.js.map +1 -0
  98. package/transport/dist/wasm-compat.d.ts +2 -0
  99. package/transport/dist/wasm-compat.d.ts.map +1 -0
  100. package/transport/dist/wasm-compat.js +15 -0
  101. package/transport/dist/wasm-compat.js.map +1 -0
  102. package/transport/package.json +34 -0
@@ -0,0 +1,2253 @@
1
+ import {
2
+ Long2qws0ah9gnpki as Long,
3
+ VOID3gxj6tk5isa35 as VOID,
4
+ protoOf180f3jzyo7rfj as protoOf,
5
+ initMetadataForClassbxx6q50dy2s7 as initMetadataForClass,
6
+ Unit_instance3vdlo4e4f5ggx as Unit_instance,
7
+ toString1pkumu07cwy4m as toString,
8
+ IllegalArgumentException_init_$Create$1mgk48flhjim3 as IllegalArgumentException_init_$Create$,
9
+ abs1kdzbjes1idip as abs,
10
+ StringBuilder_init_$Create$3pb07k1b5jr7z as StringBuilder_init_$Create$,
11
+ CoroutineImpl2sn3kjnwmfr10 as CoroutineImpl,
12
+ THROW_CCE2g6jy02ryeudk as THROW_CCE,
13
+ SequenceScope1coiso86pqzq2 as SequenceScope,
14
+ get_COROUTINE_SUSPENDED3ujt3p13qm4iy as get_COROUTINE_SUSPENDED,
15
+ initMetadataForLambda3af3he42mmnh as initMetadataForLambda,
16
+ constructCallableReference23y65rf941mch as constructCallableReference,
17
+ ArrayList_init_$Create$1z3aa4voswqq as ArrayList_init_$Create$,
18
+ sequence2vgswtrxvqoa7 as sequence,
19
+ fill2542d4m9l93pn as fill,
20
+ isIntArrayeijsubfngq38 as isIntArray,
21
+ _Char___init__impl__6a9atx2yltdocdrxs4d as _Char___init__impl__6a9atx,
22
+ endsWith1a79dp5rc3sfv as endsWith,
23
+ charSequenceLength3278n89t01tmv as charSequenceLength,
24
+ charSequenceGet1vxk1y5n17t1z as charSequenceGet,
25
+ Char19o2r8palgjof as Char,
26
+ Char__compareTo_impl_ypi4mb1yxpplfe5vmm as Char__compareTo_impl_ypi4mb,
27
+ contains2el4s70rdq4ld as contains,
28
+ charSequenceSubSequence1iwpdba8s3jc7 as charSequenceSubSequence,
29
+ Char__toInt_impl_vasixd1ka89vowck9tn as Char__toInt_impl_vasixd,
30
+ IllegalStateExceptionkoljg5n0nrlr as IllegalStateException,
31
+ IllegalStateException_init_$Init$xfeovne1jeww as IllegalStateException_init_$Init$,
32
+ captureStack1fzi4aczwc4hg as captureStack,
33
+ equalsLong28bsrfhwvd686 as equalsLong,
34
+ IllegalStateException_init_$Create$3394faf8tdm0h as IllegalStateException_init_$Create$,
35
+ initMetadataForCoroutine1i7lbatuf5bnt as initMetadataForCoroutine,
36
+ setOf45ia9pnfhe90 as setOf,
37
+ listOf1jh22dvmctj1r as listOf,
38
+ toString1h6jjoch8cjt8 as toString_0,
39
+ toByte4i43936u611k as toByte,
40
+ copyOfRange3alro60z4hhf8 as copyOfRange,
41
+ startsWith641pyr7vf687 as startsWith,
42
+ isInterface3d6p8outrmvmk as isInterface,
43
+ compare2uud5j30pw5xc as compare,
44
+ CancellationException_init_$Create$3nts3tc71n9i0 as CancellationException_init_$Create$,
45
+ subtract16cg4lfi29fq9 as subtract,
46
+ convertToIntofdoxh9bstof as convertToInt,
47
+ add85si75olwt6n as add,
48
+ fromInt1lka3ktyu79a4 as fromInt,
49
+ LinkedHashMap_init_$Create$3aeh9b8t1pf1j as LinkedHashMap_init_$Create$,
50
+ compareTo3ankvs086tmwq as compareTo,
51
+ NoSuchElementException_init_$Create$2e8uxak5my80n as NoSuchElementException_init_$Create$,
52
+ Collection1k04j3hzsbod0 as Collection,
53
+ emptyList1g2z5xcrvp2zy as emptyList,
54
+ initMetadataForCompanion1wyw17z38v6ac as initMetadataForCompanion,
55
+ ensureNotNull1e947j3ixpazm as ensureNotNull,
56
+ StringBuilder_init_$Create$3q4yitjcnfjo as StringBuilder_init_$Create$_0,
57
+ isCharSequence1ju9jr1w86plq as isCharSequence,
58
+ getStringHashCode26igk1bx568vk as getStringHashCode,
59
+ CharSequence1ceii1xorfwh7 as CharSequence,
60
+ IndexOutOfBoundsException_init_$Create$1dzbcrcoqjvjq as IndexOutOfBoundsException_init_$Create$,
61
+ charArray2ujmm1qusno00 as charArray,
62
+ shiftLeft1ck77p6vapyra as shiftLeft,
63
+ NumberFormatException_init_$Create$29hzstmqcy0kc as NumberFormatException_init_$Create$,
64
+ toString336ienavfnzn0 as toString_1,
65
+ charCodeAt1yspne1d8erbm as charCodeAt,
66
+ numberRangeToNumber25vse2rgp6rs8 as numberRangeToNumber,
67
+ collectionSizeOrDefault36dulx8yinfqm as collectionSizeOrDefault,
68
+ ArrayList_init_$Create$3o344dm0ee4ws as ArrayList_init_$Create$_0,
69
+ numberToLong345n6tb1n1i71 as numberToLong,
70
+ toLongArray23ixicpzp5r3w as toLongArray,
71
+ Char__plus_impl_qi7pgj1h8009bm3fa2t as Char__plus_impl_qi7pgj,
72
+ Char__minus_impl_a2frrh3216wnsvv1j3k as Char__minus_impl_a2frrh,
73
+ toByteArray3caw0hip00os as toByteArray,
74
+ isWhitespace25occ8z1ed1s9 as isWhitespace,
75
+ } from './kotlin-kotlin-stdlib.mjs';
76
+ import {
77
+ MultiPartData57syw40llxls as MultiPartData,
78
+ MultiPart_getInstance1k6b6wx1k1sjr as MultiPart_getInstance,
79
+ Companion_getInstance1pptfj8vjmgsz as Companion_getInstance,
80
+ } from './ktor-ktor-http.mjs';
81
+ import {
82
+ CoroutineScopefcb5f5dwqcas as CoroutineScope,
83
+ produce1iljho2c8bp6o as produce,
84
+ ProducerScopeb3mmhvfa6ll7 as ProducerScope,
85
+ CompletableDeferred2lnqvsbvx74d3 as CompletableDeferred,
86
+ } from './kotlinx-coroutines-core.mjs';
87
+ import {
88
+ DefaultPool2gb1fm4epwgu9 as DefaultPool,
89
+ readLineStrictTo30g42df56og5l as readLineStrictTo,
90
+ Companion_getInstance33j3lym6q7yx7 as Companion_getInstance_0,
91
+ LineEndingMode__plus_impl_ttpz2j3u2ebrlepd29o as LineEndingMode__plus_impl_ttpz2j,
92
+ readUntil13nwpwqdlw2vo as readUntil,
93
+ WriterScope3b0bo1enaee6b as WriterScope,
94
+ counted3iniv3aql3f9n as counted,
95
+ writer1eia5its2a1fh as writer,
96
+ readBuffer1oyp7szwwpxy7 as readBuffer,
97
+ get_remaining1lapv95kcmm0y as get_remaining,
98
+ skipIfFound2z2la3mzzpubl as skipIfFound,
99
+ ByteChannel3cxdguezl3lu7 as ByteChannel,
100
+ close3semq7pafb42g as close,
101
+ readPacket25aqlhslm04t6 as readPacket,
102
+ copyTo1e8cxw3cmqjst as copyTo,
103
+ toByteArray1i3ns5jnoqlv6 as toByteArray_0,
104
+ NoPoolImplgos9n8jphzjp as NoPoolImpl,
105
+ } from './ktor-ktor-io.mjs';
106
+ import {
107
+ ByteString_init_$Create$8cu5lc6vr24i as ByteString_init_$Create$,
108
+ ByteString3c9fk8lsh3lvs as ByteString,
109
+ } from './kotlinx-io-kotlinx-io-bytestring.mjs';
110
+ import {
111
+ IOException_init_$Create$30ael4xxp8cz as IOException_init_$Create$,
112
+ EOFException_init_$Create$28fkhq0q0kobq as EOFException_init_$Create$,
113
+ IOException1wyutdmfe71nu as IOException,
114
+ IOException_init_$Init$214bkj3jbj847 as IOException_init_$Init$,
115
+ } from './kotlinx-io-kotlinx-io-core.mjs';
116
+ //region block: imports
117
+ var imul = Math.imul;
118
+ //endregion
119
+ //region block: pre-declaration
120
+ initMetadataForClass(CIOMultipartDataBase, 'CIOMultipartDataBase', VOID, VOID, [MultiPartData, CoroutineScope], [0, 1]);
121
+ initMetadataForClass(HttpHeadersMap, 'HttpHeadersMap');
122
+ initMetadataForLambda(HeadersData$headersStarts$slambda, CoroutineImpl, VOID, [1]);
123
+ initMetadataForClass(HeadersData, 'HeadersData', HeadersData);
124
+ initMetadataForClass(IntArrayPool$1, VOID, VOID, DefaultPool);
125
+ initMetadataForClass(HeadersDataPool$1, VOID, VOID, DefaultPool);
126
+ initMetadataForClass(ParserException, 'ParserException', VOID, IllegalStateException);
127
+ initMetadataForCoroutine($parseHeadersCOROUTINE$, CoroutineImpl);
128
+ initMetadataForClass(MultipartEvent, 'MultipartEvent', VOID, VOID, VOID, [0]);
129
+ initMetadataForClass(Preamble, 'Preamble', VOID, MultipartEvent, VOID, [0]);
130
+ initMetadataForClass(MultipartPart, 'MultipartPart', VOID, MultipartEvent, VOID, [0]);
131
+ initMetadataForClass(Epilogue, 'Epilogue', VOID, MultipartEvent, VOID, [0]);
132
+ initMetadataForLambda(parseMultipart$slambda$slambda, CoroutineImpl, VOID, [1]);
133
+ initMetadataForLambda(parseMultipart$slambda, CoroutineImpl, VOID, [1]);
134
+ initMetadataForCoroutine($parsePartHeadersImplCOROUTINE$, CoroutineImpl);
135
+ initMetadataForCoroutine($parsePartBodyImplCOROUTINE$, CoroutineImpl);
136
+ initMetadataForCoroutine($skipIfFoundReadCountCOROUTINE$, CoroutineImpl);
137
+ initMetadataForClass(Node, 'Node');
138
+ initMetadataForCompanion(Companion);
139
+ initMetadataForClass(AsciiCharTree, 'AsciiCharTree');
140
+ initMetadataForClass(SubSequenceImpl, 'SubSequenceImpl', VOID, VOID, [CharSequence]);
141
+ initMetadataForClass(CharArrayBuilder, 'CharArrayBuilder', CharArrayBuilder, VOID, [CharSequence]);
142
+ initMetadataForClass(CharArrayPool$1, VOID, VOID, NoPoolImpl);
143
+ initMetadataForClass(CharArrayPool$2, VOID, VOID, DefaultPool);
144
+ initMetadataForClass(UnsupportedMediaTypeExceptionCIO, 'UnsupportedMediaTypeExceptionCIO', VOID, IOException);
145
+ initMetadataForClass(MutableRange, 'MutableRange');
146
+ //endregion
147
+ function CIOMultipartDataBase(coroutineContext, channel, contentType, contentLength, formFieldLimit) {
148
+ formFieldLimit = formFieldLimit === VOID ? new Long(65536, 0) : formFieldLimit;
149
+ this.h3e_1 = coroutineContext;
150
+ this.i3e_1 = null;
151
+ this.j3e_1 = parseMultipart(this, channel, contentType, contentLength, formFieldLimit);
152
+ }
153
+ protoOf(CIOMultipartDataBase).hw = function () {
154
+ return this.h3e_1;
155
+ };
156
+ function get_IntArrayPool() {
157
+ _init_properties_HttpHeadersMap_kt__hwatby();
158
+ return IntArrayPool;
159
+ }
160
+ var IntArrayPool;
161
+ function get_HeadersDataPool() {
162
+ _init_properties_HttpHeadersMap_kt__hwatby();
163
+ return HeadersDataPool;
164
+ }
165
+ var HeadersDataPool;
166
+ function thresholdReached($this) {
167
+ return $this.l3e_1 >= $this.m3e_1 * 0.75;
168
+ }
169
+ function resize($this) {
170
+ var prevSize = $this.l3e_1;
171
+ var prevData = $this.n3e_1;
172
+ $this.l3e_1 = 0;
173
+ $this.m3e_1 = imul($this.m3e_1, 2) | 128;
174
+ var tmp = $this;
175
+ // Inline function 'kotlin.apply' call
176
+ var this_0 = get_HeadersDataPool().m27();
177
+ this_0.q3e(imul(prevData.p3e(), 2) | 1);
178
+ tmp.n3e_1 = this_0;
179
+ var _iterator__ex2g4s = prevData.r3e().t();
180
+ while (_iterator__ex2g4s.u()) {
181
+ var headerOffset = _iterator__ex2g4s.v();
182
+ $this.t3e(prevData.s3e(headerOffset + 1 | 0), prevData.s3e(headerOffset + 2 | 0), prevData.s3e(headerOffset + 3 | 0), prevData.s3e(headerOffset + 4 | 0));
183
+ }
184
+ get_HeadersDataPool().n27(prevData);
185
+ // Inline function 'kotlin.require' call
186
+ // Inline function 'kotlin.require' call
187
+ if (!(prevSize === $this.l3e_1)) {
188
+ var message = 'Failed requirement.';
189
+ throw IllegalArgumentException_init_$Create$(toString(message));
190
+ }
191
+ }
192
+ function headerHasName($this, name, headerOffset) {
193
+ var nameStartIndex = $this.n3e_1.s3e(headerOffset + 1 | 0);
194
+ var nameEndIndex = $this.n3e_1.s3e(headerOffset + 2 | 0);
195
+ return equalsLowerCase($this.k3e_1, nameStartIndex, nameEndIndex, name);
196
+ }
197
+ function HttpHeadersMap(builder) {
198
+ this.k3e_1 = builder;
199
+ this.l3e_1 = 0;
200
+ this.m3e_1 = 0;
201
+ this.n3e_1 = get_HeadersDataPool().m27();
202
+ }
203
+ protoOf(HttpHeadersMap).de = function (name) {
204
+ if (this.l3e_1 === 0)
205
+ return null;
206
+ // Inline function 'kotlin.math.absoluteValue' call
207
+ var this_0 = hashCodeLowerCase(name);
208
+ var hash = abs(this_0);
209
+ var headerIndex = hash % this.m3e_1 | 0;
210
+ while (!(this.n3e_1.s3e(imul(headerIndex, 6) + 0 | 0) === -1)) {
211
+ if (headerHasName(this, name, imul(headerIndex, 6))) {
212
+ return this.u3e(imul(headerIndex, 6));
213
+ }
214
+ headerIndex = (headerIndex + 1 | 0) % this.m3e_1 | 0;
215
+ }
216
+ return null;
217
+ };
218
+ protoOf(HttpHeadersMap).v3e = function () {
219
+ return this.n3e_1.r3e();
220
+ };
221
+ protoOf(HttpHeadersMap).t3e = function (nameStartIndex, nameEndIndex, valueStartIndex, valueEndIndex) {
222
+ if (thresholdReached(this)) {
223
+ resize(this);
224
+ }
225
+ // Inline function 'kotlin.math.absoluteValue' call
226
+ var this_0 = hashCodeLowerCase(this.k3e_1, nameStartIndex, nameEndIndex);
227
+ var hash = abs(this_0);
228
+ var name = this.k3e_1.c(nameStartIndex, nameEndIndex);
229
+ var headerIndex = hash % this.m3e_1 | 0;
230
+ var sameNameHeaderIndex = -1;
231
+ while (!(this.n3e_1.s3e(imul(headerIndex, 6) + 0 | 0) === -1)) {
232
+ if (headerHasName(this, name, imul(headerIndex, 6))) {
233
+ sameNameHeaderIndex = headerIndex;
234
+ }
235
+ headerIndex = (headerIndex + 1 | 0) % this.m3e_1 | 0;
236
+ }
237
+ var headerOffset = imul(headerIndex, 6);
238
+ this.n3e_1.d3f(headerOffset + 0 | 0, hash);
239
+ this.n3e_1.d3f(headerOffset + 1 | 0, nameStartIndex);
240
+ this.n3e_1.d3f(headerOffset + 2 | 0, nameEndIndex);
241
+ this.n3e_1.d3f(headerOffset + 3 | 0, valueStartIndex);
242
+ this.n3e_1.d3f(headerOffset + 4 | 0, valueEndIndex);
243
+ this.n3e_1.d3f(headerOffset + 5 | 0, -1);
244
+ if (!(sameNameHeaderIndex === -1)) {
245
+ this.n3e_1.d3f(imul(sameNameHeaderIndex, 6) + 5 | 0, headerIndex);
246
+ }
247
+ this.l3e_1 = this.l3e_1 + 1 | 0;
248
+ };
249
+ protoOf(HttpHeadersMap).e3f = function (headerOffset) {
250
+ var nameStartIndex = this.n3e_1.s3e(headerOffset + 1 | 0);
251
+ var nameEndIndex = this.n3e_1.s3e(headerOffset + 2 | 0);
252
+ return this.k3e_1.c(nameStartIndex, nameEndIndex);
253
+ };
254
+ protoOf(HttpHeadersMap).u3e = function (headerOffset) {
255
+ var valueStartIndex = this.n3e_1.s3e(headerOffset + 3 | 0);
256
+ var valueEndIndex = this.n3e_1.s3e(headerOffset + 4 | 0);
257
+ return this.k3e_1.c(valueStartIndex, valueEndIndex);
258
+ };
259
+ protoOf(HttpHeadersMap).e1t = function () {
260
+ this.l3e_1 = 0;
261
+ this.m3e_1 = 0;
262
+ get_HeadersDataPool().n27(this.n3e_1);
263
+ this.n3e_1 = get_HeadersDataPool().m27();
264
+ };
265
+ protoOf(HttpHeadersMap).toString = function () {
266
+ // Inline function 'kotlin.text.buildString' call
267
+ // Inline function 'kotlin.apply' call
268
+ var this_0 = StringBuilder_init_$Create$();
269
+ dumpTo(this, '', this_0);
270
+ return this_0.toString();
271
+ };
272
+ function HeadersData$headersStarts$slambda(this$0, resultContinuation) {
273
+ this.n3f_1 = this$0;
274
+ CoroutineImpl.call(this, resultContinuation);
275
+ }
276
+ protoOf(HeadersData$headersStarts$slambda).t3f = function ($this$sequence, $completion) {
277
+ var tmp = this.u3f($this$sequence, $completion);
278
+ tmp.i9_1 = Unit_instance;
279
+ tmp.j9_1 = null;
280
+ return tmp.o9();
281
+ };
282
+ protoOf(HeadersData$headersStarts$slambda).ba = function (p1, $completion) {
283
+ return this.t3f(p1 instanceof SequenceScope ? p1 : THROW_CCE(), $completion);
284
+ };
285
+ protoOf(HeadersData$headersStarts$slambda).o9 = function () {
286
+ var suspendResult = this.i9_1;
287
+ $sm: do
288
+ try {
289
+ var tmp = this.g9_1;
290
+ switch (tmp) {
291
+ case 0:
292
+ this.h9_1 = 7;
293
+ this.p3f_1 = 0;
294
+ this.s3f_1 = this.n3f_1.o3e_1.t();
295
+ this.g9_1 = 1;
296
+ continue $sm;
297
+ case 1:
298
+ if (!this.s3f_1.u()) {
299
+ this.g9_1 = 6;
300
+ continue $sm;
301
+ }
302
+
303
+ this.r3f_1 = this.s3f_1.v();
304
+ this.q3f_1 = 0;
305
+ this.g9_1 = 2;
306
+ continue $sm;
307
+ case 2:
308
+ if (!(this.q3f_1 < this.r3f_1.length)) {
309
+ this.g9_1 = 5;
310
+ continue $sm;
311
+ }
312
+
313
+ if (!(this.n3f_1.s3e(this.p3f_1 + 0 | 0) === -1)) {
314
+ this.g9_1 = 3;
315
+ suspendResult = this.o3f_1.th(this.p3f_1, this);
316
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
317
+ return suspendResult;
318
+ }
319
+ continue $sm;
320
+ } else {
321
+ this.g9_1 = 4;
322
+ continue $sm;
323
+ }
324
+
325
+ case 3:
326
+ this.g9_1 = 4;
327
+ continue $sm;
328
+ case 4:
329
+ this.q3f_1 = this.q3f_1 + 6 | 0;
330
+ this.p3f_1 = this.p3f_1 + 6 | 0;
331
+ this.g9_1 = 2;
332
+ continue $sm;
333
+ case 5:
334
+ this.g9_1 = 1;
335
+ continue $sm;
336
+ case 6:
337
+ return Unit_instance;
338
+ case 7:
339
+ throw this.j9_1;
340
+ }
341
+ } catch ($p) {
342
+ var e = $p;
343
+ if (this.h9_1 === 7) {
344
+ throw e;
345
+ } else {
346
+ this.g9_1 = this.h9_1;
347
+ this.j9_1 = e;
348
+ }
349
+ }
350
+ while (true);
351
+ };
352
+ protoOf(HeadersData$headersStarts$slambda).u3f = function ($this$sequence, completion) {
353
+ var i = new HeadersData$headersStarts$slambda(this.n3f_1, completion);
354
+ i.o3f_1 = $this$sequence;
355
+ return i;
356
+ };
357
+ function HeadersData$headersStarts$slambda_0(this$0, resultContinuation) {
358
+ var i = new HeadersData$headersStarts$slambda(this$0, resultContinuation);
359
+ return constructCallableReference(function ($this$sequence, $completion) {
360
+ return i.t3f($this$sequence, $completion);
361
+ }, 1);
362
+ }
363
+ function HeadersData() {
364
+ var tmp = this;
365
+ // Inline function 'kotlin.collections.mutableListOf' call
366
+ tmp.o3e_1 = ArrayList_init_$Create$();
367
+ }
368
+ protoOf(HeadersData).p3e = function () {
369
+ return this.o3e_1.g1();
370
+ };
371
+ protoOf(HeadersData).q3e = function (subArraysCount) {
372
+ // Inline function 'kotlin.repeat' call
373
+ var inductionVariable = 0;
374
+ if (inductionVariable < subArraysCount)
375
+ do {
376
+ var index = inductionVariable;
377
+ inductionVariable = inductionVariable + 1 | 0;
378
+ this.o3e_1.e1(get_IntArrayPool().m27());
379
+ }
380
+ while (inductionVariable < subArraysCount);
381
+ };
382
+ protoOf(HeadersData).s3e = function (index) {
383
+ return this.o3e_1.h1(index / 768 | 0)[index % 768 | 0];
384
+ };
385
+ protoOf(HeadersData).d3f = function (index, value) {
386
+ this.o3e_1.h1(index / 768 | 0)[index % 768 | 0] = value;
387
+ };
388
+ protoOf(HeadersData).r3e = function () {
389
+ return sequence(HeadersData$headersStarts$slambda_0(this, null));
390
+ };
391
+ protoOf(HeadersData).e1t = function () {
392
+ var _iterator__ex2g4s = this.o3e_1.t();
393
+ while (_iterator__ex2g4s.u()) {
394
+ var array = _iterator__ex2g4s.v();
395
+ get_IntArrayPool().n27(array);
396
+ }
397
+ this.o3e_1.a3();
398
+ };
399
+ function dumpTo(_this__u8e3s4, indent, out) {
400
+ _init_properties_HttpHeadersMap_kt__hwatby();
401
+ var _iterator__ex2g4s = _this__u8e3s4.v3e().t();
402
+ while (_iterator__ex2g4s.u()) {
403
+ var offset = _iterator__ex2g4s.v();
404
+ out.f1(indent);
405
+ out.f1(_this__u8e3s4.e3f(offset));
406
+ out.f1(' => ');
407
+ out.f1(_this__u8e3s4.u3e(offset));
408
+ out.f1('\n');
409
+ }
410
+ }
411
+ function IntArrayPool$1() {
412
+ DefaultPool.call(this, 1000);
413
+ }
414
+ protoOf(IntArrayPool$1).f27 = function () {
415
+ var tmp = 0;
416
+ var tmp_0 = new Int32Array(768);
417
+ while (tmp < 768) {
418
+ tmp_0[tmp] = -1;
419
+ tmp = tmp + 1 | 0;
420
+ }
421
+ return tmp_0;
422
+ };
423
+ protoOf(IntArrayPool$1).y3f = function (instance) {
424
+ fill(instance, -1);
425
+ return protoOf(DefaultPool).k27.call(this, instance);
426
+ };
427
+ protoOf(IntArrayPool$1).k27 = function (instance) {
428
+ return this.y3f(isIntArray(instance) ? instance : THROW_CCE());
429
+ };
430
+ function HeadersDataPool$1() {
431
+ DefaultPool.call(this, 1000);
432
+ }
433
+ protoOf(HeadersDataPool$1).f27 = function () {
434
+ return new HeadersData();
435
+ };
436
+ protoOf(HeadersDataPool$1).c3g = function (instance) {
437
+ instance.e1t();
438
+ return protoOf(DefaultPool).k27.call(this, instance);
439
+ };
440
+ protoOf(HeadersDataPool$1).k27 = function (instance) {
441
+ return this.c3g(instance instanceof HeadersData ? instance : THROW_CCE());
442
+ };
443
+ var properties_initialized_HttpHeadersMap_kt_kotj4w;
444
+ function _init_properties_HttpHeadersMap_kt__hwatby() {
445
+ if (!properties_initialized_HttpHeadersMap_kt_kotj4w) {
446
+ properties_initialized_HttpHeadersMap_kt_kotj4w = true;
447
+ IntArrayPool = new IntArrayPool$1();
448
+ HeadersDataPool = new HeadersDataPool$1();
449
+ }
450
+ }
451
+ function get_hostForbiddenSymbols() {
452
+ _init_properties_HttpParser_kt__gbdom1();
453
+ return hostForbiddenSymbols;
454
+ }
455
+ var hostForbiddenSymbols;
456
+ var httpLineEndings;
457
+ var versions;
458
+ function parseHeaders(input, builder, range, $completion) {
459
+ range = range === VOID ? new MutableRange(0, 0) : range;
460
+ var tmp = new $parseHeadersCOROUTINE$(input, builder, range, $completion);
461
+ tmp.i9_1 = Unit_instance;
462
+ tmp.j9_1 = null;
463
+ return tmp.o9();
464
+ }
465
+ function parseHeaderName(text, range) {
466
+ _init_properties_HttpParser_kt__gbdom1();
467
+ var index = range.q3g_1;
468
+ var end = range.r3g_1;
469
+ while (index < end) {
470
+ var ch = text.b(index);
471
+ if (ch === _Char___init__impl__6a9atx(58) && !(index === range.q3g_1)) {
472
+ range.q3g_1 = index + 1 | 0;
473
+ return index;
474
+ }
475
+ if (isDelimiter(ch)) {
476
+ parseHeaderNameFailed(text, index, range.q3g_1, ch);
477
+ }
478
+ index = index + 1 | 0;
479
+ }
480
+ noColonFound(text, range);
481
+ }
482
+ function parseHeaderValue(text, range) {
483
+ _init_properties_HttpParser_kt__gbdom1();
484
+ var start = range.q3g_1;
485
+ var end = range.r3g_1;
486
+ var index = start;
487
+ index = skipSpacesAndHorizontalTabs(text, index, end);
488
+ if (index >= end) {
489
+ range.q3g_1 = end;
490
+ return Unit_instance;
491
+ }
492
+ var valueStart = index;
493
+ var valueLastIndex = index;
494
+ while (index < end) {
495
+ var ch = text.b(index);
496
+ if (ch !== _Char___init__impl__6a9atx(9) && ch !== _Char___init__impl__6a9atx(32))
497
+ if (ch === _Char___init__impl__6a9atx(13) || ch === _Char___init__impl__6a9atx(10)) {
498
+ characterIsNotAllowed(text, ch);
499
+ } else
500
+ valueLastIndex = index;
501
+ index = index + 1 | 0;
502
+ }
503
+ range.q3g_1 = valueStart;
504
+ range.r3g_1 = valueLastIndex + 1 | 0;
505
+ }
506
+ function validateHostHeader(host) {
507
+ _init_properties_HttpParser_kt__gbdom1();
508
+ if (endsWith(host, ':')) {
509
+ throw new ParserException("Host header with ':' should contains port: " + toString(host));
510
+ }
511
+ var tmp$ret$0;
512
+ $l$block: {
513
+ // Inline function 'kotlin.text.any' call
514
+ var inductionVariable = 0;
515
+ while (inductionVariable < charSequenceLength(host)) {
516
+ var element = charSequenceGet(host, inductionVariable);
517
+ inductionVariable = inductionVariable + 1 | 0;
518
+ if (get_hostForbiddenSymbols().k1(new Char(element))) {
519
+ tmp$ret$0 = true;
520
+ break $l$block;
521
+ }
522
+ }
523
+ tmp$ret$0 = false;
524
+ }
525
+ if (tmp$ret$0) {
526
+ throw new ParserException('Host cannot contain any of the following symbols: ' + toString(get_hostForbiddenSymbols()));
527
+ }
528
+ }
529
+ function isDelimiter(ch) {
530
+ _init_properties_HttpParser_kt__gbdom1();
531
+ return Char__compareTo_impl_ypi4mb(ch, _Char___init__impl__6a9atx(32)) <= 0 || contains('"(),/:;<=>?@[\\]{}', ch);
532
+ }
533
+ function parseHeaderNameFailed(text, index, start, ch) {
534
+ _init_properties_HttpParser_kt__gbdom1();
535
+ if (ch === _Char___init__impl__6a9atx(58)) {
536
+ throw new ParserException('Empty header names are not allowed as per RFC7230.');
537
+ }
538
+ if (index === start) {
539
+ throw new ParserException('Multiline headers via line folding is not supported since it is deprecated as per RFC7230.');
540
+ }
541
+ characterIsNotAllowed(text, ch);
542
+ }
543
+ function noColonFound(text, range) {
544
+ _init_properties_HttpParser_kt__gbdom1();
545
+ var tmp2 = range.q3g_1;
546
+ // Inline function 'kotlin.text.substring' call
547
+ var endIndex = range.r3g_1;
548
+ var tmp$ret$0 = toString(charSequenceSubSequence(text, tmp2, endIndex));
549
+ throw new ParserException('No colon in HTTP header in ' + tmp$ret$0 + ' in builder: \n' + toString(text));
550
+ }
551
+ function characterIsNotAllowed(text, ch) {
552
+ _init_properties_HttpParser_kt__gbdom1();
553
+ // Inline function 'kotlin.code' call
554
+ var tmp$ret$0 = Char__toInt_impl_vasixd(ch);
555
+ throw new ParserException('Character with code ' + (tmp$ret$0 & 255) + ' is not allowed in header names, \n' + toString(text));
556
+ }
557
+ function ParserException(message) {
558
+ IllegalStateException_init_$Init$(message, this);
559
+ captureStack(this, ParserException);
560
+ }
561
+ function $parseHeadersCOROUTINE$(input, builder, range, resultContinuation) {
562
+ CoroutineImpl.call(this, resultContinuation);
563
+ this.l3g_1 = input;
564
+ this.m3g_1 = builder;
565
+ this.n3g_1 = range;
566
+ }
567
+ protoOf($parseHeadersCOROUTINE$).o9 = function () {
568
+ var suspendResult = this.i9_1;
569
+ $sm: do
570
+ try {
571
+ var tmp = this.g9_1;
572
+ switch (tmp) {
573
+ case 0:
574
+ this.h9_1 = 7;
575
+ this.o3g_1 = new HttpHeadersMap(this.m3g_1);
576
+ this.h9_1 = 6;
577
+ this.g9_1 = 1;
578
+ continue $sm;
579
+ case 1:
580
+ if (!true) {
581
+ this.g9_1 = 5;
582
+ continue $sm;
583
+ }
584
+
585
+ this.g9_1 = 2;
586
+ suspendResult = readLineStrictTo(this.l3g_1, this.m3g_1, new Long(8192, 0), VOID, this);
587
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
588
+ return suspendResult;
589
+ }
590
+
591
+ continue $sm;
592
+ case 2:
593
+ var ARGUMENT = suspendResult;
594
+ if (equalsLong(ARGUMENT, new Long(-1, -1))) {
595
+ this.o3g_1.e1t();
596
+ return null;
597
+ } else {
598
+ this.g9_1 = 3;
599
+ continue $sm;
600
+ }
601
+
602
+ case 3:
603
+ this.n3g_1.r3g_1 = this.m3g_1.c3f_1;
604
+ this.p3g_1 = this.n3g_1.r3g_1 - this.n3g_1.q3g_1 | 0;
605
+ if (this.p3g_1 === 0) {
606
+ this.g9_1 = 5;
607
+ continue $sm;
608
+ } else {
609
+ this.g9_1 = 4;
610
+ continue $sm;
611
+ }
612
+
613
+ case 4:
614
+ if (this.p3g_1 >= 8192) {
615
+ var message = 'Header line length limit exceeded';
616
+ throw IllegalStateException_init_$Create$(toString(message));
617
+ }
618
+
619
+ var nameStart = this.n3g_1.q3g_1;
620
+ var nameEnd = parseHeaderName(this.m3g_1, this.n3g_1);
621
+ var headerEnd = this.n3g_1.r3g_1;
622
+ parseHeaderValue(this.m3g_1, this.n3g_1);
623
+ var valueStart = this.n3g_1.q3g_1;
624
+ var valueEnd = this.n3g_1.r3g_1;
625
+ this.n3g_1.q3g_1 = headerEnd;
626
+ this.o3g_1.t3e(nameStart, nameEnd, valueStart, valueEnd);
627
+ this.g9_1 = 1;
628
+ continue $sm;
629
+ case 5:
630
+ var host = this.o3g_1.de('Host');
631
+ if (!(host == null)) {
632
+ validateHostHeader(host);
633
+ }
634
+
635
+ return this.o3g_1;
636
+ case 6:
637
+ this.h9_1 = 7;
638
+ var tmp_0 = this.j9_1;
639
+ if (tmp_0 instanceof Error) {
640
+ var t = this.j9_1;
641
+ this.o3g_1.e1t();
642
+ throw t;
643
+ } else {
644
+ throw this.j9_1;
645
+ }
646
+
647
+ case 7:
648
+ throw this.j9_1;
649
+ }
650
+ } catch ($p) {
651
+ var e = $p;
652
+ if (this.h9_1 === 7) {
653
+ throw e;
654
+ } else {
655
+ this.g9_1 = this.h9_1;
656
+ this.j9_1 = e;
657
+ }
658
+ }
659
+ while (true);
660
+ };
661
+ var properties_initialized_HttpParser_kt_uedryv;
662
+ function _init_properties_HttpParser_kt__gbdom1() {
663
+ if (!properties_initialized_HttpParser_kt_uedryv) {
664
+ properties_initialized_HttpParser_kt_uedryv = true;
665
+ hostForbiddenSymbols = setOf([new Char(_Char___init__impl__6a9atx(47)), new Char(_Char___init__impl__6a9atx(63)), new Char(_Char___init__impl__6a9atx(35)), new Char(_Char___init__impl__6a9atx(64))]);
666
+ httpLineEndings = LineEndingMode__plus_impl_ttpz2j(Companion_getInstance_0().s26_1, Companion_getInstance_0().r26_1);
667
+ versions = Companion_instance.s3g(listOf(['HTTP/1.0', 'HTTP/1.1']));
668
+ }
669
+ }
670
+ function get_CrLf() {
671
+ _init_properties_Multipart_kt__ato98a();
672
+ return CrLf;
673
+ }
674
+ var CrLf;
675
+ function get_PrefixString() {
676
+ _init_properties_Multipart_kt__ato98a();
677
+ return PrefixString;
678
+ }
679
+ var PrefixString;
680
+ function Preamble(body) {
681
+ MultipartEvent.call(this);
682
+ this.t3g_1 = body;
683
+ }
684
+ function MultipartPart(headers, body) {
685
+ MultipartEvent.call(this);
686
+ this.u3g_1 = headers;
687
+ this.v3g_1 = body;
688
+ }
689
+ function Epilogue(body) {
690
+ MultipartEvent.call(this);
691
+ this.w3g_1 = body;
692
+ }
693
+ function MultipartEvent() {
694
+ }
695
+ function parseMultipart(_this__u8e3s4, input, contentType, contentLength, maxPartSize) {
696
+ maxPartSize = maxPartSize === VOID ? new Long(-1, 2147483647) : maxPartSize;
697
+ _init_properties_Multipart_kt__ato98a();
698
+ if (!MultiPart_getInstance().e33(contentType)) {
699
+ throw new UnsupportedMediaTypeExceptionCIO('Failed to parse multipart: Content-Type should be multipart/* but it is ' + toString(contentType));
700
+ }
701
+ var boundaryByteBuffer = parseBoundaryInternal(contentType);
702
+ var boundaryBytes = ByteString_init_$Create$(boundaryByteBuffer);
703
+ return parseMultipart_0(_this__u8e3s4, boundaryBytes, input, contentLength, maxPartSize);
704
+ }
705
+ function parseBoundaryInternal(contentType) {
706
+ _init_properties_Multipart_kt__ato98a();
707
+ var boundaryParameter = findBoundary(contentType);
708
+ if (boundaryParameter === -1) {
709
+ throw IOException_init_$Create$("Failed to parse multipart: Content-Type's boundary parameter is missing");
710
+ }
711
+ var boundaryStart = boundaryParameter + 9 | 0;
712
+ var boundaryBytes = new Int8Array(74);
713
+ var position = {_v: 0};
714
+ parseBoundaryInternal$put(position, boundaryBytes, 13);
715
+ parseBoundaryInternal$put(position, boundaryBytes, 10);
716
+ parseBoundaryInternal$put(position, boundaryBytes, 45);
717
+ parseBoundaryInternal$put(position, boundaryBytes, 45);
718
+ var state = 0;
719
+ var inductionVariable = boundaryStart;
720
+ var last = charSequenceLength(contentType);
721
+ if (inductionVariable < last)
722
+ loop: do {
723
+ var i = inductionVariable;
724
+ inductionVariable = inductionVariable + 1 | 0;
725
+ var ch = charSequenceGet(contentType, i);
726
+ // Inline function 'kotlin.code' call
727
+ var v = Char__toInt_impl_vasixd(ch) & 65535;
728
+ if ((v & 65535) > 127) {
729
+ throw IOException_init_$Create$('Failed to parse multipart: wrong boundary byte 0x' + toString_0(v, 16) + ' - should be 7bit character');
730
+ }
731
+ switch (state) {
732
+ case 0:
733
+ if (ch !== _Char___init__impl__6a9atx(32))
734
+ if (ch === _Char___init__impl__6a9atx(34)) {
735
+ state = 2;
736
+ } else if (ch === _Char___init__impl__6a9atx(59) || ch === _Char___init__impl__6a9atx(44)) {
737
+ break loop;
738
+ } else {
739
+ state = 1;
740
+ parseBoundaryInternal$put(position, boundaryBytes, toByte(v));
741
+ }
742
+
743
+ break;
744
+ case 1:
745
+ if (ch === _Char___init__impl__6a9atx(32) || ch === _Char___init__impl__6a9atx(44) || ch === _Char___init__impl__6a9atx(59)) {
746
+ break loop;
747
+ } else {
748
+ parseBoundaryInternal$put(position, boundaryBytes, toByte(v));
749
+ }
750
+
751
+ break;
752
+ case 2:
753
+ if (ch === _Char___init__impl__6a9atx(92)) {
754
+ state = 3;
755
+ } else if (ch === _Char___init__impl__6a9atx(34)) {
756
+ break loop;
757
+ } else {
758
+ parseBoundaryInternal$put(position, boundaryBytes, toByte(v));
759
+ }
760
+
761
+ break;
762
+ case 3:
763
+ parseBoundaryInternal$put(position, boundaryBytes, toByte(v));
764
+ state = 2;
765
+ break;
766
+ }
767
+ }
768
+ while (inductionVariable < last);
769
+ if (position._v === 4) {
770
+ throw IOException_init_$Create$('Empty multipart boundary is not allowed');
771
+ }
772
+ return copyOfRange(boundaryBytes, 0, position._v);
773
+ }
774
+ function parseMultipart_0(_this__u8e3s4, boundaryPrefixed, input, totalLength, maxPartSize) {
775
+ _init_properties_Multipart_kt__ato98a();
776
+ return produce(_this__u8e3s4, VOID, VOID, parseMultipart$slambda_0(input, boundaryPrefixed, maxPartSize, totalLength, null));
777
+ }
778
+ function findBoundary(contentType) {
779
+ _init_properties_Multipart_kt__ato98a();
780
+ var state = 0;
781
+ var paramNameCount = 0;
782
+ var inductionVariable = 0;
783
+ var last = charSequenceLength(contentType) - 1 | 0;
784
+ if (inductionVariable <= last)
785
+ do {
786
+ var i = inductionVariable;
787
+ inductionVariable = inductionVariable + 1 | 0;
788
+ var ch = charSequenceGet(contentType, i);
789
+ switch (state) {
790
+ case 0:
791
+ if (ch === _Char___init__impl__6a9atx(59)) {
792
+ state = 1;
793
+ paramNameCount = 0;
794
+ }
795
+
796
+ break;
797
+ case 1:
798
+ if (ch === _Char___init__impl__6a9atx(61)) {
799
+ state = 2;
800
+ } else if (ch === _Char___init__impl__6a9atx(59)) {
801
+ paramNameCount = 0;
802
+ } else if (ch === _Char___init__impl__6a9atx(44)) {
803
+ state = 0;
804
+ } else if (ch !== _Char___init__impl__6a9atx(32))
805
+ if (paramNameCount === 0 && startsWith(contentType, 'boundary=', i, true)) {
806
+ return i;
807
+ } else {
808
+ paramNameCount = paramNameCount + 1 | 0;
809
+ }
810
+
811
+ break;
812
+ case 2:
813
+ if (ch === _Char___init__impl__6a9atx(34))
814
+ state = 3;
815
+ else if (ch === _Char___init__impl__6a9atx(44))
816
+ state = 0;
817
+ else if (ch === _Char___init__impl__6a9atx(59)) {
818
+ state = 1;
819
+ paramNameCount = 0;
820
+ }
821
+
822
+ break;
823
+ case 3:
824
+ if (ch === _Char___init__impl__6a9atx(34)) {
825
+ state = 1;
826
+ paramNameCount = 0;
827
+ } else if (ch === _Char___init__impl__6a9atx(92)) {
828
+ state = 4;
829
+ }
830
+
831
+ break;
832
+ case 4:
833
+ state = 3;
834
+ break;
835
+ }
836
+ }
837
+ while (inductionVariable <= last);
838
+ return -1;
839
+ }
840
+ function parsePreambleImpl(boundary, input, output, limit, $completion) {
841
+ limit = limit === VOID ? new Long(-1, 2147483647) : limit;
842
+ return readUntil(input, boundary, output, limit, true, $completion);
843
+ }
844
+ function parsePartHeadersImpl(input, $completion) {
845
+ var tmp = new $parsePartHeadersImplCOROUTINE$(input, $completion);
846
+ tmp.i9_1 = Unit_instance;
847
+ tmp.j9_1 = null;
848
+ return tmp.o9();
849
+ }
850
+ function parsePartBodyImpl(boundaryPrefixed, input, output, headers, limit, $completion) {
851
+ var tmp = new $parsePartBodyImplCOROUTINE$(boundaryPrefixed, input, output, headers, limit, $completion);
852
+ tmp.i9_1 = Unit_instance;
853
+ tmp.j9_1 = null;
854
+ return tmp.o9();
855
+ }
856
+ function skipIfFoundReadCount(_this__u8e3s4, prefix, $completion) {
857
+ var tmp = new $skipIfFoundReadCountCOROUTINE$(_this__u8e3s4, prefix, $completion);
858
+ tmp.i9_1 = Unit_instance;
859
+ tmp.j9_1 = null;
860
+ return tmp.o9();
861
+ }
862
+ function throwLimitExceeded(actual, limit) {
863
+ _init_properties_Multipart_kt__ato98a();
864
+ throw IOException_init_$Create$('Multipart content length exceeds limit ' + actual.toString() + ' > ' + limit.toString() + '; ' + "limit is defined using 'formFieldLimit' argument");
865
+ }
866
+ function parseBoundaryInternal$put(position, boundaryBytes, value) {
867
+ if (position._v >= boundaryBytes.length) {
868
+ throw IOException_init_$Create$("Failed to parse multipart: boundary shouldn't be longer than 70 characters");
869
+ }
870
+ var _unary__edvuaz = position._v;
871
+ position._v = _unary__edvuaz + 1 | 0;
872
+ boundaryBytes[_unary__edvuaz] = value;
873
+ }
874
+ function parseMultipart$slambda$slambda($firstBoundary, $countedInput, resultContinuation) {
875
+ this.q3i_1 = $firstBoundary;
876
+ this.r3i_1 = $countedInput;
877
+ CoroutineImpl.call(this, resultContinuation);
878
+ }
879
+ protoOf(parseMultipart$slambda$slambda).t3i = function ($this$writer, $completion) {
880
+ var tmp = this.u3i($this$writer, $completion);
881
+ tmp.i9_1 = Unit_instance;
882
+ tmp.j9_1 = null;
883
+ return tmp.o9();
884
+ };
885
+ protoOf(parseMultipart$slambda$slambda).ba = function (p1, $completion) {
886
+ return this.t3i(p1 instanceof WriterScope ? p1 : THROW_CCE(), $completion);
887
+ };
888
+ protoOf(parseMultipart$slambda$slambda).o9 = function () {
889
+ var suspendResult = this.i9_1;
890
+ $sm: do
891
+ try {
892
+ var tmp = this.g9_1;
893
+ switch (tmp) {
894
+ case 0:
895
+ this.h9_1 = 3;
896
+ this.g9_1 = 1;
897
+ suspendResult = parsePreambleImpl(this.q3i_1, this.r3i_1, this.s3i_1.g25_1, new Long(8193, 0), this);
898
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
899
+ return suspendResult;
900
+ }
901
+
902
+ continue $sm;
903
+ case 1:
904
+ this.g9_1 = 2;
905
+ suspendResult = this.s3i_1.g25_1.e1y(this);
906
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
907
+ return suspendResult;
908
+ }
909
+
910
+ continue $sm;
911
+ case 2:
912
+ return Unit_instance;
913
+ case 3:
914
+ throw this.j9_1;
915
+ }
916
+ } catch ($p) {
917
+ var e = $p;
918
+ if (this.h9_1 === 3) {
919
+ throw e;
920
+ } else {
921
+ this.g9_1 = this.h9_1;
922
+ this.j9_1 = e;
923
+ }
924
+ }
925
+ while (true);
926
+ };
927
+ protoOf(parseMultipart$slambda$slambda).u3i = function ($this$writer, completion) {
928
+ var i = new parseMultipart$slambda$slambda(this.q3i_1, this.r3i_1, completion);
929
+ i.s3i_1 = $this$writer;
930
+ return i;
931
+ };
932
+ function parseMultipart$slambda$slambda_0($firstBoundary, $countedInput, resultContinuation) {
933
+ var i = new parseMultipart$slambda$slambda($firstBoundary, $countedInput, resultContinuation);
934
+ return constructCallableReference(function ($this$writer, $completion) {
935
+ return i.t3i($this$writer, $completion);
936
+ }, 1);
937
+ }
938
+ function parseMultipart$slambda($input, $boundaryPrefixed, $maxPartSize, $totalLength, resultContinuation) {
939
+ this.d3j_1 = $input;
940
+ this.e3j_1 = $boundaryPrefixed;
941
+ this.f3j_1 = $maxPartSize;
942
+ this.g3j_1 = $totalLength;
943
+ CoroutineImpl.call(this, resultContinuation);
944
+ }
945
+ protoOf(parseMultipart$slambda).p3j = function ($this$produce, $completion) {
946
+ var tmp = this.q3j($this$produce, $completion);
947
+ tmp.i9_1 = Unit_instance;
948
+ tmp.j9_1 = null;
949
+ return tmp.o9();
950
+ };
951
+ protoOf(parseMultipart$slambda).ba = function (p1, $completion) {
952
+ return this.p3j((!(p1 == null) ? isInterface(p1, ProducerScope) : false) ? p1 : THROW_CCE(), $completion);
953
+ };
954
+ protoOf(parseMultipart$slambda).o9 = function () {
955
+ var suspendResult = this.i9_1;
956
+ $sm: do
957
+ try {
958
+ var tmp = this.g9_1;
959
+ switch (tmp) {
960
+ case 0:
961
+ this.h9_1 = 25;
962
+ this.i3j_1 = counted(this.d3j_1);
963
+ this.j3j_1 = this.i3j_1.p26();
964
+ this.n3j_1 = this.e3j_1.os(get_PrefixString().g1());
965
+ this.g9_1 = 1;
966
+ suspendResult = readBuffer(writer(this.h3j_1, VOID, VOID, parseMultipart$slambda$slambda_0(this.n3j_1, this.i3j_1, null)).x1z_1, this);
967
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
968
+ return suspendResult;
969
+ }
970
+
971
+ continue $sm;
972
+ case 1:
973
+ var preambleData = suspendResult;
974
+ if (compare(get_remaining(preambleData), new Long(0, 0)) > 0) {
975
+ this.g9_1 = 2;
976
+ suspendResult = this.h3j_1.g1f(new Preamble(preambleData), this);
977
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
978
+ return suspendResult;
979
+ }
980
+ continue $sm;
981
+ } else {
982
+ this.g9_1 = 3;
983
+ continue $sm;
984
+ }
985
+
986
+ case 2:
987
+ this.g9_1 = 3;
988
+ continue $sm;
989
+ case 3:
990
+ this.g9_1 = 4;
991
+ continue $sm;
992
+ case 4:
993
+ if (!this.i3j_1.b1y()) {
994
+ this.g9_1 = 5;
995
+ suspendResult = skipIfFound(this.i3j_1, get_PrefixString(), this);
996
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
997
+ return suspendResult;
998
+ }
999
+ continue $sm;
1000
+ } else {
1001
+ this.o3j_1 = false;
1002
+ this.g9_1 = 6;
1003
+ continue $sm;
1004
+ }
1005
+
1006
+ case 5:
1007
+ this.o3j_1 = !suspendResult;
1008
+ this.g9_1 = 6;
1009
+ continue $sm;
1010
+ case 6:
1011
+ if (!this.o3j_1) {
1012
+ this.g9_1 = 15;
1013
+ continue $sm;
1014
+ }
1015
+
1016
+ this.g9_1 = 7;
1017
+ suspendResult = skipIfFound(this.i3j_1, get_CrLf(), this);
1018
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1019
+ return suspendResult;
1020
+ }
1021
+
1022
+ continue $sm;
1023
+ case 7:
1024
+ this.g9_1 = 8;
1025
+ suspendResult = skipIfFound(this.i3j_1, this.n3j_1, this);
1026
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1027
+ return suspendResult;
1028
+ }
1029
+
1030
+ continue $sm;
1031
+ case 8:
1032
+ if (suspendResult) {
1033
+ this.g9_1 = 4;
1034
+ continue $sm;
1035
+ } else {
1036
+ this.g9_1 = 9;
1037
+ continue $sm;
1038
+ }
1039
+
1040
+ case 9:
1041
+ this.k3j_1 = new ByteChannel();
1042
+ this.m3j_1 = CompletableDeferred();
1043
+ var part = new MultipartPart(this.m3j_1, this.k3j_1);
1044
+ this.g9_1 = 10;
1045
+ suspendResult = this.h3j_1.g1f(part, this);
1046
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1047
+ return suspendResult;
1048
+ }
1049
+
1050
+ continue $sm;
1051
+ case 10:
1052
+ this.l3j_1 = null;
1053
+ this.h9_1 = 14;
1054
+ this.g9_1 = 11;
1055
+ suspendResult = parsePartHeadersImpl(this.i3j_1, this);
1056
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1057
+ return suspendResult;
1058
+ }
1059
+
1060
+ continue $sm;
1061
+ case 11:
1062
+ this.l3j_1 = suspendResult;
1063
+ if (!this.m3j_1.q14(this.l3j_1)) {
1064
+ this.l3j_1.e1t();
1065
+ throw CancellationException_init_$Create$('Multipart processing has been cancelled');
1066
+ }
1067
+
1068
+ this.g9_1 = 12;
1069
+ suspendResult = parsePartBodyImpl(this.e3j_1, this.i3j_1, this.k3j_1, this.l3j_1, this.f3j_1, this);
1070
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1071
+ return suspendResult;
1072
+ }
1073
+
1074
+ continue $sm;
1075
+ case 12:
1076
+ this.k3j_1.h4();
1077
+ this.h9_1 = 25;
1078
+ this.g9_1 = 13;
1079
+ continue $sm;
1080
+ case 13:
1081
+ this.h9_1 = 25;
1082
+ this.g9_1 = 4;
1083
+ continue $sm;
1084
+ case 14:
1085
+ this.h9_1 = 25;
1086
+ var tmp_0 = this.j9_1;
1087
+ if (tmp_0 instanceof Error) {
1088
+ var cause = this.j9_1;
1089
+ if (this.m3j_1.r14(cause)) {
1090
+ var tmp0_safe_receiver = this.l3j_1;
1091
+ if (tmp0_safe_receiver == null)
1092
+ null;
1093
+ else {
1094
+ tmp0_safe_receiver.e1t();
1095
+ }
1096
+ }
1097
+ close(this.k3j_1, cause);
1098
+ throw cause;
1099
+ } else {
1100
+ throw this.j9_1;
1101
+ }
1102
+
1103
+ case 15:
1104
+ this.g9_1 = 16;
1105
+ suspendResult = skipIfFound(this.i3j_1, get_CrLf(), this);
1106
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1107
+ return suspendResult;
1108
+ }
1109
+
1110
+ continue $sm;
1111
+ case 16:
1112
+ this.g9_1 = 17;
1113
+ suspendResult = skipIfFound(this.i3j_1, get_CrLf(), this);
1114
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1115
+ return suspendResult;
1116
+ }
1117
+
1118
+ continue $sm;
1119
+ case 17:
1120
+ if (!(this.g3j_1 == null)) {
1121
+ var consumedExceptEpilogue = subtract(this.i3j_1.p26(), this.j3j_1);
1122
+ var size = subtract(this.g3j_1, consumedExceptEpilogue);
1123
+ if (compare(size, new Long(2147483647, 0)) > 0)
1124
+ throw IOException_init_$Create$('Failed to parse multipart: prologue is too long');
1125
+ if (compare(size, new Long(0, 0)) > 0) {
1126
+ this.g9_1 = 21;
1127
+ suspendResult = readPacket(this.i3j_1, convertToInt(size), this);
1128
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1129
+ return suspendResult;
1130
+ }
1131
+ continue $sm;
1132
+ } else {
1133
+ this.g9_1 = 23;
1134
+ continue $sm;
1135
+ }
1136
+ } else {
1137
+ this.g9_1 = 18;
1138
+ suspendResult = readBuffer(this.i3j_1, this);
1139
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1140
+ return suspendResult;
1141
+ }
1142
+ continue $sm;
1143
+ }
1144
+
1145
+ case 18:
1146
+ var epilogueContent = suspendResult;
1147
+ if (!epilogueContent.ws()) {
1148
+ this.g9_1 = 19;
1149
+ suspendResult = this.h3j_1.g1f(new Epilogue(epilogueContent), this);
1150
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1151
+ return suspendResult;
1152
+ }
1153
+ continue $sm;
1154
+ } else {
1155
+ this.g9_1 = 20;
1156
+ continue $sm;
1157
+ }
1158
+
1159
+ case 19:
1160
+ this.g9_1 = 20;
1161
+ continue $sm;
1162
+ case 20:
1163
+ this.g9_1 = 24;
1164
+ continue $sm;
1165
+ case 21:
1166
+ var ARGUMENT = suspendResult;
1167
+ var ARGUMENT_0 = new Epilogue(ARGUMENT);
1168
+ this.g9_1 = 22;
1169
+ suspendResult = this.h3j_1.g1f(ARGUMENT_0, this);
1170
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1171
+ return suspendResult;
1172
+ }
1173
+
1174
+ continue $sm;
1175
+ case 22:
1176
+ this.g9_1 = 23;
1177
+ continue $sm;
1178
+ case 23:
1179
+ this.g9_1 = 24;
1180
+ continue $sm;
1181
+ case 24:
1182
+ return Unit_instance;
1183
+ case 25:
1184
+ throw this.j9_1;
1185
+ }
1186
+ } catch ($p) {
1187
+ var e = $p;
1188
+ if (this.h9_1 === 25) {
1189
+ throw e;
1190
+ } else {
1191
+ this.g9_1 = this.h9_1;
1192
+ this.j9_1 = e;
1193
+ }
1194
+ }
1195
+ while (true);
1196
+ };
1197
+ protoOf(parseMultipart$slambda).q3j = function ($this$produce, completion) {
1198
+ var i = new parseMultipart$slambda(this.d3j_1, this.e3j_1, this.f3j_1, this.g3j_1, completion);
1199
+ i.h3j_1 = $this$produce;
1200
+ return i;
1201
+ };
1202
+ function parseMultipart$slambda_0($input, $boundaryPrefixed, $maxPartSize, $totalLength, resultContinuation) {
1203
+ var i = new parseMultipart$slambda($input, $boundaryPrefixed, $maxPartSize, $totalLength, resultContinuation);
1204
+ return constructCallableReference(function ($this$produce, $completion) {
1205
+ return i.p3j($this$produce, $completion);
1206
+ }, 1);
1207
+ }
1208
+ function $parsePartHeadersImplCOROUTINE$(input, resultContinuation) {
1209
+ CoroutineImpl.call(this, resultContinuation);
1210
+ this.f3h_1 = input;
1211
+ }
1212
+ protoOf($parsePartHeadersImplCOROUTINE$).o9 = function () {
1213
+ var suspendResult = this.i9_1;
1214
+ $sm: do
1215
+ try {
1216
+ var tmp = this.g9_1;
1217
+ switch (tmp) {
1218
+ case 0:
1219
+ this.h9_1 = 3;
1220
+ this.g3h_1 = new CharArrayBuilder();
1221
+ this.h9_1 = 2;
1222
+ this.g9_1 = 1;
1223
+ suspendResult = parseHeaders(this.f3h_1, this.g3h_1, VOID, this);
1224
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1225
+ return suspendResult;
1226
+ }
1227
+
1228
+ continue $sm;
1229
+ case 1:
1230
+ var tmp0_elvis_lhs = suspendResult;
1231
+ var tmp_0;
1232
+ if (tmp0_elvis_lhs == null) {
1233
+ throw EOFException_init_$Create$('Failed to parse multipart headers: unexpected end of stream');
1234
+ } else {
1235
+ tmp_0 = tmp0_elvis_lhs;
1236
+ }
1237
+
1238
+ return tmp_0;
1239
+ case 2:
1240
+ this.h9_1 = 3;
1241
+ var tmp_1 = this.j9_1;
1242
+ if (tmp_1 instanceof Error) {
1243
+ var t = this.j9_1;
1244
+ this.g3h_1.e1t();
1245
+ throw t;
1246
+ } else {
1247
+ throw this.j9_1;
1248
+ }
1249
+
1250
+ case 3:
1251
+ throw this.j9_1;
1252
+ }
1253
+ } catch ($p) {
1254
+ var e = $p;
1255
+ if (this.h9_1 === 3) {
1256
+ throw e;
1257
+ } else {
1258
+ this.g9_1 = this.h9_1;
1259
+ this.j9_1 = e;
1260
+ }
1261
+ }
1262
+ while (true);
1263
+ };
1264
+ function $parsePartBodyImplCOROUTINE$(boundaryPrefixed, input, output, headers, limit, resultContinuation) {
1265
+ CoroutineImpl.call(this, resultContinuation);
1266
+ this.p3h_1 = boundaryPrefixed;
1267
+ this.q3h_1 = input;
1268
+ this.r3h_1 = output;
1269
+ this.s3h_1 = headers;
1270
+ this.t3h_1 = limit;
1271
+ }
1272
+ protoOf($parsePartBodyImplCOROUTINE$).o9 = function () {
1273
+ var suspendResult = this.i9_1;
1274
+ $sm: do
1275
+ try {
1276
+ var tmp = this.g9_1;
1277
+ switch (tmp) {
1278
+ case 0:
1279
+ this.h9_1 = 6;
1280
+ var tmp0_safe_receiver = this.s3h_1.de('Content-Length');
1281
+ var contentLength = tmp0_safe_receiver == null ? null : parseDecLong(tmp0_safe_receiver);
1282
+ if (contentLength == null) {
1283
+ this.g9_1 = 3;
1284
+ suspendResult = readUntil(this.q3h_1, this.p3h_1, this.r3h_1, this.t3h_1, true, this);
1285
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1286
+ return suspendResult;
1287
+ }
1288
+ continue $sm;
1289
+ } else {
1290
+ var containsUpper = this.t3h_1;
1291
+ if (compare(new Long(0, 0), contentLength) <= 0 ? compare(contentLength, containsUpper) <= 0 : false) {
1292
+ this.g9_1 = 1;
1293
+ suspendResult = copyTo(this.q3h_1, this.r3h_1, contentLength, this);
1294
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1295
+ return suspendResult;
1296
+ }
1297
+ continue $sm;
1298
+ } else {
1299
+ var tmp_0 = this;
1300
+ throwLimitExceeded(contentLength, this.t3h_1);
1301
+ }
1302
+ }
1303
+
1304
+ break;
1305
+ case 1:
1306
+ this.w3h_1 = suspendResult;
1307
+ this.g9_1 = 2;
1308
+ suspendResult = skipIfFoundReadCount(this.q3h_1, this.p3h_1, this);
1309
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1310
+ return suspendResult;
1311
+ }
1312
+
1313
+ continue $sm;
1314
+ case 2:
1315
+ var ARGUMENT = suspendResult;
1316
+ this.v3h_1 = add(this.w3h_1, ARGUMENT);
1317
+ this.g9_1 = 4;
1318
+ continue $sm;
1319
+ case 3:
1320
+ this.v3h_1 = suspendResult;
1321
+ this.g9_1 = 4;
1322
+ continue $sm;
1323
+ case 4:
1324
+ this.u3h_1 = this.v3h_1;
1325
+ this.g9_1 = 5;
1326
+ suspendResult = this.r3h_1.w1x(this);
1327
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1328
+ return suspendResult;
1329
+ }
1330
+
1331
+ continue $sm;
1332
+ case 5:
1333
+ return this.u3h_1;
1334
+ case 6:
1335
+ throw this.j9_1;
1336
+ }
1337
+ } catch ($p) {
1338
+ var e = $p;
1339
+ if (this.h9_1 === 6) {
1340
+ throw e;
1341
+ } else {
1342
+ this.g9_1 = this.h9_1;
1343
+ this.j9_1 = e;
1344
+ }
1345
+ }
1346
+ while (true);
1347
+ };
1348
+ function $skipIfFoundReadCountCOROUTINE$(_this__u8e3s4, prefix, resultContinuation) {
1349
+ CoroutineImpl.call(this, resultContinuation);
1350
+ this.f3i_1 = _this__u8e3s4;
1351
+ this.g3i_1 = prefix;
1352
+ }
1353
+ protoOf($skipIfFoundReadCountCOROUTINE$).o9 = function () {
1354
+ var suspendResult = this.i9_1;
1355
+ $sm: do
1356
+ try {
1357
+ var tmp = this.g9_1;
1358
+ switch (tmp) {
1359
+ case 0:
1360
+ this.h9_1 = 3;
1361
+ this.g9_1 = 1;
1362
+ suspendResult = skipIfFound(this.f3i_1, this.g3i_1, this);
1363
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1364
+ return suspendResult;
1365
+ }
1366
+
1367
+ continue $sm;
1368
+ case 1:
1369
+ if (suspendResult) {
1370
+ var tmp_0 = this;
1371
+ tmp_0.h3i_1 = fromInt(this.g3i_1.g1());
1372
+ this.g9_1 = 2;
1373
+ continue $sm;
1374
+ } else {
1375
+ var tmp_1 = this;
1376
+ tmp_1.h3i_1 = new Long(0, 0);
1377
+ this.g9_1 = 2;
1378
+ continue $sm;
1379
+ }
1380
+
1381
+ case 2:
1382
+ return this.h3i_1;
1383
+ case 3:
1384
+ throw this.j9_1;
1385
+ }
1386
+ } catch ($p) {
1387
+ var e = $p;
1388
+ if (this.h9_1 === 3) {
1389
+ throw e;
1390
+ } else {
1391
+ this.g9_1 = this.h9_1;
1392
+ this.j9_1 = e;
1393
+ }
1394
+ }
1395
+ while (true);
1396
+ };
1397
+ var properties_initialized_Multipart_kt_wu0sh0;
1398
+ function _init_properties_Multipart_kt__ato98a() {
1399
+ if (!properties_initialized_Multipart_kt_wu0sh0) {
1400
+ properties_initialized_Multipart_kt_wu0sh0 = true;
1401
+ CrLf = ByteString_init_$Create$(toByteArray_0('\r\n'));
1402
+ PrefixString = ByteString(new Int8Array([45, 45]));
1403
+ }
1404
+ }
1405
+ function build($this, resultList, from, maxLength, idx, length, charAt) {
1406
+ // Inline function 'kotlin.collections.groupBy' call
1407
+ // Inline function 'kotlin.collections.groupByTo' call
1408
+ var destination = LinkedHashMap_init_$Create$();
1409
+ var _iterator__ex2g4s = from.t();
1410
+ while (_iterator__ex2g4s.u()) {
1411
+ var element = _iterator__ex2g4s.v();
1412
+ var key = charAt(element, idx);
1413
+ // Inline function 'kotlin.collections.getOrPut' call
1414
+ var value = destination.w2(key);
1415
+ var tmp;
1416
+ if (value == null) {
1417
+ var answer = ArrayList_init_$Create$();
1418
+ destination.f3(key, answer);
1419
+ tmp = answer;
1420
+ } else {
1421
+ tmp = value;
1422
+ }
1423
+ var list = tmp;
1424
+ list.e1(element);
1425
+ }
1426
+ // Inline function 'kotlin.collections.forEach' call
1427
+ // Inline function 'kotlin.collections.iterator' call
1428
+ var _iterator__ex2g4s_0 = destination.n1().t();
1429
+ while (_iterator__ex2g4s_0.u()) {
1430
+ var element_0 = _iterator__ex2g4s_0.v();
1431
+ // Inline function 'kotlin.collections.component1' call
1432
+ var ch = element_0.o1().d2_1;
1433
+ // Inline function 'kotlin.collections.component2' call
1434
+ var list_0 = element_0.p1();
1435
+ var nextIdx = idx + 1 | 0;
1436
+ var children = ArrayList_init_$Create$();
1437
+ var tmp_0 = Companion_instance;
1438
+ // Inline function 'kotlin.collections.filter' call
1439
+ // Inline function 'kotlin.collections.filterTo' call
1440
+ var destination_0 = ArrayList_init_$Create$();
1441
+ var _iterator__ex2g4s_1 = list_0.t();
1442
+ while (_iterator__ex2g4s_1.u()) {
1443
+ var element_1 = _iterator__ex2g4s_1.v();
1444
+ if (length(element_1) > nextIdx) {
1445
+ destination_0.e1(element_1);
1446
+ }
1447
+ }
1448
+ build(tmp_0, children, destination_0, maxLength, nextIdx, length, charAt);
1449
+ children.s5();
1450
+ // Inline function 'kotlin.collections.filter' call
1451
+ // Inline function 'kotlin.collections.filterTo' call
1452
+ var destination_1 = ArrayList_init_$Create$();
1453
+ var _iterator__ex2g4s_2 = list_0.t();
1454
+ while (_iterator__ex2g4s_2.u()) {
1455
+ var element_2 = _iterator__ex2g4s_2.v();
1456
+ if (length(element_2) === nextIdx) {
1457
+ destination_1.e1(element_2);
1458
+ }
1459
+ }
1460
+ resultList.e1(new Node(ch, destination_1, children));
1461
+ }
1462
+ }
1463
+ function AsciiCharTree$Companion$build$lambda(it) {
1464
+ return charSequenceLength(it);
1465
+ }
1466
+ function AsciiCharTree$Companion$build$lambda_0(s, idx) {
1467
+ return new Char(charSequenceGet(s, idx));
1468
+ }
1469
+ function Node(ch, exact, children) {
1470
+ this.r3j_1 = ch;
1471
+ this.s3j_1 = exact;
1472
+ this.t3j_1 = children;
1473
+ var tmp = this;
1474
+ var tmp_0 = 0;
1475
+ // Inline function 'kotlin.arrayOfNulls' call
1476
+ var tmp_1 = Array(256);
1477
+ while (tmp_0 < 256) {
1478
+ var tmp_2 = tmp_0;
1479
+ var tmp0 = this.t3j_1;
1480
+ var tmp$ret$2;
1481
+ $l$block_0: {
1482
+ // Inline function 'kotlin.collections.singleOrNull' call
1483
+ var single = null;
1484
+ var found = false;
1485
+ var _iterator__ex2g4s = tmp0.t();
1486
+ while (_iterator__ex2g4s.u()) {
1487
+ var element = _iterator__ex2g4s.v();
1488
+ // Inline function 'kotlin.code' call
1489
+ var this_0 = element.r3j_1;
1490
+ if (Char__toInt_impl_vasixd(this_0) === tmp_2) {
1491
+ if (found) {
1492
+ tmp$ret$2 = null;
1493
+ break $l$block_0;
1494
+ }
1495
+ single = element;
1496
+ found = true;
1497
+ }
1498
+ }
1499
+ if (!found) {
1500
+ tmp$ret$2 = null;
1501
+ break $l$block_0;
1502
+ }
1503
+ tmp$ret$2 = single;
1504
+ }
1505
+ tmp_1[tmp_2] = tmp$ret$2;
1506
+ tmp_0 = tmp_0 + 1 | 0;
1507
+ }
1508
+ tmp.u3j_1 = tmp_1;
1509
+ }
1510
+ function Companion() {
1511
+ }
1512
+ protoOf(Companion).s3g = function (from) {
1513
+ var tmp = AsciiCharTree$Companion$build$lambda;
1514
+ return this.v3j(from, tmp, AsciiCharTree$Companion$build$lambda_0);
1515
+ };
1516
+ protoOf(Companion).v3j = function (from, length, charAt) {
1517
+ var tmp$ret$0;
1518
+ $l$block_0: {
1519
+ // Inline function 'kotlin.collections.maxByOrNull' call
1520
+ var iterator = from.t();
1521
+ if (!iterator.u()) {
1522
+ tmp$ret$0 = null;
1523
+ break $l$block_0;
1524
+ }
1525
+ var maxElem = iterator.v();
1526
+ if (!iterator.u()) {
1527
+ tmp$ret$0 = maxElem;
1528
+ break $l$block_0;
1529
+ }
1530
+ var maxValue = length(maxElem);
1531
+ do {
1532
+ var e = iterator.v();
1533
+ var v = length(e);
1534
+ if (compareTo(maxValue, v) < 0) {
1535
+ maxElem = e;
1536
+ maxValue = v;
1537
+ }
1538
+ }
1539
+ while (iterator.u());
1540
+ tmp$ret$0 = maxElem;
1541
+ }
1542
+ var tmp0_safe_receiver = tmp$ret$0;
1543
+ var tmp;
1544
+ if (tmp0_safe_receiver == null) {
1545
+ tmp = null;
1546
+ } else {
1547
+ // Inline function 'kotlin.let' call
1548
+ tmp = length(tmp0_safe_receiver);
1549
+ }
1550
+ var tmp1_elvis_lhs = tmp;
1551
+ var tmp_0;
1552
+ if (tmp1_elvis_lhs == null) {
1553
+ throw NoSuchElementException_init_$Create$('Unable to build char tree from an empty list');
1554
+ } else {
1555
+ tmp_0 = tmp1_elvis_lhs;
1556
+ }
1557
+ var maxLen = tmp_0;
1558
+ var tmp$ret$2;
1559
+ $l$block_2: {
1560
+ // Inline function 'kotlin.collections.any' call
1561
+ var tmp_1;
1562
+ if (isInterface(from, Collection)) {
1563
+ tmp_1 = from.r();
1564
+ } else {
1565
+ tmp_1 = false;
1566
+ }
1567
+ if (tmp_1) {
1568
+ tmp$ret$2 = false;
1569
+ break $l$block_2;
1570
+ }
1571
+ var _iterator__ex2g4s = from.t();
1572
+ while (_iterator__ex2g4s.u()) {
1573
+ var element = _iterator__ex2g4s.v();
1574
+ if (length(element) === 0) {
1575
+ tmp$ret$2 = true;
1576
+ break $l$block_2;
1577
+ }
1578
+ }
1579
+ tmp$ret$2 = false;
1580
+ }
1581
+ if (tmp$ret$2)
1582
+ throw IllegalArgumentException_init_$Create$('There should be no empty entries');
1583
+ var root = ArrayList_init_$Create$();
1584
+ build(this, root, from, maxLen, 0, length, charAt);
1585
+ root.s5();
1586
+ return new AsciiCharTree(new Node(_Char___init__impl__6a9atx(0), emptyList(), root));
1587
+ };
1588
+ var Companion_instance;
1589
+ function Companion_getInstance_1() {
1590
+ return Companion_instance;
1591
+ }
1592
+ function AsciiCharTree(root) {
1593
+ this.w3j_1 = root;
1594
+ }
1595
+ function getImpl($this, index) {
1596
+ return bufferForIndex($this, index)[index % ensureNotNull($this.y3e_1).length | 0];
1597
+ }
1598
+ function copy($this, startIndex, endIndex) {
1599
+ if (startIndex === endIndex)
1600
+ return '';
1601
+ var builder = StringBuilder_init_$Create$_0(endIndex - startIndex | 0);
1602
+ var buffer;
1603
+ var base = startIndex - (startIndex % 2048 | 0) | 0;
1604
+ while (base < endIndex) {
1605
+ buffer = bufferForIndex($this, base);
1606
+ // Inline function 'kotlin.comparisons.maxOf' call
1607
+ var b = startIndex - base | 0;
1608
+ var innerStartIndex = Math.max(0, b);
1609
+ // Inline function 'kotlin.comparisons.minOf' call
1610
+ var a = endIndex - base | 0;
1611
+ var innerEndIndex = Math.min(a, 2048);
1612
+ var inductionVariable = innerStartIndex;
1613
+ if (inductionVariable < innerEndIndex)
1614
+ do {
1615
+ var innerIndex = inductionVariable;
1616
+ inductionVariable = inductionVariable + 1 | 0;
1617
+ builder.s(buffer[innerIndex]);
1618
+ }
1619
+ while (inductionVariable < innerEndIndex);
1620
+ base = base + 2048 | 0;
1621
+ }
1622
+ return builder;
1623
+ }
1624
+ function SubSequenceImpl($outer, start, end) {
1625
+ this.a3k_1 = $outer;
1626
+ this.x3j_1 = start;
1627
+ this.y3j_1 = end;
1628
+ this.z3j_1 = null;
1629
+ }
1630
+ protoOf(SubSequenceImpl).a = function () {
1631
+ return this.y3j_1 - this.x3j_1 | 0;
1632
+ };
1633
+ protoOf(SubSequenceImpl).b = function (index) {
1634
+ var withOffset = index + this.x3j_1 | 0;
1635
+ // Inline function 'kotlin.require' call
1636
+ if (!(index >= 0)) {
1637
+ var message = 'index is negative: ' + index;
1638
+ throw IllegalArgumentException_init_$Create$(toString(message));
1639
+ }
1640
+ // Inline function 'kotlin.require' call
1641
+ if (!(withOffset < this.y3j_1)) {
1642
+ var message_0 = 'index (' + index + ') should be less than length (' + this.a() + ')';
1643
+ throw IllegalArgumentException_init_$Create$(toString(message_0));
1644
+ }
1645
+ return getImpl(this.a3k_1, withOffset);
1646
+ };
1647
+ protoOf(SubSequenceImpl).c = function (startIndex, endIndex) {
1648
+ // Inline function 'kotlin.require' call
1649
+ if (!(startIndex >= 0)) {
1650
+ var message = 'start is negative: ' + startIndex;
1651
+ throw IllegalArgumentException_init_$Create$(toString(message));
1652
+ }
1653
+ // Inline function 'kotlin.require' call
1654
+ if (!(startIndex <= endIndex)) {
1655
+ var message_0 = 'start (' + startIndex + ') should be less or equal to end (' + endIndex + ')';
1656
+ throw IllegalArgumentException_init_$Create$(toString(message_0));
1657
+ }
1658
+ // Inline function 'kotlin.require' call
1659
+ if (!(endIndex <= (this.y3j_1 - this.x3j_1 | 0))) {
1660
+ var message_1 = 'end should be less than length (' + this.a() + ')';
1661
+ throw IllegalArgumentException_init_$Create$(toString(message_1));
1662
+ }
1663
+ if (startIndex === endIndex)
1664
+ return '';
1665
+ return new SubSequenceImpl(this.a3k_1, this.x3j_1 + startIndex | 0, this.x3j_1 + endIndex | 0);
1666
+ };
1667
+ protoOf(SubSequenceImpl).toString = function () {
1668
+ var tmp0_elvis_lhs = this.z3j_1;
1669
+ var tmp;
1670
+ if (tmp0_elvis_lhs == null) {
1671
+ // Inline function 'kotlin.also' call
1672
+ var this_0 = toString(copy(this.a3k_1, this.x3j_1, this.y3j_1));
1673
+ this.z3j_1 = this_0;
1674
+ tmp = this_0;
1675
+ } else {
1676
+ tmp = tmp0_elvis_lhs;
1677
+ }
1678
+ return tmp;
1679
+ };
1680
+ protoOf(SubSequenceImpl).equals = function (other) {
1681
+ if (!(!(other == null) ? isCharSequence(other) : false))
1682
+ return false;
1683
+ if (!(charSequenceLength(other) === this.a()))
1684
+ return false;
1685
+ return rangeEqualsImpl(this.a3k_1, this.x3j_1, other, 0, this.a());
1686
+ };
1687
+ protoOf(SubSequenceImpl).hashCode = function () {
1688
+ var tmp0_safe_receiver = this.z3j_1;
1689
+ var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : getStringHashCode(tmp0_safe_receiver);
1690
+ return tmp1_elvis_lhs == null ? hashCodeImpl(this.a3k_1, this.x3j_1, this.y3j_1) : tmp1_elvis_lhs;
1691
+ };
1692
+ function bufferForIndex($this, index) {
1693
+ var list = $this.x3e_1;
1694
+ if (list == null) {
1695
+ if (index >= 2048) {
1696
+ throwSingleBuffer($this, index);
1697
+ }
1698
+ var tmp0_elvis_lhs = $this.y3e_1;
1699
+ var tmp;
1700
+ if (tmp0_elvis_lhs == null) {
1701
+ throwSingleBuffer($this, index);
1702
+ } else {
1703
+ tmp = tmp0_elvis_lhs;
1704
+ }
1705
+ return tmp;
1706
+ }
1707
+ return list.h1(index / ensureNotNull($this.y3e_1).length | 0);
1708
+ }
1709
+ function throwSingleBuffer($this, index) {
1710
+ if ($this.a3f_1)
1711
+ throw IllegalStateException_init_$Create$('Buffer is already released');
1712
+ throw IndexOutOfBoundsException_init_$Create$('' + index + ' is not in range [0; ' + currentPosition($this) + ')');
1713
+ }
1714
+ function nonFullBuffer($this) {
1715
+ return $this.b3f_1 === 0 ? appendNewArray($this) : ensureNotNull($this.y3e_1);
1716
+ }
1717
+ function appendNewArray($this) {
1718
+ var newBuffer = $this.w3e_1.m27();
1719
+ var existing = $this.y3e_1;
1720
+ $this.y3e_1 = newBuffer;
1721
+ $this.b3f_1 = newBuffer.length;
1722
+ $this.a3f_1 = false;
1723
+ if (!(existing == null)) {
1724
+ var tmp0_elvis_lhs = $this.x3e_1;
1725
+ var tmp;
1726
+ if (tmp0_elvis_lhs == null) {
1727
+ // Inline function 'kotlin.also' call
1728
+ var this_0 = ArrayList_init_$Create$();
1729
+ $this.x3e_1 = this_0;
1730
+ this_0.e1(existing);
1731
+ tmp = this_0;
1732
+ } else {
1733
+ tmp = tmp0_elvis_lhs;
1734
+ }
1735
+ var list = tmp;
1736
+ list.e1(newBuffer);
1737
+ }
1738
+ return newBuffer;
1739
+ }
1740
+ function rangeEqualsImpl($this, start, other, otherStart, length) {
1741
+ var inductionVariable = 0;
1742
+ if (inductionVariable < length)
1743
+ do {
1744
+ var i = inductionVariable;
1745
+ inductionVariable = inductionVariable + 1 | 0;
1746
+ if (!(getImpl($this, start + i | 0) === charSequenceGet(other, otherStart + i | 0)))
1747
+ return false;
1748
+ }
1749
+ while (inductionVariable < length);
1750
+ return true;
1751
+ }
1752
+ function hashCodeImpl($this, start, end) {
1753
+ var hc = 0;
1754
+ var inductionVariable = start;
1755
+ if (inductionVariable < end)
1756
+ do {
1757
+ var i = inductionVariable;
1758
+ inductionVariable = inductionVariable + 1 | 0;
1759
+ var tmp = imul(31, hc);
1760
+ // Inline function 'kotlin.code' call
1761
+ var this_0 = getImpl($this, i);
1762
+ hc = tmp + Char__toInt_impl_vasixd(this_0) | 0;
1763
+ }
1764
+ while (inductionVariable < end);
1765
+ return hc;
1766
+ }
1767
+ function currentPosition($this) {
1768
+ return ensureNotNull($this.y3e_1).length - $this.b3f_1 | 0;
1769
+ }
1770
+ function CharArrayBuilder(pool) {
1771
+ pool = pool === VOID ? get_CharArrayPool() : pool;
1772
+ this.w3e_1 = pool;
1773
+ this.x3e_1 = null;
1774
+ this.y3e_1 = null;
1775
+ this.z3e_1 = null;
1776
+ this.a3f_1 = false;
1777
+ this.b3f_1 = 0;
1778
+ this.c3f_1 = 0;
1779
+ }
1780
+ protoOf(CharArrayBuilder).a = function () {
1781
+ return this.c3f_1;
1782
+ };
1783
+ protoOf(CharArrayBuilder).b = function (index) {
1784
+ // Inline function 'kotlin.require' call
1785
+ if (!(index >= 0)) {
1786
+ var message = 'index is negative: ' + index;
1787
+ throw IllegalArgumentException_init_$Create$(toString(message));
1788
+ }
1789
+ // Inline function 'kotlin.require' call
1790
+ if (!(index < this.c3f_1)) {
1791
+ var message_0 = 'index ' + index + ' is not in range [0, ' + this.c3f_1 + ')';
1792
+ throw IllegalArgumentException_init_$Create$(toString(message_0));
1793
+ }
1794
+ return getImpl(this, index);
1795
+ };
1796
+ protoOf(CharArrayBuilder).c = function (startIndex, endIndex) {
1797
+ // Inline function 'kotlin.require' call
1798
+ if (!(startIndex <= endIndex)) {
1799
+ var message = 'startIndex (' + startIndex + ') should be less or equal to endIndex (' + endIndex + ')';
1800
+ throw IllegalArgumentException_init_$Create$(toString(message));
1801
+ }
1802
+ // Inline function 'kotlin.require' call
1803
+ if (!(startIndex >= 0)) {
1804
+ var message_0 = 'startIndex is negative: ' + startIndex;
1805
+ throw IllegalArgumentException_init_$Create$(toString(message_0));
1806
+ }
1807
+ // Inline function 'kotlin.require' call
1808
+ if (!(endIndex <= this.c3f_1)) {
1809
+ var message_1 = 'endIndex (' + endIndex + ') is greater than length (' + this.c3f_1 + ')';
1810
+ throw IllegalArgumentException_init_$Create$(toString(message_1));
1811
+ }
1812
+ return new SubSequenceImpl(this, startIndex, endIndex);
1813
+ };
1814
+ protoOf(CharArrayBuilder).toString = function () {
1815
+ var tmp0_elvis_lhs = this.z3e_1;
1816
+ var tmp;
1817
+ if (tmp0_elvis_lhs == null) {
1818
+ // Inline function 'kotlin.also' call
1819
+ var this_0 = toString(copy(this, 0, this.c3f_1));
1820
+ this.z3e_1 = this_0;
1821
+ tmp = this_0;
1822
+ } else {
1823
+ tmp = tmp0_elvis_lhs;
1824
+ }
1825
+ return tmp;
1826
+ };
1827
+ protoOf(CharArrayBuilder).equals = function (other) {
1828
+ if (!(!(other == null) ? isCharSequence(other) : false))
1829
+ return false;
1830
+ if (!(this.c3f_1 === charSequenceLength(other)))
1831
+ return false;
1832
+ return rangeEqualsImpl(this, 0, other, 0, this.c3f_1);
1833
+ };
1834
+ protoOf(CharArrayBuilder).hashCode = function () {
1835
+ var tmp0_safe_receiver = this.z3e_1;
1836
+ var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : getStringHashCode(tmp0_safe_receiver);
1837
+ return tmp1_elvis_lhs == null ? hashCodeImpl(this, 0, this.c3f_1) : tmp1_elvis_lhs;
1838
+ };
1839
+ protoOf(CharArrayBuilder).s = function (value) {
1840
+ nonFullBuffer(this)[ensureNotNull(this.y3e_1).length - this.b3f_1 | 0] = value;
1841
+ this.z3e_1 = null;
1842
+ this.b3f_1 = this.b3f_1 - 1 | 0;
1843
+ this.c3f_1 = this.c3f_1 + 1 | 0;
1844
+ return this;
1845
+ };
1846
+ protoOf(CharArrayBuilder).uc = function (value, startIndex, endIndex) {
1847
+ if (value == null)
1848
+ return this;
1849
+ var current = startIndex;
1850
+ while (current < endIndex) {
1851
+ var buffer = nonFullBuffer(this);
1852
+ var offset = buffer.length - this.b3f_1 | 0;
1853
+ var tmp0 = endIndex - current | 0;
1854
+ // Inline function 'kotlin.math.min' call
1855
+ var b = this.b3f_1;
1856
+ var bytesToCopy = Math.min(tmp0, b);
1857
+ var inductionVariable = 0;
1858
+ if (inductionVariable < bytesToCopy)
1859
+ do {
1860
+ var i = inductionVariable;
1861
+ inductionVariable = inductionVariable + 1 | 0;
1862
+ buffer[offset + i | 0] = charSequenceGet(value, current + i | 0);
1863
+ }
1864
+ while (inductionVariable < bytesToCopy);
1865
+ current = current + bytesToCopy | 0;
1866
+ this.b3f_1 = this.b3f_1 - bytesToCopy | 0;
1867
+ }
1868
+ this.z3e_1 = null;
1869
+ this.c3f_1 = this.c3f_1 + (endIndex - startIndex | 0) | 0;
1870
+ return this;
1871
+ };
1872
+ protoOf(CharArrayBuilder).f1 = function (value) {
1873
+ if (value == null)
1874
+ return this;
1875
+ return this.uc(value, 0, charSequenceLength(value));
1876
+ };
1877
+ protoOf(CharArrayBuilder).e1t = function () {
1878
+ var list = this.x3e_1;
1879
+ if (!(list == null)) {
1880
+ this.y3e_1 = null;
1881
+ var inductionVariable = 0;
1882
+ var last = list.g1();
1883
+ if (inductionVariable < last)
1884
+ do {
1885
+ var i = inductionVariable;
1886
+ inductionVariable = inductionVariable + 1 | 0;
1887
+ this.w3e_1.n27(list.h1(i));
1888
+ }
1889
+ while (inductionVariable < last);
1890
+ } else {
1891
+ var tmp0_safe_receiver = this.y3e_1;
1892
+ if (tmp0_safe_receiver == null)
1893
+ null;
1894
+ else {
1895
+ // Inline function 'kotlin.let' call
1896
+ this.w3e_1.n27(tmp0_safe_receiver);
1897
+ }
1898
+ this.y3e_1 = null;
1899
+ }
1900
+ this.a3f_1 = true;
1901
+ this.x3e_1 = null;
1902
+ this.z3e_1 = null;
1903
+ this.c3f_1 = 0;
1904
+ this.b3f_1 = 0;
1905
+ };
1906
+ function get_CharArrayPool() {
1907
+ _init_properties_CharArrayPool_kt__u4nq0d();
1908
+ return CharArrayPool;
1909
+ }
1910
+ var CharArrayPool;
1911
+ function CharArrayPool$1() {
1912
+ NoPoolImpl.call(this);
1913
+ }
1914
+ protoOf(CharArrayPool$1).m27 = function () {
1915
+ return charArray(2048);
1916
+ };
1917
+ function CharArrayPool$2() {
1918
+ DefaultPool.call(this, 4096);
1919
+ }
1920
+ protoOf(CharArrayPool$2).f27 = function () {
1921
+ return charArray(2048);
1922
+ };
1923
+ var properties_initialized_CharArrayPool_kt_aq0u0f;
1924
+ function _init_properties_CharArrayPool_kt__u4nq0d() {
1925
+ if (!properties_initialized_CharArrayPool_kt_aq0u0f) {
1926
+ properties_initialized_CharArrayPool_kt_aq0u0f = true;
1927
+ var tmp;
1928
+ if (isPoolingDisabled()) {
1929
+ tmp = new CharArrayPool$1();
1930
+ } else {
1931
+ tmp = new CharArrayPool$2();
1932
+ }
1933
+ CharArrayPool = tmp;
1934
+ }
1935
+ }
1936
+ var DefaultHttpMethods;
1937
+ var HexTable;
1938
+ var HexLetterTable;
1939
+ function hashCodeLowerCase(_this__u8e3s4, start, end) {
1940
+ start = start === VOID ? 0 : start;
1941
+ end = end === VOID ? charSequenceLength(_this__u8e3s4) : end;
1942
+ _init_properties_Chars_kt__d3i39x();
1943
+ var hashCode = 0;
1944
+ var inductionVariable = start;
1945
+ if (inductionVariable < end)
1946
+ do {
1947
+ var pos = inductionVariable;
1948
+ inductionVariable = inductionVariable + 1 | 0;
1949
+ // Inline function 'kotlin.code' call
1950
+ var this_0 = charSequenceGet(_this__u8e3s4, pos);
1951
+ // Inline function 'io.ktor.http.cio.internals.toLowerCase' call
1952
+ var this_1 = Char__toInt_impl_vasixd(this_0);
1953
+ var tmp;
1954
+ // Inline function 'kotlin.code' call
1955
+ var this_2 = _Char___init__impl__6a9atx(65);
1956
+ var containsLower = Char__toInt_impl_vasixd(this_2);
1957
+ var tmp_0;
1958
+ // Inline function 'kotlin.code' call
1959
+ var this_3 = _Char___init__impl__6a9atx(90);
1960
+ if (this_1 <= Char__toInt_impl_vasixd(this_3)) {
1961
+ tmp_0 = containsLower <= this_1;
1962
+ } else {
1963
+ tmp_0 = false;
1964
+ }
1965
+ if (tmp_0) {
1966
+ // Inline function 'kotlin.code' call
1967
+ var this_4 = _Char___init__impl__6a9atx(97);
1968
+ var tmp_1 = Char__toInt_impl_vasixd(this_4);
1969
+ // Inline function 'kotlin.code' call
1970
+ var this_5 = _Char___init__impl__6a9atx(65);
1971
+ tmp = tmp_1 + (this_1 - Char__toInt_impl_vasixd(this_5) | 0) | 0;
1972
+ } else {
1973
+ tmp = this_1;
1974
+ }
1975
+ var v = tmp;
1976
+ hashCode = imul(31, hashCode) + v | 0;
1977
+ }
1978
+ while (inductionVariable < end);
1979
+ return hashCode;
1980
+ }
1981
+ function equalsLowerCase(_this__u8e3s4, start, end, other) {
1982
+ start = start === VOID ? 0 : start;
1983
+ end = end === VOID ? charSequenceLength(_this__u8e3s4) : end;
1984
+ _init_properties_Chars_kt__d3i39x();
1985
+ if (!((end - start | 0) === charSequenceLength(other)))
1986
+ return false;
1987
+ var inductionVariable = start;
1988
+ if (inductionVariable < end)
1989
+ do {
1990
+ var pos = inductionVariable;
1991
+ inductionVariable = inductionVariable + 1 | 0;
1992
+ // Inline function 'kotlin.code' call
1993
+ var this_0 = charSequenceGet(_this__u8e3s4, pos);
1994
+ // Inline function 'io.ktor.http.cio.internals.toLowerCase' call
1995
+ var this_1 = Char__toInt_impl_vasixd(this_0);
1996
+ var tmp;
1997
+ // Inline function 'kotlin.code' call
1998
+ var this_2 = _Char___init__impl__6a9atx(65);
1999
+ var containsLower = Char__toInt_impl_vasixd(this_2);
2000
+ var tmp_0;
2001
+ // Inline function 'kotlin.code' call
2002
+ var this_3 = _Char___init__impl__6a9atx(90);
2003
+ if (this_1 <= Char__toInt_impl_vasixd(this_3)) {
2004
+ tmp_0 = containsLower <= this_1;
2005
+ } else {
2006
+ tmp_0 = false;
2007
+ }
2008
+ if (tmp_0) {
2009
+ // Inline function 'kotlin.code' call
2010
+ var this_4 = _Char___init__impl__6a9atx(97);
2011
+ var tmp_1 = Char__toInt_impl_vasixd(this_4);
2012
+ // Inline function 'kotlin.code' call
2013
+ var this_5 = _Char___init__impl__6a9atx(65);
2014
+ tmp = tmp_1 + (this_1 - Char__toInt_impl_vasixd(this_5) | 0) | 0;
2015
+ } else {
2016
+ tmp = this_1;
2017
+ }
2018
+ var tmp_2 = tmp;
2019
+ // Inline function 'kotlin.code' call
2020
+ var this_6 = charSequenceGet(other, pos - start | 0);
2021
+ // Inline function 'io.ktor.http.cio.internals.toLowerCase' call
2022
+ var this_7 = Char__toInt_impl_vasixd(this_6);
2023
+ var tmp_3;
2024
+ // Inline function 'kotlin.code' call
2025
+ var this_8 = _Char___init__impl__6a9atx(65);
2026
+ var containsLower_0 = Char__toInt_impl_vasixd(this_8);
2027
+ var tmp_4;
2028
+ // Inline function 'kotlin.code' call
2029
+ var this_9 = _Char___init__impl__6a9atx(90);
2030
+ if (this_7 <= Char__toInt_impl_vasixd(this_9)) {
2031
+ tmp_4 = containsLower_0 <= this_7;
2032
+ } else {
2033
+ tmp_4 = false;
2034
+ }
2035
+ if (tmp_4) {
2036
+ // Inline function 'kotlin.code' call
2037
+ var this_10 = _Char___init__impl__6a9atx(97);
2038
+ var tmp_5 = Char__toInt_impl_vasixd(this_10);
2039
+ // Inline function 'kotlin.code' call
2040
+ var this_11 = _Char___init__impl__6a9atx(65);
2041
+ tmp_3 = tmp_5 + (this_7 - Char__toInt_impl_vasixd(this_11) | 0) | 0;
2042
+ } else {
2043
+ tmp_3 = this_7;
2044
+ }
2045
+ if (!(tmp_2 === tmp_3))
2046
+ return false;
2047
+ }
2048
+ while (inductionVariable < end);
2049
+ return true;
2050
+ }
2051
+ function parseDecLong(_this__u8e3s4) {
2052
+ _init_properties_Chars_kt__d3i39x();
2053
+ var length = charSequenceLength(_this__u8e3s4);
2054
+ if (length > 19) {
2055
+ numberFormatException(_this__u8e3s4);
2056
+ }
2057
+ if (length === 19)
2058
+ return parseDecLongWithCheck(_this__u8e3s4);
2059
+ var result = new Long(0, 0);
2060
+ var inductionVariable = 0;
2061
+ if (inductionVariable < length)
2062
+ do {
2063
+ var i = inductionVariable;
2064
+ inductionVariable = inductionVariable + 1 | 0;
2065
+ // Inline function 'kotlin.code' call
2066
+ var this_0 = charSequenceGet(_this__u8e3s4, i);
2067
+ var tmp$ret$0 = Char__toInt_impl_vasixd(this_0);
2068
+ var digit = subtract(fromInt(tmp$ret$0), new Long(48, 0));
2069
+ if (compare(digit, new Long(0, 0)) < 0 || compare(digit, new Long(9, 0)) > 0) {
2070
+ numberFormatException_0(_this__u8e3s4, i);
2071
+ }
2072
+ result = add(add(shiftLeft(result, 3), shiftLeft(result, 1)), digit);
2073
+ }
2074
+ while (inductionVariable < length);
2075
+ return result;
2076
+ }
2077
+ function numberFormatException(cs) {
2078
+ _init_properties_Chars_kt__d3i39x();
2079
+ throw NumberFormatException_init_$Create$('Invalid number ' + toString(cs) + ': too large for Long type');
2080
+ }
2081
+ function parseDecLongWithCheck(_this__u8e3s4) {
2082
+ _init_properties_Chars_kt__d3i39x();
2083
+ var result = new Long(0, 0);
2084
+ var inductionVariable = 0;
2085
+ var last = charSequenceLength(_this__u8e3s4) - 1 | 0;
2086
+ if (inductionVariable <= last)
2087
+ do {
2088
+ var i = inductionVariable;
2089
+ inductionVariable = inductionVariable + 1 | 0;
2090
+ // Inline function 'kotlin.code' call
2091
+ var this_0 = charSequenceGet(_this__u8e3s4, i);
2092
+ var tmp$ret$0 = Char__toInt_impl_vasixd(this_0);
2093
+ var digit = subtract(fromInt(tmp$ret$0), new Long(48, 0));
2094
+ if (compare(digit, new Long(0, 0)) < 0 || compare(digit, new Long(9, 0)) > 0) {
2095
+ numberFormatException_0(_this__u8e3s4, i);
2096
+ }
2097
+ result = add(add(shiftLeft(result, 3), shiftLeft(result, 1)), digit);
2098
+ if (compare(result, new Long(0, 0)) < 0) {
2099
+ numberFormatException(_this__u8e3s4);
2100
+ }
2101
+ }
2102
+ while (inductionVariable <= last);
2103
+ return result;
2104
+ }
2105
+ function numberFormatException_0(cs, idx) {
2106
+ _init_properties_Chars_kt__d3i39x();
2107
+ throw NumberFormatException_init_$Create$('Invalid number: ' + toString(cs) + ', wrong digit: ' + toString_1(charSequenceGet(cs, idx)) + ' at position ' + idx);
2108
+ }
2109
+ function DefaultHttpMethods$lambda(it) {
2110
+ _init_properties_Chars_kt__d3i39x();
2111
+ return it.q38_1.length;
2112
+ }
2113
+ function DefaultHttpMethods$lambda_0(m, idx) {
2114
+ _init_properties_Chars_kt__d3i39x();
2115
+ return new Char(charCodeAt(m.q38_1, idx));
2116
+ }
2117
+ var properties_initialized_Chars_kt_phjfhp;
2118
+ function _init_properties_Chars_kt__d3i39x() {
2119
+ if (!properties_initialized_Chars_kt_phjfhp) {
2120
+ properties_initialized_Chars_kt_phjfhp = true;
2121
+ var tmp = Companion_instance;
2122
+ var tmp_0 = Companion_getInstance().p38_1;
2123
+ var tmp_1 = DefaultHttpMethods$lambda;
2124
+ DefaultHttpMethods = tmp.v3j(tmp_0, tmp_1, DefaultHttpMethods$lambda_0);
2125
+ // Inline function 'kotlin.collections.map' call
2126
+ var this_0 = numberRangeToNumber(0, 255);
2127
+ // Inline function 'kotlin.collections.mapTo' call
2128
+ var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
2129
+ var inductionVariable = this_0.s1_1;
2130
+ var last = this_0.t1_1;
2131
+ if (inductionVariable <= last)
2132
+ do {
2133
+ var item = inductionVariable;
2134
+ inductionVariable = inductionVariable + 1 | 0;
2135
+ var v = item;
2136
+ var tmp_2;
2137
+ if (48 <= v ? v <= 57 : false) {
2138
+ tmp_2 = subtract(numberToLong(v), new Long(48, 0));
2139
+ } else {
2140
+ var tmp_3;
2141
+ var tmp_4 = fromInt(v);
2142
+ // Inline function 'kotlin.code' call
2143
+ var this_1 = _Char___init__impl__6a9atx(97);
2144
+ var tmp$ret$3 = Char__toInt_impl_vasixd(this_1);
2145
+ if (compare(tmp_4, fromInt(tmp$ret$3)) >= 0) {
2146
+ var tmp_5 = fromInt(v);
2147
+ // Inline function 'kotlin.code' call
2148
+ var this_2 = _Char___init__impl__6a9atx(102);
2149
+ var tmp$ret$4 = Char__toInt_impl_vasixd(this_2);
2150
+ tmp_3 = compare(tmp_5, fromInt(tmp$ret$4)) <= 0;
2151
+ } else {
2152
+ tmp_3 = false;
2153
+ }
2154
+ if (tmp_3) {
2155
+ // Inline function 'kotlin.code' call
2156
+ var this_3 = _Char___init__impl__6a9atx(97);
2157
+ var tmp$ret$5 = Char__toInt_impl_vasixd(this_3);
2158
+ // Inline function 'kotlin.Long.plus' call
2159
+ var this_4 = subtract(numberToLong(v), fromInt(tmp$ret$5));
2160
+ tmp_2 = add(this_4, fromInt(10));
2161
+ } else {
2162
+ var tmp_6;
2163
+ var tmp_7 = fromInt(v);
2164
+ // Inline function 'kotlin.code' call
2165
+ var this_5 = _Char___init__impl__6a9atx(65);
2166
+ var tmp$ret$7 = Char__toInt_impl_vasixd(this_5);
2167
+ if (compare(tmp_7, fromInt(tmp$ret$7)) >= 0) {
2168
+ var tmp_8 = fromInt(v);
2169
+ // Inline function 'kotlin.code' call
2170
+ var this_6 = _Char___init__impl__6a9atx(70);
2171
+ var tmp$ret$8 = Char__toInt_impl_vasixd(this_6);
2172
+ tmp_6 = compare(tmp_8, fromInt(tmp$ret$8)) <= 0;
2173
+ } else {
2174
+ tmp_6 = false;
2175
+ }
2176
+ if (tmp_6) {
2177
+ // Inline function 'kotlin.code' call
2178
+ var this_7 = _Char___init__impl__6a9atx(65);
2179
+ var tmp$ret$9 = Char__toInt_impl_vasixd(this_7);
2180
+ // Inline function 'kotlin.Long.plus' call
2181
+ var this_8 = subtract(numberToLong(v), fromInt(tmp$ret$9));
2182
+ tmp_2 = add(this_8, fromInt(10));
2183
+ } else {
2184
+ tmp_2 = new Long(-1, -1);
2185
+ }
2186
+ }
2187
+ }
2188
+ var tmp$ret$2 = tmp_2;
2189
+ destination.e1(tmp$ret$2);
2190
+ }
2191
+ while (!(item === last));
2192
+ HexTable = toLongArray(destination);
2193
+ // Inline function 'kotlin.collections.map' call
2194
+ var this_9 = numberRangeToNumber(0, 15);
2195
+ // Inline function 'kotlin.collections.mapTo' call
2196
+ var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_9, 10));
2197
+ var inductionVariable_0 = this_9.s1_1;
2198
+ var last_0 = this_9.t1_1;
2199
+ if (inductionVariable_0 <= last_0)
2200
+ do {
2201
+ var item_0 = inductionVariable_0;
2202
+ inductionVariable_0 = inductionVariable_0 + 1 | 0;
2203
+ var it = item_0;
2204
+ var tmp_9;
2205
+ if (it < 10) {
2206
+ tmp_9 = toByte(48 + it | 0);
2207
+ } else {
2208
+ // Inline function 'kotlin.code' call
2209
+ var this_10 = Char__minus_impl_a2frrh(Char__plus_impl_qi7pgj(_Char___init__impl__6a9atx(97), it), 10);
2210
+ var tmp$ret$3_0 = Char__toInt_impl_vasixd(this_10);
2211
+ tmp_9 = toByte(tmp$ret$3_0);
2212
+ }
2213
+ var tmp$ret$2_0 = tmp_9;
2214
+ destination_0.e1(tmp$ret$2_0);
2215
+ }
2216
+ while (!(item_0 === last_0));
2217
+ HexLetterTable = toByteArray(destination_0);
2218
+ }
2219
+ }
2220
+ function UnsupportedMediaTypeExceptionCIO(message) {
2221
+ IOException_init_$Init$(message, this);
2222
+ captureStack(this, UnsupportedMediaTypeExceptionCIO);
2223
+ }
2224
+ function MutableRange(start, end) {
2225
+ this.q3g_1 = start;
2226
+ this.r3g_1 = end;
2227
+ }
2228
+ protoOf(MutableRange).toString = function () {
2229
+ return 'MutableRange(start=' + this.q3g_1 + ', end=' + this.r3g_1 + ')';
2230
+ };
2231
+ function skipSpacesAndHorizontalTabs(text, start, end) {
2232
+ var index = start;
2233
+ $l$loop: while (index < end) {
2234
+ var ch = text.b(index);
2235
+ if (!isWhitespace(ch) && !(ch === _Char___init__impl__6a9atx(9)))
2236
+ break $l$loop;
2237
+ index = index + 1 | 0;
2238
+ }
2239
+ return index;
2240
+ }
2241
+ function isPoolingDisabled() {
2242
+ return false;
2243
+ }
2244
+ //region block: init
2245
+ Companion_instance = new Companion();
2246
+ //endregion
2247
+ //region block: exports
2248
+ export {
2249
+ CIOMultipartDataBase as CIOMultipartDataBase3o5u8w437tq5s,
2250
+ };
2251
+ //endregion
2252
+
2253
+ //# sourceMappingURL=ktor-ktor-http-cio.mjs.map