@attocash/cli 0.2.3 → 0.3.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.
- package/README.md +148 -7
- package/dist/application/app.d.ts +34 -3
- package/dist/application/app.js +138 -126
- package/dist/application/operations.d.ts +3 -0
- package/dist/application/operations.js +30 -8
- package/dist/cli/cli.d.ts +1 -0
- package/dist/cli/cli.js +101 -13
- package/dist/cli/onboarding.d.ts +13 -0
- package/dist/cli/onboarding.js +99 -2
- package/dist/cli/output.js +18 -2
- package/dist/doctor/profile.js +2 -1
- package/dist/internal-marketplace.d.ts +25 -0
- package/dist/internal-marketplace.js +50 -0
- package/dist/marketplace/approval-files.d.ts +3 -0
- package/dist/marketplace/approval-files.js +97 -0
- package/dist/marketplace/approval-preview.d.ts +2 -0
- package/dist/marketplace/approval-preview.js +86 -0
- package/dist/marketplace/proof-approval.d.ts +82 -0
- package/dist/marketplace/proof-approval.js +671 -0
- package/dist/marketplace/topups.d.ts +82 -0
- package/dist/marketplace/topups.js +485 -0
- package/dist/network/batching.d.ts +2 -0
- package/dist/network/batching.js +23 -0
- package/dist/network/entry.d.ts +2 -0
- package/dist/network/entry.js +35 -0
- package/dist/network/reader.d.ts +2 -0
- package/dist/network/reader.js +125 -37
- package/dist/spending/approval.d.ts +5 -0
- package/dist/spending/approval.js +2 -0
- package/dist/spending/atto-x402.d.ts +31 -0
- package/dist/spending/atto-x402.js +174 -0
- package/dist/spending/ledger.d.ts +74 -2
- package/dist/spending/ledger.js +298 -7
- package/dist/spending/payments.d.ts +105 -5
- package/dist/spending/payments.js +795 -11
- package/dist/storage/recovery-seed.d.ts +13 -0
- package/dist/storage/recovery-seed.js +93 -0
- package/dist/storage/state.d.ts +4 -0
- package/dist/storage/state.js +32 -2
- package/dist/wallet/receive.d.ts +39 -0
- package/dist/wallet/receive.js +264 -0
- package/dist/wallet/signing.d.ts +1 -0
- package/dist/wallet/signing.js +37 -21
- package/dist/wallet/types.d.ts +1 -0
- package/node_modules/@attocash/commons-core/Kotlin-DateTime-library-kotlinx-datetime.mjs +1922 -1918
- package/node_modules/@attocash/commons-core/Kotlin-DateTime-library-kotlinx-datetime.mjs.map +1 -1
- package/node_modules/@attocash/commons-core/README.md +9 -0
- package/node_modules/@attocash/commons-core/commons-commons-core.d.mts +10 -0
- package/node_modules/@attocash/commons-core/commons-commons-core.mjs +2543 -2434
- package/node_modules/@attocash/commons-core/commons-commons-core.mjs.map +1 -1
- package/node_modules/@attocash/commons-core/kotlin-kotlin-stdlib.mjs +4695 -4227
- package/node_modules/@attocash/commons-core/kotlin-kotlin-stdlib.mjs.map +1 -1
- package/node_modules/@attocash/commons-core/kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.mjs.map +1 -1
- package/node_modules/@attocash/commons-core/kotlinx-io-kotlinx-io-bytestring.mjs +60 -60
- package/node_modules/@attocash/commons-core/kotlinx-io-kotlinx-io-bytestring.mjs.map +1 -1
- package/node_modules/@attocash/commons-core/kotlinx-io-kotlinx-io-core.mjs +651 -631
- package/node_modules/@attocash/commons-core/kotlinx-io-kotlinx-io-core.mjs.map +1 -1
- package/node_modules/@attocash/commons-core/kotlinx-serialization-kotlinx-serialization-core.mjs +2294 -2295
- package/node_modules/@attocash/commons-core/kotlinx-serialization-kotlinx-serialization-core.mjs.map +1 -1
- package/node_modules/@attocash/commons-core/kotlinx-serialization-kotlinx-serialization-json.mjs +1732 -1701
- package/node_modules/@attocash/commons-core/kotlinx-serialization-kotlinx-serialization-json.mjs.map +1 -1
- package/node_modules/@attocash/commons-core/package.json +1 -1
- package/node_modules/@attocash/commons-node/commons-commons-node.d.mts +1 -0
- package/node_modules/@attocash/commons-node/commons-commons-node.mjs +873 -847
- package/node_modules/@attocash/commons-node/commons-commons-node.mjs.map +1 -1
- package/node_modules/@attocash/commons-node/kotlin-logging.mjs +109 -109
- package/node_modules/@attocash/commons-node/kotlin-logging.mjs.map +1 -1
- package/node_modules/@attocash/commons-node/kotlinx-serialization-kotlinx-serialization-json.mjs +1732 -1701
- package/node_modules/@attocash/commons-node/kotlinx-serialization-kotlinx-serialization-json.mjs.map +1 -1
- package/node_modules/@attocash/commons-node/package.json +3 -3
- package/node_modules/@attocash/commons-node-remote/commons-commons-node-remote.d.mts +1 -0
- package/node_modules/@attocash/commons-node-remote/commons-commons-node-remote.mjs +674 -640
- package/node_modules/@attocash/commons-node-remote/commons-commons-node-remote.mjs.map +1 -1
- package/node_modules/@attocash/commons-node-remote/kotlin-logging.mjs +109 -109
- package/node_modules/@attocash/commons-node-remote/kotlin-logging.mjs.map +1 -1
- package/node_modules/@attocash/commons-node-remote/kotlinx-browser.mjs.map +1 -1
- package/node_modules/@attocash/commons-node-remote/kotlinx-serialization-kotlinx-serialization-json-io.mjs.map +1 -1
- package/node_modules/@attocash/commons-node-remote/kotlinx-serialization-kotlinx-serialization-json.mjs +1732 -1701
- package/node_modules/@attocash/commons-node-remote/kotlinx-serialization-kotlinx-serialization-json.mjs.map +1 -1
- package/node_modules/@attocash/commons-node-remote/package.json +4 -4
- package/node_modules/@attocash/commons-transport/commons-commons-transport.d.mts +1 -0
- package/node_modules/@attocash/commons-transport/commons-commons-transport.mjs +52 -51
- package/node_modules/@attocash/commons-transport/commons-commons-transport.mjs.map +1 -1
- package/node_modules/@attocash/commons-transport/kotlinx-atomicfu.mjs +13 -13
- package/node_modules/@attocash/commons-transport/kotlinx-atomicfu.mjs.map +1 -1
- package/node_modules/@attocash/commons-transport/kotlinx-browser.mjs.map +1 -1
- package/node_modules/@attocash/commons-transport/kotlinx-coroutines-core.mjs +2639 -2608
- package/node_modules/@attocash/commons-transport/kotlinx-coroutines-core.mjs.map +1 -1
- package/node_modules/@attocash/commons-transport/kotlinx-serialization-kotlinx-serialization-json-io.mjs.map +1 -1
- package/node_modules/@attocash/commons-transport/kotlinx-serialization-kotlinx-serialization-json.mjs +1732 -1701
- package/node_modules/@attocash/commons-transport/kotlinx-serialization-kotlinx-serialization-json.mjs.map +1 -1
- package/node_modules/@attocash/commons-transport/ktor-ktor-client-content-negotiation.mjs +411 -196
- package/node_modules/@attocash/commons-transport/ktor-ktor-client-content-negotiation.mjs.map +1 -1
- package/node_modules/@attocash/commons-transport/ktor-ktor-client-core.mjs +2115 -1976
- package/node_modules/@attocash/commons-transport/ktor-ktor-client-core.mjs.map +1 -1
- package/node_modules/@attocash/commons-transport/ktor-ktor-events.mjs +7 -7
- package/node_modules/@attocash/commons-transport/ktor-ktor-events.mjs.map +1 -1
- package/node_modules/@attocash/commons-transport/ktor-ktor-http-cio.mjs +385 -384
- package/node_modules/@attocash/commons-transport/ktor-ktor-http-cio.mjs.map +1 -1
- package/node_modules/@attocash/commons-transport/ktor-ktor-http.mjs +1261 -1185
- package/node_modules/@attocash/commons-transport/ktor-ktor-http.mjs.map +1 -1
- package/node_modules/@attocash/commons-transport/ktor-ktor-io.mjs +668 -656
- package/node_modules/@attocash/commons-transport/ktor-ktor-io.mjs.map +1 -1
- package/node_modules/@attocash/commons-transport/ktor-ktor-openapi-schema.mjs +89 -0
- package/node_modules/@attocash/commons-transport/ktor-ktor-openapi-schema.mjs.map +1 -0
- package/node_modules/@attocash/commons-transport/ktor-ktor-serialization-kotlinx-json.mjs +9 -9
- package/node_modules/@attocash/commons-transport/ktor-ktor-serialization-kotlinx-json.mjs.map +1 -1
- package/node_modules/@attocash/commons-transport/ktor-ktor-serialization-kotlinx.mjs +120 -128
- package/node_modules/@attocash/commons-transport/ktor-ktor-serialization-kotlinx.mjs.map +1 -1
- package/node_modules/@attocash/commons-transport/ktor-ktor-serialization.mjs +46 -49
- package/node_modules/@attocash/commons-transport/ktor-ktor-serialization.mjs.map +1 -1
- package/node_modules/@attocash/commons-transport/ktor-ktor-sse.mjs.map +1 -1
- package/node_modules/@attocash/commons-transport/ktor-ktor-utils.mjs +1041 -985
- package/node_modules/@attocash/commons-transport/ktor-ktor-utils.mjs.map +1 -1
- package/node_modules/@attocash/commons-transport/ktor-ktor-websocket-serialization.mjs.map +1 -1
- package/node_modules/@attocash/commons-transport/ktor-ktor-websockets.mjs +530 -455
- package/node_modules/@attocash/commons-transport/ktor-ktor-websockets.mjs.map +1 -1
- package/node_modules/@attocash/commons-transport/package.json +4 -4
- package/node_modules/@attocash/commons-worker/commons-commons-worker.d.mts +1 -0
- package/node_modules/@attocash/commons-worker/commons-commons-worker.mjs +230 -226
- package/node_modules/@attocash/commons-worker/commons-commons-worker.mjs.map +1 -1
- package/node_modules/@attocash/commons-worker/kotlin-logging.mjs +109 -109
- package/node_modules/@attocash/commons-worker/kotlin-logging.mjs.map +1 -1
- package/node_modules/@attocash/commons-worker/kotlinx-serialization-kotlinx-serialization-json.mjs +1732 -1701
- package/node_modules/@attocash/commons-worker/kotlinx-serialization-kotlinx-serialization-json.mjs.map +1 -1
- package/node_modules/@attocash/commons-worker/package.json +3 -3
- package/node_modules/@attocash/commons-worker-remote/commons-commons-worker-remote.d.mts +1 -0
- package/node_modules/@attocash/commons-worker-remote/commons-commons-worker-remote.mjs +91 -86
- package/node_modules/@attocash/commons-worker-remote/commons-commons-worker-remote.mjs.map +1 -1
- package/node_modules/@attocash/commons-worker-remote/kotlin-logging.mjs +109 -109
- package/node_modules/@attocash/commons-worker-remote/kotlin-logging.mjs.map +1 -1
- package/node_modules/@attocash/commons-worker-remote/kotlinx-browser.mjs.map +1 -1
- package/node_modules/@attocash/commons-worker-remote/kotlinx-serialization-kotlinx-serialization-json-io.mjs.map +1 -1
- package/node_modules/@attocash/commons-worker-remote/kotlinx-serialization-kotlinx-serialization-json.mjs +1732 -1701
- package/node_modules/@attocash/commons-worker-remote/kotlinx-serialization-kotlinx-serialization-json.mjs.map +1 -1
- package/node_modules/@attocash/commons-worker-remote/package.json +4 -4
- package/package.json +9 -5
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
Companion_instancejy2056q2ma5w as Companion_instance,
|
|
3
|
+
Unit_instance3kz1zqli6gr1r as Unit_instance,
|
|
4
|
+
_Result___init__impl__xyqfz832zdzqrocazzs as _Result___init__impl__xyqfz8,
|
|
5
5
|
initMetadataForCompanion1wyw17z38v6ac as initMetadataForCompanion,
|
|
6
6
|
VOID3gxj6tk5isa35 as VOID,
|
|
7
7
|
initMetadataForObject1cxne3s9w65el as initMetadataForObject,
|
|
@@ -34,16 +34,18 @@ import {
|
|
|
34
34
|
IllegalArgumentException2asla15b5jaob as IllegalArgumentException,
|
|
35
35
|
StringBuildermazzzhj6kkai as StringBuilder,
|
|
36
36
|
subtract2orl8z9upxd9l as subtract,
|
|
37
|
+
orPromise1iucc2to2udt2 as orPromise,
|
|
37
38
|
constructCallableReference23y65rf941mch as constructCallableReference,
|
|
38
|
-
|
|
39
|
+
EmptyCoroutineContext_instance3dshdbvg42f79 as EmptyCoroutineContext_instance,
|
|
39
40
|
Continuation1aa2oekvx7jm7 as Continuation,
|
|
41
|
+
$3l5vvh8yg0ier as $,
|
|
40
42
|
Enum3alwj03lh1n41 as Enum,
|
|
41
43
|
ArrayList3it5z8td81qkl as ArrayList,
|
|
42
44
|
listOf1jh22dvmctj1r as listOf,
|
|
43
45
|
charSequenceLength3278n89t01tmv as charSequenceLength,
|
|
44
|
-
|
|
46
|
+
encodeToByteArray1onwao0uakjfh as encodeToByteArray,
|
|
45
47
|
AutoCloseable1l5p57f9lp7kv as AutoCloseable,
|
|
46
|
-
|
|
48
|
+
_Char___init__impl__6a9atxrzocepzq3zgi as _Char___init__impl__6a9atx,
|
|
47
49
|
replaceqbix900hl8kl as replace_0,
|
|
48
50
|
getStringHashCode26igk1bx568vk as getStringHashCode,
|
|
49
51
|
charSequenceSubSequence1iwpdba8s3jc7 as charSequenceSubSequence,
|
|
@@ -53,7 +55,7 @@ import {
|
|
|
53
55
|
decodeToString1x4faah2liw2p as decodeToString,
|
|
54
56
|
setOf45ia9pnfhe90 as setOf,
|
|
55
57
|
charSequenceGet1vxk1y5n17t1z as charSequenceGet,
|
|
56
|
-
|
|
58
|
+
Char__toInt_impl_vasixd28v1p2u6jau5g as Char__toInt_impl_vasixd,
|
|
57
59
|
} from '@attocash/commons-core/kotlin-kotlin-stdlib.mjs';
|
|
58
60
|
import {
|
|
59
61
|
DisposableHandle1uzxt8frdchxn as DisposableHandle,
|
|
@@ -64,7 +66,7 @@ import {
|
|
|
64
66
|
get_job2zvlvce9o9a29 as get_job,
|
|
65
67
|
Job13y4jkazwjho0 as Job,
|
|
66
68
|
cancel1xim2hrvjmwpn as cancel,
|
|
67
|
-
|
|
69
|
+
Dispatchers_getInstance128lm494a5r5s as Dispatchers_getInstance,
|
|
68
70
|
} from './kotlinx-coroutines-core.mjs';
|
|
69
71
|
import {
|
|
70
72
|
Buffergs925ekssbch as Buffer,
|
|
@@ -72,8 +74,9 @@ import {
|
|
|
72
74
|
IOException1wyutdmfe71nu as IOException,
|
|
73
75
|
EOFExceptionh831u25jcq9n as EOFException,
|
|
74
76
|
readByteString2hnsbql6t4ads as readByteString,
|
|
75
|
-
|
|
76
|
-
|
|
77
|
+
readStringo8i62qxt5m4m as readString,
|
|
78
|
+
readString3v6duspiz33tv as readString_0,
|
|
79
|
+
readString2nvggcfaijfhd as readString_1,
|
|
77
80
|
readByteArray1fhzfwi2j014k as readByteArray,
|
|
78
81
|
writeString33ca4btrgctw7 as writeString,
|
|
79
82
|
readByteArray1ri21h2rciakw as readByteArray_0,
|
|
@@ -86,10 +89,10 @@ import { decodeToString2ede220pr5xir as decodeToString_0 } from '@attocash/commo
|
|
|
86
89
|
class Companion {
|
|
87
90
|
constructor() {
|
|
88
91
|
Companion_instance_0 = this;
|
|
89
|
-
this.
|
|
92
|
+
this.CLOSED_1 = new Closed(null);
|
|
90
93
|
var tmp = this;
|
|
91
94
|
// Inline function 'kotlin.Companion.success' call
|
|
92
|
-
tmp.
|
|
95
|
+
tmp.RESUME_1 = _Result___init__impl__xyqfz8(Unit_instance);
|
|
93
96
|
}
|
|
94
97
|
}
|
|
95
98
|
class Empty {
|
|
@@ -109,30 +112,30 @@ class Empty {
|
|
|
109
112
|
}
|
|
110
113
|
class Closed {
|
|
111
114
|
constructor(cause) {
|
|
112
|
-
this.
|
|
115
|
+
this.cause_1 = cause;
|
|
113
116
|
}
|
|
114
117
|
toString() {
|
|
115
|
-
return 'Closed(cause=' + toString(this.
|
|
118
|
+
return 'Closed(cause=' + toString(this.cause_1) + ')';
|
|
116
119
|
}
|
|
117
120
|
hashCode() {
|
|
118
|
-
return this.
|
|
121
|
+
return this.cause_1 == null ? 0 : hashCode(this.cause_1);
|
|
119
122
|
}
|
|
120
123
|
equals(other) {
|
|
121
124
|
if (this === other)
|
|
122
125
|
return true;
|
|
123
126
|
if (!(other instanceof Closed))
|
|
124
127
|
return false;
|
|
125
|
-
if (!equals(this.
|
|
128
|
+
if (!equals(this.cause_1, other.cause_1))
|
|
126
129
|
return false;
|
|
127
130
|
return true;
|
|
128
131
|
}
|
|
129
132
|
}
|
|
130
133
|
class Task {}
|
|
131
134
|
function resume() {
|
|
132
|
-
return this.
|
|
135
|
+
return this.get_continuation_7yron4_k$().resumeWith_rk9gbt_k$(Companion_getInstance().RESUME_1);
|
|
133
136
|
}
|
|
134
137
|
function resume_0(throwable) {
|
|
135
|
-
var tmp = this.
|
|
138
|
+
var tmp = this.get_continuation_7yron4_k$();
|
|
136
139
|
var tmp_0;
|
|
137
140
|
if (throwable == null) {
|
|
138
141
|
tmp_0 = null;
|
|
@@ -143,68 +146,68 @@ function resume_0(throwable) {
|
|
|
143
146
|
tmp_0 = new Result(tmp$ret$0);
|
|
144
147
|
}
|
|
145
148
|
var tmp1_elvis_lhs = tmp_0;
|
|
146
|
-
return tmp.
|
|
149
|
+
return tmp.resumeWith_rk9gbt_k$(tmp1_elvis_lhs == null ? Companion_getInstance().RESUME_1 : tmp1_elvis_lhs.value_1);
|
|
147
150
|
}
|
|
148
151
|
class Read {
|
|
149
152
|
constructor(continuation) {
|
|
150
|
-
this.
|
|
151
|
-
this.
|
|
153
|
+
this.continuation_1 = continuation;
|
|
154
|
+
this.created_1 = null;
|
|
152
155
|
if (get_DEVELOPMENT_MODE()) {
|
|
153
156
|
var tmp = this;
|
|
154
157
|
// Inline function 'kotlin.also' call
|
|
155
|
-
var this_0 = newThrowable('ReadTask 0x' + toString_0(hashCode(this.
|
|
158
|
+
var this_0 = newThrowable('ReadTask 0x' + toString_0(hashCode(this.continuation_1), 16));
|
|
156
159
|
stackTraceToString(this_0);
|
|
157
|
-
tmp.
|
|
160
|
+
tmp.created_1 = this_0;
|
|
158
161
|
}
|
|
159
162
|
}
|
|
160
|
-
|
|
161
|
-
return this.
|
|
163
|
+
get_continuation_7yron4_k$() {
|
|
164
|
+
return this.continuation_1;
|
|
162
165
|
}
|
|
163
|
-
|
|
164
|
-
return this.
|
|
166
|
+
get_created_i9xfr3_k$() {
|
|
167
|
+
return this.created_1;
|
|
165
168
|
}
|
|
166
|
-
|
|
169
|
+
taskName_6sat74_k$() {
|
|
167
170
|
return 'read';
|
|
168
171
|
}
|
|
169
172
|
}
|
|
170
173
|
class Write {
|
|
171
174
|
constructor(continuation) {
|
|
172
|
-
this.
|
|
173
|
-
this.
|
|
175
|
+
this.continuation_1 = continuation;
|
|
176
|
+
this.created_1 = null;
|
|
174
177
|
if (get_DEVELOPMENT_MODE()) {
|
|
175
178
|
var tmp = this;
|
|
176
179
|
// Inline function 'kotlin.also' call
|
|
177
|
-
var this_0 = newThrowable('WriteTask 0x' + toString_0(hashCode(this.
|
|
180
|
+
var this_0 = newThrowable('WriteTask 0x' + toString_0(hashCode(this.continuation_1), 16));
|
|
178
181
|
stackTraceToString(this_0);
|
|
179
|
-
tmp.
|
|
182
|
+
tmp.created_1 = this_0;
|
|
180
183
|
}
|
|
181
184
|
}
|
|
182
|
-
|
|
183
|
-
return this.
|
|
185
|
+
get_continuation_7yron4_k$() {
|
|
186
|
+
return this.continuation_1;
|
|
184
187
|
}
|
|
185
|
-
|
|
186
|
-
return this.
|
|
188
|
+
get_created_i9xfr3_k$() {
|
|
189
|
+
return this.created_1;
|
|
187
190
|
}
|
|
188
|
-
|
|
191
|
+
taskName_6sat74_k$() {
|
|
189
192
|
return 'write';
|
|
190
193
|
}
|
|
191
194
|
}
|
|
192
195
|
class sam$kotlinx_coroutines_DisposableHandle$0 {
|
|
193
196
|
constructor(function_0) {
|
|
194
|
-
this.
|
|
197
|
+
this.function_1 = function_0;
|
|
195
198
|
}
|
|
196
|
-
|
|
197
|
-
return this.
|
|
199
|
+
dispose_3nnxhr_k$() {
|
|
200
|
+
return this.function_1();
|
|
198
201
|
}
|
|
199
|
-
|
|
200
|
-
return this.
|
|
202
|
+
getFunctionDelegate_jtodtf_k$() {
|
|
203
|
+
return this.function_1;
|
|
201
204
|
}
|
|
202
205
|
equals(other) {
|
|
203
206
|
var tmp;
|
|
204
207
|
if (!(other == null) ? isInterface(other, DisposableHandle) : false) {
|
|
205
208
|
var tmp_0;
|
|
206
209
|
if (!(other == null) ? isInterface(other, FunctionAdapter) : false) {
|
|
207
|
-
tmp_0 = equals(this.
|
|
210
|
+
tmp_0 = equals(this.getFunctionDelegate_jtodtf_k$(), other.getFunctionDelegate_jtodtf_k$());
|
|
208
211
|
} else {
|
|
209
212
|
tmp_0 = false;
|
|
210
213
|
}
|
|
@@ -215,13 +218,13 @@ class sam$kotlinx_coroutines_DisposableHandle$0 {
|
|
|
215
218
|
return tmp;
|
|
216
219
|
}
|
|
217
220
|
hashCode() {
|
|
218
|
-
return hashCode(this.
|
|
221
|
+
return hashCode(this.getFunctionDelegate_jtodtf_k$());
|
|
219
222
|
}
|
|
220
223
|
}
|
|
221
224
|
class ByteReadChannel {}
|
|
222
225
|
function awaitContent$default(min, $completion, $super) {
|
|
223
226
|
min = min === VOID ? 1 : min;
|
|
224
|
-
return $super === VOID ? this.
|
|
227
|
+
return $super === VOID ? this.awaitContent_q7m0p7_k$(min, $completion) : $super.awaitContent_q7m0p7_k$.call(this, min, $completion);
|
|
225
228
|
}
|
|
226
229
|
class ByteWriteChannel {}
|
|
227
230
|
function get_autoFlush() {
|
|
@@ -230,24 +233,24 @@ function get_autoFlush() {
|
|
|
230
233
|
class ByteChannel {
|
|
231
234
|
constructor(autoFlush) {
|
|
232
235
|
autoFlush = autoFlush === VOID ? false : autoFlush;
|
|
233
|
-
this.
|
|
234
|
-
this.
|
|
235
|
-
this.
|
|
236
|
-
this.
|
|
237
|
-
this.
|
|
238
|
-
this.
|
|
239
|
-
this.
|
|
240
|
-
this.
|
|
241
|
-
this.
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
return this.
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
return this.
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
var tmp0_safe_receiver = this.
|
|
236
|
+
this.autoFlush_1 = autoFlush;
|
|
237
|
+
this.flushBuffer_1 = new Buffer();
|
|
238
|
+
this.flushBufferSize_1 = 0;
|
|
239
|
+
this.flushBufferMutex_1 = new Object();
|
|
240
|
+
this.suspensionSlot_1 = atomic$ref$1(Empty_instance);
|
|
241
|
+
this._readBuffer_1 = new Buffer();
|
|
242
|
+
this._writeBuffer_1 = new Buffer();
|
|
243
|
+
this._closedCause_1 = atomic$ref$1(null);
|
|
244
|
+
this.closeHandler_1 = atomic$ref$1(null);
|
|
245
|
+
}
|
|
246
|
+
get_autoFlush_zfdl3o_k$() {
|
|
247
|
+
return this.autoFlush_1;
|
|
248
|
+
}
|
|
249
|
+
get_hasFreeSpace_krtyyf_k$() {
|
|
250
|
+
return this.flushBufferSize_1 < 1048576;
|
|
251
|
+
}
|
|
252
|
+
get_readBuffer_yjmj9b_k$() {
|
|
253
|
+
var tmp0_safe_receiver = this._closedCause_1.kotlinx$atomicfu$value;
|
|
251
254
|
if (tmp0_safe_receiver == null)
|
|
252
255
|
null;
|
|
253
256
|
else {
|
|
@@ -259,13 +262,13 @@ class ByteChannel {
|
|
|
259
262
|
tmp = null;
|
|
260
263
|
} else {
|
|
261
264
|
if (isInterface(tmp0_subject, CopyableThrowable)) {
|
|
262
|
-
tmp = access$_get_origin__hdh1qz(tmp0_safe_receiver).
|
|
265
|
+
tmp = access$_get_origin__hdh1qz(tmp0_safe_receiver).createCopy_mmw9ld_k$();
|
|
263
266
|
} else {
|
|
264
267
|
if (tmp0_subject instanceof CancellationException) {
|
|
265
|
-
tmp = CancellationException.
|
|
268
|
+
tmp = CancellationException.new_kotlin_coroutines_cancellation_CancellationException_cpsifs_k$(access$_get_origin__hdh1qz(tmp0_safe_receiver).message, access$_get_origin__hdh1qz(tmp0_safe_receiver));
|
|
266
269
|
} else {
|
|
267
270
|
var p0 = access$_get_origin__hdh1qz(tmp0_safe_receiver);
|
|
268
|
-
tmp = ClosedReadChannelException.
|
|
271
|
+
tmp = ClosedReadChannelException.new_io_ktor_utils_io_ClosedReadChannelException_uqrd2v_k$(p0);
|
|
269
272
|
}
|
|
270
273
|
}
|
|
271
274
|
}
|
|
@@ -278,14 +281,14 @@ class ByteChannel {
|
|
|
278
281
|
throw tmp0_safe_receiver_0;
|
|
279
282
|
}
|
|
280
283
|
}
|
|
281
|
-
if (this.
|
|
284
|
+
if (this._readBuffer_1.exhausted_p1jt55_k$()) {
|
|
282
285
|
moveFlushToReadBuffer(this);
|
|
283
286
|
}
|
|
284
|
-
return this.
|
|
287
|
+
return this._readBuffer_1;
|
|
285
288
|
}
|
|
286
|
-
|
|
287
|
-
if (this.
|
|
288
|
-
var tmp0_safe_receiver = this.
|
|
289
|
+
get_writeBuffer_t7kuc6_k$() {
|
|
290
|
+
if (this.get_isClosedForWrite_seyg5n_k$()) {
|
|
291
|
+
var tmp0_safe_receiver = this._closedCause_1.kotlinx$atomicfu$value;
|
|
289
292
|
var tmp;
|
|
290
293
|
if (tmp0_safe_receiver == null) {
|
|
291
294
|
tmp = null;
|
|
@@ -298,13 +301,13 @@ class ByteChannel {
|
|
|
298
301
|
tmp_0 = null;
|
|
299
302
|
} else {
|
|
300
303
|
if (isInterface(tmp0_subject, CopyableThrowable)) {
|
|
301
|
-
tmp_0 = access$_get_origin__hdh1qz(tmp0_safe_receiver).
|
|
304
|
+
tmp_0 = access$_get_origin__hdh1qz(tmp0_safe_receiver).createCopy_mmw9ld_k$();
|
|
302
305
|
} else {
|
|
303
306
|
if (tmp0_subject instanceof CancellationException) {
|
|
304
|
-
tmp_0 = CancellationException.
|
|
307
|
+
tmp_0 = CancellationException.new_kotlin_coroutines_cancellation_CancellationException_cpsifs_k$(access$_get_origin__hdh1qz(tmp0_safe_receiver).message, access$_get_origin__hdh1qz(tmp0_safe_receiver));
|
|
305
308
|
} else {
|
|
306
309
|
var p0 = access$_get_origin__hdh1qz(tmp0_safe_receiver);
|
|
307
|
-
tmp_0 = ClosedWriteChannelException.
|
|
310
|
+
tmp_0 = ClosedWriteChannelException.new_io_ktor_utils_io_ClosedWriteChannelException_h4pidy_k$(p0);
|
|
308
311
|
}
|
|
309
312
|
}
|
|
310
313
|
}
|
|
@@ -319,12 +322,12 @@ class ByteChannel {
|
|
|
319
322
|
tmp = tmp_1;
|
|
320
323
|
}
|
|
321
324
|
if (tmp == null)
|
|
322
|
-
throw ClosedWriteChannelException.
|
|
325
|
+
throw ClosedWriteChannelException.new_io_ktor_utils_io_ClosedWriteChannelException_h4pidy_k$();
|
|
323
326
|
}
|
|
324
|
-
return this.
|
|
327
|
+
return this._writeBuffer_1;
|
|
325
328
|
}
|
|
326
|
-
|
|
327
|
-
var tmp0_safe_receiver = this.
|
|
329
|
+
get_closedCause_o1qcj8_k$() {
|
|
330
|
+
var tmp0_safe_receiver = this._closedCause_1.kotlinx$atomicfu$value;
|
|
328
331
|
var tmp;
|
|
329
332
|
if (tmp0_safe_receiver == null) {
|
|
330
333
|
tmp = null;
|
|
@@ -336,13 +339,13 @@ class ByteChannel {
|
|
|
336
339
|
tmp_0 = null;
|
|
337
340
|
} else {
|
|
338
341
|
if (isInterface(tmp0_subject, CopyableThrowable)) {
|
|
339
|
-
tmp_0 = access$_get_origin__hdh1qz(tmp0_safe_receiver).
|
|
342
|
+
tmp_0 = access$_get_origin__hdh1qz(tmp0_safe_receiver).createCopy_mmw9ld_k$();
|
|
340
343
|
} else {
|
|
341
344
|
if (tmp0_subject instanceof CancellationException) {
|
|
342
|
-
tmp_0 = CancellationException.
|
|
345
|
+
tmp_0 = CancellationException.new_kotlin_coroutines_cancellation_CancellationException_cpsifs_k$(access$_get_origin__hdh1qz(tmp0_safe_receiver).message, access$_get_origin__hdh1qz(tmp0_safe_receiver));
|
|
343
346
|
} else {
|
|
344
347
|
var p0 = access$_get_origin__hdh1qz(tmp0_safe_receiver);
|
|
345
|
-
tmp_0 = ClosedByteChannelException.
|
|
348
|
+
tmp_0 = ClosedByteChannelException.new_io_ktor_utils_io_ClosedByteChannelException_cg48aj_k$(p0);
|
|
346
349
|
}
|
|
347
350
|
}
|
|
348
351
|
}
|
|
@@ -350,44 +353,44 @@ class ByteChannel {
|
|
|
350
353
|
}
|
|
351
354
|
return tmp;
|
|
352
355
|
}
|
|
353
|
-
|
|
354
|
-
return !(this.
|
|
356
|
+
get_isClosedForWrite_seyg5n_k$() {
|
|
357
|
+
return !(this._closedCause_1.kotlinx$atomicfu$value == null);
|
|
355
358
|
}
|
|
356
|
-
|
|
357
|
-
return !(this.
|
|
359
|
+
get_isClosedForRead_ajcc1s_k$() {
|
|
360
|
+
return !(this.get_closedCause_o1qcj8_k$() == null) || (this.get_isClosedForWrite_seyg5n_k$() && this.flushBufferSize_1 === 0 && this._readBuffer_1.exhausted_p1jt55_k$());
|
|
358
361
|
}
|
|
359
|
-
*
|
|
360
|
-
|
|
361
|
-
if (this.
|
|
362
|
+
*awaitContent_q7m0p7_k$(min, $completion) {
|
|
363
|
+
rethrowCloseCauseIfNeeded(this);
|
|
364
|
+
if (this._readBuffer_1.get_size_woubt6_k$() >= fromInt(min))
|
|
362
365
|
return true;
|
|
363
366
|
// Inline function 'io.ktor.utils.io.ByteChannel.sleepWhile' call
|
|
364
367
|
var this_0 = this;
|
|
365
|
-
$l$loop: while (add(numberToLong(this.
|
|
368
|
+
$l$loop: while (add(numberToLong(this.flushBufferSize_1), this._readBuffer_1.get_size_woubt6_k$()) < fromInt(min) && this._closedCause_1.kotlinx$atomicfu$value == null) {
|
|
366
369
|
// Inline function 'kotlinx.coroutines.suspendCancellableCoroutine' call
|
|
367
370
|
// Inline function 'kotlin.js.suspendCoroutineUninterceptedOrReturnJS' call
|
|
368
371
|
(yield () => {
|
|
369
372
|
var uCont = $completion;
|
|
370
373
|
var cancellable = new CancellableContinuationImpl(intercepted(uCont), 1);
|
|
371
|
-
cancellable.
|
|
374
|
+
cancellable.initCancellability_shqc60_k$();
|
|
372
375
|
var tmp0 = this_0;
|
|
373
376
|
var tmp2 = new Read(cancellable);
|
|
374
377
|
$l$block_0: {
|
|
375
378
|
// Inline function 'io.ktor.utils.io.ByteChannel.trySuspend' call
|
|
376
|
-
var previous = tmp0.
|
|
379
|
+
var previous = tmp0.suspensionSlot_1.kotlinx$atomicfu$value;
|
|
377
380
|
if (!(previous instanceof Closed)) {
|
|
378
|
-
if (!tmp0.
|
|
379
|
-
tmp2.
|
|
381
|
+
if (!tmp0.suspensionSlot_1.atomicfu$compareAndSet(previous, tmp2)) {
|
|
382
|
+
tmp2.resume_2o15jx_k$();
|
|
380
383
|
break $l$block_0;
|
|
381
384
|
}
|
|
382
385
|
}
|
|
383
386
|
if (previous instanceof Read) {
|
|
384
|
-
previous.
|
|
387
|
+
previous.resume_xzb95z_k$(ConcurrentIOException.new_io_ktor_utils_io_ConcurrentIOException_pmjjyb_k$(tmp2.taskName_6sat74_k$(), previous.get_created_i9xfr3_k$()));
|
|
385
388
|
} else {
|
|
386
389
|
if (isInterface(previous, Task)) {
|
|
387
|
-
previous.
|
|
390
|
+
previous.resume_2o15jx_k$();
|
|
388
391
|
} else {
|
|
389
392
|
if (previous instanceof Closed) {
|
|
390
|
-
tmp2.
|
|
393
|
+
tmp2.resume_xzb95z_k$(previous.cause_1);
|
|
391
394
|
break $l$block_0;
|
|
392
395
|
} else {
|
|
393
396
|
if (!equals(previous, Empty_instance)) {
|
|
@@ -396,61 +399,62 @@ class ByteChannel {
|
|
|
396
399
|
}
|
|
397
400
|
}
|
|
398
401
|
}
|
|
399
|
-
if (!(add(numberToLong(this.
|
|
402
|
+
if (!(add(numberToLong(this.flushBufferSize_1), this._readBuffer_1.get_size_woubt6_k$()) < fromInt(min) && this._closedCause_1.kotlinx$atomicfu$value == null)) {
|
|
400
403
|
// Inline function 'io.ktor.utils.io.ByteChannel.resumeSlot' call
|
|
401
|
-
var current = tmp0.
|
|
404
|
+
var current = tmp0.suspensionSlot_1.kotlinx$atomicfu$value;
|
|
402
405
|
var tmp;
|
|
403
406
|
if (current instanceof Read) {
|
|
404
|
-
tmp = tmp0.
|
|
407
|
+
tmp = tmp0.suspensionSlot_1.atomicfu$compareAndSet(current, Empty_instance);
|
|
405
408
|
} else {
|
|
406
409
|
tmp = false;
|
|
407
410
|
}
|
|
408
411
|
if (tmp) {
|
|
409
|
-
current.
|
|
412
|
+
current.resume_2o15jx_k$();
|
|
410
413
|
}
|
|
411
414
|
}
|
|
412
415
|
}
|
|
413
|
-
return cancellable.
|
|
416
|
+
return cancellable.getResult_fck196_k$();
|
|
414
417
|
});
|
|
415
418
|
}
|
|
416
|
-
|
|
419
|
+
rethrowCloseCauseIfNeeded(this);
|
|
420
|
+
if (this._readBuffer_1.get_size_woubt6_k$() < 1048576n) {
|
|
417
421
|
moveFlushToReadBuffer(this);
|
|
418
422
|
}
|
|
419
|
-
return this.
|
|
423
|
+
return this._readBuffer_1.get_size_woubt6_k$() >= fromInt(min);
|
|
420
424
|
}
|
|
421
|
-
*
|
|
422
|
-
|
|
423
|
-
this.
|
|
424
|
-
if (this.
|
|
425
|
+
*flush_4wsz1p_k$($completion) {
|
|
426
|
+
rethrowCloseCauseIfNeeded(this);
|
|
427
|
+
this.flushWriteBuffer_z39w8l_k$();
|
|
428
|
+
if (this.get_hasFreeSpace_krtyyf_k$())
|
|
425
429
|
return Unit_instance;
|
|
426
430
|
// Inline function 'io.ktor.utils.io.ByteChannel.sleepWhile' call
|
|
427
431
|
var this_0 = this;
|
|
428
|
-
$l$loop: while (!this.
|
|
432
|
+
$l$loop: while (!this.get_hasFreeSpace_krtyyf_k$() && this._closedCause_1.kotlinx$atomicfu$value == null) {
|
|
429
433
|
// Inline function 'kotlinx.coroutines.suspendCancellableCoroutine' call
|
|
430
434
|
// Inline function 'kotlin.js.suspendCoroutineUninterceptedOrReturnJS' call
|
|
431
435
|
(yield () => {
|
|
432
436
|
var uCont = $completion;
|
|
433
437
|
var cancellable = new CancellableContinuationImpl(intercepted(uCont), 1);
|
|
434
|
-
cancellable.
|
|
438
|
+
cancellable.initCancellability_shqc60_k$();
|
|
435
439
|
var tmp0 = this_0;
|
|
436
440
|
var tmp2 = new Write(cancellable);
|
|
437
441
|
$l$block_0: {
|
|
438
442
|
// Inline function 'io.ktor.utils.io.ByteChannel.trySuspend' call
|
|
439
|
-
var previous = tmp0.
|
|
443
|
+
var previous = tmp0.suspensionSlot_1.kotlinx$atomicfu$value;
|
|
440
444
|
if (!(previous instanceof Closed)) {
|
|
441
|
-
if (!tmp0.
|
|
442
|
-
tmp2.
|
|
445
|
+
if (!tmp0.suspensionSlot_1.atomicfu$compareAndSet(previous, tmp2)) {
|
|
446
|
+
tmp2.resume_2o15jx_k$();
|
|
443
447
|
break $l$block_0;
|
|
444
448
|
}
|
|
445
449
|
}
|
|
446
450
|
if (previous instanceof Write) {
|
|
447
|
-
previous.
|
|
451
|
+
previous.resume_xzb95z_k$(ConcurrentIOException.new_io_ktor_utils_io_ConcurrentIOException_pmjjyb_k$(tmp2.taskName_6sat74_k$(), previous.get_created_i9xfr3_k$()));
|
|
448
452
|
} else {
|
|
449
453
|
if (isInterface(previous, Task)) {
|
|
450
|
-
previous.
|
|
454
|
+
previous.resume_2o15jx_k$();
|
|
451
455
|
} else {
|
|
452
456
|
if (previous instanceof Closed) {
|
|
453
|
-
tmp2.
|
|
457
|
+
tmp2.resume_xzb95z_k$(previous.cause_1);
|
|
454
458
|
break $l$block_0;
|
|
455
459
|
} else {
|
|
456
460
|
if (!equals(previous, Empty_instance)) {
|
|
@@ -459,56 +463,56 @@ class ByteChannel {
|
|
|
459
463
|
}
|
|
460
464
|
}
|
|
461
465
|
}
|
|
462
|
-
if (!(!this.
|
|
466
|
+
if (!(!this.get_hasFreeSpace_krtyyf_k$() && this._closedCause_1.kotlinx$atomicfu$value == null)) {
|
|
463
467
|
// Inline function 'io.ktor.utils.io.ByteChannel.resumeSlot' call
|
|
464
|
-
var current = tmp0.
|
|
468
|
+
var current = tmp0.suspensionSlot_1.kotlinx$atomicfu$value;
|
|
465
469
|
var tmp;
|
|
466
470
|
if (current instanceof Write) {
|
|
467
|
-
tmp = tmp0.
|
|
471
|
+
tmp = tmp0.suspensionSlot_1.atomicfu$compareAndSet(current, Empty_instance);
|
|
468
472
|
} else {
|
|
469
473
|
tmp = false;
|
|
470
474
|
}
|
|
471
475
|
if (tmp) {
|
|
472
|
-
current.
|
|
476
|
+
current.resume_2o15jx_k$();
|
|
473
477
|
}
|
|
474
478
|
}
|
|
475
479
|
}
|
|
476
|
-
return cancellable.
|
|
480
|
+
return cancellable.getResult_fck196_k$();
|
|
477
481
|
});
|
|
478
482
|
}
|
|
479
483
|
return Unit_instance;
|
|
480
484
|
}
|
|
481
|
-
|
|
482
|
-
if (this.
|
|
485
|
+
flushWriteBuffer_z39w8l_k$() {
|
|
486
|
+
if (this._writeBuffer_1.exhausted_p1jt55_k$())
|
|
483
487
|
return Unit_instance;
|
|
484
488
|
// Inline function 'io.ktor.utils.io.locks.synchronized' call
|
|
485
|
-
this.
|
|
486
|
-
var count = convertToInt(this.
|
|
487
|
-
this.
|
|
488
|
-
this.
|
|
489
|
+
this.flushBufferMutex_1;
|
|
490
|
+
var count = convertToInt(this._writeBuffer_1.get_size_woubt6_k$());
|
|
491
|
+
this.flushBuffer_1.transferFrom_v29myr_k$(this._writeBuffer_1);
|
|
492
|
+
this.flushBufferSize_1 = this.flushBufferSize_1 + count | 0;
|
|
489
493
|
// Inline function 'io.ktor.utils.io.ByteChannel.resumeSlot' call
|
|
490
|
-
var current = this.
|
|
494
|
+
var current = this.suspensionSlot_1.kotlinx$atomicfu$value;
|
|
491
495
|
var tmp;
|
|
492
496
|
if (current instanceof Read) {
|
|
493
|
-
tmp = this.
|
|
497
|
+
tmp = this.suspensionSlot_1.atomicfu$compareAndSet(current, Empty_instance);
|
|
494
498
|
} else {
|
|
495
499
|
tmp = false;
|
|
496
500
|
}
|
|
497
501
|
if (tmp) {
|
|
498
|
-
current.
|
|
502
|
+
current.resume_2o15jx_k$();
|
|
499
503
|
}
|
|
500
504
|
}
|
|
501
|
-
|
|
502
|
-
this.
|
|
503
|
-
if (!this.
|
|
505
|
+
close_yn9xrc_k$() {
|
|
506
|
+
this.flushWriteBuffer_z39w8l_k$();
|
|
507
|
+
if (!this._closedCause_1.atomicfu$compareAndSet(null, get_CLOSED()))
|
|
504
508
|
return Unit_instance;
|
|
505
509
|
closeSlot(this, null);
|
|
506
510
|
}
|
|
507
|
-
*
|
|
511
|
+
*flushAndClose_3zd2q_k$($completion) {
|
|
508
512
|
// Inline function 'kotlin.runCatching' call
|
|
509
513
|
var tmp;
|
|
510
514
|
try {
|
|
511
|
-
yield* this.
|
|
515
|
+
yield* this.flush_4wsz1p_k$($completion);
|
|
512
516
|
// Inline function 'kotlin.Companion.success' call
|
|
513
517
|
tmp = _Result___init__impl__xyqfz8(Unit_instance);
|
|
514
518
|
} catch ($p) {
|
|
@@ -522,16 +526,16 @@ class ByteChannel {
|
|
|
522
526
|
}
|
|
523
527
|
tmp = tmp_0;
|
|
524
528
|
}
|
|
525
|
-
if (!this.
|
|
529
|
+
if (!this._closedCause_1.atomicfu$compareAndSet(null, get_CLOSED()))
|
|
526
530
|
return Unit_instance;
|
|
527
531
|
closeSlot(this, null);
|
|
528
532
|
return Unit_instance;
|
|
529
533
|
}
|
|
530
|
-
|
|
531
|
-
if (!(this.
|
|
534
|
+
cancel_9i2dv0_k$(cause) {
|
|
535
|
+
if (!(this._closedCause_1.kotlinx$atomicfu$value == null))
|
|
532
536
|
return Unit_instance;
|
|
533
537
|
var closedToken = new CloseToken(cause);
|
|
534
|
-
this.
|
|
538
|
+
this._closedCause_1.atomicfu$compareAndSet(null, closedToken);
|
|
535
539
|
// Inline function 'io.ktor.utils.io.Companion.wrapCause' call
|
|
536
540
|
var tmp0_subject = access$_get_origin__hdh1qz(closedToken);
|
|
537
541
|
var tmp;
|
|
@@ -539,21 +543,21 @@ class ByteChannel {
|
|
|
539
543
|
tmp = null;
|
|
540
544
|
} else {
|
|
541
545
|
if (isInterface(tmp0_subject, CopyableThrowable)) {
|
|
542
|
-
tmp = access$_get_origin__hdh1qz(closedToken).
|
|
546
|
+
tmp = access$_get_origin__hdh1qz(closedToken).createCopy_mmw9ld_k$();
|
|
543
547
|
} else {
|
|
544
548
|
if (tmp0_subject instanceof CancellationException) {
|
|
545
|
-
tmp = CancellationException.
|
|
549
|
+
tmp = CancellationException.new_kotlin_coroutines_cancellation_CancellationException_cpsifs_k$(access$_get_origin__hdh1qz(closedToken).message, access$_get_origin__hdh1qz(closedToken));
|
|
546
550
|
} else {
|
|
547
551
|
var p0 = access$_get_origin__hdh1qz(closedToken);
|
|
548
|
-
tmp = ClosedByteChannelException.
|
|
552
|
+
tmp = ClosedByteChannelException.new_io_ktor_utils_io_ClosedByteChannelException_cg48aj_k$(p0);
|
|
549
553
|
}
|
|
550
554
|
}
|
|
551
555
|
}
|
|
552
556
|
var wrappedCause = tmp;
|
|
553
557
|
closeSlot(this, wrappedCause);
|
|
554
558
|
}
|
|
555
|
-
|
|
556
|
-
var existingCause = this.
|
|
559
|
+
invokeOnClose_agzauw_k$(handler) {
|
|
560
|
+
var existingCause = this._closedCause_1.kotlinx$atomicfu$value;
|
|
557
561
|
if (!(existingCause == null)) {
|
|
558
562
|
// Inline function 'io.ktor.utils.io.Companion.wrapCause' call
|
|
559
563
|
var tmp0_subject = access$_get_origin__hdh1qz(existingCause);
|
|
@@ -562,13 +566,13 @@ class ByteChannel {
|
|
|
562
566
|
tmp = null;
|
|
563
567
|
} else {
|
|
564
568
|
if (isInterface(tmp0_subject, CopyableThrowable)) {
|
|
565
|
-
tmp = access$_get_origin__hdh1qz(existingCause).
|
|
569
|
+
tmp = access$_get_origin__hdh1qz(existingCause).createCopy_mmw9ld_k$();
|
|
566
570
|
} else {
|
|
567
571
|
if (tmp0_subject instanceof CancellationException) {
|
|
568
|
-
tmp = CancellationException.
|
|
572
|
+
tmp = CancellationException.new_kotlin_coroutines_cancellation_CancellationException_cpsifs_k$(access$_get_origin__hdh1qz(existingCause).message, access$_get_origin__hdh1qz(existingCause));
|
|
569
573
|
} else {
|
|
570
574
|
var p0 = access$_get_origin__hdh1qz(existingCause);
|
|
571
|
-
tmp = ClosedByteChannelException.
|
|
575
|
+
tmp = ClosedByteChannelException.new_io_ktor_utils_io_ClosedByteChannelException_cg48aj_k$(p0);
|
|
572
576
|
}
|
|
573
577
|
}
|
|
574
578
|
}
|
|
@@ -576,13 +580,13 @@ class ByteChannel {
|
|
|
576
580
|
var tmp_0 = ByteChannel$invokeOnClose$lambda;
|
|
577
581
|
return new sam$kotlinx_coroutines_DisposableHandle$0(tmp_0);
|
|
578
582
|
}
|
|
579
|
-
if (!this.
|
|
583
|
+
if (!this.closeHandler_1.atomicfu$compareAndSet(null, handler)) {
|
|
580
584
|
// Inline function 'kotlin.error' call
|
|
581
585
|
var message = 'Only one invokeOnClose handler is supported per channel';
|
|
582
|
-
throw IllegalStateException.
|
|
586
|
+
throw IllegalStateException.new_kotlin_IllegalStateException_w47ei6_k$(toString_1(message));
|
|
583
587
|
}
|
|
584
|
-
var cause = this.
|
|
585
|
-
if (!(cause == null) && this.
|
|
588
|
+
var cause = this._closedCause_1.kotlinx$atomicfu$value;
|
|
589
|
+
if (!(cause == null) && this.closeHandler_1.atomicfu$compareAndSet(handler, null)) {
|
|
586
590
|
// Inline function 'io.ktor.utils.io.Companion.wrapCause' call
|
|
587
591
|
var tmp0_subject_0 = access$_get_origin__hdh1qz(cause);
|
|
588
592
|
var tmp_1;
|
|
@@ -590,13 +594,13 @@ class ByteChannel {
|
|
|
590
594
|
tmp_1 = null;
|
|
591
595
|
} else {
|
|
592
596
|
if (isInterface(tmp0_subject_0, CopyableThrowable)) {
|
|
593
|
-
tmp_1 = access$_get_origin__hdh1qz(cause).
|
|
597
|
+
tmp_1 = access$_get_origin__hdh1qz(cause).createCopy_mmw9ld_k$();
|
|
594
598
|
} else {
|
|
595
599
|
if (tmp0_subject_0 instanceof CancellationException) {
|
|
596
|
-
tmp_1 = CancellationException.
|
|
600
|
+
tmp_1 = CancellationException.new_kotlin_coroutines_cancellation_CancellationException_cpsifs_k$(access$_get_origin__hdh1qz(cause).message, access$_get_origin__hdh1qz(cause));
|
|
597
601
|
} else {
|
|
598
602
|
var p0_0 = access$_get_origin__hdh1qz(cause);
|
|
599
|
-
tmp_1 = ClosedByteChannelException.
|
|
603
|
+
tmp_1 = ClosedByteChannelException.new_io_ktor_utils_io_ClosedByteChannelException_cg48aj_k$(p0_0);
|
|
600
604
|
}
|
|
601
605
|
}
|
|
602
606
|
}
|
|
@@ -613,180 +617,180 @@ class ByteChannel {
|
|
|
613
617
|
}
|
|
614
618
|
class ConcurrentIOException extends IllegalStateException {
|
|
615
619
|
constructor(taskName, cause) {
|
|
616
|
-
return new.target.
|
|
620
|
+
return new.target.new_io_ktor_utils_io_ConcurrentIOException_pmjjyb_k$(taskName, cause);
|
|
617
621
|
}
|
|
618
|
-
static
|
|
622
|
+
static new_io_ktor_utils_io_ConcurrentIOException_pmjjyb_k$(taskName, cause) {
|
|
619
623
|
cause = cause === VOID ? null : cause;
|
|
620
|
-
var $this = this.
|
|
621
|
-
captureStack($this, $this
|
|
624
|
+
var $this = this.new_kotlin_IllegalStateException_z3fz2g_k$('Concurrent ' + taskName + ' attempts', cause);
|
|
625
|
+
captureStack($this, $this.$throwableCtor_4);
|
|
622
626
|
return $this;
|
|
623
627
|
}
|
|
624
628
|
}
|
|
625
629
|
class ByteChannelScanner {
|
|
626
630
|
constructor(channel, matchString, writeChannel, limit) {
|
|
627
631
|
limit = limit === VOID ? 9223372036854775807n : limit;
|
|
628
|
-
this.
|
|
629
|
-
this.
|
|
630
|
-
this.
|
|
631
|
-
this.
|
|
632
|
+
this.channel_1 = channel;
|
|
633
|
+
this.matchString_1 = matchString;
|
|
634
|
+
this.writeChannel_1 = writeChannel;
|
|
635
|
+
this.limit_1 = limit;
|
|
632
636
|
// Inline function 'kotlin.require' call
|
|
633
|
-
if (!(this.
|
|
637
|
+
if (!(this.matchString_1.get_size_woubt6_k$() > 0)) {
|
|
634
638
|
var message = 'Empty match string not permitted for scanning';
|
|
635
|
-
throw IllegalArgumentException.
|
|
639
|
+
throw IllegalArgumentException.new_kotlin_IllegalArgumentException_sfqr8_k$(toString_1(message));
|
|
636
640
|
}
|
|
637
|
-
this.
|
|
638
|
-
this.
|
|
639
|
-
this.
|
|
640
|
-
this.
|
|
641
|
-
this.
|
|
642
|
-
}
|
|
643
|
-
*
|
|
644
|
-
this.
|
|
645
|
-
while (!this.
|
|
641
|
+
this.input_1 = this.channel_1.get_readBuffer_yjmj9b_k$();
|
|
642
|
+
this.partialMatchTable_1 = buildPartialMatchTable(this);
|
|
643
|
+
this.partialMatchBuffer_1 = new Buffer();
|
|
644
|
+
this.bytesRead_1 = 0n;
|
|
645
|
+
this.matchIndex_1 = 0;
|
|
646
|
+
}
|
|
647
|
+
*findNext_k7w4m8_k$(ignoreMissing, $completion) {
|
|
648
|
+
this.bytesRead_1 = 0n;
|
|
649
|
+
while (!this.input_1.exhausted_p1jt55_k$() || (yield* this.channel_1.awaitContent$default_rxihsg_k$(VOID, $completion))) {
|
|
646
650
|
yield* /*#__NOINLINE__*/advanceToNextPotentialMatch(this, $completion);
|
|
647
651
|
if (yield* /*#__NOINLINE__*/checkFullMatch(this, $completion)) {
|
|
648
|
-
return this.
|
|
652
|
+
return this.bytesRead_1;
|
|
649
653
|
}
|
|
650
654
|
}
|
|
651
655
|
if (!ignoreMissing) {
|
|
652
|
-
throw IOException.
|
|
656
|
+
throw IOException.new_kotlinx_io_IOException_wvwdyo_k$('Expected "' + toSingleLineString(this, this.matchString_1) + '" but encountered end of input');
|
|
653
657
|
}
|
|
654
|
-
this.
|
|
655
|
-
yield* this.
|
|
656
|
-
return this.
|
|
658
|
+
this.bytesRead_1 = add(this.bytesRead_1, this.partialMatchBuffer_1.transferTo_lu4ka2_k$(this.writeChannel_1.get_writeBuffer_t7kuc6_k$()));
|
|
659
|
+
yield* this.writeChannel_1.flush_4wsz1p_k$($completion);
|
|
660
|
+
return this.bytesRead_1;
|
|
657
661
|
}
|
|
658
662
|
}
|
|
659
663
|
class ByteReadChannel$Companion$Empty$1 {
|
|
660
664
|
constructor() {
|
|
661
|
-
this.
|
|
662
|
-
this.
|
|
665
|
+
this.closedCause_1 = null;
|
|
666
|
+
this.readBuffer_1 = new Buffer();
|
|
663
667
|
}
|
|
664
|
-
|
|
665
|
-
return this.
|
|
668
|
+
get_closedCause_o1qcj8_k$() {
|
|
669
|
+
return this.closedCause_1;
|
|
666
670
|
}
|
|
667
|
-
|
|
671
|
+
get_isClosedForRead_ajcc1s_k$() {
|
|
668
672
|
return true;
|
|
669
673
|
}
|
|
670
|
-
|
|
671
|
-
return this.
|
|
674
|
+
get_readBuffer_yjmj9b_k$() {
|
|
675
|
+
return this.readBuffer_1;
|
|
672
676
|
}
|
|
673
|
-
*
|
|
677
|
+
*awaitContent_q7m0p7_k$(min, $completion) {
|
|
674
678
|
return false;
|
|
675
679
|
}
|
|
676
|
-
|
|
680
|
+
cancel_9i2dv0_k$(cause) {
|
|
677
681
|
}
|
|
678
682
|
}
|
|
679
683
|
class Companion_0 {
|
|
680
684
|
constructor() {
|
|
681
685
|
Companion_instance_1 = this;
|
|
682
686
|
var tmp = this;
|
|
683
|
-
tmp.
|
|
687
|
+
tmp.Empty_1 = new ByteReadChannel$Companion$Empty$1();
|
|
684
688
|
}
|
|
685
689
|
}
|
|
686
690
|
class WriterJob {
|
|
687
691
|
constructor(channel, job) {
|
|
688
|
-
this.
|
|
689
|
-
this.
|
|
692
|
+
this.channel_1 = channel;
|
|
693
|
+
this.job_1 = job;
|
|
690
694
|
}
|
|
691
|
-
|
|
692
|
-
return this.
|
|
695
|
+
get_job_18j2r0_k$() {
|
|
696
|
+
return this.job_1;
|
|
693
697
|
}
|
|
694
698
|
}
|
|
695
699
|
class WriterScope {
|
|
696
700
|
constructor(channel, coroutineContext) {
|
|
697
|
-
this.
|
|
698
|
-
this.
|
|
701
|
+
this.channel_1 = channel;
|
|
702
|
+
this.coroutineContext_1 = coroutineContext;
|
|
699
703
|
}
|
|
700
|
-
|
|
701
|
-
return this.
|
|
704
|
+
get_coroutineContext_115oqo_k$() {
|
|
705
|
+
return this.coroutineContext_1;
|
|
702
706
|
}
|
|
703
707
|
}
|
|
704
708
|
class NO_CALLBACK$1 {
|
|
705
709
|
constructor() {
|
|
706
|
-
this.
|
|
710
|
+
this.context_1 = EmptyCoroutineContext_instance;
|
|
707
711
|
}
|
|
708
|
-
|
|
709
|
-
return this.
|
|
712
|
+
get_context_h02k06_k$() {
|
|
713
|
+
return this.context_1;
|
|
710
714
|
}
|
|
711
|
-
|
|
715
|
+
resumeWith_ol1nfv_k$(result) {
|
|
712
716
|
return Unit_instance;
|
|
713
717
|
}
|
|
714
|
-
|
|
715
|
-
return this.
|
|
718
|
+
resumeWith_rk9gbt_k$(result) {
|
|
719
|
+
return this.resumeWith_ol1nfv_k$(result);
|
|
716
720
|
}
|
|
717
721
|
}
|
|
718
722
|
class Companion_1 {}
|
|
719
723
|
class CloseToken {
|
|
720
724
|
constructor(origin) {
|
|
721
|
-
this.
|
|
725
|
+
this.origin_1 = origin;
|
|
722
726
|
}
|
|
723
727
|
}
|
|
724
728
|
class CountedByteReadChannel {
|
|
725
729
|
constructor(delegate) {
|
|
726
|
-
this.
|
|
727
|
-
this.
|
|
728
|
-
this.
|
|
729
|
-
this.
|
|
730
|
+
this.delegate_1 = delegate;
|
|
731
|
+
this.buffer_1 = new Buffer();
|
|
732
|
+
this.initial_1 = 0n;
|
|
733
|
+
this.consumed_1 = 0n;
|
|
730
734
|
}
|
|
731
|
-
|
|
735
|
+
get_totalBytesRead_dai8jq_k$() {
|
|
732
736
|
updateConsumed(this);
|
|
733
|
-
return this.
|
|
737
|
+
return this.consumed_1;
|
|
734
738
|
}
|
|
735
|
-
|
|
736
|
-
return this.
|
|
739
|
+
get_closedCause_o1qcj8_k$() {
|
|
740
|
+
return this.delegate_1.get_closedCause_o1qcj8_k$();
|
|
737
741
|
}
|
|
738
|
-
|
|
739
|
-
return this.
|
|
742
|
+
get_isClosedForRead_ajcc1s_k$() {
|
|
743
|
+
return this.buffer_1.exhausted_p1jt55_k$() && this.delegate_1.get_isClosedForRead_ajcc1s_k$();
|
|
740
744
|
}
|
|
741
|
-
|
|
745
|
+
get_readBuffer_yjmj9b_k$() {
|
|
742
746
|
transferFromDelegate(this);
|
|
743
|
-
return this.
|
|
747
|
+
return this.buffer_1;
|
|
744
748
|
}
|
|
745
|
-
*
|
|
746
|
-
if (this.
|
|
749
|
+
*awaitContent_q7m0p7_k$(min, $completion) {
|
|
750
|
+
if (this.get_readBuffer_yjmj9b_k$().get_size_woubt6_k$() >= fromInt(min)) {
|
|
747
751
|
return true;
|
|
748
752
|
}
|
|
749
|
-
if (yield* this.
|
|
753
|
+
if (yield* this.delegate_1.awaitContent_q7m0p7_k$(min, $completion)) {
|
|
750
754
|
transferFromDelegate(this);
|
|
751
755
|
return true;
|
|
752
756
|
}
|
|
753
757
|
return false;
|
|
754
758
|
}
|
|
755
|
-
|
|
756
|
-
this.
|
|
757
|
-
this.
|
|
759
|
+
cancel_9i2dv0_k$(cause) {
|
|
760
|
+
this.delegate_1.cancel_9i2dv0_k$(cause);
|
|
761
|
+
this.buffer_1.close_yn9xrc_k$();
|
|
758
762
|
}
|
|
759
763
|
}
|
|
760
764
|
class ClosedByteChannelException extends IOException {
|
|
761
765
|
constructor(cause) {
|
|
762
|
-
return new.target.
|
|
766
|
+
return new.target.new_io_ktor_utils_io_ClosedByteChannelException_cg48aj_k$(cause);
|
|
763
767
|
}
|
|
764
|
-
static
|
|
768
|
+
static new_io_ktor_utils_io_ClosedByteChannelException_cg48aj_k$(cause) {
|
|
765
769
|
cause = cause === VOID ? null : cause;
|
|
766
|
-
var $this = this.
|
|
767
|
-
captureStack($this, $this
|
|
770
|
+
var $this = this.new_kotlinx_io_IOException_pmronu_k$(cause == null ? null : cause.message, cause);
|
|
771
|
+
captureStack($this, $this.$throwableCtor_3);
|
|
768
772
|
return $this;
|
|
769
773
|
}
|
|
770
774
|
}
|
|
771
775
|
class ClosedReadChannelException extends ClosedByteChannelException {
|
|
772
776
|
constructor(cause) {
|
|
773
|
-
return new.target.
|
|
777
|
+
return new.target.new_io_ktor_utils_io_ClosedReadChannelException_uqrd2v_k$(cause);
|
|
774
778
|
}
|
|
775
|
-
static
|
|
779
|
+
static new_io_ktor_utils_io_ClosedReadChannelException_uqrd2v_k$(cause) {
|
|
776
780
|
cause = cause === VOID ? null : cause;
|
|
777
|
-
var $this = this.
|
|
778
|
-
captureStack($this, $this
|
|
781
|
+
var $this = this.new_io_ktor_utils_io_ClosedByteChannelException_cg48aj_k$(cause);
|
|
782
|
+
captureStack($this, $this.$throwableCtor_4);
|
|
779
783
|
return $this;
|
|
780
784
|
}
|
|
781
785
|
}
|
|
782
786
|
class ClosedWriteChannelException extends ClosedByteChannelException {
|
|
783
787
|
constructor(cause) {
|
|
784
|
-
return new.target.
|
|
788
|
+
return new.target.new_io_ktor_utils_io_ClosedWriteChannelException_h4pidy_k$(cause);
|
|
785
789
|
}
|
|
786
|
-
static
|
|
790
|
+
static new_io_ktor_utils_io_ClosedWriteChannelException_h4pidy_k$(cause) {
|
|
787
791
|
cause = cause === VOID ? null : cause;
|
|
788
|
-
var $this = this.
|
|
789
|
-
captureStack($this, $this
|
|
792
|
+
var $this = this.new_io_ktor_utils_io_ClosedByteChannelException_cg48aj_k$(cause);
|
|
793
|
+
captureStack($this, $this.$throwableCtor_4);
|
|
790
794
|
return $this;
|
|
791
795
|
}
|
|
792
796
|
}
|
|
@@ -794,35 +798,35 @@ class LineEnding extends Enum {}
|
|
|
794
798
|
class Companion_2 {
|
|
795
799
|
constructor() {
|
|
796
800
|
Companion_instance_3 = this;
|
|
797
|
-
this.
|
|
798
|
-
this.
|
|
799
|
-
this.
|
|
800
|
-
this.
|
|
801
|
-
this.
|
|
801
|
+
this.CR_1 = _LineEndingMode___init__impl__jo5bul(1);
|
|
802
|
+
this.LF_1 = _LineEndingMode___init__impl__jo5bul(2);
|
|
803
|
+
this.CRLF_1 = _LineEndingMode___init__impl__jo5bul(4);
|
|
804
|
+
this.Any_1 = _LineEndingMode___init__impl__jo5bul(7);
|
|
805
|
+
this.values_1 = listOf([new LineEndingMode(this.CR_1), new LineEndingMode(this.LF_1), new LineEndingMode(this.CRLF_1)]);
|
|
802
806
|
}
|
|
803
807
|
}
|
|
804
808
|
class LineEndingMode {
|
|
805
809
|
constructor(mode) {
|
|
806
810
|
Companion_getInstance_2();
|
|
807
|
-
this.
|
|
811
|
+
this.mode_1 = mode;
|
|
808
812
|
}
|
|
809
813
|
toString() {
|
|
810
|
-
return LineEndingMode__toString_impl_j4h76r(this.
|
|
814
|
+
return LineEndingMode__toString_impl_j4h76r(this.mode_1);
|
|
811
815
|
}
|
|
812
816
|
hashCode() {
|
|
813
|
-
return LineEndingMode__hashCode_impl_2mopm4(this.
|
|
817
|
+
return LineEndingMode__hashCode_impl_2mopm4(this.mode_1);
|
|
814
818
|
}
|
|
815
819
|
equals(other) {
|
|
816
|
-
return LineEndingMode__equals_impl_qyr4nk(this.
|
|
820
|
+
return LineEndingMode__equals_impl_qyr4nk(this.mode_1, other);
|
|
817
821
|
}
|
|
818
822
|
}
|
|
819
823
|
class SourceByteReadChannel {
|
|
820
824
|
constructor(source) {
|
|
821
|
-
this.
|
|
822
|
-
this.
|
|
825
|
+
this.source_1 = source;
|
|
826
|
+
this.closed_1 = null;
|
|
823
827
|
}
|
|
824
|
-
|
|
825
|
-
var tmp0_safe_receiver = this.
|
|
828
|
+
get_closedCause_o1qcj8_k$() {
|
|
829
|
+
var tmp0_safe_receiver = this.closed_1;
|
|
826
830
|
var tmp;
|
|
827
831
|
if (tmp0_safe_receiver == null) {
|
|
828
832
|
tmp = null;
|
|
@@ -834,13 +838,13 @@ class SourceByteReadChannel {
|
|
|
834
838
|
tmp_0 = null;
|
|
835
839
|
} else {
|
|
836
840
|
if (isInterface(tmp0_subject, CopyableThrowable)) {
|
|
837
|
-
tmp_0 = access$_get_origin__hdh1qz(tmp0_safe_receiver).
|
|
841
|
+
tmp_0 = access$_get_origin__hdh1qz(tmp0_safe_receiver).createCopy_mmw9ld_k$();
|
|
838
842
|
} else {
|
|
839
843
|
if (tmp0_subject instanceof CancellationException) {
|
|
840
|
-
tmp_0 = CancellationException.
|
|
844
|
+
tmp_0 = CancellationException.new_kotlin_coroutines_cancellation_CancellationException_cpsifs_k$(access$_get_origin__hdh1qz(tmp0_safe_receiver).message, access$_get_origin__hdh1qz(tmp0_safe_receiver));
|
|
841
845
|
} else {
|
|
842
846
|
var p0 = access$_get_origin__hdh1qz(tmp0_safe_receiver);
|
|
843
|
-
tmp_0 = ClosedByteChannelException.
|
|
847
|
+
tmp_0 = ClosedByteChannelException.new_io_ktor_utils_io_ClosedByteChannelException_cg48aj_k$(p0);
|
|
844
848
|
}
|
|
845
849
|
}
|
|
846
850
|
}
|
|
@@ -848,138 +852,138 @@ class SourceByteReadChannel {
|
|
|
848
852
|
}
|
|
849
853
|
return tmp;
|
|
850
854
|
}
|
|
851
|
-
|
|
852
|
-
return this.
|
|
855
|
+
get_isClosedForRead_ajcc1s_k$() {
|
|
856
|
+
return this.source_1.exhausted_p1jt55_k$();
|
|
853
857
|
}
|
|
854
|
-
|
|
855
|
-
var tmp0_safe_receiver = this.
|
|
858
|
+
get_readBuffer_yjmj9b_k$() {
|
|
859
|
+
var tmp0_safe_receiver = this.get_closedCause_o1qcj8_k$();
|
|
856
860
|
if (tmp0_safe_receiver == null)
|
|
857
861
|
null;
|
|
858
862
|
else {
|
|
859
863
|
// Inline function 'kotlin.let' call
|
|
860
864
|
throw tmp0_safe_receiver;
|
|
861
865
|
}
|
|
862
|
-
return this.
|
|
866
|
+
return this.source_1.get_buffer_bmaafd_k$();
|
|
863
867
|
}
|
|
864
|
-
*
|
|
865
|
-
var tmp0_safe_receiver = this.
|
|
868
|
+
*awaitContent_q7m0p7_k$(min, $completion) {
|
|
869
|
+
var tmp0_safe_receiver = this.get_closedCause_o1qcj8_k$();
|
|
866
870
|
if (tmp0_safe_receiver == null)
|
|
867
871
|
null;
|
|
868
872
|
else {
|
|
869
873
|
// Inline function 'kotlin.let' call
|
|
870
874
|
throw tmp0_safe_receiver;
|
|
871
875
|
}
|
|
872
|
-
return this.
|
|
876
|
+
return this.source_1.request_hj5jqj_k$(fromInt(min));
|
|
873
877
|
}
|
|
874
|
-
|
|
875
|
-
if (!(this.
|
|
878
|
+
cancel_9i2dv0_k$(cause) {
|
|
879
|
+
if (!(this.closed_1 == null))
|
|
876
880
|
return Unit_instance;
|
|
877
|
-
this.
|
|
881
|
+
this.source_1.close_yn9xrc_k$();
|
|
878
882
|
var tmp = this;
|
|
879
883
|
var tmp1_elvis_lhs = cause == null ? null : cause.message;
|
|
880
|
-
tmp.
|
|
884
|
+
tmp.closed_1 = new CloseToken(IOException.new_kotlinx_io_IOException_pmronu_k$(tmp1_elvis_lhs == null ? 'Channel was cancelled' : tmp1_elvis_lhs, cause));
|
|
881
885
|
}
|
|
882
886
|
}
|
|
883
887
|
class MalformedInputException extends IOException {
|
|
884
888
|
constructor(message) {
|
|
885
|
-
return new.target.
|
|
889
|
+
return new.target.new_io_ktor_utils_io_charsets_MalformedInputException_brqco0_k$(message);
|
|
886
890
|
}
|
|
887
|
-
static
|
|
888
|
-
var $this = this.
|
|
889
|
-
captureStack($this, $this
|
|
891
|
+
static new_io_ktor_utils_io_charsets_MalformedInputException_brqco0_k$(message) {
|
|
892
|
+
var $this = this.new_kotlinx_io_IOException_wvwdyo_k$(message);
|
|
893
|
+
captureStack($this, $this.$throwableCtor_3);
|
|
890
894
|
return $this;
|
|
891
895
|
}
|
|
892
896
|
}
|
|
893
897
|
class TooLongLineException extends MalformedInputException {
|
|
894
898
|
constructor(message) {
|
|
895
|
-
return new.target.
|
|
899
|
+
return new.target.new_io_ktor_utils_io_charsets_TooLongLineException_emlsi1_k$(message);
|
|
896
900
|
}
|
|
897
|
-
static
|
|
898
|
-
var $this = this.
|
|
899
|
-
captureStack($this, $this
|
|
901
|
+
static new_io_ktor_utils_io_charsets_TooLongLineException_emlsi1_k$(message) {
|
|
902
|
+
var $this = this.new_io_ktor_utils_io_charsets_MalformedInputException_brqco0_k$(message);
|
|
903
|
+
captureStack($this, $this.$throwableCtor_4);
|
|
900
904
|
return $this;
|
|
901
905
|
}
|
|
902
906
|
}
|
|
903
907
|
class ObjectPool {}
|
|
904
908
|
function close() {
|
|
905
|
-
this.
|
|
909
|
+
this.dispose_3nnxhr_k$();
|
|
906
910
|
}
|
|
907
911
|
class DefaultPool {
|
|
908
912
|
constructor(capacity) {
|
|
909
|
-
this.
|
|
913
|
+
this.capacity_1 = capacity;
|
|
910
914
|
var tmp = this;
|
|
911
915
|
// Inline function 'kotlin.arrayOfNulls' call
|
|
912
|
-
var size = this.
|
|
913
|
-
tmp.
|
|
914
|
-
this.
|
|
916
|
+
var size = this.capacity_1;
|
|
917
|
+
tmp.instances_1 = Array(size);
|
|
918
|
+
this.size_1 = 0;
|
|
915
919
|
}
|
|
916
|
-
|
|
920
|
+
disposeInstance_6ek0a2_k$(instance) {
|
|
917
921
|
}
|
|
918
|
-
|
|
922
|
+
clearInstance_nfz4jw_k$(instance) {
|
|
919
923
|
return instance;
|
|
920
924
|
}
|
|
921
|
-
|
|
925
|
+
validateInstance_6mwbhp_k$(instance) {
|
|
922
926
|
}
|
|
923
|
-
|
|
924
|
-
if (this.
|
|
925
|
-
return this.
|
|
926
|
-
this.
|
|
927
|
-
var idx = this.
|
|
928
|
-
var tmp = this.
|
|
927
|
+
borrow_mvkpor_k$() {
|
|
928
|
+
if (this.size_1 === 0)
|
|
929
|
+
return this.produceInstance_xswihh_k$();
|
|
930
|
+
this.size_1 = this.size_1 - 1 | 0;
|
|
931
|
+
var idx = this.size_1;
|
|
932
|
+
var tmp = this.instances_1[idx];
|
|
929
933
|
var instance = !(tmp == null) ? tmp : THROW_CCE();
|
|
930
|
-
this.
|
|
931
|
-
return this.
|
|
934
|
+
this.instances_1[idx] = null;
|
|
935
|
+
return this.clearInstance_nfz4jw_k$(instance);
|
|
932
936
|
}
|
|
933
|
-
|
|
934
|
-
this.
|
|
935
|
-
if (this.
|
|
936
|
-
this.
|
|
937
|
+
recycle_d2xv5h_k$(instance) {
|
|
938
|
+
this.validateInstance_6mwbhp_k$(instance);
|
|
939
|
+
if (this.size_1 === this.capacity_1) {
|
|
940
|
+
this.disposeInstance_6ek0a2_k$(instance);
|
|
937
941
|
} else {
|
|
938
|
-
var _unary__edvuaz = this.
|
|
939
|
-
this.
|
|
940
|
-
this.
|
|
942
|
+
var _unary__edvuaz = this.size_1;
|
|
943
|
+
this.size_1 = _unary__edvuaz + 1 | 0;
|
|
944
|
+
this.instances_1[_unary__edvuaz] = instance;
|
|
941
945
|
}
|
|
942
946
|
}
|
|
943
|
-
|
|
947
|
+
dispose_3nnxhr_k$() {
|
|
944
948
|
var inductionVariable = 0;
|
|
945
|
-
var last = this.
|
|
949
|
+
var last = this.size_1;
|
|
946
950
|
if (inductionVariable < last)
|
|
947
951
|
do {
|
|
948
952
|
var i = inductionVariable;
|
|
949
953
|
inductionVariable = inductionVariable + 1 | 0;
|
|
950
|
-
var tmp = this.
|
|
954
|
+
var tmp = this.instances_1[i];
|
|
951
955
|
var instance = !(tmp == null) ? tmp : THROW_CCE();
|
|
952
|
-
this.
|
|
953
|
-
this.
|
|
956
|
+
this.instances_1[i] = null;
|
|
957
|
+
this.disposeInstance_6ek0a2_k$(instance);
|
|
954
958
|
}
|
|
955
959
|
while (inductionVariable < last);
|
|
956
|
-
this.
|
|
960
|
+
this.size_1 = 0;
|
|
957
961
|
}
|
|
958
962
|
}
|
|
959
963
|
class ByteArrayPool$1 extends DefaultPool {
|
|
960
964
|
constructor() {
|
|
961
965
|
super(128);
|
|
962
966
|
}
|
|
963
|
-
|
|
967
|
+
produceInstance_xswihh_k$() {
|
|
964
968
|
return new Int8Array(4096);
|
|
965
969
|
}
|
|
966
970
|
}
|
|
967
971
|
class NoPoolImpl {
|
|
968
|
-
|
|
972
|
+
recycle_d2xv5h_k$(instance) {
|
|
969
973
|
return Unit_instance;
|
|
970
974
|
}
|
|
971
|
-
|
|
975
|
+
dispose_3nnxhr_k$() {
|
|
972
976
|
return Unit_instance;
|
|
973
977
|
}
|
|
974
978
|
}
|
|
975
979
|
class Companion_3 {
|
|
976
|
-
|
|
980
|
+
forName_etcah2_k$(name) {
|
|
977
981
|
switch (name) {
|
|
978
982
|
case 'UTF-8':
|
|
979
983
|
case 'utf-8':
|
|
980
984
|
case 'UTF8':
|
|
981
985
|
case 'utf8':
|
|
982
|
-
return Charsets_getInstance().
|
|
986
|
+
return Charsets_getInstance().UTF_8__1;
|
|
983
987
|
}
|
|
984
988
|
var tmp;
|
|
985
989
|
var tmp_0;
|
|
@@ -1010,14 +1014,14 @@ class Companion_3 {
|
|
|
1010
1014
|
tmp = name === 'latin1' || name === 'Latin1';
|
|
1011
1015
|
}
|
|
1012
1016
|
if (tmp) {
|
|
1013
|
-
return Charsets_getInstance().
|
|
1017
|
+
return Charsets_getInstance().ISO_8859_1__1;
|
|
1014
1018
|
}
|
|
1015
|
-
throw IllegalArgumentException.
|
|
1019
|
+
throw IllegalArgumentException.new_kotlin_IllegalArgumentException_sfqr8_k$('Charset ' + name + ' is not supported');
|
|
1016
1020
|
}
|
|
1017
1021
|
}
|
|
1018
1022
|
class Charset {
|
|
1019
1023
|
constructor(_name) {
|
|
1020
|
-
this.
|
|
1024
|
+
this._name_1 = _name;
|
|
1021
1025
|
}
|
|
1022
1026
|
equals(other) {
|
|
1023
1027
|
if (this === other)
|
|
@@ -1026,57 +1030,57 @@ class Charset {
|
|
|
1026
1030
|
return false;
|
|
1027
1031
|
if (!(other instanceof Charset))
|
|
1028
1032
|
THROW_CCE();
|
|
1029
|
-
return this.
|
|
1033
|
+
return this._name_1 === other._name_1;
|
|
1030
1034
|
}
|
|
1031
1035
|
hashCode() {
|
|
1032
|
-
return getStringHashCode(this.
|
|
1036
|
+
return getStringHashCode(this._name_1);
|
|
1033
1037
|
}
|
|
1034
1038
|
toString() {
|
|
1035
|
-
return this.
|
|
1039
|
+
return this._name_1;
|
|
1036
1040
|
}
|
|
1037
1041
|
}
|
|
1038
1042
|
class Charsets {
|
|
1039
1043
|
constructor() {
|
|
1040
1044
|
Charsets_instance = this;
|
|
1041
|
-
this.
|
|
1042
|
-
this.
|
|
1045
|
+
this.UTF_8__1 = new CharsetImpl('UTF-8');
|
|
1046
|
+
this.ISO_8859_1__1 = new CharsetImpl('ISO-8859-1');
|
|
1043
1047
|
}
|
|
1044
1048
|
}
|
|
1045
1049
|
class CharsetDecoder {
|
|
1046
1050
|
constructor(_charset) {
|
|
1047
|
-
this.
|
|
1051
|
+
this._charset_1 = _charset;
|
|
1048
1052
|
}
|
|
1049
1053
|
}
|
|
1050
1054
|
class CharsetEncoder {
|
|
1051
1055
|
constructor(_charset) {
|
|
1052
|
-
this.
|
|
1056
|
+
this._charset_1 = _charset;
|
|
1053
1057
|
}
|
|
1054
1058
|
}
|
|
1055
1059
|
class CharsetImpl extends Charset {
|
|
1056
|
-
|
|
1060
|
+
newEncoder_gqwcdg_k$() {
|
|
1057
1061
|
return new CharsetEncoderImpl(this);
|
|
1058
1062
|
}
|
|
1059
|
-
|
|
1063
|
+
newDecoder_zcettw_k$() {
|
|
1060
1064
|
return new CharsetDecoderImpl(this);
|
|
1061
1065
|
}
|
|
1062
1066
|
}
|
|
1063
1067
|
class CharsetEncoderImpl extends CharsetEncoder {
|
|
1064
1068
|
constructor(charset) {
|
|
1065
1069
|
super(charset);
|
|
1066
|
-
this.
|
|
1070
|
+
this.charset_1 = charset;
|
|
1067
1071
|
}
|
|
1068
1072
|
toString() {
|
|
1069
|
-
return 'CharsetEncoderImpl(charset=' + this.
|
|
1073
|
+
return 'CharsetEncoderImpl(charset=' + this.charset_1.toString() + ')';
|
|
1070
1074
|
}
|
|
1071
1075
|
hashCode() {
|
|
1072
|
-
return this.
|
|
1076
|
+
return this.charset_1.hashCode();
|
|
1073
1077
|
}
|
|
1074
1078
|
equals(other) {
|
|
1075
1079
|
if (this === other)
|
|
1076
1080
|
return true;
|
|
1077
1081
|
if (!(other instanceof CharsetEncoderImpl))
|
|
1078
1082
|
return false;
|
|
1079
|
-
if (!this.
|
|
1083
|
+
if (!this.charset_1.equals(other.charset_1))
|
|
1080
1084
|
return false;
|
|
1081
1085
|
return true;
|
|
1082
1086
|
}
|
|
@@ -1084,46 +1088,46 @@ class CharsetEncoderImpl extends CharsetEncoder {
|
|
|
1084
1088
|
class CharsetDecoderImpl extends CharsetDecoder {
|
|
1085
1089
|
constructor(charset) {
|
|
1086
1090
|
super(charset);
|
|
1087
|
-
this.
|
|
1091
|
+
this.charset_1 = charset;
|
|
1088
1092
|
}
|
|
1089
1093
|
toString() {
|
|
1090
|
-
return 'CharsetDecoderImpl(charset=' + this.
|
|
1094
|
+
return 'CharsetDecoderImpl(charset=' + this.charset_1.toString() + ')';
|
|
1091
1095
|
}
|
|
1092
1096
|
hashCode() {
|
|
1093
|
-
return this.
|
|
1097
|
+
return this.charset_1.hashCode();
|
|
1094
1098
|
}
|
|
1095
1099
|
equals(other) {
|
|
1096
1100
|
if (this === other)
|
|
1097
1101
|
return true;
|
|
1098
1102
|
if (!(other instanceof CharsetDecoderImpl))
|
|
1099
1103
|
return false;
|
|
1100
|
-
if (!this.
|
|
1104
|
+
if (!this.charset_1.equals(other.charset_1))
|
|
1101
1105
|
return false;
|
|
1102
1106
|
return true;
|
|
1103
1107
|
}
|
|
1104
1108
|
}
|
|
1105
1109
|
class toKtor$1 {
|
|
1106
1110
|
constructor($this_toKtor) {
|
|
1107
|
-
this
|
|
1111
|
+
this.$this_toKtor_1 = $this_toKtor;
|
|
1108
1112
|
}
|
|
1109
|
-
|
|
1110
|
-
return this.
|
|
1113
|
+
decode_hpap4q_k$(buffer) {
|
|
1114
|
+
return this.$this_toKtor_1.decode(buffer);
|
|
1111
1115
|
}
|
|
1112
1116
|
}
|
|
1113
1117
|
class TextDecoderFallback {
|
|
1114
1118
|
constructor(encoding, fatal) {
|
|
1115
|
-
this.
|
|
1119
|
+
this.fatal_1 = fatal;
|
|
1116
1120
|
// Inline function 'kotlin.text.trim' call
|
|
1117
1121
|
// Inline function 'kotlin.text.lowercase' call
|
|
1118
1122
|
// Inline function 'kotlin.js.asDynamic' call
|
|
1119
1123
|
var requestedEncoding = toString_1(trim(isCharSequence(encoding) ? encoding : THROW_CCE())).toLowerCase();
|
|
1120
1124
|
// Inline function 'kotlin.check' call
|
|
1121
|
-
if (!get_ENCODING_ALIASES().
|
|
1125
|
+
if (!get_ENCODING_ALIASES().contains_aljjnj_k$(requestedEncoding)) {
|
|
1122
1126
|
var message = encoding + ' is not supported.';
|
|
1123
|
-
throw IllegalStateException.
|
|
1127
|
+
throw IllegalStateException.new_kotlin_IllegalStateException_w47ei6_k$(toString_1(message));
|
|
1124
1128
|
}
|
|
1125
1129
|
}
|
|
1126
|
-
|
|
1130
|
+
decode_hpap4q_k$(buffer) {
|
|
1127
1131
|
// Inline function 'io.ktor.utils.io.core.buildPacket' call
|
|
1128
1132
|
var builder = new Buffer();
|
|
1129
1133
|
var bytes = buffer instanceof Int8Array ? buffer : THROW_CCE();
|
|
@@ -1139,17 +1143,17 @@ class TextDecoderFallback {
|
|
|
1139
1143
|
var point = toCodePoint(byte);
|
|
1140
1144
|
if (point < 0) {
|
|
1141
1145
|
// Inline function 'kotlin.check' call
|
|
1142
|
-
if (!!this.
|
|
1146
|
+
if (!!this.fatal_1) {
|
|
1143
1147
|
var message = 'Invalid character: ' + point;
|
|
1144
|
-
throw IllegalStateException.
|
|
1148
|
+
throw IllegalStateException.new_kotlin_IllegalStateException_w47ei6_k$(toString_1(message));
|
|
1145
1149
|
}
|
|
1146
1150
|
writeFully_0(builder, get_REPLACEMENT());
|
|
1147
1151
|
continue $l$loop;
|
|
1148
1152
|
}
|
|
1149
1153
|
if (point > 255) {
|
|
1150
|
-
builder.
|
|
1154
|
+
builder.writeByte_9ih3z3_k$(toByte(point >> 8));
|
|
1151
1155
|
}
|
|
1152
|
-
builder.
|
|
1156
|
+
builder.writeByte_9ih3z3_k$(toByte(point & 255));
|
|
1153
1157
|
}
|
|
1154
1158
|
while (inductionVariable < last);
|
|
1155
1159
|
return decodeToString(readByteArray_0(builder));
|
|
@@ -1166,30 +1170,39 @@ var Empty_instance;
|
|
|
1166
1170
|
function Empty_getInstance() {
|
|
1167
1171
|
return Empty_instance;
|
|
1168
1172
|
}
|
|
1173
|
+
function rethrowCloseCauseIfNeeded($this) {
|
|
1174
|
+
var tmp0_safe_receiver = $this.get_closedCause_o1qcj8_k$();
|
|
1175
|
+
if (tmp0_safe_receiver == null)
|
|
1176
|
+
null;
|
|
1177
|
+
else {
|
|
1178
|
+
// Inline function 'kotlin.let' call
|
|
1179
|
+
throw tmp0_safe_receiver;
|
|
1180
|
+
}
|
|
1181
|
+
}
|
|
1169
1182
|
function moveFlushToReadBuffer($this) {
|
|
1170
1183
|
// Inline function 'io.ktor.utils.io.locks.synchronized' call
|
|
1171
|
-
$this.
|
|
1172
|
-
$this.
|
|
1173
|
-
$this.
|
|
1184
|
+
$this.flushBufferMutex_1;
|
|
1185
|
+
$this.flushBuffer_1.transferTo_lu4ka2_k$($this._readBuffer_1);
|
|
1186
|
+
$this.flushBufferSize_1 = 0;
|
|
1174
1187
|
// Inline function 'io.ktor.utils.io.ByteChannel.resumeSlot' call
|
|
1175
|
-
var current = $this.
|
|
1188
|
+
var current = $this.suspensionSlot_1.kotlinx$atomicfu$value;
|
|
1176
1189
|
var tmp;
|
|
1177
1190
|
if (current instanceof Write) {
|
|
1178
|
-
tmp = $this.
|
|
1191
|
+
tmp = $this.suspensionSlot_1.atomicfu$compareAndSet(current, Empty_instance);
|
|
1179
1192
|
} else {
|
|
1180
1193
|
tmp = false;
|
|
1181
1194
|
}
|
|
1182
1195
|
if (tmp) {
|
|
1183
|
-
current.
|
|
1196
|
+
current.resume_2o15jx_k$();
|
|
1184
1197
|
}
|
|
1185
1198
|
}
|
|
1186
1199
|
function closeSlot($this, cause) {
|
|
1187
|
-
var closeContinuation = !(cause == null) ? new Closed(cause) : Companion_getInstance().
|
|
1188
|
-
var continuation = $this.
|
|
1200
|
+
var closeContinuation = !(cause == null) ? new Closed(cause) : Companion_getInstance().CLOSED_1;
|
|
1201
|
+
var continuation = $this.suspensionSlot_1.atomicfu$getAndSet(closeContinuation);
|
|
1189
1202
|
if (isInterface(continuation, Task)) {
|
|
1190
|
-
continuation.
|
|
1203
|
+
continuation.resume_xzb95z_k$(cause);
|
|
1191
1204
|
}
|
|
1192
|
-
var tmp0_safe_receiver = $this.
|
|
1205
|
+
var tmp0_safe_receiver = $this.closeHandler_1.atomicfu$getAndSet(null);
|
|
1193
1206
|
if (tmp0_safe_receiver == null)
|
|
1194
1207
|
null;
|
|
1195
1208
|
else
|
|
@@ -1203,7 +1216,7 @@ function ByteChannel$invokeOnClose$lambda_0() {
|
|
|
1203
1216
|
}
|
|
1204
1217
|
function ByteChannel$invokeOnClose$lambda_1(this$0, $handler) {
|
|
1205
1218
|
return () => {
|
|
1206
|
-
this$0.
|
|
1219
|
+
this$0.closeHandler_1.atomicfu$compareAndSet($handler, null);
|
|
1207
1220
|
return Unit_instance;
|
|
1208
1221
|
};
|
|
1209
1222
|
}
|
|
@@ -1212,7 +1225,7 @@ function ByteReadChannel_0(content, offset, length) {
|
|
|
1212
1225
|
length = length === VOID ? content.length : length;
|
|
1213
1226
|
// Inline function 'kotlin.also' call
|
|
1214
1227
|
var this_0 = new Buffer();
|
|
1215
|
-
this_0.
|
|
1228
|
+
this_0.write_ti570x_k$(content, offset, offset + length | 0);
|
|
1216
1229
|
var source = this_0;
|
|
1217
1230
|
return ByteReadChannel_1(source);
|
|
1218
1231
|
}
|
|
@@ -1220,18 +1233,18 @@ function ByteReadChannel_1(source) {
|
|
|
1220
1233
|
return new SourceByteReadChannel(source);
|
|
1221
1234
|
}
|
|
1222
1235
|
function buildPartialMatchTable($this) {
|
|
1223
|
-
var table = new Int32Array($this.
|
|
1236
|
+
var table = new Int32Array($this.matchString_1.get_size_woubt6_k$());
|
|
1224
1237
|
var j = 0;
|
|
1225
1238
|
var inductionVariable = 1;
|
|
1226
|
-
var last = $this.
|
|
1239
|
+
var last = $this.matchString_1.get_size_woubt6_k$();
|
|
1227
1240
|
if (inductionVariable < last)
|
|
1228
1241
|
do {
|
|
1229
1242
|
var i = inductionVariable;
|
|
1230
1243
|
inductionVariable = inductionVariable + 1 | 0;
|
|
1231
|
-
while (j > 0 && !($this.
|
|
1244
|
+
while (j > 0 && !($this.matchString_1.get_c1px32_k$(i) === $this.matchString_1.get_c1px32_k$(j))) {
|
|
1232
1245
|
j = table[j - 1 | 0];
|
|
1233
1246
|
}
|
|
1234
|
-
if ($this.
|
|
1247
|
+
if ($this.matchString_1.get_c1px32_k$(i) === $this.matchString_1.get_c1px32_k$(j)) {
|
|
1235
1248
|
j = j + 1 | 0;
|
|
1236
1249
|
}
|
|
1237
1250
|
table[i] = j;
|
|
@@ -1240,76 +1253,76 @@ function buildPartialMatchTable($this) {
|
|
|
1240
1253
|
return table;
|
|
1241
1254
|
}
|
|
1242
1255
|
function *advanceToNextPotentialMatch($this, $completion) {
|
|
1243
|
-
while (!$this.
|
|
1244
|
-
var nextMatch = indexOf($this.
|
|
1256
|
+
while (!$this.input_1.exhausted_p1jt55_k$() || (yield* $this.channel_1.awaitContent$default_rxihsg_k$(VOID, $completion))) {
|
|
1257
|
+
var nextMatch = indexOf($this.input_1, $this.matchString_1.get_c1px32_k$(0));
|
|
1245
1258
|
if (nextMatch === -1n) {
|
|
1246
|
-
var tmp = $this.
|
|
1247
|
-
checkBounds($this, (tmp instanceof Buffer ? tmp : THROW_CCE()).
|
|
1248
|
-
$this.
|
|
1249
|
-
yield* flushIfNeeded($this.
|
|
1259
|
+
var tmp = $this.input_1;
|
|
1260
|
+
checkBounds($this, (tmp instanceof Buffer ? tmp : THROW_CCE()).get_size_woubt6_k$());
|
|
1261
|
+
$this.bytesRead_1 = add($this.bytesRead_1, $this.input_1.transferTo_lu4ka2_k$($this.writeChannel_1.get_writeBuffer_t7kuc6_k$()));
|
|
1262
|
+
yield* flushIfNeeded($this.writeChannel_1, $completion);
|
|
1250
1263
|
} else {
|
|
1251
1264
|
checkBounds($this, nextMatch);
|
|
1252
1265
|
var tmp_0 = $this;
|
|
1253
|
-
var tmp_1 = $this.
|
|
1254
|
-
var tmp_2 = $this.
|
|
1255
|
-
tmp_0.
|
|
1256
|
-
yield* flushIfNeeded($this.
|
|
1266
|
+
var tmp_1 = $this.bytesRead_1;
|
|
1267
|
+
var tmp_2 = $this.writeChannel_1.get_writeBuffer_t7kuc6_k$();
|
|
1268
|
+
tmp_0.bytesRead_1 = add(tmp_1, $this.input_1.readAtMostTo_4oop6l_k$(tmp_2 instanceof Buffer ? tmp_2 : THROW_CCE(), nextMatch));
|
|
1269
|
+
yield* flushIfNeeded($this.writeChannel_1, $completion);
|
|
1257
1270
|
return Unit_instance;
|
|
1258
1271
|
}
|
|
1259
1272
|
}
|
|
1260
1273
|
return Unit_instance;
|
|
1261
1274
|
}
|
|
1262
1275
|
function *checkFullMatch($this, $completion) {
|
|
1263
|
-
while (!$this.
|
|
1264
|
-
var byte = $this.
|
|
1265
|
-
if ($this.
|
|
1266
|
-
var oldMatchIndex = $this.
|
|
1267
|
-
while ($this.
|
|
1268
|
-
$this.
|
|
1276
|
+
while (!$this.input_1.exhausted_p1jt55_k$() || (yield* $this.channel_1.awaitContent$default_rxihsg_k$(VOID, $completion))) {
|
|
1277
|
+
var byte = $this.input_1.readByte_ectjk2_k$();
|
|
1278
|
+
if ($this.matchIndex_1 > 0 && !(byte === $this.matchString_1.get_c1px32_k$($this.matchIndex_1))) {
|
|
1279
|
+
var oldMatchIndex = $this.matchIndex_1;
|
|
1280
|
+
while ($this.matchIndex_1 > 0 && !(byte === $this.matchString_1.get_c1px32_k$($this.matchIndex_1))) {
|
|
1281
|
+
$this.matchIndex_1 = $this.partialMatchTable_1[$this.matchIndex_1 - 1 | 0];
|
|
1269
1282
|
}
|
|
1270
|
-
var retained = fromInt(oldMatchIndex - $this.
|
|
1283
|
+
var retained = fromInt(oldMatchIndex - $this.matchIndex_1 | 0);
|
|
1271
1284
|
checkBounds($this, retained);
|
|
1272
1285
|
var tmp = $this;
|
|
1273
|
-
var tmp_0 = $this.
|
|
1274
|
-
var tmp_1 = $this.
|
|
1275
|
-
tmp.
|
|
1276
|
-
if ($this.
|
|
1277
|
-
yield* writeByte($this.
|
|
1278
|
-
var _unary__edvuaz = $this.
|
|
1279
|
-
$this.
|
|
1286
|
+
var tmp_0 = $this.bytesRead_1;
|
|
1287
|
+
var tmp_1 = $this.writeChannel_1.get_writeBuffer_t7kuc6_k$();
|
|
1288
|
+
tmp.bytesRead_1 = add(tmp_0, $this.partialMatchBuffer_1.readAtMostTo_4oop6l_k$(tmp_1 instanceof Buffer ? tmp_1 : THROW_CCE(), retained));
|
|
1289
|
+
if ($this.matchIndex_1 === 0 && !(byte === $this.matchString_1.get_c1px32_k$($this.matchIndex_1))) {
|
|
1290
|
+
yield* writeByte($this.writeChannel_1, byte, $completion);
|
|
1291
|
+
var _unary__edvuaz = $this.bytesRead_1;
|
|
1292
|
+
$this.bytesRead_1 = add(_unary__edvuaz, get_ONE());
|
|
1280
1293
|
return false;
|
|
1281
1294
|
}
|
|
1282
1295
|
}
|
|
1283
|
-
$this.
|
|
1284
|
-
if ($this.
|
|
1296
|
+
$this.matchIndex_1 = $this.matchIndex_1 + 1 | 0;
|
|
1297
|
+
if ($this.matchIndex_1 === $this.matchString_1.get_size_woubt6_k$()) {
|
|
1285
1298
|
return true;
|
|
1286
1299
|
}
|
|
1287
|
-
$this.
|
|
1300
|
+
$this.partialMatchBuffer_1.writeByte_9ih3z3_k$(byte);
|
|
1288
1301
|
}
|
|
1289
1302
|
return false;
|
|
1290
1303
|
}
|
|
1291
1304
|
function checkBounds($this, extra) {
|
|
1292
|
-
if (add($this.
|
|
1293
|
-
throw IOException.
|
|
1305
|
+
if (add($this.bytesRead_1, extra) > $this.limit_1) {
|
|
1306
|
+
throw IOException.new_kotlinx_io_IOException_wvwdyo_k$('Limit of ' + $this.limit_1.toString() + ' bytes exceeded ' + ('while searching for "' + toSingleLineString($this, $this.matchString_1) + '"'));
|
|
1294
1307
|
}
|
|
1295
1308
|
}
|
|
1296
1309
|
function toSingleLineString($this, $receiver) {
|
|
1297
1310
|
return replace(decodeToString_0($receiver), '\n', '\\n');
|
|
1298
1311
|
}
|
|
1299
1312
|
function attachWriterJob(_this__u8e3s4, writerJob) {
|
|
1300
|
-
var tmp = writerJob.
|
|
1313
|
+
var tmp = writerJob.channel_1;
|
|
1301
1314
|
var tmp0_safe_receiver = tmp instanceof ByteChannel ? tmp : null;
|
|
1302
1315
|
if (tmp0_safe_receiver == null)
|
|
1303
1316
|
null;
|
|
1304
1317
|
else {
|
|
1305
|
-
tmp0_safe_receiver.
|
|
1318
|
+
tmp0_safe_receiver.invokeOnClose_agzauw_k$(attachWriterJob$lambda(_this__u8e3s4));
|
|
1306
1319
|
}
|
|
1307
1320
|
}
|
|
1308
1321
|
function attachWriterJob$lambda($this_attachWriterJob) {
|
|
1309
1322
|
return (cause) => {
|
|
1310
1323
|
var tmp;
|
|
1311
1324
|
if (!(cause == null)) {
|
|
1312
|
-
$this_attachWriterJob.
|
|
1325
|
+
$this_attachWriterJob.cancel_9i2dv0_k$(cause);
|
|
1313
1326
|
tmp = Unit_instance;
|
|
1314
1327
|
}
|
|
1315
1328
|
return Unit_instance;
|
|
@@ -1322,45 +1335,47 @@ function Companion_getInstance_0() {
|
|
|
1322
1335
|
return Companion_instance_1;
|
|
1323
1336
|
}
|
|
1324
1337
|
function cancel_0(_this__u8e3s4) {
|
|
1325
|
-
_this__u8e3s4.
|
|
1338
|
+
_this__u8e3s4.cancel_9i2dv0_k$(IOException.new_kotlinx_io_IOException_wvwdyo_k$('Channel was cancelled'));
|
|
1326
1339
|
}
|
|
1327
1340
|
function *readLineStrict(_this__u8e3s4, limit, lineEnding, $completion) {
|
|
1328
1341
|
limit = limit === VOID ? 9223372036854775807n : limit;
|
|
1329
1342
|
lineEnding = lineEnding === VOID ? LineEnding_Default_getInstance() : lineEnding;
|
|
1330
|
-
var result = StringBuilder.
|
|
1343
|
+
var result = StringBuilder.new_kotlin_text_StringBuilder_u46mrb_k$();
|
|
1331
1344
|
return (yield* readLineStrictTo(_this__u8e3s4, result, limit, lineEnding, $completion)) >= 0n ? result.toString() : null;
|
|
1332
1345
|
}
|
|
1333
|
-
function *
|
|
1334
|
-
var result =
|
|
1335
|
-
while (!_this__u8e3s4.
|
|
1336
|
-
|
|
1337
|
-
|
|
1346
|
+
function *readBuffer(_this__u8e3s4, $completion) {
|
|
1347
|
+
var result = new Buffer();
|
|
1348
|
+
while (!_this__u8e3s4.get_isClosedForRead_ajcc1s_k$()) {
|
|
1349
|
+
if (_this__u8e3s4.get_readBuffer_yjmj9b_k$().exhausted_p1jt55_k$()) {
|
|
1350
|
+
yield* _this__u8e3s4.awaitContent$default_rxihsg_k$(VOID, $completion);
|
|
1351
|
+
}
|
|
1352
|
+
result.transferFrom_v29myr_k$(_this__u8e3s4.get_readBuffer_yjmj9b_k$());
|
|
1338
1353
|
}
|
|
1339
|
-
|
|
1340
|
-
return result
|
|
1354
|
+
rethrowCloseCauseIfNeeded_0(_this__u8e3s4);
|
|
1355
|
+
return result;
|
|
1341
1356
|
}
|
|
1342
1357
|
function *toByteArray(_this__u8e3s4, $completion) {
|
|
1343
|
-
return readBytes(yield* readBuffer(_this__u8e3s4, $completion));
|
|
1358
|
+
return readBytes(yield* /*#__NOINLINE__*/readBuffer(_this__u8e3s4, $completion));
|
|
1344
1359
|
}
|
|
1345
1360
|
function *copyTo(_this__u8e3s4, channel, limit, $completion) {
|
|
1346
1361
|
var remaining = limit;
|
|
1347
1362
|
try {
|
|
1348
|
-
while (!_this__u8e3s4.
|
|
1349
|
-
if (_this__u8e3s4.
|
|
1350
|
-
yield* _this__u8e3s4.
|
|
1363
|
+
while (!_this__u8e3s4.get_isClosedForRead_ajcc1s_k$() && remaining > 0n) {
|
|
1364
|
+
if (_this__u8e3s4.get_readBuffer_yjmj9b_k$().exhausted_p1jt55_k$()) {
|
|
1365
|
+
yield* _this__u8e3s4.awaitContent$default_rxihsg_k$(VOID, $completion);
|
|
1351
1366
|
}
|
|
1352
1367
|
var tmp0 = remaining;
|
|
1353
1368
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
1354
|
-
var b = get_remaining(_this__u8e3s4.
|
|
1369
|
+
var b = get_remaining(_this__u8e3s4.get_readBuffer_yjmj9b_k$());
|
|
1355
1370
|
var count = tmp0 <= b ? tmp0 : b;
|
|
1356
|
-
_this__u8e3s4.
|
|
1371
|
+
_this__u8e3s4.get_readBuffer_yjmj9b_k$().readTo_3vtbf7_k$(channel.get_writeBuffer_t7kuc6_k$(), count);
|
|
1357
1372
|
remaining = subtract(remaining, count);
|
|
1358
|
-
yield* channel.
|
|
1373
|
+
yield* channel.flush_4wsz1p_k$($completion);
|
|
1359
1374
|
}
|
|
1360
1375
|
} catch ($p) {
|
|
1361
1376
|
if ($p instanceof Error) {
|
|
1362
1377
|
var cause = $p;
|
|
1363
|
-
_this__u8e3s4.
|
|
1378
|
+
_this__u8e3s4.cancel_9i2dv0_k$(cause);
|
|
1364
1379
|
close_0(channel, cause);
|
|
1365
1380
|
throw cause;
|
|
1366
1381
|
} else {
|
|
@@ -1368,12 +1383,12 @@ function *copyTo(_this__u8e3s4, channel, limit, $completion) {
|
|
|
1368
1383
|
}
|
|
1369
1384
|
}
|
|
1370
1385
|
finally {
|
|
1371
|
-
yield* channel.
|
|
1386
|
+
yield* channel.flush_4wsz1p_k$($completion);
|
|
1372
1387
|
}
|
|
1373
1388
|
return subtract(limit, remaining);
|
|
1374
1389
|
}
|
|
1375
|
-
function
|
|
1376
|
-
var tmp0_safe_receiver = _this__u8e3s4.
|
|
1390
|
+
function rethrowCloseCauseIfNeeded_0(_this__u8e3s4) {
|
|
1391
|
+
var tmp0_safe_receiver = _this__u8e3s4.get_closedCause_o1qcj8_k$();
|
|
1377
1392
|
if (tmp0_safe_receiver == null)
|
|
1378
1393
|
null;
|
|
1379
1394
|
else {
|
|
@@ -1384,15 +1399,15 @@ function rethrowCloseCauseIfNeeded(_this__u8e3s4) {
|
|
|
1384
1399
|
function *discard(_this__u8e3s4, max, $completion) {
|
|
1385
1400
|
max = max === VOID ? 9223372036854775807n : max;
|
|
1386
1401
|
var remaining = max;
|
|
1387
|
-
while (remaining > 0n && !_this__u8e3s4.
|
|
1402
|
+
while (remaining > 0n && !_this__u8e3s4.get_isClosedForRead_ajcc1s_k$()) {
|
|
1388
1403
|
if (get_availableForRead(_this__u8e3s4) === 0) {
|
|
1389
|
-
yield* _this__u8e3s4.
|
|
1404
|
+
yield* _this__u8e3s4.awaitContent$default_rxihsg_k$(VOID, $completion);
|
|
1390
1405
|
}
|
|
1391
1406
|
var tmp0 = remaining;
|
|
1392
1407
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
1393
|
-
var b = get_remaining(_this__u8e3s4.
|
|
1408
|
+
var b = get_remaining(_this__u8e3s4.get_readBuffer_yjmj9b_k$());
|
|
1394
1409
|
var count = tmp0 <= b ? tmp0 : b;
|
|
1395
|
-
discard_0(_this__u8e3s4.
|
|
1410
|
+
discard_0(_this__u8e3s4.get_readBuffer_yjmj9b_k$(), count);
|
|
1396
1411
|
remaining = subtract(remaining, count);
|
|
1397
1412
|
}
|
|
1398
1413
|
return subtract(max, remaining);
|
|
@@ -1400,45 +1415,45 @@ function *discard(_this__u8e3s4, max, $completion) {
|
|
|
1400
1415
|
function *readAvailable(_this__u8e3s4, buffer, offset, length, $completion) {
|
|
1401
1416
|
offset = offset === VOID ? 0 : offset;
|
|
1402
1417
|
length = length === VOID ? buffer.length - offset | 0 : length;
|
|
1403
|
-
if (_this__u8e3s4.
|
|
1418
|
+
if (_this__u8e3s4.get_isClosedForRead_ajcc1s_k$())
|
|
1404
1419
|
return -1;
|
|
1405
|
-
if (_this__u8e3s4.
|
|
1406
|
-
yield* _this__u8e3s4.
|
|
1420
|
+
if (_this__u8e3s4.get_readBuffer_yjmj9b_k$().exhausted_p1jt55_k$()) {
|
|
1421
|
+
yield* _this__u8e3s4.awaitContent$default_rxihsg_k$(VOID, $completion);
|
|
1407
1422
|
}
|
|
1408
|
-
if (_this__u8e3s4.
|
|
1423
|
+
if (_this__u8e3s4.get_isClosedForRead_ajcc1s_k$())
|
|
1409
1424
|
return -1;
|
|
1410
|
-
return readAvailable_0(_this__u8e3s4.
|
|
1425
|
+
return readAvailable_0(_this__u8e3s4.get_readBuffer_yjmj9b_k$(), buffer, offset, length);
|
|
1411
1426
|
}
|
|
1412
1427
|
function *skipIfFound(_this__u8e3s4, byteString, $completion) {
|
|
1413
|
-
if (equals(yield* peek(_this__u8e3s4, byteString.
|
|
1414
|
-
yield* /*#__NOINLINE__*/discard(_this__u8e3s4, fromInt(byteString.
|
|
1428
|
+
if (equals(yield* peek(_this__u8e3s4, byteString.get_size_woubt6_k$(), $completion), byteString)) {
|
|
1429
|
+
yield* /*#__NOINLINE__*/discard(_this__u8e3s4, fromInt(byteString.get_size_woubt6_k$()), $completion);
|
|
1415
1430
|
return true;
|
|
1416
1431
|
}
|
|
1417
1432
|
return false;
|
|
1418
1433
|
}
|
|
1419
1434
|
function *readPacket(_this__u8e3s4, packet, $completion) {
|
|
1420
1435
|
var result = new Buffer();
|
|
1421
|
-
$l$loop: while (result.
|
|
1422
|
-
if (_this__u8e3s4.
|
|
1423
|
-
yield* _this__u8e3s4.
|
|
1436
|
+
$l$loop: while (result.get_size_woubt6_k$() < fromInt(packet)) {
|
|
1437
|
+
if (_this__u8e3s4.get_readBuffer_yjmj9b_k$().exhausted_p1jt55_k$()) {
|
|
1438
|
+
yield* _this__u8e3s4.awaitContent$default_rxihsg_k$(VOID, $completion);
|
|
1424
1439
|
}
|
|
1425
|
-
if (_this__u8e3s4.
|
|
1440
|
+
if (_this__u8e3s4.get_isClosedForRead_ajcc1s_k$())
|
|
1426
1441
|
break $l$loop;
|
|
1427
|
-
if (get_remaining(_this__u8e3s4.
|
|
1428
|
-
_this__u8e3s4.
|
|
1442
|
+
if (get_remaining(_this__u8e3s4.get_readBuffer_yjmj9b_k$()) > subtract(numberToLong(packet), result.get_size_woubt6_k$())) {
|
|
1443
|
+
_this__u8e3s4.get_readBuffer_yjmj9b_k$().readTo_3vtbf7_k$(result, subtract(numberToLong(packet), result.get_size_woubt6_k$()));
|
|
1429
1444
|
} else {
|
|
1430
|
-
_this__u8e3s4.
|
|
1445
|
+
_this__u8e3s4.get_readBuffer_yjmj9b_k$().transferTo_lu4ka2_k$(result);
|
|
1431
1446
|
}
|
|
1432
1447
|
}
|
|
1433
|
-
if (result.
|
|
1434
|
-
throw EOFException.
|
|
1448
|
+
if (result.get_size_woubt6_k$() < fromInt(packet)) {
|
|
1449
|
+
throw EOFException.new_kotlinx_io_EOFException_1f8u0y_k$('Not enough data available, required ' + packet + ' bytes but only ' + result.get_size_woubt6_k$().toString() + ' available');
|
|
1435
1450
|
}
|
|
1436
1451
|
return result;
|
|
1437
1452
|
}
|
|
1438
1453
|
function *readUntil(_this__u8e3s4, matchString, writeChannel, limit, ignoreMissing, $completion) {
|
|
1439
1454
|
limit = limit === VOID ? 9223372036854775807n : limit;
|
|
1440
1455
|
ignoreMissing = ignoreMissing === VOID ? false : ignoreMissing;
|
|
1441
|
-
return yield* (new ByteChannelScanner(_this__u8e3s4, matchString, writeChannel, limit)).
|
|
1456
|
+
return yield* (new ByteChannelScanner(_this__u8e3s4, matchString, writeChannel, limit)).findNext_k7w4m8_k$(ignoreMissing, $completion);
|
|
1442
1457
|
}
|
|
1443
1458
|
function *readLineStrictTo(_this__u8e3s4, out, limit, lineEnding, $completion) {
|
|
1444
1459
|
limit = limit === VOID ? 9223372036854775807n : limit;
|
|
@@ -1446,134 +1461,120 @@ function *readLineStrictTo(_this__u8e3s4, out, limit, lineEnding, $completion) {
|
|
|
1446
1461
|
// Inline function 'kotlin.require' call
|
|
1447
1462
|
if (!(limit >= 0n)) {
|
|
1448
1463
|
var message = 'Limit (' + limit.toString() + ') should be non-negative';
|
|
1449
|
-
throw IllegalArgumentException.
|
|
1464
|
+
throw IllegalArgumentException.new_kotlin_IllegalArgumentException_sfqr8_k$(toString_1(message));
|
|
1450
1465
|
}
|
|
1451
1466
|
return yield* internalReadLineTo(_this__u8e3s4, out, limit, lineEnding.equals(LineEnding_Lenient_getInstance()), true, $completion);
|
|
1452
1467
|
}
|
|
1453
|
-
function rethrowCloseCauseIfNeeded_0(_this__u8e3s4) {
|
|
1454
|
-
var tmp0_safe_receiver = _this__u8e3s4.h3y();
|
|
1455
|
-
if (tmp0_safe_receiver == null)
|
|
1456
|
-
null;
|
|
1457
|
-
else {
|
|
1458
|
-
// Inline function 'kotlin.let' call
|
|
1459
|
-
throw tmp0_safe_receiver;
|
|
1460
|
-
}
|
|
1461
|
-
}
|
|
1462
|
-
function *readBuffer(_this__u8e3s4, $completion) {
|
|
1463
|
-
var result = new Buffer();
|
|
1464
|
-
while (!_this__u8e3s4.m3y()) {
|
|
1465
|
-
result.i1u(_this__u8e3s4.u3x());
|
|
1466
|
-
yield* _this__u8e3s4.t3y(VOID, $completion);
|
|
1467
|
-
}
|
|
1468
|
-
var tmp0_safe_receiver = _this__u8e3s4.h3y();
|
|
1469
|
-
if (tmp0_safe_receiver == null)
|
|
1470
|
-
null;
|
|
1471
|
-
else {
|
|
1472
|
-
// Inline function 'kotlin.let' call
|
|
1473
|
-
throw tmp0_safe_receiver;
|
|
1474
|
-
}
|
|
1475
|
-
return result;
|
|
1476
|
-
}
|
|
1477
1468
|
function get_availableForRead(_this__u8e3s4) {
|
|
1478
|
-
return convertToInt(_this__u8e3s4.
|
|
1469
|
+
return convertToInt(_this__u8e3s4.get_readBuffer_yjmj9b_k$().get_buffer_bmaafd_k$().get_size_woubt6_k$());
|
|
1479
1470
|
}
|
|
1480
1471
|
function *peek(_this__u8e3s4, count, $completion) {
|
|
1481
|
-
if (_this__u8e3s4.
|
|
1472
|
+
if (_this__u8e3s4.get_isClosedForRead_ajcc1s_k$())
|
|
1482
1473
|
return null;
|
|
1483
|
-
if (!(yield* _this__u8e3s4.
|
|
1474
|
+
if (!(yield* _this__u8e3s4.awaitContent_q7m0p7_k$(count, $completion)))
|
|
1484
1475
|
return null;
|
|
1485
|
-
return readByteString(_this__u8e3s4.
|
|
1476
|
+
return readByteString(_this__u8e3s4.get_readBuffer_yjmj9b_k$().peek_21nx7_k$(), count);
|
|
1486
1477
|
}
|
|
1487
1478
|
function *internalReadLineTo(_this__u8e3s4, out, limit, lenientLineEnding, throwOnIncompleteLine, $completion) {
|
|
1488
|
-
var readBuffer = _this__u8e3s4.
|
|
1489
|
-
if (readBuffer.
|
|
1490
|
-
yield* _this__u8e3s4.
|
|
1479
|
+
var readBuffer = _this__u8e3s4.get_readBuffer_yjmj9b_k$();
|
|
1480
|
+
if (readBuffer.exhausted_p1jt55_k$()) {
|
|
1481
|
+
yield* _this__u8e3s4.awaitContent$default_rxihsg_k$(VOID, $completion);
|
|
1491
1482
|
}
|
|
1492
|
-
if (_this__u8e3s4.
|
|
1483
|
+
if (_this__u8e3s4.get_isClosedForRead_ajcc1s_k$())
|
|
1493
1484
|
return -1n;
|
|
1494
1485
|
var consumed = {_v: 0n};
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
internalReadLineTo$
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1486
|
+
var outBuffer = {_v: null};
|
|
1487
|
+
try {
|
|
1488
|
+
$l$loop: while (consumed._v < limit && !_this__u8e3s4.get_isClosedForRead_ajcc1s_k$()) {
|
|
1489
|
+
var limitLeft = subtract(limit, consumed._v);
|
|
1490
|
+
var lfIndex = indexOf(readBuffer, 10, VOID, limitLeft);
|
|
1491
|
+
var crIndex = internalReadLineTo$scanForSoleCr(readBuffer, lenientLineEnding, lfIndex, limitLeft);
|
|
1492
|
+
if (crIndex >= 0n) {
|
|
1493
|
+
internalReadLineTo$appendOrBuffer(outBuffer, out, readBuffer, consumed, crIndex);
|
|
1494
|
+
discard_0(readBuffer, 1n);
|
|
1495
|
+
return consumed._v;
|
|
1496
|
+
}
|
|
1497
|
+
if (lfIndex === 0n) {
|
|
1498
|
+
discard_0(readBuffer, 1n);
|
|
1499
|
+
return consumed._v;
|
|
1500
|
+
}
|
|
1501
|
+
if (lfIndex > 0n) {
|
|
1502
|
+
var tmp;
|
|
1503
|
+
var tmp_0 = readBuffer.get_buffer_bmaafd_k$();
|
|
1504
|
+
// Inline function 'kotlin.Long.minus' call
|
|
1505
|
+
var tmp$ret$0 = subtract(lfIndex, fromInt(1));
|
|
1506
|
+
if (tmp_0.get_f9lzxq_k$(tmp$ret$0) === 13) {
|
|
1507
|
+
tmp = 1n;
|
|
1508
|
+
} else {
|
|
1509
|
+
tmp = 0n;
|
|
1510
|
+
}
|
|
1511
|
+
var isCrlf = tmp;
|
|
1512
|
+
internalReadLineTo$appendOrBuffer(outBuffer, out, readBuffer, consumed, subtract(lfIndex, isCrlf));
|
|
1513
|
+
discard_0(readBuffer, add(numberToLong(1), isCrlf));
|
|
1514
|
+
return consumed._v;
|
|
1515
|
+
}
|
|
1516
|
+
// Inline function 'kotlin.comparisons.minOf' call
|
|
1517
|
+
var b = get_remaining(readBuffer);
|
|
1518
|
+
var count = limitLeft <= b ? limitLeft : b;
|
|
1519
|
+
var tmp_1 = readBuffer.get_buffer_bmaafd_k$();
|
|
1511
1520
|
// Inline function 'kotlin.Long.minus' call
|
|
1512
|
-
var tmp$ret$
|
|
1513
|
-
if (
|
|
1514
|
-
|
|
1521
|
+
var tmp$ret$2 = subtract(count, fromInt(1));
|
|
1522
|
+
if (tmp_1.get_f9lzxq_k$(tmp$ret$2) === 13) {
|
|
1523
|
+
// Inline function 'kotlin.Long.minus' call
|
|
1524
|
+
var tmp$ret$3 = subtract(count, fromInt(1));
|
|
1525
|
+
internalReadLineTo$appendOrBuffer(outBuffer, out, readBuffer, consumed, tmp$ret$3);
|
|
1526
|
+
if (yield* internalReadLineTo$discardCrlfOrCr(readBuffer, _this__u8e3s4, lenientLineEnding, $completion)) {
|
|
1527
|
+
return consumed._v;
|
|
1528
|
+
} else {
|
|
1529
|
+
internalReadLineTo$bufferBytes(outBuffer, readBuffer, consumed, 1n);
|
|
1530
|
+
}
|
|
1515
1531
|
} else {
|
|
1516
|
-
|
|
1532
|
+
internalReadLineTo$bufferBytes(outBuffer, readBuffer, consumed, count);
|
|
1517
1533
|
}
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
discard_0(readBuffer, add(numberToLong(1), isCrlf));
|
|
1521
|
-
return consumed._v;
|
|
1534
|
+
if (consumed._v < limit && get_remaining(readBuffer) === 0n && !(yield* _this__u8e3s4.awaitContent$default_rxihsg_k$(VOID, $completion)))
|
|
1535
|
+
break $l$loop;
|
|
1522
1536
|
}
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
if (yield*
|
|
1537
|
+
if (consumed._v === 0n && _this__u8e3s4.get_isClosedForRead_ajcc1s_k$())
|
|
1538
|
+
return -1n;
|
|
1539
|
+
// Inline function 'kotlin.check' call
|
|
1540
|
+
if (!(consumed._v <= limit)) {
|
|
1541
|
+
var message = 'Consumed bytes exceed the limit: ' + consumed._v.toString() + ' > ' + limit.toString() + ". It's an implementation bug, please report it.";
|
|
1542
|
+
throw IllegalStateException.new_kotlin_IllegalStateException_w47ei6_k$(toString_1(message));
|
|
1543
|
+
}
|
|
1544
|
+
if (consumed._v === limit) {
|
|
1545
|
+
if (limit === 9223372036854775807n)
|
|
1546
|
+
throw TooLongLineException.new_io_ktor_utils_io_charsets_TooLongLineException_emlsi1_k$('Max line length exceeded');
|
|
1547
|
+
if (get_remaining(readBuffer) === 0n && !(yield* _this__u8e3s4.awaitContent$default_rxihsg_k$(VOID, $completion))) {
|
|
1548
|
+
throwEndOfStreamException(consumed._v);
|
|
1549
|
+
}
|
|
1550
|
+
var tmp0_subject = readBuffer.get_buffer_bmaafd_k$().get_f9lzxq_k$(0n);
|
|
1551
|
+
if (tmp0_subject === 10) {
|
|
1552
|
+
discard_0(readBuffer, 1n);
|
|
1534
1553
|
return consumed._v;
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1554
|
+
} else if (tmp0_subject === 13)
|
|
1555
|
+
if (yield* internalReadLineTo$discardCrlfOrCr(readBuffer, _this__u8e3s4, lenientLineEnding, $completion)) {
|
|
1556
|
+
return consumed._v;
|
|
1557
|
+
}
|
|
1558
|
+
throwTooLongLineException(limit);
|
|
1538
1559
|
}
|
|
1539
|
-
if (
|
|
1540
|
-
break $l$loop;
|
|
1541
|
-
}
|
|
1542
|
-
if (consumed._v === 0n && _this__u8e3s4.m3y())
|
|
1543
|
-
return -1n;
|
|
1544
|
-
// Inline function 'kotlin.check' call
|
|
1545
|
-
if (!(consumed._v <= limit)) {
|
|
1546
|
-
var message = 'Consumed bytes exceed the limit: ' + consumed._v.toString() + ' > ' + limit.toString() + ". It's an implementation bug, please report it.";
|
|
1547
|
-
throw IllegalStateException.o(toString_1(message));
|
|
1548
|
-
}
|
|
1549
|
-
if (consumed._v === limit) {
|
|
1550
|
-
if (limit === 9223372036854775807n)
|
|
1551
|
-
throw TooLongLineException.s3z('Max line length exceeded');
|
|
1552
|
-
if (get_remaining(readBuffer) === 0n && !(yield* _this__u8e3s4.t3y(VOID, $completion))) {
|
|
1560
|
+
if (throwOnIncompleteLine) {
|
|
1553
1561
|
throwEndOfStreamException(consumed._v);
|
|
1554
1562
|
}
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
}
|
|
1560
|
-
if (yield* internalReadLineTo$discardCrlfOrCr(readBuffer, _this__u8e3s4, lenientLineEnding, $completion))
|
|
1561
|
-
return consumed._v;
|
|
1562
|
-
throwTooLongLineException(limit);
|
|
1563
|
-
}
|
|
1564
|
-
if (throwOnIncompleteLine) {
|
|
1565
|
-
throwEndOfStreamException(consumed._v);
|
|
1563
|
+
return consumed._v;
|
|
1564
|
+
}finally {
|
|
1565
|
+
if (!(outBuffer._v == null)) {
|
|
1566
|
+
out.append_jgojdo_k$(readString(outBuffer._v));
|
|
1567
|
+
}
|
|
1566
1568
|
}
|
|
1567
|
-
return consumed._v;
|
|
1568
1569
|
}
|
|
1569
1570
|
function throwEndOfStreamException(consumed) {
|
|
1570
|
-
throw EOFException.
|
|
1571
|
+
throw EOFException.new_kotlinx_io_EOFException_1f8u0y_k$('Unexpected end of stream after reading ' + consumed.toString() + ' bytes');
|
|
1571
1572
|
}
|
|
1572
1573
|
function throwTooLongLineException(limit) {
|
|
1573
|
-
throw TooLongLineException.
|
|
1574
|
+
throw TooLongLineException.new_io_ktor_utils_io_charsets_TooLongLineException_emlsi1_k$('Line exceeds limit of ' + limit.toString() + ' bytes');
|
|
1574
1575
|
}
|
|
1575
1576
|
function rethrowCloseCauseIfNeeded_1(_this__u8e3s4) {
|
|
1576
|
-
var tmp0_safe_receiver = _this__u8e3s4.
|
|
1577
|
+
var tmp0_safe_receiver = _this__u8e3s4.get_closedCause_o1qcj8_k$();
|
|
1577
1578
|
if (tmp0_safe_receiver == null)
|
|
1578
1579
|
null;
|
|
1579
1580
|
else {
|
|
@@ -1581,14 +1582,23 @@ function rethrowCloseCauseIfNeeded_1(_this__u8e3s4) {
|
|
|
1581
1582
|
throw tmp0_safe_receiver;
|
|
1582
1583
|
}
|
|
1583
1584
|
}
|
|
1584
|
-
function internalReadLineTo$
|
|
1585
|
+
function internalReadLineTo$bufferBytes(outBuffer, readBuffer, consumed, count) {
|
|
1585
1586
|
if (count > 0n) {
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1587
|
+
if (outBuffer._v == null) {
|
|
1588
|
+
outBuffer._v = new Buffer();
|
|
1589
|
+
}
|
|
1590
|
+
outBuffer._v.write_9ocf0z_k$(readBuffer, count);
|
|
1591
|
+
consumed._v = add(consumed._v, count);
|
|
1592
|
+
}
|
|
1593
|
+
}
|
|
1594
|
+
function internalReadLineTo$appendOrBuffer(outBuffer, $out, readBuffer, consumed, count) {
|
|
1595
|
+
if (outBuffer._v == null) {
|
|
1596
|
+
if (count > 0n) {
|
|
1597
|
+
$out.append_jgojdo_k$(readString_0(readBuffer, count));
|
|
1598
|
+
consumed._v = add(consumed._v, count);
|
|
1599
|
+
}
|
|
1600
|
+
} else {
|
|
1601
|
+
internalReadLineTo$bufferBytes(outBuffer, readBuffer, consumed, count);
|
|
1592
1602
|
}
|
|
1593
1603
|
}
|
|
1594
1604
|
function internalReadLineTo$scanForSoleCr(_this__u8e3s4, $lenientLineEnding, lfIndex, limitLeft) {
|
|
@@ -1611,7 +1621,7 @@ function internalReadLineTo$scanForSoleCr(_this__u8e3s4, $lenientLineEnding, lfI
|
|
|
1611
1621
|
return indexOf(_this__u8e3s4, 13, VOID, endIndex);
|
|
1612
1622
|
}
|
|
1613
1623
|
function *internalReadLineTo$discardCrlfOrCr(_this__u8e3s4, $this_internalReadLineTo, $lenientLineEnding, $completion) {
|
|
1614
|
-
if ((get_remaining(_this__u8e3s4) >= 2n || (yield* $this_internalReadLineTo.
|
|
1624
|
+
if ((get_remaining(_this__u8e3s4) >= 2n || (yield* $this_internalReadLineTo.awaitContent_q7m0p7_k$(2, $completion))) && _this__u8e3s4.get_buffer_bmaafd_k$().get_f9lzxq_k$(1n) === 10) {
|
|
1615
1625
|
discard_0(_this__u8e3s4, 2n);
|
|
1616
1626
|
return true;
|
|
1617
1627
|
}
|
|
@@ -1623,14 +1633,14 @@ function *internalReadLineTo$discardCrlfOrCr(_this__u8e3s4, $this_internalReadLi
|
|
|
1623
1633
|
}
|
|
1624
1634
|
function *flushIfNeeded(_this__u8e3s4, $completion) {
|
|
1625
1635
|
rethrowCloseCauseIfNeeded_1(_this__u8e3s4);
|
|
1626
|
-
if (_this__u8e3s4.
|
|
1627
|
-
yield* _this__u8e3s4.
|
|
1636
|
+
if (_this__u8e3s4.get_autoFlush_zfdl3o_k$() || get_size(_this__u8e3s4.get_writeBuffer_t7kuc6_k$()) >= 1048576)
|
|
1637
|
+
yield* _this__u8e3s4.flush_4wsz1p_k$($completion);
|
|
1628
1638
|
return Unit_instance;
|
|
1629
1639
|
}
|
|
1630
1640
|
function ByteWriteChannel$flushAndClose$ref(p0) {
|
|
1631
|
-
return constructCallableReference(function *($completion) {
|
|
1632
|
-
return yield* p0.
|
|
1633
|
-
}, 0, 1,
|
|
1641
|
+
return constructCallableReference(($completion) => orPromise($completion, function *($completion) {
|
|
1642
|
+
return yield* p0.flushAndClose_3zd2q_k$($completion);
|
|
1643
|
+
}), 0, 1, 80, 'flushAndClose', [p0]);
|
|
1634
1644
|
}
|
|
1635
1645
|
function get_NO_CALLBACK() {
|
|
1636
1646
|
_init_properties_ByteWriteChannelOperations_kt__i7slrs();
|
|
@@ -1641,16 +1651,16 @@ function writer(_this__u8e3s4, coroutineContext, autoFlush, block) {
|
|
|
1641
1651
|
coroutineContext = coroutineContext === VOID ? EmptyCoroutineContext_instance : coroutineContext;
|
|
1642
1652
|
autoFlush = autoFlush === VOID ? false : autoFlush;
|
|
1643
1653
|
_init_properties_ByteWriteChannelOperations_kt__i7slrs();
|
|
1644
|
-
return writer_0(_this__u8e3s4, coroutineContext, new ByteChannel(), block);
|
|
1654
|
+
return writer_0(_this__u8e3s4, coroutineContext, new ByteChannel(autoFlush), block);
|
|
1645
1655
|
}
|
|
1646
1656
|
function invokeOnCompletion(_this__u8e3s4, block) {
|
|
1647
1657
|
_init_properties_ByteWriteChannelOperations_kt__i7slrs();
|
|
1648
|
-
return _this__u8e3s4.
|
|
1658
|
+
return _this__u8e3s4.get_job_18j2r0_k$().invokeOnCompletion_n6cffu_k$(block);
|
|
1649
1659
|
}
|
|
1650
1660
|
function *writeFully(_this__u8e3s4, value, startIndex, endIndex, $completion) {
|
|
1651
1661
|
startIndex = startIndex === VOID ? 0 : startIndex;
|
|
1652
1662
|
endIndex = endIndex === VOID ? value.length : endIndex;
|
|
1653
|
-
_this__u8e3s4.
|
|
1663
|
+
_this__u8e3s4.get_writeBuffer_t7kuc6_k$().write_ti570x_k$(value, startIndex, endIndex);
|
|
1654
1664
|
yield* flushIfNeeded(_this__u8e3s4, $completion);
|
|
1655
1665
|
return Unit_instance;
|
|
1656
1666
|
}
|
|
@@ -1659,7 +1669,7 @@ function close_0(_this__u8e3s4, cause) {
|
|
|
1659
1669
|
if (cause == null) {
|
|
1660
1670
|
fireAndForget(ByteWriteChannel$flushAndClose$ref(_this__u8e3s4));
|
|
1661
1671
|
} else {
|
|
1662
|
-
_this__u8e3s4.
|
|
1672
|
+
_this__u8e3s4.cancel_9i2dv0_k$(cause);
|
|
1663
1673
|
}
|
|
1664
1674
|
}
|
|
1665
1675
|
function writer_0(_this__u8e3s4, coroutineContext, channel, block) {
|
|
@@ -1667,7 +1677,7 @@ function writer_0(_this__u8e3s4, coroutineContext, channel, block) {
|
|
|
1667
1677
|
_init_properties_ByteWriteChannelOperations_kt__i7slrs();
|
|
1668
1678
|
// Inline function 'kotlin.apply' call
|
|
1669
1679
|
var this_0 = launch(_this__u8e3s4, coroutineContext, VOID, writer$slambda(block, channel));
|
|
1670
|
-
this_0.
|
|
1680
|
+
this_0.invokeOnCompletion_n6cffu_k$(writer$lambda(channel));
|
|
1671
1681
|
var job = this_0;
|
|
1672
1682
|
return new WriterJob(channel, job);
|
|
1673
1683
|
}
|
|
@@ -1676,20 +1686,20 @@ function fireAndForget(_this__u8e3s4) {
|
|
|
1676
1686
|
startCoroutineCancellable(_this__u8e3s4, get_NO_CALLBACK());
|
|
1677
1687
|
}
|
|
1678
1688
|
function *writeByte(_this__u8e3s4, value, $completion) {
|
|
1679
|
-
_this__u8e3s4.
|
|
1689
|
+
_this__u8e3s4.get_writeBuffer_t7kuc6_k$().writeByte_9ih3z3_k$(value);
|
|
1680
1690
|
yield* flushIfNeeded(_this__u8e3s4, $completion);
|
|
1681
1691
|
return Unit_instance;
|
|
1682
1692
|
}
|
|
1683
1693
|
function writer$slambda($block, $channel) {
|
|
1684
|
-
return constructCallableReference(
|
|
1685
|
-
var nested = Job(get_job($this$launch.
|
|
1694
|
+
return constructCallableReference(($this$launch, $completion) => orPromise($completion, function *($completion) {
|
|
1695
|
+
var nested = Job(get_job($this$launch.get_coroutineContext_115oqo_k$()));
|
|
1686
1696
|
var tmp;
|
|
1687
1697
|
try {
|
|
1688
|
-
yield* $block(new WriterScope($channel, $this$launch.
|
|
1689
|
-
nested.
|
|
1698
|
+
yield* $($block(new WriterScope($channel, $this$launch.get_coroutineContext_115oqo_k$().plus_s13ygv_k$(nested)), $completion), $completion);
|
|
1699
|
+
nested.complete_9ww6vb_k$();
|
|
1690
1700
|
var tmp_0;
|
|
1691
|
-
if (get_job($this$launch.
|
|
1692
|
-
$channel.
|
|
1701
|
+
if (get_job($this$launch.get_coroutineContext_115oqo_k$()).get_isCancelled_trk8pu_k$()) {
|
|
1702
|
+
$channel.cancel_9i2dv0_k$(get_job($this$launch.get_coroutineContext_115oqo_k$()).getCancellationException_8i1q6u_k$());
|
|
1693
1703
|
tmp_0 = Unit_instance;
|
|
1694
1704
|
}
|
|
1695
1705
|
tmp = tmp_0;
|
|
@@ -1698,7 +1708,7 @@ function writer$slambda($block, $channel) {
|
|
|
1698
1708
|
if ($p instanceof Error) {
|
|
1699
1709
|
var cause = $p;
|
|
1700
1710
|
cancel(nested, 'Exception thrown while writing to channel', cause);
|
|
1701
|
-
$channel.
|
|
1711
|
+
$channel.cancel_9i2dv0_k$(cause);
|
|
1702
1712
|
tmp_1 = Unit_instance;
|
|
1703
1713
|
} else {
|
|
1704
1714
|
throw $p;
|
|
@@ -1706,11 +1716,11 @@ function writer$slambda($block, $channel) {
|
|
|
1706
1716
|
tmp = tmp_1;
|
|
1707
1717
|
}
|
|
1708
1718
|
finally {
|
|
1709
|
-
yield* nested.
|
|
1719
|
+
yield* nested.join_o20dar_k$($completion);
|
|
1710
1720
|
// Inline function 'kotlin.runCatching' call
|
|
1711
1721
|
var tmp_2;
|
|
1712
1722
|
try {
|
|
1713
|
-
yield* $channel.
|
|
1723
|
+
yield* $channel.flushAndClose_3zd2q_k$($completion);
|
|
1714
1724
|
// Inline function 'kotlin.Companion.success' call
|
|
1715
1725
|
tmp_2 = _Result___init__impl__xyqfz8(Unit_instance);
|
|
1716
1726
|
} catch ($p_0) {
|
|
@@ -1726,13 +1736,13 @@ function writer$slambda($block, $channel) {
|
|
|
1726
1736
|
}
|
|
1727
1737
|
}
|
|
1728
1738
|
return Unit_instance;
|
|
1729
|
-
}, 1);
|
|
1739
|
+
}), 1);
|
|
1730
1740
|
}
|
|
1731
1741
|
function writer$lambda($channel) {
|
|
1732
1742
|
return (it) => {
|
|
1733
1743
|
var tmp;
|
|
1734
|
-
if (!(it == null) && !$channel.
|
|
1735
|
-
$channel.
|
|
1744
|
+
if (!(it == null) && !$channel.get_isClosedForWrite_seyg5n_k$()) {
|
|
1745
|
+
$channel.cancel_9i2dv0_k$(it);
|
|
1736
1746
|
tmp = Unit_instance;
|
|
1737
1747
|
}
|
|
1738
1748
|
return Unit_instance;
|
|
@@ -1755,7 +1765,7 @@ function Companion_getInstance_1() {
|
|
|
1755
1765
|
return Companion_instance_2;
|
|
1756
1766
|
}
|
|
1757
1767
|
function access$_get_origin__hdh1qz($this) {
|
|
1758
|
-
return $this.
|
|
1768
|
+
return $this.origin_1;
|
|
1759
1769
|
}
|
|
1760
1770
|
var properties_initialized_CloseToken_kt_lgg8zn;
|
|
1761
1771
|
function _init_properties_CloseToken_kt__9ucr41() {
|
|
@@ -1766,35 +1776,35 @@ function _init_properties_CloseToken_kt__9ucr41() {
|
|
|
1766
1776
|
}
|
|
1767
1777
|
function transferFromDelegate($this) {
|
|
1768
1778
|
updateConsumed($this);
|
|
1769
|
-
var appended = $this.
|
|
1770
|
-
$this.
|
|
1779
|
+
var appended = $this.buffer_1.transferFrom_v29myr_k$($this.delegate_1.get_readBuffer_yjmj9b_k$());
|
|
1780
|
+
$this.initial_1 = add($this.initial_1, appended);
|
|
1771
1781
|
}
|
|
1772
1782
|
function updateConsumed($this) {
|
|
1773
|
-
$this.
|
|
1774
|
-
$this.
|
|
1783
|
+
$this.consumed_1 = add($this.consumed_1, subtract($this.initial_1, $this.buffer_1.get_size_woubt6_k$()));
|
|
1784
|
+
$this.initial_1 = $this.buffer_1.get_size_woubt6_k$();
|
|
1775
1785
|
}
|
|
1776
1786
|
function counted(_this__u8e3s4) {
|
|
1777
1787
|
return new CountedByteReadChannel(_this__u8e3s4);
|
|
1778
1788
|
}
|
|
1779
1789
|
function readText(_this__u8e3s4) {
|
|
1780
|
-
return
|
|
1790
|
+
return readString_1(_this__u8e3s4);
|
|
1781
1791
|
}
|
|
1782
|
-
var
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
function LineEnding_initEntries() {
|
|
1786
|
-
if (LineEnding_entriesInitialized)
|
|
1792
|
+
var static_init_called;
|
|
1793
|
+
function static_init() {
|
|
1794
|
+
if (static_init_called)
|
|
1787
1795
|
return Unit_instance;
|
|
1788
|
-
|
|
1796
|
+
static_init_called = true;
|
|
1789
1797
|
LineEnding_Default_instance = new LineEnding('Default', 0);
|
|
1790
1798
|
LineEnding_Lenient_instance = new LineEnding('Lenient', 1);
|
|
1791
1799
|
}
|
|
1800
|
+
var LineEnding_Default_instance;
|
|
1801
|
+
var LineEnding_Lenient_instance;
|
|
1792
1802
|
function LineEnding_Default_getInstance() {
|
|
1793
|
-
|
|
1803
|
+
static_init();
|
|
1794
1804
|
return LineEnding_Default_instance;
|
|
1795
1805
|
}
|
|
1796
1806
|
function LineEnding_Lenient_getInstance() {
|
|
1797
|
-
|
|
1807
|
+
static_init();
|
|
1798
1808
|
return LineEnding_Lenient_instance;
|
|
1799
1809
|
}
|
|
1800
1810
|
function _LineEndingMode___init__impl__jo5bul(mode) {
|
|
@@ -1811,23 +1821,23 @@ function LineEndingMode__plus_impl_ttpz2j($this, other) {
|
|
|
1811
1821
|
}
|
|
1812
1822
|
function LineEndingMode__toString_impl_j4h76r($this) {
|
|
1813
1823
|
var tmp;
|
|
1814
|
-
if ($this
|
|
1824
|
+
if (equals(new LineEndingMode($this), new LineEndingMode(Companion_getInstance_2().CR_1))) {
|
|
1815
1825
|
tmp = 'CR';
|
|
1816
|
-
} else if ($this
|
|
1826
|
+
} else if (equals(new LineEndingMode($this), new LineEndingMode(Companion_getInstance_2().LF_1))) {
|
|
1817
1827
|
tmp = 'LF';
|
|
1818
|
-
} else if ($this
|
|
1828
|
+
} else if (equals(new LineEndingMode($this), new LineEndingMode(Companion_getInstance_2().CRLF_1))) {
|
|
1819
1829
|
tmp = 'CRLF';
|
|
1820
1830
|
} else {
|
|
1821
1831
|
// Inline function 'kotlin.collections.filter' call
|
|
1822
|
-
var tmp0 = Companion_getInstance_2().
|
|
1832
|
+
var tmp0 = Companion_getInstance_2().values_1;
|
|
1823
1833
|
// Inline function 'kotlin.collections.filterTo' call
|
|
1824
|
-
var destination = ArrayList.
|
|
1825
|
-
var _iterator__ex2g4s = tmp0.
|
|
1826
|
-
while (_iterator__ex2g4s.
|
|
1827
|
-
var element = _iterator__ex2g4s.
|
|
1828
|
-
var it = element.
|
|
1834
|
+
var destination = ArrayList.new_kotlin_collections_ArrayList_ony0vx_k$();
|
|
1835
|
+
var _iterator__ex2g4s = tmp0.iterator_jk1svi_k$();
|
|
1836
|
+
while (_iterator__ex2g4s.hasNext_bitz1p_k$()) {
|
|
1837
|
+
var element = _iterator__ex2g4s.next_20eer_k$();
|
|
1838
|
+
var it = element.mode_1;
|
|
1829
1839
|
if (LineEndingMode__contains_impl_q5pr68($this, it)) {
|
|
1830
|
-
destination.
|
|
1840
|
+
destination.add_utx5q5_k$(element);
|
|
1831
1841
|
}
|
|
1832
1842
|
}
|
|
1833
1843
|
tmp = toString_1(destination);
|
|
@@ -1846,7 +1856,7 @@ function LineEndingMode__hashCode_impl_2mopm4($this) {
|
|
|
1846
1856
|
function LineEndingMode__equals_impl_qyr4nk($this, other) {
|
|
1847
1857
|
if (!(other instanceof LineEndingMode))
|
|
1848
1858
|
return false;
|
|
1849
|
-
if (!($this === other.
|
|
1859
|
+
if (!($this === other.mode_1))
|
|
1850
1860
|
return false;
|
|
1851
1861
|
return true;
|
|
1852
1862
|
}
|
|
@@ -1854,12 +1864,12 @@ function decode(_this__u8e3s4, input, max) {
|
|
|
1854
1864
|
max = max === VOID ? 2147483647 : max;
|
|
1855
1865
|
var tmp0 = fromInt(max);
|
|
1856
1866
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
1857
|
-
var b = input.
|
|
1867
|
+
var b = input.get_buffer_bmaafd_k$().get_size_woubt6_k$();
|
|
1858
1868
|
var tmp$ret$0 = tmp0 <= b ? tmp0 : b;
|
|
1859
1869
|
// Inline function 'kotlin.text.buildString' call
|
|
1860
1870
|
var capacity = convertToInt(tmp$ret$0);
|
|
1861
1871
|
// Inline function 'kotlin.apply' call
|
|
1862
|
-
var this_0 = StringBuilder.
|
|
1872
|
+
var this_0 = StringBuilder.new_kotlin_text_StringBuilder_wcb3z_k$(capacity);
|
|
1863
1873
|
decode_0(_this__u8e3s4, input, this_0, max);
|
|
1864
1874
|
return this_0.toString();
|
|
1865
1875
|
}
|
|
@@ -1879,7 +1889,7 @@ function encodeToImpl(_this__u8e3s4, destination, input, fromIndex, toIndex) {
|
|
|
1879
1889
|
var rc = encodeImpl(_this__u8e3s4, input, start, toIndex, destination);
|
|
1880
1890
|
// Inline function 'kotlin.check' call
|
|
1881
1891
|
if (!(rc >= 0)) {
|
|
1882
|
-
throw IllegalStateException.
|
|
1892
|
+
throw IllegalStateException.new_kotlin_IllegalStateException_w47ei6_k$('Check failed.');
|
|
1883
1893
|
}
|
|
1884
1894
|
start = start + rc | 0;
|
|
1885
1895
|
if (start >= toIndex)
|
|
@@ -1887,44 +1897,44 @@ function encodeToImpl(_this__u8e3s4, destination, input, fromIndex, toIndex) {
|
|
|
1887
1897
|
}
|
|
1888
1898
|
}
|
|
1889
1899
|
function canRead(_this__u8e3s4) {
|
|
1890
|
-
return !_this__u8e3s4.
|
|
1900
|
+
return !_this__u8e3s4.exhausted_p1jt55_k$();
|
|
1891
1901
|
}
|
|
1892
1902
|
function readBytes(_this__u8e3s4, count) {
|
|
1893
|
-
count = count === VOID ? convertToInt(_this__u8e3s4.
|
|
1903
|
+
count = count === VOID ? convertToInt(_this__u8e3s4.get_size_woubt6_k$()) : count;
|
|
1894
1904
|
return readByteArray(_this__u8e3s4, count);
|
|
1895
1905
|
}
|
|
1896
1906
|
function writeFully_0(_this__u8e3s4, buffer, offset, length) {
|
|
1897
1907
|
offset = offset === VOID ? 0 : offset;
|
|
1898
1908
|
length = length === VOID ? buffer.length - offset | 0 : length;
|
|
1899
|
-
_this__u8e3s4.
|
|
1909
|
+
_this__u8e3s4.write_ti570x_k$(buffer, offset, offset + length | 0);
|
|
1900
1910
|
}
|
|
1901
1911
|
function BytePacketBuilder() {
|
|
1902
1912
|
return new Buffer();
|
|
1903
1913
|
}
|
|
1904
1914
|
function build(_this__u8e3s4) {
|
|
1905
|
-
return _this__u8e3s4.
|
|
1915
|
+
return _this__u8e3s4.get_buffer_bmaafd_k$();
|
|
1906
1916
|
}
|
|
1907
1917
|
function get_size(_this__u8e3s4) {
|
|
1908
|
-
return convertToInt(_this__u8e3s4.
|
|
1918
|
+
return convertToInt(_this__u8e3s4.get_buffer_bmaafd_k$().get_size_woubt6_k$());
|
|
1909
1919
|
}
|
|
1910
1920
|
var ByteReadPacketEmpty;
|
|
1911
1921
|
function get_remaining(_this__u8e3s4) {
|
|
1912
1922
|
_init_properties_ByteReadPacket_kt__28475y();
|
|
1913
|
-
return _this__u8e3s4.
|
|
1923
|
+
return _this__u8e3s4.get_buffer_bmaafd_k$().get_size_woubt6_k$();
|
|
1914
1924
|
}
|
|
1915
1925
|
function discard_0(_this__u8e3s4, count) {
|
|
1916
1926
|
count = count === VOID ? 9223372036854775807n : count;
|
|
1917
1927
|
_init_properties_ByteReadPacket_kt__28475y();
|
|
1918
|
-
_this__u8e3s4.
|
|
1928
|
+
_this__u8e3s4.request_hj5jqj_k$(count);
|
|
1919
1929
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
1920
1930
|
var b = get_remaining(_this__u8e3s4);
|
|
1921
1931
|
var countToDiscard = count <= b ? count : b;
|
|
1922
|
-
_this__u8e3s4.
|
|
1932
|
+
_this__u8e3s4.get_buffer_bmaafd_k$().skip_csbv9x_k$(countToDiscard);
|
|
1923
1933
|
return countToDiscard;
|
|
1924
1934
|
}
|
|
1925
1935
|
function takeWhile(_this__u8e3s4, block) {
|
|
1926
1936
|
_init_properties_ByteReadPacket_kt__28475y();
|
|
1927
|
-
while (!_this__u8e3s4.
|
|
1937
|
+
while (!_this__u8e3s4.exhausted_p1jt55_k$() && block(_this__u8e3s4.get_buffer_bmaafd_k$())) {
|
|
1928
1938
|
}
|
|
1929
1939
|
}
|
|
1930
1940
|
var properties_initialized_ByteReadPacket_kt_hw4st4;
|
|
@@ -1937,37 +1947,23 @@ function _init_properties_ByteReadPacket_kt__28475y() {
|
|
|
1937
1947
|
function readAvailable_0(_this__u8e3s4, buffer, offset, length) {
|
|
1938
1948
|
offset = offset === VOID ? 0 : offset;
|
|
1939
1949
|
length = length === VOID ? buffer.length - offset | 0 : length;
|
|
1940
|
-
var result = _this__u8e3s4.
|
|
1950
|
+
var result = _this__u8e3s4.readAtMostTo_kub29z_k$(buffer, offset, offset + length | 0);
|
|
1941
1951
|
return result === -1 ? 0 : result;
|
|
1942
1952
|
}
|
|
1943
|
-
function readText_0(_this__u8e3s4, charset, max) {
|
|
1944
|
-
charset = charset === VOID ? Charsets_getInstance().o40_1 : charset;
|
|
1945
|
-
max = max === VOID ? 2147483647 : max;
|
|
1946
|
-
if (charset.equals(Charsets_getInstance().o40_1)) {
|
|
1947
|
-
if (max === 2147483647)
|
|
1948
|
-
return readString_0(_this__u8e3s4);
|
|
1949
|
-
var tmp0 = _this__u8e3s4.m1s().p2();
|
|
1950
|
-
// Inline function 'kotlin.math.min' call
|
|
1951
|
-
var b = fromInt(max);
|
|
1952
|
-
var count = tmp0 <= b ? tmp0 : b;
|
|
1953
|
-
return readString(_this__u8e3s4, count);
|
|
1954
|
-
}
|
|
1955
|
-
return decode(charset.r40(), _this__u8e3s4, max);
|
|
1956
|
-
}
|
|
1957
1953
|
function toByteArray_0(_this__u8e3s4, charset) {
|
|
1958
|
-
charset = charset === VOID ? Charsets_getInstance().
|
|
1959
|
-
if (charset.equals(Charsets_getInstance().
|
|
1960
|
-
return encodeToByteArray(_this__u8e3s4
|
|
1961
|
-
return encodeToByteArray_0(charset.
|
|
1954
|
+
charset = charset === VOID ? Charsets_getInstance().UTF_8__1 : charset;
|
|
1955
|
+
if (charset.equals(Charsets_getInstance().UTF_8__1))
|
|
1956
|
+
return encodeToByteArray(_this__u8e3s4);
|
|
1957
|
+
return encodeToByteArray_0(charset.newEncoder_gqwcdg_k$(), _this__u8e3s4, 0, _this__u8e3s4.length);
|
|
1962
1958
|
}
|
|
1963
1959
|
function writeText(_this__u8e3s4, text, fromIndex, toIndex, charset) {
|
|
1964
1960
|
fromIndex = fromIndex === VOID ? 0 : fromIndex;
|
|
1965
1961
|
toIndex = toIndex === VOID ? charSequenceLength(text) : toIndex;
|
|
1966
|
-
charset = charset === VOID ? Charsets_getInstance().
|
|
1967
|
-
if (charset === Charsets_getInstance().
|
|
1962
|
+
charset = charset === VOID ? Charsets_getInstance().UTF_8__1 : charset;
|
|
1963
|
+
if (charset === Charsets_getInstance().UTF_8__1) {
|
|
1968
1964
|
return writeString(_this__u8e3s4, toString_1(text), fromIndex, toIndex);
|
|
1969
1965
|
}
|
|
1970
|
-
encodeToImpl(charset.
|
|
1966
|
+
encodeToImpl(charset.newEncoder_gqwcdg_k$(), _this__u8e3s4, text, fromIndex, toIndex);
|
|
1971
1967
|
}
|
|
1972
1968
|
function get_ByteArrayPool() {
|
|
1973
1969
|
_init_properties_ByteArrayPool_kt__kfi3uj();
|
|
@@ -1992,14 +1988,15 @@ function Charsets_getInstance() {
|
|
|
1992
1988
|
return Charsets_instance;
|
|
1993
1989
|
}
|
|
1994
1990
|
function get_name(_this__u8e3s4) {
|
|
1995
|
-
return _this__u8e3s4.
|
|
1991
|
+
return _this__u8e3s4._name_1;
|
|
1996
1992
|
}
|
|
1997
1993
|
function forName(_this__u8e3s4, name) {
|
|
1998
|
-
return Companion_instance_4.
|
|
1994
|
+
return Companion_instance_4.forName_etcah2_k$(name);
|
|
1999
1995
|
}
|
|
2000
1996
|
function decode_0(_this__u8e3s4, input, dst, max) {
|
|
2001
1997
|
var decoder = Decoder(get_name(get_charset(_this__u8e3s4)), true);
|
|
2002
|
-
|
|
1998
|
+
input.request_hj5jqj_k$(fromInt(max));
|
|
1999
|
+
var tmp0 = input.get_buffer_bmaafd_k$().get_size_woubt6_k$();
|
|
2003
2000
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
2004
2001
|
var b = fromInt(max);
|
|
2005
2002
|
var count = tmp0 <= b ? tmp0 : b;
|
|
@@ -2009,19 +2006,19 @@ function decode_0(_this__u8e3s4, input, dst, max) {
|
|
|
2009
2006
|
// Inline function 'org.khronos.webgl.toInt8Array' call
|
|
2010
2007
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
2011
2008
|
// Inline function 'kotlin.js.asDynamic' call
|
|
2012
|
-
tmp = decoder.
|
|
2009
|
+
tmp = decoder.decode_hpap4q_k$(array);
|
|
2013
2010
|
} catch ($p) {
|
|
2014
2011
|
var tmp_0;
|
|
2015
2012
|
if ($p instanceof Error) {
|
|
2016
2013
|
var cause = $p;
|
|
2017
2014
|
var tmp0_elvis_lhs = cause.message;
|
|
2018
|
-
throw MalformedInputException.
|
|
2015
|
+
throw MalformedInputException.new_io_ktor_utils_io_charsets_MalformedInputException_brqco0_k$('Failed to decode bytes: ' + (tmp0_elvis_lhs == null ? 'no cause provided' : tmp0_elvis_lhs));
|
|
2019
2016
|
} else {
|
|
2020
2017
|
throw $p;
|
|
2021
2018
|
}
|
|
2022
2019
|
}
|
|
2023
2020
|
var result = tmp;
|
|
2024
|
-
dst.
|
|
2021
|
+
dst.append_jgojdo_k$(result);
|
|
2025
2022
|
return result.length;
|
|
2026
2023
|
}
|
|
2027
2024
|
function encodeImpl(_this__u8e3s4, input, fromIndex, toIndex, dst) {
|
|
@@ -2029,15 +2026,15 @@ function encodeImpl(_this__u8e3s4, input, fromIndex, toIndex, dst) {
|
|
|
2029
2026
|
// Inline function 'kotlin.require' call
|
|
2030
2027
|
if (!(fromIndex <= toIndex)) {
|
|
2031
2028
|
var message = 'Failed requirement.';
|
|
2032
|
-
throw IllegalArgumentException.
|
|
2029
|
+
throw IllegalArgumentException.new_kotlin_IllegalArgumentException_sfqr8_k$(toString_1(message));
|
|
2033
2030
|
}
|
|
2034
|
-
if (get_charset_0(_this__u8e3s4).equals(Charsets_getInstance().
|
|
2031
|
+
if (get_charset_0(_this__u8e3s4).equals(Charsets_getInstance().ISO_8859_1__1)) {
|
|
2035
2032
|
return encodeISO88591(input, fromIndex, toIndex, dst);
|
|
2036
2033
|
}
|
|
2037
2034
|
// Inline function 'kotlin.require' call
|
|
2038
|
-
if (!(get_charset_0(_this__u8e3s4) === Charsets_getInstance().
|
|
2035
|
+
if (!(get_charset_0(_this__u8e3s4) === Charsets_getInstance().UTF_8__1)) {
|
|
2039
2036
|
var message_0 = 'Only UTF-8 encoding is supported in JS';
|
|
2040
|
-
throw IllegalArgumentException.
|
|
2037
|
+
throw IllegalArgumentException.new_kotlin_IllegalArgumentException_sfqr8_k$(toString_1(message_0));
|
|
2041
2038
|
}
|
|
2042
2039
|
var encoder = new TextEncoder();
|
|
2043
2040
|
// Inline function 'kotlin.text.substring' call
|
|
@@ -2045,7 +2042,7 @@ function encodeImpl(_this__u8e3s4, input, fromIndex, toIndex, dst) {
|
|
|
2045
2042
|
var result = encoder.encode(tmp$ret$5);
|
|
2046
2043
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
2047
2044
|
// Inline function 'kotlin.js.asDynamic' call
|
|
2048
|
-
dst.
|
|
2045
|
+
dst.write$default_fa5nq1_k$(result);
|
|
2049
2046
|
return result.length;
|
|
2050
2047
|
}
|
|
2051
2048
|
function encodeToByteArray_0(_this__u8e3s4, input, fromIndex, toIndex) {
|
|
@@ -2054,10 +2051,10 @@ function encodeToByteArray_0(_this__u8e3s4, input, fromIndex, toIndex) {
|
|
|
2054
2051
|
return encodeToByteArrayImpl(_this__u8e3s4, input, fromIndex, toIndex);
|
|
2055
2052
|
}
|
|
2056
2053
|
function get_charset(_this__u8e3s4) {
|
|
2057
|
-
return _this__u8e3s4.
|
|
2054
|
+
return _this__u8e3s4._charset_1;
|
|
2058
2055
|
}
|
|
2059
2056
|
function get_charset_0(_this__u8e3s4) {
|
|
2060
|
-
return _this__u8e3s4.
|
|
2057
|
+
return _this__u8e3s4._charset_1;
|
|
2061
2058
|
}
|
|
2062
2059
|
function encodeToByteArrayImpl(_this__u8e3s4, input, fromIndex, toIndex) {
|
|
2063
2060
|
fromIndex = fromIndex === VOID ? 0 : fromIndex;
|
|
@@ -2134,11 +2131,26 @@ function _init_properties_TextDecoderFallback_js_kt__an7r6m() {
|
|
|
2134
2131
|
REPLACEMENT = new Int8Array([-17, -65, -67]);
|
|
2135
2132
|
}
|
|
2136
2133
|
}
|
|
2134
|
+
function readText_0(_this__u8e3s4, charset, max) {
|
|
2135
|
+
charset = charset === VOID ? Charsets_getInstance().UTF_8__1 : charset;
|
|
2136
|
+
max = max === VOID ? 2147483647 : max;
|
|
2137
|
+
if (charset.equals(Charsets_getInstance().UTF_8__1)) {
|
|
2138
|
+
if (max === 2147483647)
|
|
2139
|
+
return readString_1(_this__u8e3s4);
|
|
2140
|
+
_this__u8e3s4.request_hj5jqj_k$(fromInt(max));
|
|
2141
|
+
var tmp0 = _this__u8e3s4.get_buffer_bmaafd_k$().get_size_woubt6_k$();
|
|
2142
|
+
// Inline function 'kotlin.math.min' call
|
|
2143
|
+
var b = fromInt(max);
|
|
2144
|
+
var count = tmp0 <= b ? tmp0 : b;
|
|
2145
|
+
return readString_0(_this__u8e3s4, count);
|
|
2146
|
+
}
|
|
2147
|
+
return decode(charset.newDecoder_zcettw_k$(), _this__u8e3s4, max);
|
|
2148
|
+
}
|
|
2137
2149
|
function get_DEVELOPMENT_MODE() {
|
|
2138
2150
|
return false;
|
|
2139
2151
|
}
|
|
2140
2152
|
function ioDispatcher() {
|
|
2141
|
-
return Dispatchers_getInstance().
|
|
2153
|
+
return Dispatchers_getInstance().Default_1;
|
|
2142
2154
|
}
|
|
2143
2155
|
function encodeISO88591(input, fromIndex, toIndex, dst) {
|
|
2144
2156
|
if (fromIndex >= toIndex)
|
|
@@ -2154,13 +2166,13 @@ function encodeISO88591(input, fromIndex, toIndex, dst) {
|
|
|
2154
2166
|
if (character > 255) {
|
|
2155
2167
|
failedToMapError(character);
|
|
2156
2168
|
}
|
|
2157
|
-
dst.
|
|
2169
|
+
dst.writeByte_9ih3z3_k$(toByte(character));
|
|
2158
2170
|
}
|
|
2159
2171
|
while (inductionVariable < toIndex);
|
|
2160
2172
|
return toIndex - fromIndex | 0;
|
|
2161
2173
|
}
|
|
2162
2174
|
function failedToMapError(ch) {
|
|
2163
|
-
throw MalformedInputException.
|
|
2175
|
+
throw MalformedInputException.new_io_ktor_utils_io_charsets_MalformedInputException_brqco0_k$('The character with unicode point ' + ch + " couldn't be mapped to ISO-8859-1 character");
|
|
2164
2176
|
}
|
|
2165
2177
|
function get_WIN1252_TABLE() {
|
|
2166
2178
|
_init_properties_Win1252Table_kt__tl0v64();
|
|
@@ -2180,20 +2192,20 @@ initMetadataForCompanion(Companion);
|
|
|
2180
2192
|
initMetadataForObject(Empty, 'Empty');
|
|
2181
2193
|
initMetadataForClass(Closed, 'Closed');
|
|
2182
2194
|
initMetadataForInterface(Task, 'Task');
|
|
2183
|
-
protoOf(Read).
|
|
2184
|
-
protoOf(Read).
|
|
2195
|
+
protoOf(Read).resume_2o15jx_k$ = resume;
|
|
2196
|
+
protoOf(Read).resume_xzb95z_k$ = resume_0;
|
|
2185
2197
|
initMetadataForClass(Read, 'Read', VOID, VOID, [Task]);
|
|
2186
|
-
protoOf(Write).
|
|
2187
|
-
protoOf(Write).
|
|
2198
|
+
protoOf(Write).resume_2o15jx_k$ = resume;
|
|
2199
|
+
protoOf(Write).resume_xzb95z_k$ = resume_0;
|
|
2188
2200
|
initMetadataForClass(Write, 'Write', VOID, VOID, [Task]);
|
|
2189
2201
|
initMetadataForClass(sam$kotlinx_coroutines_DisposableHandle$0, 'sam$kotlinx_coroutines_DisposableHandle$0', VOID, VOID, [DisposableHandle, FunctionAdapter]);
|
|
2190
2202
|
initMetadataForInterface(ByteReadChannel, 'ByteReadChannel', VOID, VOID, VOID, [1]);
|
|
2191
2203
|
initMetadataForInterface(ByteWriteChannel, 'ByteWriteChannel', VOID, VOID, VOID, [0]);
|
|
2192
|
-
protoOf(ByteChannel).
|
|
2204
|
+
protoOf(ByteChannel).awaitContent$default_rxihsg_k$ = awaitContent$default;
|
|
2193
2205
|
initMetadataForClass(ByteChannel, 'ByteChannel', ByteChannel, VOID, [ByteReadChannel, ByteWriteChannel], [1, 0]);
|
|
2194
2206
|
initMetadataForClass(ConcurrentIOException, 'ConcurrentIOException');
|
|
2195
2207
|
initMetadataForClass(ByteChannelScanner, 'ByteChannelScanner', VOID, VOID, VOID, [1, 0]);
|
|
2196
|
-
protoOf(ByteReadChannel$Companion$Empty$1).
|
|
2208
|
+
protoOf(ByteReadChannel$Companion$Empty$1).awaitContent$default_rxihsg_k$ = awaitContent$default;
|
|
2197
2209
|
initMetadataForClass(ByteReadChannel$Companion$Empty$1, VOID, VOID, VOID, [ByteReadChannel], [1]);
|
|
2198
2210
|
initMetadataForCompanion(Companion_0);
|
|
2199
2211
|
initMetadataForClass(WriterJob, 'WriterJob');
|
|
@@ -2201,23 +2213,23 @@ initMetadataForClass(WriterScope, 'WriterScope');
|
|
|
2201
2213
|
initMetadataForClass(NO_CALLBACK$1, VOID, VOID, VOID, [Continuation]);
|
|
2202
2214
|
initMetadataForCompanion(Companion_1);
|
|
2203
2215
|
initMetadataForClass(CloseToken, 'CloseToken');
|
|
2204
|
-
protoOf(CountedByteReadChannel).
|
|
2216
|
+
protoOf(CountedByteReadChannel).awaitContent$default_rxihsg_k$ = awaitContent$default;
|
|
2205
2217
|
initMetadataForClass(CountedByteReadChannel, 'CountedByteReadChannel', VOID, VOID, [ByteReadChannel], [1]);
|
|
2206
|
-
initMetadataForClass(ClosedByteChannelException, 'ClosedByteChannelException', ClosedByteChannelException.
|
|
2207
|
-
initMetadataForClass(ClosedReadChannelException, 'ClosedReadChannelException', ClosedReadChannelException.
|
|
2208
|
-
initMetadataForClass(ClosedWriteChannelException, 'ClosedWriteChannelException', ClosedWriteChannelException.
|
|
2218
|
+
initMetadataForClass(ClosedByteChannelException, 'ClosedByteChannelException', ClosedByteChannelException.new_io_ktor_utils_io_ClosedByteChannelException_cg48aj_k$);
|
|
2219
|
+
initMetadataForClass(ClosedReadChannelException, 'ClosedReadChannelException', ClosedReadChannelException.new_io_ktor_utils_io_ClosedReadChannelException_uqrd2v_k$);
|
|
2220
|
+
initMetadataForClass(ClosedWriteChannelException, 'ClosedWriteChannelException', ClosedWriteChannelException.new_io_ktor_utils_io_ClosedWriteChannelException_h4pidy_k$);
|
|
2209
2221
|
initMetadataForClass(LineEnding, 'LineEnding');
|
|
2210
2222
|
initMetadataForCompanion(Companion_2);
|
|
2211
2223
|
initMetadataForClass(LineEndingMode, 'LineEndingMode');
|
|
2212
|
-
protoOf(SourceByteReadChannel).
|
|
2224
|
+
protoOf(SourceByteReadChannel).awaitContent$default_rxihsg_k$ = awaitContent$default;
|
|
2213
2225
|
initMetadataForClass(SourceByteReadChannel, 'SourceByteReadChannel', VOID, VOID, [ByteReadChannel], [1]);
|
|
2214
2226
|
initMetadataForClass(MalformedInputException, 'MalformedInputException');
|
|
2215
2227
|
initMetadataForClass(TooLongLineException, 'TooLongLineException');
|
|
2216
2228
|
initMetadataForInterface(ObjectPool, 'ObjectPool', VOID, VOID, [AutoCloseable]);
|
|
2217
|
-
protoOf(DefaultPool).
|
|
2229
|
+
protoOf(DefaultPool).close_yn9xrc_k$ = close;
|
|
2218
2230
|
initMetadataForClass(DefaultPool, 'DefaultPool', VOID, VOID, [ObjectPool]);
|
|
2219
2231
|
initMetadataForClass(ByteArrayPool$1);
|
|
2220
|
-
protoOf(NoPoolImpl).
|
|
2232
|
+
protoOf(NoPoolImpl).close_yn9xrc_k$ = close;
|
|
2221
2233
|
initMetadataForClass(NoPoolImpl, 'NoPoolImpl', VOID, VOID, [ObjectPool]);
|
|
2222
2234
|
initMetadataForCompanion(Companion_3);
|
|
2223
2235
|
initMetadataForClass(Charset, 'Charset');
|
|
@@ -2237,20 +2249,20 @@ Companion_instance_4 = new Companion_3();
|
|
|
2237
2249
|
//endregion
|
|
2238
2250
|
//region block: exports
|
|
2239
2251
|
export {
|
|
2240
|
-
LineEndingMode__plus_impl_ttpz2j as
|
|
2241
|
-
Charsets_getInstance as
|
|
2242
|
-
Companion_getInstance_0 as
|
|
2243
|
-
Companion_getInstance_2 as
|
|
2244
|
-
copyTo as
|
|
2245
|
-
readAvailable as
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
readUntil as
|
|
2251
|
-
skipIfFound as
|
|
2252
|
-
toByteArray as
|
|
2253
|
-
writeFully as
|
|
2252
|
+
LineEndingMode__plus_impl_ttpz2j as LineEndingMode__plus_impl_ttpz2j3huakwvr4g74l,
|
|
2253
|
+
Charsets_getInstance as Charsets_getInstancezrqwjk0yrlyw,
|
|
2254
|
+
Companion_getInstance_0 as Companion_getInstance1wcuorfuztxv3,
|
|
2255
|
+
Companion_getInstance_2 as Companion_getInstance325d2evlpmaqk,
|
|
2256
|
+
copyTo as copyTo2t9ovypu2ttur,
|
|
2257
|
+
readAvailable as readAvailable3nvldm7ch5xu5,
|
|
2258
|
+
readBuffer as readBuffery45c0omfxhxc,
|
|
2259
|
+
readLineStrictTo as readLineStrictTo1b1nwo5trwh7s,
|
|
2260
|
+
readLineStrict as readLineStrict17d7qs0fa0lsn,
|
|
2261
|
+
readPacket as readPacket290wjvm56mmfy,
|
|
2262
|
+
readUntil as readUntil2ls7o0c1kzd4x,
|
|
2263
|
+
skipIfFound as skipIfFoundarb6fjv6fvg7,
|
|
2264
|
+
toByteArray as toByteArraylei52b7x53md,
|
|
2265
|
+
writeFully as writeFully3k1eaua3t4bqd,
|
|
2254
2266
|
MalformedInputException as MalformedInputExceptionbvc6h5ij0ias,
|
|
2255
2267
|
decode as decode1t43jmuxrxpmo,
|
|
2256
2268
|
encode as encode35e4rpnc94tb5,
|
|
@@ -2282,7 +2294,7 @@ export {
|
|
|
2282
2294
|
invokeOnCompletion as invokeOnCompletion1ziuxzoag0iwj,
|
|
2283
2295
|
ioDispatcher as ioDispatcher3b9pa3x0duop,
|
|
2284
2296
|
readText as readText3frapgncbqrcg,
|
|
2285
|
-
|
|
2297
|
+
rethrowCloseCauseIfNeeded_0 as rethrowCloseCauseIfNeeded3ixo8wl4o3bz4,
|
|
2286
2298
|
writer as writer1eia5its2a1fh,
|
|
2287
2299
|
};
|
|
2288
2300
|
//endregion
|