@archbase/security 4.0.41 → 4.0.43

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.js CHANGED
@@ -1,18 +1,18 @@
1
1
  import "reflect-metadata";
2
- import * as P from "inversify";
2
+ import * as T from "inversify";
3
3
  import { decorate as Bt, injectable as Lt } from "inversify";
4
- import { compressString as Ot, decompressString as $t, IOCContainer as zt, ARCHBASE_IOC_API_TYPE as Y, processErrorMessage as oe, IsNotEmpty as X, IsOptional as ie, IsBoolean as te, IsEmail as jt, getKeyByEnumValue as Qe, useArchbasePasswordRemember as Ft, getI18nextInstance as x, useArchbaseTheme as Vt, isEmailValidate as Wt, useArchbaseAppContext as Ht } from "@archbase/core";
5
- import G from "crypto-js";
6
- import { jwtDecode as Gt } from "jwt-decode";
7
- import { jsx as n, jsxs as C, Fragment as ne } from "react/jsx-runtime";
8
- import it, { useState as p, useEffect as K, createContext as Ve, useMemo as at, useRef as ct, useCallback as Ce, useContext as We } from "react";
4
+ import { compressString as Ot, decompressString as $t, IOCContainer as zt, ARCHBASE_IOC_API_TYPE as X, processErrorMessage as ne, IsNotEmpty as Q, IsOptional as ae, IsBoolean as re, IsEmail as jt, getKeyByEnumValue as Qe, useArchbasePasswordRemember as Ft, getI18nextInstance as x, useArchbaseTheme as Vt, resolveArchbasePasswordPolicy as Wt, isEmailValidate as Ht, validateArchbasePassword as Gt, useArchbaseAppContext as Jt } from "@archbase/core";
5
+ import K from "crypto-js";
6
+ import { jwtDecode as Kt } from "jwt-decode";
7
+ import { jsx as n, jsxs as C, Fragment as ie } from "react/jsx-runtime";
8
+ import it, { useState as p, useEffect as Y, createContext as Ve, useMemo as at, useRef as ct, useCallback as Ce, useContext as We } from "react";
9
9
  import { BehaviorSubject as Ze } from "rxjs";
10
- import { ArchbaseRemoteApiService as ye, useArchbaseStore as lt } from "@archbase/data";
11
- import { v4 as Q } from "uuid";
12
- import { Card as He, Text as F, Divider as Ue, Stack as Ee, TextInput as xe, Button as H, Anchor as et, Group as de, Select as Jt, Tooltip as Kt, Loader as dt, PasswordInput as ze, Checkbox as qt, Alert as tt, Code as rt, CopyButton as st, SimpleGrid as Yt, useMantineColorScheme as Xt, Box as Qt, Skeleton as Ie } from "@mantine/core";
10
+ import { ArchbaseRemoteApiService as ge, useArchbaseStore as lt } from "@archbase/data";
11
+ import { v4 as Z } from "uuid";
12
+ import { Card as He, Text as j, Divider as Ue, Stack as Ee, TextInput as xe, Button as G, Anchor as et, Group as ue, Select as qt, Tooltip as Yt, Loader as dt, PasswordInput as ze, Checkbox as Xt, Alert as tt, Code as rt, CopyButton as st, SimpleGrid as Qt, useMantineColorScheme as Zt, Box as er, Skeleton as Ie } from "@mantine/core";
13
13
  import { useFocusTrap as ut } from "@mantine/hooks";
14
- import { IconCopy as Zt } from "@tabler/icons-react";
15
- import { ArchbaseQRCode as er, ArchbaseDialog as ot } from "@archbase/components";
14
+ import { IconCopy as tr } from "@tabler/icons-react";
15
+ import { ArchbaseQRCode as rr, ArchbasePasswordStrengthMeter as sr, ArchbaseDialog as ot } from "@archbase/components";
16
16
  import { useContainer as De } from "inversify-react";
17
17
  class ht {
18
18
  id;
@@ -38,13 +38,13 @@ class pt {
38
38
  return new pt({});
39
39
  }
40
40
  }
