@zenwave360/workspace-mcp 1.0.0-next.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +449 -0
  3. package/kotlin/antlr-kotlin-antlr-kotlin-runtime.js +9497 -0
  4. package/kotlin/antlr-kotlin-antlr-kotlin-runtime.js.map +1 -0
  5. package/kotlin/dsl-kotlin.js +17039 -0
  6. package/kotlin/dsl-kotlin.js.map +1 -0
  7. package/kotlin/json-schema-ref-parser-kmp.js +2263 -0
  8. package/kotlin/json-schema-ref-parser-kmp.js.map +1 -0
  9. package/kotlin/kotlin-js-core.js +15 -0
  10. package/kotlin/kotlin-js-core.js.map +1 -0
  11. package/kotlin/kotlin-js.js +15 -0
  12. package/kotlin/kotlin-js.js.map +1 -0
  13. package/kotlin/kotlin-kotlin-stdlib.js +10565 -0
  14. package/kotlin/kotlin-kotlin-stdlib.js.map +1 -0
  15. package/kotlin/kotlin-node.js +15 -0
  16. package/kotlin/kotlin-node.js.map +1 -0
  17. package/kotlin/kotlin-plugins-js-plain-objects-runtime.js +15 -0
  18. package/kotlin/kotlin-plugins-js-plain-objects-runtime.js.map +1 -0
  19. package/kotlin/kotlin-web.js +15 -0
  20. package/kotlin/kotlin-web.js.map +1 -0
  21. package/kotlin/kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.js +15 -0
  22. package/kotlin/kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.js.map +1 -0
  23. package/kotlin/kotlinx-atomicfu.js +174 -0
  24. package/kotlin/kotlinx-atomicfu.js.map +1 -0
  25. package/kotlin/kotlinx-coroutines-core.js +3577 -0
  26. package/kotlin/kotlinx-coroutines-core.js.map +1 -0
  27. package/kotlin/kotlinx-serialization-kotlinx-serialization-core.js +15 -0
  28. package/kotlin/kotlinx-serialization-kotlinx-serialization-core.js.map +1 -0
  29. package/kotlin/kotlinx-serialization-kotlinx-serialization-json.js +15 -0
  30. package/kotlin/kotlinx-serialization-kotlinx-serialization-json.js.map +1 -0
  31. package/kotlin/okio-parent-okio.js +2510 -0
  32. package/kotlin/okio-parent-okio.js.map +1 -0
  33. package/kotlin/seskar-core.js +15 -0
  34. package/kotlin/seskar-core.js.map +1 -0
  35. package/kotlin/seskar-react.js +15 -0
  36. package/kotlin/seskar-react.js.map +1 -0
  37. package/kotlin/snakeyaml-engine-kmp.js +5842 -0
  38. package/kotlin/snakeyaml-engine-kmp.js.map +1 -0
  39. package/kotlin/urlencoder-urlencoder-lib.js +322 -0
  40. package/kotlin/urlencoder-urlencoder-lib.js.map +1 -0
  41. package/kotlin/zenwave-manifest-manifest-core.js +15 -0
  42. package/kotlin/zenwave-manifest-manifest-core.js.map +1 -0
  43. package/kotlin/zenwave-manifest-manifest-graph.js +15 -0
  44. package/kotlin/zenwave-manifest-manifest-graph.js.map +1 -0
  45. package/kotlin/zenwave-manifest-workspace-mcp.js +26 -0
  46. package/kotlin/zenwave-manifest-workspace-mcp.js.map +1 -0
  47. package/kotlin/zenwave-manifest-workspace-runtime.js +15 -0
  48. package/kotlin/zenwave-manifest-workspace-runtime.js.map +1 -0
  49. package/package.json +24 -0
