@doordeck/doordeck-headless-sdk 0.104.0 → 0.106.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 (29) hide show
  1. package/README.md +1 -1
  2. package/kotlin/Kermit-kermit-core.js +316 -0
  3. package/kotlin/Kermit-kermit.js +51 -0
  4. package/kotlin/Kotlin-DateTime-library-kotlinx-datetime.js +1399 -1399
  5. package/kotlin/KotlinMultiplatformLibsodium-multiplatform-crypto-libsodium-bindings.js +17 -17
  6. package/kotlin/MultiplatformSettings-multiplatform-settings.js +10 -10
  7. package/kotlin/doordeck-sdk.d.ts +4 -2
  8. package/kotlin/doordeck-sdk.js +9905 -9672
  9. package/kotlin/kotlin-kotlin-stdlib.js +167 -158
  10. package/kotlin/kotlinx-atomicfu.js +13 -13
  11. package/kotlin/kotlinx-coroutines-core.js +2086 -1904
  12. package/kotlin/kotlinx-io-kotlinx-io-bytestring.js +32 -32
  13. package/kotlin/kotlinx-io-kotlinx-io-core.js +427 -427
  14. package/kotlin/kotlinx-serialization-kotlinx-serialization-core.js +1738 -1738
  15. package/kotlin/kotlinx-serialization-kotlinx-serialization-json.js +1346 -1346
  16. package/kotlin/ktor-ktor-client-ktor-client-core.js +2314 -1913
  17. package/kotlin/ktor-ktor-client-ktor-client-plugins-ktor-client-auth.js +254 -254
  18. package/kotlin/ktor-ktor-client-ktor-client-plugins-ktor-client-content-negotiation.js +151 -151
  19. package/kotlin/ktor-ktor-client-ktor-client-plugins-ktor-client-logging.js +3131 -2
  20. package/kotlin/ktor-ktor-http-ktor-http-cio.js +350 -350
  21. package/kotlin/ktor-ktor-http.js +730 -715
  22. package/kotlin/ktor-ktor-io.js +805 -630
  23. package/kotlin/ktor-ktor-shared-ktor-events.js +9 -9
  24. package/kotlin/ktor-ktor-shared-ktor-serialization-ktor-serialization-kotlinx-ktor-serialization-kotlinx-json.js +7 -7
  25. package/kotlin/ktor-ktor-shared-ktor-serialization-ktor-serialization-kotlinx.js +146 -146
  26. package/kotlin/ktor-ktor-shared-ktor-serialization.js +68 -68
  27. package/kotlin/ktor-ktor-shared-ktor-websockets.js +40 -40
  28. package/kotlin/ktor-ktor-utils.js +1182 -577
  29. package/package.json +1 -1
