@sddsjs/design-system-builder-cli 0.0.0-stage → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/LICENSE +4 -0
  2. package/README.md +969 -2
  3. package/bin/dsbuilder.js +2 -0
  4. package/dist/kotlin/Kotlin-Immutable-Collections-kotlinx-collections-immutable.js +3170 -0
  5. package/dist/kotlin/Stately-stately-concurrency.js +32 -0
  6. package/dist/kotlin/Stately-stately-concurrent-collections.js +302 -0
  7. package/dist/kotlin/Stately-stately-strict.js +12 -0
  8. package/dist/kotlin/clikt-clikt-mordant.js +304 -0
  9. package/dist/kotlin/clikt-clikt.js +6960 -0
  10. package/dist/kotlin/colormath-root-colormath.js +1653 -0
  11. package/dist/kotlin/design-system-builder-frontend-analytics-metrica.js +1026 -0
  12. package/dist/kotlin/design-system-builder-frontend-cli.js +10690 -0
  13. package/dist/kotlin/design-system-builder-frontend-core-analytics.js +128 -0
  14. package/dist/kotlin/design-system-builder-frontend-core-application.js +3634 -0
  15. package/dist/kotlin/design-system-builder-frontend-core-auth.js +1772 -0
  16. package/dist/kotlin/design-system-builder-frontend-core-domain.js +501 -0
  17. package/dist/kotlin/design-system-builder-frontend-core-network.js +3318 -0
  18. package/dist/kotlin/design-system-builder-frontend-core-platform.js +972 -0
  19. package/dist/kotlin/design-system-builder-frontend-core-process.js +236 -0
  20. package/dist/kotlin/design-system-builder-frontend-core-workspace.js +1058 -0
  21. package/dist/kotlin/design-system-builder-frontend-feature-auth.js +1664 -0
  22. package/dist/kotlin/design-system-builder-frontend-feature-components.js +24819 -0
  23. package/dist/kotlin/design-system-builder-frontend-feature-docs.js +7625 -0
  24. package/dist/kotlin/design-system-builder-frontend-feature-ds.js +2219 -0
  25. package/dist/kotlin/design-system-builder-frontend-feature-init.js +318 -0
  26. package/dist/kotlin/design-system-builder-frontend-feature-projects.js +624 -0
  27. package/dist/kotlin/design-system-builder-frontend-feature-status.js +984 -0
  28. package/dist/kotlin/design-system-builder-frontend-feature-theme.js +10456 -0
  29. package/dist/kotlin/design-system-builder-frontend-feature-toolchain.js +586 -0
  30. package/dist/kotlin/design-system-builder-frontend-mcp-server-core.js +6878 -0
  31. package/dist/kotlin/design-system-builder-frontend-platform-android.js +451 -0
  32. package/dist/kotlin/design-system-builder-frontend-platform-ios.js +1858 -0
  33. package/dist/kotlin/design-system-builder-frontend-platform-web.js +1555 -0
  34. package/dist/kotlin/design-system-builder-frontend-runtime-node.js +1763 -0
  35. package/dist/kotlin/kotlin-kotlin-stdlib.js +17881 -0
  36. package/dist/kotlin/kotlin-logging.js +440 -0
  37. package/dist/kotlin/kotlin-sdk-kotlin-sdk-core.js +20228 -0
  38. package/dist/kotlin/kotlin-sdk-kotlin-sdk-server.js +2771 -0
  39. package/dist/kotlin/kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.js +8 -0
  40. package/dist/kotlin/kotlinx-atomicfu.js +252 -0
  41. package/dist/kotlin/kotlinx-coroutines-core.js +10822 -0
  42. package/dist/kotlin/kotlinx-io-kotlinx-io-bytestring.js +203 -0
  43. package/dist/kotlin/kotlinx-io-kotlinx-io-core.js +2032 -0
  44. package/dist/kotlin/kotlinx-serialization-kotlinx-serialization-core.js +6171 -0
  45. package/dist/kotlin/kotlinx-serialization-kotlinx-serialization-json.js +5690 -0
  46. package/dist/kotlin/ktor-ktor-client-core.js +8382 -0
  47. package/dist/kotlin/ktor-ktor-events.js +80 -0
  48. package/dist/kotlin/ktor-ktor-http-cio.js +2252 -0
  49. package/dist/kotlin/ktor-ktor-http.js +3320 -0
  50. package/dist/kotlin/ktor-ktor-io.js +3328 -0
  51. package/dist/kotlin/ktor-ktor-serialization.js +8 -0
  52. package/dist/kotlin/ktor-ktor-server-core.js +12 -0
  53. package/dist/kotlin/ktor-ktor-server-sse.js +8 -0
  54. package/dist/kotlin/ktor-ktor-server-websockets.js +8 -0
  55. package/dist/kotlin/ktor-ktor-sse.js +8 -0
  56. package/dist/kotlin/ktor-ktor-utils.js +2524 -0
  57. package/dist/kotlin/ktor-ktor-websocket-serialization.js +8 -0
  58. package/dist/kotlin/ktor-ktor-websockets.js +433 -0
  59. package/dist/kotlin/mordant-mordant-omnibus.js +8 -0
  60. package/dist/kotlin/mordant-mordant.js +12111 -0
  61. package/dist/kotlin/okio-parent-okio.js +2335 -0
  62. package/dist/kotlin/projects-core-koin-core.js +1285 -0
  63. package/package.json +26 -5
