@tracktor/shared-module 1.0.0-beta.7 → 1.0.0-beta.8
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/CHANGELOG.md +2 -2
- package/dist/components/Utils/DaysJSConfig.d.ts +3 -1
- package/dist/{en-gK0dFos9.js → en-Kq-Ai2eF.js} +1 -1
- package/dist/{fr-tYyGRO0d.js → fr-DDO6JByq.js} +1 -1
- package/dist/{main-n8Gmn2zo.js → main-WgJDBcLv.js} +125 -120
- package/dist/main.js +1 -1
- package/dist/main.umd.cjs +9 -9
- package/dist/relativeTime-SnDl5kJB.js +68 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
interface I18nConfigProps {
|
|
2
2
|
language?: "fr" | "en";
|
|
3
|
+
plugins?: ["relativeTime"];
|
|
3
4
|
}
|
|
4
5
|
/**
|
|
5
6
|
* Initialize dayjs
|
|
6
7
|
* @param language
|
|
8
|
+
* @param plugin
|
|
7
9
|
* @constructor
|
|
8
10
|
*/
|
|
9
|
-
declare const DaysJSConfig: ({ language }: I18nConfigProps) => null;
|
|
11
|
+
declare const DaysJSConfig: ({ language, plugins }: I18nConfigProps) => null;
|
|
10
12
|
export default DaysJSConfig;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import
|
|
1
|
+
import Ne, { useState as Cr, useRef as Tr, useLayoutEffect as oe, Suspense as Sr, useEffect as We, createContext as wr, useMemo as ue, useContext as Ve, useCallback as ie } from "react";
|
|
2
2
|
import $ from "axios";
|
|
3
|
-
import { useLocation as
|
|
3
|
+
import { useLocation as le, Navigate as Le, Outlet as Ue, createRoutesFromChildren as Or, matchRoutes as xr, useNavigationType as jr } from "react-router-dom";
|
|
4
4
|
import { useGoogleTagManager as Pr } from "@tracktor/react-google-tag-manager";
|
|
5
5
|
import I, { t as Ar } from "i18next";
|
|
6
6
|
import kr from "i18next-browser-languagedetector";
|
|
7
7
|
import { initReactI18next as Dr } from "react-i18next";
|
|
8
8
|
import * as ae from "@sentry/react";
|
|
9
|
-
import
|
|
10
|
-
import
|
|
9
|
+
import Me from "mapbox-gl";
|
|
10
|
+
import N from "dayjs";
|
|
11
11
|
import { QueryClient as $r, QueryClientProvider as Lr } from "@tanstack/react-query";
|
|
12
12
|
var Mr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
13
13
|
function Fr(t) {
|
|
14
14
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
15
15
|
}
|
|
16
|
-
var
|
|
16
|
+
var se = { exports: {} }, U = {};
|
|
17
17
|
/**
|
|
18
18
|
* @license React
|
|
19
19
|
* react-jsx-runtime.development.js
|
|
@@ -23,10 +23,10 @@ var ie = { exports: {} }, V = {};
|
|
|
23
23
|
* This source code is licensed under the MIT license found in the
|
|
24
24
|
* LICENSE file in the root directory of this source tree.
|
|
25
25
|
*/
|
|
26
|
-
var
|
|
26
|
+
var Fe;
|
|
27
27
|
function Yr() {
|
|
28
|
-
return
|
|
29
|
-
var t =
|
|
28
|
+
return Fe || (Fe = 1, process.env.NODE_ENV !== "production" && function() {
|
|
29
|
+
var t = Ne, n = Symbol.for("react.element"), i = Symbol.for("react.portal"), s = Symbol.for("react.fragment"), v = Symbol.for("react.strict_mode"), y = Symbol.for("react.profiler"), o = Symbol.for("react.provider"), c = Symbol.for("react.context"), l = Symbol.for("react.forward_ref"), g = Symbol.for("react.suspense"), h = Symbol.for("react.suspense_list"), C = Symbol.for("react.memo"), T = Symbol.for("react.lazy"), x = Symbol.for("react.offscreen"), j = Symbol.iterator, w = "@@iterator";
|
|
30
30
|
function R(e) {
|
|
31
31
|
if (e === null || typeof e != "object")
|
|
32
32
|
return null;
|
|
@@ -51,14 +51,14 @@ function Yr() {
|
|
|
51
51
|
m.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, m);
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
-
var qe = !1, Be = !1, Ge = !1, Je = !1, He = !1,
|
|
55
|
-
|
|
54
|
+
var qe = !1, Be = !1, Ge = !1, Je = !1, He = !1, fe;
|
|
55
|
+
fe = Symbol.for("react.module.reference");
|
|
56
56
|
function Xe(e) {
|
|
57
57
|
return !!(typeof e == "string" || typeof e == "function" || e === s || e === y || He || e === v || e === g || e === h || Je || e === x || qe || Be || Ge || typeof e == "object" && e !== null && (e.$$typeof === T || e.$$typeof === C || e.$$typeof === o || e.$$typeof === c || e.$$typeof === l || // This needs to include all possible module reference object
|
|
58
58
|
// types supported by any Flight configuration anywhere since
|
|
59
59
|
// we don't know which Flight build this will end up being used
|
|
60
60
|
// with.
|
|
61
|
-
e.$$typeof ===
|
|
61
|
+
e.$$typeof === fe || e.getModuleId !== void 0));
|
|
62
62
|
}
|
|
63
63
|
function Ke(e, r, a) {
|
|
64
64
|
var u = e.displayName;
|
|
@@ -67,7 +67,7 @@ function Yr() {
|
|
|
67
67
|
var p = r.displayName || r.name || "";
|
|
68
68
|
return p !== "" ? a + "(" + p + ")" : a;
|
|
69
69
|
}
|
|
70
|
-
function
|
|
70
|
+
function de(e) {
|
|
71
71
|
return e.displayName || "Context";
|
|
72
72
|
}
|
|
73
73
|
function P(e) {
|
|
@@ -95,10 +95,10 @@ function Yr() {
|
|
|
95
95
|
switch (e.$$typeof) {
|
|
96
96
|
case c:
|
|
97
97
|
var r = e;
|
|
98
|
-
return
|
|
98
|
+
return de(r) + ".Consumer";
|
|
99
99
|
case o:
|
|
100
100
|
var a = e;
|
|
101
|
-
return
|
|
101
|
+
return de(a._context) + ".Provider";
|
|
102
102
|
case l:
|
|
103
103
|
return Ke(e, e.render, "ForwardRef");
|
|
104
104
|
case C:
|
|
@@ -115,18 +115,18 @@ function Yr() {
|
|
|
115
115
|
}
|
|
116
116
|
return null;
|
|
117
117
|
}
|
|
118
|
-
var L = Object.assign,
|
|
119
|
-
function
|
|
118
|
+
var L = Object.assign, W = 0, ve, pe, me, ge, he, ye, be;
|
|
119
|
+
function Ee() {
|
|
120
120
|
}
|
|
121
|
-
|
|
121
|
+
Ee.__reactDisabledLog = !0;
|
|
122
122
|
function Ze() {
|
|
123
123
|
{
|
|
124
|
-
if (
|
|
125
|
-
|
|
124
|
+
if (W === 0) {
|
|
125
|
+
ve = console.log, pe = console.info, me = console.warn, ge = console.error, he = console.group, ye = console.groupCollapsed, be = console.groupEnd;
|
|
126
126
|
var e = {
|
|
127
127
|
configurable: !0,
|
|
128
128
|
enumerable: !0,
|
|
129
|
-
value:
|
|
129
|
+
value: Ee,
|
|
130
130
|
writable: !0
|
|
131
131
|
};
|
|
132
132
|
Object.defineProperties(console, {
|
|
@@ -139,12 +139,12 @@ function Yr() {
|
|
|
139
139
|
groupEnd: e
|
|
140
140
|
});
|
|
141
141
|
}
|
|
142
|
-
|
|
142
|
+
W++;
|
|
143
143
|
}
|
|
144
144
|
}
|
|
145
145
|
function Qe() {
|
|
146
146
|
{
|
|
147
|
-
if (
|
|
147
|
+
if (W--, W === 0) {
|
|
148
148
|
var e = {
|
|
149
149
|
configurable: !0,
|
|
150
150
|
enumerable: !0,
|
|
@@ -152,29 +152,29 @@ function Yr() {
|
|
|
152
152
|
};
|
|
153
153
|
Object.defineProperties(console, {
|
|
154
154
|
log: L({}, e, {
|
|
155
|
-
value:
|
|
155
|
+
value: ve
|
|
156
156
|
}),
|
|
157
157
|
info: L({}, e, {
|
|
158
158
|
value: pe
|
|
159
159
|
}),
|
|
160
160
|
warn: L({}, e, {
|
|
161
|
-
value:
|
|
161
|
+
value: me
|
|
162
162
|
}),
|
|
163
163
|
error: L({}, e, {
|
|
164
|
-
value:
|
|
164
|
+
value: ge
|
|
165
165
|
}),
|
|
166
166
|
group: L({}, e, {
|
|
167
|
-
value:
|
|
167
|
+
value: he
|
|
168
168
|
}),
|
|
169
169
|
groupCollapsed: L({}, e, {
|
|
170
|
-
value:
|
|
170
|
+
value: ye
|
|
171
171
|
}),
|
|
172
172
|
groupEnd: L({}, e, {
|
|
173
|
-
value:
|
|
173
|
+
value: be
|
|
174
174
|
})
|
|
175
175
|
});
|
|
176
176
|
}
|
|
177
|
-
|
|
177
|
+
W < 0 && _("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
178
178
|
}
|
|
179
179
|
}
|
|
180
180
|
var X = D.ReactCurrentDispatcher, K;
|
|
@@ -196,7 +196,7 @@ function Yr() {
|
|
|
196
196
|
var er = typeof WeakMap == "function" ? WeakMap : Map;
|
|
197
197
|
B = new er();
|
|
198
198
|
}
|
|
199
|
-
function
|
|
199
|
+
function Re(e, r) {
|
|
200
200
|
if (!e || Z)
|
|
201
201
|
return "";
|
|
202
202
|
{
|
|
@@ -264,11 +264,11 @@ function Yr() {
|
|
|
264
264
|
} finally {
|
|
265
265
|
Z = !1, X.current = m, Qe(), Error.prepareStackTrace = p;
|
|
266
266
|
}
|
|
267
|
-
var Y = e ? e.displayName || e.name : "",
|
|
268
|
-
return typeof e == "function" && B.set(e,
|
|
267
|
+
var Y = e ? e.displayName || e.name : "", $e = Y ? q(Y) : "";
|
|
268
|
+
return typeof e == "function" && B.set(e, $e), $e;
|
|
269
269
|
}
|
|
270
270
|
function rr(e, r, a) {
|
|
271
|
-
return
|
|
271
|
+
return Re(e, !1);
|
|
272
272
|
}
|
|
273
273
|
function tr(e) {
|
|
274
274
|
var r = e.prototype;
|
|
@@ -278,7 +278,7 @@ function Yr() {
|
|
|
278
278
|
if (e == null)
|
|
279
279
|
return "";
|
|
280
280
|
if (typeof e == "function")
|
|
281
|
-
return
|
|
281
|
+
return Re(e, tr(e));
|
|
282
282
|
if (typeof e == "string")
|
|
283
283
|
return q(e);
|
|
284
284
|
switch (e) {
|
|
@@ -303,13 +303,13 @@ function Yr() {
|
|
|
303
303
|
}
|
|
304
304
|
return "";
|
|
305
305
|
}
|
|
306
|
-
var J = Object.prototype.hasOwnProperty,
|
|
306
|
+
var J = Object.prototype.hasOwnProperty, _e = {}, Ce = D.ReactDebugCurrentFrame;
|
|
307
307
|
function H(e) {
|
|
308
308
|
if (e) {
|
|
309
309
|
var r = e._owner, a = G(e.type, e._source, r ? r.type : null);
|
|
310
|
-
|
|
310
|
+
Ce.setExtraStackFrame(a);
|
|
311
311
|
} else
|
|
312
|
-
|
|
312
|
+
Ce.setExtraStackFrame(null);
|
|
313
313
|
}
|
|
314
314
|
function nr(e, r, a, u, p) {
|
|
315
315
|
{
|
|
@@ -326,7 +326,7 @@ function Yr() {
|
|
|
326
326
|
} catch (b) {
|
|
327
327
|
f = b;
|
|
328
328
|
}
|
|
329
|
-
f && !(f instanceof Error) && (H(p), _("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", u || "React class", a, d, typeof f), H(null)), f instanceof Error && !(f.message in
|
|
329
|
+
f && !(f instanceof Error) && (H(p), _("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", u || "React class", a, d, typeof f), H(null)), f instanceof Error && !(f.message in _e) && (_e[f.message] = !0, H(p), _("Failed %s type: %s", a, f.message), H(null));
|
|
330
330
|
}
|
|
331
331
|
}
|
|
332
332
|
}
|
|
@@ -342,24 +342,24 @@ function Yr() {
|
|
|
342
342
|
}
|
|
343
343
|
function ir(e) {
|
|
344
344
|
try {
|
|
345
|
-
return
|
|
345
|
+
return Te(e), !1;
|
|
346
346
|
} catch {
|
|
347
347
|
return !0;
|
|
348
348
|
}
|
|
349
349
|
}
|
|
350
|
-
function
|
|
350
|
+
function Te(e) {
|
|
351
351
|
return "" + e;
|
|
352
352
|
}
|
|
353
|
-
function
|
|
353
|
+
function Se(e) {
|
|
354
354
|
if (ir(e))
|
|
355
|
-
return _("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", or(e)),
|
|
355
|
+
return _("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", or(e)), Te(e);
|
|
356
356
|
}
|
|
357
|
-
var
|
|
357
|
+
var V = D.ReactCurrentOwner, sr = {
|
|
358
358
|
key: !0,
|
|
359
359
|
ref: !0,
|
|
360
360
|
__self: !0,
|
|
361
361
|
__source: !0
|
|
362
|
-
},
|
|
362
|
+
}, we, Oe, ee;
|
|
363
363
|
ee = {};
|
|
364
364
|
function ur(e) {
|
|
365
365
|
if (J.call(e, "ref")) {
|
|
@@ -378,15 +378,15 @@ function Yr() {
|
|
|
378
378
|
return e.key !== void 0;
|
|
379
379
|
}
|
|
380
380
|
function cr(e, r) {
|
|
381
|
-
if (typeof e.ref == "string" &&
|
|
382
|
-
var a = P(
|
|
383
|
-
ee[a] || (_('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', P(
|
|
381
|
+
if (typeof e.ref == "string" && V.current && r && V.current.stateNode !== r) {
|
|
382
|
+
var a = P(V.current.type);
|
|
383
|
+
ee[a] || (_('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', P(V.current.type), e.ref), ee[a] = !0);
|
|
384
384
|
}
|
|
385
385
|
}
|
|
386
386
|
function fr(e, r) {
|
|
387
387
|
{
|
|
388
388
|
var a = function() {
|
|
389
|
-
|
|
389
|
+
we || (we = !0, _("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
|
|
390
390
|
};
|
|
391
391
|
a.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
392
392
|
get: a,
|
|
@@ -397,7 +397,7 @@ function Yr() {
|
|
|
397
397
|
function dr(e, r) {
|
|
398
398
|
{
|
|
399
399
|
var a = function() {
|
|
400
|
-
|
|
400
|
+
Oe || (Oe = !0, _("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
|
|
401
401
|
};
|
|
402
402
|
a.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
|
403
403
|
get: a,
|
|
@@ -405,7 +405,7 @@ function Yr() {
|
|
|
405
405
|
});
|
|
406
406
|
}
|
|
407
407
|
}
|
|
408
|
-
var
|
|
408
|
+
var vr = function(e, r, a, u, p, m, d) {
|
|
409
409
|
var f = {
|
|
410
410
|
// This tag allows us to uniquely identify this as a React Element
|
|
411
411
|
$$typeof: n,
|
|
@@ -434,10 +434,10 @@ function Yr() {
|
|
|
434
434
|
value: p
|
|
435
435
|
}), Object.freeze && (Object.freeze(f.props), Object.freeze(f)), f;
|
|
436
436
|
};
|
|
437
|
-
function
|
|
437
|
+
function pr(e, r, a, u, p) {
|
|
438
438
|
{
|
|
439
439
|
var m, d = {}, f = null, S = null;
|
|
440
|
-
a !== void 0 && (
|
|
440
|
+
a !== void 0 && (Se(a), f = "" + a), lr(r) && (Se(r.key), f = "" + r.key), ur(r) && (S = r.ref, cr(r, p));
|
|
441
441
|
for (m in r)
|
|
442
442
|
J.call(r, m) && !sr.hasOwnProperty(m) && (d[m] = r[m]);
|
|
443
443
|
if (e && e.defaultProps) {
|
|
@@ -449,23 +449,23 @@ function Yr() {
|
|
|
449
449
|
var E = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
450
450
|
f && fr(d, E), S && dr(d, E);
|
|
451
451
|
}
|
|
452
|
-
return
|
|
452
|
+
return vr(e, f, S, p, u, V.current, d);
|
|
453
453
|
}
|
|
454
454
|
}
|
|
455
|
-
var re = D.ReactCurrentOwner,
|
|
455
|
+
var re = D.ReactCurrentOwner, xe = D.ReactDebugCurrentFrame;
|
|
456
456
|
function F(e) {
|
|
457
457
|
if (e) {
|
|
458
458
|
var r = e._owner, a = G(e.type, e._source, r ? r.type : null);
|
|
459
|
-
|
|
459
|
+
xe.setExtraStackFrame(a);
|
|
460
460
|
} else
|
|
461
|
-
|
|
461
|
+
xe.setExtraStackFrame(null);
|
|
462
462
|
}
|
|
463
463
|
var te;
|
|
464
464
|
te = !1;
|
|
465
465
|
function ne(e) {
|
|
466
466
|
return typeof e == "object" && e !== null && e.$$typeof === n;
|
|
467
467
|
}
|
|
468
|
-
function
|
|
468
|
+
function je() {
|
|
469
469
|
{
|
|
470
470
|
if (re.current) {
|
|
471
471
|
var e = P(re.current.type);
|
|
@@ -488,10 +488,10 @@ Check your code at ` + r + ":" + a + ".";
|
|
|
488
488
|
return "";
|
|
489
489
|
}
|
|
490
490
|
}
|
|
491
|
-
var
|
|
491
|
+
var Pe = {};
|
|
492
492
|
function gr(e) {
|
|
493
493
|
{
|
|
494
|
-
var r =
|
|
494
|
+
var r = je();
|
|
495
495
|
if (!r) {
|
|
496
496
|
var a = typeof e == "string" ? e : e.displayName || e.name;
|
|
497
497
|
a && (r = `
|
|
@@ -501,27 +501,27 @@ Check the top-level render call using <` + a + ">.");
|
|
|
501
501
|
return r;
|
|
502
502
|
}
|
|
503
503
|
}
|
|
504
|
-
function
|
|
504
|
+
function Ae(e, r) {
|
|
505
505
|
{
|
|
506
506
|
if (!e._store || e._store.validated || e.key != null)
|
|
507
507
|
return;
|
|
508
508
|
e._store.validated = !0;
|
|
509
509
|
var a = gr(r);
|
|
510
|
-
if (
|
|
510
|
+
if (Pe[a])
|
|
511
511
|
return;
|
|
512
|
-
|
|
512
|
+
Pe[a] = !0;
|
|
513
513
|
var u = "";
|
|
514
514
|
e && e._owner && e._owner !== re.current && (u = " It was passed a child from " + P(e._owner.type) + "."), F(e), _('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', a, u), F(null);
|
|
515
515
|
}
|
|
516
516
|
}
|
|
517
|
-
function
|
|
517
|
+
function ke(e, r) {
|
|
518
518
|
{
|
|
519
519
|
if (typeof e != "object")
|
|
520
520
|
return;
|
|
521
521
|
if (Q(e))
|
|
522
522
|
for (var a = 0; a < e.length; a++) {
|
|
523
523
|
var u = e[a];
|
|
524
|
-
ne(u) &&
|
|
524
|
+
ne(u) && Ae(u, r);
|
|
525
525
|
}
|
|
526
526
|
else if (ne(e))
|
|
527
527
|
e._store && (e._store.validated = !0);
|
|
@@ -529,7 +529,7 @@ Check the top-level render call using <` + a + ">.");
|
|
|
529
529
|
var p = R(e);
|
|
530
530
|
if (typeof p == "function" && p !== e.entries)
|
|
531
531
|
for (var m = p.call(e), d; !(d = m.next()).done; )
|
|
532
|
-
ne(d.value) &&
|
|
532
|
+
ne(d.value) && Ae(d.value, r);
|
|
533
533
|
}
|
|
534
534
|
}
|
|
535
535
|
}
|
|
@@ -570,18 +570,18 @@ Check the top-level render call using <` + a + ">.");
|
|
|
570
570
|
e.ref !== null && (F(e), _("Invalid attribute `ref` supplied to `React.Fragment`."), F(null));
|
|
571
571
|
}
|
|
572
572
|
}
|
|
573
|
-
function
|
|
573
|
+
function De(e, r, a, u, p, m) {
|
|
574
574
|
{
|
|
575
575
|
var d = Xe(e);
|
|
576
576
|
if (!d) {
|
|
577
577
|
var f = "";
|
|
578
578
|
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (f += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
579
579
|
var S = mr(p);
|
|
580
|
-
S ? f += S : f +=
|
|
580
|
+
S ? f += S : f += je();
|
|
581
581
|
var b;
|
|
582
582
|
e === null ? b = "null" : Q(e) ? b = "array" : e !== void 0 && e.$$typeof === n ? (b = "<" + (P(e.type) || "Unknown") + " />", f = " Did you accidentally export a JSX literal instead of a component?") : b = typeof e, _("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", b, f);
|
|
583
583
|
}
|
|
584
|
-
var E =
|
|
584
|
+
var E = pr(e, r, a, p, m);
|
|
585
585
|
if (E == null)
|
|
586
586
|
return E;
|
|
587
587
|
if (d) {
|
|
@@ -590,27 +590,27 @@ Check the top-level render call using <` + a + ">.");
|
|
|
590
590
|
if (u)
|
|
591
591
|
if (Q(O)) {
|
|
592
592
|
for (var Y = 0; Y < O.length; Y++)
|
|
593
|
-
|
|
593
|
+
ke(O[Y], e);
|
|
594
594
|
Object.freeze && Object.freeze(O);
|
|
595
595
|
} else
|
|
596
596
|
_("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
597
597
|
else
|
|
598
|
-
|
|
598
|
+
ke(O, e);
|
|
599
599
|
}
|
|
600
600
|
return e === s ? yr(E) : hr(E), E;
|
|
601
601
|
}
|
|
602
602
|
}
|
|
603
603
|
function br(e, r, a) {
|
|
604
|
-
return
|
|
604
|
+
return De(e, r, a, !0);
|
|
605
605
|
}
|
|
606
606
|
function Er(e, r, a) {
|
|
607
|
-
return
|
|
607
|
+
return De(e, r, a, !1);
|
|
608
608
|
}
|
|
609
609
|
var Rr = Er, _r = br;
|
|
610
|
-
|
|
611
|
-
}()),
|
|
610
|
+
U.Fragment = s, U.jsx = Rr, U.jsxs = _r;
|
|
611
|
+
}()), U;
|
|
612
612
|
}
|
|
613
|
-
var
|
|
613
|
+
var z = {};
|
|
614
614
|
/**
|
|
615
615
|
* @license React
|
|
616
616
|
* react-jsx-runtime.production.min.js
|
|
@@ -620,12 +620,12 @@ var U = {};
|
|
|
620
620
|
* This source code is licensed under the MIT license found in the
|
|
621
621
|
* LICENSE file in the root directory of this source tree.
|
|
622
622
|
*/
|
|
623
|
-
var
|
|
623
|
+
var Ye;
|
|
624
624
|
function Ir() {
|
|
625
|
-
if (
|
|
626
|
-
return
|
|
627
|
-
|
|
628
|
-
var t =
|
|
625
|
+
if (Ye)
|
|
626
|
+
return z;
|
|
627
|
+
Ye = 1;
|
|
628
|
+
var t = Ne, n = Symbol.for("react.element"), i = Symbol.for("react.fragment"), s = Object.prototype.hasOwnProperty, v = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, y = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
629
629
|
function o(c, l, g) {
|
|
630
630
|
var h, C = {}, T = null, x = null;
|
|
631
631
|
g !== void 0 && (T = "" + g), l.key !== void 0 && (T = "" + l.key), l.ref !== void 0 && (x = l.ref);
|
|
@@ -636,10 +636,10 @@ function Ir() {
|
|
|
636
636
|
C[h] === void 0 && (C[h] = l[h]);
|
|
637
637
|
return { $$typeof: n, type: c, key: T, ref: x, props: C, _owner: v.current };
|
|
638
638
|
}
|
|
639
|
-
return
|
|
639
|
+
return z.Fragment = i, z.jsx = o, z.jsxs = o, z;
|
|
640
640
|
}
|
|
641
|
-
process.env.NODE_ENV === "production" ?
|
|
642
|
-
var k =
|
|
641
|
+
process.env.NODE_ENV === "production" ? se.exports = Ir() : se.exports = Yr();
|
|
642
|
+
var k = se.exports;
|
|
643
643
|
const ot = ({
|
|
644
644
|
Fallback: t,
|
|
645
645
|
loginPath: n = "/login",
|
|
@@ -648,8 +648,8 @@ const ot = ({
|
|
|
648
648
|
isLogged: v
|
|
649
649
|
}) => {
|
|
650
650
|
var C, T, x, j;
|
|
651
|
-
const [y, o] = Cr(null), c =
|
|
652
|
-
return
|
|
651
|
+
const [y, o] = Cr(null), c = le(), l = Tr(!1), g = typeof v == "function" ? v() : !!v, h = typeof g == "boolean" ? g : g == null ? void 0 : g.isLogged;
|
|
652
|
+
return oe(() => {
|
|
653
653
|
var w;
|
|
654
654
|
l.current || (l.current = !0, (w = $) == null || w.interceptors.response.use(
|
|
655
655
|
(R) => R,
|
|
@@ -658,23 +658,23 @@ const ot = ({
|
|
|
658
658
|
return typeof R == "object" && R && "response" in R && R.response && typeof R.response == "object" && "status" in R.response && R.response && typeof R.response == "object" && "status" in R.response && ((M = R == null ? void 0 : R.response) == null ? void 0 : M.status) === 401 && ($.defaults.headers.common.Authorization = null, localStorage.removeItem(i), o(s)), Promise.reject(R);
|
|
659
659
|
}
|
|
660
660
|
));
|
|
661
|
-
}, [i, s]), h && !y ? /* @__PURE__ */ k.jsx(Sr, { fallback: t, children: (T = (C = c.state) == null ? void 0 : C.from) != null && T.state && ((j = (x = c.state) == null ? void 0 : x.from) == null ? void 0 : j.pathname) === n ? /* @__PURE__ */ k.jsx(
|
|
661
|
+
}, [i, s]), h && !y ? /* @__PURE__ */ k.jsx(Sr, { fallback: t, children: (T = (C = c.state) == null ? void 0 : C.from) != null && T.state && ((j = (x = c.state) == null ? void 0 : x.from) == null ? void 0 : j.pathname) === n ? /* @__PURE__ */ k.jsx(Le, { to: c.state.from.state.from.pathname + c.state.from.state.from.search, replace: !0 }) : /* @__PURE__ */ k.jsx(Ue, {}) }) : /* @__PURE__ */ k.jsx(Le, { to: n, state: { from: c }, replace: !0 });
|
|
662
662
|
}, it = () => {
|
|
663
|
-
const { pathname: t } =
|
|
663
|
+
const { pathname: t } = le(), { sendEvent: n } = Pr();
|
|
664
664
|
return We(() => {
|
|
665
665
|
n({ event: "pageView", pathname: t });
|
|
666
666
|
}, [t, n]), /* @__PURE__ */ k.jsx(Ue, {});
|
|
667
|
-
},
|
|
667
|
+
}, ce = wr({
|
|
668
668
|
apiURL: void 0,
|
|
669
669
|
children: void 0
|
|
670
670
|
}), st = ({ children: t, apiURL: n }) => {
|
|
671
|
-
const i =
|
|
671
|
+
const i = ue(
|
|
672
672
|
() => ({
|
|
673
673
|
apiURL: n
|
|
674
674
|
}),
|
|
675
675
|
[n]
|
|
676
676
|
);
|
|
677
|
-
return /* @__PURE__ */ k.jsx(
|
|
677
|
+
return /* @__PURE__ */ k.jsx(ce.Provider, { value: i, children: t });
|
|
678
678
|
}, ut = ({
|
|
679
679
|
tokenTypeKey: t = "tokenType",
|
|
680
680
|
userLocalStorageKey: n = "user",
|
|
@@ -682,7 +682,7 @@ const ot = ({
|
|
|
682
682
|
postContentType: s = "application/json",
|
|
683
683
|
...v
|
|
684
684
|
}) => {
|
|
685
|
-
const { apiURL: y = v.baseURL } = Ve(
|
|
685
|
+
const { apiURL: y = v.baseURL } = Ve(ce);
|
|
686
686
|
if (!$.defaults)
|
|
687
687
|
return null;
|
|
688
688
|
const o = localStorage.getItem(n), c = o ? JSON.parse(o) : null, l = c != null && c[t] ? c[t] : null, g = c != null && c[i] ? c[i] : null, h = o ? `${l} ${g}` : null;
|
|
@@ -727,7 +727,7 @@ const ot = ({
|
|
|
727
727
|
createRoutesFromChildren: Or,
|
|
728
728
|
matchRoutes: xr,
|
|
729
729
|
useEffect: We,
|
|
730
|
-
useLocation:
|
|
730
|
+
useLocation: le,
|
|
731
731
|
useNavigationType: jr
|
|
732
732
|
}),
|
|
733
733
|
...n || []
|
|
@@ -737,13 +737,13 @@ const ot = ({
|
|
|
737
737
|
tracePropagationTargets: y,
|
|
738
738
|
tracesSampleRate: i || 1
|
|
739
739
|
}), null), ft = ({ IMaskMixin: t, ...n }) => {
|
|
740
|
-
const i =
|
|
740
|
+
const i = ue(
|
|
741
741
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
742
742
|
() => t(({ TextField: s, ...v }) => /* @__PURE__ */ k.jsx(s, { ...v })),
|
|
743
743
|
[t]
|
|
744
744
|
);
|
|
745
745
|
return /* @__PURE__ */ k.jsx(i, { ...n });
|
|
746
|
-
}, dt = ({ accessToken: t }) => (
|
|
746
|
+
}, dt = ({ accessToken: t }) => (Me && t && (Me.accessToken = t), null);
|
|
747
747
|
var ze = { exports: {} };
|
|
748
748
|
(function(t, n) {
|
|
749
749
|
(function(i, s) {
|
|
@@ -769,24 +769,28 @@ var ze = { exports: {} };
|
|
|
769
769
|
})(ze);
|
|
770
770
|
var Nr = ze.exports;
|
|
771
771
|
const Wr = /* @__PURE__ */ Fr(Nr);
|
|
772
|
-
|
|
773
|
-
const
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
772
|
+
N.extend(Wr);
|
|
773
|
+
const vt = ({ language: t, plugins: n }) => (oe(() => {
|
|
774
|
+
n != null && n.includes("relativeTime") && import("./relativeTime-SnDl5kJB.js").then((i) => i.r).then((i) => {
|
|
775
|
+
N.extend(i.default);
|
|
776
|
+
});
|
|
777
|
+
}, [n]), oe(() => {
|
|
778
|
+
var s;
|
|
779
|
+
const i = t || ((s = navigator.language) == null ? void 0 : s.slice(0, 2)) || "en";
|
|
780
|
+
if (i === "en") {
|
|
781
|
+
import("./en-Kq-Ai2eF.js").then((v) => v.e).then(() => {
|
|
782
|
+
N.locale(i);
|
|
779
783
|
});
|
|
780
784
|
return;
|
|
781
785
|
}
|
|
782
|
-
|
|
783
|
-
|
|
786
|
+
i === "fr" && import("./fr-DDO6JByq.js").then((v) => v.f).then(() => {
|
|
787
|
+
N.locale(i);
|
|
784
788
|
}).catch(() => {
|
|
785
|
-
import("./en-
|
|
786
|
-
|
|
789
|
+
import("./en-Kq-Ai2eF.js").then((v) => v.e).then(() => {
|
|
790
|
+
N.locale("en");
|
|
787
791
|
});
|
|
788
792
|
});
|
|
789
|
-
}, [t]), null),
|
|
793
|
+
}, [t]), null), pt = ({ children: t, defaultQueriesOptions: n, defaultMutationsOptions: i }) => {
|
|
790
794
|
const s = new $r({
|
|
791
795
|
defaultOptions: {
|
|
792
796
|
mutations: {
|
|
@@ -802,7 +806,7 @@ const pt = ({ language: t }) => (Ne(() => {
|
|
|
802
806
|
});
|
|
803
807
|
return /* @__PURE__ */ k.jsx(Lr, { client: s, children: t });
|
|
804
808
|
}, mt = (t) => {
|
|
805
|
-
const { unknownErrorTranslationKey: n = "error.unknownError" } = t || {}, i = Ar(n), s =
|
|
809
|
+
const { unknownErrorTranslationKey: n = "error.unknownError" } = t || {}, i = Ar(n), s = ie(
|
|
806
810
|
(y) => {
|
|
807
811
|
var c, l, g, h, C, T, x, j, w;
|
|
808
812
|
const { response: o } = y || {};
|
|
@@ -810,7 +814,7 @@ const pt = ({ language: t }) => (Ne(() => {
|
|
|
810
814
|
},
|
|
811
815
|
[i]
|
|
812
816
|
);
|
|
813
|
-
return { getErrorCode:
|
|
817
|
+
return { getErrorCode: ie((y) => {
|
|
814
818
|
var c, l, g;
|
|
815
819
|
const { response: o } = y || {};
|
|
816
820
|
return o != null && o.error_code ? String(o == null ? void 0 : o.error_code) : (c = o == null ? void 0 : o.data) != null && c.error_code ? String((l = o == null ? void 0 : o.data) == null ? void 0 : l.error_code) : o != null && o.error_code ? String(o == null ? void 0 : o.error_code) : (g = o == null ? void 0 : o.data) != null && g.error_code ? String(o.data.error_code) : "unknown_error_code";
|
|
@@ -823,12 +827,12 @@ const pt = ({ language: t }) => (Ne(() => {
|
|
|
823
827
|
isLoading: v,
|
|
824
828
|
enabled: y = !0
|
|
825
829
|
}) => {
|
|
826
|
-
const o =
|
|
830
|
+
const o = ie(
|
|
827
831
|
async (l) => {
|
|
828
832
|
i || !y || await n({ pageParam: (l == null ? void 0 : l.pageParam) || l.visibleRowsCount });
|
|
829
833
|
},
|
|
830
834
|
[y, n, i]
|
|
831
|
-
), c =
|
|
835
|
+
), c = ue(() => {
|
|
832
836
|
if (t)
|
|
833
837
|
return t.pages.reduce((l, g) => [...l, ...g], []);
|
|
834
838
|
}, [t]);
|
|
@@ -845,23 +849,23 @@ const pt = ({ language: t }) => (Ne(() => {
|
|
|
845
849
|
setAuthenticationToken: ({ tokenType: i, accessToken: s }) => {
|
|
846
850
|
$.defaults.headers.common.Authorization = `${i} ${s}`;
|
|
847
851
|
}
|
|
848
|
-
}), Vr = (t, n = "ll") =>
|
|
852
|
+
}), Vr = (t, n = "ll") => N(t).format(n), Ur = (t, n = "km") => {
|
|
849
853
|
const i = Number(t);
|
|
850
854
|
return Number.isNaN(i) ? `0 ${n}` : `${i.toFixed(2)} ${n}`;
|
|
851
855
|
}, zr = (t) => {
|
|
852
856
|
const n = t && typeof t == "object" && "pathname" in t && t.pathname ? t.pathname : t;
|
|
853
857
|
return typeof n == "string" ? n != null && n.startsWith("/") ? n != null && n.startsWith("/files") ? n : `/files${n}` : n != null && n.startsWith("files") ? `/${n}` : n != null && n.startsWith("files") ? `/${n}` : `/files/${n}` : n;
|
|
854
|
-
},
|
|
858
|
+
}, Ie = (t, n) => {
|
|
855
859
|
if (!t)
|
|
856
860
|
return "";
|
|
857
861
|
const i = zr(t), s = typeof t == "object" && "pathname" in t ? `${t.origin}${i}` : t;
|
|
858
862
|
return typeof n == "number" ? `${s.replace("/files", `/thumbs/${n}`)}` : s;
|
|
859
863
|
}, yt = () => {
|
|
860
|
-
const { apiURL: t } = Ve(
|
|
864
|
+
const { apiURL: t } = Ve(ce);
|
|
861
865
|
return {
|
|
862
866
|
dateAdapter: Vr,
|
|
863
867
|
distanceAdapter: Ur,
|
|
864
|
-
filePathAdapter: (i, s) =>
|
|
868
|
+
filePathAdapter: (i, s) => Ie(
|
|
865
869
|
t && typeof i == "string" ? {
|
|
866
870
|
origin: t,
|
|
867
871
|
pathname: i
|
|
@@ -919,11 +923,11 @@ const pt = ({ language: t }) => (Ne(() => {
|
|
|
919
923
|
};
|
|
920
924
|
export {
|
|
921
925
|
ut as A,
|
|
922
|
-
|
|
926
|
+
vt as D,
|
|
923
927
|
it as G,
|
|
924
928
|
lt as I,
|
|
925
929
|
ft as M,
|
|
926
|
-
|
|
930
|
+
pt as Q,
|
|
927
931
|
ot as R,
|
|
928
932
|
ct as S,
|
|
929
933
|
dt as a,
|
|
@@ -932,9 +936,10 @@ export {
|
|
|
932
936
|
gt as d,
|
|
933
937
|
ht as e,
|
|
934
938
|
yt as f,
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
+
Fr as g,
|
|
940
|
+
bt as h,
|
|
941
|
+
Vr as i,
|
|
942
|
+
Ur as j,
|
|
943
|
+
ce as k,
|
|
939
944
|
mt as u
|
|
940
945
|
};
|
package/dist/main.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as s, D as n, G as i, I as t,
|
|
1
|
+
import { A as s, D as n, G as i, I as t, k as r, b as o, a as d, M as f, Q as g, R as u, S as C, i as p, j as A, h as c, f as x, e as D, d as I, u as M } from "./main-WgJDBcLv.js";
|
|
2
2
|
export {
|
|
3
3
|
s as AxiosConfig,
|
|
4
4
|
n as DaysJSConfig,
|
package/dist/main.umd.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(p,R){typeof exports=="object"&&typeof module<"u"?R(exports,require("react"),require("axios"),require("react-router-dom"),require("@tracktor/react-google-tag-manager"),require("i18next"),require("i18next-browser-languagedetector"),require("react-i18next"),require("@sentry/react"),require("mapbox-gl"),require("dayjs"),require("@tanstack/react-query")):typeof define=="function"&&define.amd?define(["exports","react","axios","react-router-dom","@tracktor/react-google-tag-manager","i18next","i18next-browser-languagedetector","react-i18next","@sentry/react","mapbox-gl","dayjs","@tanstack/react-query"],R):(p=typeof globalThis<"u"?globalThis:p||self,R(p["@tracktor/shared-module"]={},p.React,p.axios,p.reactRouterDom,p.reactGoogleTagManager,p.i18n,p.LanguageDetector,p.reactI18next,p.Sentry,p.mapbox,p.dayjs,p.reactQuery))})(this,function(p,R,k,A,Ze,D,Qe,er,rr,ge,V,he){"use strict";function tr(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const o in t)if(o!=="default"){const u=Object.getOwnPropertyDescriptor(t,o);Object.defineProperty(n,o,u.get?u:{enumerable:!0,get:()=>t[o]})}}return n.default=t,Object.freeze(n)}function nr(t,n){for(var o=0;o<n.length;o++){const u=n[o];if(typeof u!="string"&&!Array.isArray(u)){for(const l in u)if(l!=="default"&&!(l in t)){const m=Object.getOwnPropertyDescriptor(u,l);m&&Object.defineProperty(t,l,m.get?m:{enumerable:!0,get:()=>u[l]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}const ie=tr(rr);var Q=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function _e(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var ue={exports:{}},G={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.development.js
|
|
4
4
|
*
|
|
@@ -6,17 +6,17 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var
|
|
10
|
-
`+
|
|
9
|
+
*/var ye;function ar(){return ye||(ye=1,process.env.NODE_ENV!=="production"&&function(){var t=R,n=Symbol.for("react.element"),o=Symbol.for("react.portal"),u=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),m=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),d=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),T=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),w=Symbol.for("react.offscreen"),P=Symbol.iterator,y="@@iterator";function N(e){if(e===null||typeof e!="object")return null;var r=P&&e[P]||e[y];return typeof r=="function"?r:null}var M=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function E(e){{for(var r=arguments.length,i=new Array(r>1?r-1:0),s=1;s<r;s++)i[s-1]=arguments[s];H("error",e,i)}}function H(e,r,i){{var s=M.ReactDebugCurrentFrame,_=s.getStackAddendum();_!==""&&(r+="%s",i=i.concat([_]));var b=i.map(function(g){return String(g)});b.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,b)}}var z=!1,L=!1,W=!1,q=!1,X=!1,we;we=Symbol.for("react.module.reference");function kr(e){return!!(typeof e=="string"||typeof e=="function"||e===u||e===m||X||e===l||e===f||e===h||q||e===w||z||L||W||typeof e=="object"&&e!==null&&(e.$$typeof===S||e.$$typeof===T||e.$$typeof===a||e.$$typeof===d||e.$$typeof===c||e.$$typeof===we||e.getModuleId!==void 0))}function Ar(e,r,i){var s=e.displayName;if(s)return s;var _=r.displayName||r.name||"";return _!==""?i+"("+_+")":i}function Pe(e){return e.displayName||"Context"}function F(e){if(e==null)return null;if(typeof e.tag=="number"&&E("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case u:return"Fragment";case o:return"Portal";case m:return"Profiler";case l:return"StrictMode";case f:return"Suspense";case h:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case d:var r=e;return Pe(r)+".Consumer";case a:var i=e;return Pe(i._context)+".Provider";case c:return Ar(e,e.render,"ForwardRef");case T:var s=e.displayName||null;return s!==null?s:F(e.type)||"Memo";case S:{var _=e,b=_._payload,g=_._init;try{return F(g(b))}catch{return null}}}return null}var U=Object.assign,K=0,Me,xe,ke,Ae,Le,De,Ye;function Fe(){}Fe.__reactDisabledLog=!0;function Lr(){{if(K===0){Me=console.log,xe=console.info,ke=console.warn,Ae=console.error,Le=console.group,De=console.groupCollapsed,Ye=console.groupEnd;var e={configurable:!0,enumerable:!0,value:Fe,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}K++}}function Dr(){{if(K--,K===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:U({},e,{value:Me}),info:U({},e,{value:xe}),warn:U({},e,{value:ke}),error:U({},e,{value:Ae}),group:U({},e,{value:Le}),groupCollapsed:U({},e,{value:De}),groupEnd:U({},e,{value:Ye})})}K<0&&E("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var se=M.ReactCurrentDispatcher,ce;function re(e,r,i){{if(ce===void 0)try{throw Error()}catch(_){var s=_.stack.trim().match(/\n( *(at )?)/);ce=s&&s[1]||""}return`
|
|
10
|
+
`+ce+e}}var le=!1,te;{var Yr=typeof WeakMap=="function"?WeakMap:Map;te=new Yr}function Ie(e,r){if(!e||le)return"";{var i=te.get(e);if(i!==void 0)return i}var s;le=!0;var _=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var b;b=se.current,se.current=null,Lr();try{if(r){var g=function(){throw Error()};if(Object.defineProperty(g.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(g,[])}catch(I){s=I}Reflect.construct(e,[],g)}else{try{g.call()}catch(I){s=I}e.call(g.prototype)}}else{try{throw Error()}catch(I){s=I}e()}}catch(I){if(I&&s&&typeof I.stack=="string"){for(var v=I.stack.split(`
|
|
11
11
|
`),O=s.stack.split(`
|
|
12
|
-
`),
|
|
13
|
-
`+
|
|
12
|
+
`),C=v.length-1,j=O.length-1;C>=1&&j>=0&&v[C]!==O[j];)j--;for(;C>=1&&j>=0;C--,j--)if(v[C]!==O[j]){if(C!==1||j!==1)do if(C--,j--,j<0||v[C]!==O[j]){var x=`
|
|
13
|
+
`+v[C].replace(" at new "," at ");return e.displayName&&x.includes("<anonymous>")&&(x=x.replace("<anonymous>",e.displayName)),typeof e=="function"&&te.set(e,x),x}while(C>=1&&j>=0);break}}}finally{le=!1,se.current=b,Dr(),Error.prepareStackTrace=_}var B=e?e.displayName||e.name:"",Ke=B?re(B):"";return typeof e=="function"&&te.set(e,Ke),Ke}function Fr(e,r,i){return Ie(e,!1)}function Ir(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function ne(e,r,i){if(e==null)return"";if(typeof e=="function")return Ie(e,Ir(e));if(typeof e=="string")return re(e);switch(e){case f:return re("Suspense");case h:return re("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case c:return Fr(e.render);case T:return ne(e.type,r,i);case S:{var s=e,_=s._payload,b=s._init;try{return ne(b(_),r,i)}catch{}}}return""}var ae=Object.prototype.hasOwnProperty,Ne={},We=M.ReactDebugCurrentFrame;function oe(e){if(e){var r=e._owner,i=ne(e.type,e._source,r?r.type:null);We.setExtraStackFrame(i)}else We.setExtraStackFrame(null)}function Nr(e,r,i,s,_){{var b=Function.call.bind(ae);for(var g in e)if(b(e,g)){var v=void 0;try{if(typeof e[g]!="function"){var O=Error((s||"React class")+": "+i+" type `"+g+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[g]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw O.name="Invariant Violation",O}v=e[g](r,g,s,i,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(C){v=C}v&&!(v instanceof Error)&&(oe(_),E("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",s||"React class",i,g,typeof v),oe(null)),v instanceof Error&&!(v.message in Ne)&&(Ne[v.message]=!0,oe(_),E("Failed %s type: %s",i,v.message),oe(null))}}}var Wr=Array.isArray;function fe(e){return Wr(e)}function Vr(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,i=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return i}}function zr(e){try{return Ve(e),!1}catch{return!0}}function Ve(e){return""+e}function ze(e){if(zr(e))return E("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Vr(e)),Ve(e)}var Z=M.ReactCurrentOwner,Ur={key:!0,ref:!0,__self:!0,__source:!0},Ue,$e,de;de={};function $r(e){if(ae.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function Br(e){if(ae.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function Gr(e,r){if(typeof e.ref=="string"&&Z.current&&r&&Z.current.stateNode!==r){var i=F(Z.current.type);de[i]||(E('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',F(Z.current.type),e.ref),de[i]=!0)}}function Jr(e,r){{var i=function(){Ue||(Ue=!0,E("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};i.isReactWarning=!0,Object.defineProperty(e,"key",{get:i,configurable:!0})}}function Hr(e,r){{var i=function(){$e||($e=!0,E("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};i.isReactWarning=!0,Object.defineProperty(e,"ref",{get:i,configurable:!0})}}var qr=function(e,r,i,s,_,b,g){var v={$$typeof:n,type:e,key:r,ref:i,props:g,_owner:b};return v._store={},Object.defineProperty(v._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(v,"_self",{configurable:!1,enumerable:!1,writable:!1,value:s}),Object.defineProperty(v,"_source",{configurable:!1,enumerable:!1,writable:!1,value:_}),Object.freeze&&(Object.freeze(v.props),Object.freeze(v)),v};function Xr(e,r,i,s,_){{var b,g={},v=null,O=null;i!==void 0&&(ze(i),v=""+i),Br(r)&&(ze(r.key),v=""+r.key),$r(r)&&(O=r.ref,Gr(r,_));for(b in r)ae.call(r,b)&&!Ur.hasOwnProperty(b)&&(g[b]=r[b]);if(e&&e.defaultProps){var C=e.defaultProps;for(b in C)g[b]===void 0&&(g[b]=C[b])}if(v||O){var j=typeof e=="function"?e.displayName||e.name||"Unknown":e;v&&Jr(g,j),O&&Hr(g,j)}return qr(e,v,O,_,s,Z.current,g)}}var ve=M.ReactCurrentOwner,Be=M.ReactDebugCurrentFrame;function $(e){if(e){var r=e._owner,i=ne(e.type,e._source,r?r.type:null);Be.setExtraStackFrame(i)}else Be.setExtraStackFrame(null)}var me;me=!1;function pe(e){return typeof e=="object"&&e!==null&&e.$$typeof===n}function Ge(){{if(ve.current){var e=F(ve.current.type);if(e)return`
|
|
14
14
|
|
|
15
|
-
Check the render method of \``+e+"`."}return""}}function
|
|
15
|
+
Check the render method of \``+e+"`."}return""}}function Kr(e){{if(e!==void 0){var r=e.fileName.replace(/^.*[\\\/]/,""),i=e.lineNumber;return`
|
|
16
16
|
|
|
17
|
-
Check your code at `+r+":"+
|
|
17
|
+
Check your code at `+r+":"+i+"."}return""}}var Je={};function Zr(e){{var r=Ge();if(!r){var i=typeof e=="string"?e:e.displayName||e.name;i&&(r=`
|
|
18
18
|
|
|
19
|
-
Check the top-level render call using <`+
|
|
19
|
+
Check the top-level render call using <`+i+">.")}return r}}function He(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var i=Zr(r);if(Je[i])return;Je[i]=!0;var s="";e&&e._owner&&e._owner!==ve.current&&(s=" It was passed a child from "+F(e._owner.type)+"."),$(e),E('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',i,s),$(null)}}function qe(e,r){{if(typeof e!="object")return;if(fe(e))for(var i=0;i<e.length;i++){var s=e[i];pe(s)&&He(s,r)}else if(pe(e))e._store&&(e._store.validated=!0);else if(e){var _=N(e);if(typeof _=="function"&&_!==e.entries)for(var b=_.call(e),g;!(g=b.next()).done;)pe(g.value)&&He(g.value,r)}}}function Qr(e){{var r=e.type;if(r==null||typeof r=="string")return;var i;if(typeof r=="function")i=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===c||r.$$typeof===T))i=r.propTypes;else return;if(i){var s=F(r);Nr(i,e.props,"prop",s,e)}else if(r.PropTypes!==void 0&&!me){me=!0;var _=F(r);E("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",_||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&E("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function et(e){{for(var r=Object.keys(e.props),i=0;i<r.length;i++){var s=r[i];if(s!=="children"&&s!=="key"){$(e),E("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",s),$(null);break}}e.ref!==null&&($(e),E("Invalid attribute `ref` supplied to `React.Fragment`."),$(null))}}function Xe(e,r,i,s,_,b){{var g=kr(e);if(!g){var v="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(v+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var O=Kr(_);O?v+=O:v+=Ge();var C;e===null?C="null":fe(e)?C="array":e!==void 0&&e.$$typeof===n?(C="<"+(F(e.type)||"Unknown")+" />",v=" Did you accidentally export a JSX literal instead of a component?"):C=typeof e,E("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",C,v)}var j=Xr(e,r,i,_,b);if(j==null)return j;if(g){var x=r.children;if(x!==void 0)if(s)if(fe(x)){for(var B=0;B<x.length;B++)qe(x[B],e);Object.freeze&&Object.freeze(x)}else E("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else qe(x,e)}return e===u?et(j):Qr(j),j}}function rt(e,r,i){return Xe(e,r,i,!0)}function tt(e,r,i){return Xe(e,r,i,!1)}var nt=tt,at=rt;G.Fragment=u,G.jsx=nt,G.jsxs=at}()),G}var J={};/**
|
|
20
20
|
* @license React
|
|
21
21
|
* react-jsx-runtime.production.min.js
|
|
22
22
|
*
|
|
@@ -24,4 +24,4 @@ Check the top-level render call using <`+o+">.")}return r}}function We(e,r){{if(
|
|
|
24
24
|
*
|
|
25
25
|
* This source code is licensed under the MIT license found in the
|
|
26
26
|
* LICENSE file in the root directory of this source tree.
|
|
27
|
-
*/var pe;function Ke(){if(pe)return U;pe=1;var t=E,n=Symbol.for("react.element"),i=Symbol.for("react.fragment"),u=Object.prototype.hasOwnProperty,p=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,y={key:!0,ref:!0,__self:!0,__source:!0};function a(l,c,_){var b,S={},j=null,P=null;_!==void 0&&(j=""+_),c.key!==void 0&&(j=""+c.key),c.ref!==void 0&&(P=c.ref);for(b in c)u.call(c,b)&&!y.hasOwnProperty(b)&&(S[b]=c[b]);if(l&&l.defaultProps)for(b in c=l.defaultProps,c)S[b]===void 0&&(S[b]=c[b]);return{$$typeof:n,type:l,key:j,ref:P,props:S,_owner:p.current}}return U.Fragment=i,U.jsx=a,U.jsxs=a,U}process.env.NODE_ENV==="production"?re.exports=Ke():re.exports=Xe();var L=re.exports;const Ze=({Fallback:t,loginPath:n="/login",localStorageKey:i="user",redirect401Path:u="/login",isLogged:p})=>{var S,j,P,x;const[y,a]=E.useState(null),l=k.useLocation(),c=E.useRef(!1),_=typeof p=="function"?p():!!p,b=typeof _=="boolean"?_:_==null?void 0:_.isLogged;return E.useLayoutEffect(()=>{c.current||(c.current=!0,M==null||M.interceptors.response.use(h=>h,async h=>{var C;return typeof h=="object"&&h&&"response"in h&&h.response&&typeof h.response=="object"&&"status"in h.response&&h.response&&typeof h.response=="object"&&"status"in h.response&&((C=h==null?void 0:h.response)==null?void 0:C.status)===401&&(M.defaults.headers.common.Authorization=null,localStorage.removeItem(i),a(u)),Promise.reject(h)}))},[i,u]),b&&!y?L.jsx(E.Suspense,{fallback:t,children:(j=(S=l.state)==null?void 0:S.from)!=null&&j.state&&((x=(P=l.state)==null?void 0:P.from)==null?void 0:x.pathname)===n?L.jsx(k.Navigate,{to:l.state.from.state.from.pathname+l.state.from.state.from.search,replace:!0}):L.jsx(k.Outlet,{})}):L.jsx(k.Navigate,{to:n,state:{from:l},replace:!0})},Qe=()=>{const{pathname:t}=k.useLocation(),{sendEvent:n}=$e.useGoogleTagManager();return E.useEffect(()=>{n({event:"pageView",pathname:t})},[t,n]),L.jsx(k.Outlet,{})},G=E.createContext({apiURL:void 0,children:void 0}),er=({children:t,apiURL:n})=>{const i=E.useMemo(()=>({apiURL:n}),[n]);return L.jsx(G.Provider,{value:i,children:t})},rr=({tokenTypeKey:t="tokenType",userLocalStorageKey:n="user",tokenKey:i="accessToken",postContentType:u="application/json",...p})=>{const{apiURL:y=p.baseURL}=E.useContext(G);if(!M.defaults)return null;const a=localStorage.getItem(n),l=a?JSON.parse(a):null,c=l!=null&&l[t]?l[t]:null,_=l!=null&&l[i]?l[i]:null,b=a?`${c} ${_}`:null;return M.defaults.baseURL=y,M.defaults.headers.post["Content-Type"]=u,b&&(M.defaults.headers.common.Authorization=b),null},tr=({debug:t,resources:n})=>(A!=null&&A.isInitialized||(A.use(Be).use(Ge.initReactI18next).init({debug:t,fallbackLng:"en",interpolation:{escapeValue:!1},load:"languageOnly",react:{bindI18n:!1,useSuspense:!0},resources:n,returnNull:!1}).then(()=>{document.documentElement.lang!==A.resolvedLanguage&&A.resolvedLanguage&&document.documentElement.setAttribute("lang",A.resolvedLanguage)}),A.on("languageChanged",i=>{document.documentElement.setAttribute("lang",i)})),null),nr=({dsn:t,integrations:n,tracesSampleRate:i,replaysSessionSampleRate:u,replaysOnErrorSampleRate:p,tracePropagationTargets:y,ignoreErrors:a,debug:l,environment:c})=>(Q.isInitialized()||(l||process.env.NODE_ENV==="prod"||process.env.NODE_ENV==="production")&&Q.init({debug:l,dsn:t,environment:c||"production",ignoreErrors:[...a||[],/dynamically imported module/],integrations:[Q.reactRouterV6BrowserTracingIntegration({createRoutesFromChildren:k.createRoutesFromChildren,matchRoutes:k.matchRoutes,useEffect:E.useEffect,useLocation:k.useLocation,useNavigationType:k.useNavigationType}),...n||[]],replaysOnErrorSampleRate:p||1,replaysSessionSampleRate:u||.1,tracePropagationTargets:y,tracesSampleRate:i||1}),null),ar=({IMaskMixin:t,...n})=>{const i=E.useMemo(()=>t(({TextField:u,...p})=>L.jsx(u,{...p})),[t]);return L.jsx(i,{...n})},or=({accessToken:t})=>(fe&&t&&(fe.accessToken=t),null);var me={exports:{}};(function(t,n){(function(i,u){t.exports=u()})(ee,function(){var i={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(u,p,y){var a=p.prototype,l=a.format;y.en.formats=i,a.format=function(c){c===void 0&&(c="YYYY-MM-DDTHH:mm:ssZ");var _=this.$locale().formats,b=function(S,j){return S.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(P,x,h){var J=h&&h.toUpperCase();return x||j[h]||i[h]||j[J].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(F,C,te){return C||te.slice(1)})})}(c,_===void 0?{}:_);return l.call(this,b)}}})})(me);var ir=me.exports;const ur=He(ir);N.extend(ur);const sr=({language:t})=>(E.useLayoutEffect(()=>{var i;const n=t||((i=navigator.language)==null?void 0:i.slice(0,2))||"en";if(n==="en"){Promise.resolve().then(()=>ye).then(()=>{N.locale(n)});return}n==="fr"&&Promise.resolve().then(()=>Rr).then(()=>{N.locale(n)}).catch(()=>{Promise.resolve().then(()=>ye).then(()=>{N.locale("en")})})},[t]),null),cr=({children:t,defaultQueriesOptions:n,defaultMutationsOptions:i})=>{const u=new de.QueryClient({defaultOptions:{mutations:{...i},queries:{getNextPageParam:(p,y,a)=>p.length+(a||0),refetchOnWindowFocus:!1,retry:3,...n}}});return L.jsx(de.QueryClientProvider,{client:u,children:t})},lr=t=>{const{unknownErrorTranslationKey:n="error.unknownError"}=t||{},i=A.t(n),u=E.useCallback(y=>{var l,c,_,b,S,j,P,x,h;const{response:a}=y||{};return a!=null&&a.reason?String(a.reason):(l=a==null?void 0:a.data)!=null&&l.reason?String(a.data.reason):(c=a==null?void 0:a.data)!=null&&c.message?String(a.data.message):(b=(_=a==null?void 0:a.data)==null?void 0:_.detail)!=null&&b.length&&Array.isArray((S=a==null?void 0:a.data)==null?void 0:S.detail)&&((P=(j=a==null?void 0:a.data)==null?void 0:j.detail[0])!=null&&P.msg)&&typeof((h=(x=a==null?void 0:a.data)==null?void 0:x.detail[0])==null?void 0:h.msg)=="string"?String(a.data.detail[0].msg):i},[i]);return{getErrorCode:E.useCallback(y=>{var l,c,_;const{response:a}=y||{};return a!=null&&a.error_code?String(a==null?void 0:a.error_code):(l=a==null?void 0:a.data)!=null&&l.error_code?String((c=a==null?void 0:a.data)==null?void 0:c.error_code):a!=null&&a.error_code?String(a==null?void 0:a.error_code):(_=a==null?void 0:a.data)!=null&&_.error_code?String(a.data.error_code):"unknown_error_code"},[]),printError:u}},fr=({data:t,fetchNextPage:n,isFetchingNextPage:i,isInitialLoading:u,isLoading:p,enabled:y=!0})=>{const a=E.useCallback(async c=>{i||!y||await n({pageParam:(c==null?void 0:c.pageParam)||c.visibleRowsCount})},[y,n,i]),l=E.useMemo(()=>{if(t)return t.pages.reduce((c,_)=>[...c,..._],[])},[t]);return{fetchNextPageOnRowsScrollEnd:a,isLoading:i||p,loadingVariant:u?"skeleton":"linear",rows:l}},dr=()=>({clearAuthenticationToken:()=>{M.defaults.headers.common.Authorization=null},setAuthenticationToken:({tokenType:i,accessToken:u})=>{M.defaults.headers.common.Authorization=`${i} ${u}`}}),ge=(t,n="ll")=>N(t).format(n),_e=(t,n="km")=>{const i=Number(t);return Number.isNaN(i)?`0 ${n}`:`${i.toFixed(2)} ${n}`},vr=t=>{const n=t&&typeof t=="object"&&"pathname"in t&&t.pathname?t.pathname:t;return typeof n=="string"?n!=null&&n.startsWith("/")?n!=null&&n.startsWith("/files")?n:`/files${n}`:n!=null&&n.startsWith("files")?`/${n}`:n!=null&&n.startsWith("files")?`/${n}`:`/files/${n}`:n},he=(t,n)=>{if(!t)return"";const i=vr(t),u=typeof t=="object"&&"pathname"in t?`${t.origin}${i}`:t;return typeof n=="number"?`${u.replace("/files",`/thumbs/${n}`)}`:u},pr=()=>{const{apiURL:t}=E.useContext(G);return{dateAdapter:ge,distanceAdapter:_e,filePathAdapter:(i,u)=>he(t&&typeof i=="string"?{origin:t,pathname:i}:i,u)}},mr=t=>t.charAt(0).toUpperCase()+t.slice(1).toLowerCase(),gr=t=>{const u=t.split("/").filter(p=>p.length>0).map(p=>p.replace(/\${([^}]*)}/g,"$1").split(/[_-]/).map(c=>c.charAt(0).toUpperCase()+c.slice(1)).join("")).join("");return u.charAt(0).toLowerCase()+u.slice(1)},_r=(t,n,i)=>{const u=gr(n),p=mr(i);return`${u}${p}`},hr=t=>{if(t)return(t==null?void 0:t.reduce((n,i)=>(n[i]={query:{useInfinite:!0,useInfiniteQueryParam:"offset",useQuery:!0}},n),{}))||{}},yr=t=>{const{input:n="./openapi.json",operationsToGenerateInfiniteQueryHook:i=void 0}=t||{};return{api:{hooks:{afterAllFilesWrite:"prettier src/api/ --write"},input:n,output:{client:"react-query",mode:"tags-split",override:{header:u=>["Generated by orval 🍺",...u.title?[u.title]:[],...u.description?[u.description]:[]],mutator:{name:"axiosCustomInstance",path:`${__dirname}/config/orval/mutator/axiosCustomInstance.ts`},operationName:_r,...(i==null?void 0:i.length)&&{operations:hr(i)},query:{useQuery:!0}},schemas:"src/api/model",target:"src/api/services/api.ts"}}}};var br={exports:{}};(function(t,n){(function(i,u){t.exports=u()})(ee,function(){return{name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(i){var u=["th","st","nd","rd"],p=i%100;return"["+i+(u[(p-20)%10]||u[p]||u[0])+"]"}}})})(br);const ye=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var Er={exports:{}};(function(t,n){(function(i,u){t.exports=u(N)})(ee,function(i){function u(a){return a&&typeof a=="object"&&"default"in a?a:{default:a}}var p=u(i),y={name:"fr",weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},ordinal:function(a){return""+a+(a===1?"er":"")}};return p.default.locale(y,null,!0),y})})(Er);const Rr=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));d.AxiosConfig=rr,d.DaysJSConfig=sr,d.GTMSendPageView=Qe,d.I18nConfig=tr,d.InjectDependenciesContext=G,d.InjectDependenciesProvider=er,d.MapBoxConfig=or,d.MaskTextField=ar,d.QueryClientConfigProvider=cr,d.RequireAuth=Ze,d.SentryConfig=nr,d.dateAdapter=ge,d.distanceAdapter=_e,d.getOrvalConfig=yr,d.useAdapter=pr,d.useAuth=dr,d.useInfiniteDataGrid=fr,d.useResponseError=lr,Object.defineProperty(d,Symbol.toStringTag,{value:"Module"})});
|
|
27
|
+
*/var be;function or(){if(be)return J;be=1;var t=R,n=Symbol.for("react.element"),o=Symbol.for("react.fragment"),u=Object.prototype.hasOwnProperty,l=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,m={key:!0,ref:!0,__self:!0,__source:!0};function a(d,c,f){var h,T={},S=null,w=null;f!==void 0&&(S=""+f),c.key!==void 0&&(S=""+c.key),c.ref!==void 0&&(w=c.ref);for(h in c)u.call(c,h)&&!m.hasOwnProperty(h)&&(T[h]=c[h]);if(d&&d.defaultProps)for(h in c=d.defaultProps,c)T[h]===void 0&&(T[h]=c[h]);return{$$typeof:n,type:d,key:S,ref:w,props:T,_owner:l.current}}return J.Fragment=o,J.jsx=a,J.jsxs=a,J}process.env.NODE_ENV==="production"?ue.exports=or():ue.exports=ar();var Y=ue.exports;const ir=({Fallback:t,loginPath:n="/login",localStorageKey:o="user",redirect401Path:u="/login",isLogged:l})=>{var T,S,w,P;const[m,a]=R.useState(null),d=A.useLocation(),c=R.useRef(!1),f=typeof l=="function"?l():!!l,h=typeof f=="boolean"?f:f==null?void 0:f.isLogged;return R.useLayoutEffect(()=>{c.current||(c.current=!0,k==null||k.interceptors.response.use(y=>y,async y=>{var E;return typeof y=="object"&&y&&"response"in y&&y.response&&typeof y.response=="object"&&"status"in y.response&&y.response&&typeof y.response=="object"&&"status"in y.response&&((E=y==null?void 0:y.response)==null?void 0:E.status)===401&&(k.defaults.headers.common.Authorization=null,localStorage.removeItem(o),a(u)),Promise.reject(y)}))},[o,u]),h&&!m?Y.jsx(R.Suspense,{fallback:t,children:(S=(T=d.state)==null?void 0:T.from)!=null&&S.state&&((P=(w=d.state)==null?void 0:w.from)==null?void 0:P.pathname)===n?Y.jsx(A.Navigate,{to:d.state.from.state.from.pathname+d.state.from.state.from.search,replace:!0}):Y.jsx(A.Outlet,{})}):Y.jsx(A.Navigate,{to:n,state:{from:d},replace:!0})},ur=()=>{const{pathname:t}=A.useLocation(),{sendEvent:n}=Ze.useGoogleTagManager();return R.useEffect(()=>{n({event:"pageView",pathname:t})},[t,n]),Y.jsx(A.Outlet,{})},ee=R.createContext({apiURL:void 0,children:void 0}),sr=({children:t,apiURL:n})=>{const o=R.useMemo(()=>({apiURL:n}),[n]);return Y.jsx(ee.Provider,{value:o,children:t})},cr=({tokenTypeKey:t="tokenType",userLocalStorageKey:n="user",tokenKey:o="accessToken",postContentType:u="application/json",...l})=>{const{apiURL:m=l.baseURL}=R.useContext(ee);if(!k.defaults)return null;const a=localStorage.getItem(n),d=a?JSON.parse(a):null,c=d!=null&&d[t]?d[t]:null,f=d!=null&&d[o]?d[o]:null,h=a?`${c} ${f}`:null;return k.defaults.baseURL=m,k.defaults.headers.post["Content-Type"]=u,h&&(k.defaults.headers.common.Authorization=h),null},lr=({debug:t,resources:n})=>(D!=null&&D.isInitialized||(D.use(Qe).use(er.initReactI18next).init({debug:t,fallbackLng:"en",interpolation:{escapeValue:!1},load:"languageOnly",react:{bindI18n:!1,useSuspense:!0},resources:n,returnNull:!1}).then(()=>{document.documentElement.lang!==D.resolvedLanguage&&D.resolvedLanguage&&document.documentElement.setAttribute("lang",D.resolvedLanguage)}),D.on("languageChanged",o=>{document.documentElement.setAttribute("lang",o)})),null),fr=({dsn:t,integrations:n,tracesSampleRate:o,replaysSessionSampleRate:u,replaysOnErrorSampleRate:l,tracePropagationTargets:m,ignoreErrors:a,debug:d,environment:c})=>(ie.isInitialized()||(d||process.env.NODE_ENV==="prod"||process.env.NODE_ENV==="production")&&ie.init({debug:d,dsn:t,environment:c||"production",ignoreErrors:[...a||[],/dynamically imported module/],integrations:[ie.reactRouterV6BrowserTracingIntegration({createRoutesFromChildren:A.createRoutesFromChildren,matchRoutes:A.matchRoutes,useEffect:R.useEffect,useLocation:A.useLocation,useNavigationType:A.useNavigationType}),...n||[]],replaysOnErrorSampleRate:l||1,replaysSessionSampleRate:u||.1,tracePropagationTargets:m,tracesSampleRate:o||1}),null),dr=({IMaskMixin:t,...n})=>{const o=R.useMemo(()=>t(({TextField:u,...l})=>Y.jsx(u,{...l})),[t]);return Y.jsx(o,{...n})},vr=({accessToken:t})=>(ge&&t&&(ge.accessToken=t),null);var Ee={exports:{}};(function(t,n){(function(o,u){t.exports=u()})(Q,function(){var o={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(u,l,m){var a=l.prototype,d=a.format;m.en.formats=o,a.format=function(c){c===void 0&&(c="YYYY-MM-DDTHH:mm:ssZ");var f=this.$locale().formats,h=function(T,S){return T.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(w,P,y){var N=y&&y.toUpperCase();return P||S[y]||o[y]||S[N].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(M,E,H){return E||H.slice(1)})})}(c,f===void 0?{}:f);return d.call(this,h)}}})})(Ee);var mr=Ee.exports;const pr=_e(mr);V.extend(pr);const gr=({language:t,plugins:n})=>(R.useLayoutEffect(()=>{n!=null&&n.includes("relativeTime")&&Promise.resolve().then(()=>wr).then(o=>{V.extend(o.default)})},[n]),R.useLayoutEffect(()=>{var u;const o=t||((u=navigator.language)==null?void 0:u.slice(0,2))||"en";if(o==="en"){Promise.resolve().then(()=>Oe).then(()=>{V.locale(o)});return}o==="fr"&&Promise.resolve().then(()=>xr).then(()=>{V.locale(o)}).catch(()=>{Promise.resolve().then(()=>Oe).then(()=>{V.locale("en")})})},[t]),null),hr=({children:t,defaultQueriesOptions:n,defaultMutationsOptions:o})=>{const u=new he.QueryClient({defaultOptions:{mutations:{...o},queries:{getNextPageParam:(l,m,a)=>l.length+(a||0),refetchOnWindowFocus:!1,retry:3,...n}}});return Y.jsx(he.QueryClientProvider,{client:u,children:t})},_r=t=>{const{unknownErrorTranslationKey:n="error.unknownError"}=t||{},o=D.t(n),u=R.useCallback(m=>{var d,c,f,h,T,S,w,P,y;const{response:a}=m||{};return a!=null&&a.reason?String(a.reason):(d=a==null?void 0:a.data)!=null&&d.reason?String(a.data.reason):(c=a==null?void 0:a.data)!=null&&c.message?String(a.data.message):(h=(f=a==null?void 0:a.data)==null?void 0:f.detail)!=null&&h.length&&Array.isArray((T=a==null?void 0:a.data)==null?void 0:T.detail)&&((w=(S=a==null?void 0:a.data)==null?void 0:S.detail[0])!=null&&w.msg)&&typeof((y=(P=a==null?void 0:a.data)==null?void 0:P.detail[0])==null?void 0:y.msg)=="string"?String(a.data.detail[0].msg):o},[o]);return{getErrorCode:R.useCallback(m=>{var d,c,f;const{response:a}=m||{};return a!=null&&a.error_code?String(a==null?void 0:a.error_code):(d=a==null?void 0:a.data)!=null&&d.error_code?String((c=a==null?void 0:a.data)==null?void 0:c.error_code):a!=null&&a.error_code?String(a==null?void 0:a.error_code):(f=a==null?void 0:a.data)!=null&&f.error_code?String(a.data.error_code):"unknown_error_code"},[]),printError:u}},yr=({data:t,fetchNextPage:n,isFetchingNextPage:o,isInitialLoading:u,isLoading:l,enabled:m=!0})=>{const a=R.useCallback(async c=>{o||!m||await n({pageParam:(c==null?void 0:c.pageParam)||c.visibleRowsCount})},[m,n,o]),d=R.useMemo(()=>{if(t)return t.pages.reduce((c,f)=>[...c,...f],[])},[t]);return{fetchNextPageOnRowsScrollEnd:a,isLoading:o||l,loadingVariant:u?"skeleton":"linear",rows:d}},br=()=>({clearAuthenticationToken:()=>{k.defaults.headers.common.Authorization=null},setAuthenticationToken:({tokenType:o,accessToken:u})=>{k.defaults.headers.common.Authorization=`${o} ${u}`}}),Re=(t,n="ll")=>V(t).format(n),Te=(t,n="km")=>{const o=Number(t);return Number.isNaN(o)?`0 ${n}`:`${o.toFixed(2)} ${n}`},Er=t=>{const n=t&&typeof t=="object"&&"pathname"in t&&t.pathname?t.pathname:t;return typeof n=="string"?n!=null&&n.startsWith("/")?n!=null&&n.startsWith("/files")?n:`/files${n}`:n!=null&&n.startsWith("files")?`/${n}`:n!=null&&n.startsWith("files")?`/${n}`:`/files/${n}`:n},Ce=(t,n)=>{if(!t)return"";const o=Er(t),u=typeof t=="object"&&"pathname"in t?`${t.origin}${o}`:t;return typeof n=="number"?`${u.replace("/files",`/thumbs/${n}`)}`:u},Rr=()=>{const{apiURL:t}=R.useContext(ee);return{dateAdapter:Re,distanceAdapter:Te,filePathAdapter:(o,u)=>Ce(t&&typeof o=="string"?{origin:t,pathname:o}:o,u)}},Tr=t=>t.charAt(0).toUpperCase()+t.slice(1).toLowerCase(),Cr=t=>{const u=t.split("/").filter(l=>l.length>0).map(l=>l.replace(/\${([^}]*)}/g,"$1").split(/[_-]/).map(c=>c.charAt(0).toUpperCase()+c.slice(1)).join("")).join("");return u.charAt(0).toLowerCase()+u.slice(1)},Sr=(t,n,o)=>{const u=Cr(n),l=Tr(o);return`${u}${l}`},jr=t=>{if(t)return(t==null?void 0:t.reduce((n,o)=>(n[o]={query:{useInfinite:!0,useInfiniteQueryParam:"offset",useQuery:!0}},n),{}))||{}},Or=t=>{const{input:n="./openapi.json",operationsToGenerateInfiniteQueryHook:o=void 0}=t||{};return{api:{hooks:{afterAllFilesWrite:"prettier src/api/ --write"},input:n,output:{client:"react-query",mode:"tags-split",override:{header:u=>["Generated by orval 🍺",...u.title?[u.title]:[],...u.description?[u.description]:[]],mutator:{name:"axiosCustomInstance",path:`${__dirname}/config/orval/mutator/axiosCustomInstance.ts`},operationName:Sr,...(o==null?void 0:o.length)&&{operations:jr(o)},query:{useQuery:!0}},schemas:"src/api/model",target:"src/api/services/api.ts"}}}};var Se={exports:{}};(function(t,n){(function(o,u){t.exports=u()})(Q,function(){return function(o,u,l){o=o||{};var m=u.prototype,a={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function d(f,h,T,S){return m.fromToBase(f,h,T,S)}l.en.relativeTime=a,m.fromToBase=function(f,h,T,S,w){for(var P,y,N,M=T.$locale().relativeTime||a,E=o.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],H=E.length,z=0;z<H;z+=1){var L=E[z];L.d&&(P=S?l(f).diff(T,L.d,!0):T.diff(f,L.d,!0));var W=(o.rounding||Math.round)(Math.abs(P));if(N=P>0,W<=L.r||!L.r){W<=1&&z>0&&(L=E[z-1]);var q=M[L.l];w&&(W=w(""+W)),y=typeof q=="string"?q.replace("%d",W):q(W,h,L.l,N);break}}if(h)return y;var X=N?M.future:M.past;return typeof X=="function"?X(y):X.replace("%s",y)},m.to=function(f,h){return d(f,h,this,!0)},m.from=function(f,h){return d(f,h,this)};var c=function(f){return f.$u?l.utc():l()};m.toNow=function(f){return this.to(c(this),f)},m.fromNow=function(f){return this.from(c(this),f)}}})})(Se);var je=Se.exports;const wr=nr({__proto__:null,default:_e(je)},[je]);var Pr={exports:{}};(function(t,n){(function(o,u){t.exports=u()})(Q,function(){return{name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(o){var u=["th","st","nd","rd"],l=o%100;return"["+o+(u[(l-20)%10]||u[l]||u[0])+"]"}}})})(Pr);const Oe=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var Mr={exports:{}};(function(t,n){(function(o,u){t.exports=u(V)})(Q,function(o){function u(a){return a&&typeof a=="object"&&"default"in a?a:{default:a}}var l=u(o),m={name:"fr",weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},ordinal:function(a){return""+a+(a===1?"er":"")}};return l.default.locale(m,null,!0),m})})(Mr);const xr=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));p.AxiosConfig=cr,p.DaysJSConfig=gr,p.GTMSendPageView=ur,p.I18nConfig=lr,p.InjectDependenciesContext=ee,p.InjectDependenciesProvider=sr,p.MapBoxConfig=vr,p.MaskTextField=dr,p.QueryClientConfigProvider=hr,p.RequireAuth=ir,p.SentryConfig=fr,p.dateAdapter=Re,p.distanceAdapter=Te,p.getOrvalConfig=Or,p.useAdapter=Rr,p.useAuth=br,p.useInfiniteDataGrid=yr,p.useResponseError=_r,Object.defineProperty(p,Symbol.toStringTag,{value:"Module"})});
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { g as $, c as N } from "./main-WgJDBcLv.js";
|
|
2
|
+
function P(u, m) {
|
|
3
|
+
for (var o = 0; o < m.length; o++) {
|
|
4
|
+
const n = m[o];
|
|
5
|
+
if (typeof n != "string" && !Array.isArray(n)) {
|
|
6
|
+
for (const e in n)
|
|
7
|
+
if (e !== "default" && !(e in u)) {
|
|
8
|
+
const t = Object.getOwnPropertyDescriptor(n, e);
|
|
9
|
+
t && Object.defineProperty(u, e, t.get ? t : {
|
|
10
|
+
enumerable: !0,
|
|
11
|
+
get: () => n[e]
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
return Object.freeze(Object.defineProperty(u, Symbol.toStringTag, { value: "Module" }));
|
|
17
|
+
}
|
|
18
|
+
var O = { exports: {} };
|
|
19
|
+
(function(u, m) {
|
|
20
|
+
(function(o, n) {
|
|
21
|
+
u.exports = n();
|
|
22
|
+
})(N, function() {
|
|
23
|
+
return function(o, n, e) {
|
|
24
|
+
o = o || {};
|
|
25
|
+
var t = n.prototype, b = { future: "in %s", past: "%s ago", s: "a few seconds", m: "a minute", mm: "%d minutes", h: "an hour", hh: "%d hours", d: "a day", dd: "%d days", M: "a month", MM: "%d months", y: "a year", yy: "%d years" };
|
|
26
|
+
function T(r, a, f, c) {
|
|
27
|
+
return t.fromToBase(r, a, f, c);
|
|
28
|
+
}
|
|
29
|
+
e.en.relativeTime = b, t.fromToBase = function(r, a, f, c, j) {
|
|
30
|
+
for (var h, l, p, v = f.$locale().relativeTime || b, y = o.thresholds || [{ l: "s", r: 44, d: "second" }, { l: "m", r: 89 }, { l: "mm", r: 44, d: "minute" }, { l: "h", r: 89 }, { l: "hh", r: 21, d: "hour" }, { l: "d", r: 35 }, { l: "dd", r: 25, d: "day" }, { l: "M", r: 45 }, { l: "MM", r: 10, d: "month" }, { l: "y", r: 17 }, { l: "yy", d: "year" }], w = y.length, d = 0; d < w; d += 1) {
|
|
31
|
+
var i = y[d];
|
|
32
|
+
i.d && (h = c ? e(r).diff(f, i.d, !0) : f.diff(r, i.d, !0));
|
|
33
|
+
var s = (o.rounding || Math.round)(Math.abs(h));
|
|
34
|
+
if (p = h > 0, s <= i.r || !i.r) {
|
|
35
|
+
s <= 1 && d > 0 && (i = y[d - 1]);
|
|
36
|
+
var g = v[i.l];
|
|
37
|
+
j && (s = j("" + s)), l = typeof g == "string" ? g.replace("%d", s) : g(s, a, i.l, p);
|
|
38
|
+
break;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
if (a)
|
|
42
|
+
return l;
|
|
43
|
+
var M = p ? v.future : v.past;
|
|
44
|
+
return typeof M == "function" ? M(l) : M.replace("%s", l);
|
|
45
|
+
}, t.to = function(r, a) {
|
|
46
|
+
return T(r, a, this, !0);
|
|
47
|
+
}, t.from = function(r, a) {
|
|
48
|
+
return T(r, a, this);
|
|
49
|
+
};
|
|
50
|
+
var x = function(r) {
|
|
51
|
+
return r.$u ? e.utc() : e();
|
|
52
|
+
};
|
|
53
|
+
t.toNow = function(r) {
|
|
54
|
+
return this.to(x(this), r);
|
|
55
|
+
}, t.fromNow = function(r) {
|
|
56
|
+
return this.from(x(this), r);
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
});
|
|
60
|
+
})(O);
|
|
61
|
+
var _ = O.exports;
|
|
62
|
+
const k = /* @__PURE__ */ $(_), B = /* @__PURE__ */ P({
|
|
63
|
+
__proto__: null,
|
|
64
|
+
default: k
|
|
65
|
+
}, [_]);
|
|
66
|
+
export {
|
|
67
|
+
B as r
|
|
68
|
+
};
|