@@ -0,0 +1,3577 @@
1
+ (function (factory) {
2
+ if (typeof define === 'function' && define.amd)
3
+ define(['exports', './kotlin-kotlin-stdlib.js', './kotlinx-atomicfu.js'], factory);
4
+ else if (typeof exports === 'object')
5
+ factory(module.exports, require('./kotlin-kotlin-stdlib.js'), require('./kotlinx-atomicfu.js'));
6
+ else {
7
+ if (typeof globalThis['kotlin-kotlin-stdlib'] === 'undefined') {
8
+ throw new Error("Error loading module 'kotlinx-coroutines-core'. Its dependency 'kotlin-kotlin-stdlib' was not found. Please, check whether 'kotlin-kotlin-stdlib' is loaded prior to 'kotlinx-coroutines-core'.");
9
+ }
10
+ if (typeof globalThis['kotlinx-atomicfu'] === 'undefined') {
11
+ throw new Error("Error loading module 'kotlinx-coroutines-core'. Its dependency 'kotlinx-atomicfu' was not found. Please, check whether 'kotlinx-atomicfu' is loaded prior to 'kotlinx-coroutines-core'.");
12
+ }
13
+ globalThis['kotlinx-coroutines-core'] = factory(typeof globalThis['kotlinx-coroutines-core'] === 'undefined' ? {} : globalThis['kotlinx-coroutines-core'], globalThis['kotlin-kotlin-stdlib'], globalThis['kotlinx-atomicfu']);
14
+ }
15
+ }(function (_, kotlin_kotlin, kotlin_org_jetbrains_kotlinx_atomicfu) {
16
+ 'use strict';
17
+ //region block: imports
18
+ var imul = Math.imul;
19
+ var Unit_instance = kotlin_kotlin.$_$.c2;
20
+ var protoOf = kotlin_kotlin.$_$.c7;
21
+ var THROW_CCE = kotlin_kotlin.$_$.t9;
22
+ var Element = kotlin_kotlin.$_$.i5;
23
+ var Continuation = kotlin_kotlin.$_$.e5;
24
+ var initMetadataForClass = kotlin_kotlin.$_$.p6;
25
+ var VOID = kotlin_kotlin.$_$.a;
26
+ var EmptyCoroutineContext_getInstance = kotlin_kotlin.$_$.z1;
27
+ var createCoroutineUnintercepted = kotlin_kotlin.$_$.w4;
28
+ var isInterface = kotlin_kotlin.$_$.y6;
29
+ var toString = kotlin_kotlin.$_$.e7;
30
+ var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.a1;
31
+ var toString_0 = kotlin_kotlin.$_$.ca;
32
+ var atomic$int$1 = kotlin_org_jetbrains_kotlinx_atomicfu.$_$.c;
33
+ var atomic$ref$1 = kotlin_org_jetbrains_kotlinx_atomicfu.$_$.b;
34
+ var get_COROUTINE_SUSPENDED = kotlin_kotlin.$_$.v4;
35
+ var initMetadataForInterface = kotlin_kotlin.$_$.s6;
36
+ var initMetadataForObject = kotlin_kotlin.$_$.u6;
37
+ var hashCode = kotlin_kotlin.$_$.o6;
38
+ var equals = kotlin_kotlin.$_$.l6;
39
+ var atomic$boolean$1 = kotlin_org_jetbrains_kotlinx_atomicfu.$_$.a;
40
+ var CancellationException_init_$Create$ = kotlin_kotlin.$_$.n;
41
+ var Result__exceptionOrNull_impl_p6xea9 = kotlin_kotlin.$_$.w1;
42
+ var _Result___get_value__impl__bjfvqg = kotlin_kotlin.$_$.x1;
43
+ var AbstractCoroutineContextKey = kotlin_kotlin.$_$.a5;
44
+ var Key_instance = kotlin_kotlin.$_$.y1;
45
+ var AbstractCoroutineContextElement = kotlin_kotlin.$_$.z4;
46
+ var get = kotlin_kotlin.$_$.b5;
47
+ var minusKey = kotlin_kotlin.$_$.c5;
48
+ var ContinuationInterceptor = kotlin_kotlin.$_$.d5;
49
+ var RuntimeException_init_$Create$ = kotlin_kotlin.$_$.n1;
50
+ var addSuppressed = kotlin_kotlin.$_$.v9;
51
+ var Enum = kotlin_kotlin.$_$.k9;
52
+ var startCoroutine = kotlin_kotlin.$_$.l5;
53
+ var noWhenBranchMatchedException = kotlin_kotlin.$_$.y9;
54
+ var Long = kotlin_kotlin.$_$.p9;
55
+ var ArrayDeque_init_$Create$ = kotlin_kotlin.$_$.c;
56
+ var compare = kotlin_kotlin.$_$.s5;
57
+ var add = kotlin_kotlin.$_$.p5;
58
+ var subtract = kotlin_kotlin.$_$.y5;
59
+ var RuntimeException = kotlin_kotlin.$_$.s9;
60
+ var RuntimeException_init_$Init$ = kotlin_kotlin.$_$.m1;
61
+ var captureStack = kotlin_kotlin.$_$.d6;
62
+ var Error_0 = kotlin_kotlin.$_$.l9;
63
+ var Error_init_$Init$ = kotlin_kotlin.$_$.t;
64
+ var StringBuilder_init_$Create$ = kotlin_kotlin.$_$.r;
65
+ var throwUninitializedPropertyAccessException = kotlin_kotlin.$_$.n5;
66
+ var ArrayList_init_$Create$ = kotlin_kotlin.$_$.d;
67
+ var CancellationException = kotlin_kotlin.$_$.u4;
68
+ var ArrayList = kotlin_kotlin.$_$.f2;
69
+ var IllegalStateException_init_$Create$_0 = kotlin_kotlin.$_$.b1;
70
+ var plus = kotlin_kotlin.$_$.j5;
71
+ var get_0 = kotlin_kotlin.$_$.g5;
72
+ var fold = kotlin_kotlin.$_$.f5;
73
+ var minusKey_0 = kotlin_kotlin.$_$.h5;
74
+ var anyToString = kotlin_kotlin.$_$.a6;
75
+ var UnsupportedOperationException = kotlin_kotlin.$_$.u9;
76
+ var UnsupportedOperationException_init_$Create$ = kotlin_kotlin.$_$.p1;
77
+ var Exception = kotlin_kotlin.$_$.m9;
78
+ var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.x;
79
+ var Companion_instance = kotlin_kotlin.$_$.b2;
80
+ var createFailure = kotlin_kotlin.$_$.w9;
81
+ var _Result___init__impl__xyqfz8 = kotlin_kotlin.$_$.v1;
82
+ var Exception_init_$Init$ = kotlin_kotlin.$_$.v;
83
+ var defineProp = kotlin_kotlin.$_$.k6;
84
+ var intercepted = kotlin_kotlin.$_$.x4;
85
+ var startCoroutineUninterceptedOrReturnNonGeneratorVersion = kotlin_kotlin.$_$.y4;
86
+ var getKClassFromExpression = kotlin_kotlin.$_$.h7;
87
+ var Exception_init_$Create$ = kotlin_kotlin.$_$.u;
88
+ var CancellationException_init_$Init$ = kotlin_kotlin.$_$.o;
89
+ var ensureNotNull = kotlin_kotlin.$_$.x9;
90
+ var getStringHashCode = kotlin_kotlin.$_$.n6;
91
+ var HashSet_init_$Create$ = kotlin_kotlin.$_$.h;
92
+ var RuntimeException_init_$Init$_0 = kotlin_kotlin.$_$.k1;
93
+ var LinkedHashSet_init_$Create$ = kotlin_kotlin.$_$.m;
94
+ var stackTraceToString = kotlin_kotlin.$_$.ba;
95
+ var removeFirstOrNull = kotlin_kotlin.$_$.k4;
96
+ var KtMutableList = kotlin_kotlin.$_$.k2;
97
+ //endregion
98
+ //region block: pre-declaration
99
+ initMetadataForInterface(ParentJob, 'ParentJob', VOID, VOID, [Element], [0]);
100
+ initMetadataForClass(JobSupport, 'JobSupport', VOID, VOID, [Element, ParentJob], [0]);
101
+ initMetadataForInterface(CoroutineScope, 'CoroutineScope');
102
+ initMetadataForClass(AbstractCoroutine, 'AbstractCoroutine', VOID, JobSupport, [JobSupport, Element, Continuation, CoroutineScope], [0]);
103
+ initMetadataForClass(DeferredCoroutine, 'DeferredCoroutine', VOID, AbstractCoroutine, [AbstractCoroutine, Element], [0]);
104
+ initMetadataForClass(LazyDeferredCoroutine, 'LazyDeferredCoroutine', VOID, DeferredCoroutine, VOID, [0]);
105
+ initMetadataForInterface(Runnable, 'Runnable');
106
+ initMetadataForClass(SchedulerTask, 'SchedulerTask', VOID, VOID, [Runnable]);
107
+ initMetadataForClass(DispatchedTask, 'DispatchedTask', VOID, SchedulerTask);
108
+ initMetadataForClass(CancellableContinuationImpl, 'CancellableContinuationImpl', VOID, DispatchedTask, [DispatchedTask, Continuation]);
109
+ initMetadataForInterface(NotCompleted, 'NotCompleted');
110
+ initMetadataForInterface(CancelHandler, 'CancelHandler', VOID, VOID, [NotCompleted]);
111
+ initMetadataForObject(Active, 'Active', VOID, VOID, [NotCompleted]);
112
+ initMetadataForClass(CompletedContinuation, 'CompletedContinuation');
113
+ initMetadataForClass(LockFreeLinkedListNode, 'LockFreeLinkedListNode', LockFreeLinkedListNode);
114
+ initMetadataForInterface(Incomplete, 'Incomplete');
115
+ initMetadataForClass(JobNode, 'JobNode', VOID, LockFreeLinkedListNode, [LockFreeLinkedListNode, Incomplete]);
116
+ initMetadataForClass(ChildContinuation, 'ChildContinuation', VOID, JobNode);
117
+ initMetadataForClass(CompletedExceptionally, 'CompletedExceptionally');
118
+ initMetadataForClass(CancelledContinuation, 'CancelledContinuation', VOID, CompletedExceptionally);
119
+ initMetadataForObject(Key, 'Key', VOID, AbstractCoroutineContextKey);
120
+ initMetadataForClass(CoroutineDispatcher, 'CoroutineDispatcher', VOID, AbstractCoroutineContextElement, [AbstractCoroutineContextElement, ContinuationInterceptor]);
121
+ initMetadataForObject(Key_0, 'Key');
122
+ initMetadataForObject(GlobalScope, 'GlobalScope', VOID, VOID, [CoroutineScope]);
123
+ initMetadataForClass(CoroutineStart, 'CoroutineStart', VOID, Enum);
124
+ initMetadataForClass(EventLoop, 'EventLoop', VOID, CoroutineDispatcher);
125
+ initMetadataForObject(ThreadLocalEventLoop, 'ThreadLocalEventLoop');
126
+ initMetadataForClass(CompletionHandlerException, 'CompletionHandlerException', VOID, RuntimeException);
127
+ initMetadataForClass(CoroutinesInternalError, 'CoroutinesInternalError', VOID, Error_0);
128
+ initMetadataForObject(Key_1, 'Key');
129
+ initMetadataForObject(NonDisposableHandle, 'NonDisposableHandle');
130
+ initMetadataForClass(Empty, 'Empty', VOID, VOID, [Incomplete]);
131
+ initMetadataForClass(LockFreeLinkedListHead, 'LockFreeLinkedListHead', LockFreeLinkedListHead, LockFreeLinkedListNode);
132
+ initMetadataForClass(NodeList, 'NodeList', NodeList, LockFreeLinkedListHead, [LockFreeLinkedListHead, Incomplete]);
133
+ initMetadataForClass(SynchronizedObject, 'SynchronizedObject', SynchronizedObject);
134
+ initMetadataForClass(Finishing, 'Finishing', VOID, SynchronizedObject, [SynchronizedObject, Incomplete]);
135
+ initMetadataForClass(ChildCompletion, 'ChildCompletion', VOID, JobNode);
136
+ initMetadataForClass(InactiveNodeList, 'InactiveNodeList', VOID, VOID, [Incomplete]);
137
+ initMetadataForClass(InvokeOnCompletion, 'InvokeOnCompletion', VOID, JobNode);
138
+ initMetadataForClass(InvokeOnCancelling, 'InvokeOnCancelling', VOID, JobNode);
139
+ initMetadataForClass(ChildHandleNode, 'ChildHandleNode', VOID, JobNode);
140
+ initMetadataForClass(IncompleteStateBox, 'IncompleteStateBox');
141
+ initMetadataForClass(MainCoroutineDispatcher, 'MainCoroutineDispatcher', VOID, CoroutineDispatcher);
142
+ initMetadataForClass(TimeoutCancellationException, 'TimeoutCancellationException', VOID, CancellationException);
143
+ initMetadataForObject(Unconfined, 'Unconfined', VOID, CoroutineDispatcher);
144
+ initMetadataForObject(Key_2, 'Key');
145
+ initMetadataForClass(ConcurrentLinkedListNode, 'ConcurrentLinkedListNode');
146
+ initMetadataForClass(Segment, 'Segment', VOID, ConcurrentLinkedListNode, [ConcurrentLinkedListNode, NotCompleted]);
147
+ initMetadataForObject(ExceptionSuccessfullyProcessed, 'ExceptionSuccessfullyProcessed', VOID, Exception);
148
+ initMetadataForClass(DispatchedContinuation, 'DispatchedContinuation', VOID, DispatchedTask, [DispatchedTask, Continuation]);
149
+ initMetadataForClass(DispatchException, 'DispatchException', VOID, Exception);
150
+ initMetadataForClass(Symbol, 'Symbol');
151
+ initMetadataForClass(SetTimeoutBasedDispatcher, 'SetTimeoutBasedDispatcher', VOID, CoroutineDispatcher, VOID, [1]);
152
+ initMetadataForObject(NodeDispatcher, 'NodeDispatcher', VOID, SetTimeoutBasedDispatcher, VOID, [1]);
153
+ initMetadataForClass(MessageQueue, 'MessageQueue', VOID, VOID, [KtMutableList]);
154
+ initMetadataForClass(ScheduledMessageQueue, 'ScheduledMessageQueue', VOID, MessageQueue);
155
+ initMetadataForClass(WindowMessageQueue, 'WindowMessageQueue', VOID, MessageQueue);
156
+ initMetadataForObject(Dispatchers, 'Dispatchers');
157
+ initMetadataForClass(JsMainDispatcher, 'JsMainDispatcher', VOID, MainCoroutineDispatcher);
158
+ initMetadataForClass(JobCancellationException, 'JobCancellationException', VOID, CancellationException);
159
+ initMetadataForClass(DiagnosticCoroutineContextException, 'DiagnosticCoroutineContextException', VOID, RuntimeException);
160
+ initMetadataForClass(ListClosed, 'ListClosed', VOID, LockFreeLinkedListNode);
161
+ initMetadataForClass(CommonThreadLocal, 'CommonThreadLocal', CommonThreadLocal);
162
+ initMetadataForClass(UnconfinedEventLoop, 'UnconfinedEventLoop', UnconfinedEventLoop, EventLoop);
163
+ initMetadataForObject(SetTimeoutDispatcher, 'SetTimeoutDispatcher', VOID, SetTimeoutBasedDispatcher, VOID, [1]);
164
+ initMetadataForClass(WindowDispatcher, 'WindowDispatcher', VOID, CoroutineDispatcher, VOID, [1]);
165
+ //endregion
166
+ function AbstractCoroutine(parentContext, initParentJob, active) {
167
+ JobSupport.call(this, active);
168
+ if (initParentJob) {
169
+ this.r4t(parentContext.m8(Key_instance_2));
170
+ }
171
+ this.u4t_1 = parentContext.xe(this);
172
+ }
173
+ protoOf(AbstractCoroutine).f8 = function () {
174
+ return this.u4t_1;
175
+ };
176
+ protoOf(AbstractCoroutine).v4t = function () {
177
+ return this.u4t_1;
178
+ };
179
+ protoOf(AbstractCoroutine).w4t = function () {
180
+ return protoOf(JobSupport).w4t.call(this);
181
+ };
182
+ protoOf(AbstractCoroutine).x4t = function (value) {
183
+ };
184
+ protoOf(AbstractCoroutine).y4t = function (cause, handled) {
185
+ };
186
+ protoOf(AbstractCoroutine).z4t = function () {
187
+ return get_classSimpleName(this) + ' was cancelled';
188
+ };
189
+ protoOf(AbstractCoroutine).a4u = function (state) {
190
+ if (state instanceof CompletedExceptionally) {
191
+ this.y4t(state.b4u_1, state.d4u());
192
+ } else {
193
+ this.x4t((state == null ? true : !(state == null)) ? state : THROW_CCE());
194
+ }
195
+ };
196
+ protoOf(AbstractCoroutine).k8 = function (result) {
197
+ var state = this.e4u(toState_0(result));
198
+ if (state === get_COMPLETING_WAITING_CHILDREN())
199
+ return Unit_instance;
200
+ this.f4u(state);
201
+ };
202
+ protoOf(AbstractCoroutine).f4u = function (state) {
203
+ return this.g4u(state);
204
+ };
205
+ protoOf(AbstractCoroutine).h4u = function (exception) {
206
+ handleCoroutineException(this.u4t_1, exception);
207
+ };
208
+ protoOf(AbstractCoroutine).i4u = function () {
209
+ var tmp0_elvis_lhs = get_coroutineName(this.u4t_1);
210
+ var tmp;
211
+ if (tmp0_elvis_lhs == null) {
212
+ return protoOf(JobSupport).i4u.call(this);
213
+ } else {
214
+ tmp = tmp0_elvis_lhs;
215
+ }
216
+ var coroutineName = tmp;
217
+ return '"' + coroutineName + '":' + protoOf(JobSupport).i4u.call(this);
218
+ };
219
+ protoOf(AbstractCoroutine).j4u = function (start, receiver, block) {
220
+ start.m4u(block, receiver, this);
221
+ };
222
+ function async(_this__u8e3s4, context, start, block) {
223
+ context = context === VOID ? EmptyCoroutineContext_getInstance() : context;
224
+ start = start === VOID ? CoroutineStart_DEFAULT_getInstance() : start;
225
+ var newContext = newCoroutineContext(_this__u8e3s4, context);
226
+ var coroutine = start.n4v() ? new LazyDeferredCoroutine(newContext, block) : new DeferredCoroutine(newContext, true);
227
+ coroutine.j4u(start, coroutine, block);
228
+ return coroutine;
229
+ }
230
+ function DeferredCoroutine(parentContext, active) {
231
+ AbstractCoroutine.call(this, parentContext, true, active);
232
+ }
233
+ protoOf(DeferredCoroutine).r4v = function () {
234
+ var tmp = this.m4v();
235
+ return (tmp == null ? true : !(tmp == null)) ? tmp : THROW_CCE();
236
+ };
237
+ function LazyDeferredCoroutine(parentContext, block) {
238
+ DeferredCoroutine.call(this, parentContext, false);
239
+ this.v4v_1 = createCoroutineUnintercepted(block, this, this);
240
+ }
241
+ protoOf(LazyDeferredCoroutine).s4u = function () {
242
+ startCoroutineCancellable_0(this.v4v_1, this);
243
+ };
244
+ function _get_parentHandle__f8dcex($this) {
245
+ return $this.b4w_1.kotlinx$atomicfu$value;
246
+ }
247
+ function _get_stateDebugRepresentation__bf18u4($this) {
248
+ var tmp0_subject = $this.p4u();
249
+ var tmp;
250
+ if (!(tmp0_subject == null) ? isInterface(tmp0_subject, NotCompleted) : false) {
251
+ tmp = 'Active';
252
+ } else {
253
+ if (tmp0_subject instanceof CancelledContinuation) {
254
+ tmp = 'Cancelled';
255
+ } else {
256
+ tmp = 'Completed';
257
+ }
258
+ }
259
+ return tmp;
260
+ }
261
+ function isReusable($this) {
262
+ var tmp;
263
+ if (get_isReusableMode($this.j4w_1)) {
264
+ var tmp_0 = $this.x4v_1;
265
+ tmp = (tmp_0 instanceof DispatchedContinuation ? tmp_0 : THROW_CCE()).i4w();
266
+ } else {
267
+ tmp = false;
268
+ }
269
+ return tmp;
270
+ }
271
+ function cancelLater($this, cause) {
272
+ if (!isReusable($this))
273
+ return false;
274
+ var tmp = $this.x4v_1;
275
+ var dispatched = tmp instanceof DispatchedContinuation ? tmp : THROW_CCE();
276
+ return dispatched.k4w(cause);
277
+ }
278
+ function callSegmentOnCancellation($this, segment, cause) {
279
+ // Inline function 'kotlinx.coroutines.index' call
280
+ var index = $this.z4v_1.kotlinx$atomicfu$value & 536870911;
281
+ // Inline function 'kotlin.check' call
282
+ if (!!(index === 536870911)) {
283
+ var message = 'The index for Segment.onCancellation(..) is broken';
284
+ throw IllegalStateException_init_$Create$(toString(message));
285
+ }
286
+ // Inline function 'kotlinx.coroutines.CancellableContinuationImpl.callCancelHandlerSafely' call
287
+ try {
288
+ segment.l4w(index, cause, $this.f8());
289
+ } catch ($p) {
290
+ if ($p instanceof Error) {
291
+ var ex = $p;
292
+ handleCoroutineException($this.f8(), new CompletionHandlerException('Exception in invokeOnCancellation handler for ' + $this.toString(), ex));
293
+ } else {
294
+ throw $p;
295
+ }
296
+ }
297
+ }
298
+ function trySuspend($this) {
299
+ // Inline function 'kotlinx.atomicfu.loop' call
300
+ var this_0 = $this.z4v_1;
301
+ while (true) {
302
+ var cur = this_0.kotlinx$atomicfu$value;
303
+ // Inline function 'kotlinx.coroutines.decision' call
304
+ switch (cur >> 29) {
305
+ case 0:
306
+ // Inline function 'kotlinx.coroutines.index' call
307
+
308
+ // Inline function 'kotlinx.coroutines.decisionAndIndex' call
309
+
310
+ var tmp$ret$2 = (1 << 29) + (cur & 536870911) | 0;
311
+ if ($this.z4v_1.atomicfu$compareAndSet(cur, tmp$ret$2))
312
+ return true;
313
+ break;
314
+ case 2:
315
+ return false;
316
+ default:
317
+ // Inline function 'kotlin.error' call
318
+
319
+ var message = 'Already suspended';
320
+ throw IllegalStateException_init_$Create$(toString(message));
321
+ }
322
+ }
323
+ }
324
+ function tryResume($this) {
325
+ // Inline function 'kotlinx.atomicfu.loop' call
326
+ var this_0 = $this.z4v_1;
327
+ while (true) {
328
+ var cur = this_0.kotlinx$atomicfu$value;
329
+ // Inline function 'kotlinx.coroutines.decision' call
330
+ switch (cur >> 29) {
331
+ case 0:
332
+ // Inline function 'kotlinx.coroutines.index' call
333
+
334
+ // Inline function 'kotlinx.coroutines.decisionAndIndex' call
335
+
336
+ var tmp$ret$2 = (2 << 29) + (cur & 536870911) | 0;
337
+ if ($this.z4v_1.atomicfu$compareAndSet(cur, tmp$ret$2))
338
+ return true;
339
+ break;
340
+ case 1:
341
+ return false;
342
+ default:
343
+ // Inline function 'kotlin.error' call
344
+
345
+ var message = 'Already resumed';
346
+ throw IllegalStateException_init_$Create$(toString(message));
347
+ }
348
+ }
349
+ }
350
+ function installParentHandle($this) {
351
+ var tmp0_elvis_lhs = $this.f8().m8(Key_instance_2);
352
+ var tmp;
353
+ if (tmp0_elvis_lhs == null) {
354
+ return null;
355
+ } else {
356
+ tmp = tmp0_elvis_lhs;
357
+ }
358
+ var parent = tmp;
359
+ var handle = invokeOnCompletion(parent, VOID, new ChildContinuation($this));
360
+ $this.b4w_1.atomicfu$compareAndSet(null, handle);
361
+ return handle;
362
+ }
363
+ function dispatchResume($this, mode) {
364
+ if (tryResume($this))
365
+ return Unit_instance;
366
+ dispatch($this, mode);
367
+ }
368
+ function resumedState($this, state, proposedUpdate, resumeMode, onCancellation, idempotent) {
369
+ var tmp;
370
+ if (proposedUpdate instanceof CompletedExceptionally) {
371
+ // Inline function 'kotlinx.coroutines.assert' call
372
+ // Inline function 'kotlinx.coroutines.assert' call
373
+ tmp = proposedUpdate;
374
+ } else {
375
+ if (!get_isCancellableMode(resumeMode) && idempotent == null) {
376
+ tmp = proposedUpdate;
377
+ } else {
378
+ var tmp_0;
379
+ var tmp_1;
380
+ if (!(onCancellation == null)) {
381
+ tmp_1 = true;
382
+ } else {
383
+ tmp_1 = isInterface(state, CancelHandler);
384
+ }
385
+ if (tmp_1) {
386
+ tmp_0 = true;
387
+ } else {
388
+ tmp_0 = !(idempotent == null);
389
+ }
390
+ if (tmp_0) {
391
+ tmp = new CompletedContinuation(proposedUpdate, isInterface(state, CancelHandler) ? state : null, onCancellation, idempotent);
392
+ } else {
393
+ tmp = proposedUpdate;
394
+ }
395
+ }
396
+ }
397
+ return tmp;
398
+ }
399
+ function alreadyResumedError($this, proposedUpdate) {
400
+ // Inline function 'kotlin.error' call
401
+ var message = 'Already resumed, but proposed with update ' + toString_0(proposedUpdate);
402
+ throw IllegalStateException_init_$Create$(toString(message));
403
+ }
404
+ function detachChildIfNonReusable($this) {
405
+ if (!isReusable($this)) {
406
+ $this.m4w();
407
+ }
408
+ }
409
+ function CancellableContinuationImpl(delegate, resumeMode) {
410
+ DispatchedTask.call(this, resumeMode);
411
+ this.x4v_1 = delegate;
412
+ // Inline function 'kotlinx.coroutines.assert' call
413
+ this.y4v_1 = this.x4v_1.f8();
414
+ var tmp = this;
415
+ // Inline function 'kotlinx.coroutines.decisionAndIndex' call
416
+ var tmp$ret$1 = (0 << 29) + 536870911 | 0;
417
+ tmp.z4v_1 = atomic$int$1(tmp$ret$1);
418
+ this.a4w_1 = atomic$ref$1(Active_instance);
419
+ this.b4w_1 = atomic$ref$1(null);
420
+ }
421
+ protoOf(CancellableContinuationImpl).n4w = function () {
422
+ return this.x4v_1;
423
+ };
424
+ protoOf(CancellableContinuationImpl).f8 = function () {
425
+ return this.y4v_1;
426
+ };
427
+ protoOf(CancellableContinuationImpl).p4u = function () {
428
+ return this.a4w_1.kotlinx$atomicfu$value;
429
+ };
430
+ protoOf(CancellableContinuationImpl).q4u = function () {
431
+ var tmp = this.p4u();
432
+ return !(!(tmp == null) ? isInterface(tmp, NotCompleted) : false);
433
+ };
434
+ protoOf(CancellableContinuationImpl).o4w = function () {
435
+ var tmp0_elvis_lhs = installParentHandle(this);
436
+ var tmp;
437
+ if (tmp0_elvis_lhs == null) {
438
+ return Unit_instance;
439
+ } else {
440
+ tmp = tmp0_elvis_lhs;
441
+ }
442
+ var handle = tmp;
443
+ if (this.q4u()) {
444
+ handle.p4w();
445
+ this.b4w_1.kotlinx$atomicfu$value = NonDisposableHandle_instance;
446
+ }
447
+ };
448
+ protoOf(CancellableContinuationImpl).q4w = function () {
449
+ return this.p4u();
450
+ };
451
+ protoOf(CancellableContinuationImpl).r4w = function (takenState, cause) {
452
+ var this_0 = this.a4w_1;
453
+ while (true) {
454
+ var state = this_0.kotlinx$atomicfu$value;
455
+ if (!(state == null) ? isInterface(state, NotCompleted) : false) {
456
+ // Inline function 'kotlin.error' call
457
+ var message = 'Not completed';
458
+ throw IllegalStateException_init_$Create$(toString(message));
459
+ } else {
460
+ if (state instanceof CompletedExceptionally)
461
+ return Unit_instance;
462
+ else {
463
+ if (state instanceof CompletedContinuation) {
464
+ // Inline function 'kotlin.check' call
465
+ if (!!state.x4w()) {
466
+ var message_0 = 'Must be called at most once';
467
+ throw IllegalStateException_init_$Create$(toString(message_0));
468
+ }
469
+ var update = state.y4w(VOID, VOID, VOID, VOID, cause);
470
+ if (this.a4w_1.atomicfu$compareAndSet(state, update)) {
471
+ state.z4w(this, cause);
472
+ return Unit_instance;
473
+ }
474
+ } else {
475
+ if (this.a4w_1.atomicfu$compareAndSet(state, new CompletedContinuation(state, VOID, VOID, VOID, cause))) {
476
+ return Unit_instance;
477
+ }
478
+ }
479
+ }
480
+ }
481
+ }
482
+ return Unit_instance;
483
+ };
484
+ protoOf(CancellableContinuationImpl).a4x = function (cause) {
485
+ // Inline function 'kotlinx.atomicfu.loop' call
486
+ var this_0 = this.a4w_1;
487
+ while (true) {
488
+ var tmp0 = this_0.kotlinx$atomicfu$value;
489
+ $l$block: {
490
+ if (!(!(tmp0 == null) ? isInterface(tmp0, NotCompleted) : false))
491
+ return false;
492
+ var tmp;
493
+ if (isInterface(tmp0, CancelHandler)) {
494
+ tmp = true;
495
+ } else {
496
+ tmp = tmp0 instanceof Segment;
497
+ }
498
+ var update = new CancelledContinuation(this, cause, tmp);
499
+ if (!this.a4w_1.atomicfu$compareAndSet(tmp0, update)) {
500
+ break $l$block;
501
+ }
502
+ if (isInterface(tmp0, CancelHandler)) {
503
+ this.b4x(tmp0, cause);
504
+ } else {
505
+ if (tmp0 instanceof Segment) {
506
+ callSegmentOnCancellation(this, tmp0, cause);
507
+ }
508
+ }
509
+ detachChildIfNonReusable(this);
510
+ dispatchResume(this, this.j4w_1);
511
+ return true;
512
+ }
513
+ }
514
+ };
515
+ protoOf(CancellableContinuationImpl).c4x = function (cause) {
516
+ if (cancelLater(this, cause))
517
+ return Unit_instance;
518
+ this.a4x(cause);
519
+ detachChildIfNonReusable(this);
520
+ };
521
+ protoOf(CancellableContinuationImpl).b4x = function (handler, cause) {
522
+ // Inline function 'kotlinx.coroutines.CancellableContinuationImpl.callCancelHandlerSafely' call
523
+ try {
524
+ handler.d4x(cause);
525
+ } catch ($p) {
526
+ if ($p instanceof Error) {
527
+ var ex = $p;
528
+ handleCoroutineException(this.f8(), new CompletionHandlerException('Exception in invokeOnCancellation handler for ' + this.toString(), ex));
529
+ } else {
530
+ throw $p;
531
+ }
532
+ }
533
+ return Unit_instance;
534
+ };
535
+ protoOf(CancellableContinuationImpl).e4x = function (onCancellation, cause, value) {
536
+ try {
537
+ onCancellation(cause, value, this.f8());
538
+ } catch ($p) {
539
+ if ($p instanceof Error) {
540
+ var ex = $p;
541
+ handleCoroutineException(this.f8(), new CompletionHandlerException('Exception in resume onCancellation handler for ' + this.toString(), ex));
542
+ } else {
543
+ throw $p;
544
+ }
545
+ }
546
+ };
547
+ protoOf(CancellableContinuationImpl).f4x = function (parent) {
548
+ return parent.t4u();
549
+ };
550
+ protoOf(CancellableContinuationImpl).g4x = function () {
551
+ var isReusable_0 = isReusable(this);
552
+ if (trySuspend(this)) {
553
+ if (_get_parentHandle__f8dcex(this) == null) {
554
+ installParentHandle(this);
555
+ }
556
+ if (isReusable_0) {
557
+ this.h4x();
558
+ }
559
+ return get_COROUTINE_SUSPENDED();
560
+ }
561
+ if (isReusable_0) {
562
+ this.h4x();
563
+ }
564
+ var state = this.p4u();
565
+ if (state instanceof CompletedExceptionally)
566
+ throw recoverStackTrace(state.b4u_1, this);
567
+ if (get_isCancellableMode(this.j4w_1)) {
568
+ var job = this.f8().m8(Key_instance_2);
569
+ if (!(job == null) && !job.w4t()) {
570
+ var cause = job.t4u();
571
+ this.r4w(state, cause);
572
+ throw recoverStackTrace(cause, this);
573
+ }
574
+ }
575
+ return this.i4x(state);
576
+ };
577
+ protoOf(CancellableContinuationImpl).h4x = function () {
578
+ var tmp = this.x4v_1;
579
+ var tmp0_safe_receiver = tmp instanceof DispatchedContinuation ? tmp : null;
580
+ var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.j4x(this);
581
+ var tmp_0;
582
+ if (tmp1_elvis_lhs == null) {
583
+ return Unit_instance;
584
+ } else {
585
+ tmp_0 = tmp1_elvis_lhs;
586
+ }
587
+ var cancellationCause = tmp_0;
588
+ this.m4w();
589
+ this.a4x(cancellationCause);
590
+ };
591
+ protoOf(CancellableContinuationImpl).k8 = function (result) {
592
+ return this.k4x(toState(result, this), this.j4w_1);
593
+ };
594
+ protoOf(CancellableContinuationImpl).l4x = function (proposedUpdate, resumeMode, onCancellation) {
595
+ // Inline function 'kotlinx.atomicfu.loop' call
596
+ var this_0 = this.a4w_1;
597
+ while (true) {
598
+ var tmp0 = this_0.kotlinx$atomicfu$value;
599
+ $l$block: {
600
+ if (!(tmp0 == null) ? isInterface(tmp0, NotCompleted) : false) {
601
+ var update = resumedState(this, tmp0, proposedUpdate, resumeMode, onCancellation, null);
602
+ if (!this.a4w_1.atomicfu$compareAndSet(tmp0, update)) {
603
+ break $l$block;
604
+ }
605
+ detachChildIfNonReusable(this);
606
+ dispatchResume(this, resumeMode);
607
+ return Unit_instance;
608
+ } else {
609
+ if (tmp0 instanceof CancelledContinuation) {
610
+ if (tmp0.p4x()) {
611
+ if (onCancellation == null)
612
+ null;
613
+ else {
614
+ // Inline function 'kotlin.let' call
615
+ this.e4x(onCancellation, tmp0.b4u_1, proposedUpdate);
616
+ }
617
+ return Unit_instance;
618
+ }
619
+ }
620
+ }
621
+ alreadyResumedError(this, proposedUpdate);
622
+ }
623
+ }
624
+ };
625
+ protoOf(CancellableContinuationImpl).k4x = function (proposedUpdate, resumeMode, onCancellation, $super) {
626
+ onCancellation = onCancellation === VOID ? null : onCancellation;
627
+ var tmp;
628
+ if ($super === VOID) {
629
+ this.l4x(proposedUpdate, resumeMode, onCancellation);
630
+ tmp = Unit_instance;
631
+ } else {
632
+ tmp = $super.l4x.call(this, proposedUpdate, resumeMode, onCancellation);
633
+ }
634
+ return tmp;
635
+ };
636
+ protoOf(CancellableContinuationImpl).m4w = function () {
637
+ var tmp0_elvis_lhs = _get_parentHandle__f8dcex(this);
638
+ var tmp;
639
+ if (tmp0_elvis_lhs == null) {
640
+ return Unit_instance;
641
+ } else {
642
+ tmp = tmp0_elvis_lhs;
643
+ }
644
+ var handle = tmp;
645
+ handle.p4w();
646
+ this.b4w_1.kotlinx$atomicfu$value = NonDisposableHandle_instance;
647
+ };
648
+ protoOf(CancellableContinuationImpl).i4x = function (state) {
649
+ var tmp;
650
+ if (state instanceof CompletedContinuation) {
651
+ var tmp_0 = state.s4w_1;
652
+ tmp = (tmp_0 == null ? true : !(tmp_0 == null)) ? tmp_0 : THROW_CCE();
653
+ } else {
654
+ tmp = (state == null ? true : !(state == null)) ? state : THROW_CCE();
655
+ }
656
+ return tmp;
657
+ };
658
+ protoOf(CancellableContinuationImpl).q4x = function (state) {
659
+ var tmp0_safe_receiver = protoOf(DispatchedTask).q4x.call(this, state);
660
+ var tmp;
661
+ if (tmp0_safe_receiver == null) {
662
+ tmp = null;
663
+ } else {
664
+ // Inline function 'kotlin.let' call
665
+ tmp = recoverStackTrace(tmp0_safe_receiver, this.x4v_1);
666
+ }
667
+ return tmp;
668
+ };
669
+ protoOf(CancellableContinuationImpl).toString = function () {
670
+ return this.r4x() + '(' + toDebugString(this.x4v_1) + '){' + _get_stateDebugRepresentation__bf18u4(this) + '}@' + get_hexAddress(this);
671
+ };
672
+ protoOf(CancellableContinuationImpl).r4x = function () {
673
+ return 'CancellableContinuation';
674
+ };
675
+ function NotCompleted() {
676
+ }
677
+ function CancelHandler() {
678
+ }
679
+ function Active() {
680
+ }
681
+ protoOf(Active).toString = function () {
682
+ return 'Active';
683
+ };
684
+ var Active_instance;
685
+ function Active_getInstance() {
686
+ return Active_instance;
687
+ }
688
+ function CompletedContinuation(result, cancelHandler, onCancellation, idempotentResume, cancelCause) {
689
+ cancelHandler = cancelHandler === VOID ? null : cancelHandler;
690
+ onCancellation = onCancellation === VOID ? null : onCancellation;
691
+ idempotentResume = idempotentResume === VOID ? null : idempotentResume;
692
+ cancelCause = cancelCause === VOID ? null : cancelCause;
693
+ this.s4w_1 = result;
694
+ this.t4w_1 = cancelHandler;
695
+ this.u4w_1 = onCancellation;
696
+ this.v4w_1 = idempotentResume;
697
+ this.w4w_1 = cancelCause;
698
+ }
699
+ protoOf(CompletedContinuation).x4w = function () {
700
+ return !(this.w4w_1 == null);
701
+ };
702
+ protoOf(CompletedContinuation).z4w = function (cont, cause) {
703
+ var tmp0_safe_receiver = this.t4w_1;
704
+ if (tmp0_safe_receiver == null)
705
+ null;
706
+ else {
707
+ // Inline function 'kotlin.let' call
708
+ cont.b4x(tmp0_safe_receiver, cause);
709
+ }
710
+ var tmp1_safe_receiver = this.u4w_1;
711
+ if (tmp1_safe_receiver == null)
712
+ null;
713
+ else {
714
+ // Inline function 'kotlin.let' call
715
+ cont.e4x(tmp1_safe_receiver, cause, this.s4w_1);
716
+ }
717
+ };
718
+ protoOf(CompletedContinuation).u4x = function (result, cancelHandler, onCancellation, idempotentResume, cancelCause) {
719
+ return new CompletedContinuation(result, cancelHandler, onCancellation, idempotentResume, cancelCause);
720
+ };
721
+ protoOf(CompletedContinuation).y4w = function (result, cancelHandler, onCancellation, idempotentResume, cancelCause, $super) {
722
+ result = result === VOID ? this.s4w_1 : result;
723
+ cancelHandler = cancelHandler === VOID ? this.t4w_1 : cancelHandler;
724
+ onCancellation = onCancellation === VOID ? this.u4w_1 : onCancellation;
725
+ idempotentResume = idempotentResume === VOID ? this.v4w_1 : idempotentResume;
726
+ cancelCause = cancelCause === VOID ? this.w4w_1 : cancelCause;
727
+ return $super === VOID ? this.u4x(result, cancelHandler, onCancellation, idempotentResume, cancelCause) : $super.u4x.call(this, result, cancelHandler, onCancellation, idempotentResume, cancelCause);
728
+ };
729
+ protoOf(CompletedContinuation).toString = function () {
730
+ return 'CompletedContinuation(result=' + toString_0(this.s4w_1) + ', cancelHandler=' + toString_0(this.t4w_1) + ', onCancellation=' + toString_0(this.u4w_1) + ', idempotentResume=' + toString_0(this.v4w_1) + ', cancelCause=' + toString_0(this.w4w_1) + ')';
731
+ };
732
+ protoOf(CompletedContinuation).hashCode = function () {
733
+ var result = this.s4w_1 == null ? 0 : hashCode(this.s4w_1);
734
+ result = imul(result, 31) + (this.t4w_1 == null ? 0 : hashCode(this.t4w_1)) | 0;
735
+ result = imul(result, 31) + (this.u4w_1 == null ? 0 : hashCode(this.u4w_1)) | 0;
736
+ result = imul(result, 31) + (this.v4w_1 == null ? 0 : hashCode(this.v4w_1)) | 0;
737
+ result = imul(result, 31) + (this.w4w_1 == null ? 0 : hashCode(this.w4w_1)) | 0;
738
+ return result;
739
+ };
740
+ protoOf(CompletedContinuation).equals = function (other) {
741
+ if (this === other)
742
+ return true;
743
+ if (!(other instanceof CompletedContinuation))
744
+ return false;
745
+ if (!equals(this.s4w_1, other.s4w_1))
746
+ return false;
747
+ if (!equals(this.t4w_1, other.t4w_1))
748
+ return false;
749
+ if (!equals(this.u4w_1, other.u4w_1))
750
+ return false;
751
+ if (!equals(this.v4w_1, other.v4w_1))
752
+ return false;
753
+ if (!equals(this.w4w_1, other.w4w_1))
754
+ return false;
755
+ return true;
756
+ };
757
+ function ChildContinuation(child) {
758
+ JobNode.call(this);
759
+ this.z4x_1 = child;
760
+ }
761
+ protoOf(ChildContinuation).a4y = function () {
762
+ return true;
763
+ };
764
+ protoOf(ChildContinuation).d4x = function (cause) {
765
+ this.z4x_1.c4x(this.z4x_1.f4x(this.f4y()));
766
+ };
767
+ function CompletedExceptionally(cause, handled) {
768
+ handled = handled === VOID ? false : handled;
769
+ this.b4u_1 = cause;
770
+ this.c4u_1 = atomic$boolean$1(handled);
771
+ }
772
+ protoOf(CompletedExceptionally).d4u = function () {
773
+ return this.c4u_1.kotlinx$atomicfu$value;
774
+ };
775
+ protoOf(CompletedExceptionally).n4y = function () {
776
+ return this.c4u_1.atomicfu$compareAndSet(false, true);
777
+ };
778
+ protoOf(CompletedExceptionally).toString = function () {
779
+ return get_classSimpleName(this) + '[' + this.b4u_1.toString() + ']';
780
+ };
781
+ function CancelledContinuation(continuation, cause, handled) {
782
+ CompletedExceptionally.call(this, cause == null ? CancellationException_init_$Create$('Continuation ' + toString(continuation) + ' was cancelled normally') : cause, handled);
783
+ this.o4x_1 = atomic$boolean$1(false);
784
+ }
785
+ protoOf(CancelledContinuation).p4x = function () {
786
+ return this.o4x_1.atomicfu$compareAndSet(false, true);
787
+ };
788
+ function toState(_this__u8e3s4, caller) {
789
+ // Inline function 'kotlin.getOrElse' call
790
+ var exception = Result__exceptionOrNull_impl_p6xea9(_this__u8e3s4);
791
+ var tmp;
792
+ if (exception == null) {
793
+ var tmp_0 = _Result___get_value__impl__bjfvqg(_this__u8e3s4);
794
+ tmp = (tmp_0 == null ? true : !(tmp_0 == null)) ? tmp_0 : THROW_CCE();
795
+ } else {
796
+ tmp = new CompletedExceptionally(recoverStackTrace(exception, caller));
797
+ }
798
+ return tmp;
799
+ }
800
+ function toState_0(_this__u8e3s4) {
801
+ // Inline function 'kotlin.getOrElse' call
802
+ var exception = Result__exceptionOrNull_impl_p6xea9(_this__u8e3s4);
803
+ var tmp;
804
+ if (exception == null) {
805
+ var tmp_0 = _Result___get_value__impl__bjfvqg(_this__u8e3s4);
806
+ tmp = (tmp_0 == null ? true : !(tmp_0 == null)) ? tmp_0 : THROW_CCE();
807
+ } else {
808
+ tmp = new CompletedExceptionally(exception);
809
+ }
810
+ return tmp;
811
+ }
812
+ function CoroutineDispatcher$Key$_init_$lambda_akl8b5(it) {
813
+ return it instanceof CoroutineDispatcher ? it : null;
814
+ }
815
+ function Key() {
816
+ Key_instance_0 = this;
817
+ var tmp = Key_instance;
818
+ AbstractCoroutineContextKey.call(this, tmp, CoroutineDispatcher$Key$_init_$lambda_akl8b5);
819
+ }
820
+ var Key_instance_0;
821
+ function Key_getInstance() {
822
+ if (Key_instance_0 == null)
823
+ new Key();
824
+ return Key_instance_0;
825
+ }
826
+ function CoroutineDispatcher() {
827
+ Key_getInstance();
828
+ AbstractCoroutineContextElement.call(this, Key_instance);
829
+ }
830
+ protoOf(CoroutineDispatcher).p4y = function (context) {
831
+ return true;
832
+ };
833
+ protoOf(CoroutineDispatcher).n8 = function (continuation) {
834
+ return new DispatchedContinuation(this, continuation);
835
+ };
836
+ protoOf(CoroutineDispatcher).o8 = function (continuation) {
837
+ var dispatched = continuation instanceof DispatchedContinuation ? continuation : THROW_CCE();
838
+ dispatched.r4y();
839
+ };
840
+ protoOf(CoroutineDispatcher).toString = function () {
841
+ return get_classSimpleName(this) + '@' + get_hexAddress(this);
842
+ };
843
+ function handleCoroutineException(context, exception) {
844
+ var tmp;
845
+ if (exception instanceof DispatchException) {
846
+ tmp = exception.s4y_1;
847
+ } else {
848
+ tmp = exception;
849
+ }
850
+ var reportException = tmp;
851
+ try {
852
+ var tmp0_safe_receiver = context.m8(Key_instance_1);
853
+ if (tmp0_safe_receiver == null)
854
+ null;
855
+ else {
856
+ // Inline function 'kotlin.let' call
857
+ tmp0_safe_receiver.t4y(context, reportException);
858
+ return Unit_instance;
859
+ }
860
+ } catch ($p) {
861
+ if ($p instanceof Error) {
862
+ var t = $p;
863
+ handleUncaughtCoroutineException(context, handlerException(reportException, t));
864
+ return Unit_instance;
865
+ } else {
866
+ throw $p;
867
+ }
868
+ }
869
+ handleUncaughtCoroutineException(context, reportException);
870
+ }
871
+ function Key_0() {
872
+ }
873
+ var Key_instance_1;
874
+ function Key_getInstance_0() {
875
+ return Key_instance_1;
876
+ }
877
+ function handlerException(originalException, thrownException) {
878
+ if (originalException === thrownException)
879
+ return originalException;
880
+ // Inline function 'kotlin.apply' call
881
+ var this_0 = RuntimeException_init_$Create$('Exception while trying to handle coroutine exception', thrownException);
882
+ addSuppressed(this_0, originalException);
883
+ return this_0;
884
+ }
885
+ function GlobalScope() {
886
+ }
887
+ protoOf(GlobalScope).v4t = function () {
888
+ return EmptyCoroutineContext_getInstance();
889
+ };
890
+ var GlobalScope_instance;
891
+ function GlobalScope_getInstance() {
892
+ return GlobalScope_instance;
893
+ }
894
+ function CoroutineScope() {
895
+ }
896
+ var CoroutineStart_DEFAULT_instance;
897
+ var CoroutineStart_LAZY_instance;
898
+ var CoroutineStart_ATOMIC_instance;
899
+ var CoroutineStart_UNDISPATCHED_instance;
900
+ var CoroutineStart_entriesInitialized;
901
+ function CoroutineStart_initEntries() {
902
+ if (CoroutineStart_entriesInitialized)
903
+ return Unit_instance;
904
+ CoroutineStart_entriesInitialized = true;
905
+ CoroutineStart_DEFAULT_instance = new CoroutineStart('DEFAULT', 0);
906
+ CoroutineStart_LAZY_instance = new CoroutineStart('LAZY', 1);
907
+ CoroutineStart_ATOMIC_instance = new CoroutineStart('ATOMIC', 2);
908
+ CoroutineStart_UNDISPATCHED_instance = new CoroutineStart('UNDISPATCHED', 3);
909
+ }
910
+ function CoroutineStart(name, ordinal) {
911
+ Enum.call(this, name, ordinal);
912
+ }
913
+ protoOf(CoroutineStart).m4u = function (block, receiver, completion) {
914
+ var tmp;
915
+ switch (this.e2_1) {
916
+ case 0:
917
+ startCoroutineCancellable(block, receiver, completion);
918
+ tmp = Unit_instance;
919
+ break;
920
+ case 2:
921
+ startCoroutine(block, receiver, completion);
922
+ tmp = Unit_instance;
923
+ break;
924
+ case 3:
925
+ startCoroutineUndispatched(block, receiver, completion);
926
+ tmp = Unit_instance;
927
+ break;
928
+ case 1:
929
+ tmp = Unit_instance;
930
+ break;
931
+ default:
932
+ noWhenBranchMatchedException();
933
+ break;
934
+ }
935
+ return tmp;
936
+ };
937
+ protoOf(CoroutineStart).n4v = function () {
938
+ return this === CoroutineStart_LAZY_getInstance();
939
+ };
940
+ function CoroutineStart_DEFAULT_getInstance() {
941
+ CoroutineStart_initEntries();
942
+ return CoroutineStart_DEFAULT_instance;
943
+ }
944
+ function CoroutineStart_LAZY_getInstance() {
945
+ CoroutineStart_initEntries();
946
+ return CoroutineStart_LAZY_instance;
947
+ }
948
+ function delta($this, unconfined) {
949
+ return unconfined ? new Long(0, 1) : new Long(1, 0);
950
+ }
951
+ function EventLoop() {
952
+ CoroutineDispatcher.call(this);
953
+ this.v4y_1 = new Long(0, 0);
954
+ this.w4y_1 = false;
955
+ this.x4y_1 = null;
956
+ }
957
+ protoOf(EventLoop).y4y = function () {
958
+ var tmp0_elvis_lhs = this.x4y_1;
959
+ var tmp;
960
+ if (tmp0_elvis_lhs == null) {
961
+ return false;
962
+ } else {
963
+ tmp = tmp0_elvis_lhs;
964
+ }
965
+ var queue = tmp;
966
+ var tmp1_elvis_lhs = queue.id();
967
+ var tmp_0;
968
+ if (tmp1_elvis_lhs == null) {
969
+ return false;
970
+ } else {
971
+ tmp_0 = tmp1_elvis_lhs;
972
+ }
973
+ var task = tmp_0;
974
+ task.s4x();
975
+ return true;
976
+ };
977
+ protoOf(EventLoop).z4y = function (task) {
978
+ var tmp0_elvis_lhs = this.x4y_1;
979
+ var tmp;
980
+ if (tmp0_elvis_lhs == null) {
981
+ // Inline function 'kotlin.also' call
982
+ var this_0 = ArrayDeque_init_$Create$();
983
+ this.x4y_1 = this_0;
984
+ tmp = this_0;
985
+ } else {
986
+ tmp = tmp0_elvis_lhs;
987
+ }
988
+ var queue = tmp;
989
+ queue.gd(task);
990
+ };
991
+ protoOf(EventLoop).a4z = function () {
992
+ return compare(this.v4y_1, delta(this, true)) >= 0;
993
+ };
994
+ protoOf(EventLoop).b4z = function () {
995
+ var tmp0_safe_receiver = this.x4y_1;
996
+ var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.l();
997
+ return tmp1_elvis_lhs == null ? true : tmp1_elvis_lhs;
998
+ };
999
+ protoOf(EventLoop).c4z = function (unconfined) {
1000
+ this.v4y_1 = add(this.v4y_1, delta(this, unconfined));
1001
+ if (!unconfined)
1002
+ this.w4y_1 = true;
1003
+ };
1004
+ protoOf(EventLoop).d4z = function (unconfined) {
1005
+ this.v4y_1 = subtract(this.v4y_1, delta(this, unconfined));
1006
+ if (compare(this.v4y_1, new Long(0, 0)) > 0)
1007
+ return Unit_instance;
1008
+ // Inline function 'kotlinx.coroutines.assert' call
1009
+ if (this.w4y_1) {
1010
+ this.e4z();
1011
+ }
1012
+ };
1013
+ protoOf(EventLoop).e4z = function () {
1014
+ };
1015
+ function ThreadLocalEventLoop() {
1016
+ ThreadLocalEventLoop_instance = this;
1017
+ this.f4z_1 = commonThreadLocal(new Symbol('ThreadLocalEventLoop'));
1018
+ }
1019
+ protoOf(ThreadLocalEventLoop).g4z = function () {
1020
+ var tmp0_elvis_lhs = this.f4z_1.i4z();
1021
+ var tmp;
1022
+ if (tmp0_elvis_lhs == null) {
1023
+ // Inline function 'kotlin.also' call
1024
+ var this_0 = createEventLoop();
1025
+ ThreadLocalEventLoop_getInstance().f4z_1.r3(this_0);
1026
+ tmp = this_0;
1027
+ } else {
1028
+ tmp = tmp0_elvis_lhs;
1029
+ }
1030
+ return tmp;
1031
+ };
1032
+ var ThreadLocalEventLoop_instance;
1033
+ function ThreadLocalEventLoop_getInstance() {
1034
+ if (ThreadLocalEventLoop_instance == null)
1035
+ new ThreadLocalEventLoop();
1036
+ return ThreadLocalEventLoop_instance;
1037
+ }
1038
+ function CompletionHandlerException(message, cause) {
1039
+ RuntimeException_init_$Init$(message, cause, this);
1040
+ captureStack(this, CompletionHandlerException);
1041
+ }
1042
+ function CoroutinesInternalError(message, cause) {
1043
+ Error_init_$Init$(message, cause, this);
1044
+ captureStack(this, CoroutinesInternalError);
1045
+ }
1046
+ function Key_1() {
1047
+ }
1048
+ var Key_instance_2;
1049
+ function Key_getInstance_1() {
1050
+ return Key_instance_2;
1051
+ }
1052
+ function ParentJob() {
1053
+ }
1054
+ function NonDisposableHandle() {
1055
+ }
1056
+ protoOf(NonDisposableHandle).p4w = function () {
1057
+ };
1058
+ protoOf(NonDisposableHandle).c4v = function (cause) {
1059
+ return false;
1060
+ };
1061
+ protoOf(NonDisposableHandle).toString = function () {
1062
+ return 'NonDisposableHandle';
1063
+ };
1064
+ var NonDisposableHandle_instance;
1065
+ function NonDisposableHandle_getInstance() {
1066
+ return NonDisposableHandle_instance;
1067
+ }
1068
+ function invokeOnCompletion(_this__u8e3s4, invokeImmediately, handler) {
1069
+ invokeImmediately = invokeImmediately === VOID ? true : invokeImmediately;
1070
+ var tmp;
1071
+ if (_this__u8e3s4 instanceof JobSupport) {
1072
+ tmp = _this__u8e3s4.y4u(invokeImmediately, handler);
1073
+ } else {
1074
+ var tmp_0 = handler.a4y();
1075
+ tmp = _this__u8e3s4.x4u(tmp_0, invokeImmediately, JobNode$invoke$ref(handler));
1076
+ }
1077
+ return tmp;
1078
+ }
1079
+ function JobNode$invoke$ref(p0) {
1080
+ var l = function (_this__u8e3s4) {
1081
+ p0.d4x(_this__u8e3s4);
1082
+ return Unit_instance;
1083
+ };
1084
+ l.callableName = 'invoke';
1085
+ return l;
1086
+ }
1087
+ function get_COMPLETING_ALREADY() {
1088
+ _init_properties_JobSupport_kt__68f172();
1089
+ return COMPLETING_ALREADY;
1090
+ }
1091
+ var COMPLETING_ALREADY;
1092
+ function get_COMPLETING_WAITING_CHILDREN() {
1093
+ _init_properties_JobSupport_kt__68f172();
1094
+ return COMPLETING_WAITING_CHILDREN;
1095
+ }
1096
+ var COMPLETING_WAITING_CHILDREN;
1097
+ function get_COMPLETING_RETRY() {
1098
+ _init_properties_JobSupport_kt__68f172();
1099
+ return COMPLETING_RETRY;
1100
+ }
1101
+ var COMPLETING_RETRY;
1102
+ function get_TOO_LATE_TO_CANCEL() {
1103
+ _init_properties_JobSupport_kt__68f172();
1104
+ return TOO_LATE_TO_CANCEL;
1105
+ }
1106
+ var TOO_LATE_TO_CANCEL;
1107
+ function get_SEALED() {
1108
+ _init_properties_JobSupport_kt__68f172();
1109
+ return SEALED;
1110
+ }
1111
+ var SEALED;
1112
+ function get_EMPTY_NEW() {
1113
+ _init_properties_JobSupport_kt__68f172();
1114
+ return EMPTY_NEW;
1115
+ }
1116
+ var EMPTY_NEW;
1117
+ function get_EMPTY_ACTIVE() {
1118
+ _init_properties_JobSupport_kt__68f172();
1119
+ return EMPTY_ACTIVE;
1120
+ }
1121
+ var EMPTY_ACTIVE;
1122
+ function Empty(isActive) {
1123
+ this.j4z_1 = isActive;
1124
+ }
1125
+ protoOf(Empty).w4t = function () {
1126
+ return this.j4z_1;
1127
+ };
1128
+ protoOf(Empty).g4y = function () {
1129
+ return null;
1130
+ };
1131
+ protoOf(Empty).toString = function () {
1132
+ return 'Empty{' + (this.j4z_1 ? 'Active' : 'New') + '}';
1133
+ };
1134
+ function Incomplete() {
1135
+ }
1136
+ function NodeList() {
1137
+ LockFreeLinkedListHead.call(this);
1138
+ }
1139
+ protoOf(NodeList).w4t = function () {
1140
+ return true;
1141
+ };
1142
+ protoOf(NodeList).g4y = function () {
1143
+ return this;
1144
+ };
1145
+ protoOf(NodeList).n4z = function (state) {
1146
+ // Inline function 'kotlin.text.buildString' call
1147
+ // Inline function 'kotlin.apply' call
1148
+ var this_0 = StringBuilder_init_$Create$();
1149
+ this_0.e7('List{');
1150
+ this_0.e7(state);
1151
+ this_0.e7('}[');
1152
+ var first = true;
1153
+ // Inline function 'kotlinx.coroutines.internal.LockFreeLinkedListHead.forEach' call
1154
+ var cur = this.h4y_1;
1155
+ while (!equals(cur, this)) {
1156
+ var node = cur;
1157
+ if (node instanceof JobNode) {
1158
+ if (first) {
1159
+ first = false;
1160
+ } else
1161
+ this_0.e7(', ');
1162
+ this_0.d7(node);
1163
+ }
1164
+ cur = cur.h4y_1;
1165
+ }
1166
+ this_0.e7(']');
1167
+ return this_0.toString();
1168
+ };
1169
+ protoOf(NodeList).toString = function () {
1170
+ return get_DEBUG() ? this.n4z('Active') : protoOf(LockFreeLinkedListHead).toString.call(this);
1171
+ };
1172
+ function JobNode() {
1173
+ LockFreeLinkedListNode.call(this);
1174
+ }
1175
+ protoOf(JobNode).f4y = function () {
1176
+ var tmp = this.e4y_1;
1177
+ if (!(tmp == null))
1178
+ return tmp;
1179
+ else {
1180
+ throwUninitializedPropertyAccessException('job');
1181
+ }
1182
+ };
1183
+ protoOf(JobNode).w4t = function () {
1184
+ return true;
1185
+ };
1186
+ protoOf(JobNode).g4y = function () {
1187
+ return null;
1188
+ };
1189
+ protoOf(JobNode).p4w = function () {
1190
+ return this.f4y().z4u(this);
1191
+ };
1192
+ protoOf(JobNode).toString = function () {
1193
+ return get_classSimpleName(this) + '@' + get_hexAddress(this) + '[job@' + get_hexAddress(this.f4y()) + ']';
1194
+ };
1195
+ function _set_exceptionsHolder__tqm22h($this, value) {
1196
+ $this.s4z_1.kotlinx$atomicfu$value = value;
1197
+ }
1198
+ function _get_exceptionsHolder__nhszp($this) {
1199
+ return $this.s4z_1.kotlinx$atomicfu$value;
1200
+ }
1201
+ function allocateList($this) {
1202
+ return ArrayList_init_$Create$(4);
1203
+ }
1204
+ function finalizeFinishingState($this, state, proposedUpdate) {
1205
+ // Inline function 'kotlinx.coroutines.assert' call
1206
+ // Inline function 'kotlinx.coroutines.assert' call
1207
+ // Inline function 'kotlinx.coroutines.assert' call
1208
+ var tmp0_safe_receiver = proposedUpdate instanceof CompletedExceptionally ? proposedUpdate : null;
1209
+ var proposedException = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.b4u_1;
1210
+ var wasCancelling;
1211
+ // Inline function 'kotlinx.coroutines.internal.synchronized' call
1212
+ // Inline function 'kotlinx.coroutines.internal.synchronizedImpl' call
1213
+ wasCancelling = state.t4z();
1214
+ var exceptions = state.u4z(proposedException);
1215
+ var finalCause = getFinalRootCause($this, state, exceptions);
1216
+ if (!(finalCause == null)) {
1217
+ addSuppressedExceptions($this, finalCause, exceptions);
1218
+ }
1219
+ var finalException = finalCause;
1220
+ var finalState = finalException == null ? proposedUpdate : finalException === proposedException ? proposedUpdate : new CompletedExceptionally(finalException);
1221
+ if (!(finalException == null)) {
1222
+ var handled = cancelParent($this, finalException) || $this.j4v(finalException);
1223
+ if (handled) {
1224
+ (finalState instanceof CompletedExceptionally ? finalState : THROW_CCE()).n4y();
1225
+ }
1226
+ }
1227
+ if (!wasCancelling) {
1228
+ $this.g4v(finalException);
1229
+ }
1230
+ $this.a4u(finalState);
1231
+ var casSuccess = $this.p4t_1.atomicfu$compareAndSet(state, boxIncomplete(finalState));
1232
+ // Inline function 'kotlinx.coroutines.assert' call
1233
+ completeStateFinalization($this, state, finalState);
1234
+ return finalState;
1235
+ }
1236
+ function getFinalRootCause($this, state, exceptions) {
1237
+ if (exceptions.l()) {
1238
+ if (state.t4z()) {
1239
+ // Inline function 'kotlinx.coroutines.JobSupport.defaultCancellationException' call
1240
+ return new JobCancellationException(null == null ? $this.z4t() : null, null, $this);
1241
+ }
1242
+ return null;
1243
+ }
1244
+ var tmp$ret$2;
1245
+ $l$block: {
1246
+ // Inline function 'kotlin.collections.firstOrNull' call
1247
+ var _iterator__ex2g4s = exceptions.i();
1248
+ while (_iterator__ex2g4s.j()) {
1249
+ var element = _iterator__ex2g4s.k();
1250
+ if (!(element instanceof CancellationException)) {
1251
+ tmp$ret$2 = element;
1252
+ break $l$block;
1253
+ }
1254
+ }
1255
+ tmp$ret$2 = null;
1256
+ }
1257
+ var firstNonCancellation = tmp$ret$2;
1258
+ if (!(firstNonCancellation == null))
1259
+ return firstNonCancellation;
1260
+ var first = exceptions.m(0);
1261
+ if (first instanceof TimeoutCancellationException) {
1262
+ var tmp$ret$4;
1263
+ $l$block_0: {
1264
+ // Inline function 'kotlin.collections.firstOrNull' call
1265
+ var _iterator__ex2g4s_0 = exceptions.i();
1266
+ while (_iterator__ex2g4s_0.j()) {
1267
+ var element_0 = _iterator__ex2g4s_0.k();
1268
+ var tmp;
1269
+ if (!(element_0 === first)) {
1270
+ tmp = element_0 instanceof TimeoutCancellationException;
1271
+ } else {
1272
+ tmp = false;
1273
+ }
1274
+ if (tmp) {
1275
+ tmp$ret$4 = element_0;
1276
+ break $l$block_0;
1277
+ }
1278
+ }
1279
+ tmp$ret$4 = null;
1280
+ }
1281
+ var detailedTimeoutException = tmp$ret$4;
1282
+ if (!(detailedTimeoutException == null))
1283
+ return detailedTimeoutException;
1284
+ }
1285
+ return first;
1286
+ }
1287
+ function addSuppressedExceptions($this, rootCause, exceptions) {
1288
+ if (exceptions.n() <= 1)
1289
+ return Unit_instance;
1290
+ var seenExceptions = identitySet(exceptions.n());
1291
+ var unwrappedCause = unwrap(rootCause);
1292
+ var _iterator__ex2g4s = exceptions.i();
1293
+ while (_iterator__ex2g4s.j()) {
1294
+ var exception = _iterator__ex2g4s.k();
1295
+ var unwrapped = unwrap(exception);
1296
+ var tmp;
1297
+ var tmp_0;
1298
+ if (!(unwrapped === rootCause) && !(unwrapped === unwrappedCause)) {
1299
+ tmp_0 = !(unwrapped instanceof CancellationException);
1300
+ } else {
1301
+ tmp_0 = false;
1302
+ }
1303
+ if (tmp_0) {
1304
+ tmp = seenExceptions.h(unwrapped);
1305
+ } else {
1306
+ tmp = false;
1307
+ }
1308
+ if (tmp) {
1309
+ addSuppressed(rootCause, unwrapped);
1310
+ }
1311
+ }
1312
+ }
1313
+ function tryFinalizeSimpleState($this, state, update) {
1314
+ // Inline function 'kotlinx.coroutines.assert' call
1315
+ // Inline function 'kotlinx.coroutines.assert' call
1316
+ if (!$this.p4t_1.atomicfu$compareAndSet(state, boxIncomplete(update)))
1317
+ return false;
1318
+ $this.g4v(null);
1319
+ $this.a4u(update);
1320
+ completeStateFinalization($this, state, update);
1321
+ return true;
1322
+ }
1323
+ function completeStateFinalization($this, state, update) {
1324
+ var tmp0_safe_receiver = $this.o4u();
1325
+ if (tmp0_safe_receiver == null)
1326
+ null;
1327
+ else {
1328
+ // Inline function 'kotlin.let' call
1329
+ tmp0_safe_receiver.p4w();
1330
+ $this.n4u(NonDisposableHandle_instance);
1331
+ }
1332
+ var tmp1_safe_receiver = update instanceof CompletedExceptionally ? update : null;
1333
+ var cause = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.b4u_1;
1334
+ if (state instanceof JobNode) {
1335
+ try {
1336
+ state.d4x(cause);
1337
+ } catch ($p) {
1338
+ if ($p instanceof Error) {
1339
+ var ex = $p;
1340
+ $this.h4u(new CompletionHandlerException('Exception in completion handler ' + state.toString() + ' for ' + $this.toString(), ex));
1341
+ } else {
1342
+ throw $p;
1343
+ }
1344
+ }
1345
+ } else {
1346
+ var tmp2_safe_receiver = state.g4y();
1347
+ if (tmp2_safe_receiver == null)
1348
+ null;
1349
+ else {
1350
+ notifyCompletion($this, tmp2_safe_receiver, cause);
1351
+ }
1352
+ }
1353
+ }
1354
+ function notifyCancelling($this, list, cause) {
1355
+ $this.g4v(cause);
1356
+ list.o4z(4);
1357
+ // Inline function 'kotlinx.coroutines.JobSupport.notifyHandlers' call
1358
+ var exception = null;
1359
+ // Inline function 'kotlinx.coroutines.internal.LockFreeLinkedListHead.forEach' call
1360
+ var cur = list.h4y_1;
1361
+ while (!equals(cur, list)) {
1362
+ var node = cur;
1363
+ var tmp;
1364
+ if (node instanceof JobNode) {
1365
+ tmp = node.a4y();
1366
+ } else {
1367
+ tmp = false;
1368
+ }
1369
+ if (tmp) {
1370
+ try {
1371
+ node.d4x(cause);
1372
+ } catch ($p) {
1373
+ if ($p instanceof Error) {
1374
+ var ex = $p;
1375
+ var tmp0_safe_receiver = exception;
1376
+ var tmp_0;
1377
+ if (tmp0_safe_receiver == null) {
1378
+ tmp_0 = null;
1379
+ } else {
1380
+ // Inline function 'kotlin.apply' call
1381
+ addSuppressed(tmp0_safe_receiver, ex);
1382
+ tmp_0 = tmp0_safe_receiver;
1383
+ }
1384
+ if (tmp_0 == null) {
1385
+ // Inline function 'kotlin.run' call
1386
+ exception = new CompletionHandlerException('Exception in completion handler ' + node.toString() + ' for ' + $this.toString(), ex);
1387
+ }
1388
+ } else {
1389
+ throw $p;
1390
+ }
1391
+ }
1392
+ }
1393
+ cur = cur.h4y_1;
1394
+ }
1395
+ var tmp0_safe_receiver_0 = exception;
1396
+ if (tmp0_safe_receiver_0 == null)
1397
+ null;
1398
+ else {
1399
+ // Inline function 'kotlin.let' call
1400
+ $this.h4u(tmp0_safe_receiver_0);
1401
+ }
1402
+ cancelParent($this, cause);
1403
+ }
1404
+ function cancelParent($this, cause) {
1405
+ if ($this.h4v())
1406
+ return true;
1407
+ var isCancellation = cause instanceof CancellationException;
1408
+ var parent = $this.o4u();
1409
+ if (parent === null || parent === NonDisposableHandle_instance) {
1410
+ return isCancellation;
1411
+ }
1412
+ return parent.c4v(cause) || isCancellation;
1413
+ }
1414
+ function notifyCompletion($this, _this__u8e3s4, cause) {
1415
+ _this__u8e3s4.o4z(1);
1416
+ // Inline function 'kotlinx.coroutines.JobSupport.notifyHandlers' call
1417
+ var exception = null;
1418
+ // Inline function 'kotlinx.coroutines.internal.LockFreeLinkedListHead.forEach' call
1419
+ var cur = _this__u8e3s4.h4y_1;
1420
+ while (!equals(cur, _this__u8e3s4)) {
1421
+ var node = cur;
1422
+ var tmp;
1423
+ if (node instanceof JobNode) {
1424
+ tmp = true;
1425
+ } else {
1426
+ tmp = false;
1427
+ }
1428
+ if (tmp) {
1429
+ try {
1430
+ node.d4x(cause);
1431
+ } catch ($p) {
1432
+ if ($p instanceof Error) {
1433
+ var ex = $p;
1434
+ var tmp0_safe_receiver = exception;
1435
+ var tmp_0;
1436
+ if (tmp0_safe_receiver == null) {
1437
+ tmp_0 = null;
1438
+ } else {
1439
+ // Inline function 'kotlin.apply' call
1440
+ addSuppressed(tmp0_safe_receiver, ex);
1441
+ tmp_0 = tmp0_safe_receiver;
1442
+ }
1443
+ if (tmp_0 == null) {
1444
+ // Inline function 'kotlin.run' call
1445
+ exception = new CompletionHandlerException('Exception in completion handler ' + node.toString() + ' for ' + $this.toString(), ex);
1446
+ }
1447
+ } else {
1448
+ throw $p;
1449
+ }
1450
+ }
1451
+ }
1452
+ cur = cur.h4y_1;
1453
+ }
1454
+ var tmp0_safe_receiver_0 = exception;
1455
+ if (tmp0_safe_receiver_0 == null)
1456
+ null;
1457
+ else {
1458
+ // Inline function 'kotlin.let' call
1459
+ $this.h4u(tmp0_safe_receiver_0);
1460
+ }
1461
+ }
1462
+ function startInternal($this, state) {
1463
+ if (state instanceof Empty) {
1464
+ if (state.j4z_1)
1465
+ return 0;
1466
+ if (!$this.p4t_1.atomicfu$compareAndSet(state, get_EMPTY_ACTIVE()))
1467
+ return -1;
1468
+ $this.s4u();
1469
+ return 1;
1470
+ } else {
1471
+ if (state instanceof InactiveNodeList) {
1472
+ if (!$this.p4t_1.atomicfu$compareAndSet(state, state.v4z_1))
1473
+ return -1;
1474
+ $this.s4u();
1475
+ return 1;
1476
+ } else {
1477
+ return 0;
1478
+ }
1479
+ }
1480
+ }
1481
+ function promoteEmptyToNodeList($this, state) {
1482
+ var list = new NodeList();
1483
+ var update = state.j4z_1 ? list : new InactiveNodeList(list);
1484
+ $this.p4t_1.atomicfu$compareAndSet(state, update);
1485
+ }
1486
+ function promoteSingleToNodeList($this, state) {
1487
+ state.m4y(new NodeList());
1488
+ // Inline function 'kotlinx.coroutines.internal.LockFreeLinkedListNode.nextNode' call
1489
+ var list = state.h4y_1;
1490
+ $this.p4t_1.atomicfu$compareAndSet(state, list);
1491
+ }
1492
+ function cancelMakeCompleting($this, cause) {
1493
+ // Inline function 'kotlinx.coroutines.JobSupport.loopOnState' call
1494
+ while (true) {
1495
+ var state = $this.p4u();
1496
+ var tmp;
1497
+ if (!(!(state == null) ? isInterface(state, Incomplete) : false)) {
1498
+ tmp = true;
1499
+ } else {
1500
+ var tmp_0;
1501
+ if (state instanceof Finishing) {
1502
+ tmp_0 = state.w4z();
1503
+ } else {
1504
+ tmp_0 = false;
1505
+ }
1506
+ tmp = tmp_0;
1507
+ }
1508
+ if (tmp) {
1509
+ return get_COMPLETING_ALREADY();
1510
+ }
1511
+ var proposedUpdate = new CompletedExceptionally(createCauseException($this, cause));
1512
+ var finalState = tryMakeCompleting($this, state, proposedUpdate);
1513
+ if (!(finalState === get_COMPLETING_RETRY()))
1514
+ return finalState;
1515
+ }
1516
+ }
1517
+ function createCauseException($this, cause) {
1518
+ var tmp;
1519
+ if (cause == null ? true : cause instanceof Error) {
1520
+ var tmp_0;
1521
+ if (cause == null) {
1522
+ // Inline function 'kotlinx.coroutines.JobSupport.defaultCancellationException' call
1523
+ tmp_0 = new JobCancellationException(null == null ? $this.z4t() : null, null, $this);
1524
+ } else {
1525
+ tmp_0 = cause;
1526
+ }
1527
+ tmp = tmp_0;
1528
+ } else {
1529
+ tmp = (isInterface(cause, ParentJob) ? cause : THROW_CCE()).e4v();
1530
+ }
1531
+ return tmp;
1532
+ }
1533
+ function makeCancelling($this, cause) {
1534
+ var causeExceptionCache = null;
1535
+ // Inline function 'kotlinx.coroutines.JobSupport.loopOnState' call
1536
+ while (true) {
1537
+ var tmp0 = $this.p4u();
1538
+ $l$block: {
1539
+ if (tmp0 instanceof Finishing) {
1540
+ // Inline function 'kotlinx.coroutines.internal.synchronized' call
1541
+ // Inline function 'kotlinx.coroutines.internal.synchronizedImpl' call
1542
+ if (tmp0.x4z())
1543
+ return get_TOO_LATE_TO_CANCEL();
1544
+ var wasCancelling = tmp0.t4z();
1545
+ if (!(cause == null) || !wasCancelling) {
1546
+ var tmp0_elvis_lhs = causeExceptionCache;
1547
+ var tmp;
1548
+ if (tmp0_elvis_lhs == null) {
1549
+ // Inline function 'kotlin.also' call
1550
+ var this_0 = createCauseException($this, cause);
1551
+ causeExceptionCache = this_0;
1552
+ tmp = this_0;
1553
+ } else {
1554
+ tmp = tmp0_elvis_lhs;
1555
+ }
1556
+ var causeException = tmp;
1557
+ tmp0.y4z(causeException);
1558
+ }
1559
+ // Inline function 'kotlin.takeIf' call
1560
+ var this_1 = tmp0.z4z();
1561
+ var tmp_0;
1562
+ if (!wasCancelling) {
1563
+ tmp_0 = this_1;
1564
+ } else {
1565
+ tmp_0 = null;
1566
+ }
1567
+ var notifyRootCause = tmp_0;
1568
+ if (notifyRootCause == null)
1569
+ null;
1570
+ else {
1571
+ // Inline function 'kotlin.let' call
1572
+ notifyCancelling($this, tmp0.p4z_1, notifyRootCause);
1573
+ }
1574
+ return get_COMPLETING_ALREADY();
1575
+ } else {
1576
+ if (!(tmp0 == null) ? isInterface(tmp0, Incomplete) : false) {
1577
+ var tmp2_elvis_lhs = causeExceptionCache;
1578
+ var tmp_1;
1579
+ if (tmp2_elvis_lhs == null) {
1580
+ // Inline function 'kotlin.also' call
1581
+ var this_2 = createCauseException($this, cause);
1582
+ causeExceptionCache = this_2;
1583
+ tmp_1 = this_2;
1584
+ } else {
1585
+ tmp_1 = tmp2_elvis_lhs;
1586
+ }
1587
+ var causeException_0 = tmp_1;
1588
+ if (tmp0.w4t()) {
1589
+ if (tryMakeCancelling($this, tmp0, causeException_0))
1590
+ return get_COMPLETING_ALREADY();
1591
+ } else {
1592
+ var finalState = tryMakeCompleting($this, tmp0, new CompletedExceptionally(causeException_0));
1593
+ if (finalState === get_COMPLETING_ALREADY()) {
1594
+ // Inline function 'kotlin.error' call
1595
+ var message = 'Cannot happen in ' + toString(tmp0);
1596
+ throw IllegalStateException_init_$Create$(toString(message));
1597
+ } else if (finalState === get_COMPLETING_RETRY()) {
1598
+ break $l$block;
1599
+ } else
1600
+ return finalState;
1601
+ }
1602
+ } else {
1603
+ return get_TOO_LATE_TO_CANCEL();
1604
+ }
1605
+ }
1606
+ }
1607
+ }
1608
+ }
1609
+ function getOrPromoteCancellingList($this, state) {
1610
+ var tmp0_elvis_lhs = state.g4y();
1611
+ var tmp;
1612
+ if (tmp0_elvis_lhs == null) {
1613
+ var tmp_0;
1614
+ if (state instanceof Empty) {
1615
+ tmp_0 = new NodeList();
1616
+ } else {
1617
+ if (state instanceof JobNode) {
1618
+ promoteSingleToNodeList($this, state);
1619
+ tmp_0 = null;
1620
+ } else {
1621
+ var message = 'State should have list: ' + toString(state);
1622
+ throw IllegalStateException_init_$Create$(toString(message));
1623
+ }
1624
+ }
1625
+ tmp = tmp_0;
1626
+ } else {
1627
+ tmp = tmp0_elvis_lhs;
1628
+ }
1629
+ return tmp;
1630
+ }
1631
+ function tryMakeCancelling($this, state, rootCause) {
1632
+ // Inline function 'kotlinx.coroutines.assert' call
1633
+ // Inline function 'kotlinx.coroutines.assert' call
1634
+ var tmp0_elvis_lhs = getOrPromoteCancellingList($this, state);
1635
+ var tmp;
1636
+ if (tmp0_elvis_lhs == null) {
1637
+ return false;
1638
+ } else {
1639
+ tmp = tmp0_elvis_lhs;
1640
+ }
1641
+ var list = tmp;
1642
+ var cancelling = new Finishing(list, false, rootCause);
1643
+ if (!$this.p4t_1.atomicfu$compareAndSet(state, cancelling))
1644
+ return false;
1645
+ notifyCancelling($this, list, rootCause);
1646
+ return true;
1647
+ }
1648
+ function tryMakeCompleting($this, state, proposedUpdate) {
1649
+ if (!(!(state == null) ? isInterface(state, Incomplete) : false))
1650
+ return get_COMPLETING_ALREADY();
1651
+ var tmp;
1652
+ var tmp_0;
1653
+ var tmp_1;
1654
+ if (state instanceof Empty) {
1655
+ tmp_1 = true;
1656
+ } else {
1657
+ tmp_1 = state instanceof JobNode;
1658
+ }
1659
+ if (tmp_1) {
1660
+ tmp_0 = !(state instanceof ChildHandleNode);
1661
+ } else {
1662
+ tmp_0 = false;
1663
+ }
1664
+ if (tmp_0) {
1665
+ tmp = !(proposedUpdate instanceof CompletedExceptionally);
1666
+ } else {
1667
+ tmp = false;
1668
+ }
1669
+ if (tmp) {
1670
+ if (tryFinalizeSimpleState($this, state, proposedUpdate)) {
1671
+ return proposedUpdate;
1672
+ }
1673
+ return get_COMPLETING_RETRY();
1674
+ }
1675
+ return tryMakeCompletingSlowPath($this, state, proposedUpdate);
1676
+ }
1677
+ function tryMakeCompletingSlowPath($this, state, proposedUpdate) {
1678
+ var tmp0_elvis_lhs = getOrPromoteCancellingList($this, state);
1679
+ var tmp;
1680
+ if (tmp0_elvis_lhs == null) {
1681
+ return get_COMPLETING_RETRY();
1682
+ } else {
1683
+ tmp = tmp0_elvis_lhs;
1684
+ }
1685
+ var list = tmp;
1686
+ var tmp1_elvis_lhs = state instanceof Finishing ? state : null;
1687
+ var finishing = tmp1_elvis_lhs == null ? new Finishing(list, false, null) : tmp1_elvis_lhs;
1688
+ var notifyRootCause;
1689
+ // Inline function 'kotlinx.coroutines.internal.synchronized' call
1690
+ // Inline function 'kotlinx.coroutines.internal.synchronizedImpl' call
1691
+ if (finishing.w4z())
1692
+ return get_COMPLETING_ALREADY();
1693
+ finishing.a50(true);
1694
+ if (!(finishing === state)) {
1695
+ if (!$this.p4t_1.atomicfu$compareAndSet(state, finishing))
1696
+ return get_COMPLETING_RETRY();
1697
+ }
1698
+ // Inline function 'kotlinx.coroutines.assert' call
1699
+ var wasCancelling = finishing.t4z();
1700
+ var tmp0_safe_receiver = proposedUpdate instanceof CompletedExceptionally ? proposedUpdate : null;
1701
+ if (tmp0_safe_receiver == null)
1702
+ null;
1703
+ else {
1704
+ // Inline function 'kotlin.let' call
1705
+ finishing.y4z(tmp0_safe_receiver.b4u_1);
1706
+ }
1707
+ // Inline function 'kotlin.takeIf' call
1708
+ var this_0 = finishing.z4z();
1709
+ var tmp_0;
1710
+ if (!wasCancelling) {
1711
+ tmp_0 = this_0;
1712
+ } else {
1713
+ tmp_0 = null;
1714
+ }
1715
+ notifyRootCause = tmp_0;
1716
+ if (notifyRootCause == null)
1717
+ null;
1718
+ else {
1719
+ // Inline function 'kotlin.let' call
1720
+ notifyCancelling($this, list, notifyRootCause);
1721
+ }
1722
+ var child = nextChild($this, list);
1723
+ if (!(child == null) && tryWaitForChild($this, finishing, child, proposedUpdate))
1724
+ return get_COMPLETING_WAITING_CHILDREN();
1725
+ list.o4z(2);
1726
+ var anotherChild = nextChild($this, list);
1727
+ if (!(anotherChild == null) && tryWaitForChild($this, finishing, anotherChild, proposedUpdate))
1728
+ return get_COMPLETING_WAITING_CHILDREN();
1729
+ return finalizeFinishingState($this, finishing, proposedUpdate);
1730
+ }
1731
+ function _get_exceptionOrNull__b3j7js($this, _this__u8e3s4) {
1732
+ var tmp0_safe_receiver = _this__u8e3s4 instanceof CompletedExceptionally ? _this__u8e3s4 : null;
1733
+ return tmp0_safe_receiver == null ? null : tmp0_safe_receiver.b4u_1;
1734
+ }
1735
+ function tryWaitForChild($this, state, child, proposedUpdate) {
1736
+ var $this_0 = $this;
1737
+ var state_0 = state;
1738
+ var child_0 = child;
1739
+ var proposedUpdate_0 = proposedUpdate;
1740
+ $l$1: do {
1741
+ $l$0: do {
1742
+ var handle = invokeOnCompletion(child_0.f50_1, false, new ChildCompletion($this_0, state_0, child_0, proposedUpdate_0));
1743
+ if (!(handle === NonDisposableHandle_instance))
1744
+ return true;
1745
+ var tmp0_elvis_lhs = nextChild($this_0, child_0);
1746
+ var tmp;
1747
+ if (tmp0_elvis_lhs == null) {
1748
+ return false;
1749
+ } else {
1750
+ tmp = tmp0_elvis_lhs;
1751
+ }
1752
+ var nextChild_0 = tmp;
1753
+ var tmp0 = $this_0;
1754
+ var tmp1 = state_0;
1755
+ var tmp3 = proposedUpdate_0;
1756
+ $this_0 = tmp0;
1757
+ state_0 = tmp1;
1758
+ child_0 = nextChild_0;
1759
+ proposedUpdate_0 = tmp3;
1760
+ continue $l$0;
1761
+ }
1762
+ while (false);
1763
+ }
1764
+ while (true);
1765
+ }
1766
+ function continueCompleting($this, state, lastChild, proposedUpdate) {
1767
+ // Inline function 'kotlinx.coroutines.assert' call
1768
+ var waitChild = nextChild($this, lastChild);
1769
+ if (!(waitChild == null) && tryWaitForChild($this, state, waitChild, proposedUpdate))
1770
+ return Unit_instance;
1771
+ state.p4z_1.o4z(2);
1772
+ var waitChildAgain = nextChild($this, lastChild);
1773
+ if (!(waitChildAgain == null) && tryWaitForChild($this, state, waitChildAgain, proposedUpdate)) {
1774
+ return Unit_instance;
1775
+ }
1776
+ var finalState = finalizeFinishingState($this, state, proposedUpdate);
1777
+ $this.g4u(finalState);
1778
+ }
1779
+ function nextChild($this, _this__u8e3s4) {
1780
+ var cur = _this__u8e3s4;
1781
+ $l$loop: while (true) {
1782
+ // Inline function 'kotlinx.coroutines.internal.LockFreeLinkedListNode.isRemoved' call
1783
+ if (!cur.j4y_1) {
1784
+ break $l$loop;
1785
+ }
1786
+ // Inline function 'kotlinx.coroutines.internal.LockFreeLinkedListNode.prevNode' call
1787
+ cur = cur.i4y_1;
1788
+ }
1789
+ $l$loop_0: while (true) {
1790
+ // Inline function 'kotlinx.coroutines.internal.LockFreeLinkedListNode.nextNode' call
1791
+ cur = cur.h4y_1;
1792
+ // Inline function 'kotlinx.coroutines.internal.LockFreeLinkedListNode.isRemoved' call
1793
+ if (cur.j4y_1)
1794
+ continue $l$loop_0;
1795
+ if (cur instanceof ChildHandleNode)
1796
+ return cur;
1797
+ if (cur instanceof NodeList)
1798
+ return null;
1799
+ }
1800
+ }
1801
+ function stateString($this, state) {
1802
+ var tmp;
1803
+ if (state instanceof Finishing) {
1804
+ tmp = state.t4z() ? 'Cancelling' : state.w4z() ? 'Completing' : 'Active';
1805
+ } else {
1806
+ if (!(state == null) ? isInterface(state, Incomplete) : false) {
1807
+ tmp = state.w4t() ? 'Active' : 'New';
1808
+ } else {
1809
+ if (state instanceof CompletedExceptionally) {
1810
+ tmp = 'Cancelled';
1811
+ } else {
1812
+ tmp = 'Completed';
1813
+ }
1814
+ }
1815
+ }
1816
+ return tmp;
1817
+ }
1818
+ function Finishing(list, isCompleting, rootCause) {
1819
+ SynchronizedObject.call(this);
1820
+ this.p4z_1 = list;
1821
+ this.q4z_1 = atomic$boolean$1(isCompleting);
1822
+ this.r4z_1 = atomic$ref$1(rootCause);
1823
+ this.s4z_1 = atomic$ref$1(null);
1824
+ }
1825
+ protoOf(Finishing).g4y = function () {
1826
+ return this.p4z_1;
1827
+ };
1828
+ protoOf(Finishing).a50 = function (value) {
1829
+ this.q4z_1.kotlinx$atomicfu$value = value;
1830
+ };
1831
+ protoOf(Finishing).w4z = function () {
1832
+ return this.q4z_1.kotlinx$atomicfu$value;
1833
+ };
1834
+ protoOf(Finishing).g50 = function (value) {
1835
+ this.r4z_1.kotlinx$atomicfu$value = value;
1836
+ };
1837
+ protoOf(Finishing).z4z = function () {
1838
+ return this.r4z_1.kotlinx$atomicfu$value;
1839
+ };
1840
+ protoOf(Finishing).x4z = function () {
1841
+ return _get_exceptionsHolder__nhszp(this) === get_SEALED();
1842
+ };
1843
+ protoOf(Finishing).t4z = function () {
1844
+ return !(this.z4z() == null);
1845
+ };
1846
+ protoOf(Finishing).w4t = function () {
1847
+ return this.z4z() == null;
1848
+ };
1849
+ protoOf(Finishing).u4z = function (proposedException) {
1850
+ var eh = _get_exceptionsHolder__nhszp(this);
1851
+ var tmp;
1852
+ if (eh == null) {
1853
+ tmp = allocateList(this);
1854
+ } else {
1855
+ if (eh instanceof Error) {
1856
+ // Inline function 'kotlin.also' call
1857
+ var this_0 = allocateList(this);
1858
+ this_0.h(eh);
1859
+ tmp = this_0;
1860
+ } else {
1861
+ if (eh instanceof ArrayList) {
1862
+ tmp = eh instanceof ArrayList ? eh : THROW_CCE();
1863
+ } else {
1864
+ var message = 'State is ' + toString(eh);
1865
+ throw IllegalStateException_init_$Create$(toString(message));
1866
+ }
1867
+ }
1868
+ }
1869
+ var list = tmp;
1870
+ var rootCause = this.z4z();
1871
+ if (rootCause == null)
1872
+ null;
1873
+ else {
1874
+ // Inline function 'kotlin.let' call
1875
+ list.a2(0, rootCause);
1876
+ }
1877
+ if (!(proposedException == null) && !equals(proposedException, rootCause)) {
1878
+ list.h(proposedException);
1879
+ }
1880
+ _set_exceptionsHolder__tqm22h(this, get_SEALED());
1881
+ return list;
1882
+ };
1883
+ protoOf(Finishing).y4z = function (exception) {
1884
+ var rootCause = this.z4z();
1885
+ if (rootCause == null) {
1886
+ this.g50(exception);
1887
+ return Unit_instance;
1888
+ }
1889
+ if (exception === rootCause)
1890
+ return Unit_instance;
1891
+ var eh = _get_exceptionsHolder__nhszp(this);
1892
+ if (eh == null) {
1893
+ _set_exceptionsHolder__tqm22h(this, exception);
1894
+ } else {
1895
+ if (eh instanceof Error) {
1896
+ if (exception === eh)
1897
+ return Unit_instance;
1898
+ // Inline function 'kotlin.apply' call
1899
+ var this_0 = allocateList(this);
1900
+ this_0.h(eh);
1901
+ this_0.h(exception);
1902
+ _set_exceptionsHolder__tqm22h(this, this_0);
1903
+ } else {
1904
+ if (eh instanceof ArrayList) {
1905
+ (eh instanceof ArrayList ? eh : THROW_CCE()).h(exception);
1906
+ } else {
1907
+ // Inline function 'kotlin.error' call
1908
+ var message = 'State is ' + toString(eh);
1909
+ throw IllegalStateException_init_$Create$(toString(message));
1910
+ }
1911
+ }
1912
+ }
1913
+ };
1914
+ protoOf(Finishing).toString = function () {
1915
+ return 'Finishing[cancelling=' + this.t4z() + ', completing=' + this.w4z() + ', rootCause=' + toString_0(this.z4z()) + ', exceptions=' + toString_0(_get_exceptionsHolder__nhszp(this)) + ', list=' + this.p4z_1.toString() + ']';
1916
+ };
1917
+ function ChildCompletion(parent, state, child, proposedUpdate) {
1918
+ JobNode.call(this);
1919
+ this.l50_1 = parent;
1920
+ this.m50_1 = state;
1921
+ this.n50_1 = child;
1922
+ this.o50_1 = proposedUpdate;
1923
+ }
1924
+ protoOf(ChildCompletion).a4y = function () {
1925
+ return false;
1926
+ };
1927
+ protoOf(ChildCompletion).d4x = function (cause) {
1928
+ continueCompleting(this.l50_1, this.m50_1, this.n50_1, this.o50_1);
1929
+ };
1930
+ function JobSupport(active) {
1931
+ this.p4t_1 = atomic$ref$1(active ? get_EMPTY_ACTIVE() : get_EMPTY_NEW());
1932
+ this.q4t_1 = atomic$ref$1(null);
1933
+ }
1934
+ protoOf(JobSupport).n1 = function () {
1935
+ return Key_instance_2;
1936
+ };
1937
+ protoOf(JobSupport).n4u = function (value) {
1938
+ this.q4t_1.kotlinx$atomicfu$value = value;
1939
+ };
1940
+ protoOf(JobSupport).o4u = function () {
1941
+ return this.q4t_1.kotlinx$atomicfu$value;
1942
+ };
1943
+ protoOf(JobSupport).r4t = function (parent) {
1944
+ // Inline function 'kotlinx.coroutines.assert' call
1945
+ if (parent == null) {
1946
+ this.n4u(NonDisposableHandle_instance);
1947
+ return Unit_instance;
1948
+ }
1949
+ parent.r4u();
1950
+ var handle = parent.f4v(this);
1951
+ this.n4u(handle);
1952
+ if (this.q4u()) {
1953
+ handle.p4w();
1954
+ this.n4u(NonDisposableHandle_instance);
1955
+ }
1956
+ };
1957
+ protoOf(JobSupport).p4u = function () {
1958
+ return this.p4t_1.kotlinx$atomicfu$value;
1959
+ };
1960
+ protoOf(JobSupport).w4t = function () {
1961
+ var state = this.p4u();
1962
+ var tmp;
1963
+ if (!(state == null) ? isInterface(state, Incomplete) : false) {
1964
+ tmp = state.w4t();
1965
+ } else {
1966
+ tmp = false;
1967
+ }
1968
+ return tmp;
1969
+ };
1970
+ protoOf(JobSupport).q4u = function () {
1971
+ var tmp = this.p4u();
1972
+ return !(!(tmp == null) ? isInterface(tmp, Incomplete) : false);
1973
+ };
1974
+ protoOf(JobSupport).r4u = function () {
1975
+ // Inline function 'kotlinx.coroutines.JobSupport.loopOnState' call
1976
+ while (true) {
1977
+ var state = this.p4u();
1978
+ var tmp0_subject = startInternal(this, state);
1979
+ if (tmp0_subject === 0)
1980
+ return false;
1981
+ else if (tmp0_subject === 1)
1982
+ return true;
1983
+ }
1984
+ };
1985
+ protoOf(JobSupport).s4u = function () {
1986
+ };
1987
+ protoOf(JobSupport).t4u = function () {
1988
+ var state = this.p4u();
1989
+ var tmp;
1990
+ if (state instanceof Finishing) {
1991
+ var tmp0_safe_receiver = state.z4z();
1992
+ var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : this.u4u(tmp0_safe_receiver, get_classSimpleName(this) + ' is cancelling');
1993
+ var tmp_0;
1994
+ if (tmp1_elvis_lhs == null) {
1995
+ var message = 'Job is still new or active: ' + this.toString();
1996
+ throw IllegalStateException_init_$Create$(toString(message));
1997
+ } else {
1998
+ tmp_0 = tmp1_elvis_lhs;
1999
+ }
2000
+ tmp = tmp_0;
2001
+ } else {
2002
+ if (!(state == null) ? isInterface(state, Incomplete) : false) {
2003
+ var message_0 = 'Job is still new or active: ' + this.toString();
2004
+ throw IllegalStateException_init_$Create$(toString(message_0));
2005
+ } else {
2006
+ if (state instanceof CompletedExceptionally) {
2007
+ tmp = this.v4u(state.b4u_1);
2008
+ } else {
2009
+ tmp = new JobCancellationException(get_classSimpleName(this) + ' has completed normally', null, this);
2010
+ }
2011
+ }
2012
+ }
2013
+ return tmp;
2014
+ };
2015
+ protoOf(JobSupport).u4u = function (_this__u8e3s4, message) {
2016
+ var tmp0_elvis_lhs = _this__u8e3s4 instanceof CancellationException ? _this__u8e3s4 : null;
2017
+ var tmp;
2018
+ if (tmp0_elvis_lhs == null) {
2019
+ // Inline function 'kotlinx.coroutines.JobSupport.defaultCancellationException' call
2020
+ tmp = new JobCancellationException(message == null ? this.z4t() : message, _this__u8e3s4, this);
2021
+ } else {
2022
+ tmp = tmp0_elvis_lhs;
2023
+ }
2024
+ return tmp;
2025
+ };
2026
+ protoOf(JobSupport).v4u = function (_this__u8e3s4, message, $super) {
2027
+ message = message === VOID ? null : message;
2028
+ return $super === VOID ? this.u4u(_this__u8e3s4, message) : $super.u4u.call(this, _this__u8e3s4, message);
2029
+ };
2030
+ protoOf(JobSupport).w4u = function (handler) {
2031
+ return this.y4u(true, new InvokeOnCompletion(handler));
2032
+ };
2033
+ protoOf(JobSupport).x4u = function (onCancelling, invokeImmediately, handler) {
2034
+ var tmp;
2035
+ if (onCancelling) {
2036
+ tmp = new InvokeOnCancelling(handler);
2037
+ } else {
2038
+ tmp = new InvokeOnCompletion(handler);
2039
+ }
2040
+ return this.y4u(invokeImmediately, tmp);
2041
+ };
2042
+ protoOf(JobSupport).y4u = function (invokeImmediately, node) {
2043
+ node.e4y_1 = this;
2044
+ var tmp$ret$0;
2045
+ $l$block_1: {
2046
+ // Inline function 'kotlinx.coroutines.JobSupport.tryPutNodeIntoList' call
2047
+ // Inline function 'kotlinx.coroutines.JobSupport.loopOnState' call
2048
+ while (true) {
2049
+ var state = this.p4u();
2050
+ if (state instanceof Empty) {
2051
+ if (state.j4z_1) {
2052
+ if (this.p4t_1.atomicfu$compareAndSet(state, node)) {
2053
+ tmp$ret$0 = true;
2054
+ break $l$block_1;
2055
+ }
2056
+ } else {
2057
+ promoteEmptyToNodeList(this, state);
2058
+ }
2059
+ } else {
2060
+ if (!(state == null) ? isInterface(state, Incomplete) : false) {
2061
+ var list = state.g4y();
2062
+ if (list == null) {
2063
+ promoteSingleToNodeList(this, state instanceof JobNode ? state : THROW_CCE());
2064
+ } else {
2065
+ var tmp;
2066
+ if (node.a4y()) {
2067
+ var tmp0_safe_receiver = state instanceof Finishing ? state : null;
2068
+ var rootCause = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.z4z();
2069
+ var tmp_0;
2070
+ if (rootCause == null) {
2071
+ tmp_0 = list.k4y(node, 5);
2072
+ } else {
2073
+ if (invokeImmediately) {
2074
+ node.d4x(rootCause);
2075
+ }
2076
+ return NonDisposableHandle_instance;
2077
+ }
2078
+ tmp = tmp_0;
2079
+ } else {
2080
+ tmp = list.k4y(node, 1);
2081
+ }
2082
+ if (tmp) {
2083
+ tmp$ret$0 = true;
2084
+ break $l$block_1;
2085
+ }
2086
+ }
2087
+ } else {
2088
+ tmp$ret$0 = false;
2089
+ break $l$block_1;
2090
+ }
2091
+ }
2092
+ }
2093
+ }
2094
+ var added = tmp$ret$0;
2095
+ if (added)
2096
+ return node;
2097
+ else if (invokeImmediately) {
2098
+ var tmp_1 = this.p4u();
2099
+ var tmp0_safe_receiver_0 = tmp_1 instanceof CompletedExceptionally ? tmp_1 : null;
2100
+ node.d4x(tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.b4u_1);
2101
+ }
2102
+ return NonDisposableHandle_instance;
2103
+ };
2104
+ protoOf(JobSupport).z4u = function (node) {
2105
+ // Inline function 'kotlinx.coroutines.JobSupport.loopOnState' call
2106
+ while (true) {
2107
+ var state = this.p4u();
2108
+ if (state instanceof JobNode) {
2109
+ if (!(state === node))
2110
+ return Unit_instance;
2111
+ if (this.p4t_1.atomicfu$compareAndSet(state, get_EMPTY_ACTIVE()))
2112
+ return Unit_instance;
2113
+ } else {
2114
+ if (!(state == null) ? isInterface(state, Incomplete) : false) {
2115
+ if (!(state.g4y() == null)) {
2116
+ node.l4y();
2117
+ }
2118
+ return Unit_instance;
2119
+ } else {
2120
+ return Unit_instance;
2121
+ }
2122
+ }
2123
+ }
2124
+ };
2125
+ protoOf(JobSupport).a4v = function () {
2126
+ return false;
2127
+ };
2128
+ protoOf(JobSupport).z4t = function () {
2129
+ return 'Job was cancelled';
2130
+ };
2131
+ protoOf(JobSupport).b4v = function (parentJob) {
2132
+ this.d4v(parentJob);
2133
+ };
2134
+ protoOf(JobSupport).c4v = function (cause) {
2135
+ if (cause instanceof CancellationException)
2136
+ return true;
2137
+ return this.d4v(cause) && this.i4v();
2138
+ };
2139
+ protoOf(JobSupport).d4v = function (cause) {
2140
+ var finalState = get_COMPLETING_ALREADY();
2141
+ if (this.a4v()) {
2142
+ finalState = cancelMakeCompleting(this, cause);
2143
+ if (finalState === get_COMPLETING_WAITING_CHILDREN())
2144
+ return true;
2145
+ }
2146
+ if (finalState === get_COMPLETING_ALREADY()) {
2147
+ finalState = makeCancelling(this, cause);
2148
+ }
2149
+ var tmp;
2150
+ if (finalState === get_COMPLETING_ALREADY()) {
2151
+ tmp = true;
2152
+ } else if (finalState === get_COMPLETING_WAITING_CHILDREN()) {
2153
+ tmp = true;
2154
+ } else if (finalState === get_TOO_LATE_TO_CANCEL()) {
2155
+ tmp = false;
2156
+ } else {
2157
+ this.g4u(finalState);
2158
+ tmp = true;
2159
+ }
2160
+ return tmp;
2161
+ };
2162
+ protoOf(JobSupport).e4v = function () {
2163
+ var state = this.p4u();
2164
+ var tmp;
2165
+ if (state instanceof Finishing) {
2166
+ tmp = state.z4z();
2167
+ } else {
2168
+ if (state instanceof CompletedExceptionally) {
2169
+ tmp = state.b4u_1;
2170
+ } else {
2171
+ if (!(state == null) ? isInterface(state, Incomplete) : false) {
2172
+ var message = 'Cannot be cancelling child in this state: ' + toString(state);
2173
+ throw IllegalStateException_init_$Create$(toString(message));
2174
+ } else {
2175
+ tmp = null;
2176
+ }
2177
+ }
2178
+ }
2179
+ var rootCause = tmp;
2180
+ var tmp1_elvis_lhs = rootCause instanceof CancellationException ? rootCause : null;
2181
+ return tmp1_elvis_lhs == null ? new JobCancellationException('Parent job is ' + stateString(this, state), rootCause, this) : tmp1_elvis_lhs;
2182
+ };
2183
+ protoOf(JobSupport).e4u = function (proposedUpdate) {
2184
+ // Inline function 'kotlinx.coroutines.JobSupport.loopOnState' call
2185
+ while (true) {
2186
+ var tmp0 = this.p4u();
2187
+ $l$block: {
2188
+ var finalState = tryMakeCompleting(this, tmp0, proposedUpdate);
2189
+ if (finalState === get_COMPLETING_ALREADY())
2190
+ throw IllegalStateException_init_$Create$_0('Job ' + this.toString() + ' is already complete or completing, ' + ('but is being completed with ' + toString_0(proposedUpdate)), _get_exceptionOrNull__b3j7js(this, proposedUpdate));
2191
+ else if (finalState === get_COMPLETING_RETRY()) {
2192
+ break $l$block;
2193
+ } else
2194
+ return finalState;
2195
+ }
2196
+ }
2197
+ };
2198
+ protoOf(JobSupport).f4v = function (child) {
2199
+ // Inline function 'kotlin.also' call
2200
+ var this_0 = new ChildHandleNode(child);
2201
+ this_0.e4y_1 = this;
2202
+ var node = this_0;
2203
+ var tmp$ret$2;
2204
+ $l$block_1: {
2205
+ // Inline function 'kotlinx.coroutines.JobSupport.tryPutNodeIntoList' call
2206
+ // Inline function 'kotlinx.coroutines.JobSupport.loopOnState' call
2207
+ while (true) {
2208
+ var state = this.p4u();
2209
+ if (state instanceof Empty) {
2210
+ if (state.j4z_1) {
2211
+ if (this.p4t_1.atomicfu$compareAndSet(state, node)) {
2212
+ tmp$ret$2 = true;
2213
+ break $l$block_1;
2214
+ }
2215
+ } else {
2216
+ promoteEmptyToNodeList(this, state);
2217
+ }
2218
+ } else {
2219
+ if (!(state == null) ? isInterface(state, Incomplete) : false) {
2220
+ var list = state.g4y();
2221
+ if (list == null) {
2222
+ promoteSingleToNodeList(this, state instanceof JobNode ? state : THROW_CCE());
2223
+ } else {
2224
+ var addedBeforeCancellation = list.k4y(node, 7);
2225
+ var tmp;
2226
+ if (addedBeforeCancellation) {
2227
+ tmp = true;
2228
+ } else {
2229
+ var addedBeforeCompletion = list.k4y(node, 3);
2230
+ var latestState = this.p4u();
2231
+ var tmp_0;
2232
+ if (latestState instanceof Finishing) {
2233
+ tmp_0 = latestState.z4z();
2234
+ } else {
2235
+ // Inline function 'kotlinx.coroutines.assert' call
2236
+ var tmp0_safe_receiver = latestState instanceof CompletedExceptionally ? latestState : null;
2237
+ tmp_0 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.b4u_1;
2238
+ }
2239
+ var rootCause = tmp_0;
2240
+ node.d4x(rootCause);
2241
+ var tmp_1;
2242
+ if (addedBeforeCompletion) {
2243
+ // Inline function 'kotlinx.coroutines.assert' call
2244
+ tmp_1 = true;
2245
+ } else {
2246
+ return NonDisposableHandle_instance;
2247
+ }
2248
+ tmp = tmp_1;
2249
+ }
2250
+ if (tmp) {
2251
+ tmp$ret$2 = true;
2252
+ break $l$block_1;
2253
+ }
2254
+ }
2255
+ } else {
2256
+ tmp$ret$2 = false;
2257
+ break $l$block_1;
2258
+ }
2259
+ }
2260
+ }
2261
+ }
2262
+ var added = tmp$ret$2;
2263
+ if (added)
2264
+ return node;
2265
+ var tmp_2 = this.p4u();
2266
+ var tmp0_safe_receiver_0 = tmp_2 instanceof CompletedExceptionally ? tmp_2 : null;
2267
+ node.d4x(tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.b4u_1);
2268
+ return NonDisposableHandle_instance;
2269
+ };
2270
+ protoOf(JobSupport).h4u = function (exception) {
2271
+ throw exception;
2272
+ };
2273
+ protoOf(JobSupport).g4v = function (cause) {
2274
+ };
2275
+ protoOf(JobSupport).h4v = function () {
2276
+ return false;
2277
+ };
2278
+ protoOf(JobSupport).i4v = function () {
2279
+ return true;
2280
+ };
2281
+ protoOf(JobSupport).j4v = function (exception) {
2282
+ return false;
2283
+ };
2284
+ protoOf(JobSupport).a4u = function (state) {
2285
+ };
2286
+ protoOf(JobSupport).g4u = function (state) {
2287
+ };
2288
+ protoOf(JobSupport).toString = function () {
2289
+ return this.k4v() + '@' + get_hexAddress(this);
2290
+ };
2291
+ protoOf(JobSupport).k4v = function () {
2292
+ return this.i4u() + '{' + stateString(this, this.p4u()) + '}';
2293
+ };
2294
+ protoOf(JobSupport).i4u = function () {
2295
+ return get_classSimpleName(this);
2296
+ };
2297
+ protoOf(JobSupport).l4v = function () {
2298
+ var state = this.p4u();
2299
+ // Inline function 'kotlin.check' call
2300
+ if (!!(!(state == null) ? isInterface(state, Incomplete) : false)) {
2301
+ var message = 'This job has not completed yet';
2302
+ throw IllegalStateException_init_$Create$(toString(message));
2303
+ }
2304
+ return _get_exceptionOrNull__b3j7js(this, state);
2305
+ };
2306
+ protoOf(JobSupport).m4v = function () {
2307
+ var state = this.p4u();
2308
+ // Inline function 'kotlin.check' call
2309
+ if (!!(!(state == null) ? isInterface(state, Incomplete) : false)) {
2310
+ var message = 'This job has not completed yet';
2311
+ throw IllegalStateException_init_$Create$(toString(message));
2312
+ }
2313
+ if (state instanceof CompletedExceptionally)
2314
+ throw state.b4u_1;
2315
+ return unboxState(state);
2316
+ };
2317
+ function boxIncomplete(_this__u8e3s4) {
2318
+ _init_properties_JobSupport_kt__68f172();
2319
+ var tmp;
2320
+ if (!(_this__u8e3s4 == null) ? isInterface(_this__u8e3s4, Incomplete) : false) {
2321
+ tmp = new IncompleteStateBox(_this__u8e3s4);
2322
+ } else {
2323
+ tmp = _this__u8e3s4;
2324
+ }
2325
+ return tmp;
2326
+ }
2327
+ function InactiveNodeList(list) {
2328
+ this.v4z_1 = list;
2329
+ }
2330
+ protoOf(InactiveNodeList).g4y = function () {
2331
+ return this.v4z_1;
2332
+ };
2333
+ protoOf(InactiveNodeList).w4t = function () {
2334
+ return false;
2335
+ };
2336
+ protoOf(InactiveNodeList).toString = function () {
2337
+ return get_DEBUG() ? this.v4z_1.n4z('New') : anyToString(this);
2338
+ };
2339
+ function InvokeOnCompletion(handler) {
2340
+ JobNode.call(this);
2341
+ this.t50_1 = handler;
2342
+ }
2343
+ protoOf(InvokeOnCompletion).a4y = function () {
2344
+ return false;
2345
+ };
2346
+ protoOf(InvokeOnCompletion).d4x = function (cause) {
2347
+ return this.t50_1(cause);
2348
+ };
2349
+ function InvokeOnCancelling(handler) {
2350
+ JobNode.call(this);
2351
+ this.y50_1 = handler;
2352
+ this.z50_1 = atomic$boolean$1(false);
2353
+ }
2354
+ protoOf(InvokeOnCancelling).a4y = function () {
2355
+ return true;
2356
+ };
2357
+ protoOf(InvokeOnCancelling).d4x = function (cause) {
2358
+ if (this.z50_1.atomicfu$compareAndSet(false, true))
2359
+ this.y50_1(cause);
2360
+ };
2361
+ function ChildHandleNode(childJob) {
2362
+ JobNode.call(this);
2363
+ this.f50_1 = childJob;
2364
+ }
2365
+ protoOf(ChildHandleNode).a4y = function () {
2366
+ return true;
2367
+ };
2368
+ protoOf(ChildHandleNode).d4x = function (cause) {
2369
+ return this.f50_1.b4v(this.f4y());
2370
+ };
2371
+ protoOf(ChildHandleNode).c4v = function (cause) {
2372
+ return this.f4y().c4v(cause);
2373
+ };
2374
+ function unboxState(_this__u8e3s4) {
2375
+ _init_properties_JobSupport_kt__68f172();
2376
+ var tmp0_safe_receiver = _this__u8e3s4 instanceof IncompleteStateBox ? _this__u8e3s4 : null;
2377
+ var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.a51_1;
2378
+ return tmp1_elvis_lhs == null ? _this__u8e3s4 : tmp1_elvis_lhs;
2379
+ }
2380
+ function IncompleteStateBox(state) {
2381
+ this.a51_1 = state;
2382
+ }
2383
+ var properties_initialized_JobSupport_kt_5iq8a4;
2384
+ function _init_properties_JobSupport_kt__68f172() {
2385
+ if (!properties_initialized_JobSupport_kt_5iq8a4) {
2386
+ properties_initialized_JobSupport_kt_5iq8a4 = true;
2387
+ COMPLETING_ALREADY = new Symbol('COMPLETING_ALREADY');
2388
+ COMPLETING_WAITING_CHILDREN = new Symbol('COMPLETING_WAITING_CHILDREN');
2389
+ COMPLETING_RETRY = new Symbol('COMPLETING_RETRY');
2390
+ TOO_LATE_TO_CANCEL = new Symbol('TOO_LATE_TO_CANCEL');
2391
+ SEALED = new Symbol('SEALED');
2392
+ EMPTY_NEW = new Empty(false);
2393
+ EMPTY_ACTIVE = new Empty(true);
2394
+ }
2395
+ }
2396
+ function MainCoroutineDispatcher() {
2397
+ CoroutineDispatcher.call(this);
2398
+ }
2399
+ protoOf(MainCoroutineDispatcher).toString = function () {
2400
+ var tmp0_elvis_lhs = this.d51();
2401
+ return tmp0_elvis_lhs == null ? get_classSimpleName(this) + '@' + get_hexAddress(this) : tmp0_elvis_lhs;
2402
+ };
2403
+ protoOf(MainCoroutineDispatcher).d51 = function () {
2404
+ var main = Dispatchers_getInstance().i51();
2405
+ if (this === main)
2406
+ return 'Dispatchers.Main';
2407
+ var tmp;
2408
+ try {
2409
+ tmp = main.c51();
2410
+ } catch ($p) {
2411
+ var tmp_0;
2412
+ if ($p instanceof UnsupportedOperationException) {
2413
+ var e = $p;
2414
+ tmp_0 = null;
2415
+ } else {
2416
+ throw $p;
2417
+ }
2418
+ tmp = tmp_0;
2419
+ }
2420
+ var immediate = tmp;
2421
+ if (this === immediate)
2422
+ return 'Dispatchers.Main.immediate';
2423
+ return null;
2424
+ };
2425
+ function TimeoutCancellationException() {
2426
+ }
2427
+ function Unconfined() {
2428
+ Unconfined_instance = this;
2429
+ CoroutineDispatcher.call(this);
2430
+ }
2431
+ protoOf(Unconfined).p4y = function (context) {
2432
+ return false;
2433
+ };
2434
+ protoOf(Unconfined).q4y = function (context, block) {
2435
+ var yieldContext = context.m8(Key_instance_3);
2436
+ if (!(yieldContext == null)) {
2437
+ yieldContext.l51_1 = true;
2438
+ return Unit_instance;
2439
+ }
2440
+ throw UnsupportedOperationException_init_$Create$('Dispatchers.Unconfined.dispatch function can only be used by the yield function. If you wrap Unconfined dispatcher in your code, make sure you properly delegate isDispatchNeeded and dispatch calls.');
2441
+ };
2442
+ protoOf(Unconfined).toString = function () {
2443
+ return 'Dispatchers.Unconfined';
2444
+ };
2445
+ var Unconfined_instance;
2446
+ function Unconfined_getInstance() {
2447
+ if (Unconfined_instance == null)
2448
+ new Unconfined();
2449
+ return Unconfined_instance;
2450
+ }
2451
+ function Key_2() {
2452
+ }
2453
+ var Key_instance_3;
2454
+ function Key_getInstance_2() {
2455
+ return Key_instance_3;
2456
+ }
2457
+ function Segment() {
2458
+ }
2459
+ function ConcurrentLinkedListNode() {
2460
+ }
2461
+ function handleUncaughtCoroutineException(context, exception) {
2462
+ var _iterator__ex2g4s = get_platformExceptionHandlers().i();
2463
+ while (_iterator__ex2g4s.j()) {
2464
+ var handler = _iterator__ex2g4s.k();
2465
+ try {
2466
+ handler.t4y(context, exception);
2467
+ } catch ($p) {
2468
+ if ($p instanceof ExceptionSuccessfullyProcessed) {
2469
+ var _unused_var__etf5q3 = $p;
2470
+ return Unit_instance;
2471
+ } else {
2472
+ if ($p instanceof Error) {
2473
+ var t = $p;
2474
+ propagateExceptionFinalResort(handlerException(exception, t));
2475
+ } else {
2476
+ throw $p;
2477
+ }
2478
+ }
2479
+ }
2480
+ }
2481
+ try {
2482
+ addSuppressed(exception, new DiagnosticCoroutineContextException(context));
2483
+ } catch ($p) {
2484
+ if ($p instanceof Error) {
2485
+ var e = $p;
2486
+ } else {
2487
+ throw $p;
2488
+ }
2489
+ }
2490
+ propagateExceptionFinalResort(exception);
2491
+ }
2492
+ function ExceptionSuccessfullyProcessed() {
2493
+ }
2494
+ function get_UNDEFINED() {
2495
+ _init_properties_DispatchedContinuation_kt__tnmqc0();
2496
+ return UNDEFINED;
2497
+ }
2498
+ var UNDEFINED;
2499
+ function get_REUSABLE_CLAIMED() {
2500
+ _init_properties_DispatchedContinuation_kt__tnmqc0();
2501
+ return REUSABLE_CLAIMED;
2502
+ }
2503
+ var REUSABLE_CLAIMED;
2504
+ function _get_reusableCancellableContinuation__9qex09($this) {
2505
+ var tmp = $this.h4w_1.kotlinx$atomicfu$value;
2506
+ return tmp instanceof CancellableContinuationImpl ? tmp : null;
2507
+ }
2508
+ function DispatchedContinuation(dispatcher, continuation) {
2509
+ DispatchedTask.call(this, -1);
2510
+ this.d4w_1 = dispatcher;
2511
+ this.e4w_1 = continuation;
2512
+ this.f4w_1 = get_UNDEFINED();
2513
+ this.g4w_1 = threadContextElements(this.f8());
2514
+ this.h4w_1 = atomic$ref$1(null);
2515
+ }
2516
+ protoOf(DispatchedContinuation).i4w = function () {
2517
+ return !(this.h4w_1.kotlinx$atomicfu$value == null);
2518
+ };
2519
+ protoOf(DispatchedContinuation).m51 = function () {
2520
+ // Inline function 'kotlinx.atomicfu.loop' call
2521
+ var this_0 = this.h4w_1;
2522
+ while (true) {
2523
+ if (!(this_0.kotlinx$atomicfu$value === get_REUSABLE_CLAIMED()))
2524
+ return Unit_instance;
2525
+ }
2526
+ };
2527
+ protoOf(DispatchedContinuation).r4y = function () {
2528
+ this.m51();
2529
+ var tmp0_safe_receiver = _get_reusableCancellableContinuation__9qex09(this);
2530
+ if (tmp0_safe_receiver == null)
2531
+ null;
2532
+ else {
2533
+ tmp0_safe_receiver.m4w();
2534
+ }
2535
+ };
2536
+ protoOf(DispatchedContinuation).j4x = function (continuation) {
2537
+ // Inline function 'kotlinx.atomicfu.loop' call
2538
+ var this_0 = this.h4w_1;
2539
+ while (true) {
2540
+ var state = this_0.kotlinx$atomicfu$value;
2541
+ if (state === get_REUSABLE_CLAIMED()) {
2542
+ if (this.h4w_1.atomicfu$compareAndSet(get_REUSABLE_CLAIMED(), continuation))
2543
+ return null;
2544
+ } else {
2545
+ if (state instanceof Error) {
2546
+ // Inline function 'kotlin.require' call
2547
+ // Inline function 'kotlin.require' call
2548
+ if (!this.h4w_1.atomicfu$compareAndSet(state, null)) {
2549
+ var message = 'Failed requirement.';
2550
+ throw IllegalArgumentException_init_$Create$(toString(message));
2551
+ }
2552
+ return state;
2553
+ } else {
2554
+ // Inline function 'kotlin.error' call
2555
+ var message_0 = 'Inconsistent state ' + toString_0(state);
2556
+ throw IllegalStateException_init_$Create$(toString(message_0));
2557
+ }
2558
+ }
2559
+ }
2560
+ };
2561
+ protoOf(DispatchedContinuation).k4w = function (cause) {
2562
+ // Inline function 'kotlinx.atomicfu.loop' call
2563
+ var this_0 = this.h4w_1;
2564
+ while (true) {
2565
+ var state = this_0.kotlinx$atomicfu$value;
2566
+ if (equals(state, get_REUSABLE_CLAIMED())) {
2567
+ if (this.h4w_1.atomicfu$compareAndSet(get_REUSABLE_CLAIMED(), cause))
2568
+ return true;
2569
+ } else {
2570
+ if (state instanceof Error)
2571
+ return true;
2572
+ else {
2573
+ if (this.h4w_1.atomicfu$compareAndSet(state, null))
2574
+ return false;
2575
+ }
2576
+ }
2577
+ }
2578
+ };
2579
+ protoOf(DispatchedContinuation).q4w = function () {
2580
+ var state = this.f4w_1;
2581
+ // Inline function 'kotlinx.coroutines.assert' call
2582
+ this.f4w_1 = get_UNDEFINED();
2583
+ return state;
2584
+ };
2585
+ protoOf(DispatchedContinuation).n4w = function () {
2586
+ return this;
2587
+ };
2588
+ protoOf(DispatchedContinuation).k8 = function (result) {
2589
+ var state = toState_0(result);
2590
+ if (safeIsDispatchNeeded(this.d4w_1, this.f8())) {
2591
+ this.f4w_1 = state;
2592
+ this.j4w_1 = 0;
2593
+ safeDispatch(this.d4w_1, this.f8(), this);
2594
+ } else {
2595
+ $l$block: {
2596
+ // Inline function 'kotlinx.coroutines.internal.executeUnconfined' call
2597
+ // Inline function 'kotlinx.coroutines.assert' call
2598
+ var eventLoop = ThreadLocalEventLoop_getInstance().g4z();
2599
+ if (false && eventLoop.b4z()) {
2600
+ break $l$block;
2601
+ }
2602
+ var tmp;
2603
+ if (eventLoop.a4z()) {
2604
+ this.f4w_1 = state;
2605
+ this.j4w_1 = 0;
2606
+ eventLoop.z4y(this);
2607
+ tmp = true;
2608
+ } else {
2609
+ // Inline function 'kotlinx.coroutines.runUnconfinedEventLoop' call
2610
+ eventLoop.c4z(true);
2611
+ try {
2612
+ this.f8();
2613
+ // Inline function 'kotlinx.coroutines.withCoroutineContext' call
2614
+ this.g4w_1;
2615
+ this.e4w_1.k8(result);
2616
+ $l$loop: while (eventLoop.y4y()) {
2617
+ }
2618
+ } catch ($p) {
2619
+ if ($p instanceof Error) {
2620
+ var e = $p;
2621
+ this.t4x(e);
2622
+ } else {
2623
+ throw $p;
2624
+ }
2625
+ }
2626
+ finally {
2627
+ eventLoop.d4z(true);
2628
+ }
2629
+ tmp = false;
2630
+ }
2631
+ }
2632
+ }
2633
+ };
2634
+ protoOf(DispatchedContinuation).toString = function () {
2635
+ return 'DispatchedContinuation[' + this.d4w_1.toString() + ', ' + toDebugString(this.e4w_1) + ']';
2636
+ };
2637
+ protoOf(DispatchedContinuation).f8 = function () {
2638
+ return this.e4w_1.f8();
2639
+ };
2640
+ function safeDispatch(_this__u8e3s4, context, runnable) {
2641
+ _init_properties_DispatchedContinuation_kt__tnmqc0();
2642
+ try {
2643
+ _this__u8e3s4.q4y(context, runnable);
2644
+ } catch ($p) {
2645
+ if ($p instanceof Error) {
2646
+ var e = $p;
2647
+ throw new DispatchException(e, _this__u8e3s4, context);
2648
+ } else {
2649
+ throw $p;
2650
+ }
2651
+ }
2652
+ }
2653
+ function safeIsDispatchNeeded(_this__u8e3s4, context) {
2654
+ _init_properties_DispatchedContinuation_kt__tnmqc0();
2655
+ try {
2656
+ return _this__u8e3s4.p4y(context);
2657
+ } catch ($p) {
2658
+ if ($p instanceof Error) {
2659
+ var e = $p;
2660
+ throw new DispatchException(e, _this__u8e3s4, context);
2661
+ } else {
2662
+ throw $p;
2663
+ }
2664
+ }
2665
+ }
2666
+ function resumeCancellableWithInternal(_this__u8e3s4, result) {
2667
+ _init_properties_DispatchedContinuation_kt__tnmqc0();
2668
+ var tmp;
2669
+ if (_this__u8e3s4 instanceof DispatchedContinuation) {
2670
+ // Inline function 'kotlinx.coroutines.internal.DispatchedContinuation.resumeCancellableWith' call
2671
+ var state = toState_0(result);
2672
+ if (safeIsDispatchNeeded(_this__u8e3s4.d4w_1, _this__u8e3s4.f8())) {
2673
+ _this__u8e3s4.f4w_1 = state;
2674
+ _this__u8e3s4.j4w_1 = 1;
2675
+ safeDispatch(_this__u8e3s4.d4w_1, _this__u8e3s4.f8(), _this__u8e3s4);
2676
+ } else {
2677
+ $l$block: {
2678
+ // Inline function 'kotlinx.coroutines.internal.executeUnconfined' call
2679
+ // Inline function 'kotlinx.coroutines.assert' call
2680
+ var eventLoop = ThreadLocalEventLoop_getInstance().g4z();
2681
+ if (false && eventLoop.b4z()) {
2682
+ break $l$block;
2683
+ }
2684
+ var tmp_0;
2685
+ if (eventLoop.a4z()) {
2686
+ _this__u8e3s4.f4w_1 = state;
2687
+ _this__u8e3s4.j4w_1 = 1;
2688
+ eventLoop.z4y(_this__u8e3s4);
2689
+ tmp_0 = true;
2690
+ } else {
2691
+ // Inline function 'kotlinx.coroutines.runUnconfinedEventLoop' call
2692
+ eventLoop.c4z(true);
2693
+ try {
2694
+ var tmp$ret$4;
2695
+ $l$block_0: {
2696
+ // Inline function 'kotlinx.coroutines.internal.DispatchedContinuation.resumeCancelled' call
2697
+ var job = _this__u8e3s4.f8().m8(Key_instance_2);
2698
+ if (!(job == null) && !job.w4t()) {
2699
+ var cause = job.t4u();
2700
+ _this__u8e3s4.r4w(state, cause);
2701
+ // Inline function 'kotlin.coroutines.resumeWithException' call
2702
+ // Inline function 'kotlin.Companion.failure' call
2703
+ var tmp$ret$2 = _Result___init__impl__xyqfz8(createFailure(cause));
2704
+ _this__u8e3s4.k8(tmp$ret$2);
2705
+ tmp$ret$4 = true;
2706
+ break $l$block_0;
2707
+ }
2708
+ tmp$ret$4 = false;
2709
+ }
2710
+ if (!tmp$ret$4) {
2711
+ // Inline function 'kotlinx.coroutines.internal.DispatchedContinuation.resumeUndispatchedWith' call
2712
+ _this__u8e3s4.e4w_1;
2713
+ // Inline function 'kotlinx.coroutines.withContinuationContext' call
2714
+ _this__u8e3s4.g4w_1;
2715
+ _this__u8e3s4.e4w_1.k8(result);
2716
+ }
2717
+ $l$loop: while (eventLoop.y4y()) {
2718
+ }
2719
+ } catch ($p) {
2720
+ if ($p instanceof Error) {
2721
+ var e = $p;
2722
+ _this__u8e3s4.t4x(e);
2723
+ } else {
2724
+ throw $p;
2725
+ }
2726
+ }
2727
+ finally {
2728
+ eventLoop.d4z(true);
2729
+ }
2730
+ tmp_0 = false;
2731
+ }
2732
+ }
2733
+ }
2734
+ tmp = Unit_instance;
2735
+ } else {
2736
+ _this__u8e3s4.k8(result);
2737
+ tmp = Unit_instance;
2738
+ }
2739
+ return tmp;
2740
+ }
2741
+ var properties_initialized_DispatchedContinuation_kt_2siadq;
2742
+ function _init_properties_DispatchedContinuation_kt__tnmqc0() {
2743
+ if (!properties_initialized_DispatchedContinuation_kt_2siadq) {
2744
+ properties_initialized_DispatchedContinuation_kt_2siadq = true;
2745
+ UNDEFINED = new Symbol('UNDEFINED');
2746
+ REUSABLE_CLAIMED = new Symbol('REUSABLE_CLAIMED');
2747
+ }
2748
+ }
2749
+ function DispatchedTask(resumeMode) {
2750
+ SchedulerTask.call(this);
2751
+ this.j4w_1 = resumeMode;
2752
+ }
2753
+ protoOf(DispatchedTask).r4w = function (takenState, cause) {
2754
+ };
2755
+ protoOf(DispatchedTask).i4x = function (state) {
2756
+ return (state == null ? true : !(state == null)) ? state : THROW_CCE();
2757
+ };
2758
+ protoOf(DispatchedTask).q4x = function (state) {
2759
+ var tmp0_safe_receiver = state instanceof CompletedExceptionally ? state : null;
2760
+ return tmp0_safe_receiver == null ? null : tmp0_safe_receiver.b4u_1;
2761
+ };
2762
+ protoOf(DispatchedTask).s4x = function () {
2763
+ // Inline function 'kotlinx.coroutines.assert' call
2764
+ try {
2765
+ var tmp = this.n4w();
2766
+ var delegate = tmp instanceof DispatchedContinuation ? tmp : THROW_CCE();
2767
+ var continuation = delegate.e4w_1;
2768
+ // Inline function 'kotlinx.coroutines.withContinuationContext' call
2769
+ delegate.g4w_1;
2770
+ var context = continuation.f8();
2771
+ var state = this.q4w();
2772
+ var exception = this.q4x(state);
2773
+ var job = exception == null && get_isCancellableMode(this.j4w_1) ? context.m8(Key_instance_2) : null;
2774
+ if (!(job == null) && !job.w4t()) {
2775
+ var cause = job.t4u();
2776
+ this.r4w(state, cause);
2777
+ // Inline function 'kotlinx.coroutines.resumeWithStackTrace' call
2778
+ // Inline function 'kotlin.Companion.failure' call
2779
+ var exception_0 = recoverStackTrace(cause, continuation);
2780
+ var tmp$ret$1 = _Result___init__impl__xyqfz8(createFailure(exception_0));
2781
+ continuation.k8(tmp$ret$1);
2782
+ } else {
2783
+ if (!(exception == null)) {
2784
+ // Inline function 'kotlin.coroutines.resumeWithException' call
2785
+ // Inline function 'kotlin.Companion.failure' call
2786
+ var tmp$ret$3 = _Result___init__impl__xyqfz8(createFailure(exception));
2787
+ continuation.k8(tmp$ret$3);
2788
+ } else {
2789
+ // Inline function 'kotlin.coroutines.resume' call
2790
+ // Inline function 'kotlin.Companion.success' call
2791
+ var value = this.i4x(state);
2792
+ var tmp$ret$5 = _Result___init__impl__xyqfz8(value);
2793
+ continuation.k8(tmp$ret$5);
2794
+ }
2795
+ }
2796
+ } catch ($p) {
2797
+ if ($p instanceof DispatchException) {
2798
+ var e = $p;
2799
+ handleCoroutineException(this.n4w().f8(), e.s4y_1);
2800
+ } else {
2801
+ if ($p instanceof Error) {
2802
+ var e_0 = $p;
2803
+ this.t4x(e_0);
2804
+ } else {
2805
+ throw $p;
2806
+ }
2807
+ }
2808
+ }
2809
+ };
2810
+ protoOf(DispatchedTask).t4x = function (exception) {
2811
+ var reason = new CoroutinesInternalError('Fatal exception in coroutines machinery for ' + toString(this) + '. ' + "Please read KDoc to 'handleFatalException' method and report this incident to maintainers", exception);
2812
+ handleCoroutineException(this.n4w().f8(), reason);
2813
+ };
2814
+ function get_isReusableMode(_this__u8e3s4) {
2815
+ return _this__u8e3s4 === 2;
2816
+ }
2817
+ function get_isCancellableMode(_this__u8e3s4) {
2818
+ return _this__u8e3s4 === 1 || _this__u8e3s4 === 2;
2819
+ }
2820
+ function dispatch(_this__u8e3s4, mode) {
2821
+ // Inline function 'kotlinx.coroutines.assert' call
2822
+ var delegate = _this__u8e3s4.n4w();
2823
+ var undispatched = mode === 4;
2824
+ var tmp;
2825
+ var tmp_0;
2826
+ if (!undispatched) {
2827
+ tmp_0 = delegate instanceof DispatchedContinuation;
2828
+ } else {
2829
+ tmp_0 = false;
2830
+ }
2831
+ if (tmp_0) {
2832
+ tmp = get_isCancellableMode(mode) === get_isCancellableMode(_this__u8e3s4.j4w_1);
2833
+ } else {
2834
+ tmp = false;
2835
+ }
2836
+ if (tmp) {
2837
+ var dispatcher = delegate.d4w_1;
2838
+ var context = delegate.f8();
2839
+ if (safeIsDispatchNeeded(dispatcher, context)) {
2840
+ safeDispatch(dispatcher, context, _this__u8e3s4);
2841
+ } else {
2842
+ resumeUnconfined(_this__u8e3s4);
2843
+ }
2844
+ } else {
2845
+ resume(_this__u8e3s4, delegate, undispatched);
2846
+ }
2847
+ }
2848
+ function DispatchException(cause, dispatcher, context) {
2849
+ Exception_init_$Init$('Coroutine dispatcher ' + dispatcher.toString() + ' threw an exception, context = ' + toString(context), cause, this);
2850
+ captureStack(this, DispatchException);
2851
+ this.s4y_1 = cause;
2852
+ delete this.cause;
2853
+ }
2854
+ protoOf(DispatchException).f = function () {
2855
+ return this.s4y_1;
2856
+ };
2857
+ function resumeUnconfined(_this__u8e3s4) {
2858
+ var eventLoop = ThreadLocalEventLoop_getInstance().g4z();
2859
+ if (eventLoop.a4z()) {
2860
+ eventLoop.z4y(_this__u8e3s4);
2861
+ } else {
2862
+ // Inline function 'kotlinx.coroutines.runUnconfinedEventLoop' call
2863
+ eventLoop.c4z(true);
2864
+ try {
2865
+ resume(_this__u8e3s4, _this__u8e3s4.n4w(), true);
2866
+ $l$loop: while (eventLoop.y4y()) {
2867
+ }
2868
+ } catch ($p) {
2869
+ if ($p instanceof Error) {
2870
+ var e = $p;
2871
+ _this__u8e3s4.t4x(e);
2872
+ } else {
2873
+ throw $p;
2874
+ }
2875
+ }
2876
+ finally {
2877
+ eventLoop.d4z(true);
2878
+ }
2879
+ }
2880
+ }
2881
+ function resume(_this__u8e3s4, delegate, undispatched) {
2882
+ var state = _this__u8e3s4.q4w();
2883
+ var exception = _this__u8e3s4.q4x(state);
2884
+ var tmp;
2885
+ if (!(exception == null)) {
2886
+ // Inline function 'kotlin.Companion.failure' call
2887
+ tmp = _Result___init__impl__xyqfz8(createFailure(exception));
2888
+ } else {
2889
+ // Inline function 'kotlin.Companion.success' call
2890
+ var value = _this__u8e3s4.i4x(state);
2891
+ tmp = _Result___init__impl__xyqfz8(value);
2892
+ }
2893
+ var result = tmp;
2894
+ if (undispatched) {
2895
+ // Inline function 'kotlinx.coroutines.internal.DispatchedContinuation.resumeUndispatchedWith' call
2896
+ var this_0 = delegate instanceof DispatchedContinuation ? delegate : THROW_CCE();
2897
+ this_0.e4w_1;
2898
+ // Inline function 'kotlinx.coroutines.withContinuationContext' call
2899
+ this_0.g4w_1;
2900
+ this_0.e4w_1.k8(result);
2901
+ } else {
2902
+ delegate.k8(result);
2903
+ }
2904
+ }
2905
+ function Symbol(symbol) {
2906
+ this.n51_1 = symbol;
2907
+ }
2908
+ protoOf(Symbol).toString = function () {
2909
+ return '<' + this.n51_1 + '>';
2910
+ };
2911
+ function startCoroutineCancellable(_this__u8e3s4, receiver, completion) {
2912
+ // Inline function 'kotlinx.coroutines.intrinsics.runSafely' call
2913
+ try {
2914
+ var tmp = intercepted(createCoroutineUnintercepted(_this__u8e3s4, receiver, completion));
2915
+ // Inline function 'kotlin.Companion.success' call
2916
+ var tmp$ret$0 = _Result___init__impl__xyqfz8(Unit_instance);
2917
+ resumeCancellableWithInternal(tmp, tmp$ret$0);
2918
+ } catch ($p) {
2919
+ if ($p instanceof Error) {
2920
+ var e = $p;
2921
+ dispatcherFailure(completion, e);
2922
+ } else {
2923
+ throw $p;
2924
+ }
2925
+ }
2926
+ return Unit_instance;
2927
+ }
2928
+ function startCoroutineCancellable_0(_this__u8e3s4, fatalCompletion) {
2929
+ // Inline function 'kotlinx.coroutines.intrinsics.runSafely' call
2930
+ try {
2931
+ var tmp = intercepted(_this__u8e3s4);
2932
+ // Inline function 'kotlin.Companion.success' call
2933
+ var tmp$ret$0 = _Result___init__impl__xyqfz8(Unit_instance);
2934
+ resumeCancellableWithInternal(tmp, tmp$ret$0);
2935
+ } catch ($p) {
2936
+ if ($p instanceof Error) {
2937
+ var e = $p;
2938
+ dispatcherFailure(fatalCompletion, e);
2939
+ } else {
2940
+ throw $p;
2941
+ }
2942
+ }
2943
+ return Unit_instance;
2944
+ }
2945
+ function dispatcherFailure(completion, e) {
2946
+ var tmp;
2947
+ if (e instanceof DispatchException) {
2948
+ tmp = e.s4y_1;
2949
+ } else {
2950
+ tmp = e;
2951
+ }
2952
+ var reportException = tmp;
2953
+ // Inline function 'kotlin.Companion.failure' call
2954
+ var tmp$ret$0 = _Result___init__impl__xyqfz8(createFailure(reportException));
2955
+ completion.k8(tmp$ret$0);
2956
+ throw reportException;
2957
+ }
2958
+ function startCoroutineUndispatched(_this__u8e3s4, receiver, completion) {
2959
+ // Inline function 'kotlinx.coroutines.internal.probeCoroutineCreated' call
2960
+ var actualCompletion = completion;
2961
+ var tmp;
2962
+ try {
2963
+ // Inline function 'kotlinx.coroutines.withCoroutineContext' call
2964
+ actualCompletion.f8();
2965
+ // Inline function 'kotlinx.coroutines.internal.probeCoroutineResumed' call
2966
+ // Inline function 'kotlin.coroutines.intrinsics.startCoroutineUninterceptedOrReturn' call
2967
+ tmp = startCoroutineUninterceptedOrReturnNonGeneratorVersion(_this__u8e3s4, receiver, actualCompletion);
2968
+ } catch ($p) {
2969
+ var tmp_0;
2970
+ if ($p instanceof Error) {
2971
+ var e = $p;
2972
+ var tmp_1;
2973
+ if (e instanceof DispatchException) {
2974
+ tmp_1 = e.s4y_1;
2975
+ } else {
2976
+ tmp_1 = e;
2977
+ }
2978
+ var reportException = tmp_1;
2979
+ // Inline function 'kotlin.coroutines.resumeWithException' call
2980
+ // Inline function 'kotlin.Companion.failure' call
2981
+ var tmp$ret$5 = _Result___init__impl__xyqfz8(createFailure(reportException));
2982
+ actualCompletion.k8(tmp$ret$5);
2983
+ return Unit_instance;
2984
+ } else {
2985
+ throw $p;
2986
+ }
2987
+ }
2988
+ var value = tmp;
2989
+ if (!(value === get_COROUTINE_SUSPENDED())) {
2990
+ // Inline function 'kotlin.coroutines.resume' call
2991
+ // Inline function 'kotlin.Companion.success' call
2992
+ var value_0 = (value == null ? true : !(value == null)) ? value : THROW_CCE();
2993
+ var tmp$ret$7 = _Result___init__impl__xyqfz8(value_0);
2994
+ actualCompletion.k8(tmp$ret$7);
2995
+ }
2996
+ }
2997
+ function createDefaultDispatcher() {
2998
+ var tmp;
2999
+ if (isJsdom()) {
3000
+ tmp = NodeDispatcher_getInstance();
3001
+ } else {
3002
+ var tmp_0;
3003
+ var tmp_1;
3004
+ if (!(typeof window === 'undefined')) {
3005
+ // Inline function 'kotlin.js.asDynamic' call
3006
+ tmp_1 = window != null;
3007
+ } else {
3008
+ tmp_1 = false;
3009
+ }
3010
+ if (tmp_1) {
3011
+ // Inline function 'kotlin.js.asDynamic' call
3012
+ tmp_0 = !(typeof window.addEventListener === 'undefined');
3013
+ } else {
3014
+ tmp_0 = false;
3015
+ }
3016
+ if (tmp_0) {
3017
+ tmp = asCoroutineDispatcher(window);
3018
+ } else {
3019
+ if (typeof process === 'undefined' || typeof process.nextTick === 'undefined') {
3020
+ tmp = SetTimeoutDispatcher_getInstance();
3021
+ } else {
3022
+ tmp = NodeDispatcher_getInstance();
3023
+ }
3024
+ }
3025
+ }
3026
+ return tmp;
3027
+ }
3028
+ function isJsdom() {
3029
+ return !(typeof navigator === 'undefined') && navigator != null && navigator.userAgent != null && !(typeof navigator.userAgent === 'undefined') && !(typeof navigator.userAgent.match === 'undefined') && navigator.userAgent.match('\\bjsdom\\b');
3030
+ }
3031
+ var counter;
3032
+ function get_DEBUG() {
3033
+ return DEBUG;
3034
+ }
3035
+ var DEBUG;
3036
+ function get_classSimpleName(_this__u8e3s4) {
3037
+ var tmp0_elvis_lhs = getKClassFromExpression(_this__u8e3s4).j9();
3038
+ return tmp0_elvis_lhs == null ? 'Unknown' : tmp0_elvis_lhs;
3039
+ }
3040
+ function get_hexAddress(_this__u8e3s4) {
3041
+ // Inline function 'kotlin.js.asDynamic' call
3042
+ var result = _this__u8e3s4.__debug_counter;
3043
+ if (!(typeof result === 'number')) {
3044
+ counter = counter + 1 | 0;
3045
+ result = counter;
3046
+ // Inline function 'kotlin.js.asDynamic' call
3047
+ _this__u8e3s4.__debug_counter = result;
3048
+ }
3049
+ return ((!(result == null) ? typeof result === 'number' : false) ? result : THROW_CCE()).toString();
3050
+ }
3051
+ function NodeDispatcher() {
3052
+ NodeDispatcher_instance = this;
3053
+ SetTimeoutBasedDispatcher.call(this);
3054
+ }
3055
+ protoOf(NodeDispatcher).q51 = function () {
3056
+ process.nextTick(this.x51_1.v51_1);
3057
+ };
3058
+ var NodeDispatcher_instance;
3059
+ function NodeDispatcher_getInstance() {
3060
+ if (NodeDispatcher_instance == null)
3061
+ new NodeDispatcher();
3062
+ return NodeDispatcher_instance;
3063
+ }
3064
+ function ScheduledMessageQueue$processQueue$lambda(this$0) {
3065
+ return function () {
3066
+ this$0.b52();
3067
+ return Unit_instance;
3068
+ };
3069
+ }
3070
+ function ScheduledMessageQueue(dispatcher) {
3071
+ MessageQueue.call(this);
3072
+ this.u51_1 = dispatcher;
3073
+ var tmp = this;
3074
+ tmp.v51_1 = ScheduledMessageQueue$processQueue$lambda(this);
3075
+ }
3076
+ protoOf(ScheduledMessageQueue).c52 = function () {
3077
+ this.u51_1.q51();
3078
+ };
3079
+ protoOf(ScheduledMessageQueue).d52 = function () {
3080
+ setTimeout(this.v51_1, 0);
3081
+ };
3082
+ protoOf(ScheduledMessageQueue).e52 = function (timeout) {
3083
+ setTimeout(this.v51_1, timeout);
3084
+ };
3085
+ function WindowMessageQueue$lambda(this$0) {
3086
+ return function (event) {
3087
+ var tmp;
3088
+ if (event.source == this$0.p52_1 && event.data == this$0.q52_1) {
3089
+ event.stopPropagation();
3090
+ this$0.b52();
3091
+ tmp = Unit_instance;
3092
+ }
3093
+ return Unit_instance;
3094
+ };
3095
+ }
3096
+ function WindowMessageQueue$schedule$lambda(this$0) {
3097
+ return function (it) {
3098
+ this$0.b52();
3099
+ return Unit_instance;
3100
+ };
3101
+ }
3102
+ function WindowMessageQueue(window_0) {
3103
+ MessageQueue.call(this);
3104
+ this.p52_1 = window_0;
3105
+ this.q52_1 = 'dispatchCoroutine';
3106
+ this.p52_1.addEventListener('message', WindowMessageQueue$lambda(this), true);
3107
+ }
3108
+ protoOf(WindowMessageQueue).c52 = function () {
3109
+ var tmp = Promise.resolve(Unit_instance);
3110
+ tmp.then(WindowMessageQueue$schedule$lambda(this));
3111
+ };
3112
+ protoOf(WindowMessageQueue).d52 = function () {
3113
+ this.p52_1.postMessage(this.q52_1, '*');
3114
+ };
3115
+ function toThrowable(_this__u8e3s4) {
3116
+ var tmp0_elvis_lhs = _this__u8e3s4 instanceof Error ? _this__u8e3s4 : null;
3117
+ return tmp0_elvis_lhs == null ? Exception_init_$Create$("Promise resolved with a non-Throwable exception '" + _this__u8e3s4.toString() + "' (type " + toString(getKClassFromExpression(_this__u8e3s4)) + ')') : tmp0_elvis_lhs;
3118
+ }
3119
+ function toJsPromiseError(_this__u8e3s4) {
3120
+ return _this__u8e3s4;
3121
+ }
3122
+ function asCoroutineDispatcher(_this__u8e3s4) {
3123
+ // Inline function 'kotlin.js.asDynamic' call
3124
+ var tmp0_elvis_lhs = _this__u8e3s4.coroutineDispatcher;
3125
+ var tmp;
3126
+ if (tmp0_elvis_lhs == null) {
3127
+ // Inline function 'kotlin.also' call
3128
+ var this_0 = new WindowDispatcher(_this__u8e3s4);
3129
+ // Inline function 'kotlin.js.asDynamic' call
3130
+ _this__u8e3s4.coroutineDispatcher = this_0;
3131
+ tmp = this_0;
3132
+ } else {
3133
+ tmp = tmp0_elvis_lhs;
3134
+ }
3135
+ return tmp;
3136
+ }
3137
+ function toDebugString(_this__u8e3s4) {
3138
+ return toString(_this__u8e3s4);
3139
+ }
3140
+ function newCoroutineContext(_this__u8e3s4, context) {
3141
+ var combined = _this__u8e3s4.v4t().xe(context);
3142
+ return !(combined === Dispatchers_getInstance().e51_1) && combined.m8(Key_instance) == null ? combined.xe(Dispatchers_getInstance().e51_1) : combined;
3143
+ }
3144
+ function get_coroutineName(_this__u8e3s4) {
3145
+ return null;
3146
+ }
3147
+ function Dispatchers() {
3148
+ Dispatchers_instance = this;
3149
+ this.e51_1 = createDefaultDispatcher();
3150
+ this.f51_1 = Unconfined_getInstance();
3151
+ this.g51_1 = new JsMainDispatcher(this.e51_1, false);
3152
+ this.h51_1 = null;
3153
+ }
3154
+ protoOf(Dispatchers).i51 = function () {
3155
+ var tmp0_elvis_lhs = this.h51_1;
3156
+ return tmp0_elvis_lhs == null ? this.g51_1 : tmp0_elvis_lhs;
3157
+ };
3158
+ var Dispatchers_instance;
3159
+ function Dispatchers_getInstance() {
3160
+ if (Dispatchers_instance == null)
3161
+ new Dispatchers();
3162
+ return Dispatchers_instance;
3163
+ }
3164
+ function JsMainDispatcher(delegate, invokeImmediately) {
3165
+ MainCoroutineDispatcher.call(this);
3166
+ this.s52_1 = delegate;
3167
+ this.t52_1 = invokeImmediately;
3168
+ this.u52_1 = this.t52_1 ? this : new JsMainDispatcher(this.s52_1, true);
3169
+ }
3170
+ protoOf(JsMainDispatcher).c51 = function () {
3171
+ return this.u52_1;
3172
+ };
3173
+ protoOf(JsMainDispatcher).p4y = function (context) {
3174
+ return !this.t52_1;
3175
+ };
3176
+ protoOf(JsMainDispatcher).q4y = function (context, block) {
3177
+ return this.s52_1.q4y(context, block);
3178
+ };
3179
+ protoOf(JsMainDispatcher).toString = function () {
3180
+ var tmp0_elvis_lhs = this.d51();
3181
+ return tmp0_elvis_lhs == null ? this.s52_1.toString() : tmp0_elvis_lhs;
3182
+ };
3183
+ function JobCancellationException(message, cause, job) {
3184
+ CancellationException_init_$Init$(message, cause, this);
3185
+ captureStack(this, JobCancellationException);
3186
+ this.v52_1 = job;
3187
+ }
3188
+ protoOf(JobCancellationException).toString = function () {
3189
+ return protoOf(CancellationException).toString.call(this) + '; job=' + toString(this.v52_1);
3190
+ };
3191
+ protoOf(JobCancellationException).equals = function (other) {
3192
+ var tmp;
3193
+ if (other === this) {
3194
+ tmp = true;
3195
+ } else {
3196
+ var tmp_0;
3197
+ var tmp_1;
3198
+ var tmp_2;
3199
+ if (other instanceof JobCancellationException) {
3200
+ tmp_2 = other.message == this.message;
3201
+ } else {
3202
+ tmp_2 = false;
3203
+ }
3204
+ if (tmp_2) {
3205
+ tmp_1 = equals(other.v52_1, this.v52_1);
3206
+ } else {
3207
+ tmp_1 = false;
3208
+ }
3209
+ if (tmp_1) {
3210
+ tmp_0 = equals(other.cause, this.cause);
3211
+ } else {
3212
+ tmp_0 = false;
3213
+ }
3214
+ tmp = tmp_0;
3215
+ }
3216
+ return tmp;
3217
+ };
3218
+ protoOf(JobCancellationException).hashCode = function () {
3219
+ var tmp = imul(imul(getStringHashCode(ensureNotNull(this.message)), 31) + hashCode(this.v52_1) | 0, 31);
3220
+ var tmp0_safe_receiver = this.cause;
3221
+ var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : hashCode(tmp0_safe_receiver);
3222
+ return tmp + (tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs) | 0;
3223
+ };
3224
+ function Runnable() {
3225
+ }
3226
+ function SchedulerTask() {
3227
+ }
3228
+ function identitySet(expectedSize) {
3229
+ return HashSet_init_$Create$(expectedSize);
3230
+ }
3231
+ function get_platformExceptionHandlers_() {
3232
+ _init_properties_CoroutineExceptionHandlerImpl_kt__37d7wf();
3233
+ return platformExceptionHandlers_;
3234
+ }
3235
+ var platformExceptionHandlers_;
3236
+ function get_platformExceptionHandlers() {
3237
+ _init_properties_CoroutineExceptionHandlerImpl_kt__37d7wf();
3238
+ return get_platformExceptionHandlers_();
3239
+ }
3240
+ function DiagnosticCoroutineContextException(context) {
3241
+ RuntimeException_init_$Init$_0(toString(context), this);
3242
+ captureStack(this, DiagnosticCoroutineContextException);
3243
+ }
3244
+ var properties_initialized_CoroutineExceptionHandlerImpl_kt_qhrgvx;
3245
+ function _init_properties_CoroutineExceptionHandlerImpl_kt__37d7wf() {
3246
+ if (!properties_initialized_CoroutineExceptionHandlerImpl_kt_qhrgvx) {
3247
+ properties_initialized_CoroutineExceptionHandlerImpl_kt_qhrgvx = true;
3248
+ // Inline function 'kotlin.collections.mutableSetOf' call
3249
+ platformExceptionHandlers_ = LinkedHashSet_init_$Create$();
3250
+ }
3251
+ }
3252
+ function LockFreeLinkedListHead() {
3253
+ LockFreeLinkedListNode.call(this);
3254
+ }
3255
+ function LockFreeLinkedListNode() {
3256
+ this.h4y_1 = this;
3257
+ this.i4y_1 = this;
3258
+ this.j4y_1 = false;
3259
+ }
3260
+ protoOf(LockFreeLinkedListNode).k4y = function (node, permissionsBitmask) {
3261
+ var prev = this.i4y_1;
3262
+ var tmp;
3263
+ if (prev instanceof ListClosed) {
3264
+ tmp = ((prev.z52_1 & permissionsBitmask) === 0 && prev.k4y(node, permissionsBitmask));
3265
+ } else {
3266
+ node.h4y_1 = this;
3267
+ node.i4y_1 = prev;
3268
+ prev.h4y_1 = node;
3269
+ this.i4y_1 = node;
3270
+ tmp = true;
3271
+ }
3272
+ return tmp;
3273
+ };
3274
+ protoOf(LockFreeLinkedListNode).o4z = function (forbiddenElementsBit) {
3275
+ this.k4y(new ListClosed(forbiddenElementsBit), forbiddenElementsBit);
3276
+ };
3277
+ protoOf(LockFreeLinkedListNode).l4y = function () {
3278
+ if (this.j4y_1)
3279
+ return false;
3280
+ var prev = this.i4y_1;
3281
+ var next = this.h4y_1;
3282
+ prev.h4y_1 = next;
3283
+ next.i4y_1 = prev;
3284
+ this.j4y_1 = true;
3285
+ return true;
3286
+ };
3287
+ protoOf(LockFreeLinkedListNode).m4y = function (node) {
3288
+ if (!(this.h4y_1 === this))
3289
+ return false;
3290
+ this.k4y(node, -2147483648);
3291
+ return true;
3292
+ };
3293
+ function ListClosed(forbiddenElementsBitmask) {
3294
+ LockFreeLinkedListNode.call(this);
3295
+ this.z52_1 = forbiddenElementsBitmask;
3296
+ }
3297
+ function unwrap(exception) {
3298
+ return exception;
3299
+ }
3300
+ function recoverStackTrace(exception, continuation) {
3301
+ return exception;
3302
+ }
3303
+ function SynchronizedObject() {
3304
+ }
3305
+ function threadContextElements(context) {
3306
+ return 0;
3307
+ }
3308
+ function CommonThreadLocal() {
3309
+ this.h4z_1 = null;
3310
+ }
3311
+ protoOf(CommonThreadLocal).i4z = function () {
3312
+ var tmp = this.h4z_1;
3313
+ return (tmp == null ? true : !(tmp == null)) ? tmp : THROW_CCE();
3314
+ };
3315
+ protoOf(CommonThreadLocal).r3 = function (value) {
3316
+ this.h4z_1 = value;
3317
+ };
3318
+ function commonThreadLocal(name) {
3319
+ return new CommonThreadLocal();
3320
+ }
3321
+ function createEventLoop() {
3322
+ return new UnconfinedEventLoop();
3323
+ }
3324
+ function UnconfinedEventLoop() {
3325
+ EventLoop.call(this);
3326
+ }
3327
+ protoOf(UnconfinedEventLoop).q4y = function (context, block) {
3328
+ unsupported();
3329
+ };
3330
+ function unsupported() {
3331
+ throw UnsupportedOperationException_init_$Create$('runBlocking event loop is not supported');
3332
+ }
3333
+ function promise(_this__u8e3s4, context, start, block) {
3334
+ context = context === VOID ? EmptyCoroutineContext_getInstance() : context;
3335
+ start = start === VOID ? CoroutineStart_DEFAULT_getInstance() : start;
3336
+ return asPromise(async(_this__u8e3s4, context, start, block));
3337
+ }
3338
+ function await_0(_this__u8e3s4, $completion) {
3339
+ var cancellable = new CancellableContinuationImpl(intercepted($completion), 1);
3340
+ cancellable.o4w();
3341
+ var tmp = await$lambda(cancellable);
3342
+ _this__u8e3s4.then(tmp, await$lambda_0(cancellable));
3343
+ return cancellable.g4x();
3344
+ }
3345
+ function asPromise(_this__u8e3s4) {
3346
+ var promise = new Promise(asPromise$lambda(_this__u8e3s4));
3347
+ // Inline function 'kotlin.js.toJsReference' call
3348
+ // Inline function 'kotlin.js.unsafeCast' call
3349
+ // Inline function 'kotlin.js.asDynamic' call
3350
+ promiseSetDeferred(promise, _this__u8e3s4);
3351
+ return promise;
3352
+ }
3353
+ function promiseSetDeferred(promise, deferred) {
3354
+ promise.deferred = deferred;
3355
+ return Unit_instance;
3356
+ }
3357
+ function await$lambda($cont) {
3358
+ return function (it) {
3359
+ // Inline function 'kotlin.coroutines.resume' call
3360
+ var this_0 = $cont;
3361
+ // Inline function 'kotlin.Companion.success' call
3362
+ var tmp$ret$0 = _Result___init__impl__xyqfz8(it);
3363
+ this_0.k8(tmp$ret$0);
3364
+ return null;
3365
+ };
3366
+ }
3367
+ function await$lambda_0($cont) {
3368
+ return function (it) {
3369
+ var tmp0 = $cont;
3370
+ // Inline function 'kotlin.coroutines.resumeWithException' call
3371
+ // Inline function 'kotlin.Companion.failure' call
3372
+ var exception = toThrowable(it);
3373
+ var tmp$ret$0 = _Result___init__impl__xyqfz8(createFailure(exception));
3374
+ tmp0.k8(tmp$ret$0);
3375
+ return null;
3376
+ };
3377
+ }
3378
+ function asPromise$lambda$lambda($this_asPromise, $reject, $resolve) {
3379
+ return function (it) {
3380
+ var e = $this_asPromise.l4v();
3381
+ var tmp;
3382
+ if (!(e == null)) {
3383
+ tmp = $reject(toJsPromiseError(e));
3384
+ } else {
3385
+ tmp = $resolve($this_asPromise.r4v());
3386
+ }
3387
+ return Unit_instance;
3388
+ };
3389
+ }
3390
+ function asPromise$lambda($this_asPromise) {
3391
+ return function (resolve, reject) {
3392
+ $this_asPromise.w4u(asPromise$lambda$lambda($this_asPromise, reject, resolve));
3393
+ return Unit_instance;
3394
+ };
3395
+ }
3396
+ function propagateExceptionFinalResort(exception) {
3397
+ // Inline function 'kotlin.with' call
3398
+ throwAsyncJsError(exception.message, getKClassFromExpression(exception).j9(), stackTraceToString(exception));
3399
+ return Unit_instance;
3400
+ }
3401
+ function throwAsyncJsError(message, className, stack) {
3402
+ var error = new Error();
3403
+ error.message = message;
3404
+ error.name = className;
3405
+ error.stack = stack;
3406
+ if (typeof globalThis.reportError === 'function') {
3407
+ // Up-to-date browsers and some non-browser JS runtimes (Deno, Bun)
3408
+ globalThis.reportError(error);
3409
+ } else {
3410
+ // Fallback for old browsers (pre-2022), Node.js
3411
+ setTimeout(function () {
3412
+ throw error;
3413
+ }, 0);
3414
+ }
3415
+ }
3416
+ function SetTimeoutDispatcher() {
3417
+ SetTimeoutDispatcher_instance = this;
3418
+ SetTimeoutBasedDispatcher.call(this);
3419
+ }
3420
+ protoOf(SetTimeoutDispatcher).q51 = function () {
3421
+ this.x51_1.e52(0);
3422
+ };
3423
+ var SetTimeoutDispatcher_instance;
3424
+ function SetTimeoutDispatcher_getInstance() {
3425
+ if (SetTimeoutDispatcher_instance == null)
3426
+ new SetTimeoutDispatcher();
3427
+ return SetTimeoutDispatcher_instance;
3428
+ }
3429
+ function SetTimeoutBasedDispatcher() {
3430
+ CoroutineDispatcher.call(this);
3431
+ this.x51_1 = new ScheduledMessageQueue(this);
3432
+ }
3433
+ protoOf(SetTimeoutBasedDispatcher).q4y = function (context, block) {
3434
+ this.x51_1.f52(block);
3435
+ };
3436
+ function MessageQueue() {
3437
+ this.y51_1 = ArrayDeque_init_$Create$();
3438
+ this.z51_1 = 16;
3439
+ this.a52_1 = false;
3440
+ }
3441
+ protoOf(MessageQueue).f52 = function (element) {
3442
+ this.g52(element);
3443
+ if (!this.a52_1) {
3444
+ this.a52_1 = true;
3445
+ this.c52();
3446
+ }
3447
+ };
3448
+ protoOf(MessageQueue).b52 = function () {
3449
+ try {
3450
+ // Inline function 'kotlin.repeat' call
3451
+ var times = this.z51_1;
3452
+ var inductionVariable = 0;
3453
+ if (inductionVariable < times)
3454
+ do {
3455
+ var index = inductionVariable;
3456
+ inductionVariable = inductionVariable + 1 | 0;
3457
+ var tmp0_elvis_lhs = removeFirstOrNull(this);
3458
+ var tmp;
3459
+ if (tmp0_elvis_lhs == null) {
3460
+ return Unit_instance;
3461
+ } else {
3462
+ tmp = tmp0_elvis_lhs;
3463
+ }
3464
+ var element = tmp;
3465
+ element.s4x();
3466
+ }
3467
+ while (inductionVariable < times);
3468
+ }finally {
3469
+ if (this.l()) {
3470
+ this.a52_1 = false;
3471
+ } else {
3472
+ this.d52();
3473
+ }
3474
+ }
3475
+ };
3476
+ protoOf(MessageQueue).g52 = function (element) {
3477
+ return this.y51_1.h(element);
3478
+ };
3479
+ protoOf(MessageQueue).h = function (element) {
3480
+ return this.g52((!(element == null) ? isInterface(element, Runnable) : false) ? element : THROW_CCE());
3481
+ };
3482
+ protoOf(MessageQueue).h52 = function (index, element) {
3483
+ this.y51_1.a2(index, element);
3484
+ };
3485
+ protoOf(MessageQueue).a2 = function (index, element) {
3486
+ return this.h52(index, (!(element == null) ? isInterface(element, Runnable) : false) ? element : THROW_CCE());
3487
+ };
3488
+ protoOf(MessageQueue).i52 = function (elements) {
3489
+ return this.y51_1.s(elements);
3490
+ };
3491
+ protoOf(MessageQueue).s = function (elements) {
3492
+ return this.i52(elements);
3493
+ };
3494
+ protoOf(MessageQueue).y1 = function () {
3495
+ this.y51_1.y1();
3496
+ };
3497
+ protoOf(MessageQueue).j52 = function (index, element) {
3498
+ return this.y51_1.z1(index, element);
3499
+ };
3500
+ protoOf(MessageQueue).z1 = function (index, element) {
3501
+ return this.j52(index, (!(element == null) ? isInterface(element, Runnable) : false) ? element : THROW_CCE());
3502
+ };
3503
+ protoOf(MessageQueue).b2 = function (index) {
3504
+ return this.y51_1.b2(index);
3505
+ };
3506
+ protoOf(MessageQueue).c2 = function () {
3507
+ return this.y51_1.c2();
3508
+ };
3509
+ protoOf(MessageQueue).o = function (index) {
3510
+ return this.y51_1.o(index);
3511
+ };
3512
+ protoOf(MessageQueue).l = function () {
3513
+ return this.y51_1.l();
3514
+ };
3515
+ protoOf(MessageQueue).k52 = function (element) {
3516
+ return this.y51_1.l1(element);
3517
+ };
3518
+ protoOf(MessageQueue).l1 = function (element) {
3519
+ if (!(!(element == null) ? isInterface(element, Runnable) : false))
3520
+ return false;
3521
+ return this.k52((!(element == null) ? isInterface(element, Runnable) : false) ? element : THROW_CCE());
3522
+ };
3523
+ protoOf(MessageQueue).i = function () {
3524
+ return this.y51_1.i();
3525
+ };
3526
+ protoOf(MessageQueue).l52 = function (elements) {
3527
+ return this.y51_1.m1(elements);
3528
+ };
3529
+ protoOf(MessageQueue).m1 = function (elements) {
3530
+ return this.l52(elements);
3531
+ };
3532
+ protoOf(MessageQueue).m = function (index) {
3533
+ return this.y51_1.m(index);
3534
+ };
3535
+ protoOf(MessageQueue).n = function () {
3536
+ return this.y51_1.ad_1;
3537
+ };
3538
+ function WindowDispatcher(window_0) {
3539
+ CoroutineDispatcher.call(this);
3540
+ this.h53_1 = window_0;
3541
+ this.i53_1 = new WindowMessageQueue(this.h53_1);
3542
+ }
3543
+ protoOf(WindowDispatcher).q4y = function (context, block) {
3544
+ return this.i53_1.f52(block);
3545
+ };
3546
+ //region block: post-declaration
3547
+ protoOf(JobSupport).xe = plus;
3548
+ protoOf(JobSupport).m8 = get_0;
3549
+ protoOf(JobSupport).we = fold;
3550
+ protoOf(JobSupport).ve = minusKey_0;
3551
+ protoOf(CoroutineDispatcher).m8 = get;
3552
+ protoOf(CoroutineDispatcher).ve = minusKey;
3553
+ defineProp(protoOf(DispatchException), 'cause', function () {
3554
+ return this.f();
3555
+ });
3556
+ //endregion
3557
+ //region block: init
3558
+ Active_instance = new Active();
3559
+ Key_instance_1 = new Key_0();
3560
+ GlobalScope_instance = new GlobalScope();
3561
+ Key_instance_2 = new Key_1();
3562
+ NonDisposableHandle_instance = new NonDisposableHandle();
3563
+ Key_instance_3 = new Key_2();
3564
+ counter = 0;
3565
+ DEBUG = false;
3566
+ //endregion
3567
+ //region block: exports
3568
+ _.$_$ = _.$_$ || {};
3569
+ _.$_$.a = await_0;
3570
+ _.$_$.b = GlobalScope_instance;
3571
+ _.$_$.c = CoroutineScope;
3572
+ _.$_$.d = promise;
3573
+ //endregion
3574
+ return _;
3575
+ }));
3576
+
3577
+ //# sourceMappingURL=kotlinx-coroutines-core.js.map