@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,984 @@
1
+ (function (_, kotlin_kotlin, kotlin_io_insert_koin_koin_core, kotlin_design_system_builder_frontend_core_network, kotlin_design_system_builder_frontend_core_application, kotlin_design_system_builder_frontend_core_domain, kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json, kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core, kotlin_design_system_builder_frontend_core_auth) {
2
+ 'use strict';
3
+ //region block: imports
4
+ var imul = Math.imul;
5
+ var VOID = kotlin_kotlin.$_$.c;
6
+ var module_0 = kotlin_io_insert_koin_koin_core.$_$.g;
7
+ var Companion_getInstance = kotlin_io_insert_koin_koin_core.$_$.b;
8
+ var Kind_Singleton_getInstance = kotlin_io_insert_koin_koin_core.$_$.a;
9
+ var emptyList = kotlin_kotlin.$_$.y7;
10
+ var getKClass = kotlin_kotlin.$_$.qf;
11
+ var BeanDefinition = kotlin_io_insert_koin_koin_core.$_$.c;
12
+ var SingleInstanceFactory = kotlin_io_insert_koin_koin_core.$_$.e;
13
+ var Unit_instance = kotlin_kotlin.$_$.r5;
14
+ var KoinDefinition = kotlin_io_insert_koin_koin_core.$_$.d;
15
+ var AuthenticatedHttpClientFactory = kotlin_design_system_builder_frontend_core_network.$_$.b;
16
+ var ProjectContextReader = kotlin_design_system_builder_frontend_core_application.$_$.p;
17
+ var ProjectApiUrlProvider = kotlin_design_system_builder_frontend_core_application.$_$.m;
18
+ var CredentialProvider = kotlin_design_system_builder_frontend_core_application.$_$.e;
19
+ var protoOf = kotlin_kotlin.$_$.te;
20
+ var initMetadataForInterface = kotlin_kotlin.$_$.ud;
21
+ var getStringHashCode = kotlin_kotlin.$_$.od;
22
+ var initMetadataForClass = kotlin_kotlin.$_$.qd;
23
+ var ProjectId__toString_impl_30u45p = kotlin_design_system_builder_frontend_core_domain.$_$.f1;
24
+ var DesignSystemId__toString_impl_glkotj = kotlin_design_system_builder_frontend_core_domain.$_$.x;
25
+ var ProjectApiUrl__toString_impl_gcmdir = kotlin_design_system_builder_frontend_core_domain.$_$.b1;
26
+ var toString = kotlin_kotlin.$_$.we;
27
+ var ProjectId__hashCode_impl_iqbsn6 = kotlin_design_system_builder_frontend_core_domain.$_$.e1;
28
+ var DesignSystemId__hashCode_impl_wodgcq = kotlin_design_system_builder_frontend_core_domain.$_$.w;
29
+ var ProjectApiUrl__hashCode_impl_5ejja4 = kotlin_design_system_builder_frontend_core_domain.$_$.a1;
30
+ var hashCode = kotlin_kotlin.$_$.pd;
31
+ var equals = kotlin_kotlin.$_$.jd;
32
+ var CoroutineImpl = kotlin_kotlin.$_$.tb;
33
+ var noWhenBranchMatchedException = kotlin_kotlin.$_$.vl;
34
+ var Failed = kotlin_design_system_builder_frontend_core_application.$_$.n;
35
+ var Found = kotlin_design_system_builder_frontend_core_application.$_$.o;
36
+ var CredentialRequest = kotlin_design_system_builder_frontend_core_application.$_$.f;
37
+ var get_COROUTINE_SUSPENDED = kotlin_kotlin.$_$.db;
38
+ var Selected = kotlin_design_system_builder_frontend_core_application.$_$.h;
39
+ var Failed_0 = kotlin_design_system_builder_frontend_core_application.$_$.g;
40
+ var initMetadataForCoroutine = kotlin_kotlin.$_$.sd;
41
+ var _ProjectApiUrl___get_value__impl__ub99up = kotlin_design_system_builder_frontend_core_domain.$_$.c1;
42
+ var Enum = kotlin_kotlin.$_$.kk;
43
+ var Failure = kotlin_design_system_builder_frontend_core_network.$_$.e;
44
+ var Success = kotlin_design_system_builder_frontend_core_network.$_$.f;
45
+ var IllegalArgumentException = kotlin_kotlin.$_$.nk;
46
+ var _ProjectId___get_value__impl__lfubnr = kotlin_design_system_builder_frontend_core_domain.$_$.g1;
47
+ var _DesignSystemId___get_value__impl__wgtkjx = kotlin_design_system_builder_frontend_core_domain.$_$.y;
48
+ var Json = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.r;
49
+ var toString_0 = kotlin_kotlin.$_$.bm;
50
+ var initMetadataForCompanion = kotlin_kotlin.$_$.rd;
51
+ var PluginGeneratedSerialDescriptor = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.a2;
52
+ var THROW_CCE = kotlin_kotlin.$_$.wk;
53
+ var UnknownFieldException_init_$Create$ = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.e;
54
+ var StringSerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.r;
55
+ var typeParametersSerializers = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.t1;
56
+ var GeneratedSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.u1;
57
+ var initMetadataForObject = kotlin_kotlin.$_$.wd;
58
+ var throwMissingFieldException = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.f2;
59
+ var objectCreate = kotlin_kotlin.$_$.se;
60
+ var PersonalAccessToken = kotlin_design_system_builder_frontend_core_auth.$_$.e;
61
+ //endregion
62
+ //region block: pre-declaration
63
+ initMetadataForInterface(ProjectAccessVerifier, 'ProjectAccessVerifier', VOID, VOID, VOID, [1]);
64
+ initMetadataForClass(Authorized, 'Authorized');
65
+ initMetadataForClass(Failed_1, 'Failed');
66
+ initMetadataForClass(ProjectAccessCheck, 'ProjectAccessCheck');
67
+ initMetadataForCoroutine($executeCOROUTINE$, CoroutineImpl);
68
+ initMetadataForCoroutine($verifyCOROUTINE$, CoroutineImpl);
69
+ initMetadataForClass(CheckProjectStatusUseCase, 'CheckProjectStatusUseCase', VOID, VOID, VOID, [1, 3]);
70
+ initMetadataForClass(Authorized_0, 'Authorized');
71
+ initMetadataForClass(Failed_2, 'Failed');
72
+ initMetadataForClass(CheckProjectStatusCommand, 'CheckProjectStatusCommand');
73
+ initMetadataForClass(CheckProjectStatusErrorCode, 'CheckProjectStatusErrorCode', VOID, Enum);
74
+ initMetadataForCoroutine($verifyCOROUTINE$_0, CoroutineImpl);
75
+ initMetadataForClass(HttpProjectAccessVerifier, 'HttpProjectAccessVerifier', VOID, VOID, [ProjectAccessVerifier], [1, 4]);
76
+ initMetadataForClass(Success_0, 'Success');
77
+ initMetadataForClass(Failure_0, 'Failure');
78
+ initMetadataForCompanion(Companion);
79
+ initMetadataForObject($serializer, '$serializer', VOID, VOID, [GeneratedSerializer]);
80
+ initMetadataForClass(ProjectResponse, 'ProjectResponse', VOID, VOID, VOID, VOID, VOID, {0: $serializer_getInstance});
81
+ initMetadataForCompanion(Companion_0);
82
+ initMetadataForObject($serializer_0, '$serializer', VOID, VOID, [GeneratedSerializer]);
83
+ initMetadataForClass(DesignSystemResponse, 'DesignSystemResponse', VOID, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_0});
84
+ //endregion
85
+ function statusApplicationModule() {
86
+ return module_0(VOID, statusApplicationModule$lambda);
87
+ }
88
+ function statusApplicationModule$lambda($this$module) {
89
+ // Inline function 'org.koin.core.module.Module.single' call
90
+ // Inline function 'org.koin.core.module._singleInstanceFactory' call
91
+ var definition = statusApplicationModule$lambda$lambda;
92
+ var scopeQualifier = Companion_getInstance().u56_1;
93
+ // Inline function 'org.koin.core.definition._createDefinition' call
94
+ var kind = Kind_Singleton_getInstance();
95
+ var secondaryTypes = emptyList();
96
+ var def = new BeanDefinition(scopeQualifier, getKClass(ProjectAccessVerifier), null, definition, kind, secondaryTypes);
97
+ var factory = new SingleInstanceFactory(def);
98
+ $this$module.k58(factory);
99
+ if (false || $this$module.e58_1) {
100
+ $this$module.m58(factory);
101
+ }
102
+ new KoinDefinition($this$module, factory);
103
+ // Inline function 'org.koin.core.module.Module.single' call
104
+ // Inline function 'org.koin.core.module._singleInstanceFactory' call
105
+ var definition_0 = statusApplicationModule$lambda$lambda_0;
106
+ var scopeQualifier_0 = Companion_getInstance().u56_1;
107
+ // Inline function 'org.koin.core.definition._createDefinition' call
108
+ var kind_0 = Kind_Singleton_getInstance();
109
+ var secondaryTypes_0 = emptyList();
110
+ var def_0 = new BeanDefinition(scopeQualifier_0, getKClass(CheckProjectStatusUseCase), null, definition_0, kind_0, secondaryTypes_0);
111
+ var factory_0 = new SingleInstanceFactory(def_0);
112
+ $this$module.k58(factory_0);
113
+ if (false || $this$module.e58_1) {
114
+ $this$module.m58(factory_0);
115
+ }
116
+ new KoinDefinition($this$module, factory_0);
117
+ return Unit_instance;
118
+ }
119
+ function statusApplicationModule$lambda$lambda($this$single, it) {
120
+ // Inline function 'org.koin.core.scope.Scope.get' call
121
+ var tmp$ret$0 = $this$single.j59(getKClass(AuthenticatedHttpClientFactory), null, null);
122
+ return new HttpProjectAccessVerifier(tmp$ret$0);
123
+ }
124
+ function statusApplicationModule$lambda$lambda_0($this$single, it) {
125
+ // Inline function 'org.koin.core.scope.Scope.get' call
126
+ var tmp = $this$single.j59(getKClass(ProjectContextReader), null, null);
127
+ // Inline function 'org.koin.core.scope.Scope.get' call
128
+ var tmp_0 = $this$single.j59(getKClass(ProjectApiUrlProvider), null, null);
129
+ // Inline function 'org.koin.core.scope.Scope.get' call
130
+ var tmp_1 = $this$single.j59(getKClass(CredentialProvider), null, null);
131
+ // Inline function 'org.koin.core.scope.Scope.get' call
132
+ var tmp$ret$3 = $this$single.j59(getKClass(ProjectAccessVerifier), null, null);
133
+ return new CheckProjectStatusUseCase(tmp, tmp_0, tmp_1, tmp$ret$3);
134
+ }
135
+ function ProjectAccessVerifier() {
136
+ }
137
+ function Authorized(projectName, designSystemName) {
138
+ this.l95_1 = projectName;
139
+ this.m95_1 = designSystemName;
140
+ }
141
+ protoOf(Authorized).toString = function () {
142
+ return 'Authorized(projectName=' + this.l95_1 + ', designSystemName=' + this.m95_1 + ')';
143
+ };
144
+ protoOf(Authorized).hashCode = function () {
145
+ var result = getStringHashCode(this.l95_1);
146
+ result = imul(result, 31) + getStringHashCode(this.m95_1) | 0;
147
+ return result;
148
+ };
149
+ protoOf(Authorized).equals = function (other) {
150
+ if (this === other)
151
+ return true;
152
+ if (!(other instanceof Authorized))
153
+ return false;
154
+ if (!(this.l95_1 === other.l95_1))
155
+ return false;
156
+ if (!(this.m95_1 === other.m95_1))
157
+ return false;
158
+ return true;
159
+ };
160
+ function Failed_1(message, code) {
161
+ code = code === VOID ? CheckProjectStatusErrorCode_BACKEND_UNAVAILABLE_getInstance() : code;
162
+ this.n95_1 = message;
163
+ this.o95_1 = code;
164
+ }
165
+ protoOf(Failed_1).toString = function () {
166
+ return 'Failed(message=' + this.n95_1 + ', code=' + this.o95_1.toString() + ')';
167
+ };
168
+ protoOf(Failed_1).hashCode = function () {
169
+ var result = getStringHashCode(this.n95_1);
170
+ result = imul(result, 31) + this.o95_1.hashCode() | 0;
171
+ return result;
172
+ };
173
+ protoOf(Failed_1).equals = function (other) {
174
+ if (this === other)
175
+ return true;
176
+ if (!(other instanceof Failed_1))
177
+ return false;
178
+ if (!(this.n95_1 === other.n95_1))
179
+ return false;
180
+ if (!this.o95_1.equals(other.o95_1))
181
+ return false;
182
+ return true;
183
+ };
184
+ function ProjectAccessCheck(projectId, designSystemId, apiUrl, credential) {
185
+ this.p95_1 = projectId;
186
+ this.q95_1 = designSystemId;
187
+ this.r95_1 = apiUrl;
188
+ this.s95_1 = credential;
189
+ }
190
+ protoOf(ProjectAccessCheck).toString = function () {
191
+ return 'ProjectAccessCheck(projectId=' + ProjectId__toString_impl_30u45p(this.p95_1) + ', designSystemId=' + DesignSystemId__toString_impl_glkotj(this.q95_1) + ', apiUrl=' + ProjectApiUrl__toString_impl_gcmdir(this.r95_1) + ', credential=' + toString(this.s95_1) + ')';
192
+ };
193
+ protoOf(ProjectAccessCheck).hashCode = function () {
194
+ var result = ProjectId__hashCode_impl_iqbsn6(this.p95_1);
195
+ result = imul(result, 31) + DesignSystemId__hashCode_impl_wodgcq(this.q95_1) | 0;
196
+ result = imul(result, 31) + ProjectApiUrl__hashCode_impl_5ejja4(this.r95_1) | 0;
197
+ result = imul(result, 31) + hashCode(this.s95_1) | 0;
198
+ return result;
199
+ };
200
+ protoOf(ProjectAccessCheck).equals = function (other) {
201
+ if (this === other)
202
+ return true;
203
+ if (!(other instanceof ProjectAccessCheck))
204
+ return false;
205
+ if (!(this.p95_1 === other.p95_1))
206
+ return false;
207
+ if (!(this.q95_1 === other.q95_1))
208
+ return false;
209
+ if (!(this.r95_1 === other.r95_1))
210
+ return false;
211
+ if (!equals(this.s95_1, other.s95_1))
212
+ return false;
213
+ return true;
214
+ };
215
+ function verify($this, context, apiUrl, credential, $completion) {
216
+ var tmp = new $verifyCOROUTINE$($this, context, apiUrl, credential, $completion);
217
+ tmp.y8_1 = Unit_instance;
218
+ tmp.z8_1 = null;
219
+ return tmp.e9();
220
+ }
221
+ function $executeCOROUTINE$(_this__u8e3s4, command, resultContinuation) {
222
+ CoroutineImpl.call(this, resultContinuation);
223
+ this.n96_1 = _this__u8e3s4;
224
+ this.o96_1 = command;
225
+ }
226
+ protoOf($executeCOROUTINE$).e9 = function () {
227
+ var suspendResult = this.y8_1;
228
+ $sm: do
229
+ try {
230
+ var tmp = this.w8_1;
231
+ switch (tmp) {
232
+ case 0:
233
+ this.x8_1 = 3;
234
+ var result = this.n96_1.r96_1.l5s(this.o96_1.x96_1, this.o96_1.y96_1);
235
+ var tmp_0;
236
+ if (result instanceof Found) {
237
+ tmp_0 = result;
238
+ } else {
239
+ if (result instanceof Failed) {
240
+ var tmp_1;
241
+ switch (result.v5t_1.o2_1) {
242
+ case 0:
243
+ tmp_1 = CheckProjectStatusErrorCode_CONTEXT_REQUIRED_getInstance();
244
+ break;
245
+ case 1:
246
+ tmp_1 = CheckProjectStatusErrorCode_INVALID_CONTEXT_getInstance();
247
+ break;
248
+ case 2:
249
+ tmp_1 = CheckProjectStatusErrorCode_CONTEXT_NOT_FOUND_getInstance();
250
+ break;
251
+ default:
252
+ noWhenBranchMatchedException();
253
+ break;
254
+ }
255
+ return new Failed_2(result.u5t_1, tmp_1);
256
+ } else {
257
+ noWhenBranchMatchedException();
258
+ }
259
+ }
260
+
261
+ var found = tmp_0;
262
+ this.q96_1 = found.s5t_1;
263
+ this.p96_1 = this.n96_1.s96_1.r5t(this.o96_1.w96_1, found.t5t_1);
264
+ this.w8_1 = 1;
265
+ suspendResult = this.n96_1.t96_1.h5t(new CredentialRequest(this.p96_1, this.o96_1.v96_1, this.q96_1.z5o_1, this.q96_1.c5p_1, found.t5t_1), this);
266
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
267
+ return suspendResult;
268
+ }
269
+
270
+ continue $sm;
271
+ case 1:
272
+ var result_0 = suspendResult;
273
+ var tmp_2;
274
+ if (result_0 instanceof Failed_0) {
275
+ return new Failed_2(result_0.z5t_1, toStatusErrorCode(result_0.y5t_1));
276
+ } else {
277
+ if (result_0 instanceof Selected) {
278
+ tmp_2 = result_0.w5t_1;
279
+ } else {
280
+ noWhenBranchMatchedException();
281
+ }
282
+ }
283
+
284
+ var credential = tmp_2;
285
+ this.w8_1 = 2;
286
+ suspendResult = verify(this.n96_1, this.q96_1, this.p96_1, credential, this);
287
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
288
+ return suspendResult;
289
+ }
290
+
291
+ continue $sm;
292
+ case 2:
293
+ return suspendResult;
294
+ case 3:
295
+ throw this.z8_1;
296
+ }
297
+ } catch ($p) {
298
+ var e = $p;
299
+ if (this.x8_1 === 3) {
300
+ throw e;
301
+ } else {
302
+ this.w8_1 = this.x8_1;
303
+ this.z8_1 = e;
304
+ }
305
+ }
306
+ while (true);
307
+ };
308
+ function $verifyCOROUTINE$(_this__u8e3s4, context, apiUrl, credential, resultContinuation) {
309
+ CoroutineImpl.call(this, resultContinuation);
310
+ this.b96_1 = _this__u8e3s4;
311
+ this.c96_1 = context;
312
+ this.d96_1 = apiUrl;
313
+ this.e96_1 = credential;
314
+ }
315
+ protoOf($verifyCOROUTINE$).e9 = function () {
316
+ var suspendResult = this.y8_1;
317
+ $sm: do
318
+ try {
319
+ var tmp = this.w8_1;
320
+ switch (tmp) {
321
+ case 0:
322
+ this.x8_1 = 2;
323
+ this.w8_1 = 1;
324
+ suspendResult = this.b96_1.u96_1.k95(new ProjectAccessCheck(this.c96_1.x5o_1, this.c96_1.y5o_1, this.d96_1, this.e96_1), this);
325
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
326
+ return suspendResult;
327
+ }
328
+
329
+ continue $sm;
330
+ case 1:
331
+ var result = suspendResult;
332
+ var tmp_0;
333
+ if (result instanceof Authorized) {
334
+ tmp_0 = new Authorized_0(result.l95_1, result.m95_1, this.c96_1.a5p_1, _ProjectApiUrl___get_value__impl__ub99up(this.d96_1));
335
+ } else {
336
+ if (result instanceof Failed_1) {
337
+ tmp_0 = new Failed_2(result.n95_1, result.o95_1);
338
+ } else {
339
+ noWhenBranchMatchedException();
340
+ }
341
+ }
342
+
343
+ return tmp_0;
344
+ case 2:
345
+ throw this.z8_1;
346
+ }
347
+ } catch ($p) {
348
+ var e = $p;
349
+ if (this.x8_1 === 2) {
350
+ throw e;
351
+ } else {
352
+ this.w8_1 = this.x8_1;
353
+ this.z8_1 = e;
354
+ }
355
+ }
356
+ while (true);
357
+ };
358
+ function CheckProjectStatusUseCase(projectContextReader, projectApiUrlProvider, credentialProvider, projectAccessVerifier) {
359
+ this.r96_1 = projectContextReader;
360
+ this.s96_1 = projectApiUrlProvider;
361
+ this.t96_1 = credentialProvider;
362
+ this.u96_1 = projectAccessVerifier;
363
+ }
364
+ protoOf(CheckProjectStatusUseCase).z96 = function (command, $completion) {
365
+ var tmp = new $executeCOROUTINE$(this, command, $completion);
366
+ tmp.y8_1 = Unit_instance;
367
+ tmp.z8_1 = null;
368
+ return tmp.e9();
369
+ };
370
+ function Authorized_0(projectName, designSystemName, configPath, apiUrl) {
371
+ this.a97_1 = projectName;
372
+ this.b97_1 = designSystemName;
373
+ this.c97_1 = configPath;
374
+ this.d97_1 = apiUrl;
375
+ }
376
+ protoOf(Authorized_0).toString = function () {
377
+ return 'Authorized(projectName=' + this.a97_1 + ', designSystemName=' + this.b97_1 + ', configPath=' + this.c97_1 + ', apiUrl=' + this.d97_1 + ')';
378
+ };
379
+ protoOf(Authorized_0).hashCode = function () {
380
+ var result = getStringHashCode(this.a97_1);
381
+ result = imul(result, 31) + getStringHashCode(this.b97_1) | 0;
382
+ result = imul(result, 31) + getStringHashCode(this.c97_1) | 0;
383
+ result = imul(result, 31) + getStringHashCode(this.d97_1) | 0;
384
+ return result;
385
+ };
386
+ protoOf(Authorized_0).equals = function (other) {
387
+ if (this === other)
388
+ return true;
389
+ if (!(other instanceof Authorized_0))
390
+ return false;
391
+ if (!(this.a97_1 === other.a97_1))
392
+ return false;
393
+ if (!(this.b97_1 === other.b97_1))
394
+ return false;
395
+ if (!(this.c97_1 === other.c97_1))
396
+ return false;
397
+ if (!(this.d97_1 === other.d97_1))
398
+ return false;
399
+ return true;
400
+ };
401
+ function Failed_2(message, code) {
402
+ code = code === VOID ? CheckProjectStatusErrorCode_BACKEND_UNAVAILABLE_getInstance() : code;
403
+ this.e97_1 = message;
404
+ this.f97_1 = code;
405
+ }
406
+ protoOf(Failed_2).toString = function () {
407
+ return 'Failed(message=' + this.e97_1 + ', code=' + this.f97_1.toString() + ')';
408
+ };
409
+ protoOf(Failed_2).hashCode = function () {
410
+ var result = getStringHashCode(this.e97_1);
411
+ result = imul(result, 31) + this.f97_1.hashCode() | 0;
412
+ return result;
413
+ };
414
+ protoOf(Failed_2).equals = function (other) {
415
+ if (this === other)
416
+ return true;
417
+ if (!(other instanceof Failed_2))
418
+ return false;
419
+ if (!(this.e97_1 === other.e97_1))
420
+ return false;
421
+ if (!this.f97_1.equals(other.f97_1))
422
+ return false;
423
+ return true;
424
+ };
425
+ function CheckProjectStatusCommand(apiKeyOverride, apiUrlOverride, workspace, designSystemUri) {
426
+ workspace = workspace === VOID ? null : workspace;
427
+ designSystemUri = designSystemUri === VOID ? null : designSystemUri;
428
+ this.v96_1 = apiKeyOverride;
429
+ this.w96_1 = apiUrlOverride;
430
+ this.x96_1 = workspace;
431
+ this.y96_1 = designSystemUri;
432
+ }
433
+ protoOf(CheckProjectStatusCommand).toString = function () {
434
+ return 'CheckProjectStatusCommand(apiKeyOverride=' + this.v96_1 + ', apiUrlOverride=' + this.w96_1 + ', workspace=' + this.x96_1 + ', designSystemUri=' + this.y96_1 + ')';
435
+ };
436
+ protoOf(CheckProjectStatusCommand).hashCode = function () {
437
+ var result = this.v96_1 == null ? 0 : getStringHashCode(this.v96_1);
438
+ result = imul(result, 31) + (this.w96_1 == null ? 0 : getStringHashCode(this.w96_1)) | 0;
439
+ result = imul(result, 31) + (this.x96_1 == null ? 0 : getStringHashCode(this.x96_1)) | 0;
440
+ result = imul(result, 31) + (this.y96_1 == null ? 0 : getStringHashCode(this.y96_1)) | 0;
441
+ return result;
442
+ };
443
+ protoOf(CheckProjectStatusCommand).equals = function (other) {
444
+ if (this === other)
445
+ return true;
446
+ if (!(other instanceof CheckProjectStatusCommand))
447
+ return false;
448
+ if (!(this.v96_1 == other.v96_1))
449
+ return false;
450
+ if (!(this.w96_1 == other.w96_1))
451
+ return false;
452
+ if (!(this.x96_1 == other.x96_1))
453
+ return false;
454
+ if (!(this.y96_1 == other.y96_1))
455
+ return false;
456
+ return true;
457
+ };
458
+ var CheckProjectStatusErrorCode_CONTEXT_REQUIRED_instance;
459
+ var CheckProjectStatusErrorCode_INVALID_CONTEXT_instance;
460
+ var CheckProjectStatusErrorCode_CONTEXT_NOT_FOUND_instance;
461
+ var CheckProjectStatusErrorCode_AUTH_REQUIRED_instance;
462
+ var CheckProjectStatusErrorCode_PAT_INVALID_instance;
463
+ var CheckProjectStatusErrorCode_FORBIDDEN_instance;
464
+ var CheckProjectStatusErrorCode_BACKEND_UNAVAILABLE_instance;
465
+ var CheckProjectStatusErrorCode_entriesInitialized;
466
+ function CheckProjectStatusErrorCode_initEntries() {
467
+ if (CheckProjectStatusErrorCode_entriesInitialized)
468
+ return Unit_instance;
469
+ CheckProjectStatusErrorCode_entriesInitialized = true;
470
+ CheckProjectStatusErrorCode_CONTEXT_REQUIRED_instance = new CheckProjectStatusErrorCode('CONTEXT_REQUIRED', 0);
471
+ CheckProjectStatusErrorCode_INVALID_CONTEXT_instance = new CheckProjectStatusErrorCode('INVALID_CONTEXT', 1);
472
+ CheckProjectStatusErrorCode_CONTEXT_NOT_FOUND_instance = new CheckProjectStatusErrorCode('CONTEXT_NOT_FOUND', 2);
473
+ CheckProjectStatusErrorCode_AUTH_REQUIRED_instance = new CheckProjectStatusErrorCode('AUTH_REQUIRED', 3);
474
+ CheckProjectStatusErrorCode_PAT_INVALID_instance = new CheckProjectStatusErrorCode('PAT_INVALID', 4);
475
+ CheckProjectStatusErrorCode_FORBIDDEN_instance = new CheckProjectStatusErrorCode('FORBIDDEN', 5);
476
+ CheckProjectStatusErrorCode_BACKEND_UNAVAILABLE_instance = new CheckProjectStatusErrorCode('BACKEND_UNAVAILABLE', 6);
477
+ }
478
+ function CheckProjectStatusErrorCode(name, ordinal) {
479
+ Enum.call(this, name, ordinal);
480
+ }
481
+ function toStatusErrorCode(_this__u8e3s4) {
482
+ var tmp;
483
+ switch (_this__u8e3s4.o2_1) {
484
+ case 0:
485
+ tmp = CheckProjectStatusErrorCode_AUTH_REQUIRED_getInstance();
486
+ break;
487
+ case 1:
488
+ tmp = CheckProjectStatusErrorCode_PAT_INVALID_getInstance();
489
+ break;
490
+ case 2:
491
+ tmp = CheckProjectStatusErrorCode_FORBIDDEN_getInstance();
492
+ break;
493
+ case 3:
494
+ tmp = CheckProjectStatusErrorCode_BACKEND_UNAVAILABLE_getInstance();
495
+ break;
496
+ case 4:
497
+ tmp = CheckProjectStatusErrorCode_BACKEND_UNAVAILABLE_getInstance();
498
+ break;
499
+ default:
500
+ noWhenBranchMatchedException();
501
+ break;
502
+ }
503
+ return tmp;
504
+ }
505
+ function CheckProjectStatusErrorCode_CONTEXT_REQUIRED_getInstance() {
506
+ CheckProjectStatusErrorCode_initEntries();
507
+ return CheckProjectStatusErrorCode_CONTEXT_REQUIRED_instance;
508
+ }
509
+ function CheckProjectStatusErrorCode_INVALID_CONTEXT_getInstance() {
510
+ CheckProjectStatusErrorCode_initEntries();
511
+ return CheckProjectStatusErrorCode_INVALID_CONTEXT_instance;
512
+ }
513
+ function CheckProjectStatusErrorCode_CONTEXT_NOT_FOUND_getInstance() {
514
+ CheckProjectStatusErrorCode_initEntries();
515
+ return CheckProjectStatusErrorCode_CONTEXT_NOT_FOUND_instance;
516
+ }
517
+ function CheckProjectStatusErrorCode_AUTH_REQUIRED_getInstance() {
518
+ CheckProjectStatusErrorCode_initEntries();
519
+ return CheckProjectStatusErrorCode_AUTH_REQUIRED_instance;
520
+ }
521
+ function CheckProjectStatusErrorCode_PAT_INVALID_getInstance() {
522
+ CheckProjectStatusErrorCode_initEntries();
523
+ return CheckProjectStatusErrorCode_PAT_INVALID_instance;
524
+ }
525
+ function CheckProjectStatusErrorCode_FORBIDDEN_getInstance() {
526
+ CheckProjectStatusErrorCode_initEntries();
527
+ return CheckProjectStatusErrorCode_FORBIDDEN_instance;
528
+ }
529
+ function CheckProjectStatusErrorCode_BACKEND_UNAVAILABLE_getInstance() {
530
+ CheckProjectStatusErrorCode_initEntries();
531
+ return CheckProjectStatusErrorCode_BACKEND_UNAVAILABLE_instance;
532
+ }
533
+ function getDecoded($this, result, decode, parseFailureMessage, credential, $completion) {
534
+ var tmp;
535
+ if (result instanceof Success) {
536
+ var tmp1_safe_receiver = decode(result.f5a_1);
537
+ var tmp_0;
538
+ if (tmp1_safe_receiver == null) {
539
+ tmp_0 = null;
540
+ } else {
541
+ // Inline function 'kotlin.let' call
542
+ tmp_0 = new Success_0(tmp1_safe_receiver);
543
+ }
544
+ var tmp2_elvis_lhs = tmp_0;
545
+ tmp = tmp2_elvis_lhs == null ? new Failure_0(parseFailureMessage) : tmp2_elvis_lhs;
546
+ } else {
547
+ if (result instanceof Failure) {
548
+ tmp = new Failure_0(result.i5a_1, toStatusErrorCode_0(result.j5a_1, credential));
549
+ } else {
550
+ noWhenBranchMatchedException();
551
+ }
552
+ }
553
+ return tmp;
554
+ }
555
+ function decodeProject($this, body) {
556
+ var tmp;
557
+ try {
558
+ tmp = $this.h97_1.p35(Companion_instance.x37(), body);
559
+ } catch ($p) {
560
+ var tmp_0;
561
+ if ($p instanceof IllegalArgumentException) {
562
+ var exception = $p;
563
+ tmp_0 = null;
564
+ } else {
565
+ throw $p;
566
+ }
567
+ tmp = tmp_0;
568
+ }
569
+ return tmp;
570
+ }
571
+ function decodeDesignSystem($this, body) {
572
+ var tmp;
573
+ try {
574
+ tmp = $this.h97_1.p35(Companion_instance_0.x37(), body);
575
+ } catch ($p) {
576
+ var tmp_0;
577
+ if ($p instanceof IllegalArgumentException) {
578
+ var exception = $p;
579
+ tmp_0 = null;
580
+ } else {
581
+ throw $p;
582
+ }
583
+ tmp = tmp_0;
584
+ }
585
+ return tmp;
586
+ }
587
+ function HttpProjectAccessVerifier$json$lambda($this$Json) {
588
+ $this$Json.j36_1 = true;
589
+ return Unit_instance;
590
+ }
591
+ function HttpProjectAccessVerifier$decodeProject$ref(p0) {
592
+ var l = function (_this__u8e3s4) {
593
+ var tmp0 = p0;
594
+ return decodeProject(tmp0, _this__u8e3s4);
595
+ };
596
+ l.callableName = 'decodeProject';
597
+ return l;
598
+ }
599
+ function HttpProjectAccessVerifier$decodeDesignSystem$ref(p0) {
600
+ var l = function (_this__u8e3s4) {
601
+ var tmp0 = p0;
602
+ return decodeDesignSystem(tmp0, _this__u8e3s4);
603
+ };
604
+ l.callableName = 'decodeDesignSystem';
605
+ return l;
606
+ }
607
+ function $verifyCOROUTINE$_0(_this__u8e3s4, check, resultContinuation) {
608
+ CoroutineImpl.call(this, resultContinuation);
609
+ this.q97_1 = _this__u8e3s4;
610
+ this.r97_1 = check;
611
+ }
612
+ protoOf($verifyCOROUTINE$_0).e9 = function () {
613
+ var suspendResult = this.y8_1;
614
+ $sm: do
615
+ try {
616
+ var tmp = this.w8_1;
617
+ switch (tmp) {
618
+ case 0:
619
+ this.x8_1 = 6;
620
+ this.u97_1 = this.q97_1.g97_1.y59(_ProjectApiUrl___get_value__impl__ub99up(this.r97_1.r95_1), this.r97_1.s95_1);
621
+ this.w8_1 = 1;
622
+ suspendResult = this.u97_1.z59('/api/projects/' + _ProjectId___get_value__impl__lfubnr(this.r97_1.p95_1), this);
623
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
624
+ return suspendResult;
625
+ }
626
+
627
+ continue $sm;
628
+ case 1:
629
+ var ARGUMENT = suspendResult;
630
+ this.w8_1 = 2;
631
+ suspendResult = getDecoded(this.q97_1, ARGUMENT, HttpProjectAccessVerifier$decodeProject$ref(this.q97_1), 'Status: failed. Cannot parse project response.', this.r97_1.s95_1, this);
632
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
633
+ return suspendResult;
634
+ }
635
+
636
+ continue $sm;
637
+ case 2:
638
+ this.t97_1 = suspendResult;
639
+ var tmp0_subject = this.t97_1;
640
+ if (tmp0_subject instanceof Failure_0) {
641
+ this.s97_1 = new Failed_1(this.t97_1.v97_1, this.t97_1.w97_1);
642
+ this.w8_1 = 5;
643
+ continue $sm;
644
+ } else {
645
+ if (tmp0_subject instanceof Success_0) {
646
+ this.w8_1 = 3;
647
+ suspendResult = this.u97_1.z59('/api/projects/' + _ProjectId___get_value__impl__lfubnr(this.r97_1.p95_1) + '/design-systems/' + _DesignSystemId___get_value__impl__wgtkjx(this.r97_1.q95_1), this);
648
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
649
+ return suspendResult;
650
+ }
651
+ continue $sm;
652
+ } else {
653
+ var tmp_0 = this;
654
+ noWhenBranchMatchedException();
655
+ }
656
+ }
657
+
658
+ break;
659
+ case 3:
660
+ var ARGUMENT_0 = suspendResult;
661
+ this.w8_1 = 4;
662
+ suspendResult = getDecoded(this.q97_1, ARGUMENT_0, HttpProjectAccessVerifier$decodeDesignSystem$ref(this.q97_1), 'Status: failed. Cannot parse design system response.', this.r97_1.s95_1, this);
663
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
664
+ return suspendResult;
665
+ }
666
+
667
+ continue $sm;
668
+ case 4:
669
+ var designSystem = suspendResult;
670
+ var tmp_1 = this;
671
+ var tmp_2;
672
+ if (designSystem instanceof Failure_0) {
673
+ tmp_2 = new Failed_1(designSystem.v97_1, designSystem.w97_1);
674
+ } else {
675
+ if (designSystem instanceof Success_0) {
676
+ tmp_2 = new Authorized(this.t97_1.y97_1.x97_1, designSystem.y97_1.z97_1);
677
+ } else {
678
+ noWhenBranchMatchedException();
679
+ }
680
+ }
681
+
682
+ tmp_1.s97_1 = tmp_2;
683
+ this.w8_1 = 5;
684
+ continue $sm;
685
+ case 5:
686
+ return this.s97_1;
687
+ case 6:
688
+ throw this.z8_1;
689
+ }
690
+ } catch ($p) {
691
+ var e = $p;
692
+ if (this.x8_1 === 6) {
693
+ throw e;
694
+ } else {
695
+ this.w8_1 = this.x8_1;
696
+ this.z8_1 = e;
697
+ }
698
+ }
699
+ while (true);
700
+ };
701
+ function HttpProjectAccessVerifier(httpClientFactory) {
702
+ this.g97_1 = httpClientFactory;
703
+ var tmp = this;
704
+ tmp.h97_1 = Json(VOID, HttpProjectAccessVerifier$json$lambda);
705
+ }
706
+ protoOf(HttpProjectAccessVerifier).k95 = function (check, $completion) {
707
+ var tmp = new $verifyCOROUTINE$_0(this, check, $completion);
708
+ tmp.y8_1 = Unit_instance;
709
+ tmp.z8_1 = null;
710
+ return tmp.e9();
711
+ };
712
+ function Success_0(value) {
713
+ this.y97_1 = value;
714
+ }
715
+ protoOf(Success_0).toString = function () {
716
+ return 'Success(value=' + toString_0(this.y97_1) + ')';
717
+ };
718
+ protoOf(Success_0).hashCode = function () {
719
+ return this.y97_1 == null ? 0 : hashCode(this.y97_1);
720
+ };
721
+ protoOf(Success_0).equals = function (other) {
722
+ if (this === other)
723
+ return true;
724
+ if (!(other instanceof Success_0))
725
+ return false;
726
+ if (!equals(this.y97_1, other.y97_1))
727
+ return false;
728
+ return true;
729
+ };
730
+ function Failure_0(message, code) {
731
+ code = code === VOID ? CheckProjectStatusErrorCode_BACKEND_UNAVAILABLE_getInstance() : code;
732
+ this.v97_1 = message;
733
+ this.w97_1 = code;
734
+ }
735
+ protoOf(Failure_0).toString = function () {
736
+ return 'Failure(message=' + this.v97_1 + ', code=' + this.w97_1.toString() + ')';
737
+ };
738
+ protoOf(Failure_0).hashCode = function () {
739
+ var result = getStringHashCode(this.v97_1);
740
+ result = imul(result, 31) + this.w97_1.hashCode() | 0;
741
+ return result;
742
+ };
743
+ protoOf(Failure_0).equals = function (other) {
744
+ if (this === other)
745
+ return true;
746
+ if (!(other instanceof Failure_0))
747
+ return false;
748
+ if (!(this.v97_1 === other.v97_1))
749
+ return false;
750
+ if (!this.w97_1.equals(other.w97_1))
751
+ return false;
752
+ return true;
753
+ };
754
+ function Companion() {
755
+ }
756
+ protoOf(Companion).x37 = function () {
757
+ return $serializer_getInstance();
758
+ };
759
+ var Companion_instance;
760
+ function Companion_getInstance_0() {
761
+ return Companion_instance;
762
+ }
763
+ function $serializer() {
764
+ $serializer_instance = this;
765
+ var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.dsbuilder.frontend.feature.status.data.ProjectResponse', this, 1);
766
+ tmp0_serialDesc.k2b('name', false);
767
+ this.a98_1 = tmp0_serialDesc;
768
+ }
769
+ protoOf($serializer).b98 = function (encoder, value) {
770
+ var tmp0_desc = this.a98_1;
771
+ var tmp1_output = encoder.s23(tmp0_desc);
772
+ tmp1_output.h25(tmp0_desc, 0, value.x97_1);
773
+ tmp1_output.t23(tmp0_desc);
774
+ };
775
+ protoOf($serializer).m20 = function (encoder, value) {
776
+ return this.b98(encoder, value instanceof ProjectResponse ? value : THROW_CCE());
777
+ };
778
+ protoOf($serializer).n20 = function (decoder) {
779
+ var tmp0_desc = this.a98_1;
780
+ var tmp1_flag = true;
781
+ var tmp2_index = 0;
782
+ var tmp3_bitMask0 = 0;
783
+ var tmp4_local0 = null;
784
+ var tmp5_input = decoder.s23(tmp0_desc);
785
+ if (tmp5_input.i24()) {
786
+ tmp4_local0 = tmp5_input.c24(tmp0_desc, 0);
787
+ tmp3_bitMask0 = tmp3_bitMask0 | 1;
788
+ } else
789
+ while (tmp1_flag) {
790
+ tmp2_index = tmp5_input.j24(tmp0_desc);
791
+ switch (tmp2_index) {
792
+ case -1:
793
+ tmp1_flag = false;
794
+ break;
795
+ case 0:
796
+ tmp4_local0 = tmp5_input.c24(tmp0_desc, 0);
797
+ tmp3_bitMask0 = tmp3_bitMask0 | 1;
798
+ break;
799
+ default:
800
+ throw UnknownFieldException_init_$Create$(tmp2_index);
801
+ }
802
+ }
803
+ tmp5_input.t23(tmp0_desc);
804
+ return ProjectResponse_init_$Create$(tmp3_bitMask0, tmp4_local0, null);
805
+ };
806
+ protoOf($serializer).l20 = function () {
807
+ return this.a98_1;
808
+ };
809
+ protoOf($serializer).z2b = function () {
810
+ // Inline function 'kotlin.arrayOf' call
811
+ // Inline function 'kotlin.js.unsafeCast' call
812
+ // Inline function 'kotlin.js.asDynamic' call
813
+ return [StringSerializer_getInstance()];
814
+ };
815
+ var $serializer_instance;
816
+ function $serializer_getInstance() {
817
+ if ($serializer_instance == null)
818
+ new $serializer();
819
+ return $serializer_instance;
820
+ }
821
+ function ProjectResponse_init_$Init$(seen0, name, serializationConstructorMarker, $this) {
822
+ if (!(1 === (1 & seen0))) {
823
+ throwMissingFieldException(seen0, 1, $serializer_getInstance().a98_1);
824
+ }
825
+ $this.x97_1 = name;
826
+ return $this;
827
+ }
828
+ function ProjectResponse_init_$Create$(seen0, name, serializationConstructorMarker) {
829
+ return ProjectResponse_init_$Init$(seen0, name, serializationConstructorMarker, objectCreate(protoOf(ProjectResponse)));
830
+ }
831
+ function ProjectResponse() {
832
+ }
833
+ protoOf(ProjectResponse).toString = function () {
834
+ return 'ProjectResponse(name=' + this.x97_1 + ')';
835
+ };
836
+ protoOf(ProjectResponse).hashCode = function () {
837
+ return getStringHashCode(this.x97_1);
838
+ };
839
+ protoOf(ProjectResponse).equals = function (other) {
840
+ if (this === other)
841
+ return true;
842
+ if (!(other instanceof ProjectResponse))
843
+ return false;
844
+ if (!(this.x97_1 === other.x97_1))
845
+ return false;
846
+ return true;
847
+ };
848
+ function Companion_0() {
849
+ }
850
+ protoOf(Companion_0).x37 = function () {
851
+ return $serializer_getInstance_0();
852
+ };
853
+ var Companion_instance_0;
854
+ function Companion_getInstance_1() {
855
+ return Companion_instance_0;
856
+ }
857
+ function $serializer_0() {
858
+ $serializer_instance_0 = this;
859
+ var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.dsbuilder.frontend.feature.status.data.DesignSystemResponse', this, 1);
860
+ tmp0_serialDesc.k2b('name', false);
861
+ this.c98_1 = tmp0_serialDesc;
862
+ }
863
+ protoOf($serializer_0).d98 = function (encoder, value) {
864
+ var tmp0_desc = this.c98_1;
865
+ var tmp1_output = encoder.s23(tmp0_desc);
866
+ tmp1_output.h25(tmp0_desc, 0, value.z97_1);
867
+ tmp1_output.t23(tmp0_desc);
868
+ };
869
+ protoOf($serializer_0).m20 = function (encoder, value) {
870
+ return this.d98(encoder, value instanceof DesignSystemResponse ? value : THROW_CCE());
871
+ };
872
+ protoOf($serializer_0).n20 = function (decoder) {
873
+ var tmp0_desc = this.c98_1;
874
+ var tmp1_flag = true;
875
+ var tmp2_index = 0;
876
+ var tmp3_bitMask0 = 0;
877
+ var tmp4_local0 = null;
878
+ var tmp5_input = decoder.s23(tmp0_desc);
879
+ if (tmp5_input.i24()) {
880
+ tmp4_local0 = tmp5_input.c24(tmp0_desc, 0);
881
+ tmp3_bitMask0 = tmp3_bitMask0 | 1;
882
+ } else
883
+ while (tmp1_flag) {
884
+ tmp2_index = tmp5_input.j24(tmp0_desc);
885
+ switch (tmp2_index) {
886
+ case -1:
887
+ tmp1_flag = false;
888
+ break;
889
+ case 0:
890
+ tmp4_local0 = tmp5_input.c24(tmp0_desc, 0);
891
+ tmp3_bitMask0 = tmp3_bitMask0 | 1;
892
+ break;
893
+ default:
894
+ throw UnknownFieldException_init_$Create$(tmp2_index);
895
+ }
896
+ }
897
+ tmp5_input.t23(tmp0_desc);
898
+ return DesignSystemResponse_init_$Create$(tmp3_bitMask0, tmp4_local0, null);
899
+ };
900
+ protoOf($serializer_0).l20 = function () {
901
+ return this.c98_1;
902
+ };
903
+ protoOf($serializer_0).z2b = function () {
904
+ // Inline function 'kotlin.arrayOf' call
905
+ // Inline function 'kotlin.js.unsafeCast' call
906
+ // Inline function 'kotlin.js.asDynamic' call
907
+ return [StringSerializer_getInstance()];
908
+ };
909
+ var $serializer_instance_0;
910
+ function $serializer_getInstance_0() {
911
+ if ($serializer_instance_0 == null)
912
+ new $serializer_0();
913
+ return $serializer_instance_0;
914
+ }
915
+ function DesignSystemResponse_init_$Init$(seen0, name, serializationConstructorMarker, $this) {
916
+ if (!(1 === (1 & seen0))) {
917
+ throwMissingFieldException(seen0, 1, $serializer_getInstance_0().c98_1);
918
+ }
919
+ $this.z97_1 = name;
920
+ return $this;
921
+ }
922
+ function DesignSystemResponse_init_$Create$(seen0, name, serializationConstructorMarker) {
923
+ return DesignSystemResponse_init_$Init$(seen0, name, serializationConstructorMarker, objectCreate(protoOf(DesignSystemResponse)));
924
+ }
925
+ function DesignSystemResponse() {
926
+ }
927
+ protoOf(DesignSystemResponse).toString = function () {
928
+ return 'DesignSystemResponse(name=' + this.z97_1 + ')';
929
+ };
930
+ protoOf(DesignSystemResponse).hashCode = function () {
931
+ return getStringHashCode(this.z97_1);
932
+ };
933
+ protoOf(DesignSystemResponse).equals = function (other) {
934
+ if (this === other)
935
+ return true;
936
+ if (!(other instanceof DesignSystemResponse))
937
+ return false;
938
+ if (!(this.z97_1 === other.z97_1))
939
+ return false;
940
+ return true;
941
+ };
942
+ function toStatusErrorCode_0(_this__u8e3s4, credential) {
943
+ var tmp;
944
+ var tmp_0;
945
+ if (_this__u8e3s4 === 401) {
946
+ tmp_0 = credential instanceof PersonalAccessToken;
947
+ } else {
948
+ tmp_0 = false;
949
+ }
950
+ if (tmp_0) {
951
+ tmp = CheckProjectStatusErrorCode_PAT_INVALID_getInstance();
952
+ } else {
953
+ if (_this__u8e3s4 === 401) {
954
+ tmp = CheckProjectStatusErrorCode_AUTH_REQUIRED_getInstance();
955
+ } else {
956
+ if (_this__u8e3s4 === 403) {
957
+ tmp = CheckProjectStatusErrorCode_FORBIDDEN_getInstance();
958
+ } else {
959
+ tmp = CheckProjectStatusErrorCode_BACKEND_UNAVAILABLE_getInstance();
960
+ }
961
+ }
962
+ }
963
+ return tmp;
964
+ }
965
+ //region block: post-declaration
966
+ protoOf($serializer).a2c = typeParametersSerializers;
967
+ protoOf($serializer_0).a2c = typeParametersSerializers;
968
+ //endregion
969
+ //region block: init
970
+ Companion_instance = new Companion();
971
+ Companion_instance_0 = new Companion_0();
972
+ //endregion
973
+ //region block: exports
974
+ _.$_$ = _.$_$ || {};
975
+ _.$_$.a = CheckProjectStatusCommand;
976
+ _.$_$.b = Authorized_0;
977
+ _.$_$.c = Failed_2;
978
+ _.$_$.d = CheckProjectStatusUseCase;
979
+ _.$_$.e = statusApplicationModule;
980
+ //endregion
981
+ return _;
982
+ }(module.exports, require('./kotlin-kotlin-stdlib.js'), require('./projects-core-koin-core.js'), require('./design-system-builder-frontend-core-network.js'), require('./design-system-builder-frontend-core-application.js'), require('./design-system-builder-frontend-core-domain.js'), require('./kotlinx-serialization-kotlinx-serialization-json.js'), require('./kotlinx-serialization-kotlinx-serialization-core.js'), require('./design-system-builder-frontend-core-auth.js')));
983
+
984
+ //# sourceMappingURL=design-system-builder-frontend-feature-status.js.map