41
- const ce = "YngzI1guK3dGaElFcFY9MywqK3xgPzg/Ojg7eD8xRmg=", Me = "c1ab58e7-c113-4225-a190-a9e59d1207fc", Be = "6faf6932-a0b5-457b-83b1-8d89ddbd91fd", Le = "602b05c5-ec46-451e-aba6-187e463bc245", Oe = "8b4a7c2d-9e5f-4163-b8a7-3f2c9d8e5a1b";
42
- class tr {
41
+ const le = "YngzI1guK3dGaElFcFY9MywqK3xgPzg/Ojg7eD8xRmg=", Ne = "c1ab58e7-c113-4225-a190-a9e59d1207fc", Be = "6faf6932-a0b5-457b-83b1-8d89ddbd91fd", Le = "602b05c5-ec46-451e-aba6-187e463bc245", Oe = "8b4a7c2d-9e5f-4163-b8a7-3f2c9d8e5a1b";
42
+ class or {
43
43
  getUsernameAndPassword() {
44
44
  try {
45
45
  const e = localStorage.getItem(Be);
46
46
  if (e) {
47
- const t = G.AES.decrypt(e, ce).toString(G.enc.Utf8), o = atob(t).split(":");
47
+ const t = K.AES.decrypt(e, le).toString(K.enc.Utf8), o = atob(t).split(":");
48
48
  return { username: o[0], password: o[1], remember: !0 };
49
49
  } else
50
50
  return null;
@@ -53,14 +53,14 @@ class tr {
53
53
  }
54
54
  }
55
55
  saveUsernameAndPassword(e, t) {
56
- const s = btoa(`${e}:${t}`), o = G.AES.encrypt(s, ce).toString();
56
+ const s = btoa(`${e}:${t}`), o = K.AES.encrypt(s, le).toString();
57
57
  localStorage.setItem(Be, o);
58
58
  }
59
59
  getUsername() {
60
60
  try {
61
61
  const e = localStorage.getItem(Le);
62
62
  if (e) {
63
- const t = G.AES.decrypt(e, ce).toString(G.enc.Utf8);
63
+ const t = K.AES.decrypt(e, le).toString(K.enc.Utf8);
64
64
  return atob(t);
65
65
  } else
66
66
  return null;
@@ -69,7 +69,7 @@ class tr {
69
69
  }
70
70
  }
71
71
  saveUsername(e) {
72
- const t = btoa(e), s = G.AES.encrypt(t, ce).toString();
72
+ const t = btoa(e), s = K.AES.encrypt(t, le).toString();
73
73
  localStorage.setItem(Le, s);
74
74
  }
75
75
  isTokenExpired(e, t = 300) {
@@ -77,7 +77,7 @@ class tr {
77
77
  if (!s && !this.getToken())
78
78
  return !0;
79
79
  try {
80
- const o = Gt(s.access_token);
80
+ const o = Kt(s.access_token);
81
81
  if (!o)
82
82
  return !0;
83
83
  const a = Math.floor(Date.now() / 1e3), c = o.exp;
@@ -88,8 +88,8 @@ class tr {
88
88
  }
89
89
  saveToken(e) {
90
90
  if (e) {
91
- const t = JSON.stringify(e), s = G.AES.encrypt(t, ce).toString(), o = Ot(s);
92
- localStorage.setItem(Me, o);
91
+ const t = JSON.stringify(e), s = K.AES.encrypt(t, le).toString(), o = Ot(s);
92
+ localStorage.setItem(Ne, o);
93
93
  } else
94
94
  this.clearToken();
95
95
  }
@@ -97,14 +97,14 @@ class tr {
97
97
  localStorage.removeItem(Be), localStorage.removeItem(Le);
98
98
  }
99
99
  clearToken() {
100
- localStorage.removeItem(Me);
100
+ localStorage.removeItem(Ne);
101
101
  }
102
102
  getToken() {
103
103
  try {
104
- const e = localStorage.getItem(Me);
104
+ const e = localStorage.getItem(Ne);
105
105
  if (!e)
106
106
  return null;
107
- const t = $t(e), s = G.AES.decrypt(t, ce).toString(G.enc.Utf8);
107
+ const t = $t(e), s = K.AES.decrypt(t, le).toString(K.enc.Utf8);
108
108
  return JSON.parse(s);
109
109
  } catch {
110
110
  return null;
@@ -112,7 +112,7 @@ class tr {
112
112
  }
113
113
  saveContext(e) {
114
114
  try {
115
- const t = G.AES.encrypt(e, ce).toString();
115
+ const t = K.AES.encrypt(e, le).toString();
116
116
  localStorage.setItem(Oe, t);
117
117
  } catch (t) {
118
118
  console.warn("Erro ao salvar contexto:", t);
@@ -121,7 +121,7 @@ class tr {
121
121
  getContext() {
122
122
  try {
123
123
  const e = localStorage.getItem(Oe);
124
- return e ? G.AES.decrypt(e, ce).toString(G.enc.Utf8) : null;
124
+ return e ? K.AES.decrypt(e, le).toString(K.enc.Utf8) : null;
125
125
  } catch {
126
126
  return null;
127
127
  }
@@ -130,19 +130,19 @@ class tr {
130
130
  localStorage.removeItem(Oe);
131
131
  }
132
132
  }
133
- Bt(Lt(), tr);
133
+ Bt(Lt(), or);
134
134
  function ft(r) {
135
135
  const t = new Uint8Array(1);
136
136
  return window.crypto.getRandomValues(t), t[0] >= Math.floor(256 / r) * r ? ft(r) : t[0] % r;
137
137
  }
138
- function rr(r) {
138
+ function nr(r) {
139
139
  let e = "";
140
140
  const t = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
141
141
  for (let s = 0; s < r; s++)
142
142
  e += t.charAt(ft(t.length - 1));
143
143
  return e;
144
144
  }
145
- async function sr(r) {
145
+ async function ir(r) {
146
146
  if (!window.crypto.subtle?.digest)
147
147
  throw new Error(
148
148
  "The context/environment is not secure, and does not support the 'crypto.subtle' module. See: https://developer.mozilla.org/en-US/docs/Web/API/Crypto/subtle for details"
@@ -157,16 +157,16 @@ class mt extends Error {
157
157
  super(s), this.name = "FetchError", this.status = e, this.statusText = t;
158
158
  }
159
159
  }
160
- function or(r) {
160
+ function ar(r) {
161
161
  let e = "";
162
162
  return Object.entries(r).forEach(([t, s]) => {
163
163
  e += (e ? "&" : "") + t + "=" + encodeURIComponent(s);
164
164
  }), e;
165
165
  }
166
- async function nr(r, e) {
166
+ async function cr(r, e) {
167
167
  return fetch(r, {
168
168
  method: "POST",
169
- body: or(e),
169
+ body: ar(e),
170
170
  headers: { "Content-Type": "application/x-www-form-urlencoded" }
171
171
  }).then(async (t) => {
172
172
  if (!t.ok) {
@@ -177,9 +177,9 @@ async function nr(r, e) {
177
177
  });
178
178
  }
179
179
  const gt = "PKCE_code_verifier", je = "ROCP_auth_state";
180
- async function ir(r, e) {
181
- const t = rr(96);
182
- return sessionStorage.setItem(gt, t), sr(t).then((s) => {
180
+ async function lr(r, e) {
181
+ const t = nr(96);
182
+ return sessionStorage.setItem(gt, t), ir(t).then((s) => {
183
183
  const o = new URLSearchParams({
184
184
  response_type: "code",
185
185
  client_id: r.clientId,
@@ -193,17 +193,17 @@ async function ir(r, e) {
193
193
  a && (sessionStorage.setItem(je, a), o.append("state", a)), r?.preLogin && r.preLogin(), window.location.replace(`${r.authorizationEndpoint}?${o.toString()}`);
194
194
  });
195
195
  }
196
- function ar(r) {
196
+ function dr(r) {
197
197
  return r.access_token !== void 0;
198
198
  }
199
199
  function yt(r, e) {
200
- return nr(r, e).then((t) => t.json().then((s) => {
201
- if (ar(s))
200
+ return cr(r, e).then((t) => t.json().then((s) => {
201
+ if (dr(s))
202
202
  return s;
203
203
  throw Error(s);
204
204
  }));
205
205
  }
206
- const cr = (r) => {
206
+ const ur = (r) => {
207
207
  const t = new URLSearchParams(window.location.search).get("code"), s = window.sessionStorage.getItem(gt);
208
208
  if (!t)
209
209
  throw Error(`Parâmetro 'código' não encontrado na URL.
@@ -222,7 +222,7 @@ A autenticação ocorreu?`);
222
222
  ...r.extraAuthParams
223
223
  };
224
224
  return yt(r.tokenEndpoint, o);
225
- }, lr = (r) => {
225
+ }, hr = (r) => {
226
226
  const { config: e, refreshToken: t } = r, s = {
227
227
  grant_type: "refresh_token",
228
228
  refresh_token: t,
@@ -233,34 +233,34 @@ A autenticação ocorreu?`);
233
233
  };
234
234
  return yt(e.tokenEndpoint, s);
235
235
  };
236
- function dr(r, e, t, s, o, a) {
236
+ function pr(r, e, t, s, o, a) {
237
237
  const c = new URLSearchParams({
238
238
  token: t || e,
239
239
  token_type_hint: t ? "refresh_token" : "access_token",
240
240
  client_id: r.clientId,
241
241
  post_logout_redirect_uri: r.logoutRedirect ?? r.redirectUri,
242
- ui_locales: window.navigator.languages.reduce((i, l) => i + " " + l),
242
+ ui_locales: window.navigator.languages.reduce((i, d) => i + " " + d),
243
243
  ...r.extraLogoutParameters
244
244
  });
245
245
  s && c.append("id_token_hint", s), o && c.append("state", o), a && c.append("logout_hint", a), window.location.replace(`${r.logoutEndpoint}?${c.toString()}`);
246
246
  }
247
- function ur(r) {
247
+ function fr(r) {
248
248
  const e = r.get("state"), t = sessionStorage.getItem(je);
249
249
  if (e !== t)
250
250
  throw new Error(
251
251
  '"state" valor recebido do servidor de autenticação não corresponde à solicitação do cliente. Possível falsificação de solicitação entre sites'
252
252
  );
253
253
  }
254
- function le(r, e, t) {
254
+ function de(r, e, t) {
255
255
  const s = t === "session" ? sessionStorage : localStorage, [o, a] = p(() => {
256
256
  const i = s.getItem(r);
257
257
  try {
258
258
  return i ? JSON.parse(i) : e;
259
- } catch (l) {
259
+ } catch (d) {
260
260
  return console.warn(
261
261
  `Falha ao analisar o valor armazenado para '${r}'.
262
262
  Continuando com o valor padrão.
263
- Error: ${l.message}`
263
+ Error: ${d.message}`
264
264
  ), e;
265
265
  }
266
266
  }), c = (i) => {
@@ -269,27 +269,27 @@ Error: ${l.message}`
269
269
  return;
270
270
  }
271
271
  try {
272
- const l = i instanceof Function ? i(o) : i;
273
- a(l), s.setItem(r, JSON.stringify(l));
272
+ const d = i instanceof Function ? i(o) : i;
273
+ a(d), s.setItem(r, JSON.stringify(d));
274
274
  } catch {
275
275
  console.log(`Falha ao armazenar valor '${i}' para chave '${r}'`);
276
276
  }
277
277
  };
278
- return K(() => {
279
- const i = (l) => {
280
- l.storageArea === s && l.key === r && a(JSON.parse(l.newValue ?? ""));
278
+ return Y(() => {
279
+ const i = (d) => {
280
+ d.storageArea === s && d.key === r && a(JSON.parse(d.newValue ?? ""));
281
281
  };
282
282
  return window.addEventListener("storage", i, !1), () => window.removeEventListener("storage", i, !1);
283
283
  }), [o, c];
284
284
  }
285
- const jr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
285
+ const Wr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
286
286
  __proto__: null,
287
- default: le
287
+ default: de
288
288
  }, Symbol.toStringTag, { value: "Module" }));
289
289
  function Pe(r) {
290
290
  return ["", void 0, null].includes(r);
291
291
  }
292
- function hr(r) {
292
+ function mr(r) {
293
293
  const {
294
294
  autoLogin: e = !0,
295
295
  clearURL: t = !0,
@@ -298,7 +298,7 @@ function hr(r) {
298
298
  preLogin: a = () => null,
299
299
  postLogin: c = () => null,
300
300
  onRefreshTokenExpire: i = void 0,
301
- storage: l = "local"
301
+ storage: d = "local"
302
302
  } = r, y = {
303
303
  ...r,
304
304
  autoLogin: e,
@@ -308,11 +308,11 @@ function hr(r) {
308
308
  preLogin: a,
309
309
  postLogin: c,
310
310
  onRefreshTokenExpire: i,
311
- storage: l
311
+ storage: d
312
312
  };
313
- return pr(y), y;
313
+ return gr(y), y;
314
314
  }
315
- function pr(r) {
315
+ function gr(r) {
316
316
  if (Pe(r?.clientId))
317
317
  throw Error(
318
318
  "'clientId' deve ser definido no objeto 'ArchbaseAuthConfig' passado para ArchbaseAuthProvider"
@@ -337,21 +337,21 @@ function pr(r) {
337
337
  "Usar 'extraAuthParams' e 'extraTokenParameters' não é recomendado. Eles fazem a mesma coisa e você deve usar apenas 'extraTokenParameters'"
338
338
  );
339
339
  }
340
- const me = 600, fe = (r) => Math.round(Date.now() / 1e3 + r);
340
+ const fe = 600, pe = (r) => Math.round(Date.now() / 1e3 + r);
341
341
  function nt(r) {
342
342
  return Math.round(Date.now()) / 1e3 + 30 >= r;
343
343
  }
344
- const fr = [
344
+ const yr = [
345
345
  "refresh_expires_in",
346
346
  // KeyCloak
347
347
  "refresh_token_expires_in"
348
348
  // Azure AD
349
349
  ];
350
- function mr(r, e) {
351
- for (const t of fr)
350
+ function wr(r, e) {
351
+ for (const t of yr)
352
352
  if (t in e)
353
353
  return e[t];
354
- return e.refresh_token ? r + me : r;
354
+ return e.refresh_token ? r + fe : r;
355
355
  }
356
356
  const Te = (r) => {
357
357
  try {
@@ -368,88 +368,88 @@ const Te = (r) => {
368
368
  Você pode desativar a decodificação JWT definindo o valor 'decodeToken' como 'falso' na configuração.`
369
369
  );
370
370
  }
371
- }, gr = Ve({
371
+ }, vr = Ve({
372
372
  token: "",
373
373
  login: () => null,
374
374
  logOut: () => null,
375
375
  error: null,
376
376
  loginInProgress: !1
377
- }), Fr = ({ authConfig: r, children: e }) => {
378
- const t = at(() => hr(r), [r]), [s, o] = le(
377
+ }), Hr = ({ authConfig: r, children: e }) => {
378
+ const t = at(() => mr(r), [r]), [s, o] = de(
379
379
  "ROCP_refreshToken",
380
380
  void 0,
381
381
  t.storage
382
- ), [a, c] = le(
382
+ ), [a, c] = de(
383
383
  "ROCP_refreshTokenExpire",
384
- fe(2 * me),
384
+ pe(2 * fe),
385
385
  t.storage
386
- ), [i, l] = le("ROCP_token", "", t.storage), [y, E] = le(
386
+ ), [i, d] = de("ROCP_token", "", t.storage), [y, S] = de(
387
387
  "ROCP_tokenExpire",
388
- fe(me),
388
+ pe(fe),
389
389
  t.storage
390
- ), [d, R] = le(
390
+ ), [h, U] = de(
391
391
  "ROCP_idToken",
392
392
  void 0,
393
393
  t.storage
394
- ), [A, g] = le(
394
+ ), [A, v] = de(
395
395
  "ROCP_loginInProgress",
396
396
  !1,
397
397
  t.storage
398
- ), [S, D] = le(
398
+ ), [E, I] = de(
399
399
  "ROCP_refreshInProgress",
400
400
  !1,
401
401
  t.storage
402
- ), [N, B] = p(), [W, M] = p(), [b, w] = p(null);
403
- let T;
404
- function z() {
405
- o(void 0), l(""), E(fe(me)), c(fe(me)), R(void 0), B(void 0), M(void 0), g(!1);
406
- }
407
- function O(f, v) {
408
- z(), w(null), t?.logoutEndpoint && dr(t, i, s, d, f, v);
409
- }
410
- function L(f) {
411
- z(), g(!0);
412
- let v = f;
413
- f && typeof f != "string" && (console.warn(
414
- `O estado de login aprovado deve ser do tipo 'string'. Recebido'${f}'. Ignorando o valor...`
415
- ), v = void 0), ir(t, v).catch((ee) => {
416
- console.error(ee), w(ee.message), g(!1);
402
+ ), [M, L] = p(), [V, _] = p(), [b, m] = p(null);
403
+ let R;
404
+ function W() {
405
+ o(void 0), d(""), S(pe(fe)), c(pe(fe)), U(void 0), L(void 0), _(void 0), v(!1);
406
+ }
407
+ function O(g, w) {
408
+ W(), m(null), t?.logoutEndpoint && pr(t, i, s, h, g, w);
409
+ }
410
+ function N(g) {
411
+ W(), v(!0);
412
+ let w = g;
413
+ g && typeof g != "string" && (console.warn(
414
+ `O estado de login aprovado deve ser do tipo 'string'. Recebido'${g}'. Ignorando o valor...`
415
+ ), w = void 0), lr(t, w).catch((J) => {
416
+ console.error(J), m(J.message), v(!1);
417
417
  });
418
418
  }
419
- function U(f) {
420
- l(f.access_token), o(f.refresh_token);
421
- const v = t.tokenExpiresIn ?? f.expires_in ?? me;
422
- E(fe(v));
423
- const ee = t.refreshTokenExpiresIn ?? mr(v, f);
424
- c(fe(ee)), R(f.id_token);
419
+ function P(g) {
420
+ d(g.access_token), o(g.refresh_token);
421
+ const w = t.tokenExpiresIn ?? g.expires_in ?? fe;
422
+ S(pe(w));
423
+ const J = t.refreshTokenExpiresIn ?? wr(w, g);
424
+ c(pe(J)), U(g.id_token);
425
425
  try {
426
- f.id_token && M(Te(f.id_token));
427
- } catch (I) {
428
- console.warn(`Falha ao decodificar idToken: ${I.message}`);
426
+ g.id_token && _(Te(g.id_token));
427
+ } catch (H) {
428
+ console.warn(`Falha ao decodificar idToken: ${H.message}`);
429
429
  }
430
430
  try {
431
- t.decodeToken && B(Te(f.access_token));
432
- } catch (I) {
433
- console.warn(`Falha ao decodificar o token de acesso: ${I.message}`);
431
+ t.decodeToken && L(Te(g.access_token));
432
+ } catch (H) {
433
+ console.warn(`Falha ao decodificar o token de acesso: ${H.message}`);
434
434
  }
435
435
  }
436
- function Z(f = !1) {
437
- return f || !t.onRefreshTokenExpire ? L() : t.onRefreshTokenExpire({ login: L });
436
+ function ee(g = !1) {
437
+ return g || !t.onRefreshTokenExpire ? N() : t.onRefreshTokenExpire({ login: N });
438
438
  }
439
- function q(f = !1) {
440
- if (i && nt(y) && !(S && !f)) {
439
+ function te(g = !1) {
440
+ if (i && nt(y) && !(E && !g)) {
441
441
  if (nt(a))
442
- return Z(f);
442
+ return ee(g);
443
443
  if (s) {
444
- D(!0), lr({ config: t, refreshToken: s }).then((v) => U(v)).catch((v) => {
445
- if (v instanceof mt) {
446
- if (v.status === 400)
447
- return Z(f);
448
- console.error(v), w(v.message), f && L();
444
+ I(!0), hr({ config: t, refreshToken: s }).then((w) => P(w)).catch((w) => {
445
+ if (w instanceof mt) {
446
+ if (w.status === 400)
447
+ return ee(g);
448
+ console.error(w), m(w.message), g && N();
449
449
  } else
450
- v instanceof Error && (console.error(v), w(v.message), f && L());
450
+ w instanceof Error && (console.error(w), m(w.message), g && N());
451
451
  }).finally(() => {
452
- D(!1);
452
+ I(!1);
453
453
  });
454
454
  return;
455
455
  }
@@ -458,50 +458,50 @@ const Te = (r) => {
458
458
  );
459
459
  }
460
460
  }
461
- K(() => (T = setInterval(() => q(), 1e4), () => clearInterval(T)), [i, s, a, y]);
462
- const re = ct(!1);
463
- return K(() => {
461
+ Y(() => (R = setInterval(() => te(), 1e4), () => clearInterval(R)), [i, s, a, y]);
462
+ const se = ct(!1);
463
+ return Y(() => {
464
464
  if (A) {
465
- const f = new URLSearchParams(window.location.search);
466
- if (!f.get("code")) {
467
- const v = f.get("error_description") || "Estado de autorização inválido. Atualizar a página pode resolver o problema.";
468
- console.error(v), w(v), O();
465
+ const g = new URLSearchParams(window.location.search);
466
+ if (!g.get("code")) {
467
+ const w = g.get("error_description") || "Estado de autorização inválido. Atualizar a página pode resolver o problema.";
468
+ console.error(w), m(w), O();
469
469
  return;
470
470
  }
471
- if (!re.current) {
472
- re.current = !0;
471
+ if (!se.current) {
472
+ se.current = !0;
473
473
  try {
474
- ur(f);
475
- } catch (v) {
476
- console.error(v), w(v.message);
474
+ fr(g);
475
+ } catch (w) {
476
+ console.error(w), m(w.message);
477
477
  }
478
- cr(t).then((v) => {
479
- U(v), t?.postLogin && t.postLogin();
480
- }).catch((v) => {
481
- console.error(v), w(v.message);
478
+ ur(t).then((w) => {
479
+ P(w), t?.postLogin && t.postLogin();
480
+ }).catch((w) => {
481
+ console.error(w), m(w.message);
482
482
  }).finally(() => {
483
- t.clearURL && window.history.replaceState(null, "", window.location.pathname), g(!1);
483
+ t.clearURL && window.history.replaceState(null, "", window.location.pathname), v(!1);
484
484
  });
485
485
  }
486
486
  return;
487
487
  }
488
488
  if (!i && t.autoLogin)
489
- return L();
489
+ return N();
490
490
  try {
491
- d && M(Te(d));
492
- } catch (f) {
493
- console.warn(`Falha ao decodificar idToken: ${f.message}`);
491
+ h && _(Te(h));
492
+ } catch (g) {
493
+ console.warn(`Falha ao decodificar idToken: ${g.message}`);
494
494
  }
495
495
  try {
496
- t.decodeToken && B(Te(i));
497
- } catch (f) {
498
- console.warn(`Falha ao decodificar o token de acesso: ${f.message}`);
496
+ t.decodeToken && L(Te(i));
497
+ } catch (g) {
498
+ console.warn(`Falha ao decodificar o token de acesso: ${g.message}`);
499
499
  }
500
- q(!0);
500
+ te(!0);
501
501
  }, []), /* @__PURE__ */ n(
502
- gr.Provider,
502
+ vr.Provider,
503
503
  {
504
- value: { token: i, tokenData: N, idToken: d, idTokenData: W, login: L, logOut: O, error: b, loginInProgress: A },
504
+ value: { token: i, tokenData: M, idToken: h, idTokenData: V, login: N, logOut: O, error: b, loginInProgress: A },
505
505
  children: e
506
506
  }
507
507
  );
@@ -515,7 +515,7 @@ class wt {
515
515
  error;
516
516
  isAdmin;
517
517
  constructor(e, t, s) {
518
- this.resourceService = zt.getContainer().get(Y.Resource), this.resource = { resourceName: e, resourceDescription: t }, this.alreadyApplied = !1, this.actions = [], this.permissions = [], this.error = "", this.isAdmin = s;
518
+ this.resourceService = zt.getContainer().get(X.Resource), this.resource = { resourceName: e, resourceDescription: t }, this.alreadyApplied = !1, this.actions = [], this.permissions = [], this.error = "", this.isAdmin = s;
519
519
  }
520
520
  registerAction(e, t) {
521
521
  !this.alreadyApplied && this.actions.findIndex((s) => s.actionName === e) < 0 && this.actions.push({ actionName: e, actionDescription: t });
@@ -524,7 +524,7 @@ class wt {
524
524
  this.alreadyApplied || (this.alreadyApplied = !0, this.resourceService.registerResource({ resource: this.resource, actions: this.actions }).then((t) => {
525
525
  this.permissions = t.permissions, this.error = "", e && e();
526
526
  }).catch((t) => {
527
- this.alreadyApplied = !1, this.error = oe(t);
527
+ this.alreadyApplied = !1, this.error = ne(t);
528
528
  }));
529
529
  }
530
530
  hasPermission(e) {
@@ -586,7 +586,7 @@ class wt {
586
586
  return [...this.actions];
587
587
  }
588
588
  }
589
- class J {
589
+ class q {
590
590
  static instance;
591
591
  _currentTenant = new Ze(null);
592
592
  _availableTenants = new Ze([]);
@@ -600,7 +600,7 @@ class J {
600
600
  }
601
601
  }
602
602
  static getInstance() {
603
- return J.instance || (J.instance = new J()), J.instance;
603
+ return q.instance || (q.instance = new q()), q.instance;
604
604
  }
605
605
  get currentTenant$() {
606
606
  return this._currentTenant.asObservable();
@@ -629,14 +629,14 @@ class J {
629
629
  return t && (e["X-TENANT-ID"] = t.id), e;
630
630
  }
631
631
  }
632
- function Vr() {
633
- return J.getInstance();
632
+ function Gr() {
633
+ return q.getInstance();
634
634
  }
635
- var ge = /* @__PURE__ */ ((r) => (r.USER = "user", r.PROFILE = "profile", r.GROUP = "group", r))(ge || {}), yr = Object.defineProperty, k = (r, e, t, s) => {
635
+ var me = /* @__PURE__ */ ((r) => (r.USER = "user", r.PROFILE = "profile", r.GROUP = "group", r))(me || {}), br = Object.defineProperty, k = (r, e, t, s) => {
636
636
  for (var o = void 0, a = r.length - 1, c; a >= 0; a--)
637
637
  (c = r[a]) && (o = c(e, t, o) || o);
638
- return o && yr(e, t, o), o;
639
- }, wr = /* @__PURE__ */ ((r) => (r.VIEW = "VIEW", r.API = "API", r))(wr || {});
638
+ return o && br(e, t, o), o;
639
+ }, Ar = /* @__PURE__ */ ((r) => (r.VIEW = "VIEW", r.API = "API", r))(Ar || {});
640
640
  const vt = class bt {
641
641
  id;
642
642
  code;
@@ -648,15 +648,15 @@ const vt = class bt {
648
648
  description;
649
649
  intervals;
650
650
  constructor(e) {
651
- this.id = e.id || "", this.code = e.code || "", this.version = e.version || 0, this.createEntityDate = e.createEntityDate || "", this.updateEntityDate = e.updateEntityDate || "", this.createdByUser = e.createdByUser || "", this.lastModifiedByUser = e.lastModifiedByUser || "", this.description = e.description || "", this.intervals = e.intervals ? e.intervals.map((t) => new vr(t)) : [];
651
+ this.id = e.id || "", this.code = e.code || "", this.version = e.version || 0, this.createEntityDate = e.createEntityDate || "", this.updateEntityDate = e.updateEntityDate || "", this.createdByUser = e.createdByUser || "", this.lastModifiedByUser = e.lastModifiedByUser || "", this.description = e.description || "", this.intervals = e.intervals ? e.intervals.map((t) => new Er(t)) : [];
652
652
  }
653
653
  static newInstance = () => new bt({
654
- id: Q(),
654
+ id: Z(),
655
655
  intervals: []
656
656
  });
657
657
  };
658
658
  k([
659
- X({
659
+ Q({
660
660
  message: "archbase:Informe a descrição do cronograma de acesso"
661
661
  })
662
662
  ], vt.prototype, "description");
@@ -677,27 +677,27 @@ const _e = class Et {
677
677
  this.id = e.id || "", this.code = e.code || "", this.version = e.version || 0, this.createEntityDate = e.createEntityDate || (/* @__PURE__ */ new Date()).toISOString(), this.updateEntityDate = e.updateEntityDate || (/* @__PURE__ */ new Date()).toISOString(), this.createdByUser = e.createdByUser || "", this.lastModifiedByUser = e.lastModifiedByUser || "", this.accessSchedule = e.accessSchedule ? new At(e.accessSchedule) : void 0, this.dayOfWeek = e.dayOfWeek || 0, this.startTime = e.startTime || "", this.endTime = e.endTime || "";
678
678
  }
679
679
  static newInstance = () => new Et({
680
- id: Q(),
680
+ id: Z(),
681
681
  dayOfWeek: (/* @__PURE__ */ new Date()).getDay(),
682
682
  startTime: "08:00",
683
683
  endTime: "17:00"
684
684
  });
685
685
  };
686
686
  k([
687
- ie()
687
+ ae()
688
688
  ], _e.prototype, "accessSchedule");
689
689
  k([
690
- X({
690
+ Q({
691
691
  message: "archbase:Informe a hora de início"
692
692
  })
693
693
  ], _e.prototype, "startTime");
694
694
  k([
695
- X({
695
+ Q({
696
696
  message: "archbase:Informe a hora de término"
697
697
  })
698
698
  ], _e.prototype, "endTime");
699
- let vr = _e;
700
- class we {
699
+ let Er = _e;
700
+ class ye {
701
701
  id;
702
702
  code;
703
703
  version;
@@ -713,19 +713,19 @@ class we {
713
713
  }
714
714
  }
715
715
  k([
716
- X({
716
+ Q({
717
717
  message: "archbase:Informe o nome"
718
718
  })
719
- ], we.prototype, "name");
719
+ ], ye.prototype, "name");
720
720
  k([
721
- X({
721
+ Q({
722
722
  message: "archbase:Informe a descrição"
723
723
  })
724
- ], we.prototype, "description");
724
+ ], ye.prototype, "description");
725
725
  k([
726
- ie()
727
- ], we.prototype, "actions");
728
- const ve = class xt {
726
+ ae()
727
+ ], ye.prototype, "actions");
728
+ const we = class xt {
729
729
  id;
730
730
  code;
731
731
  version;
@@ -744,41 +744,41 @@ const ve = class xt {
744
744
  this.id = e.id || "", this.code = e.code || "", this.version = e.version || 0, this.createEntityDate = e.createEntityDate || (/* @__PURE__ */ new Date()).toISOString(), this.updateEntityDate = e.updateEntityDate || (/* @__PURE__ */ new Date()).toISOString(), this.createdByUser = e.createdByUser || "", this.lastModifiedByUser = e.lastModifiedByUser || "", this.name = e.name || "", this.description = e.description || "", this.resource = e.resource ? new St(e.resource) : void 0, this.category = e.category || "", this.active = e.active || !1, this.actionVersion = e.actionVersion || "", this.isNewAction = e.isNewAction || !1;
745
745
  }
746
746
  static newInstance = () => new xt({
747
- id: Q(),
747
+ id: Z(),
748
748
  active: !0,
749
749
  isNewAction: !0
750
750
  });
751
751
  };
752
752
  k([
753
- X({
753
+ Q({
754
754
  message: "archbase:Informe o nome para a ação"
755
755
  })
756
- ], ve.prototype, "name");
756
+ ], we.prototype, "name");
757
757
  k([
758
- X({
758
+ Q({
759
759
  message: "archbase:Informe a descrição para a ação"
760
760
  })
761
- ], ve.prototype, "description");
761
+ ], we.prototype, "description");
762
762
  k([
763
- ie()
764
- ], ve.prototype, "resource");
763
+ ae()
764
+ ], we.prototype, "resource");
765
765
  k([
766
- X({
766
+ Q({
767
767
  message: "archbase:Informe a categoria para a ação"
768
768
  })
769
- ], ve.prototype, "category");
769
+ ], we.prototype, "category");
770
770
  k([
771
- te()
772
- ], ve.prototype, "active");
773
- let br = ve;
774
- class ke extends we {
771
+ re()
772
+ ], we.prototype, "active");
773
+ let xr = we;
774
+ class ke extends ye {
775
775
  type;
776
776
  isNewProfile;
777
777
  constructor(e) {
778
- super(e), this.type = ge.PROFILE, this.isNewProfile = e.isNewProfile || !1;
778
+ super(e), this.type = me.PROFILE, this.isNewProfile = e.isNewProfile || !1;
779
779
  }
780
780
  static newInstance = () => new ke({
781
- id: Q(),
781
+ id: Z(),
782
782
  isNewProfile: !0
783
783
  });
784
784
  }
@@ -795,18 +795,18 @@ class Ge {
795
795
  this.id = e.id, this.code = e.code || "", this.version = e.version || 0, this.createEntityDate = e.createEntityDate || (/* @__PURE__ */ new Date()).toISOString(), this.updateEntityDate = e.updateEntityDate || (/* @__PURE__ */ new Date()).toISOString(), this.createdByUser = e.createdByUser || "", this.lastModifiedByUser = e.lastModifiedByUser || "", this.group = e.group ? new Se(e.group) : void 0;
796
796
  }
797
797
  static newInstance = (e) => new Ge({
798
- id: Q(),
798
+ id: Z(),
799
799
  group: e
800
800
  });
801
801
  }
802
- class Se extends we {
802
+ class Se extends ye {
803
803
  type;
804
804
  isNewGroup;
805
805
  constructor(e) {
806
- super(e), this.type = ge.GROUP, this.isNewGroup = e.isNewGroup || !1;
806
+ super(e), this.type = me.GROUP, this.isNewGroup = e.isNewGroup || !1;
807
807
  }
808
808
  static newInstance = () => new Se({
809
- id: Q(),
809
+ id: Z(),
810
810
  isNewGroup: !0
811
811
  });
812
812
  }
@@ -828,27 +828,27 @@ const Re = class kt {
828
828
  this.id = e.id || "", this.code = e.code || "", this.version = e.version || 0, this.createEntityDate = e.createEntityDate || "", this.updateEntityDate = e.updateEntityDate || "", this.createdByUser = e.createdByUser || "", this.lastModifiedByUser = e.lastModifiedByUser || "", this.name = e.name || "", this.description = e.description || "", this.actions = e.actions || [], this.active = e.active || !1, this.type = e.type || "VIEW", this.isNewResource = e.isNewResource || !1;
829
829
  }
830
830
  static newInstance = () => new kt({
831
- id: Q(),
831
+ id: Z(),
832
832
  actions: [],
833
833
  active: !0,
834
834
  isNewResource: !0
835
835
  });
836
836
  };
837
837
  k([
838
- X({
838
+ Q({
839
839
  message: "archbase:Informe o nome para o recurso"
840
840
  })
841
841
  ], Re.prototype, "name");
842
842
  k([
843
- X({
843
+ Q({
844
844
  message: "archbase:Informe a descrição para o recurso"
845
845
  })
846
846
  ], Re.prototype, "description");
847
847
  k([
848
- te()
848
+ re()
849
849
  ], Re.prototype, "active");
850
850
  let St = Re;
851
- const V = class Ct extends we {
851
+ const F = class Ct extends ye {
852
852
  userName;
853
853
  password;
854
854
  changePasswordOnNextLogin;
@@ -869,10 +869,10 @@ const V = class Ct extends we {
869
869
  type;
870
870
  isNewUser;
871
871
  constructor(e) {
872
- super(e), this.type = ge.USER, this.userName = e.userName || "", this.password = e.password || "", this.changePasswordOnNextLogin = e.changePasswordOnNextLogin || !1, this.allowPasswordChange = e.allowPasswordChange || !1, this.allowMultipleLogins = e.allowMultipleLogins || !1, this.passwordNeverExpires = e.passwordNeverExpires || !1, this.passwordChangedAt = e.passwordChangedAt || void 0, this.accountDeactivated = e.accountDeactivated || !1, this.accountLocked = e.accountLocked || !1, this.unlimitedAccessHours = e.unlimitedAccessHours || !1, this.isAdministrator = e.isAdministrator || !1, this.accessSchedule = e.accessSchedule ? new At(e.accessSchedule) : void 0, this.groups = e.groups ? e.groups.map((t) => new Ge(t)) : [], this.profile = e.profile ? new ke(e.profile) : void 0, this.email = e.email || "", this.avatar = e.avatar || void 0, this.isNewUser = e.isNewUser || !1, this.nickname = e.nickname;
872
+ super(e), this.type = me.USER, this.userName = e.userName || "", this.password = e.password || "", this.changePasswordOnNextLogin = e.changePasswordOnNextLogin || !1, this.allowPasswordChange = e.allowPasswordChange || !1, this.allowMultipleLogins = e.allowMultipleLogins || !1, this.passwordNeverExpires = e.passwordNeverExpires || !1, this.passwordChangedAt = e.passwordChangedAt || void 0, this.accountDeactivated = e.accountDeactivated || !1, this.accountLocked = e.accountLocked || !1, this.unlimitedAccessHours = e.unlimitedAccessHours || !1, this.isAdministrator = e.isAdministrator || !1, this.accessSchedule = e.accessSchedule ? new At(e.accessSchedule) : void 0, this.groups = e.groups ? e.groups.map((t) => new Ge(t)) : [], this.profile = e.profile ? new ke(e.profile) : void 0, this.email = e.email || "", this.avatar = e.avatar || void 0, this.isNewUser = e.isNewUser || !1, this.nickname = e.nickname;
873
873
  }
874
874
  static newInstance = () => new Ct({
875
- id: Q(),
875
+ id: Z(),
876
876
  userName: "",
877
877
  password: "",
878
878
  groups: [],
@@ -884,46 +884,46 @@ const V = class Ct extends we {
884
884
  });
885
885
  };
886
886
  k([
887
- X({
887
+ Q({
888
888
  message: "archbase:Informe o nome de usuário"
889
889
  })
890
- ], V.prototype, "userName");
890
+ ], F.prototype, "userName");
891
891
  k([
892
- te()
893
- ], V.prototype, "changePasswordOnNextLogin");
892
+ re()
893
+ ], F.prototype, "changePasswordOnNextLogin");
894
894
  k([
895
- te()
896
- ], V.prototype, "allowPasswordChange");
895
+ re()
896
+ ], F.prototype, "allowPasswordChange");
897
897
  k([
898
- te()
899
- ], V.prototype, "allowMultipleLogins");
898
+ re()
899
+ ], F.prototype, "allowMultipleLogins");
900
900
  k([
901
- te()
902
- ], V.prototype, "passwordNeverExpires");
901
+ re()
902
+ ], F.prototype, "passwordNeverExpires");
903
903
  k([
904
- ie()
905
- ], V.prototype, "passwordChangedAt");
904
+ ae()
905
+ ], F.prototype, "passwordChangedAt");
906
906
  k([
907
- te()
908
- ], V.prototype, "accountDeactivated");
907
+ re()
908
+ ], F.prototype, "accountDeactivated");
909
909
  k([
910
- te()
911
- ], V.prototype, "accountLocked");
910
+ re()
911
+ ], F.prototype, "accountLocked");
912
912
  k([
913
- te()
914
- ], V.prototype, "unlimitedAccessHours");
913
+ re()
914
+ ], F.prototype, "unlimitedAccessHours");
915
915
  k([
916
- te()
917
- ], V.prototype, "isAdministrator");
916
+ re()
917
+ ], F.prototype, "isAdministrator");
918
918
  k([
919
- ie()
920
- ], V.prototype, "accessSchedule");
919
+ ae()
920
+ ], F.prototype, "accessSchedule");
921
921
  k([
922
- ie()
923
- ], V.prototype, "groups");
922
+ ae()
923
+ ], F.prototype, "groups");
924
924
  k([
925
- ie()
926
- ], V.prototype, "profile");
925
+ ae()
926
+ ], F.prototype, "profile");
927
927
  k([
928
928
  jt(
929
929
  {},
@@ -931,8 +931,8 @@ k([
931
931
  message: "archbase:Informe um email válido"
932
932
  }
933
933
  )
934
- ], V.prototype, "email");
935
- let Ne = V;
934
+ ], F.prototype, "email");
935
+ let Me = F;
936
936
  const Je = class Fe {
937
937
  id;
938
938
  code;
@@ -947,7 +947,7 @@ const Je = class Fe {
947
947
  companyId;
948
948
  projectId;
949
949
  constructor(e) {
950
- this.id = e.id || "", this.code = e.code || "", this.version = e.version || 0, this.createEntityDate = e.createEntityDate || "", this.updateEntityDate = e.updateEntityDate || "", this.createdByUser = e.createdByUser || "", this.lastModifiedByUser = e.lastModifiedByUser || "", this.security = e.security ? Fe.createDtoFromJson(e.security) : void 0, this.action = e.action ? new br(e.action) : void 0, this.tenantId = e.tenantId || "", this.companyId = e.companyId || "", this.projectId = e.projectId || "";
950
+ this.id = e.id || "", this.code = e.code || "", this.version = e.version || 0, this.createEntityDate = e.createEntityDate || "", this.updateEntityDate = e.updateEntityDate || "", this.createdByUser = e.createdByUser || "", this.lastModifiedByUser = e.lastModifiedByUser || "", this.security = e.security ? Fe.createDtoFromJson(e.security) : void 0, this.action = e.action ? new xr(e.action) : void 0, this.tenantId = e.tenantId || "", this.companyId = e.companyId || "", this.projectId = e.projectId || "";
951
951
  }
952
952
  static createDtoFromJson(e) {
953
953
  switch (e.type) {
@@ -956,25 +956,25 @@ const Je = class Fe {
956
956
  case "group":
957
957
  return new Se(e);
958
958
  case "user":
959
- return new Ne(e);
959
+ return new Me(e);
960
960
  default:
961
961
  throw new Error("Unknown DTO type");
962
962
  }
963
963
  }
964
964
  static newInstance = () => new Fe({
965
- id: Q(),
965
+ id: Z(),
966
966
  tenantId: "",
967
967
  companyId: "",
968
968
  projectId: ""
969
969
  });
970
970
  };
971
971
  k([
972
- ie()
972
+ ae()
973
973
  ], Je.prototype, "security");
974
974
  k([
975
- ie()
975
+ ae()
976
976
  ], Je.prototype, "action");
977
- let Wr = Je;
977
+ let Jr = Je;
978
978
  class Ke {
979
979
  id;
980
980
  code;
@@ -993,10 +993,10 @@ class Ke {
993
993
  activated;
994
994
  isNovoToken;
995
995
  constructor(e) {
996
- this.id = e.id || "", this.code = e.code || "", this.version = e.version || 0, this.createEntityDate = e.createEntityDate || "", this.updateEntityDate = e.updateEntityDate || "", this.createdByUser = e.createdByUser || "", this.lastModifiedByUser = e.lastModifiedByUser || "", this.tenantId = e.tenantId || "", this.user = e.user ? new Ne(e.user) : void 0, this.name = e.name || "", this.description = e.description || "", this.token = e.token || "", this.expirationDate = e.expirationDate, this.revoked = e.revoked, this.activated = e.activated || !1;
996
+ this.id = e.id || "", this.code = e.code || "", this.version = e.version || 0, this.createEntityDate = e.createEntityDate || "", this.updateEntityDate = e.updateEntityDate || "", this.createdByUser = e.createdByUser || "", this.lastModifiedByUser = e.lastModifiedByUser || "", this.tenantId = e.tenantId || "", this.user = e.user ? new Me(e.user) : void 0, this.name = e.name || "", this.description = e.description || "", this.token = e.token || "", this.expirationDate = e.expirationDate, this.revoked = e.revoked, this.activated = e.activated || !1;
997
997
  }
998
998
  static newInstance = () => new Ke({
999
- id: Q()
999
+ id: Z()
1000
1000
  });
1001
1001
  }
1002
1002
  class qe {
@@ -1016,23 +1016,23 @@ class qe {
1016
1016
  user;
1017
1017
  isNewAccessToken;
1018
1018
  constructor(e) {
1019
- this.id = e.id || "", this.code = e.code || "", this.version = e.version || 0, this.createEntityDate = e.createEntityDate || (/* @__PURE__ */ new Date()).toISOString(), this.updateEntityDate = e.updateEntityDate || (/* @__PURE__ */ new Date()).toISOString(), this.createdByUser = e.createdByUser || "", this.lastModifiedByUser = e.lastModifiedByUser || "", this.token = e.token || "", this.tokenType = e.tokenType || void 0, this.user = e.user ? new Ne(e.user) : void 0, this.revoked = e.revoked || !1, this.expired = e.expired || !1, this.expirationTime = e.expirationTime || 0, this.expirationDate = e.expirationDate || "", this.isNewAccessToken = e.isNewAccessToken || !1;
1019
+ this.id = e.id || "", this.code = e.code || "", this.version = e.version || 0, this.createEntityDate = e.createEntityDate || (/* @__PURE__ */ new Date()).toISOString(), this.updateEntityDate = e.updateEntityDate || (/* @__PURE__ */ new Date()).toISOString(), this.createdByUser = e.createdByUser || "", this.lastModifiedByUser = e.lastModifiedByUser || "", this.token = e.token || "", this.tokenType = e.tokenType || void 0, this.user = e.user ? new Me(e.user) : void 0, this.revoked = e.revoked || !1, this.expired = e.expired || !1, this.expirationTime = e.expirationTime || 0, this.expirationDate = e.expirationDate || "", this.isNewAccessToken = e.isNewAccessToken || !1;
1020
1020
  }
1021
1021
  static newInstance = () => new qe({
1022
- id: Q(),
1022
+ id: Z(),
1023
1023
  active: !0,
1024
1024
  isNewAccessToken: !0
1025
1025
  });
1026
1026
  }
1027
- class It extends ye {
1027
+ class It extends ge {
1028
1028
  constructor(e) {
1029
1029
  super(e);
1030
1030
  }
1031
1031
  configureHeaders() {
1032
- return J.getInstance().getHeaders();
1032
+ return q.getInstance().getHeaders();
1033
1033
  }
1034
1034
  transform(e) {
1035
- return new Ne(e);
1035
+ return new Me(e);
1036
1036
  }
1037
1037
  getEndpoint() {
1038
1038
  return "/api/v1/user";
@@ -1051,14 +1051,14 @@ class It extends ye {
1051
1051
  return this.transform(t);
1052
1052
  }
1053
1053
  }
1054
- P.decorate(P.inject(Y.ApiClient), It, 0);
1055
- P.decorate(P.injectable(), It);
1056
- class Pt extends ye {
1054
+ T.decorate(T.inject(X.ApiClient), It, 0);
1055
+ T.decorate(T.injectable(), It);
1056
+ class Pt extends ge {
1057
1057
  constructor(e) {
1058
1058
  super(e);
1059
1059
  }
1060
1060
  configureHeaders() {
1061
- return J.getInstance().getHeaders();
1061
+ return q.getInstance().getHeaders();
1062
1062
  }
1063
1063
  transform(e) {
1064
1064
  return new Se(e);
@@ -1073,14 +1073,14 @@ class Pt extends ye {
1073
1073
  return e.isNewGroup;
1074
1074
  }
1075
1075
  }
1076
- P.decorate(P.inject(Y.ApiClient), Pt, 0);
1077
- P.decorate(P.injectable(), Pt);
1078
- class Tt extends ye {
1076
+ T.decorate(T.inject(X.ApiClient), Pt, 0);
1077
+ T.decorate(T.injectable(), Pt);
1078
+ class Tt extends ge {
1079
1079
  constructor(e) {
1080
1080
  super(e);
1081
1081
  }
1082
1082
  configureHeaders() {
1083
- return J.getInstance().getHeaders();
1083
+ return q.getInstance().getHeaders();
1084
1084
  }
1085
1085
  transform(e) {
1086
1086
  return new ke(e);
@@ -1095,14 +1095,14 @@ class Tt extends ye {
1095
1095
  return e.isNewProfile;
1096
1096
  }
1097
1097
  }
1098
- P.decorate(P.inject(Y.ApiClient), Tt, 0);
1099
- P.decorate(P.injectable(), Tt);
1100
- class Ut extends ye {
1098
+ T.decorate(T.inject(X.ApiClient), Tt, 0);
1099
+ T.decorate(T.injectable(), Tt);
1100
+ class Ut extends ge {
1101
1101
  constructor(e) {
1102
1102
  super(e);
1103
1103
  }
1104
1104
  configureHeaders() {
1105
- return J.getInstance().getHeaders();
1105
+ return q.getInstance().getHeaders();
1106
1106
  }
1107
1107
  transform(e) {
1108
1108
  return new Ke(e);
@@ -1132,14 +1132,14 @@ class Ut extends ye {
1132
1132
  );
1133
1133
  }
1134
1134
  }
1135
- P.decorate(P.inject(Y.ApiClient), Ut, 0);
1136
- P.decorate(P.injectable(), Ut);
1137
- class Dt extends ye {
1135
+ T.decorate(T.inject(X.ApiClient), Ut, 0);
1136
+ T.decorate(T.injectable(), Ut);
1137
+ class Dt extends ge {
1138
1138
  constructor(e) {
1139
1139
  super(e);
1140
1140
  }
1141
1141
  configureHeaders() {
1142
- return J.getInstance().getHeaders();
1142
+ return q.getInstance().getHeaders();
1143
1143
  }
1144
1144
  transform(e) {
1145
1145
  return new qe(e);
@@ -1161,14 +1161,14 @@ class Dt extends ye {
1161
1161
  );
1162
1162
  }
1163
1163
  }
1164
- P.decorate(P.inject(Y.ApiClient), Dt, 0);
1165
- P.decorate(P.injectable(), Dt);
1166
- class _t extends ye {
1164
+ T.decorate(T.inject(X.ApiClient), Dt, 0);
1165
+ T.decorate(T.injectable(), Dt);
1166
+ class _t extends ge {
1167
1167
  constructor(e) {
1168
1168
  super(e);
1169
1169
  }
1170
1170
  configureHeaders() {
1171
- return J.getInstance().getHeaders();
1171
+ return q.getInstance().getHeaders();
1172
1172
  }
1173
1173
  transform(e) {
1174
1174
  return new St(e);
@@ -1195,7 +1195,7 @@ class _t extends ye {
1195
1195
  !1,
1196
1196
  {
1197
1197
  params: {
1198
- type: Qe(ge, t)
1198
+ type: Qe(me, t)
1199
1199
  }
1200
1200
  }
1201
1201
  );
@@ -1206,7 +1206,7 @@ class _t extends ye {
1206
1206
  {
1207
1207
  securityId: e,
1208
1208
  actionId: t,
1209
- type: Qe(ge, s)
1209
+ type: Qe(me, s)
1210
1210
  },
1211
1211
  this.configureHeaders()
1212
1212
  );
@@ -1225,9 +1225,9 @@ class _t extends ye {
1225
1225
  );
1226
1226
  }
1227
1227
  }
1228
- P.decorate(P.inject(Y.ApiClient), _t, 0);
1229
- P.decorate(P.injectable(), _t);
1230
- function Hr({
1228
+ T.decorate(T.inject(X.ApiClient), _t, 0);
1229
+ T.decorate(T.injectable(), _t);
1230
+ function Kr({
1231
1231
  onLogin: r,
1232
1232
  error: e,
1233
1233
  onClickForgotPassword: t,
@@ -1236,57 +1236,57 @@ function Hr({
1236
1236
  afterInputs: a,
1237
1237
  showMockUsersSelector: c = !1,
1238
1238
  mockUsers: i = [],
1239
- mockUsersGroupMap: l,
1239
+ mockUsersGroupMap: d,
1240
1240
  options: y = {},
1241
- onChangeUsername: E,
1242
- disabledLogin: d = !1,
1243
- isCheckingUsername: R = !1,
1241
+ onChangeUsername: S,
1242
+ disabledLogin: h = !1,
1243
+ isCheckingUsername: U = !1,
1244
1244
  showSignIn: A = !0,
1245
- mfaRequired: g = !1,
1246
- onVerifyMfa: S,
1247
- mfaError: D,
1248
- onCancelMfa: N,
1249
- isVerifyingMfa: B = !1
1245
+ mfaRequired: v = !1,
1246
+ onVerifyMfa: E,
1247
+ mfaError: I,
1248
+ onCancelMfa: M,
1249
+ isVerifyingMfa: L = !1
1250
1250
  }) {
1251
- const W = ut(), {
1252
- username: M,
1251
+ const V = ut(), {
1252
+ username: _,
1253
1253
  password: b,
1254
- rememberMe: w,
1255
- clearRememberMe: T
1256
- } = Ft(), [z, O] = p(M), [L, U] = p(b), [Z, q] = p(w), [re, f] = p(!1), [v, ee] = p(null), [I, he] = p("");
1257
- K(() => {
1258
- f(!!e);
1259
- }, [e]), K(() => {
1260
- M !== z && (O(M), E?.(M)), b !== L && U(b), w !== Z && q(w);
1261
- }, [M, b, w]);
1262
- const se = () => {
1263
- f(!1);
1264
- }, be = () => {
1265
- z && L && r(z, L, Z).finally(() => f(!0));
1266
- }, ae = () => {
1267
- const h = I.trim();
1268
- h && S && S(h);
1269
- }, ue = () => {
1270
- if (!l)
1271
- return i.map((m) => ({
1272
- value: m.email,
1273
- label: m.email
1254
+ rememberMe: m,
1255
+ clearRememberMe: R
1256
+ } = Ft(), [W, O] = p(_), [N, P] = p(b), [ee, te] = p(m), [se, g] = p(!1), [w, J] = p(null), [H, ve] = p("");
1257
+ Y(() => {
1258
+ g(!!e);
1259
+ }, [e]), Y(() => {
1260
+ _ !== W && (O(_), S?.(_)), b !== N && P(b), m !== ee && te(m);
1261
+ }, [_, b, m]);
1262
+ const he = () => {
1263
+ g(!1);
1264
+ }, B = () => {
1265
+ W && N && r(W, N, ee).finally(() => g(!0));
1266
+ }, ce = () => {
1267
+ const l = H.trim();
1268
+ l && E && E(l);
1269
+ }, oe = () => {
1270
+ if (!d)
1271
+ return i.map((f) => ({
1272
+ value: f.email,
1273
+ label: f.email
1274
1274
  }));
1275
- const h = i.reduce((m, _) => {
1276
- const j = l[_.type];
1277
- return j && (m[j] || (m[j] = []), m[j].push({
1278
- value: _.email,
1279
- label: _.email
1280
- })), m;
1275
+ const l = i.reduce((f, D) => {
1276
+ const z = d[D.type];
1277
+ return z && (f[z] || (f[z] = []), f[z].push({
1278
+ value: D.email,
1279
+ label: D.email
1280
+ })), f;
1281
1281
  }, {});
1282
- return Object.entries(h).map(([m, _]) => ({
1283
- group: m,
1284
- items: _
1282
+ return Object.entries(l).map(([f, D]) => ({
1283
+ group: f,
1284
+ items: D
1285
1285
  }));
1286
- }, pe = () => {
1287
- if (v) {
1288
- const h = i.find((m) => m.email === v);
1289
- h && (O(h.email), U(h.password), se());
1286
+ }, be = () => {
1287
+ if (w) {
1288
+ const l = i.find((f) => f.email === w);
1289
+ l && (O(l.email), P(l.password), he());
1290
1290
  }
1291
1291
  }, u = {
1292
1292
  withBorder: !0,
@@ -1302,11 +1302,11 @@ function Hr({
1302
1302
  {
1303
1303
  ...u,
1304
1304
  pos: "relative",
1305
- ref: W,
1305
+ ref: V,
1306
1306
  children: [
1307
- A && /* @__PURE__ */ C(ne, { children: [
1307
+ A && /* @__PURE__ */ C(ie, { children: [
1308
1308
  /* @__PURE__ */ n(
1309
- F,
1309
+ j,
1310
1310
  {
1311
1311
  c: "light-dark(var(--mantine-color-black), var(--mantine-color-white))",
1312
1312
  fw: 800,
@@ -1319,10 +1319,10 @@ function Hr({
1319
1319
  /* @__PURE__ */ n(Ue, { m: "md" })
1320
1320
  ] }),
1321
1321
  y?.customContentBefore,
1322
- g && /* @__PURE__ */ C(Ee, { gap: "md", children: [
1322
+ v && /* @__PURE__ */ C(Ee, { gap: "md", children: [
1323
1323
  /* @__PURE__ */ C("div", { children: [
1324
- /* @__PURE__ */ n(F, { fw: 700, fz: "lg", children: x().t("archbase:mfa.title", "Verificação em duas etapas") }),
1325
- /* @__PURE__ */ n(F, { c: "dimmed", fz: "sm", children: x().t(
1324
+ /* @__PURE__ */ n(j, { fw: 700, fz: "lg", children: x().t("archbase:mfa.title", "Verificação em duas etapas") }),
1325
+ /* @__PURE__ */ n(j, { c: "dimmed", fz: "sm", children: x().t(
1326
1326
  "archbase:mfa.subtitle",
1327
1327
  "Digite o código do seu aplicativo autenticador (ou um código de recuperação)."
1328
1328
  ) })
@@ -1332,26 +1332,26 @@ function Hr({
1332
1332
  {
1333
1333
  label: x().t("archbase:mfa.code", "Código de verificação"),
1334
1334
  placeholder: "000000",
1335
- value: I,
1335
+ value: H,
1336
1336
  autoFocus: !0,
1337
- onChange: (h) => he(h.currentTarget.value),
1338
- onKeyDown: (h) => {
1339
- h.key === "Enter" && ae();
1337
+ onChange: (l) => ve(l.currentTarget.value),
1338
+ onKeyDown: (l) => {
1339
+ l.key === "Enter" && ce();
1340
1340
  }
1341
1341
  }
1342
1342
  ),
1343
- D && /* @__PURE__ */ n(F, { c: "red", fz: "sm", children: D }),
1343
+ I && /* @__PURE__ */ n(j, { c: "red", fz: "sm", children: I }),
1344
1344
  /* @__PURE__ */ n(
1345
- H,
1345
+ G,
1346
1346
  {
1347
1347
  fullWidth: !0,
1348
- disabled: !I.trim() || B,
1349
- loading: B,
1350
- onClick: ae,
1348
+ disabled: !H.trim() || L,
1349
+ loading: L,
1350
+ onClick: ce,
1351
1351
  children: x().t("archbase:mfa.verify", "Verificar")
1352
1352
  }
1353
1353
  ),
1354
- N && /* @__PURE__ */ n(
1354
+ M && /* @__PURE__ */ n(
1355
1355
  et,
1356
1356
  {
1357
1357
  component: "button",
@@ -1359,35 +1359,35 @@ function Hr({
1359
1359
  fz: 14,
1360
1360
  ta: "center",
1361
1361
  styles: { root: { cursor: "pointer" } },
1362
- onClick: N,
1362
+ onClick: M,
1363
1363
  children: x().t("archbase:mfa.back", "Voltar ao login")
1364
1364
  }
1365
1365
  )
1366
1366
  ] }),
1367
- !g && /* @__PURE__ */ C(ne, { children: [
1368
- c && /* @__PURE__ */ C(ne, { children: [
1369
- /* @__PURE__ */ C(de, { gap: "sm", mb: "md", children: [
1367
+ !v && /* @__PURE__ */ C(ie, { children: [
1368
+ c && /* @__PURE__ */ C(ie, { children: [
1369
+ /* @__PURE__ */ C(ue, { gap: "sm", mb: "md", children: [
1370
1370
  /* @__PURE__ */ n(
1371
- Jt,
1371
+ qt,
1372
1372
  {
1373
1373
  placeholder: "Selecione um usuário mock",
1374
- data: ue(),
1375
- value: v,
1376
- onChange: (h) => ee(h ?? ""),
1374
+ data: oe(),
1375
+ value: w,
1376
+ onChange: (l) => J(l ?? ""),
1377
1377
  searchable: !0,
1378
1378
  clearable: !0,
1379
1379
  style: { flexGrow: 1 }
1380
1380
  }
1381
1381
  ),
1382
- /* @__PURE__ */ n(Kt, { label: "Aplicar", children: /* @__PURE__ */ n(
1383
- H,
1382
+ /* @__PURE__ */ n(Yt, { label: "Aplicar", children: /* @__PURE__ */ n(
1383
+ G,
1384
1384
  {
1385
1385
  variant: "light",
1386
1386
  size: "sm",
1387
- onClick: pe,
1388
- disabled: !v,
1387
+ onClick: be,
1388
+ disabled: !w,
1389
1389
  "aria-label": "Aplicar usuário mock selecionado",
1390
- children: /* @__PURE__ */ n(Zt, { size: 16 })
1390
+ children: /* @__PURE__ */ n(tr, { size: 16 })
1391
1391
  }
1392
1392
  ) })
1393
1393
  ] }),
@@ -1398,11 +1398,11 @@ function Hr({
1398
1398
  {
1399
1399
  label: s,
1400
1400
  placeholder: o ?? x().t("archbase:usuario@email.com"),
1401
- rightSection: R ? /* @__PURE__ */ n(dt, { size: "xs" }) : null,
1402
- value: z || "",
1401
+ rightSection: U ? /* @__PURE__ */ n(dt, { size: "xs" }) : null,
1402
+ value: W || "",
1403
1403
  required: !0,
1404
- onChange: (h) => {
1405
- O(h.currentTarget.value), E?.(h.currentTarget.value), se();
1404
+ onChange: (l) => {
1405
+ O(l.currentTarget.value), S?.(l.currentTarget.value), he();
1406
1406
  }
1407
1407
  }
1408
1408
  ),
@@ -1411,23 +1411,23 @@ function Hr({
1411
1411
  {
1412
1412
  label: x().t("archbase:Password"),
1413
1413
  placeholder: x().t("archbase:Sua senha"),
1414
- onChange: (h) => {
1415
- U(h.currentTarget.value), se();
1414
+ onChange: (l) => {
1415
+ P(l.currentTarget.value), he();
1416
1416
  },
1417
- value: L || "",
1417
+ value: N || "",
1418
1418
  required: !0,
1419
1419
  mt: "md"
1420
1420
  }
1421
1421
  ),
1422
- /* @__PURE__ */ C(de, { justify: "space-between", mt: "md", children: [
1422
+ /* @__PURE__ */ C(ue, { justify: "space-between", mt: "md", children: [
1423
1423
  /* @__PURE__ */ n(
1424
- qt,
1424
+ Xt,
1425
1425
  {
1426
1426
  label: x().t("archbase:Lembre-me"),
1427
- checked: Z,
1428
- onChange: (h) => {
1429
- const m = h.currentTarget.checked;
1430
- q(m), m || T();
1427
+ checked: ee,
1428
+ onChange: (l) => {
1429
+ const f = l.currentTarget.checked;
1430
+ te(f), f || R();
1431
1431
  }
1432
1432
  }
1433
1433
  ),
@@ -1446,89 +1446,89 @@ function Hr({
1446
1446
  ] }),
1447
1447
  y?.afterInputs || a,
1448
1448
  /* @__PURE__ */ n(
1449
- H,
1449
+ G,
1450
1450
  {
1451
- disabled: !L || !z || d,
1451
+ disabled: !N || !W || h,
1452
1452
  fullWidth: !0,
1453
1453
  mt: "xl",
1454
- onClick: be,
1454
+ onClick: B,
1455
1455
  children: x().t("archbase:signIn")
1456
1456
  }
1457
1457
  )
1458
1458
  ] }),
1459
1459
  y?.customContentAfter,
1460
- re && e && /* @__PURE__ */ n(F, { c: "red", mt: "sm", children: e })
1460
+ se && e && /* @__PURE__ */ n(j, { c: "red", mt: "sm", children: e })
1461
1461
  ]
1462
1462
  }
1463
1463
  );
1464
1464
  }
1465
1465
  const $ = (r, e) => x().t(r, e);
1466
- function Gr({
1466
+ function qr({
1467
1467
  enabled: r,
1468
1468
  onSetup: e,
1469
1469
  onEnable: t,
1470
1470
  onDisable: s,
1471
1471
  onStatusChange: o
1472
1472
  }) {
1473
- const [a, c] = p("idle"), [i, l] = p(null), [y, E] = p(""), [d, R] = p([]), [A, g] = p(!1), [S, D] = p(null), N = async () => {
1474
- g(!0), D(null);
1473
+ const [a, c] = p("idle"), [i, d] = p(null), [y, S] = p(""), [h, U] = p([]), [A, v] = p(!1), [E, I] = p(null), M = async () => {
1474
+ v(!0), I(null);
1475
1475
  try {
1476
1476
  const b = await e();
1477
- l(b), E(""), c("setup");
1477
+ d(b), S(""), c("setup");
1478
1478
  } catch (b) {
1479
- D(b?.message || String(b));
1479
+ I(b?.message || String(b));
1480
1480
  } finally {
1481
- g(!1);
1481
+ v(!1);
1482
1482
  }
1483
- }, B = async () => {
1483
+ }, L = async () => {
1484
1484
  const b = y.trim();
1485
1485
  if (b) {
1486
- g(!0), D(null);
1486
+ v(!0), I(null);
1487
1487
  try {
1488
- const w = await t(b);
1489
- R(w), c("recovery"), o?.(!0);
1490
- } catch (w) {
1491
- D(w?.message || String(w));
1488
+ const m = await t(b);
1489
+ U(m), c("recovery"), o?.(!0);
1490
+ } catch (m) {
1491
+ I(m?.message || String(m));
1492
1492
  } finally {
1493
- g(!1);
1493
+ v(!1);
1494
1494
  }
1495
1495
  }
1496
- }, W = async () => {
1497
- g(!0), D(null);
1496
+ }, V = async () => {
1497
+ v(!0), I(null);
1498
1498
  try {
1499
- await s(), l(null), R([]), c("idle"), o?.(!1);
1499
+ await s(), d(null), U([]), c("idle"), o?.(!1);
1500
1500
  } catch (b) {
1501
- D(b?.message || String(b));
1501
+ I(b?.message || String(b));
1502
1502
  } finally {
1503
- g(!1);
1503
+ v(!1);
1504
1504
  }
1505
- }, M = () => {
1506
- R([]), l(null), E(""), c("idle");
1505
+ }, _ = () => {
1506
+ U([]), d(null), S(""), c("idle");
1507
1507
  };
1508
1508
  return /* @__PURE__ */ n(He, { withBorder: !0, radius: "md", p: "lg", children: /* @__PURE__ */ C(Ee, { gap: "md", children: [
1509
1509
  /* @__PURE__ */ C("div", { children: [
1510
- /* @__PURE__ */ n(F, { fw: 700, fz: "lg", children: $("archbase:mfa.setup.title", "Autenticação em duas etapas (MFA)") }),
1511
- /* @__PURE__ */ n(F, { c: "dimmed", fz: "sm", children: $(
1510
+ /* @__PURE__ */ n(j, { fw: 700, fz: "lg", children: $("archbase:mfa.setup.title", "Autenticação em duas etapas (MFA)") }),
1511
+ /* @__PURE__ */ n(j, { c: "dimmed", fz: "sm", children: $(
1512
1512
  "archbase:mfa.setup.subtitle",
1513
1513
  "Proteja o acesso exigindo um código do seu aplicativo autenticador no login."
1514
1514
  ) })
1515
1515
  ] }),
1516
- S && /* @__PURE__ */ n(tt, { color: "red", children: S }),
1517
- r && a === "idle" && /* @__PURE__ */ C(de, { justify: "space-between", children: [
1518
- /* @__PURE__ */ n(F, { c: "teal", fw: 600, children: $("archbase:mfa.setup.active", "MFA ativo") }),
1519
- /* @__PURE__ */ n(H, { color: "red", variant: "light", loading: A, onClick: W, children: $("archbase:mfa.setup.disable", "Desativar") })
1516
+ E && /* @__PURE__ */ n(tt, { color: "red", children: E }),
1517
+ r && a === "idle" && /* @__PURE__ */ C(ue, { justify: "space-between", children: [
1518
+ /* @__PURE__ */ n(j, { c: "teal", fw: 600, children: $("archbase:mfa.setup.active", "MFA ativo") }),
1519
+ /* @__PURE__ */ n(G, { color: "red", variant: "light", loading: A, onClick: V, children: $("archbase:mfa.setup.disable", "Desativar") })
1520
1520
  ] }),
1521
- !r && a === "idle" && /* @__PURE__ */ n(H, { loading: A, onClick: N, children: $("archbase:mfa.setup.enable", "Ativar MFA") }),
1521
+ !r && a === "idle" && /* @__PURE__ */ n(G, { loading: A, onClick: M, children: $("archbase:mfa.setup.enable", "Ativar MFA") }),
1522
1522
  a === "setup" && i && /* @__PURE__ */ C(Ee, { gap: "sm", align: "center", children: [
1523
- /* @__PURE__ */ n(F, { fz: "sm", ta: "center", children: $(
1523
+ /* @__PURE__ */ n(j, { fz: "sm", ta: "center", children: $(
1524
1524
  "archbase:mfa.setup.scan",
1525
1525
  "Escaneie o QR Code no seu app autenticador (Google Authenticator, Authy…):"
1526
1526
  ) }),
1527
- /* @__PURE__ */ n(er, { value: i.provisioningUri, size: 180, level: "M" }),
1528
- /* @__PURE__ */ n(F, { fz: "xs", c: "dimmed", ta: "center", children: $("archbase:mfa.setup.manual", "Ou informe o código manualmente:") }),
1529
- /* @__PURE__ */ C(de, { gap: "xs", children: [
1527
+ /* @__PURE__ */ n(rr, { value: i.provisioningUri, size: 180, level: "M" }),
1528
+ /* @__PURE__ */ n(j, { fz: "xs", c: "dimmed", ta: "center", children: $("archbase:mfa.setup.manual", "Ou informe o código manualmente:") }),
1529
+ /* @__PURE__ */ C(ue, { gap: "xs", children: [
1530
1530
  /* @__PURE__ */ n(rt, { children: i.secret }),
1531
- /* @__PURE__ */ n(st, { value: i.secret, children: ({ copied: b, copy: w }) => /* @__PURE__ */ n(H, { size: "xs", variant: "subtle", onClick: w, children: b ? $("archbase:mfa.setup.copied", "Copiado") : $("archbase:mfa.setup.copy", "Copiar") }) })
1531
+ /* @__PURE__ */ n(st, { value: i.secret, children: ({ copied: b, copy: m }) => /* @__PURE__ */ n(G, { size: "xs", variant: "subtle", onClick: m, children: b ? $("archbase:mfa.setup.copied", "Copiado") : $("archbase:mfa.setup.copy", "Copiar") }) })
1532
1532
  ] }),
1533
1533
  /* @__PURE__ */ n(
1534
1534
  xe,
@@ -1537,15 +1537,15 @@ function Gr({
1537
1537
  label: $("archbase:mfa.setup.confirmCode", "Digite o código gerado para confirmar"),
1538
1538
  placeholder: "000000",
1539
1539
  value: y,
1540
- onChange: (b) => E(b.currentTarget.value),
1540
+ onChange: (b) => S(b.currentTarget.value),
1541
1541
  onKeyDown: (b) => {
1542
- b.key === "Enter" && B();
1542
+ b.key === "Enter" && L();
1543
1543
  }
1544
1544
  }
1545
1545
  ),
1546
- /* @__PURE__ */ C(de, { w: "100%", justify: "flex-end", children: [
1547
- /* @__PURE__ */ n(H, { variant: "default", onClick: M, disabled: A, children: $("archbase:mfa.setup.cancel", "Cancelar") }),
1548
- /* @__PURE__ */ n(H, { onClick: B, loading: A, disabled: !y.trim(), children: $("archbase:mfa.setup.confirm", "Confirmar e ativar") })
1546
+ /* @__PURE__ */ C(ue, { w: "100%", justify: "flex-end", children: [
1547
+ /* @__PURE__ */ n(G, { variant: "default", onClick: _, disabled: A, children: $("archbase:mfa.setup.cancel", "Cancelar") }),
1548
+ /* @__PURE__ */ n(G, { onClick: L, loading: A, disabled: !y.trim(), children: $("archbase:mfa.setup.confirm", "Confirmar e ativar") })
1549
1549
  ] })
1550
1550
  ] }),
1551
1551
  a === "recovery" && /* @__PURE__ */ C(Ee, { gap: "sm", children: [
@@ -1553,59 +1553,59 @@ function Gr({
1553
1553
  "archbase:mfa.setup.recoveryWarning",
1554
1554
  "Guarde estes códigos de recuperação em local seguro. Cada um funciona uma única vez e permite entrar se você perder o acesso ao app autenticador. Eles não serão exibidos novamente."
1555
1555
  ) }),
1556
- /* @__PURE__ */ n(Yt, { cols: 2, spacing: "xs", children: d.map((b) => /* @__PURE__ */ n(rt, { fz: "sm", children: b }, b)) }),
1557
- /* @__PURE__ */ C(de, { justify: "space-between", children: [
1558
- /* @__PURE__ */ n(st, { value: d.join(`
1559
- `), children: ({ copied: b, copy: w }) => /* @__PURE__ */ n(H, { variant: "subtle", onClick: w, children: b ? $("archbase:mfa.setup.copied", "Copiado") : $("archbase:mfa.setup.copyAll", "Copiar todos") }) }),
1560
- /* @__PURE__ */ n(H, { onClick: M, children: $("archbase:mfa.setup.done", "Guardei os códigos") })
1556
+ /* @__PURE__ */ n(Qt, { cols: 2, spacing: "xs", children: h.map((b) => /* @__PURE__ */ n(rt, { fz: "sm", children: b }, b)) }),
1557
+ /* @__PURE__ */ C(ue, { justify: "space-between", children: [
1558
+ /* @__PURE__ */ n(st, { value: h.join(`
1559
+ `), children: ({ copied: b, copy: m }) => /* @__PURE__ */ n(G, { variant: "subtle", onClick: m, children: b ? $("archbase:mfa.setup.copied", "Copiado") : $("archbase:mfa.setup.copyAll", "Copiar todos") }) }),
1560
+ /* @__PURE__ */ n(G, { onClick: _, children: $("archbase:mfa.setup.done", "Guardei os códigos") })
1561
1561
  ] })
1562
1562
  ] })
1563
1563
  ] }) });
1564
1564
  }
1565
- const Ar = {
1565
+ const kr = {
1566
1566
  position: "relative",
1567
1567
  width: "90%",
1568
1568
  maxWidth: 400,
1569
1569
  padding: 30,
1570
1570
  marginTop: 30
1571
1571
  };
1572
- function Jr({ error: r, onSendResetPasswordEmail: e, onResetPassword: t, onClickBackToLogin: s, validatePassword: o, validateToken: a, initialEmail: c = "", description: i, style: l }) {
1573
- const y = ut(), E = Vt(), { colorScheme: d } = Xt(), [R, A] = p(r ?? ""), [g, S] = p(c), [D, N] = p(""), [B, W] = p(""), [M, b] = p(""), [w, T] = p(!1), [z, O] = p(""), [L, U] = p(""), [Z, q] = p(""), [re, f] = p("");
1574
- async function v(I) {
1575
- I && (Wt(I) ? await e(I).then(() => {
1576
- ot.showSuccess(`${x().t("archbase:Um e-mail com instruções para redefinir sua senha foi enviado. Verifique sua caixa de entrada.")}`), T(!0);
1572
+ function Yr({ error: r, onSendResetPasswordEmail: e, onResetPassword: t, onClickBackToLogin: s, validatePassword: o, validateToken: a, initialEmail: c = "", description: i, style: d, passwordPolicy: y, showPasswordRequirements: S = !0 }) {
1573
+ const h = ut(), U = Vt(), { colorScheme: A } = Zt(), [v, E] = p(r ?? ""), [I, M] = p(c), [L, V] = p(""), [_, b] = p(""), [m, R] = p(""), [W, O] = p(!1), [N, P] = p(""), [ee, te] = p(""), [se, g] = p(""), [w, J] = p(""), H = Wt(y);
1574
+ async function ve(B) {
1575
+ B && (Ht(B) ? await e(B).then(() => {
1576
+ ot.showSuccess(`${x().t("archbase:Um e-mail com instruções para redefinir sua senha foi enviado. Verifique sua caixa de entrada.")}`), O(!0);
1577
1577
  }).catch(() => {
1578
- }) : O(`${x().t("archbase:Email inválido")}`));
1578
+ }) : P(`${x().t("archbase:Email inválido")}`));
1579
1579
  }
1580
- async function ee(I, he, se, be) {
1581
- if (I && he && se) {
1582
- let ae = "", ue = "", pe = "";
1583
- a && (ae = a(), q(ae)), o && (ue = o(), q(ue)), se !== be && (pe = `${x().t("archbase:A nova senha e a confirmação devem ser iguais.")}`, f(pe)), !ue && !ae && await t(I, he, se).then(() => {
1584
- ot.showSuccess(`${x().t("archbase:Senha redefinida com sucesso.")}`), s(), T(!1);
1580
+ async function he(B, ce, oe, be) {
1581
+ if (B && ce && oe) {
1582
+ let u = "", l = "", f = "";
1583
+ a && (u = a(ce), te(u)), H && (l = Gt(oe, H).error ?? ""), !l && o && (l = o(oe)), g(l), oe !== be && (f = `${x().t("archbase:A nova senha e a confirmação devem ser iguais.")}`, J(f)), !l && !u && !f && await t(B, ce, oe).then(() => {
1584
+ ot.showSuccess(`${x().t("archbase:Senha redefinida com sucesso.")}`), s(), O(!1);
1585
1585
  }).catch(() => {
1586
- A(r || `${x().t("archbase:Erro ao redefinir senha.")}`);
1586
+ E(r || `${x().t("archbase:Erro ao redefinir senha.")}`);
1587
1587
  });
1588
1588
  }
1589
1589
  }
1590
- return K(() => {
1591
- r && A(r);
1592
- }, [r]), K(() => {
1593
- A("");
1594
- }, [g, D, B, M]), /* @__PURE__ */ C(
1590
+ return Y(() => {
1591
+ r && E(r);
1592
+ }, [r]), Y(() => {
1593
+ E("");
1594
+ }, [I, L, _, m]), /* @__PURE__ */ C(
1595
1595
  He,
1596
1596
  {
1597
1597
  withBorder: !0,
1598
1598
  shadow: "md",
1599
1599
  radius: "md",
1600
- ref: y,
1600
+ ref: h,
1601
1601
  style: {
1602
- ...Ar,
1603
- ...l
1602
+ ...kr,
1603
+ ...d
1604
1604
  },
1605
1605
  children: [
1606
- w ? /* @__PURE__ */ C(ne, { children: [
1606
+ W ? /* @__PURE__ */ C(ie, { children: [
1607
1607
  /* @__PURE__ */ n(
1608
- F,
1608
+ j,
1609
1609
  {
1610
1610
  c: "light-dark(var(--mantine-color-black), var(--mantine-color-white))",
1611
1611
  fw: 800,
@@ -1621,12 +1621,12 @@ function Jr({ error: r, onSendResetPasswordEmail: e, onResetPassword: t, onClick
1621
1621
  {
1622
1622
  label: x().t("archbase:Código de segurança"),
1623
1623
  placeholder: `${x().t("archbase:Código enviado no seu e-mail")}`,
1624
- value: D || "",
1624
+ value: L || "",
1625
1625
  required: !0,
1626
- onChange: (I) => {
1627
- N(I.currentTarget.value), U("");
1626
+ onChange: (B) => {
1627
+ V(B.currentTarget.value), te("");
1628
1628
  },
1629
- error: L
1629
+ error: ee
1630
1630
  }
1631
1631
  ),
1632
1632
  /* @__PURE__ */ n(
@@ -1634,12 +1634,20 @@ function Jr({ error: r, onSendResetPasswordEmail: e, onResetPassword: t, onClick
1634
1634
  {
1635
1635
  label: x().t("archbase:Nova senha"),
1636
1636
  placeholder: x().t("archbase:Nova senha"),
1637
- onChange: (I) => {
1638
- W(I.currentTarget.value), q(""), f("");
1637
+ onChange: (B) => {
1638
+ b(B.currentTarget.value), g(""), J("");
1639
1639
  },
1640
- value: B,
1640
+ value: _,
1641
1641
  required: !0,
1642
- error: Z
1642
+ error: se
1643
+ }
1644
+ ),
1645
+ H && /* @__PURE__ */ n(
1646
+ sr,
1647
+ {
1648
+ value: _,
1649
+ policy: H,
1650
+ showRequirements: S
1643
1651
  }
1644
1652
  ),
1645
1653
  /* @__PURE__ */ n(
@@ -1647,39 +1655,39 @@ function Jr({ error: r, onSendResetPasswordEmail: e, onResetPassword: t, onClick
1647
1655
  {
1648
1656
  label: x().t("archbase:Confirmar senha"),
1649
1657
  placeholder: x().t("archbase:Confirmar senha"),
1650
- onChange: (I) => {
1651
- b(I.currentTarget.value), f("");
1658
+ onChange: (B) => {
1659
+ R(B.currentTarget.value), J("");
1652
1660
  },
1653
- value: M || "",
1661
+ value: m || "",
1654
1662
  required: !0,
1655
- error: re
1663
+ error: w
1656
1664
  }
1657
1665
  ),
1658
1666
  /* @__PURE__ */ n(
1659
- H,
1667
+ G,
1660
1668
  {
1661
- disabled: !g || !D || !B || !M,
1669
+ disabled: !I || !L || !_ || !m,
1662
1670
  mt: "md",
1663
1671
  fullWidth: !0,
1664
- onClick: () => ee(g, D, B, M),
1672
+ onClick: () => he(I, L, _, m),
1665
1673
  children: `${x().t("archbase:Redefinir senha")}`
1666
1674
  }
1667
1675
  ),
1668
1676
  /* @__PURE__ */ n(
1669
- H,
1677
+ G,
1670
1678
  {
1671
1679
  mt: "6px",
1672
1680
  fullWidth: !0,
1673
- color: d === "dark" ? E.colors.dark[4] : E.colors.gray[7],
1681
+ color: A === "dark" ? U.colors.dark[4] : U.colors.gray[7],
1674
1682
  onClick: () => {
1675
- z || T(!1);
1683
+ N || O(!1);
1676
1684
  },
1677
1685
  children: `${x().t("archbase:Voltar")}`
1678
1686
  }
1679
1687
  )
1680
- ] }) : /* @__PURE__ */ C(ne, { children: [
1688
+ ] }) : /* @__PURE__ */ C(ie, { children: [
1681
1689
  /* @__PURE__ */ n(
1682
- F,
1690
+ j,
1683
1691
  {
1684
1692
  c: "light-dark(var(--mantine-color-black), var(--mantine-color-white))",
1685
1693
  fw: 800,
@@ -1689,261 +1697,261 @@ function Jr({ error: r, onSendResetPasswordEmail: e, onResetPassword: t, onClick
1689
1697
  children: x().t("archbase:Redefinir senha")
1690
1698
  }
1691
1699
  ),
1692
- /* @__PURE__ */ n(F, { c: "dimmed", fz: 14, style: { textAlign: "justify" }, children: i }),
1700
+ /* @__PURE__ */ n(j, { c: "dimmed", fz: 14, style: { textAlign: "justify" }, children: i }),
1693
1701
  /* @__PURE__ */ n(Ue, { m: "md" }),
1694
1702
  /* @__PURE__ */ n(
1695
1703
  xe,
1696
1704
  {
1697
1705
  label: "Email",
1698
1706
  placeholder: `${x().t("archbase:usuario@email.com")}`,
1699
- value: g || "",
1707
+ value: I || "",
1700
1708
  required: !0,
1701
- onChange: (I) => {
1702
- S(I.currentTarget.value), O("");
1709
+ onChange: (B) => {
1710
+ M(B.currentTarget.value), P("");
1703
1711
  },
1704
- error: z
1712
+ error: N
1705
1713
  }
1706
1714
  ),
1707
1715
  /* @__PURE__ */ n(
1708
- H,
1716
+ G,
1709
1717
  {
1710
- disabled: !g,
1718
+ disabled: !I,
1711
1719
  mt: "md",
1712
1720
  fullWidth: !0,
1713
- onClick: () => v(g),
1721
+ onClick: () => ve(I),
1714
1722
  children: `${x().t("archbase:Enviar")}`
1715
1723
  }
1716
1724
  ),
1717
1725
  /* @__PURE__ */ n(
1718
- H,
1726
+ G,
1719
1727
  {
1720
1728
  mt: "6px",
1721
1729
  fullWidth: !0,
1722
- color: d === "dark" ? E.colors.dark[4] : E.colors.gray[7],
1730
+ color: A === "dark" ? U.colors.dark[4] : U.colors.gray[7],
1723
1731
  onClick: () => s && s(),
1724
1732
  children: `${x().t("archbase:Voltar")}`
1725
1733
  }
1726
1734
  )
1727
1735
  ] }),
1728
- R ? /* @__PURE__ */ n(F, { c: "red", style: { textAlign: "justify" }, children: R }) : null
1736
+ v ? /* @__PURE__ */ n(j, { c: "red", style: { textAlign: "justify" }, children: v }) : null
1729
1737
  ]
1730
1738
  }
1731
1739
  );
1732
1740
  }
1733
- const Er = () => Ht().user, Rt = "archbaseSecurityManagerStore", Kr = ({ resourceName: r, resourceDescription: e, enableSecurity: t = !0 }) => {
1734
- const s = lt(Rt), o = Er(), a = o?.isAdmin ?? !1, c = o?.id, i = ct(c), l = at(() => {
1741
+ const Sr = () => Jt().user, Rt = "archbaseSecurityManagerStore", Xr = ({ resourceName: r, resourceDescription: e, enableSecurity: t = !0 }) => {
1742
+ const s = lt(Rt), o = Sr(), a = o?.isAdmin ?? !1, c = o?.id, i = ct(c), d = at(() => {
1735
1743
  if (!t)
1736
1744
  return null;
1737
1745
  const y = c ? `${r}_${c}` : r;
1738
1746
  if (s && s.existsValue(y)) {
1739
- const d = s.getValue(y);
1740
- if (d && d.isAdmin === a)
1741
- return d;
1747
+ const h = s.getValue(y);
1748
+ if (h && h.isAdmin === a)
1749
+ return h;
1742
1750
  }
1743
- const E = new wt(r, e, a);
1744
- return s && c && s.setValue(y, E), E;
1751
+ const S = new wt(r, e, a);
1752
+ return s && c && s.setValue(y, S), S;
1745
1753
  }, [t, r, e, a, c]);
1746
- return K(() => {
1754
+ return Y(() => {
1747
1755
  i.current = c;
1748
- }, [c]), { securityManager: l };
1756
+ }, [c]), { securityManager: d };
1749
1757
  };
1750
1758
  function $e(r) {
1751
1759
  const e = r?.response?.data ?? r?.data ?? r;
1752
1760
  return e?.error === "CREDENTIALS_EXPIRED" || e?.requirePasswordChange === !0;
1753
1761
  }
1754
- const qr = ({
1762
+ const Qr = ({
1755
1763
  checkIntervalTokenHasExpired: r = 3e4,
1756
1764
  // Verificar a 30 segundos
1757
1765
  expirationThresholdOfToken: e = 300
1758
1766
  // Antecipar em 5 minutos
1759
1767
  }) => {
1760
1768
  const t = De(
1761
- (u) => u.get(Y.TokenManager)
1769
+ (u) => u.get(X.TokenManager)
1762
1770
  ), s = De(
1763
- (u) => u.get(Y.Authenticator)
1764
- ), [o, a] = p(null), [c, i] = p(!1), [l, y] = p(!0), [E, d] = p(!1), [R, A] = p(!1), [g, S] = p(""), [D, N] = p(""), [B, W] = p(null), [M, b] = p(!1), [w, T] = p(!1), [z, O] = p(null), L = lt(Rt), U = {
1771
+ (u) => u.get(X.Authenticator)
1772
+ ), [o, a] = p(null), [c, i] = p(!1), [d, y] = p(!0), [S, h] = p(!1), [U, A] = p(!1), [v, E] = p(""), [I, M] = p(""), [L, V] = p(null), [_, b] = p(!1), [m, R] = p(!1), [W, O] = p(null), N = lt(Rt), P = {
1765
1773
  hasContextualLogin: typeof s.loginWithContext == "function",
1766
1774
  hasFlexibleLogin: typeof s.loginFlexible == "function",
1767
1775
  hasSocialLogin: typeof s.loginSocial == "function",
1768
1776
  hasRegistration: typeof s.register == "function",
1769
1777
  hasContextSupport: typeof t.saveContext == "function"
1770
1778
  };
1771
- K(() => {
1779
+ Y(() => {
1772
1780
  const u = t.getUsername();
1773
- if (u && u != "" && N(u), U.hasContextSupport && t.getContext) {
1774
- const m = t.getContext();
1775
- if (m)
1781
+ if (u && u != "" && M(u), P.hasContextSupport && t.getContext) {
1782
+ const f = t.getContext();
1783
+ if (f)
1776
1784
  try {
1777
- const _ = typeof m == "string" ? JSON.parse(m) : m;
1778
- W(_);
1779
- } catch (_) {
1780
- console.warn("Erro ao carregar contexto salvo:", _);
1785
+ const D = typeof f == "string" ? JSON.parse(f) : f;
1786
+ V(D);
1787
+ } catch (D) {
1788
+ console.warn("Erro ao carregar contexto salvo:", D);
1781
1789
  }
1782
1790
  }
1783
- const h = t.getToken();
1784
- h && (d(!0), S(""), A(!1), a(h)), y(!1);
1791
+ const l = t.getToken();
1792
+ l && (h(!0), E(""), A(!1), a(l)), y(!1);
1785
1793
  }, []);
1786
- const Z = () => {
1787
- A(!1), S("");
1788
- }, q = () => {
1789
- T(!1);
1790
- }, re = (u) => {
1791
- i(!1), d(!1), t.clearToken(), u && t.clearUsernameAndPassword(), U.hasContextSupport && t.clearContext && t.clearContext(), N(""), W(null), S(""), A(!1), T(!1), L.clearAllValues();
1792
- }, f = async (u, h, m) => {
1794
+ const ee = () => {
1795
+ A(!1), E("");
1796
+ }, te = () => {
1797
+ R(!1);
1798
+ }, se = (u) => {
1799
+ i(!1), h(!1), t.clearToken(), u && t.clearUsernameAndPassword(), P.hasContextSupport && t.clearContext && t.clearContext(), M(""), V(null), E(""), A(!1), R(!1), N.clearAllValues();
1800
+ }, g = async (u, l, f) => {
1793
1801
  try {
1794
- i(!0), d(!1);
1795
- const _ = await s.login(u, h);
1796
- t.saveToken(_), m && t.saveUsernameAndPassword(u, h), t.saveUsername(u), N(u), a(_), i(!1), d(!0);
1797
- } catch (_) {
1798
- i(!1), d(!1), $e(_) && (N(u), T(!0)), S(oe(_)), A(!0);
1802
+ i(!0), h(!1);
1803
+ const D = await s.login(u, l);
1804
+ t.saveToken(D), f && t.saveUsernameAndPassword(u, l), t.saveUsername(u), M(u), a(D), i(!1), h(!0);
1805
+ } catch (D) {
1806
+ i(!1), h(!1), $e(D) && (M(u), R(!0)), E(ne(D)), A(!0);
1799
1807
  }
1800
- }, v = async (u, h = !1) => {
1801
- if (!U.hasContextualLogin || !s.loginWithContext)
1808
+ }, w = async (u, l = !1) => {
1809
+ if (!P.hasContextualLogin || !s.loginWithContext)
1802
1810
  throw new Error("Login contextual não suportado por esta implementação do ArchbaseAuthenticator");
1803
1811
  try {
1804
- i(!0), d(!1);
1805
- const { context: m, user: _, ...j } = await s.loginWithContext(u);
1806
- if (j.mfa_required) {
1807
- O(j.challenge_token ?? null), b(!0), N(u.email), i(!1);
1812
+ i(!0), h(!1);
1813
+ const { context: f, user: D, ...z } = await s.loginWithContext(u);
1814
+ if (z.mfa_required) {
1815
+ O(z.challenge_token ?? null), b(!0), M(u.email), i(!1);
1808
1816
  return;
1809
1817
  }
1810
1818
  const Ae = {
1811
1819
  scope: "",
1812
- ext_expires_in: j.expires_in,
1813
- ...j
1820
+ ext_expires_in: z.expires_in,
1821
+ ...z
1814
1822
  };
1815
- t.saveToken(Ae), h ? t.saveUsernameAndPassword(u.email, u.password) : t.clearUsernameAndPassword(), t.saveUsername(u.email), U.hasContextSupport && t.saveContext && m && (t.saveContext(JSON.stringify(m)), W(m)), N(u.email), a(Ae), i(!1), d(!0);
1816
- } catch (m) {
1817
- throw i(!1), d(!1), $e(m) && (N(u.email), T(!0)), S(oe(m)), A(!0), m;
1823
+ t.saveToken(Ae), l ? t.saveUsernameAndPassword(u.email, u.password) : t.clearUsernameAndPassword(), t.saveUsername(u.email), P.hasContextSupport && t.saveContext && f && (t.saveContext(JSON.stringify(f)), V(f)), M(u.email), a(Ae), i(!1), h(!0);
1824
+ } catch (f) {
1825
+ throw i(!1), h(!1), $e(f) && (M(u.email), R(!0)), E(ne(f)), A(!0), f;
1818
1826
  }
1819
- }, ee = async (u) => {
1827
+ }, J = async (u) => {
1820
1828
  if (!s.verifyMfa)
1821
1829
  throw new Error("verifyMfa não suportado por esta implementação do ArchbaseAuthenticator");
1822
- if (!z)
1830
+ if (!W)
1823
1831
  throw new Error("Nenhum desafio de MFA pendente");
1824
1832
  try {
1825
- i(!0), S(""), A(!1);
1826
- const h = await s.verifyMfa(z, u);
1827
- t.saveToken(h), t.saveUsername(D), a(h), b(!1), O(null), i(!1), d(!0);
1828
- } catch (h) {
1829
- throw i(!1), S(oe(h)), A(!0), h;
1833
+ i(!0), E(""), A(!1);
1834
+ const l = await s.verifyMfa(W, u);
1835
+ t.saveToken(l), t.saveUsername(I), a(l), b(!1), O(null), i(!1), h(!0);
1836
+ } catch (l) {
1837
+ throw i(!1), E(ne(l)), A(!0), l;
1830
1838
  }
1831
- }, I = () => {
1832
- b(!1), O(null), S(""), A(!1);
1833
- }, he = async (u, h = !1) => {
1834
- if (!U.hasFlexibleLogin || !s.loginFlexible)
1839
+ }, H = () => {
1840
+ b(!1), O(null), E(""), A(!1);
1841
+ }, ve = async (u, l = !1) => {
1842
+ if (!P.hasFlexibleLogin || !s.loginFlexible)
1835
1843
  throw new Error("Login flexível não suportado por esta implementação do ArchbaseAuthenticator");
1836
1844
  try {
1837
- i(!0), d(!1);
1838
- const { context: m, user: _, ...j } = await s.loginFlexible(u), Ae = {
1845
+ i(!0), h(!1);
1846
+ const { context: f, user: D, ...z } = await s.loginFlexible(u), Ae = {
1839
1847
  scope: "",
1840
- ext_expires_in: j.expires_in,
1841
- ...j
1848
+ ext_expires_in: z.expires_in,
1849
+ ...z
1842
1850
  };
1843
- t.saveToken(Ae), h && t.saveUsernameAndPassword(u.identifier, u.password), t.saveUsername(_.email || u.identifier), U.hasContextSupport && t.saveContext && m && (t.saveContext(JSON.stringify(m)), W(m)), N(_.email || u.identifier), a(Ae), i(!1), d(!0);
1844
- } catch (m) {
1845
- throw i(!1), d(!1), $e(m) && (N(u.identifier), T(!0)), S(oe(m)), A(!0), m;
1851
+ t.saveToken(Ae), l && t.saveUsernameAndPassword(u.identifier, u.password), t.saveUsername(D.email || u.identifier), P.hasContextSupport && t.saveContext && f && (t.saveContext(JSON.stringify(f)), V(f)), M(D.email || u.identifier), a(Ae), i(!1), h(!0);
1852
+ } catch (f) {
1853
+ throw i(!1), h(!1), $e(f) && (M(u.identifier), R(!0)), E(ne(f)), A(!0), f;
1846
1854
  }
1847
- }, se = async (u) => {
1848
- if (!U.hasSocialLogin || !s.loginSocial)
1855
+ }, he = async (u) => {
1856
+ if (!P.hasSocialLogin || !s.loginSocial)
1849
1857
  throw new Error("Login social não suportado por esta implementação do ArchbaseAuthenticator");
1850
1858
  try {
1851
- i(!0), d(!1);
1852
- const { context: h, user: m, ..._ } = await s.loginSocial(u), j = {
1859
+ i(!0), h(!1);
1860
+ const { context: l, user: f, ...D } = await s.loginSocial(u), z = {
1853
1861
  scope: "",
1854
- ext_expires_in: _.expires_in,
1855
- ..._
1862
+ ext_expires_in: D.expires_in,
1863
+ ...D
1856
1864
  };
1857
- t.saveToken(j), t.saveUsername(m.email), U.hasContextSupport && t.saveContext && h && (t.saveContext(JSON.stringify(h)), W(h)), N(m.email), a(j), i(!1), d(!0);
1858
- } catch (h) {
1859
- throw i(!1), d(!1), S(oe(h)), A(!0), h;
1865
+ t.saveToken(z), t.saveUsername(f.email), P.hasContextSupport && t.saveContext && l && (t.saveContext(JSON.stringify(l)), V(l)), M(f.email), a(z), i(!1), h(!0);
1866
+ } catch (l) {
1867
+ throw i(!1), h(!1), E(ne(l)), A(!0), l;
1860
1868
  }
1861
- }, be = async (u) => {
1862
- if (!U.hasRegistration || !s.register)
1869
+ }, B = async (u) => {
1870
+ if (!P.hasRegistration || !s.register)
1863
1871
  throw new Error("Registro não suportado por esta implementação do ArchbaseAuthenticator");
1864
1872
  try {
1865
1873
  i(!0);
1866
- const h = await s.register(u);
1867
- return i(!1), h;
1868
- } catch (h) {
1869
- throw i(!1), S(oe(h)), A(!0), h;
1874
+ const l = await s.register(u);
1875
+ return i(!1), l;
1876
+ } catch (l) {
1877
+ throw i(!1), E(ne(l)), A(!0), l;
1870
1878
  }
1871
- }, ae = async () => s.getSupportedContexts ? await s.getSupportedContexts() : { supportedContexts: ["DEFAULT"], defaultContext: "DEFAULT" }, ue = async (u) => s.validateContext ? await s.validateContext(u) : { context: u, supported: u === "DEFAULT" };
1872
- K(() => {
1879
+ }, ce = async () => s.getSupportedContexts ? await s.getSupportedContexts() : { supportedContexts: ["DEFAULT"], defaultContext: "DEFAULT" }, oe = async (u) => s.validateContext ? await s.validateContext(u) : { context: u, supported: u === "DEFAULT" };
1880
+ Y(() => {
1873
1881
  const u = setInterval(() => {
1874
- o && o.access_token && t.isTokenExpired(o, e) && pe();
1882
+ o && o.access_token && t.isTokenExpired(o, e) && be();
1875
1883
  }, r);
1876
1884
  return () => {
1877
1885
  clearInterval(u);
1878
1886
  };
1879
1887
  }, [o]);
1880
- const pe = async () => {
1888
+ const be = async () => {
1881
1889
  if (o)
1882
1890
  try {
1883
1891
  const u = await s.refreshToken(o?.refresh_token);
1884
1892
  t.saveToken(u), a(u);
1885
1893
  } catch (u) {
1886
- console.error("Erro ao renovar o token:", u), re();
1894
+ console.error("Erro ao renovar o token:", u), se();
1887
1895
  }
1888
1896
  };
1889
1897
  return {
1890
1898
  // Métodos básicos (compatibilidade)
1891
- login: f,
1892
- logout: re,
1893
- username: D,
1894
- isAuthenticated: E,
1899
+ login: g,
1900
+ logout: se,
1901
+ username: I,
1902
+ isAuthenticated: S,
1895
1903
  isAuthenticating: c,
1896
- isInitializing: l,
1897
- isError: R,
1898
- error: g,
1899
- clearError: Z,
1904
+ isInitializing: d,
1905
+ isError: U,
1906
+ error: v,
1907
+ clearError: ee,
1900
1908
  accessToken: o ? o.access_token : null,
1901
1909
  // Métodos opcionais para autenticação avançada
1902
- loginWithContext: U.hasContextualLogin ? v : void 0,
1903
- loginFlexible: U.hasFlexibleLogin ? he : void 0,
1904
- loginSocial: U.hasSocialLogin ? se : void 0,
1905
- register: U.hasRegistration ? be : void 0,
1906
- getSupportedContexts: ae,
1907
- validateContext: ue,
1910
+ loginWithContext: P.hasContextualLogin ? w : void 0,
1911
+ loginFlexible: P.hasFlexibleLogin ? ve : void 0,
1912
+ loginSocial: P.hasSocialLogin ? he : void 0,
1913
+ register: P.hasRegistration ? B : void 0,
1914
+ getSupportedContexts: ce,
1915
+ validateContext: oe,
1908
1916
  // MFA / segundo fator (2 passos)
1909
- mfaRequired: M,
1910
- verifyMfa: typeof s.verifyMfa == "function" ? ee : void 0,
1911
- cancelMfa: I,
1917
+ mfaRequired: _,
1918
+ verifyMfa: typeof s.verifyMfa == "function" ? J : void 0,
1919
+ cancelMfa: H,
1912
1920
  // Troca de senha obrigatória (CREDENTIALS_EXPIRED)
1913
- passwordChangeRequired: w,
1914
- clearPasswordChangeRequired: q,
1921
+ passwordChangeRequired: m,
1922
+ clearPasswordChangeRequired: te,
1915
1923
  // Informações de contexto
1916
- context: B,
1924
+ context: L,
1917
1925
  // Detecção de capacidades
1918
- capabilities: U
1926
+ capabilities: P
1919
1927
  };
1920
- }, Yr = () => {
1928
+ }, Zr = () => {
1921
1929
  const r = De(
1922
- (s) => s.get(Y.TokenManager)
1930
+ (s) => s.get(X.TokenManager)
1923
1931
  ), [e, t] = p(null);
1924
- return K(() => {
1932
+ return Y(() => {
1925
1933
  const s = r.getToken();
1926
1934
  s && t(s.access_token);
1927
1935
  }, []), {
1928
1936
  token: e
1929
1937
  };
1930
- }, Xr = () => {
1938
+ }, es = () => {
1931
1939
  const r = De(
1932
- (l) => l.get(Y.Authenticator)
1940
+ (d) => d.get(X.Authenticator)
1933
1941
  ), [e, t] = p(!1), [s, o] = p("");
1934
1942
  return {
1935
- sendResetPasswordEmail: async (l) => {
1943
+ sendResetPasswordEmail: async (d) => {
1936
1944
  try {
1937
- return await r.sendResetPasswordEmail(l);
1945
+ return await r.sendResetPasswordEmail(d);
1938
1946
  } catch (y) {
1939
- throw o(oe(y)), t(!0), y;
1947
+ throw o(ne(y)), t(!0), y;
1940
1948
  }
1941
1949
  },
1942
- resetPassword: async (l, y, E) => {
1950
+ resetPassword: async (d, y, S) => {
1943
1951
  try {
1944
- return await r.resetPassword(l, y, E);
1945
- } catch (d) {
1946
- throw o(oe(d)), t(!0), d;
1952
+ return await r.resetPassword(d, y, S);
1953
+ } catch (h) {
1954
+ throw o(ne(h)), t(!0), h;
1947
1955
  }
1948
1956
  },
1949
1957
  isError: e,
@@ -1952,36 +1960,36 @@ const qr = ({
1952
1960
  t(!1), o("");
1953
1961
  }
1954
1962
  };
1955
- }, xr = () => /* @__PURE__ */ n(Qt, { p: "xl", style: { width: "100%", height: "100%" }, children: /* @__PURE__ */ C(Ee, { gap: "md", children: [
1956
- /* @__PURE__ */ C(de, { gap: "sm", children: [
1963
+ }, Cr = () => /* @__PURE__ */ n(er, { p: "xl", style: { width: "100%", height: "100%" }, children: /* @__PURE__ */ C(Ee, { gap: "md", children: [
1964
+ /* @__PURE__ */ C(ue, { gap: "sm", children: [
1957
1965
  /* @__PURE__ */ n(dt, { size: "sm" }),
1958
- /* @__PURE__ */ n(F, { size: "sm", c: "dimmed", children: "Carregando permissões..." })
1966
+ /* @__PURE__ */ n(j, { size: "sm", c: "dimmed", children: "Carregando permissões..." })
1959
1967
  ] }),
1960
1968
  /* @__PURE__ */ n(Ie, { height: 40, radius: "sm" }),
1961
1969
  /* @__PURE__ */ n(Ie, { height: 200, radius: "sm" }),
1962
- /* @__PURE__ */ C(de, { gap: "md", children: [
1970
+ /* @__PURE__ */ C(ue, { gap: "md", children: [
1963
1971
  /* @__PURE__ */ n(Ie, { height: 36, width: 100, radius: "sm" }),
1964
1972
  /* @__PURE__ */ n(Ie, { height: 36, width: 100, radius: "sm" })
1965
1973
  ] })
1966
- ] }) }), Ye = Ve(null), Qr = ({
1974
+ ] }) }), Ye = Ve(null), ts = ({
1967
1975
  children: r,
1968
1976
  user: e,
1969
1977
  onError: t
1970
1978
  }) => {
1971
- const [s, o] = p(!1), [a, c] = p(null), [i] = p([]), l = e?.isAdministrator || !1, y = Ce((g) => l ? !0 : i.includes(g), [i, l]), E = Ce((g) => l ? !0 : g.some((S) => i.includes(S)), [i, l]), d = Ce((g) => l ? !0 : g.every((S) => i.includes(S)), [i, l]), R = Ce((g) => {
1972
- c(g), g && t && t(g);
1979
+ const [s, o] = p(!1), [a, c] = p(null), [i] = p([]), d = e?.isAdministrator || !1, y = Ce((v) => d ? !0 : i.includes(v), [i, d]), S = Ce((v) => d ? !0 : v.some((E) => i.includes(E)), [i, d]), h = Ce((v) => d ? !0 : v.every((E) => i.includes(E)), [i, d]), U = Ce((v) => {
1980
+ c(v), v && t && t(v);
1973
1981
  }, [t]), A = {
1974
1982
  user: e,
1975
1983
  isLoading: s,
1976
1984
  hasGlobalPermission: y,
1977
- hasAnyGlobalPermission: E,
1978
- hasAllGlobalPermissions: d,
1979
- isAdmin: l,
1985
+ hasAnyGlobalPermission: S,
1986
+ hasAllGlobalPermissions: h,
1987
+ isAdmin: d,
1980
1988
  error: a,
1981
- setError: R
1989
+ setError: U
1982
1990
  };
1983
1991
  return /* @__PURE__ */ n(Ye.Provider, { value: A, children: r });
1984
- }, Nt = Ve(null), kr = ({
1992
+ }, Mt = Ve(null), Ir = ({
1985
1993
  children: r,
1986
1994
  resourceName: e,
1987
1995
  resourceDescription: t,
@@ -1991,38 +1999,38 @@ const qr = ({
1991
1999
  onSecurityReady: c,
1992
2000
  onError: i
1993
2001
  }) => {
1994
- const l = We(Ye);
1995
- if (!l)
2002
+ const d = We(Ye);
2003
+ if (!d)
1996
2004
  throw new Error("ArchbaseViewSecurityProvider deve ser usado dentro de um ArchbaseSecurityProvider");
1997
- const { user: y, isAdmin: E } = l, [d, R] = p(null), [A, g] = p(!0), [S, D] = p(null);
2005
+ const { user: y, isAdmin: S } = d, [h, U] = p(null), [A, v] = p(!0), [E, I] = p(null);
1998
2006
  if (it.useEffect(() => {
1999
2007
  if (!y) {
2000
- g(!1);
2008
+ v(!1);
2001
2009
  return;
2002
2010
  }
2003
- const w = new wt(e, t, E);
2011
+ const m = new wt(e, t, S);
2004
2012
  (async () => {
2005
- g(!0);
2013
+ v(!0);
2006
2014
  try {
2007
- await w.apply(() => {
2008
- R(w), g(!1), c && c(w);
2015
+ await m.apply(() => {
2016
+ U(m), v(!1), c && c(m);
2009
2017
  });
2010
2018
  } catch {
2011
- const O = w.getError() || "Erro ao carregar permissões";
2012
- D(O), g(!1), i && i(O);
2019
+ const O = m.getError() || "Erro ao carregar permissões";
2020
+ I(O), v(!1), i && i(O);
2013
2021
  }
2014
2022
  })();
2015
- }, [e, t, y, E, c, i]), A)
2016
- return a ? /* @__PURE__ */ n(ne, { children: a }) : /* @__PURE__ */ n(xr, {});
2017
- if (S)
2023
+ }, [e, t, y, S, c, i]), A)
2024
+ return a ? /* @__PURE__ */ n(ie, { children: a }) : /* @__PURE__ */ n(Cr, {});
2025
+ if (E)
2018
2026
  return /* @__PURE__ */ n("div", { className: "archbase-security-error", children: /* @__PURE__ */ C("div", { children: [
2019
2027
  "Erro ao carregar permissões: ",
2020
- S
2028
+ E
2021
2029
  ] }) });
2022
2030
  if (!y)
2023
2031
  return o || /* @__PURE__ */ n("div", { className: "archbase-security-no-user", children: /* @__PURE__ */ n("div", { children: "É necessário fazer login para acessar esta área" }) });
2024
- if (s.length > 0 && d && !s.every(
2025
- (T) => d.hasPermission(T)
2032
+ if (s.length > 0 && h && !s.every(
2033
+ (R) => h.hasPermission(R)
2026
2034
  ))
2027
2035
  return o || /* @__PURE__ */ C("div", { className: "archbase-security-access-denied", children: [
2028
2036
  /* @__PURE__ */ n("div", { children: "Você não possui permissão para acessar esta área" }),
@@ -2032,29 +2040,29 @@ const qr = ({
2032
2040
  ] })
2033
2041
  ] });
2034
2042
  const b = {
2035
- securityManager: d,
2036
- hasPermission: (w) => d?.hasPermission(w) || !1,
2037
- hasAnyPermission: (w) => w.some((T) => d?.hasPermission(T) || !1),
2038
- hasAllPermissions: (w) => w.every((T) => d?.hasPermission(T) || !1),
2039
- registerAction: (w, T) => {
2040
- d?.registerAction(w, T);
2043
+ securityManager: h,
2044
+ hasPermission: (m) => h?.hasPermission(m) || !1,
2045
+ hasAnyPermission: (m) => m.some((R) => h?.hasPermission(R) || !1),
2046
+ hasAllPermissions: (m) => m.every((R) => h?.hasPermission(R) || !1),
2047
+ registerAction: (m, R) => {
2048
+ h?.registerAction(m, R);
2041
2049
  },
2042
2050
  isLoading: A,
2043
- error: S
2051
+ error: E
2044
2052
  };
2045
- return /* @__PURE__ */ n(Nt.Provider, { value: b, children: r });
2046
- }, Sr = () => {
2053
+ return /* @__PURE__ */ n(Mt.Provider, { value: b, children: r });
2054
+ }, Pr = () => {
2047
2055
  const r = We(Ye);
2048
2056
  if (!r)
2049
2057
  throw new Error("useArchbaseSecurity deve ser usado dentro de um ArchbaseSecurityProvider");
2050
2058
  return r;
2051
2059
  }, Xe = () => {
2052
- const r = We(Nt);
2060
+ const r = We(Mt);
2053
2061
  if (!r)
2054
2062
  throw new Error("useArchbaseViewSecurity deve ser usado dentro de um ArchbaseViewSecurityProvider");
2055
2063
  return r;
2056
- }, Zr = (r, e) => {
2057
- const t = Xe(), { hasPermission: s, hasAnyPermission: o, hasAllPermissions: a, registerAction: c, securityManager: i, isLoading: l, error: y } = t;
2064
+ }, rs = (r, e) => {
2065
+ const t = Xe(), { hasPermission: s, hasAnyPermission: o, hasAllPermissions: a, registerAction: c, securityManager: i, isLoading: d, error: y } = t;
2058
2066
  return it.useEffect(() => {
2059
2067
  r && e && (c("create", `Criar ${e}`), c("edit", `Editar ${e}`), c("delete", `Deletar ${e}`), c("view", `Visualizar ${e}`), c("list", `Listar ${e}`));
2060
2068
  }, [r, e, c]), {
@@ -2068,18 +2076,18 @@ const qr = ({
2068
2076
  canDelete: s("delete"),
2069
2077
  canView: s("view"),
2070
2078
  canList: s("list"),
2071
- isLoading: l,
2079
+ isLoading: d,
2072
2080
  error: y
2073
2081
  };
2074
- }, es = () => {
2082
+ }, ss = () => {
2075
2083
  const r = Xe();
2076
2084
  return {
2077
2085
  check: r.hasPermission,
2078
2086
  checkAny: r.hasAnyPermission,
2079
2087
  checkAll: r.hasAllPermissions,
2080
- isAdmin: Sr().isAdmin
2088
+ isAdmin: Pr().isAdmin
2081
2089
  };
2082
- }, Mt = ({
2090
+ }, Nt = ({
2083
2091
  children: r,
2084
2092
  actionName: e,
2085
2093
  requiredPermissions: t = [],
@@ -2088,13 +2096,13 @@ const qr = ({
2088
2096
  fallback: a = null,
2089
2097
  autoRegister: c = !0
2090
2098
  }) => {
2091
- const { hasPermission: i, hasAnyPermission: l, hasAllPermissions: y, registerAction: E } = Xe();
2092
- K(() => {
2093
- c && e && o && E(e, o);
2094
- }, [e, o, c, E]);
2095
- let d = !1;
2096
- return e ? d = i(e) : t.length > 0 ? d = s ? y(t) : l(t) : d = !0, d ? /* @__PURE__ */ n(ne, { children: r }) : /* @__PURE__ */ n(ne, { children: a });
2097
- }, ts = ({
2099
+ const { hasPermission: i, hasAnyPermission: d, hasAllPermissions: y, registerAction: S } = Xe();
2100
+ Y(() => {
2101
+ c && e && o && S(e, o);
2102
+ }, [e, o, c, S]);
2103
+ let h = !1;
2104
+ return e ? h = i(e) : t.length > 0 ? h = s ? y(t) : d(t) : h = !0, h ? /* @__PURE__ */ n(ie, { children: r }) : /* @__PURE__ */ n(ie, { children: a });
2105
+ }, os = ({
2098
2106
  actionName: r,
2099
2107
  actionDescription: e,
2100
2108
  children: t,
@@ -2103,14 +2111,14 @@ const qr = ({
2103
2111
  className: a = "",
2104
2112
  style: c = {},
2105
2113
  variant: i = "primary",
2106
- size: l = "medium",
2114
+ size: d = "medium",
2107
2115
  type: y = "button"
2108
2116
  }) => {
2109
- const E = () => {
2110
- const R = "archbase-secure-btn", A = `archbase-secure-btn--${i}`, g = `archbase-secure-btn--${l}`;
2111
- return `${R} ${A} ${g} ${a}`.trim();
2112
- }, d = () => {
2113
- const R = {
2117
+ const S = () => {
2118
+ const U = "archbase-secure-btn", A = `archbase-secure-btn--${i}`, v = `archbase-secure-btn--${d}`;
2119
+ return `${U} ${A} ${v} ${a}`.trim();
2120
+ }, h = () => {
2121
+ const U = {
2114
2122
  small: { padding: "4px 8px", fontSize: "12px" },
2115
2123
  medium: { padding: "8px 16px", fontSize: "14px" },
2116
2124
  large: { padding: "12px 24px", fontSize: "16px" }
@@ -2127,13 +2135,13 @@ const qr = ({
2127
2135
  cursor: o ? "not-allowed" : "pointer",
2128
2136
  fontWeight: "500",
2129
2137
  opacity: o ? 0.6 : 1,
2130
- ...R[l],
2138
+ ...U[d],
2131
2139
  ...A[i],
2132
2140
  ...c
2133
2141
  };
2134
2142
  };
2135
2143
  return /* @__PURE__ */ n(
2136
- Mt,
2144
+ Nt,
2137
2145
  {
2138
2146
  actionName: r,
2139
2147
  actionDescription: e,
@@ -2144,14 +2152,14 @@ const qr = ({
2144
2152
  type: y,
2145
2153
  onClick: s,
2146
2154
  disabled: o,
2147
- className: E(),
2148
- style: d(),
2155
+ className: S(),
2156
+ style: h(),
2149
2157
  children: t
2150
2158
  }
2151
2159
  )
2152
2160
  }
2153
2161
  );
2154
- }, rs = ({
2162
+ }, ns = ({
2155
2163
  children: r,
2156
2164
  actionName: e,
2157
2165
  actionDescription: t,
@@ -2160,7 +2168,7 @@ const qr = ({
2160
2168
  fallbackText: a = "Campo não disponível",
2161
2169
  fallbackComponent: c
2162
2170
  }) => e ? /* @__PURE__ */ n(
2163
- Mt,
2171
+ Nt,
2164
2172
  {
2165
2173
  actionName: e,
2166
2174
  actionDescription: t,
@@ -2180,12 +2188,12 @@ const qr = ({
2180
2188
  ] }),
2181
2189
  children: r
2182
2190
  }
2183
- ) : /* @__PURE__ */ n(ne, { children: r });
2184
- function ss(r, e) {
2191
+ ) : /* @__PURE__ */ n(ie, { children: r });
2192
+ function is(r, e) {
2185
2193
  return function(s) {
2186
2194
  const { resourceName: o, resourceDescription: a, requiredPermissions: c, fallbackComponent: i } = e;
2187
2195
  return /* @__PURE__ */ n(
2188
- kr,
2196
+ Ir,
2189
2197
  {
2190
2198
  resourceName: o,
2191
2199
  resourceDescription: a,
@@ -2198,75 +2206,75 @@ function ss(r, e) {
2198
2206
  }
2199
2207
  export {
2200
2208
  Rt as ARCHBASE_SECURITY_MANAGER_STORE,
2201
- vr as AccessIntervalDto,
2209
+ Er as AccessIntervalDto,
2202
2210
  At as AccessScheduleDto,
2203
2211
  qe as AccessTokenDto,
2204
- br as ActionDto,
2212
+ xr as ActionDto,
2205
2213
  Ke as ApiTokenDto,
2206
2214
  Dt as ArchbaseAccessTokenService,
2207
2215
  Ut as ArchbaseApiTokenService,
2208
- gr as ArchbaseAuthContext,
2209
- Fr as ArchbaseAuthProvider,
2216
+ vr as ArchbaseAuthContext,
2217
+ Hr as ArchbaseAuthProvider,
2210
2218
  Pt as ArchbaseGroupService,
2211
- Hr as ArchbaseLogin,
2212
- Gr as ArchbaseMfaSetup,
2219
+ Kr as ArchbaseLogin,
2220
+ qr as ArchbaseMfaSetup,
2213
2221
  Tt as ArchbaseProfileService,
2214
- Mt as ArchbaseProtectedComponent,
2215
- Jr as ArchbaseResetPassword,
2222
+ Nt as ArchbaseProtectedComponent,
2223
+ Yr as ArchbaseResetPassword,
2216
2224
  _t as ArchbaseResourceService,
2217
- ts as ArchbaseSecureActionButton,
2218
- rs as ArchbaseSecureFormField,
2225
+ os as ArchbaseSecureActionButton,
2226
+ ns as ArchbaseSecureFormField,
2219
2227
  wt as ArchbaseSecurityManager,
2220
- Qr as ArchbaseSecurityProvider,
2221
- J as ArchbaseTenantManager,
2228
+ ts as ArchbaseSecurityProvider,
2229
+ q as ArchbaseTenantManager,
2222
2230
  ht as ArchbaseUser,
2223
2231
  It as ArchbaseUserService,
2224
2232
  pt as ArchbaseUsernameAndPassword,
2225
2233
  pt as ArchbaseUsernameAndPasswordImpl,
2226
- kr as ArchbaseViewSecurityProvider,
2234
+ Ir as ArchbaseViewSecurityProvider,
2227
2235
  Oe as CONTEXT_STORAGE_KEY,
2228
- tr as DefaultArchbaseTokenManager,
2229
- xr as DefaultSecurityLoading,
2230
- ce as ENCRYPTION_KEY,
2236
+ or as DefaultArchbaseTokenManager,
2237
+ Cr as DefaultSecurityLoading,
2238
+ le as ENCRYPTION_KEY,
2231
2239
  mt as FetchError,
2232
2240
  Se as GroupDto,
2233
- Wr as PermissionDto,
2241
+ Jr as PermissionDto,
2234
2242
  ke as ProfileDto,
2235
2243
  St as ResourceDto,
2236
- we as SecurityDto,
2237
- ge as SecurityType,
2238
- Me as TOKEN_COOKIE_NAME,
2239
- wr as TipoRecurso,
2244
+ ye as SecurityDto,
2245
+ me as SecurityType,
2246
+ Ne as TOKEN_COOKIE_NAME,
2247
+ Ar as TipoRecurso,
2240
2248
  Le as USER_NAME,
2241
2249
  Be as USER_NAME_AND_PASSWORD,
2242
- Ne as UserDto,
2250
+ Me as UserDto,
2243
2251
  Ge as UserGroupDto,
2244
- hr as createInternalConfig,
2252
+ mr as createInternalConfig,
2245
2253
  Te as decodeJWT,
2246
- fe as epochAtSecondsFromNow,
2254
+ pe as epochAtSecondsFromNow,
2247
2255
  nt as epochTimeIsPast,
2248
- cr as fetchTokens,
2249
- lr as fetchWithRefreshToken,
2250
- sr as generateCodeChallenge,
2251
- rr as generateRandomString,
2256
+ ur as fetchTokens,
2257
+ hr as fetchWithRefreshToken,
2258
+ ir as generateCodeChallenge,
2259
+ nr as generateRandomString,
2252
2260
  ft as getRandomInteger,
2253
- mr as getRefreshExpiresIn,
2261
+ wr as getRefreshExpiresIn,
2254
2262
  $e as isCredentialsExpiredError,
2255
- nr as postWithXForm,
2256
- ir as redirectToLogin,
2257
- dr as redirectToLogout,
2258
- qr as useArchbaseAuthenticationManager,
2259
- Yr as useArchbaseGetCurrentToken,
2260
- Er as useArchbaseGetLoggedUser,
2261
- es as useArchbasePermissionCheck,
2262
- Xr as useArchbaseResetPassword,
2263
- Zr as useArchbaseSecureForm,
2264
- Sr as useArchbaseSecurity,
2265
- Kr as useArchbaseSecurityManager,
2266
- Vr as useArchbaseTenantManager,
2263
+ cr as postWithXForm,
2264
+ lr as redirectToLogin,
2265
+ pr as redirectToLogout,
2266
+ Qr as useArchbaseAuthenticationManager,
2267
+ Zr as useArchbaseGetCurrentToken,
2268
+ Sr as useArchbaseGetLoggedUser,
2269
+ ss as useArchbasePermissionCheck,
2270
+ es as useArchbaseResetPassword,
2271
+ rs as useArchbaseSecureForm,
2272
+ Pr as useArchbaseSecurity,
2273
+ Xr as useArchbaseSecurityManager,
2274
+ Gr as useArchbaseTenantManager,
2267
2275
  Xe as useArchbaseViewSecurity,
2268
- jr as useBrowserStorage,
2269
- pr as validateConfig,
2270
- ur as validateState,
2271
- ss as withArchbaseSecurity
2276
+ Wr as useBrowserStorage,
2277
+ gr as validateConfig,
2278
+ fr as validateState,
2279
+ is as withArchbaseSecurity
2272
2280
  };