@@ -1,6 +1,3135 @@
1
- (function (_) {
1
+ (function (_, kotlin_kotlin, kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core, kotlin_org_jetbrains_kotlinx_atomicfu, kotlin_io_ktor_ktor_http, kotlin_io_ktor_ktor_utils, kotlin_io_ktor_ktor_client_core, kotlin_io_ktor_ktor_io, kotlin_org_jetbrains_kotlinx_kotlinx_io_core) {
2
2
  'use strict';
3
+ //region block: imports
4
+ var CoroutineImpl = kotlin_kotlin.$_$.v9;
5
+ var get_COROUTINE_SUSPENDED = kotlin_kotlin.$_$.f9;
6
+ var THROW_CCE = kotlin_kotlin.$_$.sf;
7
+ var isCharSequence = kotlin_kotlin.$_$.db;
8
+ var trim = kotlin_kotlin.$_$.ve;
9
+ var toString = kotlin_kotlin.$_$.yb;
10
+ var Unit_instance = kotlin_kotlin.$_$.k5;
11
+ var protoOf = kotlin_kotlin.$_$.ub;
12
+ var initMetadataForCoroutine = kotlin_kotlin.$_$.ua;
13
+ var charSequenceLength = kotlin_kotlin.$_$.ha;
14
+ var StringBuilder_init_$Create$ = kotlin_kotlin.$_$.j1;
15
+ var Job = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.c1;
16
+ var atomic$boolean$1 = kotlin_org_jetbrains_kotlinx_atomicfu.$_$.b;
17
+ var _Char___init__impl__6a9atx = kotlin_kotlin.$_$.t2;
18
+ var initMetadataForClass = kotlin_kotlin.$_$.sa;
19
+ var VOID = kotlin_kotlin.$_$.h;
20
+ var Enum = kotlin_kotlin.$_$.hf;
21
+ var ReadChannelContent = kotlin_io_ktor_ktor_http.$_$.u;
22
+ var initMetadataForCompanion = kotlin_kotlin.$_$.ta;
23
+ var println = kotlin_kotlin.$_$.y9;
24
+ var ArrayList_init_$Create$ = kotlin_kotlin.$_$.p;
25
+ var OutgoingContent = kotlin_io_ktor_ktor_http.$_$.w;
26
+ var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.a2;
27
+ var getKClassFromExpression = kotlin_kotlin.$_$.e;
28
+ var Long = kotlin_kotlin.$_$.mf;
29
+ var ProtocolUpgrade = kotlin_io_ktor_ktor_http.$_$.t;
30
+ var NoContent = kotlin_io_ktor_ktor_http.$_$.s;
31
+ var ContentWrapper = kotlin_io_ktor_ktor_http.$_$.r;
32
+ var toLong = kotlin_kotlin.$_$.wb;
33
+ var ByteArrayContent = kotlin_io_ktor_ktor_http.$_$.q;
34
+ var PipelineContext = kotlin_io_ktor_ktor_utils.$_$.j;
35
+ var initMetadataForLambda = kotlin_kotlin.$_$.xa;
36
+ var Phases_getInstance = kotlin_io_ktor_ktor_client_core.$_$.d;
37
+ var isSuspendFunction = kotlin_kotlin.$_$.kb;
38
+ var initMetadataForObject = kotlin_kotlin.$_$.ya;
39
+ var HttpResponse = kotlin_io_ktor_ktor_client_core.$_$.g1;
40
+ var PipelinePhase = kotlin_io_ktor_ktor_utils.$_$.k;
41
+ var Phases_getInstance_0 = kotlin_io_ktor_ktor_client_core.$_$.e;
42
+ var HttpResponseContainer = kotlin_io_ktor_ktor_client_core.$_$.f1;
43
+ var Phases_getInstance_1 = kotlin_io_ktor_ktor_client_core.$_$.f;
44
+ var get_ResponseObserver = kotlin_io_ktor_ktor_client_core.$_$.n;
45
+ var Collection = kotlin_kotlin.$_$.m5;
46
+ var isInterface = kotlin_kotlin.$_$.hb;
47
+ var toString_0 = kotlin_kotlin.$_$.vg;
48
+ var charset = kotlin_io_ktor_ktor_http.$_$.k1;
49
+ var Charsets_getInstance = kotlin_io_ktor_ktor_io.$_$.o;
50
+ var ByteChannel = kotlin_io_ktor_ktor_io.$_$.m1;
51
+ var GlobalScope_instance = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.h;
52
+ var Dispatchers_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.g;
53
+ var launch = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.k1;
54
+ var Url = kotlin_io_ktor_ktor_http.$_$.f1;
55
+ var HttpHeaders_getInstance = kotlin_io_ktor_ktor_http.$_$.g;
56
+ var HttpRequestBuilder = kotlin_io_ktor_ktor_client_core.$_$.z;
57
+ var joinToString = kotlin_kotlin.$_$.p7;
58
+ var equals = kotlin_kotlin.$_$.la;
59
+ var HttpClientCall = kotlin_io_ktor_ktor_client_core.$_$.h;
60
+ var contentType = kotlin_io_ktor_ktor_http.$_$.n1;
61
+ var CoroutineScope = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.a1;
62
+ var writeFully = kotlin_io_ktor_ktor_io.$_$.l;
63
+ var copyTo = kotlin_io_ktor_ktor_io.$_$.b;
64
+ var GZipEncoder_getInstance = kotlin_io_ktor_ktor_utils.$_$.a;
65
+ var readRemaining = kotlin_io_ktor_ktor_io.$_$.f;
66
+ var readText = kotlin_io_ktor_ktor_io.$_$.c1;
67
+ var Triple = kotlin_kotlin.$_$.uf;
68
+ var readAvailable = kotlin_io_ktor_ktor_io.$_$.d;
69
+ var Buffer = kotlin_org_jetbrains_kotlinx_kotlinx_io_core.$_$.f;
70
+ var writeFully_0 = kotlin_io_ktor_ktor_io.$_$.g1;
71
+ var decode = kotlin_io_ktor_ktor_io.$_$.s;
72
+ var charSequenceGet = kotlin_kotlin.$_$.ga;
73
+ var async = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.e1;
74
+ var noWhenBranchMatchedException = kotlin_kotlin.$_$.rg;
75
+ var split = kotlin_io_ktor_ktor_utils.$_$.h1;
76
+ var WriteChannelContent = kotlin_io_ktor_ktor_http.$_$.v;
77
+ var ByteReadChannel = kotlin_io_ktor_ktor_io.$_$.n1;
78
+ var URLBuilder = kotlin_io_ktor_ktor_http.$_$.d1;
79
+ var takeFrom = kotlin_io_ktor_ktor_http.$_$.t1;
80
+ var HeadersBuilder = kotlin_io_ktor_ktor_http.$_$.z;
81
+ var Companion_getInstance = kotlin_io_ktor_ktor_http.$_$.h;
82
+ var EmptyContent = kotlin_io_ktor_ktor_client_core.$_$.j1;
83
+ var appendIfNameAbsent = kotlin_io_ktor_ktor_utils.$_$.a1;
84
+ var appendAll = kotlin_io_ktor_ktor_utils.$_$.z;
85
+ var toLongOrNull = kotlin_kotlin.$_$.le;
86
+ var contentLength = kotlin_io_ktor_ktor_http.$_$.l1;
87
+ var get_request = kotlin_io_ktor_ktor_client_core.$_$.i1;
88
+ var Text_getInstance = kotlin_io_ktor_ktor_http.$_$.e;
89
+ var get_isSaved = kotlin_io_ktor_ktor_client_core.$_$.x;
90
+ var wrapWithContent = kotlin_io_ktor_ktor_client_core.$_$.o;
91
+ var getKClass = kotlin_kotlin.$_$.f;
92
+ var arrayOf = kotlin_kotlin.$_$.gg;
93
+ var createKType = kotlin_kotlin.$_$.c;
94
+ var TypeInfo = kotlin_io_ktor_ktor_utils.$_$.m;
95
+ var AttributeKey = kotlin_io_ktor_ktor_utils.$_$.o;
96
+ var Unit = kotlin_kotlin.$_$.dg;
97
+ var createClientPlugin = kotlin_io_ktor_ktor_client_core.$_$.m;
98
+ var toList = kotlin_kotlin.$_$.t8;
99
+ var sortedWith = kotlin_kotlin.$_$.o8;
100
+ var FunctionAdapter = kotlin_kotlin.$_$.z9;
101
+ var Comparator = kotlin_kotlin.$_$.ef;
102
+ var hashCode = kotlin_kotlin.$_$.ra;
103
+ var compareValues = kotlin_kotlin.$_$.d9;
104
+ var writer = kotlin_io_ktor_ktor_io.$_$.x1;
105
+ var WriterScope = kotlin_io_ktor_ktor_io.$_$.p1;
106
+ var copyToBoth = kotlin_io_ktor_ktor_utils.$_$.b1;
107
+ var get = kotlin_kotlin.$_$.r9;
108
+ var fold = kotlin_kotlin.$_$.q9;
109
+ var minusKey = kotlin_kotlin.$_$.s9;
110
+ var plus = kotlin_kotlin.$_$.u9;
111
+ var Element = kotlin_kotlin.$_$.t9;
112
+ //endregion
3
113
  //region block: pre-declaration
114
+ initMetadataForCoroutine($logResponseExceptionCOROUTINE$0, CoroutineImpl);
115
+ initMetadataForCoroutine($logResponseBodyCOROUTINE$1, CoroutineImpl);
116
+ initMetadataForCoroutine($closeResponseLogCOROUTINE$2, CoroutineImpl);
117
+ initMetadataForClass(HttpClientCallLogger, 'HttpClientCallLogger', VOID, VOID, VOID, [1, 0]);
118
+ initMetadataForClass(LogLevel, 'LogLevel', VOID, Enum);
119
+ initMetadataForClass(LoggedContent, 'LoggedContent', VOID, ReadChannelContent);
120
+ initMetadataForCompanion(Companion);
121
+ initMetadataForClass(SimpleLogger, 'SimpleLogger', SimpleLogger);
122
+ initMetadataForClass(LoggingConfig, 'LoggingConfig', LoggingConfig);
123
+ initMetadataForClass(LoggingFormat, 'LoggingFormat', VOID, Enum);
124
+ initMetadataForClass(Context, 'Context', VOID, VOID, VOID, [1, 0]);
125
+ initMetadataForLambda(SendHook$install$slambda, CoroutineImpl, VOID, [2]);
126
+ initMetadataForObject(SendHook, 'SendHook');
127
+ initMetadataForClass(Context_0, 'Context', VOID, VOID, VOID, [1]);
128
+ initMetadataForLambda(ResponseAfterEncodingHook$install$slambda, CoroutineImpl, VOID, [2]);
129
+ initMetadataForObject(ResponseAfterEncodingHook, 'ResponseAfterEncodingHook');
130
+ initMetadataForClass(Context_1, 'Context', VOID, VOID, VOID, [0]);
131
+ initMetadataForLambda(ResponseHook$install$slambda, CoroutineImpl, VOID, [2]);
132
+ initMetadataForObject(ResponseHook, 'ResponseHook');
133
+ initMetadataForClass(Context_2, 'Context', VOID, VOID, VOID, [0]);
134
+ initMetadataForLambda(ReceiveHook$install$slambda, CoroutineImpl, VOID, [2]);
135
+ initMetadataForObject(ReceiveHook, 'ReceiveHook');
136
+ initMetadataForLambda(Logging$lambda$slambda, CoroutineImpl, VOID, [2]);
137
+ initMetadataForLambda(Logging$lambda$slambda_1, CoroutineImpl, VOID, [2]);
138
+ initMetadataForLambda(Logging$lambda$slambda_3, CoroutineImpl, VOID, [2]);
139
+ initMetadataForLambda(Logging$lambda$slambda_5, CoroutineImpl, VOID, [2]);
140
+ initMetadataForLambda(Logging$lambda$slambda_7, CoroutineImpl, VOID, [1]);
141
+ initMetadataForLambda(Logging$lambda$detectIfBinary$slambda, CoroutineImpl, VOID, [1]);
142
+ initMetadataForLambda(Logging$lambda$logOutgoingContent$slambda, CoroutineImpl, VOID, [1]);
143
+ initMetadataForLambda(Logging$lambda$logRequestBody$slambda, CoroutineImpl, VOID, [1]);
144
+ initMetadataForCoroutine($invoke$detectIfBinaryCOROUTINE$3, CoroutineImpl);
145
+ initMetadataForCoroutine($invoke$logRequestBodyCOROUTINE$4, CoroutineImpl);
146
+ initMetadataForCoroutine($invoke$logOutgoingContentCOROUTINE$5, CoroutineImpl);
147
+ initMetadataForCoroutine($invoke$logRequestOkHttpFormatCOROUTINE$6, CoroutineImpl);
148
+ initMetadataForCoroutine($invoke$logResponseBodyCOROUTINE$7, CoroutineImpl);
149
+ initMetadataForCoroutine($invoke$logResponseOkHttpFormatCOROUTINE$8, CoroutineImpl);
150
+ initMetadataForClass(sam$kotlin_Comparator$0, 'sam$kotlin_Comparator$0', VOID, VOID, [Comparator, FunctionAdapter]);
151
+ initMetadataForCoroutine($logResponseBodyCOROUTINE$10, CoroutineImpl);
152
+ initMetadataForLambda(toReadChannel$slambda, CoroutineImpl, VOID, [1]);
153
+ initMetadataForCoroutine($observeCOROUTINE$11, CoroutineImpl);
154
+ initMetadataForObject(MDCContextKey, 'MDCContextKey');
155
+ initMetadataForObject(MDCContextElement, 'MDCContextElement', VOID, VOID, [Element]);
156
+ //endregion
157
+ function $logResponseExceptionCOROUTINE$0(_this__u8e3s4, message, resultContinuation) {
158
+ CoroutineImpl.call(this, resultContinuation);
159
+ this.e4z_1 = _this__u8e3s4;
160
+ this.f4z_1 = message;
161
+ }
162
+ protoOf($logResponseExceptionCOROUTINE$0).o9 = function () {
163
+ var suspendResult = this.i9_1;
164
+ $sm: do
165
+ try {
166
+ var tmp = this.g9_1;
167
+ switch (tmp) {
168
+ case 0:
169
+ this.h9_1 = 2;
170
+ this.g9_1 = 1;
171
+ suspendResult = this.e4z_1.j4z_1.zw(this);
172
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
173
+ return suspendResult;
174
+ }
175
+
176
+ continue $sm;
177
+ case 1:
178
+ var this_0 = this.f4z_1;
179
+ this.e4z_1.g4z_1.n4z(toString(trim(isCharSequence(this_0) ? this_0 : THROW_CCE())));
180
+ return Unit_instance;
181
+ case 2:
182
+ throw this.j9_1;
183
+ }
184
+ } catch ($p) {
185
+ var e = $p;
186
+ if (this.h9_1 === 2) {
187
+ throw e;
188
+ } else {
189
+ this.g9_1 = this.h9_1;
190
+ this.j9_1 = e;
191
+ }
192
+ }
193
+ while (true);
194
+ };
195
+ function $logResponseBodyCOROUTINE$1(_this__u8e3s4, message, resultContinuation) {
196
+ CoroutineImpl.call(this, resultContinuation);
197
+ this.w4z_1 = _this__u8e3s4;
198
+ this.x4z_1 = message;
199
+ }
200
+ protoOf($logResponseBodyCOROUTINE$1).o9 = function () {
201
+ var suspendResult = this.i9_1;
202
+ $sm: do
203
+ try {
204
+ var tmp = this.g9_1;
205
+ switch (tmp) {
206
+ case 0:
207
+ this.h9_1 = 2;
208
+ this.g9_1 = 1;
209
+ suspendResult = this.w4z_1.k4z_1.zw(this);
210
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
211
+ return suspendResult;
212
+ }
213
+
214
+ continue $sm;
215
+ case 1:
216
+ this.w4z_1.i4z_1.r8(this.x4z_1);
217
+ return Unit_instance;
218
+ case 2:
219
+ throw this.j9_1;
220
+ }
221
+ } catch ($p) {
222
+ var e = $p;
223
+ if (this.h9_1 === 2) {
224
+ throw e;
225
+ } else {
226
+ this.g9_1 = this.h9_1;
227
+ this.j9_1 = e;
228
+ }
229
+ }
230
+ while (true);
231
+ };
232
+ function $closeResponseLogCOROUTINE$2(_this__u8e3s4, resultContinuation) {
233
+ CoroutineImpl.call(this, resultContinuation);
234
+ this.g50_1 = _this__u8e3s4;
235
+ }
236
+ protoOf($closeResponseLogCOROUTINE$2).o9 = function () {
237
+ var suspendResult = this.i9_1;
238
+ $sm: do
239
+ try {
240
+ var tmp = this.g9_1;
241
+ switch (tmp) {
242
+ case 0:
243
+ this.h9_1 = 2;
244
+ if (!this.g50_1.m4z_1.atomicfu$compareAndSet(false, true))
245
+ return Unit_instance;
246
+ this.g9_1 = 1;
247
+ suspendResult = this.g50_1.j4z_1.zw(this);
248
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
249
+ return suspendResult;
250
+ }
251
+
252
+ continue $sm;
253
+ case 1:
254
+ var message = toString(trim(this.g50_1.i4z_1));
255
+ if (charSequenceLength(message) > 0) {
256
+ this.g50_1.g4z_1.n4z(message);
257
+ }
258
+
259
+ return Unit_instance;
260
+ case 2:
261
+ throw this.j9_1;
262
+ }
263
+ } catch ($p) {
264
+ var e = $p;
265
+ if (this.h9_1 === 2) {
266
+ throw e;
267
+ } else {
268
+ this.g9_1 = this.h9_1;
269
+ this.j9_1 = e;
270
+ }
271
+ }
272
+ while (true);
273
+ };
274
+ function HttpClientCallLogger(logger) {
275
+ this.g4z_1 = logger;
276
+ this.h4z_1 = StringBuilder_init_$Create$();
277
+ this.i4z_1 = StringBuilder_init_$Create$();
278
+ this.j4z_1 = Job();
279
+ this.k4z_1 = Job();
280
+ this.l4z_1 = atomic$boolean$1(false);
281
+ this.m4z_1 = atomic$boolean$1(false);
282
+ }
283
+ protoOf(HttpClientCallLogger).h50 = function (message) {
284
+ var tmp1 = this.h4z_1;
285
+ // Inline function 'kotlin.text.trim' call
286
+ // Inline function 'kotlin.text.appendLine' call
287
+ var value = toString(trim(isCharSequence(message) ? message : THROW_CCE()));
288
+ // Inline function 'kotlin.text.appendLine' call
289
+ tmp1.r8(value).s8(_Char___init__impl__6a9atx(10));
290
+ };
291
+ protoOf(HttpClientCallLogger).i50 = function (message) {
292
+ var tmp1 = this.i4z_1;
293
+ // Inline function 'kotlin.text.trim' call
294
+ // Inline function 'kotlin.text.appendLine' call
295
+ var value = toString(trim(isCharSequence(message) ? message : THROW_CCE()));
296
+ // Inline function 'kotlin.text.appendLine' call
297
+ tmp1.r8(value).s8(_Char___init__impl__6a9atx(10));
298
+ this.k4z_1.yw();
299
+ };
300
+ protoOf(HttpClientCallLogger).j50 = function (message, $completion) {
301
+ var tmp = new $logResponseExceptionCOROUTINE$0(this, message, $completion);
302
+ tmp.i9_1 = Unit_instance;
303
+ tmp.j9_1 = null;
304
+ return tmp.o9();
305
+ };
306
+ protoOf(HttpClientCallLogger).k50 = function (message, $completion) {
307
+ var tmp = new $logResponseBodyCOROUTINE$1(this, message, $completion);
308
+ tmp.i9_1 = Unit_instance;
309
+ tmp.j9_1 = null;
310
+ return tmp.o9();
311
+ };
312
+ protoOf(HttpClientCallLogger).l50 = function () {
313
+ if (!this.l4z_1.atomicfu$compareAndSet(false, true))
314
+ return Unit_instance;
315
+ try {
316
+ var message = toString(trim(this.h4z_1));
317
+ // Inline function 'kotlin.text.isNotEmpty' call
318
+ if (charSequenceLength(message) > 0) {
319
+ this.g4z_1.n4z(message);
320
+ }
321
+ }finally {
322
+ this.j4z_1.yw();
323
+ }
324
+ };
325
+ protoOf(HttpClientCallLogger).m50 = function ($completion) {
326
+ var tmp = new $closeResponseLogCOROUTINE$2(this, $completion);
327
+ tmp.i9_1 = Unit_instance;
328
+ tmp.j9_1 = null;
329
+ return tmp.o9();
330
+ };
331
+ var LogLevel_ALL_instance;
332
+ var LogLevel_HEADERS_instance;
333
+ var LogLevel_BODY_instance;
334
+ var LogLevel_INFO_instance;
335
+ var LogLevel_NONE_instance;
336
+ var LogLevel_entriesInitialized;
337
+ function LogLevel_initEntries() {
338
+ if (LogLevel_entriesInitialized)
339
+ return Unit_instance;
340
+ LogLevel_entriesInitialized = true;
341
+ LogLevel_ALL_instance = new LogLevel('ALL', 0, true, true, true);
342
+ LogLevel_HEADERS_instance = new LogLevel('HEADERS', 1, true, true, false);
343
+ LogLevel_BODY_instance = new LogLevel('BODY', 2, true, false, true);
344
+ LogLevel_INFO_instance = new LogLevel('INFO', 3, true, false, false);
345
+ LogLevel_NONE_instance = new LogLevel('NONE', 4, false, false, false);
346
+ }
347
+ function LogLevel(name, ordinal, info, headers, body) {
348
+ Enum.call(this, name, ordinal);
349
+ this.p50_1 = info;
350
+ this.q50_1 = headers;
351
+ this.r50_1 = body;
352
+ }
353
+ function LogLevel_ALL_getInstance() {
354
+ LogLevel_initEntries();
355
+ return LogLevel_ALL_instance;
356
+ }
357
+ function LogLevel_HEADERS_getInstance() {
358
+ LogLevel_initEntries();
359
+ return LogLevel_HEADERS_instance;
360
+ }
361
+ function LogLevel_BODY_getInstance() {
362
+ LogLevel_initEntries();
363
+ return LogLevel_BODY_instance;
364
+ }
365
+ function LogLevel_INFO_getInstance() {
366
+ LogLevel_initEntries();
367
+ return LogLevel_INFO_instance;
368
+ }
369
+ function LogLevel_NONE_getInstance() {
370
+ LogLevel_initEntries();
371
+ return LogLevel_NONE_instance;
372
+ }
373
+ function LoggedContent(originalContent, channel) {
374
+ ReadChannelContent.call(this);
375
+ this.t50_1 = originalContent;
376
+ this.u50_1 = channel;
377
+ this.v50_1 = this.t50_1.s34();
378
+ this.w50_1 = this.t50_1.u34();
379
+ this.x50_1 = this.t50_1.t34();
380
+ this.y50_1 = this.t50_1.x2y();
381
+ }
382
+ protoOf(LoggedContent).s34 = function () {
383
+ return this.v50_1;
384
+ };
385
+ protoOf(LoggedContent).u34 = function () {
386
+ return this.w50_1;
387
+ };
388
+ protoOf(LoggedContent).t34 = function () {
389
+ return this.x50_1;
390
+ };
391
+ protoOf(LoggedContent).x2y = function () {
392
+ return this.y50_1;
393
+ };
394
+ protoOf(LoggedContent).y34 = function () {
395
+ return this.u50_1;
396
+ };
397
+ function Companion() {
398
+ }
399
+ var Companion_instance;
400
+ function Companion_getInstance_0() {
401
+ return Companion_instance;
402
+ }
403
+ function get_SIMPLE(_this__u8e3s4) {
404
+ return new SimpleLogger();
405
+ }
406
+ function SimpleLogger() {
407
+ }
408
+ protoOf(SimpleLogger).n4z = function (message) {
409
+ println('HttpClient: ' + message);
410
+ };
411
+ function get_ClientCallLogger() {
412
+ _init_properties_Logging_kt__66pui5();
413
+ return ClientCallLogger;
414
+ }
415
+ var ClientCallLogger;
416
+ function get_DisableLogging() {
417
+ _init_properties_Logging_kt__66pui5();
418
+ return DisableLogging;
419
+ }
420
+ var DisableLogging;
421
+ function get_Logging() {
422
+ _init_properties_Logging_kt__66pui5();
423
+ return Logging;
424
+ }
425
+ var Logging;
426
+ function LoggingConfig() {
427
+ var tmp = this;
428
+ // Inline function 'kotlin.collections.mutableListOf' call
429
+ tmp.z50_1 = ArrayList_init_$Create$();
430
+ var tmp_0 = this;
431
+ // Inline function 'kotlin.collections.mutableListOf' call
432
+ tmp_0.a51_1 = ArrayList_init_$Create$();
433
+ this.b51_1 = null;
434
+ this.c51_1 = LoggingFormat_Default_getInstance();
435
+ this.d51_1 = LogLevel_HEADERS_getInstance();
436
+ }
437
+ protoOf(LoggingConfig).e51 = function (value) {
438
+ this.b51_1 = value;
439
+ };
440
+ protoOf(LoggingConfig).f51 = function () {
441
+ var tmp0_elvis_lhs = this.b51_1;
442
+ return tmp0_elvis_lhs == null ? get_DEFAULT(Companion_instance) : tmp0_elvis_lhs;
443
+ };
444
+ var LoggingFormat_Default_instance;
445
+ var LoggingFormat_OkHttp_instance;
446
+ var LoggingFormat_entriesInitialized;
447
+ function LoggingFormat_initEntries() {
448
+ if (LoggingFormat_entriesInitialized)
449
+ return Unit_instance;
450
+ LoggingFormat_entriesInitialized = true;
451
+ LoggingFormat_Default_instance = new LoggingFormat('Default', 0);
452
+ LoggingFormat_OkHttp_instance = new LoggingFormat('OkHttp', 1);
453
+ }
454
+ function LoggingFormat(name, ordinal) {
455
+ Enum.call(this, name, ordinal);
456
+ }
457
+ function pathQuery(_this__u8e3s4) {
458
+ _init_properties_Logging_kt__66pui5();
459
+ // Inline function 'kotlin.text.buildString' call
460
+ // Inline function 'kotlin.apply' call
461
+ var this_0 = StringBuilder_init_$Create$();
462
+ // Inline function 'kotlin.text.isEmpty' call
463
+ var this_1 = _this__u8e3s4.x33();
464
+ if (charSequenceLength(this_1) === 0) {
465
+ this_0.r8('/');
466
+ } else {
467
+ this_0.r8(_this__u8e3s4.x33());
468
+ }
469
+ // Inline function 'kotlin.text.isEmpty' call
470
+ var this_2 = _this__u8e3s4.a34();
471
+ if (!(charSequenceLength(this_2) === 0)) {
472
+ this_0.r8('?');
473
+ this_0.r8(_this__u8e3s4.a34());
474
+ }
475
+ return this_0.toString();
476
+ }
477
+ function computeRequestBodySize(content) {
478
+ _init_properties_Logging_kt__66pui5();
479
+ // Inline function 'kotlin.check' call
480
+ if (!(content instanceof OutgoingContent)) {
481
+ throw IllegalStateException_init_$Create$('Check failed.');
482
+ }
483
+ var tmp;
484
+ if (content instanceof ByteArrayContent) {
485
+ tmp = toLong(content.v34().length);
486
+ } else {
487
+ if (content instanceof ContentWrapper) {
488
+ tmp = computeRequestBodySize(content.e35());
489
+ } else {
490
+ if (content instanceof NoContent) {
491
+ tmp = new Long(0, 0);
492
+ } else {
493
+ if (content instanceof ProtocolUpgrade) {
494
+ tmp = new Long(0, 0);
495
+ } else {
496
+ var message = 'Unable to calculate the size for type ' + getKClassFromExpression(content).kb();
497
+ throw IllegalStateException_init_$Create$(toString(message));
498
+ }
499
+ }
500
+ }
501
+ }
502
+ return tmp;
503
+ }
504
+ function Context(context) {
505
+ this.g51_1 = context;
506
+ }
507
+ protoOf(Context).h51 = function (content, $completion) {
508
+ return this.g51_1.f2q(content, $completion);
509
+ };
510
+ protoOf(Context).i51 = function ($completion) {
511
+ return this.g51_1.g2q($completion);
512
+ };
513
+ function SendHook$install$slambda($handler, resultContinuation) {
514
+ this.r51_1 = $handler;
515
+ CoroutineImpl.call(this, resultContinuation);
516
+ }
517
+ protoOf(SendHook$install$slambda).i3g = function ($this$intercept, it, $completion) {
518
+ var tmp = this.j3g($this$intercept, it, $completion);
519
+ tmp.i9_1 = Unit_instance;
520
+ tmp.j9_1 = null;
521
+ return tmp.o9();
522
+ };
523
+ protoOf(SendHook$install$slambda).da = function (p1, p2, $completion) {
524
+ var tmp = p1 instanceof PipelineContext ? p1 : THROW_CCE();
525
+ return this.i3g(tmp, !(p2 == null) ? p2 : THROW_CCE(), $completion);
526
+ };
527
+ protoOf(SendHook$install$slambda).o9 = function () {
528
+ var suspendResult = this.i9_1;
529
+ $sm: do
530
+ try {
531
+ var tmp = this.g9_1;
532
+ switch (tmp) {
533
+ case 0:
534
+ this.h9_1 = 2;
535
+ this.g9_1 = 1;
536
+ suspendResult = this.r51_1(new Context(this.s51_1), this.s51_1.b2r_1, this);
537
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
538
+ return suspendResult;
539
+ }
540
+
541
+ continue $sm;
542
+ case 1:
543
+ return Unit_instance;
544
+ case 2:
545
+ throw this.j9_1;
546
+ }
547
+ } catch ($p) {
548
+ var e = $p;
549
+ if (this.h9_1 === 2) {
550
+ throw e;
551
+ } else {
552
+ this.g9_1 = this.h9_1;
553
+ this.j9_1 = e;
554
+ }
555
+ }
556
+ while (true);
557
+ };
558
+ protoOf(SendHook$install$slambda).j3g = function ($this$intercept, it, completion) {
559
+ var i = new SendHook$install$slambda(this.r51_1, completion);
560
+ i.s51_1 = $this$intercept;
561
+ i.t51_1 = it;
562
+ return i;
563
+ };
564
+ function SendHook$install$slambda_0($handler, resultContinuation) {
565
+ var i = new SendHook$install$slambda($handler, resultContinuation);
566
+ var l = function ($this$intercept, it, $completion) {
567
+ return i.i3g($this$intercept, it, $completion);
568
+ };
569
+ l.$arity = 2;
570
+ return l;
571
+ }
572
+ function SendHook() {
573
+ }
574
+ protoOf(SendHook).u51 = function (client, handler) {
575
+ var tmp = Phases_getInstance().z3h_1;
576
+ client.q3f_1.f2r(tmp, SendHook$install$slambda_0(handler, null));
577
+ };
578
+ protoOf(SendHook).d3p = function (client, handler) {
579
+ return this.u51(client, (!(handler == null) ? isSuspendFunction(handler, 2) : false) ? handler : THROW_CCE());
580
+ };
581
+ var SendHook_instance;
582
+ function SendHook_getInstance() {
583
+ return SendHook_instance;
584
+ }
585
+ function Context_0(context) {
586
+ this.v51_1 = context;
587
+ }
588
+ protoOf(Context_0).d4e = function (response, $completion) {
589
+ return this.v51_1.f2q(response, $completion);
590
+ };
591
+ function ResponseAfterEncodingHook$install$slambda($handler, resultContinuation) {
592
+ this.e52_1 = $handler;
593
+ CoroutineImpl.call(this, resultContinuation);
594
+ }
595
+ protoOf(ResponseAfterEncodingHook$install$slambda).q3p = function ($this$intercept, it, $completion) {
596
+ var tmp = this.r3p($this$intercept, it, $completion);
597
+ tmp.i9_1 = Unit_instance;
598
+ tmp.j9_1 = null;
599
+ return tmp.o9();
600
+ };
601
+ protoOf(ResponseAfterEncodingHook$install$slambda).da = function (p1, p2, $completion) {
602
+ var tmp = p1 instanceof PipelineContext ? p1 : THROW_CCE();
603
+ return this.q3p(tmp, p2 instanceof HttpResponse ? p2 : THROW_CCE(), $completion);
604
+ };
605
+ protoOf(ResponseAfterEncodingHook$install$slambda).o9 = function () {
606
+ var suspendResult = this.i9_1;
607
+ $sm: do
608
+ try {
609
+ var tmp = this.g9_1;
610
+ switch (tmp) {
611
+ case 0:
612
+ this.h9_1 = 2;
613
+ this.g9_1 = 1;
614
+ suspendResult = this.e52_1(new Context_0(this.f52_1), this.f52_1.e2q(), this);
615
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
616
+ return suspendResult;
617
+ }
618
+
619
+ continue $sm;
620
+ case 1:
621
+ return Unit_instance;
622
+ case 2:
623
+ throw this.j9_1;
624
+ }
625
+ } catch ($p) {
626
+ var e = $p;
627
+ if (this.h9_1 === 2) {
628
+ throw e;
629
+ } else {
630
+ this.g9_1 = this.h9_1;
631
+ this.j9_1 = e;
632
+ }
633
+ }
634
+ while (true);
635
+ };
636
+ protoOf(ResponseAfterEncodingHook$install$slambda).r3p = function ($this$intercept, it, completion) {
637
+ var i = new ResponseAfterEncodingHook$install$slambda(this.e52_1, completion);
638
+ i.f52_1 = $this$intercept;
639
+ i.g52_1 = it;
640
+ return i;
641
+ };
642
+ function ResponseAfterEncodingHook$install$slambda_0($handler, resultContinuation) {
643
+ var i = new ResponseAfterEncodingHook$install$slambda($handler, resultContinuation);
644
+ var l = function ($this$intercept, it, $completion) {
645
+ return i.q3p($this$intercept, it, $completion);
646
+ };
647
+ l.$arity = 2;
648
+ return l;
649
+ }
650
+ function ResponseAfterEncodingHook() {
651
+ }
652
+ protoOf(ResponseAfterEncodingHook).h52 = function (client, handler) {
653
+ var afterState = new PipelinePhase('AfterState');
654
+ client.r3f_1.c2r(Phases_getInstance_0().u3p_1, afterState);
655
+ client.r3f_1.f2r(afterState, ResponseAfterEncodingHook$install$slambda_0(handler, null));
656
+ };
657
+ protoOf(ResponseAfterEncodingHook).d3p = function (client, handler) {
658
+ return this.h52(client, (!(handler == null) ? isSuspendFunction(handler, 2) : false) ? handler : THROW_CCE());
659
+ };
660
+ var ResponseAfterEncodingHook_instance;
661
+ function ResponseAfterEncodingHook_getInstance() {
662
+ return ResponseAfterEncodingHook_instance;
663
+ }
664
+ function Context_1(context) {
665
+ this.i52_1 = context;
666
+ }
667
+ protoOf(Context_1).j52 = function ($completion) {
668
+ return this.i52_1.g2q($completion);
669
+ };
670
+ function ResponseHook$install$slambda($handler, resultContinuation) {
671
+ this.s52_1 = $handler;
672
+ CoroutineImpl.call(this, resultContinuation);
673
+ }
674
+ protoOf(ResponseHook$install$slambda).q3p = function ($this$intercept, it, $completion) {
675
+ var tmp = this.r3p($this$intercept, it, $completion);
676
+ tmp.i9_1 = Unit_instance;
677
+ tmp.j9_1 = null;
678
+ return tmp.o9();
679
+ };
680
+ protoOf(ResponseHook$install$slambda).da = function (p1, p2, $completion) {
681
+ var tmp = p1 instanceof PipelineContext ? p1 : THROW_CCE();
682
+ return this.q3p(tmp, p2 instanceof HttpResponse ? p2 : THROW_CCE(), $completion);
683
+ };
684
+ protoOf(ResponseHook$install$slambda).o9 = function () {
685
+ var suspendResult = this.i9_1;
686
+ $sm: do
687
+ try {
688
+ var tmp = this.g9_1;
689
+ switch (tmp) {
690
+ case 0:
691
+ this.h9_1 = 2;
692
+ this.g9_1 = 1;
693
+ suspendResult = this.s52_1(new Context_1(this.t52_1), this.t52_1.e2q(), this);
694
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
695
+ return suspendResult;
696
+ }
697
+
698
+ continue $sm;
699
+ case 1:
700
+ return Unit_instance;
701
+ case 2:
702
+ throw this.j9_1;
703
+ }
704
+ } catch ($p) {
705
+ var e = $p;
706
+ if (this.h9_1 === 2) {
707
+ throw e;
708
+ } else {
709
+ this.g9_1 = this.h9_1;
710
+ this.j9_1 = e;
711
+ }
712
+ }
713
+ while (true);
714
+ };
715
+ protoOf(ResponseHook$install$slambda).r3p = function ($this$intercept, it, completion) {
716
+ var i = new ResponseHook$install$slambda(this.s52_1, completion);
717
+ i.t52_1 = $this$intercept;
718
+ i.u52_1 = it;
719
+ return i;
720
+ };
721
+ function ResponseHook$install$slambda_0($handler, resultContinuation) {
722
+ var i = new ResponseHook$install$slambda($handler, resultContinuation);
723
+ var l = function ($this$intercept, it, $completion) {
724
+ return i.q3p($this$intercept, it, $completion);
725
+ };
726
+ l.$arity = 2;
727
+ return l;
728
+ }
729
+ function ResponseHook() {
730
+ }
731
+ protoOf(ResponseHook).v52 = function (client, handler) {
732
+ var tmp = Phases_getInstance_0().u3p_1;
733
+ client.r3f_1.f2r(tmp, ResponseHook$install$slambda_0(handler, null));
734
+ };
735
+ protoOf(ResponseHook).d3p = function (client, handler) {
736
+ return this.v52(client, (!(handler == null) ? isSuspendFunction(handler, 2) : false) ? handler : THROW_CCE());
737
+ };
738
+ var ResponseHook_instance;
739
+ function ResponseHook_getInstance() {
740
+ return ResponseHook_instance;
741
+ }
742
+ function Context_2(context) {
743
+ this.w52_1 = context;
744
+ }
745
+ protoOf(Context_2).x52 = function ($completion) {
746
+ return this.w52_1.g2q($completion);
747
+ };
748
+ function ReceiveHook$install$slambda($handler, resultContinuation) {
749
+ this.g53_1 = $handler;
750
+ CoroutineImpl.call(this, resultContinuation);
751
+ }
752
+ protoOf(ReceiveHook$install$slambda).d3h = function ($this$intercept, it, $completion) {
753
+ var tmp = this.e3h($this$intercept, it, $completion);
754
+ tmp.i9_1 = Unit_instance;
755
+ tmp.j9_1 = null;
756
+ return tmp.o9();
757
+ };
758
+ protoOf(ReceiveHook$install$slambda).da = function (p1, p2, $completion) {
759
+ var tmp = p1 instanceof PipelineContext ? p1 : THROW_CCE();
760
+ return this.d3h(tmp, p2 instanceof HttpResponseContainer ? p2 : THROW_CCE(), $completion);
761
+ };
762
+ protoOf(ReceiveHook$install$slambda).o9 = function () {
763
+ var suspendResult = this.i9_1;
764
+ $sm: do
765
+ try {
766
+ var tmp = this.g9_1;
767
+ switch (tmp) {
768
+ case 0:
769
+ this.h9_1 = 2;
770
+ this.g9_1 = 1;
771
+ suspendResult = this.g53_1(new Context_2(this.h53_1), this.h53_1.b2r_1, this);
772
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
773
+ return suspendResult;
774
+ }
775
+
776
+ continue $sm;
777
+ case 1:
778
+ return Unit_instance;
779
+ case 2:
780
+ throw this.j9_1;
781
+ }
782
+ } catch ($p) {
783
+ var e = $p;
784
+ if (this.h9_1 === 2) {
785
+ throw e;
786
+ } else {
787
+ this.g9_1 = this.h9_1;
788
+ this.j9_1 = e;
789
+ }
790
+ }
791
+ while (true);
792
+ };
793
+ protoOf(ReceiveHook$install$slambda).e3h = function ($this$intercept, it, completion) {
794
+ var i = new ReceiveHook$install$slambda(this.g53_1, completion);
795
+ i.h53_1 = $this$intercept;
796
+ i.i53_1 = it;
797
+ return i;
798
+ };
799
+ function ReceiveHook$install$slambda_0($handler, resultContinuation) {
800
+ var i = new ReceiveHook$install$slambda($handler, resultContinuation);
801
+ var l = function ($this$intercept, it, $completion) {
802
+ return i.d3h($this$intercept, it, $completion);
803
+ };
804
+ l.$arity = 2;
805
+ return l;
806
+ }
807
+ function ReceiveHook() {
808
+ }
809
+ protoOf(ReceiveHook).j53 = function (client, handler) {
810
+ var tmp = Phases_getInstance_1().n3i_1;
811
+ client.p3f_1.f2r(tmp, ReceiveHook$install$slambda_0(handler, null));
812
+ };
813
+ protoOf(ReceiveHook).d3p = function (client, handler) {
814
+ return this.j53(client, (!(handler == null) ? isSuspendFunction(handler, 2) : false) ? handler : THROW_CCE());
815
+ };
816
+ var ReceiveHook_instance;
817
+ function ReceiveHook_getInstance() {
818
+ return ReceiveHook_instance;
819
+ }
820
+ function LoggingConfig$_init_$ref_f1nb0k() {
821
+ var l = function () {
822
+ return new LoggingConfig();
823
+ };
824
+ l.callableName = '<init>';
825
+ return l;
826
+ }
827
+ function Logging$lambda($this$createClientPlugin) {
828
+ _init_properties_Logging_kt__66pui5();
829
+ var logger = $this$createClientPlugin.y3p_1.f51();
830
+ var level = $this$createClientPlugin.y3p_1.d51_1;
831
+ var filters = $this$createClientPlugin.y3p_1.z50_1;
832
+ var sanitizedHeaders = $this$createClientPlugin.y3p_1.a51_1;
833
+ var okHttpFormat = $this$createClientPlugin.y3p_1.c51_1.equals(LoggingFormat_OkHttp_getInstance());
834
+ var tmp = SendHook_instance;
835
+ $this$createClientPlugin.b3q(tmp, Logging$lambda$slambda_0(okHttpFormat, logger, filters, sanitizedHeaders, level, $this$createClientPlugin, null));
836
+ var tmp_0 = ResponseAfterEncodingHook_instance;
837
+ $this$createClientPlugin.b3q(tmp_0, Logging$lambda$slambda_2(okHttpFormat, logger, sanitizedHeaders, level, $this$createClientPlugin, null));
838
+ var tmp_1 = ResponseHook_instance;
839
+ $this$createClientPlugin.b3q(tmp_1, Logging$lambda$slambda_4(okHttpFormat, level, sanitizedHeaders, null));
840
+ var tmp_2 = ReceiveHook_instance;
841
+ $this$createClientPlugin.b3q(tmp_2, Logging$lambda$slambda_6(okHttpFormat, level, null));
842
+ if (okHttpFormat)
843
+ return Unit_instance;
844
+ if (!level.r50_1)
845
+ return Unit_instance;
846
+ var observer = Logging$lambda$slambda_8(level, null);
847
+ var tmp_3 = get_ResponseObserver();
848
+ var tmp_4 = get_ResponseObserver();
849
+ tmp_3.v3i(tmp_4.u3i(Logging$lambda$lambda(observer)), $this$createClientPlugin.x3p_1);
850
+ return Unit_instance;
851
+ }
852
+ function invoke$shouldBeLogged(filters, request) {
853
+ var tmp;
854
+ if (filters.h()) {
855
+ tmp = true;
856
+ } else {
857
+ var tmp$ret$0;
858
+ $l$block_0: {
859
+ // Inline function 'kotlin.collections.any' call
860
+ var tmp_0;
861
+ if (isInterface(filters, Collection)) {
862
+ tmp_0 = filters.h();
863
+ } else {
864
+ tmp_0 = false;
865
+ }
866
+ if (tmp_0) {
867
+ tmp$ret$0 = false;
868
+ break $l$block_0;
869
+ }
870
+ var _iterator__ex2g4s = filters.p();
871
+ while (_iterator__ex2g4s.q()) {
872
+ var element = _iterator__ex2g4s.r();
873
+ if (element(request)) {
874
+ tmp$ret$0 = true;
875
+ break $l$block_0;
876
+ }
877
+ }
878
+ tmp$ret$0 = false;
879
+ }
880
+ tmp = tmp$ret$0;
881
+ }
882
+ return tmp;
883
+ }
884
+ function invoke$isNone(level) {
885
+ return level.equals(LogLevel_NONE_getInstance());
886
+ }
887
+ function invoke$isInfo(level) {
888
+ return level.equals(LogLevel_INFO_getInstance());
889
+ }
890
+ function invoke$isHeaders(level) {
891
+ return level.equals(LogLevel_HEADERS_getInstance());
892
+ }
893
+ function invoke$isBody(level) {
894
+ return level.equals(LogLevel_BODY_getInstance()) || level.equals(LogLevel_ALL_getInstance());
895
+ }
896
+ function invoke$detectIfBinary($this_createClientPlugin, body, contentLength, contentType, headers, $completion) {
897
+ var tmp = new $invoke$detectIfBinaryCOROUTINE$3($this_createClientPlugin, body, contentLength, contentType, headers, $completion);
898
+ tmp.i9_1 = Unit_instance;
899
+ tmp.j9_1 = null;
900
+ return tmp.o9();
901
+ }
902
+ function invoke$logRequestBody($this_createClientPlugin, content, contentLength, headers, method, logLines, body, $completion) {
903
+ var tmp = new $invoke$logRequestBodyCOROUTINE$4($this_createClientPlugin, content, contentLength, headers, method, logLines, body, $completion);
904
+ tmp.i9_1 = Unit_instance;
905
+ tmp.j9_1 = null;
906
+ return tmp.o9();
907
+ }
908
+ function invoke$logOutgoingContent($this_createClientPlugin, content, method, headers, logLines, process, $completion) {
909
+ var tmp;
910
+ if (process === VOID) {
911
+ tmp = Logging$lambda$logOutgoingContent$lambda;
912
+ } else {
913
+ tmp = process;
914
+ }
915
+ process = tmp;
916
+ var tmp_0 = new $invoke$logOutgoingContentCOROUTINE$5($this_createClientPlugin, content, method, headers, logLines, process, $completion);
917
+ tmp_0.i9_1 = Unit_instance;
918
+ tmp_0.j9_1 = null;
919
+ return tmp_0.o9();
920
+ }
921
+ function invoke$logRequestOkHttpFormat(sanitizedHeaders, level, $this_createClientPlugin, request, logLines, $completion) {
922
+ var tmp = new $invoke$logRequestOkHttpFormatCOROUTINE$6(sanitizedHeaders, level, $this_createClientPlugin, request, logLines, $completion);
923
+ tmp.i9_1 = Unit_instance;
924
+ tmp.j9_1 = null;
925
+ return tmp.o9();
926
+ }
927
+ function invoke$logResponseBody($this_createClientPlugin, response, body, logLines, $completion) {
928
+ var tmp = new $invoke$logResponseBodyCOROUTINE$7($this_createClientPlugin, response, body, logLines, $completion);
929
+ tmp.i9_1 = Unit_instance;
930
+ tmp.j9_1 = null;
931
+ return tmp.o9();
932
+ }
933
+ function invoke$logResponseOkHttpFormat(sanitizedHeaders, level, $this_createClientPlugin, response, logLines, $completion) {
934
+ var tmp = new $invoke$logResponseOkHttpFormatCOROUTINE$8(sanitizedHeaders, level, $this_createClientPlugin, response, logLines, $completion);
935
+ tmp.i9_1 = Unit_instance;
936
+ tmp.j9_1 = null;
937
+ return tmp.o9();
938
+ }
939
+ function invoke$logRequestBody_0(content, logger, $completion) {
940
+ var requestLog = StringBuilder_init_$Create$();
941
+ // Inline function 'kotlin.text.appendLine' call
942
+ var value = 'BODY Content-Type: ' + toString_0(content.s34());
943
+ // Inline function 'kotlin.text.appendLine' call
944
+ requestLog.r8(value).s8(_Char___init__impl__6a9atx(10));
945
+ var tmp0_safe_receiver = content.s34();
946
+ var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : charset(tmp0_safe_receiver);
947
+ var charset_0 = tmp1_elvis_lhs == null ? Charsets_getInstance().q1x_1 : tmp1_elvis_lhs;
948
+ var channel = new ByteChannel();
949
+ var tmp = GlobalScope_instance;
950
+ var tmp_0 = Dispatchers_getInstance().y10_1.rh(MDCContext());
951
+ launch(tmp, tmp_0, VOID, Logging$lambda$logRequestBody$slambda_0(channel, charset_0, requestLog, logger, null));
952
+ return observe(content, channel, $completion);
953
+ }
954
+ function invoke$logRequestException(level, logger, context, cause) {
955
+ if (level.p50_1) {
956
+ logger.n4z('REQUEST ' + Url(context.p3h_1).toString() + ' failed with exception: ' + cause.toString());
957
+ }
958
+ }
959
+ function invoke$logRequest(logger, level, sanitizedHeaders, request, $completion) {
960
+ var tmp = request.s3h_1;
961
+ var content = tmp instanceof OutgoingContent ? tmp : THROW_CCE();
962
+ var callLogger = new HttpClientCallLogger(logger);
963
+ request.u3h_1.l2j(get_ClientCallLogger(), callLogger);
964
+ // Inline function 'kotlin.text.buildString' call
965
+ // Inline function 'kotlin.apply' call
966
+ var this_0 = StringBuilder_init_$Create$();
967
+ if (level.p50_1) {
968
+ // Inline function 'kotlin.text.appendLine' call
969
+ var value = 'REQUEST: ' + Url(request.p3h_1).toString();
970
+ // Inline function 'kotlin.text.appendLine' call
971
+ this_0.r8(value).s8(_Char___init__impl__6a9atx(10));
972
+ // Inline function 'kotlin.text.appendLine' call
973
+ var value_0 = 'METHOD: ' + request.q3h_1.toString();
974
+ // Inline function 'kotlin.text.appendLine' call
975
+ this_0.r8(value_0).s8(_Char___init__impl__6a9atx(10));
976
+ }
977
+ if (level.q50_1) {
978
+ // Inline function 'kotlin.text.appendLine' call
979
+ var value_1 = 'COMMON HEADERS';
980
+ // Inline function 'kotlin.text.appendLine' call
981
+ this_0.r8(value_1).s8(_Char___init__impl__6a9atx(10));
982
+ logHeaders(this_0, request.r3h_1.q2n(), sanitizedHeaders);
983
+ // Inline function 'kotlin.text.appendLine' call
984
+ var value_2 = 'CONTENT HEADERS';
985
+ // Inline function 'kotlin.text.appendLine' call
986
+ this_0.r8(value_2).s8(_Char___init__impl__6a9atx(10));
987
+ var tmp$ret$9;
988
+ $l$block: {
989
+ // Inline function 'kotlin.collections.firstOrNull' call
990
+ var _iterator__ex2g4s = sanitizedHeaders.p();
991
+ while (_iterator__ex2g4s.q()) {
992
+ var element = _iterator__ex2g4s.r();
993
+ if (element.h58_1(HttpHeaders_getInstance().j2v_1)) {
994
+ tmp$ret$9 = element;
995
+ break $l$block;
996
+ }
997
+ }
998
+ tmp$ret$9 = null;
999
+ }
1000
+ var tmp0_safe_receiver = tmp$ret$9;
1001
+ var contentLengthPlaceholder = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.g58_1;
1002
+ var tmp$ret$11;
1003
+ $l$block_0: {
1004
+ // Inline function 'kotlin.collections.firstOrNull' call
1005
+ var _iterator__ex2g4s_0 = sanitizedHeaders.p();
1006
+ while (_iterator__ex2g4s_0.q()) {
1007
+ var element_0 = _iterator__ex2g4s_0.r();
1008
+ if (element_0.h58_1(HttpHeaders_getInstance().m2v_1)) {
1009
+ tmp$ret$11 = element_0;
1010
+ break $l$block_0;
1011
+ }
1012
+ }
1013
+ tmp$ret$11 = null;
1014
+ }
1015
+ var tmp1_safe_receiver = tmp$ret$11;
1016
+ var contentTypePlaceholder = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.g58_1;
1017
+ var tmp2_safe_receiver = content.u34();
1018
+ if (tmp2_safe_receiver == null)
1019
+ null;
1020
+ else {
1021
+ // Inline function 'kotlin.let' call
1022
+ var tmp_0 = HttpHeaders_getInstance().j2v_1;
1023
+ logHeader(this_0, tmp_0, contentLengthPlaceholder == null ? tmp2_safe_receiver.toString() : contentLengthPlaceholder);
1024
+ }
1025
+ var tmp3_safe_receiver = content.s34();
1026
+ if (tmp3_safe_receiver == null)
1027
+ null;
1028
+ else {
1029
+ // Inline function 'kotlin.let' call
1030
+ var tmp_1 = HttpHeaders_getInstance().m2v_1;
1031
+ logHeader(this_0, tmp_1, contentTypePlaceholder == null ? tmp3_safe_receiver.toString() : contentTypePlaceholder);
1032
+ }
1033
+ logHeaders(this_0, content.x2y().q2n(), sanitizedHeaders);
1034
+ }
1035
+ var message = this_0.toString();
1036
+ // Inline function 'kotlin.text.isNotEmpty' call
1037
+ if (charSequenceLength(message) > 0) {
1038
+ callLogger.h50(message);
1039
+ }
1040
+ var tmp_2;
1041
+ // Inline function 'kotlin.text.isEmpty' call
1042
+ if (charSequenceLength(message) === 0) {
1043
+ tmp_2 = true;
1044
+ } else {
1045
+ tmp_2 = !level.r50_1;
1046
+ }
1047
+ if (tmp_2) {
1048
+ callLogger.l50();
1049
+ return null;
1050
+ }
1051
+ return invoke$logRequestBody_0(content, callLogger, $completion);
1052
+ }
1053
+ function invoke$logResponseException(level, log, request, cause) {
1054
+ if (!level.p50_1)
1055
+ return Unit_instance;
1056
+ log.r8('RESPONSE ' + request.b3k().toString() + ' failed with exception: ' + cause.toString());
1057
+ }
1058
+ function Logging$lambda$slambda($okHttpFormat, $logger, $filters, $sanitizedHeaders, $level, $this_createClientPlugin, resultContinuation) {
1059
+ this.q58_1 = $okHttpFormat;
1060
+ this.r58_1 = $logger;
1061
+ this.s58_1 = $filters;
1062
+ this.t58_1 = $sanitizedHeaders;
1063
+ this.u58_1 = $level;
1064
+ this.v58_1 = $this_createClientPlugin;
1065
+ CoroutineImpl.call(this, resultContinuation);
1066
+ }
1067
+ protoOf(Logging$lambda$slambda).j59 = function ($this$on, request, $completion) {
1068
+ var tmp = this.k59($this$on, request, $completion);
1069
+ tmp.i9_1 = Unit_instance;
1070
+ tmp.j9_1 = null;
1071
+ return tmp.o9();
1072
+ };
1073
+ protoOf(Logging$lambda$slambda).da = function (p1, p2, $completion) {
1074
+ var tmp = p1 instanceof Context ? p1 : THROW_CCE();
1075
+ return this.j59(tmp, p2 instanceof HttpRequestBuilder ? p2 : THROW_CCE(), $completion);
1076
+ };
1077
+ protoOf(Logging$lambda$slambda).o9 = function () {
1078
+ var suspendResult = this.i9_1;
1079
+ $sm: do
1080
+ try {
1081
+ var tmp = this.g9_1;
1082
+ switch (tmp) {
1083
+ case 0:
1084
+ this.h9_1 = 16;
1085
+ if (!invoke$shouldBeLogged(this.s58_1, this.x58_1)) {
1086
+ this.x58_1.u3h_1.l2j(get_DisableLogging(), Unit_instance);
1087
+ return Unit_instance;
1088
+ }
1089
+
1090
+ if (this.q58_1) {
1091
+ var tmp_0 = this;
1092
+ tmp_0.y58_1 = ArrayList_init_$Create$();
1093
+ this.g9_1 = 10;
1094
+ suspendResult = invoke$logRequestOkHttpFormat(this.t58_1, this.u58_1, this.v58_1, this.x58_1, this.y58_1, this);
1095
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1096
+ return suspendResult;
1097
+ }
1098
+ continue $sm;
1099
+ } else {
1100
+ this.g9_1 = 1;
1101
+ continue $sm;
1102
+ }
1103
+
1104
+ case 1:
1105
+ this.h9_1 = 3;
1106
+ this.g9_1 = 2;
1107
+ suspendResult = invoke$logRequest(this.r58_1, this.u58_1, this.t58_1, this.x58_1, this);
1108
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1109
+ return suspendResult;
1110
+ }
1111
+
1112
+ continue $sm;
1113
+ case 2:
1114
+ this.z58_1 = suspendResult;
1115
+ this.h9_1 = 16;
1116
+ this.g9_1 = 4;
1117
+ continue $sm;
1118
+ case 3:
1119
+ this.h9_1 = 16;
1120
+ var tmp_1 = this.j9_1;
1121
+ if (tmp_1 instanceof Error) {
1122
+ this.a59_1 = this.j9_1;
1123
+ var tmp_2 = this;
1124
+ tmp_2.z58_1 = null;
1125
+ this.g9_1 = 4;
1126
+ continue $sm;
1127
+ } else {
1128
+ throw this.j9_1;
1129
+ }
1130
+
1131
+ case 4:
1132
+ this.h9_1 = 16;
1133
+ this.b59_1 = this.z58_1;
1134
+ this.c59_1 = Unit_instance;
1135
+ this.g9_1 = 5;
1136
+ continue $sm;
1137
+ case 5:
1138
+ this.h9_1 = 8;
1139
+ this.h9_1 = 7;
1140
+ this.g9_1 = 6;
1141
+ var tmp0_elvis_lhs = this.b59_1;
1142
+ suspendResult = this.w58_1.h51(tmp0_elvis_lhs == null ? this.x58_1.s3h_1 : tmp0_elvis_lhs, this);
1143
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1144
+ return suspendResult;
1145
+ }
1146
+
1147
+ continue $sm;
1148
+ case 6:
1149
+ this.c59_1 = suspendResult;
1150
+ this.h9_1 = 16;
1151
+ this.g9_1 = 9;
1152
+ continue $sm;
1153
+ case 7:
1154
+ this.h9_1 = 8;
1155
+ var tmp_3 = this.j9_1;
1156
+ if (tmp_3 instanceof Error) {
1157
+ this.d59_1 = this.j9_1;
1158
+ var tmp_4 = this;
1159
+ invoke$logRequestException(this.u58_1, this.r58_1, this.x58_1, this.d59_1);
1160
+ throw this.d59_1;
1161
+ } else {
1162
+ throw this.j9_1;
1163
+ }
1164
+
1165
+ case 8:
1166
+ this.h9_1 = 16;
1167
+ this.e59_1 = this.j9_1;
1168
+ throw this.e59_1;
1169
+ case 9:
1170
+ this.f59_1 = this.c59_1;
1171
+ this.h9_1 = 16;
1172
+ return Unit_instance;
1173
+ case 10:
1174
+ this.g59_1 = suspendResult;
1175
+ if (this.y58_1.s() > 0) {
1176
+ this.r58_1.n4z(joinToString(this.y58_1, '\n'));
1177
+ }
1178
+
1179
+ this.h9_1 = 14;
1180
+ if (!(this.g59_1 == null)) {
1181
+ this.g9_1 = 12;
1182
+ suspendResult = this.w58_1.h51(this.g59_1, this);
1183
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1184
+ return suspendResult;
1185
+ }
1186
+ continue $sm;
1187
+ } else {
1188
+ this.g9_1 = 11;
1189
+ suspendResult = this.w58_1.i51(this);
1190
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1191
+ return suspendResult;
1192
+ }
1193
+ continue $sm;
1194
+ }
1195
+
1196
+ case 11:
1197
+ this.i59_1 = suspendResult;
1198
+ this.g9_1 = 13;
1199
+ continue $sm;
1200
+ case 12:
1201
+ this.i59_1 = suspendResult;
1202
+ this.g9_1 = 13;
1203
+ continue $sm;
1204
+ case 13:
1205
+ this.h59_1 = this.i59_1;
1206
+ this.h9_1 = 16;
1207
+ this.g9_1 = 15;
1208
+ continue $sm;
1209
+ case 14:
1210
+ this.h9_1 = 16;
1211
+ var tmp_5 = this.j9_1;
1212
+ if (tmp_5 instanceof Error) {
1213
+ var cause = this.j9_1;
1214
+ var tmp_6 = this;
1215
+ this.r58_1.n4z('<-- HTTP FAILED: ' + cause.toString());
1216
+ throw cause;
1217
+ } else {
1218
+ throw this.j9_1;
1219
+ }
1220
+
1221
+ case 15:
1222
+ this.h9_1 = 16;
1223
+ return Unit_instance;
1224
+ case 16:
1225
+ throw this.j9_1;
1226
+ }
1227
+ } catch ($p) {
1228
+ var e = $p;
1229
+ if (this.h9_1 === 16) {
1230
+ throw e;
1231
+ } else {
1232
+ this.g9_1 = this.h9_1;
1233
+ this.j9_1 = e;
1234
+ }
1235
+ }
1236
+ while (true);
1237
+ };
1238
+ protoOf(Logging$lambda$slambda).k59 = function ($this$on, request, completion) {
1239
+ var i = new Logging$lambda$slambda(this.q58_1, this.r58_1, this.s58_1, this.t58_1, this.u58_1, this.v58_1, completion);
1240
+ i.w58_1 = $this$on;
1241
+ i.x58_1 = request;
1242
+ return i;
1243
+ };
1244
+ function Logging$lambda$slambda_0($okHttpFormat, $logger, $filters, $sanitizedHeaders, $level, $this_createClientPlugin, resultContinuation) {
1245
+ var i = new Logging$lambda$slambda($okHttpFormat, $logger, $filters, $sanitizedHeaders, $level, $this_createClientPlugin, resultContinuation);
1246
+ var l = function ($this$on, request, $completion) {
1247
+ return i.j59($this$on, request, $completion);
1248
+ };
1249
+ l.$arity = 2;
1250
+ return l;
1251
+ }
1252
+ function Logging$lambda$slambda_1($okHttpFormat, $logger, $sanitizedHeaders, $level, $this_createClientPlugin, resultContinuation) {
1253
+ this.t59_1 = $okHttpFormat;
1254
+ this.u59_1 = $logger;
1255
+ this.v59_1 = $sanitizedHeaders;
1256
+ this.w59_1 = $level;
1257
+ this.x59_1 = $this_createClientPlugin;
1258
+ CoroutineImpl.call(this, resultContinuation);
1259
+ }
1260
+ protoOf(Logging$lambda$slambda_1).c5a = function ($this$on, response, $completion) {
1261
+ var tmp = this.d5a($this$on, response, $completion);
1262
+ tmp.i9_1 = Unit_instance;
1263
+ tmp.j9_1 = null;
1264
+ return tmp.o9();
1265
+ };
1266
+ protoOf(Logging$lambda$slambda_1).da = function (p1, p2, $completion) {
1267
+ var tmp = p1 instanceof Context_0 ? p1 : THROW_CCE();
1268
+ return this.c5a(tmp, p2 instanceof HttpResponse ? p2 : THROW_CCE(), $completion);
1269
+ };
1270
+ protoOf(Logging$lambda$slambda_1).o9 = function () {
1271
+ var suspendResult = this.i9_1;
1272
+ $sm: do
1273
+ try {
1274
+ var tmp = this.g9_1;
1275
+ switch (tmp) {
1276
+ case 0:
1277
+ this.h9_1 = 5;
1278
+ if (this.t59_1) {
1279
+ var tmp_0 = this;
1280
+ tmp_0.a5a_1 = ArrayList_init_$Create$();
1281
+ this.g9_1 = 1;
1282
+ suspendResult = invoke$logResponseOkHttpFormat(this.v59_1, this.w59_1, this.x59_1, this.z59_1, this.a5a_1, this);
1283
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1284
+ return suspendResult;
1285
+ }
1286
+ continue $sm;
1287
+ } else {
1288
+ this.g9_1 = 4;
1289
+ continue $sm;
1290
+ }
1291
+
1292
+ case 1:
1293
+ this.b5a_1 = suspendResult;
1294
+ if (this.a5a_1.s() > 0) {
1295
+ this.u59_1.n4z(joinToString(this.a5a_1, '\n'));
1296
+ }
1297
+
1298
+ if (!equals(this.b5a_1, this.z59_1)) {
1299
+ this.g9_1 = 2;
1300
+ suspendResult = this.y59_1.d4e(this.b5a_1, this);
1301
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1302
+ return suspendResult;
1303
+ }
1304
+ continue $sm;
1305
+ } else {
1306
+ this.g9_1 = 3;
1307
+ continue $sm;
1308
+ }
1309
+
1310
+ case 2:
1311
+ this.g9_1 = 3;
1312
+ continue $sm;
1313
+ case 3:
1314
+ this.g9_1 = 4;
1315
+ continue $sm;
1316
+ case 4:
1317
+ return Unit_instance;
1318
+ case 5:
1319
+ throw this.j9_1;
1320
+ }
1321
+ } catch ($p) {
1322
+ var e = $p;
1323
+ if (this.h9_1 === 5) {
1324
+ throw e;
1325
+ } else {
1326
+ this.g9_1 = this.h9_1;
1327
+ this.j9_1 = e;
1328
+ }
1329
+ }
1330
+ while (true);
1331
+ };
1332
+ protoOf(Logging$lambda$slambda_1).d5a = function ($this$on, response, completion) {
1333
+ var i = new Logging$lambda$slambda_1(this.t59_1, this.u59_1, this.v59_1, this.w59_1, this.x59_1, completion);
1334
+ i.y59_1 = $this$on;
1335
+ i.z59_1 = response;
1336
+ return i;
1337
+ };
1338
+ function Logging$lambda$slambda_2($okHttpFormat, $logger, $sanitizedHeaders, $level, $this_createClientPlugin, resultContinuation) {
1339
+ var i = new Logging$lambda$slambda_1($okHttpFormat, $logger, $sanitizedHeaders, $level, $this_createClientPlugin, resultContinuation);
1340
+ var l = function ($this$on, response, $completion) {
1341
+ return i.c5a($this$on, response, $completion);
1342
+ };
1343
+ l.$arity = 2;
1344
+ return l;
1345
+ }
1346
+ function Logging$lambda$slambda_3($okHttpFormat, $level, $sanitizedHeaders, resultContinuation) {
1347
+ this.m5a_1 = $okHttpFormat;
1348
+ this.n5a_1 = $level;
1349
+ this.o5a_1 = $sanitizedHeaders;
1350
+ CoroutineImpl.call(this, resultContinuation);
1351
+ }
1352
+ protoOf(Logging$lambda$slambda_3).y5a = function ($this$on, response, $completion) {
1353
+ var tmp = this.z5a($this$on, response, $completion);
1354
+ tmp.i9_1 = Unit_instance;
1355
+ tmp.j9_1 = null;
1356
+ return tmp.o9();
1357
+ };
1358
+ protoOf(Logging$lambda$slambda_3).da = function (p1, p2, $completion) {
1359
+ var tmp = p1 instanceof Context_1 ? p1 : THROW_CCE();
1360
+ return this.y5a(tmp, p2 instanceof HttpResponse ? p2 : THROW_CCE(), $completion);
1361
+ };
1362
+ protoOf(Logging$lambda$slambda_3).o9 = function () {
1363
+ var suspendResult = this.i9_1;
1364
+ $sm: do
1365
+ try {
1366
+ var tmp = this.g9_1;
1367
+ switch (tmp) {
1368
+ case 0:
1369
+ this.h9_1 = 10;
1370
+ if (this.m5a_1)
1371
+ return Unit_instance;
1372
+ if (this.n5a_1.equals(LogLevel_NONE_getInstance()) || this.q5a_1.x3k().x3i().k2j(get_DisableLogging()))
1373
+ return Unit_instance;
1374
+ this.r5a_1 = this.q5a_1.x3k().x3i().i2j(get_ClientCallLogger());
1375
+ this.s5a_1 = StringBuilder_init_$Create$();
1376
+ this.t5a_1 = false;
1377
+ this.g9_1 = 1;
1378
+ continue $sm;
1379
+ case 1:
1380
+ this.h9_1 = 4;
1381
+ this.h9_1 = 3;
1382
+ logResponseHeader(this.s5a_1, this.q5a_1.x3k().p3g(), this.n5a_1, this.o5a_1);
1383
+ this.g9_1 = 2;
1384
+ suspendResult = this.p5a_1.j52(this);
1385
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1386
+ return suspendResult;
1387
+ }
1388
+
1389
+ continue $sm;
1390
+ case 2:
1391
+ this.u5a_1 = suspendResult;
1392
+ this.h9_1 = 10;
1393
+ this.g9_1 = 7;
1394
+ continue $sm;
1395
+ case 3:
1396
+ this.h9_1 = 4;
1397
+ var tmp_0 = this.j9_1;
1398
+ if (tmp_0 instanceof Error) {
1399
+ this.v5a_1 = this.j9_1;
1400
+ var tmp_1 = this;
1401
+ invoke$logResponseException(this.n5a_1, this.s5a_1, this.q5a_1.x3k().y3j(), this.v5a_1);
1402
+ this.t5a_1 = true;
1403
+ throw this.v5a_1;
1404
+ } else {
1405
+ throw this.j9_1;
1406
+ }
1407
+
1408
+ case 4:
1409
+ this.h9_1 = 10;
1410
+ this.w5a_1 = this.j9_1;
1411
+ this.r5a_1.i50(this.s5a_1.toString());
1412
+ if (this.t5a_1 || !this.n5a_1.r50_1) {
1413
+ this.g9_1 = 5;
1414
+ suspendResult = this.r5a_1.m50(this);
1415
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1416
+ return suspendResult;
1417
+ }
1418
+ continue $sm;
1419
+ } else {
1420
+ this.g9_1 = 6;
1421
+ continue $sm;
1422
+ }
1423
+
1424
+ case 5:
1425
+ this.g9_1 = 6;
1426
+ continue $sm;
1427
+ case 6:
1428
+ throw this.w5a_1;
1429
+ case 7:
1430
+ this.x5a_1 = this.u5a_1;
1431
+ this.h9_1 = 10;
1432
+ this.r5a_1.i50(this.s5a_1.toString());
1433
+ if (this.t5a_1 || !this.n5a_1.r50_1) {
1434
+ this.g9_1 = 8;
1435
+ suspendResult = this.r5a_1.m50(this);
1436
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1437
+ return suspendResult;
1438
+ }
1439
+ continue $sm;
1440
+ } else {
1441
+ this.g9_1 = 9;
1442
+ continue $sm;
1443
+ }
1444
+
1445
+ case 8:
1446
+ this.g9_1 = 9;
1447
+ continue $sm;
1448
+ case 9:
1449
+ return Unit_instance;
1450
+ case 10:
1451
+ throw this.j9_1;
1452
+ }
1453
+ } catch ($p) {
1454
+ var e = $p;
1455
+ if (this.h9_1 === 10) {
1456
+ throw e;
1457
+ } else {
1458
+ this.g9_1 = this.h9_1;
1459
+ this.j9_1 = e;
1460
+ }
1461
+ }
1462
+ while (true);
1463
+ };
1464
+ protoOf(Logging$lambda$slambda_3).z5a = function ($this$on, response, completion) {
1465
+ var i = new Logging$lambda$slambda_3(this.m5a_1, this.n5a_1, this.o5a_1, completion);
1466
+ i.p5a_1 = $this$on;
1467
+ i.q5a_1 = response;
1468
+ return i;
1469
+ };
1470
+ function Logging$lambda$slambda_4($okHttpFormat, $level, $sanitizedHeaders, resultContinuation) {
1471
+ var i = new Logging$lambda$slambda_3($okHttpFormat, $level, $sanitizedHeaders, resultContinuation);
1472
+ var l = function ($this$on, response, $completion) {
1473
+ return i.y5a($this$on, response, $completion);
1474
+ };
1475
+ l.$arity = 2;
1476
+ return l;
1477
+ }
1478
+ function Logging$lambda$slambda_5($okHttpFormat, $level, resultContinuation) {
1479
+ this.i5b_1 = $okHttpFormat;
1480
+ this.j5b_1 = $level;
1481
+ CoroutineImpl.call(this, resultContinuation);
1482
+ }
1483
+ protoOf(Logging$lambda$slambda_5).q5b = function ($this$on, call, $completion) {
1484
+ var tmp = this.r5b($this$on, call, $completion);
1485
+ tmp.i9_1 = Unit_instance;
1486
+ tmp.j9_1 = null;
1487
+ return tmp.o9();
1488
+ };
1489
+ protoOf(Logging$lambda$slambda_5).da = function (p1, p2, $completion) {
1490
+ var tmp = p1 instanceof Context_2 ? p1 : THROW_CCE();
1491
+ return this.q5b(tmp, p2 instanceof HttpClientCall ? p2 : THROW_CCE(), $completion);
1492
+ };
1493
+ protoOf(Logging$lambda$slambda_5).o9 = function () {
1494
+ var suspendResult = this.i9_1;
1495
+ $sm: do
1496
+ try {
1497
+ var tmp = this.g9_1;
1498
+ switch (tmp) {
1499
+ case 0:
1500
+ this.h9_1 = 6;
1501
+ if (this.i5b_1)
1502
+ return Unit_instance;
1503
+ if (this.j5b_1.equals(LogLevel_NONE_getInstance()) || this.l5b_1.x3i().k2j(get_DisableLogging())) {
1504
+ return Unit_instance;
1505
+ }
1506
+
1507
+ this.h9_1 = 2;
1508
+ this.g9_1 = 1;
1509
+ suspendResult = this.k5b_1.x52(this);
1510
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1511
+ return suspendResult;
1512
+ }
1513
+
1514
+ continue $sm;
1515
+ case 1:
1516
+ this.m5b_1 = suspendResult;
1517
+ this.h9_1 = 6;
1518
+ this.g9_1 = 5;
1519
+ continue $sm;
1520
+ case 2:
1521
+ this.h9_1 = 6;
1522
+ var tmp_0 = this.j9_1;
1523
+ if (tmp_0 instanceof Error) {
1524
+ this.n5b_1 = this.j9_1;
1525
+ this.o5b_1 = StringBuilder_init_$Create$();
1526
+ this.p5b_1 = this.l5b_1.x3i().i2j(get_ClientCallLogger());
1527
+ invoke$logResponseException(this.j5b_1, this.o5b_1, this.l5b_1.y3j(), this.n5b_1);
1528
+ this.g9_1 = 3;
1529
+ suspendResult = this.p5b_1.j50(this.o5b_1.toString(), this);
1530
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1531
+ return suspendResult;
1532
+ }
1533
+ continue $sm;
1534
+ } else {
1535
+ throw this.j9_1;
1536
+ }
1537
+
1538
+ case 3:
1539
+ this.g9_1 = 4;
1540
+ suspendResult = this.p5b_1.m50(this);
1541
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1542
+ return suspendResult;
1543
+ }
1544
+
1545
+ continue $sm;
1546
+ case 4:
1547
+ var tmp_1 = this;
1548
+ throw this.n5b_1;
1549
+ case 5:
1550
+ this.h9_1 = 6;
1551
+ return Unit_instance;
1552
+ case 6:
1553
+ throw this.j9_1;
1554
+ }
1555
+ } catch ($p) {
1556
+ var e = $p;
1557
+ if (this.h9_1 === 6) {
1558
+ throw e;
1559
+ } else {
1560
+ this.g9_1 = this.h9_1;
1561
+ this.j9_1 = e;
1562
+ }
1563
+ }
1564
+ while (true);
1565
+ };
1566
+ protoOf(Logging$lambda$slambda_5).r5b = function ($this$on, call, completion) {
1567
+ var i = new Logging$lambda$slambda_5(this.i5b_1, this.j5b_1, completion);
1568
+ i.k5b_1 = $this$on;
1569
+ i.l5b_1 = call;
1570
+ return i;
1571
+ };
1572
+ function Logging$lambda$slambda_6($okHttpFormat, $level, resultContinuation) {
1573
+ var i = new Logging$lambda$slambda_5($okHttpFormat, $level, resultContinuation);
1574
+ var l = function ($this$on, call, $completion) {
1575
+ return i.q5b($this$on, call, $completion);
1576
+ };
1577
+ l.$arity = 2;
1578
+ return l;
1579
+ }
1580
+ function Logging$lambda$slambda_7($level, resultContinuation) {
1581
+ this.a5c_1 = $level;
1582
+ CoroutineImpl.call(this, resultContinuation);
1583
+ }
1584
+ protoOf(Logging$lambda$slambda_7).p3s = function (it, $completion) {
1585
+ var tmp = this.y3q(it, $completion);
1586
+ tmp.i9_1 = Unit_instance;
1587
+ tmp.j9_1 = null;
1588
+ return tmp.o9();
1589
+ };
1590
+ protoOf(Logging$lambda$slambda_7).ca = function (p1, $completion) {
1591
+ return this.p3s(p1 instanceof HttpResponse ? p1 : THROW_CCE(), $completion);
1592
+ };
1593
+ protoOf(Logging$lambda$slambda_7).o9 = function () {
1594
+ var suspendResult = this.i9_1;
1595
+ $sm: do
1596
+ try {
1597
+ var tmp = this.g9_1;
1598
+ switch (tmp) {
1599
+ case 0:
1600
+ this.h9_1 = 10;
1601
+ if (this.a5c_1.equals(LogLevel_NONE_getInstance()) || this.b5c_1.x3k().x3i().k2j(get_DisableLogging())) {
1602
+ return Unit_instance;
1603
+ }
1604
+
1605
+ this.c5c_1 = this.b5c_1.x3k().x3i().i2j(get_ClientCallLogger());
1606
+ this.d5c_1 = StringBuilder_init_$Create$();
1607
+ this.g9_1 = 1;
1608
+ continue $sm;
1609
+ case 1:
1610
+ this.h9_1 = 4;
1611
+ this.h9_1 = 3;
1612
+ this.g9_1 = 2;
1613
+ suspendResult = logResponseBody(this.d5c_1, contentType(this.b5c_1), this.b5c_1.z3j(), this);
1614
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1615
+ return suspendResult;
1616
+ }
1617
+
1618
+ continue $sm;
1619
+ case 2:
1620
+ this.e5c_1 = suspendResult;
1621
+ this.h9_1 = 10;
1622
+ this.g9_1 = 7;
1623
+ continue $sm;
1624
+ case 3:
1625
+ this.h9_1 = 4;
1626
+ var tmp_0 = this.j9_1;
1627
+ if (tmp_0 instanceof Error) {
1628
+ this.f5c_1 = this.j9_1;
1629
+ var tmp_1 = this;
1630
+ tmp_1.e5c_1 = Unit_instance;
1631
+ this.h9_1 = 10;
1632
+ this.g9_1 = 7;
1633
+ continue $sm;
1634
+ } else {
1635
+ throw this.j9_1;
1636
+ }
1637
+
1638
+ case 4:
1639
+ this.h9_1 = 10;
1640
+ this.g5c_1 = this.j9_1;
1641
+ this.g9_1 = 5;
1642
+ var this_0 = this.d5c_1.toString();
1643
+ suspendResult = this.c5c_1.k50(toString(trim(isCharSequence(this_0) ? this_0 : THROW_CCE())), this);
1644
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1645
+ return suspendResult;
1646
+ }
1647
+
1648
+ continue $sm;
1649
+ case 5:
1650
+ this.g9_1 = 6;
1651
+ suspendResult = this.c5c_1.m50(this);
1652
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1653
+ return suspendResult;
1654
+ }
1655
+
1656
+ continue $sm;
1657
+ case 6:
1658
+ throw this.g5c_1;
1659
+ case 7:
1660
+ this.h9_1 = 10;
1661
+ this.g9_1 = 8;
1662
+ var this_1 = this.d5c_1.toString();
1663
+ suspendResult = this.c5c_1.k50(toString(trim(isCharSequence(this_1) ? this_1 : THROW_CCE())), this);
1664
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1665
+ return suspendResult;
1666
+ }
1667
+
1668
+ continue $sm;
1669
+ case 8:
1670
+ this.g9_1 = 9;
1671
+ suspendResult = this.c5c_1.m50(this);
1672
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1673
+ return suspendResult;
1674
+ }
1675
+
1676
+ continue $sm;
1677
+ case 9:
1678
+ return Unit_instance;
1679
+ case 10:
1680
+ throw this.j9_1;
1681
+ }
1682
+ } catch ($p) {
1683
+ var e = $p;
1684
+ if (this.h9_1 === 10) {
1685
+ throw e;
1686
+ } else {
1687
+ this.g9_1 = this.h9_1;
1688
+ this.j9_1 = e;
1689
+ }
1690
+ }
1691
+ while (true);
1692
+ };
1693
+ protoOf(Logging$lambda$slambda_7).y3q = function (it, completion) {
1694
+ var i = new Logging$lambda$slambda_7(this.a5c_1, completion);
1695
+ i.b5c_1 = it;
1696
+ return i;
1697
+ };
1698
+ function Logging$lambda$slambda_8($level, resultContinuation) {
1699
+ var i = new Logging$lambda$slambda_7($level, resultContinuation);
1700
+ var l = function (it, $completion) {
1701
+ return i.p3s(it, $completion);
1702
+ };
1703
+ l.$arity = 1;
1704
+ return l;
1705
+ }
1706
+ function Logging$lambda$lambda($observer) {
1707
+ return function ($this$prepare) {
1708
+ $this$prepare.b4e($observer);
1709
+ return Unit_instance;
1710
+ };
1711
+ }
1712
+ function Logging$lambda$detectIfBinary$slambda($channel, $firstChunk, $firstReadSize, $body, resultContinuation) {
1713
+ this.p5c_1 = $channel;
1714
+ this.q5c_1 = $firstChunk;
1715
+ this.r5c_1 = $firstReadSize;
1716
+ this.s5c_1 = $body;
1717
+ CoroutineImpl.call(this, resultContinuation);
1718
+ }
1719
+ protoOf(Logging$lambda$detectIfBinary$slambda).v5c = function ($this$async, $completion) {
1720
+ var tmp = this.v1w($this$async, $completion);
1721
+ tmp.i9_1 = Unit_instance;
1722
+ tmp.j9_1 = null;
1723
+ return tmp.o9();
1724
+ };
1725
+ protoOf(Logging$lambda$detectIfBinary$slambda).ca = function (p1, $completion) {
1726
+ return this.v5c((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
1727
+ };
1728
+ protoOf(Logging$lambda$detectIfBinary$slambda).o9 = function () {
1729
+ var suspendResult = this.i9_1;
1730
+ $sm: do
1731
+ try {
1732
+ var tmp = this.g9_1;
1733
+ switch (tmp) {
1734
+ case 0:
1735
+ this.h9_1 = 4;
1736
+ this.g9_1 = 1;
1737
+ suspendResult = writeFully(this.p5c_1, this.q5c_1, 0, this.r5c_1, this);
1738
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1739
+ return suspendResult;
1740
+ }
1741
+
1742
+ continue $sm;
1743
+ case 1:
1744
+ this.g9_1 = 2;
1745
+ suspendResult = copyTo(this.s5c_1, this.p5c_1, this);
1746
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1747
+ return suspendResult;
1748
+ }
1749
+
1750
+ continue $sm;
1751
+ case 2:
1752
+ this.u5c_1 = suspendResult;
1753
+ this.g9_1 = 3;
1754
+ suspendResult = this.p5c_1.d1n(this);
1755
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1756
+ return suspendResult;
1757
+ }
1758
+
1759
+ continue $sm;
1760
+ case 3:
1761
+ return this.u5c_1;
1762
+ case 4:
1763
+ throw this.j9_1;
1764
+ }
1765
+ } catch ($p) {
1766
+ var e = $p;
1767
+ if (this.h9_1 === 4) {
1768
+ throw e;
1769
+ } else {
1770
+ this.g9_1 = this.h9_1;
1771
+ this.j9_1 = e;
1772
+ }
1773
+ }
1774
+ while (true);
1775
+ };
1776
+ protoOf(Logging$lambda$detectIfBinary$slambda).v1w = function ($this$async, completion) {
1777
+ var i = new Logging$lambda$detectIfBinary$slambda(this.p5c_1, this.q5c_1, this.r5c_1, this.s5c_1, completion);
1778
+ i.t5c_1 = $this$async;
1779
+ return i;
1780
+ };
1781
+ function Logging$lambda$detectIfBinary$slambda_0($channel, $firstChunk, $firstReadSize, $body, resultContinuation) {
1782
+ var i = new Logging$lambda$detectIfBinary$slambda($channel, $firstChunk, $firstReadSize, $body, resultContinuation);
1783
+ var l = function ($this$async, $completion) {
1784
+ return i.v5c($this$async, $completion);
1785
+ };
1786
+ l.$arity = 1;
1787
+ return l;
1788
+ }
1789
+ function Logging$lambda$logOutgoingContent$lambda(it) {
1790
+ _init_properties_Logging_kt__66pui5();
1791
+ return it;
1792
+ }
1793
+ function Logging$lambda$logOutgoingContent$slambda($content, $channel, resultContinuation) {
1794
+ this.e5d_1 = $content;
1795
+ this.f5d_1 = $channel;
1796
+ CoroutineImpl.call(this, resultContinuation);
1797
+ }
1798
+ protoOf(Logging$lambda$logOutgoingContent$slambda).u1w = function ($this$launch, $completion) {
1799
+ var tmp = this.v1w($this$launch, $completion);
1800
+ tmp.i9_1 = Unit_instance;
1801
+ tmp.j9_1 = null;
1802
+ return tmp.o9();
1803
+ };
1804
+ protoOf(Logging$lambda$logOutgoingContent$slambda).ca = function (p1, $completion) {
1805
+ return this.u1w((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
1806
+ };
1807
+ protoOf(Logging$lambda$logOutgoingContent$slambda).o9 = function () {
1808
+ var suspendResult = this.i9_1;
1809
+ $sm: do
1810
+ try {
1811
+ var tmp = this.g9_1;
1812
+ switch (tmp) {
1813
+ case 0:
1814
+ this.h9_1 = 2;
1815
+ this.g9_1 = 1;
1816
+ suspendResult = this.e5d_1.a35(this.f5d_1, this);
1817
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1818
+ return suspendResult;
1819
+ }
1820
+
1821
+ continue $sm;
1822
+ case 1:
1823
+ this.f5d_1.p4();
1824
+ return Unit_instance;
1825
+ case 2:
1826
+ throw this.j9_1;
1827
+ }
1828
+ } catch ($p) {
1829
+ var e = $p;
1830
+ if (this.h9_1 === 2) {
1831
+ throw e;
1832
+ } else {
1833
+ this.g9_1 = this.h9_1;
1834
+ this.j9_1 = e;
1835
+ }
1836
+ }
1837
+ while (true);
1838
+ };
1839
+ protoOf(Logging$lambda$logOutgoingContent$slambda).v1w = function ($this$launch, completion) {
1840
+ var i = new Logging$lambda$logOutgoingContent$slambda(this.e5d_1, this.f5d_1, completion);
1841
+ i.g5d_1 = $this$launch;
1842
+ return i;
1843
+ };
1844
+ function Logging$lambda$logOutgoingContent$slambda_0($content, $channel, resultContinuation) {
1845
+ var i = new Logging$lambda$logOutgoingContent$slambda($content, $channel, resultContinuation);
1846
+ var l = function ($this$launch, $completion) {
1847
+ return i.u1w($this$launch, $completion);
1848
+ };
1849
+ l.$arity = 1;
1850
+ return l;
1851
+ }
1852
+ function Logging$lambda$logRequestOkHttpFormat$lambda(channel) {
1853
+ _init_properties_Logging_kt__66pui5();
1854
+ return GZipEncoder_getInstance().b2n(channel);
1855
+ }
1856
+ function Logging$lambda$logRequestBody$slambda($channel, $charset, $requestLog, $logger, resultContinuation) {
1857
+ this.p5d_1 = $channel;
1858
+ this.q5d_1 = $charset;
1859
+ this.r5d_1 = $requestLog;
1860
+ this.s5d_1 = $logger;
1861
+ CoroutineImpl.call(this, resultContinuation);
1862
+ }
1863
+ protoOf(Logging$lambda$logRequestBody$slambda).u1w = function ($this$launch, $completion) {
1864
+ var tmp = this.v1w($this$launch, $completion);
1865
+ tmp.i9_1 = Unit_instance;
1866
+ tmp.j9_1 = null;
1867
+ return tmp.o9();
1868
+ };
1869
+ protoOf(Logging$lambda$logRequestBody$slambda).ca = function (p1, $completion) {
1870
+ return this.u1w((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
1871
+ };
1872
+ protoOf(Logging$lambda$logRequestBody$slambda).o9 = function () {
1873
+ var suspendResult = this.i9_1;
1874
+ $sm: do
1875
+ try {
1876
+ var tmp = this.g9_1;
1877
+ switch (tmp) {
1878
+ case 0:
1879
+ this.h9_1 = 7;
1880
+ this.g9_1 = 1;
1881
+ continue $sm;
1882
+ case 1:
1883
+ this.h9_1 = 6;
1884
+ var tmp_0 = this;
1885
+ tmp_0.v5d_1 = this.p5d_1;
1886
+ var tmp_1 = this;
1887
+ tmp_1.w5d_1 = this.q5d_1;
1888
+ this.x5d_1 = this.v5d_1;
1889
+ this.y5d_1 = this.w5d_1;
1890
+ this.h9_1 = 3;
1891
+ this.g9_1 = 2;
1892
+ suspendResult = readRemaining(this.x5d_1, this);
1893
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1894
+ return suspendResult;
1895
+ }
1896
+
1897
+ continue $sm;
1898
+ case 2:
1899
+ var ARGUMENT = suspendResult;
1900
+ this.z5d_1 = readText(ARGUMENT, this.y5d_1);
1901
+ this.h9_1 = 6;
1902
+ this.g9_1 = 4;
1903
+ continue $sm;
1904
+ case 3:
1905
+ this.h9_1 = 6;
1906
+ var tmp_2 = this.j9_1;
1907
+ if (tmp_2 instanceof Error) {
1908
+ var cause = this.j9_1;
1909
+ var tmp_3 = this;
1910
+ tmp_3.z5d_1 = null;
1911
+ this.g9_1 = 4;
1912
+ continue $sm;
1913
+ } else {
1914
+ throw this.j9_1;
1915
+ }
1916
+
1917
+ case 4:
1918
+ this.h9_1 = 6;
1919
+ var tmp0_elvis_lhs = this.z5d_1;
1920
+ var text = tmp0_elvis_lhs == null ? '[request body omitted]' : tmp0_elvis_lhs;
1921
+ var tmp2 = this.r5d_1;
1922
+ var value = 'BODY START';
1923
+ tmp2.r8(value).s8(_Char___init__impl__6a9atx(10));
1924
+ this.r5d_1.r8(text).s8(_Char___init__impl__6a9atx(10));
1925
+ this.u5d_1 = this.r5d_1.r8('BODY END');
1926
+ this.h9_1 = 7;
1927
+ this.g9_1 = 5;
1928
+ continue $sm;
1929
+ case 5:
1930
+ this.u5d_1;
1931
+ this.h9_1 = 7;
1932
+ this.s5d_1.h50(this.r5d_1.toString());
1933
+ this.s5d_1.l50();
1934
+ return Unit_instance;
1935
+ case 6:
1936
+ this.h9_1 = 7;
1937
+ var t = this.j9_1;
1938
+ this.s5d_1.h50(this.r5d_1.toString());
1939
+ this.s5d_1.l50();
1940
+ throw t;
1941
+ case 7:
1942
+ throw this.j9_1;
1943
+ }
1944
+ } catch ($p) {
1945
+ var e = $p;
1946
+ if (this.h9_1 === 7) {
1947
+ throw e;
1948
+ } else {
1949
+ this.g9_1 = this.h9_1;
1950
+ this.j9_1 = e;
1951
+ }
1952
+ }
1953
+ while (true);
1954
+ };
1955
+ protoOf(Logging$lambda$logRequestBody$slambda).v1w = function ($this$launch, completion) {
1956
+ var i = new Logging$lambda$logRequestBody$slambda(this.p5d_1, this.q5d_1, this.r5d_1, this.s5d_1, completion);
1957
+ i.t5d_1 = $this$launch;
1958
+ return i;
1959
+ };
1960
+ function Logging$lambda$logRequestBody$slambda_0($channel, $charset, $requestLog, $logger, resultContinuation) {
1961
+ var i = new Logging$lambda$logRequestBody$slambda($channel, $charset, $requestLog, $logger, resultContinuation);
1962
+ var l = function ($this$launch, $completion) {
1963
+ return i.u1w($this$launch, $completion);
1964
+ };
1965
+ l.$arity = 1;
1966
+ return l;
1967
+ }
1968
+ function $invoke$detectIfBinaryCOROUTINE$3($this_createClientPlugin, body, contentLength, contentType, headers, resultContinuation) {
1969
+ CoroutineImpl.call(this, resultContinuation);
1970
+ this.s53_1 = $this_createClientPlugin;
1971
+ this.t53_1 = body;
1972
+ this.u53_1 = contentLength;
1973
+ this.v53_1 = contentType;
1974
+ this.w53_1 = headers;
1975
+ }
1976
+ protoOf($invoke$detectIfBinaryCOROUTINE$3).o9 = function () {
1977
+ var suspendResult = this.i9_1;
1978
+ $sm: do
1979
+ try {
1980
+ var tmp = this.g9_1;
1981
+ switch (tmp) {
1982
+ case 0:
1983
+ this.h9_1 = 4;
1984
+ if (this.w53_1.r2n(HttpHeaders_getInstance().h2v_1)) {
1985
+ return new Triple(true, this.u53_1, this.t53_1);
1986
+ }
1987
+
1988
+ var tmp_0 = this;
1989
+ var tmp_1;
1990
+ if (!(this.v53_1 == null)) {
1991
+ var tmp0_elvis_lhs = charset(this.v53_1);
1992
+ tmp_1 = tmp0_elvis_lhs == null ? Charsets_getInstance().q1x_1 : tmp0_elvis_lhs;
1993
+ } else {
1994
+ tmp_1 = Charsets_getInstance().q1x_1;
1995
+ }
1996
+
1997
+ tmp_0.x53_1 = tmp_1;
1998
+ this.y53_1 = false;
1999
+ this.z53_1 = new Int8Array(1024);
2000
+ this.g9_1 = 1;
2001
+ suspendResult = readAvailable(this.t53_1, this.z53_1, VOID, VOID, this);
2002
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
2003
+ return suspendResult;
2004
+ }
2005
+
2006
+ continue $sm;
2007
+ case 1:
2008
+ this.a54_1 = suspendResult;
2009
+ if (this.a54_1 < 1) {
2010
+ return new Triple(false, new Long(0, 0), this.t53_1);
2011
+ }
2012
+
2013
+ var tmp_2 = this;
2014
+ var this_0 = new Buffer();
2015
+ writeFully_0(this_0, this.z53_1, 0, this.a54_1);
2016
+ tmp_2.b54_1 = this_0;
2017
+ this.c54_1 = decode(this.x53_1.u1x(), this.b54_1, this.a54_1);
2018
+ this.d54_1 = -1;
2019
+ var indexedObject = this.c54_1;
2020
+ var inductionVariable = 0;
2021
+ var last = indexedObject.length;
2022
+ while (inductionVariable < last) {
2023
+ var ch = charSequenceGet(indexedObject, inductionVariable);
2024
+ inductionVariable = inductionVariable + 1 | 0;
2025
+ this.d54_1 = this.d54_1 + 1 | 0;
2026
+ }
2027
+
2028
+ var indexedObject_0 = this.c54_1;
2029
+ var inductionVariable_0 = 0;
2030
+ var last_0 = indexedObject_0.length;
2031
+ $l$loop: while (inductionVariable_0 < last_0) {
2032
+ var i = inductionVariable_0;
2033
+ var ch_0 = charSequenceGet(indexedObject_0, inductionVariable_0);
2034
+ inductionVariable_0 = inductionVariable_0 + 1 | 0;
2035
+ if (ch_0 === _Char___init__impl__6a9atx(65533) && !(i === this.d54_1)) {
2036
+ this.y53_1 = true;
2037
+ break $l$loop;
2038
+ }
2039
+ }
2040
+
2041
+ if (!this.y53_1) {
2042
+ this.e54_1 = new ByteChannel();
2043
+ this.g9_1 = 3;
2044
+ suspendResult = async(this.s53_1.x3p_1, VOID, VOID, Logging$lambda$detectIfBinary$slambda_0(this.e54_1, this.z53_1, this.a54_1, this.t53_1, null)).ut(this);
2045
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
2046
+ return suspendResult;
2047
+ }
2048
+ continue $sm;
2049
+ } else {
2050
+ this.g9_1 = 2;
2051
+ continue $sm;
2052
+ }
2053
+
2054
+ case 2:
2055
+ return new Triple(this.y53_1, this.u53_1, this.t53_1);
2056
+ case 3:
2057
+ var copied = suspendResult;
2058
+ var tmp_3 = this.y53_1;
2059
+ var other = this.a54_1;
2060
+ return new Triple(tmp_3, copied.z2(toLong(other)), this.e54_1);
2061
+ case 4:
2062
+ throw this.j9_1;
2063
+ }
2064
+ } catch ($p) {
2065
+ var e = $p;
2066
+ if (this.h9_1 === 4) {
2067
+ throw e;
2068
+ } else {
2069
+ this.g9_1 = this.h9_1;
2070
+ this.j9_1 = e;
2071
+ }
2072
+ }
2073
+ while (true);
2074
+ };
2075
+ function $invoke$logRequestBodyCOROUTINE$4($this_createClientPlugin, content, contentLength, headers, method, logLines, body, resultContinuation) {
2076
+ CoroutineImpl.call(this, resultContinuation);
2077
+ this.n54_1 = $this_createClientPlugin;
2078
+ this.o54_1 = content;
2079
+ this.p54_1 = contentLength;
2080
+ this.q54_1 = headers;
2081
+ this.r54_1 = method;
2082
+ this.s54_1 = logLines;
2083
+ this.t54_1 = body;
2084
+ }
2085
+ protoOf($invoke$logRequestBodyCOROUTINE$4).o9 = function () {
2086
+ var suspendResult = this.i9_1;
2087
+ $sm: do
2088
+ try {
2089
+ var tmp = this.g9_1;
2090
+ switch (tmp) {
2091
+ case 0:
2092
+ this.h9_1 = 4;
2093
+ this.g9_1 = 1;
2094
+ suspendResult = invoke$detectIfBinary(this.n54_1, this.t54_1, this.p54_1, this.o54_1.s34(), this.q54_1, this);
2095
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
2096
+ return suspendResult;
2097
+ }
2098
+
2099
+ continue $sm;
2100
+ case 1:
2101
+ this.u54_1 = suspendResult;
2102
+ this.v54_1 = this.u54_1.tg();
2103
+ this.w54_1 = this.u54_1.ug();
2104
+ this.x54_1 = this.u54_1.tl();
2105
+ if (!this.v54_1) {
2106
+ this.z54_1 = this.o54_1.s34();
2107
+ var tmp_0 = this;
2108
+ var tmp_1;
2109
+ if (!(this.z54_1 == null)) {
2110
+ var tmp0_elvis_lhs = charset(this.z54_1);
2111
+ tmp_1 = tmp0_elvis_lhs == null ? Charsets_getInstance().q1x_1 : tmp0_elvis_lhs;
2112
+ } else {
2113
+ tmp_1 = Charsets_getInstance().q1x_1;
2114
+ }
2115
+ tmp_0.a55_1 = tmp_1;
2116
+ this.g9_1 = 2;
2117
+ suspendResult = readRemaining(this.x54_1, this);
2118
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
2119
+ return suspendResult;
2120
+ }
2121
+ continue $sm;
2122
+ } else {
2123
+ var tmp_2 = this;
2124
+ var type = 'binary';
2125
+ if (this.q54_1.r2n(HttpHeaders_getInstance().h2v_1)) {
2126
+ type = 'encoded';
2127
+ }
2128
+ var tmp_3;
2129
+ if (!(this.w54_1 == null)) {
2130
+ tmp_3 = this.s54_1.k('--> END ' + this.r54_1.g2z_1 + ' (' + type + ' ' + toString_0(this.w54_1) + '-byte body omitted)');
2131
+ } else {
2132
+ tmp_3 = this.s54_1.k('--> END ' + this.r54_1.g2z_1 + ' (' + type + ' body omitted)');
2133
+ }
2134
+ tmp_2.y54_1 = tmp_3;
2135
+ this.g9_1 = 3;
2136
+ continue $sm;
2137
+ }
2138
+
2139
+ case 2:
2140
+ var ARGUMENT = suspendResult;
2141
+ var ARGUMENT_0 = readText(ARGUMENT, this.a55_1);
2142
+ this.s54_1.k(ARGUMENT_0);
2143
+ this.y54_1 = this.s54_1.k('--> END ' + this.r54_1.g2z_1 + ' (' + toString_0(this.w54_1) + '-byte body)');
2144
+ this.g9_1 = 3;
2145
+ continue $sm;
2146
+ case 3:
2147
+ return Unit_instance;
2148
+ case 4:
2149
+ throw this.j9_1;
2150
+ }
2151
+ } catch ($p) {
2152
+ var e = $p;
2153
+ if (this.h9_1 === 4) {
2154
+ throw e;
2155
+ } else {
2156
+ this.g9_1 = this.h9_1;
2157
+ this.j9_1 = e;
2158
+ }
2159
+ }
2160
+ while (true);
2161
+ };
2162
+ function $invoke$logOutgoingContentCOROUTINE$5($this_createClientPlugin, content, method, headers, logLines, process, resultContinuation) {
2163
+ CoroutineImpl.call(this, resultContinuation);
2164
+ this.j55_1 = $this_createClientPlugin;
2165
+ this.k55_1 = content;
2166
+ this.l55_1 = method;
2167
+ this.m55_1 = headers;
2168
+ this.n55_1 = logLines;
2169
+ this.o55_1 = process;
2170
+ }
2171
+ protoOf($invoke$logOutgoingContentCOROUTINE$5).o9 = function () {
2172
+ var suspendResult = this.i9_1;
2173
+ $sm: do
2174
+ try {
2175
+ var tmp = this.g9_1;
2176
+ switch (tmp) {
2177
+ case 0:
2178
+ this.h9_1 = 6;
2179
+ this.p55_1 = this.k55_1;
2180
+ var tmp_0 = this.p55_1;
2181
+ if (tmp_0 instanceof ByteArrayContent) {
2182
+ this.r55_1 = this.k55_1.v34();
2183
+ this.g9_1 = 4;
2184
+ suspendResult = invoke$logRequestBody(this.j55_1, this.k55_1, toLong(this.r55_1.length), this.m55_1, this.l55_1, this.n55_1, ByteReadChannel(this.r55_1), this);
2185
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
2186
+ return suspendResult;
2187
+ }
2188
+ continue $sm;
2189
+ } else {
2190
+ var tmp_1 = this.p55_1;
2191
+ if (tmp_1 instanceof ContentWrapper) {
2192
+ this.g9_1 = 3;
2193
+ suspendResult = invoke$logOutgoingContent(this.j55_1, this.k55_1.e35(), this.l55_1, this.m55_1, this.n55_1, this.o55_1, this);
2194
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
2195
+ return suspendResult;
2196
+ }
2197
+ continue $sm;
2198
+ } else {
2199
+ var tmp_2 = this.p55_1;
2200
+ if (tmp_2 instanceof NoContent) {
2201
+ var tmp_3 = this;
2202
+ this.n55_1.k('--> END ' + this.l55_1.g2z_1);
2203
+ tmp_3.q55_1 = null;
2204
+ this.g9_1 = 5;
2205
+ continue $sm;
2206
+ } else {
2207
+ var tmp_4 = this.p55_1;
2208
+ if (tmp_4 instanceof ProtocolUpgrade) {
2209
+ var tmp_5 = this;
2210
+ this.n55_1.k('--> END ' + this.l55_1.g2z_1);
2211
+ tmp_5.q55_1 = null;
2212
+ this.g9_1 = 5;
2213
+ continue $sm;
2214
+ } else {
2215
+ var tmp_6 = this.p55_1;
2216
+ if (tmp_6 instanceof ReadChannelContent) {
2217
+ this.s55_1 = split(this.k55_1.y34(), this.j55_1.x3p_1);
2218
+ this.t55_1 = this.s55_1.tg();
2219
+ this.u55_1 = this.s55_1.ug();
2220
+ this.g9_1 = 2;
2221
+ suspendResult = invoke$logRequestBody(this.j55_1, this.k55_1, this.k55_1.u34(), this.m55_1, this.l55_1, this.n55_1, this.u55_1, this);
2222
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
2223
+ return suspendResult;
2224
+ }
2225
+ continue $sm;
2226
+ } else {
2227
+ var tmp_7 = this.p55_1;
2228
+ if (tmp_7 instanceof WriteChannelContent) {
2229
+ this.v55_1 = new ByteChannel();
2230
+ launch(this.j55_1.x3p_1, VOID, VOID, Logging$lambda$logOutgoingContent$slambda_0(this.k55_1, this.v55_1, null));
2231
+ this.w55_1 = split(this.v55_1, this.j55_1.x3p_1);
2232
+ this.x55_1 = this.w55_1.tg();
2233
+ this.y55_1 = this.w55_1.ug();
2234
+ this.g9_1 = 1;
2235
+ suspendResult = invoke$logRequestBody(this.j55_1, this.k55_1, this.k55_1.u34(), this.m55_1, this.l55_1, this.n55_1, this.y55_1, this);
2236
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
2237
+ return suspendResult;
2238
+ }
2239
+ continue $sm;
2240
+ } else {
2241
+ var tmp_8 = this;
2242
+ noWhenBranchMatchedException();
2243
+ }
2244
+ }
2245
+ }
2246
+ }
2247
+ }
2248
+ }
2249
+
2250
+ break;
2251
+ case 1:
2252
+ this.q55_1 = new LoggedContent(this.k55_1, this.x55_1);
2253
+ this.g9_1 = 5;
2254
+ continue $sm;
2255
+ case 2:
2256
+ this.q55_1 = new LoggedContent(this.k55_1, this.t55_1);
2257
+ this.g9_1 = 5;
2258
+ continue $sm;
2259
+ case 3:
2260
+ this.q55_1 = suspendResult;
2261
+ this.g9_1 = 5;
2262
+ continue $sm;
2263
+ case 4:
2264
+ this.q55_1 = null;
2265
+ this.g9_1 = 5;
2266
+ continue $sm;
2267
+ case 5:
2268
+ return this.q55_1;
2269
+ case 6:
2270
+ throw this.j9_1;
2271
+ }
2272
+ } catch ($p) {
2273
+ var e = $p;
2274
+ if (this.h9_1 === 6) {
2275
+ throw e;
2276
+ } else {
2277
+ this.g9_1 = this.h9_1;
2278
+ this.j9_1 = e;
2279
+ }
2280
+ }
2281
+ while (true);
2282
+ };
2283
+ function $invoke$logRequestOkHttpFormatCOROUTINE$6(sanitizedHeaders, level, $this_createClientPlugin, request, logLines, resultContinuation) {
2284
+ CoroutineImpl.call(this, resultContinuation);
2285
+ this.h56_1 = sanitizedHeaders;
2286
+ this.i56_1 = level;
2287
+ this.j56_1 = $this_createClientPlugin;
2288
+ this.k56_1 = request;
2289
+ this.l56_1 = logLines;
2290
+ }
2291
+ protoOf($invoke$logRequestOkHttpFormatCOROUTINE$6).o9 = function () {
2292
+ var suspendResult = this.i9_1;
2293
+ $sm: do
2294
+ try {
2295
+ var tmp = this.g9_1;
2296
+ switch (tmp) {
2297
+ case 0:
2298
+ this.h9_1 = 4;
2299
+ if (invoke$isNone(this.i56_1))
2300
+ return null;
2301
+ this.m56_1 = pathQuery(takeFrom(new URLBuilder(), this.k56_1.p3h_1).t2u());
2302
+ this.n56_1 = this.k56_1.s3h_1;
2303
+ var tmp_0 = this;
2304
+ var this_0 = new HeadersBuilder();
2305
+ var tmp_1;
2306
+ var tmp_2;
2307
+ var tmp_3;
2308
+ var tmp_4 = this.n56_1;
2309
+ if (tmp_4 instanceof OutgoingContent) {
2310
+ tmp_3 = !this.k56_1.q3h_1.equals(Companion_getInstance().y2y_1);
2311
+ } else {
2312
+ tmp_3 = false;
2313
+ }
2314
+
2315
+ if (tmp_3) {
2316
+ tmp_2 = !this.k56_1.q3h_1.equals(Companion_getInstance().d2z_1);
2317
+ } else {
2318
+ tmp_2 = false;
2319
+ }
2320
+
2321
+ if (tmp_2) {
2322
+ var tmp_5 = this.n56_1;
2323
+ tmp_1 = !(tmp_5 instanceof EmptyContent);
2324
+ } else {
2325
+ tmp_1 = false;
2326
+ }
2327
+
2328
+ if (tmp_1) {
2329
+ var tmp0_safe_receiver = this.n56_1.s34();
2330
+ if (tmp0_safe_receiver == null)
2331
+ null;
2332
+ else {
2333
+ appendIfNameAbsent(this_0, HttpHeaders_getInstance().m2v_1, tmp0_safe_receiver.toString());
2334
+ }
2335
+ var tmp1_safe_receiver = this.n56_1.u34();
2336
+ if (tmp1_safe_receiver == null)
2337
+ null;
2338
+ else {
2339
+ appendIfNameAbsent(this_0, HttpHeaders_getInstance().j2v_1, tmp1_safe_receiver.toString());
2340
+ }
2341
+ }
2342
+
2343
+ appendAll(this_0, this.k56_1.r3h_1);
2344
+ tmp_0.o56_1 = this_0.t2u();
2345
+ var tmp_6 = this;
2346
+ var tmp0_safe_receiver_0 = this.o56_1.h2m(HttpHeaders_getInstance().j2v_1);
2347
+ tmp_6.p56_1 = tmp0_safe_receiver_0 == null ? null : toLongOrNull(tmp0_safe_receiver_0);
2348
+ var tmp_7 = this;
2349
+ var tmp_8;
2350
+ if (this.k56_1.q3h_1.equals(Companion_getInstance().y2y_1) || this.k56_1.q3h_1.equals(Companion_getInstance().d2z_1) || ((invoke$isHeaders(this.i56_1) || invoke$isBody(this.i56_1)) && !(this.p56_1 == null)) || (invoke$isHeaders(this.i56_1) && this.p56_1 == null) || this.o56_1.r2n(HttpHeaders_getInstance().h2v_1)) {
2351
+ tmp_8 = '--> ' + this.k56_1.q3h_1.g2z_1 + ' ' + this.m56_1;
2352
+ } else {
2353
+ if (invoke$isInfo(this.i56_1) && !(this.p56_1 == null)) {
2354
+ tmp_8 = '--> ' + this.k56_1.q3h_1.g2z_1 + ' ' + this.m56_1 + ' (' + toString_0(this.p56_1) + '-byte body)';
2355
+ } else {
2356
+ var tmp_9;
2357
+ var tmp_10 = this.n56_1;
2358
+ if (tmp_10 instanceof WriteChannelContent) {
2359
+ tmp_9 = true;
2360
+ } else {
2361
+ var tmp_11 = this.n56_1;
2362
+ tmp_9 = tmp_11 instanceof ReadChannelContent;
2363
+ }
2364
+ if (tmp_9) {
2365
+ tmp_8 = '--> ' + this.k56_1.q3h_1.g2z_1 + ' ' + this.m56_1 + ' (unknown-byte body)';
2366
+ } else {
2367
+ var size = computeRequestBodySize(this.k56_1.s3h_1);
2368
+ tmp_8 = '--> ' + this.k56_1.q3h_1.g2z_1 + ' ' + this.m56_1 + ' (' + size.toString() + '-byte body)';
2369
+ }
2370
+ }
2371
+ }
2372
+
2373
+ tmp_7.q56_1 = tmp_8;
2374
+ this.l56_1.k(this.q56_1);
2375
+ if (!invoke$isHeaders(this.i56_1) && !invoke$isBody(this.i56_1)) {
2376
+ return null;
2377
+ }
2378
+
2379
+ var _iterator__ex2g4s = this.o56_1.q2n().p();
2380
+ while (_iterator__ex2g4s.q()) {
2381
+ var _destruct__k2r9zo = _iterator__ex2g4s.r();
2382
+ var name = _destruct__k2r9zo.y();
2383
+ var values = _destruct__k2r9zo.z();
2384
+ var tmp0 = this.h56_1;
2385
+ var tmp$ret$0 = Unit_instance;
2386
+ l$ret$1: do {
2387
+ var _iterator__ex2g4s_0 = tmp0.p();
2388
+ while (_iterator__ex2g4s_0.q()) {
2389
+ var element = _iterator__ex2g4s_0.r();
2390
+ if (element.h58_1(name)) {
2391
+ tmp$ret$0 = element;
2392
+ break l$ret$1;
2393
+ }
2394
+ }
2395
+ tmp$ret$0 = null;
2396
+ }
2397
+ while (false);
2398
+ if (tmp$ret$0 == null) {
2399
+ this.l56_1.k(name + ': ' + joinToString(values, ', '));
2400
+ } else {
2401
+ this.l56_1.k(name + ': \u2588\u2588');
2402
+ }
2403
+ }
2404
+
2405
+ if (!invoke$isBody(this.i56_1) || this.k56_1.q3h_1.equals(Companion_getInstance().y2y_1) || this.k56_1.q3h_1.equals(Companion_getInstance().d2z_1)) {
2406
+ this.l56_1.k('--> END ' + this.k56_1.q3h_1.g2z_1);
2407
+ return null;
2408
+ }
2409
+
2410
+ this.l56_1.k('');
2411
+ var tmp_12 = this.n56_1;
2412
+ if (!(tmp_12 instanceof OutgoingContent)) {
2413
+ this.l56_1.k('--> END ' + this.k56_1.q3h_1.g2z_1);
2414
+ return null;
2415
+ }
2416
+
2417
+ if (this.k56_1.r3h_1.h2m(HttpHeaders_getInstance().h2v_1) === 'gzip') {
2418
+ this.g9_1 = 2;
2419
+ var tmp_13 = this.k56_1.q3h_1;
2420
+ suspendResult = invoke$logOutgoingContent(this.j56_1, this.n56_1, tmp_13, this.o56_1, this.l56_1, Logging$lambda$logRequestOkHttpFormat$lambda, this);
2421
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
2422
+ return suspendResult;
2423
+ }
2424
+ continue $sm;
2425
+ } else {
2426
+ this.g9_1 = 1;
2427
+ suspendResult = invoke$logOutgoingContent(this.j56_1, this.n56_1, this.k56_1.q3h_1, this.o56_1, this.l56_1, VOID, this);
2428
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
2429
+ return suspendResult;
2430
+ }
2431
+ continue $sm;
2432
+ }
2433
+
2434
+ case 1:
2435
+ this.r56_1 = suspendResult;
2436
+ this.g9_1 = 3;
2437
+ continue $sm;
2438
+ case 2:
2439
+ this.r56_1 = suspendResult;
2440
+ this.g9_1 = 3;
2441
+ continue $sm;
2442
+ case 3:
2443
+ var newContent = this.r56_1;
2444
+ return newContent;
2445
+ case 4:
2446
+ throw this.j9_1;
2447
+ }
2448
+ } catch ($p) {
2449
+ var e = $p;
2450
+ if (this.h9_1 === 4) {
2451
+ throw e;
2452
+ } else {
2453
+ this.g9_1 = this.h9_1;
2454
+ this.j9_1 = e;
2455
+ }
2456
+ }
2457
+ while (true);
2458
+ };
2459
+ function $invoke$logResponseBodyCOROUTINE$7($this_createClientPlugin, response, body, logLines, resultContinuation) {
2460
+ CoroutineImpl.call(this, resultContinuation);
2461
+ this.a57_1 = $this_createClientPlugin;
2462
+ this.b57_1 = response;
2463
+ this.c57_1 = body;
2464
+ this.d57_1 = logLines;
2465
+ }
2466
+ protoOf($invoke$logResponseBodyCOROUTINE$7).o9 = function () {
2467
+ var suspendResult = this.i9_1;
2468
+ $sm: do
2469
+ try {
2470
+ var tmp = this.g9_1;
2471
+ switch (tmp) {
2472
+ case 0:
2473
+ this.h9_1 = 4;
2474
+ this.d57_1.k('');
2475
+ this.g9_1 = 1;
2476
+ suspendResult = invoke$detectIfBinary(this.a57_1, this.c57_1, contentLength(this.b57_1), contentType(this.b57_1), this.b57_1.x2y(), this);
2477
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
2478
+ return suspendResult;
2479
+ }
2480
+
2481
+ continue $sm;
2482
+ case 1:
2483
+ this.e57_1 = suspendResult;
2484
+ this.f57_1 = this.e57_1.tg();
2485
+ this.g57_1 = this.e57_1.ug();
2486
+ this.h57_1 = this.e57_1.tl();
2487
+ this.i57_1 = this.b57_1.i3l().y2o_1.a3(this.b57_1.h3l().y2o_1);
2488
+ if (equals(this.g57_1, new Long(0, 0))) {
2489
+ this.d57_1.k('<-- END HTTP (' + this.i57_1.toString() + 'ms, ' + toString_0(this.g57_1) + '-byte body)');
2490
+ return Unit_instance;
2491
+ }
2492
+
2493
+ if (!this.f57_1) {
2494
+ this.k57_1 = contentType(this.b57_1);
2495
+ var tmp_0 = this;
2496
+ var tmp_1;
2497
+ if (!(this.k57_1 == null)) {
2498
+ var tmp0_elvis_lhs = charset(this.k57_1);
2499
+ tmp_1 = tmp0_elvis_lhs == null ? Charsets_getInstance().q1x_1 : tmp0_elvis_lhs;
2500
+ } else {
2501
+ tmp_1 = Charsets_getInstance().q1x_1;
2502
+ }
2503
+ tmp_0.l57_1 = tmp_1;
2504
+ this.g9_1 = 2;
2505
+ suspendResult = readRemaining(this.h57_1, this);
2506
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
2507
+ return suspendResult;
2508
+ }
2509
+ continue $sm;
2510
+ } else {
2511
+ var tmp_2 = this;
2512
+ var type = 'binary';
2513
+ if (this.b57_1.x2y().r2n(HttpHeaders_getInstance().h2v_1)) {
2514
+ type = 'encoded';
2515
+ }
2516
+ var tmp_3;
2517
+ if (!(this.g57_1 == null)) {
2518
+ tmp_3 = this.d57_1.k('<-- END HTTP (' + this.i57_1.toString() + 'ms, ' + type + ' ' + toString_0(this.g57_1) + '-byte body omitted)');
2519
+ } else {
2520
+ tmp_3 = this.d57_1.k('<-- END HTTP (' + this.i57_1.toString() + 'ms, ' + type + ' body omitted)');
2521
+ }
2522
+ tmp_2.j57_1 = tmp_3;
2523
+ this.g9_1 = 3;
2524
+ continue $sm;
2525
+ }
2526
+
2527
+ case 2:
2528
+ var ARGUMENT = suspendResult;
2529
+ var ARGUMENT_0 = readText(ARGUMENT, this.l57_1);
2530
+ this.d57_1.k(ARGUMENT_0);
2531
+ this.j57_1 = this.d57_1.k('<-- END HTTP (' + this.i57_1.toString() + 'ms, ' + toString_0(this.g57_1) + '-byte body)');
2532
+ this.g9_1 = 3;
2533
+ continue $sm;
2534
+ case 3:
2535
+ return Unit_instance;
2536
+ case 4:
2537
+ throw this.j9_1;
2538
+ }
2539
+ } catch ($p) {
2540
+ var e = $p;
2541
+ if (this.h9_1 === 4) {
2542
+ throw e;
2543
+ } else {
2544
+ this.g9_1 = this.h9_1;
2545
+ this.j9_1 = e;
2546
+ }
2547
+ }
2548
+ while (true);
2549
+ };
2550
+ function $invoke$logResponseOkHttpFormatCOROUTINE$8(sanitizedHeaders, level, $this_createClientPlugin, response, logLines, resultContinuation) {
2551
+ CoroutineImpl.call(this, resultContinuation);
2552
+ this.u57_1 = sanitizedHeaders;
2553
+ this.v57_1 = level;
2554
+ this.w57_1 = $this_createClientPlugin;
2555
+ this.x57_1 = response;
2556
+ this.y57_1 = logLines;
2557
+ }
2558
+ protoOf($invoke$logResponseOkHttpFormatCOROUTINE$8).o9 = function () {
2559
+ var suspendResult = this.i9_1;
2560
+ $sm: do
2561
+ try {
2562
+ var tmp = this.g9_1;
2563
+ switch (tmp) {
2564
+ case 0:
2565
+ this.h9_1 = 4;
2566
+ if (invoke$isNone(this.v57_1))
2567
+ return this.x57_1;
2568
+ var tmp_0 = this;
2569
+ var tmp0_safe_receiver = this.x57_1.x2y().h2m(HttpHeaders_getInstance().j2v_1);
2570
+ tmp_0.z57_1 = tmp0_safe_receiver == null ? null : toLongOrNull(tmp0_safe_receiver);
2571
+ this.a58_1 = get_request(this.x57_1);
2572
+ this.b58_1 = this.x57_1.i3l().y2o_1.a3(this.x57_1.h3l().y2o_1);
2573
+ this.c58_1 = this.x57_1.x2y().h2m(HttpHeaders_getInstance().q2x_1) === 'chunked' && (invoke$isInfo(this.v57_1) || invoke$isHeaders(this.v57_1)) ? '<-- ' + this.x57_1.t34().toString() + ' ' + pathQuery(this.a58_1.b3k()) + ' (' + this.b58_1.toString() + 'ms, unknown-byte body)' : invoke$isInfo(this.v57_1) && !(this.z57_1 == null) ? '<-- ' + this.x57_1.t34().toString() + ' ' + pathQuery(this.a58_1.b3k()) + ' (' + this.b58_1.toString() + 'ms, ' + toString_0(this.z57_1) + '-byte body)' : invoke$isBody(this.v57_1) || (invoke$isInfo(this.v57_1) && this.z57_1 == null) || (invoke$isHeaders(this.v57_1) && !(this.z57_1 == null)) || this.x57_1.x2y().h2m(HttpHeaders_getInstance().h2v_1) === 'gzip' ? '<-- ' + this.x57_1.t34().toString() + ' ' + pathQuery(this.a58_1.b3k()) + ' (' + this.b58_1.toString() + 'ms)' : '<-- ' + this.x57_1.t34().toString() + ' ' + pathQuery(this.a58_1.b3k()) + ' (' + this.b58_1.toString() + 'ms, unknown-byte body)';
2574
+ this.y57_1.k(this.c58_1);
2575
+ if (!invoke$isHeaders(this.v57_1) && !invoke$isBody(this.v57_1)) {
2576
+ return this.x57_1;
2577
+ }
2578
+
2579
+ var _iterator__ex2g4s = this.x57_1.x2y().q2n().p();
2580
+ while (_iterator__ex2g4s.q()) {
2581
+ var _destruct__k2r9zo = _iterator__ex2g4s.r();
2582
+ var name = _destruct__k2r9zo.y();
2583
+ var values = _destruct__k2r9zo.z();
2584
+ var tmp0 = this.u57_1;
2585
+ var tmp$ret$0 = Unit_instance;
2586
+ l$ret$1: do {
2587
+ var _iterator__ex2g4s_0 = tmp0.p();
2588
+ while (_iterator__ex2g4s_0.q()) {
2589
+ var element = _iterator__ex2g4s_0.r();
2590
+ if (element.h58_1(name)) {
2591
+ tmp$ret$0 = element;
2592
+ break l$ret$1;
2593
+ }
2594
+ }
2595
+ tmp$ret$0 = null;
2596
+ }
2597
+ while (false);
2598
+ if (tmp$ret$0 == null) {
2599
+ this.y57_1.k(name + ': ' + joinToString(values, ', '));
2600
+ } else {
2601
+ this.y57_1.k(name + ': \u2588\u2588');
2602
+ }
2603
+ }
2604
+
2605
+ if (!invoke$isBody(this.v57_1)) {
2606
+ this.y57_1.k('<-- END HTTP');
2607
+ return this.x57_1;
2608
+ }
2609
+
2610
+ if (!(this.z57_1 == null) && equals(this.z57_1, new Long(0, 0))) {
2611
+ this.y57_1.k('<-- END HTTP (' + this.b58_1.toString() + 'ms, ' + toString_0(this.z57_1) + '-byte body)');
2612
+ return this.x57_1;
2613
+ }
2614
+
2615
+ if (equals(contentType(this.x57_1), Text_getInstance().h2u_1)) {
2616
+ this.y57_1.k('<-- END HTTP (streaming)');
2617
+ return this.x57_1;
2618
+ }
2619
+
2620
+ if (get_isSaved(this.x57_1)) {
2621
+ this.g9_1 = 3;
2622
+ suspendResult = invoke$logResponseBody(this.w57_1, this.x57_1, this.x57_1.z3j(), this.y57_1, this);
2623
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
2624
+ return suspendResult;
2625
+ }
2626
+ continue $sm;
2627
+ } else {
2628
+ this.g9_1 = 1;
2629
+ continue $sm;
2630
+ }
2631
+
2632
+ case 1:
2633
+ this.d58_1 = split(this.x57_1.z3j(), this.x57_1);
2634
+ this.e58_1 = this.d58_1.tg();
2635
+ this.f58_1 = this.d58_1.ug();
2636
+ this.g9_1 = 2;
2637
+ suspendResult = invoke$logResponseBody(this.w57_1, this.x57_1, this.f58_1, this.y57_1, this);
2638
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
2639
+ return suspendResult;
2640
+ }
2641
+
2642
+ continue $sm;
2643
+ case 2:
2644
+ var call = wrapWithContent(this.x57_1.x3k(), this.e58_1);
2645
+ return call.p3g();
2646
+ case 3:
2647
+ return this.x57_1;
2648
+ case 4:
2649
+ throw this.j9_1;
2650
+ }
2651
+ } catch ($p) {
2652
+ var e = $p;
2653
+ if (this.h9_1 === 4) {
2654
+ throw e;
2655
+ } else {
2656
+ this.g9_1 = this.h9_1;
2657
+ this.j9_1 = e;
2658
+ }
2659
+ }
2660
+ while (true);
2661
+ };
2662
+ function LoggingFormat_Default_getInstance() {
2663
+ LoggingFormat_initEntries();
2664
+ return LoggingFormat_Default_instance;
2665
+ }
2666
+ function LoggingFormat_OkHttp_getInstance() {
2667
+ LoggingFormat_initEntries();
2668
+ return LoggingFormat_OkHttp_instance;
2669
+ }
2670
+ var properties_initialized_Logging_kt_588vu7;
2671
+ function _init_properties_Logging_kt__66pui5() {
2672
+ if (!properties_initialized_Logging_kt_588vu7) {
2673
+ properties_initialized_Logging_kt_588vu7 = true;
2674
+ // Inline function 'io.ktor.util.AttributeKey' call
2675
+ var name = 'CallLogger';
2676
+ // Inline function 'io.ktor.util.reflect.typeInfo' call
2677
+ var tmp = getKClass(HttpClientCallLogger);
2678
+ // Inline function 'io.ktor.util.reflect.typeOfOrNull' call
2679
+ var tmp_0;
2680
+ try {
2681
+ tmp_0 = createKType(getKClass(HttpClientCallLogger), arrayOf([]), false);
2682
+ } catch ($p) {
2683
+ var tmp_1;
2684
+ if ($p instanceof Error) {
2685
+ var _unused_var__etf5q3 = $p;
2686
+ tmp_1 = null;
2687
+ } else {
2688
+ throw $p;
2689
+ }
2690
+ tmp_0 = tmp_1;
2691
+ }
2692
+ var tmp$ret$0 = tmp_0;
2693
+ var tmp$ret$1 = new TypeInfo(tmp, tmp$ret$0);
2694
+ ClientCallLogger = new AttributeKey(name, tmp$ret$1);
2695
+ // Inline function 'io.ktor.util.AttributeKey' call
2696
+ var name_0 = 'DisableLogging';
2697
+ // Inline function 'io.ktor.util.reflect.typeInfo' call
2698
+ var tmp_2 = getKClass(Unit);
2699
+ // Inline function 'io.ktor.util.reflect.typeOfOrNull' call
2700
+ var tmp_3;
2701
+ try {
2702
+ tmp_3 = createKType(getKClass(Unit), arrayOf([]), false);
2703
+ } catch ($p) {
2704
+ var tmp_4;
2705
+ if ($p instanceof Error) {
2706
+ var _unused_var__etf5q3_0 = $p;
2707
+ tmp_4 = null;
2708
+ } else {
2709
+ throw $p;
2710
+ }
2711
+ tmp_3 = tmp_4;
2712
+ }
2713
+ var tmp$ret$0_0 = tmp_3;
2714
+ var tmp$ret$1_0 = new TypeInfo(tmp_2, tmp$ret$0_0);
2715
+ DisableLogging = new AttributeKey(name_0, tmp$ret$1_0);
2716
+ var tmp_5 = LoggingConfig$_init_$ref_f1nb0k();
2717
+ Logging = createClientPlugin('Logging', tmp_5, Logging$lambda);
2718
+ }
2719
+ }
2720
+ function logHeaders(_this__u8e3s4, headers, sanitizedHeaders) {
2721
+ // Inline function 'kotlin.collections.sortedBy' call
2722
+ var this_0 = toList(headers);
2723
+ // Inline function 'kotlin.comparisons.compareBy' call
2724
+ var tmp = logHeaders$lambda;
2725
+ var tmp$ret$0 = new sam$kotlin_Comparator$0(tmp);
2726
+ var sortedHeaders = sortedWith(this_0, tmp$ret$0);
2727
+ // Inline function 'kotlin.collections.forEach' call
2728
+ var _iterator__ex2g4s = sortedHeaders.p();
2729
+ while (_iterator__ex2g4s.q()) {
2730
+ var element = _iterator__ex2g4s.r();
2731
+ // Inline function 'kotlin.collections.component1' call
2732
+ var key = element.y();
2733
+ // Inline function 'kotlin.collections.component2' call
2734
+ var values = element.z();
2735
+ var tmp$ret$5;
2736
+ $l$block: {
2737
+ // Inline function 'kotlin.collections.firstOrNull' call
2738
+ var _iterator__ex2g4s_0 = sanitizedHeaders.p();
2739
+ while (_iterator__ex2g4s_0.q()) {
2740
+ var element_0 = _iterator__ex2g4s_0.r();
2741
+ if (element_0.h58_1(key)) {
2742
+ tmp$ret$5 = element_0;
2743
+ break $l$block;
2744
+ }
2745
+ }
2746
+ tmp$ret$5 = null;
2747
+ }
2748
+ var tmp0_safe_receiver = tmp$ret$5;
2749
+ var placeholder = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.g58_1;
2750
+ logHeader(_this__u8e3s4, key, placeholder == null ? joinToString(values, '; ') : placeholder);
2751
+ }
2752
+ }
2753
+ function logHeader(_this__u8e3s4, key, value) {
2754
+ // Inline function 'kotlin.text.appendLine' call
2755
+ var value_0 = '-> ' + key + ': ' + value;
2756
+ // Inline function 'kotlin.text.appendLine' call
2757
+ _this__u8e3s4.l(value_0).s8(_Char___init__impl__6a9atx(10));
2758
+ }
2759
+ function logResponseHeader(log, response, level, sanitizedHeaders) {
2760
+ // Inline function 'kotlin.with' call
2761
+ if (level.p50_1) {
2762
+ // Inline function 'kotlin.text.appendLine' call
2763
+ var value = 'RESPONSE: ' + response.t34().toString();
2764
+ // Inline function 'kotlin.text.appendLine' call
2765
+ log.r8(value).s8(_Char___init__impl__6a9atx(10));
2766
+ // Inline function 'kotlin.text.appendLine' call
2767
+ var value_0 = 'METHOD: ' + response.x3k().y3j().u3k().toString();
2768
+ // Inline function 'kotlin.text.appendLine' call
2769
+ log.r8(value_0).s8(_Char___init__impl__6a9atx(10));
2770
+ // Inline function 'kotlin.text.appendLine' call
2771
+ var value_1 = 'FROM: ' + response.x3k().y3j().b3k().toString();
2772
+ // Inline function 'kotlin.text.appendLine' call
2773
+ log.r8(value_1).s8(_Char___init__impl__6a9atx(10));
2774
+ }
2775
+ if (level.q50_1) {
2776
+ // Inline function 'kotlin.text.appendLine' call
2777
+ var value_2 = 'COMMON HEADERS';
2778
+ // Inline function 'kotlin.text.appendLine' call
2779
+ log.r8(value_2).s8(_Char___init__impl__6a9atx(10));
2780
+ logHeaders(log, response.x2y().q2n(), sanitizedHeaders);
2781
+ }
2782
+ }
2783
+ function logResponseBody(log, contentType, content, $completion) {
2784
+ var tmp = new $logResponseBodyCOROUTINE$10(log, contentType, content, $completion);
2785
+ tmp.i9_1 = Unit_instance;
2786
+ tmp.j9_1 = null;
2787
+ return tmp.o9();
2788
+ }
2789
+ function sam$kotlin_Comparator$0(function_0) {
2790
+ this.u5e_1 = function_0;
2791
+ }
2792
+ protoOf(sam$kotlin_Comparator$0).ne = function (a, b) {
2793
+ return this.u5e_1(a, b);
2794
+ };
2795
+ protoOf(sam$kotlin_Comparator$0).compare = function (a, b) {
2796
+ return this.ne(a, b);
2797
+ };
2798
+ protoOf(sam$kotlin_Comparator$0).s3 = function () {
2799
+ return this.u5e_1;
2800
+ };
2801
+ protoOf(sam$kotlin_Comparator$0).equals = function (other) {
2802
+ var tmp;
2803
+ if (!(other == null) ? isInterface(other, Comparator) : false) {
2804
+ var tmp_0;
2805
+ if (!(other == null) ? isInterface(other, FunctionAdapter) : false) {
2806
+ tmp_0 = equals(this.s3(), other.s3());
2807
+ } else {
2808
+ tmp_0 = false;
2809
+ }
2810
+ tmp = tmp_0;
2811
+ } else {
2812
+ tmp = false;
2813
+ }
2814
+ return tmp;
2815
+ };
2816
+ protoOf(sam$kotlin_Comparator$0).hashCode = function () {
2817
+ return hashCode(this.s3());
2818
+ };
2819
+ function logHeaders$lambda(a, b) {
2820
+ // Inline function 'kotlin.comparisons.compareValuesBy' call
2821
+ var tmp = a.y();
2822
+ var tmp$ret$1 = b.y();
2823
+ return compareValues(tmp, tmp$ret$1);
2824
+ }
2825
+ function $logResponseBodyCOROUTINE$10(log, contentType, content, resultContinuation) {
2826
+ CoroutineImpl.call(this, resultContinuation);
2827
+ this.i5e_1 = log;
2828
+ this.j5e_1 = contentType;
2829
+ this.k5e_1 = content;
2830
+ }
2831
+ protoOf($logResponseBodyCOROUTINE$10).o9 = function () {
2832
+ var suspendResult = this.i9_1;
2833
+ $sm: do
2834
+ try {
2835
+ var tmp = this.g9_1;
2836
+ switch (tmp) {
2837
+ case 0:
2838
+ this.h9_1 = 3;
2839
+ var tmp_0 = this;
2840
+ tmp_0.l5e_1 = this.i5e_1;
2841
+ this.m5e_1 = this.l5e_1;
2842
+ var tmp_1 = this;
2843
+ tmp_1.n5e_1 = this.m5e_1;
2844
+ this.o5e_1 = this.n5e_1;
2845
+ var tmp0 = this.o5e_1;
2846
+ var value = 'BODY Content-Type: ' + toString_0(this.j5e_1);
2847
+ tmp0.r8(value).s8(_Char___init__impl__6a9atx(10));
2848
+ var tmp2 = this.o5e_1;
2849
+ var value_0 = 'BODY START';
2850
+ tmp2.r8(value_0).s8(_Char___init__impl__6a9atx(10));
2851
+ var tmp_2 = this;
2852
+ tmp_2.p5e_1 = this.k5e_1;
2853
+ var tmp_3 = this;
2854
+ var tmp0_safe_receiver = this.j5e_1;
2855
+ var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : charset(tmp0_safe_receiver);
2856
+ tmp_3.q5e_1 = tmp1_elvis_lhs == null ? Charsets_getInstance().q1x_1 : tmp1_elvis_lhs;
2857
+ this.r5e_1 = this.p5e_1;
2858
+ this.s5e_1 = this.q5e_1;
2859
+ this.h9_1 = 2;
2860
+ this.g9_1 = 1;
2861
+ suspendResult = readRemaining(this.r5e_1, this);
2862
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
2863
+ return suspendResult;
2864
+ }
2865
+
2866
+ continue $sm;
2867
+ case 1:
2868
+ var ARGUMENT = suspendResult;
2869
+ this.t5e_1 = readText(ARGUMENT, this.s5e_1);
2870
+ this.h9_1 = 3;
2871
+ this.g9_1 = 4;
2872
+ continue $sm;
2873
+ case 2:
2874
+ this.h9_1 = 3;
2875
+ var tmp_4 = this.j9_1;
2876
+ if (tmp_4 instanceof Error) {
2877
+ var cause = this.j9_1;
2878
+ var tmp_5 = this;
2879
+ tmp_5.t5e_1 = null;
2880
+ this.g9_1 = 4;
2881
+ continue $sm;
2882
+ } else {
2883
+ throw this.j9_1;
2884
+ }
2885
+
2886
+ case 3:
2887
+ throw this.j9_1;
2888
+ case 4:
2889
+ this.h9_1 = 3;
2890
+ var tmp2_elvis_lhs = this.t5e_1;
2891
+ var message = tmp2_elvis_lhs == null ? '[response body omitted]' : tmp2_elvis_lhs;
2892
+ this.o5e_1.r8(message).s8(_Char___init__impl__6a9atx(10));
2893
+ this.o5e_1.r8('BODY END');
2894
+ return Unit_instance;
2895
+ }
2896
+ } catch ($p) {
2897
+ var e = $p;
2898
+ if (this.h9_1 === 3) {
2899
+ throw e;
2900
+ } else {
2901
+ this.g9_1 = this.h9_1;
2902
+ this.j9_1 = e;
2903
+ }
2904
+ }
2905
+ while (true);
2906
+ };
2907
+ function observe(_this__u8e3s4, log, $completion) {
2908
+ var tmp = new $observeCOROUTINE$11(_this__u8e3s4, log, $completion);
2909
+ tmp.i9_1 = Unit_instance;
2910
+ tmp.j9_1 = null;
2911
+ return tmp.o9();
2912
+ }
2913
+ function toReadChannel(_this__u8e3s4) {
2914
+ var tmp = GlobalScope_instance;
2915
+ var tmp_0 = Dispatchers_getInstance().y10_1;
2916
+ return writer(tmp, tmp_0, VOID, toReadChannel$slambda_0(_this__u8e3s4, null)).a1v_1;
2917
+ }
2918
+ function toReadChannel$slambda($this_toReadChannel, resultContinuation) {
2919
+ this.r5f_1 = $this_toReadChannel;
2920
+ CoroutineImpl.call(this, resultContinuation);
2921
+ }
2922
+ protoOf(toReadChannel$slambda).a3a = function ($this$writer, $completion) {
2923
+ var tmp = this.b3a($this$writer, $completion);
2924
+ tmp.i9_1 = Unit_instance;
2925
+ tmp.j9_1 = null;
2926
+ return tmp.o9();
2927
+ };
2928
+ protoOf(toReadChannel$slambda).ca = function (p1, $completion) {
2929
+ return this.a3a(p1 instanceof WriterScope ? p1 : THROW_CCE(), $completion);
2930
+ };
2931
+ protoOf(toReadChannel$slambda).o9 = function () {
2932
+ var suspendResult = this.i9_1;
2933
+ $sm: do
2934
+ try {
2935
+ var tmp = this.g9_1;
2936
+ switch (tmp) {
2937
+ case 0:
2938
+ this.h9_1 = 2;
2939
+ this.g9_1 = 1;
2940
+ suspendResult = this.r5f_1.a35(this.s5f_1.c1v_1, this);
2941
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
2942
+ return suspendResult;
2943
+ }
2944
+
2945
+ continue $sm;
2946
+ case 1:
2947
+ return Unit_instance;
2948
+ case 2:
2949
+ throw this.j9_1;
2950
+ }
2951
+ } catch ($p) {
2952
+ var e = $p;
2953
+ if (this.h9_1 === 2) {
2954
+ throw e;
2955
+ } else {
2956
+ this.g9_1 = this.h9_1;
2957
+ this.j9_1 = e;
2958
+ }
2959
+ }
2960
+ while (true);
2961
+ };
2962
+ protoOf(toReadChannel$slambda).b3a = function ($this$writer, completion) {
2963
+ var i = new toReadChannel$slambda(this.r5f_1, completion);
2964
+ i.s5f_1 = $this$writer;
2965
+ return i;
2966
+ };
2967
+ function toReadChannel$slambda_0($this_toReadChannel, resultContinuation) {
2968
+ var i = new toReadChannel$slambda($this_toReadChannel, resultContinuation);
2969
+ var l = function ($this$writer, $completion) {
2970
+ return i.a3a($this$writer, $completion);
2971
+ };
2972
+ l.$arity = 1;
2973
+ return l;
2974
+ }
2975
+ function $observeCOROUTINE$11(_this__u8e3s4, log, resultContinuation) {
2976
+ CoroutineImpl.call(this, resultContinuation);
2977
+ this.d5f_1 = _this__u8e3s4;
2978
+ this.e5f_1 = log;
2979
+ }
2980
+ protoOf($observeCOROUTINE$11).o9 = function () {
2981
+ var suspendResult = this.i9_1;
2982
+ $sm: do
2983
+ try {
2984
+ var tmp = this.g9_1;
2985
+ switch (tmp) {
2986
+ case 0:
2987
+ this.h9_1 = 6;
2988
+ this.f5f_1 = this.d5f_1;
2989
+ var tmp_0 = this.f5f_1;
2990
+ if (tmp_0 instanceof ByteArrayContent) {
2991
+ this.g9_1 = 3;
2992
+ suspendResult = writeFully(this.e5f_1, this.d5f_1.v34(), VOID, VOID, this);
2993
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
2994
+ return suspendResult;
2995
+ }
2996
+ continue $sm;
2997
+ } else {
2998
+ var tmp_1 = this.f5f_1;
2999
+ if (tmp_1 instanceof ReadChannelContent) {
3000
+ var tmp_2 = this;
3001
+ var responseChannel = new ByteChannel();
3002
+ var content = this.d5f_1.y34();
3003
+ copyToBoth(content, this.e5f_1, responseChannel);
3004
+ tmp_2.g5f_1 = new LoggedContent(this.d5f_1, responseChannel);
3005
+ this.g9_1 = 5;
3006
+ continue $sm;
3007
+ } else {
3008
+ var tmp_3 = this.f5f_1;
3009
+ if (tmp_3 instanceof WriteChannelContent) {
3010
+ var tmp_4 = this;
3011
+ var responseChannel_0 = new ByteChannel();
3012
+ var content_0 = toReadChannel(this.d5f_1);
3013
+ copyToBoth(content_0, this.e5f_1, responseChannel_0);
3014
+ tmp_4.g5f_1 = new LoggedContent(this.d5f_1, responseChannel_0);
3015
+ this.g9_1 = 5;
3016
+ continue $sm;
3017
+ } else {
3018
+ var tmp_5 = this.f5f_1;
3019
+ if (tmp_5 instanceof ContentWrapper) {
3020
+ this.h5f_1 = this.d5f_1;
3021
+ this.g9_1 = 2;
3022
+ suspendResult = observe(this.d5f_1.e35(), this.e5f_1, this);
3023
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
3024
+ return suspendResult;
3025
+ }
3026
+ continue $sm;
3027
+ } else {
3028
+ var tmp_6;
3029
+ var tmp_7 = this.f5f_1;
3030
+ if (tmp_7 instanceof NoContent) {
3031
+ tmp_6 = true;
3032
+ } else {
3033
+ var tmp_8 = this.f5f_1;
3034
+ tmp_6 = tmp_8 instanceof ProtocolUpgrade;
3035
+ }
3036
+ if (tmp_6) {
3037
+ this.g9_1 = 1;
3038
+ suspendResult = this.e5f_1.d1n(this);
3039
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
3040
+ return suspendResult;
3041
+ }
3042
+ continue $sm;
3043
+ } else {
3044
+ var tmp_9 = this;
3045
+ noWhenBranchMatchedException();
3046
+ }
3047
+ }
3048
+ }
3049
+ }
3050
+ }
3051
+
3052
+ break;
3053
+ case 1:
3054
+ this.g5f_1 = this.d5f_1;
3055
+ this.g9_1 = 5;
3056
+ continue $sm;
3057
+ case 2:
3058
+ this.i5f_1 = suspendResult;
3059
+ this.g5f_1 = this.h5f_1.f35(this.i5f_1);
3060
+ this.g9_1 = 5;
3061
+ continue $sm;
3062
+ case 3:
3063
+ this.g9_1 = 4;
3064
+ suspendResult = this.e5f_1.d1n(this);
3065
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
3066
+ return suspendResult;
3067
+ }
3068
+
3069
+ continue $sm;
3070
+ case 4:
3071
+ this.g5f_1 = this.d5f_1;
3072
+ this.g9_1 = 5;
3073
+ continue $sm;
3074
+ case 5:
3075
+ return this.g5f_1;
3076
+ case 6:
3077
+ throw this.j9_1;
3078
+ }
3079
+ } catch ($p) {
3080
+ var e = $p;
3081
+ if (this.h9_1 === 6) {
3082
+ throw e;
3083
+ } else {
3084
+ this.g9_1 = this.h9_1;
3085
+ this.j9_1 = e;
3086
+ }
3087
+ }
3088
+ while (true);
3089
+ };
3090
+ function MDCContext() {
3091
+ return MDCContextElement_instance;
3092
+ }
3093
+ function MDCContextKey() {
3094
+ }
3095
+ var MDCContextKey_instance;
3096
+ function MDCContextKey_getInstance() {
3097
+ return MDCContextKey_instance;
3098
+ }
3099
+ function MDCContextElement() {
3100
+ }
3101
+ protoOf(MDCContextElement).y = function () {
3102
+ return MDCContextKey_instance;
3103
+ };
3104
+ protoOf(MDCContextElement).toString = function () {
3105
+ return 'MDCContext';
3106
+ };
3107
+ var MDCContextElement_instance;
3108
+ function MDCContextElement_getInstance() {
3109
+ return MDCContextElement_instance;
3110
+ }
3111
+ function get_DEFAULT(_this__u8e3s4) {
3112
+ return get_SIMPLE(_this__u8e3s4);
3113
+ }
3114
+ //region block: post-declaration
3115
+ protoOf(MDCContextElement).t9 = get;
3116
+ protoOf(MDCContextElement).qh = fold;
3117
+ protoOf(MDCContextElement).ph = minusKey;
3118
+ protoOf(MDCContextElement).rh = plus;
3119
+ //endregion
3120
+ //region block: init
3121
+ Companion_instance = new Companion();
3122
+ SendHook_instance = new SendHook();
3123
+ ResponseAfterEncodingHook_instance = new ResponseAfterEncodingHook();
3124
+ ResponseHook_instance = new ResponseHook();
3125
+ ReceiveHook_instance = new ReceiveHook();
3126
+ MDCContextKey_instance = new MDCContextKey();
3127
+ MDCContextElement_instance = new MDCContextElement();
3128
+ //endregion
3129
+ //region block: exports
3130
+ _.$_$ = _.$_$ || {};
3131
+ _.$_$.a = LogLevel_INFO_getInstance;
3132
+ _.$_$.b = get_Logging;
4
3133
  //endregion
5
3134
  return _;
6
- }(module.exports));
3135
+ }(module.exports, require('./kotlin-kotlin-stdlib.js'), require('./kotlinx-coroutines-core.js'), require('./kotlinx-atomicfu.js'), require('./ktor-ktor-http.js'), require('./ktor-ktor-utils.js'), require('./ktor-ktor-client-ktor-client-core.js'), require('./ktor-ktor-io.js'), require('./kotlinx-io-kotlinx-io-core.js')));