@doordeck/doordeck-headless-sdk 0.30.0 → 0.32.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/kotlin/Kotlin-DateTime-library-kotlinx-datetime.js +1484 -1484
- package/kotlin/Kotlin-DateTime-library-kotlinx-datetime.js.map +1 -1
- package/kotlin/KotlinMultiplatformLibsodium-multiplatform-crypto-libsodium-bindings.js +33 -23
- package/kotlin/KotlinMultiplatformLibsodium-multiplatform-crypto-libsodium-bindings.js.map +1 -1
- package/kotlin/MultiplatformSettings-multiplatform-settings.js +11 -11
- package/kotlin/Stately-stately-concurrency.js +9 -9
- package/kotlin/Stately-stately-concurrent-collections.js +87 -87
- package/kotlin/doordeck-sdk.d.ts +33 -27
- package/kotlin/doordeck-sdk.js +14002 -14031
- package/kotlin/doordeck-sdk.js.map +1 -1
- package/kotlin/kotlin-kotlin-stdlib.js +3422 -3210
- package/kotlin/kotlin-kotlin-stdlib.js.map +1 -1
- package/kotlin/kotlinx-atomicfu.js +71 -71
- package/kotlin/kotlinx-atomicfu.js.map +1 -1
- package/kotlin/kotlinx-coroutines-core.js +2854 -2898
- package/kotlin/kotlinx-coroutines-core.js.map +1 -1
- package/kotlin/kotlinx-io-kotlinx-io-core.js +938 -453
- package/kotlin/kotlinx-io-kotlinx-io-core.js.map +1 -1
- package/kotlin/kotlinx-serialization-kotlinx-serialization-core.js +2344 -2283
- package/kotlin/kotlinx-serialization-kotlinx-serialization-core.js.map +1 -1
- package/kotlin/kotlinx-serialization-kotlinx-serialization-json-io.js +8 -0
- package/kotlin/kotlinx-serialization-kotlinx-serialization-json-io.js.map +1 -0
- package/kotlin/kotlinx-serialization-kotlinx-serialization-json.js +2146 -1806
- package/kotlin/kotlinx-serialization-kotlinx-serialization-json.js.map +1 -1
- package/kotlin/ktor-ktor-client-ktor-client-core.js +3510 -3374
- package/kotlin/ktor-ktor-client-ktor-client-core.js.map +1 -1
- package/kotlin/ktor-ktor-client-ktor-client-plugins-ktor-client-auth.js +490 -431
- package/kotlin/ktor-ktor-client-ktor-client-plugins-ktor-client-auth.js.map +1 -1
- package/kotlin/ktor-ktor-client-ktor-client-plugins-ktor-client-content-negotiation.js +232 -232
- package/kotlin/ktor-ktor-client-ktor-client-plugins-ktor-client-content-negotiation.js.map +1 -1
- package/kotlin/ktor-ktor-http.js +1101 -1046
- package/kotlin/ktor-ktor-http.js.map +1 -1
- package/kotlin/ktor-ktor-io.js +947 -941
- package/kotlin/ktor-ktor-io.js.map +1 -1
- package/kotlin/ktor-ktor-shared-ktor-events.js +24 -24
- package/kotlin/ktor-ktor-shared-ktor-events.js.map +1 -1
- package/kotlin/ktor-ktor-shared-ktor-serialization-ktor-serialization-kotlinx-ktor-serialization-kotlinx-json.js +9 -9
- package/kotlin/ktor-ktor-shared-ktor-serialization-ktor-serialization-kotlinx-ktor-serialization-kotlinx-json.js.map +1 -1
- package/kotlin/ktor-ktor-shared-ktor-serialization-ktor-serialization-kotlinx.js +325 -325
- package/kotlin/ktor-ktor-shared-ktor-serialization-ktor-serialization-kotlinx.js.map +1 -1
- package/kotlin/ktor-ktor-shared-ktor-serialization.js +130 -130
- package/kotlin/ktor-ktor-shared-ktor-serialization.js.map +1 -1
- package/kotlin/ktor-ktor-shared-ktor-websockets.js +115 -101
- package/kotlin/ktor-ktor-shared-ktor-websockets.js.map +1 -1
- package/kotlin/ktor-ktor-utils.js +1133 -806
- package/kotlin/ktor-ktor-utils.js.map +1 -1
- package/kotlin/projects-core-koin-core.js +561 -527
- package/kotlin/projects-core-koin-core.js.map +1 -1
- package/package.json +3 -5
- package/kotlin/uuid.js +0 -152
- package/kotlin/uuid.js.map +0 -1
package/kotlin/ktor-ktor-io.js
CHANGED
|
@@ -1,96 +1,124 @@
|
|
|
1
|
-
(function (_, kotlin_kotlin, kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core,
|
|
1
|
+
(function (_, kotlin_kotlin, kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core, kotlin_org_jetbrains_kotlinx_kotlinx_io_core, kotlin_org_jetbrains_kotlinx_atomicfu) {
|
|
2
2
|
'use strict';
|
|
3
3
|
//region block: imports
|
|
4
|
-
var
|
|
5
|
-
var
|
|
4
|
+
var Companion_instance = kotlin_kotlin.$_$.e5;
|
|
5
|
+
var Unit_instance = kotlin_kotlin.$_$.j5;
|
|
6
6
|
var _Result___init__impl__xyqfz8 = kotlin_kotlin.$_$.z2;
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
var
|
|
13
|
-
var
|
|
14
|
-
var
|
|
15
|
-
var
|
|
16
|
-
var
|
|
17
|
-
var
|
|
18
|
-
var
|
|
7
|
+
var protoOf = kotlin_kotlin.$_$.nb;
|
|
8
|
+
var initMetadataForCompanion = kotlin_kotlin.$_$.oa;
|
|
9
|
+
var THROW_CCE = kotlin_kotlin.$_$.af;
|
|
10
|
+
var initMetadataForObject = kotlin_kotlin.$_$.ta;
|
|
11
|
+
var toString = kotlin_kotlin.$_$.bg;
|
|
12
|
+
var hashCode = kotlin_kotlin.$_$.ma;
|
|
13
|
+
var equals = kotlin_kotlin.$_$.ga;
|
|
14
|
+
var initMetadataForClass = kotlin_kotlin.$_$.na;
|
|
15
|
+
var createFailure = kotlin_kotlin.$_$.qf;
|
|
16
|
+
var Result = kotlin_kotlin.$_$.ye;
|
|
17
|
+
var initMetadataForInterface = kotlin_kotlin.$_$.ra;
|
|
18
|
+
var VOID = kotlin_kotlin.$_$.h;
|
|
19
|
+
var isInterface = kotlin_kotlin.$_$.cb;
|
|
20
|
+
var CoroutineImpl = kotlin_kotlin.$_$.q9;
|
|
21
|
+
var numberToLong = kotlin_kotlin.$_$.lb;
|
|
22
|
+
var toLong = kotlin_kotlin.$_$.pb;
|
|
23
|
+
var intercepted = kotlin_kotlin.$_$.d9;
|
|
24
|
+
var CancellableContinuationImpl = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.n;
|
|
25
|
+
var noWhenBranchMatchedException = kotlin_kotlin.$_$.yf;
|
|
26
|
+
var returnIfSuspended = kotlin_kotlin.$_$.l;
|
|
27
|
+
var get_COROUTINE_SUSPENDED = kotlin_kotlin.$_$.a9;
|
|
28
|
+
var Long = kotlin_kotlin.$_$.ue;
|
|
29
|
+
var initMetadataForCoroutine = kotlin_kotlin.$_$.pa;
|
|
19
30
|
var Buffer = kotlin_org_jetbrains_kotlinx_kotlinx_io_core.$_$.f;
|
|
31
|
+
var atomic$ref$1 = kotlin_org_jetbrains_kotlinx_atomicfu.$_$.d;
|
|
20
32
|
var IOException_init_$Create$ = kotlin_org_jetbrains_kotlinx_kotlinx_io_core.$_$.c;
|
|
21
|
-
var
|
|
22
|
-
var
|
|
23
|
-
var
|
|
24
|
-
var initMetadataForInterface = kotlin_kotlin.$_$.va;
|
|
33
|
+
var IllegalStateException = kotlin_kotlin.$_$.te;
|
|
34
|
+
var IllegalStateException_init_$Init$ = kotlin_kotlin.$_$.y1;
|
|
35
|
+
var captureStack = kotlin_kotlin.$_$.y9;
|
|
25
36
|
var EOFException_init_$Create$ = kotlin_org_jetbrains_kotlinx_kotlinx_io_core.$_$.a;
|
|
26
|
-
var Long = kotlin_kotlin.$_$.ze;
|
|
27
37
|
var EmptyCoroutineContext_getInstance = kotlin_kotlin.$_$.q4;
|
|
28
|
-
var CoroutineScope = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.
|
|
29
|
-
var launch = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.
|
|
30
|
-
var startCoroutineCancellable = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.
|
|
31
|
-
var Continuation = kotlin_kotlin.$_$.
|
|
32
|
-
var initMetadataForFunctionReference = kotlin_kotlin.$_$.
|
|
33
|
-
var
|
|
34
|
-
var
|
|
35
|
-
var
|
|
36
|
-
var
|
|
37
|
-
var
|
|
38
|
-
var initMetadataForLambda = kotlin_kotlin.$_$.wa;
|
|
39
|
-
var CopyableThrowable = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.t;
|
|
38
|
+
var CoroutineScope = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.v;
|
|
39
|
+
var launch = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.f1;
|
|
40
|
+
var startCoroutineCancellable = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.l;
|
|
41
|
+
var Continuation = kotlin_kotlin.$_$.k9;
|
|
42
|
+
var initMetadataForFunctionReference = kotlin_kotlin.$_$.qa;
|
|
43
|
+
var get_job = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.e1;
|
|
44
|
+
var Job = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.x;
|
|
45
|
+
var cancel = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.d1;
|
|
46
|
+
var initMetadataForLambda = kotlin_kotlin.$_$.sa;
|
|
47
|
+
var CopyableThrowable = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.s;
|
|
40
48
|
var IOException = kotlin_org_jetbrains_kotlinx_kotlinx_io_core.$_$.g;
|
|
41
49
|
var IOException_init_$Create$_0 = kotlin_org_jetbrains_kotlinx_kotlinx_io_core.$_$.e;
|
|
42
|
-
var CancellationException_init_$Create$ = kotlin_kotlin.$_$.
|
|
43
|
-
var CancellationException = kotlin_kotlin.$_$.
|
|
50
|
+
var CancellationException_init_$Create$ = kotlin_kotlin.$_$.f1;
|
|
51
|
+
var CancellationException = kotlin_kotlin.$_$.z8;
|
|
44
52
|
var readString = kotlin_org_jetbrains_kotlinx_kotlinx_io_core.$_$.k;
|
|
45
|
-
var StringBuilder_init_$Create$ = kotlin_kotlin.$_$.
|
|
46
|
-
var
|
|
47
|
-
var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.
|
|
48
|
-
var charSequenceLength = kotlin_kotlin.$_$.
|
|
53
|
+
var StringBuilder_init_$Create$ = kotlin_kotlin.$_$.h1;
|
|
54
|
+
var toString_0 = kotlin_kotlin.$_$.rb;
|
|
55
|
+
var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.z1;
|
|
56
|
+
var charSequenceLength = kotlin_kotlin.$_$.ca;
|
|
49
57
|
var readByteArray = kotlin_org_jetbrains_kotlinx_kotlinx_io_core.$_$.i;
|
|
50
58
|
var readString_0 = kotlin_org_jetbrains_kotlinx_kotlinx_io_core.$_$.l;
|
|
51
|
-
var
|
|
52
|
-
var encodeToByteArray = kotlin_kotlin.$_$.qc;
|
|
59
|
+
var encodeToByteArray = kotlin_kotlin.$_$.mc;
|
|
53
60
|
var writeString = kotlin_org_jetbrains_kotlinx_kotlinx_io_core.$_$.m;
|
|
54
|
-
var decodeToString = kotlin_kotlin.$_$.pc;
|
|
55
|
-
var Unit = kotlin_kotlin.$_$.pf;
|
|
56
|
-
var CancellableContinuation = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.p;
|
|
57
61
|
var _Char___init__impl__6a9atx = kotlin_kotlin.$_$.r2;
|
|
58
|
-
var replace = kotlin_kotlin.$_$.
|
|
59
|
-
var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.
|
|
60
|
-
var getStringHashCode = kotlin_kotlin.$_$.
|
|
61
|
-
var initMetadataForObject = kotlin_kotlin.$_$.xa;
|
|
62
|
+
var replace = kotlin_kotlin.$_$.ed;
|
|
63
|
+
var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.v1;
|
|
64
|
+
var getStringHashCode = kotlin_kotlin.$_$.la;
|
|
62
65
|
var IOException_init_$Init$ = kotlin_org_jetbrains_kotlinx_kotlinx_io_core.$_$.b;
|
|
63
|
-
var
|
|
64
|
-
var charSequenceSubSequence = kotlin_kotlin.$_$.
|
|
65
|
-
var isCharSequence = kotlin_kotlin.$_$.
|
|
66
|
-
var trim = kotlin_kotlin.$_$.
|
|
67
|
-
var toByte = kotlin_kotlin.$_$.
|
|
68
|
-
var
|
|
69
|
-
var setOf = kotlin_kotlin.$_$.
|
|
70
|
-
var charSequenceGet = kotlin_kotlin.$_$.
|
|
66
|
+
var readByteArray_0 = kotlin_org_jetbrains_kotlinx_kotlinx_io_core.$_$.j;
|
|
67
|
+
var charSequenceSubSequence = kotlin_kotlin.$_$.da;
|
|
68
|
+
var isCharSequence = kotlin_kotlin.$_$.ya;
|
|
69
|
+
var trim = kotlin_kotlin.$_$.ee;
|
|
70
|
+
var toByte = kotlin_kotlin.$_$.ob;
|
|
71
|
+
var decodeToString = kotlin_kotlin.$_$.kc;
|
|
72
|
+
var setOf = kotlin_kotlin.$_$.g8;
|
|
73
|
+
var charSequenceGet = kotlin_kotlin.$_$.ba;
|
|
71
74
|
var Char__toInt_impl_vasixd = kotlin_kotlin.$_$.x2;
|
|
72
|
-
var fillArrayVal = kotlin_kotlin.$_$.
|
|
75
|
+
var fillArrayVal = kotlin_kotlin.$_$.ia;
|
|
73
76
|
//endregion
|
|
74
77
|
//region block: pre-declaration
|
|
78
|
+
initMetadataForCompanion(Companion);
|
|
79
|
+
initMetadataForObject(Empty, 'Empty');
|
|
80
|
+
initMetadataForClass(Closed, 'Closed');
|
|
81
|
+
function resume() {
|
|
82
|
+
return this.u1d().o9(Companion_getInstance().s1d_1);
|
|
83
|
+
}
|
|
84
|
+
function resume_0(throwable) {
|
|
85
|
+
var tmp = this.u1d();
|
|
86
|
+
var tmp_0;
|
|
87
|
+
if (throwable == null) {
|
|
88
|
+
tmp_0 = null;
|
|
89
|
+
} else {
|
|
90
|
+
// Inline function 'kotlin.let' call
|
|
91
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
92
|
+
// Inline function 'io.ktor.utils.io.Task.resume.<anonymous>' call
|
|
93
|
+
// Inline function 'kotlin.Companion.failure' call
|
|
94
|
+
var tmp$ret$2 = _Result___init__impl__xyqfz8(createFailure(throwable));
|
|
95
|
+
tmp_0 = new Result(tmp$ret$2);
|
|
96
|
+
}
|
|
97
|
+
var tmp1_elvis_lhs = tmp_0;
|
|
98
|
+
return tmp.o9(tmp1_elvis_lhs == null ? Companion_getInstance().s1d_1 : tmp1_elvis_lhs.gk_1);
|
|
99
|
+
}
|
|
100
|
+
initMetadataForInterface(Task, 'Task');
|
|
101
|
+
initMetadataForClass(Read, 'Read', VOID, VOID, [Task]);
|
|
102
|
+
initMetadataForClass(Write, 'Write', VOID, VOID, [Task]);
|
|
75
103
|
initMetadataForCoroutine($awaitContentCOROUTINE$0, CoroutineImpl);
|
|
76
|
-
initMetadataForCoroutine($
|
|
77
|
-
initMetadataForCoroutine($
|
|
78
|
-
initMetadataForCoroutine($sleepForWriteCOROUTINE$3, CoroutineImpl);
|
|
104
|
+
initMetadataForCoroutine($flushCOROUTINE$1, CoroutineImpl);
|
|
105
|
+
initMetadataForCoroutine($flushAndCloseCOROUTINE$2, CoroutineImpl);
|
|
79
106
|
function awaitContent$default(min, $completion, $super) {
|
|
80
107
|
min = min === VOID ? 1 : min;
|
|
81
|
-
return $super === VOID ? this.
|
|
108
|
+
return $super === VOID ? this.y1f(min, $completion) : $super.y1f.call(this, min, $completion);
|
|
82
109
|
}
|
|
83
110
|
initMetadataForInterface(ByteReadChannel_1, 'ByteReadChannel', VOID, VOID, VOID, [1]);
|
|
84
111
|
initMetadataForClass(ByteChannel, 'ByteChannel', ByteChannel, VOID, [ByteReadChannel_1], [1, 0]);
|
|
112
|
+
initMetadataForClass(ConcurrentIOException, 'ConcurrentIOException', VOID, IllegalStateException);
|
|
85
113
|
initMetadataForClass(ByteReadChannel$Companion$Empty$1, VOID, VOID, VOID, [ByteReadChannel_1], [1]);
|
|
86
|
-
initMetadataForCompanion(
|
|
87
|
-
initMetadataForCoroutine($readRemainingCOROUTINE$
|
|
88
|
-
initMetadataForCoroutine($readPacketCOROUTINE$
|
|
89
|
-
initMetadataForCoroutine($readAvailableCOROUTINE$
|
|
90
|
-
initMetadataForCoroutine($toByteArrayCOROUTINE$
|
|
91
|
-
initMetadataForCoroutine($copyToCOROUTINE$
|
|
92
|
-
initMetadataForCoroutine($readBufferCOROUTINE$
|
|
93
|
-
initMetadataForCoroutine($flushIfNeededCOROUTINE$
|
|
114
|
+
initMetadataForCompanion(Companion_0);
|
|
115
|
+
initMetadataForCoroutine($readRemainingCOROUTINE$3, CoroutineImpl);
|
|
116
|
+
initMetadataForCoroutine($readPacketCOROUTINE$4, CoroutineImpl);
|
|
117
|
+
initMetadataForCoroutine($readAvailableCOROUTINE$7, CoroutineImpl);
|
|
118
|
+
initMetadataForCoroutine($toByteArrayCOROUTINE$9, CoroutineImpl);
|
|
119
|
+
initMetadataForCoroutine($copyToCOROUTINE$10, CoroutineImpl);
|
|
120
|
+
initMetadataForCoroutine($readBufferCOROUTINE$12, CoroutineImpl);
|
|
121
|
+
initMetadataForCoroutine($flushIfNeededCOROUTINE$14, CoroutineImpl);
|
|
94
122
|
initMetadataForClass(WriterJob, 'WriterJob');
|
|
95
123
|
initMetadataForClass(WriterScope, 'WriterScope', VOID, VOID, [CoroutineScope]);
|
|
96
124
|
initMetadataForClass(NO_CALLBACK$1, VOID, VOID, VOID, [Continuation]);
|
|
@@ -98,10 +126,9 @@
|
|
|
98
126
|
initMetadataForLambda(writer$slambda, CoroutineImpl, VOID, [1]);
|
|
99
127
|
initMetadataForClass(CloseToken, 'CloseToken');
|
|
100
128
|
initMetadataForClass(SourceByteReadChannel, 'SourceByteReadChannel', VOID, VOID, [ByteReadChannel_1], [1]);
|
|
101
|
-
initMetadataForClass(ClosedSlot, 'ClosedSlot', VOID, VOID, [CancellableContinuation]);
|
|
102
129
|
initMetadataForClass(DefaultPool, 'DefaultPool');
|
|
103
130
|
initMetadataForClass(ByteArrayPool$1, VOID, VOID, DefaultPool);
|
|
104
|
-
initMetadataForCompanion(
|
|
131
|
+
initMetadataForCompanion(Companion_1);
|
|
105
132
|
initMetadataForClass(Charset, 'Charset');
|
|
106
133
|
initMetadataForObject(Charsets, 'Charsets');
|
|
107
134
|
initMetadataForClass(MalformedInputException, 'MalformedInputException', VOID, IOException);
|
|
@@ -113,303 +140,371 @@
|
|
|
113
140
|
initMetadataForClass(toKtor$1);
|
|
114
141
|
initMetadataForClass(TextDecoderFallback, 'TextDecoderFallback');
|
|
115
142
|
//endregion
|
|
116
|
-
function
|
|
117
|
-
|
|
143
|
+
function Companion() {
|
|
144
|
+
Companion_instance_0 = this;
|
|
145
|
+
this.r1d_1 = new Closed(null);
|
|
146
|
+
var tmp = this;
|
|
147
|
+
// Inline function 'kotlin.Companion.success' call
|
|
148
|
+
tmp.s1d_1 = _Result___init__impl__xyqfz8(Unit_instance);
|
|
149
|
+
}
|
|
150
|
+
var Companion_instance_0;
|
|
151
|
+
function Companion_getInstance() {
|
|
152
|
+
if (Companion_instance_0 == null)
|
|
153
|
+
new Companion();
|
|
154
|
+
return Companion_instance_0;
|
|
155
|
+
}
|
|
156
|
+
function Empty() {
|
|
118
157
|
}
|
|
119
|
-
|
|
158
|
+
protoOf(Empty).toString = function () {
|
|
159
|
+
return 'Empty';
|
|
160
|
+
};
|
|
161
|
+
protoOf(Empty).hashCode = function () {
|
|
162
|
+
return -231472095;
|
|
163
|
+
};
|
|
164
|
+
protoOf(Empty).equals = function (other) {
|
|
165
|
+
if (this === other)
|
|
166
|
+
return true;
|
|
167
|
+
if (!(other instanceof Empty))
|
|
168
|
+
return false;
|
|
169
|
+
other instanceof Empty || THROW_CCE();
|
|
170
|
+
return true;
|
|
171
|
+
};
|
|
172
|
+
var Empty_instance;
|
|
173
|
+
function Empty_getInstance() {
|
|
174
|
+
return Empty_instance;
|
|
175
|
+
}
|
|
176
|
+
function Closed(cause) {
|
|
177
|
+
this.t1d_1 = cause;
|
|
178
|
+
}
|
|
179
|
+
protoOf(Closed).toString = function () {
|
|
180
|
+
return 'Closed(cause=' + toString(this.t1d_1) + ')';
|
|
181
|
+
};
|
|
182
|
+
protoOf(Closed).hashCode = function () {
|
|
183
|
+
return this.t1d_1 == null ? 0 : hashCode(this.t1d_1);
|
|
184
|
+
};
|
|
185
|
+
protoOf(Closed).equals = function (other) {
|
|
186
|
+
if (this === other)
|
|
187
|
+
return true;
|
|
188
|
+
if (!(other instanceof Closed))
|
|
189
|
+
return false;
|
|
190
|
+
var tmp0_other_with_cast = other instanceof Closed ? other : THROW_CCE();
|
|
191
|
+
if (!equals(this.t1d_1, tmp0_other_with_cast.t1d_1))
|
|
192
|
+
return false;
|
|
193
|
+
return true;
|
|
194
|
+
};
|
|
195
|
+
function Task() {
|
|
196
|
+
}
|
|
197
|
+
function Read(continuation) {
|
|
198
|
+
this.y1d_1 = continuation;
|
|
199
|
+
}
|
|
200
|
+
protoOf(Read).u1d = function () {
|
|
201
|
+
return this.y1d_1;
|
|
202
|
+
};
|
|
203
|
+
protoOf(Read).v1d = function () {
|
|
204
|
+
return 'read';
|
|
205
|
+
};
|
|
206
|
+
function Write(continuation) {
|
|
207
|
+
this.z1d_1 = continuation;
|
|
208
|
+
}
|
|
209
|
+
protoOf(Write).u1d = function () {
|
|
210
|
+
return this.z1d_1;
|
|
211
|
+
};
|
|
212
|
+
protoOf(Write).v1d = function () {
|
|
213
|
+
return 'write';
|
|
214
|
+
};
|
|
120
215
|
function moveFlushToReadBuffer($this) {
|
|
121
216
|
// Inline function 'io.ktor.utils.io.locks.synchronized' call
|
|
122
|
-
$this.
|
|
123
|
-
$this.
|
|
124
|
-
$this.
|
|
125
|
-
resumeSlot
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
}
|
|
133
|
-
function sleepForWrite($this, $completion) {
|
|
134
|
-
var tmp = new $sleepForWriteCOROUTINE$3($this, $completion);
|
|
135
|
-
tmp.c9_1 = Unit_instance;
|
|
136
|
-
tmp.d9_1 = null;
|
|
137
|
-
return tmp.i9();
|
|
138
|
-
}
|
|
139
|
-
function resumeSlot($this) {
|
|
140
|
-
var tmp$ret$1;
|
|
141
|
-
$l$block: {
|
|
142
|
-
// Inline function 'kotlinx.atomicfu.getAndUpdate' call
|
|
143
|
-
var this_0 = $this.q1b_1;
|
|
144
|
-
while (true) {
|
|
145
|
-
var cur = this_0.kotlinx$atomicfu$value;
|
|
146
|
-
// Inline function 'io.ktor.utils.io.ByteChannel.resumeSlot.<anonymous>' call
|
|
147
|
-
var upd = cur instanceof ClosedSlot ? cur : null;
|
|
148
|
-
if (this_0.atomicfu$compareAndSet(cur, upd)) {
|
|
149
|
-
tmp$ret$1 = cur;
|
|
150
|
-
break $l$block;
|
|
151
|
-
}
|
|
152
|
-
}
|
|
217
|
+
$this.d1e_1;
|
|
218
|
+
$this.b1e_1.v1b($this.f1e_1);
|
|
219
|
+
$this.c1e_1 = 0;
|
|
220
|
+
// Inline function 'io.ktor.utils.io.ByteChannel.resumeSlot' call
|
|
221
|
+
var current = $this.e1e_1.kotlinx$atomicfu$value;
|
|
222
|
+
var tmp;
|
|
223
|
+
if (current instanceof Write) {
|
|
224
|
+
tmp = $this.e1e_1.atomicfu$compareAndSet(current, Empty_instance);
|
|
225
|
+
} else {
|
|
226
|
+
tmp = false;
|
|
153
227
|
}
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
null;
|
|
157
|
-
else {
|
|
158
|
-
// Inline function 'kotlin.coroutines.resume' call
|
|
159
|
-
// Inline function 'kotlin.Companion.success' call
|
|
160
|
-
var tmp$ret$2 = _Result___init__impl__xyqfz8(Unit_instance);
|
|
161
|
-
continuation.l9(tmp$ret$2);
|
|
228
|
+
if (tmp) {
|
|
229
|
+
current.w1d();
|
|
162
230
|
}
|
|
163
231
|
}
|
|
164
232
|
function closeSlot($this, cause) {
|
|
165
|
-
var closeContinuation = !(cause == null) ? new
|
|
166
|
-
var
|
|
167
|
-
|
|
168
|
-
if (tmp0_elvis_lhs == null) {
|
|
169
|
-
return Unit_instance;
|
|
170
|
-
} else {
|
|
171
|
-
tmp = tmp0_elvis_lhs;
|
|
172
|
-
}
|
|
173
|
-
var continuation = tmp;
|
|
174
|
-
if (continuation instanceof ClosedSlot)
|
|
233
|
+
var closeContinuation = !(cause == null) ? new Closed(cause) : Companion_getInstance().r1d_1;
|
|
234
|
+
var continuation = $this.e1e_1.atomicfu$getAndSet(closeContinuation);
|
|
235
|
+
if (!isInterface(continuation, Task))
|
|
175
236
|
return Unit_instance;
|
|
176
|
-
|
|
177
|
-
// Inline function 'kotlin.coroutines.resumeWithException' call
|
|
178
|
-
// Inline function 'kotlin.Companion.failure' call
|
|
179
|
-
var tmp$ret$0 = _Result___init__impl__xyqfz8(createFailure(cause));
|
|
180
|
-
continuation.l9(tmp$ret$0);
|
|
181
|
-
} else {
|
|
182
|
-
// Inline function 'kotlin.coroutines.resume' call
|
|
183
|
-
// Inline function 'kotlin.Companion.success' call
|
|
184
|
-
var tmp$ret$2 = _Result___init__impl__xyqfz8(Unit_instance);
|
|
185
|
-
continuation.l9(tmp$ret$2);
|
|
186
|
-
}
|
|
237
|
+
continuation.x1d(cause);
|
|
187
238
|
}
|
|
188
239
|
function $awaitContentCOROUTINE$0(_this__u8e3s4, min, resultContinuation) {
|
|
189
240
|
CoroutineImpl.call(this, resultContinuation);
|
|
190
|
-
this.
|
|
191
|
-
this.
|
|
241
|
+
this.q1e_1 = _this__u8e3s4;
|
|
242
|
+
this.r1e_1 = min;
|
|
192
243
|
}
|
|
193
|
-
protoOf($awaitContentCOROUTINE$0).
|
|
194
|
-
var suspendResult = this.
|
|
244
|
+
protoOf($awaitContentCOROUTINE$0).l9 = function () {
|
|
245
|
+
var suspendResult = this.f9_1;
|
|
195
246
|
$sm: do
|
|
196
247
|
try {
|
|
197
|
-
var tmp = this.
|
|
248
|
+
var tmp = this.d9_1;
|
|
198
249
|
switch (tmp) {
|
|
199
250
|
case 0:
|
|
200
|
-
this.
|
|
201
|
-
rethrowCloseCauseIfNeeded_1(this.
|
|
202
|
-
if (numberToLong(this.
|
|
251
|
+
this.e9_1 = 4;
|
|
252
|
+
rethrowCloseCauseIfNeeded_1(this.q1e_1);
|
|
253
|
+
if (numberToLong(this.q1e_1.c1e_1).z2(this.q1e_1.f1e_1.s()).e1(toLong(this.r1e_1)) >= 0)
|
|
203
254
|
return true;
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
return suspendResult;
|
|
208
|
-
}
|
|
209
|
-
|
|
255
|
+
var tmp_0 = this;
|
|
256
|
+
tmp_0.s1e_1 = this.q1e_1;
|
|
257
|
+
this.d9_1 = 1;
|
|
210
258
|
continue $sm;
|
|
211
259
|
case 1:
|
|
212
|
-
if (this.
|
|
213
|
-
|
|
260
|
+
if (!(numberToLong(this.q1e_1.c1e_1).z2(this.q1e_1.f1e_1.s()).e1(toLong(this.r1e_1)) < 0 && this.q1e_1.h1e_1.kotlinx$atomicfu$value == null)) {
|
|
261
|
+
this.d9_1 = 3;
|
|
262
|
+
continue $sm;
|
|
214
263
|
}
|
|
215
264
|
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
265
|
+
this.d9_1 = 2;
|
|
266
|
+
var cancellable = new CancellableContinuationImpl(intercepted(this), 1);
|
|
267
|
+
cancellable.yr();
|
|
268
|
+
l$ret$1: do {
|
|
269
|
+
var this_0 = this.s1e_1;
|
|
270
|
+
var slot = new Read(cancellable);
|
|
271
|
+
var previous = this_0.e1e_1.kotlinx$atomicfu$value;
|
|
272
|
+
if (!(previous instanceof Closed)) {
|
|
273
|
+
if (!this_0.e1e_1.atomicfu$compareAndSet(previous, slot)) {
|
|
274
|
+
slot.w1d();
|
|
275
|
+
break l$ret$1;
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
if (previous instanceof Read) {
|
|
279
|
+
previous.x1d(new ConcurrentIOException(slot.v1d()));
|
|
280
|
+
} else {
|
|
281
|
+
if (isInterface(previous, Task)) {
|
|
282
|
+
previous.w1d();
|
|
283
|
+
} else {
|
|
284
|
+
if (previous instanceof Closed) {
|
|
285
|
+
slot.x1d(previous.t1d_1);
|
|
286
|
+
break l$ret$1;
|
|
287
|
+
} else {
|
|
288
|
+
if (!equals(previous, Empty_instance)) {
|
|
289
|
+
noWhenBranchMatchedException();
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
if (!(numberToLong(this.q1e_1.c1e_1).z2(this.q1e_1.f1e_1.s()).e1(toLong(this.r1e_1)) < 0 && this.q1e_1.h1e_1.kotlinx$atomicfu$value == null)) {
|
|
295
|
+
var current = this_0.e1e_1.kotlinx$atomicfu$value;
|
|
296
|
+
var tmp_1;
|
|
297
|
+
if (current instanceof Read) {
|
|
298
|
+
tmp_1 = this_0.e1e_1.atomicfu$compareAndSet(current, Empty_instance);
|
|
299
|
+
} else {
|
|
300
|
+
tmp_1 = false;
|
|
301
|
+
}
|
|
302
|
+
if (tmp_1) {
|
|
303
|
+
current.w1d();
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
while (false);
|
|
308
|
+
suspendResult = returnIfSuspended(cancellable.gs(), this);
|
|
245
309
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
246
310
|
return suspendResult;
|
|
247
311
|
}
|
|
248
312
|
|
|
249
313
|
continue $sm;
|
|
250
|
-
case 1:
|
|
251
|
-
if (!this.c1d_1.k1b_1.atomicfu$compareAndSet(null, get_CLOSED()))
|
|
252
|
-
return Unit_instance;
|
|
253
|
-
closeSlot(this.c1d_1, null);
|
|
254
|
-
return Unit_instance;
|
|
255
314
|
case 2:
|
|
256
|
-
|
|
315
|
+
this.d9_1 = 1;
|
|
316
|
+
continue $sm;
|
|
317
|
+
case 3:
|
|
318
|
+
if (this.q1e_1.f1e_1.s().e1(new Long(1048576, 0)) < 0) {
|
|
319
|
+
moveFlushToReadBuffer(this.q1e_1);
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
return this.q1e_1.f1e_1.s().e1(toLong(this.r1e_1)) >= 0;
|
|
323
|
+
case 4:
|
|
324
|
+
throw this.g9_1;
|
|
257
325
|
}
|
|
258
326
|
} catch ($p) {
|
|
259
327
|
var e = $p;
|
|
260
|
-
if (this.
|
|
328
|
+
if (this.e9_1 === 4) {
|
|
261
329
|
throw e;
|
|
262
330
|
} else {
|
|
263
|
-
this.
|
|
264
|
-
this.
|
|
331
|
+
this.d9_1 = this.e9_1;
|
|
332
|
+
this.g9_1 = e;
|
|
265
333
|
}
|
|
266
334
|
}
|
|
267
335
|
while (true);
|
|
268
336
|
};
|
|
269
|
-
function $
|
|
337
|
+
function $flushCOROUTINE$1(_this__u8e3s4, resultContinuation) {
|
|
270
338
|
CoroutineImpl.call(this, resultContinuation);
|
|
271
|
-
this.
|
|
272
|
-
this.a1c_1 = min;
|
|
339
|
+
this.b1f_1 = _this__u8e3s4;
|
|
273
340
|
}
|
|
274
|
-
protoOf($
|
|
275
|
-
var suspendResult = this.
|
|
341
|
+
protoOf($flushCOROUTINE$1).l9 = function () {
|
|
342
|
+
var suspendResult = this.f9_1;
|
|
276
343
|
$sm: do
|
|
277
344
|
try {
|
|
278
|
-
var tmp = this.
|
|
345
|
+
var tmp = this.d9_1;
|
|
279
346
|
switch (tmp) {
|
|
280
347
|
case 0:
|
|
281
|
-
this.
|
|
282
|
-
this.
|
|
348
|
+
this.e9_1 = 4;
|
|
349
|
+
rethrowCloseCauseIfNeeded_1(this.b1f_1);
|
|
350
|
+
this.b1f_1.d1f();
|
|
351
|
+
if (this.b1f_1.c1e_1 < 1048576)
|
|
352
|
+
return Unit_instance;
|
|
353
|
+
var tmp_0 = this;
|
|
354
|
+
tmp_0.c1f_1 = this.b1f_1;
|
|
355
|
+
this.d9_1 = 1;
|
|
283
356
|
continue $sm;
|
|
284
357
|
case 1:
|
|
285
|
-
if (!(
|
|
286
|
-
this.
|
|
358
|
+
if (!(this.b1f_1.c1e_1 >= 1048576 && this.b1f_1.h1e_1.kotlinx$atomicfu$value == null)) {
|
|
359
|
+
this.d9_1 = 3;
|
|
287
360
|
continue $sm;
|
|
288
361
|
}
|
|
289
362
|
|
|
290
|
-
this.
|
|
363
|
+
this.d9_1 = 2;
|
|
291
364
|
var cancellable = new CancellableContinuationImpl(intercepted(this), 1);
|
|
292
|
-
cancellable.
|
|
365
|
+
cancellable.yr();
|
|
293
366
|
l$ret$1: do {
|
|
294
|
-
var this_0 = this.
|
|
295
|
-
var
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
367
|
+
var this_0 = this.c1f_1;
|
|
368
|
+
var slot = new Write(cancellable);
|
|
369
|
+
var previous = this_0.e1e_1.kotlinx$atomicfu$value;
|
|
370
|
+
if (!(previous instanceof Closed)) {
|
|
371
|
+
if (!this_0.e1e_1.atomicfu$compareAndSet(previous, slot)) {
|
|
372
|
+
slot.w1d();
|
|
373
|
+
break l$ret$1;
|
|
374
|
+
}
|
|
299
375
|
}
|
|
300
|
-
if (
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
376
|
+
if (previous instanceof Write) {
|
|
377
|
+
previous.x1d(new ConcurrentIOException(slot.v1d()));
|
|
378
|
+
} else {
|
|
379
|
+
if (isInterface(previous, Task)) {
|
|
380
|
+
previous.w1d();
|
|
381
|
+
} else {
|
|
382
|
+
if (previous instanceof Closed) {
|
|
383
|
+
slot.x1d(previous.t1d_1);
|
|
384
|
+
break l$ret$1;
|
|
385
|
+
} else {
|
|
386
|
+
if (!equals(previous, Empty_instance)) {
|
|
387
|
+
noWhenBranchMatchedException();
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
if (!(this.b1f_1.c1e_1 >= 1048576 && this.b1f_1.h1e_1.kotlinx$atomicfu$value == null)) {
|
|
393
|
+
var current = this_0.e1e_1.kotlinx$atomicfu$value;
|
|
394
|
+
var tmp_1;
|
|
395
|
+
if (current instanceof Write) {
|
|
396
|
+
tmp_1 = this_0.e1e_1.atomicfu$compareAndSet(current, Empty_instance);
|
|
397
|
+
} else {
|
|
398
|
+
tmp_1 = false;
|
|
399
|
+
}
|
|
400
|
+
if (tmp_1) {
|
|
401
|
+
current.w1d();
|
|
306
402
|
}
|
|
307
403
|
}
|
|
308
404
|
}
|
|
309
405
|
while (false);
|
|
310
|
-
suspendResult = returnIfSuspended(cancellable.
|
|
406
|
+
suspendResult = returnIfSuspended(cancellable.gs(), this);
|
|
311
407
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
312
408
|
return suspendResult;
|
|
313
409
|
}
|
|
314
410
|
|
|
315
411
|
continue $sm;
|
|
316
412
|
case 2:
|
|
317
|
-
this.
|
|
413
|
+
this.d9_1 = 1;
|
|
318
414
|
continue $sm;
|
|
319
415
|
case 3:
|
|
320
|
-
throw this.d9_1;
|
|
321
|
-
case 4:
|
|
322
416
|
return Unit_instance;
|
|
417
|
+
case 4:
|
|
418
|
+
throw this.g9_1;
|
|
323
419
|
}
|
|
324
420
|
} catch ($p) {
|
|
325
421
|
var e = $p;
|
|
326
|
-
if (this.
|
|
422
|
+
if (this.e9_1 === 4) {
|
|
327
423
|
throw e;
|
|
328
424
|
} else {
|
|
329
|
-
this.
|
|
330
|
-
this.
|
|
425
|
+
this.d9_1 = this.e9_1;
|
|
426
|
+
this.g9_1 = e;
|
|
331
427
|
}
|
|
332
428
|
}
|
|
333
429
|
while (true);
|
|
334
430
|
};
|
|
335
|
-
function $
|
|
431
|
+
function $flushAndCloseCOROUTINE$2(_this__u8e3s4, resultContinuation) {
|
|
336
432
|
CoroutineImpl.call(this, resultContinuation);
|
|
337
|
-
this.
|
|
433
|
+
this.m1f_1 = _this__u8e3s4;
|
|
338
434
|
}
|
|
339
|
-
protoOf($
|
|
340
|
-
var suspendResult = this.
|
|
435
|
+
protoOf($flushAndCloseCOROUTINE$2).l9 = function () {
|
|
436
|
+
var suspendResult = this.f9_1;
|
|
341
437
|
$sm: do
|
|
342
438
|
try {
|
|
343
|
-
var tmp = this.
|
|
439
|
+
var tmp = this.d9_1;
|
|
344
440
|
switch (tmp) {
|
|
345
441
|
case 0:
|
|
346
|
-
this.
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
var cancellable = new CancellableContinuationImpl(intercepted(this), 1);
|
|
357
|
-
cancellable.ar();
|
|
358
|
-
l$ret$1: do {
|
|
359
|
-
var this_0 = this.j1c_1;
|
|
360
|
-
var published = this_0.q1b_1.atomicfu$compareAndSet(null, cancellable);
|
|
361
|
-
if (!published) {
|
|
362
|
-
cancellable.l9(_Result___init__impl__xyqfz8(Unit_instance));
|
|
363
|
-
break l$ret$1;
|
|
364
|
-
}
|
|
365
|
-
if (!(this.j1c_1.m1b_1 >= CHANNEL_MAX_SIZE)) {
|
|
366
|
-
var tmp4_safe_receiver = this_0.q1b_1.atomicfu$getAndSet(null);
|
|
367
|
-
if (tmp4_safe_receiver == null)
|
|
368
|
-
null;
|
|
369
|
-
else {
|
|
370
|
-
tmp4_safe_receiver.l9(_Result___init__impl__xyqfz8(Unit_instance));
|
|
371
|
-
}
|
|
372
|
-
}
|
|
373
|
-
}
|
|
374
|
-
while (false);
|
|
375
|
-
suspendResult = returnIfSuspended(cancellable.hr(), this);
|
|
442
|
+
this.e9_1 = 4;
|
|
443
|
+
var tmp_0 = this;
|
|
444
|
+
tmp_0.n1f_1 = this.m1f_1;
|
|
445
|
+
this.e9_1 = 2;
|
|
446
|
+
var tmp_1 = this;
|
|
447
|
+
tmp_1.p1f_1 = Companion_instance;
|
|
448
|
+
var tmp_2 = this;
|
|
449
|
+
tmp_2.q1f_1 = this.n1f_1;
|
|
450
|
+
this.d9_1 = 1;
|
|
451
|
+
suspendResult = this.q1f_1.r1f(this);
|
|
376
452
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
377
453
|
return suspendResult;
|
|
378
454
|
}
|
|
379
455
|
|
|
380
456
|
continue $sm;
|
|
381
|
-
case
|
|
382
|
-
this.
|
|
457
|
+
case 1:
|
|
458
|
+
this.o1f_1 = _Result___init__impl__xyqfz8(Unit_instance);
|
|
459
|
+
this.e9_1 = 4;
|
|
460
|
+
this.d9_1 = 3;
|
|
383
461
|
continue $sm;
|
|
462
|
+
case 2:
|
|
463
|
+
this.e9_1 = 4;
|
|
464
|
+
var tmp_3 = this.g9_1;
|
|
465
|
+
if (tmp_3 instanceof Error) {
|
|
466
|
+
var e = this.g9_1;
|
|
467
|
+
var tmp_4 = this;
|
|
468
|
+
tmp_4.o1f_1 = _Result___init__impl__xyqfz8(createFailure(e));
|
|
469
|
+
this.d9_1 = 3;
|
|
470
|
+
continue $sm;
|
|
471
|
+
} else {
|
|
472
|
+
throw this.g9_1;
|
|
473
|
+
}
|
|
474
|
+
|
|
384
475
|
case 3:
|
|
476
|
+
this.e9_1 = 4;
|
|
477
|
+
if (!this.m1f_1.h1e_1.atomicfu$compareAndSet(null, get_CLOSED()))
|
|
478
|
+
return Unit_instance;
|
|
479
|
+
closeSlot(this.m1f_1, null);
|
|
385
480
|
return Unit_instance;
|
|
386
481
|
case 4:
|
|
387
|
-
throw this.
|
|
482
|
+
throw this.g9_1;
|
|
388
483
|
}
|
|
389
484
|
} catch ($p) {
|
|
390
|
-
var
|
|
391
|
-
if (this.
|
|
392
|
-
throw
|
|
485
|
+
var e_0 = $p;
|
|
486
|
+
if (this.e9_1 === 4) {
|
|
487
|
+
throw e_0;
|
|
393
488
|
} else {
|
|
394
|
-
this.
|
|
395
|
-
this.
|
|
489
|
+
this.d9_1 = this.e9_1;
|
|
490
|
+
this.g9_1 = e_0;
|
|
396
491
|
}
|
|
397
492
|
}
|
|
398
493
|
while (true);
|
|
399
494
|
};
|
|
400
495
|
function ByteChannel(autoFlush) {
|
|
401
496
|
autoFlush = autoFlush === VOID ? false : autoFlush;
|
|
402
|
-
this.
|
|
403
|
-
this.
|
|
404
|
-
this.
|
|
405
|
-
this.
|
|
406
|
-
this.
|
|
407
|
-
this.
|
|
408
|
-
this.
|
|
409
|
-
this.
|
|
410
|
-
}
|
|
411
|
-
protoOf(ByteChannel).
|
|
412
|
-
var tmp0_safe_receiver = this.
|
|
497
|
+
this.a1e_1 = autoFlush;
|
|
498
|
+
this.b1e_1 = new Buffer();
|
|
499
|
+
this.c1e_1 = 0;
|
|
500
|
+
this.d1e_1 = new Object();
|
|
501
|
+
this.e1e_1 = atomic$ref$1(Empty_instance);
|
|
502
|
+
this.f1e_1 = new Buffer();
|
|
503
|
+
this.g1e_1 = new Buffer();
|
|
504
|
+
this.h1e_1 = atomic$ref$1(null);
|
|
505
|
+
}
|
|
506
|
+
protoOf(ByteChannel).s1f = function () {
|
|
507
|
+
var tmp0_safe_receiver = this.t1f();
|
|
413
508
|
if (tmp0_safe_receiver == null)
|
|
414
509
|
null;
|
|
415
510
|
else {
|
|
@@ -417,75 +512,88 @@
|
|
|
417
512
|
// Inline function 'kotlin.contracts.contract' call
|
|
418
513
|
throw tmp0_safe_receiver;
|
|
419
514
|
}
|
|
420
|
-
if (this.
|
|
515
|
+
if (this.f1e_1.t1a()) {
|
|
421
516
|
moveFlushToReadBuffer(this);
|
|
422
517
|
}
|
|
423
|
-
return this.
|
|
518
|
+
return this.f1e_1;
|
|
424
519
|
};
|
|
425
|
-
protoOf(ByteChannel).
|
|
426
|
-
var
|
|
427
|
-
if (
|
|
520
|
+
protoOf(ByteChannel).u1f = function () {
|
|
521
|
+
var tmp0_safe_receiver = this.t1f();
|
|
522
|
+
if (tmp0_safe_receiver == null)
|
|
428
523
|
null;
|
|
429
524
|
else {
|
|
430
525
|
// Inline function 'kotlin.let' call
|
|
431
526
|
// Inline function 'kotlin.contracts.contract' call
|
|
432
|
-
throw
|
|
527
|
+
throw tmp0_safe_receiver;
|
|
433
528
|
}
|
|
434
|
-
if (this.
|
|
529
|
+
if (this.v1f()) {
|
|
435
530
|
throw IOException_init_$Create$('Channel is closed for write');
|
|
436
531
|
}
|
|
437
|
-
return this.
|
|
532
|
+
return this.g1e_1;
|
|
438
533
|
};
|
|
439
|
-
protoOf(ByteChannel).
|
|
440
|
-
var
|
|
441
|
-
return
|
|
534
|
+
protoOf(ByteChannel).t1f = function () {
|
|
535
|
+
var tmp0_safe_receiver = this.h1e_1.kotlinx$atomicfu$value;
|
|
536
|
+
return tmp0_safe_receiver == null ? null : tmp0_safe_receiver.u9();
|
|
442
537
|
};
|
|
443
|
-
protoOf(ByteChannel).
|
|
444
|
-
return !(this.
|
|
538
|
+
protoOf(ByteChannel).v1f = function () {
|
|
539
|
+
return !(this.h1e_1.kotlinx$atomicfu$value == null);
|
|
445
540
|
};
|
|
446
|
-
protoOf(ByteChannel).
|
|
447
|
-
return !(this.
|
|
541
|
+
protoOf(ByteChannel).x1f = function () {
|
|
542
|
+
return !(this.t1f() == null) || (this.v1f() && this.c1e_1 === 0 && this.f1e_1.t1a());
|
|
448
543
|
};
|
|
449
|
-
protoOf(ByteChannel).
|
|
544
|
+
protoOf(ByteChannel).y1f = function (min, $completion) {
|
|
450
545
|
var tmp = new $awaitContentCOROUTINE$0(this, min, $completion);
|
|
451
|
-
tmp.
|
|
452
|
-
tmp.
|
|
453
|
-
return tmp.
|
|
454
|
-
};
|
|
455
|
-
protoOf(ByteChannel).
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
if (this.p1b_1.o19())
|
|
546
|
+
tmp.f9_1 = Unit_instance;
|
|
547
|
+
tmp.g9_1 = null;
|
|
548
|
+
return tmp.l9();
|
|
549
|
+
};
|
|
550
|
+
protoOf(ByteChannel).r1f = function ($completion) {
|
|
551
|
+
var tmp = new $flushCOROUTINE$1(this, $completion);
|
|
552
|
+
tmp.f9_1 = Unit_instance;
|
|
553
|
+
tmp.g9_1 = null;
|
|
554
|
+
return tmp.l9();
|
|
555
|
+
};
|
|
556
|
+
protoOf(ByteChannel).d1f = function () {
|
|
557
|
+
if (this.g1e_1.t1a())
|
|
464
558
|
return Unit_instance;
|
|
465
559
|
// Inline function 'io.ktor.utils.io.locks.synchronized' call
|
|
466
|
-
this.
|
|
467
|
-
var count = this.
|
|
468
|
-
this.
|
|
469
|
-
this.
|
|
470
|
-
resumeSlot
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
560
|
+
this.d1e_1;
|
|
561
|
+
var count = this.g1e_1.s().j1();
|
|
562
|
+
this.b1e_1.j1c(this.g1e_1);
|
|
563
|
+
this.c1e_1 = this.c1e_1 + count | 0;
|
|
564
|
+
// Inline function 'io.ktor.utils.io.ByteChannel.resumeSlot' call
|
|
565
|
+
var current = this.e1e_1.kotlinx$atomicfu$value;
|
|
566
|
+
var tmp;
|
|
567
|
+
if (current instanceof Read) {
|
|
568
|
+
tmp = this.e1e_1.atomicfu$compareAndSet(current, Empty_instance);
|
|
569
|
+
} else {
|
|
570
|
+
tmp = false;
|
|
571
|
+
}
|
|
572
|
+
if (tmp) {
|
|
573
|
+
current.w1d();
|
|
574
|
+
}
|
|
575
|
+
};
|
|
576
|
+
protoOf(ByteChannel).a1g = function ($completion) {
|
|
577
|
+
var tmp = new $flushAndCloseCOROUTINE$2(this, $completion);
|
|
578
|
+
tmp.f9_1 = Unit_instance;
|
|
579
|
+
tmp.g9_1 = null;
|
|
580
|
+
return tmp.l9();
|
|
581
|
+
};
|
|
582
|
+
protoOf(ByteChannel).b1g = function (cause) {
|
|
583
|
+
if (!(this.h1e_1.kotlinx$atomicfu$value == null))
|
|
480
584
|
return Unit_instance;
|
|
481
585
|
var closedToken = new CloseToken(cause);
|
|
482
|
-
this.
|
|
483
|
-
var actualCause = closedToken.
|
|
586
|
+
this.h1e_1.atomicfu$compareAndSet(null, closedToken);
|
|
587
|
+
var actualCause = closedToken.u9();
|
|
484
588
|
closeSlot(this, actualCause);
|
|
485
589
|
};
|
|
486
590
|
protoOf(ByteChannel).toString = function () {
|
|
487
591
|
return 'ByteChannel[' + hashCode(this) + ']';
|
|
488
592
|
};
|
|
593
|
+
function ConcurrentIOException(taskName) {
|
|
594
|
+
IllegalStateException_init_$Init$('Concurrent ' + taskName + ' attempts', this);
|
|
595
|
+
captureStack(this, ConcurrentIOException);
|
|
596
|
+
}
|
|
489
597
|
function ByteReadChannel(content, offset, length) {
|
|
490
598
|
offset = offset === VOID ? 0 : offset;
|
|
491
599
|
length = length === VOID ? content.length : length;
|
|
@@ -493,7 +601,7 @@
|
|
|
493
601
|
var this_0 = new Buffer();
|
|
494
602
|
// Inline function 'kotlin.contracts.contract' call
|
|
495
603
|
// Inline function 'io.ktor.utils.io.ByteReadChannel.<anonymous>' call
|
|
496
|
-
this_0.
|
|
604
|
+
this_0.b1c(content, offset, offset + length | 0);
|
|
497
605
|
var source = this_0;
|
|
498
606
|
return ByteReadChannel_0(source);
|
|
499
607
|
}
|
|
@@ -501,298 +609,298 @@
|
|
|
501
609
|
return new SourceByteReadChannel(source);
|
|
502
610
|
}
|
|
503
611
|
function ByteReadChannel$Companion$Empty$1() {
|
|
504
|
-
this.
|
|
505
|
-
this.
|
|
612
|
+
this.c1g_1 = null;
|
|
613
|
+
this.d1g_1 = new Buffer();
|
|
506
614
|
}
|
|
507
|
-
protoOf(ByteReadChannel$Companion$Empty$1).
|
|
508
|
-
return this.
|
|
615
|
+
protoOf(ByteReadChannel$Companion$Empty$1).t1f = function () {
|
|
616
|
+
return this.c1g_1;
|
|
509
617
|
};
|
|
510
|
-
protoOf(ByteReadChannel$Companion$Empty$1).
|
|
618
|
+
protoOf(ByteReadChannel$Companion$Empty$1).x1f = function () {
|
|
511
619
|
return true;
|
|
512
620
|
};
|
|
513
|
-
protoOf(ByteReadChannel$Companion$Empty$1).
|
|
514
|
-
return this.
|
|
621
|
+
protoOf(ByteReadChannel$Companion$Empty$1).s1f = function () {
|
|
622
|
+
return this.d1g_1;
|
|
515
623
|
};
|
|
516
|
-
protoOf(ByteReadChannel$Companion$Empty$1).
|
|
624
|
+
protoOf(ByteReadChannel$Companion$Empty$1).y1f = function (min, $completion) {
|
|
517
625
|
return false;
|
|
518
626
|
};
|
|
519
|
-
protoOf(ByteReadChannel$Companion$Empty$1).
|
|
627
|
+
protoOf(ByteReadChannel$Companion$Empty$1).b1g = function (cause) {
|
|
520
628
|
};
|
|
521
|
-
function
|
|
522
|
-
|
|
629
|
+
function Companion_0() {
|
|
630
|
+
Companion_instance_1 = this;
|
|
523
631
|
var tmp = this;
|
|
524
|
-
tmp.
|
|
632
|
+
tmp.e1g_1 = new ByteReadChannel$Companion$Empty$1();
|
|
525
633
|
}
|
|
526
|
-
var
|
|
527
|
-
function
|
|
528
|
-
if (
|
|
529
|
-
new
|
|
530
|
-
return
|
|
634
|
+
var Companion_instance_1;
|
|
635
|
+
function Companion_getInstance_0() {
|
|
636
|
+
if (Companion_instance_1 == null)
|
|
637
|
+
new Companion_0();
|
|
638
|
+
return Companion_instance_1;
|
|
531
639
|
}
|
|
532
640
|
function ByteReadChannel_1() {
|
|
533
641
|
}
|
|
534
642
|
function cancel_0(_this__u8e3s4) {
|
|
535
|
-
_this__u8e3s4.
|
|
643
|
+
_this__u8e3s4.b1g(IOException_init_$Create$('Channel was cancelled'));
|
|
536
644
|
}
|
|
537
645
|
function readRemaining(_this__u8e3s4, $completion) {
|
|
538
|
-
var tmp = new $readRemainingCOROUTINE$
|
|
539
|
-
tmp.
|
|
540
|
-
tmp.
|
|
541
|
-
return tmp.
|
|
646
|
+
var tmp = new $readRemainingCOROUTINE$3(_this__u8e3s4, $completion);
|
|
647
|
+
tmp.f9_1 = Unit_instance;
|
|
648
|
+
tmp.g9_1 = null;
|
|
649
|
+
return tmp.l9();
|
|
542
650
|
}
|
|
543
651
|
function get_availableForRead(_this__u8e3s4) {
|
|
544
|
-
return _this__u8e3s4.
|
|
652
|
+
return _this__u8e3s4.s1f().s1a().s().j1();
|
|
545
653
|
}
|
|
546
654
|
function readPacket(_this__u8e3s4, packet, $completion) {
|
|
547
|
-
var tmp = new $readPacketCOROUTINE$
|
|
548
|
-
tmp.
|
|
549
|
-
tmp.
|
|
550
|
-
return tmp.
|
|
655
|
+
var tmp = new $readPacketCOROUTINE$4(_this__u8e3s4, packet, $completion);
|
|
656
|
+
tmp.f9_1 = Unit_instance;
|
|
657
|
+
tmp.g9_1 = null;
|
|
658
|
+
return tmp.l9();
|
|
551
659
|
}
|
|
552
660
|
function readAvailable(_this__u8e3s4, buffer, offset, length, $completion) {
|
|
553
661
|
offset = offset === VOID ? 0 : offset;
|
|
554
662
|
length = length === VOID ? buffer.length - offset | 0 : length;
|
|
555
|
-
var tmp = new $readAvailableCOROUTINE$
|
|
556
|
-
tmp.
|
|
557
|
-
tmp.
|
|
558
|
-
return tmp.
|
|
663
|
+
var tmp = new $readAvailableCOROUTINE$7(_this__u8e3s4, buffer, offset, length, $completion);
|
|
664
|
+
tmp.f9_1 = Unit_instance;
|
|
665
|
+
tmp.g9_1 = null;
|
|
666
|
+
return tmp.l9();
|
|
559
667
|
}
|
|
560
668
|
function toByteArray(_this__u8e3s4, $completion) {
|
|
561
|
-
var tmp = new $toByteArrayCOROUTINE$
|
|
562
|
-
tmp.
|
|
563
|
-
tmp.
|
|
564
|
-
return tmp.
|
|
669
|
+
var tmp = new $toByteArrayCOROUTINE$9(_this__u8e3s4, $completion);
|
|
670
|
+
tmp.f9_1 = Unit_instance;
|
|
671
|
+
tmp.g9_1 = null;
|
|
672
|
+
return tmp.l9();
|
|
565
673
|
}
|
|
566
674
|
function copyTo(_this__u8e3s4, channel, limit, $completion) {
|
|
567
|
-
var tmp = new $copyToCOROUTINE$
|
|
568
|
-
tmp.
|
|
569
|
-
tmp.
|
|
570
|
-
return tmp.
|
|
675
|
+
var tmp = new $copyToCOROUTINE$10(_this__u8e3s4, channel, limit, $completion);
|
|
676
|
+
tmp.f9_1 = Unit_instance;
|
|
677
|
+
tmp.g9_1 = null;
|
|
678
|
+
return tmp.l9();
|
|
571
679
|
}
|
|
572
680
|
function rethrowCloseCauseIfNeeded(_this__u8e3s4) {
|
|
573
|
-
var
|
|
574
|
-
if (
|
|
681
|
+
var tmp0_safe_receiver = _this__u8e3s4.t1f();
|
|
682
|
+
if (tmp0_safe_receiver == null)
|
|
575
683
|
null;
|
|
576
684
|
else {
|
|
577
685
|
// Inline function 'kotlin.let' call
|
|
578
686
|
// Inline function 'kotlin.contracts.contract' call
|
|
579
|
-
throw
|
|
687
|
+
throw tmp0_safe_receiver;
|
|
580
688
|
}
|
|
581
689
|
}
|
|
582
690
|
function readBuffer(_this__u8e3s4, $completion) {
|
|
583
|
-
var tmp = new $readBufferCOROUTINE$
|
|
584
|
-
tmp.
|
|
585
|
-
tmp.
|
|
586
|
-
return tmp.
|
|
691
|
+
var tmp = new $readBufferCOROUTINE$12(_this__u8e3s4, $completion);
|
|
692
|
+
tmp.f9_1 = Unit_instance;
|
|
693
|
+
tmp.g9_1 = null;
|
|
694
|
+
return tmp.l9();
|
|
587
695
|
}
|
|
588
696
|
function rethrowCloseCauseIfNeeded_0(_this__u8e3s4) {
|
|
589
|
-
var
|
|
590
|
-
if (
|
|
697
|
+
var tmp0_safe_receiver = _this__u8e3s4.t1f();
|
|
698
|
+
if (tmp0_safe_receiver == null)
|
|
591
699
|
null;
|
|
592
700
|
else {
|
|
593
701
|
// Inline function 'kotlin.let' call
|
|
594
702
|
// Inline function 'kotlin.contracts.contract' call
|
|
595
|
-
throw
|
|
703
|
+
throw tmp0_safe_receiver;
|
|
596
704
|
}
|
|
597
705
|
}
|
|
598
706
|
function rethrowCloseCauseIfNeeded_1(_this__u8e3s4) {
|
|
599
|
-
var
|
|
600
|
-
if (
|
|
707
|
+
var tmp0_safe_receiver = _this__u8e3s4.t1f();
|
|
708
|
+
if (tmp0_safe_receiver == null)
|
|
601
709
|
null;
|
|
602
710
|
else {
|
|
603
711
|
// Inline function 'kotlin.let' call
|
|
604
712
|
// Inline function 'kotlin.contracts.contract' call
|
|
605
|
-
throw
|
|
713
|
+
throw tmp0_safe_receiver;
|
|
606
714
|
}
|
|
607
715
|
}
|
|
608
|
-
function $readRemainingCOROUTINE$
|
|
716
|
+
function $readRemainingCOROUTINE$3(_this__u8e3s4, resultContinuation) {
|
|
609
717
|
CoroutineImpl.call(this, resultContinuation);
|
|
610
|
-
this.
|
|
718
|
+
this.n1g_1 = _this__u8e3s4;
|
|
611
719
|
}
|
|
612
|
-
protoOf($readRemainingCOROUTINE$
|
|
613
|
-
var suspendResult = this.
|
|
720
|
+
protoOf($readRemainingCOROUTINE$3).l9 = function () {
|
|
721
|
+
var suspendResult = this.f9_1;
|
|
614
722
|
$sm: do
|
|
615
723
|
try {
|
|
616
|
-
var tmp = this.
|
|
724
|
+
var tmp = this.d9_1;
|
|
617
725
|
switch (tmp) {
|
|
618
726
|
case 0:
|
|
619
|
-
this.
|
|
620
|
-
this.
|
|
621
|
-
this.
|
|
727
|
+
this.e9_1 = 4;
|
|
728
|
+
this.o1g_1 = BytePacketBuilder();
|
|
729
|
+
this.d9_1 = 1;
|
|
622
730
|
continue $sm;
|
|
623
731
|
case 1:
|
|
624
|
-
if (!!this.
|
|
625
|
-
this.
|
|
732
|
+
if (!!this.n1g_1.x1f()) {
|
|
733
|
+
this.d9_1 = 3;
|
|
626
734
|
continue $sm;
|
|
627
735
|
}
|
|
628
736
|
|
|
629
|
-
this.
|
|
630
|
-
this.
|
|
631
|
-
suspendResult = this.
|
|
737
|
+
this.o1g_1.j1c(this.n1g_1.s1f());
|
|
738
|
+
this.d9_1 = 2;
|
|
739
|
+
suspendResult = this.n1g_1.z1f(VOID, this);
|
|
632
740
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
633
741
|
return suspendResult;
|
|
634
742
|
}
|
|
635
743
|
|
|
636
744
|
continue $sm;
|
|
637
745
|
case 2:
|
|
638
|
-
this.
|
|
746
|
+
this.d9_1 = 1;
|
|
639
747
|
continue $sm;
|
|
640
748
|
case 3:
|
|
641
|
-
rethrowCloseCauseIfNeeded(this.
|
|
642
|
-
return this.
|
|
749
|
+
rethrowCloseCauseIfNeeded(this.n1g_1);
|
|
750
|
+
return this.o1g_1.s1a();
|
|
643
751
|
case 4:
|
|
644
|
-
throw this.
|
|
752
|
+
throw this.g9_1;
|
|
645
753
|
}
|
|
646
754
|
} catch ($p) {
|
|
647
755
|
var e = $p;
|
|
648
|
-
if (this.
|
|
756
|
+
if (this.e9_1 === 4) {
|
|
649
757
|
throw e;
|
|
650
758
|
} else {
|
|
651
|
-
this.
|
|
652
|
-
this.
|
|
759
|
+
this.d9_1 = this.e9_1;
|
|
760
|
+
this.g9_1 = e;
|
|
653
761
|
}
|
|
654
762
|
}
|
|
655
763
|
while (true);
|
|
656
764
|
};
|
|
657
|
-
function $readPacketCOROUTINE$
|
|
765
|
+
function $readPacketCOROUTINE$4(_this__u8e3s4, packet, resultContinuation) {
|
|
658
766
|
CoroutineImpl.call(this, resultContinuation);
|
|
659
|
-
this.
|
|
660
|
-
this.
|
|
767
|
+
this.x1g_1 = _this__u8e3s4;
|
|
768
|
+
this.y1g_1 = packet;
|
|
661
769
|
}
|
|
662
|
-
protoOf($readPacketCOROUTINE$
|
|
663
|
-
var suspendResult = this.
|
|
770
|
+
protoOf($readPacketCOROUTINE$4).l9 = function () {
|
|
771
|
+
var suspendResult = this.f9_1;
|
|
664
772
|
$sm: do
|
|
665
773
|
try {
|
|
666
|
-
var tmp = this.
|
|
774
|
+
var tmp = this.d9_1;
|
|
667
775
|
switch (tmp) {
|
|
668
776
|
case 0:
|
|
669
|
-
this.
|
|
670
|
-
this.
|
|
671
|
-
this.
|
|
777
|
+
this.e9_1 = 6;
|
|
778
|
+
this.z1g_1 = new Buffer();
|
|
779
|
+
this.d9_1 = 1;
|
|
672
780
|
continue $sm;
|
|
673
781
|
case 1:
|
|
674
|
-
if (!(this.
|
|
675
|
-
this.
|
|
782
|
+
if (!(this.z1g_1.s().e1(toLong(this.y1g_1)) < 0)) {
|
|
783
|
+
this.d9_1 = 5;
|
|
676
784
|
continue $sm;
|
|
677
785
|
}
|
|
678
786
|
|
|
679
|
-
if (this.
|
|
680
|
-
this.
|
|
681
|
-
suspendResult = this.
|
|
787
|
+
if (this.x1g_1.s1f().t1a()) {
|
|
788
|
+
this.d9_1 = 2;
|
|
789
|
+
suspendResult = this.x1g_1.z1f(VOID, this);
|
|
682
790
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
683
791
|
return suspendResult;
|
|
684
792
|
}
|
|
685
793
|
continue $sm;
|
|
686
794
|
} else {
|
|
687
|
-
this.
|
|
795
|
+
this.d9_1 = 3;
|
|
688
796
|
continue $sm;
|
|
689
797
|
}
|
|
690
798
|
|
|
691
799
|
case 2:
|
|
692
|
-
this.
|
|
800
|
+
this.d9_1 = 3;
|
|
693
801
|
continue $sm;
|
|
694
802
|
case 3:
|
|
695
|
-
if (this.
|
|
696
|
-
this.
|
|
803
|
+
if (this.x1g_1.x1f()) {
|
|
804
|
+
this.d9_1 = 5;
|
|
697
805
|
continue $sm;
|
|
698
806
|
} else {
|
|
699
|
-
this.
|
|
807
|
+
this.d9_1 = 4;
|
|
700
808
|
continue $sm;
|
|
701
809
|
}
|
|
702
810
|
|
|
703
811
|
case 4:
|
|
704
|
-
if (get_remaining(this.
|
|
705
|
-
this.
|
|
812
|
+
if (get_remaining(this.x1g_1.s1f()).e1(numberToLong(this.y1g_1).a3(this.z1g_1.s())) > 0) {
|
|
813
|
+
this.x1g_1.s1f().u1b(this.z1g_1, numberToLong(this.y1g_1).a3(this.z1g_1.s()));
|
|
706
814
|
} else {
|
|
707
|
-
this.
|
|
815
|
+
this.x1g_1.s1f().v1b(this.z1g_1);
|
|
708
816
|
}
|
|
709
817
|
|
|
710
|
-
this.
|
|
818
|
+
this.d9_1 = 1;
|
|
711
819
|
continue $sm;
|
|
712
820
|
case 5:
|
|
713
|
-
if (this.
|
|
714
|
-
throw EOFException_init_$Create$('Not enough data available, required ' + this.
|
|
821
|
+
if (this.z1g_1.s().e1(toLong(this.y1g_1)) < 0) {
|
|
822
|
+
throw EOFException_init_$Create$('Not enough data available, required ' + this.y1g_1 + ' bytes but only ' + this.z1g_1.s().toString() + ' available');
|
|
715
823
|
}
|
|
716
824
|
|
|
717
|
-
return this.
|
|
825
|
+
return this.z1g_1;
|
|
718
826
|
case 6:
|
|
719
|
-
throw this.
|
|
827
|
+
throw this.g9_1;
|
|
720
828
|
}
|
|
721
829
|
} catch ($p) {
|
|
722
830
|
var e = $p;
|
|
723
|
-
if (this.
|
|
831
|
+
if (this.e9_1 === 6) {
|
|
724
832
|
throw e;
|
|
725
833
|
} else {
|
|
726
|
-
this.
|
|
727
|
-
this.
|
|
834
|
+
this.d9_1 = this.e9_1;
|
|
835
|
+
this.g9_1 = e;
|
|
728
836
|
}
|
|
729
837
|
}
|
|
730
838
|
while (true);
|
|
731
839
|
};
|
|
732
|
-
function $readAvailableCOROUTINE$
|
|
840
|
+
function $readAvailableCOROUTINE$7(_this__u8e3s4, buffer, offset, length, resultContinuation) {
|
|
733
841
|
CoroutineImpl.call(this, resultContinuation);
|
|
734
|
-
this.
|
|
735
|
-
this.
|
|
736
|
-
this.
|
|
737
|
-
this.
|
|
842
|
+
this.i1h_1 = _this__u8e3s4;
|
|
843
|
+
this.j1h_1 = buffer;
|
|
844
|
+
this.k1h_1 = offset;
|
|
845
|
+
this.l1h_1 = length;
|
|
738
846
|
}
|
|
739
|
-
protoOf($readAvailableCOROUTINE$
|
|
740
|
-
var suspendResult = this.
|
|
847
|
+
protoOf($readAvailableCOROUTINE$7).l9 = function () {
|
|
848
|
+
var suspendResult = this.f9_1;
|
|
741
849
|
$sm: do
|
|
742
850
|
try {
|
|
743
|
-
var tmp = this.
|
|
851
|
+
var tmp = this.d9_1;
|
|
744
852
|
switch (tmp) {
|
|
745
853
|
case 0:
|
|
746
|
-
this.
|
|
747
|
-
if (this.
|
|
854
|
+
this.e9_1 = 3;
|
|
855
|
+
if (this.i1h_1.x1f())
|
|
748
856
|
return -1;
|
|
749
|
-
if (this.
|
|
750
|
-
this.
|
|
751
|
-
suspendResult = this.
|
|
857
|
+
if (this.i1h_1.s1f().t1a()) {
|
|
858
|
+
this.d9_1 = 1;
|
|
859
|
+
suspendResult = this.i1h_1.z1f(VOID, this);
|
|
752
860
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
753
861
|
return suspendResult;
|
|
754
862
|
}
|
|
755
863
|
continue $sm;
|
|
756
864
|
} else {
|
|
757
|
-
this.
|
|
865
|
+
this.d9_1 = 2;
|
|
758
866
|
continue $sm;
|
|
759
867
|
}
|
|
760
868
|
|
|
761
869
|
case 1:
|
|
762
|
-
this.
|
|
870
|
+
this.d9_1 = 2;
|
|
763
871
|
continue $sm;
|
|
764
872
|
case 2:
|
|
765
|
-
if (this.
|
|
873
|
+
if (this.i1h_1.x1f())
|
|
766
874
|
return -1;
|
|
767
|
-
return readAvailable_0(this.
|
|
875
|
+
return readAvailable_0(this.i1h_1.s1f(), this.j1h_1, this.k1h_1, this.l1h_1);
|
|
768
876
|
case 3:
|
|
769
|
-
throw this.
|
|
877
|
+
throw this.g9_1;
|
|
770
878
|
}
|
|
771
879
|
} catch ($p) {
|
|
772
880
|
var e = $p;
|
|
773
|
-
if (this.
|
|
881
|
+
if (this.e9_1 === 3) {
|
|
774
882
|
throw e;
|
|
775
883
|
} else {
|
|
776
|
-
this.
|
|
777
|
-
this.
|
|
884
|
+
this.d9_1 = this.e9_1;
|
|
885
|
+
this.g9_1 = e;
|
|
778
886
|
}
|
|
779
887
|
}
|
|
780
888
|
while (true);
|
|
781
889
|
};
|
|
782
|
-
function $toByteArrayCOROUTINE$
|
|
890
|
+
function $toByteArrayCOROUTINE$9(_this__u8e3s4, resultContinuation) {
|
|
783
891
|
CoroutineImpl.call(this, resultContinuation);
|
|
784
|
-
this.
|
|
892
|
+
this.u1h_1 = _this__u8e3s4;
|
|
785
893
|
}
|
|
786
|
-
protoOf($toByteArrayCOROUTINE$
|
|
787
|
-
var suspendResult = this.
|
|
894
|
+
protoOf($toByteArrayCOROUTINE$9).l9 = function () {
|
|
895
|
+
var suspendResult = this.f9_1;
|
|
788
896
|
$sm: do
|
|
789
897
|
try {
|
|
790
|
-
var tmp = this.
|
|
898
|
+
var tmp = this.d9_1;
|
|
791
899
|
switch (tmp) {
|
|
792
900
|
case 0:
|
|
793
|
-
this.
|
|
794
|
-
this.
|
|
795
|
-
suspendResult = readBuffer(this.
|
|
901
|
+
this.e9_1 = 2;
|
|
902
|
+
this.d9_1 = 1;
|
|
903
|
+
suspendResult = readBuffer(this.u1h_1, this);
|
|
796
904
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
797
905
|
return suspendResult;
|
|
798
906
|
}
|
|
@@ -802,244 +910,244 @@
|
|
|
802
910
|
var ARGUMENT = suspendResult;
|
|
803
911
|
return readBytes(ARGUMENT);
|
|
804
912
|
case 2:
|
|
805
|
-
throw this.
|
|
913
|
+
throw this.g9_1;
|
|
806
914
|
}
|
|
807
915
|
} catch ($p) {
|
|
808
916
|
var e = $p;
|
|
809
|
-
if (this.
|
|
917
|
+
if (this.e9_1 === 2) {
|
|
810
918
|
throw e;
|
|
811
919
|
} else {
|
|
812
|
-
this.
|
|
813
|
-
this.
|
|
920
|
+
this.d9_1 = this.e9_1;
|
|
921
|
+
this.g9_1 = e;
|
|
814
922
|
}
|
|
815
923
|
}
|
|
816
924
|
while (true);
|
|
817
925
|
};
|
|
818
|
-
function $copyToCOROUTINE$
|
|
926
|
+
function $copyToCOROUTINE$10(_this__u8e3s4, channel, limit, resultContinuation) {
|
|
819
927
|
CoroutineImpl.call(this, resultContinuation);
|
|
820
|
-
this.
|
|
821
|
-
this.
|
|
822
|
-
this.
|
|
928
|
+
this.d1i_1 = _this__u8e3s4;
|
|
929
|
+
this.e1i_1 = channel;
|
|
930
|
+
this.f1i_1 = limit;
|
|
823
931
|
}
|
|
824
|
-
protoOf($copyToCOROUTINE$
|
|
825
|
-
var suspendResult = this.
|
|
932
|
+
protoOf($copyToCOROUTINE$10).l9 = function () {
|
|
933
|
+
var suspendResult = this.f9_1;
|
|
826
934
|
$sm: do
|
|
827
935
|
try {
|
|
828
|
-
var tmp = this.
|
|
936
|
+
var tmp = this.d9_1;
|
|
829
937
|
switch (tmp) {
|
|
830
938
|
case 0:
|
|
831
|
-
this.
|
|
832
|
-
this.
|
|
833
|
-
this.
|
|
939
|
+
this.e9_1 = 12;
|
|
940
|
+
this.g1i_1 = this.f1i_1;
|
|
941
|
+
this.d9_1 = 1;
|
|
834
942
|
continue $sm;
|
|
835
943
|
case 1:
|
|
836
|
-
this.
|
|
837
|
-
this.
|
|
838
|
-
this.
|
|
944
|
+
this.e9_1 = 8;
|
|
945
|
+
this.e9_1 = 7;
|
|
946
|
+
this.d9_1 = 2;
|
|
839
947
|
continue $sm;
|
|
840
948
|
case 2:
|
|
841
|
-
if (!(!this.
|
|
842
|
-
this.
|
|
949
|
+
if (!(!this.d1i_1.x1f() && this.g1i_1.e1(new Long(0, 0)) > 0)) {
|
|
950
|
+
this.d9_1 = 6;
|
|
843
951
|
continue $sm;
|
|
844
952
|
}
|
|
845
953
|
|
|
846
|
-
if (this.
|
|
847
|
-
this.
|
|
848
|
-
suspendResult = this.
|
|
954
|
+
if (this.d1i_1.s1f().t1a()) {
|
|
955
|
+
this.d9_1 = 3;
|
|
956
|
+
suspendResult = this.d1i_1.z1f(VOID, this);
|
|
849
957
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
850
958
|
return suspendResult;
|
|
851
959
|
}
|
|
852
960
|
continue $sm;
|
|
853
961
|
} else {
|
|
854
|
-
this.
|
|
962
|
+
this.d9_1 = 4;
|
|
855
963
|
continue $sm;
|
|
856
964
|
}
|
|
857
965
|
|
|
858
966
|
case 3:
|
|
859
|
-
this.
|
|
967
|
+
this.d9_1 = 4;
|
|
860
968
|
continue $sm;
|
|
861
969
|
case 4:
|
|
862
970
|
var tmp_0 = this;
|
|
863
|
-
var a = this.
|
|
864
|
-
var b = get_remaining(this.
|
|
865
|
-
tmp_0.
|
|
866
|
-
this.
|
|
867
|
-
this.
|
|
868
|
-
this.
|
|
869
|
-
suspendResult = this.
|
|
971
|
+
var a = this.g1i_1;
|
|
972
|
+
var b = get_remaining(this.d1i_1.s1f());
|
|
973
|
+
tmp_0.i1i_1 = a.e1(b) <= 0 ? a : b;
|
|
974
|
+
this.d1i_1.s1f().u1b(this.e1i_1.u1f(), this.i1i_1);
|
|
975
|
+
this.g1i_1 = this.g1i_1.a3(this.i1i_1);
|
|
976
|
+
this.d9_1 = 5;
|
|
977
|
+
suspendResult = this.e1i_1.r1f(this);
|
|
870
978
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
871
979
|
return suspendResult;
|
|
872
980
|
}
|
|
873
981
|
|
|
874
982
|
continue $sm;
|
|
875
983
|
case 5:
|
|
876
|
-
this.
|
|
984
|
+
this.d9_1 = 2;
|
|
877
985
|
continue $sm;
|
|
878
986
|
case 6:
|
|
879
|
-
this.
|
|
880
|
-
this.
|
|
881
|
-
this.
|
|
987
|
+
this.h1i_1 = Unit_instance;
|
|
988
|
+
this.e9_1 = 12;
|
|
989
|
+
this.d9_1 = 10;
|
|
882
990
|
continue $sm;
|
|
883
991
|
case 7:
|
|
884
|
-
this.
|
|
885
|
-
var tmp_1 = this.
|
|
992
|
+
this.e9_1 = 8;
|
|
993
|
+
var tmp_1 = this.g9_1;
|
|
886
994
|
if (tmp_1 instanceof Error) {
|
|
887
|
-
this.
|
|
995
|
+
this.j1i_1 = this.g9_1;
|
|
888
996
|
var tmp_2 = this;
|
|
889
|
-
this.
|
|
890
|
-
close(this.
|
|
891
|
-
throw this.
|
|
997
|
+
this.d1i_1.b1g(this.j1i_1);
|
|
998
|
+
close(this.e1i_1, this.j1i_1);
|
|
999
|
+
throw this.j1i_1;
|
|
892
1000
|
} else {
|
|
893
|
-
throw this.
|
|
1001
|
+
throw this.g9_1;
|
|
894
1002
|
}
|
|
895
1003
|
|
|
896
1004
|
case 8:
|
|
897
|
-
this.
|
|
898
|
-
this.
|
|
899
|
-
this.
|
|
900
|
-
suspendResult = this.
|
|
1005
|
+
this.e9_1 = 12;
|
|
1006
|
+
this.k1i_1 = this.g9_1;
|
|
1007
|
+
this.d9_1 = 9;
|
|
1008
|
+
suspendResult = this.e1i_1.r1f(this);
|
|
901
1009
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
902
1010
|
return suspendResult;
|
|
903
1011
|
}
|
|
904
1012
|
|
|
905
1013
|
continue $sm;
|
|
906
1014
|
case 9:
|
|
907
|
-
throw this.
|
|
1015
|
+
throw this.k1i_1;
|
|
908
1016
|
case 10:
|
|
909
|
-
this.
|
|
910
|
-
this.
|
|
911
|
-
suspendResult = this.
|
|
1017
|
+
this.e9_1 = 12;
|
|
1018
|
+
this.d9_1 = 11;
|
|
1019
|
+
suspendResult = this.e1i_1.r1f(this);
|
|
912
1020
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
913
1021
|
return suspendResult;
|
|
914
1022
|
}
|
|
915
1023
|
|
|
916
1024
|
continue $sm;
|
|
917
1025
|
case 11:
|
|
918
|
-
return this.
|
|
1026
|
+
return this.f1i_1.a3(this.g1i_1);
|
|
919
1027
|
case 12:
|
|
920
|
-
throw this.
|
|
1028
|
+
throw this.g9_1;
|
|
921
1029
|
}
|
|
922
1030
|
} catch ($p) {
|
|
923
1031
|
var e = $p;
|
|
924
|
-
if (this.
|
|
1032
|
+
if (this.e9_1 === 12) {
|
|
925
1033
|
throw e;
|
|
926
1034
|
} else {
|
|
927
|
-
this.
|
|
928
|
-
this.
|
|
1035
|
+
this.d9_1 = this.e9_1;
|
|
1036
|
+
this.g9_1 = e;
|
|
929
1037
|
}
|
|
930
1038
|
}
|
|
931
1039
|
while (true);
|
|
932
1040
|
};
|
|
933
|
-
function $readBufferCOROUTINE$
|
|
1041
|
+
function $readBufferCOROUTINE$12(_this__u8e3s4, resultContinuation) {
|
|
934
1042
|
CoroutineImpl.call(this, resultContinuation);
|
|
935
|
-
this.
|
|
1043
|
+
this.t1i_1 = _this__u8e3s4;
|
|
936
1044
|
}
|
|
937
|
-
protoOf($readBufferCOROUTINE$
|
|
938
|
-
var suspendResult = this.
|
|
1045
|
+
protoOf($readBufferCOROUTINE$12).l9 = function () {
|
|
1046
|
+
var suspendResult = this.f9_1;
|
|
939
1047
|
$sm: do
|
|
940
1048
|
try {
|
|
941
|
-
var tmp = this.
|
|
1049
|
+
var tmp = this.d9_1;
|
|
942
1050
|
switch (tmp) {
|
|
943
1051
|
case 0:
|
|
944
|
-
this.
|
|
945
|
-
this.
|
|
946
|
-
this.
|
|
1052
|
+
this.e9_1 = 4;
|
|
1053
|
+
this.u1i_1 = new Buffer();
|
|
1054
|
+
this.d9_1 = 1;
|
|
947
1055
|
continue $sm;
|
|
948
1056
|
case 1:
|
|
949
|
-
if (!!this.
|
|
950
|
-
this.
|
|
1057
|
+
if (!!this.t1i_1.x1f()) {
|
|
1058
|
+
this.d9_1 = 3;
|
|
951
1059
|
continue $sm;
|
|
952
1060
|
}
|
|
953
1061
|
|
|
954
|
-
this.
|
|
955
|
-
this.
|
|
956
|
-
suspendResult = this.
|
|
1062
|
+
this.u1i_1.j1c(this.t1i_1.s1f());
|
|
1063
|
+
this.d9_1 = 2;
|
|
1064
|
+
suspendResult = this.t1i_1.z1f(VOID, this);
|
|
957
1065
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
958
1066
|
return suspendResult;
|
|
959
1067
|
}
|
|
960
1068
|
|
|
961
1069
|
continue $sm;
|
|
962
1070
|
case 2:
|
|
963
|
-
this.
|
|
1071
|
+
this.d9_1 = 1;
|
|
964
1072
|
continue $sm;
|
|
965
1073
|
case 3:
|
|
966
|
-
var
|
|
967
|
-
if (
|
|
1074
|
+
var tmp0_safe_receiver = this.t1i_1.t1f();
|
|
1075
|
+
if (tmp0_safe_receiver == null)
|
|
968
1076
|
null;
|
|
969
1077
|
else {
|
|
970
|
-
throw
|
|
1078
|
+
throw tmp0_safe_receiver;
|
|
971
1079
|
}
|
|
972
1080
|
|
|
973
|
-
return this.
|
|
1081
|
+
return this.u1i_1;
|
|
974
1082
|
case 4:
|
|
975
|
-
throw this.
|
|
1083
|
+
throw this.g9_1;
|
|
976
1084
|
}
|
|
977
1085
|
} catch ($p) {
|
|
978
1086
|
var e = $p;
|
|
979
|
-
if (this.
|
|
1087
|
+
if (this.e9_1 === 4) {
|
|
980
1088
|
throw e;
|
|
981
1089
|
} else {
|
|
982
|
-
this.
|
|
983
|
-
this.
|
|
1090
|
+
this.d9_1 = this.e9_1;
|
|
1091
|
+
this.g9_1 = e;
|
|
984
1092
|
}
|
|
985
1093
|
}
|
|
986
1094
|
while (true);
|
|
987
1095
|
};
|
|
988
1096
|
function flushIfNeeded(_this__u8e3s4, $completion) {
|
|
989
|
-
var tmp = new $flushIfNeededCOROUTINE$
|
|
990
|
-
tmp.
|
|
991
|
-
tmp.
|
|
992
|
-
return tmp.
|
|
1097
|
+
var tmp = new $flushIfNeededCOROUTINE$14(_this__u8e3s4, $completion);
|
|
1098
|
+
tmp.f9_1 = Unit_instance;
|
|
1099
|
+
tmp.g9_1 = null;
|
|
1100
|
+
return tmp.l9();
|
|
993
1101
|
}
|
|
994
|
-
function $flushIfNeededCOROUTINE$
|
|
1102
|
+
function $flushIfNeededCOROUTINE$14(_this__u8e3s4, resultContinuation) {
|
|
995
1103
|
CoroutineImpl.call(this, resultContinuation);
|
|
996
|
-
this.
|
|
1104
|
+
this.d1j_1 = _this__u8e3s4;
|
|
997
1105
|
}
|
|
998
|
-
protoOf($flushIfNeededCOROUTINE$
|
|
999
|
-
var suspendResult = this.
|
|
1106
|
+
protoOf($flushIfNeededCOROUTINE$14).l9 = function () {
|
|
1107
|
+
var suspendResult = this.f9_1;
|
|
1000
1108
|
$sm: do
|
|
1001
1109
|
try {
|
|
1002
|
-
var tmp = this.
|
|
1110
|
+
var tmp = this.d9_1;
|
|
1003
1111
|
switch (tmp) {
|
|
1004
1112
|
case 0:
|
|
1005
|
-
this.
|
|
1006
|
-
rethrowCloseCauseIfNeeded_0(this.
|
|
1113
|
+
this.e9_1 = 3;
|
|
1114
|
+
rethrowCloseCauseIfNeeded_0(this.d1j_1);
|
|
1007
1115
|
var tmp_0;
|
|
1008
|
-
var tmp_1 = this.
|
|
1009
|
-
var
|
|
1010
|
-
if ((
|
|
1116
|
+
var tmp_1 = this.d1j_1;
|
|
1117
|
+
var tmp0_safe_receiver = tmp_1 instanceof ByteChannel ? tmp_1 : null;
|
|
1118
|
+
if ((tmp0_safe_receiver == null ? null : tmp0_safe_receiver.a1e_1) === true) {
|
|
1011
1119
|
tmp_0 = true;
|
|
1012
1120
|
} else {
|
|
1013
|
-
tmp_0 = get_size(this.
|
|
1121
|
+
tmp_0 = get_size(this.d1j_1.u1f()) >= 1048576;
|
|
1014
1122
|
}
|
|
1015
1123
|
|
|
1016
1124
|
if (tmp_0) {
|
|
1017
|
-
this.
|
|
1018
|
-
suspendResult = this.
|
|
1125
|
+
this.d9_1 = 1;
|
|
1126
|
+
suspendResult = this.d1j_1.r1f(this);
|
|
1019
1127
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1020
1128
|
return suspendResult;
|
|
1021
1129
|
}
|
|
1022
1130
|
continue $sm;
|
|
1023
1131
|
} else {
|
|
1024
|
-
this.
|
|
1132
|
+
this.d9_1 = 2;
|
|
1025
1133
|
continue $sm;
|
|
1026
1134
|
}
|
|
1027
1135
|
|
|
1028
1136
|
case 1:
|
|
1029
|
-
this.
|
|
1137
|
+
this.d9_1 = 2;
|
|
1030
1138
|
continue $sm;
|
|
1031
1139
|
case 2:
|
|
1032
1140
|
return Unit_instance;
|
|
1033
1141
|
case 3:
|
|
1034
|
-
throw this.
|
|
1142
|
+
throw this.g9_1;
|
|
1035
1143
|
}
|
|
1036
1144
|
} catch ($p) {
|
|
1037
1145
|
var e = $p;
|
|
1038
|
-
if (this.
|
|
1146
|
+
if (this.e9_1 === 3) {
|
|
1039
1147
|
throw e;
|
|
1040
1148
|
} else {
|
|
1041
|
-
this.
|
|
1042
|
-
this.
|
|
1149
|
+
this.d9_1 = this.e9_1;
|
|
1150
|
+
this.g9_1 = e;
|
|
1043
1151
|
}
|
|
1044
1152
|
}
|
|
1045
1153
|
while (true);
|
|
@@ -1050,11 +1158,11 @@
|
|
|
1050
1158
|
}
|
|
1051
1159
|
var NO_CALLBACK;
|
|
1052
1160
|
function WriterJob(channel, job) {
|
|
1053
|
-
this.
|
|
1054
|
-
this.
|
|
1161
|
+
this.e1j_1 = channel;
|
|
1162
|
+
this.f1j_1 = job;
|
|
1055
1163
|
}
|
|
1056
|
-
protoOf(WriterJob).
|
|
1057
|
-
return this.
|
|
1164
|
+
protoOf(WriterJob).ht = function () {
|
|
1165
|
+
return this.f1j_1;
|
|
1058
1166
|
};
|
|
1059
1167
|
function writer(_this__u8e3s4, coroutineContext, autoFlush, block) {
|
|
1060
1168
|
coroutineContext = coroutineContext === VOID ? EmptyCoroutineContext_getInstance() : coroutineContext;
|
|
@@ -1063,34 +1171,38 @@
|
|
|
1063
1171
|
return writer_0(_this__u8e3s4, coroutineContext, new ByteChannel(), block);
|
|
1064
1172
|
}
|
|
1065
1173
|
function WriterScope(channel, coroutineContext) {
|
|
1066
|
-
this.
|
|
1067
|
-
this.
|
|
1174
|
+
this.g1j_1 = channel;
|
|
1175
|
+
this.h1j_1 = coroutineContext;
|
|
1068
1176
|
}
|
|
1069
|
-
protoOf(WriterScope).
|
|
1070
|
-
return this.
|
|
1177
|
+
protoOf(WriterScope).in = function () {
|
|
1178
|
+
return this.h1j_1;
|
|
1071
1179
|
};
|
|
1072
1180
|
function writeFully(_this__u8e3s4, value, startIndex, endIndex, $completion) {
|
|
1073
1181
|
startIndex = startIndex === VOID ? 0 : startIndex;
|
|
1074
1182
|
endIndex = endIndex === VOID ? value.length : endIndex;
|
|
1075
|
-
_this__u8e3s4.
|
|
1183
|
+
_this__u8e3s4.u1f().b1c(value, startIndex, endIndex);
|
|
1076
1184
|
return flushIfNeeded(_this__u8e3s4, $completion);
|
|
1077
1185
|
}
|
|
1078
1186
|
function writePacket(_this__u8e3s4, copy, $completion) {
|
|
1079
|
-
_this__u8e3s4.
|
|
1187
|
+
_this__u8e3s4.u1f().j1c(copy);
|
|
1080
1188
|
return flushIfNeeded(_this__u8e3s4, $completion);
|
|
1081
1189
|
}
|
|
1190
|
+
function get_isCompleted(_this__u8e3s4) {
|
|
1191
|
+
_init_properties_ByteWriteChannelOperations_kt__i7slrs();
|
|
1192
|
+
return _this__u8e3s4.ht().do();
|
|
1193
|
+
}
|
|
1082
1194
|
function close(_this__u8e3s4, cause) {
|
|
1083
1195
|
_init_properties_ByteWriteChannelOperations_kt__i7slrs();
|
|
1084
1196
|
if (cause == null) {
|
|
1085
1197
|
fireAndForget(ByteWriteChannel$flushAndClose$ref_0(_this__u8e3s4));
|
|
1086
1198
|
} else {
|
|
1087
|
-
_this__u8e3s4.
|
|
1199
|
+
_this__u8e3s4.b1g(cause);
|
|
1088
1200
|
}
|
|
1089
1201
|
}
|
|
1090
1202
|
function invokeOnCompletion(_this__u8e3s4, block) {
|
|
1091
1203
|
_init_properties_ByteWriteChannelOperations_kt__i7slrs();
|
|
1092
|
-
var tmp = _this__u8e3s4.
|
|
1093
|
-
tmp.
|
|
1204
|
+
var tmp = _this__u8e3s4.ht();
|
|
1205
|
+
tmp.ko(invokeOnCompletion$lambda(block));
|
|
1094
1206
|
}
|
|
1095
1207
|
function writer_0(_this__u8e3s4, coroutineContext, channel, block) {
|
|
1096
1208
|
coroutineContext = coroutineContext === VOID ? EmptyCoroutineContext_getInstance() : coroutineContext;
|
|
@@ -1099,7 +1211,7 @@
|
|
|
1099
1211
|
var this_0 = launch(_this__u8e3s4, coroutineContext, VOID, writer$slambda_0(block, channel, null));
|
|
1100
1212
|
// Inline function 'kotlin.contracts.contract' call
|
|
1101
1213
|
// Inline function 'io.ktor.utils.io.writer.<anonymous>' call
|
|
1102
|
-
this_0.
|
|
1214
|
+
this_0.ko(writer$lambda(channel));
|
|
1103
1215
|
var job = this_0;
|
|
1104
1216
|
return new WriterJob(channel, job);
|
|
1105
1217
|
}
|
|
@@ -1108,28 +1220,30 @@
|
|
|
1108
1220
|
startCoroutineCancellable(_this__u8e3s4, get_NO_CALLBACK());
|
|
1109
1221
|
}
|
|
1110
1222
|
function NO_CALLBACK$1() {
|
|
1223
|
+
this.i1j_1 = EmptyCoroutineContext_getInstance();
|
|
1111
1224
|
}
|
|
1112
|
-
protoOf(NO_CALLBACK$1).
|
|
1113
|
-
return
|
|
1225
|
+
protoOf(NO_CALLBACK$1).j9 = function () {
|
|
1226
|
+
return this.i1j_1;
|
|
1114
1227
|
};
|
|
1115
|
-
protoOf(NO_CALLBACK$1).
|
|
1228
|
+
protoOf(NO_CALLBACK$1).k9 = function (result) {
|
|
1229
|
+
return Unit_instance;
|
|
1116
1230
|
};
|
|
1117
|
-
protoOf(NO_CALLBACK$1).
|
|
1118
|
-
return this.
|
|
1231
|
+
protoOf(NO_CALLBACK$1).o9 = function (result) {
|
|
1232
|
+
return this.k9(result);
|
|
1119
1233
|
};
|
|
1120
1234
|
function ByteWriteChannel$flushAndClose$ref($boundThis) {
|
|
1121
|
-
this.
|
|
1235
|
+
this.j1j_1 = $boundThis;
|
|
1122
1236
|
}
|
|
1123
|
-
protoOf(ByteWriteChannel$flushAndClose$ref).
|
|
1124
|
-
return this.
|
|
1237
|
+
protoOf(ByteWriteChannel$flushAndClose$ref).k1j = function ($completion) {
|
|
1238
|
+
return this.j1j_1.a1g($completion);
|
|
1125
1239
|
};
|
|
1126
|
-
protoOf(ByteWriteChannel$flushAndClose$ref).
|
|
1127
|
-
return this.
|
|
1240
|
+
protoOf(ByteWriteChannel$flushAndClose$ref).sa = function ($completion) {
|
|
1241
|
+
return this.k1j($completion);
|
|
1128
1242
|
};
|
|
1129
1243
|
function ByteWriteChannel$flushAndClose$ref_0($boundThis) {
|
|
1130
1244
|
var i = new ByteWriteChannel$flushAndClose$ref($boundThis);
|
|
1131
1245
|
var l = function ($completion) {
|
|
1132
|
-
return i.
|
|
1246
|
+
return i.k1j($completion);
|
|
1133
1247
|
};
|
|
1134
1248
|
l.callableName = 'flushAndClose';
|
|
1135
1249
|
l.$arity = 0;
|
|
@@ -1142,74 +1256,74 @@
|
|
|
1142
1256
|
};
|
|
1143
1257
|
}
|
|
1144
1258
|
function writer$slambda($block, $channel, resultContinuation) {
|
|
1145
|
-
this.
|
|
1146
|
-
this.
|
|
1259
|
+
this.t1j_1 = $block;
|
|
1260
|
+
this.u1j_1 = $channel;
|
|
1147
1261
|
CoroutineImpl.call(this, resultContinuation);
|
|
1148
1262
|
}
|
|
1149
|
-
protoOf(writer$slambda).
|
|
1150
|
-
var tmp = this.
|
|
1151
|
-
tmp.
|
|
1152
|
-
tmp.
|
|
1153
|
-
return tmp.
|
|
1263
|
+
protoOf(writer$slambda).k1k = function ($this$launch, $completion) {
|
|
1264
|
+
var tmp = this.l1k($this$launch, $completion);
|
|
1265
|
+
tmp.f9_1 = Unit_instance;
|
|
1266
|
+
tmp.g9_1 = null;
|
|
1267
|
+
return tmp.l9();
|
|
1154
1268
|
};
|
|
1155
|
-
protoOf(writer$slambda).
|
|
1156
|
-
return this.
|
|
1269
|
+
protoOf(writer$slambda).v9 = function (p1, $completion) {
|
|
1270
|
+
return this.k1k((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
|
|
1157
1271
|
};
|
|
1158
|
-
protoOf(writer$slambda).
|
|
1159
|
-
var suspendResult = this.
|
|
1272
|
+
protoOf(writer$slambda).l9 = function () {
|
|
1273
|
+
var suspendResult = this.f9_1;
|
|
1160
1274
|
$sm: do
|
|
1161
1275
|
try {
|
|
1162
|
-
var tmp = this.
|
|
1276
|
+
var tmp = this.d9_1;
|
|
1163
1277
|
switch (tmp) {
|
|
1164
1278
|
case 0:
|
|
1165
|
-
this.
|
|
1166
|
-
this.
|
|
1167
|
-
this.
|
|
1279
|
+
this.e9_1 = 14;
|
|
1280
|
+
this.w1j_1 = Job(get_job(this.v1j_1.in()));
|
|
1281
|
+
this.d9_1 = 1;
|
|
1168
1282
|
continue $sm;
|
|
1169
1283
|
case 1:
|
|
1170
|
-
this.
|
|
1171
|
-
this.
|
|
1172
|
-
this.
|
|
1173
|
-
suspendResult = this.
|
|
1284
|
+
this.e9_1 = 4;
|
|
1285
|
+
this.e9_1 = 3;
|
|
1286
|
+
this.d9_1 = 2;
|
|
1287
|
+
suspendResult = this.t1j_1(new WriterScope(this.u1j_1, this.v1j_1.in().bh(this.w1j_1)), this);
|
|
1174
1288
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1175
1289
|
return suspendResult;
|
|
1176
1290
|
}
|
|
1177
1291
|
|
|
1178
1292
|
continue $sm;
|
|
1179
1293
|
case 2:
|
|
1180
|
-
this.
|
|
1294
|
+
this.w1j_1.du();
|
|
1181
1295
|
var tmp_0 = this;
|
|
1182
1296
|
var tmp_1;
|
|
1183
|
-
if (get_job(this.
|
|
1184
|
-
this.
|
|
1297
|
+
if (get_job(this.v1j_1.in()).eo()) {
|
|
1298
|
+
this.u1j_1.b1g(get_job(this.v1j_1.in()).ho());
|
|
1185
1299
|
tmp_1 = Unit_instance;
|
|
1186
1300
|
}
|
|
1187
1301
|
|
|
1188
|
-
tmp_0.
|
|
1189
|
-
this.
|
|
1190
|
-
this.
|
|
1302
|
+
tmp_0.x1j_1 = tmp_1;
|
|
1303
|
+
this.e9_1 = 14;
|
|
1304
|
+
this.d9_1 = 9;
|
|
1191
1305
|
continue $sm;
|
|
1192
1306
|
case 3:
|
|
1193
|
-
this.
|
|
1194
|
-
var tmp_2 = this.
|
|
1307
|
+
this.e9_1 = 4;
|
|
1308
|
+
var tmp_2 = this.g9_1;
|
|
1195
1309
|
if (tmp_2 instanceof Error) {
|
|
1196
|
-
this.
|
|
1310
|
+
this.y1j_1 = this.g9_1;
|
|
1197
1311
|
var tmp_3 = this;
|
|
1198
|
-
cancel(this.
|
|
1199
|
-
this.
|
|
1200
|
-
tmp_3.
|
|
1201
|
-
this.
|
|
1202
|
-
this.
|
|
1312
|
+
cancel(this.w1j_1, 'Exception thrown while writing to channel', this.y1j_1);
|
|
1313
|
+
this.u1j_1.b1g(this.y1j_1);
|
|
1314
|
+
tmp_3.x1j_1 = Unit_instance;
|
|
1315
|
+
this.e9_1 = 14;
|
|
1316
|
+
this.d9_1 = 9;
|
|
1203
1317
|
continue $sm;
|
|
1204
1318
|
} else {
|
|
1205
|
-
throw this.
|
|
1319
|
+
throw this.g9_1;
|
|
1206
1320
|
}
|
|
1207
1321
|
|
|
1208
1322
|
case 4:
|
|
1209
|
-
this.
|
|
1210
|
-
this.
|
|
1211
|
-
this.
|
|
1212
|
-
suspendResult = this.
|
|
1323
|
+
this.e9_1 = 14;
|
|
1324
|
+
this.z1j_1 = this.g9_1;
|
|
1325
|
+
this.d9_1 = 5;
|
|
1326
|
+
suspendResult = this.w1j_1.eu(this);
|
|
1213
1327
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1214
1328
|
return suspendResult;
|
|
1215
1329
|
}
|
|
@@ -1217,14 +1331,14 @@
|
|
|
1217
1331
|
continue $sm;
|
|
1218
1332
|
case 5:
|
|
1219
1333
|
var tmp_4 = this;
|
|
1220
|
-
tmp_4.
|
|
1221
|
-
this.
|
|
1334
|
+
tmp_4.a1k_1 = this.v1j_1;
|
|
1335
|
+
this.e9_1 = 7;
|
|
1222
1336
|
var tmp_5 = this;
|
|
1223
|
-
tmp_5.
|
|
1337
|
+
tmp_5.c1k_1 = Companion_instance;
|
|
1224
1338
|
var tmp_6 = this;
|
|
1225
|
-
tmp_6.
|
|
1226
|
-
this.
|
|
1227
|
-
suspendResult = this.
|
|
1339
|
+
tmp_6.d1k_1 = this.a1k_1;
|
|
1340
|
+
this.d9_1 = 6;
|
|
1341
|
+
suspendResult = this.u1j_1.a1g(this);
|
|
1228
1342
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1229
1343
|
return suspendResult;
|
|
1230
1344
|
}
|
|
@@ -1232,32 +1346,32 @@
|
|
|
1232
1346
|
continue $sm;
|
|
1233
1347
|
case 6:
|
|
1234
1348
|
var tmp_7 = this;
|
|
1235
|
-
tmp_7.
|
|
1236
|
-
this.
|
|
1237
|
-
this.
|
|
1238
|
-
this.
|
|
1349
|
+
tmp_7.e1k_1 = Unit_instance;
|
|
1350
|
+
this.b1k_1 = _Result___init__impl__xyqfz8(this.e1k_1);
|
|
1351
|
+
this.e9_1 = 14;
|
|
1352
|
+
this.d9_1 = 8;
|
|
1239
1353
|
continue $sm;
|
|
1240
1354
|
case 7:
|
|
1241
|
-
this.
|
|
1242
|
-
var tmp_8 = this.
|
|
1355
|
+
this.e9_1 = 14;
|
|
1356
|
+
var tmp_8 = this.g9_1;
|
|
1243
1357
|
if (tmp_8 instanceof Error) {
|
|
1244
|
-
this.
|
|
1358
|
+
this.f1k_1 = this.g9_1;
|
|
1245
1359
|
var tmp_9 = this;
|
|
1246
|
-
var exception = this.
|
|
1247
|
-
tmp_9.
|
|
1248
|
-
this.
|
|
1360
|
+
var exception = this.f1k_1;
|
|
1361
|
+
tmp_9.b1k_1 = _Result___init__impl__xyqfz8(createFailure(exception));
|
|
1362
|
+
this.d9_1 = 8;
|
|
1249
1363
|
continue $sm;
|
|
1250
1364
|
} else {
|
|
1251
|
-
throw this.
|
|
1365
|
+
throw this.g9_1;
|
|
1252
1366
|
}
|
|
1253
1367
|
|
|
1254
1368
|
case 8:
|
|
1255
|
-
this.
|
|
1256
|
-
throw this.
|
|
1369
|
+
this.e9_1 = 14;
|
|
1370
|
+
throw this.z1j_1;
|
|
1257
1371
|
case 9:
|
|
1258
|
-
this.
|
|
1259
|
-
this.
|
|
1260
|
-
suspendResult = this.
|
|
1372
|
+
this.e9_1 = 14;
|
|
1373
|
+
this.d9_1 = 10;
|
|
1374
|
+
suspendResult = this.w1j_1.eu(this);
|
|
1261
1375
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1262
1376
|
return suspendResult;
|
|
1263
1377
|
}
|
|
@@ -1265,63 +1379,63 @@
|
|
|
1265
1379
|
continue $sm;
|
|
1266
1380
|
case 10:
|
|
1267
1381
|
var tmp_10 = this;
|
|
1268
|
-
tmp_10.
|
|
1269
|
-
this.
|
|
1382
|
+
tmp_10.g1k_1 = this.v1j_1;
|
|
1383
|
+
this.e9_1 = 12;
|
|
1270
1384
|
var tmp_11 = this;
|
|
1271
|
-
tmp_11.
|
|
1385
|
+
tmp_11.i1k_1 = Companion_instance;
|
|
1272
1386
|
var tmp_12 = this;
|
|
1273
|
-
tmp_12.
|
|
1274
|
-
this.
|
|
1275
|
-
suspendResult = this.
|
|
1387
|
+
tmp_12.j1k_1 = this.g1k_1;
|
|
1388
|
+
this.d9_1 = 11;
|
|
1389
|
+
suspendResult = this.u1j_1.a1g(this);
|
|
1276
1390
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1277
1391
|
return suspendResult;
|
|
1278
1392
|
}
|
|
1279
1393
|
|
|
1280
1394
|
continue $sm;
|
|
1281
1395
|
case 11:
|
|
1282
|
-
this.
|
|
1283
|
-
this.
|
|
1284
|
-
this.
|
|
1396
|
+
this.h1k_1 = _Result___init__impl__xyqfz8(Unit_instance);
|
|
1397
|
+
this.e9_1 = 14;
|
|
1398
|
+
this.d9_1 = 13;
|
|
1285
1399
|
continue $sm;
|
|
1286
1400
|
case 12:
|
|
1287
|
-
this.
|
|
1288
|
-
var tmp_13 = this.
|
|
1401
|
+
this.e9_1 = 14;
|
|
1402
|
+
var tmp_13 = this.g9_1;
|
|
1289
1403
|
if (tmp_13 instanceof Error) {
|
|
1290
|
-
var e = this.
|
|
1404
|
+
var e = this.g9_1;
|
|
1291
1405
|
var tmp_14 = this;
|
|
1292
|
-
tmp_14.
|
|
1293
|
-
this.
|
|
1406
|
+
tmp_14.h1k_1 = _Result___init__impl__xyqfz8(createFailure(e));
|
|
1407
|
+
this.d9_1 = 13;
|
|
1294
1408
|
continue $sm;
|
|
1295
1409
|
} else {
|
|
1296
|
-
throw this.
|
|
1410
|
+
throw this.g9_1;
|
|
1297
1411
|
}
|
|
1298
1412
|
|
|
1299
1413
|
case 13:
|
|
1300
|
-
this.
|
|
1414
|
+
this.e9_1 = 14;
|
|
1301
1415
|
return Unit_instance;
|
|
1302
1416
|
case 14:
|
|
1303
|
-
throw this.
|
|
1417
|
+
throw this.g9_1;
|
|
1304
1418
|
}
|
|
1305
1419
|
} catch ($p) {
|
|
1306
1420
|
var e_0 = $p;
|
|
1307
|
-
if (this.
|
|
1421
|
+
if (this.e9_1 === 14) {
|
|
1308
1422
|
throw e_0;
|
|
1309
1423
|
} else {
|
|
1310
|
-
this.
|
|
1311
|
-
this.
|
|
1424
|
+
this.d9_1 = this.e9_1;
|
|
1425
|
+
this.g9_1 = e_0;
|
|
1312
1426
|
}
|
|
1313
1427
|
}
|
|
1314
1428
|
while (true);
|
|
1315
1429
|
};
|
|
1316
|
-
protoOf(writer$slambda).
|
|
1317
|
-
var i = new writer$slambda(this.
|
|
1318
|
-
i.
|
|
1430
|
+
protoOf(writer$slambda).l1k = function ($this$launch, completion) {
|
|
1431
|
+
var i = new writer$slambda(this.t1j_1, this.u1j_1, completion);
|
|
1432
|
+
i.v1j_1 = $this$launch;
|
|
1319
1433
|
return i;
|
|
1320
1434
|
};
|
|
1321
1435
|
function writer$slambda_0($block, $channel, resultContinuation) {
|
|
1322
1436
|
var i = new writer$slambda($block, $channel, resultContinuation);
|
|
1323
1437
|
var l = function ($this$launch, $completion) {
|
|
1324
|
-
return i.
|
|
1438
|
+
return i.k1k($this$launch, $completion);
|
|
1325
1439
|
};
|
|
1326
1440
|
l.$arity = 1;
|
|
1327
1441
|
return l;
|
|
@@ -1329,8 +1443,8 @@
|
|
|
1329
1443
|
function writer$lambda($channel) {
|
|
1330
1444
|
return function (it) {
|
|
1331
1445
|
var tmp;
|
|
1332
|
-
if (!(it == null) && !$channel.
|
|
1333
|
-
$channel.
|
|
1446
|
+
if (!(it == null) && !$channel.v1f()) {
|
|
1447
|
+
$channel.b1g(it);
|
|
1334
1448
|
tmp = Unit_instance;
|
|
1335
1449
|
}
|
|
1336
1450
|
return Unit_instance;
|
|
@@ -1357,7 +1471,7 @@
|
|
|
1357
1471
|
if (origin instanceof CancellationException) {
|
|
1358
1472
|
var tmp_1;
|
|
1359
1473
|
if (isInterface(origin, CopyableThrowable)) {
|
|
1360
|
-
tmp_1 = origin.
|
|
1474
|
+
tmp_1 = origin.mu();
|
|
1361
1475
|
} else {
|
|
1362
1476
|
var tmp0_elvis_lhs = origin.message;
|
|
1363
1477
|
tmp_1 = CancellationException_init_$Create$(tmp0_elvis_lhs == null ? 'Channel was cancelled' : tmp0_elvis_lhs, origin);
|
|
@@ -1371,37 +1485,37 @@
|
|
|
1371
1485
|
tmp_2 = false;
|
|
1372
1486
|
}
|
|
1373
1487
|
if (tmp_2) {
|
|
1374
|
-
tmp_0 = origin.
|
|
1488
|
+
tmp_0 = origin.mu();
|
|
1375
1489
|
} else {
|
|
1376
1490
|
var tmp1_elvis_lhs = origin.message;
|
|
1377
1491
|
tmp_0 = IOException_init_$Create$_0(tmp1_elvis_lhs == null ? 'Channel was closed' : tmp1_elvis_lhs, origin);
|
|
1378
1492
|
}
|
|
1379
1493
|
}
|
|
1380
1494
|
}
|
|
1381
|
-
tmp.
|
|
1495
|
+
tmp.w1f_1 = tmp_0;
|
|
1382
1496
|
}
|
|
1383
|
-
protoOf(CloseToken).
|
|
1497
|
+
protoOf(CloseToken).u9 = function () {
|
|
1384
1498
|
var tmp;
|
|
1385
|
-
if (this.
|
|
1499
|
+
if (this.w1f_1 == null) {
|
|
1386
1500
|
tmp = null;
|
|
1387
1501
|
} else {
|
|
1388
|
-
var tmp_0 = this.
|
|
1502
|
+
var tmp_0 = this.w1f_1;
|
|
1389
1503
|
if (tmp_0 instanceof IOException) {
|
|
1390
1504
|
var tmp_1;
|
|
1391
|
-
var tmp_2 = this.
|
|
1505
|
+
var tmp_2 = this.w1f_1;
|
|
1392
1506
|
if (isInterface(tmp_2, CopyableThrowable)) {
|
|
1393
|
-
tmp_1 = this.
|
|
1507
|
+
tmp_1 = this.w1f_1.mu();
|
|
1394
1508
|
} else {
|
|
1395
|
-
tmp_1 = IOException_init_$Create$_0(this.
|
|
1509
|
+
tmp_1 = IOException_init_$Create$_0(this.w1f_1.message, this.w1f_1);
|
|
1396
1510
|
}
|
|
1397
1511
|
tmp = tmp_1;
|
|
1398
1512
|
} else {
|
|
1399
|
-
var tmp_3 = this.
|
|
1513
|
+
var tmp_3 = this.w1f_1;
|
|
1400
1514
|
if (!(tmp_3 == null) ? isInterface(tmp_3, CopyableThrowable) : false) {
|
|
1401
|
-
var tmp0_elvis_lhs = this.
|
|
1402
|
-
tmp = tmp0_elvis_lhs == null ? CancellationException_init_$Create$(this.
|
|
1515
|
+
var tmp0_elvis_lhs = this.w1f_1.mu();
|
|
1516
|
+
tmp = tmp0_elvis_lhs == null ? CancellationException_init_$Create$(this.w1f_1.message, this.w1f_1) : tmp0_elvis_lhs;
|
|
1403
1517
|
} else {
|
|
1404
|
-
tmp = CancellationException_init_$Create$(this.
|
|
1518
|
+
tmp = CancellationException_init_$Create$(this.w1f_1.message, this.w1f_1);
|
|
1405
1519
|
}
|
|
1406
1520
|
}
|
|
1407
1521
|
}
|
|
@@ -1414,60 +1528,57 @@
|
|
|
1414
1528
|
CLOSED = new CloseToken(null);
|
|
1415
1529
|
}
|
|
1416
1530
|
}
|
|
1417
|
-
function release(_this__u8e3s4) {
|
|
1418
|
-
_this__u8e3s4.a1b();
|
|
1419
|
-
}
|
|
1420
1531
|
function readText(_this__u8e3s4) {
|
|
1421
1532
|
return readString(_this__u8e3s4);
|
|
1422
1533
|
}
|
|
1423
1534
|
function SourceByteReadChannel(source) {
|
|
1424
|
-
this.
|
|
1425
|
-
this.
|
|
1535
|
+
this.m1k_1 = source;
|
|
1536
|
+
this.n1k_1 = null;
|
|
1426
1537
|
}
|
|
1427
|
-
protoOf(SourceByteReadChannel).
|
|
1428
|
-
var
|
|
1429
|
-
return
|
|
1538
|
+
protoOf(SourceByteReadChannel).t1f = function () {
|
|
1539
|
+
var tmp0_safe_receiver = this.n1k_1;
|
|
1540
|
+
return tmp0_safe_receiver == null ? null : tmp0_safe_receiver.u9();
|
|
1430
1541
|
};
|
|
1431
|
-
protoOf(SourceByteReadChannel).
|
|
1432
|
-
return this.
|
|
1542
|
+
protoOf(SourceByteReadChannel).x1f = function () {
|
|
1543
|
+
return this.m1k_1.t1a();
|
|
1433
1544
|
};
|
|
1434
|
-
protoOf(SourceByteReadChannel).
|
|
1435
|
-
var
|
|
1436
|
-
if (
|
|
1545
|
+
protoOf(SourceByteReadChannel).s1f = function () {
|
|
1546
|
+
var tmp0_safe_receiver = this.t1f();
|
|
1547
|
+
if (tmp0_safe_receiver == null)
|
|
1437
1548
|
null;
|
|
1438
1549
|
else {
|
|
1439
1550
|
// Inline function 'kotlin.let' call
|
|
1440
1551
|
// Inline function 'kotlin.contracts.contract' call
|
|
1441
|
-
throw
|
|
1552
|
+
throw tmp0_safe_receiver;
|
|
1442
1553
|
}
|
|
1443
|
-
return this.
|
|
1554
|
+
return this.m1k_1;
|
|
1444
1555
|
};
|
|
1445
|
-
protoOf(SourceByteReadChannel).
|
|
1446
|
-
var
|
|
1447
|
-
if (
|
|
1556
|
+
protoOf(SourceByteReadChannel).y1f = function (min, $completion) {
|
|
1557
|
+
var tmp0_safe_receiver = this.t1f();
|
|
1558
|
+
if (tmp0_safe_receiver == null)
|
|
1448
1559
|
null;
|
|
1449
1560
|
else {
|
|
1450
1561
|
// Inline function 'kotlin.let' call
|
|
1451
1562
|
// Inline function 'kotlin.contracts.contract' call
|
|
1452
|
-
throw
|
|
1563
|
+
throw tmp0_safe_receiver;
|
|
1453
1564
|
}
|
|
1454
|
-
return
|
|
1565
|
+
return get_remaining(this.m1k_1).e1(toLong(min)) >= 0;
|
|
1455
1566
|
};
|
|
1456
|
-
protoOf(SourceByteReadChannel).
|
|
1457
|
-
if (!(this.
|
|
1567
|
+
protoOf(SourceByteReadChannel).b1g = function (cause) {
|
|
1568
|
+
if (!(this.n1k_1 == null))
|
|
1458
1569
|
return Unit_instance;
|
|
1459
|
-
this.
|
|
1570
|
+
this.m1k_1.o1c();
|
|
1460
1571
|
var tmp = this;
|
|
1461
|
-
var
|
|
1462
|
-
tmp.
|
|
1572
|
+
var tmp1_elvis_lhs = cause == null ? null : cause.message;
|
|
1573
|
+
tmp.n1k_1 = new CloseToken(IOException_init_$Create$_0(tmp1_elvis_lhs == null ? 'Channel was cancelled' : tmp1_elvis_lhs, cause));
|
|
1463
1574
|
};
|
|
1464
1575
|
function decode(_this__u8e3s4, input, max) {
|
|
1465
1576
|
max = max === VOID ? 2147483647 : max;
|
|
1466
1577
|
// Inline function 'kotlin.text.buildString' call
|
|
1467
1578
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
1468
1579
|
var a = toLong(max);
|
|
1469
|
-
var b = input.
|
|
1470
|
-
var capacity = (a.
|
|
1580
|
+
var b = input.s1a().s();
|
|
1581
|
+
var capacity = (a.e1(b) <= 0 ? a : b).j1();
|
|
1471
1582
|
// Inline function 'kotlin.contracts.contract' call
|
|
1472
1583
|
// Inline function 'kotlin.apply' call
|
|
1473
1584
|
var this_0 = StringBuilder_init_$Create$(capacity);
|
|
@@ -1489,7 +1600,7 @@
|
|
|
1489
1600
|
if (!(rc >= 0)) {
|
|
1490
1601
|
// Inline function 'kotlin.check.<anonymous>' call
|
|
1491
1602
|
var message = 'Check failed.';
|
|
1492
|
-
throw IllegalStateException_init_$Create$(
|
|
1603
|
+
throw IllegalStateException_init_$Create$(toString_0(message));
|
|
1493
1604
|
}
|
|
1494
1605
|
start = start + rc | 0;
|
|
1495
1606
|
if (start >= toIndex)
|
|
@@ -1506,51 +1617,47 @@
|
|
|
1506
1617
|
return builder;
|
|
1507
1618
|
}
|
|
1508
1619
|
function canRead(_this__u8e3s4) {
|
|
1509
|
-
return !_this__u8e3s4.
|
|
1620
|
+
return !_this__u8e3s4.t1a();
|
|
1510
1621
|
}
|
|
1511
1622
|
function readBytes(_this__u8e3s4, count) {
|
|
1512
|
-
count = count === VOID ? _this__u8e3s4.
|
|
1623
|
+
count = count === VOID ? _this__u8e3s4.s().j1() : count;
|
|
1513
1624
|
return readByteArray(_this__u8e3s4, count);
|
|
1514
1625
|
}
|
|
1515
1626
|
function BytePacketBuilder() {
|
|
1516
1627
|
return new Buffer();
|
|
1517
1628
|
}
|
|
1518
1629
|
function writePacket_0(_this__u8e3s4, packet) {
|
|
1519
|
-
_this__u8e3s4.
|
|
1630
|
+
_this__u8e3s4.j1c(packet);
|
|
1520
1631
|
}
|
|
1521
1632
|
function build(_this__u8e3s4) {
|
|
1522
|
-
return _this__u8e3s4.
|
|
1633
|
+
return _this__u8e3s4.s1a();
|
|
1523
1634
|
}
|
|
1524
1635
|
function get_size(_this__u8e3s4) {
|
|
1525
|
-
return _this__u8e3s4.
|
|
1636
|
+
return _this__u8e3s4.s1a().s().j1();
|
|
1526
1637
|
}
|
|
1527
1638
|
function writeFully_0(_this__u8e3s4, buffer, offset, length) {
|
|
1528
1639
|
offset = offset === VOID ? 0 : offset;
|
|
1529
1640
|
length = length === VOID ? buffer.length - offset | 0 : length;
|
|
1530
|
-
_this__u8e3s4.
|
|
1641
|
+
_this__u8e3s4.b1c(buffer, offset, offset + length | 0);
|
|
1531
1642
|
}
|
|
1532
1643
|
var ByteReadPacketEmpty;
|
|
1533
|
-
function copy(_this__u8e3s4) {
|
|
1534
|
-
_init_properties_ByteReadPacket_kt__28475y();
|
|
1535
|
-
return _this__u8e3s4.n19().y1a();
|
|
1536
|
-
}
|
|
1537
1644
|
function get_remaining(_this__u8e3s4) {
|
|
1538
1645
|
_init_properties_ByteReadPacket_kt__28475y();
|
|
1539
|
-
return _this__u8e3s4.
|
|
1646
|
+
return _this__u8e3s4.s1a().s();
|
|
1540
1647
|
}
|
|
1541
1648
|
function discard(_this__u8e3s4, count) {
|
|
1542
1649
|
count = count === VOID ? new Long(-1, 2147483647) : count;
|
|
1543
1650
|
_init_properties_ByteReadPacket_kt__28475y();
|
|
1544
|
-
_this__u8e3s4.
|
|
1651
|
+
_this__u8e3s4.v1a(count);
|
|
1545
1652
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
1546
1653
|
var b = get_remaining(_this__u8e3s4);
|
|
1547
|
-
var countToDiscard = count.
|
|
1548
|
-
_this__u8e3s4.
|
|
1654
|
+
var countToDiscard = count.e1(b) <= 0 ? count : b;
|
|
1655
|
+
_this__u8e3s4.s1a().p1b(countToDiscard);
|
|
1549
1656
|
return countToDiscard;
|
|
1550
1657
|
}
|
|
1551
1658
|
function takeWhile(_this__u8e3s4, block) {
|
|
1552
1659
|
_init_properties_ByteReadPacket_kt__28475y();
|
|
1553
|
-
while (!
|
|
1660
|
+
while (!_this__u8e3s4.t1a() && block(_this__u8e3s4.s1a())) {
|
|
1554
1661
|
}
|
|
1555
1662
|
}
|
|
1556
1663
|
var properties_initialized_ByteReadPacket_kt_hw4st4;
|
|
@@ -1563,122 +1670,37 @@
|
|
|
1563
1670
|
function readAvailable_0(_this__u8e3s4, buffer, offset, length) {
|
|
1564
1671
|
offset = offset === VOID ? 0 : offset;
|
|
1565
1672
|
length = length === VOID ? buffer.length - offset | 0 : length;
|
|
1566
|
-
var result = _this__u8e3s4.
|
|
1673
|
+
var result = _this__u8e3s4.q1b(buffer, offset, offset + length | 0);
|
|
1567
1674
|
return result === -1 ? 0 : result;
|
|
1568
1675
|
}
|
|
1569
|
-
function get_isEmpty(_this__u8e3s4) {
|
|
1570
|
-
return _this__u8e3s4.o19();
|
|
1571
|
-
}
|
|
1572
1676
|
function readText_0(_this__u8e3s4, charset, max) {
|
|
1573
|
-
charset = charset === VOID ? Charsets_getInstance().
|
|
1677
|
+
charset = charset === VOID ? Charsets_getInstance().o1k_1 : charset;
|
|
1574
1678
|
max = max === VOID ? 2147483647 : max;
|
|
1575
|
-
if (charset.equals(Charsets_getInstance().
|
|
1679
|
+
if (charset.equals(Charsets_getInstance().o1k_1)) {
|
|
1576
1680
|
if (max === 2147483647)
|
|
1577
1681
|
return readString(_this__u8e3s4);
|
|
1578
1682
|
// Inline function 'kotlin.math.min' call
|
|
1579
|
-
var a = _this__u8e3s4.
|
|
1683
|
+
var a = _this__u8e3s4.s1a().s();
|
|
1580
1684
|
var b = toLong(max);
|
|
1581
|
-
var count = a.
|
|
1685
|
+
var count = a.e1(b) <= 0 ? a : b;
|
|
1582
1686
|
return readString_0(_this__u8e3s4, count);
|
|
1583
1687
|
}
|
|
1584
|
-
return decode(charset.
|
|
1585
|
-
}
|
|
1586
|
-
function readBytes_0(_this__u8e3s4) {
|
|
1587
|
-
return readByteArray_0(_this__u8e3s4);
|
|
1688
|
+
return decode(charset.r1k(), _this__u8e3s4, max);
|
|
1588
1689
|
}
|
|
1589
1690
|
function toByteArray_0(_this__u8e3s4, charset) {
|
|
1590
|
-
charset = charset === VOID ? Charsets_getInstance().
|
|
1591
|
-
if (charset.equals(Charsets_getInstance().
|
|
1691
|
+
charset = charset === VOID ? Charsets_getInstance().o1k_1 : charset;
|
|
1692
|
+
if (charset.equals(Charsets_getInstance().o1k_1))
|
|
1592
1693
|
return encodeToByteArray(_this__u8e3s4, VOID, VOID, true);
|
|
1593
|
-
return encodeToByteArray_0(charset.
|
|
1694
|
+
return encodeToByteArray_0(charset.s1k(), _this__u8e3s4, 0, _this__u8e3s4.length);
|
|
1594
1695
|
}
|
|
1595
1696
|
function writeText(_this__u8e3s4, text, fromIndex, toIndex, charset) {
|
|
1596
1697
|
fromIndex = fromIndex === VOID ? 0 : fromIndex;
|
|
1597
1698
|
toIndex = toIndex === VOID ? charSequenceLength(text) : toIndex;
|
|
1598
|
-
charset = charset === VOID ? Charsets_getInstance().
|
|
1599
|
-
if (charset === Charsets_getInstance().
|
|
1600
|
-
return writeString(_this__u8e3s4,
|
|
1601
|
-
}
|
|
1602
|
-
encodeToImpl(charset.e1i(), _this__u8e3s4, text, fromIndex, toIndex);
|
|
1603
|
-
}
|
|
1604
|
-
function String_0(bytes, offset, length, charset) {
|
|
1605
|
-
offset = offset === VOID ? 0 : offset;
|
|
1606
|
-
length = length === VOID ? bytes.length : length;
|
|
1607
|
-
charset = charset === VOID ? Charsets_getInstance().a1i_1 : charset;
|
|
1608
|
-
var tmp;
|
|
1609
|
-
if (charset.equals(Charsets_getInstance().a1i_1)) {
|
|
1610
|
-
tmp = decodeToString(bytes, offset, offset + length | 0);
|
|
1611
|
-
} else {
|
|
1612
|
-
// Inline function 'io.ktor.utils.io.core.buildPacket' call
|
|
1613
|
-
var builder = new Buffer();
|
|
1614
|
-
// Inline function 'io.ktor.utils.io.core.String.<anonymous>' call
|
|
1615
|
-
writeFully_0(builder, bytes, offset, length);
|
|
1616
|
-
tmp = readText_0(builder, charset);
|
|
1617
|
-
}
|
|
1618
|
-
return tmp;
|
|
1619
|
-
}
|
|
1620
|
-
function get_CLOSED_0() {
|
|
1621
|
-
_init_properties_AwaitingSlot_kt__kf2gs6();
|
|
1622
|
-
return CLOSED_0;
|
|
1623
|
-
}
|
|
1624
|
-
var CLOSED_0;
|
|
1625
|
-
function ClosedSlot(cause) {
|
|
1626
|
-
this.f1i_1 = cause;
|
|
1627
|
-
this.g1i_1 = EmptyCoroutineContext_getInstance();
|
|
1628
|
-
this.h1i_1 = false;
|
|
1629
|
-
this.i1i_1 = !(this.f1i_1 == null);
|
|
1630
|
-
this.j1i_1 = true;
|
|
1631
|
-
}
|
|
1632
|
-
protoOf(ClosedSlot).g9 = function () {
|
|
1633
|
-
return this.g1i_1;
|
|
1634
|
-
};
|
|
1635
|
-
protoOf(ClosedSlot).dn = function () {
|
|
1636
|
-
return this.i1i_1;
|
|
1637
|
-
};
|
|
1638
|
-
protoOf(ClosedSlot).hp = function (token) {
|
|
1639
|
-
this.k1i();
|
|
1640
|
-
};
|
|
1641
|
-
protoOf(ClosedSlot).ip = function (handler) {
|
|
1642
|
-
return Unit_instance;
|
|
1643
|
-
};
|
|
1644
|
-
protoOf(ClosedSlot).l1i = function (_this__u8e3s4, value) {
|
|
1645
|
-
this.k1i();
|
|
1646
|
-
};
|
|
1647
|
-
protoOf(ClosedSlot).jp = function (_this__u8e3s4, value) {
|
|
1648
|
-
return this.l1i(_this__u8e3s4, value instanceof Unit ? value : THROW_CCE());
|
|
1649
|
-
};
|
|
1650
|
-
protoOf(ClosedSlot).m1i = function (value, idempotent, onCancellation) {
|
|
1651
|
-
this.k1i();
|
|
1652
|
-
return null;
|
|
1653
|
-
};
|
|
1654
|
-
protoOf(ClosedSlot).gp = function (value, idempotent, onCancellation) {
|
|
1655
|
-
return this.m1i(value instanceof Unit ? value : THROW_CCE(), idempotent, onCancellation);
|
|
1656
|
-
};
|
|
1657
|
-
protoOf(ClosedSlot).n1i = function (value, onCancellation) {
|
|
1658
|
-
return this.k1i();
|
|
1659
|
-
};
|
|
1660
|
-
protoOf(ClosedSlot).kp = function (value, onCancellation) {
|
|
1661
|
-
return this.n1i(value instanceof Unit ? value : THROW_CCE(), onCancellation);
|
|
1662
|
-
};
|
|
1663
|
-
protoOf(ClosedSlot).o1i = function (result) {
|
|
1664
|
-
return this.k1i();
|
|
1665
|
-
};
|
|
1666
|
-
protoOf(ClosedSlot).l9 = function (result) {
|
|
1667
|
-
return this.o1i(result);
|
|
1668
|
-
};
|
|
1669
|
-
protoOf(ClosedSlot).hashCode = function () {
|
|
1670
|
-
return 777;
|
|
1671
|
-
};
|
|
1672
|
-
protoOf(ClosedSlot).k1i = function () {
|
|
1673
|
-
if (!(this.f1i_1 == null))
|
|
1674
|
-
throw this.f1i_1;
|
|
1675
|
-
};
|
|
1676
|
-
var properties_initialized_AwaitingSlot_kt_eetyxg;
|
|
1677
|
-
function _init_properties_AwaitingSlot_kt__kf2gs6() {
|
|
1678
|
-
if (!properties_initialized_AwaitingSlot_kt_eetyxg) {
|
|
1679
|
-
properties_initialized_AwaitingSlot_kt_eetyxg = true;
|
|
1680
|
-
CLOSED_0 = new ClosedSlot(null);
|
|
1699
|
+
charset = charset === VOID ? Charsets_getInstance().o1k_1 : charset;
|
|
1700
|
+
if (charset === Charsets_getInstance().o1k_1) {
|
|
1701
|
+
return writeString(_this__u8e3s4, toString_0(text), fromIndex, toIndex);
|
|
1681
1702
|
}
|
|
1703
|
+
encodeToImpl(charset.s1k(), _this__u8e3s4, text, fromIndex, toIndex);
|
|
1682
1704
|
}
|
|
1683
1705
|
function get_ByteArrayPool() {
|
|
1684
1706
|
_init_properties_ByteArrayPool_kt__kfi3uj();
|
|
@@ -1688,7 +1710,7 @@
|
|
|
1688
1710
|
function ByteArrayPool$1() {
|
|
1689
1711
|
DefaultPool.call(this, 128);
|
|
1690
1712
|
}
|
|
1691
|
-
protoOf(ByteArrayPool$1).
|
|
1713
|
+
protoOf(ByteArrayPool$1).w1k = function () {
|
|
1692
1714
|
return new Int8Array(4096);
|
|
1693
1715
|
};
|
|
1694
1716
|
var properties_initialized_ByteArrayPool_kt_td6pfh;
|
|
@@ -1698,15 +1720,15 @@
|
|
|
1698
1720
|
ByteArrayPool = new ByteArrayPool$1();
|
|
1699
1721
|
}
|
|
1700
1722
|
}
|
|
1701
|
-
function
|
|
1723
|
+
function Companion_1() {
|
|
1702
1724
|
}
|
|
1703
|
-
protoOf(
|
|
1725
|
+
protoOf(Companion_1).f1l = function (name) {
|
|
1704
1726
|
switch (name) {
|
|
1705
1727
|
case 'UTF-8':
|
|
1706
1728
|
case 'utf-8':
|
|
1707
1729
|
case 'UTF8':
|
|
1708
1730
|
case 'utf8':
|
|
1709
|
-
return Charsets_getInstance().
|
|
1731
|
+
return Charsets_getInstance().o1k_1;
|
|
1710
1732
|
}
|
|
1711
1733
|
var tmp;
|
|
1712
1734
|
var tmp_0;
|
|
@@ -1747,11 +1769,11 @@
|
|
|
1747
1769
|
tmp = name === 'Latin1';
|
|
1748
1770
|
}
|
|
1749
1771
|
if (tmp) {
|
|
1750
|
-
return Charsets_getInstance().
|
|
1772
|
+
return Charsets_getInstance().p1k_1;
|
|
1751
1773
|
}
|
|
1752
1774
|
throw IllegalArgumentException_init_$Create$('Charset ' + name + ' is not supported');
|
|
1753
1775
|
};
|
|
1754
|
-
protoOf(
|
|
1776
|
+
protoOf(Companion_1).g1l = function (charset) {
|
|
1755
1777
|
var tmp;
|
|
1756
1778
|
switch (charset) {
|
|
1757
1779
|
case 'UTF-8':
|
|
@@ -1805,12 +1827,12 @@
|
|
|
1805
1827
|
}
|
|
1806
1828
|
return tmp;
|
|
1807
1829
|
};
|
|
1808
|
-
var
|
|
1809
|
-
function
|
|
1810
|
-
return
|
|
1830
|
+
var Companion_instance_2;
|
|
1831
|
+
function Companion_getInstance_1() {
|
|
1832
|
+
return Companion_instance_2;
|
|
1811
1833
|
}
|
|
1812
1834
|
function Charset(_name) {
|
|
1813
|
-
this.
|
|
1835
|
+
this.q1k_1 = _name;
|
|
1814
1836
|
}
|
|
1815
1837
|
protoOf(Charset).equals = function (other) {
|
|
1816
1838
|
if (this === other)
|
|
@@ -1819,21 +1841,21 @@
|
|
|
1819
1841
|
return false;
|
|
1820
1842
|
if (!(other instanceof Charset))
|
|
1821
1843
|
THROW_CCE();
|
|
1822
|
-
return this.
|
|
1844
|
+
return this.q1k_1 === other.q1k_1;
|
|
1823
1845
|
};
|
|
1824
1846
|
protoOf(Charset).hashCode = function () {
|
|
1825
|
-
return getStringHashCode(this.
|
|
1847
|
+
return getStringHashCode(this.q1k_1);
|
|
1826
1848
|
};
|
|
1827
1849
|
protoOf(Charset).toString = function () {
|
|
1828
|
-
return this.
|
|
1850
|
+
return this.q1k_1;
|
|
1829
1851
|
};
|
|
1830
1852
|
function get_name(_this__u8e3s4) {
|
|
1831
|
-
return _this__u8e3s4.
|
|
1853
|
+
return _this__u8e3s4.q1k_1;
|
|
1832
1854
|
}
|
|
1833
1855
|
function Charsets() {
|
|
1834
1856
|
Charsets_instance = this;
|
|
1835
|
-
this.
|
|
1836
|
-
this.
|
|
1857
|
+
this.o1k_1 = new CharsetImpl('UTF-8');
|
|
1858
|
+
this.p1k_1 = new CharsetImpl('ISO-8859-1');
|
|
1837
1859
|
}
|
|
1838
1860
|
var Charsets_instance;
|
|
1839
1861
|
function Charsets_getInstance() {
|
|
@@ -1846,46 +1868,29 @@
|
|
|
1846
1868
|
captureStack(this, MalformedInputException);
|
|
1847
1869
|
}
|
|
1848
1870
|
function CharsetDecoder(_charset) {
|
|
1849
|
-
this.
|
|
1871
|
+
this.h1l_1 = _charset;
|
|
1850
1872
|
}
|
|
1851
1873
|
function CharsetEncoder(_charset) {
|
|
1852
|
-
this.
|
|
1874
|
+
this.i1l_1 = _charset;
|
|
1853
1875
|
}
|
|
1854
1876
|
function CharsetImpl(name) {
|
|
1855
1877
|
Charset.call(this, name);
|
|
1856
|
-
this.g1j_1 = name;
|
|
1857
1878
|
}
|
|
1858
|
-
protoOf(CharsetImpl).
|
|
1879
|
+
protoOf(CharsetImpl).s1k = function () {
|
|
1859
1880
|
return new CharsetEncoderImpl(this);
|
|
1860
1881
|
};
|
|
1861
|
-
protoOf(CharsetImpl).
|
|
1882
|
+
protoOf(CharsetImpl).r1k = function () {
|
|
1862
1883
|
return new CharsetDecoderImpl(this);
|
|
1863
1884
|
};
|
|
1864
|
-
protoOf(CharsetImpl).toString = function () {
|
|
1865
|
-
return 'CharsetImpl(name=' + this.g1j_1 + ')';
|
|
1866
|
-
};
|
|
1867
|
-
protoOf(CharsetImpl).hashCode = function () {
|
|
1868
|
-
return getStringHashCode(this.g1j_1);
|
|
1869
|
-
};
|
|
1870
|
-
protoOf(CharsetImpl).equals = function (other) {
|
|
1871
|
-
if (this === other)
|
|
1872
|
-
return true;
|
|
1873
|
-
if (!(other instanceof CharsetImpl))
|
|
1874
|
-
return false;
|
|
1875
|
-
var tmp0_other_with_cast = other instanceof CharsetImpl ? other : THROW_CCE();
|
|
1876
|
-
if (!(this.g1j_1 === tmp0_other_with_cast.g1j_1))
|
|
1877
|
-
return false;
|
|
1878
|
-
return true;
|
|
1879
|
-
};
|
|
1880
1885
|
function CharsetEncoderImpl(charset) {
|
|
1881
1886
|
CharsetEncoder.call(this, charset);
|
|
1882
|
-
this.
|
|
1887
|
+
this.l1l_1 = charset;
|
|
1883
1888
|
}
|
|
1884
1889
|
protoOf(CharsetEncoderImpl).toString = function () {
|
|
1885
|
-
return 'CharsetEncoderImpl(charset=' + this.
|
|
1890
|
+
return 'CharsetEncoderImpl(charset=' + this.l1l_1.toString() + ')';
|
|
1886
1891
|
};
|
|
1887
1892
|
protoOf(CharsetEncoderImpl).hashCode = function () {
|
|
1888
|
-
return this.
|
|
1893
|
+
return this.l1l_1.hashCode();
|
|
1889
1894
|
};
|
|
1890
1895
|
protoOf(CharsetEncoderImpl).equals = function (other) {
|
|
1891
1896
|
if (this === other)
|
|
@@ -1893,19 +1898,19 @@
|
|
|
1893
1898
|
if (!(other instanceof CharsetEncoderImpl))
|
|
1894
1899
|
return false;
|
|
1895
1900
|
var tmp0_other_with_cast = other instanceof CharsetEncoderImpl ? other : THROW_CCE();
|
|
1896
|
-
if (!this.
|
|
1901
|
+
if (!this.l1l_1.equals(tmp0_other_with_cast.l1l_1))
|
|
1897
1902
|
return false;
|
|
1898
1903
|
return true;
|
|
1899
1904
|
};
|
|
1900
1905
|
function CharsetDecoderImpl(charset) {
|
|
1901
1906
|
CharsetDecoder.call(this, charset);
|
|
1902
|
-
this.
|
|
1907
|
+
this.n1l_1 = charset;
|
|
1903
1908
|
}
|
|
1904
1909
|
protoOf(CharsetDecoderImpl).toString = function () {
|
|
1905
|
-
return 'CharsetDecoderImpl(charset=' + this.
|
|
1910
|
+
return 'CharsetDecoderImpl(charset=' + this.n1l_1.toString() + ')';
|
|
1906
1911
|
};
|
|
1907
1912
|
protoOf(CharsetDecoderImpl).hashCode = function () {
|
|
1908
|
-
return this.
|
|
1913
|
+
return this.n1l_1.hashCode();
|
|
1909
1914
|
};
|
|
1910
1915
|
protoOf(CharsetDecoderImpl).equals = function (other) {
|
|
1911
1916
|
if (this === other)
|
|
@@ -1913,7 +1918,7 @@
|
|
|
1913
1918
|
if (!(other instanceof CharsetDecoderImpl))
|
|
1914
1919
|
return false;
|
|
1915
1920
|
var tmp0_other_with_cast = other instanceof CharsetDecoderImpl ? other : THROW_CCE();
|
|
1916
|
-
if (!this.
|
|
1921
|
+
if (!this.n1l_1.equals(tmp0_other_with_cast.n1l_1))
|
|
1917
1922
|
return false;
|
|
1918
1923
|
return true;
|
|
1919
1924
|
};
|
|
@@ -1925,14 +1930,14 @@
|
|
|
1925
1930
|
function decode_0(_this__u8e3s4, input, dst, max) {
|
|
1926
1931
|
var decoder = Decoder(get_name(get_charset(_this__u8e3s4)), true);
|
|
1927
1932
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
1928
|
-
var a = input.
|
|
1933
|
+
var a = input.s1a().s();
|
|
1929
1934
|
var b = toLong(max);
|
|
1930
|
-
var count = a.
|
|
1931
|
-
var tmp = readByteArray(input, count.
|
|
1935
|
+
var count = a.e1(b) <= 0 ? a : b;
|
|
1936
|
+
var tmp = readByteArray(input, count.j1());
|
|
1932
1937
|
var array = tmp instanceof Int8Array ? tmp : THROW_CCE();
|
|
1933
1938
|
var tmp_0;
|
|
1934
1939
|
try {
|
|
1935
|
-
tmp_0 = decoder.
|
|
1940
|
+
tmp_0 = decoder.o1l(array);
|
|
1936
1941
|
} catch ($p) {
|
|
1937
1942
|
var tmp_1;
|
|
1938
1943
|
if ($p instanceof Error) {
|
|
@@ -1944,7 +1949,7 @@
|
|
|
1944
1949
|
}
|
|
1945
1950
|
}
|
|
1946
1951
|
var result = tmp_0;
|
|
1947
|
-
dst.
|
|
1952
|
+
dst.l(result);
|
|
1948
1953
|
return result.length;
|
|
1949
1954
|
}
|
|
1950
1955
|
function encodeToByteArrayImpl(_this__u8e3s4, input, fromIndex, toIndex) {
|
|
@@ -1963,7 +1968,7 @@
|
|
|
1963
1968
|
return readByteArray_0(dst);
|
|
1964
1969
|
}
|
|
1965
1970
|
function get_charset(_this__u8e3s4) {
|
|
1966
|
-
return _this__u8e3s4.
|
|
1971
|
+
return _this__u8e3s4.h1l_1;
|
|
1967
1972
|
}
|
|
1968
1973
|
function encodeImpl(_this__u8e3s4, input, fromIndex, toIndex, dst) {
|
|
1969
1974
|
// Inline function 'kotlin.require' call
|
|
@@ -1973,35 +1978,35 @@
|
|
|
1973
1978
|
if (!(fromIndex <= toIndex)) {
|
|
1974
1979
|
// Inline function 'kotlin.require.<anonymous>' call
|
|
1975
1980
|
var message = 'Failed requirement.';
|
|
1976
|
-
throw IllegalArgumentException_init_$Create$(
|
|
1981
|
+
throw IllegalArgumentException_init_$Create$(toString_0(message));
|
|
1977
1982
|
}
|
|
1978
|
-
if (get_charset_0(_this__u8e3s4).equals(Charsets_getInstance().
|
|
1983
|
+
if (get_charset_0(_this__u8e3s4).equals(Charsets_getInstance().p1k_1)) {
|
|
1979
1984
|
return encodeISO88591(input, fromIndex, toIndex, dst);
|
|
1980
1985
|
}
|
|
1981
1986
|
// Inline function 'kotlin.require' call
|
|
1982
1987
|
// Inline function 'kotlin.contracts.contract' call
|
|
1983
|
-
if (!(get_charset_0(_this__u8e3s4) === Charsets_getInstance().
|
|
1988
|
+
if (!(get_charset_0(_this__u8e3s4) === Charsets_getInstance().o1k_1)) {
|
|
1984
1989
|
// Inline function 'io.ktor.utils.io.charsets.encodeImpl.<anonymous>' call
|
|
1985
1990
|
var message_0 = 'Only UTF-8 encoding is supported in JS';
|
|
1986
|
-
throw IllegalArgumentException_init_$Create$(
|
|
1991
|
+
throw IllegalArgumentException_init_$Create$(toString_0(message_0));
|
|
1987
1992
|
}
|
|
1988
1993
|
var encoder = new TextEncoder();
|
|
1989
1994
|
// Inline function 'kotlin.text.substring' call
|
|
1990
|
-
var tmp$ret$2 =
|
|
1995
|
+
var tmp$ret$2 = toString_0(charSequenceSubSequence(input, fromIndex, toIndex));
|
|
1991
1996
|
var result = encoder.encode(tmp$ret$2);
|
|
1992
1997
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1993
1998
|
// Inline function 'kotlin.js.asDynamic' call
|
|
1994
|
-
dst.
|
|
1999
|
+
dst.e1c(result);
|
|
1995
2000
|
return result.length;
|
|
1996
2001
|
}
|
|
1997
2002
|
function get_charset_0(_this__u8e3s4) {
|
|
1998
|
-
return _this__u8e3s4.
|
|
2003
|
+
return _this__u8e3s4.i1l_1;
|
|
1999
2004
|
}
|
|
2000
2005
|
function forName(_this__u8e3s4, name) {
|
|
2001
|
-
return
|
|
2006
|
+
return Companion_instance_2.f1l(name);
|
|
2002
2007
|
}
|
|
2003
2008
|
function isSupported(_this__u8e3s4, name) {
|
|
2004
|
-
return
|
|
2009
|
+
return Companion_instance_2.g1l(name);
|
|
2005
2010
|
}
|
|
2006
2011
|
function Decoder(encoding, fatal) {
|
|
2007
2012
|
fatal = fatal === VOID ? true : fatal;
|
|
@@ -2036,10 +2041,10 @@
|
|
|
2036
2041
|
return this_0;
|
|
2037
2042
|
}
|
|
2038
2043
|
function toKtor$1($this_toKtor) {
|
|
2039
|
-
this.
|
|
2044
|
+
this.p1l_1 = $this_toKtor;
|
|
2040
2045
|
}
|
|
2041
|
-
protoOf(toKtor$1).
|
|
2042
|
-
return this.
|
|
2046
|
+
protoOf(toKtor$1).o1l = function (buffer) {
|
|
2047
|
+
return this.p1l_1.decode(buffer);
|
|
2043
2048
|
};
|
|
2044
2049
|
function get_ENCODING_ALIASES() {
|
|
2045
2050
|
_init_properties_TextDecoderFallback_js_kt__an7r6m();
|
|
@@ -2052,20 +2057,20 @@
|
|
|
2052
2057
|
}
|
|
2053
2058
|
var REPLACEMENT;
|
|
2054
2059
|
function TextDecoderFallback(encoding, fatal) {
|
|
2055
|
-
this.
|
|
2060
|
+
this.q1l_1 = fatal;
|
|
2056
2061
|
// Inline function 'kotlin.text.lowercase' call
|
|
2057
2062
|
// Inline function 'kotlin.text.trim' call
|
|
2058
2063
|
// Inline function 'kotlin.js.asDynamic' call
|
|
2059
|
-
var requestedEncoding =
|
|
2064
|
+
var requestedEncoding = toString_0(trim(isCharSequence(encoding) ? encoding : THROW_CCE())).toLowerCase();
|
|
2060
2065
|
// Inline function 'kotlin.check' call
|
|
2061
2066
|
// Inline function 'kotlin.contracts.contract' call
|
|
2062
|
-
if (!get_ENCODING_ALIASES().
|
|
2067
|
+
if (!get_ENCODING_ALIASES().x1(requestedEncoding)) {
|
|
2063
2068
|
// Inline function 'io.ktor.utils.io.charsets.TextDecoderFallback.<anonymous>' call
|
|
2064
2069
|
var message = encoding + ' is not supported.';
|
|
2065
|
-
throw IllegalStateException_init_$Create$(
|
|
2070
|
+
throw IllegalStateException_init_$Create$(toString_0(message));
|
|
2066
2071
|
}
|
|
2067
2072
|
}
|
|
2068
|
-
protoOf(TextDecoderFallback).
|
|
2073
|
+
protoOf(TextDecoderFallback).o1l = function (buffer) {
|
|
2069
2074
|
// Inline function 'io.ktor.utils.io.core.buildPacket' call
|
|
2070
2075
|
var builder = new Buffer();
|
|
2071
2076
|
// Inline function 'io.ktor.utils.io.charsets.TextDecoderFallback.decode.<anonymous>' call
|
|
@@ -2083,21 +2088,21 @@
|
|
|
2083
2088
|
if (point < 0) {
|
|
2084
2089
|
// Inline function 'kotlin.check' call
|
|
2085
2090
|
// Inline function 'kotlin.contracts.contract' call
|
|
2086
|
-
if (!!this.
|
|
2091
|
+
if (!!this.q1l_1) {
|
|
2087
2092
|
// Inline function 'io.ktor.utils.io.charsets.TextDecoderFallback.decode.<anonymous>.<anonymous>' call
|
|
2088
2093
|
var message = 'Invalid character: ' + point;
|
|
2089
|
-
throw IllegalStateException_init_$Create$(
|
|
2094
|
+
throw IllegalStateException_init_$Create$(toString_0(message));
|
|
2090
2095
|
}
|
|
2091
2096
|
writeFully_0(builder, get_REPLACEMENT());
|
|
2092
2097
|
continue $l$loop;
|
|
2093
2098
|
}
|
|
2094
2099
|
if (point > 255) {
|
|
2095
|
-
builder.
|
|
2100
|
+
builder.k1c(toByte(point >> 8));
|
|
2096
2101
|
}
|
|
2097
|
-
builder.
|
|
2102
|
+
builder.k1c(toByte(point & 255));
|
|
2098
2103
|
}
|
|
2099
2104
|
while (inductionVariable < last);
|
|
2100
|
-
return
|
|
2105
|
+
return decodeToString(readByteArray_0(builder));
|
|
2101
2106
|
};
|
|
2102
2107
|
function toCodePoint(_this__u8e3s4) {
|
|
2103
2108
|
_init_properties_TextDecoderFallback_js_kt__an7r6m();
|
|
@@ -2134,7 +2139,7 @@
|
|
|
2134
2139
|
if (character > 255) {
|
|
2135
2140
|
failedToMapError(character);
|
|
2136
2141
|
}
|
|
2137
|
-
dst.
|
|
2142
|
+
dst.k1c(toByte(character));
|
|
2138
2143
|
}
|
|
2139
2144
|
while (inductionVariable < toIndex);
|
|
2140
2145
|
return toIndex - fromIndex | 0;
|
|
@@ -2156,48 +2161,52 @@
|
|
|
2156
2161
|
}
|
|
2157
2162
|
}
|
|
2158
2163
|
function DefaultPool(capacity) {
|
|
2159
|
-
this.
|
|
2164
|
+
this.x1k_1 = capacity;
|
|
2160
2165
|
var tmp = this;
|
|
2161
2166
|
// Inline function 'kotlin.arrayOfNulls' call
|
|
2162
|
-
var size = this.
|
|
2163
|
-
tmp.
|
|
2164
|
-
this.
|
|
2167
|
+
var size = this.x1k_1;
|
|
2168
|
+
tmp.y1k_1 = fillArrayVal(Array(size), null);
|
|
2169
|
+
this.z1k_1 = 0;
|
|
2165
2170
|
}
|
|
2166
|
-
protoOf(DefaultPool).
|
|
2171
|
+
protoOf(DefaultPool).a1l = function (instance) {
|
|
2167
2172
|
};
|
|
2168
|
-
protoOf(DefaultPool).
|
|
2173
|
+
protoOf(DefaultPool).b1l = function (instance) {
|
|
2169
2174
|
return instance;
|
|
2170
2175
|
};
|
|
2171
|
-
protoOf(DefaultPool).
|
|
2176
|
+
protoOf(DefaultPool).c1l = function (instance) {
|
|
2172
2177
|
};
|
|
2173
|
-
protoOf(DefaultPool).
|
|
2174
|
-
if (this.
|
|
2175
|
-
return this.
|
|
2176
|
-
this.
|
|
2177
|
-
var idx = this.
|
|
2178
|
-
var tmp = this.
|
|
2178
|
+
protoOf(DefaultPool).d1l = function () {
|
|
2179
|
+
if (this.z1k_1 === 0)
|
|
2180
|
+
return this.w1k();
|
|
2181
|
+
this.z1k_1 = this.z1k_1 - 1 | 0;
|
|
2182
|
+
var idx = this.z1k_1;
|
|
2183
|
+
var tmp = this.y1k_1[idx];
|
|
2179
2184
|
var instance = !(tmp == null) ? tmp : THROW_CCE();
|
|
2180
|
-
this.
|
|
2181
|
-
return this.
|
|
2185
|
+
this.y1k_1[idx] = null;
|
|
2186
|
+
return this.b1l(instance);
|
|
2182
2187
|
};
|
|
2183
|
-
protoOf(DefaultPool).
|
|
2184
|
-
this.
|
|
2185
|
-
if (this.
|
|
2186
|
-
this.
|
|
2188
|
+
protoOf(DefaultPool).e1l = function (instance) {
|
|
2189
|
+
this.c1l(instance);
|
|
2190
|
+
if (this.z1k_1 === this.x1k_1) {
|
|
2191
|
+
this.a1l(instance);
|
|
2187
2192
|
} else {
|
|
2188
|
-
var _unary__edvuaz = this.
|
|
2189
|
-
this.
|
|
2190
|
-
this.
|
|
2193
|
+
var _unary__edvuaz = this.z1k_1;
|
|
2194
|
+
this.z1k_1 = _unary__edvuaz + 1 | 0;
|
|
2195
|
+
this.y1k_1[_unary__edvuaz] = instance;
|
|
2191
2196
|
}
|
|
2192
2197
|
};
|
|
2193
2198
|
//region block: post-declaration
|
|
2194
|
-
protoOf(
|
|
2195
|
-
protoOf(
|
|
2196
|
-
protoOf(
|
|
2199
|
+
protoOf(Read).w1d = resume;
|
|
2200
|
+
protoOf(Read).x1d = resume_0;
|
|
2201
|
+
protoOf(Write).w1d = resume;
|
|
2202
|
+
protoOf(Write).x1d = resume_0;
|
|
2203
|
+
protoOf(ByteChannel).z1f = awaitContent$default;
|
|
2204
|
+
protoOf(ByteReadChannel$Companion$Empty$1).z1f = awaitContent$default;
|
|
2205
|
+
protoOf(SourceByteReadChannel).z1f = awaitContent$default;
|
|
2197
2206
|
//endregion
|
|
2198
2207
|
//region block: init
|
|
2199
|
-
|
|
2200
|
-
|
|
2208
|
+
Empty_instance = new Empty();
|
|
2209
|
+
Companion_instance_2 = new Companion_1();
|
|
2201
2210
|
//endregion
|
|
2202
2211
|
//region block: exports
|
|
2203
2212
|
_.$_$ = _.$_$ || {};
|
|
@@ -2209,7 +2218,7 @@
|
|
|
2209
2218
|
_.$_$.f = writeFully;
|
|
2210
2219
|
_.$_$.g = writePacket;
|
|
2211
2220
|
_.$_$.h = Charsets_getInstance;
|
|
2212
|
-
_.$_$.i =
|
|
2221
|
+
_.$_$.i = Companion_getInstance_0;
|
|
2213
2222
|
_.$_$.j = MalformedInputException;
|
|
2214
2223
|
_.$_$.k = decode;
|
|
2215
2224
|
_.$_$.l = encode;
|
|
@@ -2217,33 +2226,30 @@
|
|
|
2217
2226
|
_.$_$.n = isSupported;
|
|
2218
2227
|
_.$_$.o = get_name;
|
|
2219
2228
|
_.$_$.p = BytePacketBuilder;
|
|
2220
|
-
_.$_$.q =
|
|
2221
|
-
_.$_$.r =
|
|
2222
|
-
_.$_$.s =
|
|
2223
|
-
_.$_$.t =
|
|
2224
|
-
_.$_$.u =
|
|
2225
|
-
_.$_$.v =
|
|
2226
|
-
_.$_$.w =
|
|
2227
|
-
_.$_$.x =
|
|
2228
|
-
_.$_$.y =
|
|
2229
|
-
_.$_$.z =
|
|
2230
|
-
_.$_$.a1 =
|
|
2231
|
-
_.$_$.b1 =
|
|
2232
|
-
_.$_$.c1 =
|
|
2233
|
-
_.$_$.d1 =
|
|
2234
|
-
_.$_$.e1 =
|
|
2235
|
-
_.$_$.f1 =
|
|
2236
|
-
_.$_$.g1 =
|
|
2237
|
-
_.$_$.h1 =
|
|
2238
|
-
_.$_$.i1 =
|
|
2239
|
-
_.$_$.j1 =
|
|
2240
|
-
_.$_$.k1 =
|
|
2241
|
-
_.$_$.l1 =
|
|
2242
|
-
_.$_$.m1 = readText;
|
|
2243
|
-
_.$_$.n1 = release;
|
|
2244
|
-
_.$_$.o1 = writer;
|
|
2229
|
+
_.$_$.q = build;
|
|
2230
|
+
_.$_$.r = canRead;
|
|
2231
|
+
_.$_$.s = discard;
|
|
2232
|
+
_.$_$.t = readAvailable_0;
|
|
2233
|
+
_.$_$.u = readText_0;
|
|
2234
|
+
_.$_$.v = get_remaining;
|
|
2235
|
+
_.$_$.w = takeWhile;
|
|
2236
|
+
_.$_$.x = toByteArray_0;
|
|
2237
|
+
_.$_$.y = writeFully_0;
|
|
2238
|
+
_.$_$.z = writePacket_0;
|
|
2239
|
+
_.$_$.a1 = writeText;
|
|
2240
|
+
_.$_$.b1 = get_ByteArrayPool;
|
|
2241
|
+
_.$_$.c1 = ByteReadChannel;
|
|
2242
|
+
_.$_$.d1 = ByteReadChannel_1;
|
|
2243
|
+
_.$_$.e1 = WriterScope;
|
|
2244
|
+
_.$_$.f1 = get_availableForRead;
|
|
2245
|
+
_.$_$.g1 = cancel_0;
|
|
2246
|
+
_.$_$.h1 = close;
|
|
2247
|
+
_.$_$.i1 = invokeOnCompletion;
|
|
2248
|
+
_.$_$.j1 = get_isCompleted;
|
|
2249
|
+
_.$_$.k1 = readText;
|
|
2250
|
+
_.$_$.l1 = writer;
|
|
2245
2251
|
//endregion
|
|
2246
2252
|
return _;
|
|
2247
|
-
}(module.exports, require('./kotlin-kotlin-stdlib.js'), require('./kotlinx-coroutines-core.js'), require('./kotlinx-
|
|
2253
|
+
}(module.exports, require('./kotlin-kotlin-stdlib.js'), require('./kotlinx-coroutines-core.js'), require('./kotlinx-io-kotlinx-io-core.js'), require('./kotlinx-atomicfu.js')));
|
|
2248
2254
|
|
|
2249
2255
|
//# sourceMappingURL=ktor-ktor-io.js.map
|