@ibdop/platform-kit 1.0.12 → 1.0.14

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