@solibo/home-api 1.1.9 → 1.1.10

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 (113) hide show
  1. package/Kotlin-DateTime-library-kotlinx-datetime.mjs +3601 -0
  2. package/Kotlin-DateTime-library-kotlinx-datetime.mjs.map +1 -0
  3. package/MultiplatformSettings-multiplatform-settings-no-arg.mjs +4 -0
  4. package/{MultiplatformSettings-multiplatform-settings.js.map → MultiplatformSettings-multiplatform-settings-no-arg.mjs.map} +1 -1
  5. package/MultiplatformSettings-multiplatform-settings.mjs +4 -0
  6. package/{kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.js.map → MultiplatformSettings-multiplatform-settings.mjs.map} +1 -1
  7. package/kotlin-kotlin-stdlib.mjs +17369 -0
  8. package/kotlin-kotlin-stdlib.mjs.map +1 -0
  9. package/kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.mjs +4 -0
  10. package/{kotlinx-serialization-kotlinx-serialization-json-io.js.map → kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.mjs.map} +1 -1
  11. package/kotlinx-atomicfu.mjs +250 -0
  12. package/kotlinx-atomicfu.mjs.map +1 -0
  13. package/kotlinx-browser.mjs +8 -0
  14. package/{kotlinx-browser.js.map → kotlinx-browser.mjs.map} +1 -1
  15. package/kotlinx-coroutines-core.mjs +8888 -0
  16. package/kotlinx-coroutines-core.mjs.map +1 -0
  17. package/kotlinx-io-kotlinx-io-bytestring.mjs +202 -0
  18. package/kotlinx-io-kotlinx-io-bytestring.mjs.map +1 -0
  19. package/kotlinx-io-kotlinx-io-core.mjs +2020 -0
  20. package/kotlinx-io-kotlinx-io-core.mjs.map +1 -0
  21. package/kotlinx-serialization-kotlinx-serialization-core.mjs +6045 -0
  22. package/kotlinx-serialization-kotlinx-serialization-core.mjs.map +1 -0
  23. package/kotlinx-serialization-kotlinx-serialization-json-io.mjs +4 -0
  24. package/{MultiplatformSettings-multiplatform-settings-no-arg.js.map → kotlinx-serialization-kotlinx-serialization-json-io.mjs.map} +1 -1
  25. package/kotlinx-serialization-kotlinx-serialization-json.mjs +5061 -0
  26. package/kotlinx-serialization-kotlinx-serialization-json.mjs.map +1 -0
  27. package/ktor-ktor-client-auth.mjs +4 -0
  28. package/ktor-ktor-client-auth.mjs.map +1 -0
  29. package/ktor-ktor-client-content-negotiation.mjs +750 -0
  30. package/ktor-ktor-client-content-negotiation.mjs.map +1 -0
  31. package/ktor-ktor-client-core.mjs +9810 -0
  32. package/ktor-ktor-client-core.mjs.map +1 -0
  33. package/ktor-ktor-client-logging.mjs +4 -0
  34. package/ktor-ktor-client-logging.mjs.map +1 -0
  35. package/ktor-ktor-events.mjs +81 -0
  36. package/ktor-ktor-events.mjs.map +1 -0
  37. package/ktor-ktor-http-cio.mjs +2254 -0
  38. package/ktor-ktor-http-cio.mjs.map +1 -0
  39. package/ktor-ktor-http.mjs +3238 -0
  40. package/ktor-ktor-http.mjs.map +1 -0
  41. package/ktor-ktor-io.mjs +3536 -0
  42. package/ktor-ktor-io.mjs.map +1 -0
  43. package/ktor-ktor-serialization-kotlinx-json.mjs +46 -0
  44. package/{ktor-ktor-serialization-kotlinx-json.js.map → ktor-ktor-serialization-kotlinx-json.mjs.map} +1 -1
  45. package/ktor-ktor-serialization-kotlinx.mjs +843 -0
  46. package/ktor-ktor-serialization-kotlinx.mjs.map +1 -0
  47. package/ktor-ktor-serialization.mjs +364 -0
  48. package/ktor-ktor-serialization.mjs.map +1 -0
  49. package/ktor-ktor-sse.mjs +4 -0
  50. package/ktor-ktor-sse.mjs.map +1 -0
  51. package/ktor-ktor-utils.mjs +2620 -0
  52. package/ktor-ktor-utils.mjs.map +1 -0
  53. package/ktor-ktor-websocket-serialization.mjs +4 -0
  54. package/ktor-ktor-websocket-serialization.mjs.map +1 -0
  55. package/ktor-ktor-websockets.mjs +2535 -0
  56. package/ktor-ktor-websockets.mjs.map +1 -0
  57. package/package.json +2 -3
  58. package/solibo-sdk-sdk-home-api.d.mts +13419 -0
  59. package/solibo-sdk-sdk-home-api.mjs +199394 -0
  60. package/solibo-sdk-sdk-home-api.mjs.map +1 -0
  61. package/Kotlin-DateTime-library-kotlinx-datetime.js +0 -3614
  62. package/Kotlin-DateTime-library-kotlinx-datetime.js.map +0 -1
  63. package/MultiplatformSettings-multiplatform-settings-no-arg.js +0 -15
  64. package/MultiplatformSettings-multiplatform-settings.js +0 -15
  65. package/kotlin-kotlin-stdlib.js +0 -17392
  66. package/kotlin-kotlin-stdlib.js.map +0 -1
  67. package/kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.js +0 -15
  68. package/kotlinx-atomicfu.js +0 -262
  69. package/kotlinx-atomicfu.js.map +0 -1
  70. package/kotlinx-browser.js +0 -19
  71. package/kotlinx-coroutines-core.js +0 -8901
  72. package/kotlinx-coroutines-core.js.map +0 -1
  73. package/kotlinx-io-kotlinx-io-bytestring.js +0 -214
  74. package/kotlinx-io-kotlinx-io-bytestring.js.map +0 -1
  75. package/kotlinx-io-kotlinx-io-core.js +0 -2035
  76. package/kotlinx-io-kotlinx-io-core.js.map +0 -1
  77. package/kotlinx-serialization-kotlinx-serialization-core.js +0 -6057
  78. package/kotlinx-serialization-kotlinx-serialization-core.js.map +0 -1
  79. package/kotlinx-serialization-kotlinx-serialization-json-io.js +0 -15
  80. package/kotlinx-serialization-kotlinx-serialization-json.js +0 -5074
  81. package/kotlinx-serialization-kotlinx-serialization-json.js.map +0 -1
  82. package/ktor-ktor-client-auth.js +0 -15
  83. package/ktor-ktor-client-auth.js.map +0 -1
  84. package/ktor-ktor-client-content-negotiation.js +0 -767
  85. package/ktor-ktor-client-content-negotiation.js.map +0 -1
  86. package/ktor-ktor-client-core.js +0 -9839
  87. package/ktor-ktor-client-core.js.map +0 -1
  88. package/ktor-ktor-client-logging.js +0 -15
  89. package/ktor-ktor-client-logging.js.map +0 -1
  90. package/ktor-ktor-events.js +0 -94
  91. package/ktor-ktor-events.js.map +0 -1
  92. package/ktor-ktor-http-cio.js +0 -2271
  93. package/ktor-ktor-http-cio.js.map +0 -1
  94. package/ktor-ktor-http.js +0 -3253
  95. package/ktor-ktor-http.js.map +0 -1
  96. package/ktor-ktor-io.js +0 -3556
  97. package/ktor-ktor-io.js.map +0 -1
  98. package/ktor-ktor-serialization-kotlinx-json.js +0 -67
  99. package/ktor-ktor-serialization-kotlinx.js +0 -865
  100. package/ktor-ktor-serialization-kotlinx.js.map +0 -1
  101. package/ktor-ktor-serialization.js +0 -379
  102. package/ktor-ktor-serialization.js.map +0 -1
  103. package/ktor-ktor-sse.js +0 -15
  104. package/ktor-ktor-sse.js.map +0 -1
  105. package/ktor-ktor-utils.js +0 -2639
  106. package/ktor-ktor-utils.js.map +0 -1
  107. package/ktor-ktor-websocket-serialization.js +0 -15
  108. package/ktor-ktor-websocket-serialization.js.map +0 -1
  109. package/ktor-ktor-websockets.js +0 -2552
  110. package/ktor-ktor-websockets.js.map +0 -1
  111. package/solibo-sdk-sdk-home-api.d.ts +0 -12624
  112. package/solibo-sdk-sdk-home-api.js +0 -203510
  113. package/solibo-sdk-sdk-home-api.js.map +0 -1
