raspberry_games_server_game_logic 1.8.451 → 1.8.453
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/Kosi-Kaverit-kaverit.js +92 -92
- package/Kosi-Kaverit-kaverit.js.map +1 -1
- package/Kosi-Kodein-kodein-di.js +823 -783
- package/Kosi-Kodein-kodein-di.js.map +1 -1
- package/Kotlin-DateTime-library-kotlinx-datetime.js +1919 -1919
- package/Kotlin-DateTime-library-kotlinx-datetime.js.map +1 -1
- package/Logic_Debertz-ai_module.js +684 -688
- package/Logic_Debertz-ai_module.js.map +1 -1
- package/Logic_Debertz-core.js +2039 -2051
- package/Logic_Debertz-core.js.map +1 -1
- package/Logic_Debertz-engine.js +19206 -19216
- package/Logic_Debertz-engine.js.map +1 -1
- package/Logic_Debertz-game_server.d.ts +756 -669
- package/Logic_Debertz-game_server.js +2258 -2267
- package/Logic_Debertz-game_server.js.map +1 -1
- package/error-library-error.js +7 -7
- package/kotlin-kotlin-stdlib.js +5743 -4870
- package/kotlin-kotlin-stdlib.js.map +1 -1
- package/kotlinx-atomicfu.js +22 -22
- package/kotlinx-coroutines-core.js +3320 -3269
- package/kotlinx-coroutines-core.js.map +1 -1
- package/kotlinx-io-kotlinx-io-bytestring.js +204 -5
- package/kotlinx-io-kotlinx-io-bytestring.js.map +1 -1
- package/kotlinx-io-kotlinx-io-core.js +1689 -428
- package/kotlinx-io-kotlinx-io-core.js.map +1 -1
- package/kotlinx-serialization-kotlinx-serialization-core.js +2253 -2252
- package/kotlinx-serialization-kotlinx-serialization-core.js.map +1 -1
- package/kotlinx-serialization-kotlinx-serialization-json-io.js +15 -0
- package/kotlinx-serialization-kotlinx-serialization-json.js +1626 -1626
- package/kotlinx-serialization-kotlinx-serialization-json.js.map +1 -1
- package/ktor-ktor-client-content-negotiation.js +457 -395
- package/ktor-ktor-client-content-negotiation.js.map +1 -1
- package/ktor-ktor-client-core.js +6683 -3979
- package/ktor-ktor-client-core.js.map +1 -1
- package/ktor-ktor-client-logging.js +2626 -892
- package/ktor-ktor-client-logging.js.map +1 -1
- package/ktor-ktor-events.js +14 -14
- package/ktor-ktor-events.js.map +1 -1
- package/ktor-ktor-http-cio.js +2278 -0
- package/ktor-ktor-http-cio.js.map +1 -0
- package/ktor-ktor-http.js +1274 -1134
- package/ktor-ktor-http.js.map +1 -1
- package/ktor-ktor-io.js +2598 -5514
- package/ktor-ktor-io.js.map +1 -1
- package/ktor-ktor-serialization-kotlinx-json.js +8 -8
- package/ktor-ktor-serialization-kotlinx-json.js.map +1 -1
- package/ktor-ktor-serialization-kotlinx.js +332 -338
- package/ktor-ktor-serialization-kotlinx.js.map +1 -1
- package/ktor-ktor-serialization.js +143 -153
- package/ktor-ktor-serialization.js.map +1 -1
- package/{ktor-ktor-client-js.js → ktor-ktor-sse.js} +2 -2
- package/ktor-ktor-sse.js.map +1 -0
- package/ktor-ktor-utils.js +1708 -1141
- package/ktor-ktor-utils.js.map +1 -1
- package/ktor-ktor-websockets.js +123 -136
- package/ktor-ktor-websockets.js.map +1 -1
- package/package.json +2 -4
- package/random-library-crypto-rand.js +15 -15
- package/random-library-crypto-rand.js.map +1 -1
- package/random-library-secure-random.js +10 -10
- package/random-library-secure-random.js.map +1 -1
- package/raspberry-cardgame-lib-core.js +365 -366
- package/raspberry-cardgame-lib-core.js.map +1 -1
- package/raspberry-cardgame-lib-logger.js +120 -121
- package/raspberry-cardgame-lib-logger.js.map +1 -1
- package/raspberry-cardgame-lib-random.js +1181 -1207
- package/raspberry-cardgame-lib-random.js.map +1 -1
- package/uuid.js +38 -38
- package/uuid.js.map +1 -1
- /package/{ktor-ktor-client-js.js.map → kotlinx-serialization-kotlinx-serialization-json-io.js.map} +0 -0
|
@@ -1,69 +1,95 @@
|
|
|
1
1
|
(function (factory) {
|
|
2
2
|
if (typeof define === 'function' && define.amd)
|
|
3
|
-
define(['exports', './kotlin-kotlin-stdlib.js'], factory);
|
|
3
|
+
define(['exports', './kotlin-kotlin-stdlib.js', './kotlinx-io-kotlinx-io-bytestring.js'], factory);
|
|
4
4
|
else if (typeof exports === 'object')
|
|
5
|
-
factory(module.exports, require('./kotlin-kotlin-stdlib.js'));
|
|
5
|
+
factory(module.exports, require('./kotlin-kotlin-stdlib.js'), require('./kotlinx-io-kotlinx-io-bytestring.js'));
|
|
6
6
|
else {
|
|
7
7
|
if (typeof globalThis['kotlin-kotlin-stdlib'] === 'undefined') {
|
|
8
8
|
throw new Error("Error loading module 'kotlinx-io-kotlinx-io-core'. Its dependency 'kotlin-kotlin-stdlib' was not found. Please, check whether 'kotlin-kotlin-stdlib' is loaded prior to 'kotlinx-io-kotlinx-io-core'.");
|
|
9
9
|
}
|
|
10
|
-
|
|
10
|
+
if (typeof globalThis['kotlinx-io-kotlinx-io-bytestring'] === 'undefined') {
|
|
11
|
+
throw new Error("Error loading module 'kotlinx-io-kotlinx-io-core'. Its dependency 'kotlinx-io-kotlinx-io-bytestring' was not found. Please, check whether 'kotlinx-io-kotlinx-io-bytestring' is loaded prior to 'kotlinx-io-kotlinx-io-core'.");
|
|
12
|
+
}
|
|
13
|
+
globalThis['kotlinx-io-kotlinx-io-core'] = factory(typeof globalThis['kotlinx-io-kotlinx-io-core'] === 'undefined' ? {} : globalThis['kotlinx-io-kotlinx-io-core'], globalThis['kotlin-kotlin-stdlib'], globalThis['kotlinx-io-kotlinx-io-bytestring']);
|
|
11
14
|
}
|
|
12
|
-
}(function (_, kotlin_kotlin) {
|
|
15
|
+
}(function (_, kotlin_kotlin, kotlin_org_jetbrains_kotlinx_kotlinx_io_bytestring) {
|
|
13
16
|
'use strict';
|
|
14
17
|
//region block: imports
|
|
15
18
|
var imul = Math.imul;
|
|
16
|
-
var IndexOutOfBoundsException_init_$Create$ = kotlin_kotlin.$_$.
|
|
17
|
-
var Long = kotlin_kotlin.$_$.
|
|
18
|
-
var compare = kotlin_kotlin.$_$.
|
|
19
|
-
var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.
|
|
20
|
-
var subtract = kotlin_kotlin.$_$.
|
|
21
|
-
var _Char___init__impl__6a9atx = kotlin_kotlin.$_$.
|
|
22
|
-
var charArrayOf = kotlin_kotlin.$_$.
|
|
23
|
-
var protoOf = kotlin_kotlin.$_$.
|
|
24
|
-
var equalsLong = kotlin_kotlin.$_$.
|
|
25
|
-
var
|
|
26
|
-
var
|
|
27
|
-
var
|
|
28
|
-
var
|
|
29
|
-
var
|
|
30
|
-
var
|
|
31
|
-
var
|
|
32
|
-
var
|
|
33
|
-
var
|
|
34
|
-
var objectCreate = kotlin_kotlin.$_$.kd;
|
|
35
|
-
var initMetadataForCompanion = kotlin_kotlin.$_$.mc;
|
|
36
|
-
var arrayCopy = kotlin_kotlin.$_$.x5;
|
|
37
|
-
var IllegalArgumentException_init_$Create$_0 = kotlin_kotlin.$_$.j1;
|
|
38
|
-
var initMetadataForObject = kotlin_kotlin.$_$.qc;
|
|
19
|
+
var IndexOutOfBoundsException_init_$Create$ = kotlin_kotlin.$_$.u1;
|
|
20
|
+
var Long = kotlin_kotlin.$_$.ci;
|
|
21
|
+
var compare = kotlin_kotlin.$_$.ib;
|
|
22
|
+
var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.n1;
|
|
23
|
+
var subtract = kotlin_kotlin.$_$.zb;
|
|
24
|
+
var _Char___init__impl__6a9atx = kotlin_kotlin.$_$.n2;
|
|
25
|
+
var charArrayOf = kotlin_kotlin.$_$.gc;
|
|
26
|
+
var protoOf = kotlin_kotlin.$_$.wd;
|
|
27
|
+
var equalsLong = kotlin_kotlin.$_$.nb;
|
|
28
|
+
var toString = kotlin_kotlin.$_$.zd;
|
|
29
|
+
var Unit_instance = kotlin_kotlin.$_$.h5;
|
|
30
|
+
var toShort = kotlin_kotlin.$_$.yd;
|
|
31
|
+
var add = kotlin_kotlin.$_$.eb;
|
|
32
|
+
var ensureNotNull = kotlin_kotlin.$_$.zi;
|
|
33
|
+
var fromInt = kotlin_kotlin.$_$.ob;
|
|
34
|
+
var convertToInt = kotlin_kotlin.$_$.kb;
|
|
35
|
+
var StringBuilder_init_$Create$ = kotlin_kotlin.$_$.a1;
|
|
36
|
+
var initMetadataForClass = kotlin_kotlin.$_$.vc;
|
|
39
37
|
var VOID = kotlin_kotlin.$_$.b;
|
|
40
|
-
var
|
|
41
|
-
var
|
|
42
|
-
var
|
|
43
|
-
var
|
|
44
|
-
var
|
|
45
|
-
var
|
|
46
|
-
var
|
|
47
|
-
var
|
|
48
|
-
var
|
|
49
|
-
var
|
|
50
|
-
var
|
|
51
|
-
var
|
|
52
|
-
var
|
|
53
|
-
var
|
|
54
|
-
var
|
|
55
|
-
var
|
|
56
|
-
var
|
|
57
|
-
var
|
|
58
|
-
var
|
|
59
|
-
var
|
|
60
|
-
var
|
|
61
|
-
var
|
|
62
|
-
var
|
|
38
|
+
var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.r1;
|
|
39
|
+
var UnsafeByteStringOperations_instance = kotlin_org_jetbrains_kotlinx_kotlinx_io_bytestring.$_$.b;
|
|
40
|
+
var AutoCloseable = kotlin_kotlin.$_$.qh;
|
|
41
|
+
var objectCreate = kotlin_kotlin.$_$.vd;
|
|
42
|
+
var initMetadataForCompanion = kotlin_kotlin.$_$.wc;
|
|
43
|
+
var arrayCopy = kotlin_kotlin.$_$.z5;
|
|
44
|
+
var toByte = kotlin_kotlin.$_$.xd;
|
|
45
|
+
var IllegalArgumentException_init_$Create$_0 = kotlin_kotlin.$_$.l1;
|
|
46
|
+
var initMetadataForObject = kotlin_kotlin.$_$.bd;
|
|
47
|
+
var initMetadataForInterface = kotlin_kotlin.$_$.zc;
|
|
48
|
+
var multiply = kotlin_kotlin.$_$.tb;
|
|
49
|
+
var charCodeAt = kotlin_kotlin.$_$.ic;
|
|
50
|
+
var Char__toInt_impl_vasixd = kotlin_kotlin.$_$.t2;
|
|
51
|
+
var StringBuilder_init_$Create$_0 = kotlin_kotlin.$_$.b1;
|
|
52
|
+
var charSequenceLength = kotlin_kotlin.$_$.kc;
|
|
53
|
+
var endsWith = kotlin_kotlin.$_$.nf;
|
|
54
|
+
var startsWith = kotlin_kotlin.$_$.jg;
|
|
55
|
+
var substring = kotlin_kotlin.$_$.qg;
|
|
56
|
+
var charArray = kotlin_kotlin.$_$.hc;
|
|
57
|
+
var numberToChar = kotlin_kotlin.$_$.td;
|
|
58
|
+
var concatToString = kotlin_kotlin.$_$.gf;
|
|
59
|
+
var Exception_init_$Init$ = kotlin_kotlin.$_$.f1;
|
|
60
|
+
var captureStack = kotlin_kotlin.$_$.fc;
|
|
61
|
+
var Exception_init_$Init$_0 = kotlin_kotlin.$_$.g1;
|
|
62
|
+
var Exception_init_$Init$_1 = kotlin_kotlin.$_$.i1;
|
|
63
|
+
var Exception = kotlin_kotlin.$_$.zh;
|
|
64
|
+
var KProperty0 = kotlin_kotlin.$_$.ue;
|
|
65
|
+
var getPropertyCallableRef = kotlin_kotlin.$_$.sc;
|
|
66
|
+
var UnsupportedOperationException_init_$Create$ = kotlin_kotlin.$_$.f2;
|
|
67
|
+
var lazy = kotlin_kotlin.$_$.fj;
|
|
68
|
+
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.i;
|
|
69
|
+
var asReversed = kotlin_kotlin.$_$.b6;
|
|
70
|
+
var contains = kotlin_kotlin.$_$.if;
|
|
71
|
+
var getStringHashCode = kotlin_kotlin.$_$.tc;
|
|
72
|
+
var Char = kotlin_kotlin.$_$.sh;
|
|
63
73
|
//endregion
|
|
64
74
|
//region block: pre-declaration
|
|
65
|
-
|
|
66
|
-
|
|
75
|
+
initMetadataForInterface(Source, 'Source', VOID, VOID, [AutoCloseable]);
|
|
76
|
+
function write$default(source, startIndex, endIndex, $super) {
|
|
77
|
+
startIndex = startIndex === VOID ? 0 : startIndex;
|
|
78
|
+
endIndex = endIndex === VOID ? source.length : endIndex;
|
|
79
|
+
var tmp;
|
|
80
|
+
if ($super === VOID) {
|
|
81
|
+
this.n1o(source, startIndex, endIndex);
|
|
82
|
+
tmp = Unit_instance;
|
|
83
|
+
} else {
|
|
84
|
+
tmp = $super.n1o.call(this, source, startIndex, endIndex);
|
|
85
|
+
}
|
|
86
|
+
return tmp;
|
|
87
|
+
}
|
|
88
|
+
initMetadataForInterface(Sink, 'Sink', VOID, VOID, [AutoCloseable]);
|
|
89
|
+
initMetadataForClass(Buffer, 'Buffer', Buffer, VOID, [Source, Sink]);
|
|
90
|
+
initMetadataForClass(PeekSource, 'PeekSource', VOID, VOID, [AutoCloseable]);
|
|
91
|
+
initMetadataForClass(RealSink, 'RealSink', VOID, VOID, [Sink]);
|
|
92
|
+
initMetadataForClass(RealSource, 'RealSource', VOID, VOID, [Source]);
|
|
67
93
|
initMetadataForCompanion(Companion);
|
|
68
94
|
initMetadataForClass(Segment, 'Segment');
|
|
69
95
|
initMetadataForClass(SegmentCopyTracker, 'SegmentCopyTracker');
|
|
@@ -72,10 +98,10 @@
|
|
|
72
98
|
mustExist = mustExist === VOID ? true : mustExist;
|
|
73
99
|
var tmp;
|
|
74
100
|
if ($super === VOID) {
|
|
75
|
-
this.
|
|
101
|
+
this.g1q(path, mustExist);
|
|
76
102
|
tmp = Unit_instance;
|
|
77
103
|
} else {
|
|
78
|
-
tmp = $super.
|
|
104
|
+
tmp = $super.g1q.call(this, path, mustExist);
|
|
79
105
|
}
|
|
80
106
|
return tmp;
|
|
81
107
|
}
|
|
@@ -83,10 +109,10 @@
|
|
|
83
109
|
mustCreate = mustCreate === VOID ? false : mustCreate;
|
|
84
110
|
var tmp;
|
|
85
111
|
if ($super === VOID) {
|
|
86
|
-
this.
|
|
112
|
+
this.i1q(path, mustCreate);
|
|
87
113
|
tmp = Unit_instance;
|
|
88
114
|
} else {
|
|
89
|
-
tmp = $super.
|
|
115
|
+
tmp = $super.i1q.call(this, path, mustCreate);
|
|
90
116
|
}
|
|
91
117
|
return tmp;
|
|
92
118
|
}
|
|
@@ -103,7 +129,7 @@
|
|
|
103
129
|
initMetadataForClass(FileNotFoundException, 'FileNotFoundException', VOID, IOException);
|
|
104
130
|
initMetadataForClass(SystemFileSystem$1, VOID, VOID, SystemFileSystemImpl);
|
|
105
131
|
initMetadataForClass(Path_0, 'Path');
|
|
106
|
-
initMetadataForClass(FileSink, 'FileSink');
|
|
132
|
+
initMetadataForClass(FileSink, 'FileSink', VOID, VOID, [AutoCloseable]);
|
|
107
133
|
//endregion
|
|
108
134
|
function get_HEX_DIGIT_CHARS() {
|
|
109
135
|
_init_properties__Util_kt__g8tcl9();
|
|
@@ -133,34 +159,187 @@
|
|
|
133
159
|
HEX_DIGIT_CHARS = charArrayOf([_Char___init__impl__6a9atx(48), _Char___init__impl__6a9atx(49), _Char___init__impl__6a9atx(50), _Char___init__impl__6a9atx(51), _Char___init__impl__6a9atx(52), _Char___init__impl__6a9atx(53), _Char___init__impl__6a9atx(54), _Char___init__impl__6a9atx(55), _Char___init__impl__6a9atx(56), _Char___init__impl__6a9atx(57), _Char___init__impl__6a9atx(97), _Char___init__impl__6a9atx(98), _Char___init__impl__6a9atx(99), _Char___init__impl__6a9atx(100), _Char___init__impl__6a9atx(101), _Char___init__impl__6a9atx(102)]);
|
|
134
160
|
}
|
|
135
161
|
}
|
|
162
|
+
function throwEof($this, byteCount) {
|
|
163
|
+
throw EOFException_init_$Create$_0("Buffer doesn't contain required number of bytes (size: " + $this.g1().toString() + ', required: ' + byteCount.toString() + ')');
|
|
164
|
+
}
|
|
136
165
|
function Buffer() {
|
|
137
|
-
this.
|
|
138
|
-
this.
|
|
139
|
-
this.
|
|
166
|
+
this.a1n_1 = null;
|
|
167
|
+
this.b1n_1 = null;
|
|
168
|
+
this.c1n_1 = new Long(0, 0);
|
|
140
169
|
}
|
|
141
|
-
protoOf(Buffer).
|
|
142
|
-
return this.
|
|
170
|
+
protoOf(Buffer).g1 = function () {
|
|
171
|
+
return this.c1n_1;
|
|
143
172
|
};
|
|
144
|
-
protoOf(Buffer).
|
|
173
|
+
protoOf(Buffer).d1n = function () {
|
|
145
174
|
return this;
|
|
146
175
|
};
|
|
147
|
-
protoOf(Buffer).
|
|
148
|
-
return equalsLong(this.
|
|
176
|
+
protoOf(Buffer).e1n = function () {
|
|
177
|
+
return equalsLong(this.g1(), new Long(0, 0));
|
|
178
|
+
};
|
|
179
|
+
protoOf(Buffer).f1n = function (byteCount) {
|
|
180
|
+
// Inline function 'kotlin.require' call
|
|
181
|
+
if (!(compare(byteCount, new Long(0, 0)) >= 0)) {
|
|
182
|
+
var message = 'byteCount: ' + byteCount.toString();
|
|
183
|
+
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
184
|
+
}
|
|
185
|
+
if (compare(this.g1(), byteCount) < 0) {
|
|
186
|
+
throw EOFException_init_$Create$_0("Buffer doesn't contain required number of bytes (size: " + this.g1().toString() + ', required: ' + byteCount.toString() + ')');
|
|
187
|
+
}
|
|
188
|
+
};
|
|
189
|
+
protoOf(Buffer).g1n = function (byteCount) {
|
|
190
|
+
// Inline function 'kotlin.require' call
|
|
191
|
+
if (!(compare(byteCount, new Long(0, 0)) >= 0)) {
|
|
192
|
+
var message = 'byteCount: ' + byteCount.toString() + ' < 0';
|
|
193
|
+
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
194
|
+
}
|
|
195
|
+
return compare(this.g1(), byteCount) >= 0;
|
|
196
|
+
};
|
|
197
|
+
protoOf(Buffer).h1n = function () {
|
|
198
|
+
var tmp0_elvis_lhs = this.a1n_1;
|
|
199
|
+
var tmp;
|
|
200
|
+
if (tmp0_elvis_lhs == null) {
|
|
201
|
+
throwEof(this, new Long(1, 0));
|
|
202
|
+
} else {
|
|
203
|
+
tmp = tmp0_elvis_lhs;
|
|
204
|
+
}
|
|
205
|
+
var segment = tmp;
|
|
206
|
+
var segmentSize = segment.g1();
|
|
207
|
+
if (segmentSize === 0) {
|
|
208
|
+
this.p1n();
|
|
209
|
+
return this.h1n();
|
|
210
|
+
}
|
|
211
|
+
var v = segment.q1n();
|
|
212
|
+
this.c1n_1 = subtract(this.c1n_1, new Long(1, 0));
|
|
213
|
+
if (segmentSize === 1) {
|
|
214
|
+
this.p1n();
|
|
215
|
+
}
|
|
216
|
+
return v;
|
|
217
|
+
};
|
|
218
|
+
protoOf(Buffer).r1n = function () {
|
|
219
|
+
var tmp0_elvis_lhs = this.a1n_1;
|
|
220
|
+
var tmp;
|
|
221
|
+
if (tmp0_elvis_lhs == null) {
|
|
222
|
+
throwEof(this, new Long(2, 0));
|
|
223
|
+
} else {
|
|
224
|
+
tmp = tmp0_elvis_lhs;
|
|
225
|
+
}
|
|
226
|
+
var segment = tmp;
|
|
227
|
+
var segmentSize = segment.g1();
|
|
228
|
+
if (segmentSize < 2) {
|
|
229
|
+
this.f1n(new Long(2, 0));
|
|
230
|
+
if (segmentSize === 0) {
|
|
231
|
+
this.p1n();
|
|
232
|
+
return this.r1n();
|
|
233
|
+
}
|
|
234
|
+
// Inline function 'kotlinx.io.and' call
|
|
235
|
+
var tmp_0 = (this.h1n() & 255) << 8;
|
|
236
|
+
// Inline function 'kotlinx.io.and' call
|
|
237
|
+
var tmp$ret$1 = this.h1n() & 255;
|
|
238
|
+
return toShort(tmp_0 | tmp$ret$1);
|
|
239
|
+
}
|
|
240
|
+
var v = segment.s1n();
|
|
241
|
+
this.c1n_1 = subtract(this.c1n_1, new Long(2, 0));
|
|
242
|
+
if (segmentSize === 2) {
|
|
243
|
+
this.p1n();
|
|
244
|
+
}
|
|
245
|
+
return v;
|
|
149
246
|
};
|
|
150
|
-
protoOf(Buffer).
|
|
247
|
+
protoOf(Buffer).t1n = function () {
|
|
151
248
|
return Unit_instance;
|
|
152
249
|
};
|
|
153
|
-
protoOf(Buffer).
|
|
154
|
-
|
|
250
|
+
protoOf(Buffer).u1n = function (out, startIndex, endIndex) {
|
|
251
|
+
checkBounds(this.g1(), startIndex, endIndex);
|
|
252
|
+
if (equalsLong(startIndex, endIndex))
|
|
253
|
+
return Unit_instance;
|
|
254
|
+
var currentOffset = startIndex;
|
|
255
|
+
var remainingByteCount = subtract(endIndex, startIndex);
|
|
256
|
+
out.c1n_1 = add(out.c1n_1, remainingByteCount);
|
|
257
|
+
var s = this.a1n_1;
|
|
258
|
+
while (compare(currentOffset, fromInt(ensureNotNull(s).k1n_1 - s.j1n_1 | 0)) >= 0) {
|
|
259
|
+
currentOffset = subtract(currentOffset, fromInt(s.k1n_1 - s.j1n_1 | 0));
|
|
260
|
+
s = s.n1n_1;
|
|
261
|
+
}
|
|
262
|
+
while (compare(remainingByteCount, new Long(0, 0)) > 0) {
|
|
263
|
+
var copy = ensureNotNull(s).v1n();
|
|
264
|
+
copy.j1n_1 = copy.j1n_1 + convertToInt(currentOffset) | 0;
|
|
265
|
+
var tmp = copy;
|
|
266
|
+
var tmp0 = copy.j1n_1 + convertToInt(remainingByteCount) | 0;
|
|
267
|
+
// Inline function 'kotlin.comparisons.minOf' call
|
|
268
|
+
var b = copy.k1n_1;
|
|
269
|
+
tmp.k1n_1 = Math.min(tmp0, b);
|
|
270
|
+
// Inline function 'kotlinx.io.Buffer.pushSegment' call
|
|
271
|
+
if (out.a1n_1 == null) {
|
|
272
|
+
out.a1n_1 = copy;
|
|
273
|
+
out.b1n_1 = copy;
|
|
274
|
+
} else if (false) {
|
|
275
|
+
out.b1n_1 = ensureNotNull(out.b1n_1).w1n(copy).x1n();
|
|
276
|
+
if (ensureNotNull(out.b1n_1).o1n_1 == null) {
|
|
277
|
+
out.a1n_1 = out.b1n_1;
|
|
278
|
+
}
|
|
279
|
+
} else {
|
|
280
|
+
out.b1n_1 = ensureNotNull(out.b1n_1).w1n(copy);
|
|
281
|
+
}
|
|
282
|
+
remainingByteCount = subtract(remainingByteCount, fromInt(copy.k1n_1 - copy.j1n_1 | 0));
|
|
283
|
+
currentOffset = new Long(0, 0);
|
|
284
|
+
s = s.n1n_1;
|
|
285
|
+
}
|
|
286
|
+
};
|
|
287
|
+
protoOf(Buffer).y1n = function () {
|
|
288
|
+
var result = this.g1();
|
|
155
289
|
if (equalsLong(result, new Long(0, 0)))
|
|
156
290
|
return new Long(0, 0);
|
|
157
|
-
var tail = ensureNotNull(this.
|
|
158
|
-
if (tail.
|
|
159
|
-
result = subtract(result, fromInt(tail.
|
|
291
|
+
var tail = ensureNotNull(this.b1n_1);
|
|
292
|
+
if (tail.k1n_1 < 8192 && tail.m1n_1) {
|
|
293
|
+
result = subtract(result, fromInt(tail.k1n_1 - tail.j1n_1 | 0));
|
|
160
294
|
}
|
|
161
295
|
return result;
|
|
162
296
|
};
|
|
163
|
-
protoOf(Buffer).
|
|
297
|
+
protoOf(Buffer).z1n = function (position) {
|
|
298
|
+
if (compare(position, new Long(0, 0)) < 0 || compare(position, this.g1()) >= 0) {
|
|
299
|
+
throw IndexOutOfBoundsException_init_$Create$('position (' + position.toString() + ') is not within the range [0..size(' + this.g1().toString() + '))');
|
|
300
|
+
}
|
|
301
|
+
if (equalsLong(position, new Long(0, 0))) {
|
|
302
|
+
return ensureNotNull(this.a1n_1).a1o(0);
|
|
303
|
+
}
|
|
304
|
+
// Inline function 'kotlinx.io.seek' call
|
|
305
|
+
if (this.a1n_1 == null) {
|
|
306
|
+
var offset = new Long(-1, -1);
|
|
307
|
+
return ensureNotNull(null).a1o(convertToInt(subtract(position, offset)));
|
|
308
|
+
}
|
|
309
|
+
if (compare(subtract(this.g1(), position), position) < 0) {
|
|
310
|
+
var s = this.b1n_1;
|
|
311
|
+
var offset_0 = this.g1();
|
|
312
|
+
$l$loop: while (!(s == null) && compare(offset_0, position) > 0) {
|
|
313
|
+
offset_0 = subtract(offset_0, fromInt(s.k1n_1 - s.j1n_1 | 0));
|
|
314
|
+
if (compare(offset_0, position) <= 0)
|
|
315
|
+
break $l$loop;
|
|
316
|
+
s = s.o1n_1;
|
|
317
|
+
}
|
|
318
|
+
var tmp0 = s;
|
|
319
|
+
var offset_1 = offset_0;
|
|
320
|
+
return ensureNotNull(tmp0).a1o(convertToInt(subtract(position, offset_1)));
|
|
321
|
+
} else {
|
|
322
|
+
var s_0 = this.a1n_1;
|
|
323
|
+
var offset_2 = new Long(0, 0);
|
|
324
|
+
$l$loop_0: while (!(s_0 == null)) {
|
|
325
|
+
var tmp0_0 = offset_2;
|
|
326
|
+
// Inline function 'kotlin.Long.plus' call
|
|
327
|
+
var other = s_0.k1n_1 - s_0.j1n_1 | 0;
|
|
328
|
+
var nextOffset = add(tmp0_0, fromInt(other));
|
|
329
|
+
if (compare(nextOffset, position) > 0)
|
|
330
|
+
break $l$loop_0;
|
|
331
|
+
s_0 = s_0.n1n_1;
|
|
332
|
+
offset_2 = nextOffset;
|
|
333
|
+
}
|
|
334
|
+
var tmp0_1 = s_0;
|
|
335
|
+
var offset_3 = offset_2;
|
|
336
|
+
return ensureNotNull(tmp0_1).a1o(convertToInt(subtract(position, offset_3)));
|
|
337
|
+
}
|
|
338
|
+
};
|
|
339
|
+
protoOf(Buffer).c3 = function () {
|
|
340
|
+
return this.b1o(this.g1());
|
|
341
|
+
};
|
|
342
|
+
protoOf(Buffer).b1o = function (byteCount) {
|
|
164
343
|
// Inline function 'kotlinx.io.checkByteCount' call
|
|
165
344
|
// Inline function 'kotlin.require' call
|
|
166
345
|
if (!(compare(byteCount, new Long(0, 0)) >= 0)) {
|
|
@@ -169,7 +348,7 @@
|
|
|
169
348
|
}
|
|
170
349
|
var remainingByteCount = byteCount;
|
|
171
350
|
while (compare(remainingByteCount, new Long(0, 0)) > 0) {
|
|
172
|
-
var tmp0_elvis_lhs = this.
|
|
351
|
+
var tmp0_elvis_lhs = this.a1n_1;
|
|
173
352
|
var tmp;
|
|
174
353
|
if (tmp0_elvis_lhs == null) {
|
|
175
354
|
throw EOFException_init_$Create$_0('Buffer exhausted before skipping ' + byteCount.toString() + ' bytes.');
|
|
@@ -179,180 +358,478 @@
|
|
|
179
358
|
var head = tmp;
|
|
180
359
|
var tmp0 = remainingByteCount;
|
|
181
360
|
// Inline function 'kotlinx.io.minOf' call
|
|
182
|
-
var b = head.
|
|
361
|
+
var b = head.k1n_1 - head.j1n_1 | 0;
|
|
183
362
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
184
363
|
var b_0 = fromInt(b);
|
|
185
364
|
var tmp$ret$4 = compare(tmp0, b_0) <= 0 ? tmp0 : b_0;
|
|
186
365
|
var toSkip = convertToInt(tmp$ret$4);
|
|
187
|
-
this.
|
|
366
|
+
this.c1n_1 = subtract(this.c1n_1, fromInt(toSkip));
|
|
188
367
|
remainingByteCount = subtract(remainingByteCount, fromInt(toSkip));
|
|
189
|
-
head.
|
|
190
|
-
if (head.
|
|
191
|
-
this.
|
|
368
|
+
head.j1n_1 = head.j1n_1 + toSkip | 0;
|
|
369
|
+
if (head.j1n_1 === head.k1n_1) {
|
|
370
|
+
this.p1n();
|
|
192
371
|
}
|
|
193
372
|
}
|
|
194
373
|
};
|
|
195
|
-
protoOf(Buffer).
|
|
374
|
+
protoOf(Buffer).c1o = function (sink, startIndex, endIndex) {
|
|
375
|
+
// Inline function 'kotlinx.io.checkBounds' call
|
|
376
|
+
var size = sink.length;
|
|
377
|
+
checkBounds(fromInt(size), fromInt(startIndex), fromInt(endIndex));
|
|
378
|
+
var tmp0_elvis_lhs = this.a1n_1;
|
|
379
|
+
var tmp;
|
|
380
|
+
if (tmp0_elvis_lhs == null) {
|
|
381
|
+
return -1;
|
|
382
|
+
} else {
|
|
383
|
+
tmp = tmp0_elvis_lhs;
|
|
384
|
+
}
|
|
385
|
+
var s = tmp;
|
|
386
|
+
var tmp0 = endIndex - startIndex | 0;
|
|
387
|
+
// Inline function 'kotlin.comparisons.minOf' call
|
|
388
|
+
var b = s.g1();
|
|
389
|
+
var toCopy = Math.min(tmp0, b);
|
|
390
|
+
s.d1o(sink, startIndex, startIndex + toCopy | 0);
|
|
391
|
+
this.c1n_1 = subtract(this.c1n_1, fromInt(toCopy));
|
|
392
|
+
if (isEmpty(s)) {
|
|
393
|
+
this.p1n();
|
|
394
|
+
}
|
|
395
|
+
return toCopy;
|
|
396
|
+
};
|
|
397
|
+
protoOf(Buffer).e1o = function (sink, byteCount) {
|
|
398
|
+
// Inline function 'kotlinx.io.checkByteCount' call
|
|
399
|
+
// Inline function 'kotlin.require' call
|
|
400
|
+
if (!(compare(byteCount, new Long(0, 0)) >= 0)) {
|
|
401
|
+
var message = 'byteCount (' + byteCount.toString() + ') < 0';
|
|
402
|
+
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
403
|
+
}
|
|
404
|
+
if (equalsLong(this.g1(), new Long(0, 0)))
|
|
405
|
+
return new Long(-1, -1);
|
|
406
|
+
var bytesWritten = compare(byteCount, this.g1()) > 0 ? this.g1() : byteCount;
|
|
407
|
+
sink.f1o(this, bytesWritten);
|
|
408
|
+
return bytesWritten;
|
|
409
|
+
};
|
|
410
|
+
protoOf(Buffer).g1o = function (sink, byteCount) {
|
|
411
|
+
// Inline function 'kotlinx.io.checkByteCount' call
|
|
412
|
+
// Inline function 'kotlin.require' call
|
|
413
|
+
if (!(compare(byteCount, new Long(0, 0)) >= 0)) {
|
|
414
|
+
var message = 'byteCount (' + byteCount.toString() + ') < 0';
|
|
415
|
+
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
416
|
+
}
|
|
417
|
+
if (compare(this.g1(), byteCount) < 0) {
|
|
418
|
+
sink.f1o(this, this.g1());
|
|
419
|
+
throw EOFException_init_$Create$_0('Buffer exhausted before writing ' + byteCount.toString() + ' bytes. Only ' + this.g1().toString() + ' bytes were written.');
|
|
420
|
+
}
|
|
421
|
+
sink.f1o(this, byteCount);
|
|
422
|
+
};
|
|
423
|
+
protoOf(Buffer).h1o = function (sink) {
|
|
424
|
+
var byteCount = this.g1();
|
|
425
|
+
if (compare(byteCount, new Long(0, 0)) > 0) {
|
|
426
|
+
sink.f1o(this, byteCount);
|
|
427
|
+
}
|
|
428
|
+
return byteCount;
|
|
429
|
+
};
|
|
430
|
+
protoOf(Buffer).i1o = function () {
|
|
431
|
+
return buffered(new PeekSource(this));
|
|
432
|
+
};
|
|
433
|
+
protoOf(Buffer).j1o = function (minimumCapacity) {
|
|
196
434
|
// Inline function 'kotlin.require' call
|
|
197
435
|
if (!(minimumCapacity >= 1 && minimumCapacity <= 8192)) {
|
|
198
436
|
var message = 'unexpected capacity (' + minimumCapacity + '), should be in range [1, 8192]';
|
|
199
437
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
200
438
|
}
|
|
201
|
-
if (this.
|
|
202
|
-
var result = SegmentPool_instance.
|
|
203
|
-
this.
|
|
204
|
-
this.
|
|
439
|
+
if (this.b1n_1 == null) {
|
|
440
|
+
var result = SegmentPool_instance.m1o();
|
|
441
|
+
this.a1n_1 = result;
|
|
442
|
+
this.b1n_1 = result;
|
|
205
443
|
return result;
|
|
206
444
|
}
|
|
207
|
-
var t = ensureNotNull(this.
|
|
208
|
-
if ((t.
|
|
209
|
-
var newTail = t.
|
|
210
|
-
this.
|
|
445
|
+
var t = ensureNotNull(this.b1n_1);
|
|
446
|
+
if ((t.k1n_1 + minimumCapacity | 0) > 8192 || !t.m1n_1) {
|
|
447
|
+
var newTail = t.w1n(SegmentPool_instance.m1o());
|
|
448
|
+
this.b1n_1 = newTail;
|
|
211
449
|
return newTail;
|
|
212
450
|
}
|
|
213
451
|
return t;
|
|
214
452
|
};
|
|
215
|
-
protoOf(Buffer).
|
|
453
|
+
protoOf(Buffer).n1o = function (source, startIndex, endIndex) {
|
|
454
|
+
// Inline function 'kotlinx.io.checkBounds' call
|
|
455
|
+
var size = source.length;
|
|
456
|
+
checkBounds(fromInt(size), fromInt(startIndex), fromInt(endIndex));
|
|
457
|
+
var currentOffset = startIndex;
|
|
458
|
+
while (currentOffset < endIndex) {
|
|
459
|
+
var tail = this.j1o(1);
|
|
460
|
+
var tmp0 = endIndex - currentOffset | 0;
|
|
461
|
+
// Inline function 'kotlin.comparisons.minOf' call
|
|
462
|
+
var b = tail.o1o();
|
|
463
|
+
var toCopy = Math.min(tmp0, b);
|
|
464
|
+
tail.p1o(source, currentOffset, currentOffset + toCopy | 0);
|
|
465
|
+
currentOffset = currentOffset + toCopy | 0;
|
|
466
|
+
}
|
|
467
|
+
var tmp = this;
|
|
468
|
+
var tmp0_0 = this.c1n_1;
|
|
469
|
+
// Inline function 'kotlin.Long.plus' call
|
|
470
|
+
var other = endIndex - startIndex | 0;
|
|
471
|
+
tmp.c1n_1 = add(tmp0_0, fromInt(other));
|
|
472
|
+
};
|
|
473
|
+
protoOf(Buffer).r1o = function (source, byteCount) {
|
|
474
|
+
// Inline function 'kotlinx.io.checkByteCount' call
|
|
475
|
+
// Inline function 'kotlin.require' call
|
|
476
|
+
if (!(compare(byteCount, new Long(0, 0)) >= 0)) {
|
|
477
|
+
var message = 'byteCount (' + byteCount.toString() + ') < 0';
|
|
478
|
+
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
479
|
+
}
|
|
480
|
+
var remainingByteCount = byteCount;
|
|
481
|
+
while (compare(remainingByteCount, new Long(0, 0)) > 0) {
|
|
482
|
+
var read = source.e1o(this, remainingByteCount);
|
|
483
|
+
if (equalsLong(read, new Long(-1, -1))) {
|
|
484
|
+
throw EOFException_init_$Create$_0('Source exhausted before reading ' + byteCount.toString() + ' bytes. ' + ('Only ' + subtract(byteCount, remainingByteCount).toString() + ' were read.'));
|
|
485
|
+
}
|
|
486
|
+
remainingByteCount = subtract(remainingByteCount, read);
|
|
487
|
+
}
|
|
488
|
+
};
|
|
489
|
+
protoOf(Buffer).f1o = function (source, byteCount) {
|
|
216
490
|
// Inline function 'kotlin.require' call
|
|
217
491
|
if (!!(source === this)) {
|
|
218
492
|
var message = 'source == this';
|
|
219
493
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
220
494
|
}
|
|
221
|
-
checkOffsetAndCount(source.
|
|
495
|
+
checkOffsetAndCount(source.c1n_1, new Long(0, 0), byteCount);
|
|
222
496
|
var remainingByteCount = byteCount;
|
|
223
497
|
while (compare(remainingByteCount, new Long(0, 0)) > 0) {
|
|
224
|
-
if (compare(remainingByteCount, fromInt(ensureNotNull(source.
|
|
225
|
-
var tail = this.
|
|
498
|
+
if (compare(remainingByteCount, fromInt(ensureNotNull(source.a1n_1).g1())) < 0) {
|
|
499
|
+
var tail = this.b1n_1;
|
|
226
500
|
var tmp;
|
|
227
|
-
if (!(tail == null) && tail.
|
|
501
|
+
if (!(tail == null) && tail.m1n_1) {
|
|
228
502
|
var tmp0 = remainingByteCount;
|
|
229
503
|
// Inline function 'kotlin.Long.plus' call
|
|
230
|
-
var other = tail.
|
|
504
|
+
var other = tail.k1n_1;
|
|
231
505
|
var tmp0_0 = add(tmp0, fromInt(other));
|
|
232
506
|
// Inline function 'kotlin.Long.minus' call
|
|
233
|
-
var other_0 = tail.
|
|
507
|
+
var other_0 = tail.s1o() ? 0 : tail.j1n_1;
|
|
234
508
|
var tmp$ret$3 = subtract(tmp0_0, fromInt(other_0));
|
|
235
509
|
tmp = compare(tmp$ret$3, new Long(8192, 0)) <= 0;
|
|
236
510
|
} else {
|
|
237
511
|
tmp = false;
|
|
238
512
|
}
|
|
239
513
|
if (tmp) {
|
|
240
|
-
ensureNotNull(source.
|
|
241
|
-
source.
|
|
242
|
-
this.
|
|
514
|
+
ensureNotNull(source.a1n_1).u1o(tail, convertToInt(remainingByteCount));
|
|
515
|
+
source.c1n_1 = subtract(source.c1n_1, remainingByteCount);
|
|
516
|
+
this.c1n_1 = add(this.c1n_1, remainingByteCount);
|
|
243
517
|
return Unit_instance;
|
|
244
518
|
} else {
|
|
245
|
-
source.
|
|
519
|
+
source.a1n_1 = ensureNotNull(source.a1n_1).t1o(convertToInt(remainingByteCount));
|
|
246
520
|
}
|
|
247
521
|
}
|
|
248
|
-
var segmentToMove = ensureNotNull(source.
|
|
249
|
-
var movedByteCount = fromInt(segmentToMove.
|
|
250
|
-
source.
|
|
251
|
-
if (source.
|
|
252
|
-
source.
|
|
522
|
+
var segmentToMove = ensureNotNull(source.a1n_1);
|
|
523
|
+
var movedByteCount = fromInt(segmentToMove.g1());
|
|
524
|
+
source.a1n_1 = segmentToMove.v1o();
|
|
525
|
+
if (source.a1n_1 == null) {
|
|
526
|
+
source.b1n_1 = null;
|
|
253
527
|
}
|
|
254
528
|
// Inline function 'kotlinx.io.Buffer.pushSegment' call
|
|
255
|
-
if (this.
|
|
256
|
-
this.
|
|
257
|
-
this.
|
|
529
|
+
if (this.a1n_1 == null) {
|
|
530
|
+
this.a1n_1 = segmentToMove;
|
|
531
|
+
this.b1n_1 = segmentToMove;
|
|
258
532
|
} else if (true) {
|
|
259
|
-
this.
|
|
260
|
-
if (ensureNotNull(this.
|
|
261
|
-
this.
|
|
533
|
+
this.b1n_1 = ensureNotNull(this.b1n_1).w1n(segmentToMove).x1n();
|
|
534
|
+
if (ensureNotNull(this.b1n_1).o1n_1 == null) {
|
|
535
|
+
this.a1n_1 = this.b1n_1;
|
|
262
536
|
}
|
|
263
537
|
} else {
|
|
264
|
-
this.
|
|
538
|
+
this.b1n_1 = ensureNotNull(this.b1n_1).w1n(segmentToMove);
|
|
265
539
|
}
|
|
266
|
-
source.
|
|
267
|
-
this.
|
|
540
|
+
source.c1n_1 = subtract(source.c1n_1, movedByteCount);
|
|
541
|
+
this.c1n_1 = add(this.c1n_1, movedByteCount);
|
|
268
542
|
remainingByteCount = subtract(remainingByteCount, movedByteCount);
|
|
269
543
|
}
|
|
270
544
|
};
|
|
271
|
-
protoOf(Buffer).
|
|
272
|
-
|
|
273
|
-
|
|
545
|
+
protoOf(Buffer).w1o = function (source) {
|
|
546
|
+
var totalBytesRead = new Long(0, 0);
|
|
547
|
+
$l$loop: while (true) {
|
|
548
|
+
var readCount = source.e1o(this, new Long(8192, 0));
|
|
549
|
+
if (equalsLong(readCount, new Long(-1, -1)))
|
|
550
|
+
break $l$loop;
|
|
551
|
+
totalBytesRead = add(totalBytesRead, readCount);
|
|
552
|
+
}
|
|
553
|
+
return totalBytesRead;
|
|
554
|
+
};
|
|
555
|
+
protoOf(Buffer).x1o = function (byte) {
|
|
556
|
+
this.j1o(1).y1o(byte);
|
|
557
|
+
this.c1n_1 = add(this.c1n_1, new Long(1, 0));
|
|
274
558
|
};
|
|
275
|
-
protoOf(Buffer).
|
|
559
|
+
protoOf(Buffer).z1o = function (short) {
|
|
560
|
+
this.j1o(2).a1p(short);
|
|
561
|
+
this.c1n_1 = add(this.c1n_1, new Long(2, 0));
|
|
562
|
+
};
|
|
563
|
+
protoOf(Buffer).n4 = function () {
|
|
276
564
|
return Unit_instance;
|
|
277
565
|
};
|
|
278
566
|
protoOf(Buffer).toString = function () {
|
|
279
|
-
if (equalsLong(this.
|
|
567
|
+
if (equalsLong(this.g1(), new Long(0, 0)))
|
|
280
568
|
return 'Buffer(size=0)';
|
|
281
569
|
var maxPrintableBytes = 64;
|
|
282
570
|
// Inline function 'kotlinx.io.minOf' call
|
|
283
|
-
var b = this.
|
|
571
|
+
var b = this.g1();
|
|
284
572
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
285
573
|
var a = fromInt(maxPrintableBytes);
|
|
286
574
|
var tmp$ret$1 = compare(a, b) <= 0 ? a : b;
|
|
287
575
|
var len = convertToInt(tmp$ret$1);
|
|
288
|
-
var builder = StringBuilder_init_$Create$(imul(len, 2) + (compare(this.
|
|
576
|
+
var builder = StringBuilder_init_$Create$(imul(len, 2) + (compare(this.g1(), fromInt(maxPrintableBytes)) > 0 ? 1 : 0) | 0);
|
|
289
577
|
var bytesWritten = 0;
|
|
290
578
|
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.forEachSegment' call
|
|
291
|
-
var curr = this.
|
|
579
|
+
var curr = this.a1n_1;
|
|
292
580
|
while (!(curr == null)) {
|
|
293
581
|
var tmp0 = get_SegmentReadContextImpl();
|
|
294
582
|
var segment = curr;
|
|
295
583
|
var idx = 0;
|
|
296
|
-
while (bytesWritten < len && idx < segment.
|
|
584
|
+
while (bytesWritten < len && idx < segment.g1()) {
|
|
297
585
|
var _unary__edvuaz = idx;
|
|
298
586
|
idx = _unary__edvuaz + 1 | 0;
|
|
299
|
-
var b_0 = tmp0.
|
|
587
|
+
var b_0 = tmp0.b1p(segment, _unary__edvuaz);
|
|
300
588
|
bytesWritten = bytesWritten + 1 | 0;
|
|
301
589
|
var tmp = get_HEX_DIGIT_CHARS();
|
|
302
590
|
// Inline function 'kotlinx.io.shr' call
|
|
303
591
|
var tmp$ret$2 = b_0 >> 4;
|
|
304
|
-
var tmp_0 = builder.
|
|
592
|
+
var tmp_0 = builder.s(tmp[tmp$ret$2 & 15]);
|
|
305
593
|
var tmp_1 = get_HEX_DIGIT_CHARS();
|
|
306
594
|
// Inline function 'kotlinx.io.and' call
|
|
307
595
|
var tmp$ret$3 = b_0 & 15;
|
|
308
|
-
tmp_0.
|
|
596
|
+
tmp_0.s(tmp_1[tmp$ret$3]);
|
|
309
597
|
}
|
|
310
|
-
curr = curr.
|
|
598
|
+
curr = curr.n1n_1;
|
|
311
599
|
}
|
|
312
|
-
if (compare(this.
|
|
313
|
-
builder.
|
|
600
|
+
if (compare(this.g1(), fromInt(maxPrintableBytes)) > 0) {
|
|
601
|
+
builder.s(_Char___init__impl__6a9atx(8230));
|
|
314
602
|
}
|
|
315
|
-
return 'Buffer(size=' + this.
|
|
603
|
+
return 'Buffer(size=' + this.g1().toString() + ' hex=' + builder.toString() + ')';
|
|
316
604
|
};
|
|
317
|
-
protoOf(Buffer).
|
|
318
|
-
var oldHead = ensureNotNull(this.
|
|
319
|
-
var nextHead = oldHead.
|
|
320
|
-
this.
|
|
605
|
+
protoOf(Buffer).p1n = function () {
|
|
606
|
+
var oldHead = ensureNotNull(this.a1n_1);
|
|
607
|
+
var nextHead = oldHead.n1n_1;
|
|
608
|
+
this.a1n_1 = nextHead;
|
|
321
609
|
if (nextHead == null) {
|
|
322
|
-
this.
|
|
610
|
+
this.b1n_1 = null;
|
|
323
611
|
} else {
|
|
324
|
-
nextHead.
|
|
612
|
+
nextHead.o1n_1 = null;
|
|
325
613
|
}
|
|
326
|
-
oldHead.
|
|
327
|
-
SegmentPool_instance.
|
|
614
|
+
oldHead.n1n_1 = null;
|
|
615
|
+
SegmentPool_instance.c1p(oldHead);
|
|
328
616
|
};
|
|
329
|
-
protoOf(Buffer).
|
|
330
|
-
var oldTail = ensureNotNull(this.
|
|
331
|
-
var newTail = oldTail.
|
|
332
|
-
this.
|
|
617
|
+
protoOf(Buffer).d1p = function () {
|
|
618
|
+
var oldTail = ensureNotNull(this.b1n_1);
|
|
619
|
+
var newTail = oldTail.o1n_1;
|
|
620
|
+
this.b1n_1 = newTail;
|
|
333
621
|
if (newTail == null) {
|
|
334
|
-
this.
|
|
622
|
+
this.a1n_1 = null;
|
|
335
623
|
} else {
|
|
336
|
-
newTail.
|
|
624
|
+
newTail.n1n_1 = null;
|
|
337
625
|
}
|
|
338
|
-
oldTail.
|
|
339
|
-
SegmentPool_instance.
|
|
626
|
+
oldTail.o1n_1 = null;
|
|
627
|
+
SegmentPool_instance.c1p(oldTail);
|
|
340
628
|
};
|
|
629
|
+
function indexOf(_this__u8e3s4, byte, startIndex, endIndex) {
|
|
630
|
+
startIndex = startIndex === VOID ? new Long(0, 0) : startIndex;
|
|
631
|
+
endIndex = endIndex === VOID ? _this__u8e3s4.g1() : endIndex;
|
|
632
|
+
// Inline function 'kotlin.comparisons.minOf' call
|
|
633
|
+
var b = _this__u8e3s4.g1();
|
|
634
|
+
var endOffset = compare(endIndex, b) <= 0 ? endIndex : b;
|
|
635
|
+
checkBounds(_this__u8e3s4.g1(), startIndex, endOffset);
|
|
636
|
+
if (equalsLong(startIndex, endOffset))
|
|
637
|
+
return new Long(-1, -1);
|
|
638
|
+
// Inline function 'kotlinx.io.seek' call
|
|
639
|
+
if (_this__u8e3s4.a1n_1 == null) {
|
|
640
|
+
var o = new Long(-1, -1);
|
|
641
|
+
if (equalsLong(o, new Long(-1, -1))) {
|
|
642
|
+
return new Long(-1, -1);
|
|
643
|
+
}
|
|
644
|
+
var segment = null;
|
|
645
|
+
var offset = o;
|
|
646
|
+
do {
|
|
647
|
+
// Inline function 'kotlin.check' call
|
|
648
|
+
if (!(compare(endOffset, offset) > 0)) {
|
|
649
|
+
throw IllegalStateException_init_$Create$('Check failed.');
|
|
650
|
+
}
|
|
651
|
+
ensureNotNull(segment);
|
|
652
|
+
var tmp = segment;
|
|
653
|
+
// Inline function 'kotlin.comparisons.maxOf' call
|
|
654
|
+
var a = convertToInt(subtract(startIndex, offset));
|
|
655
|
+
var tmp_0 = Math.max(a, 0);
|
|
656
|
+
var tmp0 = segment.g1();
|
|
657
|
+
// Inline function 'kotlin.comparisons.minOf' call
|
|
658
|
+
var b_0 = convertToInt(subtract(endOffset, offset));
|
|
659
|
+
var tmp$ret$3 = Math.min(tmp0, b_0);
|
|
660
|
+
var idx = indexOf_0(tmp, byte, tmp_0, tmp$ret$3);
|
|
661
|
+
if (!(idx === -1)) {
|
|
662
|
+
return add(offset, fromInt(idx));
|
|
663
|
+
}
|
|
664
|
+
var tmp0_0 = offset;
|
|
665
|
+
// Inline function 'kotlin.Long.plus' call
|
|
666
|
+
var other = segment.g1();
|
|
667
|
+
offset = add(tmp0_0, fromInt(other));
|
|
668
|
+
segment = segment.n1n_1;
|
|
669
|
+
}
|
|
670
|
+
while (!(segment == null) && compare(offset, endOffset) < 0);
|
|
671
|
+
return new Long(-1, -1);
|
|
672
|
+
}
|
|
673
|
+
if (compare(subtract(_this__u8e3s4.g1(), startIndex), startIndex) < 0) {
|
|
674
|
+
var s = _this__u8e3s4.b1n_1;
|
|
675
|
+
var offset_0 = _this__u8e3s4.g1();
|
|
676
|
+
$l$loop: while (!(s == null) && compare(offset_0, startIndex) > 0) {
|
|
677
|
+
offset_0 = subtract(offset_0, fromInt(s.k1n_1 - s.j1n_1 | 0));
|
|
678
|
+
if (compare(offset_0, startIndex) <= 0)
|
|
679
|
+
break $l$loop;
|
|
680
|
+
s = s.o1n_1;
|
|
681
|
+
}
|
|
682
|
+
var tmp0_1 = s;
|
|
683
|
+
var o_0 = offset_0;
|
|
684
|
+
if (equalsLong(o_0, new Long(-1, -1))) {
|
|
685
|
+
return new Long(-1, -1);
|
|
686
|
+
}
|
|
687
|
+
var segment_0 = tmp0_1;
|
|
688
|
+
var offset_1 = o_0;
|
|
689
|
+
do {
|
|
690
|
+
// Inline function 'kotlin.check' call
|
|
691
|
+
if (!(compare(endOffset, offset_1) > 0)) {
|
|
692
|
+
throw IllegalStateException_init_$Create$('Check failed.');
|
|
693
|
+
}
|
|
694
|
+
ensureNotNull(segment_0);
|
|
695
|
+
var tmp_1 = segment_0;
|
|
696
|
+
// Inline function 'kotlin.comparisons.maxOf' call
|
|
697
|
+
var a_0 = convertToInt(subtract(startIndex, offset_1));
|
|
698
|
+
var tmp_2 = Math.max(a_0, 0);
|
|
699
|
+
var tmp0_2 = segment_0.g1();
|
|
700
|
+
// Inline function 'kotlin.comparisons.minOf' call
|
|
701
|
+
var b_1 = convertToInt(subtract(endOffset, offset_1));
|
|
702
|
+
var tmp$ret$8 = Math.min(tmp0_2, b_1);
|
|
703
|
+
var idx_0 = indexOf_0(tmp_1, byte, tmp_2, tmp$ret$8);
|
|
704
|
+
if (!(idx_0 === -1)) {
|
|
705
|
+
return add(offset_1, fromInt(idx_0));
|
|
706
|
+
}
|
|
707
|
+
var tmp0_3 = offset_1;
|
|
708
|
+
// Inline function 'kotlin.Long.plus' call
|
|
709
|
+
var other_0 = segment_0.g1();
|
|
710
|
+
offset_1 = add(tmp0_3, fromInt(other_0));
|
|
711
|
+
segment_0 = segment_0.n1n_1;
|
|
712
|
+
}
|
|
713
|
+
while (!(segment_0 == null) && compare(offset_1, endOffset) < 0);
|
|
714
|
+
return new Long(-1, -1);
|
|
715
|
+
} else {
|
|
716
|
+
var s_0 = _this__u8e3s4.a1n_1;
|
|
717
|
+
var offset_2 = new Long(0, 0);
|
|
718
|
+
$l$loop_0: while (!(s_0 == null)) {
|
|
719
|
+
var tmp0_4 = offset_2;
|
|
720
|
+
// Inline function 'kotlin.Long.plus' call
|
|
721
|
+
var other_1 = s_0.k1n_1 - s_0.j1n_1 | 0;
|
|
722
|
+
var nextOffset = add(tmp0_4, fromInt(other_1));
|
|
723
|
+
if (compare(nextOffset, startIndex) > 0)
|
|
724
|
+
break $l$loop_0;
|
|
725
|
+
s_0 = s_0.n1n_1;
|
|
726
|
+
offset_2 = nextOffset;
|
|
727
|
+
}
|
|
728
|
+
var tmp0_5 = s_0;
|
|
729
|
+
var o_1 = offset_2;
|
|
730
|
+
if (equalsLong(o_1, new Long(-1, -1))) {
|
|
731
|
+
return new Long(-1, -1);
|
|
732
|
+
}
|
|
733
|
+
var segment_1 = tmp0_5;
|
|
734
|
+
var offset_3 = o_1;
|
|
735
|
+
do {
|
|
736
|
+
// Inline function 'kotlin.check' call
|
|
737
|
+
if (!(compare(endOffset, offset_3) > 0)) {
|
|
738
|
+
throw IllegalStateException_init_$Create$('Check failed.');
|
|
739
|
+
}
|
|
740
|
+
ensureNotNull(segment_1);
|
|
741
|
+
var tmp_3 = segment_1;
|
|
742
|
+
// Inline function 'kotlin.comparisons.maxOf' call
|
|
743
|
+
var a_1 = convertToInt(subtract(startIndex, offset_3));
|
|
744
|
+
var tmp_4 = Math.max(a_1, 0);
|
|
745
|
+
var tmp0_6 = segment_1.g1();
|
|
746
|
+
// Inline function 'kotlin.comparisons.minOf' call
|
|
747
|
+
var b_2 = convertToInt(subtract(endOffset, offset_3));
|
|
748
|
+
var tmp$ret$13 = Math.min(tmp0_6, b_2);
|
|
749
|
+
var idx_1 = indexOf_0(tmp_3, byte, tmp_4, tmp$ret$13);
|
|
750
|
+
if (!(idx_1 === -1)) {
|
|
751
|
+
return add(offset_3, fromInt(idx_1));
|
|
752
|
+
}
|
|
753
|
+
var tmp0_7 = offset_3;
|
|
754
|
+
// Inline function 'kotlin.Long.plus' call
|
|
755
|
+
var other_2 = segment_1.g1();
|
|
756
|
+
offset_3 = add(tmp0_7, fromInt(other_2));
|
|
757
|
+
segment_1 = segment_1.n1n_1;
|
|
758
|
+
}
|
|
759
|
+
while (!(segment_1 == null) && compare(offset_3, endOffset) < 0);
|
|
760
|
+
return new Long(-1, -1);
|
|
761
|
+
}
|
|
762
|
+
}
|
|
763
|
+
function readByteString(_this__u8e3s4, byteCount) {
|
|
764
|
+
return UnsafeByteStringOperations_instance.z1m(readByteArray_0(_this__u8e3s4, byteCount));
|
|
765
|
+
}
|
|
341
766
|
function buffered(_this__u8e3s4) {
|
|
767
|
+
return new RealSource(_this__u8e3s4);
|
|
768
|
+
}
|
|
769
|
+
function buffered_0(_this__u8e3s4) {
|
|
342
770
|
return new RealSink(_this__u8e3s4);
|
|
343
771
|
}
|
|
772
|
+
function PeekSource(upstream) {
|
|
773
|
+
this.e1p_1 = upstream;
|
|
774
|
+
this.f1p_1 = this.e1p_1.d1n();
|
|
775
|
+
this.g1p_1 = this.f1p_1.a1n_1;
|
|
776
|
+
var tmp = this;
|
|
777
|
+
var tmp0_safe_receiver = this.f1p_1.a1n_1;
|
|
778
|
+
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.j1n_1;
|
|
779
|
+
tmp.h1p_1 = tmp1_elvis_lhs == null ? -1 : tmp1_elvis_lhs;
|
|
780
|
+
this.i1p_1 = false;
|
|
781
|
+
this.j1p_1 = new Long(0, 0);
|
|
782
|
+
}
|
|
783
|
+
protoOf(PeekSource).e1o = function (sink, byteCount) {
|
|
784
|
+
// Inline function 'kotlin.check' call
|
|
785
|
+
if (!!this.i1p_1) {
|
|
786
|
+
var message = 'Source is closed.';
|
|
787
|
+
throw IllegalStateException_init_$Create$(toString(message));
|
|
788
|
+
}
|
|
789
|
+
// Inline function 'kotlinx.io.checkByteCount' call
|
|
790
|
+
// Inline function 'kotlin.require' call
|
|
791
|
+
if (!(compare(byteCount, new Long(0, 0)) >= 0)) {
|
|
792
|
+
var message_0 = 'byteCount (' + byteCount.toString() + ') < 0';
|
|
793
|
+
throw IllegalArgumentException_init_$Create$(toString(message_0));
|
|
794
|
+
}
|
|
795
|
+
// Inline function 'kotlin.check' call
|
|
796
|
+
if (!(this.g1p_1 == null || (this.g1p_1 === this.f1p_1.a1n_1 && this.h1p_1 === ensureNotNull(this.f1p_1.a1n_1).j1n_1))) {
|
|
797
|
+
var message_1 = 'Peek source is invalid because upstream source was used';
|
|
798
|
+
throw IllegalStateException_init_$Create$(toString(message_1));
|
|
799
|
+
}
|
|
800
|
+
if (equalsLong(byteCount, new Long(0, 0)))
|
|
801
|
+
return new Long(0, 0);
|
|
802
|
+
// Inline function 'kotlin.Long.plus' call
|
|
803
|
+
var this_0 = this.j1p_1;
|
|
804
|
+
var tmp$ret$7 = add(this_0, fromInt(1));
|
|
805
|
+
if (!this.e1p_1.g1n(tmp$ret$7))
|
|
806
|
+
return new Long(-1, -1);
|
|
807
|
+
if (this.g1p_1 == null && !(this.f1p_1.a1n_1 == null)) {
|
|
808
|
+
this.g1p_1 = this.f1p_1.a1n_1;
|
|
809
|
+
this.h1p_1 = ensureNotNull(this.f1p_1.a1n_1).j1n_1;
|
|
810
|
+
}
|
|
811
|
+
// Inline function 'kotlin.comparisons.minOf' call
|
|
812
|
+
var b = subtract(this.f1p_1.g1(), this.j1p_1);
|
|
813
|
+
var toCopy = compare(byteCount, b) <= 0 ? byteCount : b;
|
|
814
|
+
this.f1p_1.u1n(sink, this.j1p_1, add(this.j1p_1, toCopy));
|
|
815
|
+
this.j1p_1 = add(this.j1p_1, toCopy);
|
|
816
|
+
return toCopy;
|
|
817
|
+
};
|
|
818
|
+
protoOf(PeekSource).n4 = function () {
|
|
819
|
+
this.i1p_1 = true;
|
|
820
|
+
};
|
|
344
821
|
function RealSink(sink) {
|
|
345
|
-
this.
|
|
346
|
-
this.
|
|
347
|
-
this.
|
|
822
|
+
this.k1p_1 = sink;
|
|
823
|
+
this.l1p_1 = false;
|
|
824
|
+
this.m1p_1 = new Buffer();
|
|
348
825
|
}
|
|
349
|
-
protoOf(RealSink).
|
|
350
|
-
return this.
|
|
826
|
+
protoOf(RealSink).d1n = function () {
|
|
827
|
+
return this.m1p_1;
|
|
351
828
|
};
|
|
352
|
-
protoOf(RealSink).
|
|
829
|
+
protoOf(RealSink).f1o = function (source, byteCount) {
|
|
353
830
|
// Inline function 'kotlinx.io.RealSink.checkNotClosed' call
|
|
354
831
|
// Inline function 'kotlin.check' call
|
|
355
|
-
if (!!this.
|
|
832
|
+
if (!!this.l1p_1) {
|
|
356
833
|
var message = 'Sink is closed.';
|
|
357
834
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
358
835
|
}
|
|
@@ -361,28 +838,101 @@
|
|
|
361
838
|
var message_0 = 'byteCount: ' + byteCount.toString();
|
|
362
839
|
throw IllegalArgumentException_init_$Create$(toString(message_0));
|
|
363
840
|
}
|
|
364
|
-
this.
|
|
365
|
-
this.
|
|
841
|
+
this.m1p_1.f1o(source, byteCount);
|
|
842
|
+
this.t1n();
|
|
843
|
+
};
|
|
844
|
+
protoOf(RealSink).n1o = function (source, startIndex, endIndex) {
|
|
845
|
+
// Inline function 'kotlinx.io.RealSink.checkNotClosed' call
|
|
846
|
+
// Inline function 'kotlin.check' call
|
|
847
|
+
if (!!this.l1p_1) {
|
|
848
|
+
var message = 'Sink is closed.';
|
|
849
|
+
throw IllegalStateException_init_$Create$(toString(message));
|
|
850
|
+
}
|
|
851
|
+
// Inline function 'kotlinx.io.checkBounds' call
|
|
852
|
+
var size = source.length;
|
|
853
|
+
checkBounds(fromInt(size), fromInt(startIndex), fromInt(endIndex));
|
|
854
|
+
this.m1p_1.n1o(source, startIndex, endIndex);
|
|
855
|
+
this.t1n();
|
|
856
|
+
};
|
|
857
|
+
protoOf(RealSink).w1o = function (source) {
|
|
858
|
+
// Inline function 'kotlinx.io.RealSink.checkNotClosed' call
|
|
859
|
+
// Inline function 'kotlin.check' call
|
|
860
|
+
if (!!this.l1p_1) {
|
|
861
|
+
var message = 'Sink is closed.';
|
|
862
|
+
throw IllegalStateException_init_$Create$(toString(message));
|
|
863
|
+
}
|
|
864
|
+
var totalBytesRead = new Long(0, 0);
|
|
865
|
+
$l$loop: while (true) {
|
|
866
|
+
var readCount = source.e1o(this.m1p_1, new Long(8192, 0));
|
|
867
|
+
if (equalsLong(readCount, new Long(-1, -1)))
|
|
868
|
+
break $l$loop;
|
|
869
|
+
totalBytesRead = add(totalBytesRead, readCount);
|
|
870
|
+
this.t1n();
|
|
871
|
+
}
|
|
872
|
+
return totalBytesRead;
|
|
873
|
+
};
|
|
874
|
+
protoOf(RealSink).r1o = function (source, byteCount) {
|
|
875
|
+
// Inline function 'kotlinx.io.RealSink.checkNotClosed' call
|
|
876
|
+
// Inline function 'kotlin.check' call
|
|
877
|
+
if (!!this.l1p_1) {
|
|
878
|
+
var message = 'Sink is closed.';
|
|
879
|
+
throw IllegalStateException_init_$Create$(toString(message));
|
|
880
|
+
}
|
|
881
|
+
// Inline function 'kotlin.require' call
|
|
882
|
+
if (!(compare(byteCount, new Long(0, 0)) >= 0)) {
|
|
883
|
+
var message_0 = 'byteCount: ' + byteCount.toString();
|
|
884
|
+
throw IllegalArgumentException_init_$Create$(toString(message_0));
|
|
885
|
+
}
|
|
886
|
+
var remainingByteCount = byteCount;
|
|
887
|
+
while (compare(remainingByteCount, new Long(0, 0)) > 0) {
|
|
888
|
+
var read = source.e1o(this.m1p_1, remainingByteCount);
|
|
889
|
+
if (equalsLong(read, new Long(-1, -1))) {
|
|
890
|
+
var bytesRead = subtract(byteCount, remainingByteCount);
|
|
891
|
+
throw EOFException_init_$Create$_0('Source exhausted before reading ' + byteCount.toString() + ' bytes from it (number of bytes read: ' + bytesRead.toString() + ').');
|
|
892
|
+
}
|
|
893
|
+
remainingByteCount = subtract(remainingByteCount, read);
|
|
894
|
+
this.t1n();
|
|
895
|
+
}
|
|
896
|
+
};
|
|
897
|
+
protoOf(RealSink).x1o = function (byte) {
|
|
898
|
+
// Inline function 'kotlinx.io.RealSink.checkNotClosed' call
|
|
899
|
+
// Inline function 'kotlin.check' call
|
|
900
|
+
if (!!this.l1p_1) {
|
|
901
|
+
var message = 'Sink is closed.';
|
|
902
|
+
throw IllegalStateException_init_$Create$(toString(message));
|
|
903
|
+
}
|
|
904
|
+
this.m1p_1.x1o(byte);
|
|
905
|
+
this.t1n();
|
|
366
906
|
};
|
|
367
|
-
protoOf(RealSink).
|
|
907
|
+
protoOf(RealSink).z1o = function (short) {
|
|
368
908
|
// Inline function 'kotlinx.io.RealSink.checkNotClosed' call
|
|
369
909
|
// Inline function 'kotlin.check' call
|
|
370
|
-
if (!!this.
|
|
910
|
+
if (!!this.l1p_1) {
|
|
371
911
|
var message = 'Sink is closed.';
|
|
372
912
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
373
913
|
}
|
|
374
|
-
|
|
914
|
+
this.m1p_1.z1o(short);
|
|
915
|
+
this.t1n();
|
|
916
|
+
};
|
|
917
|
+
protoOf(RealSink).t1n = function () {
|
|
918
|
+
// Inline function 'kotlinx.io.RealSink.checkNotClosed' call
|
|
919
|
+
// Inline function 'kotlin.check' call
|
|
920
|
+
if (!!this.l1p_1) {
|
|
921
|
+
var message = 'Sink is closed.';
|
|
922
|
+
throw IllegalStateException_init_$Create$(toString(message));
|
|
923
|
+
}
|
|
924
|
+
var byteCount = this.m1p_1.y1n();
|
|
375
925
|
if (compare(byteCount, new Long(0, 0)) > 0) {
|
|
376
|
-
this.
|
|
926
|
+
this.k1p_1.f1o(this.m1p_1, byteCount);
|
|
377
927
|
}
|
|
378
928
|
};
|
|
379
|
-
protoOf(RealSink).
|
|
380
|
-
if (this.
|
|
929
|
+
protoOf(RealSink).n4 = function () {
|
|
930
|
+
if (this.l1p_1)
|
|
381
931
|
return Unit_instance;
|
|
382
932
|
var thrown = null;
|
|
383
933
|
try {
|
|
384
|
-
if (compare(this.
|
|
385
|
-
this.
|
|
934
|
+
if (compare(this.m1p_1.g1(), new Long(0, 0)) > 0) {
|
|
935
|
+
this.k1p_1.f1o(this.m1p_1, this.m1p_1.g1());
|
|
386
936
|
}
|
|
387
937
|
} catch ($p) {
|
|
388
938
|
if ($p instanceof Error) {
|
|
@@ -393,7 +943,7 @@
|
|
|
393
943
|
}
|
|
394
944
|
}
|
|
395
945
|
try {
|
|
396
|
-
this.
|
|
946
|
+
this.k1p_1.n4();
|
|
397
947
|
} catch ($p) {
|
|
398
948
|
if ($p instanceof Error) {
|
|
399
949
|
var e_0 = $p;
|
|
@@ -403,18 +953,153 @@
|
|
|
403
953
|
throw $p;
|
|
404
954
|
}
|
|
405
955
|
}
|
|
406
|
-
this.
|
|
956
|
+
this.l1p_1 = true;
|
|
407
957
|
if (!(thrown == null))
|
|
408
958
|
throw thrown;
|
|
409
959
|
};
|
|
410
960
|
protoOf(RealSink).toString = function () {
|
|
411
|
-
return 'buffered(' + toString(this.
|
|
961
|
+
return 'buffered(' + toString(this.k1p_1) + ')';
|
|
962
|
+
};
|
|
963
|
+
function RealSource(source) {
|
|
964
|
+
this.n1p_1 = source;
|
|
965
|
+
this.o1p_1 = false;
|
|
966
|
+
this.p1p_1 = new Buffer();
|
|
967
|
+
}
|
|
968
|
+
protoOf(RealSource).d1n = function () {
|
|
969
|
+
return this.p1p_1;
|
|
970
|
+
};
|
|
971
|
+
protoOf(RealSource).e1o = function (sink, byteCount) {
|
|
972
|
+
// Inline function 'kotlinx.io.RealSource.checkNotClosed' call
|
|
973
|
+
// Inline function 'kotlin.check' call
|
|
974
|
+
if (!!this.o1p_1) {
|
|
975
|
+
var message = 'Source is closed.';
|
|
976
|
+
throw IllegalStateException_init_$Create$(toString(message));
|
|
977
|
+
}
|
|
978
|
+
// Inline function 'kotlin.require' call
|
|
979
|
+
if (!(compare(byteCount, new Long(0, 0)) >= 0)) {
|
|
980
|
+
var message_0 = 'byteCount: ' + byteCount.toString();
|
|
981
|
+
throw IllegalArgumentException_init_$Create$(toString(message_0));
|
|
982
|
+
}
|
|
983
|
+
if (equalsLong(this.p1p_1.g1(), new Long(0, 0))) {
|
|
984
|
+
var read = this.n1p_1.e1o(this.p1p_1, new Long(8192, 0));
|
|
985
|
+
if (equalsLong(read, new Long(-1, -1)))
|
|
986
|
+
return new Long(-1, -1);
|
|
987
|
+
}
|
|
988
|
+
// Inline function 'kotlin.comparisons.minOf' call
|
|
989
|
+
var b = this.p1p_1.g1();
|
|
990
|
+
var toRead = compare(byteCount, b) <= 0 ? byteCount : b;
|
|
991
|
+
return this.p1p_1.e1o(sink, toRead);
|
|
992
|
+
};
|
|
993
|
+
protoOf(RealSource).e1n = function () {
|
|
994
|
+
// Inline function 'kotlinx.io.RealSource.checkNotClosed' call
|
|
995
|
+
// Inline function 'kotlin.check' call
|
|
996
|
+
if (!!this.o1p_1) {
|
|
997
|
+
var message = 'Source is closed.';
|
|
998
|
+
throw IllegalStateException_init_$Create$(toString(message));
|
|
999
|
+
}
|
|
1000
|
+
return this.p1p_1.e1n() && equalsLong(this.n1p_1.e1o(this.p1p_1, new Long(8192, 0)), new Long(-1, -1));
|
|
1001
|
+
};
|
|
1002
|
+
protoOf(RealSource).f1n = function (byteCount) {
|
|
1003
|
+
if (!this.g1n(byteCount))
|
|
1004
|
+
throw EOFException_init_$Create$_0("Source doesn't contain required number of bytes (" + byteCount.toString() + ').');
|
|
1005
|
+
};
|
|
1006
|
+
protoOf(RealSource).g1n = function (byteCount) {
|
|
1007
|
+
// Inline function 'kotlinx.io.RealSource.checkNotClosed' call
|
|
1008
|
+
// Inline function 'kotlin.check' call
|
|
1009
|
+
if (!!this.o1p_1) {
|
|
1010
|
+
var message = 'Source is closed.';
|
|
1011
|
+
throw IllegalStateException_init_$Create$(toString(message));
|
|
1012
|
+
}
|
|
1013
|
+
// Inline function 'kotlin.require' call
|
|
1014
|
+
if (!(compare(byteCount, new Long(0, 0)) >= 0)) {
|
|
1015
|
+
var message_0 = 'byteCount: ' + byteCount.toString();
|
|
1016
|
+
throw IllegalArgumentException_init_$Create$(toString(message_0));
|
|
1017
|
+
}
|
|
1018
|
+
while (compare(this.p1p_1.g1(), byteCount) < 0) {
|
|
1019
|
+
if (equalsLong(this.n1p_1.e1o(this.p1p_1, new Long(8192, 0)), new Long(-1, -1)))
|
|
1020
|
+
return false;
|
|
1021
|
+
}
|
|
1022
|
+
return true;
|
|
1023
|
+
};
|
|
1024
|
+
protoOf(RealSource).h1n = function () {
|
|
1025
|
+
this.f1n(new Long(1, 0));
|
|
1026
|
+
return this.p1p_1.h1n();
|
|
1027
|
+
};
|
|
1028
|
+
protoOf(RealSource).c1o = function (sink, startIndex, endIndex) {
|
|
1029
|
+
// Inline function 'kotlinx.io.checkBounds' call
|
|
1030
|
+
var size = sink.length;
|
|
1031
|
+
checkBounds(fromInt(size), fromInt(startIndex), fromInt(endIndex));
|
|
1032
|
+
if (equalsLong(this.p1p_1.g1(), new Long(0, 0))) {
|
|
1033
|
+
var read = this.n1p_1.e1o(this.p1p_1, new Long(8192, 0));
|
|
1034
|
+
if (equalsLong(read, new Long(-1, -1)))
|
|
1035
|
+
return -1;
|
|
1036
|
+
}
|
|
1037
|
+
var tmp0 = endIndex - startIndex | 0;
|
|
1038
|
+
// Inline function 'kotlinx.io.minOf' call
|
|
1039
|
+
var b = this.p1p_1.g1();
|
|
1040
|
+
// Inline function 'kotlin.comparisons.minOf' call
|
|
1041
|
+
var a = fromInt(tmp0);
|
|
1042
|
+
var tmp$ret$2 = compare(a, b) <= 0 ? a : b;
|
|
1043
|
+
var toRead = convertToInt(tmp$ret$2);
|
|
1044
|
+
return this.p1p_1.c1o(sink, startIndex, startIndex + toRead | 0);
|
|
1045
|
+
};
|
|
1046
|
+
protoOf(RealSource).g1o = function (sink, byteCount) {
|
|
1047
|
+
try {
|
|
1048
|
+
this.f1n(byteCount);
|
|
1049
|
+
} catch ($p) {
|
|
1050
|
+
if ($p instanceof EOFException) {
|
|
1051
|
+
var e = $p;
|
|
1052
|
+
sink.f1o(this.p1p_1, this.p1p_1.g1());
|
|
1053
|
+
throw e;
|
|
1054
|
+
} else {
|
|
1055
|
+
throw $p;
|
|
1056
|
+
}
|
|
1057
|
+
}
|
|
1058
|
+
this.p1p_1.g1o(sink, byteCount);
|
|
1059
|
+
};
|
|
1060
|
+
protoOf(RealSource).h1o = function (sink) {
|
|
1061
|
+
var totalBytesWritten = new Long(0, 0);
|
|
1062
|
+
while (!equalsLong(this.n1p_1.e1o(this.p1p_1, new Long(8192, 0)), new Long(-1, -1))) {
|
|
1063
|
+
var emitByteCount = this.p1p_1.y1n();
|
|
1064
|
+
if (compare(emitByteCount, new Long(0, 0)) > 0) {
|
|
1065
|
+
totalBytesWritten = add(totalBytesWritten, emitByteCount);
|
|
1066
|
+
sink.f1o(this.p1p_1, emitByteCount);
|
|
1067
|
+
}
|
|
1068
|
+
}
|
|
1069
|
+
if (compare(this.p1p_1.g1(), new Long(0, 0)) > 0) {
|
|
1070
|
+
totalBytesWritten = add(totalBytesWritten, this.p1p_1.g1());
|
|
1071
|
+
sink.f1o(this.p1p_1, this.p1p_1.g1());
|
|
1072
|
+
}
|
|
1073
|
+
return totalBytesWritten;
|
|
1074
|
+
};
|
|
1075
|
+
protoOf(RealSource).r1n = function () {
|
|
1076
|
+
this.f1n(new Long(2, 0));
|
|
1077
|
+
return this.p1p_1.r1n();
|
|
1078
|
+
};
|
|
1079
|
+
protoOf(RealSource).i1o = function () {
|
|
1080
|
+
// Inline function 'kotlinx.io.RealSource.checkNotClosed' call
|
|
1081
|
+
// Inline function 'kotlin.check' call
|
|
1082
|
+
if (!!this.o1p_1) {
|
|
1083
|
+
var message = 'Source is closed.';
|
|
1084
|
+
throw IllegalStateException_init_$Create$(toString(message));
|
|
1085
|
+
}
|
|
1086
|
+
return buffered(new PeekSource(this));
|
|
1087
|
+
};
|
|
1088
|
+
protoOf(RealSource).n4 = function () {
|
|
1089
|
+
if (this.o1p_1)
|
|
1090
|
+
return Unit_instance;
|
|
1091
|
+
this.o1p_1 = true;
|
|
1092
|
+
this.n1p_1.n4();
|
|
1093
|
+
this.p1p_1.c3();
|
|
1094
|
+
};
|
|
1095
|
+
protoOf(RealSource).toString = function () {
|
|
1096
|
+
return 'buffered(' + toString(this.n1p_1) + ')';
|
|
412
1097
|
};
|
|
413
1098
|
function Segment_init_$Init$($this) {
|
|
414
1099
|
Segment.call($this);
|
|
415
|
-
$this.
|
|
416
|
-
$this.
|
|
417
|
-
$this.
|
|
1100
|
+
$this.i1n_1 = new Int8Array(8192);
|
|
1101
|
+
$this.m1n_1 = true;
|
|
1102
|
+
$this.l1n_1 = null;
|
|
418
1103
|
return $this;
|
|
419
1104
|
}
|
|
420
1105
|
function Segment_init_$Create$() {
|
|
@@ -422,228 +1107,285 @@
|
|
|
422
1107
|
}
|
|
423
1108
|
function Segment_init_$Init$_0(data, pos, limit, shareToken, owner, $this) {
|
|
424
1109
|
Segment.call($this);
|
|
425
|
-
$this.
|
|
426
|
-
$this.
|
|
427
|
-
$this.
|
|
428
|
-
$this.
|
|
429
|
-
$this.
|
|
1110
|
+
$this.i1n_1 = data;
|
|
1111
|
+
$this.j1n_1 = pos;
|
|
1112
|
+
$this.k1n_1 = limit;
|
|
1113
|
+
$this.l1n_1 = shareToken;
|
|
1114
|
+
$this.m1n_1 = owner;
|
|
430
1115
|
return $this;
|
|
431
1116
|
}
|
|
432
1117
|
function Segment_init_$Create$_0(data, pos, limit, shareToken, owner) {
|
|
433
1118
|
return Segment_init_$Init$_0(data, pos, limit, shareToken, owner, objectCreate(protoOf(Segment)));
|
|
434
1119
|
}
|
|
435
1120
|
function Companion() {
|
|
436
|
-
this.
|
|
437
|
-
this.
|
|
1121
|
+
this.q1p_1 = 8192;
|
|
1122
|
+
this.r1p_1 = 1024;
|
|
438
1123
|
}
|
|
439
|
-
protoOf(Companion).
|
|
1124
|
+
protoOf(Companion).s1p = function () {
|
|
440
1125
|
return Segment_init_$Create$();
|
|
441
1126
|
};
|
|
442
1127
|
var Companion_instance;
|
|
443
1128
|
function Companion_getInstance() {
|
|
444
1129
|
return Companion_instance;
|
|
445
1130
|
}
|
|
446
|
-
protoOf(Segment).
|
|
447
|
-
var tmp0_safe_receiver = this.
|
|
448
|
-
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
1131
|
+
protoOf(Segment).s1o = function () {
|
|
1132
|
+
var tmp0_safe_receiver = this.l1n_1;
|
|
1133
|
+
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.t1p();
|
|
449
1134
|
return tmp1_elvis_lhs == null ? false : tmp1_elvis_lhs;
|
|
450
1135
|
};
|
|
451
|
-
protoOf(Segment).
|
|
452
|
-
var tmp0_elvis_lhs = this.
|
|
1136
|
+
protoOf(Segment).v1n = function () {
|
|
1137
|
+
var tmp0_elvis_lhs = this.l1n_1;
|
|
453
1138
|
var tmp;
|
|
454
1139
|
if (tmp0_elvis_lhs == null) {
|
|
455
1140
|
// Inline function 'kotlin.also' call
|
|
456
|
-
var this_0 = SegmentPool_instance.
|
|
457
|
-
this.
|
|
1141
|
+
var this_0 = SegmentPool_instance.u1p();
|
|
1142
|
+
this.l1n_1 = this_0;
|
|
458
1143
|
tmp = this_0;
|
|
459
1144
|
} else {
|
|
460
1145
|
tmp = tmp0_elvis_lhs;
|
|
461
1146
|
}
|
|
462
1147
|
var t = tmp;
|
|
463
|
-
var tmp_0 = this.
|
|
464
|
-
var tmp_1 = this.
|
|
1148
|
+
var tmp_0 = this.j1n_1;
|
|
1149
|
+
var tmp_1 = this.k1n_1;
|
|
465
1150
|
// Inline function 'kotlin.also' call
|
|
466
|
-
t.
|
|
467
|
-
return Segment_init_$Create$_0(this.
|
|
1151
|
+
t.v1p();
|
|
1152
|
+
return Segment_init_$Create$_0(this.i1n_1, tmp_0, tmp_1, t, false);
|
|
468
1153
|
};
|
|
469
|
-
protoOf(Segment).
|
|
470
|
-
var result = this.
|
|
471
|
-
if (!(this.
|
|
472
|
-
ensureNotNull(this.
|
|
1154
|
+
protoOf(Segment).v1o = function () {
|
|
1155
|
+
var result = this.n1n_1;
|
|
1156
|
+
if (!(this.o1n_1 == null)) {
|
|
1157
|
+
ensureNotNull(this.o1n_1).n1n_1 = this.n1n_1;
|
|
473
1158
|
}
|
|
474
|
-
if (!(this.
|
|
475
|
-
ensureNotNull(this.
|
|
1159
|
+
if (!(this.n1n_1 == null)) {
|
|
1160
|
+
ensureNotNull(this.n1n_1).o1n_1 = this.o1n_1;
|
|
476
1161
|
}
|
|
477
|
-
this.
|
|
478
|
-
this.
|
|
1162
|
+
this.n1n_1 = null;
|
|
1163
|
+
this.o1n_1 = null;
|
|
479
1164
|
return result;
|
|
480
1165
|
};
|
|
481
|
-
protoOf(Segment).
|
|
482
|
-
segment.
|
|
483
|
-
segment.
|
|
484
|
-
if (!(this.
|
|
485
|
-
ensureNotNull(this.
|
|
1166
|
+
protoOf(Segment).w1n = function (segment) {
|
|
1167
|
+
segment.o1n_1 = this;
|
|
1168
|
+
segment.n1n_1 = this.n1n_1;
|
|
1169
|
+
if (!(this.n1n_1 == null)) {
|
|
1170
|
+
ensureNotNull(this.n1n_1).o1n_1 = segment;
|
|
486
1171
|
}
|
|
487
|
-
this.
|
|
1172
|
+
this.n1n_1 = segment;
|
|
488
1173
|
return segment;
|
|
489
1174
|
};
|
|
490
|
-
protoOf(Segment).
|
|
1175
|
+
protoOf(Segment).t1o = function (byteCount) {
|
|
491
1176
|
// Inline function 'kotlin.require' call
|
|
492
|
-
if (!(byteCount > 0 && byteCount <= (this.
|
|
1177
|
+
if (!(byteCount > 0 && byteCount <= (this.k1n_1 - this.j1n_1 | 0))) {
|
|
493
1178
|
var message = 'byteCount out of range';
|
|
494
1179
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
495
1180
|
}
|
|
496
1181
|
var prefix;
|
|
497
1182
|
if (byteCount >= 1024) {
|
|
498
|
-
prefix = this.
|
|
1183
|
+
prefix = this.v1n();
|
|
499
1184
|
} else {
|
|
500
|
-
prefix = SegmentPool_instance.
|
|
501
|
-
var tmp0 = this.
|
|
502
|
-
var tmp2 = prefix.
|
|
503
|
-
var
|
|
1185
|
+
prefix = SegmentPool_instance.m1o();
|
|
1186
|
+
var tmp0 = this.i1n_1;
|
|
1187
|
+
var tmp2 = prefix.i1n_1;
|
|
1188
|
+
var tmp5 = this.j1n_1;
|
|
504
1189
|
// Inline function 'kotlin.collections.copyInto' call
|
|
505
|
-
var endIndex = this.
|
|
1190
|
+
var endIndex = this.j1n_1 + byteCount | 0;
|
|
506
1191
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
507
1192
|
// Inline function 'kotlin.js.asDynamic' call
|
|
508
1193
|
var tmp = tmp0;
|
|
509
1194
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
510
1195
|
// Inline function 'kotlin.js.asDynamic' call
|
|
511
|
-
arrayCopy(tmp, tmp2, 0,
|
|
1196
|
+
arrayCopy(tmp, tmp2, 0, tmp5, endIndex);
|
|
512
1197
|
}
|
|
513
|
-
prefix.
|
|
514
|
-
this.
|
|
515
|
-
if (!(this.
|
|
516
|
-
ensureNotNull(this.
|
|
1198
|
+
prefix.k1n_1 = prefix.j1n_1 + byteCount | 0;
|
|
1199
|
+
this.j1n_1 = this.j1n_1 + byteCount | 0;
|
|
1200
|
+
if (!(this.o1n_1 == null)) {
|
|
1201
|
+
ensureNotNull(this.o1n_1).w1n(prefix);
|
|
517
1202
|
} else {
|
|
518
|
-
prefix.
|
|
519
|
-
this.
|
|
1203
|
+
prefix.n1n_1 = this;
|
|
1204
|
+
this.o1n_1 = prefix;
|
|
520
1205
|
}
|
|
521
1206
|
return prefix;
|
|
522
1207
|
};
|
|
523
|
-
protoOf(Segment).
|
|
1208
|
+
protoOf(Segment).x1n = function () {
|
|
524
1209
|
// Inline function 'kotlin.check' call
|
|
525
|
-
if (!!(this.
|
|
1210
|
+
if (!!(this.o1n_1 == null)) {
|
|
526
1211
|
var message = 'cannot compact';
|
|
527
1212
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
528
1213
|
}
|
|
529
|
-
if (!ensureNotNull(this.
|
|
1214
|
+
if (!ensureNotNull(this.o1n_1).m1n_1)
|
|
530
1215
|
return this;
|
|
531
|
-
var byteCount = this.
|
|
532
|
-
var availableByteCount = (8192 - ensureNotNull(this.
|
|
1216
|
+
var byteCount = this.k1n_1 - this.j1n_1 | 0;
|
|
1217
|
+
var availableByteCount = (8192 - ensureNotNull(this.o1n_1).k1n_1 | 0) + (ensureNotNull(this.o1n_1).s1o() ? 0 : ensureNotNull(this.o1n_1).j1n_1) | 0;
|
|
533
1218
|
if (byteCount > availableByteCount)
|
|
534
1219
|
return this;
|
|
535
|
-
var predecessor = this.
|
|
536
|
-
this.
|
|
537
|
-
var successor = this.
|
|
1220
|
+
var predecessor = this.o1n_1;
|
|
1221
|
+
this.u1o(ensureNotNull(predecessor), byteCount);
|
|
1222
|
+
var successor = this.v1o();
|
|
538
1223
|
// Inline function 'kotlin.check' call
|
|
539
1224
|
if (!(successor == null)) {
|
|
540
1225
|
throw IllegalStateException_init_$Create$('Check failed.');
|
|
541
1226
|
}
|
|
542
|
-
SegmentPool_instance.
|
|
1227
|
+
SegmentPool_instance.c1p(this);
|
|
543
1228
|
return predecessor;
|
|
544
1229
|
};
|
|
545
|
-
protoOf(Segment).
|
|
546
|
-
var _unary__edvuaz = this.
|
|
547
|
-
this.
|
|
548
|
-
this.
|
|
1230
|
+
protoOf(Segment).y1o = function (byte) {
|
|
1231
|
+
var _unary__edvuaz = this.k1n_1;
|
|
1232
|
+
this.k1n_1 = _unary__edvuaz + 1 | 0;
|
|
1233
|
+
this.i1n_1[_unary__edvuaz] = byte;
|
|
1234
|
+
};
|
|
1235
|
+
protoOf(Segment).a1p = function (short) {
|
|
1236
|
+
var data = this.i1n_1;
|
|
1237
|
+
var limit = this.k1n_1;
|
|
1238
|
+
var _unary__edvuaz = limit;
|
|
1239
|
+
limit = _unary__edvuaz + 1 | 0;
|
|
1240
|
+
data[_unary__edvuaz] = toByte((short >>> 8 | 0) & 255);
|
|
1241
|
+
var _unary__edvuaz_0 = limit;
|
|
1242
|
+
limit = _unary__edvuaz_0 + 1 | 0;
|
|
1243
|
+
data[_unary__edvuaz_0] = toByte(short & 255);
|
|
1244
|
+
this.k1n_1 = limit;
|
|
549
1245
|
};
|
|
550
|
-
protoOf(Segment).
|
|
1246
|
+
protoOf(Segment).q1n = function () {
|
|
1247
|
+
var _unary__edvuaz = this.j1n_1;
|
|
1248
|
+
this.j1n_1 = _unary__edvuaz + 1 | 0;
|
|
1249
|
+
return this.i1n_1[_unary__edvuaz];
|
|
1250
|
+
};
|
|
1251
|
+
protoOf(Segment).s1n = function () {
|
|
1252
|
+
var data = this.i1n_1;
|
|
1253
|
+
var pos = this.j1n_1;
|
|
1254
|
+
var _unary__edvuaz = pos;
|
|
1255
|
+
pos = _unary__edvuaz + 1 | 0;
|
|
1256
|
+
// Inline function 'kotlinx.io.and' call
|
|
1257
|
+
var tmp = (data[_unary__edvuaz] & 255) << 8;
|
|
1258
|
+
var _unary__edvuaz_0 = pos;
|
|
1259
|
+
pos = _unary__edvuaz_0 + 1 | 0;
|
|
1260
|
+
// Inline function 'kotlinx.io.and' call
|
|
1261
|
+
var tmp$ret$1 = data[_unary__edvuaz_0] & 255;
|
|
1262
|
+
var s = toShort(tmp | tmp$ret$1);
|
|
1263
|
+
this.j1n_1 = pos;
|
|
1264
|
+
return s;
|
|
1265
|
+
};
|
|
1266
|
+
protoOf(Segment).u1o = function (sink, byteCount) {
|
|
551
1267
|
// Inline function 'kotlin.check' call
|
|
552
|
-
if (!sink.
|
|
1268
|
+
if (!sink.m1n_1) {
|
|
553
1269
|
var message = 'only owner can write';
|
|
554
1270
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
555
1271
|
}
|
|
556
|
-
if ((sink.
|
|
557
|
-
if (sink.
|
|
1272
|
+
if ((sink.k1n_1 + byteCount | 0) > 8192) {
|
|
1273
|
+
if (sink.s1o())
|
|
558
1274
|
throw IllegalArgumentException_init_$Create$_0();
|
|
559
|
-
if (((sink.
|
|
1275
|
+
if (((sink.k1n_1 + byteCount | 0) - sink.j1n_1 | 0) > 8192)
|
|
560
1276
|
throw IllegalArgumentException_init_$Create$_0();
|
|
561
|
-
var tmp0 = sink.
|
|
562
|
-
var tmp2 = sink.
|
|
563
|
-
var
|
|
1277
|
+
var tmp0 = sink.i1n_1;
|
|
1278
|
+
var tmp2 = sink.i1n_1;
|
|
1279
|
+
var tmp5 = sink.j1n_1;
|
|
564
1280
|
// Inline function 'kotlin.collections.copyInto' call
|
|
565
|
-
var endIndex = sink.
|
|
1281
|
+
var endIndex = sink.k1n_1;
|
|
566
1282
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
567
1283
|
// Inline function 'kotlin.js.asDynamic' call
|
|
568
1284
|
var tmp = tmp0;
|
|
569
1285
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
570
1286
|
// Inline function 'kotlin.js.asDynamic' call
|
|
571
|
-
arrayCopy(tmp, tmp2, 0,
|
|
572
|
-
sink.
|
|
573
|
-
sink.
|
|
574
|
-
}
|
|
575
|
-
var tmp0_0 = this.
|
|
576
|
-
var tmp2_0 = sink.
|
|
577
|
-
var
|
|
578
|
-
var tmp6 = this.
|
|
1287
|
+
arrayCopy(tmp, tmp2, 0, tmp5, endIndex);
|
|
1288
|
+
sink.k1n_1 = sink.k1n_1 - sink.j1n_1 | 0;
|
|
1289
|
+
sink.j1n_1 = 0;
|
|
1290
|
+
}
|
|
1291
|
+
var tmp0_0 = this.i1n_1;
|
|
1292
|
+
var tmp2_0 = sink.i1n_1;
|
|
1293
|
+
var tmp4 = sink.k1n_1;
|
|
1294
|
+
var tmp6 = this.j1n_1;
|
|
579
1295
|
// Inline function 'kotlin.collections.copyInto' call
|
|
580
|
-
var endIndex_0 = this.
|
|
1296
|
+
var endIndex_0 = this.j1n_1 + byteCount | 0;
|
|
581
1297
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
582
1298
|
// Inline function 'kotlin.js.asDynamic' call
|
|
583
1299
|
var tmp_0 = tmp0_0;
|
|
584
1300
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
585
1301
|
// Inline function 'kotlin.js.asDynamic' call
|
|
586
|
-
arrayCopy(tmp_0, tmp2_0,
|
|
587
|
-
sink.
|
|
588
|
-
this.
|
|
1302
|
+
arrayCopy(tmp_0, tmp2_0, tmp4, tmp6, endIndex_0);
|
|
1303
|
+
sink.k1n_1 = sink.k1n_1 + byteCount | 0;
|
|
1304
|
+
this.j1n_1 = this.j1n_1 + byteCount | 0;
|
|
589
1305
|
};
|
|
590
|
-
protoOf(Segment).
|
|
591
|
-
|
|
1306
|
+
protoOf(Segment).d1o = function (dst, dstStartOffset, dstEndOffset) {
|
|
1307
|
+
var len = dstEndOffset - dstStartOffset | 0;
|
|
1308
|
+
var tmp0 = this.i1n_1;
|
|
1309
|
+
var tmp6 = this.j1n_1;
|
|
1310
|
+
// Inline function 'kotlin.collections.copyInto' call
|
|
1311
|
+
var endIndex = this.j1n_1 + len | 0;
|
|
1312
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
1313
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
1314
|
+
var tmp = tmp0;
|
|
1315
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
1316
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
1317
|
+
arrayCopy(tmp, dst, dstStartOffset, tmp6, endIndex);
|
|
1318
|
+
this.j1n_1 = this.j1n_1 + len | 0;
|
|
592
1319
|
};
|
|
593
|
-
protoOf(Segment).
|
|
594
|
-
|
|
1320
|
+
protoOf(Segment).p1o = function (src, srcStartOffset, srcEndOffset) {
|
|
1321
|
+
var tmp2 = this.i1n_1;
|
|
1322
|
+
// Inline function 'kotlin.collections.copyInto' call
|
|
1323
|
+
var destinationOffset = this.k1n_1;
|
|
1324
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
1325
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
1326
|
+
var tmp = src;
|
|
1327
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
1328
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
1329
|
+
arrayCopy(tmp, tmp2, destinationOffset, srcStartOffset, srcEndOffset);
|
|
1330
|
+
this.k1n_1 = this.k1n_1 + (srcEndOffset - srcStartOffset | 0) | 0;
|
|
1331
|
+
};
|
|
1332
|
+
protoOf(Segment).g1 = function () {
|
|
1333
|
+
return this.k1n_1 - this.j1n_1 | 0;
|
|
1334
|
+
};
|
|
1335
|
+
protoOf(Segment).o1o = function () {
|
|
1336
|
+
return this.i1n_1.length - this.k1n_1 | 0;
|
|
595
1337
|
};
|
|
596
|
-
protoOf(Segment).
|
|
597
|
-
return this.
|
|
1338
|
+
protoOf(Segment).w1p = function (readOnly) {
|
|
1339
|
+
return this.i1n_1;
|
|
598
1340
|
};
|
|
599
|
-
protoOf(Segment).
|
|
600
|
-
return this.
|
|
1341
|
+
protoOf(Segment).a1o = function (index) {
|
|
1342
|
+
return this.i1n_1[this.j1n_1 + index | 0];
|
|
601
1343
|
};
|
|
602
|
-
protoOf(Segment).
|
|
603
|
-
this.
|
|
1344
|
+
protoOf(Segment).x1p = function (index, value) {
|
|
1345
|
+
this.i1n_1[this.k1n_1 + index | 0] = value;
|
|
604
1346
|
};
|
|
605
|
-
protoOf(Segment).
|
|
606
|
-
var d = this.
|
|
607
|
-
var l = this.
|
|
1347
|
+
protoOf(Segment).y1p = function (index, b0, b1) {
|
|
1348
|
+
var d = this.i1n_1;
|
|
1349
|
+
var l = this.k1n_1;
|
|
608
1350
|
d[l + index | 0] = b0;
|
|
609
1351
|
d[(l + index | 0) + 1 | 0] = b1;
|
|
610
1352
|
};
|
|
611
|
-
protoOf(Segment).
|
|
612
|
-
var d = this.
|
|
613
|
-
var l = this.
|
|
1353
|
+
protoOf(Segment).z1p = function (index, b0, b1, b2) {
|
|
1354
|
+
var d = this.i1n_1;
|
|
1355
|
+
var l = this.k1n_1;
|
|
614
1356
|
d[l + index | 0] = b0;
|
|
615
1357
|
d[(l + index | 0) + 1 | 0] = b1;
|
|
616
1358
|
d[(l + index | 0) + 2 | 0] = b2;
|
|
617
1359
|
};
|
|
618
|
-
protoOf(Segment).
|
|
619
|
-
var d = this.
|
|
620
|
-
var l = this.
|
|
1360
|
+
protoOf(Segment).a1q = function (index, b0, b1, b2, b3) {
|
|
1361
|
+
var d = this.i1n_1;
|
|
1362
|
+
var l = this.k1n_1;
|
|
621
1363
|
d[l + index | 0] = b0;
|
|
622
1364
|
d[(l + index | 0) + 1 | 0] = b1;
|
|
623
1365
|
d[(l + index | 0) + 2 | 0] = b2;
|
|
624
1366
|
d[(l + index | 0) + 3 | 0] = b3;
|
|
625
1367
|
};
|
|
626
1368
|
function Segment() {
|
|
627
|
-
this.
|
|
628
|
-
this.
|
|
629
|
-
this.
|
|
630
|
-
this.
|
|
631
|
-
this.
|
|
632
|
-
this.
|
|
633
|
-
}
|
|
634
|
-
function SegmentCopyTracker() {
|
|
1369
|
+
this.j1n_1 = 0;
|
|
1370
|
+
this.k1n_1 = 0;
|
|
1371
|
+
this.l1n_1 = null;
|
|
1372
|
+
this.m1n_1 = false;
|
|
1373
|
+
this.n1n_1 = null;
|
|
1374
|
+
this.o1n_1 = null;
|
|
635
1375
|
}
|
|
636
1376
|
function isEmpty(_this__u8e3s4) {
|
|
637
|
-
return _this__u8e3s4.
|
|
1377
|
+
return _this__u8e3s4.g1() === 0;
|
|
1378
|
+
}
|
|
1379
|
+
function SegmentCopyTracker() {
|
|
638
1380
|
}
|
|
639
1381
|
function AlwaysSharedCopyTracker() {
|
|
640
1382
|
AlwaysSharedCopyTracker_instance = this;
|
|
641
1383
|
SegmentCopyTracker.call(this);
|
|
642
1384
|
}
|
|
643
|
-
protoOf(AlwaysSharedCopyTracker).
|
|
1385
|
+
protoOf(AlwaysSharedCopyTracker).t1p = function () {
|
|
644
1386
|
return true;
|
|
645
1387
|
};
|
|
646
|
-
protoOf(AlwaysSharedCopyTracker).
|
|
1388
|
+
protoOf(AlwaysSharedCopyTracker).v1p = function () {
|
|
647
1389
|
return Unit_instance;
|
|
648
1390
|
};
|
|
649
1391
|
var AlwaysSharedCopyTracker_instance;
|
|
@@ -652,6 +1394,139 @@
|
|
|
652
1394
|
new AlwaysSharedCopyTracker();
|
|
653
1395
|
return AlwaysSharedCopyTracker_instance;
|
|
654
1396
|
}
|
|
1397
|
+
function indexOf_0(_this__u8e3s4, byte, startOffset, endOffset) {
|
|
1398
|
+
// Inline function 'kotlin.require' call
|
|
1399
|
+
if (!(0 <= startOffset ? startOffset < _this__u8e3s4.g1() : false)) {
|
|
1400
|
+
var message = '' + startOffset;
|
|
1401
|
+
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
1402
|
+
}
|
|
1403
|
+
// Inline function 'kotlin.require' call
|
|
1404
|
+
if (!(startOffset <= endOffset ? endOffset <= _this__u8e3s4.g1() : false)) {
|
|
1405
|
+
var message_0 = '' + endOffset;
|
|
1406
|
+
throw IllegalArgumentException_init_$Create$(toString(message_0));
|
|
1407
|
+
}
|
|
1408
|
+
var p = _this__u8e3s4.j1n_1;
|
|
1409
|
+
var data = _this__u8e3s4.w1p(true);
|
|
1410
|
+
var inductionVariable = startOffset;
|
|
1411
|
+
if (inductionVariable < endOffset)
|
|
1412
|
+
do {
|
|
1413
|
+
var idx = inductionVariable;
|
|
1414
|
+
inductionVariable = inductionVariable + 1 | 0;
|
|
1415
|
+
if (data[p + idx | 0] === byte) {
|
|
1416
|
+
return idx;
|
|
1417
|
+
}
|
|
1418
|
+
}
|
|
1419
|
+
while (inductionVariable < endOffset);
|
|
1420
|
+
return -1;
|
|
1421
|
+
}
|
|
1422
|
+
function Sink() {
|
|
1423
|
+
}
|
|
1424
|
+
function Source() {
|
|
1425
|
+
}
|
|
1426
|
+
function readByteArray(_this__u8e3s4) {
|
|
1427
|
+
return readByteArrayImpl(_this__u8e3s4, -1);
|
|
1428
|
+
}
|
|
1429
|
+
function readByteArray_0(_this__u8e3s4, byteCount) {
|
|
1430
|
+
// Inline function 'kotlinx.io.checkByteCount' call
|
|
1431
|
+
var byteCount_0 = fromInt(byteCount);
|
|
1432
|
+
// Inline function 'kotlin.require' call
|
|
1433
|
+
if (!(compare(byteCount_0, new Long(0, 0)) >= 0)) {
|
|
1434
|
+
var message = 'byteCount (' + byteCount_0.toString() + ') < 0';
|
|
1435
|
+
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
1436
|
+
}
|
|
1437
|
+
return readByteArrayImpl(_this__u8e3s4, byteCount);
|
|
1438
|
+
}
|
|
1439
|
+
function indexOf_1(_this__u8e3s4, byte, startIndex, endIndex) {
|
|
1440
|
+
startIndex = startIndex === VOID ? new Long(0, 0) : startIndex;
|
|
1441
|
+
endIndex = endIndex === VOID ? new Long(-1, 2147483647) : endIndex;
|
|
1442
|
+
// Inline function 'kotlin.require' call
|
|
1443
|
+
if (!(compare(new Long(0, 0), startIndex) <= 0 ? compare(startIndex, endIndex) <= 0 : false)) {
|
|
1444
|
+
var tmp;
|
|
1445
|
+
if (compare(endIndex, new Long(0, 0)) < 0) {
|
|
1446
|
+
tmp = 'startIndex (' + startIndex.toString() + ') and endIndex (' + endIndex.toString() + ') should be non negative';
|
|
1447
|
+
} else {
|
|
1448
|
+
tmp = 'startIndex (' + startIndex.toString() + ') is not within the range [0..endIndex(' + endIndex.toString() + '))';
|
|
1449
|
+
}
|
|
1450
|
+
var message = tmp;
|
|
1451
|
+
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
1452
|
+
}
|
|
1453
|
+
if (equalsLong(startIndex, endIndex))
|
|
1454
|
+
return new Long(-1, -1);
|
|
1455
|
+
var offset = startIndex;
|
|
1456
|
+
$l$loop: while (true) {
|
|
1457
|
+
var tmp_0;
|
|
1458
|
+
if (compare(offset, endIndex) < 0) {
|
|
1459
|
+
// Inline function 'kotlin.Long.plus' call
|
|
1460
|
+
var this_0 = offset;
|
|
1461
|
+
var tmp$ret$2 = add(this_0, fromInt(1));
|
|
1462
|
+
tmp_0 = _this__u8e3s4.g1n(tmp$ret$2);
|
|
1463
|
+
} else {
|
|
1464
|
+
tmp_0 = false;
|
|
1465
|
+
}
|
|
1466
|
+
if (!tmp_0) {
|
|
1467
|
+
break $l$loop;
|
|
1468
|
+
}
|
|
1469
|
+
var tmp_1 = _this__u8e3s4.d1n();
|
|
1470
|
+
var tmp_2 = offset;
|
|
1471
|
+
// Inline function 'kotlin.comparisons.minOf' call
|
|
1472
|
+
var b = _this__u8e3s4.d1n().g1();
|
|
1473
|
+
var tmp$ret$3 = compare(endIndex, b) <= 0 ? endIndex : b;
|
|
1474
|
+
var idx = indexOf(tmp_1, byte, tmp_2, tmp$ret$3);
|
|
1475
|
+
if (!equalsLong(idx, new Long(-1, -1))) {
|
|
1476
|
+
return idx;
|
|
1477
|
+
}
|
|
1478
|
+
offset = _this__u8e3s4.d1n().g1();
|
|
1479
|
+
}
|
|
1480
|
+
return new Long(-1, -1);
|
|
1481
|
+
}
|
|
1482
|
+
function readByteArrayImpl(_this__u8e3s4, size) {
|
|
1483
|
+
var arraySize = size;
|
|
1484
|
+
if (size === -1) {
|
|
1485
|
+
var fetchSize = new Long(2147483647, 0);
|
|
1486
|
+
while (compare(_this__u8e3s4.d1n().g1(), new Long(2147483647, 0)) < 0 && _this__u8e3s4.g1n(fetchSize)) {
|
|
1487
|
+
// Inline function 'kotlin.Long.times' call
|
|
1488
|
+
var this_0 = fetchSize;
|
|
1489
|
+
fetchSize = multiply(this_0, fromInt(2));
|
|
1490
|
+
}
|
|
1491
|
+
// Inline function 'kotlin.check' call
|
|
1492
|
+
if (!(compare(_this__u8e3s4.d1n().g1(), new Long(2147483647, 0)) < 0)) {
|
|
1493
|
+
var message = "Can't create an array of size " + _this__u8e3s4.d1n().g1().toString();
|
|
1494
|
+
throw IllegalStateException_init_$Create$(toString(message));
|
|
1495
|
+
}
|
|
1496
|
+
arraySize = convertToInt(_this__u8e3s4.d1n().g1());
|
|
1497
|
+
} else {
|
|
1498
|
+
_this__u8e3s4.f1n(fromInt(size));
|
|
1499
|
+
}
|
|
1500
|
+
var array = new Int8Array(arraySize);
|
|
1501
|
+
readTo(_this__u8e3s4.d1n(), array);
|
|
1502
|
+
return array;
|
|
1503
|
+
}
|
|
1504
|
+
function readTo(_this__u8e3s4, sink, startIndex, endIndex) {
|
|
1505
|
+
startIndex = startIndex === VOID ? 0 : startIndex;
|
|
1506
|
+
endIndex = endIndex === VOID ? sink.length : endIndex;
|
|
1507
|
+
// Inline function 'kotlinx.io.checkBounds' call
|
|
1508
|
+
var size = sink.length;
|
|
1509
|
+
checkBounds(fromInt(size), fromInt(startIndex), fromInt(endIndex));
|
|
1510
|
+
var offset = startIndex;
|
|
1511
|
+
while (offset < endIndex) {
|
|
1512
|
+
var bytesRead = _this__u8e3s4.c1o(sink, offset, endIndex);
|
|
1513
|
+
if (bytesRead === -1) {
|
|
1514
|
+
throw EOFException_init_$Create$_0('Source exhausted before reading ' + (endIndex - startIndex | 0) + ' bytes. ' + ('Only ' + bytesRead + ' bytes were read.'));
|
|
1515
|
+
}
|
|
1516
|
+
offset = offset + bytesRead | 0;
|
|
1517
|
+
}
|
|
1518
|
+
}
|
|
1519
|
+
function readString(_this__u8e3s4) {
|
|
1520
|
+
return commonReadUtf8(_this__u8e3s4, _this__u8e3s4.g1());
|
|
1521
|
+
}
|
|
1522
|
+
function readString_0(_this__u8e3s4) {
|
|
1523
|
+
_this__u8e3s4.g1n(new Long(-1, 2147483647));
|
|
1524
|
+
return commonReadUtf8(_this__u8e3s4.d1n(), _this__u8e3s4.d1n().g1());
|
|
1525
|
+
}
|
|
1526
|
+
function readString_1(_this__u8e3s4, byteCount) {
|
|
1527
|
+
_this__u8e3s4.f1n(byteCount);
|
|
1528
|
+
return commonReadUtf8(_this__u8e3s4.d1n(), byteCount);
|
|
1529
|
+
}
|
|
655
1530
|
function writeString(_this__u8e3s4, string, startIndex, endIndex) {
|
|
656
1531
|
startIndex = startIndex === VOID ? 0 : startIndex;
|
|
657
1532
|
endIndex = endIndex === VOID ? string.length : endIndex;
|
|
@@ -660,7 +1535,7 @@
|
|
|
660
1535
|
checkBounds(fromInt(size), fromInt(startIndex), fromInt(endIndex));
|
|
661
1536
|
// Inline function 'kotlinx.io.writeToInternalBuffer' call
|
|
662
1537
|
// Inline function 'kotlinx.io.commonWriteUtf8' call
|
|
663
|
-
var this_0 = _this__u8e3s4.
|
|
1538
|
+
var this_0 = _this__u8e3s4.d1n();
|
|
664
1539
|
var i = startIndex;
|
|
665
1540
|
while (i < endIndex) {
|
|
666
1541
|
var p0 = i;
|
|
@@ -670,15 +1545,15 @@
|
|
|
670
1545
|
if (c < 128) {
|
|
671
1546
|
$l$block_0: {
|
|
672
1547
|
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.writeToTail' call
|
|
673
|
-
var tail = this_0.
|
|
1548
|
+
var tail = this_0.j1o(1);
|
|
674
1549
|
var ctx = get_SegmentWriteContextImpl();
|
|
675
1550
|
var segmentOffset = -i | 0;
|
|
676
1551
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
677
|
-
var b = i + tail.
|
|
1552
|
+
var b = i + tail.o1o() | 0;
|
|
678
1553
|
var runLimit = Math.min(endIndex, b);
|
|
679
1554
|
var _unary__edvuaz = i;
|
|
680
1555
|
i = _unary__edvuaz + 1 | 0;
|
|
681
|
-
ctx.
|
|
1556
|
+
ctx.e1q(tail, segmentOffset + _unary__edvuaz | 0, toByte(c));
|
|
682
1557
|
$l$loop: while (i < runLimit) {
|
|
683
1558
|
var p0_0 = i;
|
|
684
1559
|
// Inline function 'kotlin.code' call
|
|
@@ -688,95 +1563,95 @@
|
|
|
688
1563
|
break $l$loop;
|
|
689
1564
|
var _unary__edvuaz_0 = i;
|
|
690
1565
|
i = _unary__edvuaz_0 + 1 | 0;
|
|
691
|
-
ctx.
|
|
1566
|
+
ctx.e1q(tail, segmentOffset + _unary__edvuaz_0 | 0, toByte(c));
|
|
692
1567
|
}
|
|
693
1568
|
var bytesWritten = i + segmentOffset | 0;
|
|
694
1569
|
if (bytesWritten === 1) {
|
|
695
|
-
tail.
|
|
1570
|
+
tail.k1n_1 = tail.k1n_1 + bytesWritten | 0;
|
|
696
1571
|
var tmp = this_0;
|
|
697
1572
|
// Inline function 'kotlin.Long.plus' call
|
|
698
|
-
var this_3 = this_0.
|
|
699
|
-
tmp.
|
|
1573
|
+
var this_3 = this_0.c1n_1;
|
|
1574
|
+
tmp.c1n_1 = add(this_3, fromInt(bytesWritten));
|
|
700
1575
|
break $l$block_0;
|
|
701
1576
|
}
|
|
702
1577
|
// Inline function 'kotlin.check' call
|
|
703
|
-
if (!(0 <= bytesWritten ? bytesWritten <= tail.
|
|
704
|
-
var message = 'Invalid number of bytes written: ' + bytesWritten + '. Should be in 0..' + tail.
|
|
1578
|
+
if (!(0 <= bytesWritten ? bytesWritten <= tail.o1o() : false)) {
|
|
1579
|
+
var message = 'Invalid number of bytes written: ' + bytesWritten + '. Should be in 0..' + tail.o1o();
|
|
705
1580
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
706
1581
|
}
|
|
707
1582
|
if (!(bytesWritten === 0)) {
|
|
708
|
-
tail.
|
|
1583
|
+
tail.k1n_1 = tail.k1n_1 + bytesWritten | 0;
|
|
709
1584
|
var tmp_0 = this_0;
|
|
710
1585
|
// Inline function 'kotlin.Long.plus' call
|
|
711
|
-
var this_4 = this_0.
|
|
712
|
-
tmp_0.
|
|
1586
|
+
var this_4 = this_0.c1n_1;
|
|
1587
|
+
tmp_0.c1n_1 = add(this_4, fromInt(bytesWritten));
|
|
713
1588
|
break $l$block_0;
|
|
714
1589
|
}
|
|
715
1590
|
if (isEmpty(tail)) {
|
|
716
|
-
this_0.
|
|
1591
|
+
this_0.d1p();
|
|
717
1592
|
}
|
|
718
1593
|
}
|
|
719
1594
|
} else if (c < 2048) {
|
|
720
1595
|
$l$block_2: {
|
|
721
1596
|
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.writeToTail' call
|
|
722
|
-
var tail_0 = this_0.
|
|
723
|
-
get_SegmentWriteContextImpl().
|
|
1597
|
+
var tail_0 = this_0.j1o(2);
|
|
1598
|
+
get_SegmentWriteContextImpl().d1q(tail_0, 0, toByte(c >> 6 | 192), toByte(c & 63 | 128));
|
|
724
1599
|
var bytesWritten_0 = 2;
|
|
725
1600
|
if (bytesWritten_0 === 2) {
|
|
726
|
-
tail_0.
|
|
1601
|
+
tail_0.k1n_1 = tail_0.k1n_1 + bytesWritten_0 | 0;
|
|
727
1602
|
var tmp_1 = this_0;
|
|
728
1603
|
// Inline function 'kotlin.Long.plus' call
|
|
729
|
-
var this_5 = this_0.
|
|
730
|
-
tmp_1.
|
|
1604
|
+
var this_5 = this_0.c1n_1;
|
|
1605
|
+
tmp_1.c1n_1 = add(this_5, fromInt(bytesWritten_0));
|
|
731
1606
|
break $l$block_2;
|
|
732
1607
|
}
|
|
733
1608
|
// Inline function 'kotlin.check' call
|
|
734
|
-
if (!(0 <= bytesWritten_0 ? bytesWritten_0 <= tail_0.
|
|
735
|
-
var message_0 = 'Invalid number of bytes written: ' + bytesWritten_0 + '. Should be in 0..' + tail_0.
|
|
1609
|
+
if (!(0 <= bytesWritten_0 ? bytesWritten_0 <= tail_0.o1o() : false)) {
|
|
1610
|
+
var message_0 = 'Invalid number of bytes written: ' + bytesWritten_0 + '. Should be in 0..' + tail_0.o1o();
|
|
736
1611
|
throw IllegalStateException_init_$Create$(toString(message_0));
|
|
737
1612
|
}
|
|
738
1613
|
if (!(bytesWritten_0 === 0)) {
|
|
739
|
-
tail_0.
|
|
1614
|
+
tail_0.k1n_1 = tail_0.k1n_1 + bytesWritten_0 | 0;
|
|
740
1615
|
var tmp_2 = this_0;
|
|
741
1616
|
// Inline function 'kotlin.Long.plus' call
|
|
742
|
-
var this_6 = this_0.
|
|
743
|
-
tmp_2.
|
|
1617
|
+
var this_6 = this_0.c1n_1;
|
|
1618
|
+
tmp_2.c1n_1 = add(this_6, fromInt(bytesWritten_0));
|
|
744
1619
|
break $l$block_2;
|
|
745
1620
|
}
|
|
746
1621
|
if (isEmpty(tail_0)) {
|
|
747
|
-
this_0.
|
|
1622
|
+
this_0.d1p();
|
|
748
1623
|
}
|
|
749
1624
|
}
|
|
750
1625
|
i = i + 1 | 0;
|
|
751
1626
|
} else if (c < 55296 || c > 57343) {
|
|
752
1627
|
$l$block_4: {
|
|
753
1628
|
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.writeToTail' call
|
|
754
|
-
var tail_1 = this_0.
|
|
755
|
-
get_SegmentWriteContextImpl().
|
|
1629
|
+
var tail_1 = this_0.j1o(3);
|
|
1630
|
+
get_SegmentWriteContextImpl().c1q(tail_1, 0, toByte(c >> 12 | 224), toByte(c >> 6 & 63 | 128), toByte(c & 63 | 128));
|
|
756
1631
|
var bytesWritten_1 = 3;
|
|
757
1632
|
if (bytesWritten_1 === 3) {
|
|
758
|
-
tail_1.
|
|
1633
|
+
tail_1.k1n_1 = tail_1.k1n_1 + bytesWritten_1 | 0;
|
|
759
1634
|
var tmp_3 = this_0;
|
|
760
1635
|
// Inline function 'kotlin.Long.plus' call
|
|
761
|
-
var this_7 = this_0.
|
|
762
|
-
tmp_3.
|
|
1636
|
+
var this_7 = this_0.c1n_1;
|
|
1637
|
+
tmp_3.c1n_1 = add(this_7, fromInt(bytesWritten_1));
|
|
763
1638
|
break $l$block_4;
|
|
764
1639
|
}
|
|
765
1640
|
// Inline function 'kotlin.check' call
|
|
766
|
-
if (!(0 <= bytesWritten_1 ? bytesWritten_1 <= tail_1.
|
|
767
|
-
var message_1 = 'Invalid number of bytes written: ' + bytesWritten_1 + '. Should be in 0..' + tail_1.
|
|
1641
|
+
if (!(0 <= bytesWritten_1 ? bytesWritten_1 <= tail_1.o1o() : false)) {
|
|
1642
|
+
var message_1 = 'Invalid number of bytes written: ' + bytesWritten_1 + '. Should be in 0..' + tail_1.o1o();
|
|
768
1643
|
throw IllegalStateException_init_$Create$(toString(message_1));
|
|
769
1644
|
}
|
|
770
1645
|
if (!(bytesWritten_1 === 0)) {
|
|
771
|
-
tail_1.
|
|
1646
|
+
tail_1.k1n_1 = tail_1.k1n_1 + bytesWritten_1 | 0;
|
|
772
1647
|
var tmp_4 = this_0;
|
|
773
1648
|
// Inline function 'kotlin.Long.plus' call
|
|
774
|
-
var this_8 = this_0.
|
|
775
|
-
tmp_4.
|
|
1649
|
+
var this_8 = this_0.c1n_1;
|
|
1650
|
+
tmp_4.c1n_1 = add(this_8, fromInt(bytesWritten_1));
|
|
776
1651
|
break $l$block_4;
|
|
777
1652
|
}
|
|
778
1653
|
if (isEmpty(tail_1)) {
|
|
779
|
-
this_0.
|
|
1654
|
+
this_0.d1p();
|
|
780
1655
|
}
|
|
781
1656
|
}
|
|
782
1657
|
i = i + 1 | 0;
|
|
@@ -795,45 +1670,71 @@
|
|
|
795
1670
|
// Inline function 'kotlin.code' call
|
|
796
1671
|
var this_10 = _Char___init__impl__6a9atx(63);
|
|
797
1672
|
var tmp$ret$26 = Char__toInt_impl_vasixd(this_10);
|
|
798
|
-
this_0.
|
|
1673
|
+
this_0.x1o(toByte(tmp$ret$26));
|
|
799
1674
|
i = i + 1 | 0;
|
|
800
1675
|
} else {
|
|
801
1676
|
var codePoint = 65536 + ((c & 1023) << 10 | low & 1023) | 0;
|
|
802
1677
|
$l$block_6: {
|
|
803
1678
|
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.writeToTail' call
|
|
804
|
-
var tail_2 = this_0.
|
|
805
|
-
get_SegmentWriteContextImpl().
|
|
1679
|
+
var tail_2 = this_0.j1o(4);
|
|
1680
|
+
get_SegmentWriteContextImpl().b1q(tail_2, 0, toByte(codePoint >> 18 | 240), toByte(codePoint >> 12 & 63 | 128), toByte(codePoint >> 6 & 63 | 128), toByte(codePoint & 63 | 128));
|
|
806
1681
|
var bytesWritten_2 = 4;
|
|
807
1682
|
if (bytesWritten_2 === 4) {
|
|
808
|
-
tail_2.
|
|
1683
|
+
tail_2.k1n_1 = tail_2.k1n_1 + bytesWritten_2 | 0;
|
|
809
1684
|
var tmp_6 = this_0;
|
|
810
1685
|
// Inline function 'kotlin.Long.plus' call
|
|
811
|
-
var this_11 = this_0.
|
|
812
|
-
tmp_6.
|
|
1686
|
+
var this_11 = this_0.c1n_1;
|
|
1687
|
+
tmp_6.c1n_1 = add(this_11, fromInt(bytesWritten_2));
|
|
813
1688
|
break $l$block_6;
|
|
814
1689
|
}
|
|
815
1690
|
// Inline function 'kotlin.check' call
|
|
816
|
-
if (!(0 <= bytesWritten_2 ? bytesWritten_2 <= tail_2.
|
|
817
|
-
var message_2 = 'Invalid number of bytes written: ' + bytesWritten_2 + '. Should be in 0..' + tail_2.
|
|
1691
|
+
if (!(0 <= bytesWritten_2 ? bytesWritten_2 <= tail_2.o1o() : false)) {
|
|
1692
|
+
var message_2 = 'Invalid number of bytes written: ' + bytesWritten_2 + '. Should be in 0..' + tail_2.o1o();
|
|
818
1693
|
throw IllegalStateException_init_$Create$(toString(message_2));
|
|
819
1694
|
}
|
|
820
1695
|
if (!(bytesWritten_2 === 0)) {
|
|
821
|
-
tail_2.
|
|
1696
|
+
tail_2.k1n_1 = tail_2.k1n_1 + bytesWritten_2 | 0;
|
|
822
1697
|
var tmp_7 = this_0;
|
|
823
1698
|
// Inline function 'kotlin.Long.plus' call
|
|
824
|
-
var this_12 = this_0.
|
|
825
|
-
tmp_7.
|
|
1699
|
+
var this_12 = this_0.c1n_1;
|
|
1700
|
+
tmp_7.c1n_1 = add(this_12, fromInt(bytesWritten_2));
|
|
826
1701
|
break $l$block_6;
|
|
827
1702
|
}
|
|
828
1703
|
if (isEmpty(tail_2)) {
|
|
829
|
-
this_0.
|
|
1704
|
+
this_0.d1p();
|
|
830
1705
|
}
|
|
831
1706
|
}
|
|
832
1707
|
i = i + 2 | 0;
|
|
833
1708
|
}
|
|
834
1709
|
}
|
|
835
1710
|
}
|
|
836
|
-
_this__u8e3s4.
|
|
1711
|
+
_this__u8e3s4.t1n();
|
|
1712
|
+
}
|
|
1713
|
+
function commonReadUtf8(_this__u8e3s4, byteCount) {
|
|
1714
|
+
if (equalsLong(byteCount, new Long(0, 0)))
|
|
1715
|
+
return '';
|
|
1716
|
+
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.forEachSegment' call
|
|
1717
|
+
var curr = _this__u8e3s4.a1n_1;
|
|
1718
|
+
while (!(curr == null)) {
|
|
1719
|
+
get_SegmentReadContextImpl();
|
|
1720
|
+
if (compare(fromInt(curr.g1()), byteCount) >= 0) {
|
|
1721
|
+
var result = '';
|
|
1722
|
+
// Inline function 'kotlinx.io.unsafe.withData' call
|
|
1723
|
+
var tmp0 = curr.w1p(true);
|
|
1724
|
+
var tmp2 = curr.j1n_1;
|
|
1725
|
+
var tmp0_0 = curr.k1n_1;
|
|
1726
|
+
// Inline function 'kotlin.math.min' call
|
|
1727
|
+
var b = tmp2 + convertToInt(byteCount) | 0;
|
|
1728
|
+
var tmp$ret$0 = Math.min(tmp0_0, b);
|
|
1729
|
+
result = commonToUtf8String(tmp0, tmp2, tmp$ret$0);
|
|
1730
|
+
_this__u8e3s4.b1o(byteCount);
|
|
1731
|
+
return result;
|
|
1732
|
+
}
|
|
1733
|
+
return commonToUtf8String(readByteArray_0(_this__u8e3s4, convertToInt(byteCount)));
|
|
1734
|
+
}
|
|
1735
|
+
// Inline function 'kotlin.error' call
|
|
1736
|
+
var message = 'Unreacheable';
|
|
1737
|
+
throw IllegalStateException_init_$Create$(toString(message));
|
|
837
1738
|
}
|
|
838
1739
|
function FileSystem() {
|
|
839
1740
|
}
|
|
@@ -843,9 +1744,9 @@
|
|
|
843
1744
|
isRegularFile = isRegularFile === VOID ? false : isRegularFile;
|
|
844
1745
|
isDirectory = isDirectory === VOID ? false : isDirectory;
|
|
845
1746
|
size = size === VOID ? new Long(0, 0) : size;
|
|
846
|
-
this.
|
|
847
|
-
this.
|
|
848
|
-
this.
|
|
1747
|
+
this.l1q_1 = isRegularFile;
|
|
1748
|
+
this.m1q_1 = isDirectory;
|
|
1749
|
+
this.n1q_1 = size;
|
|
849
1750
|
}
|
|
850
1751
|
function removeTrailingSeparators(path, isWindows_) {
|
|
851
1752
|
isWindows_ = isWindows_ === VOID ? get_isWindows() : isWindows_;
|
|
@@ -873,7 +1774,7 @@
|
|
|
873
1774
|
// Inline function 'kotlin.text.buildString' call
|
|
874
1775
|
// Inline function 'kotlin.apply' call
|
|
875
1776
|
var this_0 = StringBuilder_init_$Create$_0();
|
|
876
|
-
this_0.
|
|
1777
|
+
this_0.q(base);
|
|
877
1778
|
// Inline function 'kotlin.collections.forEach' call
|
|
878
1779
|
var inductionVariable = 0;
|
|
879
1780
|
var last = parts.length;
|
|
@@ -888,9 +1789,9 @@
|
|
|
888
1789
|
tmp = false;
|
|
889
1790
|
}
|
|
890
1791
|
if (tmp) {
|
|
891
|
-
this_0.
|
|
1792
|
+
this_0.s(get_SystemPathSeparator());
|
|
892
1793
|
}
|
|
893
|
-
this_0.
|
|
1794
|
+
this_0.q(element);
|
|
894
1795
|
}
|
|
895
1796
|
var tmp$ret$5 = this_0.toString();
|
|
896
1797
|
return Path_1(tmp$ret$5);
|
|
@@ -927,6 +1828,349 @@
|
|
|
927
1828
|
}
|
|
928
1829
|
return substring(path, 0, idx);
|
|
929
1830
|
}
|
|
1831
|
+
function commonToUtf8String(_this__u8e3s4, beginIndex, endIndex) {
|
|
1832
|
+
beginIndex = beginIndex === VOID ? 0 : beginIndex;
|
|
1833
|
+
endIndex = endIndex === VOID ? _this__u8e3s4.length : endIndex;
|
|
1834
|
+
if (beginIndex < 0 || endIndex > _this__u8e3s4.length || beginIndex > endIndex) {
|
|
1835
|
+
throw IndexOutOfBoundsException_init_$Create$('size=' + _this__u8e3s4.length + ' beginIndex=' + beginIndex + ' endIndex=' + endIndex);
|
|
1836
|
+
}
|
|
1837
|
+
var chars = charArray(endIndex - beginIndex | 0);
|
|
1838
|
+
var length = 0;
|
|
1839
|
+
// Inline function 'kotlinx.io.internal.processUtf16Chars' call
|
|
1840
|
+
var index = beginIndex;
|
|
1841
|
+
while (index < endIndex) {
|
|
1842
|
+
var b0 = _this__u8e3s4[index];
|
|
1843
|
+
if (b0 >= 0) {
|
|
1844
|
+
var c = numberToChar(b0);
|
|
1845
|
+
var _unary__edvuaz = length;
|
|
1846
|
+
length = _unary__edvuaz + 1 | 0;
|
|
1847
|
+
chars[_unary__edvuaz] = c;
|
|
1848
|
+
index = index + 1 | 0;
|
|
1849
|
+
while (index < endIndex && _this__u8e3s4[index] >= 0) {
|
|
1850
|
+
var _unary__edvuaz_0 = index;
|
|
1851
|
+
index = _unary__edvuaz_0 + 1 | 0;
|
|
1852
|
+
var c_0 = numberToChar(_this__u8e3s4[_unary__edvuaz_0]);
|
|
1853
|
+
var _unary__edvuaz_1 = length;
|
|
1854
|
+
length = _unary__edvuaz_1 + 1 | 0;
|
|
1855
|
+
chars[_unary__edvuaz_1] = c_0;
|
|
1856
|
+
}
|
|
1857
|
+
} else {
|
|
1858
|
+
// Inline function 'kotlinx.io.shr' call
|
|
1859
|
+
if (b0 >> 5 === -2) {
|
|
1860
|
+
var tmp = index;
|
|
1861
|
+
var tmp2 = index;
|
|
1862
|
+
var tmp$ret$5;
|
|
1863
|
+
$l$block_0: {
|
|
1864
|
+
// Inline function 'kotlinx.io.internal.process2Utf8Bytes' call
|
|
1865
|
+
if (endIndex <= (tmp2 + 1 | 0)) {
|
|
1866
|
+
var c_1 = numberToChar(65533);
|
|
1867
|
+
var _unary__edvuaz_2 = length;
|
|
1868
|
+
length = _unary__edvuaz_2 + 1 | 0;
|
|
1869
|
+
chars[_unary__edvuaz_2] = c_1;
|
|
1870
|
+
tmp$ret$5 = 1;
|
|
1871
|
+
break $l$block_0;
|
|
1872
|
+
}
|
|
1873
|
+
var b0_0 = _this__u8e3s4[tmp2];
|
|
1874
|
+
var b1 = _this__u8e3s4[tmp2 + 1 | 0];
|
|
1875
|
+
// Inline function 'kotlinx.io.internal.isUtf8Continuation' call
|
|
1876
|
+
// Inline function 'kotlinx.io.and' call
|
|
1877
|
+
if (!((b1 & 192) === 128)) {
|
|
1878
|
+
var c_2 = numberToChar(65533);
|
|
1879
|
+
var _unary__edvuaz_3 = length;
|
|
1880
|
+
length = _unary__edvuaz_3 + 1 | 0;
|
|
1881
|
+
chars[_unary__edvuaz_3] = c_2;
|
|
1882
|
+
tmp$ret$5 = 1;
|
|
1883
|
+
break $l$block_0;
|
|
1884
|
+
}
|
|
1885
|
+
var codePoint = 3968 ^ b1 ^ b0_0 << 6;
|
|
1886
|
+
if (codePoint < 128) {
|
|
1887
|
+
var c_3 = numberToChar(65533);
|
|
1888
|
+
var _unary__edvuaz_4 = length;
|
|
1889
|
+
length = _unary__edvuaz_4 + 1 | 0;
|
|
1890
|
+
chars[_unary__edvuaz_4] = c_3;
|
|
1891
|
+
} else {
|
|
1892
|
+
var c_4 = numberToChar(codePoint);
|
|
1893
|
+
var _unary__edvuaz_5 = length;
|
|
1894
|
+
length = _unary__edvuaz_5 + 1 | 0;
|
|
1895
|
+
chars[_unary__edvuaz_5] = c_4;
|
|
1896
|
+
}
|
|
1897
|
+
tmp$ret$5 = 2;
|
|
1898
|
+
}
|
|
1899
|
+
index = tmp + tmp$ret$5 | 0;
|
|
1900
|
+
} else {
|
|
1901
|
+
// Inline function 'kotlinx.io.shr' call
|
|
1902
|
+
if (b0 >> 4 === -2) {
|
|
1903
|
+
var tmp_0 = index;
|
|
1904
|
+
var tmp2_0 = index;
|
|
1905
|
+
var tmp$ret$19;
|
|
1906
|
+
$l$block_4: {
|
|
1907
|
+
// Inline function 'kotlinx.io.internal.process3Utf8Bytes' call
|
|
1908
|
+
if (endIndex <= (tmp2_0 + 2 | 0)) {
|
|
1909
|
+
var c_5 = numberToChar(65533);
|
|
1910
|
+
var _unary__edvuaz_6 = length;
|
|
1911
|
+
length = _unary__edvuaz_6 + 1 | 0;
|
|
1912
|
+
chars[_unary__edvuaz_6] = c_5;
|
|
1913
|
+
var tmp_1;
|
|
1914
|
+
if (endIndex <= (tmp2_0 + 1 | 0)) {
|
|
1915
|
+
tmp_1 = true;
|
|
1916
|
+
} else {
|
|
1917
|
+
// Inline function 'kotlinx.io.internal.isUtf8Continuation' call
|
|
1918
|
+
// Inline function 'kotlinx.io.and' call
|
|
1919
|
+
tmp_1 = !((_this__u8e3s4[tmp2_0 + 1 | 0] & 192) === 128);
|
|
1920
|
+
}
|
|
1921
|
+
if (tmp_1) {
|
|
1922
|
+
tmp$ret$19 = 1;
|
|
1923
|
+
break $l$block_4;
|
|
1924
|
+
} else {
|
|
1925
|
+
tmp$ret$19 = 2;
|
|
1926
|
+
break $l$block_4;
|
|
1927
|
+
}
|
|
1928
|
+
}
|
|
1929
|
+
var b0_1 = _this__u8e3s4[tmp2_0];
|
|
1930
|
+
var b1_0 = _this__u8e3s4[tmp2_0 + 1 | 0];
|
|
1931
|
+
// Inline function 'kotlinx.io.internal.isUtf8Continuation' call
|
|
1932
|
+
// Inline function 'kotlinx.io.and' call
|
|
1933
|
+
if (!((b1_0 & 192) === 128)) {
|
|
1934
|
+
var c_6 = numberToChar(65533);
|
|
1935
|
+
var _unary__edvuaz_7 = length;
|
|
1936
|
+
length = _unary__edvuaz_7 + 1 | 0;
|
|
1937
|
+
chars[_unary__edvuaz_7] = c_6;
|
|
1938
|
+
tmp$ret$19 = 1;
|
|
1939
|
+
break $l$block_4;
|
|
1940
|
+
}
|
|
1941
|
+
var b2 = _this__u8e3s4[tmp2_0 + 2 | 0];
|
|
1942
|
+
// Inline function 'kotlinx.io.internal.isUtf8Continuation' call
|
|
1943
|
+
// Inline function 'kotlinx.io.and' call
|
|
1944
|
+
if (!((b2 & 192) === 128)) {
|
|
1945
|
+
var c_7 = numberToChar(65533);
|
|
1946
|
+
var _unary__edvuaz_8 = length;
|
|
1947
|
+
length = _unary__edvuaz_8 + 1 | 0;
|
|
1948
|
+
chars[_unary__edvuaz_8] = c_7;
|
|
1949
|
+
tmp$ret$19 = 2;
|
|
1950
|
+
break $l$block_4;
|
|
1951
|
+
}
|
|
1952
|
+
var codePoint_0 = -123008 ^ b2 ^ b1_0 << 6 ^ b0_1 << 12;
|
|
1953
|
+
if (codePoint_0 < 2048) {
|
|
1954
|
+
var c_8 = numberToChar(65533);
|
|
1955
|
+
var _unary__edvuaz_9 = length;
|
|
1956
|
+
length = _unary__edvuaz_9 + 1 | 0;
|
|
1957
|
+
chars[_unary__edvuaz_9] = c_8;
|
|
1958
|
+
} else if (55296 <= codePoint_0 ? codePoint_0 <= 57343 : false) {
|
|
1959
|
+
var c_9 = numberToChar(65533);
|
|
1960
|
+
var _unary__edvuaz_10 = length;
|
|
1961
|
+
length = _unary__edvuaz_10 + 1 | 0;
|
|
1962
|
+
chars[_unary__edvuaz_10] = c_9;
|
|
1963
|
+
} else {
|
|
1964
|
+
var c_10 = numberToChar(codePoint_0);
|
|
1965
|
+
var _unary__edvuaz_11 = length;
|
|
1966
|
+
length = _unary__edvuaz_11 + 1 | 0;
|
|
1967
|
+
chars[_unary__edvuaz_11] = c_10;
|
|
1968
|
+
}
|
|
1969
|
+
tmp$ret$19 = 3;
|
|
1970
|
+
}
|
|
1971
|
+
index = tmp_0 + tmp$ret$19 | 0;
|
|
1972
|
+
} else {
|
|
1973
|
+
// Inline function 'kotlinx.io.shr' call
|
|
1974
|
+
if (b0 >> 3 === -2) {
|
|
1975
|
+
var tmp_2 = index;
|
|
1976
|
+
var tmp2_1 = index;
|
|
1977
|
+
var tmp$ret$41;
|
|
1978
|
+
$l$block_10: {
|
|
1979
|
+
// Inline function 'kotlinx.io.internal.process4Utf8Bytes' call
|
|
1980
|
+
if (endIndex <= (tmp2_1 + 3 | 0)) {
|
|
1981
|
+
if (!(65533 === 65533)) {
|
|
1982
|
+
var c_11 = numberToChar((65533 >>> 10 | 0) + 55232 | 0);
|
|
1983
|
+
var _unary__edvuaz_12 = length;
|
|
1984
|
+
length = _unary__edvuaz_12 + 1 | 0;
|
|
1985
|
+
chars[_unary__edvuaz_12] = c_11;
|
|
1986
|
+
var c_12 = numberToChar((65533 & 1023) + 56320 | 0);
|
|
1987
|
+
var _unary__edvuaz_13 = length;
|
|
1988
|
+
length = _unary__edvuaz_13 + 1 | 0;
|
|
1989
|
+
chars[_unary__edvuaz_13] = c_12;
|
|
1990
|
+
} else {
|
|
1991
|
+
var c_13 = _Char___init__impl__6a9atx(65533);
|
|
1992
|
+
var _unary__edvuaz_14 = length;
|
|
1993
|
+
length = _unary__edvuaz_14 + 1 | 0;
|
|
1994
|
+
chars[_unary__edvuaz_14] = c_13;
|
|
1995
|
+
}
|
|
1996
|
+
var tmp_3;
|
|
1997
|
+
if (endIndex <= (tmp2_1 + 1 | 0)) {
|
|
1998
|
+
tmp_3 = true;
|
|
1999
|
+
} else {
|
|
2000
|
+
// Inline function 'kotlinx.io.internal.isUtf8Continuation' call
|
|
2001
|
+
// Inline function 'kotlinx.io.and' call
|
|
2002
|
+
tmp_3 = !((_this__u8e3s4[tmp2_1 + 1 | 0] & 192) === 128);
|
|
2003
|
+
}
|
|
2004
|
+
if (tmp_3) {
|
|
2005
|
+
tmp$ret$41 = 1;
|
|
2006
|
+
break $l$block_10;
|
|
2007
|
+
} else {
|
|
2008
|
+
var tmp_4;
|
|
2009
|
+
if (endIndex <= (tmp2_1 + 2 | 0)) {
|
|
2010
|
+
tmp_4 = true;
|
|
2011
|
+
} else {
|
|
2012
|
+
// Inline function 'kotlinx.io.internal.isUtf8Continuation' call
|
|
2013
|
+
// Inline function 'kotlinx.io.and' call
|
|
2014
|
+
tmp_4 = !((_this__u8e3s4[tmp2_1 + 2 | 0] & 192) === 128);
|
|
2015
|
+
}
|
|
2016
|
+
if (tmp_4) {
|
|
2017
|
+
tmp$ret$41 = 2;
|
|
2018
|
+
break $l$block_10;
|
|
2019
|
+
} else {
|
|
2020
|
+
tmp$ret$41 = 3;
|
|
2021
|
+
break $l$block_10;
|
|
2022
|
+
}
|
|
2023
|
+
}
|
|
2024
|
+
}
|
|
2025
|
+
var b0_2 = _this__u8e3s4[tmp2_1];
|
|
2026
|
+
var b1_1 = _this__u8e3s4[tmp2_1 + 1 | 0];
|
|
2027
|
+
// Inline function 'kotlinx.io.internal.isUtf8Continuation' call
|
|
2028
|
+
// Inline function 'kotlinx.io.and' call
|
|
2029
|
+
if (!((b1_1 & 192) === 128)) {
|
|
2030
|
+
if (!(65533 === 65533)) {
|
|
2031
|
+
var c_14 = numberToChar((65533 >>> 10 | 0) + 55232 | 0);
|
|
2032
|
+
var _unary__edvuaz_15 = length;
|
|
2033
|
+
length = _unary__edvuaz_15 + 1 | 0;
|
|
2034
|
+
chars[_unary__edvuaz_15] = c_14;
|
|
2035
|
+
var c_15 = numberToChar((65533 & 1023) + 56320 | 0);
|
|
2036
|
+
var _unary__edvuaz_16 = length;
|
|
2037
|
+
length = _unary__edvuaz_16 + 1 | 0;
|
|
2038
|
+
chars[_unary__edvuaz_16] = c_15;
|
|
2039
|
+
} else {
|
|
2040
|
+
var c_16 = _Char___init__impl__6a9atx(65533);
|
|
2041
|
+
var _unary__edvuaz_17 = length;
|
|
2042
|
+
length = _unary__edvuaz_17 + 1 | 0;
|
|
2043
|
+
chars[_unary__edvuaz_17] = c_16;
|
|
2044
|
+
}
|
|
2045
|
+
tmp$ret$41 = 1;
|
|
2046
|
+
break $l$block_10;
|
|
2047
|
+
}
|
|
2048
|
+
var b2_0 = _this__u8e3s4[tmp2_1 + 2 | 0];
|
|
2049
|
+
// Inline function 'kotlinx.io.internal.isUtf8Continuation' call
|
|
2050
|
+
// Inline function 'kotlinx.io.and' call
|
|
2051
|
+
if (!((b2_0 & 192) === 128)) {
|
|
2052
|
+
if (!(65533 === 65533)) {
|
|
2053
|
+
var c_17 = numberToChar((65533 >>> 10 | 0) + 55232 | 0);
|
|
2054
|
+
var _unary__edvuaz_18 = length;
|
|
2055
|
+
length = _unary__edvuaz_18 + 1 | 0;
|
|
2056
|
+
chars[_unary__edvuaz_18] = c_17;
|
|
2057
|
+
var c_18 = numberToChar((65533 & 1023) + 56320 | 0);
|
|
2058
|
+
var _unary__edvuaz_19 = length;
|
|
2059
|
+
length = _unary__edvuaz_19 + 1 | 0;
|
|
2060
|
+
chars[_unary__edvuaz_19] = c_18;
|
|
2061
|
+
} else {
|
|
2062
|
+
var c_19 = _Char___init__impl__6a9atx(65533);
|
|
2063
|
+
var _unary__edvuaz_20 = length;
|
|
2064
|
+
length = _unary__edvuaz_20 + 1 | 0;
|
|
2065
|
+
chars[_unary__edvuaz_20] = c_19;
|
|
2066
|
+
}
|
|
2067
|
+
tmp$ret$41 = 2;
|
|
2068
|
+
break $l$block_10;
|
|
2069
|
+
}
|
|
2070
|
+
var b3 = _this__u8e3s4[tmp2_1 + 3 | 0];
|
|
2071
|
+
// Inline function 'kotlinx.io.internal.isUtf8Continuation' call
|
|
2072
|
+
// Inline function 'kotlinx.io.and' call
|
|
2073
|
+
if (!((b3 & 192) === 128)) {
|
|
2074
|
+
if (!(65533 === 65533)) {
|
|
2075
|
+
var c_20 = numberToChar((65533 >>> 10 | 0) + 55232 | 0);
|
|
2076
|
+
var _unary__edvuaz_21 = length;
|
|
2077
|
+
length = _unary__edvuaz_21 + 1 | 0;
|
|
2078
|
+
chars[_unary__edvuaz_21] = c_20;
|
|
2079
|
+
var c_21 = numberToChar((65533 & 1023) + 56320 | 0);
|
|
2080
|
+
var _unary__edvuaz_22 = length;
|
|
2081
|
+
length = _unary__edvuaz_22 + 1 | 0;
|
|
2082
|
+
chars[_unary__edvuaz_22] = c_21;
|
|
2083
|
+
} else {
|
|
2084
|
+
var c_22 = _Char___init__impl__6a9atx(65533);
|
|
2085
|
+
var _unary__edvuaz_23 = length;
|
|
2086
|
+
length = _unary__edvuaz_23 + 1 | 0;
|
|
2087
|
+
chars[_unary__edvuaz_23] = c_22;
|
|
2088
|
+
}
|
|
2089
|
+
tmp$ret$41 = 3;
|
|
2090
|
+
break $l$block_10;
|
|
2091
|
+
}
|
|
2092
|
+
var codePoint_1 = 3678080 ^ b3 ^ b2_0 << 6 ^ b1_1 << 12 ^ b0_2 << 18;
|
|
2093
|
+
if (codePoint_1 > 1114111) {
|
|
2094
|
+
if (!(65533 === 65533)) {
|
|
2095
|
+
var c_23 = numberToChar((65533 >>> 10 | 0) + 55232 | 0);
|
|
2096
|
+
var _unary__edvuaz_24 = length;
|
|
2097
|
+
length = _unary__edvuaz_24 + 1 | 0;
|
|
2098
|
+
chars[_unary__edvuaz_24] = c_23;
|
|
2099
|
+
var c_24 = numberToChar((65533 & 1023) + 56320 | 0);
|
|
2100
|
+
var _unary__edvuaz_25 = length;
|
|
2101
|
+
length = _unary__edvuaz_25 + 1 | 0;
|
|
2102
|
+
chars[_unary__edvuaz_25] = c_24;
|
|
2103
|
+
} else {
|
|
2104
|
+
var c_25 = _Char___init__impl__6a9atx(65533);
|
|
2105
|
+
var _unary__edvuaz_26 = length;
|
|
2106
|
+
length = _unary__edvuaz_26 + 1 | 0;
|
|
2107
|
+
chars[_unary__edvuaz_26] = c_25;
|
|
2108
|
+
}
|
|
2109
|
+
} else if (55296 <= codePoint_1 ? codePoint_1 <= 57343 : false) {
|
|
2110
|
+
if (!(65533 === 65533)) {
|
|
2111
|
+
var c_26 = numberToChar((65533 >>> 10 | 0) + 55232 | 0);
|
|
2112
|
+
var _unary__edvuaz_27 = length;
|
|
2113
|
+
length = _unary__edvuaz_27 + 1 | 0;
|
|
2114
|
+
chars[_unary__edvuaz_27] = c_26;
|
|
2115
|
+
var c_27 = numberToChar((65533 & 1023) + 56320 | 0);
|
|
2116
|
+
var _unary__edvuaz_28 = length;
|
|
2117
|
+
length = _unary__edvuaz_28 + 1 | 0;
|
|
2118
|
+
chars[_unary__edvuaz_28] = c_27;
|
|
2119
|
+
} else {
|
|
2120
|
+
var c_28 = _Char___init__impl__6a9atx(65533);
|
|
2121
|
+
var _unary__edvuaz_29 = length;
|
|
2122
|
+
length = _unary__edvuaz_29 + 1 | 0;
|
|
2123
|
+
chars[_unary__edvuaz_29] = c_28;
|
|
2124
|
+
}
|
|
2125
|
+
} else if (codePoint_1 < 65536) {
|
|
2126
|
+
if (!(65533 === 65533)) {
|
|
2127
|
+
var c_29 = numberToChar((65533 >>> 10 | 0) + 55232 | 0);
|
|
2128
|
+
var _unary__edvuaz_30 = length;
|
|
2129
|
+
length = _unary__edvuaz_30 + 1 | 0;
|
|
2130
|
+
chars[_unary__edvuaz_30] = c_29;
|
|
2131
|
+
var c_30 = numberToChar((65533 & 1023) + 56320 | 0);
|
|
2132
|
+
var _unary__edvuaz_31 = length;
|
|
2133
|
+
length = _unary__edvuaz_31 + 1 | 0;
|
|
2134
|
+
chars[_unary__edvuaz_31] = c_30;
|
|
2135
|
+
} else {
|
|
2136
|
+
var c_31 = _Char___init__impl__6a9atx(65533);
|
|
2137
|
+
var _unary__edvuaz_32 = length;
|
|
2138
|
+
length = _unary__edvuaz_32 + 1 | 0;
|
|
2139
|
+
chars[_unary__edvuaz_32] = c_31;
|
|
2140
|
+
}
|
|
2141
|
+
} else {
|
|
2142
|
+
if (!(codePoint_1 === 65533)) {
|
|
2143
|
+
var c_32 = numberToChar((codePoint_1 >>> 10 | 0) + 55232 | 0);
|
|
2144
|
+
var _unary__edvuaz_33 = length;
|
|
2145
|
+
length = _unary__edvuaz_33 + 1 | 0;
|
|
2146
|
+
chars[_unary__edvuaz_33] = c_32;
|
|
2147
|
+
var c_33 = numberToChar((codePoint_1 & 1023) + 56320 | 0);
|
|
2148
|
+
var _unary__edvuaz_34 = length;
|
|
2149
|
+
length = _unary__edvuaz_34 + 1 | 0;
|
|
2150
|
+
chars[_unary__edvuaz_34] = c_33;
|
|
2151
|
+
} else {
|
|
2152
|
+
var c_34 = _Char___init__impl__6a9atx(65533);
|
|
2153
|
+
var _unary__edvuaz_35 = length;
|
|
2154
|
+
length = _unary__edvuaz_35 + 1 | 0;
|
|
2155
|
+
chars[_unary__edvuaz_35] = c_34;
|
|
2156
|
+
}
|
|
2157
|
+
}
|
|
2158
|
+
tmp$ret$41 = 4;
|
|
2159
|
+
}
|
|
2160
|
+
index = tmp_2 + tmp$ret$41 | 0;
|
|
2161
|
+
} else {
|
|
2162
|
+
var c_35 = _Char___init__impl__6a9atx(65533);
|
|
2163
|
+
var _unary__edvuaz_36 = length;
|
|
2164
|
+
length = _unary__edvuaz_36 + 1 | 0;
|
|
2165
|
+
chars[_unary__edvuaz_36] = c_35;
|
|
2166
|
+
index = index + 1 | 0;
|
|
2167
|
+
}
|
|
2168
|
+
}
|
|
2169
|
+
}
|
|
2170
|
+
}
|
|
2171
|
+
}
|
|
2172
|
+
return concatToString(chars, 0, length);
|
|
2173
|
+
}
|
|
930
2174
|
function get_SegmentReadContextImpl() {
|
|
931
2175
|
_init_properties_UnsafeBufferOperations_kt__xw75gy();
|
|
932
2176
|
return SegmentReadContextImpl;
|
|
@@ -946,27 +2190,27 @@
|
|
|
946
2190
|
}
|
|
947
2191
|
function SegmentReadContextImpl$1() {
|
|
948
2192
|
}
|
|
949
|
-
protoOf(SegmentReadContextImpl$1).
|
|
950
|
-
return segment.
|
|
2193
|
+
protoOf(SegmentReadContextImpl$1).b1p = function (segment, offset) {
|
|
2194
|
+
return segment.a1o(offset);
|
|
951
2195
|
};
|
|
952
2196
|
function SegmentWriteContextImpl$1() {
|
|
953
2197
|
}
|
|
954
|
-
protoOf(SegmentWriteContextImpl$1).
|
|
955
|
-
segment.
|
|
2198
|
+
protoOf(SegmentWriteContextImpl$1).e1q = function (segment, offset, value) {
|
|
2199
|
+
segment.x1p(offset, value);
|
|
956
2200
|
};
|
|
957
|
-
protoOf(SegmentWriteContextImpl$1).
|
|
958
|
-
segment.
|
|
2201
|
+
protoOf(SegmentWriteContextImpl$1).d1q = function (segment, offset, b0, b1) {
|
|
2202
|
+
segment.y1p(offset, b0, b1);
|
|
959
2203
|
};
|
|
960
|
-
protoOf(SegmentWriteContextImpl$1).
|
|
961
|
-
segment.
|
|
2204
|
+
protoOf(SegmentWriteContextImpl$1).c1q = function (segment, offset, b0, b1, b2) {
|
|
2205
|
+
segment.z1p(offset, b0, b1, b2);
|
|
962
2206
|
};
|
|
963
|
-
protoOf(SegmentWriteContextImpl$1).
|
|
964
|
-
segment.
|
|
2207
|
+
protoOf(SegmentWriteContextImpl$1).b1q = function (segment, offset, b0, b1, b2, b3) {
|
|
2208
|
+
segment.a1q(offset, b0, b1, b2, b3);
|
|
965
2209
|
};
|
|
966
2210
|
function BufferIterationContextImpl$1() {
|
|
967
2211
|
}
|
|
968
|
-
protoOf(BufferIterationContextImpl$1).
|
|
969
|
-
return get_SegmentReadContextImpl().
|
|
2212
|
+
protoOf(BufferIterationContextImpl$1).b1p = function (segment, offset) {
|
|
2213
|
+
return get_SegmentReadContextImpl().b1p(segment, offset);
|
|
970
2214
|
};
|
|
971
2215
|
var properties_initialized_UnsafeBufferOperations_kt_2xfgoc;
|
|
972
2216
|
function _init_properties_UnsafeBufferOperations_kt__xw75gy() {
|
|
@@ -977,19 +2221,6 @@
|
|
|
977
2221
|
BufferIterationContextImpl = new BufferIterationContextImpl$1();
|
|
978
2222
|
}
|
|
979
2223
|
}
|
|
980
|
-
function withCaughtException(block) {
|
|
981
|
-
try {
|
|
982
|
-
block();
|
|
983
|
-
return null;
|
|
984
|
-
} catch ($p) {
|
|
985
|
-
if ($p instanceof Error) {
|
|
986
|
-
var t = $p;
|
|
987
|
-
return t;
|
|
988
|
-
} else {
|
|
989
|
-
throw $p;
|
|
990
|
-
}
|
|
991
|
-
}
|
|
992
|
-
}
|
|
993
2224
|
function IOException_init_$Init$($this) {
|
|
994
2225
|
Exception_init_$Init$($this);
|
|
995
2226
|
IOException.call($this);
|
|
@@ -1046,16 +2277,29 @@
|
|
|
1046
2277
|
function EOFException() {
|
|
1047
2278
|
captureStack(this, EOFException);
|
|
1048
2279
|
}
|
|
2280
|
+
function withCaughtException(block) {
|
|
2281
|
+
try {
|
|
2282
|
+
block();
|
|
2283
|
+
return null;
|
|
2284
|
+
} catch ($p) {
|
|
2285
|
+
if ($p instanceof Error) {
|
|
2286
|
+
var t = $p;
|
|
2287
|
+
return t;
|
|
2288
|
+
} else {
|
|
2289
|
+
throw $p;
|
|
2290
|
+
}
|
|
2291
|
+
}
|
|
2292
|
+
}
|
|
1049
2293
|
function SegmentPool() {
|
|
1050
|
-
this.
|
|
1051
|
-
this.
|
|
2294
|
+
this.k1o_1 = 0;
|
|
2295
|
+
this.l1o_1 = 0;
|
|
1052
2296
|
}
|
|
1053
|
-
protoOf(SegmentPool).
|
|
1054
|
-
return Companion_instance.
|
|
2297
|
+
protoOf(SegmentPool).m1o = function () {
|
|
2298
|
+
return Companion_instance.s1p();
|
|
1055
2299
|
};
|
|
1056
|
-
protoOf(SegmentPool).
|
|
2300
|
+
protoOf(SegmentPool).c1p = function (segment) {
|
|
1057
2301
|
};
|
|
1058
|
-
protoOf(SegmentPool).
|
|
2302
|
+
protoOf(SegmentPool).u1p = function () {
|
|
1059
2303
|
return AlwaysSharedCopyTracker_getInstance();
|
|
1060
2304
|
};
|
|
1061
2305
|
var SegmentPool_instance;
|
|
@@ -1068,7 +2312,7 @@
|
|
|
1068
2312
|
var tmp = KProperty0;
|
|
1069
2313
|
// Inline function 'kotlin.getValue' call
|
|
1070
2314
|
getPropertyCallableRef('path', 0, tmp, _get_path_$ref_hpvpv9(), null);
|
|
1071
|
-
return tmp0.
|
|
2315
|
+
return tmp0.o1();
|
|
1072
2316
|
}
|
|
1073
2317
|
var path$delegate;
|
|
1074
2318
|
function get_fs() {
|
|
@@ -1077,7 +2321,7 @@
|
|
|
1077
2321
|
var tmp = KProperty0;
|
|
1078
2322
|
// Inline function 'kotlin.getValue' call
|
|
1079
2323
|
getPropertyCallableRef('fs', 0, tmp, _get_fs_$ref_rnlob1(), null);
|
|
1080
|
-
return tmp0.
|
|
2324
|
+
return tmp0.o1();
|
|
1081
2325
|
}
|
|
1082
2326
|
var fs$delegate;
|
|
1083
2327
|
function get_os() {
|
|
@@ -1086,7 +2330,7 @@
|
|
|
1086
2330
|
var tmp = KProperty0;
|
|
1087
2331
|
// Inline function 'kotlin.getValue' call
|
|
1088
2332
|
getPropertyCallableRef('os', 0, tmp, _get_os_$ref_hoy4d2(), null);
|
|
1089
|
-
return tmp0.
|
|
2333
|
+
return tmp0.o1();
|
|
1090
2334
|
}
|
|
1091
2335
|
var os$delegate;
|
|
1092
2336
|
function get_buffer() {
|
|
@@ -1095,7 +2339,7 @@
|
|
|
1095
2339
|
var tmp = KProperty0;
|
|
1096
2340
|
// Inline function 'kotlin.getValue' call
|
|
1097
2341
|
getPropertyCallableRef('buffer', 0, tmp, _get_buffer_$ref_mc964a(), null);
|
|
1098
|
-
return tmp0.
|
|
2342
|
+
return tmp0.o1();
|
|
1099
2343
|
}
|
|
1100
2344
|
var buffer$delegate;
|
|
1101
2345
|
function path$delegate$lambda() {
|
|
@@ -1213,7 +2457,7 @@
|
|
|
1213
2457
|
}
|
|
1214
2458
|
function SystemFileSystem$o$delete$lambda($path) {
|
|
1215
2459
|
return function () {
|
|
1216
|
-
var tmp0_elvis_lhs = get_fs().statSync($path.
|
|
2460
|
+
var tmp0_elvis_lhs = get_fs().statSync($path.o1q_1);
|
|
1217
2461
|
var tmp;
|
|
1218
2462
|
if (tmp0_elvis_lhs == null) {
|
|
1219
2463
|
throw new FileNotFoundException('File does not exist: ' + $path.toString());
|
|
@@ -1223,10 +2467,10 @@
|
|
|
1223
2467
|
var stats = tmp;
|
|
1224
2468
|
var tmp_0;
|
|
1225
2469
|
if (stats.isDirectory()) {
|
|
1226
|
-
get_fs().rmdirSync($path.
|
|
2470
|
+
get_fs().rmdirSync($path.o1q_1);
|
|
1227
2471
|
tmp_0 = Unit_instance;
|
|
1228
2472
|
} else {
|
|
1229
|
-
get_fs().rmSync($path.
|
|
2473
|
+
get_fs().rmSync($path.o1q_1);
|
|
1230
2474
|
tmp_0 = Unit_instance;
|
|
1231
2475
|
}
|
|
1232
2476
|
return Unit_instance;
|
|
@@ -1234,7 +2478,7 @@
|
|
|
1234
2478
|
}
|
|
1235
2479
|
function SystemFileSystem$o$metadataOrNull$lambda($path, $metadata) {
|
|
1236
2480
|
return function () {
|
|
1237
|
-
var tmp0_elvis_lhs = get_fs().statSync($path.
|
|
2481
|
+
var tmp0_elvis_lhs = get_fs().statSync($path.o1q_1);
|
|
1238
2482
|
var tmp;
|
|
1239
2483
|
if (tmp0_elvis_lhs == null) {
|
|
1240
2484
|
return Unit_instance;
|
|
@@ -1251,11 +2495,11 @@
|
|
|
1251
2495
|
function SystemFileSystem$1() {
|
|
1252
2496
|
SystemFileSystemImpl.call(this);
|
|
1253
2497
|
}
|
|
1254
|
-
protoOf(SystemFileSystem$1).
|
|
1255
|
-
return get_fs().existsSync(path.
|
|
2498
|
+
protoOf(SystemFileSystem$1).f1q = function (path) {
|
|
2499
|
+
return get_fs().existsSync(path.o1q_1);
|
|
1256
2500
|
};
|
|
1257
|
-
protoOf(SystemFileSystem$1).
|
|
1258
|
-
if (!this.
|
|
2501
|
+
protoOf(SystemFileSystem$1).g1q = function (path, mustExist) {
|
|
2502
|
+
if (!this.f1q(path)) {
|
|
1259
2503
|
if (mustExist) {
|
|
1260
2504
|
throw new FileNotFoundException('File does not exist: ' + path.toString());
|
|
1261
2505
|
}
|
|
@@ -1269,13 +2513,13 @@
|
|
|
1269
2513
|
throw IOException_init_$Create$_1('Delete failed for ' + path.toString(), tmp0_safe_receiver);
|
|
1270
2514
|
}
|
|
1271
2515
|
};
|
|
1272
|
-
protoOf(SystemFileSystem$1).
|
|
1273
|
-
var metadata = this.
|
|
2516
|
+
protoOf(SystemFileSystem$1).i1q = function (path, mustCreate) {
|
|
2517
|
+
var metadata = this.p1q(path);
|
|
1274
2518
|
if (!(metadata == null)) {
|
|
1275
2519
|
if (mustCreate) {
|
|
1276
2520
|
throw IOException_init_$Create$_0('Path already exists: ' + path.toString());
|
|
1277
2521
|
}
|
|
1278
|
-
if (metadata.
|
|
2522
|
+
if (metadata.l1q_1) {
|
|
1279
2523
|
throw IOException_init_$Create$_0("Path already exists and it's a file: " + path.toString());
|
|
1280
2524
|
}
|
|
1281
2525
|
return Unit_instance;
|
|
@@ -1283,19 +2527,19 @@
|
|
|
1283
2527
|
// Inline function 'kotlin.collections.arrayListOf' call
|
|
1284
2528
|
var parts = ArrayList_init_$Create$();
|
|
1285
2529
|
var p = path;
|
|
1286
|
-
while (!(p == null) && !this.
|
|
1287
|
-
parts.
|
|
1288
|
-
p = p.
|
|
2530
|
+
while (!(p == null) && !this.f1q(p)) {
|
|
2531
|
+
parts.e1(p.toString());
|
|
2532
|
+
p = p.q1q();
|
|
1289
2533
|
}
|
|
1290
2534
|
// Inline function 'kotlin.collections.forEach' call
|
|
1291
|
-
var _iterator__ex2g4s = asReversed(parts).
|
|
1292
|
-
while (_iterator__ex2g4s.
|
|
1293
|
-
var element = _iterator__ex2g4s.
|
|
2535
|
+
var _iterator__ex2g4s = asReversed(parts).t();
|
|
2536
|
+
while (_iterator__ex2g4s.u()) {
|
|
2537
|
+
var element = _iterator__ex2g4s.v();
|
|
1294
2538
|
get_fs().mkdirSync(element);
|
|
1295
2539
|
}
|
|
1296
2540
|
};
|
|
1297
|
-
protoOf(SystemFileSystem$1).
|
|
1298
|
-
if (!this.
|
|
2541
|
+
protoOf(SystemFileSystem$1).p1q = function (path) {
|
|
2542
|
+
if (!this.f1q(path))
|
|
1299
2543
|
return null;
|
|
1300
2544
|
var metadata = {_v: null};
|
|
1301
2545
|
var tmp0_safe_receiver = withCaughtException(SystemFileSystem$o$metadataOrNull$lambda(path, metadata));
|
|
@@ -1307,7 +2551,7 @@
|
|
|
1307
2551
|
}
|
|
1308
2552
|
return metadata._v;
|
|
1309
2553
|
};
|
|
1310
|
-
protoOf(SystemFileSystem$1).
|
|
2554
|
+
protoOf(SystemFileSystem$1).k1q = function (path, append) {
|
|
1311
2555
|
return new FileSink(path, append);
|
|
1312
2556
|
};
|
|
1313
2557
|
var properties_initialized_FileSystemNodeJs_kt_vmmd20;
|
|
@@ -1324,31 +2568,31 @@
|
|
|
1324
2568
|
var tmp = KProperty0;
|
|
1325
2569
|
// Inline function 'kotlin.getValue' call
|
|
1326
2570
|
getPropertyCallableRef('SystemPathSeparator', 0, tmp, _get_SystemPathSeparator_$ref_lvdbpt(), null);
|
|
1327
|
-
return tmp0.
|
|
2571
|
+
return tmp0.o1().z1_1;
|
|
1328
2572
|
}
|
|
1329
2573
|
var SystemPathSeparator$delegate;
|
|
1330
2574
|
function Path_0(rawPath, any) {
|
|
1331
|
-
this.
|
|
2575
|
+
this.o1q_1 = removeTrailingSeparators(rawPath);
|
|
1332
2576
|
}
|
|
1333
|
-
protoOf(Path_0).
|
|
2577
|
+
protoOf(Path_0).q1q = function () {
|
|
1334
2578
|
// Inline function 'kotlin.text.isEmpty' call
|
|
1335
|
-
var this_0 = this.
|
|
2579
|
+
var this_0 = this.o1q_1;
|
|
1336
2580
|
if (charSequenceLength(this_0) === 0)
|
|
1337
2581
|
return null;
|
|
1338
2582
|
if (get_isWindows()) {
|
|
1339
|
-
if (!contains(this.
|
|
2583
|
+
if (!contains(this.o1q_1, _Char___init__impl__6a9atx(47)) && !contains(this.o1q_1, _Char___init__impl__6a9atx(92))) {
|
|
1340
2584
|
return null;
|
|
1341
2585
|
}
|
|
1342
|
-
} else if (!contains(this.
|
|
2586
|
+
} else if (!contains(this.o1q_1, get_SystemPathSeparator())) {
|
|
1343
2587
|
return null;
|
|
1344
2588
|
}
|
|
1345
|
-
var p = get_path().dirname(this.
|
|
2589
|
+
var p = get_path().dirname(this.o1q_1);
|
|
1346
2590
|
var tmp;
|
|
1347
2591
|
// Inline function 'kotlin.text.isEmpty' call
|
|
1348
2592
|
if (charSequenceLength(p) === 0) {
|
|
1349
2593
|
tmp = null;
|
|
1350
2594
|
} else {
|
|
1351
|
-
if (p === this.
|
|
2595
|
+
if (p === this.o1q_1) {
|
|
1352
2596
|
tmp = null;
|
|
1353
2597
|
} else {
|
|
1354
2598
|
tmp = Path_1(p);
|
|
@@ -1357,17 +2601,17 @@
|
|
|
1357
2601
|
return tmp;
|
|
1358
2602
|
};
|
|
1359
2603
|
protoOf(Path_0).toString = function () {
|
|
1360
|
-
return this.
|
|
2604
|
+
return this.o1q_1;
|
|
1361
2605
|
};
|
|
1362
2606
|
protoOf(Path_0).equals = function (other) {
|
|
1363
2607
|
if (this === other)
|
|
1364
2608
|
return true;
|
|
1365
2609
|
if (!(other instanceof Path_0))
|
|
1366
2610
|
return false;
|
|
1367
|
-
return this.
|
|
2611
|
+
return this.o1q_1 === other.o1q_1;
|
|
1368
2612
|
};
|
|
1369
2613
|
protoOf(Path_0).hashCode = function () {
|
|
1370
|
-
return getStringHashCode(this.
|
|
2614
|
+
return getStringHashCode(this.o1q_1);
|
|
1371
2615
|
};
|
|
1372
2616
|
function open($this, path, append) {
|
|
1373
2617
|
var flags = append ? 'a' : 'w';
|
|
@@ -1377,31 +2621,31 @@
|
|
|
1377
2621
|
null;
|
|
1378
2622
|
else {
|
|
1379
2623
|
// Inline function 'kotlin.also' call
|
|
1380
|
-
throw IOException_init_$Create$_1('Failed to open a file ' + path.
|
|
2624
|
+
throw IOException_init_$Create$_1('Failed to open a file ' + path.o1q_1 + '.', tmp0_safe_receiver);
|
|
1381
2625
|
}
|
|
1382
2626
|
if (fd._v < 0)
|
|
1383
|
-
throw IOException_init_$Create$_0('Failed to open a file ' + path.
|
|
2627
|
+
throw IOException_init_$Create$_0('Failed to open a file ' + path.o1q_1 + '.');
|
|
1384
2628
|
return fd._v;
|
|
1385
2629
|
}
|
|
1386
2630
|
function FileSink$open$lambda($fd, $path, $flags) {
|
|
1387
2631
|
return function () {
|
|
1388
|
-
$fd._v = get_fs().openSync($path.
|
|
2632
|
+
$fd._v = get_fs().openSync($path.o1q_1, $flags);
|
|
1389
2633
|
return Unit_instance;
|
|
1390
2634
|
};
|
|
1391
2635
|
}
|
|
1392
2636
|
function FileSink$write$lambda(this$0, $buf) {
|
|
1393
2637
|
return function () {
|
|
1394
|
-
get_fs().writeFileSync(this$0.
|
|
2638
|
+
get_fs().writeFileSync(this$0.s1q_1, $buf);
|
|
1395
2639
|
return Unit_instance;
|
|
1396
2640
|
};
|
|
1397
2641
|
}
|
|
1398
2642
|
function FileSink(path, append) {
|
|
1399
|
-
this.
|
|
1400
|
-
this.
|
|
2643
|
+
this.r1q_1 = false;
|
|
2644
|
+
this.s1q_1 = open(this, path, append);
|
|
1401
2645
|
}
|
|
1402
|
-
protoOf(FileSink).
|
|
2646
|
+
protoOf(FileSink).f1o = function (source, byteCount) {
|
|
1403
2647
|
// Inline function 'kotlin.check' call
|
|
1404
|
-
if (!!this.
|
|
2648
|
+
if (!!this.r1q_1) {
|
|
1405
2649
|
var message = 'Sink is closed.';
|
|
1406
2650
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
1407
2651
|
}
|
|
@@ -1409,20 +2653,20 @@
|
|
|
1409
2653
|
return Unit_instance;
|
|
1410
2654
|
}
|
|
1411
2655
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
1412
|
-
var b = source.
|
|
2656
|
+
var b = source.g1();
|
|
1413
2657
|
var remainingBytes = compare(byteCount, b) <= 0 ? byteCount : b;
|
|
1414
2658
|
while (compare(remainingBytes, new Long(0, 0)) > 0) {
|
|
1415
2659
|
var segmentBytes = 0;
|
|
1416
2660
|
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.readFromHead' call
|
|
1417
2661
|
// Inline function 'kotlin.require' call
|
|
1418
|
-
if (!!source.
|
|
2662
|
+
if (!!source.e1n()) {
|
|
1419
2663
|
var message_0 = 'Buffer is empty';
|
|
1420
2664
|
throw IllegalArgumentException_init_$Create$(toString(message_0));
|
|
1421
2665
|
}
|
|
1422
|
-
var head = ensureNotNull(source.
|
|
1423
|
-
var tmp0 = head.
|
|
1424
|
-
var tmp2 = head.
|
|
1425
|
-
segmentBytes = head.
|
|
2666
|
+
var head = ensureNotNull(source.a1n_1);
|
|
2667
|
+
var tmp0 = head.w1p(true);
|
|
2668
|
+
var tmp2 = head.j1n_1;
|
|
2669
|
+
segmentBytes = head.k1n_1 - tmp2 | 0;
|
|
1426
2670
|
var buf = get_buffer().Buffer.allocUnsafe(segmentBytes);
|
|
1427
2671
|
var inductionVariable = 0;
|
|
1428
2672
|
var last = segmentBytes;
|
|
@@ -1444,9 +2688,9 @@
|
|
|
1444
2688
|
if (!(bytesRead === 0)) {
|
|
1445
2689
|
if (bytesRead < 0)
|
|
1446
2690
|
throw IllegalStateException_init_$Create$('Returned negative read bytes count');
|
|
1447
|
-
if (bytesRead > head.
|
|
2691
|
+
if (bytesRead > head.g1())
|
|
1448
2692
|
throw IllegalStateException_init_$Create$('Returned too many bytes');
|
|
1449
|
-
source.
|
|
2693
|
+
source.b1o(fromInt(bytesRead));
|
|
1450
2694
|
}
|
|
1451
2695
|
var tmp0_0 = remainingBytes;
|
|
1452
2696
|
// Inline function 'kotlin.Long.minus' call
|
|
@@ -1454,10 +2698,10 @@
|
|
|
1454
2698
|
remainingBytes = subtract(tmp0_0, fromInt(other));
|
|
1455
2699
|
}
|
|
1456
2700
|
};
|
|
1457
|
-
protoOf(FileSink).
|
|
1458
|
-
if (!this.
|
|
1459
|
-
this.
|
|
1460
|
-
get_fs().closeSync(this.
|
|
2701
|
+
protoOf(FileSink).n4 = function () {
|
|
2702
|
+
if (!this.r1q_1) {
|
|
2703
|
+
this.r1q_1 = true;
|
|
2704
|
+
get_fs().closeSync(this.s1q_1);
|
|
1461
2705
|
}
|
|
1462
2706
|
};
|
|
1463
2707
|
function Path_1(path) {
|
|
@@ -1486,8 +2730,10 @@
|
|
|
1486
2730
|
}
|
|
1487
2731
|
}
|
|
1488
2732
|
//region block: post-declaration
|
|
1489
|
-
protoOf(
|
|
1490
|
-
protoOf(
|
|
2733
|
+
protoOf(Buffer).q1o = write$default;
|
|
2734
|
+
protoOf(RealSink).q1o = write$default;
|
|
2735
|
+
protoOf(SystemFileSystemImpl).h1q = delete$default;
|
|
2736
|
+
protoOf(SystemFileSystemImpl).j1q = createDirectories$default;
|
|
1491
2737
|
//endregion
|
|
1492
2738
|
//region block: init
|
|
1493
2739
|
Companion_instance = new Companion();
|
|
@@ -1496,12 +2742,27 @@
|
|
|
1496
2742
|
//endregion
|
|
1497
2743
|
//region block: exports
|
|
1498
2744
|
_.$_$ = _.$_$ || {};
|
|
1499
|
-
_.$_$.a =
|
|
1500
|
-
_.$_$.b =
|
|
1501
|
-
_.$_$.c =
|
|
1502
|
-
_.$_$.d =
|
|
1503
|
-
_.$_$.e =
|
|
1504
|
-
_.$_$.f =
|
|
2745
|
+
_.$_$.a = EOFException_init_$Create$_0;
|
|
2746
|
+
_.$_$.b = IOException_init_$Init$_0;
|
|
2747
|
+
_.$_$.c = IOException_init_$Create$_0;
|
|
2748
|
+
_.$_$.d = IOException_init_$Init$_1;
|
|
2749
|
+
_.$_$.e = IOException_init_$Create$_1;
|
|
2750
|
+
_.$_$.f = Path;
|
|
2751
|
+
_.$_$.g = Path_1;
|
|
2752
|
+
_.$_$.h = get_SystemFileSystem;
|
|
2753
|
+
_.$_$.i = get_SystemTemporaryDirectory;
|
|
2754
|
+
_.$_$.j = Buffer;
|
|
2755
|
+
_.$_$.k = IOException;
|
|
2756
|
+
_.$_$.l = Source;
|
|
2757
|
+
_.$_$.m = buffered_0;
|
|
2758
|
+
_.$_$.n = indexOf_1;
|
|
2759
|
+
_.$_$.o = readByteArray_0;
|
|
2760
|
+
_.$_$.p = readByteArray;
|
|
2761
|
+
_.$_$.q = readByteString;
|
|
2762
|
+
_.$_$.r = readString_0;
|
|
2763
|
+
_.$_$.s = readString_1;
|
|
2764
|
+
_.$_$.t = readString;
|
|
2765
|
+
_.$_$.u = writeString;
|
|
1505
2766
|
//endregion
|
|
1506
2767
|
return _;
|
|
1507
2768
|
}));
|