thecore-auth 0.0.77 → 0.0.78
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/thecore-auth.cjs.js +12 -12
- package/dist/thecore-auth.css +1 -1
- package/dist/thecore-auth.esm.js +590 -591
- package/package.json +1 -1
package/dist/thecore-auth.esm.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as r from "react";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { useNavigate as Ue, useLocation as
|
|
5
|
-
import { BrowserRouter as
|
|
6
|
-
import
|
|
7
|
-
import { default as
|
|
2
|
+
import D, { createContext as ae, useState as j, useContext as se, useEffect as I } from "react";
|
|
3
|
+
import it from "jwt-decode";
|
|
4
|
+
import { useNavigate as Ue, useLocation as qe, matchPath as ze, Outlet as ye, Navigate as He, useParams as lt, Link as ct, Routes as ut, Route as Q } from "react-router-dom";
|
|
5
|
+
import { BrowserRouter as Xt, Link as Kt, NavLink as Qt, Outlet as e0, Route as t0, Routes as r0, useLocation as o0, useMatch as n0, useNavigate as a0 } from "react-router-dom";
|
|
6
|
+
import ft from "axios";
|
|
7
|
+
import { default as i0 } from "axios";
|
|
8
8
|
var me = { exports: {} }, ue = {};
|
|
9
9
|
/**
|
|
10
10
|
* @license React
|
|
@@ -16,22 +16,22 @@ var me = { exports: {} }, ue = {};
|
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
17
|
*/
|
|
18
18
|
var Ge;
|
|
19
|
-
function
|
|
19
|
+
function dt() {
|
|
20
20
|
if (Ge) return ue;
|
|
21
21
|
Ge = 1;
|
|
22
22
|
var t = Symbol.for("react.transitional.element"), o = Symbol.for("react.fragment");
|
|
23
|
-
function n(
|
|
23
|
+
function n(a, i, u) {
|
|
24
24
|
var f = null;
|
|
25
|
-
if (u !== void 0 && (f = "" + u),
|
|
25
|
+
if (u !== void 0 && (f = "" + u), i.key !== void 0 && (f = "" + i.key), "key" in i) {
|
|
26
26
|
u = {};
|
|
27
|
-
for (var m in
|
|
28
|
-
m !== "key" && (u[m] =
|
|
29
|
-
} else u =
|
|
30
|
-
return
|
|
27
|
+
for (var m in i)
|
|
28
|
+
m !== "key" && (u[m] = i[m]);
|
|
29
|
+
} else u = i;
|
|
30
|
+
return i = u.ref, {
|
|
31
31
|
$$typeof: t,
|
|
32
|
-
type:
|
|
32
|
+
type: a,
|
|
33
33
|
key: f,
|
|
34
|
-
ref:
|
|
34
|
+
ref: i !== void 0 ? i : null,
|
|
35
35
|
props: u
|
|
36
36
|
};
|
|
37
37
|
}
|
|
@@ -48,19 +48,19 @@ var fe = {};
|
|
|
48
48
|
* LICENSE file in the root directory of this source tree.
|
|
49
49
|
*/
|
|
50
50
|
var Be;
|
|
51
|
-
function
|
|
51
|
+
function mt() {
|
|
52
52
|
return Be || (Be = 1, process.env.NODE_ENV !== "production" && function() {
|
|
53
53
|
function t(e) {
|
|
54
54
|
if (e == null) return null;
|
|
55
55
|
if (typeof e == "function")
|
|
56
|
-
return e.$$typeof ===
|
|
56
|
+
return e.$$typeof === A ? null : e.displayName || e.name || null;
|
|
57
57
|
if (typeof e == "string") return e;
|
|
58
58
|
switch (e) {
|
|
59
|
-
case
|
|
59
|
+
case W:
|
|
60
60
|
return "Fragment";
|
|
61
|
-
case
|
|
61
|
+
case N:
|
|
62
62
|
return "Portal";
|
|
63
|
-
case
|
|
63
|
+
case Y:
|
|
64
64
|
return "Profiler";
|
|
65
65
|
case te:
|
|
66
66
|
return "StrictMode";
|
|
@@ -73,19 +73,19 @@ function dt() {
|
|
|
73
73
|
switch (typeof e.tag == "number" && console.error(
|
|
74
74
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
75
75
|
), e.$$typeof) {
|
|
76
|
-
case
|
|
76
|
+
case J:
|
|
77
77
|
return (e.displayName || "Context") + ".Provider";
|
|
78
|
-
case
|
|
78
|
+
case H:
|
|
79
79
|
return (e._context.displayName || "Context") + ".Consumer";
|
|
80
|
-
case
|
|
81
|
-
var
|
|
82
|
-
return e = e.displayName, e || (e =
|
|
80
|
+
case Z:
|
|
81
|
+
var l = e.render;
|
|
82
|
+
return e = e.displayName, e || (e = l.displayName || l.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
|
|
83
83
|
case X:
|
|
84
|
-
return
|
|
85
|
-
case
|
|
86
|
-
|
|
84
|
+
return l = e.displayName || null, l !== null ? l : t(e.type) || "Memo";
|
|
85
|
+
case k:
|
|
86
|
+
l = e._payload, e = e._init;
|
|
87
87
|
try {
|
|
88
|
-
return t(e(
|
|
88
|
+
return t(e(l));
|
|
89
89
|
} catch {
|
|
90
90
|
}
|
|
91
91
|
}
|
|
@@ -97,29 +97,29 @@ function dt() {
|
|
|
97
97
|
function n(e) {
|
|
98
98
|
try {
|
|
99
99
|
o(e);
|
|
100
|
-
var
|
|
100
|
+
var l = !1;
|
|
101
101
|
} catch {
|
|
102
|
-
|
|
102
|
+
l = !0;
|
|
103
103
|
}
|
|
104
|
-
if (
|
|
105
|
-
|
|
106
|
-
var
|
|
107
|
-
return
|
|
108
|
-
|
|
104
|
+
if (l) {
|
|
105
|
+
l = console;
|
|
106
|
+
var c = l.error, b = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
107
|
+
return c.call(
|
|
108
|
+
l,
|
|
109
109
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
110
|
-
|
|
110
|
+
b
|
|
111
111
|
), o(e);
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
|
-
function
|
|
114
|
+
function a() {
|
|
115
115
|
}
|
|
116
|
-
function
|
|
116
|
+
function i() {
|
|
117
117
|
if (le === 0) {
|
|
118
|
-
Le = console.log, Se = console.info, Oe = console.warn, Pe = console.error, ke = console.group,
|
|
118
|
+
Le = console.log, Se = console.info, Oe = console.warn, Pe = console.error, ke = console.group, _e = console.groupCollapsed, Re = console.groupEnd;
|
|
119
119
|
var e = {
|
|
120
120
|
configurable: !0,
|
|
121
121
|
enumerable: !0,
|
|
122
|
-
value:
|
|
122
|
+
value: a,
|
|
123
123
|
writable: !0
|
|
124
124
|
};
|
|
125
125
|
Object.defineProperties(console, {
|
|
@@ -138,13 +138,13 @@ function dt() {
|
|
|
138
138
|
if (le--, le === 0) {
|
|
139
139
|
var e = { configurable: !0, enumerable: !0, writable: !0 };
|
|
140
140
|
Object.defineProperties(console, {
|
|
141
|
-
log:
|
|
142
|
-
info:
|
|
143
|
-
warn:
|
|
144
|
-
error:
|
|
145
|
-
group:
|
|
146
|
-
groupCollapsed:
|
|
147
|
-
groupEnd:
|
|
141
|
+
log: B({}, e, { value: Le }),
|
|
142
|
+
info: B({}, e, { value: Se }),
|
|
143
|
+
warn: B({}, e, { value: Oe }),
|
|
144
|
+
error: B({}, e, { value: Pe }),
|
|
145
|
+
group: B({}, e, { value: ke }),
|
|
146
|
+
groupCollapsed: B({}, e, { value: _e }),
|
|
147
|
+
groupEnd: B({}, e, { value: Re })
|
|
148
148
|
});
|
|
149
149
|
}
|
|
150
150
|
0 > le && console.error(
|
|
@@ -152,121 +152,121 @@ function dt() {
|
|
|
152
152
|
);
|
|
153
153
|
}
|
|
154
154
|
function f(e) {
|
|
155
|
-
if (
|
|
155
|
+
if (ve === void 0)
|
|
156
156
|
try {
|
|
157
157
|
throw Error();
|
|
158
|
-
} catch (
|
|
159
|
-
var
|
|
160
|
-
|
|
161
|
-
at`) ? " (<anonymous>)" : -1 <
|
|
158
|
+
} catch (c) {
|
|
159
|
+
var l = c.stack.trim().match(/\n( *(at )?)/);
|
|
160
|
+
ve = l && l[1] || "", Te = -1 < c.stack.indexOf(`
|
|
161
|
+
at`) ? " (<anonymous>)" : -1 < c.stack.indexOf("@") ? "@unknown:0:0" : "";
|
|
162
162
|
}
|
|
163
163
|
return `
|
|
164
|
-
` +
|
|
164
|
+
` + ve + e + Te;
|
|
165
165
|
}
|
|
166
|
-
function m(e,
|
|
166
|
+
function m(e, l) {
|
|
167
167
|
if (!e || be) return "";
|
|
168
|
-
var
|
|
169
|
-
if (
|
|
170
|
-
be = !0,
|
|
171
|
-
var
|
|
172
|
-
|
|
168
|
+
var c = Ee.get(e);
|
|
169
|
+
if (c !== void 0) return c;
|
|
170
|
+
be = !0, c = Error.prepareStackTrace, Error.prepareStackTrace = void 0;
|
|
171
|
+
var b = null;
|
|
172
|
+
b = z.H, z.H = null, i();
|
|
173
173
|
try {
|
|
174
|
-
var
|
|
174
|
+
var R = {
|
|
175
175
|
DetermineComponentFrameRoot: function() {
|
|
176
176
|
try {
|
|
177
|
-
if (
|
|
178
|
-
var
|
|
177
|
+
if (l) {
|
|
178
|
+
var q = function() {
|
|
179
179
|
throw Error();
|
|
180
180
|
};
|
|
181
|
-
if (Object.defineProperty(
|
|
181
|
+
if (Object.defineProperty(q.prototype, "props", {
|
|
182
182
|
set: function() {
|
|
183
183
|
throw Error();
|
|
184
184
|
}
|
|
185
185
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
186
186
|
try {
|
|
187
|
-
Reflect.construct(
|
|
188
|
-
} catch (
|
|
189
|
-
var de =
|
|
187
|
+
Reflect.construct(q, []);
|
|
188
|
+
} catch (F) {
|
|
189
|
+
var de = F;
|
|
190
190
|
}
|
|
191
|
-
Reflect.construct(e, [],
|
|
191
|
+
Reflect.construct(e, [], q);
|
|
192
192
|
} else {
|
|
193
193
|
try {
|
|
194
|
-
|
|
195
|
-
} catch (
|
|
196
|
-
de =
|
|
194
|
+
q.call();
|
|
195
|
+
} catch (F) {
|
|
196
|
+
de = F;
|
|
197
197
|
}
|
|
198
|
-
e.call(
|
|
198
|
+
e.call(q.prototype);
|
|
199
199
|
}
|
|
200
200
|
} else {
|
|
201
201
|
try {
|
|
202
202
|
throw Error();
|
|
203
|
-
} catch (
|
|
204
|
-
de =
|
|
203
|
+
} catch (F) {
|
|
204
|
+
de = F;
|
|
205
205
|
}
|
|
206
|
-
(
|
|
206
|
+
(q = e()) && typeof q.catch == "function" && q.catch(function() {
|
|
207
207
|
});
|
|
208
208
|
}
|
|
209
|
-
} catch (
|
|
210
|
-
if (
|
|
211
|
-
return [
|
|
209
|
+
} catch (F) {
|
|
210
|
+
if (F && de && typeof F.stack == "string")
|
|
211
|
+
return [F.stack, de.stack];
|
|
212
212
|
}
|
|
213
213
|
return [null, null];
|
|
214
214
|
}
|
|
215
215
|
};
|
|
216
|
-
|
|
217
|
-
var
|
|
218
|
-
|
|
216
|
+
R.DetermineComponentFrameRoot.displayName = "DetermineComponentFrameRoot";
|
|
217
|
+
var O = Object.getOwnPropertyDescriptor(
|
|
218
|
+
R.DetermineComponentFrameRoot,
|
|
219
219
|
"name"
|
|
220
220
|
);
|
|
221
|
-
|
|
222
|
-
|
|
221
|
+
O && O.configurable && Object.defineProperty(
|
|
222
|
+
R.DetermineComponentFrameRoot,
|
|
223
223
|
"name",
|
|
224
224
|
{ value: "DetermineComponentFrameRoot" }
|
|
225
225
|
);
|
|
226
|
-
var
|
|
227
|
-
if (
|
|
228
|
-
var
|
|
226
|
+
var g = R.DetermineComponentFrameRoot(), $ = g[0], oe = g[1];
|
|
227
|
+
if ($ && oe) {
|
|
228
|
+
var T = $.split(`
|
|
229
229
|
`), K = oe.split(`
|
|
230
230
|
`);
|
|
231
|
-
for (
|
|
231
|
+
for (g = O = 0; O < T.length && !T[O].includes(
|
|
232
232
|
"DetermineComponentFrameRoot"
|
|
233
233
|
); )
|
|
234
|
-
|
|
235
|
-
for (;
|
|
234
|
+
O++;
|
|
235
|
+
for (; g < K.length && !K[g].includes(
|
|
236
236
|
"DetermineComponentFrameRoot"
|
|
237
237
|
); )
|
|
238
|
-
|
|
239
|
-
if (
|
|
240
|
-
for (
|
|
241
|
-
|
|
242
|
-
for (; 1 <=
|
|
243
|
-
if (
|
|
244
|
-
if (
|
|
238
|
+
g++;
|
|
239
|
+
if (O === T.length || g === K.length)
|
|
240
|
+
for (O = T.length - 1, g = K.length - 1; 1 <= O && 0 <= g && T[O] !== K[g]; )
|
|
241
|
+
g--;
|
|
242
|
+
for (; 1 <= O && 0 <= g; O--, g--)
|
|
243
|
+
if (T[O] !== K[g]) {
|
|
244
|
+
if (O !== 1 || g !== 1)
|
|
245
245
|
do
|
|
246
|
-
if (
|
|
246
|
+
if (O--, g--, 0 > g || T[O] !== K[g]) {
|
|
247
247
|
var ce = `
|
|
248
|
-
` +
|
|
248
|
+
` + T[O].replace(
|
|
249
249
|
" at new ",
|
|
250
250
|
" at "
|
|
251
251
|
);
|
|
252
|
-
return e.displayName && ce.includes("<anonymous>") && (ce = ce.replace("<anonymous>", e.displayName)), typeof e == "function" &&
|
|
252
|
+
return e.displayName && ce.includes("<anonymous>") && (ce = ce.replace("<anonymous>", e.displayName)), typeof e == "function" && Ee.set(e, ce), ce;
|
|
253
253
|
}
|
|
254
|
-
while (1 <=
|
|
254
|
+
while (1 <= O && 0 <= g);
|
|
255
255
|
break;
|
|
256
256
|
}
|
|
257
257
|
}
|
|
258
258
|
} finally {
|
|
259
|
-
be = !1,
|
|
259
|
+
be = !1, z.H = b, u(), Error.prepareStackTrace = c;
|
|
260
260
|
}
|
|
261
|
-
return
|
|
261
|
+
return T = (T = e ? e.displayName || e.name : "") ? f(T) : "", typeof e == "function" && Ee.set(e, T), T;
|
|
262
262
|
}
|
|
263
|
-
function
|
|
263
|
+
function p(e) {
|
|
264
264
|
if (e == null) return "";
|
|
265
265
|
if (typeof e == "function") {
|
|
266
|
-
var
|
|
266
|
+
var l = e.prototype;
|
|
267
267
|
return m(
|
|
268
268
|
e,
|
|
269
|
-
!(!
|
|
269
|
+
!(!l || !l.isReactComponent)
|
|
270
270
|
);
|
|
271
271
|
}
|
|
272
272
|
if (typeof e == "string") return f(e);
|
|
@@ -278,58 +278,58 @@ function dt() {
|
|
|
278
278
|
}
|
|
279
279
|
if (typeof e == "object")
|
|
280
280
|
switch (e.$$typeof) {
|
|
281
|
-
case
|
|
281
|
+
case Z:
|
|
282
282
|
return e = m(e.render, !1), e;
|
|
283
283
|
case X:
|
|
284
|
-
return
|
|
285
|
-
case
|
|
286
|
-
|
|
284
|
+
return p(e.type);
|
|
285
|
+
case k:
|
|
286
|
+
l = e._payload, e = e._init;
|
|
287
287
|
try {
|
|
288
|
-
return
|
|
288
|
+
return p(e(l));
|
|
289
289
|
} catch {
|
|
290
290
|
}
|
|
291
291
|
}
|
|
292
292
|
return "";
|
|
293
293
|
}
|
|
294
294
|
function C() {
|
|
295
|
-
var e =
|
|
295
|
+
var e = z.A;
|
|
296
296
|
return e === null ? null : e.getOwner();
|
|
297
297
|
}
|
|
298
|
-
function
|
|
298
|
+
function E(e) {
|
|
299
299
|
if (re.call(e, "key")) {
|
|
300
|
-
var
|
|
301
|
-
if (
|
|
300
|
+
var l = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
301
|
+
if (l && l.isReactWarning) return !1;
|
|
302
302
|
}
|
|
303
303
|
return e.key !== void 0;
|
|
304
304
|
}
|
|
305
|
-
function
|
|
306
|
-
function
|
|
305
|
+
function _(e, l) {
|
|
306
|
+
function c() {
|
|
307
307
|
Ne || (Ne = !0, console.error(
|
|
308
308
|
"%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)",
|
|
309
|
-
|
|
309
|
+
l
|
|
310
310
|
));
|
|
311
311
|
}
|
|
312
|
-
|
|
313
|
-
get:
|
|
312
|
+
c.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
313
|
+
get: c,
|
|
314
314
|
configurable: !0
|
|
315
315
|
});
|
|
316
316
|
}
|
|
317
|
-
function
|
|
317
|
+
function S() {
|
|
318
318
|
var e = t(this.type);
|
|
319
319
|
return Ae[e] || (Ae[e] = !0, console.error(
|
|
320
320
|
"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."
|
|
321
321
|
)), e = this.props.ref, e !== void 0 ? e : null;
|
|
322
322
|
}
|
|
323
|
-
function
|
|
324
|
-
return
|
|
325
|
-
$$typeof:
|
|
323
|
+
function d(e, l, c, b, R, O) {
|
|
324
|
+
return c = O.ref, e = {
|
|
325
|
+
$$typeof: L,
|
|
326
326
|
type: e,
|
|
327
|
-
key:
|
|
328
|
-
props:
|
|
329
|
-
_owner:
|
|
330
|
-
}, (
|
|
327
|
+
key: l,
|
|
328
|
+
props: O,
|
|
329
|
+
_owner: R
|
|
330
|
+
}, (c !== void 0 ? c : null) !== null ? Object.defineProperty(e, "ref", {
|
|
331
331
|
enumerable: !1,
|
|
332
|
-
get:
|
|
332
|
+
get: S
|
|
333
333
|
}) : Object.defineProperty(e, "ref", { enumerable: !1, value: null }), e._store = {}, Object.defineProperty(e._store, "validated", {
|
|
334
334
|
configurable: !1,
|
|
335
335
|
enumerable: !1,
|
|
@@ -342,122 +342,122 @@ function dt() {
|
|
|
342
342
|
value: null
|
|
343
343
|
}), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
|
|
344
344
|
}
|
|
345
|
-
function
|
|
346
|
-
if (typeof e == "string" || typeof e == "function" || e ===
|
|
347
|
-
var
|
|
348
|
-
if (
|
|
349
|
-
if (
|
|
350
|
-
if (
|
|
351
|
-
for (
|
|
352
|
-
|
|
353
|
-
Object.freeze && Object.freeze(
|
|
345
|
+
function x(e, l, c, b, R, O) {
|
|
346
|
+
if (typeof e == "string" || typeof e == "function" || e === W || e === Y || e === te || e === V || e === G || e === M || typeof e == "object" && e !== null && (e.$$typeof === k || e.$$typeof === X || e.$$typeof === J || e.$$typeof === H || e.$$typeof === Z || e.$$typeof === at || e.getModuleId !== void 0)) {
|
|
347
|
+
var g = l.children;
|
|
348
|
+
if (g !== void 0)
|
|
349
|
+
if (b)
|
|
350
|
+
if (xe(g)) {
|
|
351
|
+
for (b = 0; b < g.length; b++)
|
|
352
|
+
h(g[b], e);
|
|
353
|
+
Object.freeze && Object.freeze(g);
|
|
354
354
|
} else
|
|
355
355
|
console.error(
|
|
356
356
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
357
357
|
);
|
|
358
|
-
else
|
|
358
|
+
else h(g, e);
|
|
359
359
|
} else
|
|
360
|
-
|
|
360
|
+
g = "", (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (g += " 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 ? b = "null" : xe(e) ? b = "array" : e !== void 0 && e.$$typeof === L ? (b = "<" + (t(e.type) || "Unknown") + " />", g = " Did you accidentally export a JSX literal instead of a component?") : b = typeof e, console.error(
|
|
361
361
|
"React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",
|
|
362
|
-
|
|
363
|
-
|
|
362
|
+
b,
|
|
363
|
+
g
|
|
364
364
|
);
|
|
365
|
-
if (re.call(
|
|
366
|
-
|
|
367
|
-
var
|
|
368
|
-
return
|
|
365
|
+
if (re.call(l, "key")) {
|
|
366
|
+
g = t(e);
|
|
367
|
+
var $ = Object.keys(l).filter(function(T) {
|
|
368
|
+
return T !== "key";
|
|
369
369
|
});
|
|
370
|
-
|
|
370
|
+
b = 0 < $.length ? "{key: someKey, " + $.join(": ..., ") + ": ...}" : "{key: someKey}", Me[g + b] || ($ = 0 < $.length ? "{" + $.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
371
371
|
`A props object containing a "key" prop is being spread into JSX:
|
|
372
372
|
let props = %s;
|
|
373
373
|
<%s {...props} />
|
|
374
374
|
React keys must be passed directly to JSX without using spread:
|
|
375
375
|
let props = %s;
|
|
376
376
|
<%s key={someKey} {...props} />`,
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
), Me[
|
|
377
|
+
b,
|
|
378
|
+
g,
|
|
379
|
+
$,
|
|
380
|
+
g
|
|
381
|
+
), Me[g + b] = !0);
|
|
382
382
|
}
|
|
383
|
-
if (
|
|
384
|
-
|
|
385
|
-
for (var oe in
|
|
386
|
-
oe !== "key" && (
|
|
387
|
-
} else
|
|
388
|
-
return
|
|
389
|
-
|
|
383
|
+
if (g = null, c !== void 0 && (n(c), g = "" + c), E(l) && (n(l.key), g = "" + l.key), "key" in l) {
|
|
384
|
+
c = {};
|
|
385
|
+
for (var oe in l)
|
|
386
|
+
oe !== "key" && (c[oe] = l[oe]);
|
|
387
|
+
} else c = l;
|
|
388
|
+
return g && _(
|
|
389
|
+
c,
|
|
390
390
|
typeof e == "function" ? e.displayName || e.name || "Unknown" : e
|
|
391
|
-
),
|
|
391
|
+
), d(e, g, O, R, C(), c);
|
|
392
392
|
}
|
|
393
|
-
function
|
|
394
|
-
if (typeof e == "object" && e && e.$$typeof !==
|
|
395
|
-
if (
|
|
396
|
-
for (var
|
|
397
|
-
var
|
|
398
|
-
|
|
393
|
+
function h(e, l) {
|
|
394
|
+
if (typeof e == "object" && e && e.$$typeof !== st) {
|
|
395
|
+
if (xe(e))
|
|
396
|
+
for (var c = 0; c < e.length; c++) {
|
|
397
|
+
var b = e[c];
|
|
398
|
+
v(b) && y(b, l);
|
|
399
399
|
}
|
|
400
|
-
else if (
|
|
400
|
+
else if (v(e))
|
|
401
401
|
e._store && (e._store.validated = 1);
|
|
402
|
-
else if (e === null || typeof e != "object" ?
|
|
403
|
-
for (; !(e =
|
|
404
|
-
|
|
402
|
+
else if (e === null || typeof e != "object" ? c = null : (c = U && e[U] || e["@@iterator"], c = typeof c == "function" ? c : null), typeof c == "function" && c !== e.entries && (c = c.call(e), c !== e))
|
|
403
|
+
for (; !(e = c.next()).done; )
|
|
404
|
+
v(e.value) && y(e.value, l);
|
|
405
405
|
}
|
|
406
406
|
}
|
|
407
|
-
function
|
|
408
|
-
return typeof e == "object" && e !== null && e.$$typeof ===
|
|
407
|
+
function v(e) {
|
|
408
|
+
return typeof e == "object" && e !== null && e.$$typeof === L;
|
|
409
409
|
}
|
|
410
|
-
function
|
|
411
|
-
if (e._store && !e._store.validated && e.key == null && (e._store.validated = 1,
|
|
412
|
-
Ie[
|
|
413
|
-
var
|
|
414
|
-
e && e._owner != null && e._owner !== C() && (
|
|
415
|
-
var
|
|
416
|
-
|
|
417
|
-
var
|
|
418
|
-
return
|
|
410
|
+
function y(e, l) {
|
|
411
|
+
if (e._store && !e._store.validated && e.key == null && (e._store.validated = 1, l = w(l), !Ie[l])) {
|
|
412
|
+
Ie[l] = !0;
|
|
413
|
+
var c = "";
|
|
414
|
+
e && e._owner != null && e._owner !== C() && (c = null, typeof e._owner.tag == "number" ? c = t(e._owner.type) : typeof e._owner.name == "string" && (c = e._owner.name), c = " It was passed a child from " + c + ".");
|
|
415
|
+
var b = z.getCurrentStack;
|
|
416
|
+
z.getCurrentStack = function() {
|
|
417
|
+
var R = p(e.type);
|
|
418
|
+
return b && (R += b() || ""), R;
|
|
419
419
|
}, console.error(
|
|
420
420
|
'Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
),
|
|
421
|
+
l,
|
|
422
|
+
c
|
|
423
|
+
), z.getCurrentStack = b;
|
|
424
424
|
}
|
|
425
425
|
}
|
|
426
|
-
function
|
|
427
|
-
var
|
|
428
|
-
return
|
|
426
|
+
function w(e) {
|
|
427
|
+
var l = "", c = C();
|
|
428
|
+
return c && (c = t(c.type)) && (l = `
|
|
429
429
|
|
|
430
|
-
Check the render method of \`` +
|
|
430
|
+
Check the render method of \`` + c + "`."), l || (e = t(e)) && (l = `
|
|
431
431
|
|
|
432
|
-
Check the top-level render call using <` + e + ">."),
|
|
432
|
+
Check the top-level render call using <` + e + ">."), l;
|
|
433
433
|
}
|
|
434
|
-
var
|
|
435
|
-
|
|
436
|
-
var
|
|
437
|
-
fe.Fragment =
|
|
438
|
-
return
|
|
439
|
-
}, fe.jsxs = function(e,
|
|
440
|
-
return
|
|
434
|
+
var P = D, L = Symbol.for("react.transitional.element"), N = Symbol.for("react.portal"), W = Symbol.for("react.fragment"), te = Symbol.for("react.strict_mode"), Y = Symbol.for("react.profiler"), H = Symbol.for("react.consumer"), J = Symbol.for("react.context"), Z = Symbol.for("react.forward_ref"), V = Symbol.for("react.suspense"), G = Symbol.for("react.suspense_list"), X = Symbol.for("react.memo"), k = Symbol.for("react.lazy"), M = Symbol.for("react.offscreen"), U = Symbol.iterator, A = Symbol.for("react.client.reference"), z = P.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, re = Object.prototype.hasOwnProperty, B = Object.assign, at = Symbol.for("react.client.reference"), xe = Array.isArray, le = 0, Le, Se, Oe, Pe, ke, _e, Re;
|
|
435
|
+
a.__reactDisabledLog = !0;
|
|
436
|
+
var ve, Te, be = !1, Ee = new (typeof WeakMap == "function" ? WeakMap : Map)(), st = Symbol.for("react.client.reference"), Ne, Ae = {}, Me = {}, Ie = {};
|
|
437
|
+
fe.Fragment = W, fe.jsx = function(e, l, c, b, R) {
|
|
438
|
+
return x(e, l, c, !1, b, R);
|
|
439
|
+
}, fe.jsxs = function(e, l, c, b, R) {
|
|
440
|
+
return x(e, l, c, !0, b, R);
|
|
441
441
|
};
|
|
442
442
|
}()), fe;
|
|
443
443
|
}
|
|
444
444
|
var $e;
|
|
445
|
-
function
|
|
446
|
-
return $e || ($e = 1, process.env.NODE_ENV === "production" ? me.exports =
|
|
445
|
+
function pt() {
|
|
446
|
+
return $e || ($e = 1, process.env.NODE_ENV === "production" ? me.exports = dt() : me.exports = mt()), me.exports;
|
|
447
447
|
}
|
|
448
|
-
var
|
|
449
|
-
const
|
|
450
|
-
const [o, n] = j(!1), [
|
|
451
|
-
return /* @__PURE__ */
|
|
452
|
-
},
|
|
453
|
-
const t = se(
|
|
448
|
+
var s = pt();
|
|
449
|
+
const Je = ae(), $t = ({ children: t }) => {
|
|
450
|
+
const [o, n] = j(!1), [a, i] = j(!1), [u, f] = j({});
|
|
451
|
+
return /* @__PURE__ */ s.jsx(Je.Provider, { value: { isLoading: o, setIsLoading: n, isLoadingComponent: a, setIsLoadingComponent: i, loadingProps: u, setLoadingProps: f }, children: t });
|
|
452
|
+
}, he = () => {
|
|
453
|
+
const t = se(Je);
|
|
454
454
|
if (t === void 0) throw new Error("Non puoi settare il loading");
|
|
455
455
|
return t;
|
|
456
|
-
},
|
|
457
|
-
/* @__PURE__ */
|
|
458
|
-
/* @__PURE__ */
|
|
459
|
-
] }) }),
|
|
460
|
-
const [o, n] = j({}), [
|
|
456
|
+
}, gt = ({ errorMessage: t, errorShow: o }) => /* @__PURE__ */ s.jsx("section", { className: o ? "" : "hidden", children: /* @__PURE__ */ s.jsxs("div", { className: "container mx-auto", children: [
|
|
457
|
+
/* @__PURE__ */ s.jsx("h1", { className: "text-center text-8xl my-12", children: "Errore" }),
|
|
458
|
+
/* @__PURE__ */ s.jsx("pre", { className: "text-xl", children: t })
|
|
459
|
+
] }) }), Ve = ae(), Ft = ({ children: t }) => {
|
|
460
|
+
const [o, n] = j({}), [a, i] = j(!1), u = `Creare un file config.json in public per il corretto funzionamento
|
|
461
461
|
Esempio di config.json:
|
|
462
462
|
|
|
463
463
|
{
|
|
@@ -484,90 +484,90 @@ Esempio di config.json:
|
|
|
484
484
|
"autoLoginEmail": ,
|
|
485
485
|
"autoLoginPassword":
|
|
486
486
|
}`, f = () => {
|
|
487
|
-
const
|
|
488
|
-
return `${
|
|
489
|
-
}, m = (
|
|
490
|
-
const
|
|
491
|
-
|
|
492
|
-
const
|
|
493
|
-
|
|
494
|
-
},
|
|
495
|
-
}),
|
|
496
|
-
let
|
|
497
|
-
return new Promise((
|
|
498
|
-
if (!
|
|
499
|
-
|
|
487
|
+
const d = /* @__PURE__ */ new Date(), x = String(d.getDate()).padStart(2, "0"), h = String(d.getMonth() + 1).padStart(2, "0"), v = d.getFullYear(), y = String(d.getHours()).padStart(2, "0"), w = String(d.getMinutes()).padStart(2, "0"), P = String(d.getSeconds()).padStart(2, "0");
|
|
488
|
+
return `${x}/${h}/${v} ${y}:${w}:${P}`;
|
|
489
|
+
}, m = (d) => new Promise((x, h) => {
|
|
490
|
+
const v = indexedDB.open("configDatabase", 1);
|
|
491
|
+
v.onupgradeneeded = (y) => {
|
|
492
|
+
const w = y.target.result;
|
|
493
|
+
w.objectStoreNames.contains(d) || w.createObjectStore(d, { keyPath: "id" });
|
|
494
|
+
}, v.onsuccess = (y) => x(y.target.result), v.onerror = (y) => h(y.target.error);
|
|
495
|
+
}), p = async (d, x) => {
|
|
496
|
+
let h = await m(d);
|
|
497
|
+
return new Promise((v, y) => {
|
|
498
|
+
if (!h) {
|
|
499
|
+
y("Errore: DB non disponibile");
|
|
500
500
|
return;
|
|
501
501
|
}
|
|
502
|
-
const
|
|
503
|
-
|
|
502
|
+
const w = h == null ? void 0 : h.transaction(d, "readonly"), P = w == null ? void 0 : w.objectStore(d), L = P == null ? void 0 : P.get(x);
|
|
503
|
+
L.onsuccess = () => v(L.result), L.onerror = (N) => y(N.target.error);
|
|
504
504
|
});
|
|
505
|
-
}, C = async (
|
|
506
|
-
let
|
|
507
|
-
return new Promise((
|
|
508
|
-
if (!
|
|
509
|
-
|
|
505
|
+
}, C = async (d, x) => {
|
|
506
|
+
let h = await m(d);
|
|
507
|
+
return new Promise((v, y) => {
|
|
508
|
+
if (!h) {
|
|
509
|
+
y("Errore: DB non disponibile");
|
|
510
510
|
return;
|
|
511
511
|
}
|
|
512
|
-
const
|
|
513
|
-
|
|
512
|
+
const w = h == null ? void 0 : h.transaction(d, "readwrite"), P = w == null ? void 0 : w.objectStore(d), L = P == null ? void 0 : P.put(x);
|
|
513
|
+
L.onsuccess = () => v(L.result), L.onerror = (N) => y(N.target.error);
|
|
514
514
|
});
|
|
515
|
-
},
|
|
516
|
-
let
|
|
515
|
+
}, E = async (d) => {
|
|
516
|
+
let x = Date.now(), h;
|
|
517
517
|
do
|
|
518
|
-
|
|
519
|
-
while (
|
|
520
|
-
return
|
|
521
|
-
},
|
|
522
|
-
|
|
523
|
-
},
|
|
518
|
+
h = await p(d, x), h && x++;
|
|
519
|
+
while (h);
|
|
520
|
+
return x;
|
|
521
|
+
}, _ = async (d, x) => {
|
|
522
|
+
x.id || (x.id = await E(d)), await C(d, x);
|
|
523
|
+
}, S = async () => {
|
|
524
524
|
try {
|
|
525
|
-
const
|
|
525
|
+
const h = {
|
|
526
526
|
...await (await fetch("/config.json")).json(),
|
|
527
527
|
openIndexedDB: m,
|
|
528
|
-
getDataIndexedDB:
|
|
528
|
+
getDataIndexedDB: p,
|
|
529
529
|
setDataIndexedDB: C,
|
|
530
|
-
generateUniqueId:
|
|
531
|
-
setDataWithAutoId:
|
|
530
|
+
generateUniqueId: E,
|
|
531
|
+
setDataWithAutoId: _,
|
|
532
532
|
setCurrentDate: f
|
|
533
533
|
};
|
|
534
|
-
n(
|
|
535
|
-
} catch (
|
|
536
|
-
console.error(
|
|
534
|
+
n(h);
|
|
535
|
+
} catch (d) {
|
|
536
|
+
console.error(d), i(!0);
|
|
537
537
|
}
|
|
538
538
|
};
|
|
539
|
-
return
|
|
540
|
-
|
|
541
|
-
}, []), Object.keys(o).length === 0 ? /* @__PURE__ */
|
|
539
|
+
return I(() => {
|
|
540
|
+
S();
|
|
541
|
+
}, []), Object.keys(o).length === 0 ? /* @__PURE__ */ s.jsx(gt, { errorShow: a, errorMessage: u }) : /* @__PURE__ */ s.jsx(Ve.Provider, { value: o, children: t });
|
|
542
542
|
}, ee = () => {
|
|
543
|
-
const t = se(
|
|
543
|
+
const t = se(Ve);
|
|
544
544
|
if (t === void 0) throw new Error("Non puoi leggere i config");
|
|
545
545
|
return t;
|
|
546
|
-
}, 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 " })))));
|
|
547
|
-
var
|
|
546
|
+
}, 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: "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 " }))))), 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: "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 " }))))), vt = (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 " })))));
|
|
547
|
+
var Xe = {
|
|
548
548
|
color: void 0,
|
|
549
549
|
size: void 0,
|
|
550
550
|
className: void 0,
|
|
551
551
|
style: void 0,
|
|
552
552
|
attr: void 0
|
|
553
|
-
}, Fe =
|
|
553
|
+
}, Fe = D.createContext && /* @__PURE__ */ D.createContext(Xe), bt = ["attr", "size", "title"];
|
|
554
554
|
function Et(t, o) {
|
|
555
555
|
if (t == null) return {};
|
|
556
|
-
var n =
|
|
556
|
+
var n = yt(t, o), a, i;
|
|
557
557
|
if (Object.getOwnPropertySymbols) {
|
|
558
558
|
var u = Object.getOwnPropertySymbols(t);
|
|
559
|
-
for (
|
|
560
|
-
|
|
559
|
+
for (i = 0; i < u.length; i++)
|
|
560
|
+
a = u[i], !(o.indexOf(a) >= 0) && Object.prototype.propertyIsEnumerable.call(t, a) && (n[a] = t[a]);
|
|
561
561
|
}
|
|
562
562
|
return n;
|
|
563
563
|
}
|
|
564
|
-
function
|
|
564
|
+
function yt(t, o) {
|
|
565
565
|
if (t == null) return {};
|
|
566
566
|
var n = {};
|
|
567
|
-
for (var
|
|
568
|
-
if (Object.prototype.hasOwnProperty.call(t,
|
|
569
|
-
if (o.indexOf(
|
|
570
|
-
n[
|
|
567
|
+
for (var a in t)
|
|
568
|
+
if (Object.prototype.hasOwnProperty.call(t, a)) {
|
|
569
|
+
if (o.indexOf(a) >= 0) continue;
|
|
570
|
+
n[a] = t[a];
|
|
571
571
|
}
|
|
572
572
|
return n;
|
|
573
573
|
}
|
|
@@ -575,8 +575,8 @@ function pe() {
|
|
|
575
575
|
return pe = Object.assign ? Object.assign.bind() : function(t) {
|
|
576
576
|
for (var o = 1; o < arguments.length; o++) {
|
|
577
577
|
var n = arguments[o];
|
|
578
|
-
for (var
|
|
579
|
-
Object.prototype.hasOwnProperty.call(n,
|
|
578
|
+
for (var a in n)
|
|
579
|
+
Object.prototype.hasOwnProperty.call(n, a) && (t[a] = n[a]);
|
|
580
580
|
}
|
|
581
581
|
return t;
|
|
582
582
|
}, pe.apply(this, arguments);
|
|
@@ -584,83 +584,83 @@ function pe() {
|
|
|
584
584
|
function De(t, o) {
|
|
585
585
|
var n = Object.keys(t);
|
|
586
586
|
if (Object.getOwnPropertySymbols) {
|
|
587
|
-
var
|
|
588
|
-
o && (
|
|
589
|
-
return Object.getOwnPropertyDescriptor(t,
|
|
590
|
-
})), n.push.apply(n,
|
|
587
|
+
var a = Object.getOwnPropertySymbols(t);
|
|
588
|
+
o && (a = a.filter(function(i) {
|
|
589
|
+
return Object.getOwnPropertyDescriptor(t, i).enumerable;
|
|
590
|
+
})), n.push.apply(n, a);
|
|
591
591
|
}
|
|
592
592
|
return n;
|
|
593
593
|
}
|
|
594
594
|
function ge(t) {
|
|
595
595
|
for (var o = 1; o < arguments.length; o++) {
|
|
596
596
|
var n = arguments[o] != null ? arguments[o] : {};
|
|
597
|
-
o % 2 ? De(Object(n), !0).forEach(function(
|
|
598
|
-
|
|
599
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) : De(Object(n)).forEach(function(
|
|
600
|
-
Object.defineProperty(t,
|
|
597
|
+
o % 2 ? De(Object(n), !0).forEach(function(a) {
|
|
598
|
+
Ct(t, a, n[a]);
|
|
599
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) : De(Object(n)).forEach(function(a) {
|
|
600
|
+
Object.defineProperty(t, a, Object.getOwnPropertyDescriptor(n, a));
|
|
601
601
|
});
|
|
602
602
|
}
|
|
603
603
|
return t;
|
|
604
604
|
}
|
|
605
|
-
function
|
|
606
|
-
return o =
|
|
605
|
+
function Ct(t, o, n) {
|
|
606
|
+
return o = wt(o), o in t ? Object.defineProperty(t, o, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[o] = n, t;
|
|
607
607
|
}
|
|
608
|
-
function
|
|
609
|
-
var o =
|
|
608
|
+
function wt(t) {
|
|
609
|
+
var o = jt(t, "string");
|
|
610
610
|
return typeof o == "symbol" ? o : o + "";
|
|
611
611
|
}
|
|
612
|
-
function
|
|
612
|
+
function jt(t, o) {
|
|
613
613
|
if (typeof t != "object" || !t) return t;
|
|
614
614
|
var n = t[Symbol.toPrimitive];
|
|
615
615
|
if (n !== void 0) {
|
|
616
|
-
var
|
|
617
|
-
if (typeof
|
|
616
|
+
var a = n.call(t, o || "default");
|
|
617
|
+
if (typeof a != "object") return a;
|
|
618
618
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
619
619
|
}
|
|
620
620
|
return (o === "string" ? String : Number)(t);
|
|
621
621
|
}
|
|
622
|
-
function
|
|
623
|
-
return t && t.map((o, n) => /* @__PURE__ */
|
|
622
|
+
function Ke(t) {
|
|
623
|
+
return t && t.map((o, n) => /* @__PURE__ */ D.createElement(o.tag, ge({
|
|
624
624
|
key: n
|
|
625
|
-
}, o.attr),
|
|
625
|
+
}, o.attr), Ke(o.child)));
|
|
626
626
|
}
|
|
627
627
|
function we(t) {
|
|
628
|
-
return (o) => /* @__PURE__ */
|
|
628
|
+
return (o) => /* @__PURE__ */ D.createElement(Lt, pe({
|
|
629
629
|
attr: ge({}, t.attr)
|
|
630
|
-
}, o),
|
|
630
|
+
}, o), Ke(t.child));
|
|
631
631
|
}
|
|
632
|
-
function
|
|
632
|
+
function Lt(t) {
|
|
633
633
|
var o = (n) => {
|
|
634
634
|
var {
|
|
635
|
-
attr:
|
|
636
|
-
size:
|
|
635
|
+
attr: a,
|
|
636
|
+
size: i,
|
|
637
637
|
title: u
|
|
638
|
-
} = t, f = Et(t,
|
|
639
|
-
return n.className && (
|
|
638
|
+
} = t, f = Et(t, bt), m = i || n.size || "1em", p;
|
|
639
|
+
return n.className && (p = n.className), t.className && (p = (p ? p + " " : "") + t.className), /* @__PURE__ */ D.createElement("svg", pe({
|
|
640
640
|
stroke: "currentColor",
|
|
641
641
|
fill: "currentColor",
|
|
642
642
|
strokeWidth: "0"
|
|
643
|
-
}, n.attr,
|
|
644
|
-
className:
|
|
643
|
+
}, n.attr, a, f, {
|
|
644
|
+
className: p,
|
|
645
645
|
style: ge(ge({
|
|
646
646
|
color: t.color || n.color
|
|
647
647
|
}, n.style), t.style),
|
|
648
648
|
height: m,
|
|
649
649
|
width: m,
|
|
650
650
|
xmlns: "http://www.w3.org/2000/svg"
|
|
651
|
-
}), u && /* @__PURE__ */
|
|
651
|
+
}), u && /* @__PURE__ */ D.createElement("title", null, u), t.children);
|
|
652
652
|
};
|
|
653
|
-
return Fe !== void 0 ? /* @__PURE__ */
|
|
653
|
+
return Fe !== void 0 ? /* @__PURE__ */ D.createElement(Fe.Consumer, null, (n) => o(n)) : o(Xe);
|
|
654
654
|
}
|
|
655
|
-
function
|
|
655
|
+
function St(t) {
|
|
656
656
|
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);
|
|
657
657
|
}
|
|
658
|
-
const
|
|
659
|
-
const [o, n] = j(!1), [
|
|
658
|
+
const Qe = ae(), Dt = ({ children: t }) => {
|
|
659
|
+
const [o, n] = j(!1), [a, i] = j(), [u, f] = j(), _ = {
|
|
660
660
|
showAlert: o,
|
|
661
661
|
setShowAlert: n,
|
|
662
|
-
typeAlert:
|
|
663
|
-
setTypeAlert:
|
|
662
|
+
typeAlert: a,
|
|
663
|
+
setTypeAlert: i,
|
|
664
664
|
messageAlert: u,
|
|
665
665
|
setMessageAlert: f,
|
|
666
666
|
alertConfig: {
|
|
@@ -697,48 +697,48 @@ const Je = ae(), Ft = ({ children: t }) => {
|
|
|
697
697
|
progressColor: "bg-warning-progress"
|
|
698
698
|
}
|
|
699
699
|
},
|
|
700
|
-
getIcon: (
|
|
701
|
-
switch (
|
|
700
|
+
getIcon: (S) => {
|
|
701
|
+
switch (S) {
|
|
702
702
|
case "danger":
|
|
703
|
-
return /* @__PURE__ */
|
|
703
|
+
return /* @__PURE__ */ s.jsx(ht, { className: "w-[20px] h-[20px]" });
|
|
704
704
|
case "info":
|
|
705
|
-
return /* @__PURE__ */
|
|
705
|
+
return /* @__PURE__ */ s.jsx(xt, { className: "w-[20px] h-[20px]" });
|
|
706
706
|
case "success":
|
|
707
|
-
return /* @__PURE__ */
|
|
707
|
+
return /* @__PURE__ */ s.jsx(St, { className: "text-xl" });
|
|
708
708
|
case "warning":
|
|
709
|
-
return /* @__PURE__ */
|
|
709
|
+
return /* @__PURE__ */ s.jsx(vt, { className: "w-[20px] h-[20px]" });
|
|
710
710
|
}
|
|
711
711
|
},
|
|
712
712
|
closeAlert: () => {
|
|
713
713
|
n(!o);
|
|
714
714
|
},
|
|
715
|
-
activeAlert: (
|
|
715
|
+
activeAlert: (S, d) => {
|
|
716
716
|
n(!1), setTimeout(() => {
|
|
717
|
-
|
|
717
|
+
i(S), f(d), n(!0);
|
|
718
718
|
}, 50);
|
|
719
719
|
}
|
|
720
720
|
};
|
|
721
|
-
return /* @__PURE__ */
|
|
721
|
+
return /* @__PURE__ */ s.jsx(Qe.Provider, { value: _, children: t });
|
|
722
722
|
}, ie = () => {
|
|
723
|
-
const t = se(
|
|
723
|
+
const t = se(Qe);
|
|
724
724
|
if (t === void 0) throw new Error("Non puoi modificare l'alert");
|
|
725
725
|
return t;
|
|
726
726
|
};
|
|
727
727
|
let ne;
|
|
728
|
-
const
|
|
728
|
+
const Ce = async (t, o, n) => {
|
|
729
729
|
if (ne) return ne;
|
|
730
730
|
try {
|
|
731
|
-
const
|
|
732
|
-
return ne =
|
|
731
|
+
const i = await (await fetch("/config.json")).json(), u = i.baseUri, { unauthorized: f, notFound: m, defaultMessage: p } = i.axiosErrors, C = i.axiosTimeout;
|
|
732
|
+
return ne = ft.create({
|
|
733
733
|
baseURL: u,
|
|
734
734
|
timeout: C
|
|
735
735
|
}), ne.interceptors.request.use(
|
|
736
|
-
(
|
|
736
|
+
(E) => E
|
|
737
737
|
), ne.interceptors.response.use(
|
|
738
|
-
(
|
|
739
|
-
(
|
|
740
|
-
if (
|
|
741
|
-
switch (t(!0), o("danger"),
|
|
738
|
+
(E) => E,
|
|
739
|
+
(E) => {
|
|
740
|
+
if (E.response)
|
|
741
|
+
switch (t(!0), o("danger"), E.response.status) {
|
|
742
742
|
case 401:
|
|
743
743
|
localStorage.removeItem("accessToken"), n(f);
|
|
744
744
|
break;
|
|
@@ -746,93 +746,93 @@ const he = async (t, o, n) => {
|
|
|
746
746
|
n(m);
|
|
747
747
|
break;
|
|
748
748
|
default:
|
|
749
|
-
n(`${
|
|
749
|
+
n(`${p} ${E.response.status} ${E.response.data.error}`);
|
|
750
750
|
}
|
|
751
|
-
return Promise.reject(
|
|
751
|
+
return Promise.reject(E);
|
|
752
752
|
}
|
|
753
753
|
), ne;
|
|
754
|
-
} catch (
|
|
755
|
-
console.error(
|
|
754
|
+
} catch (a) {
|
|
755
|
+
console.error(a);
|
|
756
756
|
}
|
|
757
|
-
},
|
|
758
|
-
const { heartbeatEndpoint: o, firstPrivatePath: n, infiniteSession:
|
|
759
|
-
|
|
757
|
+
}, et = ae(), Wt = ({ children: t }) => {
|
|
758
|
+
const { heartbeatEndpoint: o, firstPrivatePath: n, infiniteSession: a, timeDeducted: i, authenticatedEndpoint: u, autoLogin: f, autoLoginEmail: m, autoLoginPassword: p, setCurrentDate: C } = ee(), { setIsLoading: E } = he(), { setShowAlert: _, setMessageAlert: S, setTypeAlert: d, activeAlert: x } = ie(), h = Ue(), [v, y] = j(null), [w, P] = j(), [L, N] = j(), [W, te] = j(), [Y, H] = j(!1), J = async (k = null, M) => {
|
|
759
|
+
k && k.preventDefault(), H(!0);
|
|
760
760
|
try {
|
|
761
|
-
|
|
762
|
-
const
|
|
763
|
-
auth:
|
|
764
|
-
}),
|
|
765
|
-
re && (localStorage.setItem("accessToken", re), localStorage.setItem("id",
|
|
766
|
-
} catch (
|
|
767
|
-
console.error(
|
|
761
|
+
E(!0), _(!1);
|
|
762
|
+
const A = await (await Ce(_, d, S)).post(u, {
|
|
763
|
+
auth: M
|
|
764
|
+
}), z = A.data.id, re = A.headers.token, B = A.data;
|
|
765
|
+
re && (localStorage.setItem("accessToken", re), localStorage.setItem("id", z), localStorage.setItem("user", JSON.stringify(B)), y(!0), P(re), h(`${n}${z}`));
|
|
766
|
+
} catch (U) {
|
|
767
|
+
console.error(U);
|
|
768
768
|
} finally {
|
|
769
|
-
|
|
769
|
+
H(!1), E(!1);
|
|
770
770
|
}
|
|
771
|
-
},
|
|
772
|
-
localStorage.removeItem("accessToken"), localStorage.removeItem("id"),
|
|
771
|
+
}, Z = () => {
|
|
772
|
+
localStorage.removeItem("accessToken"), localStorage.removeItem("id"), localStorage.removeItem("user"), y(!1), P(null);
|
|
773
773
|
}, V = async () => {
|
|
774
774
|
try {
|
|
775
|
-
const
|
|
775
|
+
const k = localStorage.getItem("accessToken"), A = (await (await Ce(_, d, S)).get(
|
|
776
776
|
`${o}`,
|
|
777
777
|
{ headers: {
|
|
778
|
-
Authorization:
|
|
778
|
+
Authorization: k
|
|
779
779
|
} }
|
|
780
780
|
)).headers.token;
|
|
781
|
-
localStorage.setItem("accessToken",
|
|
782
|
-
} catch (
|
|
783
|
-
console.error(
|
|
781
|
+
localStorage.setItem("accessToken", A), P(A), console.log("nuovo token: ", A, "Data:", C());
|
|
782
|
+
} catch (k) {
|
|
783
|
+
console.error(k), Z();
|
|
784
784
|
}
|
|
785
785
|
}, G = () => {
|
|
786
|
-
if (!
|
|
786
|
+
if (!w)
|
|
787
787
|
return;
|
|
788
|
-
const
|
|
789
|
-
te(
|
|
788
|
+
const M = it(w).exp, U = Math.floor(Date.now() / 1e3), A = (M - U) * 1e3;
|
|
789
|
+
te(A), N(A - i);
|
|
790
790
|
};
|
|
791
|
-
|
|
791
|
+
I(() => {
|
|
792
792
|
if (localStorage.getItem("accessToken"))
|
|
793
|
-
|
|
793
|
+
y(!0);
|
|
794
794
|
else {
|
|
795
|
-
|
|
795
|
+
y(!1);
|
|
796
796
|
return;
|
|
797
797
|
}
|
|
798
|
-
}, []),
|
|
799
|
-
const
|
|
800
|
-
f && !
|
|
798
|
+
}, []), I(() => {
|
|
799
|
+
const k = localStorage.getItem("accessToken");
|
|
800
|
+
f && !k && !Y && J(null, {
|
|
801
801
|
email: m,
|
|
802
|
-
password:
|
|
802
|
+
password: p
|
|
803
803
|
});
|
|
804
|
-
}, [f,
|
|
804
|
+
}, [f, Y]), I(() => {
|
|
805
805
|
G();
|
|
806
|
-
let
|
|
807
|
-
|
|
806
|
+
let k;
|
|
807
|
+
a && w && L && (k = setInterval(() => {
|
|
808
808
|
V();
|
|
809
|
-
},
|
|
810
|
-
let
|
|
811
|
-
return !
|
|
812
|
-
|
|
813
|
-
},
|
|
814
|
-
|
|
809
|
+
}, L));
|
|
810
|
+
let M;
|
|
811
|
+
return !a && w && W && (M = setTimeout(() => {
|
|
812
|
+
Z(), x("danger", "Sessione scaduta");
|
|
813
|
+
}, W)), () => {
|
|
814
|
+
k && clearInterval(k), M && clearTimeout(M);
|
|
815
815
|
};
|
|
816
|
-
}, [
|
|
817
|
-
|
|
816
|
+
}, [w, L]), I(() => {
|
|
817
|
+
v || f && !Y && J(null, {
|
|
818
818
|
email: m,
|
|
819
|
-
password:
|
|
819
|
+
password: p
|
|
820
820
|
});
|
|
821
|
-
}, [
|
|
821
|
+
}, [v]);
|
|
822
822
|
const X = {
|
|
823
|
-
isAuthenticated:
|
|
824
|
-
setIsAuthenticated:
|
|
825
|
-
login:
|
|
826
|
-
logout:
|
|
827
|
-
setCurrentToken:
|
|
823
|
+
isAuthenticated: v,
|
|
824
|
+
setIsAuthenticated: y,
|
|
825
|
+
login: J,
|
|
826
|
+
logout: Z,
|
|
827
|
+
setCurrentToken: P
|
|
828
828
|
};
|
|
829
|
-
return /* @__PURE__ */
|
|
829
|
+
return /* @__PURE__ */ s.jsx(et.Provider, { value: X, children: t });
|
|
830
830
|
}, je = () => {
|
|
831
|
-
const t = se(
|
|
831
|
+
const t = se(et);
|
|
832
832
|
if (t === void 0) throw new Error("Non sei dentro al Auth Provider");
|
|
833
833
|
return t;
|
|
834
|
-
},
|
|
835
|
-
const t = se(
|
|
834
|
+
}, tt = ae(), Yt = ({ children: t, publicRoutes: o = [], privateRoutes: n = [] }) => /* @__PURE__ */ s.jsx(tt.Provider, { value: { publicRoutes: o, privateRoutes: n }, children: t }), Ot = () => {
|
|
835
|
+
const t = se(tt);
|
|
836
836
|
if (t === void 0)
|
|
837
837
|
throw new Error(
|
|
838
838
|
`Errore: Le rotte non sono state inizializzate correttamente.
|
|
@@ -846,149 +846,151 @@ Esempio:
|
|
|
846
846
|
</RouteProvider>`
|
|
847
847
|
);
|
|
848
848
|
return t;
|
|
849
|
-
},
|
|
850
|
-
const { login: o } = je(), { clearLoginFormOnError: n } = ee(),
|
|
849
|
+
}, rt = ae(), Zt = ({ children: t }) => {
|
|
850
|
+
const { login: o } = je(), { clearLoginFormOnError: n } = ee(), a = {
|
|
851
851
|
email: "",
|
|
852
852
|
password: ""
|
|
853
|
-
}, [
|
|
854
|
-
overrideStyle:
|
|
855
|
-
setOverrideStyle:
|
|
856
|
-
title:
|
|
853
|
+
}, [i, u] = j("Accedi"), [f, m] = j("Email"), [p, C] = j("email"), [E, _] = j("example@example.it"), [S, d] = j("Accedi"), [x, h] = j(a), [v, y] = j(), [w, P] = j(), [L, N] = j(), [W, te] = j(), [Y, H] = j({}), V = {
|
|
854
|
+
overrideStyle: Y,
|
|
855
|
+
setOverrideStyle: H,
|
|
856
|
+
title: i,
|
|
857
857
|
setTitle: u,
|
|
858
858
|
label: f,
|
|
859
859
|
setLabel: m,
|
|
860
|
-
type:
|
|
860
|
+
type: p,
|
|
861
861
|
setType: C,
|
|
862
|
-
placeholder:
|
|
863
|
-
setPlaceholder:
|
|
864
|
-
buttonText:
|
|
865
|
-
setButtonText:
|
|
866
|
-
formData:
|
|
867
|
-
setFormData:
|
|
868
|
-
LogoImg:
|
|
869
|
-
setLogoImg:
|
|
870
|
-
styleCardForm:
|
|
871
|
-
setStyleCardForm:
|
|
872
|
-
styleContainerLogo:
|
|
873
|
-
setStyleContainerLogo:
|
|
874
|
-
styleLogo:
|
|
862
|
+
placeholder: E,
|
|
863
|
+
setPlaceholder: _,
|
|
864
|
+
buttonText: S,
|
|
865
|
+
setButtonText: d,
|
|
866
|
+
formData: x,
|
|
867
|
+
setFormData: h,
|
|
868
|
+
LogoImg: v,
|
|
869
|
+
setLogoImg: y,
|
|
870
|
+
styleCardForm: w,
|
|
871
|
+
setStyleCardForm: P,
|
|
872
|
+
styleContainerLogo: L,
|
|
873
|
+
setStyleContainerLogo: N,
|
|
874
|
+
styleLogo: W,
|
|
875
875
|
setStyleLogo: te,
|
|
876
876
|
changeData: (G, X) => {
|
|
877
|
-
|
|
877
|
+
h((k) => ({ ...k, [G]: X }));
|
|
878
878
|
},
|
|
879
879
|
handleLogin: (G) => {
|
|
880
|
-
o(G,
|
|
880
|
+
o(G, x), n && h(a);
|
|
881
881
|
}
|
|
882
882
|
};
|
|
883
|
-
return /* @__PURE__ */
|
|
884
|
-
},
|
|
885
|
-
const t = se(
|
|
883
|
+
return /* @__PURE__ */ s.jsx(rt.Provider, { value: V, children: t });
|
|
884
|
+
}, ot = () => {
|
|
885
|
+
const t = se(rt);
|
|
886
886
|
if (t === void 0) throw new Error("Non puoi modificare La login");
|
|
887
887
|
return t;
|
|
888
888
|
};
|
|
889
|
-
function
|
|
889
|
+
function nt(t) {
|
|
890
890
|
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);
|
|
891
891
|
}
|
|
892
|
-
const
|
|
893
|
-
const { loadingProps: t } =
|
|
894
|
-
return /* @__PURE__ */
|
|
895
|
-
o && /* @__PURE__ */
|
|
896
|
-
u || /* @__PURE__ */
|
|
892
|
+
const Pt = () => {
|
|
893
|
+
const { loadingProps: t } = he(), { spinner: o = !0, spinnerStyle: n, text: a, textStyle: i, children: u, containerStyle: f, overrideStyle: m = {} } = t;
|
|
894
|
+
return /* @__PURE__ */ s.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: [
|
|
895
|
+
o && /* @__PURE__ */ s.jsx(nt, { className: m.spinner || `text-[20rem] relative animate-spin text-spinner ${n}` }),
|
|
896
|
+
u || /* @__PURE__ */ s.jsx("p", { className: m.text || `text-white text-2xl select-none absolute ${i}`, children: a || "Loading..." })
|
|
897
897
|
] });
|
|
898
898
|
};
|
|
899
|
-
function
|
|
899
|
+
function kt(t) {
|
|
900
900
|
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);
|
|
901
901
|
}
|
|
902
902
|
const We = () => {
|
|
903
|
-
const { messageAlert: t, typeAlert: o, alertConfig: n, getIcon:
|
|
904
|
-
return
|
|
905
|
-
let
|
|
906
|
-
const
|
|
907
|
-
|
|
908
|
-
m((
|
|
903
|
+
const { messageAlert: t, typeAlert: o, alertConfig: n, getIcon: a, closeAlert: i } = ie(), { alertTimeout: u } = ee(), [f, m] = j(0), { bgColor: p, textColor: C, buttonBg: E, hoverBg: _, focusRing: S, progressColor: d } = n[o];
|
|
904
|
+
return I(() => {
|
|
905
|
+
let x;
|
|
906
|
+
const v = 100 / (u / 100);
|
|
907
|
+
x = setInterval(() => {
|
|
908
|
+
m((w) => w >= 100 ? (clearInterval(x), 100) : w + v);
|
|
909
909
|
}, 100);
|
|
910
|
-
const
|
|
911
|
-
|
|
910
|
+
const y = setTimeout(() => {
|
|
911
|
+
i();
|
|
912
912
|
}, u);
|
|
913
913
|
return () => {
|
|
914
|
-
clearTimeout(
|
|
914
|
+
clearTimeout(y), clearInterval(x);
|
|
915
915
|
};
|
|
916
|
-
}, []), /* @__PURE__ */
|
|
917
|
-
/* @__PURE__ */
|
|
918
|
-
|
|
919
|
-
/* @__PURE__ */
|
|
920
|
-
/* @__PURE__ */
|
|
916
|
+
}, []), /* @__PURE__ */ s.jsxs("div", { className: `flex items-center p-4 pt-6 ${C} rounded-lg ${p} 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: [
|
|
917
|
+
/* @__PURE__ */ s.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__ */ s.jsx("div", { className: `${d} h-2.5 rounded-t-lg`, style: { width: `${f}%` } }) }),
|
|
918
|
+
a(o),
|
|
919
|
+
/* @__PURE__ */ s.jsx("div", { className: "px-4 text-sm font-medium", children: t }),
|
|
920
|
+
/* @__PURE__ */ s.jsx(
|
|
921
921
|
"button",
|
|
922
922
|
{
|
|
923
923
|
type: "button",
|
|
924
|
-
className: `ms-auto ${
|
|
924
|
+
className: `ms-auto ${E} rounded-lg focus:ring-2 ${S} p-1.5 ${_} inline-flex items-center justify-center h-8 w-8 cursor-pointer`,
|
|
925
925
|
title: "Close",
|
|
926
|
-
onClick:
|
|
927
|
-
children: /* @__PURE__ */
|
|
926
|
+
onClick: i,
|
|
927
|
+
children: /* @__PURE__ */ s.jsx(kt, { className: "text-xl" })
|
|
928
928
|
}
|
|
929
929
|
)
|
|
930
930
|
] });
|
|
931
|
-
},
|
|
932
|
-
const { isLoading: o } =
|
|
933
|
-
isMain:
|
|
931
|
+
}, _t = (t) => {
|
|
932
|
+
const { isLoading: o } = he(), { showAlert: n } = ie(), a = qe(), {
|
|
933
|
+
isMain: i = !0,
|
|
934
934
|
headerComponent: u = null,
|
|
935
935
|
showHeaderOnLogin: f = !1,
|
|
936
936
|
headerExcludedRoutes: m = [],
|
|
937
|
-
footerComponent:
|
|
937
|
+
footerComponent: p = null,
|
|
938
938
|
showFooterOnLogin: C = !1,
|
|
939
|
-
footerExcludedRoutes:
|
|
940
|
-
} = t,
|
|
941
|
-
let
|
|
942
|
-
|
|
943
|
-
const
|
|
944
|
-
let
|
|
945
|
-
return
|
|
946
|
-
o && /* @__PURE__ */
|
|
947
|
-
n && /* @__PURE__ */
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
n && /* @__PURE__ */
|
|
951
|
-
/* @__PURE__ */
|
|
952
|
-
] }) : /* @__PURE__ */
|
|
953
|
-
|
|
939
|
+
footerExcludedRoutes: E = []
|
|
940
|
+
} = t, _ = m.some((h) => ze(h, a.pathname));
|
|
941
|
+
let S;
|
|
942
|
+
a.pathname === "/" ? S = u && f : S = u && !_;
|
|
943
|
+
const d = E.some((h) => ze(h, a.pathname));
|
|
944
|
+
let x;
|
|
945
|
+
return a.pathname === "/" ? x = p && C : x = p && !d, /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
946
|
+
o && /* @__PURE__ */ s.jsx(Pt, {}),
|
|
947
|
+
n && /* @__PURE__ */ s.jsx(We, {}),
|
|
948
|
+
S && u,
|
|
949
|
+
i ? /* @__PURE__ */ s.jsxs("main", { className: o ? "hidden" : "", children: [
|
|
950
|
+
n && /* @__PURE__ */ s.jsx(We, {}),
|
|
951
|
+
/* @__PURE__ */ s.jsx(ye, {})
|
|
952
|
+
] }) : /* @__PURE__ */ s.jsx(ye, {}),
|
|
953
|
+
x && p
|
|
954
954
|
] });
|
|
955
955
|
}, Ye = (t) => {
|
|
956
956
|
const {
|
|
957
957
|
inputType: o,
|
|
958
958
|
inputId: n,
|
|
959
|
-
inputPlaceholder:
|
|
960
|
-
inputRequired:
|
|
959
|
+
inputPlaceholder: a,
|
|
960
|
+
inputRequired: i,
|
|
961
961
|
inputValue: u,
|
|
962
962
|
inputChange: f,
|
|
963
963
|
autoFocus: m,
|
|
964
|
-
inputStyle:
|
|
965
|
-
overrideStyle: C
|
|
966
|
-
|
|
967
|
-
|
|
964
|
+
inputStyle: p,
|
|
965
|
+
overrideStyle: C,
|
|
966
|
+
disabled: E
|
|
967
|
+
} = t, S = ["text", "email", "password", "search", "tel", "url"].includes(o) ? o : "text";
|
|
968
|
+
return /* @__PURE__ */ s.jsx(
|
|
968
969
|
"input",
|
|
969
970
|
{
|
|
970
|
-
type:
|
|
971
|
+
type: S,
|
|
971
972
|
autoFocus: m,
|
|
972
973
|
id: n,
|
|
973
|
-
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 ${
|
|
974
|
-
placeholder:
|
|
975
|
-
required:
|
|
974
|
+
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 ${p}`,
|
|
975
|
+
placeholder: a,
|
|
976
|
+
required: i ?? !0,
|
|
976
977
|
value: u,
|
|
977
|
-
onChange: f
|
|
978
|
+
onChange: f,
|
|
979
|
+
disabled: E
|
|
978
980
|
}
|
|
979
981
|
);
|
|
980
|
-
}, Ze = ({ label: t, labelId: o, labelStyle: n, overrideStyle:
|
|
981
|
-
const { title: t, label: o, type: n, placeholder:
|
|
982
|
-
return /* @__PURE__ */
|
|
983
|
-
/* @__PURE__ */
|
|
984
|
-
/* @__PURE__ */
|
|
985
|
-
/* @__PURE__ */
|
|
986
|
-
/* @__PURE__ */
|
|
982
|
+
}, Ze = ({ label: t, labelId: o, labelStyle: n, overrideStyle: a }) => /* @__PURE__ */ s.jsx("label", { htmlFor: o, className: a || `show-label mb-2 text-input-label font-medium text-color-label ${n}`, children: t }), Rt = () => {
|
|
983
|
+
const { title: t, label: o, type: n, placeholder: a, buttonText: i, formData: u, changeData: f, handleLogin: m, overrideStyle: p } = ot();
|
|
984
|
+
return /* @__PURE__ */ s.jsxs("form", { onSubmit: m, className: p.form || "form-size", children: [
|
|
985
|
+
/* @__PURE__ */ s.jsx("h1", { className: p.title || "text-form-title-size show-title title-position m-form-title", children: t }),
|
|
986
|
+
/* @__PURE__ */ s.jsxs("div", { className: p.containerEmail || "flex justify-center flex-col gap-1 m-input-form input-size mx-auto", children: [
|
|
987
|
+
/* @__PURE__ */ s.jsx(Ze, { labelId: "user-email", label: o }),
|
|
988
|
+
/* @__PURE__ */ s.jsx(
|
|
987
989
|
Ye,
|
|
988
990
|
{
|
|
989
991
|
inputType: n,
|
|
990
992
|
inputId: "user-email",
|
|
991
|
-
inputPlaceholder:
|
|
993
|
+
inputPlaceholder: a,
|
|
992
994
|
inputValue: u.email,
|
|
993
995
|
inputChange: (C) => {
|
|
994
996
|
f("email", C.target.value);
|
|
@@ -997,9 +999,9 @@ const We = () => {
|
|
|
997
999
|
}
|
|
998
1000
|
)
|
|
999
1001
|
] }),
|
|
1000
|
-
/* @__PURE__ */
|
|
1001
|
-
/* @__PURE__ */
|
|
1002
|
-
/* @__PURE__ */
|
|
1002
|
+
/* @__PURE__ */ s.jsxs("div", { className: p.containerPassword || "flex justify-center flex-col gap-1 my-4 input-size mx-auto", children: [
|
|
1003
|
+
/* @__PURE__ */ s.jsx(Ze, { labelId: "password", label: "Password" }),
|
|
1004
|
+
/* @__PURE__ */ s.jsx(
|
|
1003
1005
|
Ye,
|
|
1004
1006
|
{
|
|
1005
1007
|
inputType: "password",
|
|
@@ -1012,101 +1014,91 @@ const We = () => {
|
|
|
1012
1014
|
}
|
|
1013
1015
|
)
|
|
1014
1016
|
] }),
|
|
1015
|
-
/* @__PURE__ */
|
|
1017
|
+
/* @__PURE__ */ s.jsx("div", { className: p.containerButton || "flex button-position items-center m-primary-button", children: /* @__PURE__ */ s.jsx("button", { className: p.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: i }) })
|
|
1016
1018
|
] });
|
|
1017
1019
|
}, Tt = ({ Logo: t }) => {
|
|
1018
|
-
const {
|
|
1019
|
-
return
|
|
1020
|
-
const
|
|
1021
|
-
localStorage.getItem("accessToken") &&
|
|
1022
|
-
}, []), /* @__PURE__ */
|
|
1023
|
-
/* @__PURE__ */
|
|
1024
|
-
/* @__PURE__ */
|
|
1020
|
+
const { styleCardForm: o, styleContainerLogo: n, styleLogo: a, overrideStyle: i } = ot(), { firstPrivatePath: u } = ee(), f = Ue();
|
|
1021
|
+
return I(() => {
|
|
1022
|
+
const m = localStorage.getItem("id");
|
|
1023
|
+
localStorage.getItem("accessToken") && m && f(`${u}${m}`);
|
|
1024
|
+
}, []), /* @__PURE__ */ s.jsx("section", { id: "login-page", children: /* @__PURE__ */ s.jsx("div", { className: i.container || "container mx-auto flex items-center justify-center h-screen", children: /* @__PURE__ */ s.jsxs("div", { className: i.cardForm || `bg-form card-style card-size flex flex-col sm:flex-row sm:items-center justify-center ${o}`, children: [
|
|
1025
|
+
/* @__PURE__ */ s.jsx("div", { className: i.containerLogo || `basis-1/2 flex items-center justify-center ${n}`, children: t && /* @__PURE__ */ s.jsx(t, { className: i.logo || `login-logo h-full sm:h-auto ${a}` }) }),
|
|
1026
|
+
/* @__PURE__ */ s.jsx(Rt, {})
|
|
1025
1027
|
] }) }) });
|
|
1026
|
-
}, _t = () => {
|
|
1027
|
-
const { isAuthenticated: t } = je(), { activeAlert: o } = ie(), { autoLogin: n } = ee();
|
|
1028
|
-
return z(() => {
|
|
1029
|
-
const s = localStorage.getItem("accessToken");
|
|
1030
|
-
!t && !s && !n && o("danger", "Non sei autorizzato");
|
|
1031
|
-
}, []), t === null ? null : t ? /* @__PURE__ */ a.jsx(Ce, {}) : /* @__PURE__ */ a.jsx(it, { to: "/", replace: !0 });
|
|
1032
1028
|
}, Nt = () => {
|
|
1033
|
-
const {
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
}
|
|
1041
|
-
n(g);
|
|
1042
|
-
const T = (await (await he(u, f, m)).get(
|
|
1043
|
-
`${s}${t}`,
|
|
1044
|
-
{ headers: {
|
|
1045
|
-
Authorization: g
|
|
1046
|
-
} }
|
|
1047
|
-
)).data;
|
|
1048
|
-
y(T);
|
|
1049
|
-
} catch (g) {
|
|
1050
|
-
console.error(g), o();
|
|
1051
|
-
} finally {
|
|
1052
|
-
c(!1);
|
|
1053
|
-
}
|
|
1054
|
-
}, L = async () => {
|
|
1029
|
+
const { isAuthenticated: t } = je(), { activeAlert: o } = ie(), { autoLogin: n } = ee();
|
|
1030
|
+
return I(() => {
|
|
1031
|
+
const a = localStorage.getItem("accessToken");
|
|
1032
|
+
!t && !a && !n && o("danger", "Non sei autorizzato");
|
|
1033
|
+
}, []), t === null ? null : t ? /* @__PURE__ */ s.jsx(ye, {}) : /* @__PURE__ */ s.jsx(He, { to: "/", replace: !0 });
|
|
1034
|
+
}, At = () => {
|
|
1035
|
+
const { id: t } = lt(), { logout: o, setCurrentToken: n } = je(), { usersEndpoint: a } = ee(), { setIsLoading: i } = he(), { setShowAlert: u, setTypeAlert: f, setMessageAlert: m, activeAlert: p } = ie(), [C, E] = j(null), [_, S] = j(!1), d = JSON.parse(localStorage.getItem("user")), x = async () => {
|
|
1055
1036
|
try {
|
|
1056
|
-
|
|
1057
|
-
const
|
|
1058
|
-
if (!
|
|
1059
|
-
o(),
|
|
1037
|
+
S(!0);
|
|
1038
|
+
const v = localStorage.getItem("accessToken");
|
|
1039
|
+
if (!v) {
|
|
1040
|
+
o(), p("danger", "Sessione Scaduta");
|
|
1060
1041
|
return;
|
|
1061
1042
|
}
|
|
1062
|
-
const
|
|
1063
|
-
`${
|
|
1043
|
+
const P = (await (await Ce(u, f, m)).get(
|
|
1044
|
+
`${a}`,
|
|
1064
1045
|
{ headers: {
|
|
1065
|
-
Authorization:
|
|
1046
|
+
Authorization: v
|
|
1066
1047
|
} }
|
|
1067
1048
|
)).data;
|
|
1068
|
-
P
|
|
1069
|
-
} catch (
|
|
1070
|
-
console.error(
|
|
1049
|
+
E(P);
|
|
1050
|
+
} catch (v) {
|
|
1051
|
+
console.error(v), i(!1);
|
|
1071
1052
|
} finally {
|
|
1072
|
-
|
|
1053
|
+
S(!1);
|
|
1073
1054
|
}
|
|
1074
|
-
},
|
|
1075
|
-
o(),
|
|
1055
|
+
}, h = () => {
|
|
1056
|
+
o(), p("info", "Hai effettuato il logout");
|
|
1076
1057
|
};
|
|
1077
|
-
return
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1058
|
+
return I(() => {
|
|
1059
|
+
const v = localStorage.getItem("accessToken");
|
|
1060
|
+
v && n(v);
|
|
1061
|
+
}, []), /* @__PURE__ */ s.jsx("section", { children: /* @__PURE__ */ s.jsxs("div", { className: "container mx-auto py-8", children: [
|
|
1062
|
+
/* @__PURE__ */ s.jsxs("div", { className: "flex items-center justify-center gap-8 h-20", children: [
|
|
1063
|
+
/* @__PURE__ */ s.jsxs("h1", { className: "text-4xl text-center text-slate-800", children: [
|
|
1082
1064
|
"Email: ",
|
|
1083
|
-
|
|
1065
|
+
d.email
|
|
1084
1066
|
] }),
|
|
1085
|
-
/* @__PURE__ */
|
|
1067
|
+
/* @__PURE__ */ s.jsx(
|
|
1086
1068
|
"button",
|
|
1087
1069
|
{
|
|
1088
|
-
onClick:
|
|
1070
|
+
onClick: h,
|
|
1089
1071
|
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]",
|
|
1090
1072
|
children: "Logout"
|
|
1091
1073
|
}
|
|
1092
1074
|
)
|
|
1093
1075
|
] }),
|
|
1094
|
-
/* @__PURE__ */
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1076
|
+
/* @__PURE__ */ s.jsxs("div", { className: "flex justify-center items-center my-12 gap-8", children: [
|
|
1077
|
+
/* @__PURE__ */ s.jsx(
|
|
1078
|
+
"button",
|
|
1079
|
+
{
|
|
1080
|
+
onClick: x,
|
|
1081
|
+
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)]",
|
|
1082
|
+
disabled: _,
|
|
1083
|
+
children: "Lista degli utenti"
|
|
1084
|
+
}
|
|
1085
|
+
),
|
|
1086
|
+
d.admin && /* @__PURE__ */ s.jsx(
|
|
1087
|
+
ct,
|
|
1088
|
+
{
|
|
1089
|
+
to: `/about/${t}`,
|
|
1090
|
+
className: "bg-green-500 hover:bg-green-700 text-white font-bold py-2 px-4 rounded-full disabled:bg-green-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)]",
|
|
1091
|
+
children: "About Page"
|
|
1092
|
+
}
|
|
1093
|
+
)
|
|
1094
|
+
] }),
|
|
1095
|
+
/* @__PURE__ */ s.jsx("div", { className: "flex justify-center items-center", children: C && /* @__PURE__ */ s.jsx("ul", { children: C.map((v) => /* @__PURE__ */ s.jsxs("li", { className: "text-xl my-4", children: [
|
|
1096
|
+
v.id,
|
|
1105
1097
|
" - ",
|
|
1106
|
-
|
|
1107
|
-
] }, `user-${
|
|
1098
|
+
v.email
|
|
1099
|
+
] }, `user-${v.id}`)) }) })
|
|
1108
1100
|
] }) });
|
|
1109
|
-
},
|
|
1101
|
+
}, Mt = (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: {
|
|
1110
1102
|
stopColor: "#ff0000",
|
|
1111
1103
|
stopOpacity: 1
|
|
1112
1104
|
}, offset: 0, id: "stop27" }), /* @__PURE__ */ r.createElement("stop", { style: {
|
|
@@ -1152,86 +1144,93 @@ const We = () => {
|
|
|
1152
1144
|
strokeWidth: 0,
|
|
1153
1145
|
strokeOpacity: 1,
|
|
1154
1146
|
paintOrder: "stroke markers fill"
|
|
1155
|
-
}, d: "", id: "path40", transform: "scale(0.26458333)" }))),
|
|
1156
|
-
const { publicRoutes: o, privateRoutes: n } =
|
|
1157
|
-
logoImg:
|
|
1147
|
+
}, d: "", id: "path40", transform: "scale(0.26458333)" }))), Ut = (t) => {
|
|
1148
|
+
const { publicRoutes: o, privateRoutes: n } = Ot(), { firstPrivatePath: a } = ee(), {
|
|
1149
|
+
logoImg: i = Mt,
|
|
1158
1150
|
pathImg: u = "./src/assets/MyWarehouse.svg",
|
|
1159
|
-
firstPrivateElement: f = /* @__PURE__ */
|
|
1151
|
+
firstPrivateElement: f = /* @__PURE__ */ s.jsx(At, {}),
|
|
1160
1152
|
globalLayout: m,
|
|
1161
|
-
isMain:
|
|
1153
|
+
isMain: p,
|
|
1162
1154
|
headerComponent: C,
|
|
1163
|
-
showHeaderOnLogin:
|
|
1164
|
-
headerExcludedRoutes:
|
|
1165
|
-
footerComponent:
|
|
1166
|
-
showFooterOnLogin:
|
|
1167
|
-
footerExcludedRoutes:
|
|
1168
|
-
privateProvider:
|
|
1169
|
-
customProvider:
|
|
1170
|
-
} = t,
|
|
1171
|
-
|
|
1155
|
+
showHeaderOnLogin: E,
|
|
1156
|
+
headerExcludedRoutes: _,
|
|
1157
|
+
footerComponent: S,
|
|
1158
|
+
showFooterOnLogin: d,
|
|
1159
|
+
footerExcludedRoutes: x,
|
|
1160
|
+
privateProvider: h,
|
|
1161
|
+
customProvider: v
|
|
1162
|
+
} = t, y = m || /* @__PURE__ */ s.jsx(
|
|
1163
|
+
_t,
|
|
1172
1164
|
{
|
|
1173
|
-
isMain:
|
|
1165
|
+
isMain: p,
|
|
1174
1166
|
headerComponent: C,
|
|
1175
|
-
showHeaderOnLogin:
|
|
1176
|
-
headerExcludedRoutes:
|
|
1177
|
-
footerComponent:
|
|
1178
|
-
showFooterOnLogin:
|
|
1179
|
-
footerExcludedRoutes:
|
|
1167
|
+
showHeaderOnLogin: E,
|
|
1168
|
+
headerExcludedRoutes: _,
|
|
1169
|
+
footerComponent: S,
|
|
1170
|
+
showFooterOnLogin: d,
|
|
1171
|
+
footerExcludedRoutes: x
|
|
1180
1172
|
}
|
|
1181
|
-
),
|
|
1182
|
-
const
|
|
1183
|
-
u && (
|
|
1173
|
+
), w = h ? D.cloneElement(h, {}, v) : /* @__PURE__ */ s.jsx(Nt, { children: v }), P = () => {
|
|
1174
|
+
const L = document.querySelector("link[rel='icon']");
|
|
1175
|
+
u && (L.href = u);
|
|
1184
1176
|
};
|
|
1185
|
-
return
|
|
1186
|
-
|
|
1187
|
-
}, []), /* @__PURE__ */
|
|
1188
|
-
/* @__PURE__ */
|
|
1189
|
-
/* @__PURE__ */
|
|
1190
|
-
o.map((
|
|
1177
|
+
return I(() => {
|
|
1178
|
+
P();
|
|
1179
|
+
}, []), /* @__PURE__ */ s.jsx(ut, { children: /* @__PURE__ */ s.jsxs(Q, { element: m === "none" ? null : y, children: [
|
|
1180
|
+
/* @__PURE__ */ s.jsxs(Q, { path: "/", children: [
|
|
1181
|
+
/* @__PURE__ */ s.jsx(Q, { index: !0, element: /* @__PURE__ */ s.jsx(Tt, { Logo: i }) }),
|
|
1182
|
+
o.map((L, N) => /* @__PURE__ */ s.jsx(Q, { path: L.path, element: L.element }, `public-${N}`))
|
|
1191
1183
|
] }),
|
|
1192
|
-
/* @__PURE__ */
|
|
1193
|
-
/* @__PURE__ */
|
|
1194
|
-
n.map((
|
|
1184
|
+
/* @__PURE__ */ s.jsxs(Q, { element: w, children: [
|
|
1185
|
+
/* @__PURE__ */ s.jsx(Q, { path: `${a ?? "/dashboard/"}:id`, element: f }),
|
|
1186
|
+
n.map((L, N) => /* @__PURE__ */ s.jsx(Q, { path: L.path, element: L.element }, `private-${N}`))
|
|
1195
1187
|
] })
|
|
1196
1188
|
] }) });
|
|
1197
|
-
},
|
|
1198
|
-
|
|
1199
|
-
|
|
1189
|
+
}, qt = ({ children: t }) => {
|
|
1190
|
+
var i;
|
|
1191
|
+
const o = qe(), { activeAlert: n } = ie(), a = JSON.parse(localStorage.getItem("user"));
|
|
1192
|
+
return I(() => {
|
|
1193
|
+
(!a || !a.admin) && n("warning", "Non puoi accedere a questa pagina");
|
|
1194
|
+
}, [a]), !a || !a.admin ? /* @__PURE__ */ s.jsx(He, { to: ((i = o.state) == null ? void 0 : i.from) || "/", replace: !0 }) : t;
|
|
1195
|
+
}, Ht = ({ spinner: t = !0, spinnerStyle: o, text: n, textStyle: a, children: i, containerStyle: u, overrideStyle: f = {} }) => /* @__PURE__ */ s.jsxs("div", { className: f.container || `w-full h-full relative flex items-center justify-center ${u}`, children: [
|
|
1196
|
+
t && /* @__PURE__ */ s.jsx(nt, { className: f.spinner || `text-[20rem] animate-spin text-black ${o}` }),
|
|
1197
|
+
i || /* @__PURE__ */ s.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 ${a}`, children: n || "Loading..." })
|
|
1200
1198
|
] });
|
|
1201
1199
|
export {
|
|
1202
1200
|
We as Alert,
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1201
|
+
Dt as AlertProvider,
|
|
1202
|
+
qt as AuthAdmin,
|
|
1203
|
+
Nt as AuthPage,
|
|
1204
|
+
Wt as AuthProvider,
|
|
1205
|
+
Xt as BrowserRouter,
|
|
1206
|
+
Ft as ConfigProvider,
|
|
1207
|
+
At as Dashboard,
|
|
1208
|
+
_t as DefaultLayout,
|
|
1209
|
+
gt as ErrorPage,
|
|
1211
1210
|
Ye as Input,
|
|
1212
1211
|
Ze as InputLabel,
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1212
|
+
Kt as Link,
|
|
1213
|
+
Pt as Loading,
|
|
1214
|
+
Ht as LoadingComponent,
|
|
1215
|
+
$t as LoadingProvider,
|
|
1217
1216
|
Tt as Login,
|
|
1218
1217
|
Rt as LoginForm,
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1218
|
+
Zt as LoginFormProvider,
|
|
1219
|
+
Qt as NavLink,
|
|
1220
|
+
e0 as Outlet,
|
|
1221
|
+
Ut as PackageRoutes,
|
|
1222
|
+
t0 as Route,
|
|
1223
|
+
Yt as RouteProvider,
|
|
1224
|
+
r0 as Routes,
|
|
1225
|
+
i0 as axios,
|
|
1226
|
+
Ce as fetchAxiosConfig,
|
|
1228
1227
|
ie as useAlert,
|
|
1229
1228
|
je as useAuth,
|
|
1230
1229
|
ee as useConfig,
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1230
|
+
he as useLoading,
|
|
1231
|
+
o0 as useLocation,
|
|
1232
|
+
ot as useLoginForm,
|
|
1233
|
+
n0 as useMatch,
|
|
1234
|
+
a0 as useNavigate,
|
|
1235
|
+
Ot as useRoutesInjection
|
|
1237
1236
|
};
|