@@ -1,767 +0,0 @@
1
- (function (factory) {
2
- if (typeof define === 'function' && define.amd)
3
- define(['exports', './kotlin-kotlin-stdlib.js', './ktor-ktor-http.js', './ktor-ktor-serialization.js', './ktor-ktor-io.js', './ktor-ktor-client-core.js', './ktor-ktor-utils.js'], factory);
4
- else if (typeof exports === 'object')
5
- factory(module.exports, require('./kotlin-kotlin-stdlib.js'), require('./ktor-ktor-http.js'), require('./ktor-ktor-serialization.js'), require('./ktor-ktor-io.js'), require('./ktor-ktor-client-core.js'), require('./ktor-ktor-utils.js'));
6
- else {
7
- if (typeof globalThis['kotlin-kotlin-stdlib'] === 'undefined') {
8
- throw new Error("Error loading module 'ktor-ktor-client-content-negotiation'. Its dependency 'kotlin-kotlin-stdlib' was not found. Please, check whether 'kotlin-kotlin-stdlib' is loaded prior to 'ktor-ktor-client-content-negotiation'.");
9
- }
10
- if (typeof globalThis['ktor-ktor-http'] === 'undefined') {
11
- throw new Error("Error loading module 'ktor-ktor-client-content-negotiation'. Its dependency 'ktor-ktor-http' was not found. Please, check whether 'ktor-ktor-http' is loaded prior to 'ktor-ktor-client-content-negotiation'.");
12
- }
13
- if (typeof globalThis['ktor-ktor-serialization'] === 'undefined') {
14
- throw new Error("Error loading module 'ktor-ktor-client-content-negotiation'. Its dependency 'ktor-ktor-serialization' was not found. Please, check whether 'ktor-ktor-serialization' is loaded prior to 'ktor-ktor-client-content-negotiation'.");
15
- }
16
- if (typeof globalThis['ktor-ktor-io'] === 'undefined') {
17
- throw new Error("Error loading module 'ktor-ktor-client-content-negotiation'. Its dependency 'ktor-ktor-io' was not found. Please, check whether 'ktor-ktor-io' is loaded prior to 'ktor-ktor-client-content-negotiation'.");
18
- }
19
- if (typeof globalThis['ktor-ktor-client-core'] === 'undefined') {
20
- throw new Error("Error loading module 'ktor-ktor-client-content-negotiation'. Its dependency 'ktor-ktor-client-core' was not found. Please, check whether 'ktor-ktor-client-core' is loaded prior to 'ktor-ktor-client-content-negotiation'.");
21
- }
22
- if (typeof globalThis['ktor-ktor-utils'] === 'undefined') {
23
- throw new Error("Error loading module 'ktor-ktor-client-content-negotiation'. Its dependency 'ktor-ktor-utils' was not found. Please, check whether 'ktor-ktor-utils' is loaded prior to 'ktor-ktor-client-content-negotiation'.");
24
- }
25
- globalThis['ktor-ktor-client-content-negotiation'] = factory(typeof globalThis['ktor-ktor-client-content-negotiation'] === 'undefined' ? {} : globalThis['ktor-ktor-client-content-negotiation'], globalThis['kotlin-kotlin-stdlib'], globalThis['ktor-ktor-http'], globalThis['ktor-ktor-serialization'], globalThis['ktor-ktor-io'], globalThis['ktor-ktor-client-core'], globalThis['ktor-ktor-utils']);
26
- }
27
- }(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) {
28
- 'use strict';
29
- //region block: imports
30
- var protoOf = kotlin_kotlin.$_$.ub;
31
- var initMetadataForClass = kotlin_kotlin.$_$.xa;
32
- var plus = kotlin_kotlin.$_$.k7;
33
- var toMutableSet = kotlin_kotlin.$_$.h8;
34
- var ArrayList_init_$Create$ = kotlin_kotlin.$_$.j;
35
- var Application_getInstance = kotlin_io_ktor_ktor_http.$_$.b;
36
- var register$default = kotlin_io_ktor_ktor_serialization.$_$.b;
37
- var Unit_instance = kotlin_kotlin.$_$.y4;
38
- var Configuration = kotlin_io_ktor_ktor_serialization.$_$.c;
39
- var VOID = kotlin_kotlin.$_$.b;
40
- var Exception = kotlin_kotlin.$_$.of;
41
- var Exception_init_$Init$ = kotlin_kotlin.$_$.h1;
42
- var captureStack = kotlin_kotlin.$_$.fa;
43
- var toString = kotlin_kotlin.$_$.xb;
44
- var Charsets_getInstance = kotlin_io_ktor_ktor_io.$_$.m;
45
- var CoroutineImpl = kotlin_kotlin.$_$.g9;
46
- var THROW_CCE = kotlin_kotlin.$_$.vf;
47
- var TransformRequestBodyContext = kotlin_io_ktor_ktor_client_core.$_$.b;
48
- var HttpRequestBuilder = kotlin_io_ktor_ktor_client_core.$_$.i;
49
- var TypeInfo = kotlin_io_ktor_ktor_utils.$_$.m;
50
- var get_COROUTINE_SUSPENDED = kotlin_kotlin.$_$.p8;
51
- var initMetadataForLambda = kotlin_kotlin.$_$.cb;
52
- var TransformResponseBodyContext = kotlin_io_ktor_ktor_client_core.$_$.c;
53
- var HttpResponse = kotlin_io_ktor_ktor_client_core.$_$.m;
54
- var ByteReadChannel = kotlin_io_ktor_ktor_io.$_$.l1;
55
- var isInterface = kotlin_kotlin.$_$.mb;
56
- var contentType = kotlin_io_ktor_ktor_http.$_$.o1;
57
- var get_request = kotlin_io_ktor_ktor_client_core.$_$.o;
58
- var suitableCharset = kotlin_io_ktor_ktor_serialization.$_$.e;
59
- var Collection = kotlin_kotlin.$_$.a5;
60
- var emptyList = kotlin_kotlin.$_$.l6;
61
- var Companion_getInstance = kotlin_io_ktor_ktor_http.$_$.c;
62
- var accept = kotlin_io_ktor_ktor_client_core.$_$.j;
63
- var OutgoingContent = kotlin_io_ktor_ktor_http.$_$.u;
64
- var getKClassFromExpression = kotlin_kotlin.$_$.lc;
65
- var contentType_0 = kotlin_io_ktor_ktor_http.$_$.m1;
66
- var EmptyContent_getInstance = kotlin_io_ktor_ktor_client_core.$_$.a;
67
- var Unit = kotlin_kotlin.$_$.gg;
68
- var charset = kotlin_io_ktor_ktor_http.$_$.k1;
69
- var ensureNotNull = kotlin_kotlin.$_$.ng;
70
- var NullBody_instance = kotlin_io_ktor_ktor_http.$_$.a;
71
- var equals = kotlin_kotlin.$_$.oa;
72
- var joinToString = kotlin_kotlin.$_$.z6;
73
- var initMetadataForCoroutine = kotlin_kotlin.$_$.za;
74
- var collectionSizeOrDefault = kotlin_kotlin.$_$.s5;
75
- var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.i;
76
- var deserialize = kotlin_io_ktor_ktor_serialization.$_$.a;
77
- var KtorSimpleLogger = kotlin_io_ktor_ktor_utils.$_$.h;
78
- var PrimitiveClasses_getInstance = kotlin_kotlin.$_$.n4;
79
- var HttpStatusCode = kotlin_io_ktor_ktor_http.$_$.d1;
80
- var getKClass = kotlin_kotlin.$_$.mc;
81
- var ClientSSESession = kotlin_io_ktor_ktor_client_core.$_$.f;
82
- var ClientSSESessionWithDeserialization = kotlin_io_ktor_ktor_client_core.$_$.e;
83
- var setOf = kotlin_kotlin.$_$.t7;
84
- var KtList = kotlin_kotlin.$_$.f5;
85
- var ContentType = kotlin_io_ktor_ktor_http.$_$.b1;
86
- var arrayOf = kotlin_kotlin.$_$.jg;
87
- var createKType = kotlin_kotlin.$_$.kc;
88
- var createInvariantKTypeProjection = kotlin_kotlin.$_$.ic;
89
- var AttributeKey = kotlin_io_ktor_ktor_utils.$_$.o;
90
- var createClientPlugin = kotlin_io_ktor_ktor_client_core.$_$.d;
91
- var endsWith = kotlin_kotlin.$_$.dd;
92
- var initMetadataForObject = kotlin_kotlin.$_$.db;
93
- var LinkedHashSet_init_$Create$ = kotlin_kotlin.$_$.u;
94
- //endregion
95
- //region block: pre-declaration
96
- initMetadataForClass(ConverterRegistration, 'ConverterRegistration');
97
- initMetadataForClass(ContentNegotiationConfig$defaultMatcher$1);
98
- initMetadataForClass(ContentNegotiationConfig, 'ContentNegotiationConfig', ContentNegotiationConfig, VOID, [Configuration]);
99
- initMetadataForClass(ContentConverterException, 'ContentConverterException', VOID, Exception);
100
- initMetadataForLambda(ContentNegotiation$lambda$slambda, CoroutineImpl, VOID, [4]);
101
- initMetadataForLambda(ContentNegotiation$lambda$slambda_1, CoroutineImpl, VOID, [4]);
102
- initMetadataForCoroutine($invoke$convertRequestCOROUTINE$, CoroutineImpl);
103
- initMetadataForCoroutine($invoke$convertResponseCOROUTINE$, CoroutineImpl);
104
- initMetadataForObject(JsonContentTypeMatcher, 'JsonContentTypeMatcher');
105
- //endregion
106
- function get_LOGGER() {
107
- _init_properties_ContentNegotiation_kt__o183go();
108
- return LOGGER;
109
- }
110
- var LOGGER;
111
- function get_DefaultCommonIgnoredTypes() {
112
- _init_properties_ContentNegotiation_kt__o183go();
113
- return DefaultCommonIgnoredTypes;
114
- }
115
- var DefaultCommonIgnoredTypes;
116
- function get_ExcludedContentTypes() {
117
- _init_properties_ContentNegotiation_kt__o183go();
118
- return ExcludedContentTypes;
119
- }
120
- var ExcludedContentTypes;
121
- function get_ContentNegotiation() {
122
- _init_properties_ContentNegotiation_kt__o183go();
123
- return ContentNegotiation;
124
- }
125
- var ContentNegotiation;
126
- function ConverterRegistration(converter, contentTypeToSend, contentTypeMatcher) {
127
- this.i4l_1 = converter;
128
- this.j4l_1 = contentTypeToSend;
129
- this.k4l_1 = contentTypeMatcher;
130
- }
131
- function defaultMatcher($this, pattern) {
132
- return new ContentNegotiationConfig$defaultMatcher$1(pattern);
133
- }
134
- function ContentNegotiationConfig$defaultMatcher$1($pattern) {
135
- this.l4l_1 = $pattern;
136
- }
137
- protoOf(ContentNegotiationConfig$defaultMatcher$1).m4l = function (contentType) {
138
- return contentType.d2l(this.l4l_1);
139
- };
140
- function ContentNegotiationConfig() {
141
- this.n4l_1 = toMutableSet(plus(get_DefaultIgnoredTypes(), get_DefaultCommonIgnoredTypes()));
142
- var tmp = this;
143
- // Inline function 'kotlin.collections.mutableListOf' call
144
- tmp.o4l_1 = ArrayList_init_$Create$();
145
- this.p4l_1 = null;
146
- }
147
- protoOf(ContentNegotiationConfig).t3a = function (contentType, converter, configuration) {
148
- var matcher = contentType.d2l(Application_getInstance().j2j_1) ? JsonContentTypeMatcher_instance : defaultMatcher(this, contentType);
149
- this.q4l(contentType, converter, matcher, configuration);
150
- };
151
- protoOf(ContentNegotiationConfig).q4l = function (contentTypeToSend, converter, contentTypeMatcher, configuration) {
152
- // Inline function 'kotlin.apply' call
153
- configuration(converter);
154
- var registration = new ConverterRegistration(converter, contentTypeToSend, contentTypeMatcher);
155
- this.o4l_1.e1(registration);
156
- };
157
- function ContentConverterException(message) {
158
- Exception_init_$Init$(message, this);
159
- captureStack(this, ContentConverterException);
160
- }
161
- function ContentNegotiationConfig$_init_$ref_1ne3ob() {
162
- var l = function () {
163
- return new ContentNegotiationConfig();
164
- };
165
- l.callableName = '<init>';
166
- return l;
167
- }
168
- function ContentNegotiation$lambda($this$createClientPlugin) {
169
- _init_properties_ContentNegotiation_kt__o183go();
170
- var registrations = $this$createClientPlugin.i3n_1.o4l_1;
171
- var ignoredTypes = $this$createClientPlugin.i3n_1.n4l_1;
172
- $this$createClientPlugin.h45(ContentNegotiation$lambda$slambda_0(registrations, $this$createClientPlugin, ignoredTypes, null));
173
- $this$createClientPlugin.u3v(ContentNegotiation$lambda$slambda_2(ignoredTypes, registrations, $this$createClientPlugin, null));
174
- return Unit_instance;
175
- }
176
- function ContentNegotiation$lambda$convertRequest$lambda(it) {
177
- _init_properties_ContentNegotiation_kt__o183go();
178
- return toString(it.i4l_1);
179
- }
180
- function invoke$convertRequest(registrations, $this_createClientPlugin, ignoredTypes, request, body, $completion) {
181
- var tmp = new $invoke$convertRequestCOROUTINE$(registrations, $this_createClientPlugin, ignoredTypes, request, body, $completion);
182
- tmp.l8_1 = Unit_instance;
183
- tmp.m8_1 = null;
184
- return tmp.r8();
185
- }
186
- function invoke$convertResponse(ignoredTypes, registrations, $this_createClientPlugin, requestUrl, info, body, responseContentType, charset, $completion) {
187
- charset = charset === VOID ? Charsets_getInstance().w1q_1 : charset;
188
- var tmp = new $invoke$convertResponseCOROUTINE$(ignoredTypes, registrations, $this_createClientPlugin, requestUrl, info, body, responseContentType, charset, $completion);
189
- tmp.l8_1 = Unit_instance;
190
- tmp.m8_1 = null;
191
- return tmp.r8();
192
- }
193
- function ContentNegotiation$lambda$slambda($registrations, $this_createClientPlugin, $ignoredTypes, resultContinuation) {
194
- this.i4n_1 = $registrations;
195
- this.j4n_1 = $this_createClientPlugin;
196
- this.k4n_1 = $ignoredTypes;
197
- CoroutineImpl.call(this, resultContinuation);
198
- }
199
- protoOf(ContentNegotiation$lambda$slambda).p4n = function ($this$transformRequestBody, request, body, _unused_var__etf5q3, $completion) {
200
- var tmp = this.q4n($this$transformRequestBody, request, body, _unused_var__etf5q3, $completion);
201
- tmp.l8_1 = Unit_instance;
202
- tmp.m8_1 = null;
203
- return tmp.r8();
204
- };
205
- protoOf(ContentNegotiation$lambda$slambda).z3w = function (p1, p2, p3, p4, $completion) {
206
- var tmp = p1 instanceof TransformRequestBodyContext ? p1 : THROW_CCE();
207
- var tmp_0 = p2 instanceof HttpRequestBuilder ? p2 : THROW_CCE();
208
- var tmp_1 = !(p3 == null) ? p3 : THROW_CCE();
209
- return this.p4n(tmp, tmp_0, tmp_1, (p4 == null ? true : p4 instanceof TypeInfo) ? p4 : THROW_CCE(), $completion);
210
- };
211
- protoOf(ContentNegotiation$lambda$slambda).r8 = function () {
212
- var suspendResult = this.l8_1;
213
- $sm: do
214
- try {
215
- var tmp = this.j8_1;
216
- switch (tmp) {
217
- case 0:
218
- this.k8_1 = 2;
219
- this.j8_1 = 1;
220
- suspendResult = invoke$convertRequest(this.i4n_1, this.j4n_1, this.k4n_1, this.m4n_1, this.n4n_1, this);
221
- if (suspendResult === get_COROUTINE_SUSPENDED()) {
222
- return suspendResult;
223
- }
224
-
225
- continue $sm;
226
- case 1:
227
- return suspendResult;
228
- case 2:
229
- throw this.m8_1;
230
- }
231
- } catch ($p) {
232
- var e = $p;
233
- if (this.k8_1 === 2) {
234
- throw e;
235
- } else {
236
- this.j8_1 = this.k8_1;
237
- this.m8_1 = e;
238
- }
239
- }
240
- while (true);
241
- };
242
- protoOf(ContentNegotiation$lambda$slambda).q4n = function ($this$transformRequestBody, request, body, _unused_var__etf5q3, completion) {
243
- var i = new ContentNegotiation$lambda$slambda(this.i4n_1, this.j4n_1, this.k4n_1, completion);
244
- i.l4n_1 = $this$transformRequestBody;
245
- i.m4n_1 = request;
246
- i.n4n_1 = body;
247
- i.o4n_1 = _unused_var__etf5q3;
248
- return i;
249
- };
250
- function ContentNegotiation$lambda$slambda_0($registrations, $this_createClientPlugin, $ignoredTypes, resultContinuation) {
251
- var i = new ContentNegotiation$lambda$slambda($registrations, $this_createClientPlugin, $ignoredTypes, resultContinuation);
252
- var l = function ($this$transformRequestBody, request, body, _unused_var__etf5q3, $completion) {
253
- return i.p4n($this$transformRequestBody, request, body, _unused_var__etf5q3, $completion);
254
- };
255
- l.$arity = 4;
256
- return l;
257
- }
258
- function ContentNegotiation$lambda$slambda_1($ignoredTypes, $registrations, $this_createClientPlugin, resultContinuation) {
259
- this.z4n_1 = $ignoredTypes;
260
- this.a4o_1 = $registrations;
261
- this.b4o_1 = $this_createClientPlugin;
262
- CoroutineImpl.call(this, resultContinuation);
263
- }
264
- protoOf(ContentNegotiation$lambda$slambda_1).x3w = function ($this$transformResponseBody, response, body, info, $completion) {
265
- var tmp = this.y3w($this$transformResponseBody, response, body, info, $completion);
266
- tmp.l8_1 = Unit_instance;
267
- tmp.m8_1 = null;
268
- return tmp.r8();
269
- };
270
- protoOf(ContentNegotiation$lambda$slambda_1).z3w = function (p1, p2, p3, p4, $completion) {
271
- var tmp = p1 instanceof TransformResponseBodyContext ? p1 : THROW_CCE();
272
- var tmp_0 = p2 instanceof HttpResponse ? p2 : THROW_CCE();
273
- var tmp_1 = (!(p3 == null) ? isInterface(p3, ByteReadChannel) : false) ? p3 : THROW_CCE();
274
- return this.x3w(tmp, tmp_0, tmp_1, p4 instanceof TypeInfo ? p4 : THROW_CCE(), $completion);
275
- };
276
- protoOf(ContentNegotiation$lambda$slambda_1).r8 = function () {
277
- var suspendResult = this.l8_1;
278
- $sm: do
279
- try {
280
- var tmp = this.j8_1;
281
- switch (tmp) {
282
- case 0:
283
- this.k8_1 = 2;
284
- var tmp0_elvis_lhs = contentType(this.d4o_1);
285
- var tmp_0;
286
- if (tmp0_elvis_lhs == null) {
287
- return null;
288
- } else {
289
- tmp_0 = tmp0_elvis_lhs;
290
- }
291
-
292
- var contentType_0 = tmp_0;
293
- var charset = suitableCharset(get_request(this.d4o_1).n2p());
294
- this.j8_1 = 1;
295
- suspendResult = invoke$convertResponse(this.z4n_1, this.a4o_1, this.b4o_1, get_request(this.d4o_1).k3g(), this.f4o_1, this.e4o_1, contentType_0, charset, this);
296
- if (suspendResult === get_COROUTINE_SUSPENDED()) {
297
- return suspendResult;
298
- }
299
-
300
- continue $sm;
301
- case 1:
302
- return suspendResult;
303
- case 2:
304
- throw this.m8_1;
305
- }
306
- } catch ($p) {
307
- var e = $p;
308
- if (this.k8_1 === 2) {
309
- throw e;
310
- } else {
311
- this.j8_1 = this.k8_1;
312
- this.m8_1 = e;
313
- }
314
- }
315
- while (true);
316
- };
317
- protoOf(ContentNegotiation$lambda$slambda_1).y3w = function ($this$transformResponseBody, response, body, info, completion) {
318
- var i = new ContentNegotiation$lambda$slambda_1(this.z4n_1, this.a4o_1, this.b4o_1, completion);
319
- i.c4o_1 = $this$transformResponseBody;
320
- i.d4o_1 = response;
321
- i.e4o_1 = body;
322
- i.f4o_1 = info;
323
- return i;
324
- };
325
- function ContentNegotiation$lambda$slambda_2($ignoredTypes, $registrations, $this_createClientPlugin, resultContinuation) {
326
- var i = new ContentNegotiation$lambda$slambda_1($ignoredTypes, $registrations, $this_createClientPlugin, resultContinuation);
327
- var l = function ($this$transformResponseBody, response, body, info, $completion) {
328
- return i.x3w($this$transformResponseBody, response, body, info, $completion);
329
- };
330
- l.$arity = 4;
331
- return l;
332
- }
333
- function $invoke$convertRequestCOROUTINE$(registrations, $this_createClientPlugin, ignoredTypes, request, body, resultContinuation) {
334
- CoroutineImpl.call(this, resultContinuation);
335
- this.z4l_1 = registrations;
336
- this.a4m_1 = $this_createClientPlugin;
337
- this.b4m_1 = ignoredTypes;
338
- this.c4m_1 = request;
339
- this.d4m_1 = body;
340
- }
341
- protoOf($invoke$convertRequestCOROUTINE$).r8 = function () {
342
- var suspendResult = this.l8_1;
343
- $sm: do
344
- try {
345
- var tmp = this.j8_1;
346
- switch (tmp) {
347
- case 0:
348
- this.k8_1 = 7;
349
- var tmp_0;
350
- if (this.c4m_1.x3e_1.u2c(get_ExcludedContentTypes())) {
351
- var excluded = this.c4m_1.x3e_1.s2c(get_ExcludedContentTypes());
352
- var tmp0 = this.z4l_1;
353
- var destination = ArrayList_init_$Create$();
354
- var _iterator__ex2g4s = tmp0.t();
355
- while (_iterator__ex2g4s.u()) {
356
- var element = _iterator__ex2g4s.v();
357
- var tmp$ret$0;
358
- l$ret$1: do {
359
- var tmp_1;
360
- if (isInterface(excluded, Collection)) {
361
- tmp_1 = excluded.r();
362
- } else {
363
- tmp_1 = false;
364
- }
365
- if (tmp_1) {
366
- tmp$ret$0 = true;
367
- break l$ret$1;
368
- }
369
- var _iterator__ex2g4s_0 = excluded.t();
370
- while (_iterator__ex2g4s_0.u()) {
371
- var element_0 = _iterator__ex2g4s_0.v();
372
- if (element.j4l_1.d2l(element_0)) {
373
- tmp$ret$0 = false;
374
- break l$ret$1;
375
- }
376
- }
377
- tmp$ret$0 = true;
378
- }
379
- while (false);
380
- if (tmp$ret$0) {
381
- destination.e1(element);
382
- }
383
- }
384
- tmp_0 = destination;
385
- } else {
386
- tmp_0 = this.z4l_1;
387
- }
388
-
389
- var requestRegistrations = tmp_0;
390
- var tmp0_elvis_lhs = this.c4m_1.u3e_1.l2e('Accept');
391
- var acceptHeaders = tmp0_elvis_lhs == null ? emptyList() : tmp0_elvis_lhs;
392
- var _iterator__ex2g4s_1 = requestRegistrations.t();
393
- while (_iterator__ex2g4s_1.u()) {
394
- var element_1 = _iterator__ex2g4s_1.v();
395
- var tmp$ret$2;
396
- l$ret$3: do {
397
- var tmp_2;
398
- if (isInterface(acceptHeaders, Collection)) {
399
- tmp_2 = acceptHeaders.r();
400
- } else {
401
- tmp_2 = false;
402
- }
403
- if (tmp_2) {
404
- tmp$ret$2 = true;
405
- break l$ret$3;
406
- }
407
- var _iterator__ex2g4s_2 = acceptHeaders.t();
408
- while (_iterator__ex2g4s_2.u()) {
409
- var element_2 = _iterator__ex2g4s_2.v();
410
- if (Companion_getInstance().gm(element_2).d2l(element_1.j4l_1)) {
411
- tmp$ret$2 = false;
412
- break l$ret$3;
413
- }
414
- }
415
- tmp$ret$2 = true;
416
- }
417
- while (false);
418
- if (tmp$ret$2) {
419
- var qValue = this.a4m_1.i3n_1.p4l_1;
420
- var contentTypeToSend = qValue == null ? element_1.j4l_1 : element_1.j4l_1.b2l('q', qValue.toString());
421
- get_LOGGER().r2i('Adding Accept=' + contentTypeToSend.toString() + ' header for ' + this.c4m_1.s3e_1.toString());
422
- accept(this.c4m_1, contentTypeToSend);
423
- }
424
- }
425
-
426
- var tmp_3;
427
- var tmp_4 = this.d4m_1;
428
- if (tmp_4 instanceof OutgoingContent) {
429
- tmp_3 = true;
430
- } else {
431
- var tmp0_0 = this.b4m_1;
432
- var tmp$ret$4;
433
- l$ret$5: do {
434
- var tmp_5;
435
- if (isInterface(tmp0_0, Collection)) {
436
- tmp_5 = tmp0_0.r();
437
- } else {
438
- tmp_5 = false;
439
- }
440
- if (tmp_5) {
441
- tmp$ret$4 = false;
442
- break l$ret$5;
443
- }
444
- var _iterator__ex2g4s_3 = tmp0_0.t();
445
- while (_iterator__ex2g4s_3.u()) {
446
- var element_3 = _iterator__ex2g4s_3.v();
447
- if (element_3.na(this.d4m_1)) {
448
- tmp$ret$4 = true;
449
- break l$ret$5;
450
- }
451
- }
452
- tmp$ret$4 = false;
453
- }
454
- while (false);
455
- tmp_3 = tmp$ret$4;
456
- }
457
-
458
- if (tmp_3) {
459
- get_LOGGER().r2i('Body type ' + toString(getKClassFromExpression(this.d4m_1)) + ' is in ignored types. ' + ('Skipping ContentNegotiation for ' + this.c4m_1.s3e_1.toString() + '.'));
460
- return null;
461
- }
462
-
463
- var tmp_6 = this;
464
- var tmp0_elvis_lhs_0 = contentType_0(this.c4m_1);
465
- var tmp_7;
466
- if (tmp0_elvis_lhs_0 == null) {
467
- this.a4m_1;
468
- get_LOGGER().r2i("Request doesn't have Content-Type header. Skipping ContentNegotiation for " + this.c4m_1.s3e_1.toString() + '.');
469
- return null;
470
- } else {
471
- tmp_7 = tmp0_elvis_lhs_0;
472
- }
473
-
474
- tmp_6.f4m_1 = tmp_7;
475
- var tmp_8 = this.d4m_1;
476
- if (tmp_8 instanceof Unit) {
477
- get_LOGGER().r2i('Sending empty body for ' + this.c4m_1.s3e_1.toString());
478
- this.c4m_1.u3e_1.v2e('Content-Type');
479
- return EmptyContent_getInstance();
480
- }
481
-
482
- var tmp_9 = this;
483
- var tmp0_1 = this.z4l_1;
484
- var destination_0 = ArrayList_init_$Create$();
485
- var _iterator__ex2g4s_4 = tmp0_1.t();
486
- while (_iterator__ex2g4s_4.u()) {
487
- var element_4 = _iterator__ex2g4s_4.v();
488
- if (element_4.k4l_1.m4l(this.f4m_1)) {
489
- destination_0.e1(element_4);
490
- }
491
- }
492
-
493
- var tmp_10;
494
- if (!destination_0.r()) {
495
- tmp_10 = destination_0;
496
- } else {
497
- tmp_10 = null;
498
- }
499
-
500
- var tmp1_elvis_lhs = tmp_10;
501
- var tmp_11;
502
- if (tmp1_elvis_lhs == null) {
503
- this.a4m_1;
504
- get_LOGGER().r2i('None of the registered converters match request Content-Type=' + this.f4m_1.toString() + '. ' + ('Skipping ContentNegotiation for ' + this.c4m_1.s3e_1.toString() + '.'));
505
- return null;
506
- } else {
507
- tmp_11 = tmp1_elvis_lhs;
508
- }
509
-
510
- tmp_9.e4m_1 = tmp_11;
511
- if (this.c4m_1.p47() == null) {
512
- get_LOGGER().r2i('Request has unknown body type. Skipping ContentNegotiation for ' + this.c4m_1.s3e_1.toString() + '.');
513
- return null;
514
- }
515
-
516
- this.c4m_1.u3e_1.v2e('Content-Type');
517
- this.j4m_1 = this.e4m_1;
518
- this.j8_1 = 1;
519
- continue $sm;
520
- case 1:
521
- this.i4m_1 = this.j4m_1.t();
522
- this.j8_1 = 2;
523
- continue $sm;
524
- case 2:
525
- if (!this.i4m_1.u()) {
526
- this.j8_1 = 5;
527
- continue $sm;
528
- }
529
-
530
- var element_5 = this.i4m_1.v();
531
- this.h4m_1 = element_5;
532
- this.j8_1 = 3;
533
- var tmp0_elvis_lhs_1 = charset(this.f4m_1);
534
- var tmp_12 = tmp0_elvis_lhs_1 == null ? Charsets_getInstance().w1q_1 : tmp0_elvis_lhs_1;
535
- var tmp_13 = ensureNotNull(this.c4m_1.p47());
536
- var this_0 = this.d4m_1;
537
- var tmp_14;
538
- if (!equals(this_0, NullBody_instance)) {
539
- tmp_14 = this_0;
540
- } else {
541
- tmp_14 = null;
542
- }
543
-
544
- suspendResult = this.h4m_1.i4l_1.g4o(this.f4m_1, tmp_12, tmp_13, tmp_14, this);
545
- if (suspendResult === get_COROUTINE_SUSPENDED()) {
546
- return suspendResult;
547
- }
548
-
549
- continue $sm;
550
- case 3:
551
- var result = suspendResult;
552
- if (!(result == null)) {
553
- get_LOGGER().r2i('Converted request body using ' + toString(this.h4m_1.i4l_1) + ' for ' + this.c4m_1.s3e_1.toString());
554
- }
555
-
556
- var result_0 = result;
557
- if (!(result_0 == null)) {
558
- this.g4m_1 = result_0;
559
- this.j8_1 = 6;
560
- continue $sm;
561
- } else {
562
- this.j8_1 = 4;
563
- continue $sm;
564
- }
565
-
566
- case 4:
567
- this.j8_1 = 2;
568
- continue $sm;
569
- case 5:
570
- this.g4m_1 = null;
571
- if (false) {
572
- this.j8_1 = 1;
573
- continue $sm;
574
- }
575
-
576
- this.j8_1 = 6;
577
- continue $sm;
578
- case 6:
579
- var tmp2_elvis_lhs = this.g4m_1;
580
- var tmp_15;
581
- if (tmp2_elvis_lhs == null) {
582
- var tmp_16 = "Can't convert " + toString(this.d4m_1) + ' with contentType ' + this.f4m_1.toString() + ' using converters ';
583
- throw new ContentConverterException(tmp_16 + joinToString(this.e4m_1, VOID, VOID, VOID, VOID, VOID, ContentNegotiation$lambda$convertRequest$lambda));
584
- } else {
585
- tmp_15 = tmp2_elvis_lhs;
586
- }
587
-
588
- var serializedContent = tmp_15;
589
- return serializedContent;
590
- case 7:
591
- throw this.m8_1;
592
- }
593
- } catch ($p) {
594
- var e = $p;
595
- if (this.k8_1 === 7) {
596
- throw e;
597
- } else {
598
- this.j8_1 = this.k8_1;
599
- this.m8_1 = e;
600
- }
601
- }
602
- while (true);
603
- };
604
- function $invoke$convertResponseCOROUTINE$(ignoredTypes, registrations, $this_createClientPlugin, requestUrl, info, body, responseContentType, charset, resultContinuation) {
605
- CoroutineImpl.call(this, resultContinuation);
606
- this.s4m_1 = ignoredTypes;
607
- this.t4m_1 = registrations;
608
- this.u4m_1 = $this_createClientPlugin;
609
- this.v4m_1 = requestUrl;
610
- this.w4m_1 = info;
611
- this.x4m_1 = body;
612
- this.y4m_1 = responseContentType;
613
- this.z4m_1 = charset;
614
- }
615
- protoOf($invoke$convertResponseCOROUTINE$).r8 = function () {
616
- var suspendResult = this.l8_1;
617
- $sm: do
618
- try {
619
- var tmp = this.j8_1;
620
- switch (tmp) {
621
- case 0:
622
- this.k8_1 = 2;
623
- var tmp_0 = this.x4m_1;
624
- if (!isInterface(tmp_0, ByteReadChannel)) {
625
- get_LOGGER().r2i('Response body is already transformed. Skipping ContentNegotiation for ' + this.v4m_1.toString() + '.');
626
- return null;
627
- }
628
-
629
- if (this.s4m_1.h2(this.w4m_1.k2i_1)) {
630
- get_LOGGER().r2i('Response body type ' + toString(this.w4m_1.k2i_1) + ' is in ignored types. ' + ('Skipping ContentNegotiation for ' + this.v4m_1.toString() + '.'));
631
- return null;
632
- }
633
-
634
- var tmp0 = this.t4m_1;
635
- var destination = ArrayList_init_$Create$();
636
- var _iterator__ex2g4s = tmp0.t();
637
- while (_iterator__ex2g4s.u()) {
638
- var element = _iterator__ex2g4s.v();
639
- if (element.k4l_1.m4l(this.y4m_1)) {
640
- destination.e1(element);
641
- }
642
- }
643
-
644
- var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(destination, 10));
645
- var _iterator__ex2g4s_0 = destination.t();
646
- while (_iterator__ex2g4s_0.u()) {
647
- var item = _iterator__ex2g4s_0.v();
648
- destination_0.e1(item.i4l_1);
649
- }
650
-
651
- var tmp_1;
652
- if (!destination_0.r()) {
653
- tmp_1 = destination_0;
654
- } else {
655
- tmp_1 = null;
656
- }
657
-
658
- var tmp0_elvis_lhs = tmp_1;
659
- var tmp_2;
660
- if (tmp0_elvis_lhs == null) {
661
- this.u4m_1;
662
- get_LOGGER().r2i('None of the registered converters match response with Content-Type=' + this.y4m_1.toString() + '. ' + ('Skipping ContentNegotiation for ' + this.v4m_1.toString() + '.'));
663
- return null;
664
- } else {
665
- tmp_2 = tmp0_elvis_lhs;
666
- }
667
-
668
- var suitableConverters = tmp_2;
669
- this.j8_1 = 1;
670
- suspendResult = deserialize(suitableConverters, this.x4m_1, this.w4m_1, this.z4m_1, this);
671
- if (suspendResult === get_COROUTINE_SUSPENDED()) {
672
- return suspendResult;
673
- }
674
-
675
- continue $sm;
676
- case 1:
677
- var result = suspendResult;
678
- if (!isInterface(result, ByteReadChannel)) {
679
- get_LOGGER().r2i('Response body was converted to ' + toString(getKClassFromExpression(result)) + ' for ' + this.v4m_1.toString() + '.');
680
- }
681
-
682
- return result;
683
- case 2:
684
- throw this.m8_1;
685
- }
686
- } catch ($p) {
687
- var e = $p;
688
- if (this.k8_1 === 2) {
689
- throw e;
690
- } else {
691
- this.j8_1 = this.k8_1;
692
- this.m8_1 = e;
693
- }
694
- }
695
- while (true);
696
- };
697
- var properties_initialized_ContentNegotiation_kt_1ayduy;
698
- function _init_properties_ContentNegotiation_kt__o183go() {
699
- if (!properties_initialized_ContentNegotiation_kt_1ayduy) {
700
- properties_initialized_ContentNegotiation_kt_1ayduy = true;
701
- LOGGER = KtorSimpleLogger('io.ktor.client.plugins.contentnegotiation.ContentNegotiation');
702
- DefaultCommonIgnoredTypes = setOf([PrimitiveClasses_getInstance().rb(), PrimitiveClasses_getInstance().nb(), getKClass(HttpStatusCode), getKClass(ByteReadChannel), getKClass(OutgoingContent), getKClass(ClientSSESession), getKClass(ClientSSESessionWithDeserialization)]);
703
- // Inline function 'io.ktor.util.AttributeKey' call
704
- var name = 'ExcludedContentTypesAttr';
705
- // Inline function 'io.ktor.util.reflect.typeInfo' call
706
- var tmp = getKClass(KtList);
707
- // Inline function 'io.ktor.util.reflect.typeOfOrNull' call
708
- var tmp_0;
709
- try {
710
- tmp_0 = createKType(getKClass(KtList), arrayOf([createInvariantKTypeProjection(createKType(getKClass(ContentType), arrayOf([]), false))]), false);
711
- } catch ($p) {
712
- var tmp_1;
713
- if ($p instanceof Error) {
714
- var _unused_var__etf5q3 = $p;
715
- tmp_1 = null;
716
- } else {
717
- throw $p;
718
- }
719
- tmp_0 = tmp_1;
720
- }
721
- var tmp$ret$0 = tmp_0;
722
- var tmp$ret$1 = new TypeInfo(tmp, tmp$ret$0);
723
- ExcludedContentTypes = new AttributeKey(name, tmp$ret$1);
724
- var tmp_2 = ContentNegotiationConfig$_init_$ref_1ne3ob();
725
- ContentNegotiation = createClientPlugin('ContentNegotiation', tmp_2, ContentNegotiation$lambda);
726
- }
727
- }
728
- function JsonContentTypeMatcher() {
729
- }
730
- protoOf(JsonContentTypeMatcher).m4l = function (contentType) {
731
- if (contentType.d2l(Application_getInstance().j2j_1)) {
732
- return true;
733
- }
734
- var value = contentType.c2l().toString();
735
- return Application_getInstance().d2k(value) && endsWith(value, '+json', true);
736
- };
737
- var JsonContentTypeMatcher_instance;
738
- function JsonContentTypeMatcher_getInstance() {
739
- return JsonContentTypeMatcher_instance;
740
- }
741
- function get_DefaultIgnoredTypes() {
742
- _init_properties_DefaultIgnoredTypes_web_kt__6eddjw();
743
- return DefaultIgnoredTypes;
744
- }
745
- var DefaultIgnoredTypes;
746
- var properties_initialized_DefaultIgnoredTypes_web_kt_23uj7m;
747
- function _init_properties_DefaultIgnoredTypes_web_kt__6eddjw() {
748
- if (!properties_initialized_DefaultIgnoredTypes_web_kt_23uj7m) {
749
- properties_initialized_DefaultIgnoredTypes_web_kt_23uj7m = true;
750
- // Inline function 'kotlin.collections.mutableSetOf' call
751
- DefaultIgnoredTypes = LinkedHashSet_init_$Create$();
752
- }
753
- }
754
- //region block: post-declaration
755
- protoOf(ContentNegotiationConfig).u3a = register$default;
756
- //endregion
757
- //region block: init
758
- JsonContentTypeMatcher_instance = new JsonContentTypeMatcher();
759
- //endregion
760
- //region block: exports
761
- _.$_$ = _.$_$ || {};
762
- _.$_$.a = get_ContentNegotiation;
763
- //endregion
764
- return _;
765
- }));
766
-
767
- //# sourceMappingURL=ktor-ktor-client-content-negotiation.js.map