thecore-auth 0.0.73 → 0.0.74
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/README.md +162 -1
- package/dist/thecore-auth.cjs.js +10 -10
- package/dist/thecore-auth.esm.js +400 -399
- package/package.json +1 -1
package/dist/thecore-auth.esm.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as r from "react";
|
|
2
|
-
import
|
|
2
|
+
import F, { createContext as ae, useState as j, useContext as se, useEffect as z } from "react";
|
|
3
3
|
import at from "jwt-decode";
|
|
4
|
-
import { useNavigate as
|
|
4
|
+
import { useNavigate as Ue, useLocation as st, matchPath as ze, Outlet as Ce, Navigate as it, useParams as lt, Routes as ct, Route as Q } from "react-router-dom";
|
|
5
5
|
import { BrowserRouter as Vt, Link as Xt, NavLink as Jt, Outlet as Kt, Route as Qt, Routes as e0, useLocation as t0, useMatch as r0 } from "react-router-dom";
|
|
6
6
|
import ut from "axios";
|
|
7
7
|
var me = { exports: {} }, ue = {};
|
|
@@ -14,10 +14,10 @@ var me = { exports: {} }, ue = {};
|
|
|
14
14
|
* This source code is licensed under the MIT license found in the
|
|
15
15
|
* LICENSE file in the root directory of this source tree.
|
|
16
16
|
*/
|
|
17
|
-
var
|
|
17
|
+
var Ge;
|
|
18
18
|
function ft() {
|
|
19
|
-
if (
|
|
20
|
-
|
|
19
|
+
if (Ge) return ue;
|
|
20
|
+
Ge = 1;
|
|
21
21
|
var t = Symbol.for("react.transitional.element"), o = Symbol.for("react.fragment");
|
|
22
22
|
function n(s, c, u) {
|
|
23
23
|
var f = null;
|
|
@@ -46,42 +46,42 @@ var fe = {};
|
|
|
46
46
|
* This source code is licensed under the MIT license found in the
|
|
47
47
|
* LICENSE file in the root directory of this source tree.
|
|
48
48
|
*/
|
|
49
|
-
var
|
|
49
|
+
var Be;
|
|
50
50
|
function dt() {
|
|
51
|
-
return
|
|
51
|
+
return Be || (Be = 1, process.env.NODE_ENV !== "production" && function() {
|
|
52
52
|
function t(e) {
|
|
53
53
|
if (e == null) return null;
|
|
54
54
|
if (typeof e == "function")
|
|
55
55
|
return e.$$typeof === M ? null : e.displayName || e.name || null;
|
|
56
56
|
if (typeof e == "string") return e;
|
|
57
57
|
switch (e) {
|
|
58
|
-
case
|
|
58
|
+
case D:
|
|
59
59
|
return "Fragment";
|
|
60
|
-
case
|
|
60
|
+
case T:
|
|
61
61
|
return "Portal";
|
|
62
|
-
case
|
|
62
|
+
case W:
|
|
63
63
|
return "Profiler";
|
|
64
|
-
case
|
|
64
|
+
case te:
|
|
65
65
|
return "StrictMode";
|
|
66
|
-
case
|
|
66
|
+
case V:
|
|
67
67
|
return "Suspense";
|
|
68
|
-
case
|
|
68
|
+
case G:
|
|
69
69
|
return "SuspenseList";
|
|
70
70
|
}
|
|
71
71
|
if (typeof e == "object")
|
|
72
72
|
switch (typeof e.tag == "number" && console.error(
|
|
73
73
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
74
74
|
), e.$$typeof) {
|
|
75
|
-
case
|
|
75
|
+
case H:
|
|
76
76
|
return (e.displayName || "Context") + ".Provider";
|
|
77
|
-
case
|
|
77
|
+
case q:
|
|
78
78
|
return (e._context.displayName || "Context") + ".Consumer";
|
|
79
|
-
case
|
|
79
|
+
case Y:
|
|
80
80
|
var i = e.render;
|
|
81
81
|
return e = e.displayName, e || (e = i.displayName || i.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
|
|
82
|
-
case
|
|
82
|
+
case X:
|
|
83
83
|
return i = e.displayName || null, i !== null ? i : t(e.type) || "Memo";
|
|
84
|
-
case
|
|
84
|
+
case R:
|
|
85
85
|
i = e._payload, e = e._init;
|
|
86
86
|
try {
|
|
87
87
|
return t(e(i));
|
|
@@ -102,11 +102,11 @@ function dt() {
|
|
|
102
102
|
}
|
|
103
103
|
if (i) {
|
|
104
104
|
i = console;
|
|
105
|
-
var l = i.error,
|
|
105
|
+
var l = i.error, E = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
106
106
|
return l.call(
|
|
107
107
|
i,
|
|
108
108
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
109
|
-
|
|
109
|
+
E
|
|
110
110
|
), o(e);
|
|
111
111
|
}
|
|
112
112
|
}
|
|
@@ -114,7 +114,7 @@ function dt() {
|
|
|
114
114
|
}
|
|
115
115
|
function c() {
|
|
116
116
|
if (le === 0) {
|
|
117
|
-
|
|
117
|
+
Le = console.log, Se = console.info, Oe = console.warn, Pe = console.error, ke = console.group, Re = console.groupCollapsed, Te = console.groupEnd;
|
|
118
118
|
var e = {
|
|
119
119
|
configurable: !0,
|
|
120
120
|
enumerable: !0,
|
|
@@ -137,13 +137,13 @@ function dt() {
|
|
|
137
137
|
if (le--, le === 0) {
|
|
138
138
|
var e = { configurable: !0, enumerable: !0, writable: !0 };
|
|
139
139
|
Object.defineProperties(console, {
|
|
140
|
-
log:
|
|
141
|
-
info:
|
|
142
|
-
warn:
|
|
143
|
-
error:
|
|
144
|
-
group:
|
|
145
|
-
groupCollapsed:
|
|
146
|
-
groupEnd:
|
|
140
|
+
log: J({}, e, { value: Le }),
|
|
141
|
+
info: J({}, e, { value: Se }),
|
|
142
|
+
warn: J({}, e, { value: Oe }),
|
|
143
|
+
error: J({}, e, { value: Pe }),
|
|
144
|
+
group: J({}, e, { value: ke }),
|
|
145
|
+
groupCollapsed: J({}, e, { value: Re }),
|
|
146
|
+
groupEnd: J({}, e, { value: Te })
|
|
147
147
|
});
|
|
148
148
|
}
|
|
149
149
|
0 > le && console.error(
|
|
@@ -156,108 +156,108 @@ function dt() {
|
|
|
156
156
|
throw Error();
|
|
157
157
|
} catch (l) {
|
|
158
158
|
var i = l.stack.trim().match(/\n( *(at )?)/);
|
|
159
|
-
Ee = i && i[1] || "",
|
|
159
|
+
Ee = i && i[1] || "", _e = -1 < l.stack.indexOf(`
|
|
160
160
|
at`) ? " (<anonymous>)" : -1 < l.stack.indexOf("@") ? "@unknown:0:0" : "";
|
|
161
161
|
}
|
|
162
162
|
return `
|
|
163
|
-
` + Ee + e +
|
|
163
|
+
` + Ee + e + _e;
|
|
164
164
|
}
|
|
165
165
|
function m(e, i) {
|
|
166
166
|
if (!e || be) return "";
|
|
167
167
|
var l = ye.get(e);
|
|
168
168
|
if (l !== void 0) return l;
|
|
169
169
|
be = !0, l = Error.prepareStackTrace, Error.prepareStackTrace = void 0;
|
|
170
|
-
var
|
|
171
|
-
|
|
170
|
+
var E = null;
|
|
171
|
+
E = I.H, I.H = null, c();
|
|
172
172
|
try {
|
|
173
|
-
var
|
|
173
|
+
var _ = {
|
|
174
174
|
DetermineComponentFrameRoot: function() {
|
|
175
175
|
try {
|
|
176
176
|
if (i) {
|
|
177
|
-
var
|
|
177
|
+
var U = function() {
|
|
178
178
|
throw Error();
|
|
179
179
|
};
|
|
180
|
-
if (Object.defineProperty(
|
|
180
|
+
if (Object.defineProperty(U.prototype, "props", {
|
|
181
181
|
set: function() {
|
|
182
182
|
throw Error();
|
|
183
183
|
}
|
|
184
184
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
185
185
|
try {
|
|
186
|
-
Reflect.construct(
|
|
187
|
-
} catch (
|
|
188
|
-
var de =
|
|
186
|
+
Reflect.construct(U, []);
|
|
187
|
+
} catch ($) {
|
|
188
|
+
var de = $;
|
|
189
189
|
}
|
|
190
|
-
Reflect.construct(e, [],
|
|
190
|
+
Reflect.construct(e, [], U);
|
|
191
191
|
} else {
|
|
192
192
|
try {
|
|
193
|
-
|
|
194
|
-
} catch (
|
|
195
|
-
de =
|
|
193
|
+
U.call();
|
|
194
|
+
} catch ($) {
|
|
195
|
+
de = $;
|
|
196
196
|
}
|
|
197
|
-
e.call(
|
|
197
|
+
e.call(U.prototype);
|
|
198
198
|
}
|
|
199
199
|
} else {
|
|
200
200
|
try {
|
|
201
201
|
throw Error();
|
|
202
|
-
} catch (
|
|
203
|
-
de =
|
|
202
|
+
} catch ($) {
|
|
203
|
+
de = $;
|
|
204
204
|
}
|
|
205
|
-
(
|
|
205
|
+
(U = e()) && typeof U.catch == "function" && U.catch(function() {
|
|
206
206
|
});
|
|
207
207
|
}
|
|
208
|
-
} catch (
|
|
209
|
-
if (
|
|
210
|
-
return [
|
|
208
|
+
} catch ($) {
|
|
209
|
+
if ($ && de && typeof $.stack == "string")
|
|
210
|
+
return [$.stack, de.stack];
|
|
211
211
|
}
|
|
212
212
|
return [null, null];
|
|
213
213
|
}
|
|
214
214
|
};
|
|
215
|
-
|
|
216
|
-
var
|
|
217
|
-
|
|
215
|
+
_.DetermineComponentFrameRoot.displayName = "DetermineComponentFrameRoot";
|
|
216
|
+
var S = Object.getOwnPropertyDescriptor(
|
|
217
|
+
_.DetermineComponentFrameRoot,
|
|
218
218
|
"name"
|
|
219
219
|
);
|
|
220
|
-
|
|
221
|
-
|
|
220
|
+
S && S.configurable && Object.defineProperty(
|
|
221
|
+
_.DetermineComponentFrameRoot,
|
|
222
222
|
"name",
|
|
223
223
|
{ value: "DetermineComponentFrameRoot" }
|
|
224
224
|
);
|
|
225
|
-
var
|
|
226
|
-
if (
|
|
227
|
-
var
|
|
228
|
-
`),
|
|
225
|
+
var h = _.DetermineComponentFrameRoot(), B = h[0], oe = h[1];
|
|
226
|
+
if (B && oe) {
|
|
227
|
+
var N = B.split(`
|
|
228
|
+
`), K = oe.split(`
|
|
229
229
|
`);
|
|
230
|
-
for (
|
|
230
|
+
for (h = S = 0; S < N.length && !N[S].includes(
|
|
231
231
|
"DetermineComponentFrameRoot"
|
|
232
232
|
); )
|
|
233
|
-
|
|
234
|
-
for (;
|
|
233
|
+
S++;
|
|
234
|
+
for (; h < K.length && !K[h].includes(
|
|
235
235
|
"DetermineComponentFrameRoot"
|
|
236
236
|
); )
|
|
237
|
-
|
|
238
|
-
if (
|
|
239
|
-
for (
|
|
240
|
-
|
|
241
|
-
for (; 1 <=
|
|
242
|
-
if (
|
|
243
|
-
if (
|
|
237
|
+
h++;
|
|
238
|
+
if (S === N.length || h === K.length)
|
|
239
|
+
for (S = N.length - 1, h = K.length - 1; 1 <= S && 0 <= h && N[S] !== K[h]; )
|
|
240
|
+
h--;
|
|
241
|
+
for (; 1 <= S && 0 <= h; S--, h--)
|
|
242
|
+
if (N[S] !== K[h]) {
|
|
243
|
+
if (S !== 1 || h !== 1)
|
|
244
244
|
do
|
|
245
|
-
if (
|
|
245
|
+
if (S--, h--, 0 > h || N[S] !== K[h]) {
|
|
246
246
|
var ce = `
|
|
247
|
-
` +
|
|
247
|
+
` + N[S].replace(
|
|
248
248
|
" at new ",
|
|
249
249
|
" at "
|
|
250
250
|
);
|
|
251
251
|
return e.displayName && ce.includes("<anonymous>") && (ce = ce.replace("<anonymous>", e.displayName)), typeof e == "function" && ye.set(e, ce), ce;
|
|
252
252
|
}
|
|
253
|
-
while (1 <=
|
|
253
|
+
while (1 <= S && 0 <= h);
|
|
254
254
|
break;
|
|
255
255
|
}
|
|
256
256
|
}
|
|
257
257
|
} finally {
|
|
258
|
-
be = !1, I.H =
|
|
258
|
+
be = !1, I.H = E, u(), Error.prepareStackTrace = l;
|
|
259
259
|
}
|
|
260
|
-
return
|
|
260
|
+
return N = (N = e ? e.displayName || e.name : "") ? f(N) : "", typeof e == "function" && ye.set(e, N), N;
|
|
261
261
|
}
|
|
262
262
|
function d(e) {
|
|
263
263
|
if (e == null) return "";
|
|
@@ -270,18 +270,18 @@ function dt() {
|
|
|
270
270
|
}
|
|
271
271
|
if (typeof e == "string") return f(e);
|
|
272
272
|
switch (e) {
|
|
273
|
-
case
|
|
273
|
+
case V:
|
|
274
274
|
return f("Suspense");
|
|
275
|
-
case
|
|
275
|
+
case G:
|
|
276
276
|
return f("SuspenseList");
|
|
277
277
|
}
|
|
278
278
|
if (typeof e == "object")
|
|
279
279
|
switch (e.$$typeof) {
|
|
280
|
-
case
|
|
280
|
+
case Y:
|
|
281
281
|
return e = m(e.render, !1), e;
|
|
282
|
-
case
|
|
282
|
+
case X:
|
|
283
283
|
return d(e.type);
|
|
284
|
-
case
|
|
284
|
+
case R:
|
|
285
285
|
i = e._payload, e = e._init;
|
|
286
286
|
try {
|
|
287
287
|
return d(e(i));
|
|
@@ -290,20 +290,20 @@ function dt() {
|
|
|
290
290
|
}
|
|
291
291
|
return "";
|
|
292
292
|
}
|
|
293
|
-
function
|
|
293
|
+
function C() {
|
|
294
294
|
var e = I.A;
|
|
295
295
|
return e === null ? null : e.getOwner();
|
|
296
296
|
}
|
|
297
|
-
function
|
|
298
|
-
if (
|
|
297
|
+
function y(e) {
|
|
298
|
+
if (re.call(e, "key")) {
|
|
299
299
|
var i = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
300
300
|
if (i && i.isReactWarning) return !1;
|
|
301
301
|
}
|
|
302
302
|
return e.key !== void 0;
|
|
303
303
|
}
|
|
304
|
-
function
|
|
304
|
+
function O(e, i) {
|
|
305
305
|
function l() {
|
|
306
|
-
|
|
306
|
+
Ne || (Ne = !0, console.error(
|
|
307
307
|
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
308
308
|
i
|
|
309
309
|
));
|
|
@@ -313,22 +313,22 @@ function dt() {
|
|
|
313
313
|
configurable: !0
|
|
314
314
|
});
|
|
315
315
|
}
|
|
316
|
-
function
|
|
316
|
+
function P() {
|
|
317
317
|
var e = t(this.type);
|
|
318
|
-
return
|
|
318
|
+
return Ae[e] || (Ae[e] = !0, console.error(
|
|
319
319
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
320
320
|
)), e = this.props.ref, e !== void 0 ? e : null;
|
|
321
321
|
}
|
|
322
|
-
function
|
|
323
|
-
return l =
|
|
324
|
-
$$typeof:
|
|
322
|
+
function g(e, i, l, E, _, S) {
|
|
323
|
+
return l = S.ref, e = {
|
|
324
|
+
$$typeof: w,
|
|
325
325
|
type: e,
|
|
326
326
|
key: i,
|
|
327
|
-
props:
|
|
328
|
-
_owner:
|
|
327
|
+
props: S,
|
|
328
|
+
_owner: _
|
|
329
329
|
}, (l !== void 0 ? l : null) !== null ? Object.defineProperty(e, "ref", {
|
|
330
330
|
enumerable: !1,
|
|
331
|
-
get:
|
|
331
|
+
get: P
|
|
332
332
|
}) : Object.defineProperty(e, "ref", { enumerable: !1, value: null }), e._store = {}, Object.defineProperty(e._store, "validated", {
|
|
333
333
|
configurable: !1,
|
|
334
334
|
enumerable: !1,
|
|
@@ -341,121 +341,121 @@ function dt() {
|
|
|
341
341
|
value: null
|
|
342
342
|
}), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
|
|
343
343
|
}
|
|
344
|
-
function
|
|
345
|
-
if (typeof e == "string" || typeof e == "function" || e ===
|
|
346
|
-
var
|
|
347
|
-
if (
|
|
348
|
-
if (
|
|
349
|
-
if (ve(
|
|
350
|
-
for (
|
|
351
|
-
|
|
352
|
-
Object.freeze && Object.freeze(
|
|
344
|
+
function v(e, i, l, E, _, S) {
|
|
345
|
+
if (typeof e == "string" || typeof e == "function" || e === D || e === W || e === te || e === V || e === G || e === A || typeof e == "object" && e !== null && (e.$$typeof === R || e.$$typeof === X || e.$$typeof === H || e.$$typeof === q || e.$$typeof === Y || e.$$typeof === ot || e.getModuleId !== void 0)) {
|
|
346
|
+
var h = i.children;
|
|
347
|
+
if (h !== void 0)
|
|
348
|
+
if (E)
|
|
349
|
+
if (ve(h)) {
|
|
350
|
+
for (E = 0; E < h.length; E++)
|
|
351
|
+
x(h[E], e);
|
|
352
|
+
Object.freeze && Object.freeze(h);
|
|
353
353
|
} else
|
|
354
354
|
console.error(
|
|
355
355
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
356
356
|
);
|
|
357
|
-
else
|
|
357
|
+
else x(h, e);
|
|
358
358
|
} else
|
|
359
|
-
|
|
359
|
+
h = "", (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (h += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."), e === null ? E = "null" : ve(e) ? E = "array" : e !== void 0 && e.$$typeof === w ? (E = "<" + (t(e.type) || "Unknown") + " />", h = " Did you accidentally export a JSX literal instead of a component?") : E = typeof e, console.error(
|
|
360
360
|
"React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",
|
|
361
|
-
|
|
362
|
-
|
|
361
|
+
E,
|
|
362
|
+
h
|
|
363
363
|
);
|
|
364
|
-
if (
|
|
365
|
-
|
|
366
|
-
var
|
|
367
|
-
return
|
|
364
|
+
if (re.call(i, "key")) {
|
|
365
|
+
h = t(e);
|
|
366
|
+
var B = Object.keys(i).filter(function(N) {
|
|
367
|
+
return N !== "key";
|
|
368
368
|
});
|
|
369
|
-
|
|
369
|
+
E = 0 < B.length ? "{key: someKey, " + B.join(": ..., ") + ": ...}" : "{key: someKey}", Me[h + E] || (B = 0 < B.length ? "{" + B.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
370
370
|
`A props object containing a "key" prop is being spread into JSX:
|
|
371
371
|
let props = %s;
|
|
372
372
|
<%s {...props} />
|
|
373
373
|
React keys must be passed directly to JSX without using spread:
|
|
374
374
|
let props = %s;
|
|
375
375
|
<%s key={someKey} {...props} />`,
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
),
|
|
376
|
+
E,
|
|
377
|
+
h,
|
|
378
|
+
B,
|
|
379
|
+
h
|
|
380
|
+
), Me[h + E] = !0);
|
|
381
381
|
}
|
|
382
|
-
if (
|
|
382
|
+
if (h = null, l !== void 0 && (n(l), h = "" + l), y(i) && (n(i.key), h = "" + i.key), "key" in i) {
|
|
383
383
|
l = {};
|
|
384
384
|
for (var oe in i)
|
|
385
385
|
oe !== "key" && (l[oe] = i[oe]);
|
|
386
386
|
} else l = i;
|
|
387
|
-
return
|
|
387
|
+
return h && O(
|
|
388
388
|
l,
|
|
389
389
|
typeof e == "function" ? e.displayName || e.name || "Unknown" : e
|
|
390
|
-
),
|
|
390
|
+
), g(e, h, S, _, C(), l);
|
|
391
391
|
}
|
|
392
|
-
function
|
|
392
|
+
function x(e, i) {
|
|
393
393
|
if (typeof e == "object" && e && e.$$typeof !== nt) {
|
|
394
394
|
if (ve(e))
|
|
395
395
|
for (var l = 0; l < e.length; l++) {
|
|
396
|
-
var
|
|
397
|
-
L(
|
|
396
|
+
var E = e[l];
|
|
397
|
+
L(E) && b(E, i);
|
|
398
398
|
}
|
|
399
399
|
else if (L(e))
|
|
400
400
|
e._store && (e._store.validated = 1);
|
|
401
|
-
else if (e === null || typeof e != "object" ? l = null : (l =
|
|
401
|
+
else if (e === null || typeof e != "object" ? l = null : (l = Z && e[Z] || e["@@iterator"], l = typeof l == "function" ? l : null), typeof l == "function" && l !== e.entries && (l = l.call(e), l !== e))
|
|
402
402
|
for (; !(e = l.next()).done; )
|
|
403
|
-
L(e.value) &&
|
|
403
|
+
L(e.value) && b(e.value, i);
|
|
404
404
|
}
|
|
405
405
|
}
|
|
406
406
|
function L(e) {
|
|
407
|
-
return typeof e == "object" && e !== null && e.$$typeof ===
|
|
407
|
+
return typeof e == "object" && e !== null && e.$$typeof === w;
|
|
408
408
|
}
|
|
409
|
-
function
|
|
410
|
-
if (e._store && !e._store.validated && e.key == null && (e._store.validated = 1, i =
|
|
411
|
-
|
|
409
|
+
function b(e, i) {
|
|
410
|
+
if (e._store && !e._store.validated && e.key == null && (e._store.validated = 1, i = p(i), !Ie[i])) {
|
|
411
|
+
Ie[i] = !0;
|
|
412
412
|
var l = "";
|
|
413
|
-
e && e._owner != null && e._owner !==
|
|
414
|
-
var
|
|
413
|
+
e && e._owner != null && e._owner !== C() && (l = null, typeof e._owner.tag == "number" ? l = t(e._owner.type) : typeof e._owner.name == "string" && (l = e._owner.name), l = " It was passed a child from " + l + ".");
|
|
414
|
+
var E = I.getCurrentStack;
|
|
415
415
|
I.getCurrentStack = function() {
|
|
416
|
-
var
|
|
417
|
-
return
|
|
416
|
+
var _ = d(e.type);
|
|
417
|
+
return E && (_ += E() || ""), _;
|
|
418
418
|
}, console.error(
|
|
419
419
|
'Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',
|
|
420
420
|
i,
|
|
421
421
|
l
|
|
422
|
-
), I.getCurrentStack =
|
|
422
|
+
), I.getCurrentStack = E;
|
|
423
423
|
}
|
|
424
424
|
}
|
|
425
|
-
function
|
|
426
|
-
var i = "", l =
|
|
425
|
+
function p(e) {
|
|
426
|
+
var i = "", l = C();
|
|
427
427
|
return l && (l = t(l.type)) && (i = `
|
|
428
428
|
|
|
429
429
|
Check the render method of \`` + l + "`."), i || (e = t(e)) && (i = `
|
|
430
430
|
|
|
431
431
|
Check the top-level render call using <` + e + ">."), i;
|
|
432
432
|
}
|
|
433
|
-
var
|
|
433
|
+
var k = F, w = Symbol.for("react.transitional.element"), T = Symbol.for("react.portal"), D = Symbol.for("react.fragment"), te = Symbol.for("react.strict_mode"), W = Symbol.for("react.profiler"), q = Symbol.for("react.consumer"), H = Symbol.for("react.context"), Y = Symbol.for("react.forward_ref"), V = Symbol.for("react.suspense"), G = Symbol.for("react.suspense_list"), X = Symbol.for("react.memo"), R = Symbol.for("react.lazy"), A = Symbol.for("react.offscreen"), Z = Symbol.iterator, M = Symbol.for("react.client.reference"), I = k.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, re = Object.prototype.hasOwnProperty, J = Object.assign, ot = Symbol.for("react.client.reference"), ve = Array.isArray, le = 0, Le, Se, Oe, Pe, ke, Re, Te;
|
|
434
434
|
s.__reactDisabledLog = !0;
|
|
435
|
-
var Ee,
|
|
436
|
-
fe.Fragment =
|
|
437
|
-
return
|
|
438
|
-
}, fe.jsxs = function(e, i, l,
|
|
439
|
-
return
|
|
435
|
+
var Ee, _e, be = !1, ye = new (typeof WeakMap == "function" ? WeakMap : Map)(), nt = Symbol.for("react.client.reference"), Ne, Ae = {}, Me = {}, Ie = {};
|
|
436
|
+
fe.Fragment = D, fe.jsx = function(e, i, l, E, _) {
|
|
437
|
+
return v(e, i, l, !1, E, _);
|
|
438
|
+
}, fe.jsxs = function(e, i, l, E, _) {
|
|
439
|
+
return v(e, i, l, !0, E, _);
|
|
440
440
|
};
|
|
441
441
|
}()), fe;
|
|
442
442
|
}
|
|
443
|
-
var
|
|
443
|
+
var $e;
|
|
444
444
|
function mt() {
|
|
445
|
-
return
|
|
445
|
+
return $e || ($e = 1, process.env.NODE_ENV === "production" ? me.exports = ft() : me.exports = dt()), me.exports;
|
|
446
446
|
}
|
|
447
447
|
var a = mt();
|
|
448
|
-
const
|
|
448
|
+
const qe = ae(), Bt = ({ children: t }) => {
|
|
449
449
|
const [o, n] = j(!1), [s, c] = j(!1), [u, f] = j({});
|
|
450
|
-
return /* @__PURE__ */ a.jsx(
|
|
450
|
+
return /* @__PURE__ */ a.jsx(qe.Provider, { value: { isLoading: o, setIsLoading: n, isLoadingComponent: s, setIsLoadingComponent: c, loadingProps: u, setLoadingProps: f }, children: t });
|
|
451
451
|
}, xe = () => {
|
|
452
|
-
const t = se(
|
|
452
|
+
const t = se(qe);
|
|
453
453
|
if (t === void 0) throw new Error("Non puoi settare il loading");
|
|
454
454
|
return t;
|
|
455
455
|
}, pt = ({ errorMessage: t, errorShow: o }) => /* @__PURE__ */ a.jsx("section", { className: o ? "" : "hidden", children: /* @__PURE__ */ a.jsxs("div", { className: "container mx-auto", children: [
|
|
456
456
|
/* @__PURE__ */ a.jsx("h1", { className: "text-center text-8xl my-12", children: "Errore" }),
|
|
457
457
|
/* @__PURE__ */ a.jsx("pre", { className: "text-xl", children: t })
|
|
458
|
-
] }) }),
|
|
458
|
+
] }) }), He = ae(), $t = ({ children: t }) => {
|
|
459
459
|
const [o, n] = j({}), [s, c] = j(!1), u = `Creare un file config.json in public per il corretto funzionamento
|
|
460
460
|
Esempio di config.json:
|
|
461
461
|
|
|
@@ -478,70 +478,74 @@ Esempio di config.json:
|
|
|
478
478
|
"autoLogin": ,
|
|
479
479
|
"autoLoginEmail": ,
|
|
480
480
|
"autoLoginPassword":
|
|
481
|
-
}`, f = () =>
|
|
482
|
-
const
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
481
|
+
}`, f = () => {
|
|
482
|
+
const g = /* @__PURE__ */ new Date(), v = String(g.getDate()).padStart(2, "0"), x = String(g.getMonth() + 1).padStart(2, "0"), L = g.getFullYear(), b = String(g.getHours()).padStart(2, "0"), p = String(g.getMinutes()).padStart(2, "0"), k = String(g.getSeconds()).padStart(2, "0");
|
|
483
|
+
return `${v}/${x}/${L} ${b}:${p}:${k}`;
|
|
484
|
+
}, m = (g) => new Promise((v, x) => {
|
|
485
|
+
const L = indexedDB.open("configDatabase", 1);
|
|
486
|
+
L.onupgradeneeded = (b) => {
|
|
487
|
+
const p = b.target.result;
|
|
488
|
+
p.objectStoreNames.contains(g) || p.createObjectStore(g, { keyPath: "id" });
|
|
489
|
+
}, L.onsuccess = (b) => v(b.target.result), L.onerror = (b) => x(b.target.error);
|
|
490
|
+
}), d = async (g, v) => {
|
|
491
|
+
let x = await m();
|
|
492
|
+
return new Promise((L, b) => {
|
|
493
|
+
if (!x) {
|
|
494
|
+
b("Errore: DB non disponibile");
|
|
492
495
|
return;
|
|
493
496
|
}
|
|
494
|
-
const
|
|
495
|
-
|
|
497
|
+
const p = x == null ? void 0 : x.transaction(g, "readonly"), k = p == null ? void 0 : p.objectStore(g), w = k == null ? void 0 : k.get(v);
|
|
498
|
+
w.onsuccess = () => L(w.result), w.onerror = (T) => b(T.target.error);
|
|
496
499
|
});
|
|
497
|
-
},
|
|
498
|
-
let
|
|
499
|
-
return new Promise((
|
|
500
|
-
if (!
|
|
501
|
-
|
|
500
|
+
}, C = async (g, v) => {
|
|
501
|
+
let x = await m();
|
|
502
|
+
return new Promise((L, b) => {
|
|
503
|
+
if (!x) {
|
|
504
|
+
b("Errore: DB non disponibile");
|
|
502
505
|
return;
|
|
503
506
|
}
|
|
504
|
-
const
|
|
505
|
-
|
|
507
|
+
const p = x == null ? void 0 : x.transaction(g, "readwrite"), k = p == null ? void 0 : p.objectStore(g), w = k == null ? void 0 : k.put(v);
|
|
508
|
+
w.onsuccess = () => L(w.result), w.onerror = (T) => b(T.target.error);
|
|
506
509
|
});
|
|
507
|
-
}, y = async (
|
|
508
|
-
let
|
|
510
|
+
}, y = async (g) => {
|
|
511
|
+
let v = Date.now(), x;
|
|
509
512
|
do
|
|
510
|
-
|
|
511
|
-
while (
|
|
512
|
-
return
|
|
513
|
-
},
|
|
514
|
-
|
|
513
|
+
x = await d(g, v), x && v++;
|
|
514
|
+
while (x);
|
|
515
|
+
return v;
|
|
516
|
+
}, O = async (g, v) => {
|
|
517
|
+
v.id || (v.id = await y(g)), await C(g, v);
|
|
515
518
|
}, P = async () => {
|
|
516
519
|
try {
|
|
517
|
-
const
|
|
520
|
+
const x = {
|
|
518
521
|
...await (await fetch("/config.json")).json(),
|
|
519
|
-
openIndexedDB:
|
|
520
|
-
getDataIndexedDB:
|
|
521
|
-
setDataIndexedDB:
|
|
522
|
+
openIndexedDB: m,
|
|
523
|
+
getDataIndexedDB: d,
|
|
524
|
+
setDataIndexedDB: C,
|
|
522
525
|
generateUniqueId: y,
|
|
523
|
-
setDataWithAutoId:
|
|
526
|
+
setDataWithAutoId: O,
|
|
527
|
+
setCurrentDate: f
|
|
524
528
|
};
|
|
525
|
-
n(
|
|
526
|
-
} catch (
|
|
527
|
-
console.error(
|
|
529
|
+
n(x);
|
|
530
|
+
} catch (g) {
|
|
531
|
+
console.error(g), c(!0);
|
|
528
532
|
}
|
|
529
533
|
};
|
|
530
|
-
return
|
|
534
|
+
return z(() => {
|
|
531
535
|
P();
|
|
532
|
-
}, []), Object.keys(o).length === 0 ? /* @__PURE__ */ a.jsx(pt, { errorShow: s, errorMessage: u }) : /* @__PURE__ */ a.jsx(
|
|
533
|
-
},
|
|
534
|
-
const t = se(
|
|
536
|
+
}, []), Object.keys(o).length === 0 ? /* @__PURE__ */ a.jsx(pt, { errorShow: s, errorMessage: u }) : /* @__PURE__ */ a.jsx(He.Provider, { value: o, children: t });
|
|
537
|
+
}, ee = () => {
|
|
538
|
+
const t = se(He);
|
|
535
539
|
if (t === void 0) throw new Error("Non puoi leggere i config");
|
|
536
540
|
return t;
|
|
537
541
|
}, gt = (t) => /* @__PURE__ */ r.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", xmlnsXlink: "http://www.w3.org/1999/xlink", width: 500, zoomAndPan: "magnify", viewBox: "0 0 375 374.999991", height: 500, preserveAspectRatio: "xMidYMid meet", ...t }, /* @__PURE__ */ r.createElement("defs", null, /* @__PURE__ */ r.createElement("g", null), /* @__PURE__ */ r.createElement("clipPath", { id: "6ca7e2bf04" }, /* @__PURE__ */ r.createElement("path", { d: "M 265.136719 0 L 375 109.863281 L 375 265.136719 L 265.136719 375 L 109.863281 375 L 0 265.136719 L 0 109.863281 L 109.863281 0 Z M 265.136719 0 ", clipRule: "nonzero" })), /* @__PURE__ */ r.createElement("clipPath", { id: "2c77c820c6" }, /* @__PURE__ */ r.createElement("path", { d: "M 12.878906 12.878906 L 362.121094 12.878906 L 362.121094 362.121094 L 12.878906 362.121094 Z M 12.878906 12.878906 ", clipRule: "nonzero" })), /* @__PURE__ */ r.createElement("clipPath", { id: "3d94df7d66" }, /* @__PURE__ */ r.createElement("path", { d: "M 259.804688 12.878906 L 362.121094 115.195312 L 362.121094 259.804688 L 259.804688 362.121094 L 115.195312 362.121094 L 12.878906 259.804688 L 12.878906 115.195312 L 115.195312 12.878906 Z M 259.804688 12.878906 ", clipRule: "nonzero" })), /* @__PURE__ */ r.createElement("clipPath", { id: "8793709a64" }, /* @__PURE__ */ r.createElement("path", { d: "M 12.878906 12.878906 L 362.109375 12.878906 L 362.109375 362.109375 L 12.878906 362.109375 Z M 12.878906 12.878906 ", clipRule: "nonzero" })), /* @__PURE__ */ r.createElement("clipPath", { id: "fdb3fe29d8" }, /* @__PURE__ */ r.createElement("path", { d: "M 259.796875 12.878906 L 362.109375 115.191406 L 362.109375 259.796875 L 259.796875 362.109375 L 115.191406 362.109375 L 12.878906 259.796875 L 12.878906 115.191406 L 115.191406 12.878906 Z M 259.796875 12.878906 ", clipRule: "nonzero" }))), /* @__PURE__ */ r.createElement("g", { clipPath: "url(#6ca7e2bf04)" }, /* @__PURE__ */ r.createElement("rect", { x: -37.5, width: 450, fill: "#b91c1c", y: -37.499999, height: 449.999989, fillOpacity: 1 })), /* @__PURE__ */ r.createElement("g", { clipPath: "url(#2c77c820c6)" }, /* @__PURE__ */ r.createElement("g", { clipPath: "url(#3d94df7d66)" }, /* @__PURE__ */ r.createElement("path", { fill: "#b91c1c", d: "M 12.878906 12.878906 L 362.121094 12.878906 L 362.121094 362.121094 L 12.878906 362.121094 Z M 12.878906 12.878906 ", fillOpacity: 1, fillRule: "nonzero" }))), /* @__PURE__ */ r.createElement("g", { clipPath: "url(#8793709a64)" }, /* @__PURE__ */ r.createElement("g", { clipPath: "url(#fdb3fe29d8)" }, /* @__PURE__ */ r.createElement("path", { strokeLinecap: "butt", transform: "matrix(0.75, 0, 0, 0.75, 12.879396, 12.879392)", fill: "none", strokeLinejoin: "miter", d: "M 329.223327 -0.000647072 L 465.640003 136.416029 L 465.640003 329.223333 L 329.223327 465.640009 L 136.416023 465.640009 L -0.000653072 329.223333 L -0.000653072 136.416029 L 136.416023 -0.000647072 Z M 329.223327 -0.000647072 ", stroke: "#ffffff", strokeWidth: 34, strokeOpacity: 1, strokeMiterlimit: 4 }))), /* @__PURE__ */ r.createElement("g", { fill: "#ffffff", fillOpacity: 1 }, /* @__PURE__ */ r.createElement("g", { transform: "translate(111.648432, 267.442446)" }, /* @__PURE__ */ r.createElement("g", null, /* @__PURE__ */ r.createElement("path", { d: "M 2.828125 0 L 56.25 -79.859375 L 3.046875 -159.609375 L 37.28125 -159.609375 L 75.90625 -98.046875 L 114.53125 -159.609375 L 148.765625 -159.609375 L 95.5625 -79.859375 L 148.984375 0 L 114.765625 0 L 75.671875 -60.65625 L 37.046875 0 Z M 2.828125 0 " }))))), ht = (t) => /* @__PURE__ */ r.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", xmlnsXlink: "http://www.w3.org/1999/xlink", width: 500, zoomAndPan: "magnify", viewBox: "0 0 375 374.999991", height: 500, preserveAspectRatio: "xMidYMid meet", ...t }, /* @__PURE__ */ r.createElement("defs", null, /* @__PURE__ */ r.createElement("g", null), /* @__PURE__ */ r.createElement("clipPath", { id: "30562604dd" }, /* @__PURE__ */ r.createElement("path", { d: "M 187.5 0 C 83.945312 0 0 83.945312 0 187.5 C 0 291.054688 83.945312 375 187.5 375 C 291.054688 375 375 291.054688 375 187.5 C 375 83.945312 291.054688 0 187.5 0 Z M 187.5 0 ", clipRule: "nonzero" })), /* @__PURE__ */ r.createElement("clipPath", { id: "971fcd5f72" }, /* @__PURE__ */ r.createElement("path", { d: "M 18.570312 18.570312 L 356.429688 18.570312 L 356.429688 356.429688 L 18.570312 356.429688 Z M 18.570312 18.570312 ", clipRule: "nonzero" })), /* @__PURE__ */ r.createElement("clipPath", { id: "e891a7f57e" }, /* @__PURE__ */ r.createElement("path", { d: "M 187.5 18.570312 C 94.203125 18.570312 18.570312 94.203125 18.570312 187.5 C 18.570312 280.796875 94.203125 356.429688 187.5 356.429688 C 280.796875 356.429688 356.429688 280.796875 356.429688 187.5 C 356.429688 94.203125 280.796875 18.570312 187.5 18.570312 Z M 187.5 18.570312 ", clipRule: "nonzero" })), /* @__PURE__ */ r.createElement("clipPath", { id: "19a9ddc130" }, /* @__PURE__ */ r.createElement("path", { d: "M 18.570312 18.570312 L 356.070312 18.570312 L 356.070312 356.070312 L 18.570312 356.070312 Z M 18.570312 18.570312 ", clipRule: "nonzero" })), /* @__PURE__ */ r.createElement("clipPath", { id: "5e650d5bd0" }, /* @__PURE__ */ r.createElement("path", { d: "M 187.496094 18.570312 C 94.199219 18.570312 18.570312 94.199219 18.570312 187.496094 C 18.570312 280.792969 94.199219 356.421875 187.496094 356.421875 C 280.792969 356.421875 356.421875 280.792969 356.421875 187.496094 C 356.421875 94.199219 280.792969 18.570312 187.496094 18.570312 Z M 187.496094 18.570312 ", clipRule: "nonzero" }))), /* @__PURE__ */ r.createElement("g", { clipPath: "url(#30562604dd)" }, /* @__PURE__ */ r.createElement("rect", { x: -37.5, width: 450, fill: "#1d4ed8", y: -37.499999, height: 449.999989, fillOpacity: 1 })), /* @__PURE__ */ r.createElement("g", { clipPath: "url(#971fcd5f72)" }, /* @__PURE__ */ r.createElement("g", { clipPath: "url(#e891a7f57e)" }, /* @__PURE__ */ r.createElement("path", { fill: "#1d4ed8", d: "M 18.570312 18.570312 L 356.429688 18.570312 L 356.429688 356.429688 L 18.570312 356.429688 Z M 18.570312 18.570312 ", fillOpacity: 1, fillRule: "nonzero" }))), /* @__PURE__ */ r.createElement("g", { clipPath: "url(#19a9ddc130)" }, /* @__PURE__ */ r.createElement("g", { clipPath: "url(#5e650d5bd0)" }, /* @__PURE__ */ r.createElement("path", { strokeLinecap: "butt", transform: "matrix(0.75, 0, 0, 0.75, 18.570291, 18.570286)", fill: "none", strokeLinejoin: "miter", d: "M 225.234419 0.0000349326 C 100.838577 0.0000349326 0.0000289326 100.838583 0.0000289326 225.234425 C 0.0000289326 349.630266 100.838577 450.468815 225.234419 450.468815 C 349.63026 450.468815 450.468809 349.630266 450.468809 225.234425 C 450.468809 100.838583 349.63026 0.0000349326 225.234419 0.0000349326 Z M 225.234419 0.0000349326 ", stroke: "#ffffff", strokeWidth: 34, strokeOpacity: 1, strokeMiterlimit: 4 }))), /* @__PURE__ */ r.createElement("g", { fill: "#ffffff", fillOpacity: 1 }, /* @__PURE__ */ r.createElement("g", { transform: "translate(136.121787, 300.837436)" }, /* @__PURE__ */ r.createElement("g", null, /* @__PURE__ */ r.createElement("path", { d: "M 60 -193.78125 C 54.707031 -193.78125 50.109375 -195.734375 46.203125 -199.640625 C 42.296875 -203.554688 40.34375 -208.15625 40.34375 -213.4375 C 40.34375 -218.726562 42.296875 -223.328125 46.203125 -227.234375 C 50.109375 -231.140625 54.707031 -233.09375 60 -233.09375 C 65.28125 -233.09375 69.875 -231.140625 73.78125 -227.234375 C 77.695312 -223.328125 79.65625 -218.726562 79.65625 -213.4375 C 79.65625 -208.15625 77.695312 -203.554688 73.78125 -199.640625 C 69.875 -195.734375 65.28125 -193.78125 60 -193.78125 Z M 45.171875 4.828125 C 39.191406 4.828125 35.28125 2.414062 33.4375 -2.40625 C 31.601562 -7.238281 30.6875 -13.675781 30.6875 -21.71875 C 30.6875 -34.59375 31.773438 -47.234375 33.953125 -59.640625 C 36.140625 -72.054688 38.328125 -83.894531 40.515625 -95.15625 C 42.703125 -106.425781 43.796875 -116.890625 43.796875 -126.546875 C 43.796875 -129.078125 43.675781 -131.832031 43.4375 -134.8125 C 43.207031 -137.800781 42.632812 -140.101562 41.71875 -141.71875 C 38.039062 -139.414062 33.269531 -135.617188 27.40625 -130.328125 C 21.550781 -125.046875 16.898438 -119.1875 13.453125 -112.75 C 11.835938 -114.363281 11.03125 -116.550781 11.03125 -119.3125 C 11.03125 -123.21875 12.582031 -127.46875 15.6875 -132.0625 C 18.789062 -136.65625 22.925781 -141.078125 28.09375 -145.328125 C 33.269531 -149.585938 38.847656 -153.097656 44.828125 -155.859375 C 50.804688 -158.617188 56.664062 -160 62.40625 -160 C 67.695312 -160 71.085938 -158.734375 72.578125 -156.203125 C 74.078125 -153.671875 74.828125 -150.453125 74.828125 -146.546875 C 74.828125 -140.796875 74.078125 -133.378906 72.578125 -124.296875 C 71.085938 -115.222656 69.363281 -105.515625 67.40625 -95.171875 C 65.457031 -84.828125 63.734375 -74.484375 62.234375 -64.140625 C 60.742188 -53.796875 60 -44.367188 60 -35.859375 C 60 -31.492188 60.226562 -27.414062 60.6875 -23.625 C 61.144531 -19.832031 61.71875 -16.671875 62.40625 -14.140625 C 68.15625 -16.671875 73.613281 -20.40625 78.78125 -25.34375 C 83.957031 -30.28125 87.8125 -34.9375 90.34375 -39.3125 C 91.71875 -37.238281 92.40625 -35.050781 92.40625 -32.75 C 92.40625 -29.070312 90.796875 -25.050781 87.578125 -20.6875 C 84.359375 -16.320312 80.332031 -12.179688 75.5 -8.265625 C 70.675781 -4.359375 65.5625 -1.203125 60.15625 1.203125 C 54.757812 3.617188 49.765625 4.828125 45.171875 4.828125 Z M 45.171875 4.828125 " }))))), xt = (t) => /* @__PURE__ */ r.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", xmlnsXlink: "http://www.w3.org/1999/xlink", width: 500, zoomAndPan: "magnify", viewBox: "0 0 375 374.999991", height: 500, preserveAspectRatio: "xMidYMid meet", ...t }, /* @__PURE__ */ r.createElement("defs", null, /* @__PURE__ */ r.createElement("g", null), /* @__PURE__ */ r.createElement("clipPath", { id: "59a10ac27a" }, /* @__PURE__ */ r.createElement("path", { d: "M 17.179688 32.695312 L 360 32.695312 L 360 337.5 L 17.179688 337.5 Z M 17.179688 32.695312 ", clipRule: "nonzero" })), /* @__PURE__ */ r.createElement("clipPath", { id: "664b27481e" }, /* @__PURE__ */ r.createElement("path", { d: "M 207.042969 43.574219 L 356.394531 304.941406 C 360.242188 311.675781 360.214844 319.953125 356.324219 326.660156 C 352.429688 333.371094 345.257812 337.5 337.5 337.5 L 39.375 337.5 C 31.617188 337.5 24.445312 333.371094 20.554688 326.660156 C 16.660156 319.953125 16.632812 311.675781 20.480469 304.941406 L 169.832031 43.574219 C 173.648438 36.898438 180.746094 32.777344 188.4375 32.777344 C 196.128906 32.777344 203.226562 36.898438 207.042969 43.574219 Z M 207.042969 43.574219 ", clipRule: "nonzero" }))), /* @__PURE__ */ r.createElement("g", { clipPath: "url(#59a10ac27a)" }, /* @__PURE__ */ r.createElement("g", { clipPath: "url(#664b27481e)" }, /* @__PURE__ */ r.createElement("path", { fill: "#d97706", d: "M 1.875 11.015625 L 375.546875 11.015625 L 375.546875 337.5 L 1.875 337.5 Z M 1.875 11.015625 ", fillOpacity: 1, fillRule: "nonzero" }))), /* @__PURE__ */ r.createElement("g", { fill: "#ffffff", fillOpacity: 1 }, /* @__PURE__ */ r.createElement("g", { transform: "translate(158.410439, 295.655517)" }, /* @__PURE__ */ r.createElement("g", null, /* @__PURE__ */ r.createElement("path", { d: "M 46.890625 -63.21875 C 46.890625 -63.21875 46.890625 -64.445312 46.890625 -66.90625 L 46.890625 -176.46875 C 46.890625 -178.925781 46.1875 -180.859375 44.78125 -182.265625 C 43.375 -183.671875 41.441406 -184.375 38.984375 -184.375 L 21.078125 -184.375 C 18.617188 -184.375 16.6875 -183.671875 15.28125 -182.265625 C 13.875 -180.859375 13.171875 -178.925781 13.171875 -176.46875 L 13.171875 -66.90625 C 13.171875 -64.445312 13.875 -62.515625 15.28125 -61.109375 C 16.6875 -59.703125 18.617188 -59 21.078125 -59 L 38.984375 -59 C 41.441406 -59 43.375 -59.703125 44.78125 -61.109375 C 46.1875 -62.515625 46.890625 -63.21875 46.890625 -63.21875 Z M 46.890625 -4.21875 C 46.890625 -4.21875 46.890625 -5.445312 46.890625 -7.90625 L 46.890625 -25.546875 C 46.890625 -28.003906 46.1875 -29.9375 44.78125 -31.34375 C 43.375 -32.75 41.441406 -33.453125 38.984375 -33.453125 L 21.078125 -33.453125 C 18.617188 -33.453125 16.6875 -32.75 15.28125 -31.34375 C 13.875 -29.9375 13.171875 -28.003906 13.171875 -25.546875 L 13.171875 -7.90625 C 13.171875 -5.445312 13.875 -3.515625 15.28125 -2.109375 C 16.6875 -0.703125 18.617188 0 21.078125 0 L 38.984375 0 C 41.441406 0 43.375 -0.703125 44.78125 -2.109375 C 46.1875 -3.515625 46.890625 -4.21875 46.890625 -4.21875 Z M 46.890625 -4.21875 " })))));
|
|
538
|
-
var
|
|
542
|
+
var Ve = {
|
|
539
543
|
color: void 0,
|
|
540
544
|
size: void 0,
|
|
541
545
|
className: void 0,
|
|
542
546
|
style: void 0,
|
|
543
547
|
attr: void 0
|
|
544
|
-
},
|
|
548
|
+
}, Fe = F.createContext && /* @__PURE__ */ F.createContext(Ve), vt = ["attr", "size", "title"];
|
|
545
549
|
function Et(t, o) {
|
|
546
550
|
if (t == null) return {};
|
|
547
551
|
var n = bt(t, o), s, c;
|
|
@@ -572,7 +576,7 @@ function pe() {
|
|
|
572
576
|
return t;
|
|
573
577
|
}, pe.apply(this, arguments);
|
|
574
578
|
}
|
|
575
|
-
function
|
|
579
|
+
function De(t, o) {
|
|
576
580
|
var n = Object.keys(t);
|
|
577
581
|
if (Object.getOwnPropertySymbols) {
|
|
578
582
|
var s = Object.getOwnPropertySymbols(t);
|
|
@@ -585,9 +589,9 @@ function We(t, o) {
|
|
|
585
589
|
function ge(t) {
|
|
586
590
|
for (var o = 1; o < arguments.length; o++) {
|
|
587
591
|
var n = arguments[o] != null ? arguments[o] : {};
|
|
588
|
-
o % 2 ?
|
|
592
|
+
o % 2 ? De(Object(n), !0).forEach(function(s) {
|
|
589
593
|
yt(t, s, n[s]);
|
|
590
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) :
|
|
594
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) : De(Object(n)).forEach(function(s) {
|
|
591
595
|
Object.defineProperty(t, s, Object.getOwnPropertyDescriptor(n, s));
|
|
592
596
|
});
|
|
593
597
|
}
|
|
@@ -610,15 +614,15 @@ function wt(t, o) {
|
|
|
610
614
|
}
|
|
611
615
|
return (o === "string" ? String : Number)(t);
|
|
612
616
|
}
|
|
613
|
-
function
|
|
614
|
-
return t && t.map((o, n) => /* @__PURE__ */
|
|
617
|
+
function Xe(t) {
|
|
618
|
+
return t && t.map((o, n) => /* @__PURE__ */ F.createElement(o.tag, ge({
|
|
615
619
|
key: n
|
|
616
|
-
}, o.attr),
|
|
620
|
+
}, o.attr), Xe(o.child)));
|
|
617
621
|
}
|
|
618
622
|
function we(t) {
|
|
619
|
-
return (o) => /* @__PURE__ */
|
|
623
|
+
return (o) => /* @__PURE__ */ F.createElement(jt, pe({
|
|
620
624
|
attr: ge({}, t.attr)
|
|
621
|
-
}, o),
|
|
625
|
+
}, o), Xe(t.child));
|
|
622
626
|
}
|
|
623
627
|
function jt(t) {
|
|
624
628
|
var o = (n) => {
|
|
@@ -627,7 +631,7 @@ function jt(t) {
|
|
|
627
631
|
size: c,
|
|
628
632
|
title: u
|
|
629
633
|
} = t, f = Et(t, vt), m = c || n.size || "1em", d;
|
|
630
|
-
return n.className && (d = n.className), t.className && (d = (d ? d + " " : "") + t.className), /* @__PURE__ */
|
|
634
|
+
return n.className && (d = n.className), t.className && (d = (d ? d + " " : "") + t.className), /* @__PURE__ */ F.createElement("svg", pe({
|
|
631
635
|
stroke: "currentColor",
|
|
632
636
|
fill: "currentColor",
|
|
633
637
|
strokeWidth: "0"
|
|
@@ -639,15 +643,15 @@ function jt(t) {
|
|
|
639
643
|
height: m,
|
|
640
644
|
width: m,
|
|
641
645
|
xmlns: "http://www.w3.org/2000/svg"
|
|
642
|
-
}), u && /* @__PURE__ */
|
|
646
|
+
}), u && /* @__PURE__ */ F.createElement("title", null, u), t.children);
|
|
643
647
|
};
|
|
644
|
-
return
|
|
648
|
+
return Fe !== void 0 ? /* @__PURE__ */ F.createElement(Fe.Consumer, null, (n) => o(n)) : o(Ve);
|
|
645
649
|
}
|
|
646
650
|
function Lt(t) {
|
|
647
651
|
return we({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M17.47 250.9C88.82 328.1 158 397.6 224.5 485.5c72.3-143.8 146.3-288.1 268.4-444.37L460 26.06C356.9 135.4 276.8 238.9 207.2 361.9c-48.4-43.6-126.62-105.3-174.38-137z" }, child: [] }] })(t);
|
|
648
652
|
}
|
|
649
|
-
const
|
|
650
|
-
const [o, n] = j(!1), [s, c] = j(), [u, f] = j(),
|
|
653
|
+
const Je = ae(), Ft = ({ children: t }) => {
|
|
654
|
+
const [o, n] = j(!1), [s, c] = j(), [u, f] = j(), O = {
|
|
651
655
|
showAlert: o,
|
|
652
656
|
setShowAlert: n,
|
|
653
657
|
typeAlert: s,
|
|
@@ -688,8 +692,8 @@ const Ke = ae(), Ft = ({ children: t }) => {
|
|
|
688
692
|
progressColor: "bg-warning-progress"
|
|
689
693
|
}
|
|
690
694
|
},
|
|
691
|
-
getIcon: (
|
|
692
|
-
switch (
|
|
695
|
+
getIcon: (P) => {
|
|
696
|
+
switch (P) {
|
|
693
697
|
case "danger":
|
|
694
698
|
return /* @__PURE__ */ a.jsx(gt, { className: "w-[20px] h-[20px]" });
|
|
695
699
|
case "info":
|
|
@@ -703,15 +707,15 @@ const Ke = ae(), Ft = ({ children: t }) => {
|
|
|
703
707
|
closeAlert: () => {
|
|
704
708
|
n(!o);
|
|
705
709
|
},
|
|
706
|
-
activeAlert: (
|
|
710
|
+
activeAlert: (P, g) => {
|
|
707
711
|
n(!1), setTimeout(() => {
|
|
708
|
-
c(
|
|
712
|
+
c(P), f(g), n(!0);
|
|
709
713
|
}, 50);
|
|
710
714
|
}
|
|
711
715
|
};
|
|
712
|
-
return /* @__PURE__ */ a.jsx(
|
|
716
|
+
return /* @__PURE__ */ a.jsx(Je.Provider, { value: O, children: t });
|
|
713
717
|
}, ie = () => {
|
|
714
|
-
const t = se(
|
|
718
|
+
const t = se(Je);
|
|
715
719
|
if (t === void 0) throw new Error("Non puoi modificare l'alert");
|
|
716
720
|
return t;
|
|
717
721
|
};
|
|
@@ -719,17 +723,17 @@ let ne;
|
|
|
719
723
|
const he = async (t, o, n) => {
|
|
720
724
|
if (ne) return ne;
|
|
721
725
|
try {
|
|
722
|
-
const c = await (await fetch("/config.json")).json(), u = c.baseUri, { unauthorized: f, notFound: m, defaultMessage: d } = c.axiosErrors,
|
|
726
|
+
const c = await (await fetch("/config.json")).json(), u = c.baseUri, { unauthorized: f, notFound: m, defaultMessage: d } = c.axiosErrors, C = c.axiosTimeout;
|
|
723
727
|
return ne = ut.create({
|
|
724
728
|
baseURL: u,
|
|
725
|
-
timeout:
|
|
729
|
+
timeout: C
|
|
726
730
|
}), ne.interceptors.request.use(
|
|
727
|
-
(
|
|
731
|
+
(y) => y
|
|
728
732
|
), ne.interceptors.response.use(
|
|
729
|
-
(
|
|
730
|
-
(
|
|
731
|
-
if (
|
|
732
|
-
switch (t(!0), o("danger"),
|
|
733
|
+
(y) => y,
|
|
734
|
+
(y) => {
|
|
735
|
+
if (y.response)
|
|
736
|
+
switch (t(!0), o("danger"), y.response.status) {
|
|
733
737
|
case 401:
|
|
734
738
|
localStorage.removeItem("accessToken"), n(f);
|
|
735
739
|
break;
|
|
@@ -737,96 +741,93 @@ const he = async (t, o, n) => {
|
|
|
737
741
|
n(m);
|
|
738
742
|
break;
|
|
739
743
|
default:
|
|
740
|
-
n(`${d} ${
|
|
744
|
+
n(`${d} ${y.response.status} ${y.response.data.error}`);
|
|
741
745
|
}
|
|
742
|
-
return Promise.reject(
|
|
746
|
+
return Promise.reject(y);
|
|
743
747
|
}
|
|
744
748
|
), ne;
|
|
745
749
|
} catch (s) {
|
|
746
750
|
console.error(s);
|
|
747
751
|
}
|
|
748
|
-
},
|
|
749
|
-
const { heartbeatEndpoint: o, firstPrivatePath: n, infiniteSession: s, timeDeducted: c, authenticatedEndpoint: u, autoLogin: f, autoLoginEmail: m, autoLoginPassword: d } =
|
|
750
|
-
|
|
751
|
-
return `${A}/${z}/${M} ${I}:${U}:${$}`;
|
|
752
|
-
}, X = async (w = null, A) => {
|
|
753
|
-
w && w.preventDefault(), V(!0);
|
|
752
|
+
}, Ke = ae(), Dt = ({ children: t }) => {
|
|
753
|
+
const { heartbeatEndpoint: o, firstPrivatePath: n, infiniteSession: s, timeDeducted: c, authenticatedEndpoint: u, autoLogin: f, autoLoginEmail: m, autoLoginPassword: d, setCurrentDate: C } = ee(), { setIsLoading: y } = xe(), { setShowAlert: O, setMessageAlert: P, setTypeAlert: g, activeAlert: v } = ie(), x = Ue(), [L, b] = j(null), [p, k] = j(), [w, T] = j(), [D, te] = j(), [W, q] = j(!1), H = async (R = null, A) => {
|
|
754
|
+
R && R.preventDefault(), q(!0);
|
|
754
755
|
try {
|
|
755
|
-
y(!0),
|
|
756
|
-
const M = await (await he(
|
|
756
|
+
y(!0), O(!1);
|
|
757
|
+
const M = await (await he(O, g, P)).post(u, {
|
|
757
758
|
auth: A
|
|
758
|
-
}), I = M.data.id,
|
|
759
|
-
|
|
760
|
-
} catch (
|
|
761
|
-
console.error(
|
|
759
|
+
}), I = M.data.id, re = M.headers.token;
|
|
760
|
+
re && (localStorage.setItem("accessToken", re), localStorage.setItem("id", I), b(!0), k(re), x(`${n}${I}`));
|
|
761
|
+
} catch (Z) {
|
|
762
|
+
console.error(Z);
|
|
762
763
|
} finally {
|
|
763
|
-
|
|
764
|
+
q(!1), y(!1);
|
|
764
765
|
}
|
|
765
|
-
},
|
|
766
|
-
localStorage.removeItem("accessToken"), localStorage.removeItem("id"),
|
|
767
|
-
},
|
|
766
|
+
}, Y = () => {
|
|
767
|
+
localStorage.removeItem("accessToken"), localStorage.removeItem("id"), b(!1), k(null);
|
|
768
|
+
}, V = async () => {
|
|
768
769
|
try {
|
|
769
|
-
const
|
|
770
|
+
const R = localStorage.getItem("accessToken"), M = (await (await he(O, g, P)).get(
|
|
770
771
|
`${o}`,
|
|
771
772
|
{ headers: {
|
|
772
|
-
Authorization:
|
|
773
|
+
Authorization: R
|
|
773
774
|
} }
|
|
774
775
|
)).headers.token;
|
|
775
|
-
localStorage.setItem("accessToken", M),
|
|
776
|
-
} catch (
|
|
777
|
-
console.error(
|
|
776
|
+
localStorage.setItem("accessToken", M), k(M), console.log("nuovo token: ", M, "Data:", C());
|
|
777
|
+
} catch (R) {
|
|
778
|
+
console.error(R), Y();
|
|
778
779
|
}
|
|
779
|
-
},
|
|
780
|
-
if (!
|
|
780
|
+
}, G = () => {
|
|
781
|
+
if (!p)
|
|
781
782
|
return;
|
|
782
|
-
const A = at(
|
|
783
|
-
|
|
783
|
+
const A = at(p).exp, Z = Math.floor(Date.now() / 1e3), M = (A - Z) * 1e3;
|
|
784
|
+
te(M), T(M - c);
|
|
784
785
|
};
|
|
785
|
-
|
|
786
|
+
z(() => {
|
|
786
787
|
if (localStorage.getItem("accessToken"))
|
|
787
|
-
|
|
788
|
+
b(!0);
|
|
788
789
|
else {
|
|
789
|
-
|
|
790
|
+
b(!1);
|
|
790
791
|
return;
|
|
791
792
|
}
|
|
792
|
-
}, []),
|
|
793
|
-
const
|
|
794
|
-
f && !
|
|
793
|
+
}, []), z(() => {
|
|
794
|
+
const R = localStorage.getItem("accessToken");
|
|
795
|
+
f && !R && !W && H(null, {
|
|
795
796
|
email: m,
|
|
796
797
|
password: d
|
|
797
798
|
});
|
|
798
|
-
}, [f,
|
|
799
|
-
|
|
800
|
-
let
|
|
801
|
-
s &&
|
|
802
|
-
|
|
803
|
-
},
|
|
799
|
+
}, [f, W]), z(() => {
|
|
800
|
+
G();
|
|
801
|
+
let R;
|
|
802
|
+
s && p && w && (R = setInterval(() => {
|
|
803
|
+
V();
|
|
804
|
+
}, w));
|
|
804
805
|
let A;
|
|
805
|
-
return !s &&
|
|
806
|
-
|
|
807
|
-
},
|
|
808
|
-
|
|
806
|
+
return !s && p && D && (A = setTimeout(() => {
|
|
807
|
+
Y(), v("danger", "Sessione scaduta");
|
|
808
|
+
}, D)), () => {
|
|
809
|
+
R && clearInterval(R), A && clearTimeout(A);
|
|
809
810
|
};
|
|
810
|
-
}, [
|
|
811
|
-
|
|
811
|
+
}, [p, w]), z(() => {
|
|
812
|
+
L || f && !W && H(null, {
|
|
812
813
|
email: m,
|
|
813
814
|
password: d
|
|
814
815
|
});
|
|
815
|
-
}, [
|
|
816
|
-
const
|
|
817
|
-
isAuthenticated:
|
|
818
|
-
setIsAuthenticated:
|
|
819
|
-
login:
|
|
820
|
-
logout:
|
|
821
|
-
setCurrentToken:
|
|
816
|
+
}, [L]);
|
|
817
|
+
const X = {
|
|
818
|
+
isAuthenticated: L,
|
|
819
|
+
setIsAuthenticated: b,
|
|
820
|
+
login: H,
|
|
821
|
+
logout: Y,
|
|
822
|
+
setCurrentToken: k
|
|
822
823
|
};
|
|
823
|
-
return /* @__PURE__ */ a.jsx(
|
|
824
|
+
return /* @__PURE__ */ a.jsx(Ke.Provider, { value: X, children: t });
|
|
824
825
|
}, je = () => {
|
|
825
|
-
const t = se(
|
|
826
|
+
const t = se(Ke);
|
|
826
827
|
if (t === void 0) throw new Error("Non sei dentro al Auth Provider");
|
|
827
828
|
return t;
|
|
828
|
-
},
|
|
829
|
-
const t = se(
|
|
829
|
+
}, Qe = ae(), Wt = ({ children: t, publicRoutes: o = [], privateRoutes: n = [] }) => /* @__PURE__ */ a.jsx(Qe.Provider, { value: { publicRoutes: o, privateRoutes: n }, children: t }), St = () => {
|
|
830
|
+
const t = se(Qe);
|
|
830
831
|
if (t === void 0)
|
|
831
832
|
throw new Error(
|
|
832
833
|
`Errore: Le rotte non sono state inizializzate correttamente.
|
|
@@ -840,82 +841,82 @@ Esempio:
|
|
|
840
841
|
</RouteProvider>`
|
|
841
842
|
);
|
|
842
843
|
return t;
|
|
843
|
-
},
|
|
844
|
-
const { login: o } = je(), { clearLoginFormOnError: n } =
|
|
844
|
+
}, et = ae(), Yt = ({ children: t }) => {
|
|
845
|
+
const { login: o } = je(), { clearLoginFormOnError: n } = ee(), s = {
|
|
845
846
|
email: "",
|
|
846
847
|
password: ""
|
|
847
|
-
}, [c, u] = j("Accedi"), [f, m] = j("Email"), [d,
|
|
848
|
-
overrideStyle:
|
|
849
|
-
setOverrideStyle:
|
|
848
|
+
}, [c, u] = j("Accedi"), [f, m] = j("Email"), [d, C] = j("email"), [y, O] = j("example@example.it"), [P, g] = j("Accedi"), [v, x] = j(s), [L, b] = j(), [p, k] = j(), [w, T] = j(), [D, te] = j(), [W, q] = j({}), V = {
|
|
849
|
+
overrideStyle: W,
|
|
850
|
+
setOverrideStyle: q,
|
|
850
851
|
title: c,
|
|
851
852
|
setTitle: u,
|
|
852
853
|
label: f,
|
|
853
854
|
setLabel: m,
|
|
854
855
|
type: d,
|
|
855
|
-
setType:
|
|
856
|
-
placeholder:
|
|
857
|
-
setPlaceholder:
|
|
858
|
-
buttonText:
|
|
859
|
-
setButtonText:
|
|
860
|
-
formData:
|
|
861
|
-
setFormData:
|
|
856
|
+
setType: C,
|
|
857
|
+
placeholder: y,
|
|
858
|
+
setPlaceholder: O,
|
|
859
|
+
buttonText: P,
|
|
860
|
+
setButtonText: g,
|
|
861
|
+
formData: v,
|
|
862
|
+
setFormData: x,
|
|
862
863
|
LogoImg: L,
|
|
863
|
-
setLogoImg:
|
|
864
|
-
styleCardForm:
|
|
865
|
-
setStyleCardForm:
|
|
866
|
-
styleContainerLogo:
|
|
867
|
-
setStyleContainerLogo:
|
|
868
|
-
styleLogo:
|
|
869
|
-
setStyleLogo:
|
|
870
|
-
changeData: (
|
|
871
|
-
|
|
864
|
+
setLogoImg: b,
|
|
865
|
+
styleCardForm: p,
|
|
866
|
+
setStyleCardForm: k,
|
|
867
|
+
styleContainerLogo: w,
|
|
868
|
+
setStyleContainerLogo: T,
|
|
869
|
+
styleLogo: D,
|
|
870
|
+
setStyleLogo: te,
|
|
871
|
+
changeData: (G, X) => {
|
|
872
|
+
x((R) => ({ ...R, [G]: X }));
|
|
872
873
|
},
|
|
873
|
-
handleLogin: (
|
|
874
|
-
o(
|
|
874
|
+
handleLogin: (G) => {
|
|
875
|
+
o(G, v), n && x(s);
|
|
875
876
|
}
|
|
876
877
|
};
|
|
877
|
-
return /* @__PURE__ */ a.jsx(
|
|
878
|
-
},
|
|
879
|
-
const t = se(
|
|
878
|
+
return /* @__PURE__ */ a.jsx(et.Provider, { value: V, children: t });
|
|
879
|
+
}, tt = () => {
|
|
880
|
+
const t = se(et);
|
|
880
881
|
if (t === void 0) throw new Error("Non puoi modificare La login");
|
|
881
882
|
return t;
|
|
882
883
|
};
|
|
883
|
-
function
|
|
884
|
+
function rt(t) {
|
|
884
885
|
return we({ tag: "svg", attr: { version: "1.1", viewBox: "0 0 16 16" }, child: [{ tag: "path", attr: { d: "M8 0c-4.355 0-7.898 3.481-7.998 7.812 0.092-3.779 2.966-6.812 6.498-6.812 3.59 0 6.5 3.134 6.5 7 0 0.828 0.672 1.5 1.5 1.5s1.5-0.672 1.5-1.5c0-4.418-3.582-8-8-8zM8 16c4.355 0 7.898-3.481 7.998-7.812-0.092 3.779-2.966 6.812-6.498 6.812-3.59 0-6.5-3.134-6.5-7 0-0.828-0.672-1.5-1.5-1.5s-1.5 0.672-1.5 1.5c0 4.418 3.582 8 8 8z" }, child: [] }] })(t);
|
|
885
886
|
}
|
|
886
887
|
const Ot = () => {
|
|
887
888
|
const { loadingProps: t } = xe(), { spinner: o = !0, spinnerStyle: n, text: s, textStyle: c, children: u, containerStyle: f, overrideStyle: m = {} } = t;
|
|
888
889
|
return /* @__PURE__ */ a.jsxs("div", { className: m.container || `fixed top-0 bottom-0 left-0 right-0 flex items-center justify-center bg-loading-bg z-[999] ${f}`, children: [
|
|
889
|
-
o && /* @__PURE__ */ a.jsx(
|
|
890
|
+
o && /* @__PURE__ */ a.jsx(rt, { className: m.spinner || `text-[20rem] relative animate-spin text-spinner ${n}` }),
|
|
890
891
|
u || /* @__PURE__ */ a.jsx("p", { className: m.text || `text-white text-2xl select-none absolute ${c}`, children: s || "Loading..." })
|
|
891
892
|
] });
|
|
892
893
|
};
|
|
893
894
|
function Pt(t) {
|
|
894
895
|
return we({ tag: "svg", attr: { viewBox: "0 0 15 15", fill: "none" }, child: [{ tag: "path", attr: { fillRule: "evenodd", clipRule: "evenodd", d: "M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z", fill: "currentColor" }, child: [] }] })(t);
|
|
895
896
|
}
|
|
896
|
-
const
|
|
897
|
-
const { messageAlert: t, typeAlert: o, alertConfig: n, getIcon: s, closeAlert: c } = ie(), { alertTimeout: u } =
|
|
898
|
-
return
|
|
899
|
-
let
|
|
897
|
+
const We = () => {
|
|
898
|
+
const { messageAlert: t, typeAlert: o, alertConfig: n, getIcon: s, closeAlert: c } = ie(), { alertTimeout: u } = ee(), [f, m] = j(0), { bgColor: d, textColor: C, buttonBg: y, hoverBg: O, focusRing: P, progressColor: g } = n[o];
|
|
899
|
+
return z(() => {
|
|
900
|
+
let v;
|
|
900
901
|
const L = 100 / (u / 100);
|
|
901
|
-
|
|
902
|
-
m((
|
|
902
|
+
v = setInterval(() => {
|
|
903
|
+
m((p) => p >= 100 ? (clearInterval(v), 100) : p + L);
|
|
903
904
|
}, 100);
|
|
904
|
-
const
|
|
905
|
+
const b = setTimeout(() => {
|
|
905
906
|
c();
|
|
906
907
|
}, u);
|
|
907
908
|
return () => {
|
|
908
|
-
clearTimeout(
|
|
909
|
+
clearTimeout(b), clearInterval(v);
|
|
909
910
|
};
|
|
910
|
-
}, []), /* @__PURE__ */ a.jsxs("div", { className: `flex items-center p-4 pt-6 ${
|
|
911
|
-
/* @__PURE__ */ a.jsx("div", { className: "w-full bg-gray-200 rounded-t-lg overflow-hidden h-2.5 absolute top-0 left-0 right-0", children: /* @__PURE__ */ a.jsx("div", { className: `${
|
|
911
|
+
}, []), /* @__PURE__ */ a.jsxs("div", { className: `flex items-center p-4 pt-6 ${C} rounded-lg ${d} mx-auto max-sm:min-w-[280px] sm:max-w-1/3 fixed top-[calc(100vh-100px)] sm:right-10 right-1/2 translate-x-1/2 sm:translate-0 z-100`, role: "alert", children: [
|
|
912
|
+
/* @__PURE__ */ a.jsx("div", { className: "w-full bg-gray-200 rounded-t-lg overflow-hidden h-2.5 absolute top-0 left-0 right-0", children: /* @__PURE__ */ a.jsx("div", { className: `${g} h-2.5 rounded-t-lg`, style: { width: `${f}%` } }) }),
|
|
912
913
|
s(o),
|
|
913
914
|
/* @__PURE__ */ a.jsx("div", { className: "px-4 text-sm font-medium", children: t }),
|
|
914
915
|
/* @__PURE__ */ a.jsx(
|
|
915
916
|
"button",
|
|
916
917
|
{
|
|
917
918
|
type: "button",
|
|
918
|
-
className: `ms-auto ${
|
|
919
|
+
className: `ms-auto ${y} rounded-lg focus:ring-2 ${P} p-1.5 ${O} inline-flex items-center justify-center h-8 w-8 cursor-pointer`,
|
|
919
920
|
title: "Close",
|
|
920
921
|
onClick: c,
|
|
921
922
|
children: /* @__PURE__ */ a.jsx(Pt, { className: "text-xl" })
|
|
@@ -929,24 +930,24 @@ const Ye = () => {
|
|
|
929
930
|
showHeaderOnLogin: f = !1,
|
|
930
931
|
headerExcludedRoutes: m = [],
|
|
931
932
|
footerComponent: d = null,
|
|
932
|
-
showFooterOnLogin:
|
|
933
|
-
footerExcludedRoutes:
|
|
934
|
-
} = t,
|
|
935
|
-
let
|
|
936
|
-
s.pathname === "/" ?
|
|
937
|
-
const
|
|
938
|
-
let
|
|
939
|
-
return s.pathname === "/" ?
|
|
933
|
+
showFooterOnLogin: C = !1,
|
|
934
|
+
footerExcludedRoutes: y = []
|
|
935
|
+
} = t, O = m.some((x) => ze(x, s.pathname));
|
|
936
|
+
let P;
|
|
937
|
+
s.pathname === "/" ? P = u && f : P = u && !O;
|
|
938
|
+
const g = y.some((x) => ze(x, s.pathname));
|
|
939
|
+
let v;
|
|
940
|
+
return s.pathname === "/" ? v = d && C : v = d && !g, /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
940
941
|
o && /* @__PURE__ */ a.jsx(Ot, {}),
|
|
941
|
-
n && /* @__PURE__ */ a.jsx(
|
|
942
|
-
|
|
942
|
+
n && /* @__PURE__ */ a.jsx(We, {}),
|
|
943
|
+
P && u,
|
|
943
944
|
c ? /* @__PURE__ */ a.jsxs("main", { className: o ? "hidden" : "", children: [
|
|
944
|
-
n && /* @__PURE__ */ a.jsx(
|
|
945
|
+
n && /* @__PURE__ */ a.jsx(We, {}),
|
|
945
946
|
/* @__PURE__ */ a.jsx(Ce, {})
|
|
946
947
|
] }) : /* @__PURE__ */ a.jsx(Ce, {}),
|
|
947
|
-
|
|
948
|
+
v && d
|
|
948
949
|
] });
|
|
949
|
-
},
|
|
950
|
+
}, Ye = (t) => {
|
|
950
951
|
const {
|
|
951
952
|
inputType: o,
|
|
952
953
|
inputId: n,
|
|
@@ -956,52 +957,52 @@ const Ye = () => {
|
|
|
956
957
|
inputChange: f,
|
|
957
958
|
autoFocus: m,
|
|
958
959
|
inputStyle: d,
|
|
959
|
-
overrideStyle:
|
|
960
|
-
} = t,
|
|
960
|
+
overrideStyle: C
|
|
961
|
+
} = t, O = ["text", "email", "password", "search", "tel", "url"].includes(o) ? o : "text";
|
|
961
962
|
return /* @__PURE__ */ a.jsx(
|
|
962
963
|
"input",
|
|
963
964
|
{
|
|
964
|
-
type:
|
|
965
|
+
type: O,
|
|
965
966
|
autoFocus: m,
|
|
966
967
|
id: n,
|
|
967
|
-
className:
|
|
968
|
+
className: C || `bg-input-bg border border-input-border text-input-text text-input-placeholder input-rounded focus:ring focus:ring-primary focus:border-primary focus:outline-none focus:shadow-(--shadow-primary-input) block w-full p-input ${d}`,
|
|
968
969
|
placeholder: s,
|
|
969
970
|
required: c ?? !0,
|
|
970
971
|
value: u,
|
|
971
972
|
onChange: f
|
|
972
973
|
}
|
|
973
974
|
);
|
|
974
|
-
},
|
|
975
|
-
const { title: t, label: o, type: n, placeholder: s, buttonText: c, formData: u, changeData: f, handleLogin: m, overrideStyle: d } =
|
|
975
|
+
}, Ze = ({ label: t, labelId: o, labelStyle: n, overrideStyle: s }) => /* @__PURE__ */ a.jsx("label", { htmlFor: o, className: s || `show-label mb-2 text-input-label font-medium text-color-label ${n}`, children: t }), Rt = () => {
|
|
976
|
+
const { title: t, label: o, type: n, placeholder: s, buttonText: c, formData: u, changeData: f, handleLogin: m, overrideStyle: d } = tt();
|
|
976
977
|
return /* @__PURE__ */ a.jsxs("form", { onSubmit: m, className: d.form || "form-size", children: [
|
|
977
978
|
/* @__PURE__ */ a.jsx("h1", { className: d.title || "text-form-title-size show-title title-position m-form-title", children: t }),
|
|
978
979
|
/* @__PURE__ */ a.jsxs("div", { className: d.containerEmail || "flex justify-center flex-col gap-1 m-input-form input-size mx-auto", children: [
|
|
979
|
-
/* @__PURE__ */ a.jsx(
|
|
980
|
+
/* @__PURE__ */ a.jsx(Ze, { labelId: "user-email", label: o }),
|
|
980
981
|
/* @__PURE__ */ a.jsx(
|
|
981
|
-
|
|
982
|
+
Ye,
|
|
982
983
|
{
|
|
983
984
|
inputType: n,
|
|
984
985
|
inputId: "user-email",
|
|
985
986
|
inputPlaceholder: s,
|
|
986
987
|
inputValue: u.email,
|
|
987
|
-
inputChange: (
|
|
988
|
-
f("email",
|
|
988
|
+
inputChange: (C) => {
|
|
989
|
+
f("email", C.target.value);
|
|
989
990
|
},
|
|
990
991
|
autoFocus: !0
|
|
991
992
|
}
|
|
992
993
|
)
|
|
993
994
|
] }),
|
|
994
995
|
/* @__PURE__ */ a.jsxs("div", { className: d.containerPassword || "flex justify-center flex-col gap-1 my-4 input-size mx-auto", children: [
|
|
995
|
-
/* @__PURE__ */ a.jsx(
|
|
996
|
+
/* @__PURE__ */ a.jsx(Ze, { labelId: "password", label: "Password" }),
|
|
996
997
|
/* @__PURE__ */ a.jsx(
|
|
997
|
-
|
|
998
|
+
Ye,
|
|
998
999
|
{
|
|
999
1000
|
inputType: "password",
|
|
1000
1001
|
inputId: "password",
|
|
1001
1002
|
inputPlaceholder: "Password",
|
|
1002
1003
|
inputValue: u.password,
|
|
1003
|
-
inputChange: (
|
|
1004
|
-
f("password",
|
|
1004
|
+
inputChange: (C) => {
|
|
1005
|
+
f("password", C.target.value);
|
|
1005
1006
|
}
|
|
1006
1007
|
}
|
|
1007
1008
|
)
|
|
@@ -1009,8 +1010,8 @@ const Ye = () => {
|
|
|
1009
1010
|
/* @__PURE__ */ a.jsx("div", { className: d.containerButton || "flex button-position items-center m-primary-button", children: /* @__PURE__ */ a.jsx("button", { className: d.button || "font-bold cursor-pointer shadow-(--shadow-primary) transition-all duration-200 hover:shadow-(--shadow-primary-hover) active:shadow-(--shadow-primary-active) active:translate-y-[2px] p-primary-button rounded-primary-button bg-primary hover:bg-primary-hover text-primary-text", children: c }) })
|
|
1010
1011
|
] });
|
|
1011
1012
|
}, Tt = ({ Logo: t }) => {
|
|
1012
|
-
const { activeAlert: o } = ie(), { styleCardForm: n, styleContainerLogo: s, styleLogo: c, overrideStyle: u } =
|
|
1013
|
-
return
|
|
1013
|
+
const { activeAlert: o } = ie(), { styleCardForm: n, styleContainerLogo: s, styleLogo: c, overrideStyle: u } = tt(), { firstPrivatePath: f } = ee(), m = Ue();
|
|
1014
|
+
return z(() => {
|
|
1014
1015
|
const d = localStorage.getItem("id");
|
|
1015
1016
|
localStorage.getItem("accessToken") && d && (m(`${f}${d}`), o("info", "Sei già loggato"));
|
|
1016
1017
|
}, []), /* @__PURE__ */ a.jsx("section", { id: "login-page", children: /* @__PURE__ */ a.jsx("div", { className: u.container || "container mx-auto flex items-center justify-center h-screen", children: /* @__PURE__ */ a.jsxs("div", { className: u.cardForm || `bg-form card-style card-size flex flex-col sm:flex-row sm:items-center justify-center ${n}`, children: [
|
|
@@ -1018,68 +1019,68 @@ const Ye = () => {
|
|
|
1018
1019
|
/* @__PURE__ */ a.jsx(Rt, {})
|
|
1019
1020
|
] }) }) });
|
|
1020
1021
|
}, _t = () => {
|
|
1021
|
-
const { isAuthenticated: t } = je(), { activeAlert: o } = ie(), { autoLogin: n } =
|
|
1022
|
-
return
|
|
1022
|
+
const { isAuthenticated: t } = je(), { activeAlert: o } = ie(), { autoLogin: n } = ee();
|
|
1023
|
+
return z(() => {
|
|
1023
1024
|
const s = localStorage.getItem("accessToken");
|
|
1024
1025
|
!t && !s && !n && o("danger", "Non sei autorizzato");
|
|
1025
1026
|
}, []), t === null ? null : t ? /* @__PURE__ */ a.jsx(Ce, {}) : /* @__PURE__ */ a.jsx(it, { to: "/", replace: !0 });
|
|
1026
1027
|
}, Nt = () => {
|
|
1027
|
-
const { id: t } = lt(), { logout: o, setCurrentToken: n } = je(), { usersEndpoint: s } =
|
|
1028
|
+
const { id: t } = lt(), { logout: o, setCurrentToken: n } = je(), { usersEndpoint: s } = ee(), { setIsLoading: c } = xe(), { setShowAlert: u, setTypeAlert: f, setMessageAlert: m, activeAlert: d } = ie(), [C, y] = j({}), [O, P] = j(null), [g, v] = j(!1), x = async () => {
|
|
1028
1029
|
try {
|
|
1029
1030
|
c(!0);
|
|
1030
|
-
const
|
|
1031
|
-
if (!
|
|
1031
|
+
const p = localStorage.getItem("accessToken");
|
|
1032
|
+
if (!p) {
|
|
1032
1033
|
o(), d("danger", "Sessione Scaduta");
|
|
1033
1034
|
return;
|
|
1034
1035
|
}
|
|
1035
|
-
n(
|
|
1036
|
-
const
|
|
1036
|
+
n(p);
|
|
1037
|
+
const T = (await (await he(u, f, m)).get(
|
|
1037
1038
|
`${s}${t}`,
|
|
1038
1039
|
{ headers: {
|
|
1039
|
-
Authorization:
|
|
1040
|
+
Authorization: p
|
|
1040
1041
|
} }
|
|
1041
1042
|
)).data;
|
|
1042
|
-
|
|
1043
|
-
} catch (
|
|
1044
|
-
console.error(
|
|
1043
|
+
y(T);
|
|
1044
|
+
} catch (p) {
|
|
1045
|
+
console.error(p), o();
|
|
1045
1046
|
} finally {
|
|
1046
1047
|
c(!1);
|
|
1047
1048
|
}
|
|
1048
1049
|
}, L = async () => {
|
|
1049
1050
|
try {
|
|
1050
|
-
|
|
1051
|
-
const
|
|
1052
|
-
if (!
|
|
1051
|
+
v(!0);
|
|
1052
|
+
const p = localStorage.getItem("accessToken");
|
|
1053
|
+
if (!p) {
|
|
1053
1054
|
o(), d("danger", "Sessione Scaduta");
|
|
1054
1055
|
return;
|
|
1055
1056
|
}
|
|
1056
|
-
const
|
|
1057
|
+
const T = (await (await he(u, f, m)).get(
|
|
1057
1058
|
`${s}`,
|
|
1058
1059
|
{ headers: {
|
|
1059
|
-
Authorization:
|
|
1060
|
+
Authorization: p
|
|
1060
1061
|
} }
|
|
1061
1062
|
)).data;
|
|
1062
|
-
|
|
1063
|
-
} catch (
|
|
1064
|
-
console.error(
|
|
1063
|
+
P(T);
|
|
1064
|
+
} catch (p) {
|
|
1065
|
+
console.error(p), c(!1);
|
|
1065
1066
|
} finally {
|
|
1066
|
-
|
|
1067
|
+
v(!1);
|
|
1067
1068
|
}
|
|
1068
|
-
},
|
|
1069
|
+
}, b = () => {
|
|
1069
1070
|
o(), d("info", "Hai effettuato il logout");
|
|
1070
1071
|
};
|
|
1071
|
-
return
|
|
1072
|
-
|
|
1072
|
+
return z(() => {
|
|
1073
|
+
x();
|
|
1073
1074
|
}, []), /* @__PURE__ */ a.jsx("section", { children: /* @__PURE__ */ a.jsxs("div", { className: "container mx-auto py-8", children: [
|
|
1074
1075
|
/* @__PURE__ */ a.jsxs("div", { className: "flex items-center justify-center gap-8 h-20", children: [
|
|
1075
1076
|
/* @__PURE__ */ a.jsxs("h1", { className: "text-4xl text-center text-slate-800", children: [
|
|
1076
1077
|
"Email: ",
|
|
1077
|
-
|
|
1078
|
+
C.email
|
|
1078
1079
|
] }),
|
|
1079
1080
|
/* @__PURE__ */ a.jsx(
|
|
1080
1081
|
"button",
|
|
1081
1082
|
{
|
|
1082
|
-
onClick:
|
|
1083
|
+
onClick: b,
|
|
1083
1084
|
className: "bg-red-500 hover:bg-red-700 text-white font-bold py-2 px-4 rounded-full cursor-pointer shadow-[0_4px_10px_rgba(239,68,68,0.3),0_2px_4px_rgba(239,68,68,0.2)] hover:shadow-[0_6px_14px_rgba(185,28,28,0.4),0_3px_6px_rgba(185,28,28,0.3)] active:shadow-[0_2px_5px_rgba(239,68,68,0.3)] transition-all duration-200 active:translate-y-[2px]",
|
|
1084
1085
|
children: "Logout"
|
|
1085
1086
|
}
|
|
@@ -1090,15 +1091,15 @@ const Ye = () => {
|
|
|
1090
1091
|
{
|
|
1091
1092
|
onClick: L,
|
|
1092
1093
|
className: "bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded-full disabled:bg-blue-300 disabled:text-gray-500 disabled:cursor-not-allowed cursor-pointer transition-all duration-200 active:translate-y-[2px] shadow-[0_4px_10px_rgba(59,130,246,0.3),0_2px_4px_rgba(59,130,246,0.2)] hover:shadow-[0_6px_14px_rgba(29,78,216,0.4),0_3px_6px_rgba(29,78,216,0.3)] active:shadow-[0_2px_5px_rgba(59,130,246,0.3)]",
|
|
1093
|
-
disabled:
|
|
1094
|
+
disabled: g,
|
|
1094
1095
|
children: "Lista degli utenti"
|
|
1095
1096
|
}
|
|
1096
1097
|
) }),
|
|
1097
|
-
/* @__PURE__ */ a.jsx("div", { className: "flex justify-center items-center", children:
|
|
1098
|
-
|
|
1098
|
+
/* @__PURE__ */ a.jsx("div", { className: "flex justify-center items-center", children: O && /* @__PURE__ */ a.jsx("ul", { children: O.map((p) => /* @__PURE__ */ a.jsxs("li", { className: "text-xl my-4", children: [
|
|
1099
|
+
p.id,
|
|
1099
1100
|
" - ",
|
|
1100
|
-
|
|
1101
|
-
] }, `user-${
|
|
1101
|
+
p.email
|
|
1102
|
+
] }, `user-${p.id}`)) }) })
|
|
1102
1103
|
] }) });
|
|
1103
1104
|
}, At = (t) => /* @__PURE__ */ r.createElement("svg", { width: "108.41262mm", height: "108.41262mm", viewBox: "0 0 108.41262 108.41262", id: "svg1", xmlSpace: "preserve", xmlnsXlink: "http://www.w3.org/1999/xlink", xmlns: "http://www.w3.org/2000/svg", "xmlns:svg": "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ r.createElement("defs", { id: "defs1" }, /* @__PURE__ */ r.createElement("linearGradient", { id: "linearGradient27" }, /* @__PURE__ */ r.createElement("stop", { style: {
|
|
1104
1105
|
stopColor: "#ff0000",
|
|
@@ -1147,53 +1148,53 @@ const Ye = () => {
|
|
|
1147
1148
|
strokeOpacity: 1,
|
|
1148
1149
|
paintOrder: "stroke markers fill"
|
|
1149
1150
|
}, d: "", id: "path40", transform: "scale(0.26458333)" }))), Zt = (t) => {
|
|
1150
|
-
const { publicRoutes: o, privateRoutes: n } = St(), { firstPrivatePath: s } =
|
|
1151
|
+
const { publicRoutes: o, privateRoutes: n } = St(), { firstPrivatePath: s } = ee(), {
|
|
1151
1152
|
logoImg: c = At,
|
|
1152
1153
|
pathImg: u = "./src/assets/MyWarehouse.svg",
|
|
1153
1154
|
firstPrivateElement: f = /* @__PURE__ */ a.jsx(Nt, {}),
|
|
1154
1155
|
globalLayout: m,
|
|
1155
1156
|
isMain: d,
|
|
1156
|
-
headerComponent:
|
|
1157
|
-
showHeaderOnLogin:
|
|
1158
|
-
headerExcludedRoutes:
|
|
1159
|
-
footerComponent:
|
|
1160
|
-
showFooterOnLogin:
|
|
1161
|
-
footerExcludedRoutes:
|
|
1162
|
-
privateProvider:
|
|
1157
|
+
headerComponent: C,
|
|
1158
|
+
showHeaderOnLogin: y,
|
|
1159
|
+
headerExcludedRoutes: O,
|
|
1160
|
+
footerComponent: P,
|
|
1161
|
+
showFooterOnLogin: g,
|
|
1162
|
+
footerExcludedRoutes: v,
|
|
1163
|
+
privateProvider: x,
|
|
1163
1164
|
customProvider: L
|
|
1164
|
-
} = t,
|
|
1165
|
+
} = t, b = m || /* @__PURE__ */ a.jsx(
|
|
1165
1166
|
kt,
|
|
1166
1167
|
{
|
|
1167
1168
|
isMain: d,
|
|
1168
|
-
headerComponent:
|
|
1169
|
-
showHeaderOnLogin:
|
|
1170
|
-
headerExcludedRoutes:
|
|
1171
|
-
footerComponent:
|
|
1172
|
-
showFooterOnLogin:
|
|
1173
|
-
footerExcludedRoutes:
|
|
1169
|
+
headerComponent: C,
|
|
1170
|
+
showHeaderOnLogin: y,
|
|
1171
|
+
headerExcludedRoutes: O,
|
|
1172
|
+
footerComponent: P,
|
|
1173
|
+
showFooterOnLogin: g,
|
|
1174
|
+
footerExcludedRoutes: v
|
|
1174
1175
|
}
|
|
1175
|
-
),
|
|
1176
|
-
const
|
|
1177
|
-
u && (
|
|
1176
|
+
), p = x ? F.cloneElement(x, {}, L) : /* @__PURE__ */ a.jsx(_t, { children: L }), k = () => {
|
|
1177
|
+
const w = document.querySelector("link[rel='icon']");
|
|
1178
|
+
u && (w.href = u);
|
|
1178
1179
|
};
|
|
1179
|
-
return
|
|
1180
|
-
|
|
1181
|
-
}, []), /* @__PURE__ */ a.jsx(ct, { children: /* @__PURE__ */ a.jsxs(
|
|
1182
|
-
/* @__PURE__ */ a.jsxs(
|
|
1183
|
-
/* @__PURE__ */ a.jsx(
|
|
1184
|
-
o.map((
|
|
1180
|
+
return z(() => {
|
|
1181
|
+
k();
|
|
1182
|
+
}, []), /* @__PURE__ */ a.jsx(ct, { children: /* @__PURE__ */ a.jsxs(Q, { element: m === "none" ? null : b, children: [
|
|
1183
|
+
/* @__PURE__ */ a.jsxs(Q, { path: "/", children: [
|
|
1184
|
+
/* @__PURE__ */ a.jsx(Q, { index: !0, element: /* @__PURE__ */ a.jsx(Tt, { Logo: c }) }),
|
|
1185
|
+
o.map((w, T) => /* @__PURE__ */ a.jsx(Q, { path: w.path, element: w.element }, `public-${T}`))
|
|
1185
1186
|
] }),
|
|
1186
|
-
/* @__PURE__ */ a.jsxs(
|
|
1187
|
-
/* @__PURE__ */ a.jsx(
|
|
1188
|
-
n.map((
|
|
1187
|
+
/* @__PURE__ */ a.jsxs(Q, { element: p, children: [
|
|
1188
|
+
/* @__PURE__ */ a.jsx(Q, { path: `${s ?? "/dashboard/"}:id`, element: f }),
|
|
1189
|
+
n.map((w, T) => /* @__PURE__ */ a.jsx(Q, { path: w.path, element: w.element }, `private-${T}`))
|
|
1189
1190
|
] })
|
|
1190
1191
|
] }) });
|
|
1191
1192
|
}, Ut = ({ spinner: t = !0, spinnerStyle: o, text: n, textStyle: s, children: c, containerStyle: u, overrideStyle: f = {} }) => /* @__PURE__ */ a.jsxs("div", { className: f.container || `w-full h-full relative flex items-center justify-center ${u}`, children: [
|
|
1192
|
-
t && /* @__PURE__ */ a.jsx(
|
|
1193
|
+
t && /* @__PURE__ */ a.jsx(rt, { className: f.spinner || `text-[20rem] animate-spin text-black ${o}` }),
|
|
1193
1194
|
c || /* @__PURE__ */ a.jsx("p", { className: f.text || `text-black text-2xl select-none absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 ${s}`, children: n || "Loading..." })
|
|
1194
1195
|
] });
|
|
1195
1196
|
export {
|
|
1196
|
-
|
|
1197
|
+
We as Alert,
|
|
1197
1198
|
Ft as AlertProvider,
|
|
1198
1199
|
_t as AuthPage,
|
|
1199
1200
|
Dt as AuthProvider,
|
|
@@ -1202,8 +1203,8 @@ export {
|
|
|
1202
1203
|
Nt as Dashboard,
|
|
1203
1204
|
kt as DefaultLayout,
|
|
1204
1205
|
pt as ErrorPage,
|
|
1205
|
-
|
|
1206
|
-
|
|
1206
|
+
Ye as Input,
|
|
1207
|
+
Ze as InputLabel,
|
|
1207
1208
|
Xt as Link,
|
|
1208
1209
|
Ot as Loading,
|
|
1209
1210
|
Ut as LoadingComponent,
|
|
@@ -1220,10 +1221,10 @@ export {
|
|
|
1220
1221
|
he as fetchAxiosConfig,
|
|
1221
1222
|
ie as useAlert,
|
|
1222
1223
|
je as useAuth,
|
|
1223
|
-
|
|
1224
|
+
ee as useConfig,
|
|
1224
1225
|
xe as useLoading,
|
|
1225
1226
|
t0 as useLocation,
|
|
1226
|
-
|
|
1227
|
+
tt as useLoginForm,
|
|
1227
1228
|
r0 as useMatch,
|
|
1228
1229
|
St as useRoutesInjection
|
|
1229
1230
|
};
|