1 | (function(root, factory) {
|
2 | if (typeof define === 'function' && define.amd)
|
3 | define(['exports', 'kotlin', 'ktor-ktor-io-jsLegacy', 'kotlinx-coroutines-core'], factory);
|
4 | else if (typeof exports === 'object')
|
5 | factory(module.exports, require('kotlin'), require('ktor-ktor-io-jsLegacy'), require('kotlinx-coroutines-core'));
|
6 | else {
|
7 | if (typeof kotlin === 'undefined') {
|
8 | throw new Error("Error loading module 'ktor-ktor-utils-jsLegacy'. Its dependency 'kotlin' was not found. Please, check whether 'kotlin' is loaded prior to 'ktor-ktor-utils-jsLegacy'.");
|
9 | }
|
10 | if (typeof this['ktor-ktor-io-jsLegacy'] === 'undefined') {
|
11 | throw new Error("Error loading module 'ktor-ktor-utils-jsLegacy'. Its dependency 'ktor-ktor-io-jsLegacy' was not found. Please, check whether 'ktor-ktor-io-jsLegacy' is loaded prior to 'ktor-ktor-utils-jsLegacy'.");
|
12 | }
|
13 | if (typeof this['kotlinx-coroutines-core'] === 'undefined') {
|
14 | throw new Error("Error loading module 'ktor-ktor-utils-jsLegacy'. Its dependency 'kotlinx-coroutines-core' was not found. Please, check whether 'kotlinx-coroutines-core' is loaded prior to 'ktor-ktor-utils-jsLegacy'.");
|
15 | }
|
16 | if (false) {
|
17 |
|
18 | }
|
19 | root['ktor-ktor-utils-jsLegacy'] = factory(typeof this['ktor-ktor-utils-jsLegacy'] === 'undefined' ? {} : this['ktor-ktor-utils-jsLegacy'], kotlin, this['ktor-ktor-io-jsLegacy'], this['kotlinx-coroutines-core']);
|
20 | }
|
21 | }(this, function(_, Kotlin, $module$ktor_ktor_io_jsLegacy, $module$kotlinx_coroutines_core) {
|
22 | 'use strict';
|
23 | var $$importsForInline$$ = _.$$importsForInline$$ || (_.$$importsForInline$$ = {});
|
24 | var Kind_CLASS = Kotlin.Kind.CLASS;
|
25 | var Annotation = Kotlin.kotlin.Annotation;
|
26 | var Any = Object;
|
27 | var IllegalStateException_init = Kotlin.kotlin.IllegalStateException_init_pdl1vj$;
|
28 | var Kind_INTERFACE = Kotlin.Kind.INTERFACE;
|
29 | var toChar = Kotlin.toChar;
|
30 | var indexOf = Kotlin.kotlin.text.indexOf_8eortd$;
|
31 | var writeText = $module$ktor_ktor_io_jsLegacy.io.ktor.utils.io.core.writeText_t153jy$;
|
32 | var writeFully = $module$ktor_ktor_io_jsLegacy.io.ktor.utils.io.core.writeFully_i6snlg$;
|
33 | var readAvailable = $module$ktor_ktor_io_jsLegacy.io.ktor.utils.io.core.readAvailable_ja303r$;
|
34 | var charsets = $module$ktor_ktor_io_jsLegacy.io.ktor.utils.io.charsets;
|
35 | var String_0 = $module$ktor_ktor_io_jsLegacy.io.ktor.utils.io.core.String_xge8xe$;
|
36 | var unboxChar = Kotlin.unboxChar;
|
37 | var readBytes = $module$ktor_ktor_io_jsLegacy.io.ktor.utils.io.core.readBytes_7wsnj1$;
|
38 | var toByte = Kotlin.toByte;
|
39 | var readText = $module$ktor_ktor_io_jsLegacy.io.ktor.utils.io.core.readText_1lnizf$;
|
40 | var until = Kotlin.kotlin.ranges.until_dqglrj$;
|
41 | var BytePacketBuilder = $module$ktor_ktor_io_jsLegacy.io.ktor.utils.io.core.BytePacketBuilder_za3lpa$;
|
42 | var Throwable = Error;
|
43 | var StringBuilder_init = Kotlin.kotlin.text.StringBuilder_init;
|
44 | var get_lastIndex = Kotlin.kotlin.text.get_lastIndex_gw00vp$;
|
45 | var toBoxedChar = Kotlin.toBoxedChar;
|
46 | var L4096 = Kotlin.Long.fromInt(4096);
|
47 | var ByteChannel = $module$ktor_ktor_io_jsLegacy.io.ktor.utils.io.ByteChannel_6taknv$;
|
48 | var readRemaining = $module$ktor_ktor_io_jsLegacy.io.ktor.utils.io.readRemaining_b56lbm$;
|
49 | var Unit = Kotlin.kotlin.Unit;
|
50 | var COROUTINE_SUSPENDED = Kotlin.kotlin.coroutines.intrinsics.COROUTINE_SUSPENDED;
|
51 | var CoroutineImpl = Kotlin.kotlin.coroutines.CoroutineImpl;
|
52 | var async = $module$kotlinx_coroutines_core.kotlinx.coroutines.async_pda6u4$;
|
53 | var listOf = Kotlin.kotlin.collections.listOf_i5x0yv$;
|
54 | var awaitAll = $module$kotlinx_coroutines_core.kotlinx.coroutines.awaitAll_60afti$;
|
55 | var close = $module$ktor_ktor_io_jsLegacy.io.ktor.utils.io.close_x5qia6$;
|
56 | var launch = $module$kotlinx_coroutines_core.kotlinx.coroutines.launch_s496o7$;
|
57 | var to = Kotlin.kotlin.to_ujzrz7$;
|
58 | var coroutines = $module$kotlinx_coroutines_core.kotlinx.coroutines;
|
59 | var readRemaining_0 = $module$ktor_ktor_io_jsLegacy.io.ktor.utils.io.readRemaining_3dmw3p$;
|
60 | var readBytes_0 = $module$ktor_ktor_io_jsLegacy.io.ktor.utils.io.core.readBytes_xc9h3n$;
|
61 | var toShort = Kotlin.toShort;
|
62 | var equals = Kotlin.equals;
|
63 | var hashCode = Kotlin.hashCode;
|
64 | var MutableMap = Kotlin.kotlin.collections.MutableMap;
|
65 | var ensureNotNull = Kotlin.ensureNotNull;
|
66 | var Map$Entry = Kotlin.kotlin.collections.Map.Entry;
|
67 | var MutableMap$MutableEntry = Kotlin.kotlin.collections.MutableMap.MutableEntry;
|
68 | var LinkedHashMap_init = Kotlin.kotlin.collections.LinkedHashMap_init_q3lmfv$;
|
69 | var MutableSet = Kotlin.kotlin.collections.MutableSet;
|
70 | var addAll = Kotlin.kotlin.collections.addAll_ipc267$;
|
71 | var Map = Kotlin.kotlin.collections.Map;
|
72 | var throwCCE = Kotlin.throwCCE;
|
73 | var charArray = Kotlin.charArray;
|
74 | var repeat = Kotlin.kotlin.text.repeat_94bcnn$;
|
75 | var toString = Kotlin.toString;
|
76 | var println = Kotlin.kotlin.io.println_s8jyv4$;
|
77 | var println_0 = Kotlin.kotlin.io.println;
|
78 | var SupervisorJob = $module$kotlinx_coroutines_core.kotlinx.coroutines.SupervisorJob_5dx9e$;
|
79 | var AbstractCoroutineContextElement = Kotlin.kotlin.coroutines.AbstractCoroutineContextElement;
|
80 | var CoroutineExceptionHandler = $module$kotlinx_coroutines_core.kotlinx.coroutines.CoroutineExceptionHandler;
|
81 | var concatToString = Kotlin.kotlin.text.concatToString_355ntz$;
|
82 | var toInt = Kotlin.kotlin.text.toInt_6ic1pp$;
|
83 | var encodeToByteArray = $module$ktor_ktor_io_jsLegacy.io.ktor.utils.io.charsets.encodeToByteArray_fj4osb$;
|
84 | var MutableIterator = Kotlin.kotlin.collections.MutableIterator;
|
85 | var Set = Kotlin.kotlin.collections.Set;
|
86 | var collectionSizeOrDefault = Kotlin.kotlin.collections.collectionSizeOrDefault_ba2ldo$;
|
87 | var ArrayList_init = Kotlin.kotlin.collections.ArrayList_init_ww73n8$;
|
88 | var Kind_OBJECT = Kotlin.Kind.OBJECT;
|
89 | var toList = Kotlin.kotlin.collections.toList_us0mfu$;
|
90 | var defineInlineFunction = Kotlin.defineInlineFunction;
|
91 | var UnsupportedOperationException_init = Kotlin.kotlin.UnsupportedOperationException_init_pdl1vj$;
|
92 | var L0 = Kotlin.Long.ZERO;
|
93 | var coerceAtLeast = Kotlin.kotlin.ranges.coerceAtLeast_2p08ub$;
|
94 | var wrapFunction = Kotlin.wrapFunction;
|
95 | var firstOrNull = Kotlin.kotlin.collections.firstOrNull_2p1efm$;
|
96 | var equals_0 = Kotlin.kotlin.text.equals_igcy3c$;
|
97 | var setOf = Kotlin.kotlin.collections.setOf_mh5how$;
|
98 | var emptyMap = Kotlin.kotlin.collections.emptyMap_q3lmfv$;
|
99 | var toMap = Kotlin.kotlin.collections.toMap_abgq59$;
|
100 | var lazy = Kotlin.kotlin.lazy_klfg04$;
|
101 | var Collection = Kotlin.kotlin.collections.Collection;
|
102 | var toSet = Kotlin.kotlin.collections.toSet_7wnvza$;
|
103 | var emptySet = Kotlin.kotlin.collections.emptySet_287e2$;
|
104 | var LinkedHashMap_init_0 = Kotlin.kotlin.collections.LinkedHashMap_init_bwtc7$;
|
105 | var asList = Kotlin.kotlin.collections.asList_us0mfu$;
|
106 | var toMap_0 = Kotlin.kotlin.collections.toMap_6hr0sd$;
|
107 | var listOf_0 = Kotlin.kotlin.collections.listOf_mh5how$;
|
108 | var single = Kotlin.kotlin.collections.single_7wnvza$;
|
109 | var toList_0 = Kotlin.kotlin.collections.toList_7wnvza$;
|
110 | var ArrayList_init_0 = Kotlin.kotlin.collections.ArrayList_init_287e2$;
|
111 | var IllegalArgumentException_init = Kotlin.kotlin.IllegalArgumentException_init_pdl1vj$;
|
112 | var CharRange = Kotlin.kotlin.ranges.CharRange;
|
113 | var StringBuilder_init_0 = Kotlin.kotlin.text.StringBuilder_init_za3lpa$;
|
114 | var get_indices = Kotlin.kotlin.text.get_indices_gw00vp$;
|
115 | var IOException = $module$ktor_ktor_io_jsLegacy.io.ktor.utils.io.errors.IOException;
|
116 | var addAll_0 = Kotlin.kotlin.collections.addAll_ye1y7v$;
|
117 | var MutableCollection = Kotlin.kotlin.collections.MutableCollection;
|
118 | var PropertyMetadata = Kotlin.PropertyMetadata;
|
119 | var List = Kotlin.kotlin.collections.List;
|
120 | var NoSuchElementException_init = Kotlin.kotlin.NoSuchElementException_init;
|
121 | var MutableListIterator = Kotlin.kotlin.collections.MutableListIterator;
|
122 | var IndexOutOfBoundsException_init = Kotlin.kotlin.IndexOutOfBoundsException_init;
|
123 | var makeShared = $module$ktor_ktor_io_jsLegacy.io.ktor.utils.io.makeShared_s8jyvk$;
|
124 | var MutableList = Kotlin.kotlin.collections.MutableList;
|
125 | var ReadWriteProperty = Kotlin.kotlin.properties.ReadWriteProperty;
|
126 | var checkIndexOverflow = Kotlin.kotlin.collections.checkIndexOverflow_za3lpa$;
|
127 |
|
128 | var AbstractMutableList = Kotlin.kotlin.collections.AbstractMutableList;
|
129 | var Math_0 = Math;
|
130 | var UnsupportedOperationException_init_0 = Kotlin.kotlin.UnsupportedOperationException_init;
|
131 | var MutableIterable = Kotlin.kotlin.collections.MutableIterable;
|
132 | var asReversed = Kotlin.kotlin.collections.asReversed_2p1efm$;
|
133 | var ListIterator = Kotlin.kotlin.collections.ListIterator;
|
134 | var atomicArrayOfNulls;
|
135 | var Enum = Kotlin.kotlin.Enum;
|
136 | var throwISE = Kotlin.throwISE;
|
137 | var Comparable = Kotlin.kotlin.Comparable;
|
138 | var toInt_0 = Kotlin.kotlin.text.toInt_pdl1vz$;
|
139 | var throwUPAE = Kotlin.throwUPAE;
|
140 | var IllegalStateException = Kotlin.kotlin.IllegalStateException;
|
141 | var iterator = Kotlin.kotlin.text.iterator_gw00vp$;
|
142 | var ArrayList = Kotlin.kotlin.collections.ArrayList;
|
143 | var get_lastIndex_0 = Kotlin.kotlin.collections.get_lastIndex_55thoc$;
|
144 | var emptyList = Kotlin.kotlin.collections.emptyList_287e2$;
|
145 | var last = Kotlin.kotlin.collections.last_2p1efm$;
|
146 |
|
147 | var CoroutineScope = $module$kotlinx_coroutines_core.kotlinx.coroutines.CoroutineScope;
|
148 | var recoverStackTrace = $module$kotlinx_coroutines_core.kotlinx.coroutines.internal.recoverStackTrace_ak2v6d$;
|
149 | var getKClass = Kotlin.getKClass;
|
150 | var getCallableRef = Kotlin.getCallableRef;
|
151 | var coroutines_0 = Kotlin.kotlin.coroutines;
|
152 | var Continuation = Kotlin.kotlin.coroutines.Continuation;
|
153 | var Result = Kotlin.kotlin.Result;
|
154 | var getOrNull = Kotlin.kotlin.collections.getOrNull_yzln2o$;
|
155 | var preventFreeze = $module$ktor_ktor_io_jsLegacy.io.ktor.utils.io.preventFreeze_s8jyvk$;
|
156 | var createFailure = Kotlin.kotlin.createFailure_tcv7n7$;
|
157 | var asDeferred = $module$kotlinx_coroutines_core.kotlinx.coroutines.asDeferred_t11jrl$;
|
158 | var primitiveArrayConcat = Kotlin.primitiveArrayConcat;
|
159 | var isNaN_0 = Kotlin.kotlin.isNaN_yrwdxr$;
|
160 | var IllegalArgumentException_init_0 = Kotlin.kotlin.IllegalArgumentException_init;
|
161 | var IllegalArgumentException = Kotlin.kotlin.IllegalArgumentException;
|
162 | ChannelIOException.prototype = Object.create(IOException.prototype);
|
163 | ChannelIOException.prototype.constructor = ChannelIOException;
|
164 | ChannelWriteException.prototype = Object.create(ChannelIOException.prototype);
|
165 | ChannelWriteException.prototype.constructor = ChannelWriteException;
|
166 | ChannelReadException.prototype = Object.create(ChannelIOException.prototype);
|
167 | ChannelReadException.prototype.constructor = ChannelReadException;
|
168 | ConcurrentListSlice.prototype = Object.create(AbstractMutableList.prototype);
|
169 | ConcurrentListSlice.prototype.constructor = ConcurrentListSlice;
|
170 | WeekDay.prototype = Object.create(Enum.prototype);
|
171 | WeekDay.prototype.constructor = WeekDay;
|
172 | Month.prototype = Object.create(Enum.prototype);
|
173 | Month.prototype.constructor = Month;
|
174 | InvalidDateStringException.prototype = Object.create(IllegalStateException.prototype);
|
175 | InvalidDateStringException.prototype.constructor = InvalidDateStringException;
|
176 | InvalidPhaseException.prototype = Object.create(Throwable.prototype);
|
177 | InvalidPhaseException.prototype.constructor = InvalidPhaseException;
|
178 | PipelinePhaseRelation$After.prototype = Object.create(PipelinePhaseRelation.prototype);
|
179 | PipelinePhaseRelation$After.prototype.constructor = PipelinePhaseRelation$After;
|
180 | PipelinePhaseRelation$Before.prototype = Object.create(PipelinePhaseRelation.prototype);
|
181 | PipelinePhaseRelation$Before.prototype.constructor = PipelinePhaseRelation$Before;
|
182 | PipelinePhaseRelation$Last.prototype = Object.create(PipelinePhaseRelation.prototype);
|
183 | PipelinePhaseRelation$Last.prototype.constructor = PipelinePhaseRelation$Last;
|
184 | InvalidTimestampException.prototype = Object.create(IllegalStateException.prototype);
|
185 | InvalidTimestampException.prototype.constructor = InvalidTimestampException;
|
186 | UnresolvedAddressException.prototype = Object.create(IllegalArgumentException.prototype);
|
187 | UnresolvedAddressException.prototype.constructor = UnresolvedAddressException;
|
188 | function InternalAPI() {
|
189 | }
|
190 | InternalAPI.$metadata$ = {
|
191 | kind: Kind_CLASS,
|
192 | simpleName: 'InternalAPI',
|
193 | interfaces: [Annotation]};
|
194 | function KtorExperimentalAPI() {
|
195 | }
|
196 | KtorExperimentalAPI.$metadata$ = {
|
197 | kind: Kind_CLASS,
|
198 | simpleName: 'KtorExperimentalAPI',
|
199 | interfaces: [Annotation]};
|
200 | function AttributeKey(name) {
|
201 | this.name = name;
|
202 | }
|
203 | AttributeKey.prototype.toString = function() {
|
204 | return this.name.length === 0 ? Any.prototype.toString.call(this) : 'AttributeKey: ' + this.name;
|
205 | };
|
206 | AttributeKey.$metadata$ = {
|
207 | kind: Kind_CLASS,
|
208 | simpleName: 'AttributeKey',
|
209 | interfaces: []};
|
210 | function Attributes() {
|
211 | }
|
212 | Attributes.prototype.get_yzaw86$ = function(key) {
|
213 | var tmp$;
|
214 | tmp$ = this.getOrNull_yzaw86$(key);
|
215 | if (tmp$ == null) {
|
216 | throw IllegalStateException_init('No instance for key ' + key);
|
217 | }
|
218 | return tmp$;
|
219 | };
|
220 | Attributes.prototype.take_yzaw86$ = function(key) {
|
221 | var $receiver = this.get_yzaw86$(key);
|
222 | this.remove_yzaw86$(key);
|
223 | return $receiver;
|
224 | };
|
225 | Attributes.prototype.takeOrNull_yzaw86$ = function(key) {
|
226 | var $receiver = this.getOrNull_yzaw86$(key);
|
227 | this.remove_yzaw86$(key);
|
228 | return $receiver;
|
229 | };
|
230 | Attributes.$metadata$ = {
|
231 | kind: Kind_INTERFACE,
|
232 | simpleName: 'Attributes',
|
233 | interfaces: []};
|
234 | var BASE64_ALPHABET;
|
235 | var BASE64_MASK;
|
236 | var BASE64_PAD;
|
237 | var BASE64_INVERSE_ALPHABET;
|
238 | function encodeBase64($receiver) {
|
239 | var buildPacket$result;
|
240 | var builder = BytePacketBuilder(0);
|
241 | try {
|
242 | writeText(builder, $receiver);
|
243 | buildPacket$result = builder.build();
|
244 | } catch (t) {
|
245 | if (Kotlin.isType(t, Throwable)) {
|
246 | builder.release();
|
247 | throw t;
|
248 | } else
|
249 | throw t;
|
250 | }
|
251 | return encodeBase64_1(buildPacket$result);
|
252 | }
|
253 | function encodeBase64_0($receiver) {
|
254 | var buildPacket$result;
|
255 | var builder = BytePacketBuilder(0);
|
256 | try {
|
257 | writeFully(builder, $receiver);
|
258 | buildPacket$result = builder.build();
|
259 | } catch (t) {
|
260 | if (Kotlin.isType(t, Throwable)) {
|
261 | builder.release();
|
262 | throw t;
|
263 | } else
|
264 | throw t;
|
265 | }
|
266 | return encodeBase64_1(buildPacket$result);
|
267 | }
|
268 | function encodeBase64_1($receiver) {
|
269 | var $receiver_0 = StringBuilder_init();
|
270 | var data = new Int8Array(3);
|
271 | while ($receiver.remaining.toNumber() > 0) {
|
272 | var read = readAvailable($receiver, data);
|
273 | clearFrom(data, read);
|
274 | var padSize = ((data.length - read | 0) * 8 | 0) / 6 | 0;
|
275 | var chunk = (data[0] & 255) << 16 | (data[1] & 255) << 8 | data[2] & 255;
|
276 | for (var index = data.length; index >= padSize; index--) {
|
277 | var char = chunk >> (6 * index | 0) & 63;
|
278 | $receiver_0.append_s8itvh$(toBase64(char));
|
279 | }
|
280 | for (var index_0 = 0; index_0 < padSize; index_0++) {
|
281 | $receiver_0.append_s8itvh$(BASE64_PAD);
|
282 | }
|
283 | }
|
284 | return $receiver_0.toString();
|
285 | }
|
286 | function decodeBase64String($receiver) {
|
287 | return String_0(decodeBase64Bytes($receiver), void 0, void 0, charsets.Charsets.UTF_8);
|
288 | }
|
289 | function decodeBase64Bytes($receiver) {
|
290 | var buildPacket$result;
|
291 | var builder = BytePacketBuilder(0);
|
292 | try {
|
293 | var dropLastWhile$result;
|
294 | dropLastWhile$break:
|
295 | do {
|
296 | for (var index = get_lastIndex($receiver); index >= 0; index--) {
|
297 | if (!(unboxChar(toBoxedChar($receiver.charCodeAt(index))) === BASE64_PAD)) {
|
298 | dropLastWhile$result = $receiver.substring(0, index + 1 | 0);
|
299 | break dropLastWhile$break;
|
300 | }
|
301 | }
|
302 | dropLastWhile$result = '';
|
303 | } while (false);
|
304 | writeText(builder, dropLastWhile$result);
|
305 | buildPacket$result = builder.build();
|
306 | } catch (t) {
|
307 | if (Kotlin.isType(t, Throwable)) {
|
308 | builder.release();
|
309 | throw t;
|
310 | } else
|
311 | throw t;
|
312 | }
|
313 | return readBytes(decodeBase64Bytes_0(buildPacket$result));
|
314 | }
|
315 | function decodeBase64Bytes_0($receiver) {
|
316 | var buildPacket$result;
|
317 | var builder = BytePacketBuilder(0);
|
318 | try {
|
319 | var tmp$, tmp$_0;
|
320 | var data = new Int8Array(4);
|
321 | while ($receiver.remaining.toNumber() > 0) {
|
322 | var read = readAvailable($receiver, data);
|
323 | var tmp$_1, tmp$_0_0;
|
324 | var index = 0;
|
325 | var accumulator = 0;
|
326 | for (tmp$_1 = 0; tmp$_1 !== data.length; ++tmp$_1) {
|
327 | var element = data[tmp$_1];
|
328 | var index_0 = (tmp$_0_0 = index , index = tmp$_0_0 + 1 | 0 , tmp$_0_0);
|
329 | accumulator = accumulator | fromBase64(element) << ((3 - index_0 | 0) * 6 | 0);
|
330 | }
|
331 | var chunk = accumulator;
|
332 | tmp$ = data.length - 2 | 0;
|
333 | tmp$_0 = data.length - read | 0;
|
334 | for (var index_1 = tmp$; index_1 >= tmp$_0; index_1--) {
|
335 | var origin = chunk >> (8 * index_1 | 0) & 255;
|
336 | builder.writeByte_s8j3t7$(toByte(origin));
|
337 | }
|
338 | }
|
339 | buildPacket$result = builder.build();
|
340 | } catch (t) {
|
341 | if (Kotlin.isType(t, Throwable)) {
|
342 | builder.release();
|
343 | throw t;
|
344 | } else
|
345 | throw t;
|
346 | }
|
347 | return buildPacket$result;
|
348 | }
|
349 | function decodeBase64($receiver) {
|
350 | return decodeBase64String($receiver);
|
351 | }
|
352 | function decodeBase64_0($receiver) {
|
353 | return readText(decodeBase64Bytes_0($receiver));
|
354 | }
|
355 | function clearFrom($receiver, from) {
|
356 | var tmp$;
|
357 | tmp$ = until(from, $receiver.length).iterator();
|
358 | while (tmp$.hasNext()) {
|
359 | var element = tmp$.next();
|
360 | $receiver[element] = 0;
|
361 | }
|
362 | }
|
363 | function toBase64($receiver) {
|
364 | return BASE64_ALPHABET.charCodeAt($receiver);
|
365 | }
|
366 | function fromBase64($receiver) {
|
367 | return toByte(toByte(BASE64_INVERSE_ALPHABET[$receiver & 255]) & BASE64_MASK);
|
368 | }
|
369 | var CHUNK_BUFFER_SIZE;
|
370 | function Coroutine$split$lambda$lambda$lambda(closure$first_0, closure$chunk_0, $receiver_0, controller, continuation_0) {
|
371 | CoroutineImpl.call(this, continuation_0);
|
372 | this.$controller = controller;
|
373 | this.exceptionState_0 = 1;
|
374 | this.local$closure$first = closure$first_0;
|
375 | this.local$closure$chunk = closure$chunk_0;
|
376 | }
|
377 | Coroutine$split$lambda$lambda$lambda.$metadata$ = {
|
378 | kind: Kotlin.Kind.CLASS,
|
379 | simpleName: null,
|
380 | interfaces: [CoroutineImpl]};
|
381 | Coroutine$split$lambda$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype);
|
382 | Coroutine$split$lambda$lambda$lambda.prototype.constructor = Coroutine$split$lambda$lambda$lambda;
|
383 | Coroutine$split$lambda$lambda$lambda.prototype.doResume = function() {
|
384 | do try {
|
385 | switch (this.state_0) {
|
386 | case 0:
|
387 | this.state_0 = 2;
|
388 | this.result_0 = this.local$closure$first.writePacket_3uq2w4$(this.local$closure$chunk.copy(), this);
|
389 | if (this.result_0 === COROUTINE_SUSPENDED)
|
390 | return COROUTINE_SUSPENDED;
|
391 | continue;
|
392 | case 1:
|
393 | throw this.exception_0;
|
394 | case 2:
|
395 | return this.result_0;
|
396 | default:
|
397 | this.state_0 = 1;
|
398 | throw new Error('State Machine Unreachable execution');
|
399 | }
|
400 | } catch (e) {
|
401 | if (this.state_0 === 1) {
|
402 | this.exceptionState_0 = this.state_0;
|
403 | throw e;
|
404 | } else {
|
405 | this.state_0 = this.exceptionState_0;
|
406 | this.exception_0 = e;
|
407 | }
|
408 | } while (true);
|
409 | };
|
410 | function split$lambda$lambda$lambda(closure$first_0, closure$chunk_0) {
|
411 | return function($receiver_0, continuation_0, suspended) {
|
412 | var instance = new Coroutine$split$lambda$lambda$lambda(closure$first_0, closure$chunk_0, $receiver_0, this, continuation_0);
|
413 | if (suspended)
|
414 | return instance;
|
415 | else
|
416 | return instance.doResume(null);
|
417 | };
|
418 | }
|
419 | function Coroutine$split$lambda$lambda$lambda_0(closure$second_0, closure$chunk_0, $receiver_0, controller, continuation_0) {
|
420 | CoroutineImpl.call(this, continuation_0);
|
421 | this.$controller = controller;
|
422 | this.exceptionState_0 = 1;
|
423 | this.local$closure$second = closure$second_0;
|
424 | this.local$closure$chunk = closure$chunk_0;
|
425 | }
|
426 | Coroutine$split$lambda$lambda$lambda_0.$metadata$ = {
|
427 | kind: Kotlin.Kind.CLASS,
|
428 | simpleName: null,
|
429 | interfaces: [CoroutineImpl]};
|
430 | Coroutine$split$lambda$lambda$lambda_0.prototype = Object.create(CoroutineImpl.prototype);
|
431 | Coroutine$split$lambda$lambda$lambda_0.prototype.constructor = Coroutine$split$lambda$lambda$lambda_0;
|
432 | Coroutine$split$lambda$lambda$lambda_0.prototype.doResume = function() {
|
433 | do try {
|
434 | switch (this.state_0) {
|
435 | case 0:
|
436 | this.state_0 = 2;
|
437 | this.result_0 = this.local$closure$second.writePacket_3uq2w4$(this.local$closure$chunk.copy(), this);
|
438 | if (this.result_0 === COROUTINE_SUSPENDED)
|
439 | return COROUTINE_SUSPENDED;
|
440 | continue;
|
441 | case 1:
|
442 | throw this.exception_0;
|
443 | case 2:
|
444 | return this.result_0;
|
445 | default:
|
446 | this.state_0 = 1;
|
447 | throw new Error('State Machine Unreachable execution');
|
448 | }
|
449 | } catch (e) {
|
450 | if (this.state_0 === 1) {
|
451 | this.exceptionState_0 = this.state_0;
|
452 | throw e;
|
453 | } else {
|
454 | this.state_0 = this.exceptionState_0;
|
455 | this.exception_0 = e;
|
456 | }
|
457 | } while (true);
|
458 | };
|
459 | function split$lambda$lambda$lambda_0(closure$second_0, closure$chunk_0) {
|
460 | return function($receiver_0, continuation_0, suspended) {
|
461 | var instance = new Coroutine$split$lambda$lambda$lambda_0(closure$second_0, closure$chunk_0, $receiver_0, this, continuation_0);
|
462 | if (suspended)
|
463 | return instance;
|
464 | else
|
465 | return instance.doResume(null);
|
466 | };
|
467 | }
|
468 | function Coroutine$split$lambda(this$split_0, closure$first_0, closure$second_0, $receiver_0, controller, continuation_0) {
|
469 | CoroutineImpl.call(this, continuation_0);
|
470 | this.$controller = controller;
|
471 | this.exceptionState_0 = 13;
|
472 | this.local$this$split = this$split_0;
|
473 | this.local$closure$first = closure$first_0;
|
474 | this.local$closure$second = closure$second_0;
|
475 | this.local$$receiver = void 0;
|
476 | this.local$$receiver_0 = $receiver_0;
|
477 | }
|
478 | Coroutine$split$lambda.$metadata$ = {
|
479 | kind: Kotlin.Kind.CLASS,
|
480 | simpleName: null,
|
481 | interfaces: [CoroutineImpl]};
|
482 | Coroutine$split$lambda.prototype = Object.create(CoroutineImpl.prototype);
|
483 | Coroutine$split$lambda.prototype.constructor = Coroutine$split$lambda;
|
484 | Coroutine$split$lambda.prototype.doResume = function() {
|
485 | do try {
|
486 | switch (this.state_0) {
|
487 | case 0:
|
488 | this.exceptionState_0 = 8;
|
489 | this.state_0 = 1;
|
490 | continue;
|
491 | case 1:
|
492 | if (this.local$this$split.isClosedForRead) {
|
493 | this.state_0 = 7;
|
494 | continue;
|
495 | }
|
496 | this.state_0 = 2;
|
497 | this.result_0 = readRemaining(this.local$this$split, CHUNK_BUFFER_SIZE, this);
|
498 | if (this.result_0 === COROUTINE_SUSPENDED)
|
499 | return COROUTINE_SUSPENDED;
|
500 | continue;
|
501 | case 2:
|
502 | this.local$$receiver = this.result_0;
|
503 | var tmp$;
|
504 | this.exceptionState_0 = 5;
|
505 | var closure$first = this.local$closure$first;
|
506 | var closure$second = this.local$closure$second;
|
507 | this.state_0 = 3;
|
508 | this.result_0 = awaitAll(listOf([async(this.local$$receiver_0, void 0, void 0, split$lambda$lambda$lambda(closure$first, this.local$$receiver)), async(this.local$$receiver_0, void 0, void 0, split$lambda$lambda$lambda_0(closure$second, this.local$$receiver))]), this);
|
509 | if (this.result_0 === COROUTINE_SUSPENDED)
|
510 | return COROUTINE_SUSPENDED;
|
511 | continue;
|
512 | case 3:
|
513 | tmp$ = this.result_0;
|
514 | this.exceptionState_0 = 8;
|
515 | this.finallyPath_0 = [4];
|
516 | this.state_0 = 6;
|
517 | continue;
|
518 | case 4:
|
519 | this.state_0 = 1;
|
520 | continue;
|
521 | case 5:
|
522 | this.finallyPath_0 = [8];
|
523 | this.state_0 = 6;
|
524 | continue;
|
525 | case 6:
|
526 | this.exceptionState_0 = 8;
|
527 | this.local$$receiver.close();
|
528 | this.state_0 = this.finallyPath_0.shift();
|
529 | continue;
|
530 | case 7:
|
531 | this.exceptionState_0 = 13;
|
532 | this.finallyPath_0 = [12];
|
533 | this.state_0 = 11;
|
534 | continue;
|
535 | case 8:
|
536 | this.finallyPath_0 = [13];
|
537 | this.exceptionState_0 = 11;
|
538 | var cause = this.exception_0;
|
539 | if (Kotlin.isType(cause, Throwable)) {
|
540 | this.local$this$split.cancel_dbl4no$(cause);
|
541 | this.local$closure$first.cancel_dbl4no$(cause);
|
542 | this.exceptionState_0 = 13;
|
543 | this.finallyPath_0 = [9];
|
544 | this.state_0 = 11;
|
545 | this.$returnValue = this.local$closure$second.cancel_dbl4no$(cause);
|
546 | continue;
|
547 | } else {
|
548 | throw cause;
|
549 | }
|
550 | case 9:
|
551 | return this.$returnValue;
|
552 | case 10:
|
553 | this.finallyPath_0 = [12];
|
554 | this.state_0 = 11;
|
555 | continue;
|
556 | case 11:
|
557 | this.exceptionState_0 = 13;
|
558 | close(this.local$closure$first);
|
559 | close(this.local$closure$second);
|
560 | this.state_0 = this.finallyPath_0.shift();
|
561 | continue;
|
562 | case 12:
|
563 | return Unit;
|
564 | case 13:
|
565 | throw this.exception_0;
|
566 | default:
|
567 | this.state_0 = 13;
|
568 | throw new Error('State Machine Unreachable execution');
|
569 | }
|
570 | } catch (e) {
|
571 | if (this.state_0 === 13) {
|
572 | this.exceptionState_0 = this.state_0;
|
573 | throw e;
|
574 | } else {
|
575 | this.state_0 = this.exceptionState_0;
|
576 | this.exception_0 = e;
|
577 | }
|
578 | } while (true);
|
579 | };
|
580 | function split$lambda(this$split_0, closure$first_0, closure$second_0) {
|
581 | return function($receiver_0, continuation_0, suspended) {
|
582 | var instance = new Coroutine$split$lambda(this$split_0, closure$first_0, closure$second_0, $receiver_0, this, continuation_0);
|
583 | if (suspended)
|
584 | return instance;
|
585 | else
|
586 | return instance.doResume(null);
|
587 | };
|
588 | }
|
589 | function split($receiver, coroutineScope) {
|
590 | var first = ByteChannel(true);
|
591 | var second = ByteChannel(true);
|
592 | launch(coroutineScope, void 0, void 0, split$lambda($receiver, first, second));
|
593 | return to(first, second);
|
594 | }
|
595 | function Coroutine$copyToBoth$lambda(this$copyToBoth_0, closure$first_0, closure$second_0, $receiver_0, controller, continuation_0) {
|
596 | CoroutineImpl.call(this, continuation_0);
|
597 | this.$controller = controller;
|
598 | this.exceptionState_0 = 19;
|
599 | this.local$this$copyToBoth = this$copyToBoth_0;
|
600 | this.local$closure$first = closure$first_0;
|
601 | this.local$closure$second = closure$second_0;
|
602 | this.local$$receiver = void 0;
|
603 | this.local$closure$first_0 = void 0;
|
604 | this.local$closure$second_0 = void 0;
|
605 | this.local$this$copyToBoth_0 = void 0;
|
606 | this.local$block$result = void 0;
|
607 | }
|
608 | Coroutine$copyToBoth$lambda.$metadata$ = {
|
609 | kind: Kotlin.Kind.CLASS,
|
610 | simpleName: null,
|
611 | interfaces: [CoroutineImpl]};
|
612 | Coroutine$copyToBoth$lambda.prototype = Object.create(CoroutineImpl.prototype);
|
613 | Coroutine$copyToBoth$lambda.prototype.constructor = Coroutine$copyToBoth$lambda;
|
614 | Coroutine$copyToBoth$lambda.prototype.doResume = function() {
|
615 | do try {
|
616 | switch (this.state_0) {
|
617 | case 0:
|
618 | this.exceptionState_0 = 14;
|
619 | this.state_0 = 1;
|
620 | continue;
|
621 | case 1:
|
622 | if (this.local$this$copyToBoth.isClosedForRead || (this.local$closure$first.isClosedForWrite && this.local$closure$second.isClosedForWrite)) {
|
623 | this.state_0 = 13;
|
624 | continue;
|
625 | }
|
626 | this.state_0 = 2;
|
627 | this.result_0 = readRemaining(this.local$this$copyToBoth, CHUNK_BUFFER_SIZE, this);
|
628 | if (this.result_0 === COROUTINE_SUSPENDED)
|
629 | return COROUTINE_SUSPENDED;
|
630 | continue;
|
631 | case 2:
|
632 | this.local$$receiver = this.result_0;
|
633 | var tmp$;
|
634 | this.exceptionState_0 = 11;
|
635 | this.local$closure$first_0 = this.local$closure$first;
|
636 | this.local$closure$second_0 = this.local$closure$second;
|
637 | this.local$this$copyToBoth_0 = this.local$this$copyToBoth;
|
638 | this.state_0 = 3;
|
639 | continue;
|
640 | case 3:
|
641 | this.exceptionState_0 = 6;
|
642 | this.state_0 = 4;
|
643 | this.result_0 = this.local$closure$first_0.writePacket_3uq2w4$(this.local$$receiver.copy(), this);
|
644 | if (this.result_0 === COROUTINE_SUSPENDED)
|
645 | return COROUTINE_SUSPENDED;
|
646 | continue;
|
647 | case 4:
|
648 | this.state_0 = 5;
|
649 | this.result_0 = this.local$closure$second_0.writePacket_3uq2w4$(this.local$$receiver.copy(), this);
|
650 | if (this.result_0 === COROUTINE_SUSPENDED)
|
651 | return COROUTINE_SUSPENDED;
|
652 | continue;
|
653 | case 5:
|
654 | this.local$block$result = this.result_0;
|
655 | this.exceptionState_0 = 11;
|
656 | this.state_0 = 8;
|
657 | continue;
|
658 | case 6:
|
659 | this.exceptionState_0 = 11;
|
660 | var cause_0 = this.exception_0;
|
661 | if (Kotlin.isType(cause_0, Throwable)) {
|
662 | this.local$this$copyToBoth_0.cancel_dbl4no$(cause_0);
|
663 | this.local$closure$first_0.close_dbl4no$(cause_0);
|
664 | this.local$block$result = this.local$closure$second_0.close_dbl4no$(cause_0);
|
665 | this.exceptionState_0 = 6;
|
666 | this.state_0 = 9;
|
667 | continue;
|
668 | } else {
|
669 | throw cause_0;
|
670 | }
|
671 | case 7:
|
672 | this.state_0 = 8;
|
673 | continue;
|
674 | case 8:
|
675 | if (!false) {
|
676 | this.state_0 = 9;
|
677 | continue;
|
678 | }
|
679 | this.state_0 = 3;
|
680 | continue;
|
681 | case 9:
|
682 | tmp$ = this.local$block$result;
|
683 | this.exceptionState_0 = 14;
|
684 | this.finallyPath_0 = [10];
|
685 | this.state_0 = 12;
|
686 | continue;
|
687 | case 10:
|
688 | this.state_0 = 1;
|
689 | continue;
|
690 | case 11:
|
691 | this.finallyPath_0 = [14];
|
692 | this.state_0 = 12;
|
693 | continue;
|
694 | case 12:
|
695 | this.exceptionState_0 = 14;
|
696 | this.local$$receiver.close();
|
697 | this.state_0 = this.finallyPath_0.shift();
|
698 | continue;
|
699 | case 13:
|
700 | this.exceptionState_0 = 19;
|
701 | this.finallyPath_0 = [18];
|
702 | this.state_0 = 17;
|
703 | continue;
|
704 | case 14:
|
705 | this.finallyPath_0 = [19];
|
706 | this.exceptionState_0 = 17;
|
707 | var cause = this.exception_0;
|
708 | if (Kotlin.isType(cause, Throwable)) {
|
709 | this.local$closure$first.close_dbl4no$(cause);
|
710 | this.exceptionState_0 = 19;
|
711 | this.finallyPath_0 = [15];
|
712 | this.state_0 = 17;
|
713 | this.$returnValue = this.local$closure$second.close_dbl4no$(cause);
|
714 | continue;
|
715 | } else {
|
716 | throw cause;
|
717 | }
|
718 | case 15:
|
719 | return this.$returnValue;
|
720 | case 16:
|
721 | this.finallyPath_0 = [18];
|
722 | this.state_0 = 17;
|
723 | continue;
|
724 | case 17:
|
725 | this.exceptionState_0 = 19;
|
726 | close(this.local$closure$first);
|
727 | close(this.local$closure$second);
|
728 | this.state_0 = this.finallyPath_0.shift();
|
729 | continue;
|
730 | case 18:
|
731 | return Unit;
|
732 | case 19:
|
733 | throw this.exception_0;
|
734 | default:
|
735 | this.state_0 = 19;
|
736 | throw new Error('State Machine Unreachable execution');
|
737 | }
|
738 | } catch (e) {
|
739 | if (this.state_0 === 19) {
|
740 | this.exceptionState_0 = this.state_0;
|
741 | throw e;
|
742 | } else {
|
743 | this.state_0 = this.exceptionState_0;
|
744 | this.exception_0 = e;
|
745 | }
|
746 | } while (true);
|
747 | };
|
748 | function copyToBoth$lambda(this$copyToBoth_0, closure$first_0, closure$second_0) {
|
749 | return function($receiver_0, continuation_0, suspended) {
|
750 | var instance = new Coroutine$copyToBoth$lambda(this$copyToBoth_0, closure$first_0, closure$second_0, $receiver_0, this, continuation_0);
|
751 | if (suspended)
|
752 | return instance;
|
753 | else
|
754 | return instance.doResume(null);
|
755 | };
|
756 | }
|
757 | function copyToBoth($receiver, first, second) {
|
758 | launch(coroutines.GlobalScope, coroutines.Dispatchers.Unconfined, void 0, copyToBoth$lambda($receiver, first, second));
|
759 | }
|
760 | function Coroutine$toByteArray($receiver_0, continuation_0) {
|
761 | CoroutineImpl.call(this, continuation_0);
|
762 | this.exceptionState_0 = 1;
|
763 | this.local$$receiver = $receiver_0;
|
764 | }
|
765 | Coroutine$toByteArray.$metadata$ = {
|
766 | kind: Kotlin.Kind.CLASS,
|
767 | simpleName: null,
|
768 | interfaces: [CoroutineImpl]};
|
769 | Coroutine$toByteArray.prototype = Object.create(CoroutineImpl.prototype);
|
770 | Coroutine$toByteArray.prototype.constructor = Coroutine$toByteArray;
|
771 | Coroutine$toByteArray.prototype.doResume = function() {
|
772 | do try {
|
773 | switch (this.state_0) {
|
774 | case 0:
|
775 | this.state_0 = 2;
|
776 | this.result_0 = readRemaining_0(this.local$$receiver, this);
|
777 | if (this.result_0 === COROUTINE_SUSPENDED)
|
778 | return COROUTINE_SUSPENDED;
|
779 | continue;
|
780 | case 1:
|
781 | throw this.exception_0;
|
782 | case 2:
|
783 | return readBytes_0(this.result_0);
|
784 | default:
|
785 | this.state_0 = 1;
|
786 | throw new Error('State Machine Unreachable execution');
|
787 | }
|
788 | } catch (e) {
|
789 | if (this.state_0 === 1) {
|
790 | this.exceptionState_0 = this.state_0;
|
791 | throw e;
|
792 | } else {
|
793 | this.state_0 = this.exceptionState_0;
|
794 | this.exception_0 = e;
|
795 | }
|
796 | } while (true);
|
797 | };
|
798 | function toByteArray($receiver_0, continuation_0, suspended) {
|
799 | var instance = new Coroutine$toByteArray($receiver_0, continuation_0);
|
800 | if (suspended)
|
801 | return instance;
|
802 | else
|
803 | return instance.doResume(null);
|
804 | }
|
805 | function readShort($receiver, offset) {
|
806 | var result = ($receiver[offset] & 255) << 8 | $receiver[offset + 1 | 0] & 255;
|
807 | return toShort(result);
|
808 | }
|
809 | function CaseInsensitiveMap() {
|
810 | this.delegate_0 = LinkedHashMap_init();
|
811 | }
|
812 | Object.defineProperty(CaseInsensitiveMap.prototype, 'size', {
|
813 | configurable: true,
|
814 | get: function() {
|
815 | return this.delegate_0.size;
|
816 | }});
|
817 | CaseInsensitiveMap.prototype.containsKey_11rb$ = function(key) {
|
818 | return this.delegate_0.containsKey_11rb$(new CaseInsensitiveString(key));
|
819 | };
|
820 | CaseInsensitiveMap.prototype.containsValue_11rc$ = function(value) {
|
821 | return this.delegate_0.containsValue_11rc$(value);
|
822 | };
|
823 | CaseInsensitiveMap.prototype.get_11rb$ = function(key) {
|
824 | return this.delegate_0.get_11rb$(caseInsensitive(key));
|
825 | };
|
826 | CaseInsensitiveMap.prototype.isEmpty = function() {
|
827 | return this.delegate_0.isEmpty();
|
828 | };
|
829 | CaseInsensitiveMap.prototype.clear = function() {
|
830 | this.delegate_0.clear();
|
831 | };
|
832 | CaseInsensitiveMap.prototype.put_xwzc9p$ = function(key, value) {
|
833 | return this.delegate_0.put_xwzc9p$(caseInsensitive(key), value);
|
834 | };
|
835 | CaseInsensitiveMap.prototype.putAll_a2k3zr$ = function(from) {
|
836 | var tmp$;
|
837 | tmp$ = from.entries.iterator();
|
838 | while (tmp$.hasNext()) {
|
839 | var element = tmp$.next();
|
840 | var key = element.key;
|
841 | var value = element.value;
|
842 | this.put_xwzc9p$(key, value);
|
843 | }
|
844 | };
|
845 | CaseInsensitiveMap.prototype.remove_11rb$ = function(key) {
|
846 | return this.delegate_0.remove_11rb$(caseInsensitive(key));
|
847 | };
|
848 | function CaseInsensitiveMap$get_CaseInsensitiveMap$keys$lambda($receiver) {
|
849 | return $receiver.content;
|
850 | }
|
851 | function CaseInsensitiveMap$get_CaseInsensitiveMap$keys$lambda_0($receiver) {
|
852 | return caseInsensitive($receiver);
|
853 | }
|
854 | Object.defineProperty(CaseInsensitiveMap.prototype, 'keys', {
|
855 | configurable: true,
|
856 | get: function() {
|
857 | return new DelegatingMutableSet(this.delegate_0.keys, CaseInsensitiveMap$get_CaseInsensitiveMap$keys$lambda, CaseInsensitiveMap$get_CaseInsensitiveMap$keys$lambda_0);
|
858 | }});
|
859 | function CaseInsensitiveMap$get_CaseInsensitiveMap$entries$lambda($receiver) {
|
860 | return new Entry($receiver.key.content, $receiver.value);
|
861 | }
|
862 | function CaseInsensitiveMap$get_CaseInsensitiveMap$entries$lambda_0($receiver) {
|
863 | return new Entry(caseInsensitive($receiver.key), $receiver.value);
|
864 | }
|
865 | Object.defineProperty(CaseInsensitiveMap.prototype, 'entries', {
|
866 | configurable: true,
|
867 | get: function() {
|
868 | return new DelegatingMutableSet(this.delegate_0.entries, CaseInsensitiveMap$get_CaseInsensitiveMap$entries$lambda, CaseInsensitiveMap$get_CaseInsensitiveMap$entries$lambda_0);
|
869 | }});
|
870 | Object.defineProperty(CaseInsensitiveMap.prototype, 'values', {
|
871 | configurable: true,
|
872 | get: function() {
|
873 | return this.delegate_0.values;
|
874 | }});
|
875 | CaseInsensitiveMap.prototype.equals = function(other) {
|
876 | if (other == null || !Kotlin.isType(other, CaseInsensitiveMap))
|
877 | return false;
|
878 | return equals(other.delegate_0, this.delegate_0);
|
879 | };
|
880 | CaseInsensitiveMap.prototype.hashCode = function() {
|
881 | return hashCode(this.delegate_0);
|
882 | };
|
883 | CaseInsensitiveMap.$metadata$ = {
|
884 | kind: Kind_CLASS,
|
885 | simpleName: 'CaseInsensitiveMap',
|
886 | interfaces: [MutableMap]};
|
887 | function Entry(key, value) {
|
888 | this.key_3iz5qv$_0 = key;
|
889 | this.value_p1xw47$_0 = value;
|
890 | }
|
891 | Object.defineProperty(Entry.prototype, 'key', {
|
892 | get: function() {
|
893 | return this.key_3iz5qv$_0;
|
894 | }});
|
895 | Object.defineProperty(Entry.prototype, 'value', {
|
896 | get: function() {
|
897 | return this.value_p1xw47$_0;
|
898 | },
|
899 | set: function(value) {
|
900 | this.value_p1xw47$_0 = value;
|
901 | }});
|
902 | Entry.prototype.setValue_11rc$ = function(newValue) {
|
903 | this.value = newValue;
|
904 | return this.value;
|
905 | };
|
906 | Entry.prototype.hashCode = function() {
|
907 | return 527 + hashCode(ensureNotNull(this.key)) + hashCode(ensureNotNull(this.value)) | 0;
|
908 | };
|
909 | Entry.prototype.equals = function(other) {
|
910 | if (other == null || !Kotlin.isType(other, Map$Entry))
|
911 | return false;
|
912 | return equals(other.key, this.key) && equals(other.value, this.value);
|
913 | };
|
914 | Entry.prototype.toString = function() {
|
915 | return this.key.toString() + '=' + this.value;
|
916 | };
|
917 | Entry.$metadata$ = {
|
918 | kind: Kind_CLASS,
|
919 | simpleName: 'Entry',
|
920 | interfaces: [MutableMap$MutableEntry]};
|
921 | function CaseInsensitiveSet() {
|
922 | this.backingMap_0 = new CaseInsensitiveMap();
|
923 | }
|
924 | CaseInsensitiveSet.prototype.add_11rb$ = function(element) {
|
925 | var $receiver = this.backingMap_0;
|
926 | var tmp$;
|
927 | if ((Kotlin.isType(tmp$ = $receiver, Map) ? tmp$ : throwCCE()).containsKey_11rb$(element)) {
|
928 | return false;
|
929 | }
|
930 | this.backingMap_0.put_xwzc9p$(element, true);
|
931 | return true;
|
932 | };
|
933 | Object.defineProperty(CaseInsensitiveSet.prototype, 'size', {
|
934 | configurable: true,
|
935 | get: function() {
|
936 | return this.backingMap_0.size;
|
937 | }});
|
938 | CaseInsensitiveSet.prototype.remove_11rb$ = function(element) {
|
939 | return this.backingMap_0.remove_11rb$(element) === true;
|
940 | };
|
941 | CaseInsensitiveSet.prototype.addAll_brywnq$ = function(elements) {
|
942 | var tmp$;
|
943 | var added = false;
|
944 | tmp$ = elements.iterator();
|
945 | while (tmp$.hasNext()) {
|
946 | var element = tmp$.next();
|
947 | if (this.add_11rb$(element)) {
|
948 | added = true;
|
949 | }
|
950 | }
|
951 | return added;
|
952 | };
|
953 | CaseInsensitiveSet.prototype.clear = function() {
|
954 | this.backingMap_0.clear();
|
955 | };
|
956 | CaseInsensitiveSet.prototype.removeAll_brywnq$ = function(elements) {
|
957 | return this.backingMap_0.keys.removeAll_brywnq$(elements);
|
958 | };
|
959 | CaseInsensitiveSet.prototype.retainAll_brywnq$ = function(elements) {
|
960 | return this.backingMap_0.keys.retainAll_brywnq$(elements);
|
961 | };
|
962 | CaseInsensitiveSet.prototype.contains_11rb$ = function(element) {
|
963 | var $receiver = this.backingMap_0;
|
964 | var tmp$;
|
965 | return (Kotlin.isType(tmp$ = $receiver, Map) ? tmp$ : throwCCE()).containsKey_11rb$(element);
|
966 | };
|
967 | CaseInsensitiveSet.prototype.containsAll_brywnq$ = function(elements) {
|
968 | return this.backingMap_0.keys.containsAll_brywnq$(elements);
|
969 | };
|
970 | CaseInsensitiveSet.prototype.isEmpty = function() {
|
971 | return this.backingMap_0.isEmpty();
|
972 | };
|
973 | CaseInsensitiveSet.prototype.iterator = function() {
|
974 | return this.backingMap_0.keys.iterator();
|
975 | };
|
976 | CaseInsensitiveSet.$metadata$ = {
|
977 | kind: Kind_CLASS,
|
978 | simpleName: 'CaseInsensitiveSet',
|
979 | interfaces: [MutableSet]};
|
980 | function CaseInsensitiveSet_init(initial, $this) {
|
981 | $this = $this || Object.create(CaseInsensitiveSet.prototype);
|
982 | CaseInsensitiveSet.call($this);
|
983 | addAll($this, initial);
|
984 | return $this;
|
985 | }
|
986 | function isLowerCase($receiver) {
|
987 | return toChar(String.fromCharCode($receiver | 0).toLowerCase().charCodeAt(0)) === $receiver;
|
988 | }
|
989 | function toCharArray($receiver) {
|
990 | var tmp$;
|
991 | var array = charArray($receiver.length, null);
|
992 | tmp$ = array.length - 1 | 0;
|
993 | for (var i = 0; i <= tmp$; i++) {
|
994 | var value = unboxChar(toBoxedChar($receiver.charCodeAt(i)));
|
995 | array[i] = value;
|
996 | }
|
997 | return array;
|
998 | }
|
999 | function caseInsensitiveMap() {
|
1000 | return new CaseInsensitiveMap();
|
1001 | }
|
1002 | CoroutineExceptionHandler$ObjectLiteral.prototype = Object.create(AbstractCoroutineContextElement.prototype);
|
1003 | CoroutineExceptionHandler$ObjectLiteral.prototype.constructor = CoroutineExceptionHandler$ObjectLiteral;
|
1004 | function CoroutineExceptionHandler$ObjectLiteral(closure$handler, key) {
|
1005 | this.closure$handler = closure$handler;
|
1006 | AbstractCoroutineContextElement.call(this, key);
|
1007 | }
|
1008 | CoroutineExceptionHandler$ObjectLiteral.prototype.handleException_1ur55u$ = function(context, exception) {
|
1009 | this.closure$handler(context, exception);
|
1010 | };
|
1011 | CoroutineExceptionHandler$ObjectLiteral.$metadata$ = {
|
1012 | kind: Kind_CLASS,
|
1013 | interfaces: [CoroutineExceptionHandler, AbstractCoroutineContextElement]};
|
1014 | function printDebugTree($receiver, offset) {
|
1015 | if (offset === void 0)
|
1016 | offset = 0;
|
1017 | println(repeat(' ', offset) + toString($receiver));
|
1018 | var tmp$;
|
1019 | tmp$ = $receiver.children.iterator();
|
1020 | while (tmp$.hasNext()) {
|
1021 | var element = tmp$.next();
|
1022 | printDebugTree(element, offset + 2 | 0);
|
1023 | }
|
1024 | if (offset === 0)
|
1025 | println_0();
|
1026 | }
|
1027 | function SilentSupervisor$lambda(f, f_0) {
|
1028 | return Unit;
|
1029 | }
|
1030 | function SilentSupervisor(parent) {
|
1031 | if (parent === void 0)
|
1032 | parent = null;
|
1033 | return SupervisorJob(parent).plus_1fupul$(new CoroutineExceptionHandler$ObjectLiteral(SilentSupervisor$lambda, CoroutineExceptionHandler.Key));
|
1034 | }
|
1035 | var digits;
|
1036 | function hex(bytes) {
|
1037 | var tmp$, tmp$_0;
|
1038 | var result = Kotlin.charArray(bytes.length * 2 | 0);
|
1039 | var resultIndex = 0;
|
1040 | var digits_0 = digits;
|
1041 | for (var index = 0; index < bytes.length; index++) {
|
1042 | var b = bytes[index] & 255;
|
1043 | result[tmp$ = resultIndex , resultIndex = tmp$ + 1 | 0 , tmp$] = digits_0[b >> 4];
|
1044 | result[tmp$_0 = resultIndex , resultIndex = tmp$_0 + 1 | 0 , tmp$_0] = digits_0[b & 15];
|
1045 | }
|
1046 | return concatToString(result);
|
1047 | }
|
1048 | function hex_0(s) {
|
1049 | var result = new Int8Array(s.length / 2 | 0);
|
1050 | for (var idx = 0; idx < result.length; idx++) {
|
1051 | var srcIdx = idx * 2 | 0;
|
1052 | var high = toInt(String.fromCharCode(s.charCodeAt(srcIdx)), 16) << 4;
|
1053 | var low = toInt(String.fromCharCode(s.charCodeAt(srcIdx + 1 | 0)), 16);
|
1054 | result[idx] = toByte(high | low);
|
1055 | }
|
1056 | return result;
|
1057 | }
|
1058 | function generateNonce(size) {
|
1059 | var buildPacket$result;
|
1060 | var builder = BytePacketBuilder(0);
|
1061 | try {
|
1062 | while (builder.size < size) {
|
1063 | writeText(builder, generateNonce_0());
|
1064 | }
|
1065 | buildPacket$result = builder.build();
|
1066 | } catch (t) {
|
1067 | if (Kotlin.isType(t, Throwable)) {
|
1068 | builder.release();
|
1069 | throw t;
|
1070 | } else
|
1071 | throw t;
|
1072 | }
|
1073 | return readBytes_0(buildPacket$result, size);
|
1074 | }
|
1075 | function Digest() {
|
1076 | }
|
1077 | Digest.$metadata$ = {
|
1078 | kind: Kind_INTERFACE,
|
1079 | simpleName: 'Digest',
|
1080 | interfaces: []};
|
1081 | function build($receiver, bytes, continuation) {
|
1082 | $receiver.plusAssign_fqrh44$(bytes);
|
1083 | return $receiver.build(continuation);
|
1084 | }
|
1085 | function build_0($receiver, string, charset, continuation) {
|
1086 | if (charset === void 0)
|
1087 | charset = charsets.Charsets.UTF_8;
|
1088 | $receiver.plusAssign_fqrh44$(encodeToByteArray(charset.newEncoder(), string, 0, string.length));
|
1089 | return $receiver.build(continuation);
|
1090 | }
|
1091 | function DelegatingMutableSet(delegate, convertTo, convert) {
|
1092 | this.delegate_0 = delegate;
|
1093 | this.convertTo_0 = convertTo;
|
1094 | this.convert_0 = convert;
|
1095 | this.size_uukmxx$_0 = this.delegate_0.size;
|
1096 | }
|
1097 | DelegatingMutableSet.prototype.convert_9xhtru$ = function($receiver) {
|
1098 | var destination = ArrayList_init(collectionSizeOrDefault($receiver, 10));
|
1099 | var tmp$;
|
1100 | tmp$ = $receiver.iterator();
|
1101 | while (tmp$.hasNext()) {
|
1102 | var item = tmp$.next();
|
1103 | destination.add_11rb$(this.convert_0(item));
|
1104 | }
|
1105 | return destination;
|
1106 | };
|
1107 | DelegatingMutableSet.prototype.convertTo_9xhuij$ = function($receiver) {
|
1108 | var destination = ArrayList_init(collectionSizeOrDefault($receiver, 10));
|
1109 | var tmp$;
|
1110 | tmp$ = $receiver.iterator();
|
1111 | while (tmp$.hasNext()) {
|
1112 | var item = tmp$.next();
|
1113 | destination.add_11rb$(this.convertTo_0(item));
|
1114 | }
|
1115 | return destination;
|
1116 | };
|
1117 | Object.defineProperty(DelegatingMutableSet.prototype, 'size', {
|
1118 | configurable: true,
|
1119 | get: function() {
|
1120 | return this.size_uukmxx$_0;
|
1121 | }});
|
1122 | DelegatingMutableSet.prototype.add_11rb$ = function(element) {
|
1123 | return this.delegate_0.add_11rb$(this.convert_0(element));
|
1124 | };
|
1125 | DelegatingMutableSet.prototype.addAll_brywnq$ = function(elements) {
|
1126 | return this.delegate_0.addAll_brywnq$(this.convert_9xhtru$(elements));
|
1127 | };
|
1128 | DelegatingMutableSet.prototype.clear = function() {
|
1129 | this.delegate_0.clear();
|
1130 | };
|
1131 | DelegatingMutableSet.prototype.remove_11rb$ = function(element) {
|
1132 | return this.delegate_0.remove_11rb$(this.convert_0(element));
|
1133 | };
|
1134 | DelegatingMutableSet.prototype.removeAll_brywnq$ = function(elements) {
|
1135 | return this.delegate_0.removeAll_brywnq$(this.convert_9xhtru$(elements));
|
1136 | };
|
1137 | DelegatingMutableSet.prototype.retainAll_brywnq$ = function(elements) {
|
1138 | return this.delegate_0.retainAll_brywnq$(this.convert_9xhtru$(elements));
|
1139 | };
|
1140 | DelegatingMutableSet.prototype.contains_11rb$ = function(element) {
|
1141 | return this.delegate_0.contains_11rb$(this.convert_0(element));
|
1142 | };
|
1143 | DelegatingMutableSet.prototype.containsAll_brywnq$ = function(elements) {
|
1144 | return this.delegate_0.containsAll_brywnq$(this.convert_9xhtru$(elements));
|
1145 | };
|
1146 | DelegatingMutableSet.prototype.isEmpty = function() {
|
1147 | return this.delegate_0.isEmpty();
|
1148 | };
|
1149 | function DelegatingMutableSet$iterator$ObjectLiteral(this$DelegatingMutableSet) {
|
1150 | this.this$DelegatingMutableSet = this$DelegatingMutableSet;
|
1151 | this.delegateIterator = this$DelegatingMutableSet.delegate_0.iterator();
|
1152 | }
|
1153 | DelegatingMutableSet$iterator$ObjectLiteral.prototype.hasNext = function() {
|
1154 | return this.delegateIterator.hasNext();
|
1155 | };
|
1156 | DelegatingMutableSet$iterator$ObjectLiteral.prototype.next = function() {
|
1157 | return this.this$DelegatingMutableSet.convertTo_0(this.delegateIterator.next());
|
1158 | };
|
1159 | DelegatingMutableSet$iterator$ObjectLiteral.prototype.remove = function() {
|
1160 | this.delegateIterator.remove();
|
1161 | };
|
1162 | DelegatingMutableSet$iterator$ObjectLiteral.$metadata$ = {
|
1163 | kind: Kind_CLASS,
|
1164 | interfaces: [MutableIterator]};
|
1165 | DelegatingMutableSet.prototype.iterator = function() {
|
1166 | return new DelegatingMutableSet$iterator$ObjectLiteral(this);
|
1167 | };
|
1168 | DelegatingMutableSet.prototype.hashCode = function() {
|
1169 | return hashCode(this.delegate_0);
|
1170 | };
|
1171 | DelegatingMutableSet.prototype.equals = function(other) {
|
1172 | if (other == null || !Kotlin.isType(other, Set))
|
1173 | return false;
|
1174 | var elements = this.convertTo_9xhuij$(this.delegate_0);
|
1175 | var tmp$ = other.containsAll_brywnq$(elements);
|
1176 | if (tmp$) {
|
1177 | tmp$ = elements.containsAll_brywnq$(other);
|
1178 | }
|
1179 | return tmp$;
|
1180 | };
|
1181 | DelegatingMutableSet.prototype.toString = function() {
|
1182 | return this.convertTo_9xhuij$(this.delegate_0).toString();
|
1183 | };
|
1184 | DelegatingMutableSet.$metadata$ = {
|
1185 | kind: Kind_CLASS,
|
1186 | simpleName: 'DelegatingMutableSet',
|
1187 | interfaces: [MutableSet]};
|
1188 | function Identity() {
|
1189 | Identity_instance = this;
|
1190 | }
|
1191 | Identity.prototype.encode_40pv3p$ = function($receiver, source) {
|
1192 | return source;
|
1193 | };
|
1194 | Identity.prototype.decode_40pv3p$ = function($receiver, source) {
|
1195 | return source;
|
1196 | };
|
1197 | Identity.$metadata$ = {
|
1198 | kind: Kind_OBJECT,
|
1199 | simpleName: 'Identity',
|
1200 | interfaces: [Encoder]};
|
1201 | var Identity_instance = null;
|
1202 | function Identity_getInstance() {
|
1203 | if (Identity_instance === null) {
|
1204 | new Identity();
|
1205 | }
|
1206 | return Identity_instance;
|
1207 | }
|
1208 | function Encoder() {
|
1209 | }
|
1210 | Encoder.$metadata$ = {
|
1211 | kind: Kind_INTERFACE,
|
1212 | simpleName: 'Encoder',
|
1213 | interfaces: []};
|
1214 | function Hash() {
|
1215 | Hash_instance = this;
|
1216 | }
|
1217 | Hash.prototype.combine_jiburq$ = function(objects) {
|
1218 | return hashCode(toList(objects));
|
1219 | };
|
1220 | Hash.$metadata$ = {
|
1221 | kind: Kind_OBJECT,
|
1222 | simpleName: 'Hash',
|
1223 | interfaces: []};
|
1224 | var Hash_instance = null;
|
1225 | function Hash_getInstance() {
|
1226 | if (Hash_instance === null) {
|
1227 | new Hash();
|
1228 | }
|
1229 | return Hash_instance;
|
1230 | }
|
1231 | var withLock = defineInlineFunction('ktor-ktor-utils-jsLegacy.io.ktor.util.withLock_mfy7iq$', function($receiver, block) {
|
1232 | try {
|
1233 | $receiver.lock();
|
1234 | return block();
|
1235 | } finally {
|
1236 | $receiver.unlock();
|
1237 | }
|
1238 | });
|
1239 | function NonceManager() {
|
1240 | }
|
1241 | NonceManager.$metadata$ = {
|
1242 | kind: Kind_INTERFACE,
|
1243 | simpleName: 'NonceManager',
|
1244 | interfaces: []};
|
1245 | function GenerateOnlyNonceManager() {
|
1246 | GenerateOnlyNonceManager_instance = this;
|
1247 | }
|
1248 | GenerateOnlyNonceManager.prototype.newNonce = function(continuation) {
|
1249 | return generateNonce_0();
|
1250 | };
|
1251 | GenerateOnlyNonceManager.prototype.verifyNonce_61zpoe$ = function(nonce, continuation) {
|
1252 | return true;
|
1253 | };
|
1254 | GenerateOnlyNonceManager.$metadata$ = {
|
1255 | kind: Kind_OBJECT,
|
1256 | simpleName: 'GenerateOnlyNonceManager',
|
1257 | interfaces: [NonceManager]};
|
1258 | var GenerateOnlyNonceManager_instance = null;
|
1259 | function GenerateOnlyNonceManager_getInstance() {
|
1260 | if (GenerateOnlyNonceManager_instance === null) {
|
1261 | new GenerateOnlyNonceManager();
|
1262 | }
|
1263 | return GenerateOnlyNonceManager_instance;
|
1264 | }
|
1265 | function AlwaysFailNonceManager() {
|
1266 | AlwaysFailNonceManager_instance = this;
|
1267 | }
|
1268 | AlwaysFailNonceManager.prototype.newNonce = function(continuation) {
|
1269 | throw UnsupportedOperationException_init('This manager should never be used');
|
1270 | };
|
1271 | AlwaysFailNonceManager.prototype.verifyNonce_61zpoe$ = function(nonce, continuation) {
|
1272 | throw UnsupportedOperationException_init('This manager should never be used');
|
1273 | };
|
1274 | AlwaysFailNonceManager.$metadata$ = {
|
1275 | kind: Kind_OBJECT,
|
1276 | simpleName: 'AlwaysFailNonceManager',
|
1277 | interfaces: [NonceManager]};
|
1278 | var AlwaysFailNonceManager_instance = null;
|
1279 | function AlwaysFailNonceManager_getInstance() {
|
1280 | if (AlwaysFailNonceManager_instance === null) {
|
1281 | new AlwaysFailNonceManager();
|
1282 | }
|
1283 | return AlwaysFailNonceManager_instance;
|
1284 | }
|
1285 | function get_length($receiver) {
|
1286 | return coerceAtLeast($receiver.endInclusive.subtract($receiver.start).add(Kotlin.Long.fromInt(1)), L0);
|
1287 | }
|
1288 | function contains($receiver, other) {
|
1289 | return other.start.compareTo_11rb$($receiver.start) >= 0 && other.endInclusive.compareTo_11rb$($receiver.endInclusive) <= 0;
|
1290 | }
|
1291 | function StringValues() {
|
1292 | StringValues$Companion_getInstance();
|
1293 | }
|
1294 | function StringValues$Companion() {
|
1295 | StringValues$Companion_instance = this;
|
1296 | this.Empty = new StringValuesImpl();
|
1297 | }
|
1298 | StringValues$Companion.prototype.build_o7hlrk$ = defineInlineFunction('ktor-ktor-utils-jsLegacy.io.ktor.util.StringValues.Companion.build_o7hlrk$', wrapFunction(function() {
|
1299 | var StringValuesBuilder_init = _.io.ktor.util.StringValuesBuilder;
|
1300 | return function(caseInsensitiveName, builder) {
|
1301 | if (caseInsensitiveName === void 0)
|
1302 | caseInsensitiveName = false;
|
1303 | var $receiver = new StringValuesBuilder_init(caseInsensitiveName);
|
1304 | builder($receiver);
|
1305 | return $receiver.build();
|
1306 | };
|
1307 | }));
|
1308 | StringValues$Companion.$metadata$ = {
|
1309 | kind: Kind_OBJECT,
|
1310 | simpleName: 'Companion',
|
1311 | interfaces: []};
|
1312 | var StringValues$Companion_instance = null;
|
1313 | function StringValues$Companion_getInstance() {
|
1314 | if (StringValues$Companion_instance === null) {
|
1315 | new StringValues$Companion();
|
1316 | }
|
1317 | return StringValues$Companion_instance;
|
1318 | }
|
1319 | StringValues.prototype.get_61zpoe$ = function(name) {
|
1320 | var tmp$;
|
1321 | return (tmp$ = this.getAll_61zpoe$(name)) != null ? firstOrNull(tmp$) : null;
|
1322 | };
|
1323 | StringValues.prototype.contains_61zpoe$ = function(name) {
|
1324 | return this.getAll_61zpoe$(name) != null;
|
1325 | };
|
1326 | StringValues.prototype.contains_puj7f4$ = function(name, value) {
|
1327 | var tmp$, tmp$_0;
|
1328 | return (tmp$_0 = (tmp$ = this.getAll_61zpoe$(name)) != null ? tmp$.contains_11rb$(value) : null) != null ? tmp$_0 : false;
|
1329 | };
|
1330 | StringValues.prototype.forEach_ubvtmq$ = function(body) {
|
1331 | var tmp$;
|
1332 | tmp$ = this.entries().iterator();
|
1333 | while (tmp$.hasNext()) {
|
1334 | var element = tmp$.next();
|
1335 | var k = element.key;
|
1336 | var v = element.value;
|
1337 | body(k, v);
|
1338 | }
|
1339 | };
|
1340 | StringValues.$metadata$ = {
|
1341 | kind: Kind_INTERFACE,
|
1342 | simpleName: 'StringValues',
|
1343 | interfaces: []};
|
1344 | function StringValuesSingleImpl(caseInsensitiveName, name, values) {
|
1345 | this.caseInsensitiveName_xvy381$_0 = caseInsensitiveName;
|
1346 | this.name = name;
|
1347 | this.values = values;
|
1348 | }
|
1349 | Object.defineProperty(StringValuesSingleImpl.prototype, 'caseInsensitiveName', {
|
1350 | get: function() {
|
1351 | return this.caseInsensitiveName_xvy381$_0;
|
1352 | }});
|
1353 | StringValuesSingleImpl.prototype.getAll_61zpoe$ = function(name) {
|
1354 | return equals_0(this.name, name, this.caseInsensitiveName) ? this.values : null;
|
1355 | };
|
1356 | function StringValuesSingleImpl$entries$ObjectLiteral(this$StringValuesSingleImpl) {
|
1357 | this.key_tykvjz$_0 = this$StringValuesSingleImpl.name;
|
1358 | this.value_jfkgsx$_0 = this$StringValuesSingleImpl.values;
|
1359 | }
|
1360 | Object.defineProperty(StringValuesSingleImpl$entries$ObjectLiteral.prototype, 'key', {
|
1361 | configurable: true,
|
1362 | get: function() {
|
1363 | return this.key_tykvjz$_0;
|
1364 | }});
|
1365 | Object.defineProperty(StringValuesSingleImpl$entries$ObjectLiteral.prototype, 'value', {
|
1366 | configurable: true,
|
1367 | get: function() {
|
1368 | return this.value_jfkgsx$_0;
|
1369 | }});
|
1370 | StringValuesSingleImpl$entries$ObjectLiteral.prototype.toString = function() {
|
1371 | return this.key + '=' + this.value;
|
1372 | };
|
1373 | StringValuesSingleImpl$entries$ObjectLiteral.$metadata$ = {
|
1374 | kind: Kind_CLASS,
|
1375 | interfaces: [Map$Entry]};
|
1376 | StringValuesSingleImpl.prototype.entries = function() {
|
1377 | return setOf(new StringValuesSingleImpl$entries$ObjectLiteral(this));
|
1378 | };
|
1379 | StringValuesSingleImpl.prototype.isEmpty = function() {
|
1380 | return false;
|
1381 | };
|
1382 | StringValuesSingleImpl.prototype.names = function() {
|
1383 | return setOf(this.name);
|
1384 | };
|
1385 | StringValuesSingleImpl.prototype.toString = function() {
|
1386 | return 'StringValues(case=' + !this.caseInsensitiveName + ') ' + this.entries();
|
1387 | };
|
1388 | StringValuesSingleImpl.prototype.hashCode = function() {
|
1389 | return entriesHashCode(this.entries(), 31 * hashCode(this.caseInsensitiveName) | 0);
|
1390 | };
|
1391 | StringValuesSingleImpl.prototype.equals = function(other) {
|
1392 | if (this === other)
|
1393 | return true;
|
1394 | if (!Kotlin.isType(other, StringValues))
|
1395 | return false;
|
1396 | if (this.caseInsensitiveName !== other.caseInsensitiveName)
|
1397 | return false;
|
1398 | return entriesEquals(this.entries(), other.entries());
|
1399 | };
|
1400 | StringValuesSingleImpl.prototype.forEach_ubvtmq$ = function(body) {
|
1401 | body(this.name, this.values);
|
1402 | };
|
1403 | StringValuesSingleImpl.prototype.get_61zpoe$ = function(name) {
|
1404 | return equals_0(name, this.name, this.caseInsensitiveName) ? firstOrNull(this.values) : null;
|
1405 | };
|
1406 | StringValuesSingleImpl.prototype.contains_61zpoe$ = function(name) {
|
1407 | return equals_0(name, this.name, this.caseInsensitiveName);
|
1408 | };
|
1409 | StringValuesSingleImpl.prototype.contains_puj7f4$ = function(name, value) {
|
1410 | return equals_0(name, this.name, this.caseInsensitiveName) && this.values.contains_11rb$(value);
|
1411 | };
|
1412 | StringValuesSingleImpl.$metadata$ = {
|
1413 | kind: Kind_CLASS,
|
1414 | simpleName: 'StringValuesSingleImpl',
|
1415 | interfaces: [StringValues]};
|
1416 | function StringValuesImpl(caseInsensitiveName, values) {
|
1417 | if (caseInsensitiveName === void 0)
|
1418 | caseInsensitiveName = false;
|
1419 | if (values === void 0)
|
1420 | values = emptyMap();
|
1421 | this.caseInsensitiveName_w2tiaf$_0 = caseInsensitiveName;
|
1422 | this.values_x1t64x$_0 = lazy(StringValuesImpl$values$lambda(this, values));
|
1423 | }
|
1424 | Object.defineProperty(StringValuesImpl.prototype, 'caseInsensitiveName', {
|
1425 | get: function() {
|
1426 | return this.caseInsensitiveName_w2tiaf$_0;
|
1427 | }});
|
1428 | Object.defineProperty(StringValuesImpl.prototype, 'values', {
|
1429 | configurable: true,
|
1430 | get: function() {
|
1431 | return this.values_x1t64x$_0.value;
|
1432 | }});
|
1433 | StringValuesImpl.prototype.get_61zpoe$ = function(name) {
|
1434 | var tmp$;
|
1435 | return (tmp$ = this.listForKey_6rkiov$_0(name)) != null ? firstOrNull(tmp$) : null;
|
1436 | };
|
1437 | StringValuesImpl.prototype.getAll_61zpoe$ = function(name) {
|
1438 | return this.listForKey_6rkiov$_0(name);
|
1439 | };
|
1440 | StringValuesImpl.prototype.contains_61zpoe$ = function(name) {
|
1441 | return this.listForKey_6rkiov$_0(name) != null;
|
1442 | };
|
1443 | StringValuesImpl.prototype.contains_puj7f4$ = function(name, value) {
|
1444 | var tmp$, tmp$_0;
|
1445 | return (tmp$_0 = (tmp$ = this.listForKey_6rkiov$_0(name)) != null ? tmp$.contains_11rb$(value) : null) != null ? tmp$_0 : false;
|
1446 | };
|
1447 | StringValuesImpl.prototype.names = function() {
|
1448 | return unmodifiable(this.values.keys);
|
1449 | };
|
1450 | StringValuesImpl.prototype.isEmpty = function() {
|
1451 | return this.values.isEmpty();
|
1452 | };
|
1453 | StringValuesImpl.prototype.entries = function() {
|
1454 | return unmodifiable(this.values.entries);
|
1455 | };
|
1456 | StringValuesImpl.prototype.forEach_ubvtmq$ = function(body) {
|
1457 | var tmp$;
|
1458 | tmp$ = this.values.entries.iterator();
|
1459 | while (tmp$.hasNext()) {
|
1460 | var tmp$_0 = tmp$.next();
|
1461 | var key = tmp$_0.key;
|
1462 | var value = tmp$_0.value;
|
1463 | body(key, value);
|
1464 | }
|
1465 | };
|
1466 | StringValuesImpl.prototype.listForKey_6rkiov$_0 = function(name) {
|
1467 | return this.values.get_11rb$(name);
|
1468 | };
|
1469 | StringValuesImpl.prototype.toString = function() {
|
1470 | return 'StringValues(case=' + !this.caseInsensitiveName + ') ' + this.entries();
|
1471 | };
|
1472 | StringValuesImpl.prototype.equals = function(other) {
|
1473 | if (this === other)
|
1474 | return true;
|
1475 | if (!Kotlin.isType(other, StringValues))
|
1476 | return false;
|
1477 | if (this.caseInsensitiveName !== other.caseInsensitiveName)
|
1478 | return false;
|
1479 | return entriesEquals(this.entries(), other.entries());
|
1480 | };
|
1481 | StringValuesImpl.prototype.hashCode = function() {
|
1482 | return entriesHashCode(this.entries(), 31 * hashCode(this.caseInsensitiveName) | 0);
|
1483 | };
|
1484 | function StringValuesImpl$values$lambda(this$StringValuesImpl, closure$values) {
|
1485 | return function() {
|
1486 | var tmp$;
|
1487 | if (this$StringValuesImpl.caseInsensitiveName) {
|
1488 | var $receiver = caseInsensitiveMap();
|
1489 | $receiver.putAll_a2k3zr$(closure$values);
|
1490 | tmp$ = $receiver;
|
1491 | } else
|
1492 | tmp$ = toMap(closure$values);
|
1493 | return tmp$;
|
1494 | };
|
1495 | }
|
1496 | StringValuesImpl.$metadata$ = {
|
1497 | kind: Kind_CLASS,
|
1498 | simpleName: 'StringValuesImpl',
|
1499 | interfaces: [StringValues]};
|
1500 | function StringValuesBuilder(caseInsensitiveName, size) {
|
1501 | if (caseInsensitiveName === void 0)
|
1502 | caseInsensitiveName = false;
|
1503 | if (size === void 0)
|
1504 | size = 8;
|
1505 | this.caseInsensitiveName = caseInsensitiveName;
|
1506 | this.values = this.caseInsensitiveName ? caseInsensitiveMap() : LinkedHashMap_init_0(size);
|
1507 | this.built = false;
|
1508 | }
|
1509 | StringValuesBuilder.prototype.getAll_61zpoe$ = function(name) {
|
1510 | return this.values.get_11rb$(name);
|
1511 | };
|
1512 | StringValuesBuilder.prototype.contains_61zpoe$ = function(name) {
|
1513 | var $receiver = this.values;
|
1514 | var tmp$;
|
1515 | return (Kotlin.isType(tmp$ = $receiver, Map) ? tmp$ : throwCCE()).containsKey_11rb$(name);
|
1516 | };
|
1517 | StringValuesBuilder.prototype.contains_puj7f4$ = function(name, value) {
|
1518 | var tmp$, tmp$_0;
|
1519 | return (tmp$_0 = (tmp$ = this.values.get_11rb$(name)) != null ? tmp$.contains_11rb$(value) : null) != null ? tmp$_0 : false;
|
1520 | };
|
1521 | StringValuesBuilder.prototype.names = function() {
|
1522 | return this.values.keys;
|
1523 | };
|
1524 | StringValuesBuilder.prototype.isEmpty = function() {
|
1525 | return this.values.isEmpty();
|
1526 | };
|
1527 | StringValuesBuilder.prototype.entries = function() {
|
1528 | return unmodifiable(this.values.entries);
|
1529 | };
|
1530 | StringValuesBuilder.prototype.set_puj7f4$ = function(name, value) {
|
1531 | this.validateValue_61zpoe$(value);
|
1532 | var list = this.ensureListForKey_fsrbb4$_0(name, 1);
|
1533 | list.clear();
|
1534 | list.add_11rb$(value);
|
1535 | };
|
1536 | StringValuesBuilder.prototype.get_61zpoe$ = function(name) {
|
1537 | var tmp$;
|
1538 | return (tmp$ = this.getAll_61zpoe$(name)) != null ? firstOrNull(tmp$) : null;
|
1539 | };
|
1540 | StringValuesBuilder.prototype.append_puj7f4$ = function(name, value) {
|
1541 | this.validateValue_61zpoe$(value);
|
1542 | this.ensureListForKey_fsrbb4$_0(name, 1).add_11rb$(value);
|
1543 | };
|
1544 | function StringValuesBuilder$appendAll$lambda(this$StringValuesBuilder) {
|
1545 | return function(name, values) {
|
1546 | this$StringValuesBuilder.appendAll_poujtz$(name, values);
|
1547 | return Unit;
|
1548 | };
|
1549 | }
|
1550 | StringValuesBuilder.prototype.appendAll_hb0ubp$ = function(stringValues) {
|
1551 | stringValues.forEach_ubvtmq$(StringValuesBuilder$appendAll$lambda(this));
|
1552 | };
|
1553 | function StringValuesBuilder$appendMissing$lambda(this$StringValuesBuilder) {
|
1554 | return function(name, values) {
|
1555 | this$StringValuesBuilder.appendMissing_poujtz$(name, values);
|
1556 | return Unit;
|
1557 | };
|
1558 | }
|
1559 | StringValuesBuilder.prototype.appendMissing_hb0ubp$ = function(stringValues) {
|
1560 | stringValues.forEach_ubvtmq$(StringValuesBuilder$appendMissing$lambda(this));
|
1561 | };
|
1562 | StringValuesBuilder.prototype.appendAll_poujtz$ = function(name, values) {
|
1563 | var tmp$, tmp$_0, tmp$_1;
|
1564 | var list = this.ensureListForKey_fsrbb4$_0(name, (tmp$_1 = (tmp$_0 = Kotlin.isType(tmp$ = values, Collection) ? tmp$ : null) != null ? tmp$_0.size : null) != null ? tmp$_1 : 2);
|
1565 | var tmp$_2;
|
1566 | tmp$_2 = values.iterator();
|
1567 | while (tmp$_2.hasNext()) {
|
1568 | var element = tmp$_2.next();
|
1569 | this.validateValue_61zpoe$(element);
|
1570 | list.add_11rb$(element);
|
1571 | }
|
1572 | };
|
1573 | StringValuesBuilder.prototype.appendMissing_poujtz$ = function(name, values) {
|
1574 | var tmp$, tmp$_0;
|
1575 | var existing = (tmp$_0 = (tmp$ = this.values.get_11rb$(name)) != null ? toSet(tmp$) : null) != null ? tmp$_0 : emptySet();
|
1576 | var destination = ArrayList_init_0();
|
1577 | var tmp$_1;
|
1578 | tmp$_1 = values.iterator();
|
1579 | while (tmp$_1.hasNext()) {
|
1580 | var element = tmp$_1.next();
|
1581 | if (!existing.contains_11rb$(element))
|
1582 | destination.add_11rb$(element);
|
1583 | }
|
1584 | this.appendAll_poujtz$(name, destination);
|
1585 | };
|
1586 | StringValuesBuilder.prototype.remove_61zpoe$ = function(name) {
|
1587 | this.values.remove_11rb$(name);
|
1588 | };
|
1589 | StringValuesBuilder.prototype.removeKeysWithNoEntries = function() {
|
1590 | var tmp$;
|
1591 | var $receiver = this.values;
|
1592 | var destination = LinkedHashMap_init();
|
1593 | var tmp$_0;
|
1594 | tmp$_0 = $receiver.entries.iterator();
|
1595 | while (tmp$_0.hasNext()) {
|
1596 | var element = tmp$_0.next();
|
1597 | if (element.value.isEmpty()) {
|
1598 | destination.put_xwzc9p$(element.key, element.value);
|
1599 | }
|
1600 | }
|
1601 | tmp$ = destination.entries.iterator();
|
1602 | while (tmp$.hasNext()) {
|
1603 | var tmp$_1 = tmp$.next();
|
1604 | var k = tmp$_1.key;
|
1605 | this.remove_61zpoe$(k);
|
1606 | }
|
1607 | };
|
1608 | StringValuesBuilder.prototype.remove_puj7f4$ = function(name, value) {
|
1609 | var tmp$, tmp$_0;
|
1610 | return (tmp$_0 = (tmp$ = this.values.get_11rb$(name)) != null ? tmp$.remove_11rb$(value) : null) != null ? tmp$_0 : false;
|
1611 | };
|
1612 | StringValuesBuilder.prototype.clear = function() {
|
1613 | this.values.clear();
|
1614 | };
|
1615 | StringValuesBuilder.prototype.build = function() {
|
1616 | if (!!this.built) {
|
1617 | var message = 'ValueMapBuilder can only build a single ValueMap';
|
1618 | throw IllegalArgumentException_init(message.toString());
|
1619 | }
|
1620 | this.built = true;
|
1621 | return new StringValuesImpl(this.caseInsensitiveName, this.values);
|
1622 | };
|
1623 | StringValuesBuilder.prototype.validateName_61zpoe$ = function(name) {
|
1624 | };
|
1625 | StringValuesBuilder.prototype.validateValue_61zpoe$ = function(value) {
|
1626 | };
|
1627 | StringValuesBuilder.prototype.ensureListForKey_fsrbb4$_0 = function(name, size) {
|
1628 | var tmp$;
|
1629 | if (this.built)
|
1630 | throw IllegalStateException_init('Cannot modify a builder when final structure has already been built');
|
1631 | var tmp$_0;
|
1632 | if ((tmp$ = this.values.get_11rb$(name)) != null)
|
1633 | tmp$_0 = tmp$;
|
1634 | else {
|
1635 | var $receiver = ArrayList_init(size);
|
1636 | this.validateName_61zpoe$(name);
|
1637 | this.values.put_xwzc9p$(name, $receiver);
|
1638 | tmp$_0 = $receiver;
|
1639 | }
|
1640 | return tmp$_0;
|
1641 | };
|
1642 | StringValuesBuilder.$metadata$ = {
|
1643 | kind: Kind_CLASS,
|
1644 | simpleName: 'StringValuesBuilder',
|
1645 | interfaces: []};
|
1646 | function valuesOf(pairs, caseInsensitiveKey) {
|
1647 | if (caseInsensitiveKey === void 0)
|
1648 | caseInsensitiveKey = false;
|
1649 | return new StringValuesImpl(caseInsensitiveKey, toMap_0(asList(pairs)));
|
1650 | }
|
1651 | function valuesOf_0(name, value, caseInsensitiveKey) {
|
1652 | if (caseInsensitiveKey === void 0)
|
1653 | caseInsensitiveKey = false;
|
1654 | return new StringValuesSingleImpl(caseInsensitiveKey, name, listOf_0(value));
|
1655 | }
|
1656 | function valuesOf_1(name, values, caseInsensitiveKey) {
|
1657 | if (caseInsensitiveKey === void 0)
|
1658 | caseInsensitiveKey = false;
|
1659 | return new StringValuesSingleImpl(caseInsensitiveKey, name, values);
|
1660 | }
|
1661 | function valuesOf_2() {
|
1662 | return StringValues$Companion_getInstance().Empty;
|
1663 | }
|
1664 | function valuesOf_3(map, caseInsensitiveKey) {
|
1665 | if (caseInsensitiveKey === void 0)
|
1666 | caseInsensitiveKey = false;
|
1667 | var size = map.size;
|
1668 | if (size === 1) {
|
1669 | var entry = single(map.entries);
|
1670 | return new StringValuesSingleImpl(caseInsensitiveKey, entry.key, toList_0(entry.value));
|
1671 | }
|
1672 | var values = caseInsensitiveKey ? caseInsensitiveMap() : LinkedHashMap_init_0(size);
|
1673 | var tmp$;
|
1674 | tmp$ = map.entries.iterator();
|
1675 | while (tmp$.hasNext()) {
|
1676 | var element = tmp$.next();
|
1677 | values.put_xwzc9p$(element.key, toList_0(element.value));
|
1678 | }
|
1679 | return new StringValuesImpl(caseInsensitiveKey, values);
|
1680 | }
|
1681 | function toMap_1($receiver) {
|
1682 | var $receiver_0 = $receiver.entries();
|
1683 | var destination = LinkedHashMap_init();
|
1684 | var tmp$;
|
1685 | tmp$ = $receiver_0.iterator();
|
1686 | while (tmp$.hasNext()) {
|
1687 | var element = tmp$.next();
|
1688 | destination.put_xwzc9p$(element.key, toList_0(element.value));
|
1689 | }
|
1690 | return destination;
|
1691 | }
|
1692 | function flattenEntries($receiver) {
|
1693 | var $receiver_0 = $receiver.entries();
|
1694 | var destination = ArrayList_init_0();
|
1695 | var tmp$;
|
1696 | tmp$ = $receiver_0.iterator();
|
1697 | while (tmp$.hasNext()) {
|
1698 | var element = tmp$.next();
|
1699 | var $receiver_1 = element.value;
|
1700 | var destination_0 = ArrayList_init(collectionSizeOrDefault($receiver_1, 10));
|
1701 | var tmp$_0;
|
1702 | tmp$_0 = $receiver_1.iterator();
|
1703 | while (tmp$_0.hasNext()) {
|
1704 | var item = tmp$_0.next();
|
1705 | destination_0.add_11rb$(to(element.key, item));
|
1706 | }
|
1707 | var list = destination_0;
|
1708 | addAll(destination, list);
|
1709 | }
|
1710 | return destination;
|
1711 | }
|
1712 | function flattenForEach$lambda(closure$block) {
|
1713 | return function(name, items) {
|
1714 | var tmp$;
|
1715 | tmp$ = items.iterator();
|
1716 | while (tmp$.hasNext()) {
|
1717 | var element = tmp$.next();
|
1718 | closure$block(name, element);
|
1719 | }
|
1720 | return Unit;
|
1721 | };
|
1722 | }
|
1723 | function flattenForEach($receiver, block) {
|
1724 | $receiver.forEach_ubvtmq$(flattenForEach$lambda(block));
|
1725 | }
|
1726 | function filter($receiver, keepEmpty, predicate) {
|
1727 | if (keepEmpty === void 0)
|
1728 | keepEmpty = false;
|
1729 | var entries = $receiver.entries();
|
1730 | var values = $receiver.caseInsensitiveName ? caseInsensitiveMap() : LinkedHashMap_init_0(entries.size);
|
1731 | var tmp$;
|
1732 | tmp$ = entries.iterator();
|
1733 | while (tmp$.hasNext()) {
|
1734 | var element = tmp$.next();
|
1735 | var $receiver_0 = element.value;
|
1736 | var destination = ArrayList_init(element.value.size);
|
1737 | var tmp$_0;
|
1738 | tmp$_0 = $receiver_0.iterator();
|
1739 | while (tmp$_0.hasNext()) {
|
1740 | var element_0 = tmp$_0.next();
|
1741 | if (predicate(element.key, element_0))
|
1742 | destination.add_11rb$(element_0);
|
1743 | }
|
1744 | var list = destination;
|
1745 | var tmp$_1 = keepEmpty;
|
1746 | if (!tmp$_1) {
|
1747 | tmp$_1 = !list.isEmpty();
|
1748 | }
|
1749 | if (tmp$_1)
|
1750 | values.put_xwzc9p$(element.key, list);
|
1751 | }
|
1752 | return new StringValuesImpl($receiver.caseInsensitiveName, values);
|
1753 | }
|
1754 | function appendFiltered$lambda(closure$predicate, closure$keepEmpty, this$appendFiltered) {
|
1755 | return function(name, value) {
|
1756 | var destination = ArrayList_init(value.size);
|
1757 | var tmp$;
|
1758 | tmp$ = value.iterator();
|
1759 | while (tmp$.hasNext()) {
|
1760 | var element = tmp$.next();
|
1761 | if (closure$predicate(name, element))
|
1762 | destination.add_11rb$(element);
|
1763 | }
|
1764 | var list = destination;
|
1765 | var tmp$_0 = closure$keepEmpty;
|
1766 | if (!tmp$_0) {
|
1767 | tmp$_0 = !list.isEmpty();
|
1768 | }
|
1769 | if (tmp$_0)
|
1770 | this$appendFiltered.appendAll_poujtz$(name, list);
|
1771 | return Unit;
|
1772 | };
|
1773 | }
|
1774 | function appendFiltered($receiver, source, keepEmpty, predicate) {
|
1775 | if (keepEmpty === void 0)
|
1776 | keepEmpty = false;
|
1777 | source.forEach_ubvtmq$(appendFiltered$lambda(predicate, keepEmpty, $receiver));
|
1778 | }
|
1779 | function appendAll($receiver, builder) {
|
1780 | var tmp$;
|
1781 | tmp$ = builder.entries().iterator();
|
1782 | while (tmp$.hasNext()) {
|
1783 | var element = tmp$.next();
|
1784 | var name = element.key;
|
1785 | var values = element.value;
|
1786 | $receiver.appendAll_poujtz$(name, values);
|
1787 | }
|
1788 | return $receiver;
|
1789 | }
|
1790 | function entriesEquals(a, b) {
|
1791 | return equals(a, b);
|
1792 | }
|
1793 | function entriesHashCode(entries, seed) {
|
1794 | return (seed * 31 | 0) + hashCode(entries) | 0;
|
1795 | }
|
1796 | function escapeHTML($receiver) {
|
1797 | var text = $receiver;
|
1798 | if (text.length === 0)
|
1799 | return text;
|
1800 | var $receiver_0 = StringBuilder_init_0($receiver.length);
|
1801 | var tmp$;
|
1802 | tmp$ = text.length;
|
1803 | for (var idx = 0; idx < tmp$; idx++) {
|
1804 | var ch = text.charCodeAt(idx);
|
1805 | switch (ch) {
|
1806 | case 39:
|
1807 | $receiver_0.append_pdl1vj$(''');
|
1808 | break;
|
1809 | case 34:
|
1810 | $receiver_0.append_pdl1vj$('"');
|
1811 | break;
|
1812 | case 38:
|
1813 | $receiver_0.append_pdl1vj$('&');
|
1814 | break;
|
1815 | case 60:
|
1816 | $receiver_0.append_pdl1vj$('<');
|
1817 | break;
|
1818 | case 62:
|
1819 | $receiver_0.append_pdl1vj$('>');
|
1820 | break;
|
1821 | default:
|
1822 | $receiver_0.append_s8itvh$(ch);
|
1823 | break;
|
1824 | }
|
1825 | }
|
1826 | return $receiver_0.toString();
|
1827 | }
|
1828 | var chomp = defineInlineFunction('ktor-ktor-utils-jsLegacy.io.ktor.util.chomp_xxkbvm$', wrapFunction(function() {
|
1829 | var indexOf = Kotlin.kotlin.text.indexOf_l5u8uk$;
|
1830 | var to = Kotlin.kotlin.to_ujzrz7$;
|
1831 | return function($receiver, separator, onMissingDelimiter) {
|
1832 | var tmp$;
|
1833 | var idx = indexOf($receiver, separator);
|
1834 | if (idx === -1)
|
1835 | tmp$ = onMissingDelimiter();
|
1836 | else {
|
1837 | var tmp$_0 = $receiver.substring(0, idx);
|
1838 | var startIndex = idx + 1 | 0;
|
1839 | tmp$ = to(tmp$_0, $receiver.substring(startIndex));
|
1840 | }
|
1841 | return tmp$;
|
1842 | };
|
1843 | }));
|
1844 | function toLowerCasePreservingASCIIRules($receiver) {
|
1845 | var indexOfFirst$result;
|
1846 | indexOfFirst$break:
|
1847 | do {
|
1848 | var tmp$, tmp$_0, tmp$_1, tmp$_2;
|
1849 | tmp$ = get_indices($receiver);
|
1850 | tmp$_0 = tmp$.first;
|
1851 | tmp$_1 = tmp$.last;
|
1852 | tmp$_2 = tmp$.step;
|
1853 | for (var index = tmp$_0; index <= tmp$_1; index += tmp$_2) {
|
1854 | var it = toBoxedChar($receiver.charCodeAt(index));
|
1855 | if (toLowerCasePreservingASCII(unboxChar(it)) !== unboxChar(it)) {
|
1856 | indexOfFirst$result = index;
|
1857 | break indexOfFirst$break;
|
1858 | }
|
1859 | }
|
1860 | indexOfFirst$result = -1;
|
1861 | } while (false);
|
1862 | var firstIndex = indexOfFirst$result;
|
1863 | if (firstIndex === -1) {
|
1864 | return $receiver;
|
1865 | }
|
1866 | var original = $receiver;
|
1867 | var $receiver_0 = StringBuilder_init_0($receiver.length);
|
1868 | var tmp$_3;
|
1869 | $receiver_0.append_ezbsdh$(original, 0, firstIndex);
|
1870 | tmp$_3 = get_lastIndex(original);
|
1871 | for (var index_0 = firstIndex; index_0 <= tmp$_3; index_0++) {
|
1872 | $receiver_0.append_s8itvh$(toLowerCasePreservingASCII(original.charCodeAt(index_0)));
|
1873 | }
|
1874 | return $receiver_0.toString();
|
1875 | }
|
1876 | function toUpperCasePreservingASCIIRules($receiver) {
|
1877 | var indexOfFirst$result;
|
1878 | indexOfFirst$break:
|
1879 | do {
|
1880 | var tmp$, tmp$_0, tmp$_1, tmp$_2;
|
1881 | tmp$ = get_indices($receiver);
|
1882 | tmp$_0 = tmp$.first;
|
1883 | tmp$_1 = tmp$.last;
|
1884 | tmp$_2 = tmp$.step;
|
1885 | for (var index = tmp$_0; index <= tmp$_1; index += tmp$_2) {
|
1886 | var it = toBoxedChar($receiver.charCodeAt(index));
|
1887 | if (toUpperCasePreservingASCII(unboxChar(it)) !== unboxChar(it)) {
|
1888 | indexOfFirst$result = index;
|
1889 | break indexOfFirst$break;
|
1890 | }
|
1891 | }
|
1892 | indexOfFirst$result = -1;
|
1893 | } while (false);
|
1894 | var firstIndex = indexOfFirst$result;
|
1895 | if (firstIndex === -1) {
|
1896 | return $receiver;
|
1897 | }
|
1898 | var original = $receiver;
|
1899 | var $receiver_0 = StringBuilder_init_0($receiver.length);
|
1900 | var tmp$_3;
|
1901 | $receiver_0.append_ezbsdh$(original, 0, firstIndex);
|
1902 | tmp$_3 = get_lastIndex(original);
|
1903 | for (var index_0 = firstIndex; index_0 <= tmp$_3; index_0++) {
|
1904 | $receiver_0.append_s8itvh$(toUpperCasePreservingASCII(original.charCodeAt(index_0)));
|
1905 | }
|
1906 | return $receiver_0.toString();
|
1907 | }
|
1908 | function toLowerCasePreservingASCII(ch) {
|
1909 | if ((new CharRange(65, 90)).contains_mef7kx$(ch))
|
1910 | return toChar(ch + 32);
|
1911 | else if ((new CharRange(0, 127)).contains_mef7kx$(ch))
|
1912 | return ch;
|
1913 | else {
|
1914 | return toChar(String.fromCharCode(ch | 0).toLowerCase().charCodeAt(0));
|
1915 | }
|
1916 | }
|
1917 | function toUpperCasePreservingASCII(ch) {
|
1918 | if ((new CharRange(97, 122)).contains_mef7kx$(ch))
|
1919 | return toChar(ch - 32);
|
1920 | else if ((new CharRange(0, 127)).contains_mef7kx$(ch))
|
1921 | return ch;
|
1922 | else {
|
1923 | return toChar(String.fromCharCode(ch | 0).toLowerCase().charCodeAt(0));
|
1924 | }
|
1925 | }
|
1926 | function caseInsensitive($receiver) {
|
1927 | return new CaseInsensitiveString($receiver);
|
1928 | }
|
1929 | function CaseInsensitiveString(content) {
|
1930 | this.content = content;
|
1931 | this.hash_0 = hashCode(this.content.toLowerCase());
|
1932 | }
|
1933 | CaseInsensitiveString.prototype.equals = function(other) {
|
1934 | var tmp$, tmp$_0, tmp$_1;
|
1935 | return ((tmp$_1 = (tmp$_0 = Kotlin.isType(tmp$ = other, CaseInsensitiveString) ? tmp$ : null) != null ? tmp$_0.content : null) != null ? equals_0(tmp$_1, this.content, true) : null) === true;
|
1936 | };
|
1937 | CaseInsensitiveString.prototype.hashCode = function() {
|
1938 | return this.hash_0;
|
1939 | };
|
1940 | CaseInsensitiveString.prototype.toString = function() {
|
1941 | return this.content;
|
1942 | };
|
1943 | CaseInsensitiveString.$metadata$ = {
|
1944 | kind: Kind_CLASS,
|
1945 | simpleName: 'CaseInsensitiveString',
|
1946 | interfaces: []};
|
1947 | function get_rootCause($receiver) {
|
1948 | var rootCause = $receiver;
|
1949 | while ((rootCause != null ? rootCause.cause : null) != null) {
|
1950 | rootCause = rootCause.cause;
|
1951 | }
|
1952 | return rootCause;
|
1953 | }
|
1954 | function ChannelIOException(message, exception) {
|
1955 | IOException.call(this, message, exception);
|
1956 | this.name = 'ChannelIOException';
|
1957 | }
|
1958 | ChannelIOException.$metadata$ = {
|
1959 | kind: Kind_CLASS,
|
1960 | simpleName: 'ChannelIOException',
|
1961 | interfaces: [IOException]};
|
1962 | function ChannelWriteException(message, exception) {
|
1963 | if (message === void 0)
|
1964 | message = 'Cannot write to a channel';
|
1965 | ChannelIOException.call(this, message, exception);
|
1966 | this.name = 'ChannelWriteException';
|
1967 | }
|
1968 | ChannelWriteException.$metadata$ = {
|
1969 | kind: Kind_CLASS,
|
1970 | simpleName: 'ChannelWriteException',
|
1971 | interfaces: [ChannelIOException]};
|
1972 | function ChannelReadException(message, exception) {
|
1973 | if (message === void 0)
|
1974 | message = 'Cannot read from a channel';
|
1975 | ChannelIOException.call(this, message, exception);
|
1976 | this.name = 'ChannelReadException';
|
1977 | }
|
1978 | ChannelReadException.$metadata$ = {
|
1979 | kind: Kind_CLASS,
|
1980 | simpleName: 'ChannelReadException',
|
1981 | interfaces: [ChannelIOException]};
|
1982 | function Coroutine$toByteArray_0($receiver_0, limit_0, continuation_0) {
|
1983 | CoroutineImpl.call(this, continuation_0);
|
1984 | this.exceptionState_0 = 1;
|
1985 | this.local$$receiver = $receiver_0;
|
1986 | this.local$limit = limit_0;
|
1987 | }
|
1988 | Coroutine$toByteArray_0.$metadata$ = {
|
1989 | kind: Kotlin.Kind.CLASS,
|
1990 | simpleName: null,
|
1991 | interfaces: [CoroutineImpl]};
|
1992 | Coroutine$toByteArray_0.prototype = Object.create(CoroutineImpl.prototype);
|
1993 | Coroutine$toByteArray_0.prototype.constructor = Coroutine$toByteArray_0;
|
1994 | Coroutine$toByteArray_0.prototype.doResume = function() {
|
1995 | do try {
|
1996 | switch (this.state_0) {
|
1997 | case 0:
|
1998 | if (this.local$limit === void 0)
|
1999 | this.local$limit = 2147483647;
|
2000 | this.state_0 = 2;
|
2001 | this.result_0 = readRemaining(this.local$$receiver, Kotlin.Long.fromInt(this.local$limit), this);
|
2002 | if (this.result_0 === COROUTINE_SUSPENDED)
|
2003 | return COROUTINE_SUSPENDED;
|
2004 | continue;
|
2005 | case 1:
|
2006 | throw this.exception_0;
|
2007 | case 2:
|
2008 | return readBytes_0(this.result_0);
|
2009 | default:
|
2010 | this.state_0 = 1;
|
2011 | throw new Error('State Machine Unreachable execution');
|
2012 | }
|
2013 | } catch (e) {
|
2014 | if (this.state_0 === 1) {
|
2015 | this.exceptionState_0 = this.state_0;
|
2016 | throw e;
|
2017 | } else {
|
2018 | this.state_0 = this.exceptionState_0;
|
2019 | this.exception_0 = e;
|
2020 | }
|
2021 | } while (true);
|
2022 | };
|
2023 | function toByteArray_0($receiver_0, limit_0, continuation_0, suspended) {
|
2024 | var instance = new Coroutine$toByteArray_0($receiver_0, limit_0, continuation_0);
|
2025 | if (suspended)
|
2026 | return instance;
|
2027 | else
|
2028 | return instance.doResume(null);
|
2029 | }
|
2030 | var use = defineInlineFunction('ktor-ktor-utils-jsLegacy.io.ktor.util.cio.use_wxabi2$', wrapFunction(function() {
|
2031 | var Throwable = Error;
|
2032 | var close = _.$$importsForInline$$['ktor-ktor-io-jsLegacy'].io.ktor.utils.io.close_x5qia6$;
|
2033 | return function($receiver, block) {
|
2034 | try {
|
2035 | block($receiver);
|
2036 | } catch (cause) {
|
2037 | if (Kotlin.isType(cause, Throwable)) {
|
2038 | $receiver.close_dbl4no$(cause);
|
2039 | throw cause;
|
2040 | } else
|
2041 | throw cause;
|
2042 | }
|
2043 | finally {
|
2044 | close($receiver);
|
2045 | }
|
2046 | };
|
2047 | }));
|
2048 | function sharedListOf(values) {
|
2049 | if (PlatformUtils_getInstance().IS_NATIVE) {
|
2050 | var $receiver = new ConcurrentList();
|
2051 | addAll_0($receiver, values);
|
2052 | return $receiver;
|
2053 | }
|
2054 | var destination = ArrayList_init(values.length);
|
2055 | var tmp$;
|
2056 | for (tmp$ = 0; tmp$ !== values.length; ++tmp$) {
|
2057 | var item = values[tmp$];
|
2058 | destination.add_11rb$(item);
|
2059 | }
|
2060 | return destination;
|
2061 | }
|
2062 | function ConcurrentCollection(delegate, lock) {
|
2063 | this.delegate_3j32rd$_0 = delegate;
|
2064 | this.lock_hlmq1t$_0 = lock;
|
2065 | }
|
2066 | function ConcurrentCollection$get_ConcurrentCollection$size$lambda(this$ConcurrentCollection) {
|
2067 | return function() {
|
2068 | return this$ConcurrentCollection.delegate_3j32rd$_0.size;
|
2069 | };
|
2070 | }
|
2071 | Object.defineProperty(ConcurrentCollection.prototype, 'size', {
|
2072 | configurable: true,
|
2073 | get: function() {
|
2074 | var $receiver = this.lock_hlmq1t$_0;
|
2075 | var withLock$result;
|
2076 | try {
|
2077 | $receiver.lock();
|
2078 | withLock$result = ConcurrentCollection$get_ConcurrentCollection$size$lambda(this)();
|
2079 | } finally {
|
2080 | $receiver.unlock();
|
2081 | }
|
2082 | return withLock$result;
|
2083 | }});
|
2084 | function ConcurrentCollection$contains$lambda(this$ConcurrentCollection, closure$element) {
|
2085 | return function() {
|
2086 | return this$ConcurrentCollection.delegate_3j32rd$_0.contains_11rb$(closure$element);
|
2087 | };
|
2088 | }
|
2089 | ConcurrentCollection.prototype.contains_11rb$ = function(element) {
|
2090 | var $receiver = this.lock_hlmq1t$_0;
|
2091 | var withLock$result;
|
2092 | try {
|
2093 | $receiver.lock();
|
2094 | withLock$result = ConcurrentCollection$contains$lambda(this, element)();
|
2095 | } finally {
|
2096 | $receiver.unlock();
|
2097 | }
|
2098 | return withLock$result;
|
2099 | };
|
2100 | function ConcurrentCollection$containsAll$lambda(this$ConcurrentCollection, closure$elements) {
|
2101 | return function() {
|
2102 | return this$ConcurrentCollection.delegate_3j32rd$_0.containsAll_brywnq$(closure$elements);
|
2103 | };
|
2104 | }
|
2105 | ConcurrentCollection.prototype.containsAll_brywnq$ = function(elements) {
|
2106 | var $receiver = this.lock_hlmq1t$_0;
|
2107 | var withLock$result;
|
2108 | try {
|
2109 | $receiver.lock();
|
2110 | withLock$result = ConcurrentCollection$containsAll$lambda(this, elements)();
|
2111 | } finally {
|
2112 | $receiver.unlock();
|
2113 | }
|
2114 | return withLock$result;
|
2115 | };
|
2116 | function ConcurrentCollection$isEmpty$lambda(this$ConcurrentCollection) {
|
2117 | return function() {
|
2118 | return this$ConcurrentCollection.delegate_3j32rd$_0.isEmpty();
|
2119 | };
|
2120 | }
|
2121 | ConcurrentCollection.prototype.isEmpty = function() {
|
2122 | var $receiver = this.lock_hlmq1t$_0;
|
2123 | var withLock$result;
|
2124 | try {
|
2125 | $receiver.lock();
|
2126 | withLock$result = ConcurrentCollection$isEmpty$lambda(this)();
|
2127 | } finally {
|
2128 | $receiver.unlock();
|
2129 | }
|
2130 | return withLock$result;
|
2131 | };
|
2132 | function ConcurrentCollection$add$lambda(this$ConcurrentCollection, closure$element) {
|
2133 | return function() {
|
2134 | return this$ConcurrentCollection.delegate_3j32rd$_0.add_11rb$(closure$element);
|
2135 | };
|
2136 | }
|
2137 | ConcurrentCollection.prototype.add_11rb$ = function(element) {
|
2138 | var $receiver = this.lock_hlmq1t$_0;
|
2139 | var withLock$result;
|
2140 | try {
|
2141 | $receiver.lock();
|
2142 | withLock$result = ConcurrentCollection$add$lambda(this, element)();
|
2143 | } finally {
|
2144 | $receiver.unlock();
|
2145 | }
|
2146 | return withLock$result;
|
2147 | };
|
2148 | function ConcurrentCollection$addAll$lambda(this$ConcurrentCollection, closure$elements) {
|
2149 | return function() {
|
2150 | return this$ConcurrentCollection.delegate_3j32rd$_0.addAll_brywnq$(closure$elements);
|
2151 | };
|
2152 | }
|
2153 | ConcurrentCollection.prototype.addAll_brywnq$ = function(elements) {
|
2154 | var $receiver = this.lock_hlmq1t$_0;
|
2155 | var withLock$result;
|
2156 | try {
|
2157 | $receiver.lock();
|
2158 | withLock$result = ConcurrentCollection$addAll$lambda(this, elements)();
|
2159 | } finally {
|
2160 | $receiver.unlock();
|
2161 | }
|
2162 | return withLock$result;
|
2163 | };
|
2164 | function ConcurrentCollection$clear$lambda(this$ConcurrentCollection) {
|
2165 | return function() {
|
2166 | this$ConcurrentCollection.delegate_3j32rd$_0.clear();
|
2167 | return Unit;
|
2168 | };
|
2169 | }
|
2170 | ConcurrentCollection.prototype.clear = function() {
|
2171 | var $receiver = this.lock_hlmq1t$_0;
|
2172 | try {
|
2173 | $receiver.lock();
|
2174 | ConcurrentCollection$clear$lambda(this)();
|
2175 | } finally {
|
2176 | $receiver.unlock();
|
2177 | }
|
2178 | };
|
2179 | ConcurrentCollection.prototype.iterator = function() {
|
2180 | return this.delegate_3j32rd$_0.iterator();
|
2181 | };
|
2182 | function ConcurrentCollection$remove$lambda(this$ConcurrentCollection, closure$element) {
|
2183 | return function() {
|
2184 | return this$ConcurrentCollection.delegate_3j32rd$_0.remove_11rb$(closure$element);
|
2185 | };
|
2186 | }
|
2187 | ConcurrentCollection.prototype.remove_11rb$ = function(element) {
|
2188 | var $receiver = this.lock_hlmq1t$_0;
|
2189 | var withLock$result;
|
2190 | try {
|
2191 | $receiver.lock();
|
2192 | withLock$result = ConcurrentCollection$remove$lambda(this, element)();
|
2193 | } finally {
|
2194 | $receiver.unlock();
|
2195 | }
|
2196 | return withLock$result;
|
2197 | };
|
2198 | function ConcurrentCollection$removeAll$lambda(this$ConcurrentCollection, closure$elements) {
|
2199 | return function() {
|
2200 | return this$ConcurrentCollection.delegate_3j32rd$_0.removeAll_brywnq$(closure$elements);
|
2201 | };
|
2202 | }
|
2203 | ConcurrentCollection.prototype.removeAll_brywnq$ = function(elements) {
|
2204 | var $receiver = this.lock_hlmq1t$_0;
|
2205 | var withLock$result;
|
2206 | try {
|
2207 | $receiver.lock();
|
2208 | withLock$result = ConcurrentCollection$removeAll$lambda(this, elements)();
|
2209 | } finally {
|
2210 | $receiver.unlock();
|
2211 | }
|
2212 | return withLock$result;
|
2213 | };
|
2214 | function ConcurrentCollection$retainAll$lambda(this$ConcurrentCollection, closure$elements) {
|
2215 | return function() {
|
2216 | return this$ConcurrentCollection.delegate_3j32rd$_0.retainAll_brywnq$(closure$elements);
|
2217 | };
|
2218 | }
|
2219 | ConcurrentCollection.prototype.retainAll_brywnq$ = function(elements) {
|
2220 | var $receiver = this.lock_hlmq1t$_0;
|
2221 | var withLock$result;
|
2222 | try {
|
2223 | $receiver.lock();
|
2224 | withLock$result = ConcurrentCollection$retainAll$lambda(this, elements)();
|
2225 | } finally {
|
2226 | $receiver.unlock();
|
2227 | }
|
2228 | return withLock$result;
|
2229 | };
|
2230 | ConcurrentCollection.$metadata$ = {
|
2231 | kind: Kind_CLASS,
|
2232 | simpleName: 'ConcurrentCollection',
|
2233 | interfaces: [MutableCollection]};
|
2234 | function shared$ObjectLiteral(closure$value) {
|
2235 | this.value_0 = closure$value;
|
2236 | }
|
2237 | shared$ObjectLiteral.prototype.getValue_lrcp0p$ = function(thisRef, property) {
|
2238 | return this.value_0;
|
2239 | };
|
2240 | shared$ObjectLiteral.prototype.setValue_9rddgb$ = function(thisRef, property, value) {
|
2241 | this.value_0 = value;
|
2242 | };
|
2243 | shared$ObjectLiteral.$metadata$ = {
|
2244 | kind: Kind_CLASS,
|
2245 | interfaces: [ReadWriteProperty]};
|
2246 | var INITIAL_CAPACITY;
|
2247 | function ConcurrentList() {
|
2248 | this.data_euorsu$_0 = new shared$ObjectLiteral(new SharedList(32));
|
2249 | this.size_emamgl$_0 = new shared$ObjectLiteral(0);
|
2250 | this.lock_0 = new Any();
|
2251 | makeShared(this);
|
2252 | }
|
2253 | var ConcurrentList$data_metadata = new PropertyMetadata('data');
|
2254 | Object.defineProperty(ConcurrentList.prototype, 'data_0', {
|
2255 | configurable: true,
|
2256 | get: function() {
|
2257 | return this.data_euorsu$_0.getValue_lrcp0p$(this, ConcurrentList$data_metadata);
|
2258 | },
|
2259 | set: function(data) {
|
2260 | this.data_euorsu$_0.setValue_9rddgb$(this, ConcurrentList$data_metadata, data);
|
2261 | }});
|
2262 | var ConcurrentList$size_metadata = new PropertyMetadata('size');
|
2263 | Object.defineProperty(ConcurrentList.prototype, 'size', {
|
2264 | configurable: true,
|
2265 | get: function() {
|
2266 | return this.size_emamgl$_0.getValue_lrcp0p$(this, ConcurrentList$size_metadata);
|
2267 | },
|
2268 | set: function(size) {
|
2269 | this.size_emamgl$_0.setValue_9rddgb$(this, ConcurrentList$size_metadata, size);
|
2270 | }});
|
2271 | ConcurrentList.prototype.hashCode = function() {
|
2272 | var tmp$;
|
2273 | var accumulator = 7;
|
2274 | tmp$ = this.iterator();
|
2275 | while (tmp$.hasNext()) {
|
2276 | var element = tmp$.next();
|
2277 | var state = accumulator;
|
2278 | var tmp$_0;
|
2279 | accumulator = Hash_getInstance().combine_jiburq$([state, (tmp$_0 = element != null ? hashCode(element) : null) != null ? tmp$_0 : 0]);
|
2280 | }
|
2281 | return accumulator;
|
2282 | };
|
2283 | ConcurrentList.prototype.equals = function(other) {
|
2284 | var block$result;
|
2285 | block$break:
|
2286 | do {
|
2287 | if (other == null || !Kotlin.isType(other, List) || other.size !== this.size) {
|
2288 | block$result = false;
|
2289 | break block$break;
|
2290 | }
|
2291 | var tmp$, tmp$_0;
|
2292 | var index = 0;
|
2293 | tmp$ = this.iterator();
|
2294 | while (tmp$.hasNext()) {
|
2295 | var item = tmp$.next();
|
2296 | if (!equals(other.get_za3lpa$(checkIndexOverflow((tmp$_0 = index , index = tmp$_0 + 1 | 0 , tmp$_0))), item)) {
|
2297 | block$result = false;
|
2298 | break block$break;
|
2299 | }
|
2300 | }
|
2301 | block$result = true;
|
2302 | } while (false);
|
2303 | return block$result;
|
2304 | };
|
2305 | ConcurrentList.prototype.toString = function() {
|
2306 | var $receiver = StringBuilder_init();
|
2307 | $receiver.append_s8itvh$(91);
|
2308 | var tmp$, tmp$_0;
|
2309 | var index = 0;
|
2310 | tmp$ = this.iterator();
|
2311 | while (tmp$.hasNext()) {
|
2312 | var item = tmp$.next();
|
2313 | var index_0 = checkIndexOverflow((tmp$_0 = index , index = tmp$_0 + 1 | 0 , tmp$_0));
|
2314 | $receiver.append_pdl1vj$(item.toString());
|
2315 | if ((index_0 + 1 | 0) < this.size) {
|
2316 | $receiver.append_pdl1vj$(', ');
|
2317 | }
|
2318 | }
|
2319 | $receiver.append_s8itvh$(93);
|
2320 | return $receiver.toString();
|
2321 | };
|
2322 | ConcurrentList.prototype.contains_11rb$ = function(element) {
|
2323 | return this.indexOf_11rb$(element) >= 0;
|
2324 | };
|
2325 | ConcurrentList.prototype.containsAll_brywnq$ = function(elements) {
|
2326 | var all$result;
|
2327 | all$break:
|
2328 | do {
|
2329 | var tmp$;
|
2330 | if (Kotlin.isType(elements, Collection) && elements.isEmpty()) {
|
2331 | all$result = true;
|
2332 | break all$break;
|
2333 | }
|
2334 | tmp$ = elements.iterator();
|
2335 | while (tmp$.hasNext()) {
|
2336 | var element = tmp$.next();
|
2337 | if (!this.contains_11rb$(element)) {
|
2338 | all$result = false;
|
2339 | break all$break;
|
2340 | }
|
2341 | }
|
2342 | all$result = true;
|
2343 | } while (false);
|
2344 | return all$result;
|
2345 | };
|
2346 | ConcurrentList.prototype.get_za3lpa$ = function(index) {
|
2347 | if (index >= this.size) {
|
2348 | throw NoSuchElementException_init();
|
2349 | }
|
2350 | return ensureNotNull(this.data_0.get_za3lpa$(index));
|
2351 | };
|
2352 | ConcurrentList.prototype.indexOf_11rb$ = function(element) {
|
2353 | var tmp$;
|
2354 | tmp$ = this.size;
|
2355 | for (var index = 0; index < tmp$; index++) {
|
2356 | if (equals(this.data_0.get_za3lpa$(index), element)) {
|
2357 | return index;
|
2358 | }
|
2359 | }
|
2360 | return -1;
|
2361 | };
|
2362 | ConcurrentList.prototype.isEmpty = function() {
|
2363 | return this.size === 0;
|
2364 | };
|
2365 | ConcurrentList.prototype.lastIndexOf_11rb$ = function(element) {
|
2366 | for (var index = this.size - 1 | 0; index >= 0; index--) {
|
2367 | if (equals(this.data_0.get_za3lpa$(index), element)) {
|
2368 | return index;
|
2369 | }
|
2370 | }
|
2371 | return -1;
|
2372 | };
|
2373 | ConcurrentList.prototype.add_11rb$ = function(element) {
|
2374 | if (this.size >= this.data_0.size) {
|
2375 | this.increaseCapacity_0();
|
2376 | }
|
2377 | this.data_0.set_wxm5ur$(this.size, element);
|
2378 | this.size = this.size + 1 | 0;
|
2379 | return true;
|
2380 | };
|
2381 | ConcurrentList.prototype.add_wxm5ur$ = function(index, element) {
|
2382 | this.reserve_0(index, 1);
|
2383 | this.data_0.set_wxm5ur$(index, element);
|
2384 | };
|
2385 | ConcurrentList.prototype.addAll_u57x28$ = function(index, elements) {
|
2386 | var tmp$;
|
2387 | this.reserve_0(index, elements.size);
|
2388 | var current = index;
|
2389 | tmp$ = elements.iterator();
|
2390 | while (tmp$.hasNext()) {
|
2391 | var item = tmp$.next();
|
2392 | this.data_0.set_wxm5ur$(current, item);
|
2393 | current = current + 1 | 0;
|
2394 | }
|
2395 | return !elements.isEmpty();
|
2396 | };
|
2397 | ConcurrentList.prototype.addAll_brywnq$ = function(elements) {
|
2398 | all$break:
|
2399 | do {
|
2400 | var tmp$;
|
2401 | if (Kotlin.isType(elements, Collection) && elements.isEmpty()) {
|
2402 | true;
|
2403 | break all$break;
|
2404 | }
|
2405 | tmp$ = elements.iterator();
|
2406 | while (tmp$.hasNext()) {
|
2407 | var element = tmp$.next();
|
2408 | if (!this.add_11rb$(element)) {
|
2409 | false;
|
2410 | break all$break;
|
2411 | }
|
2412 | }
|
2413 | true;
|
2414 | } while (false);
|
2415 | return !elements.isEmpty();
|
2416 | };
|
2417 | ConcurrentList.prototype.clear = function() {
|
2418 | this.data_0 = new SharedList(32);
|
2419 | this.size = 0;
|
2420 | };
|
2421 | ConcurrentList.prototype.iterator = function() {
|
2422 | return this.listIterator();
|
2423 | };
|
2424 | ConcurrentList.prototype.listIterator = function() {
|
2425 | return this.listIterator_za3lpa$(0);
|
2426 | };
|
2427 | function ConcurrentList$listIterator$ObjectLiteral(this$ConcurrentList, closure$index) {
|
2428 | this.this$ConcurrentList = this$ConcurrentList;
|
2429 | this.current_cc9gdq$_0 = new shared$ObjectLiteral(closure$index);
|
2430 | }
|
2431 | var ConcurrentList$listIterator$ObjectLiteral$current_metadata = new PropertyMetadata('current');
|
2432 | Object.defineProperty(ConcurrentList$listIterator$ObjectLiteral.prototype, 'current', {
|
2433 | configurable: true,
|
2434 | get: function() {
|
2435 | return this.current_cc9gdq$_0.getValue_lrcp0p$(this, ConcurrentList$listIterator$ObjectLiteral$current_metadata);
|
2436 | },
|
2437 | set: function(current) {
|
2438 | this.current_cc9gdq$_0.setValue_9rddgb$(this, ConcurrentList$listIterator$ObjectLiteral$current_metadata, current);
|
2439 | }});
|
2440 | ConcurrentList$listIterator$ObjectLiteral.prototype.hasNext = function() {
|
2441 | return this.current < this.this$ConcurrentList.size;
|
2442 | };
|
2443 | ConcurrentList$listIterator$ObjectLiteral.prototype.next = function() {
|
2444 | var tmp$;
|
2445 | return this.this$ConcurrentList.get_za3lpa$((tmp$ = this.current , this.current = tmp$ + 1 | 0 , tmp$));
|
2446 | };
|
2447 | ConcurrentList$listIterator$ObjectLiteral.prototype.remove = function() {
|
2448 | this.this$ConcurrentList.removeAt_za3lpa$(this.current - 1 | 0);
|
2449 | this.current = this.current - 1 | 0;
|
2450 | };
|
2451 | ConcurrentList$listIterator$ObjectLiteral.prototype.hasPrevious = function() {
|
2452 | return this.current > 0;
|
2453 | };
|
2454 | ConcurrentList$listIterator$ObjectLiteral.prototype.nextIndex = function() {
|
2455 | return this.current + 1 | 0;
|
2456 | };
|
2457 | ConcurrentList$listIterator$ObjectLiteral.prototype.previous = function() {
|
2458 | var tmp$;
|
2459 | return this.this$ConcurrentList.get_za3lpa$((tmp$ = this.current , this.current = tmp$ - 1 | 0 , tmp$));
|
2460 | };
|
2461 | ConcurrentList$listIterator$ObjectLiteral.prototype.previousIndex = function() {
|
2462 | return this.current - 1 | 0;
|
2463 | };
|
2464 | ConcurrentList$listIterator$ObjectLiteral.prototype.add_11rb$ = function(element) {
|
2465 | this.this$ConcurrentList.add_wxm5ur$(this.current, element);
|
2466 | };
|
2467 | ConcurrentList$listIterator$ObjectLiteral.prototype.set_11rb$ = function(element) {
|
2468 | this.this$ConcurrentList.set_wxm5ur$(this.current - 1 | 0, element);
|
2469 | };
|
2470 | ConcurrentList$listIterator$ObjectLiteral.$metadata$ = {
|
2471 | kind: Kind_CLASS,
|
2472 | interfaces: [MutableListIterator]};
|
2473 | ConcurrentList.prototype.listIterator_za3lpa$ = function(index) {
|
2474 | return new ConcurrentList$listIterator$ObjectLiteral(this, index);
|
2475 | };
|
2476 | ConcurrentList.prototype.subList_vux9f0$ = function(fromIndex, toIndex) {
|
2477 | return new ConcurrentListSlice(this, fromIndex, toIndex);
|
2478 | };
|
2479 | ConcurrentList.prototype.remove_11rb$ = function(element) {
|
2480 | var index = this.indexOf_11rb$(element);
|
2481 | if (index < 0) {
|
2482 | return false;
|
2483 | }
|
2484 | this.removeAt_za3lpa$(index);
|
2485 | return true;
|
2486 | };
|
2487 | ConcurrentList.prototype.removeAll_brywnq$ = function(elements) {
|
2488 | var result = {
|
2489 | v: false};
|
2490 | var tmp$;
|
2491 | tmp$ = elements.iterator();
|
2492 | while (tmp$.hasNext()) {
|
2493 | var element = tmp$.next();
|
2494 | result.v = this.remove_11rb$(element) || result.v;
|
2495 | }
|
2496 | return result.v;
|
2497 | };
|
2498 | ConcurrentList.prototype.removeAt_za3lpa$ = function(index) {
|
2499 | this.checkIndex_0(index);
|
2500 | var old = this.data_0.get_za3lpa$(index);
|
2501 | this.data_0.set_wxm5ur$(index, null);
|
2502 | this.sweep_0(index);
|
2503 | return ensureNotNull(old);
|
2504 | };
|
2505 | ConcurrentList.prototype.retainAll_brywnq$ = function(elements) {
|
2506 | var tmp$;
|
2507 | var changed = false;
|
2508 | var firstNull = -1;
|
2509 | tmp$ = this.size;
|
2510 | for (var index = 0; index < tmp$; index++) {
|
2511 | var item = ensureNotNull(this.data_0.get_za3lpa$(index));
|
2512 | if (!elements.contains_11rb$(item)) {
|
2513 | changed = true;
|
2514 | this.data_0.set_wxm5ur$(index, null);
|
2515 | if (firstNull < 0) {
|
2516 | firstNull = index;
|
2517 | }
|
2518 | }
|
2519 | }
|
2520 | if (changed) {
|
2521 | this.sweep_0(firstNull);
|
2522 | }
|
2523 | return changed;
|
2524 | };
|
2525 | ConcurrentList.prototype.set_wxm5ur$ = function(index, element) {
|
2526 | this.checkIndex_0(index);
|
2527 | var old = this.data_0.get_za3lpa$(index);
|
2528 | this.data_0.set_wxm5ur$(index, element);
|
2529 | return old != null ? old : element;
|
2530 | };
|
2531 | ConcurrentList.prototype.checkIndex_0 = function(index) {
|
2532 | if (index >= this.size || index < 0)
|
2533 | throw IndexOutOfBoundsException_init();
|
2534 | };
|
2535 | ConcurrentList.prototype.increaseCapacity_0 = function(targetCapacity) {
|
2536 | if (targetCapacity === void 0)
|
2537 | targetCapacity = this.data_0.size * 2 | 0;
|
2538 | var tmp$;
|
2539 | var newData = new SharedList(targetCapacity);
|
2540 | tmp$ = this.data_0.size;
|
2541 | for (var index = 0; index < tmp$; index++) {
|
2542 | newData.set_wxm5ur$(index, this.data_0.get_za3lpa$(index));
|
2543 | }
|
2544 | this.data_0 = newData;
|
2545 | };
|
2546 | ConcurrentList.prototype.sweep_0 = function(firstNull) {
|
2547 | var tmp$, tmp$_0;
|
2548 | var writePosition = firstNull;
|
2549 | tmp$ = this.size;
|
2550 | for (var index = writePosition + 1 | 0; index < tmp$; index++) {
|
2551 | if (this.data_0.get_za3lpa$(index) == null) {
|
2552 | continue;
|
2553 | }
|
2554 | this.data_0.set_wxm5ur$(writePosition, this.data_0.get_za3lpa$(index));
|
2555 | writePosition = writePosition + 1 | 0;
|
2556 | }
|
2557 | tmp$_0 = this.size;
|
2558 | for (var index_0 = writePosition; index_0 < tmp$_0; index_0++) {
|
2559 | this.data_0.set_wxm5ur$(index_0, null);
|
2560 | }
|
2561 | this.size = writePosition;
|
2562 | };
|
2563 | ConcurrentList.prototype.reserve_0 = function(index, gapSize) {
|
2564 | var tmp$;
|
2565 | var targetSize = gapSize + this.size | 0;
|
2566 | while (this.data_0.size < targetSize) {
|
2567 | this.increaseCapacity_0();
|
2568 | }
|
2569 | var readPosition = this.size - 1 | 0;
|
2570 | while (readPosition >= index) {
|
2571 | this.data_0.set_wxm5ur$(readPosition + gapSize | 0, this.data_0.get_za3lpa$(readPosition));
|
2572 | readPosition = readPosition - 1 | 0;
|
2573 | }
|
2574 | tmp$ = index + gapSize | 0;
|
2575 | for (var current = index; current < tmp$; current++) {
|
2576 | this.data_0.set_wxm5ur$(current, null);
|
2577 | }
|
2578 | this.size = this.size + gapSize | 0;
|
2579 | };
|
2580 | ConcurrentList.$metadata$ = {
|
2581 | kind: Kind_CLASS,
|
2582 | simpleName: 'ConcurrentList',
|
2583 | interfaces: [MutableList]};
|
2584 | function shared$ObjectLiteral_0(closure$value) {
|
2585 | this.value_0 = closure$value;
|
2586 | }
|
2587 | shared$ObjectLiteral_0.prototype.getValue_lrcp0p$ = function(thisRef, property) {
|
2588 | return this.value_0;
|
2589 | };
|
2590 | shared$ObjectLiteral_0.prototype.setValue_9rddgb$ = function(thisRef, property, value) {
|
2591 | this.value_0 = value;
|
2592 | };
|
2593 | shared$ObjectLiteral_0.$metadata$ = {
|
2594 | kind: Kind_CLASS,
|
2595 | interfaces: [ReadWriteProperty]};
|
2596 | var INITIAL_CAPACITY_0;
|
2597 | var MAX_LOAD_FACTOR;
|
2598 | var UPSIZE_RATIO;
|
2599 | function ConcurrentMap(lock, initialCapacity) {
|
2600 | if (lock === void 0)
|
2601 | lock = new Lock();
|
2602 | if (initialCapacity === void 0)
|
2603 | initialCapacity = 32;
|
2604 | this.lock_0 = lock;
|
2605 | this.table_7ekke8$_0 = new shared$ObjectLiteral_0(new SharedList(initialCapacity));
|
2606 | this.insertionOrder_w7s5d3$_0 = new shared$ObjectLiteral_0(new SharedForwardList());
|
2607 | this._size_0 = 0;
|
2608 | makeShared(this);
|
2609 | }
|
2610 | var ConcurrentMap$table_metadata = new PropertyMetadata('table');
|
2611 | Object.defineProperty(ConcurrentMap.prototype, 'table_0', {
|
2612 | configurable: true,
|
2613 | get: function() {
|
2614 | return this.table_7ekke8$_0.getValue_lrcp0p$(this, ConcurrentMap$table_metadata);
|
2615 | },
|
2616 | set: function(table) {
|
2617 | this.table_7ekke8$_0.setValue_9rddgb$(this, ConcurrentMap$table_metadata, table);
|
2618 | }});
|
2619 | var ConcurrentMap$insertionOrder_metadata = new PropertyMetadata('insertionOrder');
|
2620 | Object.defineProperty(ConcurrentMap.prototype, 'insertionOrder_0', {
|
2621 | configurable: true,
|
2622 | get: function() {
|
2623 | return this.insertionOrder_w7s5d3$_0.getValue_lrcp0p$(this, ConcurrentMap$insertionOrder_metadata);
|
2624 | },
|
2625 | set: function(insertionOrder) {
|
2626 | this.insertionOrder_w7s5d3$_0.setValue_9rddgb$(this, ConcurrentMap$insertionOrder_metadata, insertionOrder);
|
2627 | }});
|
2628 | Object.defineProperty(ConcurrentMap.prototype, 'loadFactor_0', {
|
2629 | configurable: true,
|
2630 | get: function() {
|
2631 | return this._size_0 / this.table_0.size;
|
2632 | }});
|
2633 | Object.defineProperty(ConcurrentMap.prototype, 'size', {
|
2634 | configurable: true,
|
2635 | get: function() {
|
2636 | return this._size_0;
|
2637 | }});
|
2638 | ConcurrentMap.prototype.containsKey_11rb$ = function(key) {
|
2639 | return this.get_11rb$(key) != null;
|
2640 | };
|
2641 | function ConcurrentMap$containsValue$lambda(this$ConcurrentMap, closure$value) {
|
2642 | return function() {
|
2643 | var tmp$, tmp$_0;
|
2644 | tmp$ = this$ConcurrentMap.table_0.iterator();
|
2645 | while (tmp$.hasNext()) {
|
2646 | var bucket = tmp$.next();
|
2647 | if (bucket == null)
|
2648 | continue;
|
2649 | tmp$_0 = bucket.iterator();
|
2650 | while (tmp$_0.hasNext()) {
|
2651 | var item = tmp$_0.next();
|
2652 | if (equals(item.value, closure$value)) {
|
2653 | return true;
|
2654 | }
|
2655 | }
|
2656 | }
|
2657 | return false;
|
2658 | };
|
2659 | }
|
2660 | ConcurrentMap.prototype.containsValue_11rc$ = function(value) {
|
2661 | return this.locked_0(ConcurrentMap$containsValue$lambda(this, value));
|
2662 | };
|
2663 | function ConcurrentMap$get$lambda(closure$key, this$ConcurrentMap) {
|
2664 | return function() {
|
2665 | var tmp$;
|
2666 | tmp$ = this$ConcurrentMap.findBucket_0(closure$key);
|
2667 | if (tmp$ == null) {
|
2668 | return null;
|
2669 | }
|
2670 | var bucket = tmp$;
|
2671 | var firstOrNull$result;
|
2672 | firstOrNull$break:
|
2673 | do {
|
2674 | var tmp$_0;
|
2675 | tmp$_0 = bucket.iterator();
|
2676 | while (tmp$_0.hasNext()) {
|
2677 | var element = tmp$_0.next();
|
2678 | var closure$key_0 = closure$key;
|
2679 | if (equals(element.key, closure$key_0)) {
|
2680 | firstOrNull$result = element;
|
2681 | break firstOrNull$break;
|
2682 | }
|
2683 | }
|
2684 | firstOrNull$result = null;
|
2685 | } while (false);
|
2686 | var item = firstOrNull$result;
|
2687 | return item != null ? item.value : null;
|
2688 | };
|
2689 | }
|
2690 | ConcurrentMap.prototype.get_11rb$ = function(key) {
|
2691 | return this.locked_0(ConcurrentMap$get$lambda(key, this));
|
2692 | };
|
2693 | ConcurrentMap.prototype.isEmpty = function() {
|
2694 | return this.size === 0;
|
2695 | };
|
2696 | function ConcurrentMap$clear$lambda(this$ConcurrentMap) {
|
2697 | return function() {
|
2698 | this$ConcurrentMap.table_0 = new SharedList(32);
|
2699 | this$ConcurrentMap.insertionOrder_0 = new SharedForwardList();
|
2700 | return Unit;
|
2701 | };
|
2702 | }
|
2703 | ConcurrentMap.prototype.clear = function() {
|
2704 | this.locked_0(ConcurrentMap$clear$lambda(this));
|
2705 | };
|
2706 | function ConcurrentMap$put$lambda(this$ConcurrentMap, closure$key, closure$value) {
|
2707 | return function() {
|
2708 | if (this$ConcurrentMap.loadFactor_0 > MAX_LOAD_FACTOR) {
|
2709 | this$ConcurrentMap.upsize_0();
|
2710 | }
|
2711 | var bucket = this$ConcurrentMap.findOrCreateBucket_0(closure$key);
|
2712 | var firstOrNull$result;
|
2713 | firstOrNull$break:
|
2714 | do {
|
2715 | var tmp$;
|
2716 | tmp$ = bucket.iterator();
|
2717 | while (tmp$.hasNext()) {
|
2718 | var element = tmp$.next();
|
2719 | var closure$key_0 = closure$key;
|
2720 | if (equals(element.key, closure$key_0)) {
|
2721 | firstOrNull$result = element;
|
2722 | break firstOrNull$break;
|
2723 | }
|
2724 | }
|
2725 | firstOrNull$result = null;
|
2726 | } while (false);
|
2727 | var item = firstOrNull$result;
|
2728 | if (item != null) {
|
2729 | var oldValue = item.value;
|
2730 | item.value = closure$value;
|
2731 | return oldValue;
|
2732 | }
|
2733 | var mapNode = new MapNode(closure$key, closure$value);
|
2734 | var node = this$ConcurrentMap.insertionOrder_0.appendLast_trkh7z$(mapNode);
|
2735 | mapNode.backReference_8be2vx$ = node;
|
2736 | bucket.appendFirst_trkh7z$(mapNode);
|
2737 | (function(scope) {
|
2738 | return ++this$ConcurrentMap._size_0;
|
2739 | })(this);
|
2740 | return null;
|
2741 | };
|
2742 | }
|
2743 | ConcurrentMap.prototype.put_xwzc9p$ = function(key, value) {
|
2744 | return this.locked_0(ConcurrentMap$put$lambda(this, key, value));
|
2745 | };
|
2746 | ConcurrentMap.prototype.putAll_a2k3zr$ = function(from) {
|
2747 | var tmp$;
|
2748 | tmp$ = from.entries.iterator();
|
2749 | while (tmp$.hasNext()) {
|
2750 | var tmp$_0 = tmp$.next();
|
2751 | var key = tmp$_0.key;
|
2752 | var value = tmp$_0.value;
|
2753 | this.put_xwzc9p$(key, value);
|
2754 | }
|
2755 | };
|
2756 | function ConcurrentMap$remove$lambda(closure$key, this$ConcurrentMap) {
|
2757 | return function() {
|
2758 | var tmp$;
|
2759 | tmp$ = this$ConcurrentMap.findBucket_0(closure$key);
|
2760 | if (tmp$ == null) {
|
2761 | return null;
|
2762 | }
|
2763 | var bucket = tmp$;
|
2764 | var receiver = bucket.iterator();
|
2765 | var closure$key_0 = closure$key;
|
2766 | var this$ConcurrentMap_0 = this$ConcurrentMap;
|
2767 | while (receiver.hasNext()) {
|
2768 | var item = receiver.next();
|
2769 | if (equals(item.key, closure$key_0)) {
|
2770 | var result = item.value;
|
2771 | (function(scope) {
|
2772 | return --this$ConcurrentMap_0._size_0;
|
2773 | })(this);
|
2774 | item.remove_8be2vx$();
|
2775 | receiver.remove();
|
2776 | return result;
|
2777 | }
|
2778 | }
|
2779 | return null;
|
2780 | };
|
2781 | }
|
2782 | ConcurrentMap.prototype.remove_11rb$ = function(key) {
|
2783 | return this.locked_0(ConcurrentMap$remove$lambda(key, this));
|
2784 | };
|
2785 | Object.defineProperty(ConcurrentMap.prototype, 'entries', {
|
2786 | configurable: true,
|
2787 | get: function() {
|
2788 | return new MutableMapEntries(this);
|
2789 | }});
|
2790 | Object.defineProperty(ConcurrentMap.prototype, 'keys', {
|
2791 | configurable: true,
|
2792 | get: function() {
|
2793 | return new ConcurrentMapKeys(this);
|
2794 | }});
|
2795 | Object.defineProperty(ConcurrentMap.prototype, 'values', {
|
2796 | configurable: true,
|
2797 | get: function() {
|
2798 | return new ConcurrentMapValues(this);
|
2799 | }});
|
2800 | function ConcurrentMap$equals$lambda(closure$other, this$ConcurrentMap) {
|
2801 | return function() {
|
2802 | var tmp$;
|
2803 | if (closure$other == null || !Kotlin.isType(closure$other, Map) || closure$other.size !== this$ConcurrentMap.size) {
|
2804 | return false;
|
2805 | }
|
2806 | tmp$ = closure$other.entries.iterator();
|
2807 | while (tmp$.hasNext()) {
|
2808 | var tmp$_0 = tmp$.next();
|
2809 | var key = tmp$_0.key;
|
2810 | var value = tmp$_0.value;
|
2811 | var $receiver = this$ConcurrentMap;
|
2812 | var tmp$_1;
|
2813 | if (!equals((Kotlin.isType(tmp$_1 = $receiver, Map) ? tmp$_1 : throwCCE()).get_11rb$(key), value)) {
|
2814 | return false;
|
2815 | }
|
2816 | }
|
2817 | return true;
|
2818 | };
|
2819 | }
|
2820 | ConcurrentMap.prototype.equals = function(other) {
|
2821 | return this.locked_0(ConcurrentMap$equals$lambda(other, this));
|
2822 | };
|
2823 | function ConcurrentMap$hashCode$lambda(this$ConcurrentMap) {
|
2824 | return function() {
|
2825 | var tmp$;
|
2826 | var current = 7;
|
2827 | tmp$ = this$ConcurrentMap.entries.iterator();
|
2828 | while (tmp$.hasNext()) {
|
2829 | var tmp$_0 = tmp$.next();
|
2830 | var key = tmp$_0.key;
|
2831 | var value = tmp$_0.value;
|
2832 | current = Hash_getInstance().combine_jiburq$([hashCode(key), hashCode(value), current]);
|
2833 | }
|
2834 | return current;
|
2835 | };
|
2836 | }
|
2837 | ConcurrentMap.prototype.hashCode = function() {
|
2838 | return this.locked_0(ConcurrentMap$hashCode$lambda(this));
|
2839 | };
|
2840 | function ConcurrentMap$toString$lambda(this$ConcurrentMap) {
|
2841 | return function() {
|
2842 | var $receiver = StringBuilder_init();
|
2843 | var this$ConcurrentMap_0 = this$ConcurrentMap;
|
2844 | $receiver.append_pdl1vj$('{');
|
2845 | var tmp$, tmp$_0;
|
2846 | var index = 0;
|
2847 | tmp$ = this$ConcurrentMap_0.entries.iterator();
|
2848 | while (tmp$.hasNext()) {
|
2849 | var item = tmp$.next();
|
2850 | var index_0 = checkIndexOverflow((tmp$_0 = index , index = tmp$_0 + 1 | 0 , tmp$_0));
|
2851 | var key = item.key;
|
2852 | var value = item.value;
|
2853 | $receiver.append_pdl1vj$(key.toString() + '=' + value);
|
2854 | if (index_0 !== (this$ConcurrentMap_0.size - 1 | 0)) {
|
2855 | $receiver.append_pdl1vj$(', ');
|
2856 | }
|
2857 | }
|
2858 | $receiver.append_pdl1vj$('}');
|
2859 | return $receiver.toString();
|
2860 | };
|
2861 | }
|
2862 | ConcurrentMap.prototype.toString = function() {
|
2863 | return this.locked_0(ConcurrentMap$toString$lambda(this));
|
2864 | };
|
2865 | function ConcurrentMap$iterator$ObjectLiteral(this$ConcurrentMap) {
|
2866 | this.this$ConcurrentMap = this$ConcurrentMap;
|
2867 | this.current_cx5bh6$_0 = new shared$ObjectLiteral_0(this$ConcurrentMap.insertionOrder_0.first());
|
2868 | makeShared(this);
|
2869 | }
|
2870 | var ConcurrentMap$iterator$ObjectLiteral$current_metadata = new PropertyMetadata('current');
|
2871 | Object.defineProperty(ConcurrentMap$iterator$ObjectLiteral.prototype, 'current_0', {
|
2872 | configurable: true,
|
2873 | get: function() {
|
2874 | return this.current_cx5bh6$_0.getValue_lrcp0p$(this, ConcurrentMap$iterator$ObjectLiteral$current_metadata);
|
2875 | },
|
2876 | set: function(current) {
|
2877 | this.current_cx5bh6$_0.setValue_9rddgb$(this, ConcurrentMap$iterator$ObjectLiteral$current_metadata, current);
|
2878 | }});
|
2879 | Object.defineProperty(ConcurrentMap$iterator$ObjectLiteral.prototype, 'previous_0', {
|
2880 | configurable: true,
|
2881 | get: function() {
|
2882 | var tmp$;
|
2883 | return (tmp$ = this.current_0) != null ? tmp$.previous : null;
|
2884 | }});
|
2885 | ConcurrentMap$iterator$ObjectLiteral.prototype.hasNext = function() {
|
2886 | return this.current_0 != null;
|
2887 | };
|
2888 | ConcurrentMap$iterator$ObjectLiteral.prototype.next = function() {
|
2889 | var tmp$;
|
2890 | var result = ensureNotNull(ensureNotNull(this.current_0).item);
|
2891 | this.current_0 = (tmp$ = this.current_0) != null ? tmp$.next : null;
|
2892 | return result;
|
2893 | };
|
2894 | ConcurrentMap$iterator$ObjectLiteral.prototype.remove = function() {
|
2895 | var item = ensureNotNull(ensureNotNull(this.previous_0).item);
|
2896 | this.this$ConcurrentMap.remove_11rb$(item.key);
|
2897 | };
|
2898 | ConcurrentMap$iterator$ObjectLiteral.$metadata$ = {
|
2899 | kind: Kind_CLASS,
|
2900 | interfaces: [MutableIterator]};
|
2901 | ConcurrentMap.prototype.iterator_8be2vx$ = function() {
|
2902 | return new ConcurrentMap$iterator$ObjectLiteral(this);
|
2903 | };
|
2904 | function ConcurrentMap$getOrDefault$lambda(closure$key, closure$block, this$ConcurrentMap) {
|
2905 | return function() {
|
2906 | return this$ConcurrentMap.computeIfAbsent_c5ybai$(closure$key, closure$block);
|
2907 | };
|
2908 | }
|
2909 | ConcurrentMap.prototype.getOrDefault_c5ybai$ = function(key, block) {
|
2910 | var $receiver = this.lock_0;
|
2911 | var withLock$result;
|
2912 | try {
|
2913 | $receiver.lock();
|
2914 | withLock$result = ConcurrentMap$getOrDefault$lambda(key, block, this)();
|
2915 | } finally {
|
2916 | $receiver.unlock();
|
2917 | }
|
2918 | return withLock$result;
|
2919 | };
|
2920 | function ConcurrentMap$computeIfAbsent$lambda(closure$key, this$ConcurrentMap, closure$block) {
|
2921 | return function() {
|
2922 | var value = this$ConcurrentMap.get_11rb$(closure$key);
|
2923 | if (value != null) {
|
2924 | return value;
|
2925 | }
|
2926 | var newValue = closure$block();
|
2927 | this$ConcurrentMap.put_xwzc9p$(closure$key, newValue);
|
2928 | return newValue;
|
2929 | };
|
2930 | }
|
2931 | ConcurrentMap.prototype.computeIfAbsent_c5ybai$ = function(key, block) {
|
2932 | return this.locked_0(ConcurrentMap$computeIfAbsent$lambda(key, this, block));
|
2933 | };
|
2934 | ConcurrentMap.prototype.findBucket_0 = function(key) {
|
2935 | var bucketId = hashCode(key) & this.table_0.size - 1;
|
2936 | return this.table_0.get_za3lpa$(bucketId);
|
2937 | };
|
2938 | ConcurrentMap.prototype.findOrCreateBucket_0 = function(key) {
|
2939 | var bucketId = hashCode(key) & this.table_0.size - 1;
|
2940 | var result = this.table_0.get_za3lpa$(bucketId);
|
2941 | if (result == null) {
|
2942 | var bucket = new SharedForwardList();
|
2943 | this.table_0.set_wxm5ur$(bucketId, bucket);
|
2944 | return bucket;
|
2945 | }
|
2946 | return result;
|
2947 | };
|
2948 | ConcurrentMap.prototype.upsize_0 = function() {
|
2949 | var newTable = new ConcurrentMap(void 0, this.table_0.size * 2 | 0);
|
2950 | newTable.putAll_a2k3zr$(this);
|
2951 | this.table_0 = newTable.table_0;
|
2952 | };
|
2953 | function ConcurrentMap$locked$lambda(closure$block) {
|
2954 | return function() {
|
2955 | return closure$block();
|
2956 | };
|
2957 | }
|
2958 | ConcurrentMap.prototype.locked_0 = function(block) {
|
2959 | var $receiver = this.lock_0;
|
2960 | var withLock$result;
|
2961 | try {
|
2962 | $receiver.lock();
|
2963 | withLock$result = ConcurrentMap$locked$lambda(block)();
|
2964 | } finally {
|
2965 | $receiver.unlock();
|
2966 | }
|
2967 | return withLock$result;
|
2968 | };
|
2969 | ConcurrentMap.$metadata$ = {
|
2970 | kind: Kind_CLASS,
|
2971 | simpleName: 'ConcurrentMap',
|
2972 | interfaces: [MutableMap]};
|
2973 | function ConcurrentMap_init(lock, map, $this) {
|
2974 | $this = $this || Object.create(ConcurrentMap.prototype);
|
2975 | ConcurrentMap.call($this, lock, map.size);
|
2976 | $this.putAll_a2k3zr$(map);
|
2977 | return $this;
|
2978 | }
|
2979 | function ConcurrentSet(lock, delegate) {
|
2980 | if (lock === void 0)
|
2981 | lock = new Lock();
|
2982 | if (delegate === void 0)
|
2983 | delegate = new ConcurrentMap(lock);
|
2984 | this.lock_0 = lock;
|
2985 | this.delegate_0 = delegate;
|
2986 | makeShared(this);
|
2987 | }
|
2988 | function ConcurrentSet$add$lambda(this$ConcurrentSet, closure$element) {
|
2989 | return function() {
|
2990 | var $receiver = this$ConcurrentSet.delegate_0;
|
2991 | var key = closure$element;
|
2992 | var tmp$;
|
2993 | var result = !(Kotlin.isType(tmp$ = $receiver, Map) ? tmp$ : throwCCE()).containsKey_11rb$(key);
|
2994 | var $receiver_0 = this$ConcurrentSet.delegate_0;
|
2995 | var key_0 = closure$element;
|
2996 | $receiver_0.put_xwzc9p$(key_0, Unit);
|
2997 | return result;
|
2998 | };
|
2999 | }
|
3000 | ConcurrentSet.prototype.add_11rb$ = function(element) {
|
3001 | var $receiver = this.lock_0;
|
3002 | var withLock$result;
|
3003 | try {
|
3004 | $receiver.lock();
|
3005 | withLock$result = ConcurrentSet$add$lambda(this, element)();
|
3006 | } finally {
|
3007 | $receiver.unlock();
|
3008 | }
|
3009 | return withLock$result;
|
3010 | };
|
3011 | ConcurrentSet.prototype.addAll_brywnq$ = function(elements) {
|
3012 | var tmp$;
|
3013 | var result = false;
|
3014 | tmp$ = elements.iterator();
|
3015 | while (tmp$.hasNext()) {
|
3016 | var item = tmp$.next();
|
3017 | result = this.add_11rb$(item) || result;
|
3018 | }
|
3019 | return result;
|
3020 | };
|
3021 | ConcurrentSet.prototype.clear = function() {
|
3022 | this.delegate_0.clear();
|
3023 | };
|
3024 | function ConcurrentSet$iterator$ObjectLiteral(this$ConcurrentSet) {
|
3025 | this.iterator = this$ConcurrentSet.delegate_0.iterator_8be2vx$();
|
3026 | }
|
3027 | ConcurrentSet$iterator$ObjectLiteral.prototype.hasNext = function() {
|
3028 | return this.iterator.hasNext();
|
3029 | };
|
3030 | ConcurrentSet$iterator$ObjectLiteral.prototype.next = function() {
|
3031 | return this.iterator.next().key;
|
3032 | };
|
3033 | ConcurrentSet$iterator$ObjectLiteral.prototype.remove = function() {
|
3034 | this.iterator.remove();
|
3035 | };
|
3036 | ConcurrentSet$iterator$ObjectLiteral.$metadata$ = {
|
3037 | kind: Kind_CLASS,
|
3038 | interfaces: [MutableIterator]};
|
3039 | ConcurrentSet.prototype.iterator = function() {
|
3040 | return new ConcurrentSet$iterator$ObjectLiteral(this);
|
3041 | };
|
3042 | ConcurrentSet.prototype.remove_11rb$ = function(element) {
|
3043 | return equals(this.delegate_0.remove_11rb$(element), Unit);
|
3044 | };
|
3045 | ConcurrentSet.prototype.removeAll_brywnq$ = function(elements) {
|
3046 | var all$result;
|
3047 | all$break:
|
3048 | do {
|
3049 | var tmp$;
|
3050 | if (Kotlin.isType(elements, Collection) && elements.isEmpty()) {
|
3051 | all$result = true;
|
3052 | break all$break;
|
3053 | }
|
3054 | tmp$ = elements.iterator();
|
3055 | while (tmp$.hasNext()) {
|
3056 | var element = tmp$.next();
|
3057 | if (!this.remove_11rb$(element)) {
|
3058 | all$result = false;
|
3059 | break all$break;
|
3060 | }
|
3061 | }
|
3062 | all$result = true;
|
3063 | } while (false);
|
3064 | return all$result;
|
3065 | };
|
3066 | ConcurrentSet.prototype.retainAll_brywnq$ = function(elements) {
|
3067 | var modified = {
|
3068 | v: false};
|
3069 | var $receiver = this.iterator();
|
3070 | while ($receiver.hasNext()) {
|
3071 | if (elements.contains_11rb$($receiver.next())) {
|
3072 | continue;
|
3073 | }
|
3074 | $receiver.remove();
|
3075 | modified.v = true;
|
3076 | }
|
3077 | return modified.v;
|
3078 | };
|
3079 | Object.defineProperty(ConcurrentSet.prototype, 'size', {
|
3080 | configurable: true,
|
3081 | get: function() {
|
3082 | return this.delegate_0.size;
|
3083 | }});
|
3084 | ConcurrentSet.prototype.contains_11rb$ = function(element) {
|
3085 | return this.delegate_0.containsKey_11rb$(element);
|
3086 | };
|
3087 | ConcurrentSet.prototype.containsAll_brywnq$ = function(elements) {
|
3088 | var all$result;
|
3089 | all$break:
|
3090 | do {
|
3091 | var tmp$;
|
3092 | if (Kotlin.isType(elements, Collection) && elements.isEmpty()) {
|
3093 | all$result = true;
|
3094 | break all$break;
|
3095 | }
|
3096 | tmp$ = elements.iterator();
|
3097 | while (tmp$.hasNext()) {
|
3098 | var element = tmp$.next();
|
3099 | var $receiver = this.delegate_0;
|
3100 | var tmp$_0;
|
3101 | if (!(Kotlin.isType(tmp$_0 = $receiver, Map) ? tmp$_0 : throwCCE()).containsKey_11rb$(element)) {
|
3102 | all$result = false;
|
3103 | break all$break;
|
3104 | }
|
3105 | }
|
3106 | all$result = true;
|
3107 | } while (false);
|
3108 | return all$result;
|
3109 | };
|
3110 | ConcurrentSet.prototype.isEmpty = function() {
|
3111 | return this.delegate_0.isEmpty();
|
3112 | };
|
3113 | function ConcurrentSet$toString$lambda(this$ConcurrentSet) {
|
3114 | return function() {
|
3115 | var $receiver = StringBuilder_init();
|
3116 | var this$ConcurrentSet_0 = this$ConcurrentSet;
|
3117 | $receiver.append_pdl1vj$('[');
|
3118 | var tmp$, tmp$_0;
|
3119 | var index = 0;
|
3120 | tmp$ = this$ConcurrentSet_0.iterator();
|
3121 | while (tmp$.hasNext()) {
|
3122 | var item = tmp$.next();
|
3123 | var index_0 = checkIndexOverflow((tmp$_0 = index , index = tmp$_0 + 1 | 0 , tmp$_0));
|
3124 | $receiver.append_pdl1vj$(item.toString());
|
3125 | if (index_0 !== (this$ConcurrentSet_0.size - 1 | 0)) {
|
3126 | $receiver.append_pdl1vj$(', ');
|
3127 | }
|
3128 | }
|
3129 | $receiver.append_pdl1vj$(']');
|
3130 | return $receiver.toString();
|
3131 | };
|
3132 | }
|
3133 | ConcurrentSet.prototype.toString = function() {
|
3134 | var $receiver = this.lock_0;
|
3135 | var withLock$result;
|
3136 | try {
|
3137 | $receiver.lock();
|
3138 | withLock$result = ConcurrentSet$toString$lambda(this)();
|
3139 | } finally {
|
3140 | $receiver.unlock();
|
3141 | }
|
3142 | return withLock$result;
|
3143 | };
|
3144 | function ConcurrentSet$equals$lambda(closure$other, this$ConcurrentSet) {
|
3145 | return function() {
|
3146 | var tmp$;
|
3147 | if (closure$other == null || !Kotlin.isType(closure$other, Set) || closure$other.size !== this$ConcurrentSet.size) {
|
3148 | return false;
|
3149 | }
|
3150 | tmp$ = this$ConcurrentSet.iterator();
|
3151 | while (tmp$.hasNext()) {
|
3152 | var item = tmp$.next();
|
3153 | if (!closure$other.contains_11rb$(item)) {
|
3154 | return false;
|
3155 | }
|
3156 | }
|
3157 | return true;
|
3158 | };
|
3159 | }
|
3160 | ConcurrentSet.prototype.equals = function(other) {
|
3161 | var $receiver = this.lock_0;
|
3162 | var withLock$result;
|
3163 | try {
|
3164 | $receiver.lock();
|
3165 | withLock$result = ConcurrentSet$equals$lambda(other, this)();
|
3166 | } finally {
|
3167 | $receiver.unlock();
|
3168 | }
|
3169 | return withLock$result;
|
3170 | };
|
3171 | function ConcurrentSet$hashCode$lambda(this$ConcurrentSet) {
|
3172 | return function() {
|
3173 | var result = {
|
3174 | v: 7};
|
3175 | var tmp$;
|
3176 | tmp$ = this$ConcurrentSet.iterator();
|
3177 | while (tmp$.hasNext()) {
|
3178 | var element = tmp$.next();
|
3179 | result.v = Hash_getInstance().combine_jiburq$([hashCode(element), result.v]);
|
3180 | }
|
3181 | return result.v;
|
3182 | };
|
3183 | }
|
3184 | ConcurrentSet.prototype.hashCode = function() {
|
3185 | var $receiver = this.lock_0;
|
3186 | var withLock$result;
|
3187 | try {
|
3188 | $receiver.lock();
|
3189 | withLock$result = ConcurrentSet$hashCode$lambda(this)();
|
3190 | } finally {
|
3191 | $receiver.unlock();
|
3192 | }
|
3193 | return withLock$result;
|
3194 | };
|
3195 | ConcurrentSet.$metadata$ = {
|
3196 | kind: Kind_CLASS,
|
3197 | simpleName: 'ConcurrentSet',
|
3198 | interfaces: [MutableSet]};
|
3199 | function ConcurrentListSlice(origin, fromIndex, toIndex) {
|
3200 | AbstractMutableList.call(this);
|
3201 | this.origin_0 = origin;
|
3202 | this.fromIndex_0 = fromIndex;
|
3203 | this.toIndex_0 = toIndex;
|
3204 | }
|
3205 | Object.defineProperty(ConcurrentListSlice.prototype, 'size', {
|
3206 | configurable: true,
|
3207 | get: function() {
|
3208 | var a = this.origin_0.size;
|
3209 | var b = this.toIndex_0 - this.fromIndex_0 | 0;
|
3210 | return Math_0.min(a, b);
|
3211 | }});
|
3212 | ConcurrentListSlice.prototype.get_za3lpa$ = function(index) {
|
3213 | return this.origin_0.get_za3lpa$(this.fromIndex_0 + index | 0);
|
3214 | };
|
3215 | ConcurrentListSlice.prototype.add_wxm5ur$ = function(index, element) {
|
3216 | throw IllegalStateException_init('Unsupported append in ConcurrentList slice'.toString());
|
3217 | };
|
3218 | ConcurrentListSlice.prototype.removeAt_za3lpa$ = function(index) {
|
3219 | throw IllegalStateException_init('Unsupported remove in ConcurrentList slice'.toString());
|
3220 | };
|
3221 | ConcurrentListSlice.prototype.set_wxm5ur$ = function(index, element) {
|
3222 | return this.origin_0.set_wxm5ur$(this.fromIndex_0 + index | 0, element);
|
3223 | };
|
3224 | ConcurrentListSlice.$metadata$ = {
|
3225 | kind: Kind_CLASS,
|
3226 | simpleName: 'ConcurrentListSlice',
|
3227 | interfaces: [AbstractMutableList]};
|
3228 | function ConcurrentMapKeys(delegate) {
|
3229 | this.delegate_0 = delegate;
|
3230 | makeShared(this);
|
3231 | }
|
3232 | ConcurrentMapKeys.prototype.add_11rb$ = function(element) {
|
3233 | throw UnsupportedOperationException_init_0();
|
3234 | };
|
3235 | ConcurrentMapKeys.prototype.addAll_brywnq$ = function(elements) {
|
3236 | throw UnsupportedOperationException_init_0();
|
3237 | };
|
3238 | ConcurrentMapKeys.prototype.clear = function() {
|
3239 | this.delegate_0.clear();
|
3240 | };
|
3241 | function ConcurrentMapKeys$iterator$ObjectLiteral(this$ConcurrentMapKeys) {
|
3242 | this.delegateIterator_0 = this$ConcurrentMapKeys.delegate_0.iterator_8be2vx$();
|
3243 | makeShared(this);
|
3244 | }
|
3245 | ConcurrentMapKeys$iterator$ObjectLiteral.prototype.hasNext = function() {
|
3246 | return this.delegateIterator_0.hasNext();
|
3247 | };
|
3248 | ConcurrentMapKeys$iterator$ObjectLiteral.prototype.next = function() {
|
3249 | return this.delegateIterator_0.next().key;
|
3250 | };
|
3251 | ConcurrentMapKeys$iterator$ObjectLiteral.prototype.remove = function() {
|
3252 | this.delegateIterator_0.remove();
|
3253 | };
|
3254 | ConcurrentMapKeys$iterator$ObjectLiteral.$metadata$ = {
|
3255 | kind: Kind_CLASS,
|
3256 | interfaces: [MutableIterator]};
|
3257 | ConcurrentMapKeys.prototype.iterator = function() {
|
3258 | return new ConcurrentMapKeys$iterator$ObjectLiteral(this);
|
3259 | };
|
3260 | ConcurrentMapKeys.prototype.remove_11rb$ = function(element) {
|
3261 | return this.delegate_0.remove_11rb$(element) != null;
|
3262 | };
|
3263 | ConcurrentMapKeys.prototype.removeAll_brywnq$ = function(elements) {
|
3264 | var modified = {
|
3265 | v: false};
|
3266 | var tmp$;
|
3267 | tmp$ = elements.iterator();
|
3268 | while (tmp$.hasNext()) {
|
3269 | var element = tmp$.next();
|
3270 | modified.v = this.remove_11rb$(element) || modified.v;
|
3271 | }
|
3272 | return modified.v;
|
3273 | };
|
3274 | ConcurrentMapKeys.prototype.retainAll_brywnq$ = function(elements) {
|
3275 | var modified = {
|
3276 | v: false};
|
3277 | var $receiver = this.iterator();
|
3278 | while ($receiver.hasNext()) {
|
3279 | if (elements.contains_11rb$($receiver.next())) {
|
3280 | continue;
|
3281 | }
|
3282 | modified.v = true;
|
3283 | $receiver.remove();
|
3284 | }
|
3285 | return modified.v;
|
3286 | };
|
3287 | Object.defineProperty(ConcurrentMapKeys.prototype, 'size', {
|
3288 | configurable: true,
|
3289 | get: function() {
|
3290 | return this.delegate_0.size;
|
3291 | }});
|
3292 | ConcurrentMapKeys.prototype.contains_11rb$ = function(element) {
|
3293 | var $receiver = this.delegate_0;
|
3294 | var tmp$;
|
3295 | return (Kotlin.isType(tmp$ = $receiver, Map) ? tmp$ : throwCCE()).containsKey_11rb$(element);
|
3296 | };
|
3297 | ConcurrentMapKeys.prototype.containsAll_brywnq$ = function(elements) {
|
3298 | var all$result;
|
3299 | all$break:
|
3300 | do {
|
3301 | var tmp$;
|
3302 | if (Kotlin.isType(elements, Collection) && elements.isEmpty()) {
|
3303 | all$result = true;
|
3304 | break all$break;
|
3305 | }
|
3306 | tmp$ = elements.iterator();
|
3307 | while (tmp$.hasNext()) {
|
3308 | var element = tmp$.next();
|
3309 | if (!this.contains_11rb$(element)) {
|
3310 | all$result = false;
|
3311 | break all$break;
|
3312 | }
|
3313 | }
|
3314 | all$result = true;
|
3315 | } while (false);
|
3316 | return all$result;
|
3317 | };
|
3318 | ConcurrentMapKeys.prototype.isEmpty = function() {
|
3319 | return this.size === 0;
|
3320 | };
|
3321 | ConcurrentMapKeys.$metadata$ = {
|
3322 | kind: Kind_CLASS,
|
3323 | simpleName: 'ConcurrentMapKeys',
|
3324 | interfaces: [MutableSet]};
|
3325 | function ConcurrentMapValues(delegate) {
|
3326 | this.delegate_0 = delegate;
|
3327 | makeShared(this);
|
3328 | }
|
3329 | Object.defineProperty(ConcurrentMapValues.prototype, 'size', {
|
3330 | configurable: true,
|
3331 | get: function() {
|
3332 | return this.delegate_0.size;
|
3333 | }});
|
3334 | ConcurrentMapValues.prototype.contains_11rb$ = function(element) {
|
3335 | return this.delegate_0.containsValue_11rc$(element);
|
3336 | };
|
3337 | ConcurrentMapValues.prototype.containsAll_brywnq$ = function(elements) {
|
3338 | var all$result;
|
3339 | all$break:
|
3340 | do {
|
3341 | var tmp$;
|
3342 | if (Kotlin.isType(elements, Collection) && elements.isEmpty()) {
|
3343 | all$result = true;
|
3344 | break all$break;
|
3345 | }
|
3346 | tmp$ = elements.iterator();
|
3347 | while (tmp$.hasNext()) {
|
3348 | var element = tmp$.next();
|
3349 | if (!this.contains_11rb$(element)) {
|
3350 | all$result = false;
|
3351 | break all$break;
|
3352 | }
|
3353 | }
|
3354 | all$result = true;
|
3355 | } while (false);
|
3356 | return all$result;
|
3357 | };
|
3358 | ConcurrentMapValues.prototype.isEmpty = function() {
|
3359 | return this.delegate_0.size === 0;
|
3360 | };
|
3361 | ConcurrentMapValues.prototype.add_11rb$ = function(element) {
|
3362 | throw UnsupportedOperationException_init_0();
|
3363 | };
|
3364 | ConcurrentMapValues.prototype.addAll_brywnq$ = function(elements) {
|
3365 | throw UnsupportedOperationException_init_0();
|
3366 | };
|
3367 | ConcurrentMapValues.prototype.clear = function() {
|
3368 | this.delegate_0.clear();
|
3369 | };
|
3370 | function ConcurrentMapValues$iterator$ObjectLiteral(this$ConcurrentMapValues) {
|
3371 | this.delegateIterator = this$ConcurrentMapValues.delegate_0.iterator_8be2vx$();
|
3372 | makeShared(this);
|
3373 | }
|
3374 | ConcurrentMapValues$iterator$ObjectLiteral.prototype.hasNext = function() {
|
3375 | return this.delegateIterator.hasNext();
|
3376 | };
|
3377 | ConcurrentMapValues$iterator$ObjectLiteral.prototype.next = function() {
|
3378 | return this.delegateIterator.next().value;
|
3379 | };
|
3380 | ConcurrentMapValues$iterator$ObjectLiteral.prototype.remove = function() {
|
3381 | this.delegateIterator.remove();
|
3382 | };
|
3383 | ConcurrentMapValues$iterator$ObjectLiteral.$metadata$ = {
|
3384 | kind: Kind_CLASS,
|
3385 | interfaces: [MutableIterator]};
|
3386 | ConcurrentMapValues.prototype.iterator = function() {
|
3387 | return new ConcurrentMapValues$iterator$ObjectLiteral(this);
|
3388 | };
|
3389 | ConcurrentMapValues.prototype.remove_11rb$ = function(element) {
|
3390 | var modified = {
|
3391 | v: false};
|
3392 | var $receiver = this.iterator();
|
3393 | while ($receiver.hasNext()) {
|
3394 | if (equals($receiver.next(), element)) {
|
3395 | continue;
|
3396 | }
|
3397 | modified.v = true;
|
3398 | $receiver.remove();
|
3399 | }
|
3400 | return modified.v;
|
3401 | };
|
3402 | ConcurrentMapValues.prototype.removeAll_brywnq$ = function(elements) {
|
3403 | var modified = {
|
3404 | v: false};
|
3405 | var $receiver = this.iterator();
|
3406 | while ($receiver.hasNext()) {
|
3407 | if (!elements.contains_11rb$($receiver.next())) {
|
3408 | continue;
|
3409 | }
|
3410 | modified.v = true;
|
3411 | $receiver.remove();
|
3412 | }
|
3413 | return modified.v;
|
3414 | };
|
3415 | ConcurrentMapValues.prototype.retainAll_brywnq$ = function(elements) {
|
3416 | throw IllegalStateException_init("Common concurrent map doesn't support this operation yet.".toString());
|
3417 | };
|
3418 | ConcurrentMapValues.$metadata$ = {
|
3419 | kind: Kind_CLASS,
|
3420 | simpleName: 'ConcurrentMapValues',
|
3421 | interfaces: [MutableCollection]};
|
3422 | function shared$ObjectLiteral_1(closure$value) {
|
3423 | this.value_0 = closure$value;
|
3424 | }
|
3425 | shared$ObjectLiteral_1.prototype.getValue_lrcp0p$ = function(thisRef, property) {
|
3426 | return this.value_0;
|
3427 | };
|
3428 | shared$ObjectLiteral_1.prototype.setValue_9rddgb$ = function(thisRef, property, value) {
|
3429 | this.value_0 = value;
|
3430 | };
|
3431 | shared$ObjectLiteral_1.$metadata$ = {
|
3432 | kind: Kind_CLASS,
|
3433 | interfaces: [ReadWriteProperty]};
|
3434 | function ForwardListIterator(head) {
|
3435 | this.previous_anlnpc$_0 = new shared$ObjectLiteral_1(head);
|
3436 | }
|
3437 | var ForwardListIterator$previous_metadata = new PropertyMetadata('previous');
|
3438 | Object.defineProperty(ForwardListIterator.prototype, 'previous', {
|
3439 | configurable: true,
|
3440 | get: function() {
|
3441 | return this.previous_anlnpc$_0.getValue_lrcp0p$(this, ForwardListIterator$previous_metadata);
|
3442 | },
|
3443 | set: function(previous) {
|
3444 | this.previous_anlnpc$_0.setValue_9rddgb$(this, ForwardListIterator$previous_metadata, previous);
|
3445 | }});
|
3446 | Object.defineProperty(ForwardListIterator.prototype, 'current', {
|
3447 | configurable: true,
|
3448 | get: function() {
|
3449 | var tmp$;
|
3450 | return (tmp$ = this.previous) != null ? tmp$.next : null;
|
3451 | }});
|
3452 | ForwardListIterator.prototype.hasNext = function() {
|
3453 | var tmp$;
|
3454 | return ((tmp$ = this.current) != null ? tmp$.item : null) != null;
|
3455 | };
|
3456 | ForwardListIterator.prototype.next = function() {
|
3457 | var tmp$, tmp$_0;
|
3458 | this.previous = this.current;
|
3459 | tmp$_0 = (tmp$ = this.previous) != null ? tmp$.item : null;
|
3460 | if (tmp$_0 == null) {
|
3461 | throw NoSuchElementException_init();
|
3462 | }
|
3463 | return tmp$_0;
|
3464 | };
|
3465 | ForwardListIterator.prototype.remove = function() {
|
3466 | var tmp$;
|
3467 | if (((tmp$ = this.previous) != null ? (tmp$.remove() , Unit) : null) == null) {
|
3468 | throw IllegalStateException_init('Fail to remove element before iteration'.toString());
|
3469 | }
|
3470 | };
|
3471 | ForwardListIterator.$metadata$ = {
|
3472 | kind: Kind_CLASS,
|
3473 | simpleName: 'ForwardListIterator',
|
3474 | interfaces: [MutableIterator]};
|
3475 | function shared$ObjectLiteral_2(closure$value) {
|
3476 | this.value_0 = closure$value;
|
3477 | }
|
3478 | shared$ObjectLiteral_2.prototype.getValue_lrcp0p$ = function(thisRef, property) {
|
3479 | return this.value_0;
|
3480 | };
|
3481 | shared$ObjectLiteral_2.prototype.setValue_9rddgb$ = function(thisRef, property, value) {
|
3482 | this.value_0 = value;
|
3483 | };
|
3484 | shared$ObjectLiteral_2.$metadata$ = {
|
3485 | kind: Kind_CLASS,
|
3486 | interfaces: [ReadWriteProperty]};
|
3487 | function ForwardListNode(list, next, item, previous) {
|
3488 | this.list_0 = list;
|
3489 | this.item = item;
|
3490 | this.next_lyuus8$_0 = new shared$ObjectLiteral_2(next);
|
3491 | this.previous_mhuox8$_0 = new shared$ObjectLiteral_2(previous);
|
3492 | makeShared(this);
|
3493 | }
|
3494 | var ForwardListNode$next_metadata = new PropertyMetadata('next');
|
3495 | Object.defineProperty(ForwardListNode.prototype, 'next', {
|
3496 | configurable: true,
|
3497 | get: function() {
|
3498 | return this.next_lyuus8$_0.getValue_lrcp0p$(this, ForwardListNode$next_metadata);
|
3499 | },
|
3500 | set: function(next) {
|
3501 | this.next_lyuus8$_0.setValue_9rddgb$(this, ForwardListNode$next_metadata, next);
|
3502 | }});
|
3503 | var ForwardListNode$previous_metadata = new PropertyMetadata('previous');
|
3504 | Object.defineProperty(ForwardListNode.prototype, 'previous', {
|
3505 | configurable: true,
|
3506 | get: function() {
|
3507 | return this.previous_mhuox8$_0.getValue_lrcp0p$(this, ForwardListNode$previous_metadata);
|
3508 | },
|
3509 | set: function(previous) {
|
3510 | this.previous_mhuox8$_0.setValue_9rddgb$(this, ForwardListNode$previous_metadata, previous);
|
3511 | }});
|
3512 | ForwardListNode.prototype.insertAfter_trkh7z$ = function(value) {
|
3513 | var result = new ForwardListNode(this.list_0, this.next, value, this);
|
3514 | this.next = result;
|
3515 | return result;
|
3516 | };
|
3517 | ForwardListNode.prototype.removeNext = function() {
|
3518 | var tmp$, tmp$_0;
|
3519 | if (equals(this.next, this.list_0.tail_8be2vx$)) {
|
3520 | this.list_0.tail_8be2vx$ = this;
|
3521 | }
|
3522 | this.next = (tmp$ = this.next) != null ? tmp$.next : null;
|
3523 | (tmp$_0 = this.next) != null ? (tmp$_0.previous = this) : null;
|
3524 | };
|
3525 | ForwardListNode.prototype.remove = function() {
|
3526 | ensureNotNull(this.previous).removeNext();
|
3527 | };
|
3528 | ForwardListNode.$metadata$ = {
|
3529 | kind: Kind_CLASS,
|
3530 | simpleName: 'ForwardListNode',
|
3531 | interfaces: []};
|
3532 | function shared$ObjectLiteral_3(closure$value) {
|
3533 | this.value_0 = closure$value;
|
3534 | }
|
3535 | shared$ObjectLiteral_3.prototype.getValue_lrcp0p$ = function(thisRef, property) {
|
3536 | return this.value_0;
|
3537 | };
|
3538 | shared$ObjectLiteral_3.prototype.setValue_9rddgb$ = function(thisRef, property, value) {
|
3539 | this.value_0 = value;
|
3540 | };
|
3541 | shared$ObjectLiteral_3.$metadata$ = {
|
3542 | kind: Kind_CLASS,
|
3543 | interfaces: [ReadWriteProperty]};
|
3544 | function MapNode(key, value) {
|
3545 | this.key_q49qr5$_0 = key;
|
3546 | this.backReference_8be2vx$_ku6rvk$_0 = new shared$ObjectLiteral_3(null);
|
3547 | this.value_v8fgin$_0 = new shared$ObjectLiteral_3(value);
|
3548 | var $receiver = this.key;
|
3549 | var tmp$;
|
3550 | this.hash = (tmp$ = $receiver != null ? hashCode($receiver) : null) != null ? tmp$ : 0;
|
3551 | makeShared(this);
|
3552 | }
|
3553 | Object.defineProperty(MapNode.prototype, 'key', {
|
3554 | get: function() {
|
3555 | return this.key_q49qr5$_0;
|
3556 | }});
|
3557 | var MapNode$backReference_metadata = new PropertyMetadata('backReference');
|
3558 | Object.defineProperty(MapNode.prototype, 'backReference_8be2vx$', {
|
3559 | configurable: true,
|
3560 | get: function() {
|
3561 | return this.backReference_8be2vx$_ku6rvk$_0.getValue_lrcp0p$(this, MapNode$backReference_metadata);
|
3562 | },
|
3563 | set: function(backReference) {
|
3564 | this.backReference_8be2vx$_ku6rvk$_0.setValue_9rddgb$(this, MapNode$backReference_metadata, backReference);
|
3565 | }});
|
3566 | var MapNode$value_metadata = new PropertyMetadata('value');
|
3567 | Object.defineProperty(MapNode.prototype, 'value', {
|
3568 | configurable: true,
|
3569 | get: function() {
|
3570 | return this.value_v8fgin$_0.getValue_lrcp0p$(this, MapNode$value_metadata);
|
3571 | },
|
3572 | set: function(value) {
|
3573 | this.value_v8fgin$_0.setValue_9rddgb$(this, MapNode$value_metadata, value);
|
3574 | }});
|
3575 | MapNode.prototype.setValue_11rc$ = function(newValue) {
|
3576 | var result = this.value;
|
3577 | this.value = newValue;
|
3578 | return result;
|
3579 | };
|
3580 | MapNode.prototype.remove_8be2vx$ = function() {
|
3581 | ensureNotNull(this.backReference_8be2vx$).remove();
|
3582 | this.backReference_8be2vx$ = null;
|
3583 | };
|
3584 | MapNode.prototype.toString = function() {
|
3585 | return 'MapItem[' + this.key + ', ' + this.value + ']';
|
3586 | };
|
3587 | MapNode.$metadata$ = {
|
3588 | kind: Kind_CLASS,
|
3589 | simpleName: 'MapNode',
|
3590 | interfaces: [MutableMap$MutableEntry]};
|
3591 | function MutableMapEntries(delegate) {
|
3592 | this.delegate_0 = delegate;
|
3593 | makeShared(this);
|
3594 | }
|
3595 | MutableMapEntries.prototype.add_11rb$ = function(element) {
|
3596 | return !equals(this.delegate_0.put_xwzc9p$(element.key, element.value), element.value);
|
3597 | };
|
3598 | MutableMapEntries.prototype.addAll_brywnq$ = function(elements) {
|
3599 | var result = {
|
3600 | v: false};
|
3601 | var tmp$;
|
3602 | tmp$ = elements.iterator();
|
3603 | while (tmp$.hasNext()) {
|
3604 | var element = tmp$.next();
|
3605 | result.v = this.add_11rb$(element) || result.v;
|
3606 | }
|
3607 | return result.v;
|
3608 | };
|
3609 | MutableMapEntries.prototype.clear = function() {
|
3610 | this.delegate_0.clear();
|
3611 | };
|
3612 | function MutableMapEntries$iterator$ObjectLiteral(this$MutableMapEntries) {
|
3613 | this.origin_0 = this$MutableMapEntries.delegate_0.iterator_8be2vx$();
|
3614 | }
|
3615 | MutableMapEntries$iterator$ObjectLiteral.prototype.hasNext = function() {
|
3616 | return this.origin_0.hasNext();
|
3617 | };
|
3618 | MutableMapEntries$iterator$ObjectLiteral.prototype.next = function() {
|
3619 | return this.origin_0.next();
|
3620 | };
|
3621 | MutableMapEntries$iterator$ObjectLiteral.prototype.remove = function() {
|
3622 | this.origin_0.remove();
|
3623 | };
|
3624 | MutableMapEntries$iterator$ObjectLiteral.$metadata$ = {
|
3625 | kind: Kind_CLASS,
|
3626 | interfaces: [MutableIterator]};
|
3627 | MutableMapEntries.prototype.iterator = function() {
|
3628 | return new MutableMapEntries$iterator$ObjectLiteral(this);
|
3629 | };
|
3630 | MutableMapEntries.prototype.remove_11rb$ = function(element) {
|
3631 | return this.delegate_0.remove_11rb$(element.key) != null;
|
3632 | };
|
3633 | MutableMapEntries.prototype.removeAll_brywnq$ = function(elements) {
|
3634 | var modified = {
|
3635 | v: false};
|
3636 | var tmp$;
|
3637 | tmp$ = elements.iterator();
|
3638 | while (tmp$.hasNext()) {
|
3639 | var element = tmp$.next();
|
3640 | modified.v = this.remove_11rb$(element) || modified.v;
|
3641 | }
|
3642 | return modified.v;
|
3643 | };
|
3644 | MutableMapEntries.prototype.retainAll_brywnq$ = function(elements) {
|
3645 | var modified = {
|
3646 | v: false};
|
3647 | var $receiver = this.iterator();
|
3648 | while ($receiver.hasNext()) {
|
3649 | if (elements.contains_11rb$($receiver.next())) {
|
3650 | continue;
|
3651 | }
|
3652 | modified.v = true;
|
3653 | $receiver.remove();
|
3654 | }
|
3655 | return modified.v;
|
3656 | };
|
3657 | Object.defineProperty(MutableMapEntries.prototype, 'size', {
|
3658 | configurable: true,
|
3659 | get: function() {
|
3660 | return this.delegate_0.size;
|
3661 | }});
|
3662 | MutableMapEntries.prototype.contains_11rb$ = function(element) {
|
3663 | return equals(this.delegate_0.get_11rb$(element.key), element.value);
|
3664 | };
|
3665 | MutableMapEntries.prototype.containsAll_brywnq$ = function(elements) {
|
3666 | var all$result;
|
3667 | all$break:
|
3668 | do {
|
3669 | var tmp$;
|
3670 | if (Kotlin.isType(elements, Collection) && elements.isEmpty()) {
|
3671 | all$result = true;
|
3672 | break all$break;
|
3673 | }
|
3674 | tmp$ = elements.iterator();
|
3675 | while (tmp$.hasNext()) {
|
3676 | var element = tmp$.next();
|
3677 | if (!this.contains_11rb$(element)) {
|
3678 | all$result = false;
|
3679 | break all$break;
|
3680 | }
|
3681 | }
|
3682 | all$result = true;
|
3683 | } while (false);
|
3684 | return all$result;
|
3685 | };
|
3686 | MutableMapEntries.prototype.isEmpty = function() {
|
3687 | return this.delegate_0.isEmpty();
|
3688 | };
|
3689 | MutableMapEntries.$metadata$ = {
|
3690 | kind: Kind_CLASS,
|
3691 | simpleName: 'MutableMapEntries',
|
3692 | interfaces: [MutableSet]};
|
3693 | function shared$ObjectLiteral_4(closure$value) {
|
3694 | this.value_0 = closure$value;
|
3695 | }
|
3696 | shared$ObjectLiteral_4.prototype.getValue_lrcp0p$ = function(thisRef, property) {
|
3697 | return this.value_0;
|
3698 | };
|
3699 | shared$ObjectLiteral_4.prototype.setValue_9rddgb$ = function(thisRef, property, value) {
|
3700 | this.value_0 = value;
|
3701 | };
|
3702 | shared$ObjectLiteral_4.$metadata$ = {
|
3703 | kind: Kind_CLASS,
|
3704 | interfaces: [ReadWriteProperty]};
|
3705 | function SharedForwardList() {
|
3706 | this.head_8be2vx$_7kv0go$_0 = new shared$ObjectLiteral_4(null);
|
3707 | this.tail_8be2vx$_w7xtpk$_0 = new shared$ObjectLiteral_4(this.head_8be2vx$);
|
3708 | makeShared(this);
|
3709 | this.head_8be2vx$ = new ForwardListNode(this, null, null, null);
|
3710 | this.tail_8be2vx$ = this.head_8be2vx$;
|
3711 | }
|
3712 | var SharedForwardList$head_metadata = new PropertyMetadata('head');
|
3713 | Object.defineProperty(SharedForwardList.prototype, 'head_8be2vx$', {
|
3714 | configurable: true,
|
3715 | get: function() {
|
3716 | return this.head_8be2vx$_7kv0go$_0.getValue_lrcp0p$(this, SharedForwardList$head_metadata);
|
3717 | },
|
3718 | set: function(head) {
|
3719 | this.head_8be2vx$_7kv0go$_0.setValue_9rddgb$(this, SharedForwardList$head_metadata, head);
|
3720 | }});
|
3721 | var SharedForwardList$tail_metadata = new PropertyMetadata('tail');
|
3722 | Object.defineProperty(SharedForwardList.prototype, 'tail_8be2vx$', {
|
3723 | configurable: true,
|
3724 | get: function() {
|
3725 | return this.tail_8be2vx$_w7xtpk$_0.getValue_lrcp0p$(this, SharedForwardList$tail_metadata);
|
3726 | },
|
3727 | set: function(tail) {
|
3728 | this.tail_8be2vx$_w7xtpk$_0.setValue_9rddgb$(this, SharedForwardList$tail_metadata, tail);
|
3729 | }});
|
3730 | SharedForwardList.prototype.first = function() {
|
3731 | return ensureNotNull(this.head_8be2vx$).next;
|
3732 | };
|
3733 | SharedForwardList.prototype.last = function() {
|
3734 | if (equals(this.head_8be2vx$, this.tail_8be2vx$)) {
|
3735 | return null;
|
3736 | }
|
3737 | return this.tail_8be2vx$;
|
3738 | };
|
3739 | SharedForwardList.prototype.appendFirst_trkh7z$ = function(value) {
|
3740 | var newValue = ensureNotNull(this.head_8be2vx$).insertAfter_trkh7z$(value);
|
3741 | if (equals(this.head_8be2vx$, this.tail_8be2vx$)) {
|
3742 | this.tail_8be2vx$ = newValue;
|
3743 | }
|
3744 | return newValue;
|
3745 | };
|
3746 | SharedForwardList.prototype.appendLast_trkh7z$ = function(value) {
|
3747 | this.tail_8be2vx$ = ensureNotNull(this.tail_8be2vx$).insertAfter_trkh7z$(value);
|
3748 | return ensureNotNull(this.tail_8be2vx$);
|
3749 | };
|
3750 | SharedForwardList.prototype.iterator = function() {
|
3751 | return new ForwardListIterator(ensureNotNull(this.head_8be2vx$));
|
3752 | };
|
3753 | SharedForwardList.$metadata$ = {
|
3754 | kind: Kind_CLASS,
|
3755 | simpleName: 'SharedForwardList',
|
3756 | interfaces: [MutableIterable]};
|
3757 | function SharedList(size) {
|
3758 | this.size_4if4fg$_0 = size;
|
3759 | this.data_0 = Array(this.size);
|
3760 | makeShared(this);
|
3761 | }
|
3762 | Object.defineProperty(SharedList.prototype, 'size', {
|
3763 | get: function() {
|
3764 | return this.size_4if4fg$_0;
|
3765 | }});
|
3766 | SharedList.prototype.set_wxm5ur$ = function(index, value) {
|
3767 | this.data_0[index] = value;
|
3768 | };
|
3769 | SharedList.prototype.contains_11rb$ = function(element) {
|
3770 | var tmp$;
|
3771 | tmp$ = this.size;
|
3772 | for (var index = 0; index < tmp$; index++) {
|
3773 | if (equals(this.data_0[index], element)) {
|
3774 | return true;
|
3775 | }
|
3776 | }
|
3777 | return false;
|
3778 | };
|
3779 | SharedList.prototype.containsAll_brywnq$ = function(elements) {
|
3780 | var all$result;
|
3781 | all$break:
|
3782 | do {
|
3783 | var tmp$;
|
3784 | if (Kotlin.isType(elements, Collection) && elements.isEmpty()) {
|
3785 | all$result = true;
|
3786 | break all$break;
|
3787 | }
|
3788 | tmp$ = elements.iterator();
|
3789 | while (tmp$.hasNext()) {
|
3790 | var element = tmp$.next();
|
3791 | if (!this.contains_11rb$(element)) {
|
3792 | all$result = false;
|
3793 | break all$break;
|
3794 | }
|
3795 | }
|
3796 | all$result = true;
|
3797 | } while (false);
|
3798 | return all$result;
|
3799 | };
|
3800 | SharedList.prototype.get_za3lpa$ = function(index) {
|
3801 | return this.data_0[index];
|
3802 | };
|
3803 | SharedList.prototype.indexOf_11rb$ = function(element) {
|
3804 | var tmp$;
|
3805 | tmp$ = this.size;
|
3806 | for (var index = 0; index < tmp$; index++) {
|
3807 | if (equals(this.data_0[index], element)) {
|
3808 | return index;
|
3809 | }
|
3810 | }
|
3811 | return -1;
|
3812 | };
|
3813 | SharedList.prototype.isEmpty = function() {
|
3814 | return this.size === 0;
|
3815 | };
|
3816 | SharedList.prototype.iterator = function() {
|
3817 | return this.listIterator_za3lpa$(0);
|
3818 | };
|
3819 | SharedList.prototype.lastIndexOf_11rb$ = function(element) {
|
3820 | return asReversed(this).indexOf_11rb$(element);
|
3821 | };
|
3822 | SharedList.prototype.listIterator = function() {
|
3823 | return this.listIterator_za3lpa$(0);
|
3824 | };
|
3825 | function SharedList$listIterator$ObjectLiteral(this$SharedList, closure$index) {
|
3826 | this.this$SharedList = this$SharedList;
|
3827 | this.currentIndex_0 = closure$index;
|
3828 | makeShared(this);
|
3829 | }
|
3830 | SharedList$listIterator$ObjectLiteral.prototype.hasNext = function() {
|
3831 | return this.currentIndex_0 < this.this$SharedList.size;
|
3832 | };
|
3833 | SharedList$listIterator$ObjectLiteral.prototype.hasPrevious = function() {
|
3834 | return this.currentIndex_0 > 0;
|
3835 | };
|
3836 | SharedList$listIterator$ObjectLiteral.prototype.next = function() {
|
3837 | if (!this.hasNext()) {
|
3838 | var message = 'Check failed.';
|
3839 | throw IllegalStateException_init(message.toString());
|
3840 | }
|
3841 | var current = (function(scope) {
|
3842 | return scope.currentIndex_0++;
|
3843 | })(this);
|
3844 | return this.this$SharedList.data_0[current];
|
3845 | };
|
3846 | SharedList$listIterator$ObjectLiteral.prototype.nextIndex = function() {
|
3847 | if (!this.hasNext()) {
|
3848 | var message = 'Check failed.';
|
3849 | throw IllegalStateException_init(message.toString());
|
3850 | }
|
3851 | return this.currentIndex_0 + 1 | 0;
|
3852 | };
|
3853 | SharedList$listIterator$ObjectLiteral.prototype.previous = function() {
|
3854 | if (!this.hasPrevious()) {
|
3855 | var message = 'Check failed.';
|
3856 | throw IllegalStateException_init(message.toString());
|
3857 | }
|
3858 | var current = (function(scope) {
|
3859 | return scope.currentIndex_0--;
|
3860 | })(this);
|
3861 | return this.this$SharedList.data_0[current];
|
3862 | };
|
3863 | SharedList$listIterator$ObjectLiteral.prototype.previousIndex = function() {
|
3864 | if (!this.hasPrevious()) {
|
3865 | var message = 'Check failed.';
|
3866 | throw IllegalStateException_init(message.toString());
|
3867 | }
|
3868 | return this.currentIndex_0 - 1 | 0;
|
3869 | };
|
3870 | SharedList$listIterator$ObjectLiteral.$metadata$ = {
|
3871 | kind: Kind_CLASS,
|
3872 | interfaces: [ListIterator]};
|
3873 | SharedList.prototype.listIterator_za3lpa$ = function(index) {
|
3874 | return new SharedList$listIterator$ObjectLiteral(this, index);
|
3875 | };
|
3876 | SharedList.prototype.subList_vux9f0$ = function(fromIndex, toIndex) {
|
3877 | var result = new SharedList(toIndex - fromIndex | 0);
|
3878 | for (var index = fromIndex; index < toIndex; index++) {
|
3879 | result.set_wxm5ur$(index - fromIndex | 0, this.data_0[index]);
|
3880 | }
|
3881 | return result;
|
3882 | };
|
3883 | SharedList.$metadata$ = {
|
3884 | kind: Kind_CLASS,
|
3885 | simpleName: 'SharedList',
|
3886 | interfaces: [List]};
|
3887 | function WeekDay(name, ordinal, value) {
|
3888 | Enum.call(this);
|
3889 | this.value = value;
|
3890 | this.name$ = name;
|
3891 | this.ordinal$ = ordinal;
|
3892 | }
|
3893 | function WeekDay_initFields() {
|
3894 | WeekDay_initFields = function() {
|
3895 | };
|
3896 | WeekDay$MONDAY_instance = new WeekDay('MONDAY', 0, 'Mon');
|
3897 | WeekDay$TUESDAY_instance = new WeekDay('TUESDAY', 1, 'Tue');
|
3898 | WeekDay$WEDNESDAY_instance = new WeekDay('WEDNESDAY', 2, 'Wed');
|
3899 | WeekDay$THURSDAY_instance = new WeekDay('THURSDAY', 3, 'Thu');
|
3900 | WeekDay$FRIDAY_instance = new WeekDay('FRIDAY', 4, 'Fri');
|
3901 | WeekDay$SATURDAY_instance = new WeekDay('SATURDAY', 5, 'Sat');
|
3902 | WeekDay$SUNDAY_instance = new WeekDay('SUNDAY', 6, 'Sun');
|
3903 | WeekDay$Companion_getInstance();
|
3904 | }
|
3905 | var WeekDay$MONDAY_instance;
|
3906 | function WeekDay$MONDAY_getInstance() {
|
3907 | WeekDay_initFields();
|
3908 | return WeekDay$MONDAY_instance;
|
3909 | }
|
3910 | var WeekDay$TUESDAY_instance;
|
3911 | function WeekDay$TUESDAY_getInstance() {
|
3912 | WeekDay_initFields();
|
3913 | return WeekDay$TUESDAY_instance;
|
3914 | }
|
3915 | var WeekDay$WEDNESDAY_instance;
|
3916 | function WeekDay$WEDNESDAY_getInstance() {
|
3917 | WeekDay_initFields();
|
3918 | return WeekDay$WEDNESDAY_instance;
|
3919 | }
|
3920 | var WeekDay$THURSDAY_instance;
|
3921 | function WeekDay$THURSDAY_getInstance() {
|
3922 | WeekDay_initFields();
|
3923 | return WeekDay$THURSDAY_instance;
|
3924 | }
|
3925 | var WeekDay$FRIDAY_instance;
|
3926 | function WeekDay$FRIDAY_getInstance() {
|
3927 | WeekDay_initFields();
|
3928 | return WeekDay$FRIDAY_instance;
|
3929 | }
|
3930 | var WeekDay$SATURDAY_instance;
|
3931 | function WeekDay$SATURDAY_getInstance() {
|
3932 | WeekDay_initFields();
|
3933 | return WeekDay$SATURDAY_instance;
|
3934 | }
|
3935 | var WeekDay$SUNDAY_instance;
|
3936 | function WeekDay$SUNDAY_getInstance() {
|
3937 | WeekDay_initFields();
|
3938 | return WeekDay$SUNDAY_instance;
|
3939 | }
|
3940 | function WeekDay$Companion() {
|
3941 | WeekDay$Companion_instance = this;
|
3942 | }
|
3943 | WeekDay$Companion.prototype.from_za3lpa$ = function(ordinal) {
|
3944 | return WeekDay$values()[ordinal];
|
3945 | };
|
3946 | WeekDay$Companion.prototype.from_61zpoe$ = function(value) {
|
3947 | var tmp$;
|
3948 | var tmp$_0;
|
3949 | var $receiver = WeekDay$values();
|
3950 | var firstOrNull$result;
|
3951 | firstOrNull$break:
|
3952 | do {
|
3953 | var tmp$_1;
|
3954 | for (tmp$_1 = 0; tmp$_1 !== $receiver.length; ++tmp$_1) {
|
3955 | var element = $receiver[tmp$_1];
|
3956 | if (equals(element.value, value)) {
|
3957 | firstOrNull$result = element;
|
3958 | break firstOrNull$break;
|
3959 | }
|
3960 | }
|
3961 | firstOrNull$result = null;
|
3962 | } while (false);
|
3963 | if ((tmp$ = firstOrNull$result) != null)
|
3964 | tmp$_0 = tmp$;
|
3965 | else {
|
3966 | throw IllegalStateException_init(('Invalid day of week: ' + value).toString());
|
3967 | }
|
3968 | return tmp$_0;
|
3969 | };
|
3970 | WeekDay$Companion.$metadata$ = {
|
3971 | kind: Kind_OBJECT,
|
3972 | simpleName: 'Companion',
|
3973 | interfaces: []};
|
3974 | var WeekDay$Companion_instance = null;
|
3975 | function WeekDay$Companion_getInstance() {
|
3976 | WeekDay_initFields();
|
3977 | if (WeekDay$Companion_instance === null) {
|
3978 | new WeekDay$Companion();
|
3979 | }
|
3980 | return WeekDay$Companion_instance;
|
3981 | }
|
3982 | WeekDay.$metadata$ = {
|
3983 | kind: Kind_CLASS,
|
3984 | simpleName: 'WeekDay',
|
3985 | interfaces: [Enum]};
|
3986 | function WeekDay$values() {
|
3987 | return [WeekDay$MONDAY_getInstance(), WeekDay$TUESDAY_getInstance(), WeekDay$WEDNESDAY_getInstance(), WeekDay$THURSDAY_getInstance(), WeekDay$FRIDAY_getInstance(), WeekDay$SATURDAY_getInstance(), WeekDay$SUNDAY_getInstance()];
|
3988 | }
|
3989 | WeekDay.values = WeekDay$values;
|
3990 | function WeekDay$valueOf(name) {
|
3991 | switch (name) {
|
3992 | case 'MONDAY':
|
3993 | return WeekDay$MONDAY_getInstance();
|
3994 | case 'TUESDAY':
|
3995 | return WeekDay$TUESDAY_getInstance();
|
3996 | case 'WEDNESDAY':
|
3997 | return WeekDay$WEDNESDAY_getInstance();
|
3998 | case 'THURSDAY':
|
3999 | return WeekDay$THURSDAY_getInstance();
|
4000 | case 'FRIDAY':
|
4001 | return WeekDay$FRIDAY_getInstance();
|
4002 | case 'SATURDAY':
|
4003 | return WeekDay$SATURDAY_getInstance();
|
4004 | case 'SUNDAY':
|
4005 | return WeekDay$SUNDAY_getInstance();
|
4006 | default:
|
4007 | throwISE('No enum constant io.ktor.util.date.WeekDay.' + name);
|
4008 | }
|
4009 | }
|
4010 | WeekDay.valueOf_61zpoe$ = WeekDay$valueOf;
|
4011 | function Month(name, ordinal, value) {
|
4012 | Enum.call(this);
|
4013 | this.value = value;
|
4014 | this.name$ = name;
|
4015 | this.ordinal$ = ordinal;
|
4016 | }
|
4017 | function Month_initFields() {
|
4018 | Month_initFields = function() {
|
4019 | };
|
4020 | Month$JANUARY_instance = new Month('JANUARY', 0, 'Jan');
|
4021 | Month$FEBRUARY_instance = new Month('FEBRUARY', 1, 'Feb');
|
4022 | Month$MARCH_instance = new Month('MARCH', 2, 'Mar');
|
4023 | Month$APRIL_instance = new Month('APRIL', 3, 'Apr');
|
4024 | Month$MAY_instance = new Month('MAY', 4, 'May');
|
4025 | Month$JUNE_instance = new Month('JUNE', 5, 'Jun');
|
4026 | Month$JULY_instance = new Month('JULY', 6, 'Jul');
|
4027 | Month$AUGUST_instance = new Month('AUGUST', 7, 'Aug');
|
4028 | Month$SEPTEMBER_instance = new Month('SEPTEMBER', 8, 'Sep');
|
4029 | Month$OCTOBER_instance = new Month('OCTOBER', 9, 'Oct');
|
4030 | Month$NOVEMBER_instance = new Month('NOVEMBER', 10, 'Nov');
|
4031 | Month$DECEMBER_instance = new Month('DECEMBER', 11, 'Dec');
|
4032 | Month$Companion_getInstance();
|
4033 | }
|
4034 | var Month$JANUARY_instance;
|
4035 | function Month$JANUARY_getInstance() {
|
4036 | Month_initFields();
|
4037 | return Month$JANUARY_instance;
|
4038 | }
|
4039 | var Month$FEBRUARY_instance;
|
4040 | function Month$FEBRUARY_getInstance() {
|
4041 | Month_initFields();
|
4042 | return Month$FEBRUARY_instance;
|
4043 | }
|
4044 | var Month$MARCH_instance;
|
4045 | function Month$MARCH_getInstance() {
|
4046 | Month_initFields();
|
4047 | return Month$MARCH_instance;
|
4048 | }
|
4049 | var Month$APRIL_instance;
|
4050 | function Month$APRIL_getInstance() {
|
4051 | Month_initFields();
|
4052 | return Month$APRIL_instance;
|
4053 | }
|
4054 | var Month$MAY_instance;
|
4055 | function Month$MAY_getInstance() {
|
4056 | Month_initFields();
|
4057 | return Month$MAY_instance;
|
4058 | }
|
4059 | var Month$JUNE_instance;
|
4060 | function Month$JUNE_getInstance() {
|
4061 | Month_initFields();
|
4062 | return Month$JUNE_instance;
|
4063 | }
|
4064 | var Month$JULY_instance;
|
4065 | function Month$JULY_getInstance() {
|
4066 | Month_initFields();
|
4067 | return Month$JULY_instance;
|
4068 | }
|
4069 | var Month$AUGUST_instance;
|
4070 | function Month$AUGUST_getInstance() {
|
4071 | Month_initFields();
|
4072 | return Month$AUGUST_instance;
|
4073 | }
|
4074 | var Month$SEPTEMBER_instance;
|
4075 | function Month$SEPTEMBER_getInstance() {
|
4076 | Month_initFields();
|
4077 | return Month$SEPTEMBER_instance;
|
4078 | }
|
4079 | var Month$OCTOBER_instance;
|
4080 | function Month$OCTOBER_getInstance() {
|
4081 | Month_initFields();
|
4082 | return Month$OCTOBER_instance;
|
4083 | }
|
4084 | var Month$NOVEMBER_instance;
|
4085 | function Month$NOVEMBER_getInstance() {
|
4086 | Month_initFields();
|
4087 | return Month$NOVEMBER_instance;
|
4088 | }
|
4089 | var Month$DECEMBER_instance;
|
4090 | function Month$DECEMBER_getInstance() {
|
4091 | Month_initFields();
|
4092 | return Month$DECEMBER_instance;
|
4093 | }
|
4094 | function Month$Companion() {
|
4095 | Month$Companion_instance = this;
|
4096 | }
|
4097 | Month$Companion.prototype.from_za3lpa$ = function(ordinal) {
|
4098 | return Month$values()[ordinal];
|
4099 | };
|
4100 | Month$Companion.prototype.from_61zpoe$ = function(value) {
|
4101 | var tmp$;
|
4102 | var tmp$_0;
|
4103 | var $receiver = Month$values();
|
4104 | var firstOrNull$result;
|
4105 | firstOrNull$break:
|
4106 | do {
|
4107 | var tmp$_1;
|
4108 | for (tmp$_1 = 0; tmp$_1 !== $receiver.length; ++tmp$_1) {
|
4109 | var element = $receiver[tmp$_1];
|
4110 | if (equals(element.value, value)) {
|
4111 | firstOrNull$result = element;
|
4112 | break firstOrNull$break;
|
4113 | }
|
4114 | }
|
4115 | firstOrNull$result = null;
|
4116 | } while (false);
|
4117 | if ((tmp$ = firstOrNull$result) != null)
|
4118 | tmp$_0 = tmp$;
|
4119 | else {
|
4120 | throw IllegalStateException_init(('Invalid month: ' + value).toString());
|
4121 | }
|
4122 | return tmp$_0;
|
4123 | };
|
4124 | Month$Companion.$metadata$ = {
|
4125 | kind: Kind_OBJECT,
|
4126 | simpleName: 'Companion',
|
4127 | interfaces: []};
|
4128 | var Month$Companion_instance = null;
|
4129 | function Month$Companion_getInstance() {
|
4130 | Month_initFields();
|
4131 | if (Month$Companion_instance === null) {
|
4132 | new Month$Companion();
|
4133 | }
|
4134 | return Month$Companion_instance;
|
4135 | }
|
4136 | Month.$metadata$ = {
|
4137 | kind: Kind_CLASS,
|
4138 | simpleName: 'Month',
|
4139 | interfaces: [Enum]};
|
4140 | function Month$values() {
|
4141 | return [Month$JANUARY_getInstance(), Month$FEBRUARY_getInstance(), Month$MARCH_getInstance(), Month$APRIL_getInstance(), Month$MAY_getInstance(), Month$JUNE_getInstance(), Month$JULY_getInstance(), Month$AUGUST_getInstance(), Month$SEPTEMBER_getInstance(), Month$OCTOBER_getInstance(), Month$NOVEMBER_getInstance(), Month$DECEMBER_getInstance()];
|
4142 | }
|
4143 | Month.values = Month$values;
|
4144 | function Month$valueOf(name) {
|
4145 | switch (name) {
|
4146 | case 'JANUARY':
|
4147 | return Month$JANUARY_getInstance();
|
4148 | case 'FEBRUARY':
|
4149 | return Month$FEBRUARY_getInstance();
|
4150 | case 'MARCH':
|
4151 | return Month$MARCH_getInstance();
|
4152 | case 'APRIL':
|
4153 | return Month$APRIL_getInstance();
|
4154 | case 'MAY':
|
4155 | return Month$MAY_getInstance();
|
4156 | case 'JUNE':
|
4157 | return Month$JUNE_getInstance();
|
4158 | case 'JULY':
|
4159 | return Month$JULY_getInstance();
|
4160 | case 'AUGUST':
|
4161 | return Month$AUGUST_getInstance();
|
4162 | case 'SEPTEMBER':
|
4163 | return Month$SEPTEMBER_getInstance();
|
4164 | case 'OCTOBER':
|
4165 | return Month$OCTOBER_getInstance();
|
4166 | case 'NOVEMBER':
|
4167 | return Month$NOVEMBER_getInstance();
|
4168 | case 'DECEMBER':
|
4169 | return Month$DECEMBER_getInstance();
|
4170 | default:
|
4171 | throwISE('No enum constant io.ktor.util.date.Month.' + name);
|
4172 | }
|
4173 | }
|
4174 | Month.valueOf_61zpoe$ = Month$valueOf;
|
4175 | function GMTDate(seconds, minutes, hours, dayOfWeek, dayOfMonth, dayOfYear, month, year, timestamp) {
|
4176 | GMTDate$Companion_getInstance();
|
4177 | this.seconds = seconds;
|
4178 | this.minutes = minutes;
|
4179 | this.hours = hours;
|
4180 | this.dayOfWeek = dayOfWeek;
|
4181 | this.dayOfMonth = dayOfMonth;
|
4182 | this.dayOfYear = dayOfYear;
|
4183 | this.month = month;
|
4184 | this.year = year;
|
4185 | this.timestamp = timestamp;
|
4186 | }
|
4187 | GMTDate.prototype.compareTo_11rb$ = function(other) {
|
4188 | return this.timestamp.compareTo_11rb$(other.timestamp);
|
4189 | };
|
4190 | function GMTDate$Companion() {
|
4191 | GMTDate$Companion_instance = this;
|
4192 | this.START = GMTDate_0(L0);
|
4193 | }
|
4194 | GMTDate$Companion.$metadata$ = {
|
4195 | kind: Kind_OBJECT,
|
4196 | simpleName: 'Companion',
|
4197 | interfaces: []};
|
4198 | var GMTDate$Companion_instance = null;
|
4199 | function GMTDate$Companion_getInstance() {
|
4200 | if (GMTDate$Companion_instance === null) {
|
4201 | new GMTDate$Companion();
|
4202 | }
|
4203 | return GMTDate$Companion_instance;
|
4204 | }
|
4205 | GMTDate.$metadata$ = {
|
4206 | kind: Kind_CLASS,
|
4207 | simpleName: 'GMTDate',
|
4208 | interfaces: [Comparable]};
|
4209 | GMTDate.prototype.component1 = function() {
|
4210 | return this.seconds;
|
4211 | };
|
4212 | GMTDate.prototype.component2 = function() {
|
4213 | return this.minutes;
|
4214 | };
|
4215 | GMTDate.prototype.component3 = function() {
|
4216 | return this.hours;
|
4217 | };
|
4218 | GMTDate.prototype.component4 = function() {
|
4219 | return this.dayOfWeek;
|
4220 | };
|
4221 | GMTDate.prototype.component5 = function() {
|
4222 | return this.dayOfMonth;
|
4223 | };
|
4224 | GMTDate.prototype.component6 = function() {
|
4225 | return this.dayOfYear;
|
4226 | };
|
4227 | GMTDate.prototype.component7 = function() {
|
4228 | return this.month;
|
4229 | };
|
4230 | GMTDate.prototype.component8 = function() {
|
4231 | return this.year;
|
4232 | };
|
4233 | GMTDate.prototype.component9 = function() {
|
4234 | return this.timestamp;
|
4235 | };
|
4236 | GMTDate.prototype.copy_j9f46j$ = function(seconds, minutes, hours, dayOfWeek, dayOfMonth, dayOfYear, month, year, timestamp) {
|
4237 | return new GMTDate(seconds === void 0 ? this.seconds : seconds, minutes === void 0 ? this.minutes : minutes, hours === void 0 ? this.hours : hours, dayOfWeek === void 0 ? this.dayOfWeek : dayOfWeek, dayOfMonth === void 0 ? this.dayOfMonth : dayOfMonth, dayOfYear === void 0 ? this.dayOfYear : dayOfYear, month === void 0 ? this.month : month, year === void 0 ? this.year : year, timestamp === void 0 ? this.timestamp : timestamp);
|
4238 | };
|
4239 | GMTDate.prototype.toString = function() {
|
4240 | return 'GMTDate(seconds=' + Kotlin.toString(this.seconds) + (', minutes=' + Kotlin.toString(this.minutes)) + (', hours=' + Kotlin.toString(this.hours)) + (', dayOfWeek=' + Kotlin.toString(this.dayOfWeek)) + (', dayOfMonth=' + Kotlin.toString(this.dayOfMonth)) + (', dayOfYear=' + Kotlin.toString(this.dayOfYear)) + (', month=' + Kotlin.toString(this.month)) + (', year=' + Kotlin.toString(this.year)) + (', timestamp=' + Kotlin.toString(this.timestamp)) + ')';
|
4241 | };
|
4242 | GMTDate.prototype.hashCode = function() {
|
4243 | var result = 0;
|
4244 | result = result * 31 + Kotlin.hashCode(this.seconds) | 0;
|
4245 | result = result * 31 + Kotlin.hashCode(this.minutes) | 0;
|
4246 | result = result * 31 + Kotlin.hashCode(this.hours) | 0;
|
4247 | result = result * 31 + Kotlin.hashCode(this.dayOfWeek) | 0;
|
4248 | result = result * 31 + Kotlin.hashCode(this.dayOfMonth) | 0;
|
4249 | result = result * 31 + Kotlin.hashCode(this.dayOfYear) | 0;
|
4250 | result = result * 31 + Kotlin.hashCode(this.month) | 0;
|
4251 | result = result * 31 + Kotlin.hashCode(this.year) | 0;
|
4252 | result = result * 31 + Kotlin.hashCode(this.timestamp) | 0;
|
4253 | return result;
|
4254 | };
|
4255 | GMTDate.prototype.equals = function(other) {
|
4256 | return this === other || (other !== null && (typeof other === 'object' && (Object.getPrototypeOf(this) === Object.getPrototypeOf(other) && (Kotlin.equals(this.seconds, other.seconds) && Kotlin.equals(this.minutes, other.minutes) && Kotlin.equals(this.hours, other.hours) && Kotlin.equals(this.dayOfWeek, other.dayOfWeek) && Kotlin.equals(this.dayOfMonth, other.dayOfMonth) && Kotlin.equals(this.dayOfYear, other.dayOfYear) && Kotlin.equals(this.month, other.month) && Kotlin.equals(this.year, other.year) && Kotlin.equals(this.timestamp, other.timestamp)))));
|
4257 | };
|
4258 | function plus($receiver, milliseconds) {
|
4259 | return GMTDate_0($receiver.timestamp.add(milliseconds));
|
4260 | }
|
4261 | function minus($receiver, milliseconds) {
|
4262 | return GMTDate_0($receiver.timestamp.subtract(milliseconds));
|
4263 | }
|
4264 | function truncateToSeconds($receiver) {
|
4265 | return GMTDate_1($receiver.seconds, $receiver.minutes, $receiver.hours, $receiver.dayOfMonth, $receiver.month, $receiver.year);
|
4266 | }
|
4267 | function GMTDateParser(pattern) {
|
4268 | GMTDateParser$Companion_getInstance();
|
4269 | this.pattern_0 = pattern;
|
4270 | if (!(this.pattern_0.length > 0)) {
|
4271 | var message = "Date parser pattern shouldn't be empty.";
|
4272 | throw IllegalStateException_init(message.toString());
|
4273 | }
|
4274 | }
|
4275 | GMTDateParser.prototype.parse_61zpoe$ = function(dateString) {
|
4276 | var builder = new GMTDateBuilder();
|
4277 | var start = 0;
|
4278 | var current = this.pattern_0.charCodeAt(start);
|
4279 | var chunkStart = 0;
|
4280 | var index = 1;
|
4281 | try {
|
4282 | while (index < this.pattern_0.length) {
|
4283 | if (this.pattern_0.charCodeAt(index) === current) {
|
4284 | index = index + 1 | 0;
|
4285 | continue;
|
4286 | }
|
4287 | var chunkEnd = chunkStart + index - start | 0;
|
4288 | var tmp$ = current;
|
4289 | var startIndex = chunkStart;
|
4290 | this.handleToken_0(builder, tmp$, dateString.substring(startIndex, chunkEnd));
|
4291 | chunkStart = chunkEnd;
|
4292 | start = index;
|
4293 | current = this.pattern_0.charCodeAt(index);
|
4294 | index = index + 1 | 0;
|
4295 | }
|
4296 | if (chunkStart < dateString.length) {
|
4297 | var tmp$_0 = current;
|
4298 | var startIndex_0 = chunkStart;
|
4299 | this.handleToken_0(builder, tmp$_0, dateString.substring(startIndex_0));
|
4300 | }
|
4301 | } catch (_) {
|
4302 | if (Kotlin.isType(_, Throwable)) {
|
4303 | throw new InvalidDateStringException(dateString, chunkStart, this.pattern_0);
|
4304 | } else
|
4305 | throw _;
|
4306 | }
|
4307 | return builder.build();
|
4308 | };
|
4309 | GMTDateParser.prototype.handleToken_0 = function($receiver, type, chunk) {
|
4310 | loop_label:
|
4311 | switch (type) {
|
4312 | case 115:
|
4313 | $receiver.seconds = toInt_0(chunk);
|
4314 | break loop_label;
|
4315 | case 109:
|
4316 | $receiver.minutes = toInt_0(chunk);
|
4317 | break loop_label;
|
4318 | case 104:
|
4319 | $receiver.hours = toInt_0(chunk);
|
4320 | break loop_label;
|
4321 | case 100:
|
4322 | $receiver.dayOfMonth = toInt_0(chunk);
|
4323 | break loop_label;
|
4324 | case 77:
|
4325 | $receiver.month = Month$Companion_getInstance().from_61zpoe$(chunk);
|
4326 | break loop_label;
|
4327 | case 89:
|
4328 | $receiver.year = toInt_0(chunk);
|
4329 | break loop_label;
|
4330 | case 122:
|
4331 | if (!equals(chunk, 'GMT')) {
|
4332 | var message = 'Check failed.';
|
4333 | throw IllegalStateException_init(message.toString());
|
4334 | }
|
4335 | break loop_label;
|
4336 | case 42:
|
4337 | break loop_label;
|
4338 | default:
|
4339 | var all$result;
|
4340 | all$break:
|
4341 | do {
|
4342 | var tmp$;
|
4343 | tmp$ = iterator(chunk);
|
4344 | while (tmp$.hasNext()) {
|
4345 | var element = unboxChar(tmp$.next());
|
4346 | if (!(unboxChar(toBoxedChar(element)) === type)) {
|
4347 | all$result = false;
|
4348 | break all$break;
|
4349 | }
|
4350 | }
|
4351 | all$result = true;
|
4352 | } while (false);
|
4353 | if (!all$result) {
|
4354 | var message_0 = 'Check failed.';
|
4355 | throw IllegalStateException_init(message_0.toString());
|
4356 | }
|
4357 | break loop_label;
|
4358 | }
|
4359 | };
|
4360 | function GMTDateParser$Companion() {
|
4361 | GMTDateParser$Companion_instance = this;
|
4362 | this.SECONDS = toBoxedChar(115);
|
4363 | this.MINUTES = toBoxedChar(109);
|
4364 | this.HOURS = toBoxedChar(104);
|
4365 | this.DAY_OF_MONTH = toBoxedChar(100);
|
4366 | this.MONTH = toBoxedChar(77);
|
4367 | this.YEAR = toBoxedChar(89);
|
4368 | this.ZONE = toBoxedChar(122);
|
4369 | this.ANY = toBoxedChar(42);
|
4370 | }
|
4371 | GMTDateParser$Companion.$metadata$ = {
|
4372 | kind: Kind_OBJECT,
|
4373 | simpleName: 'Companion',
|
4374 | interfaces: []};
|
4375 | var GMTDateParser$Companion_instance = null;
|
4376 | function GMTDateParser$Companion_getInstance() {
|
4377 | if (GMTDateParser$Companion_instance === null) {
|
4378 | new GMTDateParser$Companion();
|
4379 | }
|
4380 | return GMTDateParser$Companion_instance;
|
4381 | }
|
4382 | GMTDateParser.$metadata$ = {
|
4383 | kind: Kind_CLASS,
|
4384 | simpleName: 'GMTDateParser',
|
4385 | interfaces: []};
|
4386 | function GMTDateBuilder() {
|
4387 | this.seconds = null;
|
4388 | this.minutes = null;
|
4389 | this.hours = null;
|
4390 | this.dayOfMonth = null;
|
4391 | this.month_i1app7$_0 = this.month_i1app7$_0;
|
4392 | this.year = null;
|
4393 | }
|
4394 | Object.defineProperty(GMTDateBuilder.prototype, 'month', {
|
4395 | configurable: true,
|
4396 | get: function() {
|
4397 | if (this.month_i1app7$_0 == null)
|
4398 | return throwUPAE('month');
|
4399 | return this.month_i1app7$_0;
|
4400 | },
|
4401 | set: function(month) {
|
4402 | this.month_i1app7$_0 = month;
|
4403 | }});
|
4404 | GMTDateBuilder.prototype.build = function() {
|
4405 | return GMTDate_1(ensureNotNull(this.seconds), ensureNotNull(this.minutes), ensureNotNull(this.hours), ensureNotNull(this.dayOfMonth), this.month, ensureNotNull(this.year));
|
4406 | };
|
4407 | GMTDateBuilder.$metadata$ = {
|
4408 | kind: Kind_CLASS,
|
4409 | simpleName: 'GMTDateBuilder',
|
4410 | interfaces: []};
|
4411 | function InvalidDateStringException(data, at, pattern) {
|
4412 | IllegalStateException_init('Failed to parse date string: ' + '"' + data + '"' + ' at index ' + at + '. Pattern: ' + '"' + pattern + '"', this);
|
4413 | this.name = 'InvalidDateStringException';
|
4414 | }
|
4415 | InvalidDateStringException.$metadata$ = {
|
4416 | kind: Kind_CLASS,
|
4417 | simpleName: 'InvalidDateStringException',
|
4418 | interfaces: [IllegalStateException]};
|
4419 | function ContextDsl() {
|
4420 | }
|
4421 | ContextDsl.$metadata$ = {
|
4422 | kind: Kind_CLASS,
|
4423 | simpleName: 'ContextDsl',
|
4424 | interfaces: [Annotation]};
|
4425 | function shared$ObjectLiteral_5(closure$value) {
|
4426 | this.value_0 = closure$value;
|
4427 | }
|
4428 | shared$ObjectLiteral_5.prototype.getValue_lrcp0p$ = function(thisRef, property) {
|
4429 | return this.value_0;
|
4430 | };
|
4431 | shared$ObjectLiteral_5.prototype.setValue_9rddgb$ = function(thisRef, property, value) {
|
4432 | this.value_0 = value;
|
4433 | };
|
4434 | shared$ObjectLiteral_5.$metadata$ = {
|
4435 | kind: Kind_CLASS,
|
4436 | interfaces: [ReadWriteProperty]};
|
4437 | function PhaseContent(phase, relation, interceptors) {
|
4438 | PhaseContent$Companion_getInstance();
|
4439 | this.phase = phase;
|
4440 | this.relation = relation;
|
4441 | this.interceptors_7b9p4m$_0 = new shared$ObjectLiteral_5(interceptors);
|
4442 | this.shared_t2yicf$_0 = new shared$ObjectLiteral_5(true);
|
4443 | }
|
4444 | var PhaseContent$interceptors_metadata = new PropertyMetadata('interceptors');
|
4445 | Object.defineProperty(PhaseContent.prototype, 'interceptors_0', {
|
4446 | configurable: true,
|
4447 | get: function() {
|
4448 | return this.interceptors_7b9p4m$_0.getValue_lrcp0p$(this, PhaseContent$interceptors_metadata);
|
4449 | },
|
4450 | set: function(interceptors) {
|
4451 | this.interceptors_7b9p4m$_0.setValue_9rddgb$(this, PhaseContent$interceptors_metadata, interceptors);
|
4452 | }});
|
4453 | var PhaseContent$shared_metadata = new PropertyMetadata('shared');
|
4454 | Object.defineProperty(PhaseContent.prototype, 'shared', {
|
4455 | configurable: true,
|
4456 | get: function() {
|
4457 | return this.shared_t2yicf$_0.getValue_lrcp0p$(this, PhaseContent$shared_metadata);
|
4458 | },
|
4459 | set: function(shared) {
|
4460 | this.shared_t2yicf$_0.setValue_9rddgb$(this, PhaseContent$shared_metadata, shared);
|
4461 | }});
|
4462 | Object.defineProperty(PhaseContent.prototype, 'isEmpty', {
|
4463 | configurable: true,
|
4464 | get: function() {
|
4465 | return this.interceptors_0.isEmpty();
|
4466 | }});
|
4467 | Object.defineProperty(PhaseContent.prototype, 'size', {
|
4468 | configurable: true,
|
4469 | get: function() {
|
4470 | return this.interceptors_0.size;
|
4471 | }});
|
4472 | PhaseContent.prototype.addInterceptor_mx8w25$ = function(interceptor) {
|
4473 | if (this.shared) {
|
4474 | this.copyInterceptors_0();
|
4475 | }
|
4476 | this.interceptors_0.add_11rb$(interceptor);
|
4477 | };
|
4478 | PhaseContent.prototype.addTo_m9oilt$ = function(destination) {
|
4479 | var tmp$;
|
4480 | var interceptors = this.interceptors_0;
|
4481 | if (Kotlin.isType(destination, ArrayList)) {
|
4482 | destination.ensureCapacity_za3lpa$(destination.size + interceptors.size | 0);
|
4483 | }
|
4484 | tmp$ = interceptors.size;
|
4485 | for (var index = 0; index < tmp$; index++) {
|
4486 | destination.add_11rb$(interceptors.get_za3lpa$(index));
|
4487 | }
|
4488 | };
|
4489 | PhaseContent.prototype.addTo_659igw$ = function(destination) {
|
4490 | if (this.isEmpty)
|
4491 | return;
|
4492 | if (destination.isEmpty) {
|
4493 | destination.interceptors_0 = this.sharedInterceptors();
|
4494 | destination.shared = true;
|
4495 | return;
|
4496 | }
|
4497 | if (destination.shared) {
|
4498 | destination.copyInterceptors_0();
|
4499 | }
|
4500 | this.addTo_m9oilt$(destination.interceptors_0);
|
4501 | };
|
4502 | PhaseContent.prototype.sharedInterceptors = function() {
|
4503 | this.shared = true;
|
4504 | return this.interceptors_0;
|
4505 | };
|
4506 | PhaseContent.prototype.copiedInterceptors = function() {
|
4507 | var $receiver = sharedListOf([]);
|
4508 | $receiver.addAll_brywnq$(this.interceptors_0);
|
4509 | return $receiver;
|
4510 | };
|
4511 | PhaseContent.prototype.toString = function() {
|
4512 | return 'Phase `' + this.phase.name + '`, ' + this.size + ' handlers';
|
4513 | };
|
4514 | PhaseContent.prototype.copyInterceptors_0 = function() {
|
4515 | this.interceptors_0 = this.copiedInterceptors();
|
4516 | this.shared = false;
|
4517 | };
|
4518 | function PhaseContent$Companion() {
|
4519 | PhaseContent$Companion_instance = this;
|
4520 | this.SharedArrayList = sharedListOf([]);
|
4521 | }
|
4522 | PhaseContent$Companion.$metadata$ = {
|
4523 | kind: Kind_OBJECT,
|
4524 | simpleName: 'Companion',
|
4525 | interfaces: []};
|
4526 | var PhaseContent$Companion_instance = null;
|
4527 | function PhaseContent$Companion_getInstance() {
|
4528 | if (PhaseContent$Companion_instance === null) {
|
4529 | new PhaseContent$Companion();
|
4530 | }
|
4531 | return PhaseContent$Companion_instance;
|
4532 | }
|
4533 | PhaseContent.$metadata$ = {
|
4534 | kind: Kind_CLASS,
|
4535 | simpleName: 'PhaseContent',
|
4536 | interfaces: []};
|
4537 | function PhaseContent_init(phase, relation, $this) {
|
4538 | $this = $this || Object.create(PhaseContent.prototype);
|
4539 | var tmp$;
|
4540 | PhaseContent.call($this, phase, relation, Kotlin.isType(tmp$ = PhaseContent$Companion_getInstance().SharedArrayList, MutableList) ? tmp$ : throwCCE());
|
4541 | if (!PhaseContent$Companion_getInstance().SharedArrayList.isEmpty()) {
|
4542 | var message = 'The shared empty array list has been modified';
|
4543 | throw IllegalStateException_init(message.toString());
|
4544 | }
|
4545 | return $this;
|
4546 | }
|
4547 | function shared$ObjectLiteral_6(closure$value) {
|
4548 | this.value_0 = closure$value;
|
4549 | }
|
4550 | shared$ObjectLiteral_6.prototype.getValue_lrcp0p$ = function(thisRef, property) {
|
4551 | return this.value_0;
|
4552 | };
|
4553 | shared$ObjectLiteral_6.prototype.setValue_9rddgb$ = function(thisRef, property, value) {
|
4554 | this.value_0 = value;
|
4555 | };
|
4556 | shared$ObjectLiteral_6.$metadata$ = {
|
4557 | kind: Kind_CLASS,
|
4558 | interfaces: [ReadWriteProperty]};
|
4559 | function Pipeline(phases) {
|
4560 | this.attributes = Attributes_0(true);
|
4561 | this.phasesRaw_hnbfpg$_0 = sharedListOf(phases.slice());
|
4562 | this.interceptorsQuantity_zh48jz$_d17244$_0 = new shared$ObjectLiteral_6(0);
|
4563 | this._interceptors_8zww1r$_0 = null;
|
4564 | this.interceptorsListShared_q9lih5$_jb8sx0$_0 = new shared$ObjectLiteral_6(false);
|
4565 | this.interceptorsListSharedPhase_9t9y1q$_5x4v0o$_0 = new shared$ObjectLiteral_6(null);
|
4566 | makeShared(this);
|
4567 | }
|
4568 | var Pipeline$interceptorsQuantity_metadata = new PropertyMetadata('interceptorsQuantity');
|
4569 | Object.defineProperty(Pipeline.prototype, 'interceptorsQuantity_zh48jz$_0', {
|
4570 | configurable: true,
|
4571 | get: function() {
|
4572 | return this.interceptorsQuantity_zh48jz$_d17244$_0.getValue_lrcp0p$(this, Pipeline$interceptorsQuantity_metadata);
|
4573 | },
|
4574 | set: function(interceptorsQuantity) {
|
4575 | this.interceptorsQuantity_zh48jz$_d17244$_0.setValue_9rddgb$(this, Pipeline$interceptorsQuantity_metadata, interceptorsQuantity);
|
4576 | }});
|
4577 | Object.defineProperty(Pipeline.prototype, 'items', {
|
4578 | configurable: true,
|
4579 | get: function() {
|
4580 | var $receiver = this.phasesRaw_hnbfpg$_0;
|
4581 | var destination = ArrayList_init(collectionSizeOrDefault($receiver, 10));
|
4582 | var tmp$;
|
4583 | tmp$ = $receiver.iterator();
|
4584 | while (tmp$.hasNext()) {
|
4585 | var item = tmp$.next();
|
4586 | var tmp$_0, tmp$_1, tmp$_2, tmp$_3;
|
4587 | destination.add_11rb$((tmp$_3 = Kotlin.isType(tmp$_0 = item, PipelinePhase) ? tmp$_0 : null) != null ? tmp$_3 : ensureNotNull((tmp$_2 = Kotlin.isType(tmp$_1 = item, PhaseContent) ? tmp$_1 : null) != null ? tmp$_2.phase : null));
|
4588 | }
|
4589 | return destination;
|
4590 | }});
|
4591 | Object.defineProperty(Pipeline.prototype, 'isEmpty', {
|
4592 | configurable: true,
|
4593 | get: function() {
|
4594 | return this.interceptorsQuantity_zh48jz$_0 === 0;
|
4595 | }});
|
4596 | Object.defineProperty(Pipeline.prototype, 'interceptors_dzu4x2$_0', {
|
4597 | configurable: true,
|
4598 | get: function() {
|
4599 | return this._interceptors_8zww1r$_0;
|
4600 | },
|
4601 | set: function(value) {
|
4602 | this._interceptors_8zww1r$_0 = value;
|
4603 | }});
|
4604 | var Pipeline$interceptorsListShared_metadata = new PropertyMetadata('interceptorsListShared');
|
4605 | Object.defineProperty(Pipeline.prototype, 'interceptorsListShared_q9lih5$_0', {
|
4606 | configurable: true,
|
4607 | get: function() {
|
4608 | return this.interceptorsListShared_q9lih5$_jb8sx0$_0.getValue_lrcp0p$(this, Pipeline$interceptorsListShared_metadata);
|
4609 | },
|
4610 | set: function(interceptorsListShared) {
|
4611 | this.interceptorsListShared_q9lih5$_jb8sx0$_0.setValue_9rddgb$(this, Pipeline$interceptorsListShared_metadata, interceptorsListShared);
|
4612 | }});
|
4613 | var Pipeline$interceptorsListSharedPhase_metadata = new PropertyMetadata('interceptorsListSharedPhase');
|
4614 | Object.defineProperty(Pipeline.prototype, 'interceptorsListSharedPhase_9t9y1q$_0', {
|
4615 | configurable: true,
|
4616 | get: function() {
|
4617 | return this.interceptorsListSharedPhase_9t9y1q$_5x4v0o$_0.getValue_lrcp0p$(this, Pipeline$interceptorsListSharedPhase_metadata);
|
4618 | },
|
4619 | set: function(interceptorsListSharedPhase) {
|
4620 | this.interceptorsListSharedPhase_9t9y1q$_5x4v0o$_0.setValue_9rddgb$(this, Pipeline$interceptorsListSharedPhase_metadata, interceptorsListSharedPhase);
|
4621 | }});
|
4622 | Pipeline.prototype.execute_8pmvt0$ = function(context, subject, continuation) {
|
4623 | return this.createContext_arhz8r$_0(context, subject).execute_11rb$(subject, continuation);
|
4624 | };
|
4625 | Pipeline.prototype.addPhase_cwbx9d$ = function(phase) {
|
4626 | if (this.hasPhase_ee29uw$_0(phase)) {
|
4627 | return;
|
4628 | }
|
4629 | this.phasesRaw_hnbfpg$_0.add_11rb$(phase);
|
4630 | };
|
4631 | Pipeline.prototype.insertPhaseAfter_b9zzbm$ = function(reference, phase) {
|
4632 | if (this.hasPhase_ee29uw$_0(phase))
|
4633 | return;
|
4634 | var index = this.findPhaseIndex_e6azsp$_0(reference);
|
4635 | if (index === -1) {
|
4636 | throw new InvalidPhaseException('Phase ' + reference + ' was not registered for this pipeline');
|
4637 | }
|
4638 | this.phasesRaw_hnbfpg$_0.add_wxm5ur$(index + 1 | 0, PhaseContent_init(phase, new PipelinePhaseRelation$After(reference)));
|
4639 | };
|
4640 | Pipeline.prototype.insertPhaseBefore_b9zzbm$ = function(reference, phase) {
|
4641 | if (this.hasPhase_ee29uw$_0(phase))
|
4642 | return;
|
4643 | var index = this.findPhaseIndex_e6azsp$_0(reference);
|
4644 | if (index === -1) {
|
4645 | throw new InvalidPhaseException('Phase ' + reference + ' was not registered for this pipeline');
|
4646 | }
|
4647 | this.phasesRaw_hnbfpg$_0.add_wxm5ur$(index, PhaseContent_init(phase, new PipelinePhaseRelation$Before(reference)));
|
4648 | };
|
4649 | Pipeline.prototype.intercept_h71y74$ = function(phase, block) {
|
4650 | var tmp$;
|
4651 | tmp$ = this.findPhase_ckbt4l$_0(phase);
|
4652 | if (tmp$ == null) {
|
4653 | throw new InvalidPhaseException('Phase ' + phase + ' was not registered for this pipeline');
|
4654 | }
|
4655 | var phaseContent = tmp$;
|
4656 | if (this.tryAddToPhaseFastPath_8roaa7$_0(phase, block)) {
|
4657 | this.interceptorsQuantity_zh48jz$_0 = this.interceptorsQuantity_zh48jz$_0 + 1 | 0;
|
4658 | return;
|
4659 | }
|
4660 | phaseContent.addInterceptor_mx8w25$(block);
|
4661 | this.interceptorsQuantity_zh48jz$_0 = this.interceptorsQuantity_zh48jz$_0 + 1 | 0;
|
4662 | this.resetInterceptorsList_f35ip$_0();
|
4663 | this.afterIntercepted();
|
4664 | };
|
4665 | Pipeline.prototype.afterIntercepted = function() {
|
4666 | };
|
4667 | Pipeline.prototype.merge_p814o4$ = function(from) {
|
4668 | var tmp$, tmp$_0, tmp$_1, tmp$_2, tmp$_3, tmp$_4, tmp$_5;
|
4669 | if (this.fastPathMerge_p3ex3$_0(from)) {
|
4670 | return;
|
4671 | }
|
4672 | if (this.interceptorsQuantity_zh48jz$_0 === 0) {
|
4673 | this.setInterceptorsListFromAnotherPipeline_5wxuo1$_0(from);
|
4674 | } else {
|
4675 | this.resetInterceptorsList_f35ip$_0();
|
4676 | }
|
4677 | var fromPhases = from.phasesRaw_hnbfpg$_0;
|
4678 | tmp$ = get_lastIndex_0(fromPhases);
|
4679 | for (var index = 0; index <= tmp$; index++) {
|
4680 | var fromPhaseOrContent = fromPhases.get_za3lpa$(index);
|
4681 | var fromPhase = (tmp$_2 = Kotlin.isType(tmp$_0 = fromPhaseOrContent, PipelinePhase) ? tmp$_0 : null) != null ? tmp$_2 : (Kotlin.isType(tmp$_1 = fromPhaseOrContent, PhaseContent) ? tmp$_1 : throwCCE()).phase;
|
4682 | if (!this.hasPhase_ee29uw$_0(fromPhase)) {
|
4683 | if (fromPhaseOrContent === fromPhase)
|
4684 | tmp$_4 = PipelinePhaseRelation$Last_getInstance();
|
4685 | else
|
4686 | tmp$_4 = (Kotlin.isType(tmp$_3 = fromPhaseOrContent, PhaseContent) ? tmp$_3 : throwCCE()).relation;
|
4687 | var fromPhaseRelation = tmp$_4;
|
4688 | if (Kotlin.isType(fromPhaseRelation, PipelinePhaseRelation$Last))
|
4689 | this.addPhase_cwbx9d$(fromPhase);
|
4690 | else if (Kotlin.isType(fromPhaseRelation, PipelinePhaseRelation$Before))
|
4691 | this.insertPhaseBefore_b9zzbm$(fromPhaseRelation.relativeTo, fromPhase);
|
4692 | else if (Kotlin.isType(fromPhaseRelation, PipelinePhaseRelation$After))
|
4693 | this.insertPhaseAfter_b9zzbm$(fromPhaseRelation.relativeTo, fromPhase);
|
4694 | }
|
4695 | if (Kotlin.isType(fromPhaseOrContent, PhaseContent) && !fromPhaseOrContent.isEmpty) {
|
4696 | Kotlin.isType(tmp$_5 = fromPhaseOrContent, PhaseContent) ? tmp$_5 : throwCCE();
|
4697 | fromPhaseOrContent.addTo_659igw$(ensureNotNull(this.findPhase_ckbt4l$_0(fromPhase)));
|
4698 | this.interceptorsQuantity_zh48jz$_0 = this.interceptorsQuantity_zh48jz$_0 + fromPhaseOrContent.size | 0;
|
4699 | }
|
4700 | }
|
4701 | };
|
4702 | Pipeline.prototype.phaseInterceptors_fv4x26$ = function(phase) {
|
4703 | var tmp$, tmp$_0;
|
4704 | return (tmp$_0 = (tmp$ = this.findPhase_ckbt4l$_0(phase)) != null ? tmp$.sharedInterceptors() : null) != null ? tmp$_0 : emptyList();
|
4705 | };
|
4706 | Pipeline.prototype.interceptorsForTests_8be2vx$ = function() {
|
4707 | var tmp$;
|
4708 | return (tmp$ = this.interceptors_dzu4x2$_0) != null ? tmp$ : this.cacheInterceptors_dmwwd8$_0();
|
4709 | };
|
4710 | Pipeline.prototype.createContext_arhz8r$_0 = function(context, subject) {
|
4711 | return pipelineExecutorFor(context, this.sharedInterceptorsList_8aep55$_0(), subject);
|
4712 | };
|
4713 | Pipeline.prototype.findPhase_ckbt4l$_0 = function(phase) {
|
4714 | var tmp$, tmp$_0;
|
4715 | var phasesList = this.phasesRaw_hnbfpg$_0;
|
4716 | tmp$ = phasesList.size;
|
4717 | for (var index = 0; index < tmp$; index++) {
|
4718 | var current = phasesList.get_za3lpa$(index);
|
4719 | if (current === phase) {
|
4720 | var content = PhaseContent_init(phase, PipelinePhaseRelation$Last_getInstance());
|
4721 | phasesList.set_wxm5ur$(index, content);
|
4722 | return content;
|
4723 | }
|
4724 | if (Kotlin.isType(current, PhaseContent) && current.phase === phase) {
|
4725 | return Kotlin.isType(tmp$_0 = current, PhaseContent) ? tmp$_0 : throwCCE();
|
4726 | }
|
4727 | }
|
4728 | return null;
|
4729 | };
|
4730 | Pipeline.prototype.findPhaseIndex_e6azsp$_0 = function(phase) {
|
4731 | var tmp$;
|
4732 | var phasesList = this.phasesRaw_hnbfpg$_0;
|
4733 | tmp$ = phasesList.size;
|
4734 | for (var index = 0; index < tmp$; index++) {
|
4735 | var current = phasesList.get_za3lpa$(index);
|
4736 | if (current === phase || (Kotlin.isType(current, PhaseContent) && current.phase === phase)) {
|
4737 | return index;
|
4738 | }
|
4739 | }
|
4740 | return -1;
|
4741 | };
|
4742 | Pipeline.prototype.hasPhase_ee29uw$_0 = function(phase) {
|
4743 | var tmp$;
|
4744 | var phasesList = this.phasesRaw_hnbfpg$_0;
|
4745 | tmp$ = phasesList.size;
|
4746 | for (var index = 0; index < tmp$; index++) {
|
4747 | var current = phasesList.get_za3lpa$(index);
|
4748 | if (current === phase || (Kotlin.isType(current, PhaseContent) && current.phase === phase)) {
|
4749 | return true;
|
4750 | }
|
4751 | }
|
4752 | return false;
|
4753 | };
|
4754 | Pipeline.prototype.cacheInterceptors_dmwwd8$_0 = function() {
|
4755 | var tmp$, tmp$_0, tmp$_1, tmp$_2, tmp$_3, tmp$_4;
|
4756 | var interceptorsQuantity = this.interceptorsQuantity_zh48jz$_0;
|
4757 | if (interceptorsQuantity === 0) {
|
4758 | this.notSharedInterceptorsList_hhkjgi$_0(emptyList());
|
4759 | return emptyList();
|
4760 | }
|
4761 | var phases = this.phasesRaw_hnbfpg$_0;
|
4762 | if (interceptorsQuantity === 1) {
|
4763 | tmp$ = get_lastIndex_0(phases);
|
4764 | for (var phaseIndex = 0; phaseIndex <= tmp$; phaseIndex++) {
|
4765 | tmp$_1 = Kotlin.isType(tmp$_0 = phases.get_za3lpa$(phaseIndex), PhaseContent) ? tmp$_0 : null;
|
4766 | if (tmp$_1 == null) {
|
4767 | continue;
|
4768 | }
|
4769 | var phaseContent = tmp$_1;
|
4770 | if (!phaseContent.isEmpty) {
|
4771 | var interceptors = phaseContent.sharedInterceptors();
|
4772 | this.setInterceptorsListFromPhase_j6c7c5$_0(phaseContent);
|
4773 | return interceptors;
|
4774 | }
|
4775 | }
|
4776 | }
|
4777 | var destination = sharedListOf([]);
|
4778 | tmp$_2 = get_lastIndex_0(phases);
|
4779 | for (var phaseIndex_0 = 0; phaseIndex_0 <= tmp$_2; phaseIndex_0++) {
|
4780 | tmp$_4 = Kotlin.isType(tmp$_3 = phases.get_za3lpa$(phaseIndex_0), PhaseContent) ? tmp$_3 : null;
|
4781 | if (tmp$_4 == null) {
|
4782 | continue;
|
4783 | }
|
4784 | var phase = tmp$_4;
|
4785 | phase.addTo_m9oilt$(destination);
|
4786 | }
|
4787 | this.notSharedInterceptorsList_hhkjgi$_0(destination);
|
4788 | return destination;
|
4789 | };
|
4790 | Pipeline.prototype.fastPathMerge_p3ex3$_0 = function(from) {
|
4791 | var tmp$, tmp$_0;
|
4792 | if (from.phasesRaw_hnbfpg$_0.isEmpty()) {
|
4793 | return true;
|
4794 | }
|
4795 | if (!this.phasesRaw_hnbfpg$_0.isEmpty()) {
|
4796 | return false;
|
4797 | }
|
4798 | var fromPhases = from.phasesRaw_hnbfpg$_0;
|
4799 | tmp$ = get_lastIndex_0(fromPhases);
|
4800 | for (var index = 0; index <= tmp$; index++) {
|
4801 | var fromPhaseOrContent = fromPhases.get_za3lpa$(index);
|
4802 | if (Kotlin.isType(fromPhaseOrContent, PipelinePhase)) {
|
4803 | this.phasesRaw_hnbfpg$_0.add_11rb$(fromPhaseOrContent);
|
4804 | continue;
|
4805 | }
|
4806 | if (Kotlin.isType(fromPhaseOrContent, PhaseContent)) {
|
4807 | Kotlin.isType(tmp$_0 = fromPhaseOrContent, PhaseContent) ? tmp$_0 : throwCCE();
|
4808 | this.phasesRaw_hnbfpg$_0.add_11rb$(new PhaseContent(fromPhaseOrContent.phase, fromPhaseOrContent.relation, fromPhaseOrContent.sharedInterceptors()));
|
4809 | continue;
|
4810 | }
|
4811 | }
|
4812 | this.interceptorsQuantity_zh48jz$_0 = this.interceptorsQuantity_zh48jz$_0 + from.interceptorsQuantity_zh48jz$_0 | 0;
|
4813 | this.setInterceptorsListFromAnotherPipeline_5wxuo1$_0(from);
|
4814 | return true;
|
4815 | };
|
4816 | Pipeline.prototype.sharedInterceptorsList_8aep55$_0 = function() {
|
4817 | if (this.interceptors_dzu4x2$_0 == null) {
|
4818 | this.cacheInterceptors_dmwwd8$_0();
|
4819 | }
|
4820 | this.interceptorsListShared_q9lih5$_0 = true;
|
4821 | return ensureNotNull(this.interceptors_dzu4x2$_0);
|
4822 | };
|
4823 | Pipeline.prototype.resetInterceptorsList_f35ip$_0 = function() {
|
4824 | this.interceptors_dzu4x2$_0 = null;
|
4825 | this.interceptorsListShared_q9lih5$_0 = false;
|
4826 | this.interceptorsListSharedPhase_9t9y1q$_0 = null;
|
4827 | };
|
4828 | Pipeline.prototype.notSharedInterceptorsList_hhkjgi$_0 = function(list) {
|
4829 | this.interceptors_dzu4x2$_0 = list;
|
4830 | this.interceptorsListShared_q9lih5$_0 = false;
|
4831 | this.interceptorsListSharedPhase_9t9y1q$_0 = null;
|
4832 | };
|
4833 | Pipeline.prototype.setInterceptorsListFromPhase_j6c7c5$_0 = function(phaseContent) {
|
4834 | this.interceptors_dzu4x2$_0 = phaseContent.sharedInterceptors();
|
4835 | this.interceptorsListShared_q9lih5$_0 = false;
|
4836 | this.interceptorsListSharedPhase_9t9y1q$_0 = phaseContent.phase;
|
4837 | };
|
4838 | Pipeline.prototype.setInterceptorsListFromAnotherPipeline_5wxuo1$_0 = function(pipeline) {
|
4839 | this.interceptors_dzu4x2$_0 = pipeline.sharedInterceptorsList_8aep55$_0();
|
4840 | this.interceptorsListShared_q9lih5$_0 = true;
|
4841 | this.interceptorsListSharedPhase_9t9y1q$_0 = null;
|
4842 | };
|
4843 | Pipeline.prototype.tryAddToPhaseFastPath_8roaa7$_0 = function(phase, block) {
|
4844 | var currentInterceptors = this.interceptors_dzu4x2$_0;
|
4845 | if (this.phasesRaw_hnbfpg$_0.isEmpty() || currentInterceptors == null) {
|
4846 | return false;
|
4847 | }
|
4848 | if (this.interceptorsListShared_q9lih5$_0 || !Kotlin.isType(currentInterceptors, MutableList)) {
|
4849 | return false;
|
4850 | }
|
4851 | if (equals(this.interceptorsListSharedPhase_9t9y1q$_0, phase)) {
|
4852 | currentInterceptors.add_11rb$(block);
|
4853 | return true;
|
4854 | }
|
4855 | if (equals(phase, last(this.phasesRaw_hnbfpg$_0)) || this.findPhaseIndex_e6azsp$_0(phase) === get_lastIndex_0(this.phasesRaw_hnbfpg$_0)) {
|
4856 | ensureNotNull(this.findPhase_ckbt4l$_0(phase)).addInterceptor_mx8w25$(block);
|
4857 | currentInterceptors.add_11rb$(block);
|
4858 | return true;
|
4859 | }
|
4860 | return false;
|
4861 | };
|
4862 | Pipeline.$metadata$ = {
|
4863 | kind: Kind_CLASS,
|
4864 | simpleName: 'Pipeline',
|
4865 | interfaces: []};
|
4866 | function Pipeline_init(phase, interceptors, $this) {
|
4867 | $this = $this || Object.create(Pipeline.prototype);
|
4868 | Pipeline.call($this, [phase]);
|
4869 | var tmp$;
|
4870 | tmp$ = interceptors.iterator();
|
4871 | while (tmp$.hasNext()) {
|
4872 | var element = tmp$.next();
|
4873 | $this.intercept_h71y74$(phase, element);
|
4874 | }
|
4875 | return $this;
|
4876 | }
|
4877 | function execute($receiver, context, continuation) {
|
4878 | return $receiver.execute_8pmvt0$(context, Unit, continuation);
|
4879 | }
|
4880 | defineInlineFunction('ktor-ktor-utils-jsLegacy.io.ktor.util.pipeline.execute_8vjjyp$', wrapFunction(function() {
|
4881 | var Unit = Kotlin.kotlin.Unit;
|
4882 | return function($receiver, context, continuation) {
|
4883 | Kotlin.suspendCall($receiver.execute_8pmvt0$(context, Unit, Kotlin.coroutineReceiver()));
|
4884 | return Kotlin.coroutineResult(Kotlin.coroutineReceiver());
|
4885 | };
|
4886 | }));
|
4887 | var intercept = defineInlineFunction('ktor-ktor-utils-jsLegacy.io.ktor.util.pipeline.intercept_1vle7l$', wrapFunction(function() {
|
4888 | var PipelineContext = _.io.ktor.util.pipeline.PipelineContext;
|
4889 | var COROUTINE_SUSPENDED = Kotlin.kotlin.coroutines.intrinsics.COROUTINE_SUSPENDED;
|
4890 | var CoroutineImpl = Kotlin.kotlin.coroutines.CoroutineImpl;
|
4891 | function Coroutine$intercept$lambda(typeClosure$TSubject_0, isTSubject_0, closure$block_0, $receiver_0, subject_0, controller, continuation_0) {
|
4892 | CoroutineImpl.call(this, continuation_0);
|
4893 | this.$controller = controller;
|
4894 | this.exceptionState_0 = 1;
|
4895 | this.local$isTSubject = isTSubject_0;
|
4896 | this.local$closure$block = closure$block_0;
|
4897 | this.local$$receiver = $receiver_0;
|
4898 | this.local$subject = subject_0;
|
4899 | }
|
4900 | Coroutine$intercept$lambda.$metadata$ = {
|
4901 | kind: Kotlin.Kind.CLASS,
|
4902 | simpleName: null,
|
4903 | interfaces: [CoroutineImpl]};
|
4904 | Coroutine$intercept$lambda.prototype = Object.create(CoroutineImpl.prototype);
|
4905 | Coroutine$intercept$lambda.prototype.constructor = Coroutine$intercept$lambda;
|
4906 | Coroutine$intercept$lambda.prototype.doResume = function() {
|
4907 | do try {
|
4908 | switch (this.state_0) {
|
4909 | case 0:
|
4910 | var tmp$;
|
4911 | if (!this.local$isTSubject(this.local$subject)) {
|
4912 | return;
|
4913 | } else {
|
4914 | this.state_0 = 2;
|
4915 | continue;
|
4916 | }
|
4917 | case 1:
|
4918 | throw this.exception_0;
|
4919 | case 2:
|
4920 | var reinterpret = Kotlin.isType(tmp$ = this.local$$receiver, PipelineContext) ? tmp$ : null;
|
4921 | if (reinterpret != null) {
|
4922 | this.state_0 = 3;
|
4923 | this.result_0 = this.local$closure$block(reinterpret, this.local$subject, this);
|
4924 | if (this.result_0 === COROUTINE_SUSPENDED)
|
4925 | return COROUTINE_SUSPENDED;
|
4926 | continue;
|
4927 | } else {
|
4928 | this.result_0 = null;
|
4929 | this.state_0 = 4;
|
4930 | continue;
|
4931 | }
|
4932 | case 3:
|
4933 | this.state_0 = 4;
|
4934 | continue;
|
4935 | case 4:
|
4936 | return this.result_0;
|
4937 | default:
|
4938 | this.state_0 = 1;
|
4939 | throw new Error('State Machine Unreachable execution');
|
4940 | }
|
4941 | } catch (e) {
|
4942 | if (this.state_0 === 1) {
|
4943 | this.exceptionState_0 = this.state_0;
|
4944 | throw e;
|
4945 | } else {
|
4946 | this.state_0 = this.exceptionState_0;
|
4947 | this.exception_0 = e;
|
4948 | }
|
4949 | } while (true);
|
4950 | };
|
4951 | function intercept$lambda(typeClosure$TSubject_0, isTSubject_0, closure$block_0) {
|
4952 | return function($receiver_0, subject_0, continuation_0, suspended) {
|
4953 | var instance = new Coroutine$intercept$lambda(typeClosure$TSubject_0, isTSubject_0, closure$block_0, $receiver_0, subject_0, this, continuation_0);
|
4954 | if (suspended)
|
4955 | return instance;
|
4956 | else
|
4957 | return instance.doResume(null);
|
4958 | };
|
4959 | }
|
4960 | return function(TSubject_0, isTSubject, $receiver, phase, block) {
|
4961 | $receiver.intercept_h71y74$(phase, intercept$lambda(TSubject_0, isTSubject, block));
|
4962 | };
|
4963 | }));
|
4964 | function PipelineContext() {
|
4965 | }
|
4966 | PipelineContext.$metadata$ = {
|
4967 | kind: Kind_INTERFACE,
|
4968 | simpleName: 'PipelineContext',
|
4969 | interfaces: [CoroutineScope]};
|
4970 | function PipelineExecutor() {
|
4971 | }
|
4972 | PipelineExecutor.$metadata$ = {
|
4973 | kind: Kind_INTERFACE,
|
4974 | simpleName: 'PipelineExecutor',
|
4975 | interfaces: []};
|
4976 | function pipelineExecutorFor(context, interceptors, subject) {
|
4977 | return new SuspendFunctionGun(subject, context, interceptors);
|
4978 | }
|
4979 | function PipelinePhase(name) {
|
4980 | this.name = name;
|
4981 | }
|
4982 | PipelinePhase.prototype.toString = function() {
|
4983 | return "Phase('" + this.name + "')";
|
4984 | };
|
4985 | PipelinePhase.$metadata$ = {
|
4986 | kind: Kind_CLASS,
|
4987 | simpleName: 'PipelinePhase',
|
4988 | interfaces: []};
|
4989 | function InvalidPhaseException(message) {
|
4990 | Throwable.call(this);
|
4991 | this.message_qcnek0$_0 = message;
|
4992 | this.cause_hz8mdu$_0 = null;
|
4993 | Kotlin.captureStack(Throwable, this);
|
4994 | this.name = 'InvalidPhaseException';
|
4995 | }
|
4996 | Object.defineProperty(InvalidPhaseException.prototype, 'message', {
|
4997 | get: function() {
|
4998 | return this.message_qcnek0$_0;
|
4999 | }});
|
5000 | Object.defineProperty(InvalidPhaseException.prototype, 'cause', {
|
5001 | get: function() {
|
5002 | return this.cause_hz8mdu$_0;
|
5003 | }});
|
5004 | InvalidPhaseException.$metadata$ = {
|
5005 | kind: Kind_CLASS,
|
5006 | simpleName: 'InvalidPhaseException',
|
5007 | interfaces: [Throwable]};
|
5008 | function PipelinePhaseRelation() {
|
5009 | }
|
5010 | function PipelinePhaseRelation$After(relativeTo) {
|
5011 | PipelinePhaseRelation.call(this);
|
5012 | this.relativeTo = relativeTo;
|
5013 | }
|
5014 | PipelinePhaseRelation$After.$metadata$ = {
|
5015 | kind: Kind_CLASS,
|
5016 | simpleName: 'After',
|
5017 | interfaces: [PipelinePhaseRelation]};
|
5018 | function PipelinePhaseRelation$Before(relativeTo) {
|
5019 | PipelinePhaseRelation.call(this);
|
5020 | this.relativeTo = relativeTo;
|
5021 | }
|
5022 | PipelinePhaseRelation$Before.$metadata$ = {
|
5023 | kind: Kind_CLASS,
|
5024 | simpleName: 'Before',
|
5025 | interfaces: [PipelinePhaseRelation]};
|
5026 | function PipelinePhaseRelation$Last() {
|
5027 | PipelinePhaseRelation$Last_instance = this;
|
5028 | PipelinePhaseRelation.call(this);
|
5029 | }
|
5030 | PipelinePhaseRelation$Last.$metadata$ = {
|
5031 | kind: Kind_OBJECT,
|
5032 | simpleName: 'Last',
|
5033 | interfaces: [PipelinePhaseRelation]};
|
5034 | var PipelinePhaseRelation$Last_instance = null;
|
5035 | function PipelinePhaseRelation$Last_getInstance() {
|
5036 | if (PipelinePhaseRelation$Last_instance === null) {
|
5037 | new PipelinePhaseRelation$Last();
|
5038 | }
|
5039 | return PipelinePhaseRelation$Last_instance;
|
5040 | }
|
5041 | PipelinePhaseRelation.$metadata$ = {
|
5042 | kind: Kind_CLASS,
|
5043 | simpleName: 'PipelinePhaseRelation',
|
5044 | interfaces: []};
|
5045 | function recoverStackTraceBridge(exception, continuation) {
|
5046 | try {
|
5047 | return withCause(recoverStackTrace(exception, continuation), exception.cause);
|
5048 | } catch (_) {
|
5049 | if (Kotlin.isType(_, Throwable)) {
|
5050 | return exception;
|
5051 | } else
|
5052 | throw _;
|
5053 | }
|
5054 | }
|
5055 | function StackWalkingFailed() {
|
5056 | StackWalkingFailed_instance = this;
|
5057 | }
|
5058 | StackWalkingFailed.prototype.failedToCaptureStackFrame = function() {
|
5059 | throw IllegalStateException_init(('Failed to capture stack frame. This is usually happens when a coroutine is running so' + ' the frame stack is changing quickly ' + 'and the coroutine debug agent is unable to capture it concurrently.' + ' You may retry running your test to see this particular trace.').toString());
|
5060 | };
|
5061 | StackWalkingFailed.$metadata$ = {
|
5062 | kind: Kind_OBJECT,
|
5063 | simpleName: 'StackWalkingFailed',
|
5064 | interfaces: []};
|
5065 | var StackWalkingFailed_instance = null;
|
5066 | function StackWalkingFailed_getInstance() {
|
5067 | if (StackWalkingFailed_instance === null) {
|
5068 | new StackWalkingFailed();
|
5069 | }
|
5070 | return StackWalkingFailed_instance;
|
5071 | }
|
5072 | function StackWalkingFailedFrame() {
|
5073 | StackWalkingFailedFrame_instance = this;
|
5074 | }
|
5075 | Object.defineProperty(StackWalkingFailedFrame.prototype, 'callerFrame', {
|
5076 | configurable: true,
|
5077 | get: function() {
|
5078 | return null;
|
5079 | }});
|
5080 | StackWalkingFailedFrame.prototype.getStackTraceElement = function() {
|
5081 | return createStackTraceElement(getKClass(StackWalkingFailed), getCallableRef('failedToCaptureStackFrame', function($receiver) {
|
5082 | return $receiver.failedToCaptureStackFrame() , Unit;
|
5083 | }.bind(null, StackWalkingFailed_getInstance())).callableName, 'StackWalkingFailed.kt', 8);
|
5084 | };
|
5085 | Object.defineProperty(StackWalkingFailedFrame.prototype, 'context', {
|
5086 | configurable: true,
|
5087 | get: function() {
|
5088 | return coroutines_0.EmptyCoroutineContext;
|
5089 | }});
|
5090 | StackWalkingFailedFrame.prototype.resumeWith_tl1gpc$ = function(result) {
|
5091 | StackWalkingFailed_getInstance().failedToCaptureStackFrame();
|
5092 | };
|
5093 | StackWalkingFailedFrame.$metadata$ = {
|
5094 | kind: Kind_OBJECT,
|
5095 | simpleName: 'StackWalkingFailedFrame',
|
5096 | interfaces: [Continuation, CoroutineStackFrame]};
|
5097 | var StackWalkingFailedFrame_instance = null;
|
5098 | function StackWalkingFailedFrame_getInstance() {
|
5099 | if (StackWalkingFailedFrame_instance === null) {
|
5100 | new StackWalkingFailedFrame();
|
5101 | }
|
5102 | return StackWalkingFailedFrame_instance;
|
5103 | }
|
5104 | function Coroutine$startCoroutineUninterceptedOrReturn3$lambda(this$startCoroutineUninterceptedOrReturn3_0, closure$receiver_0, closure$arg_0, continuation_0) {
|
5105 | CoroutineImpl.call(this, continuation_0);
|
5106 | this.exceptionState_0 = 1;
|
5107 | this.local$this$startCoroutineUninterceptedOrReturn3 = this$startCoroutineUninterceptedOrReturn3_0;
|
5108 | this.local$closure$receiver = closure$receiver_0;
|
5109 | this.local$closure$arg = closure$arg_0;
|
5110 | }
|
5111 | Coroutine$startCoroutineUninterceptedOrReturn3$lambda.$metadata$ = {
|
5112 | kind: Kotlin.Kind.CLASS,
|
5113 | simpleName: null,
|
5114 | interfaces: [CoroutineImpl]};
|
5115 | Coroutine$startCoroutineUninterceptedOrReturn3$lambda.prototype = Object.create(CoroutineImpl.prototype);
|
5116 | Coroutine$startCoroutineUninterceptedOrReturn3$lambda.prototype.constructor = Coroutine$startCoroutineUninterceptedOrReturn3$lambda;
|
5117 | Coroutine$startCoroutineUninterceptedOrReturn3$lambda.prototype.doResume = function() {
|
5118 | do try {
|
5119 | switch (this.state_0) {
|
5120 | case 0:
|
5121 | this.state_0 = 2;
|
5122 | this.result_0 = this.local$this$startCoroutineUninterceptedOrReturn3(this.local$closure$receiver, this.local$closure$arg, this);
|
5123 | if (this.result_0 === COROUTINE_SUSPENDED)
|
5124 | return COROUTINE_SUSPENDED;
|
5125 | continue;
|
5126 | case 1:
|
5127 | throw this.exception_0;
|
5128 | case 2:
|
5129 | return this.result_0;
|
5130 | default:
|
5131 | this.state_0 = 1;
|
5132 | throw new Error('State Machine Unreachable execution');
|
5133 | }
|
5134 | } catch (e) {
|
5135 | if (this.state_0 === 1) {
|
5136 | this.exceptionState_0 = this.state_0;
|
5137 | throw e;
|
5138 | } else {
|
5139 | this.state_0 = this.exceptionState_0;
|
5140 | this.exception_0 = e;
|
5141 | }
|
5142 | } while (true);
|
5143 | };
|
5144 | function startCoroutineUninterceptedOrReturn3$lambda(this$startCoroutineUninterceptedOrReturn3_0, closure$receiver_0, closure$arg_0) {
|
5145 | return function(continuation_0, suspended) {
|
5146 | var instance = new Coroutine$startCoroutineUninterceptedOrReturn3$lambda(this$startCoroutineUninterceptedOrReturn3_0, closure$receiver_0, closure$arg_0, continuation_0);
|
5147 | if (suspended)
|
5148 | return instance;
|
5149 | else
|
5150 | return instance.doResume(null);
|
5151 | };
|
5152 | }
|
5153 | function SuspendFunctionGun(initial, context, blocks) {
|
5154 | this.context_elhkod$_0 = context;
|
5155 | this.blocks_0 = blocks;
|
5156 | this.lastPeekedIndex_0 = -1;
|
5157 | this.continuation_0 = new SuspendFunctionGun$continuation$ObjectLiteral(this);
|
5158 | this.subject_vl1hkm$_0 = initial;
|
5159 | this.rootContinuation_0 = null;
|
5160 | this.index_0 = 0;
|
5161 | preventFreeze(this);
|
5162 | }
|
5163 | Object.defineProperty(SuspendFunctionGun.prototype, 'context', {
|
5164 | get: function() {
|
5165 | return this.context_elhkod$_0;
|
5166 | }});
|
5167 | Object.defineProperty(SuspendFunctionGun.prototype, 'coroutineContext', {
|
5168 | configurable: true,
|
5169 | get: function() {
|
5170 | return this.continuation_0.context;
|
5171 | }});
|
5172 | Object.defineProperty(SuspendFunctionGun.prototype, 'subject', {
|
5173 | configurable: true,
|
5174 | get: function() {
|
5175 | return this.subject_vl1hkm$_0;
|
5176 | },
|
5177 | set: function(subject) {
|
5178 | this.subject_vl1hkm$_0 = subject;
|
5179 | }});
|
5180 | SuspendFunctionGun.prototype.finish = function() {
|
5181 | this.index_0 = this.blocks_0.size;
|
5182 | };
|
5183 | function SuspendFunctionGun$proceed$lambda(this$SuspendFunctionGun) {
|
5184 | return function(continuation) {
|
5185 | if (this$SuspendFunctionGun.index_0 === this$SuspendFunctionGun.blocks_0.size)
|
5186 | return this$SuspendFunctionGun.subject;
|
5187 | this$SuspendFunctionGun.addContinuation_0(continuation);
|
5188 | if (this$SuspendFunctionGun.loop_0(true)) {
|
5189 | this$SuspendFunctionGun.discardLastRootContinuation_0();
|
5190 | return this$SuspendFunctionGun.subject;
|
5191 | }
|
5192 | return COROUTINE_SUSPENDED;
|
5193 | };
|
5194 | }
|
5195 | SuspendFunctionGun.prototype.proceed = function(continuation) {
|
5196 | return SuspendFunctionGun$proceed$lambda(this)(continuation);
|
5197 | };
|
5198 | SuspendFunctionGun.prototype.proceedWith_trkh7z$ = function(subject, continuation) {
|
5199 | this.subject = subject;
|
5200 | return this.proceed(continuation);
|
5201 | };
|
5202 | SuspendFunctionGun.prototype.execute_11rb$ = function(initial, continuation) {
|
5203 | this.index_0 = 0;
|
5204 | if (this.index_0 === this.blocks_0.size)
|
5205 | return initial;
|
5206 | this.subject = initial;
|
5207 | if (this.rootContinuation_0 != null)
|
5208 | throw IllegalStateException_init('Already started');
|
5209 | return this.proceed(continuation);
|
5210 | };
|
5211 | SuspendFunctionGun.prototype.loop_0 = function(direct) {
|
5212 | do {
|
5213 | var index = this.index_0;
|
5214 | if (index === this.blocks_0.size) {
|
5215 | if (!direct) {
|
5216 | this.resumeRootWith_0(new Result(this.subject));
|
5217 | return false;
|
5218 | }
|
5219 | return true;
|
5220 | }
|
5221 | this.index_0 = index + 1 | 0;
|
5222 | var next = this.blocks_0.get_za3lpa$(index);
|
5223 | try {
|
5224 | var me = this;
|
5225 | var block = startCoroutineUninterceptedOrReturn3$lambda(next, me, me.subject);
|
5226 | var rc = block(me.continuation_0, false);
|
5227 | if (rc === COROUTINE_SUSPENDED) {
|
5228 | return false;
|
5229 | }
|
5230 | } catch (cause) {
|
5231 | if (Kotlin.isType(cause, Throwable)) {
|
5232 | this.resumeRootWith_0(new Result(createFailure(cause)));
|
5233 | return false;
|
5234 | } else
|
5235 | throw cause;
|
5236 | }
|
5237 | } while (true);
|
5238 | };
|
5239 | SuspendFunctionGun.prototype.resumeRootWith_0 = function(result) {
|
5240 | var tmp$, tmp$_0;
|
5241 | var rootContinuation = this.rootContinuation_0;
|
5242 | if (rootContinuation == null)
|
5243 | throw IllegalStateException_init('No more continuations to resume');
|
5244 | else if (Kotlin.isType(rootContinuation, Continuation)) {
|
5245 | this.rootContinuation_0 = null;
|
5246 | this.lastPeekedIndex_0 = -1;
|
5247 | tmp$ = rootContinuation;
|
5248 | } else if (Kotlin.isType(rootContinuation, ArrayList)) {
|
5249 | if (rootContinuation.isEmpty())
|
5250 | throw IllegalStateException_init('No more continuations to resume');
|
5251 | this.lastPeekedIndex_0 = get_lastIndex_0(rootContinuation) - 1 | 0;
|
5252 | tmp$ = rootContinuation.removeAt_za3lpa$(get_lastIndex_0(rootContinuation));
|
5253 | } else
|
5254 | tmp$ = this.unexpectedRootContinuationValue_0(rootContinuation);
|
5255 | var next = Kotlin.isType(tmp$_0 = tmp$, Continuation) ? tmp$_0 : throwCCE();
|
5256 | if (!result.isFailure) {
|
5257 | next.resumeWith_tl1gpc$(result);
|
5258 | } else {
|
5259 | var exception = recoverStackTraceBridge(ensureNotNull(result.exceptionOrNull()), next);
|
5260 | next.resumeWith_tl1gpc$(new Result(createFailure(exception)));
|
5261 | }
|
5262 | };
|
5263 | SuspendFunctionGun.prototype.discardLastRootContinuation_0 = function() {
|
5264 | var rootContinuation = this.rootContinuation_0;
|
5265 | if (rootContinuation == null)
|
5266 | throw IllegalStateException_init('No more continuations to resume');
|
5267 | else if (Kotlin.isType(rootContinuation, Continuation)) {
|
5268 | this.lastPeekedIndex_0 = -1;
|
5269 | this.rootContinuation_0 = null;
|
5270 | } else if (Kotlin.isType(rootContinuation, ArrayList)) {
|
5271 | if (rootContinuation.isEmpty())
|
5272 | throw IllegalStateException_init('No more continuations to resume');
|
5273 | rootContinuation.removeAt_za3lpa$(get_lastIndex_0(rootContinuation));
|
5274 | this.lastPeekedIndex_0 = get_lastIndex_0(rootContinuation);
|
5275 | } else
|
5276 | this.unexpectedRootContinuationValue_0(rootContinuation);
|
5277 | };
|
5278 | SuspendFunctionGun.prototype.addContinuation_0 = function(continuation) {
|
5279 | var tmp$;
|
5280 | var rootContinuation = this.rootContinuation_0;
|
5281 | if (rootContinuation == null) {
|
5282 | this.lastPeekedIndex_0 = 0;
|
5283 | this.rootContinuation_0 = continuation;
|
5284 | } else if (Kotlin.isType(rootContinuation, Continuation)) {
|
5285 | var $receiver = ArrayList_init(this.blocks_0.size);
|
5286 | $receiver.add_11rb$(rootContinuation);
|
5287 | $receiver.add_11rb$(continuation);
|
5288 | this.lastPeekedIndex_0 = 1;
|
5289 | this.rootContinuation_0 = $receiver;
|
5290 | } else if (Kotlin.isType(rootContinuation, ArrayList)) {
|
5291 | Kotlin.isType(tmp$ = rootContinuation, ArrayList) ? tmp$ : throwCCE();
|
5292 | rootContinuation.add_11rb$(continuation);
|
5293 | this.lastPeekedIndex_0 = get_lastIndex_0(rootContinuation);
|
5294 | } else
|
5295 | this.unexpectedRootContinuationValue_0(rootContinuation);
|
5296 | };
|
5297 | SuspendFunctionGun.prototype.unexpectedRootContinuationValue_0 = function(rootContinuation) {
|
5298 | throw IllegalStateException_init('Unexpected rootContinuation content: ' + toString(rootContinuation));
|
5299 | };
|
5300 | function SuspendFunctionGun$continuation$ObjectLiteral(this$SuspendFunctionGun) {
|
5301 | this.this$SuspendFunctionGun = this$SuspendFunctionGun;
|
5302 | }
|
5303 | Object.defineProperty(SuspendFunctionGun$continuation$ObjectLiteral.prototype, 'callerFrame', {
|
5304 | configurable: true,
|
5305 | get: function() {
|
5306 | var tmp$;
|
5307 | return Kotlin.isType(tmp$ = this.peekContinuation_0(), CoroutineStackFrame) ? tmp$ : null;
|
5308 | }});
|
5309 | SuspendFunctionGun$continuation$ObjectLiteral.prototype.getStackTraceElement = function() {
|
5310 | return null;
|
5311 | };
|
5312 | SuspendFunctionGun$continuation$ObjectLiteral.prototype.peekContinuation_0 = function() {
|
5313 | var tmp$;
|
5314 | if (this.this$SuspendFunctionGun.lastPeekedIndex_0 < 0)
|
5315 | return null;
|
5316 | var rootContinuation = this.this$SuspendFunctionGun.rootContinuation_0;
|
5317 | if (rootContinuation == null)
|
5318 | return null;
|
5319 | else if (Kotlin.isType(rootContinuation, Continuation)) {
|
5320 | this.this$SuspendFunctionGun.lastPeekedIndex_0 = this.this$SuspendFunctionGun.lastPeekedIndex_0 - 1 | 0;
|
5321 | this.this$SuspendFunctionGun;
|
5322 | return rootContinuation;
|
5323 | } else if (Kotlin.isType(rootContinuation, ArrayList)) {
|
5324 | if (rootContinuation.isEmpty()) {
|
5325 | return StackWalkingFailedFrame_getInstance();
|
5326 | }
|
5327 | return this.peekContinuationFromList_0(Kotlin.isType(tmp$ = rootContinuation, List) ? tmp$ : throwCCE());
|
5328 | } else
|
5329 | return null;
|
5330 | };
|
5331 | SuspendFunctionGun$continuation$ObjectLiteral.prototype.peekContinuationFromList_0 = function(list) {
|
5332 | var tmp$;
|
5333 | try {
|
5334 | var index = this.this$SuspendFunctionGun.lastPeekedIndex_0;
|
5335 | tmp$ = getOrNull(list, index);
|
5336 | if (tmp$ == null) {
|
5337 | return StackWalkingFailedFrame_getInstance();
|
5338 | }
|
5339 | var result = tmp$;
|
5340 | this.this$SuspendFunctionGun.lastPeekedIndex_0 = index - 1 | 0;
|
5341 | return result;
|
5342 | } catch (_) {
|
5343 | if (Kotlin.isType(_, Throwable)) {
|
5344 | return StackWalkingFailedFrame_getInstance();
|
5345 | } else
|
5346 | throw _;
|
5347 | }
|
5348 | };
|
5349 | Object.defineProperty(SuspendFunctionGun$continuation$ObjectLiteral.prototype, 'context', {
|
5350 | configurable: true,
|
5351 | get: function() {
|
5352 | var tmp$;
|
5353 | var cont = this.this$SuspendFunctionGun.rootContinuation_0;
|
5354 | if (cont == null)
|
5355 | throw IllegalStateException_init('Not started');
|
5356 | else if (Kotlin.isType(cont, Continuation))
|
5357 | return cont.context;
|
5358 | else if (Kotlin.isType(cont, List))
|
5359 | return last(Kotlin.isType(tmp$ = cont, List) ? tmp$ : throwCCE()).context;
|
5360 | else
|
5361 | throw IllegalStateException_init('Unexpected rootContinuation value');
|
5362 | }});
|
5363 | SuspendFunctionGun$continuation$ObjectLiteral.prototype.resumeWith_tl1gpc$ = function(result) {
|
5364 | if (result.isFailure) {
|
5365 | this.this$SuspendFunctionGun.resumeRootWith_0(new Result(createFailure(ensureNotNull(result.exceptionOrNull()))));
|
5366 | return;
|
5367 | }
|
5368 | this.this$SuspendFunctionGun.loop_0(false);
|
5369 | };
|
5370 | SuspendFunctionGun$continuation$ObjectLiteral.$metadata$ = {
|
5371 | kind: Kind_CLASS,
|
5372 | interfaces: [CoroutineStackFrame, Continuation]};
|
5373 | SuspendFunctionGun.$metadata$ = {
|
5374 | kind: Kind_CLASS,
|
5375 | simpleName: 'SuspendFunctionGun',
|
5376 | interfaces: [PipelineExecutor, PipelineContext, CoroutineScope]};
|
5377 | function Attributes_0(concurrent) {
|
5378 | if (concurrent === void 0)
|
5379 | concurrent = false;
|
5380 | return new AttributesJs();
|
5381 | }
|
5382 | function AttributesJs() {
|
5383 | this.map_0 = LinkedHashMap_init();
|
5384 | }
|
5385 | AttributesJs.prototype.getOrNull_yzaw86$ = function(key) {
|
5386 | var tmp$;
|
5387 | return (tmp$ = this.map_0.get_11rb$(key)) == null || Kotlin.isType(tmp$, Any) ? tmp$ : throwCCE();
|
5388 | };
|
5389 | AttributesJs.prototype.contains_w48dwb$ = function(key) {
|
5390 | return this.map_0.containsKey_11rb$(key);
|
5391 | };
|
5392 | AttributesJs.prototype.put_uuntuo$ = function(key, value) {
|
5393 | this.map_0.put_xwzc9p$(key, value);
|
5394 | };
|
5395 | AttributesJs.prototype.remove_yzaw86$ = function(key) {
|
5396 | this.map_0.remove_11rb$(key);
|
5397 | };
|
5398 | AttributesJs.prototype.computeIfAbsent_u4q9l2$ = function(key, block) {
|
5399 | var tmp$;
|
5400 | if ((tmp$ = this.map_0.get_11rb$(key)) != null) {
|
5401 | var tmp$_0;
|
5402 | return Kotlin.isType(tmp$_0 = tmp$, Any) ? tmp$_0 : throwCCE();
|
5403 | }
|
5404 | var $receiver = block();
|
5405 | this.map_0.put_xwzc9p$(key, $receiver);
|
5406 | return $receiver;
|
5407 | };
|
5408 | Object.defineProperty(AttributesJs.prototype, 'allKeys', {
|
5409 | configurable: true,
|
5410 | get: function() {
|
5411 | return toList_0(this.map_0.keys);
|
5412 | }});
|
5413 | AttributesJs.$metadata$ = {
|
5414 | kind: Kind_CLASS,
|
5415 | simpleName: 'AttributesJs',
|
5416 | interfaces: [Attributes]};
|
5417 | function unmodifiable($receiver) {
|
5418 | return $receiver;
|
5419 | }
|
5420 | var startCoroutineUninterceptedOrReturn3 = defineInlineFunction('ktor-ktor-utils-jsLegacy.io.ktor.util.startCoroutineUninterceptedOrReturn3_jwwvsf$', wrapFunction(function() {
|
5421 | var COROUTINE_SUSPENDED = Kotlin.kotlin.coroutines.intrinsics.COROUTINE_SUSPENDED;
|
5422 | var CoroutineImpl = Kotlin.kotlin.coroutines.CoroutineImpl;
|
5423 | function Coroutine$startCoroutineUninterceptedOrReturn3$lambda(this$startCoroutineUninterceptedOrReturn3_0, closure$receiver_0, closure$arg_0, continuation_0) {
|
5424 | CoroutineImpl.call(this, continuation_0);
|
5425 | this.exceptionState_0 = 1;
|
5426 | this.local$this$startCoroutineUninterceptedOrReturn3 = this$startCoroutineUninterceptedOrReturn3_0;
|
5427 | this.local$closure$receiver = closure$receiver_0;
|
5428 | this.local$closure$arg = closure$arg_0;
|
5429 | }
|
5430 | Coroutine$startCoroutineUninterceptedOrReturn3$lambda.$metadata$ = {
|
5431 | kind: Kotlin.Kind.CLASS,
|
5432 | simpleName: null,
|
5433 | interfaces: [CoroutineImpl]};
|
5434 | Coroutine$startCoroutineUninterceptedOrReturn3$lambda.prototype = Object.create(CoroutineImpl.prototype);
|
5435 | Coroutine$startCoroutineUninterceptedOrReturn3$lambda.prototype.constructor = Coroutine$startCoroutineUninterceptedOrReturn3$lambda;
|
5436 | Coroutine$startCoroutineUninterceptedOrReturn3$lambda.prototype.doResume = function() {
|
5437 | do try {
|
5438 | switch (this.state_0) {
|
5439 | case 0:
|
5440 | this.state_0 = 2;
|
5441 | this.result_0 = this.local$this$startCoroutineUninterceptedOrReturn3(this.local$closure$receiver, this.local$closure$arg, this);
|
5442 | if (this.result_0 === COROUTINE_SUSPENDED)
|
5443 | return COROUTINE_SUSPENDED;
|
5444 | continue;
|
5445 | case 1:
|
5446 | throw this.exception_0;
|
5447 | case 2:
|
5448 | return this.result_0;
|
5449 | default:
|
5450 | this.state_0 = 1;
|
5451 | throw new Error('State Machine Unreachable execution');
|
5452 | }
|
5453 | } catch (e) {
|
5454 | if (this.state_0 === 1) {
|
5455 | this.exceptionState_0 = this.state_0;
|
5456 | throw e;
|
5457 | } else {
|
5458 | this.state_0 = this.exceptionState_0;
|
5459 | this.exception_0 = e;
|
5460 | }
|
5461 | } while (true);
|
5462 | };
|
5463 | function startCoroutineUninterceptedOrReturn3$lambda(this$startCoroutineUninterceptedOrReturn3_0, closure$receiver_0, closure$arg_0) {
|
5464 | return function(continuation_0, suspended) {
|
5465 | var instance = new Coroutine$startCoroutineUninterceptedOrReturn3$lambda(this$startCoroutineUninterceptedOrReturn3_0, closure$receiver_0, closure$arg_0, continuation_0);
|
5466 | if (suspended)
|
5467 | return instance;
|
5468 | else
|
5469 | return instance.doResume(null);
|
5470 | };
|
5471 | }
|
5472 | return function($receiver, receiver, arg, continuation) {
|
5473 | var block = startCoroutineUninterceptedOrReturn3$lambda($receiver, receiver, arg);
|
5474 | return block(continuation, false);
|
5475 | };
|
5476 | }));
|
5477 | var NONCE_SIZE_IN_BYTES;
|
5478 | function generateNonce_0() {
|
5479 | var buffer = new Int8Array(8);
|
5480 | if (PlatformUtils_getInstance().IS_NODE) {
|
5481 | _crypto.randomFillSync(buffer);
|
5482 | } else {
|
5483 | _crypto.getRandomValues(buffer);
|
5484 | }
|
5485 | return hex(buffer);
|
5486 | }
|
5487 | function Digest$ObjectLiteral(closure$name) {
|
5488 | this.closure$name = closure$name;
|
5489 | this.state_0 = ArrayList_init_0();
|
5490 | }
|
5491 | Digest$ObjectLiteral.prototype.plusAssign_fqrh44$ = function(bytes) {
|
5492 | this.state_0.add_11rb$(bytes);
|
5493 | };
|
5494 | Digest$ObjectLiteral.prototype.reset = function() {
|
5495 | this.state_0.clear();
|
5496 | };
|
5497 | function Coroutine$build($this, continuation_0) {
|
5498 | CoroutineImpl.call(this, continuation_0);
|
5499 | this.exceptionState_0 = 1;
|
5500 | this.$this = $this;
|
5501 | }
|
5502 | Coroutine$build.$metadata$ = {
|
5503 | kind: Kotlin.Kind.CLASS,
|
5504 | simpleName: null,
|
5505 | interfaces: [CoroutineImpl]};
|
5506 | Coroutine$build.prototype = Object.create(CoroutineImpl.prototype);
|
5507 | Coroutine$build.prototype.constructor = Coroutine$build;
|
5508 | Coroutine$build.prototype.doResume = function() {
|
5509 | do try {
|
5510 | switch (this.state_0) {
|
5511 | case 0:
|
5512 | var iterator = this.$this.state_0.iterator();
|
5513 | if (!iterator.hasNext())
|
5514 | throw UnsupportedOperationException_init("Empty collection can't be reduced.");
|
5515 | var accumulator = iterator.next();
|
5516 | while (iterator.hasNext()) {
|
5517 | accumulator = primitiveArrayConcat(accumulator, iterator.next());
|
5518 | }
|
5519 | var snapshot = accumulator;
|
5520 | this.state_0 = 2;
|
5521 | this.result_0 = asDeferred(_crypto.subtle.digest(this.$this.closure$name, snapshot)).await(this);
|
5522 | if (this.result_0 === COROUTINE_SUSPENDED)
|
5523 | return COROUTINE_SUSPENDED;
|
5524 | continue;
|
5525 | case 1:
|
5526 | throw this.exception_0;
|
5527 | case 2:
|
5528 | var digestBuffer = this.result_0;
|
5529 | var digestView = new DataView(digestBuffer);
|
5530 | var array = new Int8Array(digestView.byteLength);
|
5531 | var tmp$;
|
5532 | tmp$ = array.length - 1 | 0;
|
5533 | for (var i = 0; i <= tmp$; i++) {
|
5534 | array[i] = digestView.getUint8(i);
|
5535 | }
|
5536 | return array;
|
5537 | default:
|
5538 | this.state_0 = 1;
|
5539 | throw new Error('State Machine Unreachable execution');
|
5540 | }
|
5541 | } catch (e) {
|
5542 | if (this.state_0 === 1) {
|
5543 | this.exceptionState_0 = this.state_0;
|
5544 | throw e;
|
5545 | } else {
|
5546 | this.state_0 = this.exceptionState_0;
|
5547 | this.exception_0 = e;
|
5548 | }
|
5549 | } while (true);
|
5550 | };
|
5551 | Digest$ObjectLiteral.prototype.build = function(continuation_0, suspended) {
|
5552 | var instance = new Coroutine$build(this, continuation_0);
|
5553 | if (suspended)
|
5554 | return instance;
|
5555 | else
|
5556 | return instance.doResume(null);
|
5557 | };
|
5558 | Digest$ObjectLiteral.$metadata$ = {
|
5559 | kind: Kind_CLASS,
|
5560 | interfaces: [Digest]};
|
5561 | function Digest_0(name) {
|
5562 | return new Digest$ObjectLiteral(name);
|
5563 | }
|
5564 | var _crypto;
|
5565 | function sha1(bytes) {
|
5566 | throw IllegalStateException_init('sha1 currently is not supported in ktor-js'.toString());
|
5567 | }
|
5568 | function Lock() {
|
5569 | }
|
5570 | Lock.prototype.lock = function() {
|
5571 | };
|
5572 | Lock.prototype.unlock = function() {
|
5573 | };
|
5574 | Lock.prototype.close = function() {
|
5575 | };
|
5576 | Lock.$metadata$ = {
|
5577 | kind: Kind_CLASS,
|
5578 | simpleName: 'Lock',
|
5579 | interfaces: []};
|
5580 | function PlatformUtils() {
|
5581 | PlatformUtils_instance = this;
|
5582 | var tmp$, tmp$_0;
|
5583 | this.IS_BROWSER = typeof (tmp$ = (typeof window !== 'undefined' && typeof window.document !== 'undefined')) === 'boolean' ? tmp$ : throwCCE();
|
5584 | this.IS_NODE = typeof (tmp$_0 = (typeof process !== 'undefined' && process.versions != null && process.versions.node != null)) === 'boolean' ? tmp$_0 : throwCCE();
|
5585 | this.IS_JVM = false;
|
5586 | this.IS_NATIVE = false;
|
5587 | }
|
5588 | PlatformUtils.$metadata$ = {
|
5589 | kind: Kind_OBJECT,
|
5590 | simpleName: 'PlatformUtils',
|
5591 | interfaces: []};
|
5592 | var PlatformUtils_instance = null;
|
5593 | function PlatformUtils_getInstance() {
|
5594 | if (PlatformUtils_instance === null) {
|
5595 | new PlatformUtils();
|
5596 | }
|
5597 | return PlatformUtils_instance;
|
5598 | }
|
5599 | function CoroutineStackFrame() {
|
5600 | }
|
5601 | CoroutineStackFrame.$metadata$ = {
|
5602 | kind: Kind_INTERFACE,
|
5603 | simpleName: 'CoroutineStackFrame',
|
5604 | interfaces: []};
|
5605 | function createStackTraceElement(kClass, methodName, fileName, lineNumber) {
|
5606 | return new Any();
|
5607 | }
|
5608 | function GMTDate_0(timestamp) {
|
5609 | if (timestamp === void 0)
|
5610 | timestamp = null;
|
5611 | var tmp$, tmp$_0;
|
5612 | var date = (tmp$_0 = (tmp$ = timestamp != null ? timestamp.toNumber() : null) != null ? new Date(tmp$) : null) != null ? tmp$_0 : new Date();
|
5613 | if (isNaN_0(date.getTime()))
|
5614 | throw new InvalidTimestampException(ensureNotNull(timestamp));
|
5615 | var dayOfWeek = WeekDay$Companion_getInstance().from_za3lpa$((date.getUTCDay() + 6 | 0) % 7);
|
5616 | var month = Month$Companion_getInstance().from_za3lpa$(date.getUTCMonth());
|
5617 | return new GMTDate(date.getUTCSeconds(), date.getUTCMinutes(), date.getUTCHours(), dayOfWeek, date.getUTCDate(), date.getUTCFullYear(), month, date.getUTCFullYear(), Kotlin.Long.fromNumber(date.getTime()));
|
5618 | }
|
5619 | function GMTDate_1(seconds, minutes, hours, dayOfMonth, month, year) {
|
5620 | var timestamp = Kotlin.Long.fromNumber(Date.UTC(year, month.ordinal, dayOfMonth, hours, minutes, seconds));
|
5621 | return GMTDate_0(timestamp);
|
5622 | }
|
5623 | function InvalidTimestampException(timestamp) {
|
5624 | IllegalStateException_init('Invalid date timestamp exception: ' + timestamp.toString(), this);
|
5625 | this.name = 'InvalidTimestampException';
|
5626 | }
|
5627 | InvalidTimestampException.$metadata$ = {
|
5628 | kind: Kind_CLASS,
|
5629 | simpleName: 'InvalidTimestampException',
|
5630 | interfaces: [IllegalStateException]};
|
5631 | function getTimeMillis() {
|
5632 | return Kotlin.Long.fromNumber((new Date()).getTime());
|
5633 | }
|
5634 | function NetworkAddress(hostname, port, address) {
|
5635 | this.hostname_8be2vx$ = hostname;
|
5636 | this.port_8be2vx$ = port;
|
5637 | this.address_8be2vx$ = address;
|
5638 | }
|
5639 | NetworkAddress.$metadata$ = {
|
5640 | kind: Kind_CLASS,
|
5641 | simpleName: 'NetworkAddress',
|
5642 | interfaces: []};
|
5643 | function get_hostname($receiver) {
|
5644 | return $receiver.hostname_8be2vx$;
|
5645 | }
|
5646 | function get_port($receiver) {
|
5647 | return $receiver.port_8be2vx$;
|
5648 | }
|
5649 | function NetworkAddress_0(hostname, port) {
|
5650 | return new NetworkAddress(hostname, port, hostname);
|
5651 | }
|
5652 | function UnresolvedAddressException() {
|
5653 | IllegalArgumentException_init_0(this);
|
5654 | this.name = 'UnresolvedAddressException';
|
5655 | }
|
5656 | UnresolvedAddressException.$metadata$ = {
|
5657 | kind: Kind_CLASS,
|
5658 | simpleName: 'UnresolvedAddressException',
|
5659 | interfaces: [IllegalArgumentException]};
|
5660 | function withCause($receiver, cause) {
|
5661 | return $receiver;
|
5662 | }
|
5663 | var package$io = _.io || (_.io = {});
|
5664 | var package$ktor = package$io.ktor || (package$io.ktor = {});
|
5665 | var package$util = package$ktor.util || (package$ktor.util = {});
|
5666 | package$util.InternalAPI = InternalAPI;
|
5667 | package$util.KtorExperimentalAPI = KtorExperimentalAPI;
|
5668 | package$util.AttributeKey = AttributeKey;
|
5669 | package$util.Attributes = Attributes;
|
5670 | $$importsForInline$$['ktor-ktor-io-jsLegacy'] = $module$ktor_ktor_io_jsLegacy;
|
5671 | package$util.encodeBase64_pdl1vz$ = encodeBase64;
|
5672 | package$util.encodeBase64_964n91$ = encodeBase64_0;
|
5673 | package$util.encodeBase64_mlrm9h$ = encodeBase64_1;
|
5674 | package$util.decodeBase64String_pdl1vz$ = decodeBase64String;
|
5675 | package$util.decodeBase64Bytes_pdl1vz$ = decodeBase64Bytes;
|
5676 | package$util.decodeBase64Bytes_mlrm9h$ = decodeBase64Bytes_0;
|
5677 | package$util.decodeBase64_pdl1vz$ = decodeBase64;
|
5678 | package$util.decodeBase64_mlrm9h$ = decodeBase64_0;
|
5679 | package$util.clearFrom_767k4w$ = clearFrom;
|
5680 | package$util.toBase64_8e50z4$ = toBase64;
|
5681 | package$util.fromBase64_nugvp3$ = fromBase64;
|
5682 | package$util.split_o3z30d$ = split;
|
5683 | package$util.copyToBoth_xeww6r$ = copyToBoth;
|
5684 | package$util.toByteArray_3dmw3p$ = toByteArray;
|
5685 | package$util.readShort_mrm5p$ = readShort;
|
5686 | package$util.CaseInsensitiveMap = CaseInsensitiveMap;
|
5687 | package$util.CaseInsensitiveSet_init_upaayv$ = CaseInsensitiveSet_init;
|
5688 | package$util.CaseInsensitiveSet = CaseInsensitiveSet;
|
5689 | package$util.isLowerCase_myv2d0$ = isLowerCase;
|
5690 | package$util.toCharArray_pdl1vz$ = toCharArray;
|
5691 | package$util.caseInsensitiveMap_287e2$ = caseInsensitiveMap;
|
5692 | package$util.printDebugTree_7ru2wg$ = printDebugTree;
|
5693 | $$importsForInline$$['kotlinx-coroutines-core'] = $module$kotlinx_coroutines_core;
|
5694 | package$util.SilentSupervisor_5dx9e$ = SilentSupervisor;
|
5695 | package$util.hex_fqrh44$ = hex;
|
5696 | package$util.hex_61zpoe$ = hex_0;
|
5697 | package$util.generateNonce_za3lpa$ = generateNonce;
|
5698 | package$util.Digest = Digest;
|
5699 | package$util.build_1mpr19$ = build;
|
5700 | package$util.build_v179cf$ = build_0;
|
5701 | package$util.DelegatingMutableSet = DelegatingMutableSet;
|
5702 | Object.defineProperty(package$util, 'Identity', {
|
5703 | get: Identity_getInstance});
|
5704 | package$util.Encoder = Encoder;
|
5705 | Object.defineProperty(package$util, 'Hash', {
|
5706 | get: Hash_getInstance});
|
5707 | package$util.withLock_mfy7iq$ = withLock;
|
5708 | package$util.NonceManager = NonceManager;
|
5709 | Object.defineProperty(package$util, 'GenerateOnlyNonceManager', {
|
5710 | get: GenerateOnlyNonceManager_getInstance});
|
5711 | Object.defineProperty(package$util, 'AlwaysFailNonceManager', {
|
5712 | get: AlwaysFailNonceManager_getInstance});
|
5713 | package$util.get_length_37ivyf$ = get_length;
|
5714 | package$util.contains_9p7nab$ = contains;
|
5715 | Object.defineProperty(StringValues, 'Companion', {
|
5716 | get: StringValues$Companion_getInstance});
|
5717 | package$util.StringValues = StringValues;
|
5718 | package$util.StringValuesSingleImpl = StringValuesSingleImpl;
|
5719 | package$util.StringValuesImpl = StringValuesImpl;
|
5720 | package$util.StringValuesBuilder = StringValuesBuilder;
|
5721 | package$util.valuesOf_4scrhc$ = valuesOf;
|
5722 | package$util.valuesOf_qz9155$ = valuesOf_0;
|
5723 | package$util.valuesOf_shkbj6$ = valuesOf_1;
|
5724 | package$util.valuesOf = valuesOf_2;
|
5725 | package$util.valuesOf_bntsah$ = valuesOf_3;
|
5726 | package$util.toMap_vr6bp2$ = toMap_1;
|
5727 | package$util.flattenEntries_vr6bp2$ = flattenEntries;
|
5728 | package$util.flattenForEach_vel9bh$ = flattenForEach;
|
5729 | package$util.filter_ksha00$ = filter;
|
5730 | package$util.appendFiltered_af8oy2$ = appendFiltered;
|
5731 | package$util.appendAll_k10e8h$ = appendAll;
|
5732 | package$util.escapeHTML_pdl1vz$ = escapeHTML;
|
5733 | $$importsForInline$$['ktor-ktor-utils-jsLegacy'] = _;
|
5734 | package$util.chomp_xxkbvm$ = chomp;
|
5735 | package$util.toLowerCasePreservingASCIIRules_pdl1vz$ = toLowerCasePreservingASCIIRules;
|
5736 | package$util.toUpperCasePreservingASCIIRules_pdl1vz$ = toUpperCasePreservingASCIIRules;
|
5737 | package$util.caseInsensitive_7efafi$ = caseInsensitive;
|
5738 | package$util.CaseInsensitiveString = CaseInsensitiveString;
|
5739 | package$util.get_rootCause_dbl4o4$ = get_rootCause;
|
5740 | var package$cio = package$util.cio || (package$util.cio = {});
|
5741 | package$cio.ChannelIOException = ChannelIOException;
|
5742 | package$cio.ChannelWriteException = ChannelWriteException;
|
5743 | package$cio.ChannelReadException = ChannelReadException;
|
5744 | package$cio.toByteArray_78elpf$ = toByteArray_0;
|
5745 | package$cio.use_wxabi2$ = use;
|
5746 | var package$collections = package$util.collections || (package$util.collections = {});
|
5747 | package$collections.sharedListOf_9fxoq2$ = sharedListOf;
|
5748 | package$collections.ConcurrentCollection = ConcurrentCollection;
|
5749 |
|
5750 | package$collections.ConcurrentList = ConcurrentList;
|
5751 | package$collections.ConcurrentMap_init_bnlk2s$ = ConcurrentMap_init;
|
5752 | package$collections.ConcurrentMap = ConcurrentMap;
|
5753 | package$collections.ConcurrentSet = ConcurrentSet;
|
5754 | var package$internal = package$collections.internal || (package$collections.internal = {});
|
5755 | package$internal.ConcurrentListSlice = ConcurrentListSlice;
|
5756 | package$internal.ConcurrentMapKeys = ConcurrentMapKeys;
|
5757 | package$internal.ConcurrentMapValues = ConcurrentMapValues;
|
5758 | package$internal.ForwardListIterator = ForwardListIterator;
|
5759 | package$internal.ForwardListNode = ForwardListNode;
|
5760 | package$internal.MapNode = MapNode;
|
5761 | package$internal.MutableMapEntries = MutableMapEntries;
|
5762 | package$internal.SharedForwardList = SharedForwardList;
|
5763 | package$internal.SharedList = SharedList;
|
5764 | Object.defineProperty(WeekDay, 'MONDAY', {
|
5765 | get: WeekDay$MONDAY_getInstance});
|
5766 | Object.defineProperty(WeekDay, 'TUESDAY', {
|
5767 | get: WeekDay$TUESDAY_getInstance});
|
5768 | Object.defineProperty(WeekDay, 'WEDNESDAY', {
|
5769 | get: WeekDay$WEDNESDAY_getInstance});
|
5770 | Object.defineProperty(WeekDay, 'THURSDAY', {
|
5771 | get: WeekDay$THURSDAY_getInstance});
|
5772 | Object.defineProperty(WeekDay, 'FRIDAY', {
|
5773 | get: WeekDay$FRIDAY_getInstance});
|
5774 | Object.defineProperty(WeekDay, 'SATURDAY', {
|
5775 | get: WeekDay$SATURDAY_getInstance});
|
5776 | Object.defineProperty(WeekDay, 'SUNDAY', {
|
5777 | get: WeekDay$SUNDAY_getInstance});
|
5778 | Object.defineProperty(WeekDay, 'Companion', {
|
5779 | get: WeekDay$Companion_getInstance});
|
5780 | var package$date = package$util.date || (package$util.date = {});
|
5781 | package$date.WeekDay = WeekDay;
|
5782 | Object.defineProperty(Month, 'JANUARY', {
|
5783 | get: Month$JANUARY_getInstance});
|
5784 | Object.defineProperty(Month, 'FEBRUARY', {
|
5785 | get: Month$FEBRUARY_getInstance});
|
5786 | Object.defineProperty(Month, 'MARCH', {
|
5787 | get: Month$MARCH_getInstance});
|
5788 | Object.defineProperty(Month, 'APRIL', {
|
5789 | get: Month$APRIL_getInstance});
|
5790 | Object.defineProperty(Month, 'MAY', {
|
5791 | get: Month$MAY_getInstance});
|
5792 | Object.defineProperty(Month, 'JUNE', {
|
5793 | get: Month$JUNE_getInstance});
|
5794 | Object.defineProperty(Month, 'JULY', {
|
5795 | get: Month$JULY_getInstance});
|
5796 | Object.defineProperty(Month, 'AUGUST', {
|
5797 | get: Month$AUGUST_getInstance});
|
5798 | Object.defineProperty(Month, 'SEPTEMBER', {
|
5799 | get: Month$SEPTEMBER_getInstance});
|
5800 | Object.defineProperty(Month, 'OCTOBER', {
|
5801 | get: Month$OCTOBER_getInstance});
|
5802 | Object.defineProperty(Month, 'NOVEMBER', {
|
5803 | get: Month$NOVEMBER_getInstance});
|
5804 | Object.defineProperty(Month, 'DECEMBER', {
|
5805 | get: Month$DECEMBER_getInstance});
|
5806 | Object.defineProperty(Month, 'Companion', {
|
5807 | get: Month$Companion_getInstance});
|
5808 | package$date.Month = Month;
|
5809 | Object.defineProperty(GMTDate, 'Companion', {
|
5810 | get: GMTDate$Companion_getInstance});
|
5811 | package$date.GMTDate = GMTDate;
|
5812 | package$date.plus_e4j7mw$ = plus;
|
5813 | package$date.minus_e4j7mw$ = minus;
|
5814 | package$date.truncateToSeconds_bcxie9$ = truncateToSeconds;
|
5815 | Object.defineProperty(GMTDateParser, 'Companion', {
|
5816 | get: GMTDateParser$Companion_getInstance});
|
5817 | package$date.GMTDateParser = GMTDateParser;
|
5818 | package$date.GMTDateBuilder = GMTDateBuilder;
|
5819 | package$date.InvalidDateStringException = InvalidDateStringException;
|
5820 | var package$pipeline = package$util.pipeline || (package$util.pipeline = {});
|
5821 | package$pipeline.ContextDsl = ContextDsl;
|
5822 | Object.defineProperty(PhaseContent, 'Companion', {
|
5823 | get: PhaseContent$Companion_getInstance});
|
5824 | package$pipeline.PhaseContent_init_ctf2er$ = PhaseContent_init;
|
5825 | package$pipeline.PhaseContent = PhaseContent;
|
5826 | package$pipeline.Pipeline_init_phk9fc$ = Pipeline_init;
|
5827 | package$pipeline.Pipeline = Pipeline;
|
5828 | package$pipeline.execute_8vjjyp$ = execute;
|
5829 | package$pipeline.PipelineContext = PipelineContext;
|
5830 | package$pipeline.PipelineExecutor = PipelineExecutor;
|
5831 | package$pipeline.pipelineExecutorFor_uvswee$ = pipelineExecutorFor;
|
5832 | package$pipeline.PipelinePhase = PipelinePhase;
|
5833 | package$pipeline.InvalidPhaseException = InvalidPhaseException;
|
5834 | PipelinePhaseRelation.After = PipelinePhaseRelation$After;
|
5835 | PipelinePhaseRelation.Before = PipelinePhaseRelation$Before;
|
5836 | Object.defineProperty(PipelinePhaseRelation, 'Last', {
|
5837 | get: PipelinePhaseRelation$Last_getInstance});
|
5838 | package$pipeline.PipelinePhaseRelation = PipelinePhaseRelation;
|
5839 | package$pipeline.recoverStackTraceBridge_5yr8tz$ = recoverStackTraceBridge;
|
5840 | Object.defineProperty(package$pipeline, 'StackWalkingFailed', {
|
5841 | get: StackWalkingFailed_getInstance});
|
5842 | Object.defineProperty(package$pipeline, 'StackWalkingFailedFrame', {
|
5843 | get: StackWalkingFailedFrame_getInstance});
|
5844 | package$pipeline.SuspendFunctionGun = SuspendFunctionGun;
|
5845 | package$util.AttributesJsFn = Attributes_0;
|
5846 | package$util.AttributesJs = AttributesJs;
|
5847 | package$util.unmodifiable_cgavii$ = unmodifiable;
|
5848 | package$util.startCoroutineUninterceptedOrReturn3_jwwvsf$ = startCoroutineUninterceptedOrReturn3;
|
5849 | package$util.generateNonce = generateNonce_0;
|
5850 | package$util.Digest_61zpoe$ = Digest_0;
|
5851 | package$util.sha1_fqrh44$ = sha1;
|
5852 | package$util.Lock = Lock;
|
5853 | Object.defineProperty(package$util, 'PlatformUtils', {
|
5854 | get: PlatformUtils_getInstance});
|
5855 | package$util.CoroutineStackFrame = CoroutineStackFrame;
|
5856 | package$util.createStackTraceElement_svyzhk$ = createStackTraceElement;
|
5857 | package$date.GMTDate_mts6q2$ = GMTDate_0;
|
5858 | package$date.GMTDate_qlqxlw$ = GMTDate_1;
|
5859 | package$date.InvalidTimestampException = InvalidTimestampException;
|
5860 | package$date.getTimeMillis = getTimeMillis;
|
5861 | var package$network = package$util.network || (package$util.network = {});
|
5862 | package$network.NetworkAddress = NetworkAddress;
|
5863 | package$network.get_hostname_n5o44p$ = get_hostname;
|
5864 | package$network.get_port_n5o44p$ = get_port;
|
5865 | package$network.NetworkAddress_bm4lxs$ = NetworkAddress_0;
|
5866 | package$network.UnresolvedAddressException = UnresolvedAddressException;
|
5867 | package$pipeline.withCause_6zzckt$ = withCause;
|
5868 | AttributesJs.prototype.get_yzaw86$ = Attributes.prototype.get_yzaw86$;
|
5869 | AttributesJs.prototype.take_yzaw86$ = Attributes.prototype.take_yzaw86$;
|
5870 | AttributesJs.prototype.takeOrNull_yzaw86$ = Attributes.prototype.takeOrNull_yzaw86$;
|
5871 | BASE64_ALPHABET = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
|
5872 | BASE64_MASK = 63;
|
5873 | BASE64_PAD = 61;
|
5874 | var array = new Int32Array(256);
|
5875 | var tmp$;
|
5876 | tmp$ = array.length - 1 | 0;
|
5877 | for (var i = 0; i <= tmp$; i++) {
|
5878 | array[i] = indexOf(BASE64_ALPHABET, toChar(i));
|
5879 | }
|
5880 | BASE64_INVERSE_ALPHABET = array;
|
5881 | CHUNK_BUFFER_SIZE = L4096;
|
5882 | digits = toCharArray('0123456789abcdef');
|
5883 | INITIAL_CAPACITY = 32;
|
5884 | INITIAL_CAPACITY_0 = 32;
|
5885 | MAX_LOAD_FACTOR = 0.5;
|
5886 | UPSIZE_RATIO = 2;
|
5887 | NONCE_SIZE_IN_BYTES = 8;
|
5888 | _crypto = PlatformUtils_getInstance().IS_NODE ? require('crypto') : crypto ? crypto : msCrypto;
|
5889 | Kotlin.defineModule('ktor-ktor-utils-jsLegacy', _);
|
5890 | return _;
|
5891 | }));
|