@doordeck/doordeck-headless-sdk 0.68.0 → 0.71.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.
- package/kotlin/Kotlin-DateTime-library-kotlinx-datetime.js +1344 -1344
- package/kotlin/KotlinMultiplatformLibsodium-multiplatform-crypto-libsodium-bindings.js +35 -35
- package/kotlin/MultiplatformSettings-multiplatform-settings.js +9 -9
- package/kotlin/doordeck-sdk.d.ts +4 -0
- package/kotlin/doordeck-sdk.js +11570 -11565
- package/kotlin/kotlin-kotlin-stdlib.js +2607 -2319
- package/kotlin/kotlinx-atomicfu.js +19 -19
- package/kotlin/kotlinx-coroutines-core.js +2794 -2208
- package/kotlin/kotlinx-io-kotlinx-io-bytestring.js +198 -2
- package/kotlin/kotlinx-io-kotlinx-io-core.js +536 -463
- package/kotlin/kotlinx-serialization-kotlinx-serialization-core.js +1939 -1939
- package/kotlin/kotlinx-serialization-kotlinx-serialization-json.js +1733 -1684
- package/kotlin/ktor-ktor-client-ktor-client-core.js +3274 -3074
- package/kotlin/ktor-ktor-client-ktor-client-plugins-ktor-client-auth.js +529 -427
- package/kotlin/ktor-ktor-client-ktor-client-plugins-ktor-client-content-negotiation.js +372 -271
- package/kotlin/ktor-ktor-http-ktor-http-cio.js +2009 -0
- package/kotlin/ktor-ktor-http.js +1012 -907
- package/kotlin/ktor-ktor-io.js +1748 -871
- package/kotlin/ktor-ktor-shared-ktor-events.js +13 -13
- package/kotlin/ktor-ktor-shared-ktor-serialization-ktor-serialization-kotlinx-ktor-serialization-kotlinx-json.js +8 -8
- package/kotlin/ktor-ktor-shared-ktor-serialization-ktor-serialization-kotlinx.js +282 -282
- package/kotlin/ktor-ktor-shared-ktor-serialization.js +137 -137
- package/kotlin/ktor-ktor-shared-ktor-websockets.js +57 -57
- package/kotlin/ktor-ktor-utils.js +736 -667
- package/package.json +2 -2
- package/kotlin/kotlin-kotlinx-atomicfu-runtime.js +0 -6
|
@@ -1,61 +1,68 @@
|
|
|
1
1
|
(function (_, kotlin_kotlin, kotlin_io_ktor_ktor_http, kotlin_io_ktor_ktor_serialization, kotlin_io_ktor_ktor_io, kotlin_io_ktor_ktor_client_core, kotlin_io_ktor_ktor_utils) {
|
|
2
2
|
'use strict';
|
|
3
3
|
//region block: imports
|
|
4
|
-
var protoOf = kotlin_kotlin.$_$.
|
|
5
|
-
var initMetadataForClass = kotlin_kotlin.$_$.
|
|
6
|
-
var plus = kotlin_kotlin.$_$.
|
|
7
|
-
var toMutableSet = kotlin_kotlin.$_$.
|
|
4
|
+
var protoOf = kotlin_kotlin.$_$.sb;
|
|
5
|
+
var initMetadataForClass = kotlin_kotlin.$_$.ra;
|
|
6
|
+
var plus = kotlin_kotlin.$_$.y7;
|
|
7
|
+
var toMutableSet = kotlin_kotlin.$_$.w8;
|
|
8
8
|
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.p;
|
|
9
9
|
var Application_getInstance = kotlin_io_ktor_ktor_http.$_$.b;
|
|
10
10
|
var register$default = kotlin_io_ktor_ktor_serialization.$_$.b;
|
|
11
|
-
var Unit_instance = kotlin_kotlin.$_$.
|
|
11
|
+
var Unit_instance = kotlin_kotlin.$_$.j5;
|
|
12
12
|
var Configuration = kotlin_io_ktor_ktor_serialization.$_$.c;
|
|
13
13
|
var VOID = kotlin_kotlin.$_$.h;
|
|
14
|
-
var Exception = kotlin_kotlin.$_$.
|
|
15
|
-
var Exception_init_$Init$ = kotlin_kotlin.$_$.
|
|
16
|
-
var captureStack = kotlin_kotlin.$_$.
|
|
17
|
-
var Charsets_getInstance = kotlin_io_ktor_ktor_io.$_$.
|
|
18
|
-
var CoroutineImpl = kotlin_kotlin.$_$.
|
|
19
|
-
var THROW_CCE = kotlin_kotlin.$_$.
|
|
14
|
+
var Exception = kotlin_kotlin.$_$.cf;
|
|
15
|
+
var Exception_init_$Init$ = kotlin_kotlin.$_$.o1;
|
|
16
|
+
var captureStack = kotlin_kotlin.$_$.ba;
|
|
17
|
+
var Charsets_getInstance = kotlin_io_ktor_ktor_io.$_$.k;
|
|
18
|
+
var CoroutineImpl = kotlin_kotlin.$_$.t9;
|
|
19
|
+
var THROW_CCE = kotlin_kotlin.$_$.lf;
|
|
20
20
|
var TransformRequestBodyContext = kotlin_io_ktor_ktor_client_core.$_$.g;
|
|
21
21
|
var HttpRequestBuilder = kotlin_io_ktor_ktor_client_core.$_$.s;
|
|
22
|
-
var TypeInfo = kotlin_io_ktor_ktor_utils.$_$.
|
|
23
|
-
var get_COROUTINE_SUSPENDED = kotlin_kotlin.$_$.
|
|
24
|
-
var initMetadataForLambda = kotlin_kotlin.$_$.
|
|
22
|
+
var TypeInfo = kotlin_io_ktor_ktor_utils.$_$.l;
|
|
23
|
+
var get_COROUTINE_SUSPENDED = kotlin_kotlin.$_$.d9;
|
|
24
|
+
var initMetadataForLambda = kotlin_kotlin.$_$.wa;
|
|
25
25
|
var TransformResponseBodyContext = kotlin_io_ktor_ktor_client_core.$_$.h;
|
|
26
26
|
var HttpResponse = kotlin_io_ktor_ktor_client_core.$_$.y;
|
|
27
|
-
var ByteReadChannel = kotlin_io_ktor_ktor_io.$_$.
|
|
28
|
-
var isInterface = kotlin_kotlin.$_$.
|
|
29
|
-
var contentType = kotlin_io_ktor_ktor_http.$_$.
|
|
27
|
+
var ByteReadChannel = kotlin_io_ktor_ktor_io.$_$.j1;
|
|
28
|
+
var isInterface = kotlin_kotlin.$_$.gb;
|
|
29
|
+
var contentType = kotlin_io_ktor_ktor_http.$_$.m1;
|
|
30
30
|
var get_request = kotlin_io_ktor_ktor_client_core.$_$.a1;
|
|
31
31
|
var suitableCharset = kotlin_io_ktor_ktor_serialization.$_$.f;
|
|
32
|
-
var toString = kotlin_kotlin.$_$.
|
|
33
|
-
var
|
|
32
|
+
var toString = kotlin_kotlin.$_$.wb;
|
|
33
|
+
var Collection = kotlin_kotlin.$_$.l5;
|
|
34
|
+
var HttpHeaders_getInstance = kotlin_io_ktor_ktor_http.$_$.g;
|
|
35
|
+
var emptyList = kotlin_kotlin.$_$.y6;
|
|
36
|
+
var Companion_getInstance = kotlin_io_ktor_ktor_http.$_$.c;
|
|
34
37
|
var accept = kotlin_io_ktor_ktor_client_core.$_$.u;
|
|
35
|
-
var
|
|
36
|
-
var OutgoingContent = kotlin_io_ktor_ktor_http.$_$.t;
|
|
38
|
+
var OutgoingContent = kotlin_io_ktor_ktor_http.$_$.w;
|
|
37
39
|
var getKClassFromExpression = kotlin_kotlin.$_$.e;
|
|
38
|
-
var contentType_0 = kotlin_io_ktor_ktor_http.$_$.
|
|
40
|
+
var contentType_0 = kotlin_io_ktor_ktor_http.$_$.l1;
|
|
39
41
|
var EmptyContent_getInstance = kotlin_io_ktor_ktor_client_core.$_$.d;
|
|
40
|
-
var Unit = kotlin_kotlin.$_$.
|
|
41
|
-
var charset = kotlin_io_ktor_ktor_http.$_$.
|
|
42
|
-
var ensureNotNull = kotlin_kotlin.$_$.
|
|
42
|
+
var Unit = kotlin_kotlin.$_$.wf;
|
|
43
|
+
var charset = kotlin_io_ktor_ktor_http.$_$.j1;
|
|
44
|
+
var ensureNotNull = kotlin_kotlin.$_$.dg;
|
|
43
45
|
var NullBody_instance = kotlin_io_ktor_ktor_http.$_$.a;
|
|
44
|
-
var equals = kotlin_kotlin.$_$.
|
|
45
|
-
var joinToString = kotlin_kotlin.$_$.
|
|
46
|
-
var initMetadataForCoroutine = kotlin_kotlin.$_$.
|
|
47
|
-
var collectionSizeOrDefault = kotlin_kotlin.$_$.
|
|
46
|
+
var equals = kotlin_kotlin.$_$.ja;
|
|
47
|
+
var joinToString = kotlin_kotlin.$_$.n7;
|
|
48
|
+
var initMetadataForCoroutine = kotlin_kotlin.$_$.ta;
|
|
49
|
+
var collectionSizeOrDefault = kotlin_kotlin.$_$.e6;
|
|
48
50
|
var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.o;
|
|
49
51
|
var deserialize = kotlin_io_ktor_ktor_serialization.$_$.a;
|
|
50
52
|
var KtorSimpleLogger = kotlin_io_ktor_ktor_utils.$_$.g;
|
|
51
|
-
var PrimitiveClasses_getInstance = kotlin_kotlin.$_$.
|
|
52
|
-
var HttpStatusCode = kotlin_io_ktor_ktor_http.$_$.
|
|
53
|
+
var PrimitiveClasses_getInstance = kotlin_kotlin.$_$.z4;
|
|
54
|
+
var HttpStatusCode = kotlin_io_ktor_ktor_http.$_$.a1;
|
|
53
55
|
var getKClass = kotlin_kotlin.$_$.f;
|
|
54
|
-
var setOf = kotlin_kotlin.$_$.
|
|
56
|
+
var setOf = kotlin_kotlin.$_$.h8;
|
|
57
|
+
var KtList = kotlin_kotlin.$_$.q5;
|
|
58
|
+
var ContentType = kotlin_io_ktor_ktor_http.$_$.y;
|
|
59
|
+
var arrayOf = kotlin_kotlin.$_$.zf;
|
|
60
|
+
var createKType = kotlin_kotlin.$_$.c;
|
|
61
|
+
var createInvariantKTypeProjection = kotlin_kotlin.$_$.a;
|
|
62
|
+
var AttributeKey = kotlin_io_ktor_ktor_utils.$_$.n;
|
|
55
63
|
var createClientPlugin = kotlin_io_ktor_ktor_client_core.$_$.i;
|
|
56
|
-
var
|
|
57
|
-
var
|
|
58
|
-
var initMetadataForObject = kotlin_kotlin.$_$.pa;
|
|
64
|
+
var endsWith = kotlin_kotlin.$_$.uc;
|
|
65
|
+
var initMetadataForObject = kotlin_kotlin.$_$.xa;
|
|
59
66
|
var LinkedHashSet_init_$Create$ = kotlin_kotlin.$_$.a1;
|
|
60
67
|
//endregion
|
|
61
68
|
//region block: pre-declaration
|
|
@@ -79,40 +86,46 @@
|
|
|
79
86
|
return DefaultCommonIgnoredTypes;
|
|
80
87
|
}
|
|
81
88
|
var DefaultCommonIgnoredTypes;
|
|
89
|
+
function get_ExcludedContentTypes() {
|
|
90
|
+
_init_properties_ContentNegotiation_kt__o183go();
|
|
91
|
+
return ExcludedContentTypes;
|
|
92
|
+
}
|
|
93
|
+
var ExcludedContentTypes;
|
|
82
94
|
function get_ContentNegotiation() {
|
|
83
95
|
_init_properties_ContentNegotiation_kt__o183go();
|
|
84
96
|
return ContentNegotiation;
|
|
85
97
|
}
|
|
86
98
|
var ContentNegotiation;
|
|
87
99
|
function ConverterRegistration(converter, contentTypeToSend, contentTypeMatcher) {
|
|
88
|
-
this.
|
|
89
|
-
this.
|
|
90
|
-
this.
|
|
100
|
+
this.y4m_1 = converter;
|
|
101
|
+
this.z4m_1 = contentTypeToSend;
|
|
102
|
+
this.a4n_1 = contentTypeMatcher;
|
|
91
103
|
}
|
|
92
104
|
function defaultMatcher($this, pattern) {
|
|
93
105
|
return new ContentNegotiationConfig$defaultMatcher$1(pattern);
|
|
94
106
|
}
|
|
95
107
|
function ContentNegotiationConfig$defaultMatcher$1($pattern) {
|
|
96
|
-
this.
|
|
108
|
+
this.b4n_1 = $pattern;
|
|
97
109
|
}
|
|
98
|
-
protoOf(ContentNegotiationConfig$defaultMatcher$1).
|
|
99
|
-
return contentType.
|
|
110
|
+
protoOf(ContentNegotiationConfig$defaultMatcher$1).c4n = function (contentType) {
|
|
111
|
+
return contentType.k2n(this.b4n_1);
|
|
100
112
|
};
|
|
101
113
|
function ContentNegotiationConfig() {
|
|
102
|
-
this.
|
|
114
|
+
this.d4n_1 = toMutableSet(plus(get_DefaultIgnoredTypes(), get_DefaultCommonIgnoredTypes()));
|
|
103
115
|
var tmp = this;
|
|
104
116
|
// Inline function 'kotlin.collections.mutableListOf' call
|
|
105
|
-
tmp.
|
|
117
|
+
tmp.e4n_1 = ArrayList_init_$Create$();
|
|
118
|
+
this.f4n_1 = null;
|
|
106
119
|
}
|
|
107
|
-
protoOf(ContentNegotiationConfig).
|
|
108
|
-
var matcher = contentType.
|
|
109
|
-
this.
|
|
120
|
+
protoOf(ContentNegotiationConfig).z34 = function (contentType, converter, configuration) {
|
|
121
|
+
var matcher = contentType.k2n(Application_getInstance().q2l_1) ? JsonContentTypeMatcher_instance : defaultMatcher(this, contentType);
|
|
122
|
+
this.g4n(contentType, converter, matcher, configuration);
|
|
110
123
|
};
|
|
111
|
-
protoOf(ContentNegotiationConfig).
|
|
124
|
+
protoOf(ContentNegotiationConfig).g4n = function (contentTypeToSend, converter, contentTypeMatcher, configuration) {
|
|
112
125
|
// Inline function 'kotlin.apply' call
|
|
113
126
|
configuration(converter);
|
|
114
127
|
var registration = new ConverterRegistration(converter, contentTypeToSend, contentTypeMatcher);
|
|
115
|
-
this.
|
|
128
|
+
this.e4n_1.k(registration);
|
|
116
129
|
};
|
|
117
130
|
function ContentConverterException(message) {
|
|
118
131
|
Exception_init_$Init$(message, this);
|
|
@@ -127,53 +140,53 @@
|
|
|
127
140
|
}
|
|
128
141
|
function ContentNegotiation$lambda($this$createClientPlugin) {
|
|
129
142
|
_init_properties_ContentNegotiation_kt__o183go();
|
|
130
|
-
var registrations = $this$createClientPlugin.
|
|
131
|
-
var ignoredTypes = $this$createClientPlugin.
|
|
132
|
-
$this$createClientPlugin.
|
|
133
|
-
$this$createClientPlugin.
|
|
143
|
+
var registrations = $this$createClientPlugin.r3h_1.e4n_1;
|
|
144
|
+
var ignoredTypes = $this$createClientPlugin.r3h_1.d4n_1;
|
|
145
|
+
$this$createClientPlugin.w40(ContentNegotiation$lambda$slambda_0(registrations, $this$createClientPlugin, ignoredTypes, null));
|
|
146
|
+
$this$createClientPlugin.b3t(ContentNegotiation$lambda$slambda_2(ignoredTypes, registrations, $this$createClientPlugin, null));
|
|
134
147
|
return Unit_instance;
|
|
135
148
|
}
|
|
136
|
-
function invoke$convertRequest(registrations,
|
|
137
|
-
var tmp = new $invoke$convertRequestCOROUTINE$0(registrations,
|
|
138
|
-
tmp.
|
|
139
|
-
tmp.
|
|
140
|
-
return tmp.
|
|
149
|
+
function invoke$convertRequest(registrations, $this_createClientPlugin, ignoredTypes, request, body, $completion) {
|
|
150
|
+
var tmp = new $invoke$convertRequestCOROUTINE$0(registrations, $this_createClientPlugin, ignoredTypes, request, body, $completion);
|
|
151
|
+
tmp.i9_1 = Unit_instance;
|
|
152
|
+
tmp.j9_1 = null;
|
|
153
|
+
return tmp.o9();
|
|
141
154
|
}
|
|
142
155
|
function invoke$convertResponse(ignoredTypes, registrations, $this_createClientPlugin, requestUrl, info, body, responseContentType, charset, $completion) {
|
|
143
|
-
charset = charset === VOID ? Charsets_getInstance().
|
|
156
|
+
charset = charset === VOID ? Charsets_getInstance().c1t_1 : charset;
|
|
144
157
|
var tmp = new $invoke$convertResponseCOROUTINE$1(ignoredTypes, registrations, $this_createClientPlugin, requestUrl, info, body, responseContentType, charset, $completion);
|
|
145
|
-
tmp.
|
|
146
|
-
tmp.
|
|
147
|
-
return tmp.
|
|
158
|
+
tmp.i9_1 = Unit_instance;
|
|
159
|
+
tmp.j9_1 = null;
|
|
160
|
+
return tmp.o9();
|
|
148
161
|
}
|
|
149
|
-
function ContentNegotiation$lambda$slambda($registrations, $
|
|
150
|
-
this.
|
|
151
|
-
this.
|
|
152
|
-
this.
|
|
162
|
+
function ContentNegotiation$lambda$slambda($registrations, $this_createClientPlugin, $ignoredTypes, resultContinuation) {
|
|
163
|
+
this.e4p_1 = $registrations;
|
|
164
|
+
this.f4p_1 = $this_createClientPlugin;
|
|
165
|
+
this.g4p_1 = $ignoredTypes;
|
|
153
166
|
CoroutineImpl.call(this, resultContinuation);
|
|
154
167
|
}
|
|
155
|
-
protoOf(ContentNegotiation$lambda$slambda).
|
|
156
|
-
var tmp = this.
|
|
157
|
-
tmp.
|
|
158
|
-
tmp.
|
|
159
|
-
return tmp.
|
|
168
|
+
protoOf(ContentNegotiation$lambda$slambda).l4p = function ($this$transformRequestBody, request, body, _unused_var__etf5q3, $completion) {
|
|
169
|
+
var tmp = this.m4p($this$transformRequestBody, request, body, _unused_var__etf5q3, $completion);
|
|
170
|
+
tmp.i9_1 = Unit_instance;
|
|
171
|
+
tmp.j9_1 = null;
|
|
172
|
+
return tmp.o9();
|
|
160
173
|
};
|
|
161
|
-
protoOf(ContentNegotiation$lambda$slambda).
|
|
174
|
+
protoOf(ContentNegotiation$lambda$slambda).g3u = function (p1, p2, p3, p4, $completion) {
|
|
162
175
|
var tmp = p1 instanceof TransformRequestBodyContext ? p1 : THROW_CCE();
|
|
163
176
|
var tmp_0 = p2 instanceof HttpRequestBuilder ? p2 : THROW_CCE();
|
|
164
177
|
var tmp_1 = !(p3 == null) ? p3 : THROW_CCE();
|
|
165
|
-
return this.
|
|
178
|
+
return this.l4p(tmp, tmp_0, tmp_1, (p4 == null ? true : p4 instanceof TypeInfo) ? p4 : THROW_CCE(), $completion);
|
|
166
179
|
};
|
|
167
|
-
protoOf(ContentNegotiation$lambda$slambda).
|
|
168
|
-
var suspendResult = this.
|
|
180
|
+
protoOf(ContentNegotiation$lambda$slambda).o9 = function () {
|
|
181
|
+
var suspendResult = this.i9_1;
|
|
169
182
|
$sm: do
|
|
170
183
|
try {
|
|
171
|
-
var tmp = this.
|
|
184
|
+
var tmp = this.g9_1;
|
|
172
185
|
switch (tmp) {
|
|
173
186
|
case 0:
|
|
174
|
-
this.
|
|
175
|
-
this.
|
|
176
|
-
suspendResult = invoke$convertRequest(this.
|
|
187
|
+
this.h9_1 = 2;
|
|
188
|
+
this.g9_1 = 1;
|
|
189
|
+
suspendResult = invoke$convertRequest(this.e4p_1, this.f4p_1, this.g4p_1, this.i4p_1, this.j4p_1, this);
|
|
177
190
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
178
191
|
return suspendResult;
|
|
179
192
|
}
|
|
@@ -182,63 +195,63 @@
|
|
|
182
195
|
case 1:
|
|
183
196
|
return suspendResult;
|
|
184
197
|
case 2:
|
|
185
|
-
throw this.
|
|
198
|
+
throw this.j9_1;
|
|
186
199
|
}
|
|
187
200
|
} catch ($p) {
|
|
188
201
|
var e = $p;
|
|
189
|
-
if (this.
|
|
202
|
+
if (this.h9_1 === 2) {
|
|
190
203
|
throw e;
|
|
191
204
|
} else {
|
|
192
|
-
this.
|
|
193
|
-
this.
|
|
205
|
+
this.g9_1 = this.h9_1;
|
|
206
|
+
this.j9_1 = e;
|
|
194
207
|
}
|
|
195
208
|
}
|
|
196
209
|
while (true);
|
|
197
210
|
};
|
|
198
|
-
protoOf(ContentNegotiation$lambda$slambda).
|
|
199
|
-
var i = new ContentNegotiation$lambda$slambda(this.
|
|
200
|
-
i.
|
|
201
|
-
i.
|
|
202
|
-
i.
|
|
203
|
-
i.
|
|
211
|
+
protoOf(ContentNegotiation$lambda$slambda).m4p = function ($this$transformRequestBody, request, body, _unused_var__etf5q3, completion) {
|
|
212
|
+
var i = new ContentNegotiation$lambda$slambda(this.e4p_1, this.f4p_1, this.g4p_1, completion);
|
|
213
|
+
i.h4p_1 = $this$transformRequestBody;
|
|
214
|
+
i.i4p_1 = request;
|
|
215
|
+
i.j4p_1 = body;
|
|
216
|
+
i.k4p_1 = _unused_var__etf5q3;
|
|
204
217
|
return i;
|
|
205
218
|
};
|
|
206
|
-
function ContentNegotiation$lambda$slambda_0($registrations, $
|
|
207
|
-
var i = new ContentNegotiation$lambda$slambda($registrations, $
|
|
219
|
+
function ContentNegotiation$lambda$slambda_0($registrations, $this_createClientPlugin, $ignoredTypes, resultContinuation) {
|
|
220
|
+
var i = new ContentNegotiation$lambda$slambda($registrations, $this_createClientPlugin, $ignoredTypes, resultContinuation);
|
|
208
221
|
var l = function ($this$transformRequestBody, request, body, _unused_var__etf5q3, $completion) {
|
|
209
|
-
return i.
|
|
222
|
+
return i.l4p($this$transformRequestBody, request, body, _unused_var__etf5q3, $completion);
|
|
210
223
|
};
|
|
211
224
|
l.$arity = 4;
|
|
212
225
|
return l;
|
|
213
226
|
}
|
|
214
227
|
function ContentNegotiation$lambda$slambda_1($ignoredTypes, $registrations, $this_createClientPlugin, resultContinuation) {
|
|
215
|
-
this.
|
|
216
|
-
this.
|
|
217
|
-
this.
|
|
228
|
+
this.v4p_1 = $ignoredTypes;
|
|
229
|
+
this.w4p_1 = $registrations;
|
|
230
|
+
this.x4p_1 = $this_createClientPlugin;
|
|
218
231
|
CoroutineImpl.call(this, resultContinuation);
|
|
219
232
|
}
|
|
220
|
-
protoOf(ContentNegotiation$lambda$slambda_1).
|
|
221
|
-
var tmp = this.
|
|
222
|
-
tmp.
|
|
223
|
-
tmp.
|
|
224
|
-
return tmp.
|
|
233
|
+
protoOf(ContentNegotiation$lambda$slambda_1).e3u = function ($this$transformResponseBody, response, body, info, $completion) {
|
|
234
|
+
var tmp = this.f3u($this$transformResponseBody, response, body, info, $completion);
|
|
235
|
+
tmp.i9_1 = Unit_instance;
|
|
236
|
+
tmp.j9_1 = null;
|
|
237
|
+
return tmp.o9();
|
|
225
238
|
};
|
|
226
|
-
protoOf(ContentNegotiation$lambda$slambda_1).
|
|
239
|
+
protoOf(ContentNegotiation$lambda$slambda_1).g3u = function (p1, p2, p3, p4, $completion) {
|
|
227
240
|
var tmp = p1 instanceof TransformResponseBodyContext ? p1 : THROW_CCE();
|
|
228
241
|
var tmp_0 = p2 instanceof HttpResponse ? p2 : THROW_CCE();
|
|
229
242
|
var tmp_1 = (!(p3 == null) ? isInterface(p3, ByteReadChannel) : false) ? p3 : THROW_CCE();
|
|
230
|
-
return this.
|
|
243
|
+
return this.e3u(tmp, tmp_0, tmp_1, p4 instanceof TypeInfo ? p4 : THROW_CCE(), $completion);
|
|
231
244
|
};
|
|
232
|
-
protoOf(ContentNegotiation$lambda$slambda_1).
|
|
233
|
-
var suspendResult = this.
|
|
245
|
+
protoOf(ContentNegotiation$lambda$slambda_1).o9 = function () {
|
|
246
|
+
var suspendResult = this.i9_1;
|
|
234
247
|
$sm: do
|
|
235
248
|
try {
|
|
236
|
-
var tmp = this.
|
|
249
|
+
var tmp = this.g9_1;
|
|
237
250
|
switch (tmp) {
|
|
238
251
|
case 0:
|
|
239
|
-
this.
|
|
252
|
+
this.h9_1 = 2;
|
|
240
253
|
var tmp_0 = this;
|
|
241
|
-
var tmp0_elvis_lhs = contentType(this.
|
|
254
|
+
var tmp0_elvis_lhs = contentType(this.z4p_1);
|
|
242
255
|
var tmp_1;
|
|
243
256
|
if (tmp0_elvis_lhs == null) {
|
|
244
257
|
return null;
|
|
@@ -246,10 +259,10 @@
|
|
|
246
259
|
tmp_1 = tmp0_elvis_lhs;
|
|
247
260
|
}
|
|
248
261
|
|
|
249
|
-
tmp_0.
|
|
250
|
-
this.
|
|
251
|
-
this.
|
|
252
|
-
suspendResult = invoke$convertResponse(this.
|
|
262
|
+
tmp_0.c4q_1 = tmp_1;
|
|
263
|
+
this.d4q_1 = suitableCharset(get_request(this.z4p_1).t2r());
|
|
264
|
+
this.g9_1 = 1;
|
|
265
|
+
suspendResult = invoke$convertResponse(this.v4p_1, this.w4p_1, this.x4p_1, get_request(this.z4p_1).t3b(), this.b4q_1, this.a4q_1, this.c4q_1, this.d4q_1, this);
|
|
253
266
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
254
267
|
return suspendResult;
|
|
255
268
|
}
|
|
@@ -258,191 +271,258 @@
|
|
|
258
271
|
case 1:
|
|
259
272
|
return suspendResult;
|
|
260
273
|
case 2:
|
|
261
|
-
throw this.
|
|
274
|
+
throw this.j9_1;
|
|
262
275
|
}
|
|
263
276
|
} catch ($p) {
|
|
264
277
|
var e = $p;
|
|
265
|
-
if (this.
|
|
278
|
+
if (this.h9_1 === 2) {
|
|
266
279
|
throw e;
|
|
267
280
|
} else {
|
|
268
|
-
this.
|
|
269
|
-
this.
|
|
281
|
+
this.g9_1 = this.h9_1;
|
|
282
|
+
this.j9_1 = e;
|
|
270
283
|
}
|
|
271
284
|
}
|
|
272
285
|
while (true);
|
|
273
286
|
};
|
|
274
|
-
protoOf(ContentNegotiation$lambda$slambda_1).
|
|
275
|
-
var i = new ContentNegotiation$lambda$slambda_1(this.
|
|
276
|
-
i.
|
|
277
|
-
i.
|
|
278
|
-
i.
|
|
279
|
-
i.
|
|
287
|
+
protoOf(ContentNegotiation$lambda$slambda_1).f3u = function ($this$transformResponseBody, response, body, info, completion) {
|
|
288
|
+
var i = new ContentNegotiation$lambda$slambda_1(this.v4p_1, this.w4p_1, this.x4p_1, completion);
|
|
289
|
+
i.y4p_1 = $this$transformResponseBody;
|
|
290
|
+
i.z4p_1 = response;
|
|
291
|
+
i.a4q_1 = body;
|
|
292
|
+
i.b4q_1 = info;
|
|
280
293
|
return i;
|
|
281
294
|
};
|
|
282
295
|
function ContentNegotiation$lambda$slambda_2($ignoredTypes, $registrations, $this_createClientPlugin, resultContinuation) {
|
|
283
296
|
var i = new ContentNegotiation$lambda$slambda_1($ignoredTypes, $registrations, $this_createClientPlugin, resultContinuation);
|
|
284
297
|
var l = function ($this$transformResponseBody, response, body, info, $completion) {
|
|
285
|
-
return i.
|
|
298
|
+
return i.e3u($this$transformResponseBody, response, body, info, $completion);
|
|
286
299
|
};
|
|
287
300
|
l.$arity = 4;
|
|
288
301
|
return l;
|
|
289
302
|
}
|
|
290
303
|
function ContentNegotiation$lambda$convertRequest$lambda(it) {
|
|
291
304
|
_init_properties_ContentNegotiation_kt__o183go();
|
|
292
|
-
return toString(it.
|
|
305
|
+
return toString(it.y4m_1);
|
|
293
306
|
}
|
|
294
|
-
function $invoke$convertRequestCOROUTINE$0(registrations,
|
|
307
|
+
function $invoke$convertRequestCOROUTINE$0(registrations, $this_createClientPlugin, ignoredTypes, request, body, resultContinuation) {
|
|
295
308
|
CoroutineImpl.call(this, resultContinuation);
|
|
296
|
-
this.
|
|
297
|
-
this.
|
|
298
|
-
this.
|
|
299
|
-
this.
|
|
300
|
-
this.
|
|
309
|
+
this.p4n_1 = registrations;
|
|
310
|
+
this.q4n_1 = $this_createClientPlugin;
|
|
311
|
+
this.r4n_1 = ignoredTypes;
|
|
312
|
+
this.s4n_1 = request;
|
|
313
|
+
this.t4n_1 = body;
|
|
301
314
|
}
|
|
302
|
-
protoOf($invoke$convertRequestCOROUTINE$0).
|
|
303
|
-
var suspendResult = this.
|
|
315
|
+
protoOf($invoke$convertRequestCOROUTINE$0).o9 = function () {
|
|
316
|
+
var suspendResult = this.i9_1;
|
|
304
317
|
$sm: do
|
|
305
318
|
try {
|
|
306
|
-
var tmp = this.
|
|
319
|
+
var tmp = this.g9_1;
|
|
307
320
|
switch (tmp) {
|
|
308
321
|
case 0:
|
|
309
|
-
this.
|
|
310
|
-
var
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
322
|
+
this.h9_1 = 7;
|
|
323
|
+
var tmp_0 = this;
|
|
324
|
+
var tmp_1;
|
|
325
|
+
if (this.s4n_1.m39_1.w2e(get_ExcludedContentTypes())) {
|
|
326
|
+
var excluded = this.s4n_1.m39_1.u2e(get_ExcludedContentTypes());
|
|
327
|
+
var tmp0 = this.p4n_1;
|
|
328
|
+
var destination = ArrayList_init_$Create$();
|
|
329
|
+
var _iterator__ex2g4s = tmp0.p();
|
|
330
|
+
while (_iterator__ex2g4s.q()) {
|
|
331
|
+
var element = _iterator__ex2g4s.r();
|
|
332
|
+
var tmp$ret$0;
|
|
333
|
+
l$ret$1: do {
|
|
334
|
+
var tmp_2;
|
|
335
|
+
if (isInterface(excluded, Collection)) {
|
|
336
|
+
tmp_2 = excluded.h();
|
|
337
|
+
} else {
|
|
338
|
+
tmp_2 = false;
|
|
339
|
+
}
|
|
340
|
+
if (tmp_2) {
|
|
341
|
+
tmp$ret$0 = true;
|
|
342
|
+
break l$ret$1;
|
|
343
|
+
}
|
|
344
|
+
var _iterator__ex2g4s_0 = excluded.p();
|
|
345
|
+
while (_iterator__ex2g4s_0.q()) {
|
|
346
|
+
var element_0 = _iterator__ex2g4s_0.r();
|
|
347
|
+
if (element.z4m_1.k2n(element_0)) {
|
|
348
|
+
tmp$ret$0 = false;
|
|
349
|
+
break l$ret$1;
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
tmp$ret$0 = true;
|
|
353
|
+
}
|
|
354
|
+
while (false);
|
|
355
|
+
if (tmp$ret$0) {
|
|
356
|
+
destination.k(element);
|
|
317
357
|
}
|
|
318
|
-
accept(this.l49_1, element.t48_1);
|
|
319
358
|
}
|
|
320
|
-
|
|
359
|
+
tmp_1 = destination;
|
|
360
|
+
} else {
|
|
361
|
+
tmp_1 = this.p4n_1;
|
|
321
362
|
}
|
|
322
363
|
|
|
323
|
-
|
|
324
|
-
var
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
364
|
+
tmp_0.u4n_1 = tmp_1;
|
|
365
|
+
var tmp_3 = this;
|
|
366
|
+
var tmp0_elvis_lhs = this.s4n_1.j39_1.l2g(HttpHeaders_getInstance().q2n_1);
|
|
367
|
+
tmp_3.v4n_1 = tmp0_elvis_lhs == null ? emptyList() : tmp0_elvis_lhs;
|
|
368
|
+
var _iterator__ex2g4s_1 = this.u4n_1.p();
|
|
369
|
+
while (_iterator__ex2g4s_1.q()) {
|
|
370
|
+
var element_1 = _iterator__ex2g4s_1.r();
|
|
371
|
+
var tmp0_0 = this.v4n_1;
|
|
329
372
|
var tmp$ret$2;
|
|
330
373
|
l$ret$3: do {
|
|
331
|
-
var
|
|
332
|
-
if (isInterface(
|
|
333
|
-
|
|
374
|
+
var tmp_4;
|
|
375
|
+
if (isInterface(tmp0_0, Collection)) {
|
|
376
|
+
tmp_4 = tmp0_0.h();
|
|
334
377
|
} else {
|
|
335
|
-
|
|
378
|
+
tmp_4 = false;
|
|
336
379
|
}
|
|
337
|
-
if (
|
|
338
|
-
tmp$ret$2 =
|
|
380
|
+
if (tmp_4) {
|
|
381
|
+
tmp$ret$2 = true;
|
|
339
382
|
break l$ret$3;
|
|
340
383
|
}
|
|
341
|
-
var
|
|
342
|
-
while (
|
|
343
|
-
var
|
|
344
|
-
if (
|
|
345
|
-
tmp$ret$2 =
|
|
384
|
+
var _iterator__ex2g4s_2 = tmp0_0.p();
|
|
385
|
+
while (_iterator__ex2g4s_2.q()) {
|
|
386
|
+
var element_2 = _iterator__ex2g4s_2.r();
|
|
387
|
+
if (Companion_getInstance().rl(element_2).k2n(element_1.z4m_1)) {
|
|
388
|
+
tmp$ret$2 = false;
|
|
346
389
|
break l$ret$3;
|
|
347
390
|
}
|
|
348
391
|
}
|
|
349
|
-
tmp$ret$2 =
|
|
392
|
+
tmp$ret$2 = true;
|
|
393
|
+
}
|
|
394
|
+
while (false);
|
|
395
|
+
if (tmp$ret$2) {
|
|
396
|
+
var qValue = this.q4n_1.r3h_1.f4n_1;
|
|
397
|
+
var contentTypeToSend = qValue == null ? element_1.z4m_1 : element_1.z4m_1.i2n('q', qValue.toString());
|
|
398
|
+
get_LOGGER().c2l('Adding Accept=' + contentTypeToSend.toString() + ' header for ' + this.s4n_1.h39_1.toString());
|
|
399
|
+
accept(this.s4n_1, contentTypeToSend);
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
var tmp_5;
|
|
404
|
+
var tmp_6 = this.t4n_1;
|
|
405
|
+
if (tmp_6 instanceof OutgoingContent) {
|
|
406
|
+
tmp_5 = true;
|
|
407
|
+
} else {
|
|
408
|
+
var tmp5 = this.r4n_1;
|
|
409
|
+
var tmp$ret$4;
|
|
410
|
+
l$ret$5: do {
|
|
411
|
+
var tmp_7;
|
|
412
|
+
if (isInterface(tmp5, Collection)) {
|
|
413
|
+
tmp_7 = tmp5.h();
|
|
414
|
+
} else {
|
|
415
|
+
tmp_7 = false;
|
|
416
|
+
}
|
|
417
|
+
if (tmp_7) {
|
|
418
|
+
tmp$ret$4 = false;
|
|
419
|
+
break l$ret$5;
|
|
420
|
+
}
|
|
421
|
+
var _iterator__ex2g4s_3 = tmp5.p();
|
|
422
|
+
while (_iterator__ex2g4s_3.q()) {
|
|
423
|
+
var element_3 = _iterator__ex2g4s_3.r();
|
|
424
|
+
if (element_3.lb(this.t4n_1)) {
|
|
425
|
+
tmp$ret$4 = true;
|
|
426
|
+
break l$ret$5;
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
tmp$ret$4 = false;
|
|
350
430
|
}
|
|
351
431
|
while (false);
|
|
352
|
-
|
|
432
|
+
tmp_5 = tmp$ret$4;
|
|
353
433
|
}
|
|
354
434
|
|
|
355
|
-
if (
|
|
356
|
-
get_LOGGER().
|
|
435
|
+
if (tmp_5) {
|
|
436
|
+
get_LOGGER().c2l('Body type ' + toString(getKClassFromExpression(this.t4n_1)) + ' is in ignored types. ' + ('Skipping ContentNegotiation for ' + this.s4n_1.h39_1.toString() + '.'));
|
|
357
437
|
return null;
|
|
358
438
|
}
|
|
359
439
|
|
|
360
|
-
var
|
|
361
|
-
var
|
|
362
|
-
var
|
|
363
|
-
if (
|
|
364
|
-
this.
|
|
365
|
-
get_LOGGER().
|
|
440
|
+
var tmp_8 = this;
|
|
441
|
+
var tmp0_elvis_lhs_0 = contentType_0(this.s4n_1);
|
|
442
|
+
var tmp_9;
|
|
443
|
+
if (tmp0_elvis_lhs_0 == null) {
|
|
444
|
+
this.q4n_1;
|
|
445
|
+
get_LOGGER().c2l("Request doesn't have Content-Type header. Skipping ContentNegotiation for " + this.s4n_1.h39_1.toString() + '.');
|
|
366
446
|
return null;
|
|
367
447
|
} else {
|
|
368
|
-
|
|
448
|
+
tmp_9 = tmp0_elvis_lhs_0;
|
|
369
449
|
}
|
|
370
450
|
|
|
371
|
-
|
|
372
|
-
var
|
|
373
|
-
if (
|
|
374
|
-
get_LOGGER().
|
|
375
|
-
this.
|
|
451
|
+
tmp_8.w4n_1 = tmp_9;
|
|
452
|
+
var tmp_10 = this.t4n_1;
|
|
453
|
+
if (tmp_10 instanceof Unit) {
|
|
454
|
+
get_LOGGER().c2l('Sending empty body for ' + this.s4n_1.h39_1.toString());
|
|
455
|
+
this.s4n_1.j39_1.z2g(HttpHeaders_getInstance().i2o_1);
|
|
376
456
|
return EmptyContent_getInstance();
|
|
377
457
|
}
|
|
378
458
|
|
|
379
|
-
var
|
|
380
|
-
var
|
|
381
|
-
var
|
|
382
|
-
var
|
|
383
|
-
while (
|
|
384
|
-
var
|
|
385
|
-
if (
|
|
386
|
-
|
|
459
|
+
var tmp_11 = this;
|
|
460
|
+
var tmp0_1 = this.p4n_1;
|
|
461
|
+
var destination_0 = ArrayList_init_$Create$();
|
|
462
|
+
var _iterator__ex2g4s_4 = tmp0_1.p();
|
|
463
|
+
while (_iterator__ex2g4s_4.q()) {
|
|
464
|
+
var element_4 = _iterator__ex2g4s_4.r();
|
|
465
|
+
if (element_4.a4n_1.c4n(this.w4n_1)) {
|
|
466
|
+
destination_0.k(element_4);
|
|
387
467
|
}
|
|
388
468
|
}
|
|
389
469
|
|
|
390
|
-
var
|
|
391
|
-
if (!
|
|
392
|
-
|
|
470
|
+
var tmp_12;
|
|
471
|
+
if (!destination_0.h()) {
|
|
472
|
+
tmp_12 = destination_0;
|
|
393
473
|
} else {
|
|
394
|
-
|
|
474
|
+
tmp_12 = null;
|
|
395
475
|
}
|
|
396
476
|
|
|
397
|
-
var tmp1_elvis_lhs =
|
|
398
|
-
var
|
|
477
|
+
var tmp1_elvis_lhs = tmp_12;
|
|
478
|
+
var tmp_13;
|
|
399
479
|
if (tmp1_elvis_lhs == null) {
|
|
400
|
-
this.
|
|
401
|
-
get_LOGGER().
|
|
480
|
+
this.q4n_1;
|
|
481
|
+
get_LOGGER().c2l('None of the registered converters match request Content-Type=' + this.w4n_1.toString() + '. ' + ('Skipping ContentNegotiation for ' + this.s4n_1.h39_1.toString() + '.'));
|
|
402
482
|
return null;
|
|
403
483
|
} else {
|
|
404
|
-
|
|
484
|
+
tmp_13 = tmp1_elvis_lhs;
|
|
405
485
|
}
|
|
406
486
|
|
|
407
|
-
|
|
408
|
-
if (this.
|
|
409
|
-
get_LOGGER().
|
|
487
|
+
tmp_11.x4n_1 = tmp_13;
|
|
488
|
+
if (this.s4n_1.f43() == null) {
|
|
489
|
+
get_LOGGER().c2l('Request has unknown body type. Skipping ContentNegotiation for ' + this.s4n_1.h39_1.toString() + '.');
|
|
410
490
|
return null;
|
|
411
491
|
}
|
|
412
492
|
|
|
413
|
-
this.
|
|
414
|
-
var
|
|
415
|
-
|
|
416
|
-
this.
|
|
493
|
+
this.s4n_1.j39_1.z2g(HttpHeaders_getInstance().i2o_1);
|
|
494
|
+
var tmp_14 = this;
|
|
495
|
+
tmp_14.y4n_1 = this.x4n_1;
|
|
496
|
+
this.g9_1 = 1;
|
|
417
497
|
continue $sm;
|
|
418
498
|
case 1:
|
|
419
|
-
this.
|
|
420
|
-
this.
|
|
421
|
-
this.
|
|
499
|
+
this.a4o_1 = this.y4n_1;
|
|
500
|
+
this.b4o_1 = this.a4o_1.p();
|
|
501
|
+
this.g9_1 = 2;
|
|
422
502
|
continue $sm;
|
|
423
503
|
case 2:
|
|
424
|
-
if (!this.
|
|
425
|
-
this.
|
|
504
|
+
if (!this.b4o_1.q()) {
|
|
505
|
+
this.g9_1 = 5;
|
|
426
506
|
continue $sm;
|
|
427
507
|
}
|
|
428
508
|
|
|
429
|
-
this.
|
|
430
|
-
var
|
|
431
|
-
|
|
432
|
-
this.
|
|
433
|
-
this.
|
|
434
|
-
var
|
|
435
|
-
var
|
|
436
|
-
var
|
|
437
|
-
var this_0 = this.
|
|
438
|
-
var
|
|
509
|
+
this.c4o_1 = this.b4o_1.r();
|
|
510
|
+
var tmp_15 = this;
|
|
511
|
+
tmp_15.d4o_1 = this.c4o_1;
|
|
512
|
+
this.e4o_1 = this.d4o_1;
|
|
513
|
+
this.g9_1 = 3;
|
|
514
|
+
var tmp0_elvis_lhs_1 = charset(this.w4n_1);
|
|
515
|
+
var tmp_16 = tmp0_elvis_lhs_1 == null ? Charsets_getInstance().c1t_1 : tmp0_elvis_lhs_1;
|
|
516
|
+
var tmp_17 = ensureNotNull(this.s4n_1.f43());
|
|
517
|
+
var this_0 = this.t4n_1;
|
|
518
|
+
var tmp_18;
|
|
439
519
|
if (!equals(this_0, NullBody_instance)) {
|
|
440
|
-
|
|
520
|
+
tmp_18 = this_0;
|
|
441
521
|
} else {
|
|
442
|
-
|
|
522
|
+
tmp_18 = null;
|
|
443
523
|
}
|
|
444
524
|
|
|
445
|
-
suspendResult = this.
|
|
525
|
+
suspendResult = this.e4o_1.y4m_1.e4q(this.w4n_1, tmp_16, tmp_17, tmp_18, this);
|
|
446
526
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
447
527
|
return suspendResult;
|
|
448
528
|
}
|
|
@@ -451,94 +531,94 @@
|
|
|
451
531
|
case 3:
|
|
452
532
|
var result = suspendResult;
|
|
453
533
|
if (!(result == null)) {
|
|
454
|
-
get_LOGGER().
|
|
534
|
+
get_LOGGER().c2l('Converted request body using ' + toString(this.e4o_1.y4m_1) + ' for ' + this.s4n_1.h39_1.toString());
|
|
455
535
|
}
|
|
456
536
|
|
|
457
537
|
var result_0 = result;
|
|
458
538
|
if (!(result_0 == null)) {
|
|
459
|
-
this.
|
|
460
|
-
this.
|
|
539
|
+
this.z4n_1 = result_0;
|
|
540
|
+
this.g9_1 = 6;
|
|
461
541
|
continue $sm;
|
|
462
542
|
} else {
|
|
463
|
-
this.
|
|
543
|
+
this.g9_1 = 4;
|
|
464
544
|
continue $sm;
|
|
465
545
|
}
|
|
466
546
|
|
|
467
547
|
case 4:
|
|
468
|
-
this.
|
|
548
|
+
this.g9_1 = 2;
|
|
469
549
|
continue $sm;
|
|
470
550
|
case 5:
|
|
471
|
-
this.
|
|
551
|
+
this.z4n_1 = null;
|
|
472
552
|
if (false) {
|
|
473
|
-
this.
|
|
553
|
+
this.g9_1 = 1;
|
|
474
554
|
continue $sm;
|
|
475
555
|
}
|
|
476
556
|
|
|
477
|
-
this.
|
|
557
|
+
this.g9_1 = 6;
|
|
478
558
|
continue $sm;
|
|
479
559
|
case 6:
|
|
480
|
-
var tmp2_elvis_lhs = this.
|
|
481
|
-
var
|
|
560
|
+
var tmp2_elvis_lhs = this.z4n_1;
|
|
561
|
+
var tmp_19;
|
|
482
562
|
if (tmp2_elvis_lhs == null) {
|
|
483
|
-
var
|
|
484
|
-
throw new ContentConverterException(
|
|
563
|
+
var tmp_20 = "Can't convert " + toString(this.t4n_1) + ' with contentType ' + this.w4n_1.toString() + ' using converters ';
|
|
564
|
+
throw new ContentConverterException(tmp_20 + joinToString(this.x4n_1, VOID, VOID, VOID, VOID, VOID, ContentNegotiation$lambda$convertRequest$lambda));
|
|
485
565
|
} else {
|
|
486
|
-
|
|
566
|
+
tmp_19 = tmp2_elvis_lhs;
|
|
487
567
|
}
|
|
488
568
|
|
|
489
|
-
var serializedContent =
|
|
569
|
+
var serializedContent = tmp_19;
|
|
490
570
|
return serializedContent;
|
|
491
571
|
case 7:
|
|
492
|
-
throw this.
|
|
572
|
+
throw this.j9_1;
|
|
493
573
|
}
|
|
494
574
|
} catch ($p) {
|
|
495
575
|
var e = $p;
|
|
496
|
-
if (this.
|
|
576
|
+
if (this.h9_1 === 7) {
|
|
497
577
|
throw e;
|
|
498
578
|
} else {
|
|
499
|
-
this.
|
|
500
|
-
this.
|
|
579
|
+
this.g9_1 = this.h9_1;
|
|
580
|
+
this.j9_1 = e;
|
|
501
581
|
}
|
|
502
582
|
}
|
|
503
583
|
while (true);
|
|
504
584
|
};
|
|
505
585
|
function $invoke$convertResponseCOROUTINE$1(ignoredTypes, registrations, $this_createClientPlugin, requestUrl, info, body, responseContentType, charset, resultContinuation) {
|
|
506
586
|
CoroutineImpl.call(this, resultContinuation);
|
|
507
|
-
this.
|
|
508
|
-
this.
|
|
509
|
-
this.
|
|
510
|
-
this.
|
|
511
|
-
this.
|
|
512
|
-
this.
|
|
513
|
-
this.
|
|
514
|
-
this.
|
|
587
|
+
this.n4o_1 = ignoredTypes;
|
|
588
|
+
this.o4o_1 = registrations;
|
|
589
|
+
this.p4o_1 = $this_createClientPlugin;
|
|
590
|
+
this.q4o_1 = requestUrl;
|
|
591
|
+
this.r4o_1 = info;
|
|
592
|
+
this.s4o_1 = body;
|
|
593
|
+
this.t4o_1 = responseContentType;
|
|
594
|
+
this.u4o_1 = charset;
|
|
515
595
|
}
|
|
516
|
-
protoOf($invoke$convertResponseCOROUTINE$1).
|
|
517
|
-
var suspendResult = this.
|
|
596
|
+
protoOf($invoke$convertResponseCOROUTINE$1).o9 = function () {
|
|
597
|
+
var suspendResult = this.i9_1;
|
|
518
598
|
$sm: do
|
|
519
599
|
try {
|
|
520
|
-
var tmp = this.
|
|
600
|
+
var tmp = this.g9_1;
|
|
521
601
|
switch (tmp) {
|
|
522
602
|
case 0:
|
|
523
|
-
this.
|
|
524
|
-
var tmp_0 = this.
|
|
603
|
+
this.h9_1 = 2;
|
|
604
|
+
var tmp_0 = this.s4o_1;
|
|
525
605
|
if (!isInterface(tmp_0, ByteReadChannel)) {
|
|
526
|
-
get_LOGGER().
|
|
606
|
+
get_LOGGER().c2l('Response body is already transformed. Skipping ContentNegotiation for ' + this.q4o_1.toString() + '.');
|
|
527
607
|
return null;
|
|
528
608
|
}
|
|
529
609
|
|
|
530
|
-
if (this.
|
|
531
|
-
get_LOGGER().
|
|
610
|
+
if (this.n4o_1.x1(this.r4o_1.q2k_1)) {
|
|
611
|
+
get_LOGGER().c2l('Response body type ' + toString(this.r4o_1.q2k_1) + ' is in ignored types. ' + ('Skipping ContentNegotiation for ' + this.q4o_1.toString() + '.'));
|
|
532
612
|
return null;
|
|
533
613
|
}
|
|
534
614
|
|
|
535
615
|
var tmp_1 = this;
|
|
536
|
-
var tmp0 = this.
|
|
616
|
+
var tmp0 = this.o4o_1;
|
|
537
617
|
var destination = ArrayList_init_$Create$();
|
|
538
618
|
var _iterator__ex2g4s = tmp0.p();
|
|
539
619
|
while (_iterator__ex2g4s.q()) {
|
|
540
620
|
var element = _iterator__ex2g4s.r();
|
|
541
|
-
if (element.
|
|
621
|
+
if (element.a4n_1.c4n(this.t4o_1)) {
|
|
542
622
|
destination.k(element);
|
|
543
623
|
}
|
|
544
624
|
}
|
|
@@ -547,7 +627,7 @@
|
|
|
547
627
|
var _iterator__ex2g4s_0 = destination.p();
|
|
548
628
|
while (_iterator__ex2g4s_0.q()) {
|
|
549
629
|
var item = _iterator__ex2g4s_0.r();
|
|
550
|
-
destination_0.k(item.
|
|
630
|
+
destination_0.k(item.y4m_1);
|
|
551
631
|
}
|
|
552
632
|
|
|
553
633
|
var tmp_2;
|
|
@@ -560,16 +640,16 @@
|
|
|
560
640
|
var tmp0_elvis_lhs = tmp_2;
|
|
561
641
|
var tmp_3;
|
|
562
642
|
if (tmp0_elvis_lhs == null) {
|
|
563
|
-
this.
|
|
564
|
-
get_LOGGER().
|
|
643
|
+
this.p4o_1;
|
|
644
|
+
get_LOGGER().c2l('None of the registered converters match response with Content-Type=' + this.t4o_1.toString() + '. ' + ('Skipping ContentNegotiation for ' + this.q4o_1.toString() + '.'));
|
|
565
645
|
return null;
|
|
566
646
|
} else {
|
|
567
647
|
tmp_3 = tmp0_elvis_lhs;
|
|
568
648
|
}
|
|
569
649
|
|
|
570
|
-
tmp_1.
|
|
571
|
-
this.
|
|
572
|
-
suspendResult = deserialize(this.
|
|
650
|
+
tmp_1.v4o_1 = tmp_3;
|
|
651
|
+
this.g9_1 = 1;
|
|
652
|
+
suspendResult = deserialize(this.v4o_1, this.s4o_1, this.r4o_1, this.u4o_1, this);
|
|
573
653
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
574
654
|
return suspendResult;
|
|
575
655
|
}
|
|
@@ -578,20 +658,20 @@
|
|
|
578
658
|
case 1:
|
|
579
659
|
var result = suspendResult;
|
|
580
660
|
if (!isInterface(result, ByteReadChannel)) {
|
|
581
|
-
get_LOGGER().
|
|
661
|
+
get_LOGGER().c2l('Response body was converted to ' + toString(getKClassFromExpression(result)) + ' for ' + this.q4o_1.toString() + '.');
|
|
582
662
|
}
|
|
583
663
|
|
|
584
664
|
return result;
|
|
585
665
|
case 2:
|
|
586
|
-
throw this.
|
|
666
|
+
throw this.j9_1;
|
|
587
667
|
}
|
|
588
668
|
} catch ($p) {
|
|
589
669
|
var e = $p;
|
|
590
|
-
if (this.
|
|
670
|
+
if (this.h9_1 === 2) {
|
|
591
671
|
throw e;
|
|
592
672
|
} else {
|
|
593
|
-
this.
|
|
594
|
-
this.
|
|
673
|
+
this.g9_1 = this.h9_1;
|
|
674
|
+
this.j9_1 = e;
|
|
595
675
|
}
|
|
596
676
|
}
|
|
597
677
|
while (true);
|
|
@@ -601,19 +681,40 @@
|
|
|
601
681
|
if (!properties_initialized_ContentNegotiation_kt_1ayduy) {
|
|
602
682
|
properties_initialized_ContentNegotiation_kt_1ayduy = true;
|
|
603
683
|
LOGGER = KtorSimpleLogger('io.ktor.client.plugins.contentnegotiation.ContentNegotiation');
|
|
604
|
-
DefaultCommonIgnoredTypes = setOf([PrimitiveClasses_getInstance().
|
|
605
|
-
|
|
606
|
-
|
|
684
|
+
DefaultCommonIgnoredTypes = setOf([PrimitiveClasses_getInstance().uc(), PrimitiveClasses_getInstance().qc(), getKClass(HttpStatusCode), getKClass(ByteReadChannel), getKClass(OutgoingContent)]);
|
|
685
|
+
// Inline function 'io.ktor.util.AttributeKey' call
|
|
686
|
+
var name = 'ExcludedContentTypesAttr';
|
|
687
|
+
// Inline function 'io.ktor.util.reflect.typeInfo' call
|
|
688
|
+
var tmp = getKClass(KtList);
|
|
689
|
+
// Inline function 'io.ktor.util.reflect.typeOfOrNull' call
|
|
690
|
+
var tmp_0;
|
|
691
|
+
try {
|
|
692
|
+
tmp_0 = createKType(getKClass(KtList), arrayOf([createInvariantKTypeProjection(createKType(getKClass(ContentType), arrayOf([]), false))]), false);
|
|
693
|
+
} catch ($p) {
|
|
694
|
+
var tmp_1;
|
|
695
|
+
if ($p instanceof Error) {
|
|
696
|
+
var _unused_var__etf5q3 = $p;
|
|
697
|
+
tmp_1 = null;
|
|
698
|
+
} else {
|
|
699
|
+
throw $p;
|
|
700
|
+
}
|
|
701
|
+
tmp_0 = tmp_1;
|
|
702
|
+
}
|
|
703
|
+
var tmp$ret$0 = tmp_0;
|
|
704
|
+
var tmp$ret$1 = new TypeInfo(tmp, tmp$ret$0);
|
|
705
|
+
ExcludedContentTypes = new AttributeKey(name, tmp$ret$1);
|
|
706
|
+
var tmp_2 = ContentNegotiationConfig$_init_$ref_1ne3ob();
|
|
707
|
+
ContentNegotiation = createClientPlugin('ContentNegotiation', tmp_2, ContentNegotiation$lambda);
|
|
607
708
|
}
|
|
608
709
|
}
|
|
609
710
|
function JsonContentTypeMatcher() {
|
|
610
711
|
}
|
|
611
|
-
protoOf(JsonContentTypeMatcher).
|
|
612
|
-
if (contentType.
|
|
712
|
+
protoOf(JsonContentTypeMatcher).c4n = function (contentType) {
|
|
713
|
+
if (contentType.k2n(Application_getInstance().q2l_1)) {
|
|
613
714
|
return true;
|
|
614
715
|
}
|
|
615
|
-
var value = contentType.
|
|
616
|
-
return
|
|
716
|
+
var value = contentType.j2n().toString();
|
|
717
|
+
return Application_getInstance().k2m(value) && endsWith(value, '+json', true);
|
|
617
718
|
};
|
|
618
719
|
var JsonContentTypeMatcher_instance;
|
|
619
720
|
function JsonContentTypeMatcher_getInstance() {
|
|
@@ -633,7 +734,7 @@
|
|
|
633
734
|
}
|
|
634
735
|
}
|
|
635
736
|
//region block: post-declaration
|
|
636
|
-
protoOf(ContentNegotiationConfig).
|
|
737
|
+
protoOf(ContentNegotiationConfig).a35 = register$default;
|
|
637
738
|
//endregion
|
|
638
739
|
//region block: init
|
|
639
740
|
JsonContentTypeMatcher_instance = new JsonContentTypeMatcher();
|