@solibo/solibo-sdk 1.5.18 → 1.6.1

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 (51) hide show
  1. package/KmLogging-logging.mjs +110 -110
  2. package/Kotlin-DateTime-library-kotlinx-datetime.mjs +1545 -1545
  3. package/KotlinBigInteger-bignum.mjs +1198 -1198
  4. package/MultiplatformSettings-multiplatform-settings-test.mjs +19 -19
  5. package/MultiplatformSettings-multiplatform-settings.mjs +17 -17
  6. package/Stately-stately-concurrency.mjs +5 -5
  7. package/cryptography-kotlin-cryptography-bigint.mjs +33 -33
  8. package/cryptography-kotlin-cryptography-core.mjs +49 -49
  9. package/cryptography-kotlin-cryptography-provider-base.mjs +8 -8
  10. package/cryptography-kotlin-cryptography-provider-webcrypto.mjs +175 -175
  11. package/cryptography-kotlin-cryptography-random.mjs +26 -26
  12. package/cryptography-kotlin-cryptography-serialization-asn1-modules.mjs +204 -204
  13. package/cryptography-kotlin-cryptography-serialization-asn1.mjs +332 -332
  14. package/cryptography-kotlin-cryptography-serialization-pem.mjs +16 -16
  15. package/index.mjs +6 -0
  16. package/kotlin-kotlin-stdlib.mjs +2141 -2051
  17. package/kotlin-kotlin-stdlib.mjs.map +1 -1
  18. package/kotlinx-atomicfu.mjs +13 -13
  19. package/kotlinx-coroutines-core.mjs +2488 -2461
  20. package/kotlinx-coroutines-core.mjs.map +1 -1
  21. package/kotlinx-io-kotlinx-io-bytestring.mjs +32 -32
  22. package/kotlinx-io-kotlinx-io-core.mjs +451 -451
  23. package/kotlinx-serialization-kotlinx-serialization-core.mjs +1832 -1832
  24. package/kotlinx-serialization-kotlinx-serialization-core.mjs.map +1 -1
  25. package/kotlinx-serialization-kotlinx-serialization-json.mjs +1383 -1383
  26. package/ktor-ktor-client-auth.mjs +463 -463
  27. package/ktor-ktor-client-content-negotiation.mjs +184 -184
  28. package/ktor-ktor-client-core.mjs +4457 -4456
  29. package/ktor-ktor-client-core.mjs.map +1 -1
  30. package/ktor-ktor-client-encoding.mjs +785 -0
  31. package/ktor-ktor-client-encoding.mjs.map +1 -0
  32. package/ktor-ktor-client-logging.mjs +1080 -1080
  33. package/ktor-ktor-client-mock.mjs +79 -79
  34. package/ktor-ktor-events.mjs +6 -6
  35. package/ktor-ktor-http-cio.mjs +480 -480
  36. package/ktor-ktor-http.mjs +1296 -997
  37. package/ktor-ktor-http.mjs.map +1 -1
  38. package/ktor-ktor-io.mjs +1120 -1097
  39. package/ktor-ktor-io.mjs.map +1 -1
  40. package/ktor-ktor-serialization-kotlinx-json.mjs +7 -7
  41. package/ktor-ktor-serialization-kotlinx.mjs +228 -228
  42. package/ktor-ktor-serialization.mjs +105 -105
  43. package/ktor-ktor-utils.mjs +1152 -1041
  44. package/ktor-ktor-utils.mjs.map +1 -1
  45. package/ktor-ktor-websockets.mjs +741 -741
  46. package/package.json +1 -1
  47. package/solibo-sdk-sdk-home-api.mjs +77103 -73805
  48. package/solibo-sdk-sdk-home-api.mjs.map +1 -1
  49. package/solibo-sdk-sdk.d.mts +318 -3
  50. package/solibo-sdk-sdk.mjs +6928 -6854
  51. package/solibo-sdk-sdk.mjs.map +1 -1
