@archbase/security 4.0.40 → 4.0.41
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,20 +1,20 @@
|
|
|
1
1
|
import "reflect-metadata";
|
|
2
|
-
import * as
|
|
3
|
-
import { decorate as
|
|
4
|
-
import { compressString as
|
|
2
|
+
import * as P from "inversify";
|
|
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
5
|
import G from "crypto-js";
|
|
6
|
-
import { jwtDecode as
|
|
7
|
-
import { jsx as n, jsxs as
|
|
8
|
-
import
|
|
9
|
-
import { BehaviorSubject as
|
|
10
|
-
import { ArchbaseRemoteApiService as
|
|
11
|
-
import { v4 as
|
|
12
|
-
import { Card as
|
|
13
|
-
import { useFocusTrap as
|
|
14
|
-
import { IconCopy as
|
|
15
|
-
import { ArchbaseQRCode as
|
|
16
|
-
import { useContainer as
|
|
17
|
-
class
|
|
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";
|
|
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";
|
|
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";
|
|
16
|
+
import { useContainer as De } from "inversify-react";
|
|
17
|
+
class ht {
|
|
18
18
|
id;
|
|
19
19
|
displayName;
|
|
20
20
|
email;
|
|
@@ -24,10 +24,10 @@ class dt {
|
|
|
24
24
|
this.id = e.id, this.displayName = e.displayName, this.email = e.email, this.photo = e.photo, this.isAdmin = e.isAdmin;
|
|
25
25
|
}
|
|
26
26
|
static newInstance() {
|
|
27
|
-
return new
|
|
27
|
+
return new ht({});
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
|
-
class
|
|
30
|
+
class pt {
|
|
31
31
|
username;
|
|
32
32
|
password;
|
|
33
33
|
remember;
|
|
@@ -35,16 +35,16 @@ class ut {
|
|
|
35
35
|
this.username = e.username, this.password = e.password, this.remember = e.remember;
|
|
36
36
|
}
|
|
37
37
|
static newInstance() {
|
|
38
|
-
return new
|
|
38
|
+
return new pt({});
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
|
-
const
|
|
42
|
-
class
|
|
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 {
|
|
43
43
|
getUsernameAndPassword() {
|
|
44
44
|
try {
|
|
45
|
-
const e = localStorage.getItem(
|
|
45
|
+
const e = localStorage.getItem(Be);
|
|
46
46
|
if (e) {
|
|
47
|
-
const t = G.AES.decrypt(e,
|
|
47
|
+
const t = G.AES.decrypt(e, ce).toString(G.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 Zt {
|
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
saveUsernameAndPassword(e, t) {
|
|
56
|
-
const s = btoa(`${e}:${t}`), o = G.AES.encrypt(s,
|
|
57
|
-
localStorage.setItem(
|
|
56
|
+
const s = btoa(`${e}:${t}`), o = G.AES.encrypt(s, ce).toString();
|
|
57
|
+
localStorage.setItem(Be, o);
|
|
58
58
|
}
|
|
59
59
|
getUsername() {
|
|
60
60
|
try {
|
|
61
|
-
const e = localStorage.getItem(
|
|
61
|
+
const e = localStorage.getItem(Le);
|
|
62
62
|
if (e) {
|
|
63
|
-
const t = G.AES.decrypt(e,
|
|
63
|
+
const t = G.AES.decrypt(e, ce).toString(G.enc.Utf8);
|
|
64
64
|
return atob(t);
|
|
65
65
|
} else
|
|
66
66
|
return null;
|
|
@@ -69,15 +69,15 @@ class Zt {
|
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
71
|
saveUsername(e) {
|
|
72
|
-
const t = btoa(e), s = G.AES.encrypt(t,
|
|
73
|
-
localStorage.setItem(
|
|
72
|
+
const t = btoa(e), s = G.AES.encrypt(t, ce).toString();
|
|
73
|
+
localStorage.setItem(Le, s);
|
|
74
74
|
}
|
|
75
75
|
isTokenExpired(e, t = 300) {
|
|
76
76
|
let s = e;
|
|
77
77
|
if (!s && !this.getToken())
|
|
78
78
|
return !0;
|
|
79
79
|
try {
|
|
80
|
-
const o =
|
|
80
|
+
const o = Gt(s.access_token);
|
|
81
81
|
if (!o)
|
|
82
82
|
return !0;
|
|
83
83
|
const a = Math.floor(Date.now() / 1e3), c = o.exp;
|
|
@@ -88,13 +88,13 @@ class Zt {
|
|
|
88
88
|
}
|
|
89
89
|
saveToken(e) {
|
|
90
90
|
if (e) {
|
|
91
|
-
const t = JSON.stringify(e), s = G.AES.encrypt(t,
|
|
91
|
+
const t = JSON.stringify(e), s = G.AES.encrypt(t, ce).toString(), o = Ot(s);
|
|
92
92
|
localStorage.setItem(Me, o);
|
|
93
93
|
} else
|
|
94
94
|
this.clearToken();
|
|
95
95
|
}
|
|
96
96
|
clearUsernameAndPassword() {
|
|
97
|
-
localStorage.removeItem(
|
|
97
|
+
localStorage.removeItem(Be), localStorage.removeItem(Le);
|
|
98
98
|
}
|
|
99
99
|
clearToken() {
|
|
100
100
|
localStorage.removeItem(Me);
|
|
@@ -104,7 +104,7 @@ class Zt {
|
|
|
104
104
|
const e = localStorage.getItem(Me);
|
|
105
105
|
if (!e)
|
|
106
106
|
return null;
|
|
107
|
-
const t =
|
|
107
|
+
const t = $t(e), s = G.AES.decrypt(t, ce).toString(G.enc.Utf8);
|
|
108
108
|
return JSON.parse(s);
|
|
109
109
|
} catch {
|
|
110
110
|
return null;
|
|
@@ -112,7 +112,7 @@ class Zt {
|
|
|
112
112
|
}
|
|
113
113
|
saveContext(e) {
|
|
114
114
|
try {
|
|
115
|
-
const t = G.AES.encrypt(e,
|
|
115
|
+
const t = G.AES.encrypt(e, ce).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 Zt {
|
|
|
121
121
|
getContext() {
|
|
122
122
|
try {
|
|
123
123
|
const e = localStorage.getItem(Oe);
|
|
124
|
-
return e ? G.AES.decrypt(e,
|
|
124
|
+
return e ? G.AES.decrypt(e, ce).toString(G.enc.Utf8) : null;
|
|
125
125
|
} catch {
|
|
126
126
|
return null;
|
|
127
127
|
}
|
|
@@ -130,19 +130,19 @@ class Zt {
|
|
|
130
130
|
localStorage.removeItem(Oe);
|
|
131
131
|
}
|
|
132
132
|
}
|
|
133
|
-
|
|
134
|
-
function
|
|
133
|
+
Bt(Lt(), tr);
|
|
134
|
+
function ft(r) {
|
|
135
135
|
const t = new Uint8Array(1);
|
|
136
|
-
return window.crypto.getRandomValues(t), t[0] >= Math.floor(256 / r) * r ?
|
|
136
|
+
return window.crypto.getRandomValues(t), t[0] >= Math.floor(256 / r) * r ? ft(r) : t[0] % r;
|
|
137
137
|
}
|
|
138
|
-
function
|
|
138
|
+
function rr(r) {
|
|
139
139
|
let e = "";
|
|
140
140
|
const t = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
|
|
141
141
|
for (let s = 0; s < r; s++)
|
|
142
|
-
e += t.charAt(
|
|
142
|
+
e += t.charAt(ft(t.length - 1));
|
|
143
143
|
return e;
|
|
144
144
|
}
|
|
145
|
-
async function
|
|
145
|
+
async function sr(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"
|
|
@@ -150,36 +150,36 @@ async function tr(r) {
|
|
|
150
150
|
const t = new TextEncoder().encode(r), s = await window.crypto.subtle.digest("SHA-256", t), o = String.fromCharCode(...new Uint8Array(s));
|
|
151
151
|
return btoa(o).replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_");
|
|
152
152
|
}
|
|
153
|
-
class
|
|
153
|
+
class mt extends Error {
|
|
154
154
|
status;
|
|
155
155
|
statusText;
|
|
156
156
|
constructor(e, t, s) {
|
|
157
157
|
super(s), this.name = "FetchError", this.status = e, this.statusText = t;
|
|
158
158
|
}
|
|
159
159
|
}
|
|
160
|
-
function
|
|
160
|
+
function or(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
|
|
166
|
+
async function nr(r, e) {
|
|
167
167
|
return fetch(r, {
|
|
168
168
|
method: "POST",
|
|
169
|
-
body:
|
|
169
|
+
body: or(e),
|
|
170
170
|
headers: { "Content-Type": "application/x-www-form-urlencoded" }
|
|
171
171
|
}).then(async (t) => {
|
|
172
172
|
if (!t.ok) {
|
|
173
173
|
const s = await t.text();
|
|
174
|
-
throw new
|
|
174
|
+
throw new mt(t.status, t.statusText, s);
|
|
175
175
|
}
|
|
176
176
|
return t;
|
|
177
177
|
});
|
|
178
178
|
}
|
|
179
|
-
const
|
|
180
|
-
async function
|
|
181
|
-
const t =
|
|
182
|
-
return sessionStorage.setItem(
|
|
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) => {
|
|
183
183
|
const o = new URLSearchParams({
|
|
184
184
|
response_type: "code",
|
|
185
185
|
client_id: r.clientId,
|
|
@@ -188,23 +188,23 @@ async function or(r, e) {
|
|
|
188
188
|
code_challenge_method: "S256",
|
|
189
189
|
...r.extraAuthParameters
|
|
190
190
|
});
|
|
191
|
-
r.scope !== void 0 && o.append("scope", r.scope), sessionStorage.removeItem(
|
|
191
|
+
r.scope !== void 0 && o.append("scope", r.scope), sessionStorage.removeItem(je);
|
|
192
192
|
const a = e ?? r.state;
|
|
193
|
-
a && (sessionStorage.setItem(
|
|
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
|
|
196
|
+
function ar(r) {
|
|
197
197
|
return r.access_token !== void 0;
|
|
198
198
|
}
|
|
199
|
-
function
|
|
200
|
-
return
|
|
201
|
-
if (
|
|
199
|
+
function yt(r, e) {
|
|
200
|
+
return nr(r, e).then((t) => t.json().then((s) => {
|
|
201
|
+
if (ar(s))
|
|
202
202
|
return s;
|
|
203
203
|
throw Error(s);
|
|
204
204
|
}));
|
|
205
205
|
}
|
|
206
|
-
const
|
|
207
|
-
const t = new URLSearchParams(window.location.search).get("code"), s = window.sessionStorage.getItem(
|
|
206
|
+
const cr = (r) => {
|
|
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.
|
|
210
210
|
A autenticação ocorreu?`);
|
|
@@ -221,8 +221,8 @@ A autenticação ocorreu?`);
|
|
|
221
221
|
...r.extraTokenParameters,
|
|
222
222
|
...r.extraAuthParams
|
|
223
223
|
};
|
|
224
|
-
return
|
|
225
|
-
},
|
|
224
|
+
return yt(r.tokenEndpoint, o);
|
|
225
|
+
}, lr = (r) => {
|
|
226
226
|
const { config: e, refreshToken: t } = r, s = {
|
|
227
227
|
grant_type: "refresh_token",
|
|
228
228
|
refresh_token: t,
|
|
@@ -231,9 +231,9 @@ A autenticação ocorreu?`);
|
|
|
231
231
|
redirect_uri: e.redirectUri,
|
|
232
232
|
...e.extraTokenParameters
|
|
233
233
|
};
|
|
234
|
-
return
|
|
234
|
+
return yt(e.tokenEndpoint, s);
|
|
235
235
|
};
|
|
236
|
-
function
|
|
236
|
+
function dr(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",
|
|
@@ -244,15 +244,15 @@ function cr(r, e, t, s, o, a) {
|
|
|
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
|
|
248
|
-
const e = r.get("state"), t = sessionStorage.getItem(
|
|
247
|
+
function ur(r) {
|
|
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
|
|
255
|
-
const s = t === "session" ? sessionStorage : localStorage, [o, a] =
|
|
254
|
+
function le(r, e, t) {
|
|
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;
|
|
@@ -282,14 +282,14 @@ Error: ${l.message}`
|
|
|
282
282
|
return window.addEventListener("storage", i, !1), () => window.removeEventListener("storage", i, !1);
|
|
283
283
|
}), [o, c];
|
|
284
284
|
}
|
|
285
|
-
const
|
|
285
|
+
const jr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
286
286
|
__proto__: null,
|
|
287
|
-
default:
|
|
287
|
+
default: le
|
|
288
288
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
289
|
-
function
|
|
289
|
+
function Pe(r) {
|
|
290
290
|
return ["", void 0, null].includes(r);
|
|
291
291
|
}
|
|
292
|
-
function
|
|
292
|
+
function hr(r) {
|
|
293
293
|
const {
|
|
294
294
|
autoLogin: e = !0,
|
|
295
295
|
clearURL: t = !0,
|
|
@@ -299,7 +299,7 @@ function dr(r) {
|
|
|
299
299
|
postLogin: c = () => null,
|
|
300
300
|
onRefreshTokenExpire: i = void 0,
|
|
301
301
|
storage: l = "local"
|
|
302
|
-
} = r,
|
|
302
|
+
} = r, y = {
|
|
303
303
|
...r,
|
|
304
304
|
autoLogin: e,
|
|
305
305
|
clearURL: t,
|
|
@@ -310,22 +310,22 @@ function dr(r) {
|
|
|
310
310
|
onRefreshTokenExpire: i,
|
|
311
311
|
storage: l
|
|
312
312
|
};
|
|
313
|
-
return
|
|
313
|
+
return pr(y), y;
|
|
314
314
|
}
|
|
315
|
-
function
|
|
316
|
-
if (
|
|
315
|
+
function pr(r) {
|
|
316
|
+
if (Pe(r?.clientId))
|
|
317
317
|
throw Error(
|
|
318
318
|
"'clientId' deve ser definido no objeto 'ArchbaseAuthConfig' passado para ArchbaseAuthProvider"
|
|
319
319
|
);
|
|
320
|
-
if (
|
|
320
|
+
if (Pe(r?.authorizationEndpoint))
|
|
321
321
|
throw Error(
|
|
322
322
|
"'authorizationEndpoint' deve ser definido no objeto 'ArchbaseAuthConfig' passado para ArchbaseAuthProvider"
|
|
323
323
|
);
|
|
324
|
-
if (
|
|
324
|
+
if (Pe(r?.tokenEndpoint))
|
|
325
325
|
throw Error(
|
|
326
326
|
"'tokenEndpoint' deve ser definido no objeto 'ArchbaseAuthConfig' passado para ArchbaseAuthProvider"
|
|
327
327
|
);
|
|
328
|
-
if (
|
|
328
|
+
if (Pe(r?.redirectUri))
|
|
329
329
|
throw Error(
|
|
330
330
|
"'redirectUri' deve ser definido no objeto 'ArchbaseAuthConfig' passado para ArchbaseAuthProvider"
|
|
331
331
|
);
|
|
@@ -337,23 +337,23 @@ function ur(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
|
|
341
|
-
function
|
|
340
|
+
const me = 600, fe = (r) => Math.round(Date.now() / 1e3 + r);
|
|
341
|
+
function nt(r) {
|
|
342
342
|
return Math.round(Date.now()) / 1e3 + 30 >= r;
|
|
343
343
|
}
|
|
344
|
-
const
|
|
344
|
+
const fr = [
|
|
345
345
|
"refresh_expires_in",
|
|
346
346
|
// KeyCloak
|
|
347
347
|
"refresh_token_expires_in"
|
|
348
348
|
// Azure AD
|
|
349
349
|
];
|
|
350
|
-
function
|
|
351
|
-
for (const t of
|
|
350
|
+
function mr(r, e) {
|
|
351
|
+
for (const t of fr)
|
|
352
352
|
if (t in e)
|
|
353
353
|
return e[t];
|
|
354
|
-
return e.refresh_token ? r +
|
|
354
|
+
return e.refresh_token ? r + me : r;
|
|
355
355
|
}
|
|
356
|
-
const
|
|
356
|
+
const Te = (r) => {
|
|
357
357
|
try {
|
|
358
358
|
const t = r.split(".")[1].replace(/-/g, "+").replace(/_/g, "/"), s = decodeURIComponent(
|
|
359
359
|
atob(t).split("").map(function(o) {
|
|
@@ -368,86 +368,86 @@ const Pe = (r) => {
|
|
|
368
368
|
Você pode desativar a decodificação JWT definindo o valor 'decodeToken' como 'falso' na configuração.`
|
|
369
369
|
);
|
|
370
370
|
}
|
|
371
|
-
},
|
|
371
|
+
}, gr = Ve({
|
|
372
372
|
token: "",
|
|
373
373
|
login: () => null,
|
|
374
374
|
logOut: () => null,
|
|
375
375
|
error: null,
|
|
376
376
|
loginInProgress: !1
|
|
377
|
-
}),
|
|
378
|
-
const t =
|
|
377
|
+
}), Fr = ({ authConfig: r, children: e }) => {
|
|
378
|
+
const t = at(() => hr(r), [r]), [s, o] = le(
|
|
379
379
|
"ROCP_refreshToken",
|
|
380
380
|
void 0,
|
|
381
381
|
t.storage
|
|
382
|
-
), [a, c] =
|
|
382
|
+
), [a, c] = le(
|
|
383
383
|
"ROCP_refreshTokenExpire",
|
|
384
|
-
|
|
384
|
+
fe(2 * me),
|
|
385
385
|
t.storage
|
|
386
|
-
), [i, l] =
|
|
386
|
+
), [i, l] = le("ROCP_token", "", t.storage), [y, E] = le(
|
|
387
387
|
"ROCP_tokenExpire",
|
|
388
|
-
|
|
388
|
+
fe(me),
|
|
389
389
|
t.storage
|
|
390
|
-
), [d,
|
|
390
|
+
), [d, R] = le(
|
|
391
391
|
"ROCP_idToken",
|
|
392
392
|
void 0,
|
|
393
393
|
t.storage
|
|
394
|
-
), [
|
|
394
|
+
), [A, g] = le(
|
|
395
395
|
"ROCP_loginInProgress",
|
|
396
396
|
!1,
|
|
397
397
|
t.storage
|
|
398
|
-
), [S, D] =
|
|
398
|
+
), [S, D] = le(
|
|
399
399
|
"ROCP_refreshInProgress",
|
|
400
400
|
!1,
|
|
401
401
|
t.storage
|
|
402
|
-
), [
|
|
403
|
-
let
|
|
404
|
-
function
|
|
405
|
-
o(void 0), l(""), E(
|
|
406
|
-
}
|
|
407
|
-
function
|
|
408
|
-
|
|
409
|
-
}
|
|
410
|
-
function L(
|
|
411
|
-
|
|
412
|
-
let
|
|
413
|
-
|
|
414
|
-
`O estado de login aprovado deve ser do tipo 'string'. Recebido'${
|
|
415
|
-
),
|
|
416
|
-
console.error(
|
|
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);
|
|
417
417
|
});
|
|
418
418
|
}
|
|
419
|
-
function
|
|
420
|
-
l(
|
|
421
|
-
const
|
|
422
|
-
E(
|
|
423
|
-
const
|
|
424
|
-
c(
|
|
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);
|
|
425
425
|
try {
|
|
426
|
-
|
|
427
|
-
} catch (
|
|
428
|
-
console.warn(`Falha ao decodificar idToken: ${
|
|
426
|
+
f.id_token && M(Te(f.id_token));
|
|
427
|
+
} catch (I) {
|
|
428
|
+
console.warn(`Falha ao decodificar idToken: ${I.message}`);
|
|
429
429
|
}
|
|
430
430
|
try {
|
|
431
|
-
t.decodeToken &&
|
|
432
|
-
} catch (
|
|
433
|
-
console.warn(`Falha ao decodificar o token de acesso: ${
|
|
431
|
+
t.decodeToken && B(Te(f.access_token));
|
|
432
|
+
} catch (I) {
|
|
433
|
+
console.warn(`Falha ao decodificar o token de acesso: ${I.message}`);
|
|
434
434
|
}
|
|
435
435
|
}
|
|
436
|
-
function
|
|
437
|
-
return
|
|
436
|
+
function Z(f = !1) {
|
|
437
|
+
return f || !t.onRefreshTokenExpire ? L() : t.onRefreshTokenExpire({ login: L });
|
|
438
438
|
}
|
|
439
|
-
function
|
|
440
|
-
if (i &&
|
|
441
|
-
if (
|
|
442
|
-
return
|
|
439
|
+
function q(f = !1) {
|
|
440
|
+
if (i && nt(y) && !(S && !f)) {
|
|
441
|
+
if (nt(a))
|
|
442
|
+
return Z(f);
|
|
443
443
|
if (s) {
|
|
444
|
-
D(!0),
|
|
445
|
-
if (
|
|
446
|
-
if (
|
|
447
|
-
return
|
|
448
|
-
console.error(
|
|
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();
|
|
449
449
|
} else
|
|
450
|
-
|
|
450
|
+
v instanceof Error && (console.error(v), w(v.message), f && L());
|
|
451
451
|
}).finally(() => {
|
|
452
452
|
D(!1);
|
|
453
453
|
});
|
|
@@ -458,29 +458,29 @@ const Pe = (r) => {
|
|
|
458
458
|
);
|
|
459
459
|
}
|
|
460
460
|
}
|
|
461
|
-
K(() => (
|
|
462
|
-
const
|
|
461
|
+
K(() => (T = setInterval(() => q(), 1e4), () => clearInterval(T)), [i, s, a, y]);
|
|
462
|
+
const re = ct(!1);
|
|
463
463
|
return K(() => {
|
|
464
|
-
if (
|
|
465
|
-
const
|
|
466
|
-
if (!
|
|
467
|
-
const
|
|
468
|
-
console.error(
|
|
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();
|
|
469
469
|
return;
|
|
470
470
|
}
|
|
471
|
-
if (!
|
|
472
|
-
|
|
471
|
+
if (!re.current) {
|
|
472
|
+
re.current = !0;
|
|
473
473
|
try {
|
|
474
|
-
|
|
475
|
-
} catch (
|
|
476
|
-
console.error(
|
|
474
|
+
ur(f);
|
|
475
|
+
} catch (v) {
|
|
476
|
+
console.error(v), w(v.message);
|
|
477
477
|
}
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
}).catch((
|
|
481
|
-
console.error(
|
|
478
|
+
cr(t).then((v) => {
|
|
479
|
+
U(v), t?.postLogin && t.postLogin();
|
|
480
|
+
}).catch((v) => {
|
|
481
|
+
console.error(v), w(v.message);
|
|
482
482
|
}).finally(() => {
|
|
483
|
-
t.clearURL && window.history.replaceState(null, "", window.location.pathname),
|
|
483
|
+
t.clearURL && window.history.replaceState(null, "", window.location.pathname), g(!1);
|
|
484
484
|
});
|
|
485
485
|
}
|
|
486
486
|
return;
|
|
@@ -488,25 +488,25 @@ const Pe = (r) => {
|
|
|
488
488
|
if (!i && t.autoLogin)
|
|
489
489
|
return L();
|
|
490
490
|
try {
|
|
491
|
-
d &&
|
|
492
|
-
} catch (
|
|
493
|
-
console.warn(`Falha ao decodificar idToken: ${
|
|
491
|
+
d && M(Te(d));
|
|
492
|
+
} catch (f) {
|
|
493
|
+
console.warn(`Falha ao decodificar idToken: ${f.message}`);
|
|
494
494
|
}
|
|
495
495
|
try {
|
|
496
|
-
t.decodeToken &&
|
|
497
|
-
} catch (
|
|
498
|
-
console.warn(`Falha ao decodificar o token de acesso: ${
|
|
496
|
+
t.decodeToken && B(Te(i));
|
|
497
|
+
} catch (f) {
|
|
498
|
+
console.warn(`Falha ao decodificar o token de acesso: ${f.message}`);
|
|
499
499
|
}
|
|
500
|
-
|
|
500
|
+
q(!0);
|
|
501
501
|
}, []), /* @__PURE__ */ n(
|
|
502
|
-
|
|
502
|
+
gr.Provider,
|
|
503
503
|
{
|
|
504
|
-
value: { token: i, tokenData:
|
|
504
|
+
value: { token: i, tokenData: N, idToken: d, idTokenData: W, login: L, logOut: O, error: b, loginInProgress: A },
|
|
505
505
|
children: e
|
|
506
506
|
}
|
|
507
507
|
);
|
|
508
508
|
};
|
|
509
|
-
class
|
|
509
|
+
class wt {
|
|
510
510
|
resourceService;
|
|
511
511
|
resource;
|
|
512
512
|
actions;
|
|
@@ -515,7 +515,7 @@ class gt {
|
|
|
515
515
|
error;
|
|
516
516
|
isAdmin;
|
|
517
517
|
constructor(e, t, s) {
|
|
518
|
-
this.resourceService =
|
|
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;
|
|
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 });
|
|
@@ -588,8 +588,8 @@ class gt {
|
|
|
588
588
|
}
|
|
589
589
|
class J {
|
|
590
590
|
static instance;
|
|
591
|
-
_currentTenant = new
|
|
592
|
-
_availableTenants = new
|
|
591
|
+
_currentTenant = new Ze(null);
|
|
592
|
+
_availableTenants = new Ze([]);
|
|
593
593
|
constructor() {
|
|
594
594
|
const e = localStorage.getItem("tenant_info");
|
|
595
595
|
if (e)
|
|
@@ -629,15 +629,15 @@ class J {
|
|
|
629
629
|
return t && (e["X-TENANT-ID"] = t.id), e;
|
|
630
630
|
}
|
|
631
631
|
}
|
|
632
|
-
function
|
|
632
|
+
function Vr() {
|
|
633
633
|
return J.getInstance();
|
|
634
634
|
}
|
|
635
|
-
var
|
|
635
|
+
var ge = /* @__PURE__ */ ((r) => (r.USER = "user", r.PROFILE = "profile", r.GROUP = "group", r))(ge || {}), yr = 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 &&
|
|
639
|
-
},
|
|
640
|
-
const
|
|
638
|
+
return o && yr(e, t, o), o;
|
|
639
|
+
}, wr = /* @__PURE__ */ ((r) => (r.VIEW = "VIEW", r.API = "API", r))(wr || {});
|
|
640
|
+
const vt = class bt {
|
|
641
641
|
id;
|
|
642
642
|
code;
|
|
643
643
|
version;
|
|
@@ -648,20 +648,20 @@ const yt = class wt {
|
|
|
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
|
|
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)) : [];
|
|
652
652
|
}
|
|
653
|
-
static newInstance = () => new
|
|
654
|
-
id:
|
|
653
|
+
static newInstance = () => new bt({
|
|
654
|
+
id: Q(),
|
|
655
655
|
intervals: []
|
|
656
656
|
});
|
|
657
657
|
};
|
|
658
658
|
k([
|
|
659
|
-
|
|
659
|
+
X({
|
|
660
660
|
message: "archbase:Informe a descrição do cronograma de acesso"
|
|
661
661
|
})
|
|
662
|
-
],
|
|
663
|
-
let
|
|
664
|
-
const
|
|
662
|
+
], vt.prototype, "description");
|
|
663
|
+
let At = vt;
|
|
664
|
+
const _e = class Et {
|
|
665
665
|
id;
|
|
666
666
|
code;
|
|
667
667
|
version;
|
|
@@ -674,30 +674,30 @@ const De = class bt {
|
|
|
674
674
|
startTime;
|
|
675
675
|
endTime;
|
|
676
676
|
constructor(e) {
|
|
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
|
|
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
|
-
static newInstance = () => new
|
|
680
|
-
id:
|
|
679
|
+
static newInstance = () => new Et({
|
|
680
|
+
id: Q(),
|
|
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
|
-
|
|
688
|
-
],
|
|
687
|
+
ie()
|
|
688
|
+
], _e.prototype, "accessSchedule");
|
|
689
689
|
k([
|
|
690
|
-
|
|
690
|
+
X({
|
|
691
691
|
message: "archbase:Informe a hora de início"
|
|
692
692
|
})
|
|
693
|
-
],
|
|
693
|
+
], _e.prototype, "startTime");
|
|
694
694
|
k([
|
|
695
|
-
|
|
695
|
+
X({
|
|
696
696
|
message: "archbase:Informe a hora de término"
|
|
697
697
|
})
|
|
698
|
-
],
|
|
699
|
-
let
|
|
700
|
-
class
|
|
698
|
+
], _e.prototype, "endTime");
|
|
699
|
+
let vr = _e;
|
|
700
|
+
class we {
|
|
701
701
|
id;
|
|
702
702
|
code;
|
|
703
703
|
version;
|
|
@@ -713,19 +713,19 @@ class ge {
|
|
|
713
713
|
}
|
|
714
714
|
}
|
|
715
715
|
k([
|
|
716
|
-
|
|
716
|
+
X({
|
|
717
717
|
message: "archbase:Informe o nome"
|
|
718
718
|
})
|
|
719
|
-
],
|
|
719
|
+
], we.prototype, "name");
|
|
720
720
|
k([
|
|
721
|
-
|
|
721
|
+
X({
|
|
722
722
|
message: "archbase:Informe a descrição"
|
|
723
723
|
})
|
|
724
|
-
],
|
|
724
|
+
], we.prototype, "description");
|
|
725
725
|
k([
|
|
726
|
-
|
|
727
|
-
],
|
|
728
|
-
const
|
|
726
|
+
ie()
|
|
727
|
+
], we.prototype, "actions");
|
|
728
|
+
const ve = class xt {
|
|
729
729
|
id;
|
|
730
730
|
code;
|
|
731
731
|
version;
|
|
@@ -741,48 +741,48 @@ const ye = class At {
|
|
|
741
741
|
actionVersion;
|
|
742
742
|
isNewAction;
|
|
743
743
|
constructor(e) {
|
|
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
|
|
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
|
-
static newInstance = () => new
|
|
747
|
-
id:
|
|
746
|
+
static newInstance = () => new xt({
|
|
747
|
+
id: Q(),
|
|
748
748
|
active: !0,
|
|
749
749
|
isNewAction: !0
|
|
750
750
|
});
|
|
751
751
|
};
|
|
752
752
|
k([
|
|
753
|
-
|
|
753
|
+
X({
|
|
754
754
|
message: "archbase:Informe o nome para a ação"
|
|
755
755
|
})
|
|
756
|
-
],
|
|
756
|
+
], ve.prototype, "name");
|
|
757
757
|
k([
|
|
758
|
-
|
|
758
|
+
X({
|
|
759
759
|
message: "archbase:Informe a descrição para a ação"
|
|
760
760
|
})
|
|
761
|
-
],
|
|
761
|
+
], ve.prototype, "description");
|
|
762
762
|
k([
|
|
763
|
-
|
|
764
|
-
],
|
|
763
|
+
ie()
|
|
764
|
+
], ve.prototype, "resource");
|
|
765
765
|
k([
|
|
766
|
-
|
|
766
|
+
X({
|
|
767
767
|
message: "archbase:Informe a categoria para a ação"
|
|
768
768
|
})
|
|
769
|
-
],
|
|
769
|
+
], ve.prototype, "category");
|
|
770
770
|
k([
|
|
771
|
-
|
|
772
|
-
],
|
|
773
|
-
let
|
|
774
|
-
class
|
|
771
|
+
te()
|
|
772
|
+
], ve.prototype, "active");
|
|
773
|
+
let br = ve;
|
|
774
|
+
class ke extends we {
|
|
775
775
|
type;
|
|
776
776
|
isNewProfile;
|
|
777
777
|
constructor(e) {
|
|
778
|
-
super(e), this.type =
|
|
778
|
+
super(e), this.type = ge.PROFILE, this.isNewProfile = e.isNewProfile || !1;
|
|
779
779
|
}
|
|
780
|
-
static newInstance = () => new
|
|
781
|
-
id:
|
|
780
|
+
static newInstance = () => new ke({
|
|
781
|
+
id: Q(),
|
|
782
782
|
isNewProfile: !0
|
|
783
783
|
});
|
|
784
784
|
}
|
|
785
|
-
class
|
|
785
|
+
class Ge {
|
|
786
786
|
id;
|
|
787
787
|
code;
|
|
788
788
|
version;
|
|
@@ -792,25 +792,25 @@ class We {
|
|
|
792
792
|
lastModifiedByUser;
|
|
793
793
|
group;
|
|
794
794
|
constructor(e) {
|
|
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
|
|
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
|
-
static newInstance = (e) => new
|
|
798
|
-
id:
|
|
797
|
+
static newInstance = (e) => new Ge({
|
|
798
|
+
id: Q(),
|
|
799
799
|
group: e
|
|
800
800
|
});
|
|
801
801
|
}
|
|
802
|
-
class
|
|
802
|
+
class Se extends we {
|
|
803
803
|
type;
|
|
804
804
|
isNewGroup;
|
|
805
805
|
constructor(e) {
|
|
806
|
-
super(e), this.type =
|
|
806
|
+
super(e), this.type = ge.GROUP, this.isNewGroup = e.isNewGroup || !1;
|
|
807
807
|
}
|
|
808
|
-
static newInstance = () => new
|
|
809
|
-
id:
|
|
808
|
+
static newInstance = () => new Se({
|
|
809
|
+
id: Q(),
|
|
810
810
|
isNewGroup: !0
|
|
811
811
|
});
|
|
812
812
|
}
|
|
813
|
-
const
|
|
813
|
+
const Re = class kt {
|
|
814
814
|
id;
|
|
815
815
|
code;
|
|
816
816
|
version;
|
|
@@ -827,34 +827,35 @@ const _e = class Et {
|
|
|
827
827
|
constructor(e) {
|
|
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
|
-
static newInstance = () => new
|
|
831
|
-
id:
|
|
830
|
+
static newInstance = () => new kt({
|
|
831
|
+
id: Q(),
|
|
832
832
|
actions: [],
|
|
833
833
|
active: !0,
|
|
834
834
|
isNewResource: !0
|
|
835
835
|
});
|
|
836
836
|
};
|
|
837
837
|
k([
|
|
838
|
-
|
|
838
|
+
X({
|
|
839
839
|
message: "archbase:Informe o nome para o recurso"
|
|
840
840
|
})
|
|
841
|
-
],
|
|
841
|
+
], Re.prototype, "name");
|
|
842
842
|
k([
|
|
843
|
-
|
|
843
|
+
X({
|
|
844
844
|
message: "archbase:Informe a descrição para o recurso"
|
|
845
845
|
})
|
|
846
|
-
],
|
|
846
|
+
], Re.prototype, "description");
|
|
847
847
|
k([
|
|
848
|
-
|
|
849
|
-
],
|
|
850
|
-
let
|
|
851
|
-
const
|
|
848
|
+
te()
|
|
849
|
+
], Re.prototype, "active");
|
|
850
|
+
let St = Re;
|
|
851
|
+
const V = class Ct extends we {
|
|
852
852
|
userName;
|
|
853
853
|
password;
|
|
854
854
|
changePasswordOnNextLogin;
|
|
855
855
|
allowPasswordChange;
|
|
856
856
|
allowMultipleLogins;
|
|
857
857
|
passwordNeverExpires;
|
|
858
|
+
passwordChangedAt;
|
|
858
859
|
accountDeactivated;
|
|
859
860
|
accountLocked;
|
|
860
861
|
unlimitedAccessHours;
|
|
@@ -868,10 +869,10 @@ const H = class kt extends ge {
|
|
|
868
869
|
type;
|
|
869
870
|
isNewUser;
|
|
870
871
|
constructor(e) {
|
|
871
|
-
super(e), this.type =
|
|
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
873
|
}
|
|
873
|
-
static newInstance = () => new
|
|
874
|
-
id:
|
|
874
|
+
static newInstance = () => new Ct({
|
|
875
|
+
id: Q(),
|
|
875
876
|
userName: "",
|
|
876
877
|
password: "",
|
|
877
878
|
groups: [],
|
|
@@ -883,53 +884,56 @@ const H = class kt extends ge {
|
|
|
883
884
|
});
|
|
884
885
|
};
|
|
885
886
|
k([
|
|
886
|
-
|
|
887
|
+
X({
|
|
887
888
|
message: "archbase:Informe o nome de usuário"
|
|
888
889
|
})
|
|
889
|
-
],
|
|
890
|
+
], V.prototype, "userName");
|
|
890
891
|
k([
|
|
891
|
-
|
|
892
|
-
],
|
|
892
|
+
te()
|
|
893
|
+
], V.prototype, "changePasswordOnNextLogin");
|
|
893
894
|
k([
|
|
894
|
-
|
|
895
|
-
],
|
|
895
|
+
te()
|
|
896
|
+
], V.prototype, "allowPasswordChange");
|
|
896
897
|
k([
|
|
897
|
-
|
|
898
|
-
],
|
|
898
|
+
te()
|
|
899
|
+
], V.prototype, "allowMultipleLogins");
|
|
899
900
|
k([
|
|
900
|
-
|
|
901
|
-
],
|
|
901
|
+
te()
|
|
902
|
+
], V.prototype, "passwordNeverExpires");
|
|
902
903
|
k([
|
|
903
|
-
|
|
904
|
-
],
|
|
904
|
+
ie()
|
|
905
|
+
], V.prototype, "passwordChangedAt");
|
|
905
906
|
k([
|
|
906
|
-
|
|
907
|
-
],
|
|
907
|
+
te()
|
|
908
|
+
], V.prototype, "accountDeactivated");
|
|
908
909
|
k([
|
|
909
|
-
|
|
910
|
-
],
|
|
910
|
+
te()
|
|
911
|
+
], V.prototype, "accountLocked");
|
|
911
912
|
k([
|
|
912
|
-
|
|
913
|
-
],
|
|
913
|
+
te()
|
|
914
|
+
], V.prototype, "unlimitedAccessHours");
|
|
914
915
|
k([
|
|
915
|
-
|
|
916
|
-
],
|
|
916
|
+
te()
|
|
917
|
+
], V.prototype, "isAdministrator");
|
|
917
918
|
k([
|
|
918
|
-
|
|
919
|
-
],
|
|
919
|
+
ie()
|
|
920
|
+
], V.prototype, "accessSchedule");
|
|
920
921
|
k([
|
|
921
|
-
|
|
922
|
-
],
|
|
922
|
+
ie()
|
|
923
|
+
], V.prototype, "groups");
|
|
923
924
|
k([
|
|
924
|
-
|
|
925
|
+
ie()
|
|
926
|
+
], V.prototype, "profile");
|
|
927
|
+
k([
|
|
928
|
+
jt(
|
|
925
929
|
{},
|
|
926
930
|
{
|
|
927
931
|
message: "archbase:Informe um email válido"
|
|
928
932
|
}
|
|
929
933
|
)
|
|
930
|
-
],
|
|
931
|
-
let
|
|
932
|
-
const
|
|
934
|
+
], V.prototype, "email");
|
|
935
|
+
let Ne = V;
|
|
936
|
+
const Je = class Fe {
|
|
933
937
|
id;
|
|
934
938
|
code;
|
|
935
939
|
version;
|
|
@@ -943,35 +947,35 @@ const He = class ze {
|
|
|
943
947
|
companyId;
|
|
944
948
|
projectId;
|
|
945
949
|
constructor(e) {
|
|
946
|
-
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 ?
|
|
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 || "";
|
|
947
951
|
}
|
|
948
952
|
static createDtoFromJson(e) {
|
|
949
953
|
switch (e.type) {
|
|
950
954
|
case "profile":
|
|
951
|
-
return new
|
|
955
|
+
return new ke(e);
|
|
952
956
|
case "group":
|
|
953
|
-
return new
|
|
957
|
+
return new Se(e);
|
|
954
958
|
case "user":
|
|
955
|
-
return new
|
|
959
|
+
return new Ne(e);
|
|
956
960
|
default:
|
|
957
961
|
throw new Error("Unknown DTO type");
|
|
958
962
|
}
|
|
959
963
|
}
|
|
960
|
-
static newInstance = () => new
|
|
961
|
-
id:
|
|
964
|
+
static newInstance = () => new Fe({
|
|
965
|
+
id: Q(),
|
|
962
966
|
tenantId: "",
|
|
963
967
|
companyId: "",
|
|
964
968
|
projectId: ""
|
|
965
969
|
});
|
|
966
970
|
};
|
|
967
971
|
k([
|
|
968
|
-
|
|
969
|
-
],
|
|
972
|
+
ie()
|
|
973
|
+
], Je.prototype, "security");
|
|
970
974
|
k([
|
|
971
|
-
|
|
972
|
-
],
|
|
973
|
-
let
|
|
974
|
-
class
|
|
975
|
+
ie()
|
|
976
|
+
], Je.prototype, "action");
|
|
977
|
+
let Wr = Je;
|
|
978
|
+
class Ke {
|
|
975
979
|
id;
|
|
976
980
|
code;
|
|
977
981
|
version;
|
|
@@ -989,13 +993,13 @@ class Ge {
|
|
|
989
993
|
activated;
|
|
990
994
|
isNovoToken;
|
|
991
995
|
constructor(e) {
|
|
992
|
-
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
|
|
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;
|
|
993
997
|
}
|
|
994
|
-
static newInstance = () => new
|
|
995
|
-
id:
|
|
998
|
+
static newInstance = () => new Ke({
|
|
999
|
+
id: Q()
|
|
996
1000
|
});
|
|
997
1001
|
}
|
|
998
|
-
class
|
|
1002
|
+
class qe {
|
|
999
1003
|
id;
|
|
1000
1004
|
code;
|
|
1001
1005
|
version;
|
|
@@ -1012,15 +1016,15 @@ class Je {
|
|
|
1012
1016
|
user;
|
|
1013
1017
|
isNewAccessToken;
|
|
1014
1018
|
constructor(e) {
|
|
1015
|
-
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
|
|
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;
|
|
1016
1020
|
}
|
|
1017
|
-
static newInstance = () => new
|
|
1018
|
-
id:
|
|
1021
|
+
static newInstance = () => new qe({
|
|
1022
|
+
id: Q(),
|
|
1019
1023
|
active: !0,
|
|
1020
1024
|
isNewAccessToken: !0
|
|
1021
1025
|
});
|
|
1022
1026
|
}
|
|
1023
|
-
class
|
|
1027
|
+
class It extends ye {
|
|
1024
1028
|
constructor(e) {
|
|
1025
1029
|
super(e);
|
|
1026
1030
|
}
|
|
@@ -1028,7 +1032,7 @@ class St extends me {
|
|
|
1028
1032
|
return J.getInstance().getHeaders();
|
|
1029
1033
|
}
|
|
1030
1034
|
transform(e) {
|
|
1031
|
-
return new
|
|
1035
|
+
return new Ne(e);
|
|
1032
1036
|
}
|
|
1033
1037
|
getEndpoint() {
|
|
1034
1038
|
return "/api/v1/user";
|
|
@@ -1047,9 +1051,9 @@ class St extends me {
|
|
|
1047
1051
|
return this.transform(t);
|
|
1048
1052
|
}
|
|
1049
1053
|
}
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
class
|
|
1054
|
+
P.decorate(P.inject(Y.ApiClient), It, 0);
|
|
1055
|
+
P.decorate(P.injectable(), It);
|
|
1056
|
+
class Pt extends ye {
|
|
1053
1057
|
constructor(e) {
|
|
1054
1058
|
super(e);
|
|
1055
1059
|
}
|
|
@@ -1057,7 +1061,7 @@ class It extends me {
|
|
|
1057
1061
|
return J.getInstance().getHeaders();
|
|
1058
1062
|
}
|
|
1059
1063
|
transform(e) {
|
|
1060
|
-
return new
|
|
1064
|
+
return new Se(e);
|
|
1061
1065
|
}
|
|
1062
1066
|
getEndpoint() {
|
|
1063
1067
|
return "/api/v1/group";
|
|
@@ -1069,9 +1073,9 @@ class It extends me {
|
|
|
1069
1073
|
return e.isNewGroup;
|
|
1070
1074
|
}
|
|
1071
1075
|
}
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
class
|
|
1076
|
+
P.decorate(P.inject(Y.ApiClient), Pt, 0);
|
|
1077
|
+
P.decorate(P.injectable(), Pt);
|
|
1078
|
+
class Tt extends ye {
|
|
1075
1079
|
constructor(e) {
|
|
1076
1080
|
super(e);
|
|
1077
1081
|
}
|
|
@@ -1079,7 +1083,7 @@ class Ct extends me {
|
|
|
1079
1083
|
return J.getInstance().getHeaders();
|
|
1080
1084
|
}
|
|
1081
1085
|
transform(e) {
|
|
1082
|
-
return new
|
|
1086
|
+
return new ke(e);
|
|
1083
1087
|
}
|
|
1084
1088
|
getEndpoint() {
|
|
1085
1089
|
return "/api/v1/userProfile";
|
|
@@ -1091,9 +1095,9 @@ class Ct extends me {
|
|
|
1091
1095
|
return e.isNewProfile;
|
|
1092
1096
|
}
|
|
1093
1097
|
}
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
class
|
|
1098
|
+
P.decorate(P.inject(Y.ApiClient), Tt, 0);
|
|
1099
|
+
P.decorate(P.injectable(), Tt);
|
|
1100
|
+
class Ut extends ye {
|
|
1097
1101
|
constructor(e) {
|
|
1098
1102
|
super(e);
|
|
1099
1103
|
}
|
|
@@ -1101,7 +1105,7 @@ class Pt extends me {
|
|
|
1101
1105
|
return J.getInstance().getHeaders();
|
|
1102
1106
|
}
|
|
1103
1107
|
transform(e) {
|
|
1104
|
-
return new
|
|
1108
|
+
return new Ke(e);
|
|
1105
1109
|
}
|
|
1106
1110
|
getEndpoint() {
|
|
1107
1111
|
return "/api/v1/apiToken";
|
|
@@ -1128,9 +1132,9 @@ class Pt extends me {
|
|
|
1128
1132
|
);
|
|
1129
1133
|
}
|
|
1130
1134
|
}
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
class
|
|
1135
|
+
P.decorate(P.inject(Y.ApiClient), Ut, 0);
|
|
1136
|
+
P.decorate(P.injectable(), Ut);
|
|
1137
|
+
class Dt extends ye {
|
|
1134
1138
|
constructor(e) {
|
|
1135
1139
|
super(e);
|
|
1136
1140
|
}
|
|
@@ -1138,7 +1142,7 @@ class Tt extends me {
|
|
|
1138
1142
|
return J.getInstance().getHeaders();
|
|
1139
1143
|
}
|
|
1140
1144
|
transform(e) {
|
|
1141
|
-
return new
|
|
1145
|
+
return new qe(e);
|
|
1142
1146
|
}
|
|
1143
1147
|
getEndpoint() {
|
|
1144
1148
|
return "/api/v1/accessToken";
|
|
@@ -1157,9 +1161,9 @@ class Tt extends me {
|
|
|
1157
1161
|
);
|
|
1158
1162
|
}
|
|
1159
1163
|
}
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
class
|
|
1164
|
+
P.decorate(P.inject(Y.ApiClient), Dt, 0);
|
|
1165
|
+
P.decorate(P.injectable(), Dt);
|
|
1166
|
+
class _t extends ye {
|
|
1163
1167
|
constructor(e) {
|
|
1164
1168
|
super(e);
|
|
1165
1169
|
}
|
|
@@ -1167,7 +1171,7 @@ class Ut extends me {
|
|
|
1167
1171
|
return J.getInstance().getHeaders();
|
|
1168
1172
|
}
|
|
1169
1173
|
transform(e) {
|
|
1170
|
-
return new
|
|
1174
|
+
return new St(e);
|
|
1171
1175
|
}
|
|
1172
1176
|
getEndpoint() {
|
|
1173
1177
|
return "/api/v1/resource";
|
|
@@ -1191,7 +1195,7 @@ class Ut extends me {
|
|
|
1191
1195
|
!1,
|
|
1192
1196
|
{
|
|
1193
1197
|
params: {
|
|
1194
|
-
type:
|
|
1198
|
+
type: Qe(ge, t)
|
|
1195
1199
|
}
|
|
1196
1200
|
}
|
|
1197
1201
|
);
|
|
@@ -1202,7 +1206,7 @@ class Ut extends me {
|
|
|
1202
1206
|
{
|
|
1203
1207
|
securityId: e,
|
|
1204
1208
|
actionId: t,
|
|
1205
|
-
type:
|
|
1209
|
+
type: Qe(ge, s)
|
|
1206
1210
|
},
|
|
1207
1211
|
this.configureHeaders()
|
|
1208
1212
|
);
|
|
@@ -1221,9 +1225,9 @@ class Ut extends me {
|
|
|
1221
1225
|
);
|
|
1222
1226
|
}
|
|
1223
1227
|
}
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
function
|
|
1228
|
+
P.decorate(P.inject(Y.ApiClient), _t, 0);
|
|
1229
|
+
P.decorate(P.injectable(), _t);
|
|
1230
|
+
function Hr({
|
|
1227
1231
|
onLogin: r,
|
|
1228
1232
|
error: e,
|
|
1229
1233
|
onClickForgotPassword: t,
|
|
@@ -1233,76 +1237,76 @@ function Vr({
|
|
|
1233
1237
|
showMockUsersSelector: c = !1,
|
|
1234
1238
|
mockUsers: i = [],
|
|
1235
1239
|
mockUsersGroupMap: l,
|
|
1236
|
-
options:
|
|
1240
|
+
options: y = {},
|
|
1237
1241
|
onChangeUsername: E,
|
|
1238
1242
|
disabledLogin: d = !1,
|
|
1239
|
-
isCheckingUsername:
|
|
1240
|
-
showSignIn:
|
|
1241
|
-
mfaRequired:
|
|
1243
|
+
isCheckingUsername: R = !1,
|
|
1244
|
+
showSignIn: A = !0,
|
|
1245
|
+
mfaRequired: g = !1,
|
|
1242
1246
|
onVerifyMfa: S,
|
|
1243
1247
|
mfaError: D,
|
|
1244
|
-
onCancelMfa:
|
|
1245
|
-
isVerifyingMfa:
|
|
1248
|
+
onCancelMfa: N,
|
|
1249
|
+
isVerifyingMfa: B = !1
|
|
1246
1250
|
}) {
|
|
1247
|
-
const
|
|
1248
|
-
username:
|
|
1249
|
-
password:
|
|
1250
|
-
rememberMe:
|
|
1251
|
-
clearRememberMe:
|
|
1252
|
-
} =
|
|
1251
|
+
const W = ut(), {
|
|
1252
|
+
username: M,
|
|
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("");
|
|
1253
1257
|
K(() => {
|
|
1254
|
-
|
|
1258
|
+
f(!!e);
|
|
1255
1259
|
}, [e]), K(() => {
|
|
1256
|
-
|
|
1257
|
-
}, [
|
|
1260
|
+
M !== z && (O(M), E?.(M)), b !== L && U(b), w !== Z && q(w);
|
|
1261
|
+
}, [M, b, w]);
|
|
1258
1262
|
const se = () => {
|
|
1259
|
-
|
|
1260
|
-
},
|
|
1261
|
-
|
|
1262
|
-
},
|
|
1263
|
-
const
|
|
1264
|
-
|
|
1265
|
-
},
|
|
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 = () => {
|
|
1266
1270
|
if (!l)
|
|
1267
|
-
return i.map((
|
|
1268
|
-
value:
|
|
1269
|
-
label:
|
|
1271
|
+
return i.map((m) => ({
|
|
1272
|
+
value: m.email,
|
|
1273
|
+
label: m.email
|
|
1270
1274
|
}));
|
|
1271
|
-
const
|
|
1272
|
-
const
|
|
1273
|
-
return
|
|
1274
|
-
value:
|
|
1275
|
-
label:
|
|
1276
|
-
})),
|
|
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;
|
|
1277
1281
|
}, {});
|
|
1278
|
-
return Object.entries(
|
|
1279
|
-
group:
|
|
1280
|
-
items:
|
|
1282
|
+
return Object.entries(h).map(([m, _]) => ({
|
|
1283
|
+
group: m,
|
|
1284
|
+
items: _
|
|
1281
1285
|
}));
|
|
1282
|
-
},
|
|
1283
|
-
if (
|
|
1284
|
-
const
|
|
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
1290
|
}
|
|
1287
|
-
},
|
|
1291
|
+
}, u = {
|
|
1288
1292
|
withBorder: !0,
|
|
1289
1293
|
shadow: "md",
|
|
1290
1294
|
p: 30,
|
|
1291
1295
|
mt: 30,
|
|
1292
1296
|
radius: "md",
|
|
1293
1297
|
w: 400,
|
|
1294
|
-
...
|
|
1298
|
+
...y.cardProps
|
|
1295
1299
|
};
|
|
1296
|
-
return /* @__PURE__ */
|
|
1297
|
-
|
|
1300
|
+
return /* @__PURE__ */ C(
|
|
1301
|
+
He,
|
|
1298
1302
|
{
|
|
1299
|
-
|
|
1303
|
+
...u,
|
|
1300
1304
|
pos: "relative",
|
|
1301
|
-
ref:
|
|
1305
|
+
ref: W,
|
|
1302
1306
|
children: [
|
|
1303
|
-
|
|
1307
|
+
A && /* @__PURE__ */ C(ne, { children: [
|
|
1304
1308
|
/* @__PURE__ */ n(
|
|
1305
|
-
|
|
1309
|
+
F,
|
|
1306
1310
|
{
|
|
1307
1311
|
c: "light-dark(var(--mantine-color-black), var(--mantine-color-white))",
|
|
1308
1312
|
fw: 800,
|
|
@@ -1312,123 +1316,123 @@ function Vr({
|
|
|
1312
1316
|
children: x().t("archbase:signIn")
|
|
1313
1317
|
}
|
|
1314
1318
|
),
|
|
1315
|
-
/* @__PURE__ */ n(
|
|
1319
|
+
/* @__PURE__ */ n(Ue, { m: "md" })
|
|
1316
1320
|
] }),
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
/* @__PURE__ */
|
|
1320
|
-
/* @__PURE__ */ n(
|
|
1321
|
-
/* @__PURE__ */ n(
|
|
1321
|
+
y?.customContentBefore,
|
|
1322
|
+
g && /* @__PURE__ */ C(Ee, { gap: "md", children: [
|
|
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(
|
|
1322
1326
|
"archbase:mfa.subtitle",
|
|
1323
1327
|
"Digite o código do seu aplicativo autenticador (ou um código de recuperação)."
|
|
1324
1328
|
) })
|
|
1325
1329
|
] }),
|
|
1326
1330
|
/* @__PURE__ */ n(
|
|
1327
|
-
|
|
1331
|
+
xe,
|
|
1328
1332
|
{
|
|
1329
1333
|
label: x().t("archbase:mfa.code", "Código de verificação"),
|
|
1330
1334
|
placeholder: "000000",
|
|
1331
|
-
value:
|
|
1335
|
+
value: I,
|
|
1332
1336
|
autoFocus: !0,
|
|
1333
|
-
onChange: (
|
|
1334
|
-
onKeyDown: (
|
|
1335
|
-
|
|
1337
|
+
onChange: (h) => he(h.currentTarget.value),
|
|
1338
|
+
onKeyDown: (h) => {
|
|
1339
|
+
h.key === "Enter" && ae();
|
|
1336
1340
|
}
|
|
1337
1341
|
}
|
|
1338
1342
|
),
|
|
1339
|
-
D && /* @__PURE__ */ n(
|
|
1343
|
+
D && /* @__PURE__ */ n(F, { c: "red", fz: "sm", children: D }),
|
|
1340
1344
|
/* @__PURE__ */ n(
|
|
1341
|
-
|
|
1345
|
+
H,
|
|
1342
1346
|
{
|
|
1343
1347
|
fullWidth: !0,
|
|
1344
|
-
disabled: !
|
|
1345
|
-
loading:
|
|
1346
|
-
onClick:
|
|
1348
|
+
disabled: !I.trim() || B,
|
|
1349
|
+
loading: B,
|
|
1350
|
+
onClick: ae,
|
|
1347
1351
|
children: x().t("archbase:mfa.verify", "Verificar")
|
|
1348
1352
|
}
|
|
1349
1353
|
),
|
|
1350
|
-
|
|
1351
|
-
|
|
1354
|
+
N && /* @__PURE__ */ n(
|
|
1355
|
+
et,
|
|
1352
1356
|
{
|
|
1353
1357
|
component: "button",
|
|
1354
1358
|
c: "var(--mantine-text-color)",
|
|
1355
1359
|
fz: 14,
|
|
1356
1360
|
ta: "center",
|
|
1357
1361
|
styles: { root: { cursor: "pointer" } },
|
|
1358
|
-
onClick:
|
|
1362
|
+
onClick: N,
|
|
1359
1363
|
children: x().t("archbase:mfa.back", "Voltar ao login")
|
|
1360
1364
|
}
|
|
1361
1365
|
)
|
|
1362
1366
|
] }),
|
|
1363
|
-
!
|
|
1364
|
-
c && /* @__PURE__ */
|
|
1365
|
-
/* @__PURE__ */
|
|
1367
|
+
!g && /* @__PURE__ */ C(ne, { children: [
|
|
1368
|
+
c && /* @__PURE__ */ C(ne, { children: [
|
|
1369
|
+
/* @__PURE__ */ C(de, { gap: "sm", mb: "md", children: [
|
|
1366
1370
|
/* @__PURE__ */ n(
|
|
1367
|
-
|
|
1371
|
+
Jt,
|
|
1368
1372
|
{
|
|
1369
1373
|
placeholder: "Selecione um usuário mock",
|
|
1370
|
-
data:
|
|
1371
|
-
value:
|
|
1372
|
-
onChange: (
|
|
1374
|
+
data: ue(),
|
|
1375
|
+
value: v,
|
|
1376
|
+
onChange: (h) => ee(h ?? ""),
|
|
1373
1377
|
searchable: !0,
|
|
1374
1378
|
clearable: !0,
|
|
1375
1379
|
style: { flexGrow: 1 }
|
|
1376
1380
|
}
|
|
1377
1381
|
),
|
|
1378
|
-
/* @__PURE__ */ n(
|
|
1379
|
-
|
|
1382
|
+
/* @__PURE__ */ n(Kt, { label: "Aplicar", children: /* @__PURE__ */ n(
|
|
1383
|
+
H,
|
|
1380
1384
|
{
|
|
1381
1385
|
variant: "light",
|
|
1382
1386
|
size: "sm",
|
|
1383
|
-
onClick:
|
|
1384
|
-
disabled: !
|
|
1387
|
+
onClick: pe,
|
|
1388
|
+
disabled: !v,
|
|
1385
1389
|
"aria-label": "Aplicar usuário mock selecionado",
|
|
1386
|
-
children: /* @__PURE__ */ n(
|
|
1390
|
+
children: /* @__PURE__ */ n(Zt, { size: 16 })
|
|
1387
1391
|
}
|
|
1388
1392
|
) })
|
|
1389
1393
|
] }),
|
|
1390
|
-
/* @__PURE__ */ n(
|
|
1394
|
+
/* @__PURE__ */ n(Ue, { mb: "md" })
|
|
1391
1395
|
] }),
|
|
1392
1396
|
/* @__PURE__ */ n(
|
|
1393
|
-
|
|
1397
|
+
xe,
|
|
1394
1398
|
{
|
|
1395
1399
|
label: s,
|
|
1396
1400
|
placeholder: o ?? x().t("archbase:usuario@email.com"),
|
|
1397
|
-
rightSection:
|
|
1398
|
-
value:
|
|
1401
|
+
rightSection: R ? /* @__PURE__ */ n(dt, { size: "xs" }) : null,
|
|
1402
|
+
value: z || "",
|
|
1399
1403
|
required: !0,
|
|
1400
|
-
onChange: (
|
|
1401
|
-
|
|
1404
|
+
onChange: (h) => {
|
|
1405
|
+
O(h.currentTarget.value), E?.(h.currentTarget.value), se();
|
|
1402
1406
|
}
|
|
1403
1407
|
}
|
|
1404
1408
|
),
|
|
1405
1409
|
/* @__PURE__ */ n(
|
|
1406
|
-
|
|
1410
|
+
ze,
|
|
1407
1411
|
{
|
|
1408
1412
|
label: x().t("archbase:Password"),
|
|
1409
1413
|
placeholder: x().t("archbase:Sua senha"),
|
|
1410
|
-
onChange: (
|
|
1411
|
-
|
|
1414
|
+
onChange: (h) => {
|
|
1415
|
+
U(h.currentTarget.value), se();
|
|
1412
1416
|
},
|
|
1413
1417
|
value: L || "",
|
|
1414
1418
|
required: !0,
|
|
1415
1419
|
mt: "md"
|
|
1416
1420
|
}
|
|
1417
1421
|
),
|
|
1418
|
-
/* @__PURE__ */
|
|
1422
|
+
/* @__PURE__ */ C(de, { justify: "space-between", mt: "md", children: [
|
|
1419
1423
|
/* @__PURE__ */ n(
|
|
1420
|
-
|
|
1424
|
+
qt,
|
|
1421
1425
|
{
|
|
1422
1426
|
label: x().t("archbase:Lembre-me"),
|
|
1423
|
-
checked:
|
|
1424
|
-
onChange: (
|
|
1425
|
-
const
|
|
1426
|
-
|
|
1427
|
+
checked: Z,
|
|
1428
|
+
onChange: (h) => {
|
|
1429
|
+
const m = h.currentTarget.checked;
|
|
1430
|
+
q(m), m || T();
|
|
1427
1431
|
}
|
|
1428
1432
|
}
|
|
1429
1433
|
),
|
|
1430
1434
|
t && /* @__PURE__ */ n(
|
|
1431
|
-
|
|
1435
|
+
et,
|
|
1432
1436
|
{
|
|
1433
1437
|
component: "button",
|
|
1434
1438
|
c: "var(--mantine-text-color)",
|
|
@@ -1440,168 +1444,168 @@ function Vr({
|
|
|
1440
1444
|
}
|
|
1441
1445
|
)
|
|
1442
1446
|
] }),
|
|
1443
|
-
|
|
1447
|
+
y?.afterInputs || a,
|
|
1444
1448
|
/* @__PURE__ */ n(
|
|
1445
|
-
|
|
1449
|
+
H,
|
|
1446
1450
|
{
|
|
1447
|
-
disabled: !L || !
|
|
1451
|
+
disabled: !L || !z || d,
|
|
1448
1452
|
fullWidth: !0,
|
|
1449
1453
|
mt: "xl",
|
|
1450
|
-
onClick:
|
|
1454
|
+
onClick: be,
|
|
1451
1455
|
children: x().t("archbase:signIn")
|
|
1452
1456
|
}
|
|
1453
1457
|
)
|
|
1454
1458
|
] }),
|
|
1455
|
-
|
|
1456
|
-
|
|
1459
|
+
y?.customContentAfter,
|
|
1460
|
+
re && e && /* @__PURE__ */ n(F, { c: "red", mt: "sm", children: e })
|
|
1457
1461
|
]
|
|
1458
1462
|
}
|
|
1459
1463
|
);
|
|
1460
1464
|
}
|
|
1461
|
-
const
|
|
1462
|
-
function
|
|
1465
|
+
const $ = (r, e) => x().t(r, e);
|
|
1466
|
+
function Gr({
|
|
1463
1467
|
enabled: r,
|
|
1464
1468
|
onSetup: e,
|
|
1465
1469
|
onEnable: t,
|
|
1466
1470
|
onDisable: s,
|
|
1467
1471
|
onStatusChange: o
|
|
1468
1472
|
}) {
|
|
1469
|
-
const [a, c] =
|
|
1470
|
-
|
|
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);
|
|
1471
1475
|
try {
|
|
1472
|
-
const
|
|
1473
|
-
l(
|
|
1474
|
-
} catch (
|
|
1475
|
-
D(
|
|
1476
|
+
const b = await e();
|
|
1477
|
+
l(b), E(""), c("setup");
|
|
1478
|
+
} catch (b) {
|
|
1479
|
+
D(b?.message || String(b));
|
|
1476
1480
|
} finally {
|
|
1477
|
-
|
|
1481
|
+
g(!1);
|
|
1478
1482
|
}
|
|
1479
|
-
},
|
|
1480
|
-
const
|
|
1481
|
-
if (
|
|
1482
|
-
|
|
1483
|
+
}, B = async () => {
|
|
1484
|
+
const b = y.trim();
|
|
1485
|
+
if (b) {
|
|
1486
|
+
g(!0), D(null);
|
|
1483
1487
|
try {
|
|
1484
|
-
const
|
|
1485
|
-
|
|
1486
|
-
} catch (
|
|
1487
|
-
D(
|
|
1488
|
+
const w = await t(b);
|
|
1489
|
+
R(w), c("recovery"), o?.(!0);
|
|
1490
|
+
} catch (w) {
|
|
1491
|
+
D(w?.message || String(w));
|
|
1488
1492
|
} finally {
|
|
1489
|
-
|
|
1493
|
+
g(!1);
|
|
1490
1494
|
}
|
|
1491
1495
|
}
|
|
1492
|
-
},
|
|
1493
|
-
|
|
1496
|
+
}, W = async () => {
|
|
1497
|
+
g(!0), D(null);
|
|
1494
1498
|
try {
|
|
1495
|
-
await s(), l(null),
|
|
1496
|
-
} catch (
|
|
1497
|
-
D(
|
|
1499
|
+
await s(), l(null), R([]), c("idle"), o?.(!1);
|
|
1500
|
+
} catch (b) {
|
|
1501
|
+
D(b?.message || String(b));
|
|
1498
1502
|
} finally {
|
|
1499
|
-
|
|
1503
|
+
g(!1);
|
|
1500
1504
|
}
|
|
1501
|
-
},
|
|
1502
|
-
|
|
1505
|
+
}, M = () => {
|
|
1506
|
+
R([]), l(null), E(""), c("idle");
|
|
1503
1507
|
};
|
|
1504
|
-
return /* @__PURE__ */ n(
|
|
1505
|
-
/* @__PURE__ */
|
|
1506
|
-
/* @__PURE__ */ n(
|
|
1507
|
-
/* @__PURE__ */ n(
|
|
1508
|
+
return /* @__PURE__ */ n(He, { withBorder: !0, radius: "md", p: "lg", children: /* @__PURE__ */ C(Ee, { gap: "md", children: [
|
|
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: $(
|
|
1508
1512
|
"archbase:mfa.setup.subtitle",
|
|
1509
1513
|
"Proteja o acesso exigindo um código do seu aplicativo autenticador no login."
|
|
1510
1514
|
) })
|
|
1511
1515
|
] }),
|
|
1512
|
-
S && /* @__PURE__ */ n(
|
|
1513
|
-
r && a === "idle" && /* @__PURE__ */
|
|
1514
|
-
/* @__PURE__ */ n(
|
|
1515
|
-
/* @__PURE__ */ n(
|
|
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
1520
|
] }),
|
|
1517
|
-
!r && a === "idle" && /* @__PURE__ */ n(
|
|
1518
|
-
a === "setup" && i && /* @__PURE__ */
|
|
1519
|
-
/* @__PURE__ */ n(
|
|
1521
|
+
!r && a === "idle" && /* @__PURE__ */ n(H, { loading: A, onClick: N, children: $("archbase:mfa.setup.enable", "Ativar MFA") }),
|
|
1522
|
+
a === "setup" && i && /* @__PURE__ */ C(Ee, { gap: "sm", align: "center", children: [
|
|
1523
|
+
/* @__PURE__ */ n(F, { fz: "sm", ta: "center", children: $(
|
|
1520
1524
|
"archbase:mfa.setup.scan",
|
|
1521
1525
|
"Escaneie o QR Code no seu app autenticador (Google Authenticator, Authy…):"
|
|
1522
1526
|
) }),
|
|
1523
|
-
/* @__PURE__ */ n(
|
|
1524
|
-
/* @__PURE__ */ n(
|
|
1525
|
-
/* @__PURE__ */
|
|
1526
|
-
/* @__PURE__ */ n(
|
|
1527
|
-
/* @__PURE__ */ n(
|
|
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: [
|
|
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") }) })
|
|
1528
1532
|
] }),
|
|
1529
1533
|
/* @__PURE__ */ n(
|
|
1530
|
-
|
|
1534
|
+
xe,
|
|
1531
1535
|
{
|
|
1532
1536
|
w: "100%",
|
|
1533
|
-
label:
|
|
1537
|
+
label: $("archbase:mfa.setup.confirmCode", "Digite o código gerado para confirmar"),
|
|
1534
1538
|
placeholder: "000000",
|
|
1535
|
-
value:
|
|
1536
|
-
onChange: (
|
|
1537
|
-
onKeyDown: (
|
|
1538
|
-
|
|
1539
|
+
value: y,
|
|
1540
|
+
onChange: (b) => E(b.currentTarget.value),
|
|
1541
|
+
onKeyDown: (b) => {
|
|
1542
|
+
b.key === "Enter" && B();
|
|
1539
1543
|
}
|
|
1540
1544
|
}
|
|
1541
1545
|
),
|
|
1542
|
-
/* @__PURE__ */
|
|
1543
|
-
/* @__PURE__ */ n(
|
|
1544
|
-
/* @__PURE__ */ n(
|
|
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") })
|
|
1545
1549
|
] })
|
|
1546
1550
|
] }),
|
|
1547
|
-
a === "recovery" && /* @__PURE__ */
|
|
1548
|
-
/* @__PURE__ */ n(
|
|
1551
|
+
a === "recovery" && /* @__PURE__ */ C(Ee, { gap: "sm", children: [
|
|
1552
|
+
/* @__PURE__ */ n(tt, { color: "yellow", children: $(
|
|
1549
1553
|
"archbase:mfa.setup.recoveryWarning",
|
|
1550
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."
|
|
1551
1555
|
) }),
|
|
1552
|
-
/* @__PURE__ */ n(
|
|
1553
|
-
/* @__PURE__ */
|
|
1554
|
-
/* @__PURE__ */ n(
|
|
1555
|
-
`), children: ({ copied:
|
|
1556
|
-
/* @__PURE__ */ n(
|
|
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") })
|
|
1557
1561
|
] })
|
|
1558
1562
|
] })
|
|
1559
1563
|
] }) });
|
|
1560
1564
|
}
|
|
1561
|
-
const
|
|
1565
|
+
const Ar = {
|
|
1562
1566
|
position: "relative",
|
|
1563
1567
|
width: "90%",
|
|
1564
1568
|
maxWidth: 400,
|
|
1565
1569
|
padding: 30,
|
|
1566
1570
|
marginTop: 30
|
|
1567
1571
|
};
|
|
1568
|
-
function
|
|
1569
|
-
const
|
|
1570
|
-
async function
|
|
1571
|
-
|
|
1572
|
-
|
|
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);
|
|
1573
1577
|
}).catch(() => {
|
|
1574
|
-
}) :
|
|
1578
|
+
}) : O(`${x().t("archbase:Email inválido")}`));
|
|
1575
1579
|
}
|
|
1576
|
-
async function
|
|
1577
|
-
if (
|
|
1578
|
-
let
|
|
1579
|
-
a && (
|
|
1580
|
-
|
|
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);
|
|
1581
1585
|
}).catch(() => {
|
|
1582
|
-
|
|
1586
|
+
A(r || `${x().t("archbase:Erro ao redefinir senha.")}`);
|
|
1583
1587
|
});
|
|
1584
1588
|
}
|
|
1585
1589
|
}
|
|
1586
1590
|
return K(() => {
|
|
1587
|
-
r &&
|
|
1591
|
+
r && A(r);
|
|
1588
1592
|
}, [r]), K(() => {
|
|
1589
|
-
|
|
1590
|
-
}, [
|
|
1591
|
-
|
|
1593
|
+
A("");
|
|
1594
|
+
}, [g, D, B, M]), /* @__PURE__ */ C(
|
|
1595
|
+
He,
|
|
1592
1596
|
{
|
|
1593
1597
|
withBorder: !0,
|
|
1594
1598
|
shadow: "md",
|
|
1595
1599
|
radius: "md",
|
|
1596
|
-
ref:
|
|
1600
|
+
ref: y,
|
|
1597
1601
|
style: {
|
|
1598
|
-
...
|
|
1602
|
+
...Ar,
|
|
1599
1603
|
...l
|
|
1600
1604
|
},
|
|
1601
1605
|
children: [
|
|
1602
|
-
|
|
1606
|
+
w ? /* @__PURE__ */ C(ne, { children: [
|
|
1603
1607
|
/* @__PURE__ */ n(
|
|
1604
|
-
|
|
1608
|
+
F,
|
|
1605
1609
|
{
|
|
1606
1610
|
c: "light-dark(var(--mantine-color-black), var(--mantine-color-white))",
|
|
1607
1611
|
fw: 800,
|
|
@@ -1611,71 +1615,71 @@ function Hr({ error: r, onSendResetPasswordEmail: e, onResetPassword: t, onClick
|
|
|
1611
1615
|
children: x().t("archbase:Redefinir senha")
|
|
1612
1616
|
}
|
|
1613
1617
|
),
|
|
1614
|
-
/* @__PURE__ */ n(
|
|
1618
|
+
/* @__PURE__ */ n(Ue, { m: "xs" }),
|
|
1615
1619
|
/* @__PURE__ */ n(
|
|
1616
|
-
|
|
1620
|
+
xe,
|
|
1617
1621
|
{
|
|
1618
1622
|
label: x().t("archbase:Código de segurança"),
|
|
1619
1623
|
placeholder: `${x().t("archbase:Código enviado no seu e-mail")}`,
|
|
1620
1624
|
value: D || "",
|
|
1621
1625
|
required: !0,
|
|
1622
|
-
onChange: (
|
|
1623
|
-
|
|
1626
|
+
onChange: (I) => {
|
|
1627
|
+
N(I.currentTarget.value), U("");
|
|
1624
1628
|
},
|
|
1625
1629
|
error: L
|
|
1626
1630
|
}
|
|
1627
1631
|
),
|
|
1628
1632
|
/* @__PURE__ */ n(
|
|
1629
|
-
|
|
1633
|
+
ze,
|
|
1630
1634
|
{
|
|
1631
1635
|
label: x().t("archbase:Nova senha"),
|
|
1632
1636
|
placeholder: x().t("archbase:Nova senha"),
|
|
1633
|
-
onChange: (
|
|
1634
|
-
|
|
1637
|
+
onChange: (I) => {
|
|
1638
|
+
W(I.currentTarget.value), q(""), f("");
|
|
1635
1639
|
},
|
|
1636
|
-
value:
|
|
1640
|
+
value: B,
|
|
1637
1641
|
required: !0,
|
|
1638
|
-
error:
|
|
1642
|
+
error: Z
|
|
1639
1643
|
}
|
|
1640
1644
|
),
|
|
1641
1645
|
/* @__PURE__ */ n(
|
|
1642
|
-
|
|
1646
|
+
ze,
|
|
1643
1647
|
{
|
|
1644
1648
|
label: x().t("archbase:Confirmar senha"),
|
|
1645
1649
|
placeholder: x().t("archbase:Confirmar senha"),
|
|
1646
|
-
onChange: (
|
|
1647
|
-
|
|
1650
|
+
onChange: (I) => {
|
|
1651
|
+
b(I.currentTarget.value), f("");
|
|
1648
1652
|
},
|
|
1649
|
-
value:
|
|
1653
|
+
value: M || "",
|
|
1650
1654
|
required: !0,
|
|
1651
|
-
error:
|
|
1655
|
+
error: re
|
|
1652
1656
|
}
|
|
1653
1657
|
),
|
|
1654
1658
|
/* @__PURE__ */ n(
|
|
1655
|
-
|
|
1659
|
+
H,
|
|
1656
1660
|
{
|
|
1657
|
-
disabled: !
|
|
1661
|
+
disabled: !g || !D || !B || !M,
|
|
1658
1662
|
mt: "md",
|
|
1659
1663
|
fullWidth: !0,
|
|
1660
|
-
onClick: () =>
|
|
1664
|
+
onClick: () => ee(g, D, B, M),
|
|
1661
1665
|
children: `${x().t("archbase:Redefinir senha")}`
|
|
1662
1666
|
}
|
|
1663
1667
|
),
|
|
1664
1668
|
/* @__PURE__ */ n(
|
|
1665
|
-
|
|
1669
|
+
H,
|
|
1666
1670
|
{
|
|
1667
1671
|
mt: "6px",
|
|
1668
1672
|
fullWidth: !0,
|
|
1669
1673
|
color: d === "dark" ? E.colors.dark[4] : E.colors.gray[7],
|
|
1670
1674
|
onClick: () => {
|
|
1671
|
-
|
|
1675
|
+
z || T(!1);
|
|
1672
1676
|
},
|
|
1673
1677
|
children: `${x().t("archbase:Voltar")}`
|
|
1674
1678
|
}
|
|
1675
1679
|
)
|
|
1676
|
-
] }) : /* @__PURE__ */
|
|
1680
|
+
] }) : /* @__PURE__ */ C(ne, { children: [
|
|
1677
1681
|
/* @__PURE__ */ n(
|
|
1678
|
-
|
|
1682
|
+
F,
|
|
1679
1683
|
{
|
|
1680
1684
|
c: "light-dark(var(--mantine-color-black), var(--mantine-color-white))",
|
|
1681
1685
|
fw: 800,
|
|
@@ -1685,33 +1689,33 @@ function Hr({ error: r, onSendResetPasswordEmail: e, onResetPassword: t, onClick
|
|
|
1685
1689
|
children: x().t("archbase:Redefinir senha")
|
|
1686
1690
|
}
|
|
1687
1691
|
),
|
|
1688
|
-
/* @__PURE__ */ n(
|
|
1689
|
-
/* @__PURE__ */ n(
|
|
1692
|
+
/* @__PURE__ */ n(F, { c: "dimmed", fz: 14, style: { textAlign: "justify" }, children: i }),
|
|
1693
|
+
/* @__PURE__ */ n(Ue, { m: "md" }),
|
|
1690
1694
|
/* @__PURE__ */ n(
|
|
1691
|
-
|
|
1695
|
+
xe,
|
|
1692
1696
|
{
|
|
1693
1697
|
label: "Email",
|
|
1694
1698
|
placeholder: `${x().t("archbase:usuario@email.com")}`,
|
|
1695
|
-
value:
|
|
1699
|
+
value: g || "",
|
|
1696
1700
|
required: !0,
|
|
1697
|
-
onChange: (
|
|
1698
|
-
S(
|
|
1701
|
+
onChange: (I) => {
|
|
1702
|
+
S(I.currentTarget.value), O("");
|
|
1699
1703
|
},
|
|
1700
|
-
error:
|
|
1704
|
+
error: z
|
|
1701
1705
|
}
|
|
1702
1706
|
),
|
|
1703
1707
|
/* @__PURE__ */ n(
|
|
1704
|
-
|
|
1708
|
+
H,
|
|
1705
1709
|
{
|
|
1706
|
-
disabled: !
|
|
1710
|
+
disabled: !g,
|
|
1707
1711
|
mt: "md",
|
|
1708
1712
|
fullWidth: !0,
|
|
1709
|
-
onClick: () =>
|
|
1713
|
+
onClick: () => v(g),
|
|
1710
1714
|
children: `${x().t("archbase:Enviar")}`
|
|
1711
1715
|
}
|
|
1712
1716
|
),
|
|
1713
1717
|
/* @__PURE__ */ n(
|
|
1714
|
-
|
|
1718
|
+
H,
|
|
1715
1719
|
{
|
|
1716
1720
|
mt: "6px",
|
|
1717
1721
|
fullWidth: !0,
|
|
@@ -1721,38 +1725,43 @@ function Hr({ error: r, onSendResetPasswordEmail: e, onResetPassword: t, onClick
|
|
|
1721
1725
|
}
|
|
1722
1726
|
)
|
|
1723
1727
|
] }),
|
|
1724
|
-
|
|
1728
|
+
R ? /* @__PURE__ */ n(F, { c: "red", style: { textAlign: "justify" }, children: R }) : null
|
|
1725
1729
|
]
|
|
1726
1730
|
}
|
|
1727
1731
|
);
|
|
1728
1732
|
}
|
|
1729
|
-
const
|
|
1730
|
-
const s =
|
|
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(() => {
|
|
1731
1735
|
if (!t)
|
|
1732
1736
|
return null;
|
|
1733
|
-
const
|
|
1734
|
-
if (s && s.existsValue(
|
|
1735
|
-
const d = s.getValue(
|
|
1737
|
+
const y = c ? `${r}_${c}` : r;
|
|
1738
|
+
if (s && s.existsValue(y)) {
|
|
1739
|
+
const d = s.getValue(y);
|
|
1736
1740
|
if (d && d.isAdmin === a)
|
|
1737
1741
|
return d;
|
|
1738
1742
|
}
|
|
1739
|
-
const E = new
|
|
1740
|
-
return s && c && s.setValue(
|
|
1743
|
+
const E = new wt(r, e, a);
|
|
1744
|
+
return s && c && s.setValue(y, E), E;
|
|
1741
1745
|
}, [t, r, e, a, c]);
|
|
1742
1746
|
return K(() => {
|
|
1743
1747
|
i.current = c;
|
|
1744
1748
|
}, [c]), { securityManager: l };
|
|
1745
|
-
}
|
|
1749
|
+
};
|
|
1750
|
+
function $e(r) {
|
|
1751
|
+
const e = r?.response?.data ?? r?.data ?? r;
|
|
1752
|
+
return e?.error === "CREDENTIALS_EXPIRED" || e?.requirePasswordChange === !0;
|
|
1753
|
+
}
|
|
1754
|
+
const qr = ({
|
|
1746
1755
|
checkIntervalTokenHasExpired: r = 3e4,
|
|
1747
1756
|
// Verificar a 30 segundos
|
|
1748
1757
|
expirationThresholdOfToken: e = 300
|
|
1749
1758
|
// Antecipar em 5 minutos
|
|
1750
1759
|
}) => {
|
|
1751
|
-
const t =
|
|
1752
|
-
(u) => u.get(
|
|
1753
|
-
), s =
|
|
1754
|
-
(u) => u.get(
|
|
1755
|
-
), [o, a] =
|
|
1760
|
+
const t = De(
|
|
1761
|
+
(u) => u.get(Y.TokenManager)
|
|
1762
|
+
), 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 = {
|
|
1756
1765
|
hasContextualLogin: typeof s.loginWithContext == "function",
|
|
1757
1766
|
hasFlexibleLogin: typeof s.loginFlexible == "function",
|
|
1758
1767
|
hasSocialLogin: typeof s.loginSocial == "function",
|
|
@@ -1761,173 +1770,178 @@ const br = () => Vt().user, Dt = "archbaseSecurityManagerStore", Gr = ({ resourc
|
|
|
1761
1770
|
};
|
|
1762
1771
|
K(() => {
|
|
1763
1772
|
const u = t.getUsername();
|
|
1764
|
-
if (u && u != "" &&
|
|
1765
|
-
const
|
|
1766
|
-
if (
|
|
1773
|
+
if (u && u != "" && N(u), U.hasContextSupport && t.getContext) {
|
|
1774
|
+
const m = t.getContext();
|
|
1775
|
+
if (m)
|
|
1767
1776
|
try {
|
|
1768
|
-
const
|
|
1769
|
-
|
|
1770
|
-
} catch (
|
|
1771
|
-
console.warn("Erro ao carregar contexto salvo:",
|
|
1777
|
+
const _ = typeof m == "string" ? JSON.parse(m) : m;
|
|
1778
|
+
W(_);
|
|
1779
|
+
} catch (_) {
|
|
1780
|
+
console.warn("Erro ao carregar contexto salvo:", _);
|
|
1772
1781
|
}
|
|
1773
1782
|
}
|
|
1774
|
-
const
|
|
1775
|
-
|
|
1783
|
+
const h = t.getToken();
|
|
1784
|
+
h && (d(!0), S(""), A(!1), a(h)), y(!1);
|
|
1776
1785
|
}, []);
|
|
1777
|
-
const
|
|
1778
|
-
|
|
1779
|
-
}, q = (
|
|
1780
|
-
|
|
1781
|
-
},
|
|
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) => {
|
|
1782
1793
|
try {
|
|
1783
1794
|
i(!0), d(!1);
|
|
1784
|
-
const
|
|
1785
|
-
t.saveToken(
|
|
1786
|
-
} catch (
|
|
1787
|
-
i(!1), d(!1), S(oe(
|
|
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);
|
|
1788
1799
|
}
|
|
1789
|
-
},
|
|
1790
|
-
if (!
|
|
1800
|
+
}, v = async (u, h = !1) => {
|
|
1801
|
+
if (!U.hasContextualLogin || !s.loginWithContext)
|
|
1791
1802
|
throw new Error("Login contextual não suportado por esta implementação do ArchbaseAuthenticator");
|
|
1792
1803
|
try {
|
|
1793
1804
|
i(!0), d(!1);
|
|
1794
|
-
const { context:
|
|
1795
|
-
if (
|
|
1796
|
-
|
|
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);
|
|
1797
1808
|
return;
|
|
1798
1809
|
}
|
|
1799
|
-
const
|
|
1810
|
+
const Ae = {
|
|
1800
1811
|
scope: "",
|
|
1801
|
-
ext_expires_in:
|
|
1802
|
-
...
|
|
1812
|
+
ext_expires_in: j.expires_in,
|
|
1813
|
+
...j
|
|
1803
1814
|
};
|
|
1804
|
-
t.saveToken(
|
|
1805
|
-
} catch (
|
|
1806
|
-
throw i(!1), d(!1), S(oe(
|
|
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;
|
|
1807
1818
|
}
|
|
1808
|
-
},
|
|
1819
|
+
}, ee = async (u) => {
|
|
1809
1820
|
if (!s.verifyMfa)
|
|
1810
1821
|
throw new Error("verifyMfa não suportado por esta implementação do ArchbaseAuthenticator");
|
|
1811
|
-
if (!
|
|
1822
|
+
if (!z)
|
|
1812
1823
|
throw new Error("Nenhum desafio de MFA pendente");
|
|
1813
1824
|
try {
|
|
1814
|
-
i(!0), S(""),
|
|
1815
|
-
const
|
|
1816
|
-
t.saveToken(
|
|
1817
|
-
} catch (
|
|
1818
|
-
throw i(!1), S(oe(
|
|
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;
|
|
1819
1830
|
}
|
|
1820
|
-
},
|
|
1821
|
-
|
|
1822
|
-
},
|
|
1823
|
-
if (!
|
|
1831
|
+
}, I = () => {
|
|
1832
|
+
b(!1), O(null), S(""), A(!1);
|
|
1833
|
+
}, he = async (u, h = !1) => {
|
|
1834
|
+
if (!U.hasFlexibleLogin || !s.loginFlexible)
|
|
1824
1835
|
throw new Error("Login flexível não suportado por esta implementação do ArchbaseAuthenticator");
|
|
1825
1836
|
try {
|
|
1826
1837
|
i(!0), d(!1);
|
|
1827
|
-
const { context:
|
|
1838
|
+
const { context: m, user: _, ...j } = await s.loginFlexible(u), Ae = {
|
|
1828
1839
|
scope: "",
|
|
1829
|
-
ext_expires_in:
|
|
1830
|
-
...
|
|
1840
|
+
ext_expires_in: j.expires_in,
|
|
1841
|
+
...j
|
|
1831
1842
|
};
|
|
1832
|
-
t.saveToken(
|
|
1833
|
-
} catch (
|
|
1834
|
-
throw i(!1), d(!1), S(oe(
|
|
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;
|
|
1835
1846
|
}
|
|
1836
|
-
},
|
|
1837
|
-
if (!
|
|
1847
|
+
}, se = async (u) => {
|
|
1848
|
+
if (!U.hasSocialLogin || !s.loginSocial)
|
|
1838
1849
|
throw new Error("Login social não suportado por esta implementação do ArchbaseAuthenticator");
|
|
1839
1850
|
try {
|
|
1840
1851
|
i(!0), d(!1);
|
|
1841
|
-
const { context:
|
|
1852
|
+
const { context: h, user: m, ..._ } = await s.loginSocial(u), j = {
|
|
1842
1853
|
scope: "",
|
|
1843
|
-
ext_expires_in:
|
|
1844
|
-
|
|
1854
|
+
ext_expires_in: _.expires_in,
|
|
1855
|
+
..._
|
|
1845
1856
|
};
|
|
1846
|
-
t.saveToken(
|
|
1847
|
-
} catch (
|
|
1848
|
-
throw i(!1), d(!1), S(oe(
|
|
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;
|
|
1849
1860
|
}
|
|
1850
|
-
},
|
|
1851
|
-
if (!
|
|
1861
|
+
}, be = async (u) => {
|
|
1862
|
+
if (!U.hasRegistration || !s.register)
|
|
1852
1863
|
throw new Error("Registro não suportado por esta implementação do ArchbaseAuthenticator");
|
|
1853
1864
|
try {
|
|
1854
1865
|
i(!0);
|
|
1855
|
-
const
|
|
1856
|
-
return i(!1),
|
|
1857
|
-
} catch (
|
|
1858
|
-
throw i(!1), S(oe(
|
|
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;
|
|
1859
1870
|
}
|
|
1860
|
-
},
|
|
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" };
|
|
1861
1872
|
K(() => {
|
|
1862
1873
|
const u = setInterval(() => {
|
|
1863
|
-
o && o.access_token && t.isTokenExpired(o, e) &&
|
|
1874
|
+
o && o.access_token && t.isTokenExpired(o, e) && pe();
|
|
1864
1875
|
}, r);
|
|
1865
1876
|
return () => {
|
|
1866
1877
|
clearInterval(u);
|
|
1867
1878
|
};
|
|
1868
1879
|
}, [o]);
|
|
1869
|
-
const
|
|
1880
|
+
const pe = async () => {
|
|
1870
1881
|
if (o)
|
|
1871
1882
|
try {
|
|
1872
1883
|
const u = await s.refreshToken(o?.refresh_token);
|
|
1873
1884
|
t.saveToken(u), a(u);
|
|
1874
1885
|
} catch (u) {
|
|
1875
|
-
console.error("Erro ao renovar o token:", u),
|
|
1886
|
+
console.error("Erro ao renovar o token:", u), re();
|
|
1876
1887
|
}
|
|
1877
1888
|
};
|
|
1878
1889
|
return {
|
|
1879
1890
|
// Métodos básicos (compatibilidade)
|
|
1880
|
-
login:
|
|
1881
|
-
logout:
|
|
1891
|
+
login: f,
|
|
1892
|
+
logout: re,
|
|
1882
1893
|
username: D,
|
|
1883
1894
|
isAuthenticated: E,
|
|
1884
1895
|
isAuthenticating: c,
|
|
1885
1896
|
isInitializing: l,
|
|
1886
|
-
isError:
|
|
1887
|
-
error:
|
|
1888
|
-
clearError:
|
|
1897
|
+
isError: R,
|
|
1898
|
+
error: g,
|
|
1899
|
+
clearError: Z,
|
|
1889
1900
|
accessToken: o ? o.access_token : null,
|
|
1890
1901
|
// Métodos opcionais para autenticação avançada
|
|
1891
|
-
loginWithContext:
|
|
1892
|
-
loginFlexible:
|
|
1893
|
-
loginSocial:
|
|
1894
|
-
register:
|
|
1895
|
-
getSupportedContexts:
|
|
1896
|
-
validateContext:
|
|
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,
|
|
1897
1908
|
// MFA / segundo fator (2 passos)
|
|
1898
|
-
mfaRequired:
|
|
1899
|
-
verifyMfa: typeof s.verifyMfa == "function" ?
|
|
1900
|
-
cancelMfa:
|
|
1909
|
+
mfaRequired: M,
|
|
1910
|
+
verifyMfa: typeof s.verifyMfa == "function" ? ee : void 0,
|
|
1911
|
+
cancelMfa: I,
|
|
1912
|
+
// Troca de senha obrigatória (CREDENTIALS_EXPIRED)
|
|
1913
|
+
passwordChangeRequired: w,
|
|
1914
|
+
clearPasswordChangeRequired: q,
|
|
1901
1915
|
// Informações de contexto
|
|
1902
|
-
context:
|
|
1916
|
+
context: B,
|
|
1903
1917
|
// Detecção de capacidades
|
|
1904
|
-
capabilities:
|
|
1918
|
+
capabilities: U
|
|
1905
1919
|
};
|
|
1906
|
-
},
|
|
1907
|
-
const r =
|
|
1908
|
-
(s) => s.get(
|
|
1909
|
-
), [e, t] =
|
|
1920
|
+
}, Yr = () => {
|
|
1921
|
+
const r = De(
|
|
1922
|
+
(s) => s.get(Y.TokenManager)
|
|
1923
|
+
), [e, t] = p(null);
|
|
1910
1924
|
return K(() => {
|
|
1911
1925
|
const s = r.getToken();
|
|
1912
1926
|
s && t(s.access_token);
|
|
1913
1927
|
}, []), {
|
|
1914
1928
|
token: e
|
|
1915
1929
|
};
|
|
1916
|
-
},
|
|
1917
|
-
const r =
|
|
1918
|
-
(l) => l.get(
|
|
1919
|
-
), [e, t] =
|
|
1930
|
+
}, Xr = () => {
|
|
1931
|
+
const r = De(
|
|
1932
|
+
(l) => l.get(Y.Authenticator)
|
|
1933
|
+
), [e, t] = p(!1), [s, o] = p("");
|
|
1920
1934
|
return {
|
|
1921
1935
|
sendResetPasswordEmail: async (l) => {
|
|
1922
1936
|
try {
|
|
1923
1937
|
return await r.sendResetPasswordEmail(l);
|
|
1924
|
-
} catch (
|
|
1925
|
-
throw o(oe(
|
|
1938
|
+
} catch (y) {
|
|
1939
|
+
throw o(oe(y)), t(!0), y;
|
|
1926
1940
|
}
|
|
1927
1941
|
},
|
|
1928
|
-
resetPassword: async (l,
|
|
1942
|
+
resetPassword: async (l, y, E) => {
|
|
1929
1943
|
try {
|
|
1930
|
-
return await r.resetPassword(l,
|
|
1944
|
+
return await r.resetPassword(l, y, E);
|
|
1931
1945
|
} catch (d) {
|
|
1932
1946
|
throw o(oe(d)), t(!0), d;
|
|
1933
1947
|
}
|
|
@@ -1938,36 +1952,36 @@ const br = () => Vt().user, Dt = "archbaseSecurityManagerStore", Gr = ({ resourc
|
|
|
1938
1952
|
t(!1), o("");
|
|
1939
1953
|
}
|
|
1940
1954
|
};
|
|
1941
|
-
},
|
|
1942
|
-
/* @__PURE__ */
|
|
1943
|
-
/* @__PURE__ */ n(
|
|
1944
|
-
/* @__PURE__ */ n(
|
|
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: [
|
|
1957
|
+
/* @__PURE__ */ n(dt, { size: "sm" }),
|
|
1958
|
+
/* @__PURE__ */ n(F, { size: "sm", c: "dimmed", children: "Carregando permissões..." })
|
|
1945
1959
|
] }),
|
|
1946
1960
|
/* @__PURE__ */ n(Ie, { height: 40, radius: "sm" }),
|
|
1947
1961
|
/* @__PURE__ */ n(Ie, { height: 200, radius: "sm" }),
|
|
1948
|
-
/* @__PURE__ */
|
|
1962
|
+
/* @__PURE__ */ C(de, { gap: "md", children: [
|
|
1949
1963
|
/* @__PURE__ */ n(Ie, { height: 36, width: 100, radius: "sm" }),
|
|
1950
1964
|
/* @__PURE__ */ n(Ie, { height: 36, width: 100, radius: "sm" })
|
|
1951
1965
|
] })
|
|
1952
|
-
] }) }),
|
|
1966
|
+
] }) }), Ye = Ve(null), Qr = ({
|
|
1953
1967
|
children: r,
|
|
1954
1968
|
user: e,
|
|
1955
1969
|
onError: t
|
|
1956
1970
|
}) => {
|
|
1957
|
-
const [s, o] =
|
|
1958
|
-
c(
|
|
1959
|
-
}, [t]),
|
|
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);
|
|
1973
|
+
}, [t]), A = {
|
|
1960
1974
|
user: e,
|
|
1961
1975
|
isLoading: s,
|
|
1962
|
-
hasGlobalPermission:
|
|
1976
|
+
hasGlobalPermission: y,
|
|
1963
1977
|
hasAnyGlobalPermission: E,
|
|
1964
1978
|
hasAllGlobalPermissions: d,
|
|
1965
1979
|
isAdmin: l,
|
|
1966
1980
|
error: a,
|
|
1967
|
-
setError:
|
|
1981
|
+
setError: R
|
|
1968
1982
|
};
|
|
1969
|
-
return /* @__PURE__ */ n(
|
|
1970
|
-
},
|
|
1983
|
+
return /* @__PURE__ */ n(Ye.Provider, { value: A, children: r });
|
|
1984
|
+
}, Nt = Ve(null), kr = ({
|
|
1971
1985
|
children: r,
|
|
1972
1986
|
resourceName: e,
|
|
1973
1987
|
resourceDescription: t,
|
|
@@ -1977,71 +1991,71 @@ const br = () => Vt().user, Dt = "archbaseSecurityManagerStore", Gr = ({ resourc
|
|
|
1977
1991
|
onSecurityReady: c,
|
|
1978
1992
|
onError: i
|
|
1979
1993
|
}) => {
|
|
1980
|
-
const l =
|
|
1994
|
+
const l = We(Ye);
|
|
1981
1995
|
if (!l)
|
|
1982
1996
|
throw new Error("ArchbaseViewSecurityProvider deve ser usado dentro de um ArchbaseSecurityProvider");
|
|
1983
|
-
const { user:
|
|
1984
|
-
if (
|
|
1985
|
-
if (!
|
|
1986
|
-
|
|
1997
|
+
const { user: y, isAdmin: E } = l, [d, R] = p(null), [A, g] = p(!0), [S, D] = p(null);
|
|
1998
|
+
if (it.useEffect(() => {
|
|
1999
|
+
if (!y) {
|
|
2000
|
+
g(!1);
|
|
1987
2001
|
return;
|
|
1988
2002
|
}
|
|
1989
|
-
const
|
|
2003
|
+
const w = new wt(e, t, E);
|
|
1990
2004
|
(async () => {
|
|
1991
|
-
|
|
2005
|
+
g(!0);
|
|
1992
2006
|
try {
|
|
1993
|
-
await
|
|
1994
|
-
|
|
2007
|
+
await w.apply(() => {
|
|
2008
|
+
R(w), g(!1), c && c(w);
|
|
1995
2009
|
});
|
|
1996
2010
|
} catch {
|
|
1997
|
-
const
|
|
1998
|
-
D(
|
|
2011
|
+
const O = w.getError() || "Erro ao carregar permissões";
|
|
2012
|
+
D(O), g(!1), i && i(O);
|
|
1999
2013
|
}
|
|
2000
2014
|
})();
|
|
2001
|
-
}, [e, t,
|
|
2002
|
-
return a ? /* @__PURE__ */ n(ne, { children: a }) : /* @__PURE__ */ n(
|
|
2015
|
+
}, [e, t, y, E, c, i]), A)
|
|
2016
|
+
return a ? /* @__PURE__ */ n(ne, { children: a }) : /* @__PURE__ */ n(xr, {});
|
|
2003
2017
|
if (S)
|
|
2004
|
-
return /* @__PURE__ */ n("div", { className: "archbase-security-error", children: /* @__PURE__ */
|
|
2018
|
+
return /* @__PURE__ */ n("div", { className: "archbase-security-error", children: /* @__PURE__ */ C("div", { children: [
|
|
2005
2019
|
"Erro ao carregar permissões: ",
|
|
2006
2020
|
S
|
|
2007
2021
|
] }) });
|
|
2008
|
-
if (!
|
|
2022
|
+
if (!y)
|
|
2009
2023
|
return o || /* @__PURE__ */ n("div", { className: "archbase-security-no-user", children: /* @__PURE__ */ n("div", { children: "É necessário fazer login para acessar esta área" }) });
|
|
2010
2024
|
if (s.length > 0 && d && !s.every(
|
|
2011
|
-
(
|
|
2025
|
+
(T) => d.hasPermission(T)
|
|
2012
2026
|
))
|
|
2013
|
-
return o || /* @__PURE__ */
|
|
2027
|
+
return o || /* @__PURE__ */ C("div", { className: "archbase-security-access-denied", children: [
|
|
2014
2028
|
/* @__PURE__ */ n("div", { children: "Você não possui permissão para acessar esta área" }),
|
|
2015
|
-
/* @__PURE__ */
|
|
2029
|
+
/* @__PURE__ */ C("small", { children: [
|
|
2016
2030
|
"Permissões necessárias: ",
|
|
2017
2031
|
s.join(", ")
|
|
2018
2032
|
] })
|
|
2019
2033
|
] });
|
|
2020
|
-
const
|
|
2034
|
+
const b = {
|
|
2021
2035
|
securityManager: d,
|
|
2022
|
-
hasPermission: (
|
|
2023
|
-
hasAnyPermission: (
|
|
2024
|
-
hasAllPermissions: (
|
|
2025
|
-
registerAction: (
|
|
2026
|
-
d?.registerAction(
|
|
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);
|
|
2027
2041
|
},
|
|
2028
|
-
isLoading:
|
|
2042
|
+
isLoading: A,
|
|
2029
2043
|
error: S
|
|
2030
2044
|
};
|
|
2031
|
-
return /* @__PURE__ */ n(
|
|
2032
|
-
},
|
|
2033
|
-
const r =
|
|
2045
|
+
return /* @__PURE__ */ n(Nt.Provider, { value: b, children: r });
|
|
2046
|
+
}, Sr = () => {
|
|
2047
|
+
const r = We(Ye);
|
|
2034
2048
|
if (!r)
|
|
2035
2049
|
throw new Error("useArchbaseSecurity deve ser usado dentro de um ArchbaseSecurityProvider");
|
|
2036
2050
|
return r;
|
|
2037
|
-
},
|
|
2038
|
-
const r =
|
|
2051
|
+
}, Xe = () => {
|
|
2052
|
+
const r = We(Nt);
|
|
2039
2053
|
if (!r)
|
|
2040
2054
|
throw new Error("useArchbaseViewSecurity deve ser usado dentro de um ArchbaseViewSecurityProvider");
|
|
2041
2055
|
return r;
|
|
2042
|
-
},
|
|
2043
|
-
const t =
|
|
2044
|
-
return
|
|
2056
|
+
}, Zr = (r, e) => {
|
|
2057
|
+
const t = Xe(), { hasPermission: s, hasAnyPermission: o, hasAllPermissions: a, registerAction: c, securityManager: i, isLoading: l, error: y } = t;
|
|
2058
|
+
return it.useEffect(() => {
|
|
2045
2059
|
r && e && (c("create", `Criar ${e}`), c("edit", `Editar ${e}`), c("delete", `Deletar ${e}`), c("view", `Visualizar ${e}`), c("list", `Listar ${e}`));
|
|
2046
2060
|
}, [r, e, c]), {
|
|
2047
2061
|
hasPermission: s,
|
|
@@ -2055,17 +2069,17 @@ const br = () => Vt().user, Dt = "archbaseSecurityManagerStore", Gr = ({ resourc
|
|
|
2055
2069
|
canView: s("view"),
|
|
2056
2070
|
canList: s("list"),
|
|
2057
2071
|
isLoading: l,
|
|
2058
|
-
error:
|
|
2072
|
+
error: y
|
|
2059
2073
|
};
|
|
2060
|
-
},
|
|
2061
|
-
const r =
|
|
2074
|
+
}, es = () => {
|
|
2075
|
+
const r = Xe();
|
|
2062
2076
|
return {
|
|
2063
2077
|
check: r.hasPermission,
|
|
2064
2078
|
checkAny: r.hasAnyPermission,
|
|
2065
2079
|
checkAll: r.hasAllPermissions,
|
|
2066
|
-
isAdmin:
|
|
2080
|
+
isAdmin: Sr().isAdmin
|
|
2067
2081
|
};
|
|
2068
|
-
},
|
|
2082
|
+
}, Mt = ({
|
|
2069
2083
|
children: r,
|
|
2070
2084
|
actionName: e,
|
|
2071
2085
|
requiredPermissions: t = [],
|
|
@@ -2074,13 +2088,13 @@ const br = () => Vt().user, Dt = "archbaseSecurityManagerStore", Gr = ({ resourc
|
|
|
2074
2088
|
fallback: a = null,
|
|
2075
2089
|
autoRegister: c = !0
|
|
2076
2090
|
}) => {
|
|
2077
|
-
const { hasPermission: i, hasAnyPermission: l, hasAllPermissions:
|
|
2091
|
+
const { hasPermission: i, hasAnyPermission: l, hasAllPermissions: y, registerAction: E } = Xe();
|
|
2078
2092
|
K(() => {
|
|
2079
2093
|
c && e && o && E(e, o);
|
|
2080
2094
|
}, [e, o, c, E]);
|
|
2081
2095
|
let d = !1;
|
|
2082
|
-
return e ? d = i(e) : t.length > 0 ? d = s ?
|
|
2083
|
-
},
|
|
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 = ({
|
|
2084
2098
|
actionName: r,
|
|
2085
2099
|
actionDescription: e,
|
|
2086
2100
|
children: t,
|
|
@@ -2090,17 +2104,17 @@ const br = () => Vt().user, Dt = "archbaseSecurityManagerStore", Gr = ({ resourc
|
|
|
2090
2104
|
style: c = {},
|
|
2091
2105
|
variant: i = "primary",
|
|
2092
2106
|
size: l = "medium",
|
|
2093
|
-
type:
|
|
2107
|
+
type: y = "button"
|
|
2094
2108
|
}) => {
|
|
2095
2109
|
const E = () => {
|
|
2096
|
-
const
|
|
2097
|
-
return `${
|
|
2110
|
+
const R = "archbase-secure-btn", A = `archbase-secure-btn--${i}`, g = `archbase-secure-btn--${l}`;
|
|
2111
|
+
return `${R} ${A} ${g} ${a}`.trim();
|
|
2098
2112
|
}, d = () => {
|
|
2099
|
-
const
|
|
2113
|
+
const R = {
|
|
2100
2114
|
small: { padding: "4px 8px", fontSize: "12px" },
|
|
2101
2115
|
medium: { padding: "8px 16px", fontSize: "14px" },
|
|
2102
2116
|
large: { padding: "12px 24px", fontSize: "16px" }
|
|
2103
|
-
},
|
|
2117
|
+
}, A = {
|
|
2104
2118
|
primary: { backgroundColor: "#007bff", color: "white" },
|
|
2105
2119
|
secondary: { backgroundColor: "#6c757d", color: "white" },
|
|
2106
2120
|
danger: { backgroundColor: "#dc3545", color: "white" },
|
|
@@ -2113,13 +2127,13 @@ const br = () => Vt().user, Dt = "archbaseSecurityManagerStore", Gr = ({ resourc
|
|
|
2113
2127
|
cursor: o ? "not-allowed" : "pointer",
|
|
2114
2128
|
fontWeight: "500",
|
|
2115
2129
|
opacity: o ? 0.6 : 1,
|
|
2116
|
-
...
|
|
2117
|
-
...
|
|
2130
|
+
...R[l],
|
|
2131
|
+
...A[i],
|
|
2118
2132
|
...c
|
|
2119
2133
|
};
|
|
2120
2134
|
};
|
|
2121
2135
|
return /* @__PURE__ */ n(
|
|
2122
|
-
|
|
2136
|
+
Mt,
|
|
2123
2137
|
{
|
|
2124
2138
|
actionName: r,
|
|
2125
2139
|
actionDescription: e,
|
|
@@ -2127,7 +2141,7 @@ const br = () => Vt().user, Dt = "archbaseSecurityManagerStore", Gr = ({ resourc
|
|
|
2127
2141
|
children: /* @__PURE__ */ n(
|
|
2128
2142
|
"button",
|
|
2129
2143
|
{
|
|
2130
|
-
type:
|
|
2144
|
+
type: y,
|
|
2131
2145
|
onClick: s,
|
|
2132
2146
|
disabled: o,
|
|
2133
2147
|
className: E(),
|
|
@@ -2137,7 +2151,7 @@ const br = () => Vt().user, Dt = "archbaseSecurityManagerStore", Gr = ({ resourc
|
|
|
2137
2151
|
)
|
|
2138
2152
|
}
|
|
2139
2153
|
);
|
|
2140
|
-
},
|
|
2154
|
+
}, rs = ({
|
|
2141
2155
|
children: r,
|
|
2142
2156
|
actionName: e,
|
|
2143
2157
|
actionDescription: t,
|
|
@@ -2146,11 +2160,11 @@ const br = () => Vt().user, Dt = "archbaseSecurityManagerStore", Gr = ({ resourc
|
|
|
2146
2160
|
fallbackText: a = "Campo não disponível",
|
|
2147
2161
|
fallbackComponent: c
|
|
2148
2162
|
}) => e ? /* @__PURE__ */ n(
|
|
2149
|
-
|
|
2163
|
+
Mt,
|
|
2150
2164
|
{
|
|
2151
2165
|
actionName: e,
|
|
2152
2166
|
actionDescription: t,
|
|
2153
|
-
fallback: c || /* @__PURE__ */
|
|
2167
|
+
fallback: c || /* @__PURE__ */ C("div", { className: "archbase-secure-field-fallback", style: {
|
|
2154
2168
|
padding: "8px",
|
|
2155
2169
|
color: "#666",
|
|
2156
2170
|
fontStyle: "italic",
|
|
@@ -2158,7 +2172,7 @@ const br = () => Vt().user, Dt = "archbaseSecurityManagerStore", Gr = ({ resourc
|
|
|
2158
2172
|
border: "1px dashed #dee2e6",
|
|
2159
2173
|
borderRadius: "4px"
|
|
2160
2174
|
}, children: [
|
|
2161
|
-
s && o && /* @__PURE__ */
|
|
2175
|
+
s && o && /* @__PURE__ */ C("label", { style: { fontWeight: "bold" }, children: [
|
|
2162
2176
|
o,
|
|
2163
2177
|
": "
|
|
2164
2178
|
] }),
|
|
@@ -2167,11 +2181,11 @@ const br = () => Vt().user, Dt = "archbaseSecurityManagerStore", Gr = ({ resourc
|
|
|
2167
2181
|
children: r
|
|
2168
2182
|
}
|
|
2169
2183
|
) : /* @__PURE__ */ n(ne, { children: r });
|
|
2170
|
-
function
|
|
2184
|
+
function ss(r, e) {
|
|
2171
2185
|
return function(s) {
|
|
2172
2186
|
const { resourceName: o, resourceDescription: a, requiredPermissions: c, fallbackComponent: i } = e;
|
|
2173
2187
|
return /* @__PURE__ */ n(
|
|
2174
|
-
|
|
2188
|
+
kr,
|
|
2175
2189
|
{
|
|
2176
2190
|
resourceName: o,
|
|
2177
2191
|
resourceDescription: a,
|
|
@@ -2183,75 +2197,76 @@ function ts(r, e) {
|
|
|
2183
2197
|
};
|
|
2184
2198
|
}
|
|
2185
2199
|
export {
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2200
|
+
Rt as ARCHBASE_SECURITY_MANAGER_STORE,
|
|
2201
|
+
vr as AccessIntervalDto,
|
|
2202
|
+
At as AccessScheduleDto,
|
|
2203
|
+
qe as AccessTokenDto,
|
|
2204
|
+
br as ActionDto,
|
|
2205
|
+
Ke as ApiTokenDto,
|
|
2206
|
+
Dt as ArchbaseAccessTokenService,
|
|
2207
|
+
Ut as ArchbaseApiTokenService,
|
|
2208
|
+
gr as ArchbaseAuthContext,
|
|
2209
|
+
Fr as ArchbaseAuthProvider,
|
|
2210
|
+
Pt as ArchbaseGroupService,
|
|
2211
|
+
Hr as ArchbaseLogin,
|
|
2212
|
+
Gr as ArchbaseMfaSetup,
|
|
2213
|
+
Tt as ArchbaseProfileService,
|
|
2214
|
+
Mt as ArchbaseProtectedComponent,
|
|
2215
|
+
Jr as ArchbaseResetPassword,
|
|
2216
|
+
_t as ArchbaseResourceService,
|
|
2217
|
+
ts as ArchbaseSecureActionButton,
|
|
2218
|
+
rs as ArchbaseSecureFormField,
|
|
2219
|
+
wt as ArchbaseSecurityManager,
|
|
2220
|
+
Qr as ArchbaseSecurityProvider,
|
|
2207
2221
|
J as ArchbaseTenantManager,
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2222
|
+
ht as ArchbaseUser,
|
|
2223
|
+
It as ArchbaseUserService,
|
|
2224
|
+
pt as ArchbaseUsernameAndPassword,
|
|
2225
|
+
pt as ArchbaseUsernameAndPasswordImpl,
|
|
2226
|
+
kr as ArchbaseViewSecurityProvider,
|
|
2213
2227
|
Oe as CONTEXT_STORAGE_KEY,
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2228
|
+
tr as DefaultArchbaseTokenManager,
|
|
2229
|
+
xr as DefaultSecurityLoading,
|
|
2230
|
+
ce as ENCRYPTION_KEY,
|
|
2231
|
+
mt as FetchError,
|
|
2232
|
+
Se as GroupDto,
|
|
2233
|
+
Wr as PermissionDto,
|
|
2234
|
+
ke as ProfileDto,
|
|
2235
|
+
St as ResourceDto,
|
|
2236
|
+
we as SecurityDto,
|
|
2237
|
+
ge as SecurityType,
|
|
2224
2238
|
Me as TOKEN_COOKIE_NAME,
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
Xr as
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2239
|
+
wr as TipoRecurso,
|
|
2240
|
+
Le as USER_NAME,
|
|
2241
|
+
Be as USER_NAME_AND_PASSWORD,
|
|
2242
|
+
Ne as UserDto,
|
|
2243
|
+
Ge as UserGroupDto,
|
|
2244
|
+
hr as createInternalConfig,
|
|
2245
|
+
Te as decodeJWT,
|
|
2246
|
+
fe as epochAtSecondsFromNow,
|
|
2247
|
+
nt as epochTimeIsPast,
|
|
2248
|
+
cr as fetchTokens,
|
|
2249
|
+
lr as fetchWithRefreshToken,
|
|
2250
|
+
sr as generateCodeChallenge,
|
|
2251
|
+
rr as generateRandomString,
|
|
2252
|
+
ft as getRandomInteger,
|
|
2253
|
+
mr as getRefreshExpiresIn,
|
|
2254
|
+
$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,
|
|
2267
|
+
Xe as useArchbaseViewSecurity,
|
|
2268
|
+
jr as useBrowserStorage,
|
|
2269
|
+
pr as validateConfig,
|
|
2270
|
+
ur as validateState,
|
|
2271
|
+
ss as withArchbaseSecurity
|
|
2257
2272
|
};
|