@ibdop/platform-kit 1.0.13 → 1.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/VersionInfo.d.ts.map +1 -1
- package/dist/index.js +10 -10
- package/dist/index.mjs +483 -469
- package/dist/index.umd.js +10 -10
- package/dist/services/api.d.ts.map +1 -1
- package/dist/utils/shellAuth.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/VersionInfo.tsx +9 -0
- package/src/services/api.ts +18 -13
- package/src/utils/shellAuth.ts +30 -1
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import et, { useState as
|
|
2
|
-
import
|
|
3
|
-
function
|
|
1
|
+
import et, { useState as k, useRef as tt, useCallback as R, useEffect as B, useMemo as ye, Component as Lt, createContext as Ut, useContext as Bt } from "react";
|
|
2
|
+
import Vt from "axios";
|
|
3
|
+
function U() {
|
|
4
4
|
if (typeof window > "u") return null;
|
|
5
5
|
const t = window;
|
|
6
6
|
if (t.__SHELL_AUTH_INSTANCE__)
|
|
@@ -8,26 +8,41 @@ function B() {
|
|
|
8
8
|
const r = window;
|
|
9
9
|
return r.__SHELL_AUTH__?.authInstance ? r.__SHELL_AUTH__.authInstance : null;
|
|
10
10
|
}
|
|
11
|
-
function
|
|
12
|
-
const t =
|
|
13
|
-
|
|
11
|
+
function fr() {
|
|
12
|
+
const t = U();
|
|
13
|
+
if (!t)
|
|
14
|
+
return { isAuthenticated: !1 };
|
|
15
|
+
let r;
|
|
16
|
+
const o = t;
|
|
17
|
+
if (t.user?.access_token)
|
|
18
|
+
r = t.user.access_token;
|
|
19
|
+
else if (t.user?.profile?.access_token)
|
|
20
|
+
r = t.user.profile.access_token;
|
|
21
|
+
else if (typeof o.getAccessToken == "function")
|
|
22
|
+
try {
|
|
23
|
+
const a = o.getAccessToken();
|
|
24
|
+
a instanceof Promise ? console.warn("[shellAuth] getAccessToken returned Promise - token may not be available synchronously") : typeof a == "string" && (r = a);
|
|
25
|
+
} catch (a) {
|
|
26
|
+
console.warn("[shellAuth] Failed to get access token via getAccessToken:", a);
|
|
27
|
+
}
|
|
28
|
+
return {
|
|
14
29
|
isAuthenticated: t.isAuthenticated,
|
|
15
|
-
user: t.user
|
|
16
|
-
}
|
|
30
|
+
user: t.user ? { ...t.user, access_token: r } : void 0
|
|
31
|
+
};
|
|
17
32
|
}
|
|
18
33
|
function dr() {
|
|
19
|
-
const t =
|
|
34
|
+
const t = U();
|
|
20
35
|
return t?.isAuthenticated ? t.user?.profile?.access_token ?? null : null;
|
|
21
36
|
}
|
|
22
37
|
function pr() {
|
|
23
|
-
return
|
|
38
|
+
return U()?.isAuthenticated ?? !1;
|
|
24
39
|
}
|
|
25
|
-
async function
|
|
26
|
-
const t =
|
|
40
|
+
async function Ht() {
|
|
41
|
+
const t = U();
|
|
27
42
|
t?.signinRedirect ? await t.signinRedirect() : typeof window < "u" && (window.location.href = "/");
|
|
28
43
|
}
|
|
29
44
|
async function hr() {
|
|
30
|
-
const t =
|
|
45
|
+
const t = U();
|
|
31
46
|
t?.removeUser && await t.removeUser();
|
|
32
47
|
}
|
|
33
48
|
const Je = {
|
|
@@ -37,19 +52,19 @@ const Je = {
|
|
|
37
52
|
}
|
|
38
53
|
};
|
|
39
54
|
function ae() {
|
|
40
|
-
const [t, r] =
|
|
41
|
-
|
|
55
|
+
const [t, r] = k(null), [o, a] = k(!0), i = tt(0), d = 20, n = R(() => U(), []);
|
|
56
|
+
B(() => {
|
|
42
57
|
const v = n();
|
|
43
58
|
if (v) {
|
|
44
|
-
r(v),
|
|
59
|
+
r(v), a(!1);
|
|
45
60
|
return;
|
|
46
61
|
}
|
|
47
62
|
const c = (f) => {
|
|
48
|
-
r(f.detail),
|
|
63
|
+
r(f.detail), a(!1);
|
|
49
64
|
}, g = setInterval(() => {
|
|
50
|
-
|
|
65
|
+
i.current++;
|
|
51
66
|
const f = n();
|
|
52
|
-
f ? (Je.log("Auth found via polling, attempts:",
|
|
67
|
+
f ? (Je.log("Auth found via polling, attempts:", i.current), r(f), a(!1), clearInterval(g)) : i.current >= d && (a(!1), clearInterval(g));
|
|
53
68
|
}, 500);
|
|
54
69
|
return window.addEventListener("shell-auth-ready", c), () => {
|
|
55
70
|
clearInterval(g), window.removeEventListener("shell-auth-ready", c);
|
|
@@ -58,19 +73,19 @@ function ae() {
|
|
|
58
73
|
const l = t || {
|
|
59
74
|
user: null,
|
|
60
75
|
isAuthenticated: !1,
|
|
61
|
-
isLoading:
|
|
76
|
+
isLoading: o,
|
|
62
77
|
signinRedirect: async () => {
|
|
63
|
-
const v =
|
|
78
|
+
const v = U();
|
|
64
79
|
v?.signinRedirect ? await v.signinRedirect() : typeof window < "u" && (window.location.href = "/");
|
|
65
80
|
},
|
|
66
81
|
removeUser: async () => {
|
|
67
|
-
const v =
|
|
82
|
+
const v = U();
|
|
68
83
|
v?.removeUser && await v.removeUser();
|
|
69
84
|
}
|
|
70
85
|
};
|
|
71
86
|
return Je.log("Auth result:", { isAuthenticated: l.isAuthenticated, isLoading: l.isLoading }), l;
|
|
72
87
|
}
|
|
73
|
-
const
|
|
88
|
+
const Wt = {
|
|
74
89
|
log: (...t) => {
|
|
75
90
|
},
|
|
76
91
|
warn: (...t) => {
|
|
@@ -79,7 +94,7 @@ const Ht = {
|
|
|
79
94
|
console.error("[useInfoData]", ...t);
|
|
80
95
|
}
|
|
81
96
|
};
|
|
82
|
-
function
|
|
97
|
+
function zt(t) {
|
|
83
98
|
if (t) return t;
|
|
84
99
|
if (typeof window < "u") {
|
|
85
100
|
const r = window;
|
|
@@ -87,26 +102,26 @@ function Gt(t) {
|
|
|
87
102
|
}
|
|
88
103
|
return "unknown-mfe";
|
|
89
104
|
}
|
|
90
|
-
function
|
|
91
|
-
const [r,
|
|
92
|
-
const v =
|
|
93
|
-
|
|
105
|
+
function Gt(t) {
|
|
106
|
+
const [r, o] = k(null), [a, i] = k(!0), [d, n] = k(null), p = R(() => {
|
|
107
|
+
const v = zt(t?.mfeName).replace("@ib-dop/", "");
|
|
108
|
+
i(!0), n(null), fetch(`/svc/${v}/info.json`).then((c) => {
|
|
94
109
|
if (!c.ok)
|
|
95
110
|
throw new Error(`HTTP ${c.status}: ${c.statusText}`);
|
|
96
111
|
return c.json();
|
|
97
112
|
}).then((c) => {
|
|
98
|
-
|
|
113
|
+
o(c);
|
|
99
114
|
}).catch((c) => {
|
|
100
|
-
|
|
115
|
+
Wt.error("Failed to load info:", c), n(c instanceof Error ? c.message : String(c));
|
|
101
116
|
}).finally(() => {
|
|
102
|
-
|
|
117
|
+
i(!1);
|
|
103
118
|
});
|
|
104
119
|
}, [t?.mfeName]);
|
|
105
|
-
return
|
|
120
|
+
return B(() => {
|
|
106
121
|
p();
|
|
107
122
|
}, [p]), {
|
|
108
123
|
data: r,
|
|
109
|
-
isLoading:
|
|
124
|
+
isLoading: a,
|
|
110
125
|
error: d,
|
|
111
126
|
refetch: p
|
|
112
127
|
};
|
|
@@ -125,11 +140,11 @@ const _e = {
|
|
|
125
140
|
environment: "development"
|
|
126
141
|
};
|
|
127
142
|
function gr() {
|
|
128
|
-
const [t, r] =
|
|
129
|
-
return
|
|
143
|
+
const [t, r] = k(null), [o, a] = k(!0), [i, d] = k(null);
|
|
144
|
+
return B(() => {
|
|
130
145
|
(() => {
|
|
131
146
|
if (typeof sessionStorage > "u") {
|
|
132
|
-
d("sessionStorage not available"), r(re),
|
|
147
|
+
d("sessionStorage not available"), r(re), a(!1);
|
|
133
148
|
return;
|
|
134
149
|
}
|
|
135
150
|
try {
|
|
@@ -142,13 +157,13 @@ function gr() {
|
|
|
142
157
|
} catch (p) {
|
|
143
158
|
_e.error("Error parsing config:", p), r(re), d("Error parsing config");
|
|
144
159
|
} finally {
|
|
145
|
-
|
|
160
|
+
a(!1);
|
|
146
161
|
}
|
|
147
162
|
})();
|
|
148
163
|
}, []), {
|
|
149
164
|
data: t,
|
|
150
|
-
isLoading:
|
|
151
|
-
error:
|
|
165
|
+
isLoading: o,
|
|
166
|
+
error: i
|
|
152
167
|
};
|
|
153
168
|
}
|
|
154
169
|
const rt = "platform-kit", ne = {
|
|
@@ -162,32 +177,32 @@ const rt = "platform-kit", ne = {
|
|
|
162
177
|
info: (...t) => {
|
|
163
178
|
}
|
|
164
179
|
};
|
|
165
|
-
function
|
|
180
|
+
function Yt(t) {
|
|
166
181
|
const r = t.response;
|
|
167
|
-
let
|
|
168
|
-
return r ? r.status === 401 ?
|
|
182
|
+
let o = "unknown";
|
|
183
|
+
return r ? r.status === 401 ? o = "unauthorized" : r.status === 403 ? o = "forbidden" : r.status === 404 ? o = "not_found" : r.status >= 500 && (o = "server") : o = "network", {
|
|
169
184
|
message: r?.data?.message ?? t.message ?? "Unknown error",
|
|
170
185
|
code: r?.data?.code,
|
|
171
186
|
status: r?.status,
|
|
172
|
-
type:
|
|
187
|
+
type: o,
|
|
173
188
|
timestamp: Date.now(),
|
|
174
189
|
url: t.config?.url
|
|
175
190
|
};
|
|
176
191
|
}
|
|
177
|
-
const
|
|
178
|
-
function
|
|
192
|
+
const qt = 3, Jt = 1e3;
|
|
193
|
+
function Kt(t) {
|
|
179
194
|
return !t || t >= 500 || t === 429;
|
|
180
195
|
}
|
|
181
|
-
function
|
|
196
|
+
function Xt(t) {
|
|
182
197
|
return new Promise((r) => setTimeout(r, t));
|
|
183
198
|
}
|
|
184
|
-
function
|
|
185
|
-
const r = t.name || rt,
|
|
199
|
+
function Zt(t = {}) {
|
|
200
|
+
const r = t.name || rt, o = t.retries ?? qt, a = t.retryDelay ?? Jt, i = {
|
|
186
201
|
log: (...n) => ne.log(`[API:${r}]`, ...n),
|
|
187
202
|
warn: (...n) => ne.warn(`[API:${r}]`, ...n),
|
|
188
203
|
error: (...n) => ne.error(`[API:${r}]`, ...n),
|
|
189
204
|
info: (...n) => ne.info(`[API:${r}]`, ...n)
|
|
190
|
-
}, d =
|
|
205
|
+
}, d = Vt.create({
|
|
191
206
|
timeout: t.timeout ?? 1e4,
|
|
192
207
|
baseURL: t.baseURL ?? "",
|
|
193
208
|
headers: {
|
|
@@ -196,76 +211,75 @@ function Qt(t = {}) {
|
|
|
196
211
|
});
|
|
197
212
|
return d.interceptors.request.use(
|
|
198
213
|
(n) => {
|
|
199
|
-
const p =
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
return a.log(`${n.method?.toUpperCase()} ${n.url}`), n;
|
|
214
|
+
const p = U();
|
|
215
|
+
return i.info("Auth state check:", {
|
|
216
|
+
isAuthenticated: p?.isAuthenticated,
|
|
217
|
+
hasUser: !!p?.user,
|
|
218
|
+
hasToken: !!p?.user?.access_token
|
|
219
|
+
}), p?.isAuthenticated && p.user?.access_token ? (n.headers.Authorization = `Bearer ${p.user.access_token}`, i.info("Auth token attached")) : p?.isAuthenticated && !p.user?.access_token ? i.info("User authenticated but token not yet available") : i.info("User not authenticated - request without token"), i.log(`${n.method?.toUpperCase()} ${n.url}`), n;
|
|
206
220
|
},
|
|
207
|
-
(n) => (
|
|
221
|
+
(n) => (i.error("Request interceptor error:", n.message), Promise.reject(n))
|
|
208
222
|
), d.interceptors.response.use(
|
|
209
|
-
(n) => (
|
|
223
|
+
(n) => (i.log(`Response ${n.status}:`, n.config.url), n),
|
|
210
224
|
async (n) => {
|
|
211
225
|
const p = n.response?.status, l = n.config?.url, v = n.config?._retryCount ?? 0;
|
|
212
|
-
if (
|
|
226
|
+
if (Kt(p) && v < o) {
|
|
213
227
|
const c = n.config;
|
|
214
228
|
c._retryCount = v + 1;
|
|
215
|
-
const g =
|
|
216
|
-
return
|
|
229
|
+
const g = a * Math.pow(2, v);
|
|
230
|
+
return i.warn(`Retrying (${c._retryCount}/${o}) after ${g}ms:`, l), await Xt(g), d.request(c);
|
|
217
231
|
}
|
|
218
|
-
return p === 401 ? (
|
|
232
|
+
return p === 401 ? (i.warn("401 Unauthorized - triggering re-auth"), Ht()) : p === 403 ? i.warn("403 Forbidden - insufficient permissions") : p === 404 ? i.warn("404 Not found:", l) : p === 429 ? i.warn("429 Rate limited") : p === 500 ? i.error("500 Server error:", l) : n.response ? i.warn(`Error ${p}:`, n.message) : i.error("Network error - backend may be unavailable:", l), Promise.reject(Yt(n));
|
|
219
233
|
}
|
|
220
234
|
), d;
|
|
221
235
|
}
|
|
222
|
-
const
|
|
223
|
-
async function mr(t, r,
|
|
224
|
-
const
|
|
236
|
+
const H = Zt();
|
|
237
|
+
async function mr(t, r, o = H) {
|
|
238
|
+
const a = await o.get(t, { params: r });
|
|
225
239
|
return {
|
|
226
|
-
data:
|
|
227
|
-
status:
|
|
228
|
-
ok:
|
|
240
|
+
data: a.data,
|
|
241
|
+
status: a.status,
|
|
242
|
+
ok: a.status >= 200 && a.status < 300
|
|
229
243
|
};
|
|
230
244
|
}
|
|
231
|
-
async function _r(t, r,
|
|
232
|
-
const
|
|
245
|
+
async function _r(t, r, o = H) {
|
|
246
|
+
const a = await o.post(t, r);
|
|
233
247
|
return {
|
|
234
|
-
data:
|
|
235
|
-
status:
|
|
236
|
-
ok:
|
|
248
|
+
data: a.data,
|
|
249
|
+
status: a.status,
|
|
250
|
+
ok: a.status >= 200 && a.status < 300
|
|
237
251
|
};
|
|
238
252
|
}
|
|
239
|
-
async function vr(t, r,
|
|
240
|
-
const
|
|
253
|
+
async function vr(t, r, o = H) {
|
|
254
|
+
const a = await o.put(t, r);
|
|
241
255
|
return {
|
|
242
|
-
data:
|
|
243
|
-
status:
|
|
244
|
-
ok:
|
|
256
|
+
data: a.data,
|
|
257
|
+
status: a.status,
|
|
258
|
+
ok: a.status >= 200 && a.status < 300
|
|
245
259
|
};
|
|
246
260
|
}
|
|
247
|
-
async function yr(t, r =
|
|
248
|
-
const
|
|
261
|
+
async function yr(t, r = H) {
|
|
262
|
+
const o = await r.delete(t);
|
|
249
263
|
return {
|
|
250
|
-
data:
|
|
251
|
-
status:
|
|
252
|
-
ok:
|
|
264
|
+
data: o.data,
|
|
265
|
+
status: o.status,
|
|
266
|
+
ok: o.status >= 200 && o.status < 300
|
|
253
267
|
};
|
|
254
268
|
}
|
|
255
269
|
function nt(t) {
|
|
256
270
|
if (typeof window > "u") return;
|
|
257
|
-
const r = window.__MF_NAME__ || "unknown",
|
|
271
|
+
const r = window.__MF_NAME__ || "unknown", o = {
|
|
258
272
|
...t,
|
|
259
273
|
mfeName: r,
|
|
260
274
|
timestamp: Date.now()
|
|
261
275
|
};
|
|
262
276
|
window.dispatchEvent(new CustomEvent("mfe-notification", {
|
|
263
|
-
detail:
|
|
277
|
+
detail: o,
|
|
264
278
|
bubbles: !0
|
|
265
279
|
}));
|
|
266
280
|
}
|
|
267
281
|
function Ke(t, r) {
|
|
268
|
-
const
|
|
282
|
+
const o = {
|
|
269
283
|
network: {
|
|
270
284
|
title: "Нет подключения",
|
|
271
285
|
message: "Сервер недоступен. Проверьте подключение к интернету."
|
|
@@ -294,62 +308,62 @@ function Ke(t, r) {
|
|
|
294
308
|
title: "Неизвестная ошибка",
|
|
295
309
|
message: t.message || "Произошла неизвестная ошибка."
|
|
296
310
|
}
|
|
297
|
-
},
|
|
311
|
+
}, a = o[t.type] || o.unknown;
|
|
298
312
|
nt({
|
|
299
313
|
type: t.type === "network" ? "warning" : "error",
|
|
300
|
-
title:
|
|
301
|
-
message: r ? `${
|
|
314
|
+
title: a.title,
|
|
315
|
+
message: r ? `${a.message} (${r})` : a.message
|
|
302
316
|
});
|
|
303
317
|
}
|
|
304
|
-
function
|
|
318
|
+
function Qt(t) {
|
|
305
319
|
return t instanceof Error && t.name === "AbortError";
|
|
306
320
|
}
|
|
307
321
|
function ie(t, r = {}) {
|
|
308
322
|
const {
|
|
309
|
-
notifyOnError:
|
|
310
|
-
notifyOnSuccess:
|
|
311
|
-
successMessage:
|
|
323
|
+
notifyOnError: o = !0,
|
|
324
|
+
notifyOnSuccess: a = !1,
|
|
325
|
+
successMessage: i,
|
|
312
326
|
errorContext: d,
|
|
313
327
|
onSuccess: n,
|
|
314
328
|
onError: p
|
|
315
|
-
} = r, [l, v] =
|
|
316
|
-
|
|
329
|
+
} = r, [l, v] = k(null), [c, g] = k(null), [f, E] = k(!1), y = tt(null), N = c !== null, S = l !== null && !f && !N;
|
|
330
|
+
B(() => () => {
|
|
317
331
|
y.current && y.current.abort();
|
|
318
332
|
}, []);
|
|
319
|
-
const x =
|
|
333
|
+
const x = R(() => {
|
|
320
334
|
y.current && (y.current.abort(), y.current = null, E(!1));
|
|
321
|
-
}, []), _ =
|
|
335
|
+
}, []), _ = R(async () => {
|
|
322
336
|
y.current && y.current.abort(), y.current = new AbortController();
|
|
323
337
|
const j = y.current.signal;
|
|
324
338
|
E(!0), g(null);
|
|
325
339
|
try {
|
|
326
|
-
const
|
|
340
|
+
const O = await t(j);
|
|
327
341
|
if (j.aborted)
|
|
328
342
|
return null;
|
|
329
|
-
if (
|
|
330
|
-
return v(
|
|
343
|
+
if (O.ok)
|
|
344
|
+
return v(O.data), a && i && nt({
|
|
331
345
|
type: "success",
|
|
332
346
|
title: "Успешно",
|
|
333
|
-
message:
|
|
334
|
-
}), n?.(
|
|
347
|
+
message: i
|
|
348
|
+
}), n?.(O.data), O.data;
|
|
335
349
|
{
|
|
336
350
|
const L = {
|
|
337
|
-
message:
|
|
338
|
-
status:
|
|
351
|
+
message: O.data || "Request failed",
|
|
352
|
+
status: O.status,
|
|
339
353
|
type: "client",
|
|
340
354
|
timestamp: Date.now()
|
|
341
355
|
};
|
|
342
|
-
return g(L),
|
|
356
|
+
return g(L), o && Ke(L, d), p?.(L), null;
|
|
343
357
|
}
|
|
344
|
-
} catch (
|
|
345
|
-
if (
|
|
358
|
+
} catch (O) {
|
|
359
|
+
if (Qt(O))
|
|
346
360
|
return null;
|
|
347
|
-
const L =
|
|
348
|
-
return g(L),
|
|
361
|
+
const L = O;
|
|
362
|
+
return g(L), o && Ke(L, d), p?.(L), null;
|
|
349
363
|
} finally {
|
|
350
364
|
j.aborted || E(!1), y.current = null;
|
|
351
365
|
}
|
|
352
|
-
}, [t,
|
|
366
|
+
}, [t, o, a, i, d, n, p]), C = R(() => {
|
|
353
367
|
v(null), g(null), E(!1);
|
|
354
368
|
}, []);
|
|
355
369
|
return {
|
|
@@ -357,34 +371,34 @@ function ie(t, r = {}) {
|
|
|
357
371
|
error: c,
|
|
358
372
|
isLoading: f,
|
|
359
373
|
isError: N,
|
|
360
|
-
isSuccess:
|
|
374
|
+
isSuccess: S,
|
|
361
375
|
execute: _,
|
|
362
|
-
reset:
|
|
376
|
+
reset: C,
|
|
363
377
|
abort: x
|
|
364
378
|
};
|
|
365
379
|
}
|
|
366
380
|
function Er(t, r = {}) {
|
|
367
|
-
const { skip:
|
|
368
|
-
const v =
|
|
369
|
-
return
|
|
381
|
+
const { skip: o = !1, headers: a, immediate: i = !0, ...d } = r, n = ye(() => (l) => {
|
|
382
|
+
const v = a ? a() : {};
|
|
383
|
+
return H.get(t, {
|
|
370
384
|
headers: { "Content-Type": "application/json", ...v },
|
|
371
385
|
signal: l
|
|
372
386
|
}).then((c) => ({ data: c.data, status: c.status, ok: c.status >= 200 && c.status < 300 }));
|
|
373
|
-
}, [t,
|
|
374
|
-
return
|
|
375
|
-
|
|
376
|
-
}, [
|
|
387
|
+
}, [t, a]), p = ie(n, { ...d });
|
|
388
|
+
return B(() => {
|
|
389
|
+
i && !o && p.execute();
|
|
390
|
+
}, [i, o, t]), p;
|
|
377
391
|
}
|
|
378
|
-
function wr(t, r,
|
|
379
|
-
return ie((
|
|
392
|
+
function wr(t, r, o = {}) {
|
|
393
|
+
return ie((i) => H.post(t, r, { signal: i }).then((d) => ({ data: d.data, status: d.status, ok: d.status >= 200 && d.status < 300 })), o);
|
|
380
394
|
}
|
|
381
|
-
function br(t, r,
|
|
382
|
-
return ie((
|
|
395
|
+
function br(t, r, o = {}) {
|
|
396
|
+
return ie((i) => H.put(t, r, { signal: i }).then((d) => ({ data: d.data, status: d.status, ok: d.status >= 200 && d.status < 300 })), o);
|
|
383
397
|
}
|
|
384
398
|
function xr(t, r = {}) {
|
|
385
|
-
return ie((
|
|
399
|
+
return ie((a) => H.delete(t, { signal: a }).then((i) => ({ data: i.data, status: i.status, ok: i.status >= 200 && i.status < 300 })), r);
|
|
386
400
|
}
|
|
387
|
-
const
|
|
401
|
+
const er = {
|
|
388
402
|
canView: ["all"],
|
|
389
403
|
canEdit: ["ibdop-user", "ibdop-admin", "ibdop-devops"],
|
|
390
404
|
canDelete: ["ibdop-admin", "ibdop-devops"],
|
|
@@ -394,25 +408,25 @@ const tr = {
|
|
|
394
408
|
canManageUsers: ["ibdop-admin"]
|
|
395
409
|
};
|
|
396
410
|
function Ar(t = {}) {
|
|
397
|
-
const r = ae(),
|
|
398
|
-
...
|
|
411
|
+
const r = ae(), o = ye(() => ({
|
|
412
|
+
...er,
|
|
399
413
|
...t
|
|
400
|
-
}), [t]),
|
|
414
|
+
}), [t]), a = ye(() => {
|
|
401
415
|
const d = r.user?.profile?.realm_roles || r.user?.profile?.roles || [];
|
|
402
416
|
return Array.isArray(d) ? d : [d];
|
|
403
|
-
}, [r.user]),
|
|
417
|
+
}, [r.user]), i = (d) => d.includes("all") ? !0 : d.some((n) => a.includes(n));
|
|
404
418
|
return {
|
|
405
|
-
canView:
|
|
406
|
-
canEdit:
|
|
407
|
-
canDelete:
|
|
408
|
-
canAdmin:
|
|
409
|
-
canViewSensitiveData:
|
|
410
|
-
canExportData:
|
|
411
|
-
canManageUsers:
|
|
419
|
+
canView: i(o.canView),
|
|
420
|
+
canEdit: i(o.canEdit),
|
|
421
|
+
canDelete: i(o.canDelete),
|
|
422
|
+
canAdmin: i(o.canAdmin),
|
|
423
|
+
canViewSensitiveData: i(o.canViewSensitiveData),
|
|
424
|
+
canExportData: i(o.canExportData),
|
|
425
|
+
canManageUsers: i(o.canManageUsers)
|
|
412
426
|
};
|
|
413
427
|
}
|
|
414
|
-
function
|
|
415
|
-
const t = ae(), [r,
|
|
428
|
+
function Tr() {
|
|
429
|
+
const t = ae(), [r, o] = k([]), [a, i] = k(0), [d, n] = k([]), [p, l] = k(!0), [v, c] = k(null), g = R(async () => {
|
|
416
430
|
if (!t.isAuthenticated) {
|
|
417
431
|
console.debug("[useFeatures] Not authenticated"), l(!1);
|
|
418
432
|
return;
|
|
@@ -423,30 +437,30 @@ function Sr() {
|
|
|
423
437
|
"Content-Type": "application/json"
|
|
424
438
|
}, N = t.user?.access_token;
|
|
425
439
|
N && (y.Authorization = `Bearer ${N}`);
|
|
426
|
-
const
|
|
427
|
-
if (!
|
|
428
|
-
throw new Error(`HTTP ${
|
|
429
|
-
const x = await
|
|
430
|
-
|
|
440
|
+
const S = await fetch("/api/features", { headers: y });
|
|
441
|
+
if (!S.ok)
|
|
442
|
+
throw new Error(`HTTP ${S.status}: ${S.statusText}`);
|
|
443
|
+
const x = await S.json();
|
|
444
|
+
o(x.features || []), i(x.totalCount || 0), n(x.userRoles || []);
|
|
431
445
|
} catch (y) {
|
|
432
|
-
console.debug("Features fetch error:", y), c(y instanceof Error ? y.message : String(y)),
|
|
446
|
+
console.debug("Features fetch error:", y), c(y instanceof Error ? y.message : String(y)), o([]), n([]);
|
|
433
447
|
} finally {
|
|
434
448
|
l(!1);
|
|
435
449
|
}
|
|
436
450
|
}, [t.isAuthenticated, t.user?.access_token]);
|
|
437
|
-
|
|
451
|
+
B(() => {
|
|
438
452
|
g();
|
|
439
453
|
}, [g]);
|
|
440
|
-
const f =
|
|
441
|
-
(y) => r.find((
|
|
454
|
+
const f = R(
|
|
455
|
+
(y) => r.find((S) => S.name === y)?.userEnabled ?? !1,
|
|
442
456
|
[r]
|
|
443
|
-
), E =
|
|
457
|
+
), E = R(
|
|
444
458
|
(y) => r.filter((N) => N.mfDependencies?.includes(y)),
|
|
445
459
|
[r]
|
|
446
460
|
);
|
|
447
461
|
return {
|
|
448
462
|
features: r,
|
|
449
|
-
totalCount:
|
|
463
|
+
totalCount: a,
|
|
450
464
|
userRoles: d,
|
|
451
465
|
isLoading: p,
|
|
452
466
|
error: v,
|
|
@@ -455,48 +469,48 @@ function Sr() {
|
|
|
455
469
|
getFeaturesByMf: E
|
|
456
470
|
};
|
|
457
471
|
}
|
|
458
|
-
function
|
|
459
|
-
const t = ae(), [r,
|
|
472
|
+
function kr() {
|
|
473
|
+
const t = ae(), [r, o] = k([]), [a, i] = k([]), [d, n] = k(!1), [p, l] = k(!0), [v, c] = k(null), g = R(async () => {
|
|
460
474
|
if (!t.isAuthenticated) {
|
|
461
475
|
console.debug("[useFeatureAdmin] Not authenticated"), l(!1);
|
|
462
476
|
return;
|
|
463
477
|
}
|
|
464
478
|
l(!0), c(null);
|
|
465
479
|
try {
|
|
466
|
-
const
|
|
480
|
+
const S = {
|
|
467
481
|
"Content-Type": "application/json"
|
|
468
482
|
}, x = t.user?.access_token;
|
|
469
|
-
x && (
|
|
470
|
-
const _ = await fetch("/api/features/admin", { headers:
|
|
483
|
+
x && (S.Authorization = `Bearer ${x}`);
|
|
484
|
+
const _ = await fetch("/api/features/admin", { headers: S });
|
|
471
485
|
if (!_.ok) {
|
|
472
486
|
if (_.status === 403) {
|
|
473
|
-
console.warn("[useFeatureAdmin] 403 Forbidden - checking if token has admin role"), n(!1),
|
|
487
|
+
console.warn("[useFeatureAdmin] 403 Forbidden - checking if token has admin role"), n(!1), o([]), i([]), l(!1);
|
|
474
488
|
return;
|
|
475
489
|
}
|
|
476
490
|
throw new Error(`HTTP ${_.status}: ${_.statusText}`);
|
|
477
491
|
}
|
|
478
|
-
const
|
|
479
|
-
|
|
480
|
-
} catch (
|
|
481
|
-
console.debug("FeatureAdmin fetch error:",
|
|
492
|
+
const C = await _.json();
|
|
493
|
+
o(C.featureToggles || []), i(C.microfrontends || []), n(C.isAdmin || !1);
|
|
494
|
+
} catch (S) {
|
|
495
|
+
console.debug("FeatureAdmin fetch error:", S), o([]), i([]), n(!1);
|
|
482
496
|
} finally {
|
|
483
497
|
l(!1);
|
|
484
498
|
}
|
|
485
|
-
}, [t.isAuthenticated, t.user?.access_token]), f =
|
|
486
|
-
async (
|
|
499
|
+
}, [t.isAuthenticated, t.user?.access_token]), f = R(
|
|
500
|
+
async (S) => {
|
|
487
501
|
try {
|
|
488
502
|
const x = {
|
|
489
503
|
"Content-Type": "application/json"
|
|
490
504
|
}, _ = t.user?.access_token;
|
|
491
505
|
_ && (x.Authorization = `Bearer ${_}`);
|
|
492
|
-
const
|
|
506
|
+
const C = await fetch("/api/features/admin", {
|
|
493
507
|
method: "POST",
|
|
494
508
|
headers: x,
|
|
495
|
-
body: JSON.stringify(
|
|
509
|
+
body: JSON.stringify(S)
|
|
496
510
|
});
|
|
497
|
-
if (!
|
|
498
|
-
const j = await
|
|
499
|
-
throw new Error(j.error || `HTTP ${
|
|
511
|
+
if (!C.ok) {
|
|
512
|
+
const j = await C.json().catch(() => ({}));
|
|
513
|
+
throw new Error(j.error || `HTTP ${C.status}`);
|
|
500
514
|
}
|
|
501
515
|
return await g(), !0;
|
|
502
516
|
} catch (x) {
|
|
@@ -504,21 +518,21 @@ function Rr() {
|
|
|
504
518
|
}
|
|
505
519
|
},
|
|
506
520
|
[g]
|
|
507
|
-
), E =
|
|
508
|
-
async (
|
|
521
|
+
), E = R(
|
|
522
|
+
async (S, x) => {
|
|
509
523
|
try {
|
|
510
524
|
const _ = {
|
|
511
525
|
"Content-Type": "application/json"
|
|
512
|
-
},
|
|
513
|
-
|
|
514
|
-
const j = await fetch(`/api/features/admin/${encodeURIComponent(
|
|
526
|
+
}, C = t.user?.access_token;
|
|
527
|
+
C && (_.Authorization = `Bearer ${C}`);
|
|
528
|
+
const j = await fetch(`/api/features/admin/${encodeURIComponent(S)}`, {
|
|
515
529
|
method: "PUT",
|
|
516
530
|
headers: _,
|
|
517
531
|
body: JSON.stringify(x)
|
|
518
532
|
});
|
|
519
533
|
if (!j.ok) {
|
|
520
|
-
const
|
|
521
|
-
throw new Error(
|
|
534
|
+
const O = await j.json().catch(() => ({}));
|
|
535
|
+
throw new Error(O.error || `HTTP ${j.status}`);
|
|
522
536
|
}
|
|
523
537
|
return await g(), !0;
|
|
524
538
|
} catch (_) {
|
|
@@ -526,21 +540,21 @@ function Rr() {
|
|
|
526
540
|
}
|
|
527
541
|
},
|
|
528
542
|
[g]
|
|
529
|
-
), y =
|
|
530
|
-
async (
|
|
543
|
+
), y = R(
|
|
544
|
+
async (S, x) => {
|
|
531
545
|
try {
|
|
532
|
-
const _ = {},
|
|
533
|
-
|
|
546
|
+
const _ = {}, C = t.user?.access_token;
|
|
547
|
+
C && (_.Authorization = `Bearer ${C}`);
|
|
534
548
|
const j = await fetch(
|
|
535
|
-
`/api/features/admin/${encodeURIComponent(
|
|
549
|
+
`/api/features/admin/${encodeURIComponent(S)}/toggle?enabled=${x}`,
|
|
536
550
|
{
|
|
537
551
|
method: "POST",
|
|
538
552
|
headers: _
|
|
539
553
|
}
|
|
540
554
|
);
|
|
541
555
|
if (!j.ok) {
|
|
542
|
-
const
|
|
543
|
-
throw new Error(
|
|
556
|
+
const O = await j.json().catch(() => ({}));
|
|
557
|
+
throw new Error(O.error || `HTTP ${j.status}`);
|
|
544
558
|
}
|
|
545
559
|
return await g(), !0;
|
|
546
560
|
} catch (_) {
|
|
@@ -548,18 +562,18 @@ function Rr() {
|
|
|
548
562
|
}
|
|
549
563
|
},
|
|
550
564
|
[g]
|
|
551
|
-
), N =
|
|
552
|
-
async (
|
|
565
|
+
), N = R(
|
|
566
|
+
async (S) => {
|
|
553
567
|
try {
|
|
554
568
|
const x = {}, _ = t.user?.access_token;
|
|
555
569
|
_ && (x.Authorization = `Bearer ${_}`);
|
|
556
|
-
const
|
|
570
|
+
const C = await fetch(`/api/features/admin/${encodeURIComponent(S)}`, {
|
|
557
571
|
method: "DELETE",
|
|
558
572
|
headers: x
|
|
559
573
|
});
|
|
560
|
-
if (!
|
|
561
|
-
const j = await
|
|
562
|
-
throw new Error(j.error || `HTTP ${
|
|
574
|
+
if (!C.ok) {
|
|
575
|
+
const j = await C.json().catch(() => ({}));
|
|
576
|
+
throw new Error(j.error || `HTTP ${C.status}`);
|
|
563
577
|
}
|
|
564
578
|
return await g(), !0;
|
|
565
579
|
} catch (x) {
|
|
@@ -568,11 +582,11 @@ function Rr() {
|
|
|
568
582
|
},
|
|
569
583
|
[g]
|
|
570
584
|
);
|
|
571
|
-
return
|
|
585
|
+
return B(() => {
|
|
572
586
|
g();
|
|
573
587
|
}, [g]), {
|
|
574
588
|
features: r,
|
|
575
|
-
microfrontends:
|
|
589
|
+
microfrontends: a,
|
|
576
590
|
isAdmin: d,
|
|
577
591
|
isLoading: p,
|
|
578
592
|
error: v,
|
|
@@ -583,8 +597,8 @@ function Rr() {
|
|
|
583
597
|
deleteFeature: N
|
|
584
598
|
};
|
|
585
599
|
}
|
|
586
|
-
function
|
|
587
|
-
const t = ae(), [r,
|
|
600
|
+
function Sr() {
|
|
601
|
+
const t = ae(), [r, o] = k([]), [a, i] = k(0), [d, n] = k(!0), [p, l] = k(null), v = R(async () => {
|
|
588
602
|
if (!t.isAuthenticated) {
|
|
589
603
|
n(!1);
|
|
590
604
|
return;
|
|
@@ -599,84 +613,84 @@ function Tr() {
|
|
|
599
613
|
if (!f.ok)
|
|
600
614
|
throw new Error(`HTTP ${f.status}: ${f.statusText}`);
|
|
601
615
|
const E = await f.json();
|
|
602
|
-
|
|
616
|
+
o(E.microfrontends || []), i(E.totalCount || 0);
|
|
603
617
|
} catch (c) {
|
|
604
618
|
l(c instanceof Error ? c.message : String(c));
|
|
605
619
|
} finally {
|
|
606
620
|
n(!1);
|
|
607
621
|
}
|
|
608
622
|
}, [t.isAuthenticated, t.user?.access_token]);
|
|
609
|
-
return
|
|
623
|
+
return B(() => {
|
|
610
624
|
v();
|
|
611
625
|
}, [v]), {
|
|
612
626
|
microfrontends: r,
|
|
613
|
-
totalCount:
|
|
627
|
+
totalCount: a,
|
|
614
628
|
isLoading: d,
|
|
615
629
|
error: p,
|
|
616
630
|
refetch: v
|
|
617
631
|
};
|
|
618
632
|
}
|
|
619
|
-
var
|
|
633
|
+
var se = { exports: {} }, K = {};
|
|
620
634
|
var Xe;
|
|
621
|
-
function
|
|
635
|
+
function tr() {
|
|
622
636
|
if (Xe) return K;
|
|
623
637
|
Xe = 1;
|
|
624
|
-
var t = et, r = /* @__PURE__ */ Symbol.for("react.element"),
|
|
638
|
+
var t = et, r = /* @__PURE__ */ Symbol.for("react.element"), o = /* @__PURE__ */ Symbol.for("react.fragment"), a = Object.prototype.hasOwnProperty, i = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, d = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
625
639
|
function n(p, l, v) {
|
|
626
640
|
var c, g = {}, f = null, E = null;
|
|
627
641
|
v !== void 0 && (f = "" + v), l.key !== void 0 && (f = "" + l.key), l.ref !== void 0 && (E = l.ref);
|
|
628
|
-
for (c in l)
|
|
642
|
+
for (c in l) a.call(l, c) && !d.hasOwnProperty(c) && (g[c] = l[c]);
|
|
629
643
|
if (p && p.defaultProps) for (c in l = p.defaultProps, l) g[c] === void 0 && (g[c] = l[c]);
|
|
630
|
-
return { $$typeof: r, type: p, key: f, ref: E, props: g, _owner:
|
|
644
|
+
return { $$typeof: r, type: p, key: f, ref: E, props: g, _owner: i.current };
|
|
631
645
|
}
|
|
632
|
-
return K.Fragment =
|
|
646
|
+
return K.Fragment = o, K.jsx = n, K.jsxs = n, K;
|
|
633
647
|
}
|
|
634
648
|
var X = {};
|
|
635
649
|
var Ze;
|
|
636
|
-
function
|
|
650
|
+
function rr() {
|
|
637
651
|
return Ze || (Ze = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
638
|
-
var t = et, r = /* @__PURE__ */ Symbol.for("react.element"),
|
|
639
|
-
function
|
|
652
|
+
var t = et, r = /* @__PURE__ */ Symbol.for("react.element"), o = /* @__PURE__ */ Symbol.for("react.portal"), a = /* @__PURE__ */ Symbol.for("react.fragment"), i = /* @__PURE__ */ Symbol.for("react.strict_mode"), d = /* @__PURE__ */ Symbol.for("react.profiler"), n = /* @__PURE__ */ Symbol.for("react.provider"), p = /* @__PURE__ */ Symbol.for("react.context"), l = /* @__PURE__ */ Symbol.for("react.forward_ref"), v = /* @__PURE__ */ Symbol.for("react.suspense"), c = /* @__PURE__ */ Symbol.for("react.suspense_list"), g = /* @__PURE__ */ Symbol.for("react.memo"), f = /* @__PURE__ */ Symbol.for("react.lazy"), E = /* @__PURE__ */ Symbol.for("react.offscreen"), y = Symbol.iterator, N = "@@iterator";
|
|
653
|
+
function S(e) {
|
|
640
654
|
if (e === null || typeof e != "object")
|
|
641
655
|
return null;
|
|
642
|
-
var
|
|
643
|
-
return typeof
|
|
656
|
+
var s = y && e[y] || e[N];
|
|
657
|
+
return typeof s == "function" ? s : null;
|
|
644
658
|
}
|
|
645
659
|
var x = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
646
660
|
function _(e) {
|
|
647
661
|
{
|
|
648
|
-
for (var
|
|
662
|
+
for (var s = arguments.length, u = new Array(s > 1 ? s - 1 : 0), h = 1; h < s; h++)
|
|
649
663
|
u[h - 1] = arguments[h];
|
|
650
|
-
|
|
664
|
+
C("error", e, u);
|
|
651
665
|
}
|
|
652
666
|
}
|
|
653
|
-
function
|
|
667
|
+
function C(e, s, u) {
|
|
654
668
|
{
|
|
655
669
|
var h = x.ReactDebugCurrentFrame, A = h.getStackAddendum();
|
|
656
|
-
A !== "" && (
|
|
657
|
-
var
|
|
670
|
+
A !== "" && (s += "%s", u = u.concat([A]));
|
|
671
|
+
var T = u.map(function(b) {
|
|
658
672
|
return String(b);
|
|
659
673
|
});
|
|
660
|
-
|
|
674
|
+
T.unshift("Warning: " + s), Function.prototype.apply.call(console[e], console, T);
|
|
661
675
|
}
|
|
662
676
|
}
|
|
663
|
-
var j = !1,
|
|
677
|
+
var j = !1, O = !1, L = !1, ut = !1, ct = !1, Ae;
|
|
664
678
|
Ae = /* @__PURE__ */ Symbol.for("react.module.reference");
|
|
665
679
|
function lt(e) {
|
|
666
|
-
return !!(typeof e == "string" || typeof e == "function" || e ===
|
|
680
|
+
return !!(typeof e == "string" || typeof e == "function" || e === a || e === d || ct || e === i || e === v || e === c || ut || e === E || j || O || L || typeof e == "object" && e !== null && (e.$$typeof === f || e.$$typeof === g || e.$$typeof === n || e.$$typeof === p || e.$$typeof === l || // This needs to include all possible module reference object
|
|
667
681
|
// types supported by any Flight configuration anywhere since
|
|
668
682
|
// we don't know which Flight build this will end up being used
|
|
669
683
|
// with.
|
|
670
684
|
e.$$typeof === Ae || e.getModuleId !== void 0));
|
|
671
685
|
}
|
|
672
|
-
function ft(e,
|
|
686
|
+
function ft(e, s, u) {
|
|
673
687
|
var h = e.displayName;
|
|
674
688
|
if (h)
|
|
675
689
|
return h;
|
|
676
|
-
var A =
|
|
690
|
+
var A = s.displayName || s.name || "";
|
|
677
691
|
return A !== "" ? u + "(" + A + ")" : u;
|
|
678
692
|
}
|
|
679
|
-
function
|
|
693
|
+
function Te(e) {
|
|
680
694
|
return e.displayName || "Context";
|
|
681
695
|
}
|
|
682
696
|
function V(e) {
|
|
@@ -687,13 +701,13 @@ function nr() {
|
|
|
687
701
|
if (typeof e == "string")
|
|
688
702
|
return e;
|
|
689
703
|
switch (e) {
|
|
690
|
-
case
|
|
704
|
+
case a:
|
|
691
705
|
return "Fragment";
|
|
692
|
-
case
|
|
706
|
+
case o:
|
|
693
707
|
return "Portal";
|
|
694
708
|
case d:
|
|
695
709
|
return "Profiler";
|
|
696
|
-
case
|
|
710
|
+
case i:
|
|
697
711
|
return "StrictMode";
|
|
698
712
|
case v:
|
|
699
713
|
return "Suspense";
|
|
@@ -703,20 +717,20 @@ function nr() {
|
|
|
703
717
|
if (typeof e == "object")
|
|
704
718
|
switch (e.$$typeof) {
|
|
705
719
|
case p:
|
|
706
|
-
var
|
|
707
|
-
return
|
|
720
|
+
var s = e;
|
|
721
|
+
return Te(s) + ".Consumer";
|
|
708
722
|
case n:
|
|
709
723
|
var u = e;
|
|
710
|
-
return
|
|
724
|
+
return Te(u._context) + ".Provider";
|
|
711
725
|
case l:
|
|
712
726
|
return ft(e, e.render, "ForwardRef");
|
|
713
727
|
case g:
|
|
714
728
|
var h = e.displayName || null;
|
|
715
729
|
return h !== null ? h : V(e.type) || "Memo";
|
|
716
730
|
case f: {
|
|
717
|
-
var A = e,
|
|
731
|
+
var A = e, T = A._payload, b = A._init;
|
|
718
732
|
try {
|
|
719
|
-
return V(b(
|
|
733
|
+
return V(b(T));
|
|
720
734
|
} catch {
|
|
721
735
|
return null;
|
|
722
736
|
}
|
|
@@ -724,14 +738,14 @@ function nr() {
|
|
|
724
738
|
}
|
|
725
739
|
return null;
|
|
726
740
|
}
|
|
727
|
-
var
|
|
741
|
+
var W = Object.assign, q = 0, ke, Se, Re, Ce, Ie, Me, Ne;
|
|
728
742
|
function je() {
|
|
729
743
|
}
|
|
730
744
|
je.__reactDisabledLog = !0;
|
|
731
745
|
function dt() {
|
|
732
746
|
{
|
|
733
747
|
if (q === 0) {
|
|
734
|
-
|
|
748
|
+
ke = console.log, Se = console.info, Re = console.warn, Ce = console.error, Ie = console.group, Me = console.groupCollapsed, Ne = console.groupEnd;
|
|
735
749
|
var e = {
|
|
736
750
|
configurable: !0,
|
|
737
751
|
enumerable: !0,
|
|
@@ -760,25 +774,25 @@ function nr() {
|
|
|
760
774
|
writable: !0
|
|
761
775
|
};
|
|
762
776
|
Object.defineProperties(console, {
|
|
763
|
-
log:
|
|
764
|
-
value:
|
|
777
|
+
log: W({}, e, {
|
|
778
|
+
value: ke
|
|
779
|
+
}),
|
|
780
|
+
info: W({}, e, {
|
|
781
|
+
value: Se
|
|
765
782
|
}),
|
|
766
|
-
|
|
767
|
-
value:
|
|
783
|
+
warn: W({}, e, {
|
|
784
|
+
value: Re
|
|
768
785
|
}),
|
|
769
|
-
|
|
786
|
+
error: W({}, e, {
|
|
770
787
|
value: Ce
|
|
771
788
|
}),
|
|
772
|
-
|
|
773
|
-
value:
|
|
789
|
+
group: W({}, e, {
|
|
790
|
+
value: Ie
|
|
774
791
|
}),
|
|
775
|
-
|
|
792
|
+
groupCollapsed: W({}, e, {
|
|
776
793
|
value: Me
|
|
777
794
|
}),
|
|
778
|
-
|
|
779
|
-
value: Ie
|
|
780
|
-
}),
|
|
781
|
-
groupEnd: z({}, e, {
|
|
795
|
+
groupEnd: W({}, e, {
|
|
782
796
|
value: Ne
|
|
783
797
|
})
|
|
784
798
|
});
|
|
@@ -787,7 +801,7 @@ function nr() {
|
|
|
787
801
|
}
|
|
788
802
|
}
|
|
789
803
|
var ce = x.ReactCurrentDispatcher, le;
|
|
790
|
-
function Z(e,
|
|
804
|
+
function Z(e, s, u) {
|
|
791
805
|
{
|
|
792
806
|
if (le === void 0)
|
|
793
807
|
try {
|
|
@@ -805,7 +819,7 @@ function nr() {
|
|
|
805
819
|
var ht = typeof WeakMap == "function" ? WeakMap : Map;
|
|
806
820
|
Q = new ht();
|
|
807
821
|
}
|
|
808
|
-
function
|
|
822
|
+
function Oe(e, s) {
|
|
809
823
|
if (!e || fe)
|
|
810
824
|
return "";
|
|
811
825
|
{
|
|
@@ -817,10 +831,10 @@ function nr() {
|
|
|
817
831
|
fe = !0;
|
|
818
832
|
var A = Error.prepareStackTrace;
|
|
819
833
|
Error.prepareStackTrace = void 0;
|
|
820
|
-
var
|
|
821
|
-
|
|
834
|
+
var T;
|
|
835
|
+
T = ce.current, ce.current = null, dt();
|
|
822
836
|
try {
|
|
823
|
-
if (
|
|
837
|
+
if (s) {
|
|
824
838
|
var b = function() {
|
|
825
839
|
throw Error();
|
|
826
840
|
};
|
|
@@ -854,40 +868,40 @@ function nr() {
|
|
|
854
868
|
} catch (F) {
|
|
855
869
|
if (F && h && typeof F.stack == "string") {
|
|
856
870
|
for (var w = F.stack.split(`
|
|
857
|
-
`),
|
|
858
|
-
`),
|
|
859
|
-
|
|
860
|
-
for (;
|
|
861
|
-
if (w[
|
|
862
|
-
if (
|
|
871
|
+
`), P = h.stack.split(`
|
|
872
|
+
`), I = w.length - 1, M = P.length - 1; I >= 1 && M >= 0 && w[I] !== P[M]; )
|
|
873
|
+
M--;
|
|
874
|
+
for (; I >= 1 && M >= 0; I--, M--)
|
|
875
|
+
if (w[I] !== P[M]) {
|
|
876
|
+
if (I !== 1 || M !== 1)
|
|
863
877
|
do
|
|
864
|
-
if (
|
|
865
|
-
var
|
|
866
|
-
` + w[
|
|
867
|
-
return e.displayName &&
|
|
878
|
+
if (I--, M--, M < 0 || w[I] !== P[M]) {
|
|
879
|
+
var $ = `
|
|
880
|
+
` + w[I].replace(" at new ", " at ");
|
|
881
|
+
return e.displayName && $.includes("<anonymous>") && ($ = $.replace("<anonymous>", e.displayName)), typeof e == "function" && Q.set(e, $), $;
|
|
868
882
|
}
|
|
869
|
-
while (
|
|
883
|
+
while (I >= 1 && M >= 0);
|
|
870
884
|
break;
|
|
871
885
|
}
|
|
872
886
|
}
|
|
873
887
|
} finally {
|
|
874
|
-
fe = !1, ce.current =
|
|
888
|
+
fe = !1, ce.current = T, pt(), Error.prepareStackTrace = A;
|
|
875
889
|
}
|
|
876
|
-
var Y = e ? e.displayName || e.name : "",
|
|
877
|
-
return typeof e == "function" && Q.set(e,
|
|
890
|
+
var Y = e ? e.displayName || e.name : "", z = Y ? Z(Y) : "";
|
|
891
|
+
return typeof e == "function" && Q.set(e, z), z;
|
|
878
892
|
}
|
|
879
|
-
function gt(e,
|
|
880
|
-
return
|
|
893
|
+
function gt(e, s, u) {
|
|
894
|
+
return Oe(e, !1);
|
|
881
895
|
}
|
|
882
896
|
function mt(e) {
|
|
883
|
-
var
|
|
884
|
-
return !!(
|
|
897
|
+
var s = e.prototype;
|
|
898
|
+
return !!(s && s.isReactComponent);
|
|
885
899
|
}
|
|
886
|
-
function ee(e,
|
|
900
|
+
function ee(e, s, u) {
|
|
887
901
|
if (e == null)
|
|
888
902
|
return "";
|
|
889
903
|
if (typeof e == "function")
|
|
890
|
-
return
|
|
904
|
+
return Oe(e, mt(e));
|
|
891
905
|
if (typeof e == "string")
|
|
892
906
|
return Z(e);
|
|
893
907
|
switch (e) {
|
|
@@ -901,41 +915,41 @@ function nr() {
|
|
|
901
915
|
case l:
|
|
902
916
|
return gt(e.render);
|
|
903
917
|
case g:
|
|
904
|
-
return ee(e.type,
|
|
918
|
+
return ee(e.type, s, u);
|
|
905
919
|
case f: {
|
|
906
|
-
var h = e, A = h._payload,
|
|
920
|
+
var h = e, A = h._payload, T = h._init;
|
|
907
921
|
try {
|
|
908
|
-
return ee(
|
|
922
|
+
return ee(T(A), s, u);
|
|
909
923
|
} catch {
|
|
910
924
|
}
|
|
911
925
|
}
|
|
912
926
|
}
|
|
913
927
|
return "";
|
|
914
928
|
}
|
|
915
|
-
var J = Object.prototype.hasOwnProperty,
|
|
929
|
+
var J = Object.prototype.hasOwnProperty, Pe = {}, De = x.ReactDebugCurrentFrame;
|
|
916
930
|
function te(e) {
|
|
917
931
|
if (e) {
|
|
918
|
-
var
|
|
919
|
-
|
|
932
|
+
var s = e._owner, u = ee(e.type, e._source, s ? s.type : null);
|
|
933
|
+
De.setExtraStackFrame(u);
|
|
920
934
|
} else
|
|
921
|
-
|
|
935
|
+
De.setExtraStackFrame(null);
|
|
922
936
|
}
|
|
923
|
-
function _t(e,
|
|
937
|
+
function _t(e, s, u, h, A) {
|
|
924
938
|
{
|
|
925
|
-
var
|
|
939
|
+
var T = Function.call.bind(J);
|
|
926
940
|
for (var b in e)
|
|
927
|
-
if (
|
|
941
|
+
if (T(e, b)) {
|
|
928
942
|
var w = void 0;
|
|
929
943
|
try {
|
|
930
944
|
if (typeof e[b] != "function") {
|
|
931
|
-
var
|
|
932
|
-
throw
|
|
945
|
+
var P = Error((h || "React class") + ": " + u + " type `" + b + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[b] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
946
|
+
throw P.name = "Invariant Violation", P;
|
|
933
947
|
}
|
|
934
|
-
w = e[b](
|
|
935
|
-
} catch (
|
|
936
|
-
w =
|
|
948
|
+
w = e[b](s, b, h, u, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
949
|
+
} catch (I) {
|
|
950
|
+
w = I;
|
|
937
951
|
}
|
|
938
|
-
w && !(w instanceof Error) && (te(A), _("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", h || "React class", u, b, typeof w), te(null)), w instanceof Error && !(w.message in
|
|
952
|
+
w && !(w instanceof Error) && (te(A), _("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", h || "React class", u, b, typeof w), te(null)), w instanceof Error && !(w.message in Pe) && (Pe[w.message] = !0, te(A), _("Failed %s type: %s", u, w.message), te(null));
|
|
939
953
|
}
|
|
940
954
|
}
|
|
941
955
|
}
|
|
@@ -945,53 +959,53 @@ function nr() {
|
|
|
945
959
|
}
|
|
946
960
|
function yt(e) {
|
|
947
961
|
{
|
|
948
|
-
var
|
|
962
|
+
var s = typeof Symbol == "function" && Symbol.toStringTag, u = s && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
949
963
|
return u;
|
|
950
964
|
}
|
|
951
965
|
}
|
|
952
966
|
function Et(e) {
|
|
953
967
|
try {
|
|
954
|
-
return
|
|
968
|
+
return Fe(e), !1;
|
|
955
969
|
} catch {
|
|
956
970
|
return !0;
|
|
957
971
|
}
|
|
958
972
|
}
|
|
959
|
-
function
|
|
973
|
+
function Fe(e) {
|
|
960
974
|
return "" + e;
|
|
961
975
|
}
|
|
962
976
|
function $e(e) {
|
|
963
977
|
if (Et(e))
|
|
964
|
-
return _("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", yt(e)),
|
|
978
|
+
return _("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", yt(e)), Fe(e);
|
|
965
979
|
}
|
|
966
980
|
var Le = x.ReactCurrentOwner, wt = {
|
|
967
981
|
key: !0,
|
|
968
982
|
ref: !0,
|
|
969
983
|
__self: !0,
|
|
970
984
|
__source: !0
|
|
971
|
-
}, Ue,
|
|
985
|
+
}, Ue, Be;
|
|
972
986
|
function bt(e) {
|
|
973
987
|
if (J.call(e, "ref")) {
|
|
974
|
-
var
|
|
975
|
-
if (
|
|
988
|
+
var s = Object.getOwnPropertyDescriptor(e, "ref").get;
|
|
989
|
+
if (s && s.isReactWarning)
|
|
976
990
|
return !1;
|
|
977
991
|
}
|
|
978
992
|
return e.ref !== void 0;
|
|
979
993
|
}
|
|
980
994
|
function xt(e) {
|
|
981
995
|
if (J.call(e, "key")) {
|
|
982
|
-
var
|
|
983
|
-
if (
|
|
996
|
+
var s = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
997
|
+
if (s && s.isReactWarning)
|
|
984
998
|
return !1;
|
|
985
999
|
}
|
|
986
1000
|
return e.key !== void 0;
|
|
987
1001
|
}
|
|
988
|
-
function At(e,
|
|
1002
|
+
function At(e, s) {
|
|
989
1003
|
typeof e.ref == "string" && Le.current;
|
|
990
1004
|
}
|
|
991
|
-
function
|
|
1005
|
+
function Tt(e, s) {
|
|
992
1006
|
{
|
|
993
1007
|
var u = function() {
|
|
994
|
-
Ue || (Ue = !0, _("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",
|
|
1008
|
+
Ue || (Ue = !0, _("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", s));
|
|
995
1009
|
};
|
|
996
1010
|
u.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
997
1011
|
get: u,
|
|
@@ -999,10 +1013,10 @@ function nr() {
|
|
|
999
1013
|
});
|
|
1000
1014
|
}
|
|
1001
1015
|
}
|
|
1002
|
-
function
|
|
1016
|
+
function kt(e, s) {
|
|
1003
1017
|
{
|
|
1004
1018
|
var u = function() {
|
|
1005
|
-
|
|
1019
|
+
Be || (Be = !0, _("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", s));
|
|
1006
1020
|
};
|
|
1007
1021
|
u.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
|
1008
1022
|
get: u,
|
|
@@ -1010,17 +1024,17 @@ function nr() {
|
|
|
1010
1024
|
});
|
|
1011
1025
|
}
|
|
1012
1026
|
}
|
|
1013
|
-
var
|
|
1027
|
+
var St = function(e, s, u, h, A, T, b) {
|
|
1014
1028
|
var w = {
|
|
1015
1029
|
// This tag allows us to uniquely identify this as a React Element
|
|
1016
1030
|
$$typeof: r,
|
|
1017
1031
|
// Built-in properties that belong on the element
|
|
1018
1032
|
type: e,
|
|
1019
|
-
key:
|
|
1033
|
+
key: s,
|
|
1020
1034
|
ref: u,
|
|
1021
1035
|
props: b,
|
|
1022
1036
|
// Record the component responsible for creating this element.
|
|
1023
|
-
_owner:
|
|
1037
|
+
_owner: T
|
|
1024
1038
|
};
|
|
1025
1039
|
return w._store = {}, Object.defineProperty(w._store, "validated", {
|
|
1026
1040
|
configurable: !1,
|
|
@@ -1039,38 +1053,38 @@ function nr() {
|
|
|
1039
1053
|
value: A
|
|
1040
1054
|
}), Object.freeze && (Object.freeze(w.props), Object.freeze(w)), w;
|
|
1041
1055
|
};
|
|
1042
|
-
function
|
|
1056
|
+
function Rt(e, s, u, h, A) {
|
|
1043
1057
|
{
|
|
1044
|
-
var
|
|
1045
|
-
u !== void 0 && ($e(u), w = "" + u), xt(
|
|
1046
|
-
for (
|
|
1047
|
-
J.call(
|
|
1058
|
+
var T, b = {}, w = null, P = null;
|
|
1059
|
+
u !== void 0 && ($e(u), w = "" + u), xt(s) && ($e(s.key), w = "" + s.key), bt(s) && (P = s.ref, At(s, A));
|
|
1060
|
+
for (T in s)
|
|
1061
|
+
J.call(s, T) && !wt.hasOwnProperty(T) && (b[T] = s[T]);
|
|
1048
1062
|
if (e && e.defaultProps) {
|
|
1049
|
-
var
|
|
1050
|
-
for (
|
|
1051
|
-
b[
|
|
1063
|
+
var I = e.defaultProps;
|
|
1064
|
+
for (T in I)
|
|
1065
|
+
b[T] === void 0 && (b[T] = I[T]);
|
|
1052
1066
|
}
|
|
1053
|
-
if (w ||
|
|
1054
|
-
var
|
|
1055
|
-
w &&
|
|
1067
|
+
if (w || P) {
|
|
1068
|
+
var M = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
1069
|
+
w && Tt(b, M), P && kt(b, M);
|
|
1056
1070
|
}
|
|
1057
|
-
return
|
|
1071
|
+
return St(e, w, P, A, h, Le.current, b);
|
|
1058
1072
|
}
|
|
1059
1073
|
}
|
|
1060
|
-
var pe = x.ReactCurrentOwner,
|
|
1074
|
+
var pe = x.ReactCurrentOwner, Ve = x.ReactDebugCurrentFrame;
|
|
1061
1075
|
function G(e) {
|
|
1062
1076
|
if (e) {
|
|
1063
|
-
var
|
|
1064
|
-
|
|
1077
|
+
var s = e._owner, u = ee(e.type, e._source, s ? s.type : null);
|
|
1078
|
+
Ve.setExtraStackFrame(u);
|
|
1065
1079
|
} else
|
|
1066
|
-
|
|
1080
|
+
Ve.setExtraStackFrame(null);
|
|
1067
1081
|
}
|
|
1068
1082
|
var he;
|
|
1069
1083
|
he = !1;
|
|
1070
1084
|
function ge(e) {
|
|
1071
1085
|
return typeof e == "object" && e !== null && e.$$typeof === r;
|
|
1072
1086
|
}
|
|
1073
|
-
function
|
|
1087
|
+
function He() {
|
|
1074
1088
|
{
|
|
1075
1089
|
if (pe.current) {
|
|
1076
1090
|
var e = V(pe.current.type);
|
|
@@ -1082,83 +1096,83 @@ Check the render method of \`` + e + "`.";
|
|
|
1082
1096
|
return "";
|
|
1083
1097
|
}
|
|
1084
1098
|
}
|
|
1085
|
-
function
|
|
1099
|
+
function Ct(e) {
|
|
1086
1100
|
return "";
|
|
1087
1101
|
}
|
|
1088
|
-
var
|
|
1089
|
-
function
|
|
1102
|
+
var We = {};
|
|
1103
|
+
function It(e) {
|
|
1090
1104
|
{
|
|
1091
|
-
var
|
|
1092
|
-
if (!
|
|
1105
|
+
var s = He();
|
|
1106
|
+
if (!s) {
|
|
1093
1107
|
var u = typeof e == "string" ? e : e.displayName || e.name;
|
|
1094
|
-
u && (
|
|
1108
|
+
u && (s = `
|
|
1095
1109
|
|
|
1096
1110
|
Check the top-level render call using <` + u + ">.");
|
|
1097
1111
|
}
|
|
1098
|
-
return
|
|
1112
|
+
return s;
|
|
1099
1113
|
}
|
|
1100
1114
|
}
|
|
1101
|
-
function
|
|
1115
|
+
function ze(e, s) {
|
|
1102
1116
|
{
|
|
1103
1117
|
if (!e._store || e._store.validated || e.key != null)
|
|
1104
1118
|
return;
|
|
1105
1119
|
e._store.validated = !0;
|
|
1106
|
-
var u =
|
|
1107
|
-
if (
|
|
1120
|
+
var u = It(s);
|
|
1121
|
+
if (We[u])
|
|
1108
1122
|
return;
|
|
1109
|
-
|
|
1123
|
+
We[u] = !0;
|
|
1110
1124
|
var h = "";
|
|
1111
1125
|
e && e._owner && e._owner !== pe.current && (h = " It was passed a child from " + V(e._owner.type) + "."), G(e), _('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', u, h), G(null);
|
|
1112
1126
|
}
|
|
1113
1127
|
}
|
|
1114
|
-
function Ge(e,
|
|
1128
|
+
function Ge(e, s) {
|
|
1115
1129
|
{
|
|
1116
1130
|
if (typeof e != "object")
|
|
1117
1131
|
return;
|
|
1118
1132
|
if (de(e))
|
|
1119
1133
|
for (var u = 0; u < e.length; u++) {
|
|
1120
1134
|
var h = e[u];
|
|
1121
|
-
ge(h) &&
|
|
1135
|
+
ge(h) && ze(h, s);
|
|
1122
1136
|
}
|
|
1123
1137
|
else if (ge(e))
|
|
1124
1138
|
e._store && (e._store.validated = !0);
|
|
1125
1139
|
else if (e) {
|
|
1126
|
-
var A =
|
|
1140
|
+
var A = S(e);
|
|
1127
1141
|
if (typeof A == "function" && A !== e.entries)
|
|
1128
|
-
for (var
|
|
1129
|
-
ge(b.value) &&
|
|
1142
|
+
for (var T = A.call(e), b; !(b = T.next()).done; )
|
|
1143
|
+
ge(b.value) && ze(b.value, s);
|
|
1130
1144
|
}
|
|
1131
1145
|
}
|
|
1132
1146
|
}
|
|
1133
|
-
function
|
|
1147
|
+
function Mt(e) {
|
|
1134
1148
|
{
|
|
1135
|
-
var
|
|
1136
|
-
if (
|
|
1149
|
+
var s = e.type;
|
|
1150
|
+
if (s == null || typeof s == "string")
|
|
1137
1151
|
return;
|
|
1138
1152
|
var u;
|
|
1139
|
-
if (typeof
|
|
1140
|
-
u =
|
|
1141
|
-
else if (typeof
|
|
1153
|
+
if (typeof s == "function")
|
|
1154
|
+
u = s.propTypes;
|
|
1155
|
+
else if (typeof s == "object" && (s.$$typeof === l || // Note: Memo only checks outer props here.
|
|
1142
1156
|
// Inner props are checked in the reconciler.
|
|
1143
|
-
|
|
1144
|
-
u =
|
|
1157
|
+
s.$$typeof === g))
|
|
1158
|
+
u = s.propTypes;
|
|
1145
1159
|
else
|
|
1146
1160
|
return;
|
|
1147
1161
|
if (u) {
|
|
1148
|
-
var h = V(
|
|
1162
|
+
var h = V(s);
|
|
1149
1163
|
_t(u, e.props, "prop", h, e);
|
|
1150
|
-
} else if (
|
|
1164
|
+
} else if (s.PropTypes !== void 0 && !he) {
|
|
1151
1165
|
he = !0;
|
|
1152
|
-
var A = V(
|
|
1166
|
+
var A = V(s);
|
|
1153
1167
|
_("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", A || "Unknown");
|
|
1154
1168
|
}
|
|
1155
|
-
typeof
|
|
1169
|
+
typeof s.getDefaultProps == "function" && !s.getDefaultProps.isReactClassApproved && _("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
1156
1170
|
}
|
|
1157
1171
|
}
|
|
1158
1172
|
function Nt(e) {
|
|
1159
1173
|
{
|
|
1160
|
-
for (var
|
|
1161
|
-
var h =
|
|
1174
|
+
for (var s = Object.keys(e.props), u = 0; u < s.length; u++) {
|
|
1175
|
+
var h = s[u];
|
|
1162
1176
|
if (h !== "children" && h !== "key") {
|
|
1163
1177
|
G(e), _("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", h), G(null);
|
|
1164
1178
|
break;
|
|
@@ -1168,75 +1182,75 @@ Check the top-level render call using <` + u + ">.");
|
|
|
1168
1182
|
}
|
|
1169
1183
|
}
|
|
1170
1184
|
var Ye = {};
|
|
1171
|
-
function qe(e,
|
|
1185
|
+
function qe(e, s, u, h, A, T) {
|
|
1172
1186
|
{
|
|
1173
1187
|
var b = lt(e);
|
|
1174
1188
|
if (!b) {
|
|
1175
1189
|
var w = "";
|
|
1176
1190
|
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (w += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
1177
|
-
var
|
|
1178
|
-
|
|
1179
|
-
var
|
|
1180
|
-
e === null ?
|
|
1191
|
+
var P = Ct();
|
|
1192
|
+
P ? w += P : w += He();
|
|
1193
|
+
var I;
|
|
1194
|
+
e === null ? I = "null" : de(e) ? I = "array" : e !== void 0 && e.$$typeof === r ? (I = "<" + (V(e.type) || "Unknown") + " />", w = " Did you accidentally export a JSX literal instead of a component?") : I = typeof e, _("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", I, w);
|
|
1181
1195
|
}
|
|
1182
|
-
var
|
|
1183
|
-
if (
|
|
1184
|
-
return
|
|
1196
|
+
var M = Rt(e, s, u, A, T);
|
|
1197
|
+
if (M == null)
|
|
1198
|
+
return M;
|
|
1185
1199
|
if (b) {
|
|
1186
|
-
var
|
|
1187
|
-
if (
|
|
1200
|
+
var $ = s.children;
|
|
1201
|
+
if ($ !== void 0)
|
|
1188
1202
|
if (h)
|
|
1189
|
-
if (de(
|
|
1190
|
-
for (var Y = 0; Y <
|
|
1191
|
-
Ge(
|
|
1192
|
-
Object.freeze && Object.freeze(
|
|
1203
|
+
if (de($)) {
|
|
1204
|
+
for (var Y = 0; Y < $.length; Y++)
|
|
1205
|
+
Ge($[Y], e);
|
|
1206
|
+
Object.freeze && Object.freeze($);
|
|
1193
1207
|
} else
|
|
1194
1208
|
_("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
1195
1209
|
else
|
|
1196
|
-
Ge(
|
|
1210
|
+
Ge($, e);
|
|
1197
1211
|
}
|
|
1198
|
-
if (J.call(
|
|
1199
|
-
var
|
|
1212
|
+
if (J.call(s, "key")) {
|
|
1213
|
+
var z = V(e), F = Object.keys(s).filter(function($t) {
|
|
1200
1214
|
return $t !== "key";
|
|
1201
1215
|
}), me = F.length > 0 ? "{key: someKey, " + F.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
1202
|
-
if (!Ye[
|
|
1203
|
-
var
|
|
1216
|
+
if (!Ye[z + me]) {
|
|
1217
|
+
var Ft = F.length > 0 ? "{" + F.join(": ..., ") + ": ...}" : "{}";
|
|
1204
1218
|
_(`A props object containing a "key" prop is being spread into JSX:
|
|
1205
1219
|
let props = %s;
|
|
1206
1220
|
<%s {...props} />
|
|
1207
1221
|
React keys must be passed directly to JSX without using spread:
|
|
1208
1222
|
let props = %s;
|
|
1209
|
-
<%s key={someKey} {...props} />`, me,
|
|
1223
|
+
<%s key={someKey} {...props} />`, me, z, Ft, z), Ye[z + me] = !0;
|
|
1210
1224
|
}
|
|
1211
1225
|
}
|
|
1212
|
-
return e ===
|
|
1226
|
+
return e === a ? Nt(M) : Mt(M), M;
|
|
1213
1227
|
}
|
|
1214
1228
|
}
|
|
1215
|
-
function jt(e,
|
|
1216
|
-
return qe(e,
|
|
1229
|
+
function jt(e, s, u) {
|
|
1230
|
+
return qe(e, s, u, !0);
|
|
1217
1231
|
}
|
|
1218
|
-
function
|
|
1219
|
-
return qe(e,
|
|
1232
|
+
function Ot(e, s, u) {
|
|
1233
|
+
return qe(e, s, u, !1);
|
|
1220
1234
|
}
|
|
1221
|
-
var
|
|
1222
|
-
X.Fragment =
|
|
1235
|
+
var Pt = Ot, Dt = jt;
|
|
1236
|
+
X.Fragment = a, X.jsx = Pt, X.jsxs = Dt;
|
|
1223
1237
|
})()), X;
|
|
1224
1238
|
}
|
|
1225
1239
|
var Qe;
|
|
1226
|
-
function
|
|
1227
|
-
return Qe || (Qe = 1, process.env.NODE_ENV === "production" ?
|
|
1240
|
+
function nr() {
|
|
1241
|
+
return Qe || (Qe = 1, process.env.NODE_ENV === "production" ? se.exports = tr() : se.exports = rr()), se.exports;
|
|
1228
1242
|
}
|
|
1229
|
-
var m =
|
|
1230
|
-
const
|
|
1243
|
+
var m = nr();
|
|
1244
|
+
const st = "platform-kit", sr = !1, ve = {
|
|
1231
1245
|
log: (...t) => {
|
|
1232
1246
|
},
|
|
1233
1247
|
warn: (...t) => {
|
|
1234
1248
|
},
|
|
1235
1249
|
error: (...t) => {
|
|
1236
|
-
console.error(`[${
|
|
1250
|
+
console.error(`[${st}]`, ...t);
|
|
1237
1251
|
}
|
|
1238
1252
|
};
|
|
1239
|
-
class
|
|
1253
|
+
class Rr extends Lt {
|
|
1240
1254
|
hasDispatched = !1;
|
|
1241
1255
|
constructor(r) {
|
|
1242
1256
|
super(r), this.state = { hasError: !1 };
|
|
@@ -1250,7 +1264,7 @@ class Cr extends Lt {
|
|
|
1250
1264
|
const r = window;
|
|
1251
1265
|
if (r.__MF_NAME__) return r.__MF_NAME__;
|
|
1252
1266
|
}
|
|
1253
|
-
return
|
|
1267
|
+
return st;
|
|
1254
1268
|
}
|
|
1255
1269
|
/**
|
|
1256
1270
|
* Определить нужно ли показывать детали ошибки
|
|
@@ -1262,9 +1276,9 @@ class Cr extends Lt {
|
|
|
1262
1276
|
try {
|
|
1263
1277
|
const r = sessionStorage.getItem("config");
|
|
1264
1278
|
if (r) {
|
|
1265
|
-
const
|
|
1266
|
-
if (
|
|
1267
|
-
return
|
|
1279
|
+
const o = JSON.parse(r);
|
|
1280
|
+
if (o.showErrorDetails !== void 0)
|
|
1281
|
+
return o.showErrorDetails;
|
|
1268
1282
|
}
|
|
1269
1283
|
} catch {
|
|
1270
1284
|
}
|
|
@@ -1273,24 +1287,24 @@ class Cr extends Lt {
|
|
|
1273
1287
|
/**
|
|
1274
1288
|
* Dispatch ошибки в shell
|
|
1275
1289
|
*/
|
|
1276
|
-
dispatchError(r,
|
|
1290
|
+
dispatchError(r, o) {
|
|
1277
1291
|
if (this.hasDispatched || typeof window > "u") return;
|
|
1278
1292
|
this.hasDispatched = !0;
|
|
1279
|
-
const
|
|
1293
|
+
const a = this.getMfeName();
|
|
1280
1294
|
ve.error("ErrorBoundary caught:", r);
|
|
1281
1295
|
try {
|
|
1282
1296
|
window.dispatchEvent(new CustomEvent("mfe-error", {
|
|
1283
1297
|
detail: {
|
|
1284
|
-
mfeName:
|
|
1298
|
+
mfeName: a,
|
|
1285
1299
|
error: r.message || String(r),
|
|
1286
1300
|
stack: r.stack,
|
|
1287
|
-
componentStack:
|
|
1301
|
+
componentStack: o?.componentStack,
|
|
1288
1302
|
timestamp: Date.now()
|
|
1289
1303
|
},
|
|
1290
1304
|
bubbles: !0
|
|
1291
1305
|
}));
|
|
1292
|
-
} catch (
|
|
1293
|
-
ve.error("Failed to dispatch mfe-error event:",
|
|
1306
|
+
} catch (i) {
|
|
1307
|
+
ve.error("Failed to dispatch mfe-error event:", i);
|
|
1294
1308
|
}
|
|
1295
1309
|
}
|
|
1296
1310
|
/**
|
|
@@ -1302,8 +1316,8 @@ class Cr extends Lt {
|
|
|
1302
1316
|
/**
|
|
1303
1317
|
* Обработать ошибку
|
|
1304
1318
|
*/
|
|
1305
|
-
componentDidCatch(r,
|
|
1306
|
-
this.dispatchError(r,
|
|
1319
|
+
componentDidCatch(r, o) {
|
|
1320
|
+
this.dispatchError(r, o), ve.error("Error info:", o.componentStack);
|
|
1307
1321
|
}
|
|
1308
1322
|
/**
|
|
1309
1323
|
* Копировать ошибку в буфер обмена
|
|
@@ -1335,7 +1349,7 @@ ${this.state.error?.stack}`;
|
|
|
1335
1349
|
*/
|
|
1336
1350
|
render() {
|
|
1337
1351
|
if (this.state.hasError) {
|
|
1338
|
-
const r = this.state.error?.message || "Unknown error",
|
|
1352
|
+
const r = this.state.error?.message || "Unknown error", o = this.state.error?.stack || "", a = this.shouldShowDetails(), i = this.getMfeName();
|
|
1339
1353
|
return /* @__PURE__ */ m.jsxs("div", { style: {
|
|
1340
1354
|
padding: "20px",
|
|
1341
1355
|
textAlign: "center",
|
|
@@ -1348,10 +1362,10 @@ ${this.state.error?.stack}`;
|
|
|
1348
1362
|
}, children: [
|
|
1349
1363
|
/* @__PURE__ */ m.jsxs("h2", { style: { fontSize: "16px", margin: "0 0 8px 0" }, children: [
|
|
1350
1364
|
"⚠️ Ошибка в ",
|
|
1351
|
-
|
|
1365
|
+
i
|
|
1352
1366
|
] }),
|
|
1353
1367
|
/* @__PURE__ */ m.jsx("p", { style: { fontSize: "12px", margin: 0 }, children: "Произошла ошибка в микрофронтенде. Сообщение отправлено в shell." }),
|
|
1354
|
-
|
|
1368
|
+
a && /* @__PURE__ */ m.jsxs("details", { style: {
|
|
1355
1369
|
whiteSpace: "pre-wrap",
|
|
1356
1370
|
textAlign: "left",
|
|
1357
1371
|
marginTop: "10px",
|
|
@@ -1370,9 +1384,9 @@ ${this.state.error?.stack}`;
|
|
|
1370
1384
|
borderRadius: "4px"
|
|
1371
1385
|
}, children: [
|
|
1372
1386
|
r,
|
|
1373
|
-
|
|
1387
|
+
o && `
|
|
1374
1388
|
|
|
1375
|
-
${
|
|
1389
|
+
${o}`
|
|
1376
1390
|
] })
|
|
1377
1391
|
] }),
|
|
1378
1392
|
/* @__PURE__ */ m.jsxs("div", { style: { marginTop: "12px", display: "flex", gap: "8px", justifyContent: "center" }, children: [
|
|
@@ -1427,7 +1441,7 @@ ${s}`
|
|
|
1427
1441
|
return this.props.children == null ? null : this.props.children;
|
|
1428
1442
|
}
|
|
1429
1443
|
}
|
|
1430
|
-
const
|
|
1444
|
+
const D = {
|
|
1431
1445
|
info: "ℹ️",
|
|
1432
1446
|
code: "💻",
|
|
1433
1447
|
link: "🔗",
|
|
@@ -1438,24 +1452,24 @@ const $ = {
|
|
|
1438
1452
|
tags: "🏷️",
|
|
1439
1453
|
spreadsheet: "📊"
|
|
1440
1454
|
};
|
|
1441
|
-
function
|
|
1442
|
-
const { data: r, isLoading:
|
|
1443
|
-
if (
|
|
1455
|
+
function Cr({ mfeName: t }) {
|
|
1456
|
+
const { data: r, isLoading: o, error: a } = Gt({ mfeName: t }), [i, d] = k(!1);
|
|
1457
|
+
if (o)
|
|
1444
1458
|
return /* @__PURE__ */ m.jsxs("span", { className: "text-muted small me-2", children: [
|
|
1445
1459
|
/* @__PURE__ */ m.jsx("span", { className: "me-1", children: "⏳" }),
|
|
1446
1460
|
"Загрузка..."
|
|
1447
1461
|
] });
|
|
1448
|
-
if (
|
|
1449
|
-
return /* @__PURE__ */ m.jsxs("span", { className: "text-muted small me-2", title: `Ошибка: ${
|
|
1462
|
+
if (a || !r)
|
|
1463
|
+
return /* @__PURE__ */ m.jsxs("span", { className: "text-muted small me-2", title: `Ошибка: ${a || "нет данных"}`, children: [
|
|
1450
1464
|
/* @__PURE__ */ m.jsx("span", { className: "me-1", children: "ℹ️" }),
|
|
1451
1465
|
"N/A"
|
|
1452
1466
|
] });
|
|
1453
1467
|
const n = r, p = n.BUILD_VERSION || n.IMAGE_VERSION || n.APP_NAME || "N/A", l = [];
|
|
1454
|
-
return n.APP_NAME && l.push({ key: "APP_NAME", value: n.APP_NAME, label: "Приложение", icon:
|
|
1468
|
+
return n.APP_NAME && l.push({ key: "APP_NAME", value: n.APP_NAME, label: "Приложение", icon: D.apps }), n.BUILD_VERSION && l.push({ key: "BUILD_VERSION", value: n.BUILD_VERSION, label: "Версия", icon: D.tags }), n.IMAGE_VERSION && l.push({ key: "IMAGE_VERSION", value: n.IMAGE_VERSION, label: "Образ", icon: D.storage }), n.GIT_COMMIT && l.push({ key: "GIT_COMMIT", value: n.GIT_COMMIT, label: "Commit", icon: D.spreadsheet }), n.COMMIT_SHA && l.push({ key: "COMMIT_SHA", value: n.COMMIT_SHA, label: "Commit", icon: D.spreadsheet }), n.GIT_BRANCH && l.push({ key: "GIT_BRANCH", value: n.GIT_BRANCH, label: "Ветка", icon: D.spreadsheet }), n.BUILD_BRANCH && l.push({ key: "BUILD_BRANCH", value: n.BUILD_BRANCH, label: "Ветка", icon: D.spreadsheet }), n.CI_COMMIT_AUTHOR && l.push({ key: "CI_COMMIT_AUTHOR", value: n.CI_COMMIT_AUTHOR, label: "Автор", icon: D.user }), n.CI_COMMIT_TIMESTAMP && l.push({ key: "CI_COMMIT_TIMESTAMP", value: n.CI_COMMIT_TIMESTAMP, label: "Дата", icon: D.clock }), n.BUILD_DATE && l.push({ key: "BUILD_DATE", value: n.BUILD_DATE, label: "Сборка", icon: D.clock }), n.CI_JOB_URL && l.push({ key: "CI_JOB_URL", value: n.CI_JOB_URL, label: "CI Job", icon: D.link }), n.CI_PIPELINE_URL && l.push({ key: "CI_PIPELINE_URL", value: n.CI_PIPELINE_URL, label: "Pipeline", icon: D.link }), n.CI_COMMIT_MESSAGE && (n.CI_COMMIT_MESSAGE.length > 60 ? n.CI_COMMIT_MESSAGE.substring(0, 57) + "" : n.CI_COMMIT_MESSAGE, l.push({ key: "CI_COMMIT_MESSAGE", value: n.CI_COMMIT_MESSAGE, label: "Сообщение", icon: D.code })), /* @__PURE__ */ m.jsxs("div", { style: { display: "inline-block", position: "relative" }, children: [
|
|
1455
1469
|
/* @__PURE__ */ m.jsxs(
|
|
1456
1470
|
"button",
|
|
1457
1471
|
{
|
|
1458
|
-
onClick: () => d(!
|
|
1472
|
+
onClick: () => d(!i),
|
|
1459
1473
|
style: {
|
|
1460
1474
|
background: "transparent",
|
|
1461
1475
|
border: "none",
|
|
@@ -1467,12 +1481,12 @@ function kr({ mfeName: t }) {
|
|
|
1467
1481
|
},
|
|
1468
1482
|
title: "Информация о версии",
|
|
1469
1483
|
children: [
|
|
1470
|
-
/* @__PURE__ */ m.jsx("span", { className: "me-1", children:
|
|
1484
|
+
/* @__PURE__ */ m.jsx("span", { className: "me-1", children: D.info }),
|
|
1471
1485
|
/* @__PURE__ */ m.jsx("span", { className: "text-dark", children: p })
|
|
1472
1486
|
]
|
|
1473
1487
|
}
|
|
1474
1488
|
),
|
|
1475
|
-
|
|
1489
|
+
i && /* @__PURE__ */ m.jsxs(
|
|
1476
1490
|
"div",
|
|
1477
1491
|
{
|
|
1478
1492
|
style: {
|
|
@@ -1496,7 +1510,7 @@ function kr({ mfeName: t }) {
|
|
|
1496
1510
|
display: "flex",
|
|
1497
1511
|
alignItems: "center"
|
|
1498
1512
|
}, children: [
|
|
1499
|
-
/* @__PURE__ */ m.jsx("span", { className: "me-2", children:
|
|
1513
|
+
/* @__PURE__ */ m.jsx("span", { className: "me-2", children: D.apps }),
|
|
1500
1514
|
/* @__PURE__ */ m.jsx("strong", { children: n.APP_NAME || t })
|
|
1501
1515
|
] }),
|
|
1502
1516
|
/* @__PURE__ */ m.jsxs("div", { style: { marginBottom: "12px" }, children: [
|
|
@@ -1559,7 +1573,7 @@ function kr({ mfeName: t }) {
|
|
|
1559
1573
|
]
|
|
1560
1574
|
}
|
|
1561
1575
|
),
|
|
1562
|
-
|
|
1576
|
+
i && /* @__PURE__ */ m.jsx(
|
|
1563
1577
|
"div",
|
|
1564
1578
|
{
|
|
1565
1579
|
onClick: () => d(!1),
|
|
@@ -1575,40 +1589,40 @@ function kr({ mfeName: t }) {
|
|
|
1575
1589
|
)
|
|
1576
1590
|
] });
|
|
1577
1591
|
}
|
|
1578
|
-
const Ee = "platform-kit",
|
|
1579
|
-
function
|
|
1580
|
-
const [r,
|
|
1592
|
+
const Ee = "platform-kit", ot = Ut(null);
|
|
1593
|
+
function Ir({ children: t }) {
|
|
1594
|
+
const [r, o] = k([]), a = typeof window < "u" && window.__MF_NAME__ || Ee, i = R((f, E, y, N) => ({
|
|
1581
1595
|
id: `${Date.now()}-${Math.random().toString(36).substr(2, 9)}`,
|
|
1582
1596
|
type: f,
|
|
1583
1597
|
title: E,
|
|
1584
1598
|
message: y,
|
|
1585
|
-
mfeName:
|
|
1599
|
+
mfeName: a,
|
|
1586
1600
|
timestamp: Date.now(),
|
|
1587
1601
|
duration: N
|
|
1588
|
-
}), [
|
|
1589
|
-
|
|
1602
|
+
}), [a]), d = R((f) => {
|
|
1603
|
+
o((y) => [...y, f].slice(0, 5));
|
|
1590
1604
|
const E = f.duration || 5e3;
|
|
1591
1605
|
E > 0 && setTimeout(() => {
|
|
1592
|
-
|
|
1606
|
+
o((y) => y.filter((N) => N.id !== f.id));
|
|
1593
1607
|
}, E);
|
|
1594
|
-
}, []), n =
|
|
1595
|
-
const E =
|
|
1608
|
+
}, []), n = R((f) => {
|
|
1609
|
+
const E = i(f.type, f.title, f.message, f.duration);
|
|
1596
1610
|
d(E), typeof window < "u" && window.dispatchEvent(new CustomEvent("mfe-notification", {
|
|
1597
1611
|
detail: E,
|
|
1598
1612
|
bubbles: !0
|
|
1599
1613
|
}));
|
|
1600
|
-
}, [
|
|
1614
|
+
}, [i, d]), p = R((f, E = "Успешно") => {
|
|
1601
1615
|
n({ type: "success", title: E, message: f });
|
|
1602
|
-
}, [n]), l =
|
|
1616
|
+
}, [n]), l = R((f, E = "Ошибка") => {
|
|
1603
1617
|
n({ type: "error", title: E, message: f });
|
|
1604
|
-
}, [n]), v =
|
|
1618
|
+
}, [n]), v = R((f, E = "Предупреждение") => {
|
|
1605
1619
|
n({ type: "warning", title: E, message: f });
|
|
1606
|
-
}, [n]), c =
|
|
1620
|
+
}, [n]), c = R((f, E = "Информация") => {
|
|
1607
1621
|
n({ type: "info", title: E, message: f });
|
|
1608
|
-
}, [n]), g =
|
|
1609
|
-
|
|
1622
|
+
}, [n]), g = R((f) => {
|
|
1623
|
+
o((E) => E.filter((y) => y.id !== f));
|
|
1610
1624
|
}, []);
|
|
1611
|
-
return
|
|
1625
|
+
return B(() => {
|
|
1612
1626
|
if (typeof window > "u") return;
|
|
1613
1627
|
const f = (E) => {
|
|
1614
1628
|
const y = E.detail;
|
|
@@ -1623,7 +1637,7 @@ function Mr({ children: t }) {
|
|
|
1623
1637
|
return window.addEventListener("mfe-notification", f), () => {
|
|
1624
1638
|
window.removeEventListener("mfe-notification", f);
|
|
1625
1639
|
};
|
|
1626
|
-
}, [d]), /* @__PURE__ */ m.jsxs(
|
|
1640
|
+
}, [d]), /* @__PURE__ */ m.jsxs(ot.Provider, { value: {
|
|
1627
1641
|
notify: n,
|
|
1628
1642
|
notifySuccess: p,
|
|
1629
1643
|
notifyError: l,
|
|
@@ -1691,8 +1705,8 @@ function Mr({ children: t }) {
|
|
|
1691
1705
|
)
|
|
1692
1706
|
] });
|
|
1693
1707
|
}
|
|
1694
|
-
function
|
|
1695
|
-
const t =
|
|
1708
|
+
function Mr() {
|
|
1709
|
+
const t = Bt(ot);
|
|
1696
1710
|
return t || {
|
|
1697
1711
|
notify: () => {
|
|
1698
1712
|
},
|
|
@@ -1710,31 +1724,31 @@ function Ir() {
|
|
|
1710
1724
|
}
|
|
1711
1725
|
function Nr(t) {
|
|
1712
1726
|
if (typeof window > "u") return;
|
|
1713
|
-
const r = window.__MF_NAME__ || Ee,
|
|
1727
|
+
const r = window.__MF_NAME__ || Ee, o = {
|
|
1714
1728
|
...t,
|
|
1715
1729
|
mfeName: r,
|
|
1716
1730
|
timestamp: Date.now()
|
|
1717
1731
|
};
|
|
1718
1732
|
window.dispatchEvent(new CustomEvent("mfe-notification", {
|
|
1719
|
-
detail:
|
|
1733
|
+
detail: o,
|
|
1720
1734
|
bubbles: !0
|
|
1721
1735
|
}));
|
|
1722
1736
|
}
|
|
1723
1737
|
function ue(t, r) {
|
|
1724
|
-
const
|
|
1738
|
+
const o = r?.prefix ? `[${r.prefix}]` : `[${t}]`;
|
|
1725
1739
|
return {
|
|
1726
|
-
log: (...
|
|
1740
|
+
log: (...a) => {
|
|
1727
1741
|
},
|
|
1728
|
-
warn: (...
|
|
1742
|
+
warn: (...a) => {
|
|
1729
1743
|
},
|
|
1730
|
-
error: (...
|
|
1731
|
-
console.error(
|
|
1744
|
+
error: (...a) => {
|
|
1745
|
+
console.error(o, ...a);
|
|
1732
1746
|
},
|
|
1733
|
-
info: (...
|
|
1747
|
+
info: (...a) => {
|
|
1734
1748
|
}
|
|
1735
1749
|
};
|
|
1736
1750
|
}
|
|
1737
|
-
const jr = ue("platform-kit", { prefix: "AUTH" }),
|
|
1751
|
+
const jr = ue("platform-kit", { prefix: "AUTH" }), Or = ue("platform-kit", { prefix: "API" }), Pr = ue("platform-kit", { prefix: "ERROR" }), Dr = ue("platform-kit", { prefix: "INFO" }), or = {}, ar = {
|
|
1738
1752
|
log: (...t) => {
|
|
1739
1753
|
},
|
|
1740
1754
|
warn: (...t) => {
|
|
@@ -1766,81 +1780,81 @@ function it() {
|
|
|
1766
1780
|
return null;
|
|
1767
1781
|
}
|
|
1768
1782
|
function xe() {
|
|
1769
|
-
const t =
|
|
1783
|
+
const t = or;
|
|
1770
1784
|
return t.VITE_MFE_NAME ? String(t.VITE_MFE_NAME) : t.MFE_NAME ? String(t.MFE_NAME) : null;
|
|
1771
1785
|
}
|
|
1772
|
-
let
|
|
1773
|
-
function
|
|
1774
|
-
const
|
|
1775
|
-
if (
|
|
1776
|
-
return
|
|
1777
|
-
if (we &&
|
|
1778
|
-
return
|
|
1779
|
-
const
|
|
1786
|
+
let oe = null, we = !1;
|
|
1787
|
+
function ir(t, r) {
|
|
1788
|
+
const o = be(t);
|
|
1789
|
+
if (o)
|
|
1790
|
+
return o;
|
|
1791
|
+
if (we && oe)
|
|
1792
|
+
return oe;
|
|
1793
|
+
const a = [
|
|
1780
1794
|
{ source: "window.__MF_NAME__", value: at() },
|
|
1781
1795
|
{ source: "sessionStorage.mf-config", value: it() },
|
|
1782
1796
|
{ source: "import.meta.env.VITE_MFE_NAME", value: xe() }
|
|
1783
1797
|
];
|
|
1784
|
-
for (const { source: d, value: n } of
|
|
1798
|
+
for (const { source: d, value: n } of a)
|
|
1785
1799
|
if (n)
|
|
1786
|
-
return
|
|
1800
|
+
return oe = n, we = !0, n;
|
|
1787
1801
|
if (r)
|
|
1788
1802
|
return r;
|
|
1789
|
-
const
|
|
1790
|
-
throw
|
|
1803
|
+
const i = "Cannot determine MFE name. Please pass mfeName in props, set window.__MF_NAME__, sessionStorage.mf-config, or VITE_MFE_NAME";
|
|
1804
|
+
throw ar.error(i), new Error(i);
|
|
1791
1805
|
}
|
|
1792
|
-
function
|
|
1793
|
-
return
|
|
1806
|
+
function Fr(t) {
|
|
1807
|
+
return ir(t);
|
|
1794
1808
|
}
|
|
1795
|
-
function
|
|
1809
|
+
function ur(t) {
|
|
1796
1810
|
return be(t) ? "props.mfeName" : at() ? "window.__MF_NAME__" : it() ? "sessionStorage.mf-config" : xe() ? "import.meta.env.VITE_MFE_NAME" : null;
|
|
1797
1811
|
}
|
|
1798
1812
|
function $r(t) {
|
|
1799
|
-
return
|
|
1813
|
+
return ur(t) !== null;
|
|
1800
1814
|
}
|
|
1801
1815
|
function Lr() {
|
|
1802
|
-
|
|
1816
|
+
oe = null, we = !1;
|
|
1803
1817
|
}
|
|
1804
1818
|
function Ur(t) {
|
|
1805
1819
|
const r = [];
|
|
1806
1820
|
return be(t) && r.push("props.mfeName"), typeof window < "u" && (window.__MF_NAME__ && r.push("window.__MF_NAME__"), sessionStorage.getItem("mf-config") && r.push("sessionStorage.mf-config")), xe() && r.push("import.meta.env.VITE_MFE_NAME"), r;
|
|
1807
1821
|
}
|
|
1808
1822
|
export {
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1823
|
+
Rr as ErrorBoundary,
|
|
1824
|
+
Ir as NotificationProvider,
|
|
1825
|
+
Cr as VersionInfo,
|
|
1826
|
+
H as api,
|
|
1827
|
+
Or as apiLogger,
|
|
1814
1828
|
jr as authLogger,
|
|
1815
|
-
|
|
1829
|
+
Zt as createApiClient,
|
|
1816
1830
|
ue as createMfLogger,
|
|
1817
1831
|
yr as del,
|
|
1818
1832
|
Nr as dispatchNotification,
|
|
1819
|
-
|
|
1833
|
+
Pr as errorLogger,
|
|
1820
1834
|
mr as get,
|
|
1821
1835
|
dr as getAccessToken,
|
|
1822
1836
|
Ur as getAllMfeNameSources,
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1837
|
+
fr as getAuthState,
|
|
1838
|
+
ir as getMfeName,
|
|
1839
|
+
ur as getMfeNameSource,
|
|
1840
|
+
U as getShellAuth,
|
|
1827
1841
|
$r as hasMfeName,
|
|
1828
|
-
|
|
1842
|
+
Dr as infoLogger,
|
|
1829
1843
|
pr as isAuthenticated,
|
|
1830
1844
|
hr as logout,
|
|
1831
1845
|
_r as post,
|
|
1832
1846
|
vr as put,
|
|
1833
|
-
|
|
1834
|
-
|
|
1847
|
+
Ht as redirectToLogin,
|
|
1848
|
+
Fr as requireMfeName,
|
|
1835
1849
|
Lr as resetMfeNameCache,
|
|
1836
1850
|
ie as useApi,
|
|
1837
1851
|
xr as useDel,
|
|
1838
|
-
|
|
1839
|
-
|
|
1852
|
+
kr as useFeatureAdmin,
|
|
1853
|
+
Tr as useFeatures,
|
|
1840
1854
|
Er as useGet,
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1855
|
+
Gt as useInfoData,
|
|
1856
|
+
Sr as useMicrofrontendsFeatures,
|
|
1857
|
+
Mr as useNotification,
|
|
1844
1858
|
Ar as usePermissions,
|
|
1845
1859
|
wr as usePost,
|
|
1846
1860
|
br as usePut,
|