@@ -0,0 +1,785 @@
1
+ import {
2
+ Unit_instancev9v8hjid95df as Unit_instance,
3
+ Enum3alwj03lh1n41 as Enum,
4
+ protoOf180f3jzyo7rfj as protoOf,
5
+ initMetadataForClassbxx6q50dy2s7 as initMetadataForClass,
6
+ VOID3gxj6tk5isa35 as VOID,
7
+ IllegalStateExceptionkoljg5n0nrlr as IllegalStateException,
8
+ IllegalStateException_init_$Init$22echgkfx1r7y as IllegalStateException_init_$Init$,
9
+ captureStack1fzi4aczwc4hg as captureStack,
10
+ CoroutineImpl2sn3kjnwmfr10 as CoroutineImpl,
11
+ THROW_CCE2g6jy02ryeudk as THROW_CCE,
12
+ get_COROUTINE_SUSPENDED3ujt3p13qm4iy as get_COROUTINE_SUSPENDED,
13
+ initMetadataForLambda3af3he42mmnh as initMetadataForLambda,
14
+ isSuspendFunction153vlp5l2npj9 as isSuspendFunction,
15
+ initMetadataForObject1cxne3s9w65el as initMetadataForObject,
16
+ StringBuilder_init_$Create$3ds9zx2kx9u4d as StringBuilder_init_$Create$,
17
+ charSequenceLength3278n89t01tmv as charSequenceLength,
18
+ _Char___init__impl__6a9atx2gndcvjvc5pke as _Char___init__impl__6a9atx,
19
+ toString1pkumu07cwy4m as toString,
20
+ IllegalStateException_init_$Create$1h4bcfod21ri0 as IllegalStateException_init_$Create$,
21
+ take9j4462mea726 as take,
22
+ equals2v6cggk171b6e as equals,
23
+ ArrayList_init_$Create$37gc04va6yfo2 as ArrayList_init_$Create$,
24
+ joinToString1cxrrlmo0chqs as joinToString,
25
+ split2bvyvnrlcifjv as split,
26
+ collectionSizeOrDefault36dulx8yinfqm as collectionSizeOrDefault,
27
+ ArrayList_init_$Create$2byt5m5yn22yy as ArrayList_init_$Create$_0,
28
+ isCharSequence1ju9jr1w86plq as isCharSequence,
29
+ trim11nh7r46at6sx as trim,
30
+ asReversed308kw52j6ls1u as asReversed,
31
+ KtList3hktaavzmj137 as KtList,
32
+ getKClass3t8tygqu4lcxf as getKClass,
33
+ PrimitiveClasses_getInstanceds06xwqrwfdm as PrimitiveClasses_getInstance,
34
+ arrayOf1akklvh2at202 as arrayOf,
35
+ createKType31ecntyyaay3k as createKType,
36
+ createInvariantKTypeProjection3h5364czc0a8w as createInvariantKTypeProjection,
37
+ } from './kotlin-kotlin-stdlib.mjs';
38
+ import {
39
+ CaseInsensitiveMap3bv985x2xrppt as CaseInsensitiveMap,
40
+ GZipEncoder_getInstance1466hegupqwpb as GZipEncoder_getInstance,
41
+ DeflateEncoder_getInstancep7vv3kj8827k as DeflateEncoder_getInstance,
42
+ IdentityEncoder_getInstance1hfgximp2m8i2 as IdentityEncoder_getInstance,
43
+ PipelineContext34fsb0mycu471 as PipelineContext,
44
+ PipelinePhase2q3d54imxjlma as PipelinePhase,
45
+ get_isTraceEnabled82xibuu04nxp as get_isTraceEnabled,
46
+ KtorSimpleLogger1xdphsp5l4e48 as KtorSimpleLogger,
47
+ TypeInfo2nbxsuf4v8os2 as TypeInfo,
48
+ AttributeKey3aq8ytwgx54f7 as AttributeKey,
49
+ } from './ktor-ktor-utils.mjs';
50
+ import {
51
+ OutgoingContent3t2ohmyam9o76 as OutgoingContent,
52
+ headers1dh5cg56ach6i as headers,
53
+ compressed3r8j7meefwnqs as compressed,
54
+ contentLength2suzxu1lzutku as contentLength,
55
+ Companion_getInstance13wwf84j92s7c as Companion_getInstance,
56
+ } from './ktor-ktor-http.mjs';
57
+ import {
58
+ Phases_getInstance1n7sbxr3lcpvf as Phases_getInstance,
59
+ HttpResponse1532ob1hsse1y as HttpResponse,
60
+ Phases_getInstance3nx89wd8botnl as Phases_getInstance_0,
61
+ replaceResponse3ut5eo3odxj99 as replaceResponse,
62
+ OnRequestContext1tmu5b6bhlblg as OnRequestContext,
63
+ HttpRequestBuilder15f2nnx9sjuv1 as HttpRequestBuilder,
64
+ get_request3dwcif5y0fvf1 as get_request,
65
+ createClientPluginjwpvufjows5r as createClientPlugin,
66
+ } from './ktor-ktor-client-core.mjs';
67
+ //region block: imports
68
+ //endregion
69
+ //region block: pre-declaration
70
+ initMetadataForClass(Mode, 'Mode', VOID, Enum);
71
+ initMetadataForClass(ContentEncodingConfig, 'ContentEncodingConfig', ContentEncodingConfig);
72
+ initMetadataForClass(UnsupportedContentEncodingException, 'UnsupportedContentEncodingException', VOID, IllegalStateException);
73
+ initMetadataForLambda(AfterRenderHook$install$slambda, CoroutineImpl, VOID, [2]);
74
+ initMetadataForObject(AfterRenderHook, 'AfterRenderHook');
75
+ initMetadataForLambda(ReceiveStateHook$install$slambda, CoroutineImpl, VOID, [2]);
76
+ initMetadataForObject(ReceiveStateHook, 'ReceiveStateHook');
77
+ initMetadataForLambda(ContentEncoding$lambda$slambda, CoroutineImpl, VOID, [3]);
78
+ initMetadataForLambda(ContentEncoding$lambda$slambda_1, CoroutineImpl, VOID, [2]);
79
+ initMetadataForLambda(ContentEncoding$lambda$slambda_3, CoroutineImpl, VOID, [1]);
80
+ //endregion
81
+ function get_LOGGER() {
82
+ _init_properties_ContentEncoding_kt__4smi0q();
83
+ return LOGGER;
84
+ }
85
+ var LOGGER;
86
+ function get_ContentEncoding() {
87
+ _init_properties_ContentEncoding_kt__4smi0q();
88
+ return ContentEncoding;
89
+ }
90
+ var ContentEncoding;
91
+ function get_CompressionListAttribute() {
92
+ _init_properties_ContentEncoding_kt__4smi0q();
93
+ return CompressionListAttribute;
94
+ }
95
+ var CompressionListAttribute;
96
+ function get_DecompressionListAttribute() {
97
+ _init_properties_ContentEncoding_kt__4smi0q();
98
+ return DecompressionListAttribute;
99
+ }
100
+ var DecompressionListAttribute;
101
+ var Mode_CompressRequest_instance;
102
+ var Mode_DecompressResponse_instance;
103
+ var Mode_All_instance;
104
+ var Mode_entriesInitialized;
105
+ function Mode_initEntries() {
106
+ if (Mode_entriesInitialized)
107
+ return Unit_instance;
108
+ Mode_entriesInitialized = true;
109
+ Mode_CompressRequest_instance = new Mode('CompressRequest', 0, true, false);
110
+ Mode_DecompressResponse_instance = new Mode('DecompressResponse', 1, false, true);
111
+ Mode_All_instance = new Mode('All', 2, true, true);
112
+ }
113
+ function Mode(name, ordinal, request, response) {
114
+ Enum.call(this, name, ordinal);
115
+ this.tre_1 = request;
116
+ this.ure_1 = response;
117
+ }
118
+ function Mode_DecompressResponse_getInstance() {
119
+ Mode_initEntries();
120
+ return Mode_DecompressResponse_instance;
121
+ }
122
+ function ContentEncodingConfig() {
123
+ this.vre_1 = new CaseInsensitiveMap();
124
+ this.wre_1 = new CaseInsensitiveMap();
125
+ this.xre_1 = Mode_DecompressResponse_getInstance();
126
+ }
127
+ protoOf(ContentEncodingConfig).yre = function (quality) {
128
+ this.zre(GZipEncoder_getInstance(), quality);
129
+ };
130
+ protoOf(ContentEncodingConfig).arf = function (quality, $super) {
131
+ quality = quality === VOID ? null : quality;
132
+ var tmp;
133
+ if ($super === VOID) {
134
+ this.yre(quality);
135
+ tmp = Unit_instance;
136
+ } else {
137
+ tmp = $super.yre.call(this, quality);
138
+ }
139
+ return tmp;
140
+ };
141
+ protoOf(ContentEncodingConfig).brf = function (quality) {
142
+ this.zre(DeflateEncoder_getInstance(), quality);
143
+ };
144
+ protoOf(ContentEncodingConfig).crf = function (quality, $super) {
145
+ quality = quality === VOID ? null : quality;
146
+ var tmp;
147
+ if ($super === VOID) {
148
+ this.brf(quality);
149
+ tmp = Unit_instance;
150
+ } else {
151
+ tmp = $super.brf.call(this, quality);
152
+ }
153
+ return tmp;
154
+ };
155
+ protoOf(ContentEncodingConfig).drf = function (quality) {
156
+ this.zre(IdentityEncoder_getInstance(), quality);
157
+ };
158
+ protoOf(ContentEncodingConfig).erf = function (quality, $super) {
159
+ quality = quality === VOID ? null : quality;
160
+ var tmp;
161
+ if ($super === VOID) {
162
+ this.drf(quality);
163
+ tmp = Unit_instance;
164
+ } else {
165
+ tmp = $super.drf.call(this, quality);
166
+ }
167
+ return tmp;
168
+ };
169
+ protoOf(ContentEncodingConfig).zre = function (encoder, quality) {
170
+ var name = encoder.m();
171
+ var tmp0 = this.vre_1;
172
+ // Inline function 'kotlin.text.lowercase' call
173
+ // Inline function 'kotlin.js.asDynamic' call
174
+ // Inline function 'kotlin.collections.set' call
175
+ var key = name.toLowerCase();
176
+ tmp0.c3(key, encoder);
177
+ if (quality == null) {
178
+ this.wre_1.d3(name);
179
+ } else {
180
+ // Inline function 'kotlin.collections.set' call
181
+ this.wre_1.c3(name, quality);
182
+ }
183
+ };
184
+ function UnsupportedContentEncodingException(encoding) {
185
+ IllegalStateException_init_$Init$('Content-Encoding: ' + encoding + ' unsupported.', this);
186
+ captureStack(this, UnsupportedContentEncodingException);
187
+ }
188
+ function AfterRenderHook$install$slambda($handler, resultContinuation) {
189
+ this.nrf_1 = $handler;
190
+ CoroutineImpl.call(this, resultContinuation);
191
+ }
192
+ protoOf(AfterRenderHook$install$slambda).f4h = function ($this$intercept, it, $completion) {
193
+ var tmp = this.g4h($this$intercept, it, $completion);
194
+ tmp.o9_1 = Unit_instance;
195
+ tmp.p9_1 = null;
196
+ return tmp.u9();
197
+ };
198
+ protoOf(AfterRenderHook$install$slambda).ha = function (p1, p2, $completion) {
199
+ var tmp = p1 instanceof PipelineContext ? p1 : THROW_CCE();
200
+ return this.f4h(tmp, !(p2 == null) ? p2 : THROW_CCE(), $completion);
201
+ };
202
+ protoOf(AfterRenderHook$install$slambda).u9 = function () {
203
+ var suspendResult = this.o9_1;
204
+ $sm: do
205
+ try {
206
+ var tmp = this.m9_1;
207
+ switch (tmp) {
208
+ case 0:
209
+ this.n9_1 = 4;
210
+ this.m9_1 = 1;
211
+ var tmp_0 = this.orf_1.a3h();
212
+ suspendResult = this.nrf_1(this.orf_1.x3h_1, tmp_0 instanceof OutgoingContent ? tmp_0 : THROW_CCE(), this);
213
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
214
+ return suspendResult;
215
+ }
216
+
217
+ continue $sm;
218
+ case 1:
219
+ var result = suspendResult;
220
+ if (!(result == null)) {
221
+ this.m9_1 = 2;
222
+ suspendResult = this.orf_1.b3h(result, this);
223
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
224
+ return suspendResult;
225
+ }
226
+ continue $sm;
227
+ } else {
228
+ this.m9_1 = 3;
229
+ continue $sm;
230
+ }
231
+
232
+ case 2:
233
+ this.m9_1 = 3;
234
+ continue $sm;
235
+ case 3:
236
+ return Unit_instance;
237
+ case 4:
238
+ throw this.p9_1;
239
+ }
240
+ } catch ($p) {
241
+ var e = $p;
242
+ if (this.n9_1 === 4) {
243
+ throw e;
244
+ } else {
245
+ this.m9_1 = this.n9_1;
246
+ this.p9_1 = e;
247
+ }
248
+ }
249
+ while (true);
250
+ };
251
+ protoOf(AfterRenderHook$install$slambda).g4h = function ($this$intercept, it, completion) {
252
+ var i = new AfterRenderHook$install$slambda(this.nrf_1, completion);
253
+ i.orf_1 = $this$intercept;
254
+ i.prf_1 = it;
255
+ return i;
256
+ };
257
+ function AfterRenderHook$install$slambda_0($handler, resultContinuation) {
258
+ var i = new AfterRenderHook$install$slambda($handler, resultContinuation);
259
+ var l = function ($this$intercept, it, $completion) {
260
+ return i.f4h($this$intercept, it, $completion);
261
+ };
262
+ l.$arity = 2;
263
+ return l;
264
+ }
265
+ function AfterRenderHook() {
266
+ AfterRenderHook_instance = this;
267
+ this.qrf_1 = new PipelinePhase('AfterRender');
268
+ }
269
+ protoOf(AfterRenderHook).y4p = function (client, handler) {
270
+ client.h4g_1.y3h(Phases_getInstance().c4q_1, this.qrf_1);
271
+ client.h4g_1.b3i(this.qrf_1, AfterRenderHook$install$slambda_0(handler, null));
272
+ };
273
+ protoOf(AfterRenderHook).e4q = function (client, handler) {
274
+ return this.y4p(client, (!(handler == null) ? isSuspendFunction(handler, 2) : false) ? handler : THROW_CCE());
275
+ };
276
+ var AfterRenderHook_instance;
277
+ function AfterRenderHook_getInstance() {
278
+ if (AfterRenderHook_instance == null)
279
+ new AfterRenderHook();
280
+ return AfterRenderHook_instance;
281
+ }
282
+ function ReceiveStateHook$install$slambda($handler, resultContinuation) {
283
+ this.zrf_1 = $handler;
284
+ CoroutineImpl.call(this, resultContinuation);
285
+ }
286
+ protoOf(ReceiveStateHook$install$slambda).q4q = function ($this$intercept, it, $completion) {
287
+ var tmp = this.r4q($this$intercept, it, $completion);
288
+ tmp.o9_1 = Unit_instance;
289
+ tmp.p9_1 = null;
290
+ return tmp.u9();
291
+ };
292
+ protoOf(ReceiveStateHook$install$slambda).ha = function (p1, p2, $completion) {
293
+ var tmp = p1 instanceof PipelineContext ? p1 : THROW_CCE();
294
+ return this.q4q(tmp, p2 instanceof HttpResponse ? p2 : THROW_CCE(), $completion);
295
+ };
296
+ protoOf(ReceiveStateHook$install$slambda).u9 = function () {
297
+ var suspendResult = this.o9_1;
298
+ $sm: do
299
+ try {
300
+ var tmp = this.m9_1;
301
+ switch (tmp) {
302
+ case 0:
303
+ this.n9_1 = 4;
304
+ this.m9_1 = 1;
305
+ suspendResult = this.zrf_1(this.brg_1, this);
306
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
307
+ return suspendResult;
308
+ }
309
+
310
+ continue $sm;
311
+ case 1:
312
+ var result = suspendResult;
313
+ if (!(result == null)) {
314
+ this.m9_1 = 2;
315
+ suspendResult = this.arg_1.b3h(result, this);
316
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
317
+ return suspendResult;
318
+ }
319
+ continue $sm;
320
+ } else {
321
+ this.m9_1 = 3;
322
+ continue $sm;
323
+ }
324
+
325
+ case 2:
326
+ this.m9_1 = 3;
327
+ continue $sm;
328
+ case 3:
329
+ return Unit_instance;
330
+ case 4:
331
+ throw this.p9_1;
332
+ }
333
+ } catch ($p) {
334
+ var e = $p;
335
+ if (this.n9_1 === 4) {
336
+ throw e;
337
+ } else {
338
+ this.m9_1 = this.n9_1;
339
+ this.p9_1 = e;
340
+ }
341
+ }
342
+ while (true);
343
+ };
344
+ protoOf(ReceiveStateHook$install$slambda).r4q = function ($this$intercept, it, completion) {
345
+ var i = new ReceiveStateHook$install$slambda(this.zrf_1, completion);
346
+ i.arg_1 = $this$intercept;
347
+ i.brg_1 = it;
348
+ return i;
349
+ };
350
+ function ReceiveStateHook$install$slambda_0($handler, resultContinuation) {
351
+ var i = new ReceiveStateHook$install$slambda($handler, resultContinuation);
352
+ var l = function ($this$intercept, it, $completion) {
353
+ return i.q4q($this$intercept, it, $completion);
354
+ };
355
+ l.$arity = 2;
356
+ return l;
357
+ }
358
+ function ReceiveStateHook() {
359
+ }
360
+ protoOf(ReceiveStateHook).s4q = function (client, handler) {
361
+ var tmp = Phases_getInstance_0().u4q_1;
362
+ client.k4g_1.b3i(tmp, ReceiveStateHook$install$slambda_0(handler, null));
363
+ };
364
+ protoOf(ReceiveStateHook).e4q = function (client, handler) {
365
+ return this.s4q(client, (!(handler == null) ? isSuspendFunction(handler, 1) : false) ? handler : THROW_CCE());
366
+ };
367
+ var ReceiveStateHook_instance;
368
+ function ReceiveStateHook_getInstance() {
369
+ return ReceiveStateHook_instance;
370
+ }
371
+ function ContentEncodingConfig$_init_$ref_5w7vdj() {
372
+ var l = function () {
373
+ return new ContentEncodingConfig();
374
+ };
375
+ l.callableName = '<init>';
376
+ return l;
377
+ }
378
+ function ContentEncoding$lambda($this$createClientPlugin) {
379
+ _init_properties_ContentEncoding_kt__4smi0q();
380
+ var encoders = $this$createClientPlugin.y4q_1.vre_1;
381
+ var qualityValues = $this$createClientPlugin.y4q_1.wre_1;
382
+ var mode = $this$createClientPlugin.y4q_1.xre_1;
383
+ // Inline function 'kotlin.text.buildString' call
384
+ // Inline function 'kotlin.apply' call
385
+ var this_0 = StringBuilder_init_$Create$();
386
+ var _iterator__ex2g4s = encoders.b3().t();
387
+ $l$loop: while (_iterator__ex2g4s.u()) {
388
+ var encoder = _iterator__ex2g4s.v();
389
+ // Inline function 'kotlin.text.isNotEmpty' call
390
+ if (charSequenceLength(this_0) > 0) {
391
+ this_0.s(_Char___init__impl__6a9atx(44));
392
+ }
393
+ this_0.q(encoder.m());
394
+ var tmp0_elvis_lhs = qualityValues.z2(encoder.m());
395
+ var tmp;
396
+ if (tmp0_elvis_lhs == null) {
397
+ continue $l$loop;
398
+ } else {
399
+ tmp = tmp0_elvis_lhs;
400
+ }
401
+ var quality = tmp;
402
+ // Inline function 'kotlin.check' call
403
+ if (!(0.0 <= quality ? quality <= 1.0 : false)) {
404
+ var message = 'Invalid quality value: ' + quality + ' for encoder: ' + toString(encoder);
405
+ throw IllegalStateException_init_$Create$(toString(message));
406
+ }
407
+ var qualityValue = take(quality.toString(), 5);
408
+ this_0.q(';q=' + qualityValue);
409
+ }
410
+ var requestHeader = this_0.toString();
411
+ $this$createClientPlugin.y55(ContentEncoding$lambda$slambda_0(mode, requestHeader, null));
412
+ var tmp_0 = AfterRenderHook_getInstance();
413
+ $this$createClientPlugin.b4r(tmp_0, ContentEncoding$lambda$slambda_2(mode, $this$createClientPlugin, encoders, null));
414
+ var tmp_1 = ReceiveStateHook_instance;
415
+ $this$createClientPlugin.b4r(tmp_1, ContentEncoding$lambda$slambda_4(mode, encoders, null));
416
+ return Unit_instance;
417
+ }
418
+ function ContentEncoding$lambda$decode$lambda$lambda($this_headers) {
419
+ return function (name, values) {
420
+ var tmp;
421
+ if (equals(name, 'Content-Encoding', true) || equals(name, 'Content-Length', true)) {
422
+ return Unit_instance;
423
+ }
424
+ $this_headers.i3d(name, values);
425
+ return Unit_instance;
426
+ };
427
+ }
428
+ function ContentEncoding$lambda$decode$lambda($response, $encodings) {
429
+ return function ($this$headers) {
430
+ var tmp = $response.a3r();
431
+ tmp.m3d(ContentEncoding$lambda$decode$lambda$lambda($this$headers));
432
+ // Inline function 'kotlin.collections.filter' call
433
+ var tmp0 = $encodings;
434
+ // Inline function 'kotlin.collections.filterTo' call
435
+ var destination = ArrayList_init_$Create$();
436
+ var _iterator__ex2g4s = tmp0.t();
437
+ while (_iterator__ex2g4s.u()) {
438
+ var element = _iterator__ex2g4s.v();
439
+ if (!$encodings.q2(element)) {
440
+ destination.e1(element);
441
+ }
442
+ }
443
+ var remainingEncodings = destination;
444
+ var tmp_0;
445
+ // Inline function 'kotlin.collections.isNotEmpty' call
446
+ if (!remainingEncodings.r()) {
447
+ $this$headers.g3d('Content-Encoding', joinToString(remainingEncodings, ','));
448
+ tmp_0 = Unit_instance;
449
+ }
450
+ return Unit_instance;
451
+ };
452
+ }
453
+ function ContentEncoding$lambda$decode$lambda_0($selectedEncoders) {
454
+ return function ($this$replaceResponse) {
455
+ return invoke$decodeContent($this$replaceResponse, $selectedEncoders);
456
+ };
457
+ }
458
+ function invoke$decodeContent(_this__u8e3s4, encoders) {
459
+ var current = _this__u8e3s4.m4k();
460
+ var _iterator__ex2g4s = encoders.t();
461
+ while (_iterator__ex2g4s.u()) {
462
+ var encoder = _iterator__ex2g4s.v();
463
+ // Inline function 'io.ktor.util.logging.trace' call
464
+ var this_0 = get_LOGGER();
465
+ if (get_isTraceEnabled(this_0)) {
466
+ var tmp$ret$1 = 'Decoding response with ' + toString(encoder) + ' for ' + _this__u8e3s4.d4k().v4j().f4k().toString();
467
+ this_0.e3j(tmp$ret$1);
468
+ }
469
+ current = encoder.q3c(current, _this__u8e3s4.w1v());
470
+ }
471
+ return current;
472
+ }
473
+ function invoke$decode(encoders, response) {
474
+ if (!shouldDecode(response))
475
+ return response;
476
+ var tmp0_elvis_lhs = response.a3r().ee('Content-Encoding');
477
+ var tmp;
478
+ if (tmp0_elvis_lhs == null) {
479
+ // Inline function 'kotlin.error' call
480
+ var message = 'Content-Encoding unavailable';
481
+ throw IllegalStateException_init_$Create$(toString(message));
482
+ } else {
483
+ tmp = tmp0_elvis_lhs;
484
+ }
485
+ var contentEncodingHeader = tmp;
486
+ // Inline function 'kotlin.collections.map' call
487
+ var this_0 = split(contentEncodingHeader, [',']);
488
+ // Inline function 'kotlin.collections.mapTo' call
489
+ var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
490
+ var _iterator__ex2g4s = this_0.t();
491
+ while (_iterator__ex2g4s.u()) {
492
+ var item = _iterator__ex2g4s.v();
493
+ // Inline function 'kotlin.text.trim' call
494
+ // Inline function 'kotlin.text.lowercase' call
495
+ // Inline function 'kotlin.js.asDynamic' call
496
+ var tmp$ret$3 = toString(trim(isCharSequence(item) ? item : THROW_CCE())).toLowerCase();
497
+ destination.e1(tmp$ret$3);
498
+ }
499
+ var encodings = destination;
500
+ // Inline function 'kotlin.collections.map' call
501
+ var this_1 = asReversed(encodings);
502
+ // Inline function 'kotlin.collections.mapTo' call
503
+ var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_1, 10));
504
+ var _iterator__ex2g4s_0 = this_1.t();
505
+ while (_iterator__ex2g4s_0.u()) {
506
+ var item_0 = _iterator__ex2g4s_0.v();
507
+ var tmp0_elvis_lhs_0 = encoders.z2(item_0);
508
+ var tmp_0;
509
+ if (tmp0_elvis_lhs_0 == null) {
510
+ throw new UnsupportedContentEncodingException(item_0);
511
+ } else {
512
+ tmp_0 = tmp0_elvis_lhs_0;
513
+ }
514
+ var tmp$ret$9 = tmp_0;
515
+ destination_0.e1(tmp$ret$9);
516
+ }
517
+ var selectedEncoders = destination_0;
518
+ var headers_0 = headers(ContentEncoding$lambda$decode$lambda(response, encodings));
519
+ response.d4k().w4j().q38(get_DecompressionListAttribute(), encodings);
520
+ var tmp_1 = response.d4k();
521
+ return replaceResponse(tmp_1, headers_0, ContentEncoding$lambda$decode$lambda_0(selectedEncoders)).m4h();
522
+ }
523
+ function ContentEncoding$lambda$slambda($mode, $requestHeader, resultContinuation) {
524
+ this.krg_1 = $mode;
525
+ this.lrg_1 = $requestHeader;
526
+ CoroutineImpl.call(this, resultContinuation);
527
+ }
528
+ protoOf(ContentEncoding$lambda$slambda).m56 = function ($this$onRequest, request, _unused_var__etf5q3, $completion) {
529
+ var tmp = this.n56($this$onRequest, request, _unused_var__etf5q3, $completion);
530
+ tmp.o9_1 = Unit_instance;
531
+ tmp.p9_1 = null;
532
+ return tmp.u9();
533
+ };
534
+ protoOf(ContentEncoding$lambda$slambda).o56 = function (p1, p2, p3, $completion) {
535
+ var tmp = p1 instanceof OnRequestContext ? p1 : THROW_CCE();
536
+ var tmp_0 = p2 instanceof HttpRequestBuilder ? p2 : THROW_CCE();
537
+ return this.m56(tmp, tmp_0, !(p3 == null) ? p3 : THROW_CCE(), $completion);
538
+ };
539
+ protoOf(ContentEncoding$lambda$slambda).u9 = function () {
540
+ var suspendResult = this.o9_1;
541
+ $sm: do
542
+ try {
543
+ var tmp = this.m9_1;
544
+ if (tmp === 0) {
545
+ this.n9_1 = 1;
546
+ if (!this.krg_1.ure_1)
547
+ return Unit_instance;
548
+ if (this.nrg_1.o4i_1.y3b('Accept-Encoding'))
549
+ return Unit_instance;
550
+ var this_0 = get_LOGGER();
551
+ if (get_isTraceEnabled(this_0)) {
552
+ this_0.e3j('Adding Accept-Encoding=' + this.lrg_1 + ' for ' + this.nrg_1.m4i_1.toString());
553
+ }
554
+ this.nrg_1.o4i_1.q3d('Accept-Encoding', this.lrg_1);
555
+ return Unit_instance;
556
+ } else if (tmp === 1) {
557
+ throw this.p9_1;
558
+ }
559
+ } catch ($p) {
560
+ var e = $p;
561
+ throw e;
562
+ }
563
+ while (true);
564
+ };
565
+ protoOf(ContentEncoding$lambda$slambda).n56 = function ($this$onRequest, request, _unused_var__etf5q3, completion) {
566
+ var i = new ContentEncoding$lambda$slambda(this.krg_1, this.lrg_1, completion);
567
+ i.mrg_1 = $this$onRequest;
568
+ i.nrg_1 = request;
569
+ i.org_1 = _unused_var__etf5q3;
570
+ return i;
571
+ };
572
+ function ContentEncoding$lambda$slambda_0($mode, $requestHeader, resultContinuation) {
573
+ var i = new ContentEncoding$lambda$slambda($mode, $requestHeader, resultContinuation);
574
+ var l = function ($this$onRequest, request, _unused_var__etf5q3, $completion) {
575
+ return i.m56($this$onRequest, request, _unused_var__etf5q3, $completion);
576
+ };
577
+ l.$arity = 3;
578
+ return l;
579
+ }
580
+ function ContentEncoding$lambda$slambda_1($mode, $this_createClientPlugin, $encoders, resultContinuation) {
581
+ this.xrg_1 = $mode;
582
+ this.yrg_1 = $this_createClientPlugin;
583
+ this.zrg_1 = $encoders;
584
+ CoroutineImpl.call(this, resultContinuation);
585
+ }
586
+ protoOf(ContentEncoding$lambda$slambda_1).m4r = function (request, content, $completion) {
587
+ var tmp = this.n4r(request, content, $completion);
588
+ tmp.o9_1 = Unit_instance;
589
+ tmp.p9_1 = null;
590
+ return tmp.u9();
591
+ };
592
+ protoOf(ContentEncoding$lambda$slambda_1).ha = function (p1, p2, $completion) {
593
+ var tmp = p1 instanceof HttpRequestBuilder ? p1 : THROW_CCE();
594
+ return this.m4r(tmp, p2 instanceof OutgoingContent ? p2 : THROW_CCE(), $completion);
595
+ };
596
+ protoOf(ContentEncoding$lambda$slambda_1).u9 = function () {
597
+ var suspendResult = this.o9_1;
598
+ $sm: do
599
+ try {
600
+ var tmp = this.m9_1;
601
+ if (tmp === 0) {
602
+ this.n9_1 = 1;
603
+ if (!this.xrg_1.tre_1)
604
+ return null;
605
+ var tmp0_elvis_lhs = this.arh_1.r4i_1.o38(get_CompressionListAttribute());
606
+ var tmp_0;
607
+ if (tmp0_elvis_lhs == null) {
608
+ this.yrg_1;
609
+ var this_0 = get_LOGGER();
610
+ if (get_isTraceEnabled(this_0)) {
611
+ this_0.e3j('Skipping request compression for ' + this.arh_1.m4i_1.toString() + ' because no compressions set');
612
+ }
613
+ return null;
614
+ } else {
615
+ tmp_0 = tmp0_elvis_lhs;
616
+ }
617
+ var encoderNames = tmp_0;
618
+ var this_1 = get_LOGGER();
619
+ if (get_isTraceEnabled(this_1)) {
620
+ this_1.e3j('Compressing request body for ' + this.arh_1.m4i_1.toString() + ' using ' + toString(encoderNames));
621
+ }
622
+ var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(encoderNames, 10));
623
+ var _iterator__ex2g4s = encoderNames.t();
624
+ while (_iterator__ex2g4s.u()) {
625
+ var item = _iterator__ex2g4s.v();
626
+ var tmp0_elvis_lhs_0 = this.zrg_1.z2(item);
627
+ var tmp_1;
628
+ if (tmp0_elvis_lhs_0 == null) {
629
+ throw new UnsupportedContentEncodingException(item);
630
+ } else {
631
+ tmp_1 = tmp0_elvis_lhs_0;
632
+ }
633
+ destination.e1(tmp_1);
634
+ }
635
+ var selectedEncoders = destination;
636
+ if (selectedEncoders.r())
637
+ return null;
638
+ var accumulator = this.brh_1;
639
+ var _iterator__ex2g4s_0 = selectedEncoders.t();
640
+ while (_iterator__ex2g4s_0.u()) {
641
+ var element = _iterator__ex2g4s_0.v();
642
+ var compressed_0 = accumulator;
643
+ var tmp0_elvis_lhs_1 = compressed(compressed_0, element, this.arh_1.q4i_1);
644
+ accumulator = tmp0_elvis_lhs_1 == null ? compressed_0 : tmp0_elvis_lhs_1;
645
+ }
646
+ return accumulator;
647
+ } else if (tmp === 1) {
648
+ throw this.p9_1;
649
+ }
650
+ } catch ($p) {
651
+ var e = $p;
652
+ throw e;
653
+ }
654
+ while (true);
655
+ };
656
+ protoOf(ContentEncoding$lambda$slambda_1).n4r = function (request, content, completion) {
657
+ var i = new ContentEncoding$lambda$slambda_1(this.xrg_1, this.yrg_1, this.zrg_1, completion);
658
+ i.arh_1 = request;
659
+ i.brh_1 = content;
660
+ return i;
661
+ };
662
+ function ContentEncoding$lambda$slambda_2($mode, $this_createClientPlugin, $encoders, resultContinuation) {
663
+ var i = new ContentEncoding$lambda$slambda_1($mode, $this_createClientPlugin, $encoders, resultContinuation);
664
+ var l = function (request, content, $completion) {
665
+ return i.m4r(request, content, $completion);
666
+ };
667
+ l.$arity = 2;
668
+ return l;
669
+ }
670
+ function ContentEncoding$lambda$slambda_3($mode, $encoders, resultContinuation) {
671
+ this.krh_1 = $mode;
672
+ this.lrh_1 = $encoders;
673
+ CoroutineImpl.call(this, resultContinuation);
674
+ }
675
+ protoOf(ContentEncoding$lambda$slambda_3).x4r = function (response, $completion) {
676
+ var tmp = this.y4r(response, $completion);
677
+ tmp.o9_1 = Unit_instance;
678
+ tmp.p9_1 = null;
679
+ return tmp.u9();
680
+ };
681
+ protoOf(ContentEncoding$lambda$slambda_3).ga = function (p1, $completion) {
682
+ return this.x4r(p1 instanceof HttpResponse ? p1 : THROW_CCE(), $completion);
683
+ };
684
+ protoOf(ContentEncoding$lambda$slambda_3).u9 = function () {
685
+ var suspendResult = this.o9_1;
686
+ $sm: do
687
+ try {
688
+ var tmp = this.m9_1;
689
+ if (tmp === 0) {
690
+ this.n9_1 = 1;
691
+ if (!this.krh_1.ure_1)
692
+ return null;
693
+ var method = get_request(this.mrh_1).e4k();
694
+ var contentLength_0 = contentLength(this.mrh_1);
695
+ if (contentLength_0 === 0n)
696
+ return null;
697
+ if (contentLength_0 == null && method.equals(Companion_getInstance().g3r_1))
698
+ return null;
699
+ return invoke$decode(this.lrh_1, this.mrh_1);
700
+ } else if (tmp === 1) {
701
+ throw this.p9_1;
702
+ }
703
+ } catch ($p) {
704
+ var e = $p;
705
+ throw e;
706
+ }
707
+ while (true);
708
+ };
709
+ protoOf(ContentEncoding$lambda$slambda_3).y4r = function (response, completion) {
710
+ var i = new ContentEncoding$lambda$slambda_3(this.krh_1, this.lrh_1, completion);
711
+ i.mrh_1 = response;
712
+ return i;
713
+ };
714
+ function ContentEncoding$lambda$slambda_4($mode, $encoders, resultContinuation) {
715
+ var i = new ContentEncoding$lambda$slambda_3($mode, $encoders, resultContinuation);
716
+ var l = function (response, $completion) {
717
+ return i.x4r(response, $completion);
718
+ };
719
+ l.$arity = 1;
720
+ return l;
721
+ }
722
+ var properties_initialized_ContentEncoding_kt_nayzok;
723
+ function _init_properties_ContentEncoding_kt__4smi0q() {
724
+ if (!properties_initialized_ContentEncoding_kt_nayzok) {
725
+ properties_initialized_ContentEncoding_kt_nayzok = true;
726
+ LOGGER = KtorSimpleLogger('io.ktor.client.plugins.compression.ContentEncoding');
727
+ var tmp = ContentEncodingConfig$_init_$ref_5w7vdj();
728
+ ContentEncoding = createClientPlugin('HttpEncoding', tmp, ContentEncoding$lambda);
729
+ // Inline function 'io.ktor.util.AttributeKey' call
730
+ var name = 'CompressionListAttribute';
731
+ // Inline function 'io.ktor.util.reflect.typeInfo' call
732
+ var tmp_0 = getKClass(KtList);
733
+ // Inline function 'io.ktor.util.reflect.typeOfOrNull' call
734
+ var tmp_1;
735
+ try {
736
+ tmp_1 = createKType(getKClass(KtList), arrayOf([createInvariantKTypeProjection(createKType(PrimitiveClasses_getInstance().qc(), arrayOf([]), false))]), false);
737
+ } catch ($p) {
738
+ var tmp_2;
739
+ if ($p instanceof Error) {
740
+ var _unused_var__etf5q3 = $p;
741
+ tmp_2 = null;
742
+ } else {
743
+ throw $p;
744
+ }
745
+ tmp_1 = tmp_2;
746
+ }
747
+ var tmp$ret$2 = tmp_1;
748
+ var tmp$ret$1 = new TypeInfo(tmp_0, tmp$ret$2);
749
+ CompressionListAttribute = new AttributeKey(name, tmp$ret$1);
750
+ // Inline function 'io.ktor.util.AttributeKey' call
751
+ var name_0 = 'DecompressionListAttribute';
752
+ // Inline function 'io.ktor.util.reflect.typeInfo' call
753
+ var tmp_3 = getKClass(KtList);
754
+ // Inline function 'io.ktor.util.reflect.typeOfOrNull' call
755
+ var tmp_4;
756
+ try {
757
+ tmp_4 = createKType(getKClass(KtList), arrayOf([createInvariantKTypeProjection(createKType(PrimitiveClasses_getInstance().qc(), arrayOf([]), false))]), false);
758
+ } catch ($p) {
759
+ var tmp_5;
760
+ if ($p instanceof Error) {
761
+ var _unused_var__etf5q3_0 = $p;
762
+ tmp_5 = null;
763
+ } else {
764
+ throw $p;
765
+ }
766
+ tmp_4 = tmp_5;
767
+ }
768
+ var tmp$ret$2_0 = tmp_4;
769
+ var tmp$ret$1_0 = new TypeInfo(tmp_3, tmp$ret$2_0);
770
+ DecompressionListAttribute = new AttributeKey(name_0, tmp$ret$1_0);
771
+ }
772
+ }
773
+ function shouldDecode(response) {
774
+ return false;
775
+ }
776
+ //region block: init
777
+ ReceiveStateHook_instance = new ReceiveStateHook();
778
+ //endregion
779
+ //region block: exports
780
+ export {
781
+ get_ContentEncoding as get_ContentEncoding3ntb7mwovz4dd,
782
+ };
783
+ //endregion
784
+
785
+ //# sourceMappingURL=ktor-ktor-client-encoding.mjs.map