@ibdop/platform-kit 1.0.15 → 1.0.16

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