@@ -0,0 +1,3318 @@
1
+ (function (_, kotlin_kotlin, kotlin_design_system_builder_frontend_core_auth, kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json, kotlin_io_ktor_ktor_http, kotlin_io_ktor_ktor_client_core, kotlin_io_ktor_ktor_utils, kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core) {
2
+ 'use strict';
3
+ //region block: imports
4
+ var imul = Math.imul;
5
+ var noWhenBranchMatchedException = kotlin_kotlin.$_$.vl;
6
+ var protoOf = kotlin_kotlin.$_$.te;
7
+ var getStringHashCode = kotlin_kotlin.$_$.od;
8
+ var initMetadataForClass = kotlin_kotlin.$_$.qd;
9
+ var isBlank = kotlin_kotlin.$_$.gh;
10
+ var normalizeSessionApiUrl = kotlin_design_system_builder_frontend_core_auth.$_$.v;
11
+ var Unit_instance = kotlin_kotlin.$_$.r5;
12
+ var VOID = kotlin_kotlin.$_$.c;
13
+ var Enum = kotlin_kotlin.$_$.kk;
14
+ var toString = kotlin_kotlin.$_$.we;
15
+ var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.b2;
16
+ var ServiceToken = kotlin_design_system_builder_frontend_core_auth.$_$.f;
17
+ var Bearer = kotlin_design_system_builder_frontend_core_auth.$_$.d;
18
+ var PersonalAccessToken = kotlin_design_system_builder_frontend_core_auth.$_$.e;
19
+ var initMetadataForInterface = kotlin_kotlin.$_$.ud;
20
+ var listOf = kotlin_kotlin.$_$.e9;
21
+ var emptyMap = kotlin_kotlin.$_$.z7;
22
+ var hashCode = kotlin_kotlin.$_$.pd;
23
+ var getBooleanHashCode = kotlin_kotlin.$_$.ld;
24
+ var equals = kotlin_kotlin.$_$.jd;
25
+ var _Char___init__impl__6a9atx = kotlin_kotlin.$_$.w2;
26
+ var substringBefore = kotlin_kotlin.$_$.pi;
27
+ var THROW_CCE = kotlin_kotlin.$_$.wk;
28
+ var isCharSequence = kotlin_kotlin.$_$.be;
29
+ var trim = kotlin_kotlin.$_$.uj;
30
+ var charSequenceLength = kotlin_kotlin.$_$.fd;
31
+ var take = kotlin_kotlin.$_$.si;
32
+ var JsonPrimitive = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.q;
33
+ var charArrayOf = kotlin_kotlin.$_$.bd;
34
+ var trimEnd = kotlin_kotlin.$_$.oj;
35
+ var trimStart = kotlin_kotlin.$_$.sj;
36
+ var HttpHeaders_getInstance = kotlin_io_ktor_ktor_http.$_$.h;
37
+ var header = kotlin_io_ktor_ktor_client_core.$_$.i;
38
+ var CoroutineImpl = kotlin_kotlin.$_$.tb;
39
+ var HttpRequestBuilder = kotlin_io_ktor_ktor_client_core.$_$.g;
40
+ var url = kotlin_io_ktor_ktor_client_core.$_$.j;
41
+ var Companion_getInstance = kotlin_io_ktor_ktor_http.$_$.i;
42
+ var HttpStatement = kotlin_io_ktor_ktor_client_core.$_$.k;
43
+ var get_COROUTINE_SUSPENDED = kotlin_kotlin.$_$.db;
44
+ var initMetadataForLambda = kotlin_kotlin.$_$.vd;
45
+ var Application_getInstance = kotlin_io_ktor_ktor_http.$_$.c;
46
+ var contentType = kotlin_io_ktor_ktor_http.$_$.o1;
47
+ var PrimitiveClasses_getInstance = kotlin_kotlin.$_$.e5;
48
+ var arrayOf = kotlin_kotlin.$_$.jl;
49
+ var createKType = kotlin_kotlin.$_$.of;
50
+ var TypeInfo = kotlin_io_ktor_ktor_utils.$_$.j;
51
+ var OutgoingContent = kotlin_io_ktor_ktor_http.$_$.v;
52
+ var NullBody_instance = kotlin_io_ktor_ktor_http.$_$.a;
53
+ var Companion_getInstance_0 = kotlin_io_ktor_ktor_http.$_$.g;
54
+ var HeadersBuilder = kotlin_io_ktor_ktor_http.$_$.c1;
55
+ var Companion_getInstance_1 = kotlin_io_ktor_ktor_http.$_$.b;
56
+ var bodyAsText = kotlin_io_ktor_ktor_client_core.$_$.b;
57
+ var initMetadataForCoroutine = kotlin_kotlin.$_$.sd;
58
+ var formData = kotlin_io_ktor_ktor_client_core.$_$.f;
59
+ var MultiPartFormDataContent = kotlin_io_ktor_ktor_client_core.$_$.e;
60
+ var getKClass = kotlin_kotlin.$_$.qf;
61
+ var Exception = kotlin_kotlin.$_$.mk;
62
+ var CancellationException = kotlin_kotlin.$_$.cb;
63
+ var Companion_getInstance_2 = kotlin_io_ktor_ktor_http.$_$.k;
64
+ var isSuccess = kotlin_io_ktor_ktor_http.$_$.v1;
65
+ var Default_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.b;
66
+ var JsonObject = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.n;
67
+ var IllegalArgumentException = kotlin_kotlin.$_$.nk;
68
+ var listOf_0 = kotlin_kotlin.$_$.f9;
69
+ var setOf = kotlin_kotlin.$_$.z9;
70
+ var get_jsonPrimitive = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.x;
71
+ var getValue = kotlin_kotlin.$_$.l8;
72
+ var joinToString = kotlin_kotlin.$_$.r8;
73
+ var JsonArray = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.j;
74
+ var encodeURLParameter = kotlin_io_ktor_ktor_http.$_$.q1;
75
+ var emptyList = kotlin_kotlin.$_$.y7;
76
+ var map = kotlin_kotlin.$_$.hg;
77
+ var toSet = kotlin_kotlin.$_$.lg;
78
+ var ArrayList_init_$Create$ = kotlin_kotlin.$_$.m;
79
+ var get_jsonObject = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.w;
80
+ var LinkedHashMap_init_$Create$ = kotlin_kotlin.$_$.v;
81
+ var Json = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.r;
82
+ var Regex_init_$Create$ = kotlin_kotlin.$_$.e1;
83
+ var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.v1;
84
+ var JsonObjectBuilder = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.m;
85
+ var put = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.a1;
86
+ var Long = kotlin_kotlin.$_$.qk;
87
+ var compare = kotlin_kotlin.$_$.fc;
88
+ var toString_0 = kotlin_kotlin.$_$.bm;
89
+ var singleOrNull = kotlin_kotlin.$_$.aa;
90
+ var to = kotlin_kotlin.$_$.cm;
91
+ var toMap = kotlin_kotlin.$_$.pa;
92
+ var Collection = kotlin_kotlin.$_$.a6;
93
+ var isInterface = kotlin_kotlin.$_$.fe;
94
+ var replace = kotlin_kotlin.$_$.ai;
95
+ var set_expectSuccess = kotlin_io_ktor_ktor_client_core.$_$.d;
96
+ var serializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.s2;
97
+ var KSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.k2;
98
+ var fromInt = kotlin_kotlin.$_$.lc;
99
+ var multiply = kotlin_kotlin.$_$.oc;
100
+ var add = kotlin_kotlin.$_$.bc;
101
+ var TokenResponse = kotlin_design_system_builder_frontend_core_auth.$_$.s;
102
+ var Success = kotlin_design_system_builder_frontend_core_auth.$_$.c;
103
+ var AuthErrorCode_BACKEND_UNAVAILABLE_getInstance = kotlin_design_system_builder_frontend_core_auth.$_$.x;
104
+ var Failed = kotlin_design_system_builder_frontend_core_auth.$_$.b;
105
+ var AccessTokenResponse = kotlin_design_system_builder_frontend_core_auth.$_$.a;
106
+ var AuthErrorCode_AUTH_REQUIRED_getInstance = kotlin_design_system_builder_frontend_core_auth.$_$.w;
107
+ var System_instance = kotlin_kotlin.$_$.f5;
108
+ var Companion_getInstance_3 = kotlin_io_ktor_ktor_http.$_$.l;
109
+ var ParametersBuilder = kotlin_io_ktor_ktor_http.$_$.e1;
110
+ var submitForm = kotlin_io_ktor_ktor_client_core.$_$.a;
111
+ var AuthErrorCode_FORBIDDEN_getInstance = kotlin_design_system_builder_frontend_core_auth.$_$.y;
112
+ var AuthErrorCode_INVALID_AUTH_URL_getInstance = kotlin_design_system_builder_frontend_core_auth.$_$.z;
113
+ var TokenClient = kotlin_design_system_builder_frontend_core_auth.$_$.r;
114
+ var Url = kotlin_io_ktor_ktor_http.$_$.h1;
115
+ var initMetadataForCompanion = kotlin_kotlin.$_$.rd;
116
+ var PluginGeneratedSerialDescriptor = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.a2;
117
+ var LongSerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.q;
118
+ var UnknownFieldException_init_$Create$ = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.e;
119
+ var StringSerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.r;
120
+ var get_nullable = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.u;
121
+ var typeParametersSerializers = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.t1;
122
+ var GeneratedSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.u1;
123
+ var initMetadataForObject = kotlin_kotlin.$_$.wd;
124
+ var throwMissingFieldException = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.f2;
125
+ var objectCreate = kotlin_kotlin.$_$.se;
126
+ var equalsLong = kotlin_kotlin.$_$.kc;
127
+ var bearerAuth = kotlin_io_ktor_ktor_client_core.$_$.h;
128
+ var charSequenceGet = kotlin_kotlin.$_$.ed;
129
+ var isISOControl = kotlin_kotlin.$_$.ih;
130
+ var Companion_instance = kotlin_kotlin.$_$.m5;
131
+ var _Result___init__impl__xyqfz8 = kotlin_kotlin.$_$.e3;
132
+ var createFailure = kotlin_kotlin.$_$.nl;
133
+ var _Result___get_value__impl__bjfvqg = kotlin_kotlin.$_$.i3;
134
+ var _Result___get_isFailure__impl__jpiriv = kotlin_kotlin.$_$.g3;
135
+ var _Result___get_isSuccess__impl__sndoy8 = kotlin_kotlin.$_$.h3;
136
+ var encodeToByteArray = kotlin_kotlin.$_$.xg;
137
+ //endregion
138
+ //region block: pre-declaration
139
+ initMetadataForClass(ResolvedApiUrl, 'ResolvedApiUrl');
140
+ initMetadataForClass(ApiUrlResolver, 'ApiUrlResolver');
141
+ initMetadataForClass(Resolved, 'Resolved');
142
+ initMetadataForClass(Rejected, 'Rejected');
143
+ initMetadataForClass(ApiUrlSource, 'ApiUrlSource', VOID, Enum);
144
+ function create(apiUrl, credential) {
145
+ var tmp;
146
+ if (credential instanceof PersonalAccessToken) {
147
+ tmp = this.x59(apiUrl, credential.n4x_1);
148
+ } else {
149
+ if (credential instanceof Bearer) {
150
+ var message = 'Bearer credentials are not supported by this client.';
151
+ throw IllegalStateException_init_$Create$(toString(message));
152
+ } else {
153
+ if (credential instanceof ServiceToken) {
154
+ var message_0 = 'Service tokens are not supported by this client.';
155
+ throw IllegalStateException_init_$Create$(toString(message_0));
156
+ } else {
157
+ noWhenBranchMatchedException();
158
+ }
159
+ }
160
+ }
161
+ return tmp;
162
+ }
163
+ initMetadataForInterface(AuthenticatedHttpClientFactory, 'AuthenticatedHttpClientFactory');
164
+ function mutate(request, $completion) {
165
+ var message = 'Mutations are not supported by this client.';
166
+ throw IllegalStateException_init_$Create$(toString(message));
167
+ }
168
+ function postJson(path, body, $completion) {
169
+ var message = 'JSON POST with a raw response is not supported by this client.';
170
+ throw IllegalStateException_init_$Create$(toString(message));
171
+ }
172
+ function postMultipart(path, file, $completion) {
173
+ return this.e5a(path, listOf(file), $completion);
174
+ }
175
+ function postMultipart_0(path, files, $completion) {
176
+ var message = 'Multipart POST is not supported by this client.';
177
+ throw IllegalStateException_init_$Create$(toString(message));
178
+ }
179
+ initMetadataForInterface(AuthenticatedHttpClient, 'AuthenticatedHttpClient', VOID, VOID, VOID, [1, 2]);
180
+ initMetadataForClass(Success_0, 'Success');
181
+ initMetadataForClass(Failure, 'Failure');
182
+ initMetadataForClass(AuthenticatedHttpResponse, 'AuthenticatedHttpResponse');
183
+ initMetadataForClass(MultipartFile, 'MultipartFile');
184
+ initMetadataForClass(KtorAuthenticatedHttpClientFactory, 'KtorAuthenticatedHttpClientFactory', VOID, VOID, [AuthenticatedHttpClientFactory]);
185
+ initMetadataForLambda(KtorAuthenticatedHttpClient$get$slambda, CoroutineImpl, VOID, [0]);
186
+ initMetadataForLambda(KtorAuthenticatedHttpClient$post$slambda, CoroutineImpl, VOID, [0]);
187
+ initMetadataForCoroutine($postJsonCOROUTINE$, CoroutineImpl);
188
+ initMetadataForCoroutine($postMultipartCOROUTINE$, CoroutineImpl);
189
+ initMetadataForCoroutine($executeCOROUTINE$, CoroutineImpl);
190
+ initMetadataForCoroutine($toResultCOROUTINE$, CoroutineImpl);
191
+ initMetadataForCoroutine($errorBodySnippetCOROUTINE$, CoroutineImpl);
192
+ initMetadataForCoroutine($denialReasonCOROUTINE$, CoroutineImpl);
193
+ initMetadataForClass(KtorAuthenticatedHttpClient, 'KtorAuthenticatedHttpClient', VOID, VOID, [AuthenticatedHttpClient], [1, 2]);
194
+ initMetadataForClass(EditorEndpoint, 'EditorEndpoint');
195
+ initMetadataForCoroutine($editorReadResponseCOROUTINE$, CoroutineImpl);
196
+ initMetadataForClass(MutationHttpMethod, 'MutationHttpMethod', VOID, Enum);
197
+ initMetadataForClass(HttpMutationRequest, 'HttpMutationRequest');
198
+ initMetadataForClass(Response, 'Response');
199
+ initMetadataForClass(OutcomeUnknown, 'OutcomeUnknown');
200
+ initMetadataForCoroutine($executeMutationCOROUTINE$, CoroutineImpl);
201
+ initMetadataForCoroutine($logoutCOROUTINE$, CoroutineImpl);
202
+ initMetadataForCoroutine($requestTokenCOROUTINE$, CoroutineImpl);
203
+ initMetadataForClass(KtorTokenClient, 'KtorTokenClient', VOID, VOID, [TokenClient], [4, 2, 3]);
204
+ initMetadataForCompanion(Companion);
205
+ initMetadataForObject($serializer, '$serializer', VOID, VOID, [GeneratedSerializer]);
206
+ initMetadataForClass(GatewayTokenResponse, 'GatewayTokenResponse', VOID, VOID, VOID, VOID, VOID, {0: $serializer_getInstance});
207
+ initMetadataForCompanion(Companion_0);
208
+ initMetadataForObject($serializer_0, '$serializer', VOID, VOID, [GeneratedSerializer]);
209
+ initMetadataForClass(GatewayAccessTokenResponse, 'GatewayAccessTokenResponse', VOID, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_0});
210
+ initMetadataForCompanion(Companion_1);
211
+ initMetadataForObject($serializer_1, '$serializer', VOID, VOID, [GeneratedSerializer]);
212
+ initMetadataForClass(GatewayErrorResponse, 'GatewayErrorResponse', VOID, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_1});
213
+ initMetadataForCoroutine($readCOROUTINE$, CoroutineImpl);
214
+ initMetadataForClass(KtorUserInfoClient, 'KtorUserInfoClient', VOID, VOID, VOID, [2]);
215
+ initMetadataForCompanion(Companion_2);
216
+ initMetadataForObject($serializer_2, '$serializer', VOID, VOID, [GeneratedSerializer]);
217
+ initMetadataForClass(GatewayUserInfo, 'GatewayUserInfo', VOID, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_2});
218
+ initMetadataForCoroutine($confirmTruncatedMutationCOROUTINE$, CoroutineImpl);
219
+ initMetadataForCoroutine($confirmationBodyCOROUTINE$, CoroutineImpl);
220
+ //endregion
221
+ function ResolvedApiUrl(value, source) {
222
+ this.m59_1 = value;
223
+ this.n59_1 = source;
224
+ }
225
+ protoOf(ResolvedApiUrl).o59 = function () {
226
+ var tmp;
227
+ switch (this.n59_1.o2_1) {
228
+ case 0:
229
+ tmp = 'runtime override';
230
+ break;
231
+ case 1:
232
+ tmp = 'DSBUILDER_API_URL';
233
+ break;
234
+ case 2:
235
+ tmp = 'default';
236
+ break;
237
+ default:
238
+ noWhenBranchMatchedException();
239
+ break;
240
+ }
241
+ return tmp;
242
+ };
243
+ protoOf(ResolvedApiUrl).p59 = function () {
244
+ return this.n59_1.equals(ApiUrlSource_CODE_DEFAULT_getInstance());
245
+ };
246
+ protoOf(ResolvedApiUrl).toString = function () {
247
+ return 'ResolvedApiUrl(value=' + this.m59_1 + ', source=' + this.n59_1.toString() + ')';
248
+ };
249
+ protoOf(ResolvedApiUrl).hashCode = function () {
250
+ var result = getStringHashCode(this.m59_1);
251
+ result = imul(result, 31) + this.n59_1.hashCode() | 0;
252
+ return result;
253
+ };
254
+ protoOf(ResolvedApiUrl).equals = function (other) {
255
+ if (this === other)
256
+ return true;
257
+ if (!(other instanceof ResolvedApiUrl))
258
+ return false;
259
+ if (!(this.m59_1 === other.m59_1))
260
+ return false;
261
+ if (!this.n59_1.equals(other.n59_1))
262
+ return false;
263
+ return true;
264
+ };
265
+ function ApiUrlResolver(environmentReader) {
266
+ this.q59_1 = environmentReader;
267
+ }
268
+ protoOf(ApiUrlResolver).r59 = function (override, projectEnvironment) {
269
+ // Inline function 'kotlin.text.isNullOrBlank' call
270
+ if (!(override == null || isBlank(override))) {
271
+ return new ResolvedApiUrl(normalizeSessionApiUrl(override), ApiUrlSource_ARGUMENT_getInstance());
272
+ }
273
+ var tmp0_safe_receiver = this.q59_1.xd('DSBUILDER_API_URL');
274
+ var tmp;
275
+ if (tmp0_safe_receiver == null) {
276
+ tmp = null;
277
+ } else {
278
+ // Inline function 'kotlin.takeIf' call
279
+ var tmp_0;
280
+ // Inline function 'kotlin.text.isNotBlank' call
281
+ if (!isBlank(tmp0_safe_receiver)) {
282
+ tmp_0 = tmp0_safe_receiver;
283
+ } else {
284
+ tmp_0 = null;
285
+ }
286
+ tmp = tmp_0;
287
+ }
288
+ var tmp1_elvis_lhs = tmp;
289
+ var tmp_1;
290
+ if (tmp1_elvis_lhs == null) {
291
+ var tmp3_safe_receiver = projectEnvironment == null ? null : projectEnvironment.xd('DSBUILDER_API_URL');
292
+ var tmp_2;
293
+ if (tmp3_safe_receiver == null) {
294
+ tmp_2 = null;
295
+ } else {
296
+ // Inline function 'kotlin.takeIf' call
297
+ var tmp_3;
298
+ // Inline function 'kotlin.text.isNotBlank' call
299
+ if (!isBlank(tmp3_safe_receiver)) {
300
+ tmp_3 = tmp3_safe_receiver;
301
+ } else {
302
+ tmp_3 = null;
303
+ }
304
+ tmp_2 = tmp_3;
305
+ }
306
+ tmp_1 = tmp_2;
307
+ } else {
308
+ tmp_1 = tmp1_elvis_lhs;
309
+ }
310
+ var tmp4_safe_receiver = tmp_1;
311
+ if (tmp4_safe_receiver == null)
312
+ null;
313
+ else {
314
+ // Inline function 'kotlin.let' call
315
+ return new ResolvedApiUrl(normalizeSessionApiUrl(tmp4_safe_receiver), ApiUrlSource_ENVIRONMENT_getInstance());
316
+ }
317
+ return new ResolvedApiUrl('https://gateway.design-system-builder.ru', ApiUrlSource_CODE_DEFAULT_getInstance());
318
+ };
319
+ protoOf(ApiUrlResolver).s59 = function (override, projectEnvironment, $super) {
320
+ projectEnvironment = projectEnvironment === VOID ? null : projectEnvironment;
321
+ return $super === VOID ? this.r59(override, projectEnvironment) : $super.r59.call(this, override, projectEnvironment);
322
+ };
323
+ protoOf(ApiUrlResolver).t59 = function (override, projectEnvironment) {
324
+ var resolved = this.r59(override, projectEnvironment);
325
+ var tmp;
326
+ if (resolved.p59()) {
327
+ tmp = new Rejected('Error: writing commands require an explicit backend API URL. Set DSBUILDER_API_URL.');
328
+ } else {
329
+ tmp = new Resolved(resolved);
330
+ }
331
+ return tmp;
332
+ };
333
+ protoOf(ApiUrlResolver).u59 = function (override, projectEnvironment, $super) {
334
+ projectEnvironment = projectEnvironment === VOID ? null : projectEnvironment;
335
+ return $super === VOID ? this.t59(override, projectEnvironment) : $super.t59.call(this, override, projectEnvironment);
336
+ };
337
+ function Resolved(url) {
338
+ this.v59_1 = url;
339
+ }
340
+ protoOf(Resolved).toString = function () {
341
+ return 'Resolved(url=' + this.v59_1.toString() + ')';
342
+ };
343
+ protoOf(Resolved).hashCode = function () {
344
+ return this.v59_1.hashCode();
345
+ };
346
+ protoOf(Resolved).equals = function (other) {
347
+ if (this === other)
348
+ return true;
349
+ if (!(other instanceof Resolved))
350
+ return false;
351
+ if (!this.v59_1.equals(other.v59_1))
352
+ return false;
353
+ return true;
354
+ };
355
+ function Rejected(message) {
356
+ this.w59_1 = message;
357
+ }
358
+ protoOf(Rejected).toString = function () {
359
+ return 'Rejected(message=' + this.w59_1 + ')';
360
+ };
361
+ protoOf(Rejected).hashCode = function () {
362
+ return getStringHashCode(this.w59_1);
363
+ };
364
+ protoOf(Rejected).equals = function (other) {
365
+ if (this === other)
366
+ return true;
367
+ if (!(other instanceof Rejected))
368
+ return false;
369
+ if (!(this.w59_1 === other.w59_1))
370
+ return false;
371
+ return true;
372
+ };
373
+ var ApiUrlSource_ARGUMENT_instance;
374
+ var ApiUrlSource_ENVIRONMENT_instance;
375
+ var ApiUrlSource_CODE_DEFAULT_instance;
376
+ var ApiUrlSource_entriesInitialized;
377
+ function ApiUrlSource_initEntries() {
378
+ if (ApiUrlSource_entriesInitialized)
379
+ return Unit_instance;
380
+ ApiUrlSource_entriesInitialized = true;
381
+ ApiUrlSource_ARGUMENT_instance = new ApiUrlSource('ARGUMENT', 0);
382
+ ApiUrlSource_ENVIRONMENT_instance = new ApiUrlSource('ENVIRONMENT', 1);
383
+ ApiUrlSource_CODE_DEFAULT_instance = new ApiUrlSource('CODE_DEFAULT', 2);
384
+ }
385
+ function ApiUrlSource(name, ordinal) {
386
+ Enum.call(this, name, ordinal);
387
+ }
388
+ function ApiUrlSource_ARGUMENT_getInstance() {
389
+ ApiUrlSource_initEntries();
390
+ return ApiUrlSource_ARGUMENT_instance;
391
+ }
392
+ function ApiUrlSource_ENVIRONMENT_getInstance() {
393
+ ApiUrlSource_initEntries();
394
+ return ApiUrlSource_ENVIRONMENT_instance;
395
+ }
396
+ function ApiUrlSource_CODE_DEFAULT_getInstance() {
397
+ ApiUrlSource_initEntries();
398
+ return ApiUrlSource_CODE_DEFAULT_instance;
399
+ }
400
+ function get_DENIAL_REASON_FIELDS() {
401
+ _init_properties_AuthenticatedHttpClient_kt__ob7cgg();
402
+ return DENIAL_REASON_FIELDS;
403
+ }
404
+ var DENIAL_REASON_FIELDS;
405
+ function get_readMetadataHeaders() {
406
+ _init_properties_AuthenticatedHttpClient_kt__ob7cgg();
407
+ return readMetadataHeaders;
408
+ }
409
+ var readMetadataHeaders;
410
+ function AuthenticatedHttpClientFactory() {
411
+ }
412
+ function AuthenticatedHttpClient() {
413
+ }
414
+ function Success_0(body, headers, readHeadersValid) {
415
+ headers = headers === VOID ? emptyMap() : headers;
416
+ readHeadersValid = readHeadersValid === VOID ? true : readHeadersValid;
417
+ this.f5a_1 = body;
418
+ this.g5a_1 = headers;
419
+ this.h5a_1 = readHeadersValid;
420
+ }
421
+ protoOf(Success_0).toString = function () {
422
+ return 'Success(body=' + this.f5a_1 + ', headers=' + toString(this.g5a_1) + ', readHeadersValid=' + this.h5a_1 + ')';
423
+ };
424
+ protoOf(Success_0).hashCode = function () {
425
+ var result = getStringHashCode(this.f5a_1);
426
+ result = imul(result, 31) + hashCode(this.g5a_1) | 0;
427
+ result = imul(result, 31) + getBooleanHashCode(this.h5a_1) | 0;
428
+ return result;
429
+ };
430
+ protoOf(Success_0).equals = function (other) {
431
+ if (this === other)
432
+ return true;
433
+ if (!(other instanceof Success_0))
434
+ return false;
435
+ if (!(this.f5a_1 === other.f5a_1))
436
+ return false;
437
+ if (!equals(this.g5a_1, other.g5a_1))
438
+ return false;
439
+ if (!(this.h5a_1 === other.h5a_1))
440
+ return false;
441
+ return true;
442
+ };
443
+ function Failure(message, statusCode) {
444
+ statusCode = statusCode === VOID ? null : statusCode;
445
+ this.i5a_1 = message;
446
+ this.j5a_1 = statusCode;
447
+ }
448
+ protoOf(Failure).toString = function () {
449
+ return 'Failure(message=' + this.i5a_1 + ', statusCode=' + this.j5a_1 + ')';
450
+ };
451
+ protoOf(Failure).hashCode = function () {
452
+ var result = getStringHashCode(this.i5a_1);
453
+ result = imul(result, 31) + (this.j5a_1 == null ? 0 : this.j5a_1) | 0;
454
+ return result;
455
+ };
456
+ protoOf(Failure).equals = function (other) {
457
+ if (this === other)
458
+ return true;
459
+ if (!(other instanceof Failure))
460
+ return false;
461
+ if (!(this.i5a_1 === other.i5a_1))
462
+ return false;
463
+ if (!(this.j5a_1 == other.j5a_1))
464
+ return false;
465
+ return true;
466
+ };
467
+ function AuthenticatedHttpResponse(statusCode, body) {
468
+ this.k5a_1 = statusCode;
469
+ this.l5a_1 = body;
470
+ }
471
+ protoOf(AuthenticatedHttpResponse).toString = function () {
472
+ return 'AuthenticatedHttpResponse(statusCode=' + this.k5a_1 + ', body=' + this.l5a_1 + ')';
473
+ };
474
+ protoOf(AuthenticatedHttpResponse).hashCode = function () {
475
+ var result = this.k5a_1;
476
+ result = imul(result, 31) + getStringHashCode(this.l5a_1) | 0;
477
+ return result;
478
+ };
479
+ protoOf(AuthenticatedHttpResponse).equals = function (other) {
480
+ if (this === other)
481
+ return true;
482
+ if (!(other instanceof AuthenticatedHttpResponse))
483
+ return false;
484
+ if (!(this.k5a_1 === other.k5a_1))
485
+ return false;
486
+ if (!(this.l5a_1 === other.l5a_1))
487
+ return false;
488
+ return true;
489
+ };
490
+ function MultipartFile(partName, fileName, contentType, bytes) {
491
+ this.m5a_1 = partName;
492
+ this.n5a_1 = fileName;
493
+ this.o5a_1 = contentType;
494
+ this.p5a_1 = bytes;
495
+ }
496
+ protoOf(MultipartFile).toString = function () {
497
+ return 'MultipartFile(partName=' + this.m5a_1 + ', fileName=' + this.n5a_1 + ', contentType=' + this.o5a_1 + ', bytes=' + toString(this.p5a_1) + ')';
498
+ };
499
+ protoOf(MultipartFile).hashCode = function () {
500
+ var result = getStringHashCode(this.m5a_1);
501
+ result = imul(result, 31) + getStringHashCode(this.n5a_1) | 0;
502
+ result = imul(result, 31) + getStringHashCode(this.o5a_1) | 0;
503
+ result = imul(result, 31) + hashCode(this.p5a_1) | 0;
504
+ return result;
505
+ };
506
+ protoOf(MultipartFile).equals = function (other) {
507
+ if (this === other)
508
+ return true;
509
+ if (!(other instanceof MultipartFile))
510
+ return false;
511
+ if (!(this.m5a_1 === other.m5a_1))
512
+ return false;
513
+ if (!(this.n5a_1 === other.n5a_1))
514
+ return false;
515
+ if (!(this.o5a_1 === other.o5a_1))
516
+ return false;
517
+ if (!equals(this.p5a_1, other.p5a_1))
518
+ return false;
519
+ return true;
520
+ };
521
+ function KtorAuthenticatedHttpClientFactory(httpClientProvider) {
522
+ this.q5a_1 = httpClientProvider;
523
+ }
524
+ protoOf(KtorAuthenticatedHttpClientFactory).x59 = function (apiUrl, apiKey) {
525
+ return this.y59(apiUrl, new PersonalAccessToken(apiKey));
526
+ };
527
+ protoOf(KtorAuthenticatedHttpClientFactory).y59 = function (apiUrl, credential) {
528
+ return new KtorAuthenticatedHttpClient(this.q5a_1(), apiUrl, credential);
529
+ };
530
+ function execute($this, request, $completion) {
531
+ var tmp = new $executeCOROUTINE$($this, request, $completion);
532
+ tmp.y8_1 = Unit_instance;
533
+ tmp.z8_1 = null;
534
+ return tmp.e9();
535
+ }
536
+ function transportMessage($this, exception) {
537
+ var tmp0_safe_receiver = exception.message;
538
+ var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : substringBefore(tmp0_safe_receiver, _Char___init__impl__6a9atx(10));
539
+ var tmp;
540
+ if (tmp1_safe_receiver == null) {
541
+ tmp = null;
542
+ } else {
543
+ // Inline function 'kotlin.text.trim' call
544
+ tmp = toString(trim(isCharSequence(tmp1_safe_receiver) ? tmp1_safe_receiver : THROW_CCE()));
545
+ }
546
+ var tmp2_safe_receiver = tmp;
547
+ var tmp_0;
548
+ if (tmp2_safe_receiver == null) {
549
+ tmp_0 = null;
550
+ } else {
551
+ // Inline function 'kotlin.takeIf' call
552
+ var tmp_1;
553
+ // Inline function 'kotlin.text.isNotEmpty' call
554
+ if (charSequenceLength(tmp2_safe_receiver) > 0) {
555
+ tmp_1 = tmp2_safe_receiver;
556
+ } else {
557
+ tmp_1 = null;
558
+ }
559
+ tmp_0 = tmp_1;
560
+ }
561
+ var tmp3_safe_receiver = tmp_0;
562
+ var tmp4_elvis_lhs = tmp3_safe_receiver == null ? null : take(tmp3_safe_receiver, 200);
563
+ var tmp_2;
564
+ if (tmp4_elvis_lhs == null) {
565
+ return 'Backend is unreachable.';
566
+ } else {
567
+ tmp_2 = tmp4_elvis_lhs;
568
+ }
569
+ var detail = tmp_2;
570
+ return 'Backend is unreachable: ' + detail;
571
+ }
572
+ function toResult($this, _this__u8e3s4, $completion) {
573
+ var tmp = new $toResultCOROUTINE$($this, _this__u8e3s4, $completion);
574
+ tmp.y8_1 = Unit_instance;
575
+ tmp.z8_1 = null;
576
+ return tmp.e9();
577
+ }
578
+ function errorBodySnippet($this, _this__u8e3s4, $completion) {
579
+ var tmp = new $errorBodySnippetCOROUTINE$($this, _this__u8e3s4, $completion);
580
+ tmp.y8_1 = Unit_instance;
581
+ tmp.z8_1 = null;
582
+ return tmp.e9();
583
+ }
584
+ function denialReason($this, _this__u8e3s4, $completion) {
585
+ var tmp = new $denialReasonCOROUTINE$($this, _this__u8e3s4, $completion);
586
+ tmp.y8_1 = Unit_instance;
587
+ tmp.z8_1 = null;
588
+ return tmp.e9();
589
+ }
590
+ function textOf($this, _this__u8e3s4, field) {
591
+ var tmp = _this__u8e3s4.xd(field);
592
+ var tmp0_safe_receiver = tmp instanceof JsonPrimitive ? tmp : null;
593
+ var tmp_0;
594
+ if (tmp0_safe_receiver == null) {
595
+ tmp_0 = null;
596
+ } else {
597
+ // Inline function 'kotlin.takeIf' call
598
+ var tmp_1;
599
+ if (tmp0_safe_receiver.c38()) {
600
+ tmp_1 = tmp0_safe_receiver;
601
+ } else {
602
+ tmp_1 = null;
603
+ }
604
+ tmp_0 = tmp_1;
605
+ }
606
+ var tmp1_safe_receiver = tmp_0;
607
+ return tmp1_safe_receiver == null ? null : tmp1_safe_receiver.d38();
608
+ }
609
+ function withReason($this, _this__u8e3s4, reason) {
610
+ return reason == null ? _this__u8e3s4 : _this__u8e3s4 + ' Server: ' + reason;
611
+ }
612
+ function url_0($this, path) {
613
+ return trimEnd($this.l5c_1, charArrayOf([_Char___init__impl__6a9atx(47)])) + '/' + trimStart(path, charArrayOf([_Char___init__impl__6a9atx(47)]));
614
+ }
615
+ function authorizationHeader($this, _this__u8e3s4) {
616
+ header(_this__u8e3s4, HttpHeaders_getInstance().r2u_1, authorizationValue($this.m5c_1));
617
+ }
618
+ function KtorAuthenticatedHttpClient$get$slambda(this$0, $path, resultContinuation) {
619
+ this.v5c_1 = this$0;
620
+ this.w5c_1 = $path;
621
+ CoroutineImpl.call(this, resultContinuation);
622
+ }
623
+ protoOf(KtorAuthenticatedHttpClient$get$slambda).x5c = function ($completion) {
624
+ var tmp = this.n4t($completion);
625
+ tmp.y8_1 = Unit_instance;
626
+ tmp.z8_1 = null;
627
+ return tmp.e9();
628
+ };
629
+ protoOf(KtorAuthenticatedHttpClient$get$slambda).na = function ($completion) {
630
+ return this.x5c($completion);
631
+ };
632
+ protoOf(KtorAuthenticatedHttpClient$get$slambda).e9 = function () {
633
+ var suspendResult = this.y8_1;
634
+ $sm: do
635
+ try {
636
+ var tmp = this.w8_1;
637
+ switch (tmp) {
638
+ case 0:
639
+ this.x8_1 = 2;
640
+ var tmp0 = this.v5c_1.k5c_1;
641
+ var urlString = url_0(this.v5c_1, this.w5c_1);
642
+ var this_0 = new HttpRequestBuilder();
643
+ url(this_0, urlString);
644
+ authorizationHeader(this.v5c_1, this_0);
645
+ this_0.m3s_1 = Companion_getInstance().m2y_1;
646
+ this.w8_1 = 1;
647
+ suspendResult = (new HttpStatement(this_0, tmp0)).z4j(this);
648
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
649
+ return suspendResult;
650
+ }
651
+
652
+ continue $sm;
653
+ case 1:
654
+ return suspendResult;
655
+ case 2:
656
+ throw this.z8_1;
657
+ }
658
+ } catch ($p) {
659
+ var e = $p;
660
+ if (this.x8_1 === 2) {
661
+ throw e;
662
+ } else {
663
+ this.w8_1 = this.x8_1;
664
+ this.z8_1 = e;
665
+ }
666
+ }
667
+ while (true);
668
+ };
669
+ protoOf(KtorAuthenticatedHttpClient$get$slambda).n4t = function (completion) {
670
+ return new KtorAuthenticatedHttpClient$get$slambda(this.v5c_1, this.w5c_1, completion);
671
+ };
672
+ function KtorAuthenticatedHttpClient$get$slambda_0(this$0, $path, resultContinuation) {
673
+ var i = new KtorAuthenticatedHttpClient$get$slambda(this$0, $path, resultContinuation);
674
+ var l = function ($completion) {
675
+ return i.x5c($completion);
676
+ };
677
+ l.$arity = 0;
678
+ return l;
679
+ }
680
+ function KtorAuthenticatedHttpClient$post$slambda(this$0, $path, $body, resultContinuation) {
681
+ this.g5d_1 = this$0;
682
+ this.h5d_1 = $path;
683
+ this.i5d_1 = $body;
684
+ CoroutineImpl.call(this, resultContinuation);
685
+ }
686
+ protoOf(KtorAuthenticatedHttpClient$post$slambda).x5c = function ($completion) {
687
+ var tmp = this.n4t($completion);
688
+ tmp.y8_1 = Unit_instance;
689
+ tmp.z8_1 = null;
690
+ return tmp.e9();
691
+ };
692
+ protoOf(KtorAuthenticatedHttpClient$post$slambda).na = function ($completion) {
693
+ return this.x5c($completion);
694
+ };
695
+ protoOf(KtorAuthenticatedHttpClient$post$slambda).e9 = function () {
696
+ var suspendResult = this.y8_1;
697
+ $sm: do
698
+ try {
699
+ var tmp = this.w8_1;
700
+ switch (tmp) {
701
+ case 0:
702
+ this.x8_1 = 2;
703
+ var tmp0 = this.g5d_1.k5c_1;
704
+ var urlString = url_0(this.g5d_1, this.h5d_1);
705
+ var builder = new HttpRequestBuilder();
706
+ builder.m3s_1 = Companion_getInstance().n2y_1;
707
+ url(builder, urlString);
708
+ authorizationHeader(this.g5d_1, builder);
709
+ contentType(builder, Application_getInstance().k2s_1);
710
+ var body = this.i5d_1;
711
+ if (body == null) {
712
+ builder.o3s_1 = NullBody_instance;
713
+ var tmp_0 = PrimitiveClasses_getInstance().ec();
714
+ var tmp_1;
715
+ try {
716
+ tmp_1 = createKType(PrimitiveClasses_getInstance().ec(), arrayOf([]), false);
717
+ } catch ($p) {
718
+ var tmp_2;
719
+ if ($p instanceof Error) {
720
+ var _unused_var__etf5q3 = $p;
721
+ tmp_2 = null;
722
+ } else {
723
+ throw $p;
724
+ }
725
+ tmp_1 = tmp_2;
726
+ }
727
+ builder.g3y(new TypeInfo(tmp_0, tmp_1));
728
+ } else {
729
+ if (body instanceof OutgoingContent) {
730
+ builder.o3s_1 = body;
731
+ builder.g3y(null);
732
+ } else {
733
+ builder.o3s_1 = body;
734
+ var tmp_3 = PrimitiveClasses_getInstance().ec();
735
+ var tmp_4;
736
+ try {
737
+ tmp_4 = createKType(PrimitiveClasses_getInstance().ec(), arrayOf([]), false);
738
+ } catch ($p) {
739
+ var tmp_5;
740
+ if ($p instanceof Error) {
741
+ var _unused_var__etf5q3_0 = $p;
742
+ tmp_5 = null;
743
+ } else {
744
+ throw $p;
745
+ }
746
+ tmp_4 = tmp_5;
747
+ }
748
+ builder.g3y(new TypeInfo(tmp_3, tmp_4));
749
+ }
750
+ }
751
+
752
+ builder.m3s_1 = Companion_getInstance().n2y_1;
753
+ this.w8_1 = 1;
754
+ suspendResult = (new HttpStatement(builder, tmp0)).z4j(this);
755
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
756
+ return suspendResult;
757
+ }
758
+
759
+ continue $sm;
760
+ case 1:
761
+ return suspendResult;
762
+ case 2:
763
+ throw this.z8_1;
764
+ }
765
+ } catch ($p) {
766
+ var e = $p;
767
+ if (this.x8_1 === 2) {
768
+ throw e;
769
+ } else {
770
+ this.w8_1 = this.x8_1;
771
+ this.z8_1 = e;
772
+ }
773
+ }
774
+ while (true);
775
+ };
776
+ protoOf(KtorAuthenticatedHttpClient$post$slambda).n4t = function (completion) {
777
+ return new KtorAuthenticatedHttpClient$post$slambda(this.g5d_1, this.h5d_1, this.i5d_1, completion);
778
+ };
779
+ function KtorAuthenticatedHttpClient$post$slambda_0(this$0, $path, $body, resultContinuation) {
780
+ var i = new KtorAuthenticatedHttpClient$post$slambda(this$0, $path, $body, resultContinuation);
781
+ var l = function ($completion) {
782
+ return i.x5c($completion);
783
+ };
784
+ l.$arity = 0;
785
+ return l;
786
+ }
787
+ function KtorAuthenticatedHttpClient$postMultipart$lambda($files) {
788
+ return function ($this$formData) {
789
+ // Inline function 'kotlin.collections.forEach' call
790
+ var _iterator__ex2g4s = $files.l();
791
+ while (_iterator__ex2g4s.m()) {
792
+ var element = _iterator__ex2g4s.n();
793
+ // Inline function 'io.ktor.http.Companion.build' call
794
+ Companion_getInstance_0();
795
+ // Inline function 'kotlin.apply' call
796
+ var this_0 = new HeadersBuilder();
797
+ this_0.o2n(HttpHeaders_getInstance().a2v_1, element.o5a_1);
798
+ this_0.o2n(HttpHeaders_getInstance().u2u_1, Companion_getInstance_1().n2r_1.a2s('filename', element.n5a_1).toString());
799
+ var tmp$ret$2 = this_0.h2u();
800
+ $this$formData.c4k(element.m5a_1, element.p5a_1, tmp$ret$2);
801
+ }
802
+ return Unit_instance;
803
+ };
804
+ }
805
+ function $postJsonCOROUTINE$(_this__u8e3s4, path, body, resultContinuation) {
806
+ CoroutineImpl.call(this, resultContinuation);
807
+ this.r5d_1 = _this__u8e3s4;
808
+ this.s5d_1 = path;
809
+ this.t5d_1 = body;
810
+ }
811
+ protoOf($postJsonCOROUTINE$).e9 = function () {
812
+ var suspendResult = this.y8_1;
813
+ $sm: do
814
+ try {
815
+ var tmp = this.w8_1;
816
+ switch (tmp) {
817
+ case 0:
818
+ this.x8_1 = 3;
819
+ var tmp0 = this.r5d_1.k5c_1;
820
+ var urlString = url_0(this.r5d_1, this.s5d_1);
821
+ var builder = new HttpRequestBuilder();
822
+ builder.m3s_1 = Companion_getInstance().n2y_1;
823
+ url(builder, urlString);
824
+ authorizationHeader(this.r5d_1, builder);
825
+ contentType(builder, Application_getInstance().k2s_1);
826
+ var body = this.t5d_1;
827
+ if (body == null) {
828
+ builder.o3s_1 = NullBody_instance;
829
+ var tmp_0 = PrimitiveClasses_getInstance().ec();
830
+ var tmp_1;
831
+ try {
832
+ tmp_1 = createKType(PrimitiveClasses_getInstance().ec(), arrayOf([]), false);
833
+ } catch ($p) {
834
+ var tmp_2;
835
+ if ($p instanceof Error) {
836
+ var _unused_var__etf5q3 = $p;
837
+ tmp_2 = null;
838
+ } else {
839
+ throw $p;
840
+ }
841
+ tmp_1 = tmp_2;
842
+ }
843
+ builder.g3y(new TypeInfo(tmp_0, tmp_1));
844
+ } else {
845
+ if (body instanceof OutgoingContent) {
846
+ builder.o3s_1 = body;
847
+ builder.g3y(null);
848
+ } else {
849
+ builder.o3s_1 = body;
850
+ var tmp_3 = PrimitiveClasses_getInstance().ec();
851
+ var tmp_4;
852
+ try {
853
+ tmp_4 = createKType(PrimitiveClasses_getInstance().ec(), arrayOf([]), false);
854
+ } catch ($p) {
855
+ var tmp_5;
856
+ if ($p instanceof Error) {
857
+ var _unused_var__etf5q3_0 = $p;
858
+ tmp_5 = null;
859
+ } else {
860
+ throw $p;
861
+ }
862
+ tmp_4 = tmp_5;
863
+ }
864
+ builder.g3y(new TypeInfo(tmp_3, tmp_4));
865
+ }
866
+ }
867
+
868
+ builder.m3s_1 = Companion_getInstance().n2y_1;
869
+ this.w8_1 = 1;
870
+ suspendResult = (new HttpStatement(builder, tmp0)).z4j(this);
871
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
872
+ return suspendResult;
873
+ }
874
+
875
+ continue $sm;
876
+ case 1:
877
+ var response = suspendResult;
878
+ this.u5d_1 = response.k3u().h31_1;
879
+ this.w8_1 = 2;
880
+ suspendResult = bodyAsText(response, VOID, this);
881
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
882
+ return suspendResult;
883
+ }
884
+
885
+ continue $sm;
886
+ case 2:
887
+ var ARGUMENT = suspendResult;
888
+ return new AuthenticatedHttpResponse(this.u5d_1, ARGUMENT);
889
+ case 3:
890
+ throw this.z8_1;
891
+ }
892
+ } catch ($p) {
893
+ var e = $p;
894
+ if (this.x8_1 === 3) {
895
+ throw e;
896
+ } else {
897
+ this.w8_1 = this.x8_1;
898
+ this.z8_1 = e;
899
+ }
900
+ }
901
+ while (true);
902
+ };
903
+ function $postMultipartCOROUTINE$(_this__u8e3s4, path, files, resultContinuation) {
904
+ CoroutineImpl.call(this, resultContinuation);
905
+ this.d5e_1 = _this__u8e3s4;
906
+ this.e5e_1 = path;
907
+ this.f5e_1 = files;
908
+ }
909
+ protoOf($postMultipartCOROUTINE$).e9 = function () {
910
+ var suspendResult = this.y8_1;
911
+ $sm: do
912
+ try {
913
+ var tmp = this.w8_1;
914
+ switch (tmp) {
915
+ case 0:
916
+ this.x8_1 = 3;
917
+ var tmp0 = this.d5e_1.k5c_1;
918
+ var urlString = url_0(this.d5e_1, this.e5e_1);
919
+ var builder = new HttpRequestBuilder();
920
+ builder.m3s_1 = Companion_getInstance().n2y_1;
921
+ url(builder, urlString);
922
+ authorizationHeader(this.d5e_1, builder);
923
+ var body = new MultiPartFormDataContent(formData(KtorAuthenticatedHttpClient$postMultipart$lambda(this.f5e_1)));
924
+ if (body == null) {
925
+ builder.o3s_1 = NullBody_instance;
926
+ var tmp_0 = getKClass(MultiPartFormDataContent);
927
+ var tmp_1;
928
+ try {
929
+ tmp_1 = createKType(getKClass(MultiPartFormDataContent), arrayOf([]), false);
930
+ } catch ($p) {
931
+ var tmp_2;
932
+ if ($p instanceof Error) {
933
+ var _unused_var__etf5q3 = $p;
934
+ tmp_2 = null;
935
+ } else {
936
+ throw $p;
937
+ }
938
+ tmp_1 = tmp_2;
939
+ }
940
+ builder.g3y(new TypeInfo(tmp_0, tmp_1));
941
+ } else {
942
+ if (body instanceof OutgoingContent) {
943
+ builder.o3s_1 = body;
944
+ builder.g3y(null);
945
+ } else {
946
+ builder.o3s_1 = body;
947
+ var tmp_3 = getKClass(MultiPartFormDataContent);
948
+ var tmp_4;
949
+ try {
950
+ tmp_4 = createKType(getKClass(MultiPartFormDataContent), arrayOf([]), false);
951
+ } catch ($p) {
952
+ var tmp_5;
953
+ if ($p instanceof Error) {
954
+ var _unused_var__etf5q3_0 = $p;
955
+ tmp_5 = null;
956
+ } else {
957
+ throw $p;
958
+ }
959
+ tmp_4 = tmp_5;
960
+ }
961
+ builder.g3y(new TypeInfo(tmp_3, tmp_4));
962
+ }
963
+ }
964
+
965
+ builder.m3s_1 = Companion_getInstance().n2y_1;
966
+ this.w8_1 = 1;
967
+ suspendResult = (new HttpStatement(builder, tmp0)).z4j(this);
968
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
969
+ return suspendResult;
970
+ }
971
+
972
+ continue $sm;
973
+ case 1:
974
+ var response = suspendResult;
975
+ this.g5e_1 = response.k3u().h31_1;
976
+ this.w8_1 = 2;
977
+ suspendResult = bodyAsText(response, VOID, this);
978
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
979
+ return suspendResult;
980
+ }
981
+
982
+ continue $sm;
983
+ case 2:
984
+ var ARGUMENT = suspendResult;
985
+ return new AuthenticatedHttpResponse(this.g5e_1, ARGUMENT);
986
+ case 3:
987
+ throw this.z8_1;
988
+ }
989
+ } catch ($p) {
990
+ var e = $p;
991
+ if (this.x8_1 === 3) {
992
+ throw e;
993
+ } else {
994
+ this.w8_1 = this.x8_1;
995
+ this.z8_1 = e;
996
+ }
997
+ }
998
+ while (true);
999
+ };
1000
+ function $executeCOROUTINE$(_this__u8e3s4, request, resultContinuation) {
1001
+ CoroutineImpl.call(this, resultContinuation);
1002
+ this.z5a_1 = _this__u8e3s4;
1003
+ this.a5b_1 = request;
1004
+ }
1005
+ protoOf($executeCOROUTINE$).e9 = function () {
1006
+ var suspendResult = this.y8_1;
1007
+ $sm: do
1008
+ try {
1009
+ var tmp = this.w8_1;
1010
+ switch (tmp) {
1011
+ case 0:
1012
+ this.x8_1 = 4;
1013
+ this.x8_1 = 3;
1014
+ this.w8_1 = 1;
1015
+ suspendResult = this.a5b_1(this);
1016
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1017
+ return suspendResult;
1018
+ }
1019
+
1020
+ continue $sm;
1021
+ case 1:
1022
+ var ARGUMENT = suspendResult;
1023
+ this.w8_1 = 2;
1024
+ suspendResult = toResult(this.z5a_1, ARGUMENT, this);
1025
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1026
+ return suspendResult;
1027
+ }
1028
+
1029
+ continue $sm;
1030
+ case 2:
1031
+ this.b5b_1 = suspendResult;
1032
+ this.x8_1 = 4;
1033
+ this.w8_1 = 5;
1034
+ continue $sm;
1035
+ case 3:
1036
+ this.x8_1 = 4;
1037
+ var tmp_0 = this.z8_1;
1038
+ if (tmp_0 instanceof CancellationException) {
1039
+ var exception = this.z8_1;
1040
+ var tmp_1 = this;
1041
+ throw exception;
1042
+ } else {
1043
+ var tmp_2 = this.z8_1;
1044
+ if (tmp_2 instanceof Exception) {
1045
+ var exception_0 = this.z8_1;
1046
+ var tmp_3 = this;
1047
+ tmp_3.b5b_1 = new Failure('Status: failed. ' + transportMessage(this.z5a_1, exception_0));
1048
+ this.w8_1 = 5;
1049
+ continue $sm;
1050
+ } else {
1051
+ throw this.z8_1;
1052
+ }
1053
+ }
1054
+
1055
+ case 4:
1056
+ throw this.z8_1;
1057
+ case 5:
1058
+ this.x8_1 = 4;
1059
+ return this.b5b_1;
1060
+ }
1061
+ } catch ($p) {
1062
+ var e = $p;
1063
+ if (this.x8_1 === 4) {
1064
+ throw e;
1065
+ } else {
1066
+ this.w8_1 = this.x8_1;
1067
+ this.z8_1 = e;
1068
+ }
1069
+ }
1070
+ while (true);
1071
+ };
1072
+ function $toResultCOROUTINE$(_this__u8e3s4, _this__u8e3s4_0, resultContinuation) {
1073
+ CoroutineImpl.call(this, resultContinuation);
1074
+ this.k5b_1 = _this__u8e3s4;
1075
+ this.l5b_1 = _this__u8e3s4_0;
1076
+ }
1077
+ protoOf($toResultCOROUTINE$).e9 = function () {
1078
+ var suspendResult = this.y8_1;
1079
+ $sm: do
1080
+ try {
1081
+ var tmp = this.w8_1;
1082
+ switch (tmp) {
1083
+ case 0:
1084
+ this.x8_1 = 6;
1085
+ if (isSuccess(this.l5b_1.k3u())) {
1086
+ this.w8_1 = 4;
1087
+ suspendResult = bodyAsText(this.l5b_1, VOID, this);
1088
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1089
+ return suspendResult;
1090
+ }
1091
+ continue $sm;
1092
+ } else {
1093
+ if (this.l5b_1.k3u().equals(Companion_getInstance_2().z2z_1)) {
1094
+ this.w8_1 = 3;
1095
+ suspendResult = denialReason(this.k5b_1, this.l5b_1, this);
1096
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1097
+ return suspendResult;
1098
+ }
1099
+ continue $sm;
1100
+ } else {
1101
+ if (this.l5b_1.k3u().equals(Companion_getInstance_2().b30_1)) {
1102
+ this.w8_1 = 2;
1103
+ suspendResult = denialReason(this.k5b_1, this.l5b_1, this);
1104
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1105
+ return suspendResult;
1106
+ }
1107
+ continue $sm;
1108
+ } else {
1109
+ if (this.l5b_1.k3u().equals(Companion_getInstance_2().c30_1)) {
1110
+ this.m5b_1 = new Failure('Status: not found. Project or resource was not found.', this.l5b_1.k3u().h31_1);
1111
+ this.w8_1 = 5;
1112
+ continue $sm;
1113
+ } else {
1114
+ this.n5b_1 = this.l5b_1.k3u().h31_1;
1115
+ this.w8_1 = 1;
1116
+ suspendResult = errorBodySnippet(this.k5b_1, this.l5b_1, this);
1117
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1118
+ return suspendResult;
1119
+ }
1120
+ continue $sm;
1121
+ }
1122
+ }
1123
+ }
1124
+ }
1125
+
1126
+ case 1:
1127
+ var ARGUMENT = suspendResult;
1128
+ var ARGUMENT_0 = 'Status: failed. Backend returned HTTP ' + this.n5b_1 + ': ' + ARGUMENT;
1129
+ this.m5b_1 = new Failure(ARGUMENT_0, this.l5b_1.k3u().h31_1);
1130
+ this.w8_1 = 5;
1131
+ continue $sm;
1132
+ case 2:
1133
+ var ARGUMENT_1 = suspendResult;
1134
+ var ARGUMENT_2 = withReason(this.k5b_1, 'Status: forbidden. Credential has no access to this project.', ARGUMENT_1);
1135
+ this.m5b_1 = new Failure(ARGUMENT_2, this.l5b_1.k3u().h31_1);
1136
+ this.w8_1 = 5;
1137
+ continue $sm;
1138
+ case 3:
1139
+ var ARGUMENT_3 = suspendResult;
1140
+ var ARGUMENT_4 = withReason(this.k5b_1, 'Status: unauthorized. Credential is missing or invalid.', ARGUMENT_3);
1141
+ this.m5b_1 = new Failure(ARGUMENT_4, this.l5b_1.k3u().h31_1);
1142
+ this.w8_1 = 5;
1143
+ continue $sm;
1144
+ case 4:
1145
+ var ARGUMENT_5 = suspendResult;
1146
+ this.m5b_1 = new Success_0(ARGUMENT_5, safeEditorHeaders(this.l5b_1.l2y(), get_readMetadataHeaders()), unambiguousEditorHeaders(this.l5b_1.l2y(), get_readMetadataHeaders()));
1147
+ this.w8_1 = 5;
1148
+ continue $sm;
1149
+ case 5:
1150
+ return this.m5b_1;
1151
+ case 6:
1152
+ throw this.z8_1;
1153
+ }
1154
+ } catch ($p) {
1155
+ var e = $p;
1156
+ if (this.x8_1 === 6) {
1157
+ throw e;
1158
+ } else {
1159
+ this.w8_1 = this.x8_1;
1160
+ this.z8_1 = e;
1161
+ }
1162
+ }
1163
+ while (true);
1164
+ };
1165
+ function $errorBodySnippetCOROUTINE$(_this__u8e3s4, _this__u8e3s4_0, resultContinuation) {
1166
+ CoroutineImpl.call(this, resultContinuation);
1167
+ this.w5b_1 = _this__u8e3s4;
1168
+ this.x5b_1 = _this__u8e3s4_0;
1169
+ }
1170
+ protoOf($errorBodySnippetCOROUTINE$).e9 = function () {
1171
+ var suspendResult = this.y8_1;
1172
+ $sm: do
1173
+ try {
1174
+ var tmp = this.w8_1;
1175
+ switch (tmp) {
1176
+ case 0:
1177
+ this.x8_1 = 2;
1178
+ this.w8_1 = 1;
1179
+ suspendResult = bodyAsText(this.x5b_1, VOID, this);
1180
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1181
+ return suspendResult;
1182
+ }
1183
+
1184
+ continue $sm;
1185
+ case 1:
1186
+ var ARGUMENT = suspendResult;
1187
+ var this_0 = substringBefore(ARGUMENT, _Char___init__impl__6a9atx(10));
1188
+ var this_1 = toString(trim(isCharSequence(this_0) ? this_0 : THROW_CCE()));
1189
+ var tmp_0;
1190
+ if (charSequenceLength(this_1) > 0) {
1191
+ tmp_0 = this_1;
1192
+ } else {
1193
+ tmp_0 = null;
1194
+ }
1195
+
1196
+ var tmp0_safe_receiver = tmp_0;
1197
+ var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : take(tmp0_safe_receiver, 200);
1198
+ return tmp1_elvis_lhs == null ? '(empty body)' : tmp1_elvis_lhs;
1199
+ case 2:
1200
+ throw this.z8_1;
1201
+ }
1202
+ } catch ($p) {
1203
+ var e = $p;
1204
+ if (this.x8_1 === 2) {
1205
+ throw e;
1206
+ } else {
1207
+ this.w8_1 = this.x8_1;
1208
+ this.z8_1 = e;
1209
+ }
1210
+ }
1211
+ while (true);
1212
+ };
1213
+ function $denialReasonCOROUTINE$(_this__u8e3s4, _this__u8e3s4_0, resultContinuation) {
1214
+ CoroutineImpl.call(this, resultContinuation);
1215
+ this.g5c_1 = _this__u8e3s4;
1216
+ this.h5c_1 = _this__u8e3s4_0;
1217
+ }
1218
+ protoOf($denialReasonCOROUTINE$).e9 = function () {
1219
+ var suspendResult = this.y8_1;
1220
+ $sm: do
1221
+ try {
1222
+ var tmp = this.w8_1;
1223
+ switch (tmp) {
1224
+ case 0:
1225
+ this.x8_1 = 3;
1226
+ this.x8_1 = 2;
1227
+ this.j5c_1 = Default_getInstance();
1228
+ this.w8_1 = 1;
1229
+ suspendResult = bodyAsText(this.h5c_1, VOID, this);
1230
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1231
+ return suspendResult;
1232
+ }
1233
+
1234
+ continue $sm;
1235
+ case 1:
1236
+ var ARGUMENT = suspendResult;
1237
+ var tmp_0 = this;
1238
+ var tmp_1 = this.j5c_1.s35(ARGUMENT);
1239
+ tmp_0.i5c_1 = tmp_1 instanceof JsonObject ? tmp_1 : null;
1240
+ this.x8_1 = 3;
1241
+ this.w8_1 = 4;
1242
+ continue $sm;
1243
+ case 2:
1244
+ this.x8_1 = 3;
1245
+ var tmp_2 = this.z8_1;
1246
+ if (tmp_2 instanceof IllegalArgumentException) {
1247
+ var exception = this.z8_1;
1248
+ var tmp_3 = this;
1249
+ tmp_3.i5c_1 = null;
1250
+ this.w8_1 = 4;
1251
+ continue $sm;
1252
+ } else {
1253
+ throw this.z8_1;
1254
+ }
1255
+
1256
+ case 3:
1257
+ throw this.z8_1;
1258
+ case 4:
1259
+ this.x8_1 = 3;
1260
+ var body = this.i5c_1;
1261
+ var tmp_4;
1262
+ if (body == null) {
1263
+ tmp_4 = null;
1264
+ } else {
1265
+ var tmp0 = get_DENIAL_REASON_FIELDS();
1266
+ var tmp$ret$0;
1267
+ l$ret$1: do {
1268
+ var _iterator__ex2g4s = tmp0.l();
1269
+ while (_iterator__ex2g4s.m()) {
1270
+ var element = _iterator__ex2g4s.n();
1271
+ var result = textOf(this.g5c_1, body, element);
1272
+ if (!(result == null)) {
1273
+ tmp$ret$0 = result;
1274
+ break l$ret$1;
1275
+ }
1276
+ }
1277
+ tmp$ret$0 = null;
1278
+ }
1279
+ while (false);
1280
+ tmp_4 = tmp$ret$0;
1281
+ }
1282
+
1283
+ var tmp1_safe_receiver = tmp_4;
1284
+ var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : substringBefore(tmp1_safe_receiver, _Char___init__impl__6a9atx(10));
1285
+ var tmp_5;
1286
+ if (tmp2_safe_receiver == null) {
1287
+ tmp_5 = null;
1288
+ } else {
1289
+ tmp_5 = toString(trim(isCharSequence(tmp2_safe_receiver) ? tmp2_safe_receiver : THROW_CCE()));
1290
+ }
1291
+
1292
+ var tmp3_safe_receiver = tmp_5;
1293
+ var tmp_6;
1294
+ if (tmp3_safe_receiver == null) {
1295
+ tmp_6 = null;
1296
+ } else {
1297
+ var tmp_7;
1298
+ if (charSequenceLength(tmp3_safe_receiver) > 0) {
1299
+ tmp_7 = tmp3_safe_receiver;
1300
+ } else {
1301
+ tmp_7 = null;
1302
+ }
1303
+ tmp_6 = tmp_7;
1304
+ }
1305
+
1306
+ var tmp4_safe_receiver = tmp_6;
1307
+ return tmp4_safe_receiver == null ? null : take(tmp4_safe_receiver, 200);
1308
+ }
1309
+ } catch ($p) {
1310
+ var e = $p;
1311
+ if (this.x8_1 === 3) {
1312
+ throw e;
1313
+ } else {
1314
+ this.w8_1 = this.x8_1;
1315
+ this.z8_1 = e;
1316
+ }
1317
+ }
1318
+ while (true);
1319
+ };
1320
+ function KtorAuthenticatedHttpClient(httpClient, apiUrl, credential) {
1321
+ this.k5c_1 = httpClient;
1322
+ this.l5c_1 = apiUrl;
1323
+ this.m5c_1 = credential;
1324
+ }
1325
+ protoOf(KtorAuthenticatedHttpClient).z59 = function (path, $completion) {
1326
+ return execute(this, KtorAuthenticatedHttpClient$get$slambda_0(this, path, null), $completion);
1327
+ };
1328
+ protoOf(KtorAuthenticatedHttpClient).a5a = function (path, body, $completion) {
1329
+ return execute(this, KtorAuthenticatedHttpClient$post$slambda_0(this, path, body, null), $completion);
1330
+ };
1331
+ protoOf(KtorAuthenticatedHttpClient).b5a = function (request, $completion) {
1332
+ return executeMutation(this.k5c_1, url_0(this, request.i5e_1), this.m5c_1, request, $completion);
1333
+ };
1334
+ protoOf(KtorAuthenticatedHttpClient).c5a = function (path, body, $completion) {
1335
+ var tmp = new $postJsonCOROUTINE$(this, path, body, $completion);
1336
+ tmp.y8_1 = Unit_instance;
1337
+ tmp.z8_1 = null;
1338
+ return tmp.e9();
1339
+ };
1340
+ protoOf(KtorAuthenticatedHttpClient).d5a = function (path, file, $completion) {
1341
+ return this.e5a(path, listOf(file), $completion);
1342
+ };
1343
+ protoOf(KtorAuthenticatedHttpClient).e5a = function (path, files, $completion) {
1344
+ var tmp = new $postMultipartCOROUTINE$(this, path, files, $completion);
1345
+ tmp.y8_1 = Unit_instance;
1346
+ tmp.z8_1 = null;
1347
+ return tmp.e9();
1348
+ };
1349
+ var properties_initialized_AuthenticatedHttpClient_kt_fn912q;
1350
+ function _init_properties_AuthenticatedHttpClient_kt__ob7cgg() {
1351
+ if (!properties_initialized_AuthenticatedHttpClient_kt_fn912q) {
1352
+ properties_initialized_AuthenticatedHttpClient_kt_fn912q = true;
1353
+ DENIAL_REASON_FIELDS = listOf_0(['error', 'message']);
1354
+ readMetadataHeaders = setOf(['x-ds-read-context', 'x-ds-page-limit', 'x-ds-next-cursor']);
1355
+ }
1356
+ }
1357
+ function get_editorCommandJson() {
1358
+ _init_properties_EditorEndpoint_kt__hwjs02();
1359
+ return editorCommandJson;
1360
+ }
1361
+ var editorCommandJson;
1362
+ function get_pathParameter() {
1363
+ _init_properties_EditorEndpoint_kt__hwjs02();
1364
+ return pathParameter;
1365
+ }
1366
+ var pathParameter;
1367
+ function EditorEndpoint$request$lambda(it) {
1368
+ return it.le().p(1);
1369
+ }
1370
+ function EditorEndpoint$request$lambda$lambda(it) {
1371
+ return get_jsonPrimitive(it).d38();
1372
+ }
1373
+ function EditorEndpoint$request$lambda_0($command) {
1374
+ return function (name) {
1375
+ var value = getValue($command, name);
1376
+ var tmp;
1377
+ if (value instanceof JsonArray) {
1378
+ tmp = joinToString(value, ',', VOID, VOID, VOID, VOID, EditorEndpoint$request$lambda$lambda);
1379
+ } else {
1380
+ tmp = get_jsonPrimitive(value).d38();
1381
+ }
1382
+ var text = tmp;
1383
+ return name + '=' + encodeURLParameter(text);
1384
+ };
1385
+ }
1386
+ function EditorEndpoint(method, path, bodyField, sendsBody, queryFields, confirmationPath) {
1387
+ bodyField = bodyField === VOID ? null : bodyField;
1388
+ sendsBody = sendsBody === VOID ? true : sendsBody;
1389
+ queryFields = queryFields === VOID ? emptyList() : queryFields;
1390
+ confirmationPath = confirmationPath === VOID ? null : confirmationPath;
1391
+ this.n5e_1 = method;
1392
+ this.o5e_1 = path;
1393
+ this.p5e_1 = bodyField;
1394
+ this.q5e_1 = sendsBody;
1395
+ this.r5e_1 = queryFields;
1396
+ this.s5e_1 = confirmationPath;
1397
+ }
1398
+ protoOf(EditorEndpoint).t5e = function (root, command, key, baseRevision) {
1399
+ var tmp = get_pathParameter().od(this.o5e_1);
1400
+ var routeFields = toSet(map(tmp, EditorEndpoint$request$lambda));
1401
+ // Inline function 'kotlin.collections.filter' call
1402
+ var tmp0 = this.r5e_1;
1403
+ // Inline function 'kotlin.collections.filterTo' call
1404
+ var destination = ArrayList_init_$Create$();
1405
+ var _iterator__ex2g4s = tmp0.l();
1406
+ while (_iterator__ex2g4s.m()) {
1407
+ var element = _iterator__ex2g4s.n();
1408
+ if (command.z2l(element)) {
1409
+ destination.j(element);
1410
+ }
1411
+ }
1412
+ var tmp_0 = destination;
1413
+ var query = joinToString(tmp_0, '&', VOID, VOID, VOID, VOID, EditorEndpoint$request$lambda_0(command));
1414
+ var tmp_1;
1415
+ if (!this.q5e_1) {
1416
+ tmp_1 = null;
1417
+ } else {
1418
+ var tmp0_safe_receiver = this.p5e_1;
1419
+ var tmp_2;
1420
+ if (tmp0_safe_receiver == null) {
1421
+ tmp_2 = null;
1422
+ } else {
1423
+ // Inline function 'kotlin.let' call
1424
+ tmp_2 = get_jsonObject(getValue(command, tmp0_safe_receiver));
1425
+ }
1426
+ var tmp1_elvis_lhs = tmp_2;
1427
+ var tmp_3;
1428
+ if (tmp1_elvis_lhs == null) {
1429
+ // Inline function 'kotlin.collections.filterKeys' call
1430
+ var result = LinkedHashMap_init_$Create$();
1431
+ // Inline function 'kotlin.collections.iterator' call
1432
+ var _iterator__ex2g4s_0 = command.w().l();
1433
+ while (_iterator__ex2g4s_0.m()) {
1434
+ var entry = _iterator__ex2g4s_0.n();
1435
+ var it = entry.x();
1436
+ if (!(it === 'operation') && !routeFields.t(it) && !this.r5e_1.t(it)) {
1437
+ result.f2(entry.x(), entry.y());
1438
+ }
1439
+ }
1440
+ tmp_3 = new JsonObject(result);
1441
+ } else {
1442
+ tmp_3 = tmp1_elvis_lhs;
1443
+ }
1444
+ var payload = tmp_3;
1445
+ tmp_1 = payload.toString();
1446
+ }
1447
+ var body = tmp_1;
1448
+ // Inline function 'kotlin.takeIf' call
1449
+ var tmp_4;
1450
+ // Inline function 'kotlin.text.isNotEmpty' call
1451
+ if (charSequenceLength(query) > 0) {
1452
+ tmp_4 = query;
1453
+ } else {
1454
+ tmp_4 = null;
1455
+ }
1456
+ var tmp2_safe_receiver = tmp_4;
1457
+ var tmp_5;
1458
+ if (tmp2_safe_receiver == null) {
1459
+ tmp_5 = null;
1460
+ } else {
1461
+ // Inline function 'kotlin.let' call
1462
+ tmp_5 = '?' + tmp2_safe_receiver;
1463
+ }
1464
+ // Inline function 'kotlin.text.orEmpty' call
1465
+ var tmp0_elvis_lhs = tmp_5;
1466
+ var suffix = tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs;
1467
+ return new HttpMutationRequest(this.n5e_1, root + render(this.o5e_1, command) + suffix, body, key, baseRevision);
1468
+ };
1469
+ protoOf(EditorEndpoint).u5e = function (root, command) {
1470
+ var tmp0_safe_receiver = this.s5e_1;
1471
+ var tmp;
1472
+ if (tmp0_safe_receiver == null) {
1473
+ tmp = null;
1474
+ } else {
1475
+ // Inline function 'kotlin.let' call
1476
+ tmp = root + render(tmp0_safe_receiver, command);
1477
+ }
1478
+ return tmp;
1479
+ };
1480
+ protoOf(EditorEndpoint).toString = function () {
1481
+ return 'EditorEndpoint(method=' + this.n5e_1.toString() + ', path=' + this.o5e_1 + ', bodyField=' + this.p5e_1 + ', sendsBody=' + this.q5e_1 + ', queryFields=' + toString(this.r5e_1) + ', confirmationPath=' + this.s5e_1 + ')';
1482
+ };
1483
+ protoOf(EditorEndpoint).hashCode = function () {
1484
+ var result = this.n5e_1.hashCode();
1485
+ result = imul(result, 31) + getStringHashCode(this.o5e_1) | 0;
1486
+ result = imul(result, 31) + (this.p5e_1 == null ? 0 : getStringHashCode(this.p5e_1)) | 0;
1487
+ result = imul(result, 31) + getBooleanHashCode(this.q5e_1) | 0;
1488
+ result = imul(result, 31) + hashCode(this.r5e_1) | 0;
1489
+ result = imul(result, 31) + (this.s5e_1 == null ? 0 : getStringHashCode(this.s5e_1)) | 0;
1490
+ return result;
1491
+ };
1492
+ protoOf(EditorEndpoint).equals = function (other) {
1493
+ if (this === other)
1494
+ return true;
1495
+ if (!(other instanceof EditorEndpoint))
1496
+ return false;
1497
+ if (!this.n5e_1.equals(other.n5e_1))
1498
+ return false;
1499
+ if (!(this.o5e_1 === other.o5e_1))
1500
+ return false;
1501
+ if (!(this.p5e_1 == other.p5e_1))
1502
+ return false;
1503
+ if (!(this.q5e_1 === other.q5e_1))
1504
+ return false;
1505
+ if (!equals(this.r5e_1, other.r5e_1))
1506
+ return false;
1507
+ if (!(this.s5e_1 == other.s5e_1))
1508
+ return false;
1509
+ return true;
1510
+ };
1511
+ function render(path, command) {
1512
+ _init_properties_EditorEndpoint_kt__hwjs02();
1513
+ var tmp = get_pathParameter();
1514
+ return tmp.rd(path, render$lambda(command));
1515
+ }
1516
+ function editorCommandJson$lambda($this$Json) {
1517
+ _init_properties_EditorEndpoint_kt__hwjs02();
1518
+ $this$Json.o36_1 = 'operation';
1519
+ return Unit_instance;
1520
+ }
1521
+ function render$lambda($command) {
1522
+ return function (match) {
1523
+ return encodeEditorId(get_jsonPrimitive(getValue($command, match.le().p(1))).d38());
1524
+ };
1525
+ }
1526
+ var properties_initialized_EditorEndpoint_kt_93ibxg;
1527
+ function _init_properties_EditorEndpoint_kt__hwjs02() {
1528
+ if (!properties_initialized_EditorEndpoint_kt_93ibxg) {
1529
+ properties_initialized_EditorEndpoint_kt_93ibxg = true;
1530
+ editorCommandJson = Json(VOID, editorCommandJson$lambda);
1531
+ pathParameter = Regex_init_$Create$('\\{([A-Za-z][A-Za-z0-9]*)\\}');
1532
+ }
1533
+ }
1534
+ function get_editorId() {
1535
+ _init_properties_EditorId_kt__s9p08o();
1536
+ return editorId;
1537
+ }
1538
+ var editorId;
1539
+ function encodeEditorId(_this__u8e3s4) {
1540
+ _init_properties_EditorId_kt__s9p08o();
1541
+ // Inline function 'kotlin.require' call
1542
+ if (!get_editorId().ld(_this__u8e3s4)) {
1543
+ var message = 'Invalid editor resource identifier.';
1544
+ throw IllegalArgumentException_init_$Create$(toString(message));
1545
+ }
1546
+ return encodeURLParameter(_this__u8e3s4);
1547
+ }
1548
+ var properties_initialized_EditorId_kt_b3k52i;
1549
+ function _init_properties_EditorId_kt__s9p08o() {
1550
+ if (!properties_initialized_EditorId_kt_b3k52i) {
1551
+ properties_initialized_EditorId_kt_b3k52i = true;
1552
+ editorId = Regex_init_$Create$('^[A-Za-z0-9_-]+$');
1553
+ }
1554
+ }
1555
+ function editorReadResponse(_this__u8e3s4, path, $completion) {
1556
+ var tmp = new $editorReadResponseCOROUTINE$(_this__u8e3s4, path, $completion);
1557
+ tmp.y8_1 = Unit_instance;
1558
+ tmp.z8_1 = null;
1559
+ return tmp.e9();
1560
+ }
1561
+ function $editorReadResponseCOROUTINE$(_this__u8e3s4, path, resultContinuation) {
1562
+ CoroutineImpl.call(this, resultContinuation);
1563
+ this.d5f_1 = _this__u8e3s4;
1564
+ this.e5f_1 = path;
1565
+ }
1566
+ protoOf($editorReadResponseCOROUTINE$).e9 = function () {
1567
+ var suspendResult = this.y8_1;
1568
+ $sm: do
1569
+ try {
1570
+ var tmp = this.w8_1;
1571
+ switch (tmp) {
1572
+ case 0:
1573
+ this.x8_1 = 2;
1574
+ this.w8_1 = 1;
1575
+ suspendResult = this.d5f_1.z59(this.e5f_1, this);
1576
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1577
+ return suspendResult;
1578
+ }
1579
+
1580
+ continue $sm;
1581
+ case 1:
1582
+ var result = suspendResult;
1583
+ var tmp_0;
1584
+ if (result instanceof Success_0) {
1585
+ tmp_0 = new Response(200, result.f5a_1, result.g5a_1, result.h5a_1);
1586
+ } else {
1587
+ if (result instanceof Failure) {
1588
+ var tmp0_elvis_lhs = result.j5a_1;
1589
+ var tmp_1 = tmp0_elvis_lhs == null ? 503 : tmp0_elvis_lhs;
1590
+ var builder = new JsonObjectBuilder();
1591
+ put(builder, 'message', 'Backend editor read failed.');
1592
+ tmp_0 = new Response(tmp_1, builder.z36().toString(), emptyMap(), true);
1593
+ } else {
1594
+ noWhenBranchMatchedException();
1595
+ }
1596
+ }
1597
+
1598
+ return tmp_0;
1599
+ case 2:
1600
+ throw this.z8_1;
1601
+ }
1602
+ } catch ($p) {
1603
+ var e = $p;
1604
+ if (this.x8_1 === 2) {
1605
+ throw e;
1606
+ } else {
1607
+ this.w8_1 = this.x8_1;
1608
+ this.z8_1 = e;
1609
+ }
1610
+ }
1611
+ while (true);
1612
+ };
1613
+ function get_mutationHeaders() {
1614
+ _init_properties_HttpMutation_kt__49e3rj();
1615
+ return mutationHeaders;
1616
+ }
1617
+ var mutationHeaders;
1618
+ var MutationHttpMethod_POST_instance;
1619
+ var MutationHttpMethod_PUT_instance;
1620
+ var MutationHttpMethod_PATCH_instance;
1621
+ var MutationHttpMethod_DELETE_instance;
1622
+ var MutationHttpMethod_entriesInitialized;
1623
+ function MutationHttpMethod_initEntries() {
1624
+ if (MutationHttpMethod_entriesInitialized)
1625
+ return Unit_instance;
1626
+ MutationHttpMethod_entriesInitialized = true;
1627
+ MutationHttpMethod_POST_instance = new MutationHttpMethod('POST', 0);
1628
+ MutationHttpMethod_PUT_instance = new MutationHttpMethod('PUT', 1);
1629
+ MutationHttpMethod_PATCH_instance = new MutationHttpMethod('PATCH', 2);
1630
+ MutationHttpMethod_DELETE_instance = new MutationHttpMethod('DELETE', 3);
1631
+ }
1632
+ function MutationHttpMethod(name, ordinal) {
1633
+ Enum.call(this, name, ordinal);
1634
+ }
1635
+ function HttpMutationRequest(method, path, body, idempotencyKey, baseRevision, clientId) {
1636
+ baseRevision = baseRevision === VOID ? null : baseRevision;
1637
+ clientId = clientId === VOID ? null : clientId;
1638
+ this.h5e_1 = method;
1639
+ this.i5e_1 = path;
1640
+ this.j5e_1 = body;
1641
+ this.k5e_1 = idempotencyKey;
1642
+ this.l5e_1 = baseRevision;
1643
+ this.m5e_1 = clientId;
1644
+ // Inline function 'kotlin.text.isNotBlank' call
1645
+ var this_0 = this.k5e_1;
1646
+ // Inline function 'kotlin.require' call
1647
+ if (!!isBlank(this_0)) {
1648
+ var message = 'idempotencyKey is required.';
1649
+ throw IllegalArgumentException_init_$Create$(toString(message));
1650
+ }
1651
+ // Inline function 'kotlin.require' call
1652
+ if (!(this.l5e_1 == null || compare(this.l5e_1, new Long(0, 0)) >= 0)) {
1653
+ var message_0 = 'baseRevision must be non-negative.';
1654
+ throw IllegalArgumentException_init_$Create$(toString(message_0));
1655
+ }
1656
+ }
1657
+ protoOf(HttpMutationRequest).toString = function () {
1658
+ return 'HttpMutationRequest(method=' + this.h5e_1.toString() + ', path=' + this.i5e_1 + ', body=' + this.j5e_1 + ', idempotencyKey=' + this.k5e_1 + ', baseRevision=' + toString_0(this.l5e_1) + ', clientId=' + this.m5e_1 + ')';
1659
+ };
1660
+ protoOf(HttpMutationRequest).hashCode = function () {
1661
+ var result = this.h5e_1.hashCode();
1662
+ result = imul(result, 31) + getStringHashCode(this.i5e_1) | 0;
1663
+ result = imul(result, 31) + (this.j5e_1 == null ? 0 : getStringHashCode(this.j5e_1)) | 0;
1664
+ result = imul(result, 31) + getStringHashCode(this.k5e_1) | 0;
1665
+ result = imul(result, 31) + (this.l5e_1 == null ? 0 : this.l5e_1.hashCode()) | 0;
1666
+ result = imul(result, 31) + (this.m5e_1 == null ? 0 : getStringHashCode(this.m5e_1)) | 0;
1667
+ return result;
1668
+ };
1669
+ protoOf(HttpMutationRequest).equals = function (other) {
1670
+ if (this === other)
1671
+ return true;
1672
+ if (!(other instanceof HttpMutationRequest))
1673
+ return false;
1674
+ if (!this.h5e_1.equals(other.h5e_1))
1675
+ return false;
1676
+ if (!(this.i5e_1 === other.i5e_1))
1677
+ return false;
1678
+ if (!(this.j5e_1 == other.j5e_1))
1679
+ return false;
1680
+ if (!(this.k5e_1 === other.k5e_1))
1681
+ return false;
1682
+ if (!equals(this.l5e_1, other.l5e_1))
1683
+ return false;
1684
+ if (!(this.m5e_1 == other.m5e_1))
1685
+ return false;
1686
+ return true;
1687
+ };
1688
+ function Response(statusCode, body, headers, metadataValid, confirmedReads, confirmationAttempted, confirmationIncomplete) {
1689
+ confirmedReads = confirmedReads === VOID ? emptyMap() : confirmedReads;
1690
+ confirmationAttempted = confirmationAttempted === VOID ? false : confirmationAttempted;
1691
+ confirmationIncomplete = confirmationIncomplete === VOID ? false : confirmationIncomplete;
1692
+ this.f5f_1 = statusCode;
1693
+ this.g5f_1 = body;
1694
+ this.h5f_1 = headers;
1695
+ this.i5f_1 = metadataValid;
1696
+ this.j5f_1 = confirmedReads;
1697
+ this.k5f_1 = confirmationAttempted;
1698
+ this.l5f_1 = confirmationIncomplete;
1699
+ }
1700
+ protoOf(Response).m5f = function (statusCode, body, headers, metadataValid, confirmedReads, confirmationAttempted, confirmationIncomplete) {
1701
+ return new Response(statusCode, body, headers, metadataValid, confirmedReads, confirmationAttempted, confirmationIncomplete);
1702
+ };
1703
+ protoOf(Response).n5f = function (statusCode, body, headers, metadataValid, confirmedReads, confirmationAttempted, confirmationIncomplete, $super) {
1704
+ statusCode = statusCode === VOID ? this.f5f_1 : statusCode;
1705
+ body = body === VOID ? this.g5f_1 : body;
1706
+ headers = headers === VOID ? this.h5f_1 : headers;
1707
+ metadataValid = metadataValid === VOID ? this.i5f_1 : metadataValid;
1708
+ confirmedReads = confirmedReads === VOID ? this.j5f_1 : confirmedReads;
1709
+ confirmationAttempted = confirmationAttempted === VOID ? this.k5f_1 : confirmationAttempted;
1710
+ confirmationIncomplete = confirmationIncomplete === VOID ? this.l5f_1 : confirmationIncomplete;
1711
+ return $super === VOID ? this.m5f(statusCode, body, headers, metadataValid, confirmedReads, confirmationAttempted, confirmationIncomplete) : $super.m5f.call(this, statusCode, body, headers, metadataValid, confirmedReads, confirmationAttempted, confirmationIncomplete);
1712
+ };
1713
+ protoOf(Response).toString = function () {
1714
+ return 'Response(statusCode=' + this.f5f_1 + ', body=' + this.g5f_1 + ', headers=' + toString(this.h5f_1) + ', metadataValid=' + this.i5f_1 + ', confirmedReads=' + toString(this.j5f_1) + ', confirmationAttempted=' + this.k5f_1 + ', confirmationIncomplete=' + this.l5f_1 + ')';
1715
+ };
1716
+ protoOf(Response).hashCode = function () {
1717
+ var result = this.f5f_1;
1718
+ result = imul(result, 31) + getStringHashCode(this.g5f_1) | 0;
1719
+ result = imul(result, 31) + hashCode(this.h5f_1) | 0;
1720
+ result = imul(result, 31) + getBooleanHashCode(this.i5f_1) | 0;
1721
+ result = imul(result, 31) + hashCode(this.j5f_1) | 0;
1722
+ result = imul(result, 31) + getBooleanHashCode(this.k5f_1) | 0;
1723
+ result = imul(result, 31) + getBooleanHashCode(this.l5f_1) | 0;
1724
+ return result;
1725
+ };
1726
+ protoOf(Response).equals = function (other) {
1727
+ if (this === other)
1728
+ return true;
1729
+ if (!(other instanceof Response))
1730
+ return false;
1731
+ if (!(this.f5f_1 === other.f5f_1))
1732
+ return false;
1733
+ if (!(this.g5f_1 === other.g5f_1))
1734
+ return false;
1735
+ if (!equals(this.h5f_1, other.h5f_1))
1736
+ return false;
1737
+ if (!(this.i5f_1 === other.i5f_1))
1738
+ return false;
1739
+ if (!equals(this.j5f_1, other.j5f_1))
1740
+ return false;
1741
+ if (!(this.k5f_1 === other.k5f_1))
1742
+ return false;
1743
+ if (!(this.l5f_1 === other.l5f_1))
1744
+ return false;
1745
+ return true;
1746
+ };
1747
+ function OutcomeUnknown(idempotencyKey) {
1748
+ this.o5f_1 = idempotencyKey;
1749
+ }
1750
+ protoOf(OutcomeUnknown).toString = function () {
1751
+ return 'OutcomeUnknown(idempotencyKey=' + this.o5f_1 + ')';
1752
+ };
1753
+ protoOf(OutcomeUnknown).hashCode = function () {
1754
+ return getStringHashCode(this.o5f_1);
1755
+ };
1756
+ protoOf(OutcomeUnknown).equals = function (other) {
1757
+ if (this === other)
1758
+ return true;
1759
+ if (!(other instanceof OutcomeUnknown))
1760
+ return false;
1761
+ if (!(this.o5f_1 === other.o5f_1))
1762
+ return false;
1763
+ return true;
1764
+ };
1765
+ function executeMutation(client, url, credential, command, $completion) {
1766
+ var tmp = new $executeMutationCOROUTINE$(client, url, credential, command, $completion);
1767
+ tmp.y8_1 = Unit_instance;
1768
+ tmp.z8_1 = null;
1769
+ return tmp.e9();
1770
+ }
1771
+ function safeEditorHeaders(_this__u8e3s4, names) {
1772
+ _init_properties_HttpMutation_kt__49e3rj();
1773
+ // Inline function 'kotlin.collections.mapNotNull' call
1774
+ // Inline function 'kotlin.collections.mapNotNullTo' call
1775
+ var destination = ArrayList_init_$Create$();
1776
+ // Inline function 'kotlin.collections.forEach' call
1777
+ var _iterator__ex2g4s = names.l();
1778
+ while (_iterator__ex2g4s.m()) {
1779
+ var element = _iterator__ex2g4s.n();
1780
+ var tmp0_safe_receiver = _this__u8e3s4.g2n(element);
1781
+ var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : singleOrNull(tmp0_safe_receiver);
1782
+ var tmp;
1783
+ if (tmp1_safe_receiver == null) {
1784
+ tmp = null;
1785
+ } else {
1786
+ // Inline function 'kotlin.let' call
1787
+ tmp = to(element, tmp1_safe_receiver);
1788
+ }
1789
+ var tmp0_safe_receiver_0 = tmp;
1790
+ if (tmp0_safe_receiver_0 == null)
1791
+ null;
1792
+ else {
1793
+ // Inline function 'kotlin.let' call
1794
+ destination.j(tmp0_safe_receiver_0);
1795
+ }
1796
+ }
1797
+ return toMap(destination);
1798
+ }
1799
+ function unambiguousEditorHeaders(_this__u8e3s4, names) {
1800
+ _init_properties_HttpMutation_kt__49e3rj();
1801
+ var tmp$ret$0;
1802
+ $l$block_0: {
1803
+ // Inline function 'kotlin.collections.none' call
1804
+ var tmp;
1805
+ if (isInterface(names, Collection)) {
1806
+ tmp = names.r();
1807
+ } else {
1808
+ tmp = false;
1809
+ }
1810
+ if (tmp) {
1811
+ tmp$ret$0 = true;
1812
+ break $l$block_0;
1813
+ }
1814
+ var _iterator__ex2g4s = names.l();
1815
+ while (_iterator__ex2g4s.m()) {
1816
+ var element = _iterator__ex2g4s.n();
1817
+ // Inline function 'kotlin.collections.orEmpty' call
1818
+ var tmp0_elvis_lhs = _this__u8e3s4.g2n(element);
1819
+ if ((tmp0_elvis_lhs == null ? emptyList() : tmp0_elvis_lhs).o() > 1) {
1820
+ tmp$ret$0 = false;
1821
+ break $l$block_0;
1822
+ }
1823
+ }
1824
+ tmp$ret$0 = true;
1825
+ }
1826
+ return tmp$ret$0;
1827
+ }
1828
+ function authorizationValue(_this__u8e3s4) {
1829
+ _init_properties_HttpMutation_kt__49e3rj();
1830
+ return 'Bearer ' + secretValue(_this__u8e3s4);
1831
+ }
1832
+ function redact(_this__u8e3s4, credential) {
1833
+ _init_properties_HttpMutation_kt__49e3rj();
1834
+ var secret = secretValue(credential);
1835
+ var tmp;
1836
+ // Inline function 'kotlin.text.isEmpty' call
1837
+ if (charSequenceLength(secret) === 0) {
1838
+ tmp = _this__u8e3s4;
1839
+ } else {
1840
+ tmp = replace(_this__u8e3s4, secret, '[redacted]');
1841
+ }
1842
+ return tmp;
1843
+ }
1844
+ function secretValue(_this__u8e3s4) {
1845
+ _init_properties_HttpMutation_kt__49e3rj();
1846
+ var tmp;
1847
+ if (_this__u8e3s4 instanceof PersonalAccessToken) {
1848
+ tmp = _this__u8e3s4.n4x_1;
1849
+ } else {
1850
+ if (_this__u8e3s4 instanceof Bearer) {
1851
+ tmp = _this__u8e3s4.o4x_1;
1852
+ } else {
1853
+ if (_this__u8e3s4 instanceof ServiceToken) {
1854
+ tmp = _this__u8e3s4.p4x_1;
1855
+ } else {
1856
+ noWhenBranchMatchedException();
1857
+ }
1858
+ }
1859
+ }
1860
+ return tmp;
1861
+ }
1862
+ function MutationHttpMethod_POST_getInstance() {
1863
+ MutationHttpMethod_initEntries();
1864
+ return MutationHttpMethod_POST_instance;
1865
+ }
1866
+ function MutationHttpMethod_PUT_getInstance() {
1867
+ MutationHttpMethod_initEntries();
1868
+ return MutationHttpMethod_PUT_instance;
1869
+ }
1870
+ function MutationHttpMethod_PATCH_getInstance() {
1871
+ MutationHttpMethod_initEntries();
1872
+ return MutationHttpMethod_PATCH_instance;
1873
+ }
1874
+ function MutationHttpMethod_DELETE_getInstance() {
1875
+ MutationHttpMethod_initEntries();
1876
+ return MutationHttpMethod_DELETE_instance;
1877
+ }
1878
+ function $executeMutationCOROUTINE$(client, url, credential, command, resultContinuation) {
1879
+ CoroutineImpl.call(this, resultContinuation);
1880
+ this.x5f_1 = client;
1881
+ this.y5f_1 = url;
1882
+ this.z5f_1 = credential;
1883
+ this.a5g_1 = command;
1884
+ }
1885
+ protoOf($executeMutationCOROUTINE$).e9 = function () {
1886
+ var suspendResult = this.y8_1;
1887
+ $sm: do
1888
+ try {
1889
+ var tmp = this.w8_1;
1890
+ switch (tmp) {
1891
+ case 0:
1892
+ this.x8_1 = 4;
1893
+ this.x8_1 = 3;
1894
+ var tmp0 = this.x5f_1;
1895
+ var urlString = this.y5f_1;
1896
+ var this_0 = new HttpRequestBuilder();
1897
+ url(this_0, urlString);
1898
+ set_expectSuccess(this_0, false);
1899
+ this_0.m3s_1 = Companion_getInstance().tp(this.a5g_1.h5e_1.n2_1);
1900
+ header(this_0, HttpHeaders_getInstance().r2u_1, authorizationValue(this.z5f_1));
1901
+ header(this_0, 'Idempotency-Key', this.a5g_1.k5e_1);
1902
+ var tmp0_safe_receiver = this.a5g_1.l5e_1;
1903
+ if (tmp0_safe_receiver == null)
1904
+ null;
1905
+ else {
1906
+ header(this_0, 'X-DS-Base-Revision', tmp0_safe_receiver);
1907
+ }
1908
+
1909
+ var tmp1_safe_receiver = this.a5g_1.m5e_1;
1910
+ if (tmp1_safe_receiver == null)
1911
+ null;
1912
+ else {
1913
+ header(this_0, 'X-DS-Client-Id', tmp1_safe_receiver);
1914
+ }
1915
+
1916
+ var tmp2_safe_receiver = this.a5g_1.j5e_1;
1917
+ if (tmp2_safe_receiver == null)
1918
+ null;
1919
+ else {
1920
+ contentType(this_0, Application_getInstance().k2s_1);
1921
+ if (tmp2_safe_receiver == null) {
1922
+ this_0.o3s_1 = NullBody_instance;
1923
+ var tmp_0 = PrimitiveClasses_getInstance().ec();
1924
+ var tmp_1;
1925
+ try {
1926
+ tmp_1 = createKType(PrimitiveClasses_getInstance().ec(), arrayOf([]), false);
1927
+ } catch ($p) {
1928
+ var tmp_2;
1929
+ if ($p instanceof Error) {
1930
+ var _unused_var__etf5q3 = $p;
1931
+ tmp_2 = null;
1932
+ } else {
1933
+ throw $p;
1934
+ }
1935
+ tmp_1 = tmp_2;
1936
+ }
1937
+ this_0.g3y(new TypeInfo(tmp_0, tmp_1));
1938
+ } else {
1939
+ if (tmp2_safe_receiver instanceof OutgoingContent) {
1940
+ this_0.o3s_1 = tmp2_safe_receiver;
1941
+ this_0.g3y(null);
1942
+ } else {
1943
+ this_0.o3s_1 = tmp2_safe_receiver;
1944
+ var tmp_3 = PrimitiveClasses_getInstance().ec();
1945
+ var tmp_4;
1946
+ try {
1947
+ tmp_4 = createKType(PrimitiveClasses_getInstance().ec(), arrayOf([]), false);
1948
+ } catch ($p) {
1949
+ var tmp_5;
1950
+ if ($p instanceof Error) {
1951
+ var _unused_var__etf5q3_0 = $p;
1952
+ tmp_5 = null;
1953
+ } else {
1954
+ throw $p;
1955
+ }
1956
+ tmp_4 = tmp_5;
1957
+ }
1958
+ this_0.g3y(new TypeInfo(tmp_3, tmp_4));
1959
+ }
1960
+ }
1961
+ }
1962
+
1963
+ this.w8_1 = 1;
1964
+ suspendResult = (new HttpStatement(this_0, tmp0)).z4j(this);
1965
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1966
+ return suspendResult;
1967
+ }
1968
+
1969
+ continue $sm;
1970
+ case 1:
1971
+ this.c5g_1 = suspendResult;
1972
+ this.d5g_1 = this.c5g_1.k3u().h31_1;
1973
+ this.w8_1 = 2;
1974
+ suspendResult = bodyAsText(this.c5g_1, VOID, this);
1975
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1976
+ return suspendResult;
1977
+ }
1978
+
1979
+ continue $sm;
1980
+ case 2:
1981
+ var body = suspendResult;
1982
+ var ARGUMENT = this.c5g_1.k3u().h31_1 >= 400 ? redact(body, this.z5f_1) : body;
1983
+ this.b5g_1 = new Response(this.d5g_1, ARGUMENT, safeEditorHeaders(this.c5g_1.l2y(), get_mutationHeaders()), unambiguousEditorHeaders(this.c5g_1.l2y(), get_mutationHeaders()));
1984
+ this.x8_1 = 4;
1985
+ this.w8_1 = 5;
1986
+ continue $sm;
1987
+ case 3:
1988
+ this.x8_1 = 4;
1989
+ var tmp_6 = this.z8_1;
1990
+ if (tmp_6 instanceof CancellationException) {
1991
+ var exception = this.z8_1;
1992
+ var tmp_7 = this;
1993
+ throw exception;
1994
+ } else {
1995
+ var tmp_8 = this.z8_1;
1996
+ if (tmp_8 instanceof Exception) {
1997
+ var exception_0 = this.z8_1;
1998
+ var tmp_9 = this;
1999
+ tmp_9.b5g_1 = new OutcomeUnknown(this.a5g_1.k5e_1);
2000
+ this.w8_1 = 5;
2001
+ continue $sm;
2002
+ } else {
2003
+ throw this.z8_1;
2004
+ }
2005
+ }
2006
+
2007
+ case 4:
2008
+ throw this.z8_1;
2009
+ case 5:
2010
+ this.x8_1 = 4;
2011
+ return this.b5g_1;
2012
+ }
2013
+ } catch ($p) {
2014
+ var e = $p;
2015
+ if (this.x8_1 === 4) {
2016
+ throw e;
2017
+ } else {
2018
+ this.w8_1 = this.x8_1;
2019
+ this.z8_1 = e;
2020
+ }
2021
+ }
2022
+ while (true);
2023
+ };
2024
+ var properties_initialized_HttpMutation_kt_x6n35f;
2025
+ function _init_properties_HttpMutation_kt__49e3rj() {
2026
+ if (!properties_initialized_HttpMutation_kt_x6n35f) {
2027
+ properties_initialized_HttpMutation_kt_x6n35f = true;
2028
+ mutationHeaders = setOf(['x-ds-mutation-metadata', 'x-ds-mutation-metadata-truncated', 'x-ds-read-context']);
2029
+ }
2030
+ }
2031
+ function requestToken($this, apiUrl, parameters, decode, $completion) {
2032
+ var tmp = new $requestTokenCOROUTINE$($this, apiUrl, parameters, decode, $completion);
2033
+ tmp.y8_1 = Unit_instance;
2034
+ tmp.z8_1 = null;
2035
+ return tmp.e9();
2036
+ }
2037
+ function decodeToken($this, body) {
2038
+ var tmp;
2039
+ try {
2040
+ // Inline function 'kotlinx.serialization.json.Json.decodeFromString' call
2041
+ var this_0 = $this.u5g_1;
2042
+ // Inline function 'kotlinx.serialization.serializer' call
2043
+ var this_1 = this_0.h24();
2044
+ // Inline function 'kotlinx.serialization.internal.cast' call
2045
+ var this_2 = serializer(this_1, createKType(getKClass(GatewayTokenResponse), arrayOf([]), false));
2046
+ var tmp$ret$1 = isInterface(this_2, KSerializer) ? this_2 : THROW_CCE();
2047
+ var response = this_0.p35(tmp$ret$1, body);
2048
+ var tmp_0 = nowMillis($this);
2049
+ var tmp0_elvis_lhs = response.y5g_1;
2050
+ // Inline function 'kotlin.Long.times' call
2051
+ var this_3 = tmp0_elvis_lhs == null ? response.x5g_1 : tmp0_elvis_lhs;
2052
+ var tmp$ret$3 = multiply(this_3, fromInt(1000));
2053
+ tmp = new Success(new TokenResponse(response.v5g_1, response.w5g_1, add(tmp_0, tmp$ret$3), response.x5g_1));
2054
+ } catch ($p) {
2055
+ var tmp_1;
2056
+ if ($p instanceof IllegalArgumentException) {
2057
+ var exception = $p;
2058
+ tmp_1 = new Failed(AuthErrorCode_BACKEND_UNAVAILABLE_getInstance(), 'Error: cannot parse token response.');
2059
+ } else {
2060
+ throw $p;
2061
+ }
2062
+ tmp = tmp_1;
2063
+ }
2064
+ return tmp;
2065
+ }
2066
+ function decodeAccessToken($this, body) {
2067
+ var tmp;
2068
+ try {
2069
+ // Inline function 'kotlinx.serialization.json.Json.decodeFromString' call
2070
+ var this_0 = $this.u5g_1;
2071
+ // Inline function 'kotlinx.serialization.serializer' call
2072
+ var this_1 = this_0.h24();
2073
+ // Inline function 'kotlinx.serialization.internal.cast' call
2074
+ var this_2 = serializer(this_1, createKType(getKClass(GatewayAccessTokenResponse), arrayOf([]), false));
2075
+ var tmp$ret$1 = isInterface(this_2, KSerializer) ? this_2 : THROW_CCE();
2076
+ var response = this_0.p35(tmp$ret$1, body);
2077
+ tmp = new Success(new AccessTokenResponse(response.z5g_1));
2078
+ } catch ($p) {
2079
+ var tmp_0;
2080
+ if ($p instanceof IllegalArgumentException) {
2081
+ var exception = $p;
2082
+ tmp_0 = new Failed(AuthErrorCode_BACKEND_UNAVAILABLE_getInstance(), 'Error: cannot parse token response.');
2083
+ } else {
2084
+ throw $p;
2085
+ }
2086
+ tmp = tmp_0;
2087
+ }
2088
+ return tmp;
2089
+ }
2090
+ function decodeTokenError($this, body) {
2091
+ var tmp;
2092
+ try {
2093
+ // Inline function 'kotlinx.serialization.json.Json.decodeFromString' call
2094
+ var this_0 = $this.u5g_1;
2095
+ // Inline function 'kotlinx.serialization.serializer' call
2096
+ var this_1 = this_0.h24();
2097
+ // Inline function 'kotlinx.serialization.internal.cast' call
2098
+ var this_2 = serializer(this_1, createKType(getKClass(GatewayErrorResponse), arrayOf([]), false));
2099
+ var tmp$ret$1 = isInterface(this_2, KSerializer) ? this_2 : THROW_CCE();
2100
+ var response = this_0.p35(tmp$ret$1, body);
2101
+ var tmp_0;
2102
+ if (response.a5h_1 === 'invalid_grant') {
2103
+ tmp_0 = new Failed(AuthErrorCode_AUTH_REQUIRED_getInstance(), 'Error: credentials are invalid or expired.');
2104
+ } else {
2105
+ tmp_0 = new Failed(AuthErrorCode_BACKEND_UNAVAILABLE_getInstance(), 'Error: token request failed.');
2106
+ }
2107
+ tmp = tmp_0;
2108
+ } catch ($p) {
2109
+ var tmp_1;
2110
+ if ($p instanceof IllegalArgumentException) {
2111
+ var exception = $p;
2112
+ tmp_1 = new Failed(AuthErrorCode_BACKEND_UNAVAILABLE_getInstance(), 'Error: token request failed.');
2113
+ } else {
2114
+ throw $p;
2115
+ }
2116
+ tmp = tmp_1;
2117
+ }
2118
+ return tmp;
2119
+ }
2120
+ function nowMillis($this) {
2121
+ return System_instance.zn().io();
2122
+ }
2123
+ function KtorTokenClient$_init_$lambda_26qeb1($this$Json) {
2124
+ $this$Json.j36_1 = true;
2125
+ return Unit_instance;
2126
+ }
2127
+ function KtorTokenClient$decodeToken$ref(p0) {
2128
+ var l = function (_this__u8e3s4) {
2129
+ var tmp0 = p0;
2130
+ return decodeToken(tmp0, _this__u8e3s4);
2131
+ };
2132
+ l.callableName = 'decodeToken';
2133
+ return l;
2134
+ }
2135
+ function KtorTokenClient$decodeToken$ref_0(p0) {
2136
+ var l = function (_this__u8e3s4) {
2137
+ var tmp0 = p0;
2138
+ return decodeToken(tmp0, _this__u8e3s4);
2139
+ };
2140
+ l.callableName = 'decodeToken';
2141
+ return l;
2142
+ }
2143
+ function KtorTokenClient$decodeAccessToken$ref(p0) {
2144
+ var l = function (_this__u8e3s4) {
2145
+ var tmp0 = p0;
2146
+ return decodeAccessToken(tmp0, _this__u8e3s4);
2147
+ };
2148
+ l.callableName = 'decodeAccessToken';
2149
+ return l;
2150
+ }
2151
+ function $logoutCOROUTINE$(_this__u8e3s4, apiUrl, refreshToken, resultContinuation) {
2152
+ CoroutineImpl.call(this, resultContinuation);
2153
+ this.j5h_1 = _this__u8e3s4;
2154
+ this.k5h_1 = apiUrl;
2155
+ this.l5h_1 = refreshToken;
2156
+ }
2157
+ protoOf($logoutCOROUTINE$).e9 = function () {
2158
+ var suspendResult = this.y8_1;
2159
+ $sm: do
2160
+ try {
2161
+ var tmp = this.w8_1;
2162
+ switch (tmp) {
2163
+ case 0:
2164
+ this.x8_1 = 5;
2165
+ if (!allowsInteractiveAuth(this.k5h_1)) {
2166
+ var tmp_0 = this;
2167
+ tmp_0.m5h_1 = invalidAuthUrl();
2168
+ this.w8_1 = 4;
2169
+ continue $sm;
2170
+ } else {
2171
+ this.x8_1 = 2;
2172
+ this.w8_1 = 1;
2173
+ var tmp_1 = oauthEndpoint(this.k5h_1, '/auth/logout');
2174
+ Companion_getInstance_3();
2175
+ var this_0 = ParametersBuilder();
2176
+ this_0.o2n('client_id', 'dsbuilder-studio-plugin');
2177
+ this_0.o2n('refresh_token', this.l5h_1);
2178
+ suspendResult = submitForm(this.j5h_1.t5g_1, tmp_1, this_0.h2u(), VOID, VOID, this);
2179
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
2180
+ return suspendResult;
2181
+ }
2182
+ continue $sm;
2183
+ }
2184
+
2185
+ case 1:
2186
+ var response = suspendResult;
2187
+ this.n5h_1 = isSuccess(response.k3u()) ? new Success(Unit_instance) : response.k3u().equals(Companion_getInstance_2().z2z_1) ? new Failed(AuthErrorCode_AUTH_REQUIRED_getInstance(), 'Error: user session is not authorized.') : new Failed(AuthErrorCode_BACKEND_UNAVAILABLE_getInstance(), 'Error: backend returned HTTP ' + response.k3u().h31_1 + '.');
2188
+ this.x8_1 = 5;
2189
+ this.w8_1 = 3;
2190
+ continue $sm;
2191
+ case 2:
2192
+ this.x8_1 = 5;
2193
+ var tmp_2 = this.z8_1;
2194
+ if (tmp_2 instanceof CancellationException) {
2195
+ var exception = this.z8_1;
2196
+ var tmp_3 = this;
2197
+ throw exception;
2198
+ } else {
2199
+ var tmp_4 = this.z8_1;
2200
+ if (tmp_4 instanceof Exception) {
2201
+ var exception_0 = this.z8_1;
2202
+ var tmp_5 = this;
2203
+ tmp_5.n5h_1 = new Failed(AuthErrorCode_BACKEND_UNAVAILABLE_getInstance(), 'Error: backend is unavailable.');
2204
+ this.w8_1 = 3;
2205
+ continue $sm;
2206
+ } else {
2207
+ throw this.z8_1;
2208
+ }
2209
+ }
2210
+
2211
+ case 3:
2212
+ this.x8_1 = 5;
2213
+ this.m5h_1 = this.n5h_1;
2214
+ this.w8_1 = 4;
2215
+ continue $sm;
2216
+ case 4:
2217
+ return this.m5h_1;
2218
+ case 5:
2219
+ throw this.z8_1;
2220
+ }
2221
+ } catch ($p) {
2222
+ var e = $p;
2223
+ if (this.x8_1 === 5) {
2224
+ throw e;
2225
+ } else {
2226
+ this.w8_1 = this.x8_1;
2227
+ this.z8_1 = e;
2228
+ }
2229
+ }
2230
+ while (true);
2231
+ };
2232
+ function $requestTokenCOROUTINE$(_this__u8e3s4, apiUrl, parameters, decode, resultContinuation) {
2233
+ CoroutineImpl.call(this, resultContinuation);
2234
+ this.m5g_1 = _this__u8e3s4;
2235
+ this.n5g_1 = apiUrl;
2236
+ this.o5g_1 = parameters;
2237
+ this.p5g_1 = decode;
2238
+ }
2239
+ protoOf($requestTokenCOROUTINE$).e9 = function () {
2240
+ var suspendResult = this.y8_1;
2241
+ $sm: do
2242
+ try {
2243
+ var tmp = this.w8_1;
2244
+ switch (tmp) {
2245
+ case 0:
2246
+ this.x8_1 = 8;
2247
+ if (!allowsInteractiveAuth(this.n5g_1)) {
2248
+ var tmp_0 = this;
2249
+ tmp_0.q5g_1 = invalidAuthUrl();
2250
+ this.w8_1 = 7;
2251
+ continue $sm;
2252
+ } else {
2253
+ this.x8_1 = 5;
2254
+ this.w8_1 = 1;
2255
+ suspendResult = submitForm(this.m5g_1.t5g_1, oauthEndpoint(this.n5g_1, '/auth/token'), this.o5g_1, VOID, VOID, this);
2256
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
2257
+ return suspendResult;
2258
+ }
2259
+ continue $sm;
2260
+ }
2261
+
2262
+ case 1:
2263
+ var response = suspendResult;
2264
+ if (isSuccess(response.k3u())) {
2265
+ this.w8_1 = 3;
2266
+ suspendResult = bodyAsText(response, VOID, this);
2267
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
2268
+ return suspendResult;
2269
+ }
2270
+ continue $sm;
2271
+ } else {
2272
+ if (response.k3u().equals(Companion_getInstance_2().y2z_1)) {
2273
+ this.w8_1 = 2;
2274
+ suspendResult = bodyAsText(response, VOID, this);
2275
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
2276
+ return suspendResult;
2277
+ }
2278
+ continue $sm;
2279
+ } else {
2280
+ if (response.k3u().equals(Companion_getInstance_2().z2z_1)) {
2281
+ this.s5g_1 = new Failed(AuthErrorCode_AUTH_REQUIRED_getInstance(), 'Error: credentials are invalid or expired.');
2282
+ this.w8_1 = 4;
2283
+ continue $sm;
2284
+ } else {
2285
+ if (response.k3u().equals(Companion_getInstance_2().b30_1)) {
2286
+ this.s5g_1 = new Failed(AuthErrorCode_FORBIDDEN_getInstance(), 'Error: authentication is forbidden.');
2287
+ this.w8_1 = 4;
2288
+ continue $sm;
2289
+ } else {
2290
+ this.s5g_1 = new Failed(AuthErrorCode_BACKEND_UNAVAILABLE_getInstance(), 'Error: backend returned HTTP ' + response.k3u().h31_1 + '.');
2291
+ this.w8_1 = 4;
2292
+ continue $sm;
2293
+ }
2294
+ }
2295
+ }
2296
+ }
2297
+
2298
+ case 2:
2299
+ var ARGUMENT = suspendResult;
2300
+ this.s5g_1 = decodeTokenError(this.m5g_1, ARGUMENT);
2301
+ this.w8_1 = 4;
2302
+ continue $sm;
2303
+ case 3:
2304
+ var ARGUMENT_0 = suspendResult;
2305
+ this.s5g_1 = this.p5g_1(ARGUMENT_0);
2306
+ this.w8_1 = 4;
2307
+ continue $sm;
2308
+ case 4:
2309
+ this.r5g_1 = this.s5g_1;
2310
+ this.x8_1 = 8;
2311
+ this.w8_1 = 6;
2312
+ continue $sm;
2313
+ case 5:
2314
+ this.x8_1 = 8;
2315
+ var tmp_1 = this.z8_1;
2316
+ if (tmp_1 instanceof CancellationException) {
2317
+ var exception = this.z8_1;
2318
+ var tmp_2 = this;
2319
+ throw exception;
2320
+ } else {
2321
+ var tmp_3 = this.z8_1;
2322
+ if (tmp_3 instanceof Exception) {
2323
+ var exception_0 = this.z8_1;
2324
+ var tmp_4 = this;
2325
+ tmp_4.r5g_1 = new Failed(AuthErrorCode_BACKEND_UNAVAILABLE_getInstance(), 'Error: backend is unavailable.');
2326
+ this.w8_1 = 6;
2327
+ continue $sm;
2328
+ } else {
2329
+ throw this.z8_1;
2330
+ }
2331
+ }
2332
+
2333
+ case 6:
2334
+ this.x8_1 = 8;
2335
+ this.q5g_1 = this.r5g_1;
2336
+ this.w8_1 = 7;
2337
+ continue $sm;
2338
+ case 7:
2339
+ return this.q5g_1;
2340
+ case 8:
2341
+ throw this.z8_1;
2342
+ }
2343
+ } catch ($p) {
2344
+ var e = $p;
2345
+ if (this.x8_1 === 8) {
2346
+ throw e;
2347
+ } else {
2348
+ this.w8_1 = this.x8_1;
2349
+ this.z8_1 = e;
2350
+ }
2351
+ }
2352
+ while (true);
2353
+ };
2354
+ function KtorTokenClient(httpClient, json) {
2355
+ var tmp;
2356
+ if (json === VOID) {
2357
+ tmp = Json(VOID, KtorTokenClient$_init_$lambda_26qeb1);
2358
+ } else {
2359
+ tmp = json;
2360
+ }
2361
+ json = tmp;
2362
+ this.t5g_1 = httpClient;
2363
+ this.u5g_1 = json;
2364
+ }
2365
+ protoOf(KtorTokenClient).q4x = function (apiUrl, code, verifier, redirectUri, $completion) {
2366
+ // Inline function 'io.ktor.http.Companion.build' call
2367
+ Companion_getInstance_3();
2368
+ // Inline function 'kotlin.apply' call
2369
+ var this_0 = ParametersBuilder();
2370
+ this_0.o2n('grant_type', 'authorization_code');
2371
+ this_0.o2n('client_id', 'dsbuilder-studio-plugin');
2372
+ this_0.o2n('code', code);
2373
+ this_0.o2n('code_verifier', verifier);
2374
+ this_0.o2n('redirect_uri', redirectUri);
2375
+ var tmp = this_0.h2u();
2376
+ return requestToken(this, apiUrl, tmp, KtorTokenClient$decodeToken$ref(this), $completion);
2377
+ };
2378
+ protoOf(KtorTokenClient).r4x = function (apiUrl, accessToken, $completion) {
2379
+ return (new KtorUserInfoClient(this.t5g_1, this.u5g_1)).q5h(apiUrl, accessToken, $completion);
2380
+ };
2381
+ protoOf(KtorTokenClient).s4x = function (apiUrl, refreshToken, $completion) {
2382
+ // Inline function 'io.ktor.http.Companion.build' call
2383
+ Companion_getInstance_3();
2384
+ // Inline function 'kotlin.apply' call
2385
+ var this_0 = ParametersBuilder();
2386
+ this_0.o2n('grant_type', 'refresh_token');
2387
+ this_0.o2n('client_id', 'dsbuilder-studio-plugin');
2388
+ this_0.o2n('refresh_token', refreshToken);
2389
+ var tmp = this_0.h2u();
2390
+ return requestToken(this, apiUrl, tmp, KtorTokenClient$decodeToken$ref_0(this), $completion);
2391
+ };
2392
+ protoOf(KtorTokenClient).u4x = function (apiUrl, clientId, clientSecret, $completion) {
2393
+ if (!allowsInteractiveAuth(apiUrl)) {
2394
+ return new Failed(AuthErrorCode_INVALID_AUTH_URL_getInstance(), 'Error: service account login requires HTTPS, except localhost and 127.0.0.1.');
2395
+ }
2396
+ // Inline function 'io.ktor.http.Companion.build' call
2397
+ Companion_getInstance_3();
2398
+ // Inline function 'kotlin.apply' call
2399
+ var this_0 = ParametersBuilder();
2400
+ this_0.o2n('grant_type', 'client_credentials');
2401
+ this_0.o2n('client_id', clientId);
2402
+ this_0.o2n('client_secret', clientSecret);
2403
+ var tmp = this_0.h2u();
2404
+ return requestToken(this, apiUrl, tmp, KtorTokenClient$decodeAccessToken$ref(this), $completion);
2405
+ };
2406
+ protoOf(KtorTokenClient).t4x = function (apiUrl, refreshToken, $completion) {
2407
+ var tmp = new $logoutCOROUTINE$(this, apiUrl, refreshToken, $completion);
2408
+ tmp.y8_1 = Unit_instance;
2409
+ tmp.z8_1 = null;
2410
+ return tmp.e9();
2411
+ };
2412
+ function allowsInteractiveAuth(apiUrl) {
2413
+ var tmp;
2414
+ try {
2415
+ var url = Url(apiUrl);
2416
+ var tmp_0;
2417
+ var tmp_1;
2418
+ // Inline function 'kotlin.text.isNullOrEmpty' call
2419
+ var this_0 = url.e32_1;
2420
+ if (this_0 == null || charSequenceLength(this_0) === 0) {
2421
+ // Inline function 'kotlin.text.isNullOrEmpty' call
2422
+ var this_1 = url.f32_1;
2423
+ tmp_1 = this_1 == null || charSequenceLength(this_1) === 0;
2424
+ } else {
2425
+ tmp_1 = false;
2426
+ }
2427
+ if (tmp_1) {
2428
+ tmp_0 = url.m32_1.x31_1 === 'https' || (url.m32_1.x31_1 === 'http' && (url.a32_1 === 'localhost' || url.a32_1 === '127.0.0.1'));
2429
+ } else {
2430
+ tmp_0 = false;
2431
+ }
2432
+ tmp = tmp_0;
2433
+ } catch ($p) {
2434
+ var tmp_2;
2435
+ if ($p instanceof IllegalArgumentException) {
2436
+ var exception = $p;
2437
+ tmp_2 = false;
2438
+ } else {
2439
+ throw $p;
2440
+ }
2441
+ tmp = tmp_2;
2442
+ }
2443
+ return tmp;
2444
+ }
2445
+ function invalidAuthUrl() {
2446
+ return new Failed(AuthErrorCode_INVALID_AUTH_URL_getInstance(), '\u0410\u0432\u0442\u043E\u0440\u0438\u0437\u0430\u0446\u0438\u044F \u0442\u0440\u0435\u0431\u0443\u0435\u0442 HTTPS.');
2447
+ }
2448
+ function oauthEndpoint(apiUrl, path) {
2449
+ return trimEnd(apiUrl, charArrayOf([_Char___init__impl__6a9atx(47)])) + '/' + trimStart(path, charArrayOf([_Char___init__impl__6a9atx(47)]));
2450
+ }
2451
+ function Companion() {
2452
+ }
2453
+ var Companion_instance_0;
2454
+ function Companion_getInstance_4() {
2455
+ return Companion_instance_0;
2456
+ }
2457
+ function $serializer() {
2458
+ $serializer_instance = this;
2459
+ var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.dsbuilder.frontend.core.network.GatewayTokenResponse', this, 4);
2460
+ tmp0_serialDesc.k2b('access_token', false);
2461
+ tmp0_serialDesc.k2b('refresh_token', false);
2462
+ tmp0_serialDesc.k2b('expires_in', false);
2463
+ tmp0_serialDesc.k2b('refresh_expires_in', true);
2464
+ this.r5h_1 = tmp0_serialDesc;
2465
+ }
2466
+ protoOf($serializer).s5h = function (encoder, value) {
2467
+ var tmp0_desc = this.r5h_1;
2468
+ var tmp1_output = encoder.s23(tmp0_desc);
2469
+ tmp1_output.h25(tmp0_desc, 0, value.v5g_1);
2470
+ tmp1_output.h25(tmp0_desc, 1, value.w5g_1);
2471
+ tmp1_output.d25(tmp0_desc, 2, value.x5g_1);
2472
+ if (tmp1_output.p25(tmp0_desc, 3) ? true : !(value.y5g_1 == null)) {
2473
+ tmp1_output.l25(tmp0_desc, 3, LongSerializer_getInstance(), value.y5g_1);
2474
+ }
2475
+ tmp1_output.t23(tmp0_desc);
2476
+ };
2477
+ protoOf($serializer).m20 = function (encoder, value) {
2478
+ return this.s5h(encoder, value instanceof GatewayTokenResponse ? value : THROW_CCE());
2479
+ };
2480
+ protoOf($serializer).n20 = function (decoder) {
2481
+ var tmp0_desc = this.r5h_1;
2482
+ var tmp1_flag = true;
2483
+ var tmp2_index = 0;
2484
+ var tmp3_bitMask0 = 0;
2485
+ var tmp4_local0 = null;
2486
+ var tmp5_local1 = null;
2487
+ var tmp6_local2 = new Long(0, 0);
2488
+ var tmp7_local3 = null;
2489
+ var tmp8_input = decoder.s23(tmp0_desc);
2490
+ if (tmp8_input.i24()) {
2491
+ tmp4_local0 = tmp8_input.c24(tmp0_desc, 0);
2492
+ tmp3_bitMask0 = tmp3_bitMask0 | 1;
2493
+ tmp5_local1 = tmp8_input.c24(tmp0_desc, 1);
2494
+ tmp3_bitMask0 = tmp3_bitMask0 | 2;
2495
+ tmp6_local2 = tmp8_input.y23(tmp0_desc, 2);
2496
+ tmp3_bitMask0 = tmp3_bitMask0 | 4;
2497
+ tmp7_local3 = tmp8_input.g24(tmp0_desc, 3, LongSerializer_getInstance(), tmp7_local3);
2498
+ tmp3_bitMask0 = tmp3_bitMask0 | 8;
2499
+ } else
2500
+ while (tmp1_flag) {
2501
+ tmp2_index = tmp8_input.j24(tmp0_desc);
2502
+ switch (tmp2_index) {
2503
+ case -1:
2504
+ tmp1_flag = false;
2505
+ break;
2506
+ case 0:
2507
+ tmp4_local0 = tmp8_input.c24(tmp0_desc, 0);
2508
+ tmp3_bitMask0 = tmp3_bitMask0 | 1;
2509
+ break;
2510
+ case 1:
2511
+ tmp5_local1 = tmp8_input.c24(tmp0_desc, 1);
2512
+ tmp3_bitMask0 = tmp3_bitMask0 | 2;
2513
+ break;
2514
+ case 2:
2515
+ tmp6_local2 = tmp8_input.y23(tmp0_desc, 2);
2516
+ tmp3_bitMask0 = tmp3_bitMask0 | 4;
2517
+ break;
2518
+ case 3:
2519
+ tmp7_local3 = tmp8_input.g24(tmp0_desc, 3, LongSerializer_getInstance(), tmp7_local3);
2520
+ tmp3_bitMask0 = tmp3_bitMask0 | 8;
2521
+ break;
2522
+ default:
2523
+ throw UnknownFieldException_init_$Create$(tmp2_index);
2524
+ }
2525
+ }
2526
+ tmp8_input.t23(tmp0_desc);
2527
+ return GatewayTokenResponse_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, null);
2528
+ };
2529
+ protoOf($serializer).l20 = function () {
2530
+ return this.r5h_1;
2531
+ };
2532
+ protoOf($serializer).z2b = function () {
2533
+ // Inline function 'kotlin.arrayOf' call
2534
+ // Inline function 'kotlin.js.unsafeCast' call
2535
+ // Inline function 'kotlin.js.asDynamic' call
2536
+ return [StringSerializer_getInstance(), StringSerializer_getInstance(), LongSerializer_getInstance(), get_nullable(LongSerializer_getInstance())];
2537
+ };
2538
+ var $serializer_instance;
2539
+ function $serializer_getInstance() {
2540
+ if ($serializer_instance == null)
2541
+ new $serializer();
2542
+ return $serializer_instance;
2543
+ }
2544
+ function GatewayTokenResponse_init_$Init$(seen0, accessToken, refreshToken, expiresIn, refreshExpiresIn, serializationConstructorMarker, $this) {
2545
+ if (!(7 === (7 & seen0))) {
2546
+ throwMissingFieldException(seen0, 7, $serializer_getInstance().r5h_1);
2547
+ }
2548
+ $this.v5g_1 = accessToken;
2549
+ $this.w5g_1 = refreshToken;
2550
+ $this.x5g_1 = expiresIn;
2551
+ if (0 === (seen0 & 8))
2552
+ $this.y5g_1 = null;
2553
+ else
2554
+ $this.y5g_1 = refreshExpiresIn;
2555
+ return $this;
2556
+ }
2557
+ function GatewayTokenResponse_init_$Create$(seen0, accessToken, refreshToken, expiresIn, refreshExpiresIn, serializationConstructorMarker) {
2558
+ return GatewayTokenResponse_init_$Init$(seen0, accessToken, refreshToken, expiresIn, refreshExpiresIn, serializationConstructorMarker, objectCreate(protoOf(GatewayTokenResponse)));
2559
+ }
2560
+ function GatewayTokenResponse(accessToken, refreshToken, expiresIn, refreshExpiresIn) {
2561
+ refreshExpiresIn = refreshExpiresIn === VOID ? null : refreshExpiresIn;
2562
+ this.v5g_1 = accessToken;
2563
+ this.w5g_1 = refreshToken;
2564
+ this.x5g_1 = expiresIn;
2565
+ this.y5g_1 = refreshExpiresIn;
2566
+ }
2567
+ protoOf(GatewayTokenResponse).toString = function () {
2568
+ return 'GatewayTokenResponse(accessToken=' + this.v5g_1 + ', refreshToken=' + this.w5g_1 + ', expiresIn=' + this.x5g_1.toString() + ', refreshExpiresIn=' + toString_0(this.y5g_1) + ')';
2569
+ };
2570
+ protoOf(GatewayTokenResponse).hashCode = function () {
2571
+ var result = getStringHashCode(this.v5g_1);
2572
+ result = imul(result, 31) + getStringHashCode(this.w5g_1) | 0;
2573
+ result = imul(result, 31) + this.x5g_1.hashCode() | 0;
2574
+ result = imul(result, 31) + (this.y5g_1 == null ? 0 : this.y5g_1.hashCode()) | 0;
2575
+ return result;
2576
+ };
2577
+ protoOf(GatewayTokenResponse).equals = function (other) {
2578
+ if (this === other)
2579
+ return true;
2580
+ if (!(other instanceof GatewayTokenResponse))
2581
+ return false;
2582
+ if (!(this.v5g_1 === other.v5g_1))
2583
+ return false;
2584
+ if (!(this.w5g_1 === other.w5g_1))
2585
+ return false;
2586
+ if (!equalsLong(this.x5g_1, other.x5g_1))
2587
+ return false;
2588
+ if (!equals(this.y5g_1, other.y5g_1))
2589
+ return false;
2590
+ return true;
2591
+ };
2592
+ function Companion_0() {
2593
+ }
2594
+ var Companion_instance_1;
2595
+ function Companion_getInstance_5() {
2596
+ return Companion_instance_1;
2597
+ }
2598
+ function $serializer_0() {
2599
+ $serializer_instance_0 = this;
2600
+ var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.dsbuilder.frontend.core.network.GatewayAccessTokenResponse', this, 1);
2601
+ tmp0_serialDesc.k2b('access_token', false);
2602
+ this.t5h_1 = tmp0_serialDesc;
2603
+ }
2604
+ protoOf($serializer_0).u5h = function (encoder, value) {
2605
+ var tmp0_desc = this.t5h_1;
2606
+ var tmp1_output = encoder.s23(tmp0_desc);
2607
+ tmp1_output.h25(tmp0_desc, 0, value.z5g_1);
2608
+ tmp1_output.t23(tmp0_desc);
2609
+ };
2610
+ protoOf($serializer_0).m20 = function (encoder, value) {
2611
+ return this.u5h(encoder, value instanceof GatewayAccessTokenResponse ? value : THROW_CCE());
2612
+ };
2613
+ protoOf($serializer_0).n20 = function (decoder) {
2614
+ var tmp0_desc = this.t5h_1;
2615
+ var tmp1_flag = true;
2616
+ var tmp2_index = 0;
2617
+ var tmp3_bitMask0 = 0;
2618
+ var tmp4_local0 = null;
2619
+ var tmp5_input = decoder.s23(tmp0_desc);
2620
+ if (tmp5_input.i24()) {
2621
+ tmp4_local0 = tmp5_input.c24(tmp0_desc, 0);
2622
+ tmp3_bitMask0 = tmp3_bitMask0 | 1;
2623
+ } else
2624
+ while (tmp1_flag) {
2625
+ tmp2_index = tmp5_input.j24(tmp0_desc);
2626
+ switch (tmp2_index) {
2627
+ case -1:
2628
+ tmp1_flag = false;
2629
+ break;
2630
+ case 0:
2631
+ tmp4_local0 = tmp5_input.c24(tmp0_desc, 0);
2632
+ tmp3_bitMask0 = tmp3_bitMask0 | 1;
2633
+ break;
2634
+ default:
2635
+ throw UnknownFieldException_init_$Create$(tmp2_index);
2636
+ }
2637
+ }
2638
+ tmp5_input.t23(tmp0_desc);
2639
+ return GatewayAccessTokenResponse_init_$Create$(tmp3_bitMask0, tmp4_local0, null);
2640
+ };
2641
+ protoOf($serializer_0).l20 = function () {
2642
+ return this.t5h_1;
2643
+ };
2644
+ protoOf($serializer_0).z2b = function () {
2645
+ // Inline function 'kotlin.arrayOf' call
2646
+ // Inline function 'kotlin.js.unsafeCast' call
2647
+ // Inline function 'kotlin.js.asDynamic' call
2648
+ return [StringSerializer_getInstance()];
2649
+ };
2650
+ var $serializer_instance_0;
2651
+ function $serializer_getInstance_0() {
2652
+ if ($serializer_instance_0 == null)
2653
+ new $serializer_0();
2654
+ return $serializer_instance_0;
2655
+ }
2656
+ function GatewayAccessTokenResponse_init_$Init$(seen0, accessToken, serializationConstructorMarker, $this) {
2657
+ if (!(1 === (1 & seen0))) {
2658
+ throwMissingFieldException(seen0, 1, $serializer_getInstance_0().t5h_1);
2659
+ }
2660
+ $this.z5g_1 = accessToken;
2661
+ return $this;
2662
+ }
2663
+ function GatewayAccessTokenResponse_init_$Create$(seen0, accessToken, serializationConstructorMarker) {
2664
+ return GatewayAccessTokenResponse_init_$Init$(seen0, accessToken, serializationConstructorMarker, objectCreate(protoOf(GatewayAccessTokenResponse)));
2665
+ }
2666
+ function GatewayAccessTokenResponse(accessToken) {
2667
+ this.z5g_1 = accessToken;
2668
+ }
2669
+ protoOf(GatewayAccessTokenResponse).toString = function () {
2670
+ return 'GatewayAccessTokenResponse(accessToken=' + this.z5g_1 + ')';
2671
+ };
2672
+ protoOf(GatewayAccessTokenResponse).hashCode = function () {
2673
+ return getStringHashCode(this.z5g_1);
2674
+ };
2675
+ protoOf(GatewayAccessTokenResponse).equals = function (other) {
2676
+ if (this === other)
2677
+ return true;
2678
+ if (!(other instanceof GatewayAccessTokenResponse))
2679
+ return false;
2680
+ if (!(this.z5g_1 === other.z5g_1))
2681
+ return false;
2682
+ return true;
2683
+ };
2684
+ function Companion_1() {
2685
+ }
2686
+ var Companion_instance_2;
2687
+ function Companion_getInstance_6() {
2688
+ return Companion_instance_2;
2689
+ }
2690
+ function $serializer_1() {
2691
+ $serializer_instance_1 = this;
2692
+ var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.dsbuilder.frontend.core.network.GatewayErrorResponse', this, 1);
2693
+ tmp0_serialDesc.k2b('error', false);
2694
+ this.v5h_1 = tmp0_serialDesc;
2695
+ }
2696
+ protoOf($serializer_1).w5h = function (encoder, value) {
2697
+ var tmp0_desc = this.v5h_1;
2698
+ var tmp1_output = encoder.s23(tmp0_desc);
2699
+ tmp1_output.h25(tmp0_desc, 0, value.a5h_1);
2700
+ tmp1_output.t23(tmp0_desc);
2701
+ };
2702
+ protoOf($serializer_1).m20 = function (encoder, value) {
2703
+ return this.w5h(encoder, value instanceof GatewayErrorResponse ? value : THROW_CCE());
2704
+ };
2705
+ protoOf($serializer_1).n20 = function (decoder) {
2706
+ var tmp0_desc = this.v5h_1;
2707
+ var tmp1_flag = true;
2708
+ var tmp2_index = 0;
2709
+ var tmp3_bitMask0 = 0;
2710
+ var tmp4_local0 = null;
2711
+ var tmp5_input = decoder.s23(tmp0_desc);
2712
+ if (tmp5_input.i24()) {
2713
+ tmp4_local0 = tmp5_input.c24(tmp0_desc, 0);
2714
+ tmp3_bitMask0 = tmp3_bitMask0 | 1;
2715
+ } else
2716
+ while (tmp1_flag) {
2717
+ tmp2_index = tmp5_input.j24(tmp0_desc);
2718
+ switch (tmp2_index) {
2719
+ case -1:
2720
+ tmp1_flag = false;
2721
+ break;
2722
+ case 0:
2723
+ tmp4_local0 = tmp5_input.c24(tmp0_desc, 0);
2724
+ tmp3_bitMask0 = tmp3_bitMask0 | 1;
2725
+ break;
2726
+ default:
2727
+ throw UnknownFieldException_init_$Create$(tmp2_index);
2728
+ }
2729
+ }
2730
+ tmp5_input.t23(tmp0_desc);
2731
+ return GatewayErrorResponse_init_$Create$(tmp3_bitMask0, tmp4_local0, null);
2732
+ };
2733
+ protoOf($serializer_1).l20 = function () {
2734
+ return this.v5h_1;
2735
+ };
2736
+ protoOf($serializer_1).z2b = function () {
2737
+ // Inline function 'kotlin.arrayOf' call
2738
+ // Inline function 'kotlin.js.unsafeCast' call
2739
+ // Inline function 'kotlin.js.asDynamic' call
2740
+ return [StringSerializer_getInstance()];
2741
+ };
2742
+ var $serializer_instance_1;
2743
+ function $serializer_getInstance_1() {
2744
+ if ($serializer_instance_1 == null)
2745
+ new $serializer_1();
2746
+ return $serializer_instance_1;
2747
+ }
2748
+ function GatewayErrorResponse_init_$Init$(seen0, error, serializationConstructorMarker, $this) {
2749
+ if (!(1 === (1 & seen0))) {
2750
+ throwMissingFieldException(seen0, 1, $serializer_getInstance_1().v5h_1);
2751
+ }
2752
+ $this.a5h_1 = error;
2753
+ return $this;
2754
+ }
2755
+ function GatewayErrorResponse_init_$Create$(seen0, error, serializationConstructorMarker) {
2756
+ return GatewayErrorResponse_init_$Init$(seen0, error, serializationConstructorMarker, objectCreate(protoOf(GatewayErrorResponse)));
2757
+ }
2758
+ function GatewayErrorResponse(error) {
2759
+ this.a5h_1 = error;
2760
+ }
2761
+ protoOf(GatewayErrorResponse).toString = function () {
2762
+ return 'GatewayErrorResponse(error=' + this.a5h_1 + ')';
2763
+ };
2764
+ protoOf(GatewayErrorResponse).hashCode = function () {
2765
+ return getStringHashCode(this.a5h_1);
2766
+ };
2767
+ protoOf(GatewayErrorResponse).equals = function (other) {
2768
+ if (this === other)
2769
+ return true;
2770
+ if (!(other instanceof GatewayErrorResponse))
2771
+ return false;
2772
+ if (!(this.a5h_1 === other.a5h_1))
2773
+ return false;
2774
+ return true;
2775
+ };
2776
+ function $readCOROUTINE$(_this__u8e3s4, apiUrl, accessToken, resultContinuation) {
2777
+ CoroutineImpl.call(this, resultContinuation);
2778
+ this.f5i_1 = _this__u8e3s4;
2779
+ this.g5i_1 = apiUrl;
2780
+ this.h5i_1 = accessToken;
2781
+ }
2782
+ protoOf($readCOROUTINE$).e9 = function () {
2783
+ var suspendResult = this.y8_1;
2784
+ $sm: do
2785
+ try {
2786
+ var tmp = this.w8_1;
2787
+ switch (tmp) {
2788
+ case 0:
2789
+ this.x8_1 = 5;
2790
+ if (!allowsInteractiveAuth(this.g5i_1))
2791
+ return invalidAuthUrl();
2792
+ this.x8_1 = 4;
2793
+ var tmp0 = this.f5i_1.o5h_1;
2794
+ var urlString = oauthEndpoint(this.g5i_1, '/realms/dsbuilder/protocol/openid-connect/userinfo');
2795
+ var this_0 = new HttpRequestBuilder();
2796
+ url(this_0, urlString);
2797
+ bearerAuth(this_0, this.h5i_1);
2798
+ this_0.m3s_1 = Companion_getInstance().m2y_1;
2799
+ this.w8_1 = 1;
2800
+ suspendResult = (new HttpStatement(this_0, tmp0)).z4j(this);
2801
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
2802
+ return suspendResult;
2803
+ }
2804
+
2805
+ continue $sm;
2806
+ case 1:
2807
+ var response = suspendResult;
2808
+ if (!isSuccess(response.k3u())) {
2809
+ var tmp_0 = this;
2810
+ tmp_0.j5i_1 = new Failed(AuthErrorCode_AUTH_REQUIRED_getInstance(), '\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044F.');
2811
+ this.w8_1 = 3;
2812
+ continue $sm;
2813
+ } else {
2814
+ var tmp_1 = this;
2815
+ tmp_1.k5i_1 = this.f5i_1.p5h_1;
2816
+ this.w8_1 = 2;
2817
+ suspendResult = bodyAsText(response, VOID, this);
2818
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
2819
+ return suspendResult;
2820
+ }
2821
+ continue $sm;
2822
+ }
2823
+
2824
+ case 2:
2825
+ var tmp2 = suspendResult;
2826
+ var this_1 = this.k5i_1;
2827
+ var this_2 = this_1.h24();
2828
+ var this_3 = serializer(this_2, createKType(getKClass(GatewayUserInfo), arrayOf([]), false));
2829
+ var info = this_1.p35(isInterface(this_3, KSerializer) ? this_3 : THROW_CCE(), tmp2);
2830
+ var name = info.m5i_1;
2831
+ var tmp_2;
2832
+ var tmp_3;
2833
+ if (!isBlank(name)) {
2834
+ tmp_3 = name.length <= 256;
2835
+ } else {
2836
+ tmp_3 = false;
2837
+ }
2838
+
2839
+ if (tmp_3) {
2840
+ var tmp$ret$0;
2841
+ l$ret$1: do {
2842
+ var inductionVariable = 0;
2843
+ while (inductionVariable < charSequenceLength(name)) {
2844
+ var element = charSequenceGet(name, inductionVariable);
2845
+ inductionVariable = inductionVariable + 1 | 0;
2846
+ if (isISOControl(element)) {
2847
+ tmp$ret$0 = false;
2848
+ break l$ret$1;
2849
+ }
2850
+ }
2851
+ tmp$ret$0 = true;
2852
+ }
2853
+ while (false);
2854
+ tmp_2 = tmp$ret$0;
2855
+ } else {
2856
+ tmp_2 = false;
2857
+ }
2858
+
2859
+ var validName = tmp_2;
2860
+ var tmp_4 = this;
2861
+ var tmp_5;
2862
+ if (isBlank(info.l5i_1) || !validName) {
2863
+ tmp_5 = new Failed(AuthErrorCode_AUTH_REQUIRED_getInstance(), '\u041D\u0435\u043A\u043E\u0440\u0440\u0435\u043A\u0442\u043D\u044B\u0439 \u043E\u0442\u0432\u0435\u0442 userinfo.');
2864
+ } else {
2865
+ tmp_5 = new Success(name);
2866
+ }
2867
+
2868
+ tmp_4.j5i_1 = tmp_5;
2869
+ this.w8_1 = 3;
2870
+ continue $sm;
2871
+ case 3:
2872
+ this.i5i_1 = this.j5i_1;
2873
+ this.x8_1 = 5;
2874
+ this.w8_1 = 6;
2875
+ continue $sm;
2876
+ case 4:
2877
+ this.x8_1 = 5;
2878
+ var tmp_6 = this.z8_1;
2879
+ if (tmp_6 instanceof CancellationException) {
2880
+ var exception = this.z8_1;
2881
+ var tmp_7 = this;
2882
+ throw exception;
2883
+ } else {
2884
+ var tmp_8 = this.z8_1;
2885
+ if (tmp_8 instanceof Exception) {
2886
+ var exception_0 = this.z8_1;
2887
+ var tmp_9 = this;
2888
+ tmp_9.i5i_1 = new Failed(AuthErrorCode_BACKEND_UNAVAILABLE_getInstance(), 'Userinfo \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D.');
2889
+ this.w8_1 = 6;
2890
+ continue $sm;
2891
+ } else {
2892
+ throw this.z8_1;
2893
+ }
2894
+ }
2895
+
2896
+ case 5:
2897
+ throw this.z8_1;
2898
+ case 6:
2899
+ this.x8_1 = 5;
2900
+ return this.i5i_1;
2901
+ }
2902
+ } catch ($p) {
2903
+ var e = $p;
2904
+ if (this.x8_1 === 5) {
2905
+ throw e;
2906
+ } else {
2907
+ this.w8_1 = this.x8_1;
2908
+ this.z8_1 = e;
2909
+ }
2910
+ }
2911
+ while (true);
2912
+ };
2913
+ function KtorUserInfoClient(httpClient, json) {
2914
+ this.o5h_1 = httpClient;
2915
+ this.p5h_1 = json;
2916
+ }
2917
+ protoOf(KtorUserInfoClient).q5h = function (apiUrl, accessToken, $completion) {
2918
+ var tmp = new $readCOROUTINE$(this, apiUrl, accessToken, $completion);
2919
+ tmp.y8_1 = Unit_instance;
2920
+ tmp.z8_1 = null;
2921
+ return tmp.e9();
2922
+ };
2923
+ function Companion_2() {
2924
+ }
2925
+ var Companion_instance_3;
2926
+ function Companion_getInstance_7() {
2927
+ return Companion_instance_3;
2928
+ }
2929
+ function $serializer_2() {
2930
+ $serializer_instance_2 = this;
2931
+ var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.dsbuilder.frontend.core.network.GatewayUserInfo', this, 2);
2932
+ tmp0_serialDesc.k2b('sub', false);
2933
+ tmp0_serialDesc.k2b('preferred_username', false);
2934
+ this.n5i_1 = tmp0_serialDesc;
2935
+ }
2936
+ protoOf($serializer_2).o5i = function (encoder, value) {
2937
+ var tmp0_desc = this.n5i_1;
2938
+ var tmp1_output = encoder.s23(tmp0_desc);
2939
+ tmp1_output.h25(tmp0_desc, 0, value.l5i_1);
2940
+ tmp1_output.h25(tmp0_desc, 1, value.m5i_1);
2941
+ tmp1_output.t23(tmp0_desc);
2942
+ };
2943
+ protoOf($serializer_2).m20 = function (encoder, value) {
2944
+ return this.o5i(encoder, value instanceof GatewayUserInfo ? value : THROW_CCE());
2945
+ };
2946
+ protoOf($serializer_2).n20 = function (decoder) {
2947
+ var tmp0_desc = this.n5i_1;
2948
+ var tmp1_flag = true;
2949
+ var tmp2_index = 0;
2950
+ var tmp3_bitMask0 = 0;
2951
+ var tmp4_local0 = null;
2952
+ var tmp5_local1 = null;
2953
+ var tmp6_input = decoder.s23(tmp0_desc);
2954
+ if (tmp6_input.i24()) {
2955
+ tmp4_local0 = tmp6_input.c24(tmp0_desc, 0);
2956
+ tmp3_bitMask0 = tmp3_bitMask0 | 1;
2957
+ tmp5_local1 = tmp6_input.c24(tmp0_desc, 1);
2958
+ tmp3_bitMask0 = tmp3_bitMask0 | 2;
2959
+ } else
2960
+ while (tmp1_flag) {
2961
+ tmp2_index = tmp6_input.j24(tmp0_desc);
2962
+ switch (tmp2_index) {
2963
+ case -1:
2964
+ tmp1_flag = false;
2965
+ break;
2966
+ case 0:
2967
+ tmp4_local0 = tmp6_input.c24(tmp0_desc, 0);
2968
+ tmp3_bitMask0 = tmp3_bitMask0 | 1;
2969
+ break;
2970
+ case 1:
2971
+ tmp5_local1 = tmp6_input.c24(tmp0_desc, 1);
2972
+ tmp3_bitMask0 = tmp3_bitMask0 | 2;
2973
+ break;
2974
+ default:
2975
+ throw UnknownFieldException_init_$Create$(tmp2_index);
2976
+ }
2977
+ }
2978
+ tmp6_input.t23(tmp0_desc);
2979
+ return GatewayUserInfo_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
2980
+ };
2981
+ protoOf($serializer_2).l20 = function () {
2982
+ return this.n5i_1;
2983
+ };
2984
+ protoOf($serializer_2).z2b = function () {
2985
+ // Inline function 'kotlin.arrayOf' call
2986
+ // Inline function 'kotlin.js.unsafeCast' call
2987
+ // Inline function 'kotlin.js.asDynamic' call
2988
+ return [StringSerializer_getInstance(), StringSerializer_getInstance()];
2989
+ };
2990
+ var $serializer_instance_2;
2991
+ function $serializer_getInstance_2() {
2992
+ if ($serializer_instance_2 == null)
2993
+ new $serializer_2();
2994
+ return $serializer_instance_2;
2995
+ }
2996
+ function GatewayUserInfo_init_$Init$(seen0, subject, username, serializationConstructorMarker, $this) {
2997
+ if (!(3 === (3 & seen0))) {
2998
+ throwMissingFieldException(seen0, 3, $serializer_getInstance_2().n5i_1);
2999
+ }
3000
+ $this.l5i_1 = subject;
3001
+ $this.m5i_1 = username;
3002
+ return $this;
3003
+ }
3004
+ function GatewayUserInfo_init_$Create$(seen0, subject, username, serializationConstructorMarker) {
3005
+ return GatewayUserInfo_init_$Init$(seen0, subject, username, serializationConstructorMarker, objectCreate(protoOf(GatewayUserInfo)));
3006
+ }
3007
+ function GatewayUserInfo(subject, username) {
3008
+ this.l5i_1 = subject;
3009
+ this.m5i_1 = username;
3010
+ }
3011
+ protoOf(GatewayUserInfo).toString = function () {
3012
+ return 'GatewayUserInfo(subject=' + this.l5i_1 + ', username=' + this.m5i_1 + ')';
3013
+ };
3014
+ protoOf(GatewayUserInfo).hashCode = function () {
3015
+ var result = getStringHashCode(this.l5i_1);
3016
+ result = imul(result, 31) + getStringHashCode(this.m5i_1) | 0;
3017
+ return result;
3018
+ };
3019
+ protoOf(GatewayUserInfo).equals = function (other) {
3020
+ if (this === other)
3021
+ return true;
3022
+ if (!(other instanceof GatewayUserInfo))
3023
+ return false;
3024
+ if (!(this.l5i_1 === other.l5i_1))
3025
+ return false;
3026
+ if (!(this.m5i_1 === other.m5i_1))
3027
+ return false;
3028
+ return true;
3029
+ };
3030
+ function confirmTruncatedMutation(_this__u8e3s4, result, paths, $completion) {
3031
+ var tmp = new $confirmTruncatedMutationCOROUTINE$(_this__u8e3s4, result, paths, $completion);
3032
+ tmp.y8_1 = Unit_instance;
3033
+ tmp.z8_1 = null;
3034
+ return tmp.e9();
3035
+ }
3036
+ function createdResourceId(_this__u8e3s4) {
3037
+ var tmp0_safe_receiver = _this__u8e3s4 instanceof Response ? _this__u8e3s4 : null;
3038
+ var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.g5f_1;
3039
+ var tmp;
3040
+ if (tmp1_elvis_lhs == null) {
3041
+ return null;
3042
+ } else {
3043
+ tmp = tmp1_elvis_lhs;
3044
+ }
3045
+ var body = tmp;
3046
+ // Inline function 'kotlin.runCatching' call
3047
+ var tmp_0;
3048
+ try {
3049
+ var tmp_1 = Default_getInstance().s35(body);
3050
+ var tmp0_safe_receiver_0 = tmp_1 instanceof JsonObject ? tmp_1 : null;
3051
+ var tmp_2 = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.xd('id');
3052
+ // Inline function 'kotlin.Companion.success' call
3053
+ var value = tmp_2 instanceof JsonPrimitive ? tmp_2 : null;
3054
+ tmp_0 = _Result___init__impl__xyqfz8(value);
3055
+ } catch ($p) {
3056
+ var tmp_3;
3057
+ if ($p instanceof Error) {
3058
+ var e = $p;
3059
+ // Inline function 'kotlin.Companion.failure' call
3060
+ tmp_3 = _Result___init__impl__xyqfz8(createFailure(e));
3061
+ } else {
3062
+ throw $p;
3063
+ }
3064
+ tmp_0 = tmp_3;
3065
+ }
3066
+ // Inline function 'kotlin.Result.getOrNull' call
3067
+ var this_0 = tmp_0;
3068
+ var tmp_4;
3069
+ if (_Result___get_isFailure__impl__jpiriv(this_0)) {
3070
+ tmp_4 = null;
3071
+ } else {
3072
+ var tmp_5 = _Result___get_value__impl__bjfvqg(this_0);
3073
+ tmp_4 = (tmp_5 == null ? true : !(tmp_5 == null)) ? tmp_5 : THROW_CCE();
3074
+ }
3075
+ var tmp2_safe_receiver = tmp_4;
3076
+ var tmp_6;
3077
+ if (tmp2_safe_receiver == null) {
3078
+ tmp_6 = null;
3079
+ } else {
3080
+ // Inline function 'kotlin.takeIf' call
3081
+ var tmp_7;
3082
+ if (tmp2_safe_receiver.c38()) {
3083
+ tmp_7 = tmp2_safe_receiver;
3084
+ } else {
3085
+ tmp_7 = null;
3086
+ }
3087
+ tmp_6 = tmp_7;
3088
+ }
3089
+ var tmp3_safe_receiver = tmp_6;
3090
+ var tmp4_elvis_lhs = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.d38();
3091
+ var tmp_8;
3092
+ if (tmp4_elvis_lhs == null) {
3093
+ return null;
3094
+ } else {
3095
+ tmp_8 = tmp4_elvis_lhs;
3096
+ }
3097
+ var id = tmp_8;
3098
+ // Inline function 'kotlin.takeIf' call
3099
+ var tmp_9;
3100
+ // Inline function 'kotlin.runCatching' call
3101
+ var tmp_10;
3102
+ try {
3103
+ // Inline function 'kotlin.Companion.success' call
3104
+ var value_0 = encodeEditorId(id);
3105
+ tmp_10 = _Result___init__impl__xyqfz8(value_0);
3106
+ } catch ($p) {
3107
+ var tmp_11;
3108
+ if ($p instanceof Error) {
3109
+ var e_0 = $p;
3110
+ // Inline function 'kotlin.Companion.failure' call
3111
+ tmp_11 = _Result___init__impl__xyqfz8(createFailure(e_0));
3112
+ } else {
3113
+ throw $p;
3114
+ }
3115
+ tmp_10 = tmp_11;
3116
+ }
3117
+ var tmp$ret$10 = tmp_10;
3118
+ if (_Result___get_isSuccess__impl__sndoy8(tmp$ret$10)) {
3119
+ tmp_9 = id;
3120
+ } else {
3121
+ tmp_9 = null;
3122
+ }
3123
+ return tmp_9;
3124
+ }
3125
+ function confirmationBody(_this__u8e3s4, path, $completion) {
3126
+ var tmp = new $confirmationBodyCOROUTINE$(_this__u8e3s4, path, $completion);
3127
+ tmp.y8_1 = Unit_instance;
3128
+ tmp.z8_1 = null;
3129
+ return tmp.e9();
3130
+ }
3131
+ function $confirmTruncatedMutationCOROUTINE$(_this__u8e3s4, result, paths, resultContinuation) {
3132
+ CoroutineImpl.call(this, resultContinuation);
3133
+ this.x5i_1 = _this__u8e3s4;
3134
+ this.y5i_1 = result;
3135
+ this.z5i_1 = paths;
3136
+ }
3137
+ protoOf($confirmTruncatedMutationCOROUTINE$).e9 = function () {
3138
+ var suspendResult = this.y8_1;
3139
+ $sm: do
3140
+ try {
3141
+ var tmp = this.w8_1;
3142
+ switch (tmp) {
3143
+ case 0:
3144
+ this.x8_1 = 4;
3145
+ var tmp_0;
3146
+ var tmp_1 = this.y5i_1;
3147
+ if (!(tmp_1 instanceof Response)) {
3148
+ tmp_0 = true;
3149
+ } else {
3150
+ var containsArg = this.y5i_1.f5f_1;
3151
+ tmp_0 = !(200 <= containsArg ? containsArg <= 299 : false);
3152
+ }
3153
+
3154
+ if (tmp_0)
3155
+ return this.y5i_1;
3156
+ if (this.y5i_1.i5f_1 && !(this.y5i_1.h5f_1.c2('x-ds-mutation-metadata-truncated') === 'true'))
3157
+ return this.y5i_1;
3158
+ var tmp_2 = this;
3159
+ tmp_2.b5j_1 = LinkedHashMap_init_$Create$();
3160
+ this.a5j_1 = this.z5i_1.r();
3161
+ this.c5j_1 = 16384;
3162
+ this.e5j_1 = this.z5i_1.l();
3163
+ this.w8_1 = 1;
3164
+ continue $sm;
3165
+ case 1:
3166
+ if (!this.e5j_1.m()) {
3167
+ this.w8_1 = 3;
3168
+ continue $sm;
3169
+ }
3170
+
3171
+ this.d5j_1 = this.e5j_1.n();
3172
+ this.w8_1 = 2;
3173
+ suspendResult = confirmationBody(this.x5i_1, this.d5j_1, this);
3174
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
3175
+ return suspendResult;
3176
+ }
3177
+
3178
+ continue $sm;
3179
+ case 2:
3180
+ var body = suspendResult;
3181
+ var tmp_3 = encodeToByteArray(this.d5j_1).length;
3182
+ var tmp1_safe_receiver = body == null ? null : encodeToByteArray(body);
3183
+ var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.length;
3184
+ var bytes = tmp_3 + (tmp2_elvis_lhs == null ? 16385 : tmp2_elvis_lhs) | 0;
3185
+ if (!(body == null) && bytes <= this.c5j_1) {
3186
+ var tmp0 = this.b5j_1;
3187
+ var key = this.d5j_1;
3188
+ tmp0.f2(key, body);
3189
+ this.c5j_1 = this.c5j_1 - bytes | 0;
3190
+ } else {
3191
+ this.a5j_1 = true;
3192
+ }
3193
+
3194
+ this.w8_1 = 1;
3195
+ continue $sm;
3196
+ case 3:
3197
+ return this.y5i_1.n5f(VOID, VOID, VOID, VOID, this.b5j_1, true, this.a5j_1);
3198
+ case 4:
3199
+ throw this.z8_1;
3200
+ }
3201
+ } catch ($p) {
3202
+ var e = $p;
3203
+ if (this.x8_1 === 4) {
3204
+ throw e;
3205
+ } else {
3206
+ this.w8_1 = this.x8_1;
3207
+ this.z8_1 = e;
3208
+ }
3209
+ }
3210
+ while (true);
3211
+ };
3212
+ function $confirmationBodyCOROUTINE$(_this__u8e3s4, path, resultContinuation) {
3213
+ CoroutineImpl.call(this, resultContinuation);
3214
+ this.n5j_1 = _this__u8e3s4;
3215
+ this.o5j_1 = path;
3216
+ }
3217
+ protoOf($confirmationBodyCOROUTINE$).e9 = function () {
3218
+ var suspendResult = this.y8_1;
3219
+ $sm: do
3220
+ try {
3221
+ var tmp = this.w8_1;
3222
+ switch (tmp) {
3223
+ case 0:
3224
+ this.x8_1 = 3;
3225
+ this.x8_1 = 2;
3226
+ this.w8_1 = 1;
3227
+ suspendResult = this.n5j_1.z59(this.o5j_1, this);
3228
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
3229
+ return suspendResult;
3230
+ }
3231
+
3232
+ continue $sm;
3233
+ case 1:
3234
+ var tmp0_safe_receiver = suspendResult instanceof Success_0 ? suspendResult : null;
3235
+ this.p5j_1 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.f5a_1;
3236
+ this.x8_1 = 3;
3237
+ this.w8_1 = 4;
3238
+ continue $sm;
3239
+ case 2:
3240
+ this.x8_1 = 3;
3241
+ var tmp_0 = this.z8_1;
3242
+ if (tmp_0 instanceof CancellationException) {
3243
+ var exception = this.z8_1;
3244
+ var tmp_1 = this;
3245
+ throw exception;
3246
+ } else {
3247
+ var tmp_2 = this.z8_1;
3248
+ if (tmp_2 instanceof Exception) {
3249
+ var exception_0 = this.z8_1;
3250
+ var tmp_3 = this;
3251
+ tmp_3.p5j_1 = null;
3252
+ this.w8_1 = 4;
3253
+ continue $sm;
3254
+ } else {
3255
+ throw this.z8_1;
3256
+ }
3257
+ }
3258
+
3259
+ case 3:
3260
+ throw this.z8_1;
3261
+ case 4:
3262
+ this.x8_1 = 3;
3263
+ return this.p5j_1;
3264
+ }
3265
+ } catch ($p) {
3266
+ var e = $p;
3267
+ if (this.x8_1 === 3) {
3268
+ throw e;
3269
+ } else {
3270
+ this.w8_1 = this.x8_1;
3271
+ this.z8_1 = e;
3272
+ }
3273
+ }
3274
+ while (true);
3275
+ };
3276
+ //region block: post-declaration
3277
+ protoOf($serializer).a2c = typeParametersSerializers;
3278
+ protoOf($serializer_0).a2c = typeParametersSerializers;
3279
+ protoOf($serializer_1).a2c = typeParametersSerializers;
3280
+ protoOf($serializer_2).a2c = typeParametersSerializers;
3281
+ //endregion
3282
+ //region block: init
3283
+ Companion_instance_0 = new Companion();
3284
+ Companion_instance_1 = new Companion_0();
3285
+ Companion_instance_2 = new Companion_1();
3286
+ Companion_instance_3 = new Companion_2();
3287
+ //endregion
3288
+ //region block: exports
3289
+ _.$_$ = _.$_$ || {};
3290
+ _.$_$.a = ApiUrlResolver;
3291
+ _.$_$.b = AuthenticatedHttpClientFactory;
3292
+ _.$_$.c = AuthenticatedHttpClient;
3293
+ _.$_$.d = AuthenticatedHttpResponse;
3294
+ _.$_$.e = Failure;
3295
+ _.$_$.f = Success_0;
3296
+ _.$_$.g = EditorEndpoint;
3297
+ _.$_$.h = OutcomeUnknown;
3298
+ _.$_$.i = Response;
3299
+ _.$_$.j = KtorAuthenticatedHttpClientFactory;
3300
+ _.$_$.k = KtorTokenClient;
3301
+ _.$_$.l = MultipartFile;
3302
+ _.$_$.m = Rejected;
3303
+ _.$_$.n = Resolved;
3304
+ _.$_$.o = allowsInteractiveAuth;
3305
+ _.$_$.p = createdResourceId;
3306
+ _.$_$.q = get_editorCommandJson;
3307
+ _.$_$.r = encodeEditorId;
3308
+ _.$_$.s = MutationHttpMethod_DELETE_getInstance;
3309
+ _.$_$.t = MutationHttpMethod_PATCH_getInstance;
3310
+ _.$_$.u = MutationHttpMethod_POST_getInstance;
3311
+ _.$_$.v = MutationHttpMethod_PUT_getInstance;
3312
+ _.$_$.w = confirmTruncatedMutation;
3313
+ _.$_$.x = editorReadResponse;
3314
+ //endregion
3315
+ return _;
3316
+ }(module.exports, require('./kotlin-kotlin-stdlib.js'), require('./design-system-builder-frontend-core-auth.js'), require('./kotlinx-serialization-kotlinx-serialization-json.js'), require('./ktor-ktor-http.js'), require('./ktor-ktor-client-core.js'), require('./ktor-ktor-utils.js'), require('./kotlinx-serialization-kotlinx-serialization-core.js')));
3317
+
3318
+ //# sourceMappingURL=design-system-builder-frontend-core-network.js.map