@tracktor/shared-module 1.0.0-beta.4 → 1.0.0-beta.6
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/README.md +1 -1
- package/dist/components/Utils/DaysJSConfig.d.ts +1 -1
- package/dist/en-HVfn094c.js +17 -0
- package/dist/main.d.ts +2 -0
- package/dist/main.js +224 -217
- package/dist/main.umd.cjs +10 -10
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -51,7 +51,7 @@ export default App;
|
|
|
51
51
|
| I18nConfig | React Component | Initialize i18n with custom config options | i18next & react-i18next & i18next-browser-languagedetector |
|
|
52
52
|
| SentryConfig | React Component | Initialize Sentry | @sentry/react & react-router-dom |
|
|
53
53
|
| MapBoxConfig | React Component | Initialize MapBox | mapbox-gl |
|
|
54
|
-
| DaysJSConfig | React Component | Initialize DayJS |
|
|
54
|
+
| DaysJSConfig | React Component | Initialize DayJS | dayjs |
|
|
55
55
|
|
|
56
56
|
## Hooks
|
|
57
57
|
| Module | Description | Dependencies |
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
var r = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, a = { exports: {} };
|
|
2
|
+
(function(t, d) {
|
|
3
|
+
(function(n, e) {
|
|
4
|
+
t.exports = e();
|
|
5
|
+
})(r, function() {
|
|
6
|
+
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(n) {
|
|
7
|
+
var e = ["th", "st", "nd", "rd"], o = n % 100;
|
|
8
|
+
return "[" + n + (e[(o - 20) % 10] || e[o] || e[0]) + "]";
|
|
9
|
+
} };
|
|
10
|
+
});
|
|
11
|
+
})(a);
|
|
12
|
+
const u = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
13
|
+
__proto__: null
|
|
14
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
15
|
+
export {
|
|
16
|
+
u as e
|
|
17
|
+
};
|
package/dist/main.d.ts
CHANGED
|
@@ -12,6 +12,8 @@ export { default as MaskTextField } from './components/Inputs/MaskTextField';
|
|
|
12
12
|
export * from './components/Inputs/MaskTextField';
|
|
13
13
|
export { default as MapBoxConfig } from './components/Utils/MapBoxConfig';
|
|
14
14
|
export * from './components/Utils/MapBoxConfig';
|
|
15
|
+
export { default as DaysJSConfig } from './components/Utils/DaysJSConfig';
|
|
16
|
+
export * from './components/Utils/DaysJSConfig';
|
|
15
17
|
export { default as InjectDependenciesProvider } from './context/InjectDependenciesProvider';
|
|
16
18
|
export * from './context/InjectDependenciesProvider';
|
|
17
19
|
export { default as QueryClientConfigProvider } from './context/QueryClientConfigProvider';
|
package/dist/main.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import
|
|
1
|
+
import Le, { useState as Rr, useRef as _r, useLayoutEffect as Cr, Suspense as Tr, useEffect as ie, createContext as Sr, useMemo as ue, useContext as Ye, useCallback as ae } from "react";
|
|
2
2
|
import k from "axios";
|
|
3
|
-
import { useLocation as
|
|
4
|
-
import { useGoogleTagManager as
|
|
5
|
-
import W, { t as
|
|
6
|
-
import
|
|
7
|
-
import { initReactI18next as
|
|
3
|
+
import { useLocation as se, Navigate as De, Outlet as Me, createRoutesFromChildren as wr, matchRoutes as Or, useNavigationType as xr } from "react-router-dom";
|
|
4
|
+
import { useGoogleTagManager as jr } from "@tracktor/react-google-tag-manager";
|
|
5
|
+
import W, { t as Pr } from "i18next";
|
|
6
|
+
import Ar from "i18next-browser-languagedetector";
|
|
7
|
+
import { initReactI18next as kr } from "react-i18next";
|
|
8
8
|
import * as ne from "@sentry/react";
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import Dr from "
|
|
9
|
+
import Fe from "mapbox-gl";
|
|
10
|
+
import Ve from "dayjs";
|
|
11
|
+
import { QueryClient as $r, QueryClientProvider as Dr } from "@tanstack/react-query";
|
|
12
12
|
var oe = { exports: {} }, M = {};
|
|
13
13
|
/**
|
|
14
14
|
* @license React
|
|
@@ -19,17 +19,17 @@ var oe = { exports: {} }, M = {};
|
|
|
19
19
|
* This source code is licensed under the MIT license found in the
|
|
20
20
|
* LICENSE file in the root directory of this source tree.
|
|
21
21
|
*/
|
|
22
|
-
var
|
|
22
|
+
var Ie;
|
|
23
23
|
function Fr() {
|
|
24
|
-
return
|
|
25
|
-
var
|
|
24
|
+
return Ie || (Ie = 1, process.env.NODE_ENV !== "production" && function() {
|
|
25
|
+
var n = Le, a = Symbol.for("react.element"), i = Symbol.for("react.portal"), s = Symbol.for("react.fragment"), m = Symbol.for("react.strict_mode"), b = Symbol.for("react.profiler"), o = Symbol.for("react.provider"), f = Symbol.for("react.context"), c = Symbol.for("react.forward_ref"), g = Symbol.for("react.suspense"), h = Symbol.for("react.suspense_list"), C = Symbol.for("react.memo"), S = Symbol.for("react.lazy"), O = Symbol.for("react.offscreen"), A = Symbol.iterator, $ = "@@iterator";
|
|
26
26
|
function R(e) {
|
|
27
27
|
if (e === null || typeof e != "object")
|
|
28
28
|
return null;
|
|
29
29
|
var r = A && e[A] || e[$];
|
|
30
30
|
return typeof r == "function" ? r : null;
|
|
31
31
|
}
|
|
32
|
-
var D =
|
|
32
|
+
var D = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
33
33
|
function _(e) {
|
|
34
34
|
{
|
|
35
35
|
for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), u = 1; u < r; u++)
|
|
@@ -47,23 +47,23 @@ function Fr() {
|
|
|
47
47
|
p.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, p);
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
|
-
var
|
|
51
|
-
|
|
52
|
-
function
|
|
53
|
-
return !!(typeof e == "string" || typeof e == "function" || e === s || e === b ||
|
|
50
|
+
var Ue = !1, qe = !1, ze = !1, Be = !1, Ge = !1, le;
|
|
51
|
+
le = Symbol.for("react.module.reference");
|
|
52
|
+
function Je(e) {
|
|
53
|
+
return !!(typeof e == "string" || typeof e == "function" || e === s || e === b || Ge || e === m || e === g || e === h || Be || e === O || Ue || qe || ze || typeof e == "object" && e !== null && (e.$$typeof === S || e.$$typeof === C || e.$$typeof === o || e.$$typeof === f || e.$$typeof === c || // This needs to include all possible module reference object
|
|
54
54
|
// types supported by any Flight configuration anywhere since
|
|
55
55
|
// we don't know which Flight build this will end up being used
|
|
56
56
|
// with.
|
|
57
|
-
e.$$typeof ===
|
|
57
|
+
e.$$typeof === le || e.getModuleId !== void 0));
|
|
58
58
|
}
|
|
59
|
-
function
|
|
59
|
+
function Xe(e, r, t) {
|
|
60
60
|
var u = e.displayName;
|
|
61
61
|
if (u)
|
|
62
62
|
return u;
|
|
63
63
|
var v = r.displayName || r.name || "";
|
|
64
64
|
return v !== "" ? t + "(" + v + ")" : t;
|
|
65
65
|
}
|
|
66
|
-
function
|
|
66
|
+
function fe(e) {
|
|
67
67
|
return e.displayName || "Context";
|
|
68
68
|
}
|
|
69
69
|
function x(e) {
|
|
@@ -91,12 +91,12 @@ function Fr() {
|
|
|
91
91
|
switch (e.$$typeof) {
|
|
92
92
|
case f:
|
|
93
93
|
var r = e;
|
|
94
|
-
return
|
|
95
|
-
case
|
|
94
|
+
return fe(r) + ".Consumer";
|
|
95
|
+
case o:
|
|
96
96
|
var t = e;
|
|
97
|
-
return
|
|
97
|
+
return fe(t._context) + ".Provider";
|
|
98
98
|
case c:
|
|
99
|
-
return
|
|
99
|
+
return Xe(e, e.render, "ForwardRef");
|
|
100
100
|
case C:
|
|
101
101
|
var u = e.displayName || null;
|
|
102
102
|
return u !== null ? u : x(e.type) || "Memo";
|
|
@@ -111,18 +111,18 @@ function Fr() {
|
|
|
111
111
|
}
|
|
112
112
|
return null;
|
|
113
113
|
}
|
|
114
|
-
var F = Object.assign, L = 0,
|
|
115
|
-
function
|
|
114
|
+
var F = Object.assign, L = 0, de, ve, pe, me, ge, he, ye;
|
|
115
|
+
function Ee() {
|
|
116
116
|
}
|
|
117
|
-
|
|
118
|
-
function
|
|
117
|
+
Ee.__reactDisabledLog = !0;
|
|
118
|
+
function He() {
|
|
119
119
|
{
|
|
120
120
|
if (L === 0) {
|
|
121
|
-
|
|
121
|
+
de = console.log, ve = console.info, pe = console.warn, me = console.error, ge = console.group, he = console.groupCollapsed, ye = console.groupEnd;
|
|
122
122
|
var e = {
|
|
123
123
|
configurable: !0,
|
|
124
124
|
enumerable: !0,
|
|
125
|
-
value:
|
|
125
|
+
value: Ee,
|
|
126
126
|
writable: !0
|
|
127
127
|
};
|
|
128
128
|
Object.defineProperties(console, {
|
|
@@ -138,7 +138,7 @@ function Fr() {
|
|
|
138
138
|
L++;
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
|
-
function
|
|
141
|
+
function Ke() {
|
|
142
142
|
{
|
|
143
143
|
if (L--, L === 0) {
|
|
144
144
|
var e = {
|
|
@@ -148,25 +148,25 @@ function Fr() {
|
|
|
148
148
|
};
|
|
149
149
|
Object.defineProperties(console, {
|
|
150
150
|
log: F({}, e, {
|
|
151
|
-
value:
|
|
151
|
+
value: de
|
|
152
152
|
}),
|
|
153
153
|
info: F({}, e, {
|
|
154
|
-
value:
|
|
154
|
+
value: ve
|
|
155
155
|
}),
|
|
156
156
|
warn: F({}, e, {
|
|
157
|
-
value:
|
|
157
|
+
value: pe
|
|
158
158
|
}),
|
|
159
159
|
error: F({}, e, {
|
|
160
|
-
value:
|
|
160
|
+
value: me
|
|
161
161
|
}),
|
|
162
162
|
group: F({}, e, {
|
|
163
|
-
value:
|
|
163
|
+
value: ge
|
|
164
164
|
}),
|
|
165
165
|
groupCollapsed: F({}, e, {
|
|
166
|
-
value:
|
|
166
|
+
value: he
|
|
167
167
|
}),
|
|
168
168
|
groupEnd: F({}, e, {
|
|
169
|
-
value:
|
|
169
|
+
value: ye
|
|
170
170
|
})
|
|
171
171
|
});
|
|
172
172
|
}
|
|
@@ -189,10 +189,10 @@ function Fr() {
|
|
|
189
189
|
}
|
|
190
190
|
var K = !1, z;
|
|
191
191
|
{
|
|
192
|
-
var
|
|
193
|
-
z = new
|
|
192
|
+
var Ze = typeof WeakMap == "function" ? WeakMap : Map;
|
|
193
|
+
z = new Ze();
|
|
194
194
|
}
|
|
195
|
-
function
|
|
195
|
+
function be(e, r) {
|
|
196
196
|
if (!e || K)
|
|
197
197
|
return "";
|
|
198
198
|
{
|
|
@@ -205,7 +205,7 @@ function Fr() {
|
|
|
205
205
|
var v = Error.prepareStackTrace;
|
|
206
206
|
Error.prepareStackTrace = void 0;
|
|
207
207
|
var p;
|
|
208
|
-
p = X.current, X.current = null,
|
|
208
|
+
p = X.current, X.current = null, He();
|
|
209
209
|
try {
|
|
210
210
|
if (r) {
|
|
211
211
|
var d = function() {
|
|
@@ -258,15 +258,15 @@ function Fr() {
|
|
|
258
258
|
}
|
|
259
259
|
}
|
|
260
260
|
} finally {
|
|
261
|
-
K = !1, X.current = p,
|
|
261
|
+
K = !1, X.current = p, Ke(), Error.prepareStackTrace = v;
|
|
262
262
|
}
|
|
263
|
-
var N = e ? e.displayName || e.name : "",
|
|
264
|
-
return typeof e == "function" && z.set(e,
|
|
263
|
+
var N = e ? e.displayName || e.name : "", $e = N ? q(N) : "";
|
|
264
|
+
return typeof e == "function" && z.set(e, $e), $e;
|
|
265
265
|
}
|
|
266
|
-
function
|
|
267
|
-
return
|
|
266
|
+
function Qe(e, r, t) {
|
|
267
|
+
return be(e, !1);
|
|
268
268
|
}
|
|
269
|
-
function
|
|
269
|
+
function er(e) {
|
|
270
270
|
var r = e.prototype;
|
|
271
271
|
return !!(r && r.isReactComponent);
|
|
272
272
|
}
|
|
@@ -274,7 +274,7 @@ function Fr() {
|
|
|
274
274
|
if (e == null)
|
|
275
275
|
return "";
|
|
276
276
|
if (typeof e == "function")
|
|
277
|
-
return
|
|
277
|
+
return be(e, er(e));
|
|
278
278
|
if (typeof e == "string")
|
|
279
279
|
return q(e);
|
|
280
280
|
switch (e) {
|
|
@@ -286,7 +286,7 @@ function Fr() {
|
|
|
286
286
|
if (typeof e == "object")
|
|
287
287
|
switch (e.$$typeof) {
|
|
288
288
|
case c:
|
|
289
|
-
return
|
|
289
|
+
return Qe(e.render);
|
|
290
290
|
case C:
|
|
291
291
|
return B(e.type, r, t);
|
|
292
292
|
case S: {
|
|
@@ -299,15 +299,15 @@ function Fr() {
|
|
|
299
299
|
}
|
|
300
300
|
return "";
|
|
301
301
|
}
|
|
302
|
-
var G = Object.prototype.hasOwnProperty,
|
|
302
|
+
var G = Object.prototype.hasOwnProperty, Re = {}, _e = D.ReactDebugCurrentFrame;
|
|
303
303
|
function J(e) {
|
|
304
304
|
if (e) {
|
|
305
305
|
var r = e._owner, t = B(e.type, e._source, r ? r.type : null);
|
|
306
|
-
|
|
306
|
+
_e.setExtraStackFrame(t);
|
|
307
307
|
} else
|
|
308
|
-
|
|
308
|
+
_e.setExtraStackFrame(null);
|
|
309
309
|
}
|
|
310
|
-
function
|
|
310
|
+
function rr(e, r, t, u, v) {
|
|
311
311
|
{
|
|
312
312
|
var p = Function.call.bind(G);
|
|
313
313
|
for (var d in e)
|
|
@@ -322,42 +322,42 @@ function Fr() {
|
|
|
322
322
|
} catch (y) {
|
|
323
323
|
l = y;
|
|
324
324
|
}
|
|
325
|
-
l && !(l instanceof Error) && (J(v), _("%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", t, d, typeof l), J(null)), l instanceof Error && !(l.message in
|
|
325
|
+
l && !(l instanceof Error) && (J(v), _("%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", t, d, typeof l), J(null)), l instanceof Error && !(l.message in Re) && (Re[l.message] = !0, J(v), _("Failed %s type: %s", t, l.message), J(null));
|
|
326
326
|
}
|
|
327
327
|
}
|
|
328
328
|
}
|
|
329
|
-
var
|
|
329
|
+
var tr = Array.isArray;
|
|
330
330
|
function Z(e) {
|
|
331
|
-
return
|
|
331
|
+
return tr(e);
|
|
332
332
|
}
|
|
333
|
-
function
|
|
333
|
+
function nr(e) {
|
|
334
334
|
{
|
|
335
335
|
var r = typeof Symbol == "function" && Symbol.toStringTag, t = r && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
336
336
|
return t;
|
|
337
337
|
}
|
|
338
338
|
}
|
|
339
|
-
function
|
|
339
|
+
function ar(e) {
|
|
340
340
|
try {
|
|
341
|
-
return
|
|
341
|
+
return Ce(e), !1;
|
|
342
342
|
} catch {
|
|
343
343
|
return !0;
|
|
344
344
|
}
|
|
345
345
|
}
|
|
346
|
-
function
|
|
346
|
+
function Ce(e) {
|
|
347
347
|
return "" + e;
|
|
348
348
|
}
|
|
349
|
-
function
|
|
350
|
-
if (
|
|
351
|
-
return _("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",
|
|
349
|
+
function Te(e) {
|
|
350
|
+
if (ar(e))
|
|
351
|
+
return _("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", nr(e)), Ce(e);
|
|
352
352
|
}
|
|
353
|
-
var Y = D.ReactCurrentOwner,
|
|
353
|
+
var Y = D.ReactCurrentOwner, or = {
|
|
354
354
|
key: !0,
|
|
355
355
|
ref: !0,
|
|
356
356
|
__self: !0,
|
|
357
357
|
__source: !0
|
|
358
|
-
},
|
|
358
|
+
}, Se, we, Q;
|
|
359
359
|
Q = {};
|
|
360
|
-
function
|
|
360
|
+
function ir(e) {
|
|
361
361
|
if (G.call(e, "ref")) {
|
|
362
362
|
var r = Object.getOwnPropertyDescriptor(e, "ref").get;
|
|
363
363
|
if (r && r.isReactWarning)
|
|
@@ -365,7 +365,7 @@ function Fr() {
|
|
|
365
365
|
}
|
|
366
366
|
return e.ref !== void 0;
|
|
367
367
|
}
|
|
368
|
-
function
|
|
368
|
+
function ur(e) {
|
|
369
369
|
if (G.call(e, "key")) {
|
|
370
370
|
var r = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
371
371
|
if (r && r.isReactWarning)
|
|
@@ -373,16 +373,16 @@ function Fr() {
|
|
|
373
373
|
}
|
|
374
374
|
return e.key !== void 0;
|
|
375
375
|
}
|
|
376
|
-
function
|
|
376
|
+
function sr(e, r) {
|
|
377
377
|
if (typeof e.ref == "string" && Y.current && r && Y.current.stateNode !== r) {
|
|
378
378
|
var t = x(Y.current.type);
|
|
379
379
|
Q[t] || (_('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', x(Y.current.type), e.ref), Q[t] = !0);
|
|
380
380
|
}
|
|
381
381
|
}
|
|
382
|
-
function
|
|
382
|
+
function cr(e, r) {
|
|
383
383
|
{
|
|
384
384
|
var t = function() {
|
|
385
|
-
|
|
385
|
+
Se || (Se = !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));
|
|
386
386
|
};
|
|
387
387
|
t.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
388
388
|
get: t,
|
|
@@ -390,10 +390,10 @@ function Fr() {
|
|
|
390
390
|
});
|
|
391
391
|
}
|
|
392
392
|
}
|
|
393
|
-
function
|
|
393
|
+
function lr(e, r) {
|
|
394
394
|
{
|
|
395
395
|
var t = function() {
|
|
396
|
-
|
|
396
|
+
we || (we = !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));
|
|
397
397
|
};
|
|
398
398
|
t.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
|
399
399
|
get: t,
|
|
@@ -401,10 +401,10 @@ function Fr() {
|
|
|
401
401
|
});
|
|
402
402
|
}
|
|
403
403
|
}
|
|
404
|
-
var
|
|
404
|
+
var fr = function(e, r, t, u, v, p, d) {
|
|
405
405
|
var l = {
|
|
406
406
|
// This tag allows us to uniquely identify this as a React Element
|
|
407
|
-
$$typeof:
|
|
407
|
+
$$typeof: a,
|
|
408
408
|
// Built-in properties that belong on the element
|
|
409
409
|
type: e,
|
|
410
410
|
key: r,
|
|
@@ -430,12 +430,12 @@ function Fr() {
|
|
|
430
430
|
value: v
|
|
431
431
|
}), Object.freeze && (Object.freeze(l.props), Object.freeze(l)), l;
|
|
432
432
|
};
|
|
433
|
-
function
|
|
433
|
+
function dr(e, r, t, u, v) {
|
|
434
434
|
{
|
|
435
435
|
var p, d = {}, l = null, T = null;
|
|
436
|
-
t !== void 0 && (
|
|
436
|
+
t !== void 0 && (Te(t), l = "" + t), ur(r) && (Te(r.key), l = "" + r.key), ir(r) && (T = r.ref, sr(r, v));
|
|
437
437
|
for (p in r)
|
|
438
|
-
G.call(r, p) && !
|
|
438
|
+
G.call(r, p) && !or.hasOwnProperty(p) && (d[p] = r[p]);
|
|
439
439
|
if (e && e.defaultProps) {
|
|
440
440
|
var y = e.defaultProps;
|
|
441
441
|
for (p in y)
|
|
@@ -443,25 +443,25 @@ function Fr() {
|
|
|
443
443
|
}
|
|
444
444
|
if (l || T) {
|
|
445
445
|
var E = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
446
|
-
l &&
|
|
446
|
+
l && cr(d, E), T && lr(d, E);
|
|
447
447
|
}
|
|
448
|
-
return
|
|
448
|
+
return fr(e, l, T, v, u, Y.current, d);
|
|
449
449
|
}
|
|
450
450
|
}
|
|
451
|
-
var ee = D.ReactCurrentOwner,
|
|
451
|
+
var ee = D.ReactCurrentOwner, Oe = D.ReactDebugCurrentFrame;
|
|
452
452
|
function I(e) {
|
|
453
453
|
if (e) {
|
|
454
454
|
var r = e._owner, t = B(e.type, e._source, r ? r.type : null);
|
|
455
|
-
|
|
455
|
+
Oe.setExtraStackFrame(t);
|
|
456
456
|
} else
|
|
457
|
-
|
|
457
|
+
Oe.setExtraStackFrame(null);
|
|
458
458
|
}
|
|
459
459
|
var re;
|
|
460
460
|
re = !1;
|
|
461
461
|
function te(e) {
|
|
462
|
-
return typeof e == "object" && e !== null && e.$$typeof ===
|
|
462
|
+
return typeof e == "object" && e !== null && e.$$typeof === a;
|
|
463
463
|
}
|
|
464
|
-
function
|
|
464
|
+
function xe() {
|
|
465
465
|
{
|
|
466
466
|
if (ee.current) {
|
|
467
467
|
var e = x(ee.current.type);
|
|
@@ -473,7 +473,7 @@ Check the render method of \`` + e + "`.";
|
|
|
473
473
|
return "";
|
|
474
474
|
}
|
|
475
475
|
}
|
|
476
|
-
function
|
|
476
|
+
function vr(e) {
|
|
477
477
|
{
|
|
478
478
|
if (e !== void 0) {
|
|
479
479
|
var r = e.fileName.replace(/^.*[\\\/]/, ""), t = e.lineNumber;
|
|
@@ -484,10 +484,10 @@ Check your code at ` + r + ":" + t + ".";
|
|
|
484
484
|
return "";
|
|
485
485
|
}
|
|
486
486
|
}
|
|
487
|
-
var
|
|
488
|
-
function
|
|
487
|
+
var je = {};
|
|
488
|
+
function pr(e) {
|
|
489
489
|
{
|
|
490
|
-
var r =
|
|
490
|
+
var r = xe();
|
|
491
491
|
if (!r) {
|
|
492
492
|
var t = typeof e == "string" ? e : e.displayName || e.name;
|
|
493
493
|
t && (r = `
|
|
@@ -497,27 +497,27 @@ Check the top-level render call using <` + t + ">.");
|
|
|
497
497
|
return r;
|
|
498
498
|
}
|
|
499
499
|
}
|
|
500
|
-
function
|
|
500
|
+
function Pe(e, r) {
|
|
501
501
|
{
|
|
502
502
|
if (!e._store || e._store.validated || e.key != null)
|
|
503
503
|
return;
|
|
504
504
|
e._store.validated = !0;
|
|
505
|
-
var t =
|
|
506
|
-
if (
|
|
505
|
+
var t = pr(r);
|
|
506
|
+
if (je[t])
|
|
507
507
|
return;
|
|
508
|
-
|
|
508
|
+
je[t] = !0;
|
|
509
509
|
var u = "";
|
|
510
510
|
e && e._owner && e._owner !== ee.current && (u = " It was passed a child from " + x(e._owner.type) + "."), I(e), _('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', t, u), I(null);
|
|
511
511
|
}
|
|
512
512
|
}
|
|
513
|
-
function
|
|
513
|
+
function Ae(e, r) {
|
|
514
514
|
{
|
|
515
515
|
if (typeof e != "object")
|
|
516
516
|
return;
|
|
517
517
|
if (Z(e))
|
|
518
518
|
for (var t = 0; t < e.length; t++) {
|
|
519
519
|
var u = e[t];
|
|
520
|
-
te(u) &&
|
|
520
|
+
te(u) && Pe(u, r);
|
|
521
521
|
}
|
|
522
522
|
else if (te(e))
|
|
523
523
|
e._store && (e._store.validated = !0);
|
|
@@ -525,11 +525,11 @@ Check the top-level render call using <` + t + ">.");
|
|
|
525
525
|
var v = R(e);
|
|
526
526
|
if (typeof v == "function" && v !== e.entries)
|
|
527
527
|
for (var p = v.call(e), d; !(d = p.next()).done; )
|
|
528
|
-
te(d.value) &&
|
|
528
|
+
te(d.value) && Pe(d.value, r);
|
|
529
529
|
}
|
|
530
530
|
}
|
|
531
531
|
}
|
|
532
|
-
function
|
|
532
|
+
function mr(e) {
|
|
533
533
|
{
|
|
534
534
|
var r = e.type;
|
|
535
535
|
if (r == null || typeof r == "string")
|
|
@@ -545,7 +545,7 @@ Check the top-level render call using <` + t + ">.");
|
|
|
545
545
|
return;
|
|
546
546
|
if (t) {
|
|
547
547
|
var u = x(r);
|
|
548
|
-
|
|
548
|
+
rr(t, e.props, "prop", u, e);
|
|
549
549
|
} else if (r.PropTypes !== void 0 && !re) {
|
|
550
550
|
re = !0;
|
|
551
551
|
var v = x(r);
|
|
@@ -554,7 +554,7 @@ Check the top-level render call using <` + t + ">.");
|
|
|
554
554
|
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && _("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
555
555
|
}
|
|
556
556
|
}
|
|
557
|
-
function
|
|
557
|
+
function gr(e) {
|
|
558
558
|
{
|
|
559
559
|
for (var r = Object.keys(e.props), t = 0; t < r.length; t++) {
|
|
560
560
|
var u = r[t];
|
|
@@ -566,18 +566,18 @@ Check the top-level render call using <` + t + ">.");
|
|
|
566
566
|
e.ref !== null && (I(e), _("Invalid attribute `ref` supplied to `React.Fragment`."), I(null));
|
|
567
567
|
}
|
|
568
568
|
}
|
|
569
|
-
function
|
|
569
|
+
function ke(e, r, t, u, v, p) {
|
|
570
570
|
{
|
|
571
|
-
var d =
|
|
571
|
+
var d = Je(e);
|
|
572
572
|
if (!d) {
|
|
573
573
|
var l = "";
|
|
574
574
|
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (l += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
575
|
-
var T =
|
|
576
|
-
T ? l += T : l +=
|
|
575
|
+
var T = vr(v);
|
|
576
|
+
T ? l += T : l += xe();
|
|
577
577
|
var y;
|
|
578
|
-
e === null ? y = "null" : Z(e) ? y = "array" : e !== void 0 && e.$$typeof ===
|
|
578
|
+
e === null ? y = "null" : Z(e) ? y = "array" : e !== void 0 && e.$$typeof === a ? (y = "<" + (x(e.type) || "Unknown") + " />", l = " Did you accidentally export a JSX literal instead of a component?") : y = 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", y, l);
|
|
579
579
|
}
|
|
580
|
-
var E =
|
|
580
|
+
var E = dr(e, r, t, v, p);
|
|
581
581
|
if (E == null)
|
|
582
582
|
return E;
|
|
583
583
|
if (d) {
|
|
@@ -586,24 +586,24 @@ Check the top-level render call using <` + t + ">.");
|
|
|
586
586
|
if (u)
|
|
587
587
|
if (Z(w)) {
|
|
588
588
|
for (var N = 0; N < w.length; N++)
|
|
589
|
-
|
|
589
|
+
Ae(w[N], e);
|
|
590
590
|
Object.freeze && Object.freeze(w);
|
|
591
591
|
} else
|
|
592
592
|
_("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
593
593
|
else
|
|
594
|
-
|
|
594
|
+
Ae(w, e);
|
|
595
595
|
}
|
|
596
|
-
return e === s ?
|
|
596
|
+
return e === s ? gr(E) : mr(E), E;
|
|
597
597
|
}
|
|
598
598
|
}
|
|
599
|
-
function gr(e, r, t) {
|
|
600
|
-
return Ae(e, r, t, !0);
|
|
601
|
-
}
|
|
602
599
|
function hr(e, r, t) {
|
|
603
|
-
return
|
|
600
|
+
return ke(e, r, t, !0);
|
|
601
|
+
}
|
|
602
|
+
function yr(e, r, t) {
|
|
603
|
+
return ke(e, r, t, !1);
|
|
604
604
|
}
|
|
605
|
-
var
|
|
606
|
-
M.Fragment = s, M.jsx =
|
|
605
|
+
var Er = yr, br = hr;
|
|
606
|
+
M.Fragment = s, M.jsx = Er, M.jsxs = br;
|
|
607
607
|
}()), M;
|
|
608
608
|
}
|
|
609
609
|
var V = {};
|
|
@@ -616,13 +616,13 @@ var V = {};
|
|
|
616
616
|
* This source code is licensed under the MIT license found in the
|
|
617
617
|
* LICENSE file in the root directory of this source tree.
|
|
618
618
|
*/
|
|
619
|
-
var
|
|
619
|
+
var Ne;
|
|
620
620
|
function Ir() {
|
|
621
|
-
if (
|
|
621
|
+
if (Ne)
|
|
622
622
|
return V;
|
|
623
|
-
|
|
624
|
-
var
|
|
625
|
-
function
|
|
623
|
+
Ne = 1;
|
|
624
|
+
var n = Le, a = Symbol.for("react.element"), i = Symbol.for("react.fragment"), s = Object.prototype.hasOwnProperty, m = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, b = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
625
|
+
function o(f, c, g) {
|
|
626
626
|
var h, C = {}, S = null, O = null;
|
|
627
627
|
g !== void 0 && (S = "" + g), c.key !== void 0 && (S = "" + c.key), c.ref !== void 0 && (O = c.ref);
|
|
628
628
|
for (h in c)
|
|
@@ -630,63 +630,63 @@ function Ir() {
|
|
|
630
630
|
if (f && f.defaultProps)
|
|
631
631
|
for (h in c = f.defaultProps, c)
|
|
632
632
|
C[h] === void 0 && (C[h] = c[h]);
|
|
633
|
-
return { $$typeof:
|
|
633
|
+
return { $$typeof: a, type: f, key: S, ref: O, props: C, _owner: m.current };
|
|
634
634
|
}
|
|
635
|
-
return V.Fragment = i, V.jsx =
|
|
635
|
+
return V.Fragment = i, V.jsx = o, V.jsxs = o, V;
|
|
636
636
|
}
|
|
637
637
|
process.env.NODE_ENV === "production" ? oe.exports = Ir() : oe.exports = Fr();
|
|
638
638
|
var P = oe.exports;
|
|
639
639
|
const et = ({
|
|
640
|
-
Fallback:
|
|
641
|
-
loginPath:
|
|
640
|
+
Fallback: n,
|
|
641
|
+
loginPath: a = "/login",
|
|
642
642
|
localStorageKey: i = "user",
|
|
643
643
|
redirect401Path: s = "/login",
|
|
644
644
|
isLogged: m
|
|
645
645
|
}) => {
|
|
646
646
|
var C, S, O, A;
|
|
647
|
-
const [b,
|
|
648
|
-
return
|
|
647
|
+
const [b, o] = Rr(null), f = se(), c = _r(!1), g = typeof m == "function" ? m() : !!m, h = typeof g == "boolean" ? g : g == null ? void 0 : g.isLogged;
|
|
648
|
+
return Cr(() => {
|
|
649
649
|
var $;
|
|
650
650
|
c.current || (c.current = !0, ($ = k) == null || $.interceptors.response.use(
|
|
651
651
|
(R) => R,
|
|
652
652
|
async (R) => {
|
|
653
653
|
var U;
|
|
654
|
-
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 && ((U = R == null ? void 0 : R.response) == null ? void 0 : U.status) === 401 && (k.defaults.headers.common.Authorization = null, localStorage.removeItem(i),
|
|
654
|
+
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 && ((U = R == null ? void 0 : R.response) == null ? void 0 : U.status) === 401 && (k.defaults.headers.common.Authorization = null, localStorage.removeItem(i), o(s)), Promise.reject(R);
|
|
655
655
|
}
|
|
656
656
|
));
|
|
657
|
-
}, [i, s]), h && !b ? /* @__PURE__ */ P.jsx(
|
|
657
|
+
}, [i, s]), h && !b ? /* @__PURE__ */ P.jsx(Tr, { fallback: n, children: (S = (C = f.state) == null ? void 0 : C.from) != null && S.state && ((A = (O = f.state) == null ? void 0 : O.from) == null ? void 0 : A.pathname) === a ? /* @__PURE__ */ P.jsx(De, { to: f.state.from.state.from.pathname + f.state.from.state.from.search, replace: !0 }) : /* @__PURE__ */ P.jsx(Me, {}) }) : /* @__PURE__ */ P.jsx(De, { to: a, state: { from: f }, replace: !0 });
|
|
658
658
|
}, rt = () => {
|
|
659
|
-
const { pathname:
|
|
660
|
-
return
|
|
661
|
-
|
|
662
|
-
}, [
|
|
663
|
-
},
|
|
659
|
+
const { pathname: n } = se(), { sendEvent: a } = jr();
|
|
660
|
+
return ie(() => {
|
|
661
|
+
a({ event: "pageView", pathname: n });
|
|
662
|
+
}, [n, a]), /* @__PURE__ */ P.jsx(Me, {});
|
|
663
|
+
}, ce = Sr({
|
|
664
664
|
apiURL: void 0,
|
|
665
665
|
children: void 0
|
|
666
|
-
}), tt = ({ children:
|
|
667
|
-
const i =
|
|
666
|
+
}), tt = ({ children: n, apiURL: a }) => {
|
|
667
|
+
const i = ue(
|
|
668
668
|
() => ({
|
|
669
|
-
apiURL:
|
|
669
|
+
apiURL: a
|
|
670
670
|
}),
|
|
671
|
-
[
|
|
671
|
+
[a]
|
|
672
672
|
);
|
|
673
|
-
return /* @__PURE__ */ P.jsx(
|
|
673
|
+
return /* @__PURE__ */ P.jsx(ce.Provider, { value: i, children: n });
|
|
674
674
|
}, nt = ({
|
|
675
|
-
tokenTypeKey:
|
|
676
|
-
userLocalStorageKey:
|
|
675
|
+
tokenTypeKey: n = "tokenType",
|
|
676
|
+
userLocalStorageKey: a = "user",
|
|
677
677
|
tokenKey: i = "accessToken",
|
|
678
678
|
postContentType: s = "application/json",
|
|
679
679
|
...m
|
|
680
680
|
}) => {
|
|
681
|
-
const { apiURL: b = m.baseURL } = Ye(
|
|
681
|
+
const { apiURL: b = m.baseURL } = Ye(ce);
|
|
682
682
|
if (!k.defaults)
|
|
683
683
|
return null;
|
|
684
|
-
const
|
|
684
|
+
const o = localStorage.getItem(a), f = o ? JSON.parse(o) : null, c = f != null && f[n] ? f[n] : null, g = f != null && f[i] ? f[i] : null, h = o ? `${c} ${g}` : null;
|
|
685
685
|
return k.defaults.baseURL = b, k.defaults.headers.post["Content-Type"] = s, h && (k.defaults.headers.common.Authorization = h), null;
|
|
686
|
-
}, at = ({ debug:
|
|
686
|
+
}, at = ({ debug: n, resources: a }) => {
|
|
687
687
|
var i;
|
|
688
|
-
return (i = W) != null && i.isInitialized || (W.use(
|
|
689
|
-
debug:
|
|
688
|
+
return (i = W) != null && i.isInitialized || (W.use(Ar).use(kr).init({
|
|
689
|
+
debug: n,
|
|
690
690
|
fallbackLng: "en",
|
|
691
691
|
interpolation: {
|
|
692
692
|
escapeValue: !1
|
|
@@ -696,7 +696,7 @@ const et = ({
|
|
|
696
696
|
bindI18n: !1,
|
|
697
697
|
useSuspense: !0
|
|
698
698
|
},
|
|
699
|
-
resources:
|
|
699
|
+
resources: a,
|
|
700
700
|
returnNull: !1
|
|
701
701
|
}).then(() => {
|
|
702
702
|
document.documentElement.lang !== W.resolvedLanguage && W.resolvedLanguage && document.documentElement.setAttribute("lang", W.resolvedLanguage);
|
|
@@ -704,147 +704,153 @@ const et = ({
|
|
|
704
704
|
document.documentElement.setAttribute("lang", s);
|
|
705
705
|
})), null;
|
|
706
706
|
}, ot = ({
|
|
707
|
-
dsn:
|
|
708
|
-
integrations:
|
|
707
|
+
dsn: n,
|
|
708
|
+
integrations: a,
|
|
709
709
|
tracesSampleRate: i,
|
|
710
710
|
replaysSessionSampleRate: s,
|
|
711
711
|
replaysOnErrorSampleRate: m,
|
|
712
712
|
tracePropagationTargets: b,
|
|
713
|
-
ignoreErrors:
|
|
713
|
+
ignoreErrors: o,
|
|
714
714
|
debug: f,
|
|
715
715
|
environment: c
|
|
716
716
|
}) => (ne.isInitialized() || (f || process.env.NODE_ENV === "prod" || process.env.NODE_ENV === "production") && ne.init({
|
|
717
717
|
debug: f,
|
|
718
|
-
dsn:
|
|
718
|
+
dsn: n,
|
|
719
719
|
environment: c || "production",
|
|
720
|
-
ignoreErrors: [...
|
|
720
|
+
ignoreErrors: [...o || [], /dynamically imported module/],
|
|
721
721
|
integrations: [
|
|
722
722
|
ne.reactRouterV6BrowserTracingIntegration({
|
|
723
|
-
createRoutesFromChildren:
|
|
724
|
-
matchRoutes:
|
|
725
|
-
useEffect:
|
|
726
|
-
useLocation:
|
|
727
|
-
useNavigationType:
|
|
723
|
+
createRoutesFromChildren: wr,
|
|
724
|
+
matchRoutes: Or,
|
|
725
|
+
useEffect: ie,
|
|
726
|
+
useLocation: se,
|
|
727
|
+
useNavigationType: xr
|
|
728
728
|
}),
|
|
729
|
-
...
|
|
729
|
+
...a || []
|
|
730
730
|
],
|
|
731
731
|
replaysOnErrorSampleRate: m || 1,
|
|
732
732
|
replaysSessionSampleRate: s || 0.1,
|
|
733
733
|
tracePropagationTargets: b,
|
|
734
734
|
tracesSampleRate: i || 1
|
|
735
|
-
}), null), it = ({ IMaskMixin:
|
|
736
|
-
const i =
|
|
735
|
+
}), null), it = ({ IMaskMixin: n, ...a }) => {
|
|
736
|
+
const i = ue(
|
|
737
737
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
738
|
-
() =>
|
|
739
|
-
[
|
|
738
|
+
() => n(({ TextField: s, ...m }) => /* @__PURE__ */ P.jsx(s, { ...m })),
|
|
739
|
+
[n]
|
|
740
740
|
);
|
|
741
|
-
return /* @__PURE__ */ P.jsx(i, { ...
|
|
742
|
-
}, ut = ({ accessToken:
|
|
743
|
-
|
|
741
|
+
return /* @__PURE__ */ P.jsx(i, { ...a });
|
|
742
|
+
}, ut = ({ accessToken: n }) => (Fe && n && (Fe.accessToken = n), null), st = ({ language: n = window.navigator.language }) => (ie(() => {
|
|
743
|
+
import(`dayjs/locale/${n}`).then(() => {
|
|
744
|
+
Ve.locale(n);
|
|
745
|
+
}).catch(() => {
|
|
746
|
+
import("./en-HVfn094c.js").then((a) => a.e);
|
|
747
|
+
});
|
|
748
|
+
}, [n]), null), ct = ({ children: n, defaultQueriesOptions: a, defaultMutationsOptions: i }) => {
|
|
749
|
+
const s = new $r({
|
|
744
750
|
defaultOptions: {
|
|
745
751
|
mutations: {
|
|
746
752
|
...i
|
|
747
753
|
},
|
|
748
754
|
queries: {
|
|
749
|
-
getNextPageParam: (m, b,
|
|
755
|
+
getNextPageParam: (m, b, o) => m.length + (o || 0),
|
|
750
756
|
refetchOnWindowFocus: !1,
|
|
751
757
|
retry: 3,
|
|
752
|
-
...
|
|
758
|
+
...a
|
|
753
759
|
}
|
|
754
760
|
}
|
|
755
761
|
});
|
|
756
|
-
return /* @__PURE__ */ P.jsx(
|
|
757
|
-
},
|
|
758
|
-
const { unknownErrorTranslationKey:
|
|
762
|
+
return /* @__PURE__ */ P.jsx(Dr, { client: s, children: n });
|
|
763
|
+
}, lt = (n) => {
|
|
764
|
+
const { unknownErrorTranslationKey: a = "error.unknownError" } = n || {}, i = Pr(a), s = ae(
|
|
759
765
|
(b) => {
|
|
760
766
|
var f, c, g, h, C, S, O, A, $;
|
|
761
|
-
const { response:
|
|
762
|
-
return
|
|
767
|
+
const { response: o } = b || {};
|
|
768
|
+
return o != null && o.reason ? String(o.reason) : (f = o == null ? void 0 : o.data) != null && f.reason ? String(o.data.reason) : (c = o == null ? void 0 : o.data) != null && c.message ? String(o.data.message) : (h = (g = o == null ? void 0 : o.data) == null ? void 0 : g.detail) != null && h.length && Array.isArray((C = o == null ? void 0 : o.data) == null ? void 0 : C.detail) && ((O = (S = o == null ? void 0 : o.data) == null ? void 0 : S.detail[0]) != null && O.msg) && typeof (($ = (A = o == null ? void 0 : o.data) == null ? void 0 : A.detail[0]) == null ? void 0 : $.msg) == "string" ? String(o.data.detail[0].msg) : i;
|
|
763
769
|
},
|
|
764
770
|
[i]
|
|
765
771
|
);
|
|
766
772
|
return { getErrorCode: ae((b) => {
|
|
767
773
|
var f, c, g;
|
|
768
|
-
const { response:
|
|
769
|
-
return
|
|
774
|
+
const { response: o } = b || {};
|
|
775
|
+
return o != null && o.error_code ? String(o == null ? void 0 : o.error_code) : (f = o == null ? void 0 : o.data) != null && f.error_code ? String((c = o == null ? void 0 : o.data) == null ? void 0 : c.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";
|
|
770
776
|
}, []), printError: s };
|
|
771
|
-
},
|
|
772
|
-
data:
|
|
773
|
-
fetchNextPage:
|
|
777
|
+
}, ft = ({
|
|
778
|
+
data: n,
|
|
779
|
+
fetchNextPage: a,
|
|
774
780
|
isFetchingNextPage: i,
|
|
775
781
|
isInitialLoading: s,
|
|
776
782
|
isLoading: m,
|
|
777
783
|
enabled: b = !0
|
|
778
784
|
}) => {
|
|
779
|
-
const
|
|
785
|
+
const o = ae(
|
|
780
786
|
async (c) => {
|
|
781
|
-
i || !b || await
|
|
787
|
+
i || !b || await a({ pageParam: (c == null ? void 0 : c.pageParam) || c.visibleRowsCount });
|
|
782
788
|
},
|
|
783
|
-
[b,
|
|
784
|
-
), f =
|
|
785
|
-
if (
|
|
786
|
-
return
|
|
787
|
-
}, [
|
|
789
|
+
[b, a, i]
|
|
790
|
+
), f = ue(() => {
|
|
791
|
+
if (n)
|
|
792
|
+
return n.pages.reduce((c, g) => [...c, ...g], []);
|
|
793
|
+
}, [n]);
|
|
788
794
|
return {
|
|
789
|
-
fetchNextPageOnRowsScrollEnd:
|
|
795
|
+
fetchNextPageOnRowsScrollEnd: o,
|
|
790
796
|
isLoading: i || m,
|
|
791
797
|
loadingVariant: s ? "skeleton" : "linear",
|
|
792
798
|
rows: f
|
|
793
799
|
};
|
|
794
|
-
},
|
|
800
|
+
}, dt = () => ({
|
|
795
801
|
clearAuthenticationToken: () => {
|
|
796
802
|
k.defaults.headers.common.Authorization = null;
|
|
797
803
|
},
|
|
798
804
|
setAuthenticationToken: ({ tokenType: i, accessToken: s }) => {
|
|
799
805
|
k.defaults.headers.common.Authorization = `${i} ${s}`;
|
|
800
806
|
}
|
|
801
|
-
}), Nr = (
|
|
802
|
-
const i = Number(
|
|
803
|
-
return Number.isNaN(i) ? `0 ${
|
|
804
|
-
}, Lr = (
|
|
805
|
-
const
|
|
806
|
-
return typeof
|
|
807
|
-
},
|
|
808
|
-
if (!
|
|
807
|
+
}), Nr = (n, a = "ddd D MMM YY") => Ve(n).format(a), Wr = (n, a = "km") => {
|
|
808
|
+
const i = Number(n);
|
|
809
|
+
return Number.isNaN(i) ? `0 ${a}` : `${i.toFixed(2)} ${a}`;
|
|
810
|
+
}, Lr = (n) => {
|
|
811
|
+
const a = n && typeof n == "object" && "pathname" in n && n.pathname ? n.pathname : n;
|
|
812
|
+
return typeof a == "string" ? a != null && a.startsWith("/") ? a != null && a.startsWith("/files") ? a : `/files${a}` : a != null && a.startsWith("files") ? `/${a}` : a != null && a.startsWith("files") ? `/${a}` : `/files/${a}` : a;
|
|
813
|
+
}, We = (n, a) => {
|
|
814
|
+
if (!n)
|
|
809
815
|
return "";
|
|
810
|
-
const i = Lr(
|
|
811
|
-
return typeof
|
|
812
|
-
},
|
|
813
|
-
const { apiURL:
|
|
816
|
+
const i = Lr(n), s = typeof n == "object" && "pathname" in n ? `${n.origin}${i}` : n;
|
|
817
|
+
return typeof a == "number" ? `${s.replace("/files", `/thumbs/${a}`)}` : s;
|
|
818
|
+
}, vt = () => {
|
|
819
|
+
const { apiURL: n } = Ye(ce);
|
|
814
820
|
return {
|
|
815
821
|
dateAdapter: Nr,
|
|
816
822
|
distanceAdapter: Wr,
|
|
817
|
-
filePathAdapter: (i, s) =>
|
|
818
|
-
|
|
819
|
-
origin:
|
|
823
|
+
filePathAdapter: (i, s) => We(
|
|
824
|
+
n && typeof i == "string" ? {
|
|
825
|
+
origin: n,
|
|
820
826
|
pathname: i
|
|
821
827
|
} : i,
|
|
822
828
|
s
|
|
823
829
|
)
|
|
824
830
|
};
|
|
825
|
-
}, Yr = (
|
|
826
|
-
const s =
|
|
831
|
+
}, Yr = (n) => n.charAt(0).toUpperCase() + n.slice(1).toLowerCase(), Mr = (n) => {
|
|
832
|
+
const s = n.split("/").filter((m) => m.length > 0).map((m) => m.replace(/\${([^}]*)}/g, "$1").split(/[_-]/).map((c) => c.charAt(0).toUpperCase() + c.slice(1)).join("")).join("");
|
|
827
833
|
return s.charAt(0).toLowerCase() + s.slice(1);
|
|
828
|
-
}, Vr = (
|
|
829
|
-
const s = Mr(
|
|
834
|
+
}, Vr = (n, a, i) => {
|
|
835
|
+
const s = Mr(a), m = Yr(i);
|
|
830
836
|
return `${s}${m}`;
|
|
831
|
-
}, Ur = (
|
|
832
|
-
if (
|
|
833
|
-
return (
|
|
837
|
+
}, Ur = (n) => {
|
|
838
|
+
if (n)
|
|
839
|
+
return (n == null ? void 0 : n.reduce((a, i) => (a[i] = {
|
|
834
840
|
query: {
|
|
835
841
|
useInfinite: !0,
|
|
836
842
|
useInfiniteQueryParam: "offset",
|
|
837
843
|
useQuery: !0
|
|
838
844
|
}
|
|
839
|
-
},
|
|
840
|
-
},
|
|
841
|
-
const { input:
|
|
845
|
+
}, a), {})) || {};
|
|
846
|
+
}, pt = (n) => {
|
|
847
|
+
const { input: a = "./openapi.json", operationsToGenerateInfiniteQueryHook: i = void 0 } = n || {};
|
|
842
848
|
return {
|
|
843
849
|
api: {
|
|
844
850
|
hooks: {
|
|
845
851
|
afterAllFilesWrite: "prettier src/api/ --write"
|
|
846
852
|
},
|
|
847
|
-
input:
|
|
853
|
+
input: a,
|
|
848
854
|
output: {
|
|
849
855
|
client: "react-query",
|
|
850
856
|
mode: "tags-split",
|
|
@@ -872,20 +878,21 @@ const et = ({
|
|
|
872
878
|
};
|
|
873
879
|
export {
|
|
874
880
|
nt as AxiosConfig,
|
|
881
|
+
st as DaysJSConfig,
|
|
875
882
|
rt as GTMSendPageView,
|
|
876
883
|
at as I18nConfig,
|
|
877
|
-
|
|
884
|
+
ce as InjectDependenciesContext,
|
|
878
885
|
tt as InjectDependenciesProvider,
|
|
879
886
|
ut as MapBoxConfig,
|
|
880
887
|
it as MaskTextField,
|
|
881
|
-
|
|
888
|
+
ct as QueryClientConfigProvider,
|
|
882
889
|
et as RequireAuth,
|
|
883
890
|
ot as SentryConfig,
|
|
884
891
|
Nr as dateAdapter,
|
|
885
892
|
Wr as distanceAdapter,
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
893
|
+
pt as getOrvalConfig,
|
|
894
|
+
vt as useAdapter,
|
|
895
|
+
dt as useAuth,
|
|
896
|
+
ft as useInfiniteDataGrid,
|
|
897
|
+
lt as useResponseError
|
|
891
898
|
};
|
package/dist/main.umd.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(f,y){typeof exports=="object"&&typeof module<"u"?y(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"],y):(f=typeof globalThis<"u"?globalThis:f||self,y(f["@tracktor/shared-module"]={},f.React,f.axios,f.reactRouterDom,f.reactGoogleTagManager,f.i18n,f.LanguageDetector,f.reactI18next,f.Sentry,f.mapbox,f.dayjs,f.reactQuery))})(this,function(f,y,P,k,Ve,x,Ye,Ue,ze,ue,se,ce){"use strict";function Be(t){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const i in t)if(i!=="default"){const u=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(a,i,u.get?u:{enumerable:!0,get:()=>t[i]})}}return a.default=t,Object.freeze(a)}const K=Be(ze);var $e=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Q={exports:{}},Y={};/**
|
|
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
|
-
`+ee+e}}var re=!1,
|
|
11
|
-
`),
|
|
12
|
-
`),b=l.length-1,R=
|
|
13
|
-
`+l[b].replace(" at new "," at ");return e.displayName&&
|
|
9
|
+
*/var le;function Ge(){return le||(le=1,process.env.NODE_ENV!=="production"&&function(){var t=y,a=Symbol.for("react.element"),i=Symbol.for("react.portal"),u=Symbol.for("react.fragment"),g=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),d=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),_=Symbol.for("react.suspense_list"),S=Symbol.for("react.memo"),O=Symbol.for("react.lazy"),A=Symbol.for("react.offscreen"),N=Symbol.iterator,E="@@iterator";function ge(e){if(e===null||typeof e!="object")return null;var r=N&&e[N]||e[E];return typeof r=="function"?r:null}var M=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function T(e){{for(var r=arguments.length,n=new Array(r>1?r-1:0),s=1;s<r;s++)n[s-1]=arguments[s];mr("error",e,n)}}function mr(e,r,n){{var s=M.ReactDebugCurrentFrame,p=s.getStackAddendum();p!==""&&(r+="%s",n=n.concat([p]));var m=n.map(function(v){return String(v)});m.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,m)}}var yr=!1,hr=!1,_r=!1,br=!1,Er=!1,me;me=Symbol.for("react.module.reference");function Rr(e){return!!(typeof e=="string"||typeof e=="function"||e===u||e===C||Er||e===g||e===h||e===_||br||e===A||yr||hr||_r||typeof e=="object"&&e!==null&&(e.$$typeof===O||e.$$typeof===S||e.$$typeof===o||e.$$typeof===d||e.$$typeof===c||e.$$typeof===me||e.getModuleId!==void 0))}function Cr(e,r,n){var s=e.displayName;if(s)return s;var p=r.displayName||r.name||"";return p!==""?n+"("+p+")":n}function ye(e){return e.displayName||"Context"}function F(e){if(e==null)return null;if(typeof e.tag=="number"&&T("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 i:return"Portal";case C:return"Profiler";case g:return"StrictMode";case h:return"Suspense";case _:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case d:var r=e;return ye(r)+".Consumer";case o:var n=e;return ye(n._context)+".Provider";case c:return Cr(e,e.render,"ForwardRef");case S:var s=e.displayName||null;return s!==null?s:F(e.type)||"Memo";case O:{var p=e,m=p._payload,v=p._init;try{return F(v(m))}catch{return null}}}return null}var L=Object.assign,z=0,he,_e,be,Ee,Re,Ce,Te;function Se(){}Se.__reactDisabledLog=!0;function Tr(){{if(z===0){he=console.log,_e=console.info,be=console.warn,Ee=console.error,Re=console.group,Ce=console.groupCollapsed,Te=console.groupEnd;var e={configurable:!0,enumerable:!0,value:Se,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}z++}}function Sr(){{if(z--,z===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:L({},e,{value:he}),info:L({},e,{value:_e}),warn:L({},e,{value:be}),error:L({},e,{value:Ee}),group:L({},e,{value:Re}),groupCollapsed:L({},e,{value:Ce}),groupEnd:L({},e,{value:Te})})}z<0&&T("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Z=M.ReactCurrentDispatcher,ee;function G(e,r,n){{if(ee===void 0)try{throw Error()}catch(p){var s=p.stack.trim().match(/\n( *(at )?)/);ee=s&&s[1]||""}return`
|
|
10
|
+
`+ee+e}}var re=!1,J;{var wr=typeof WeakMap=="function"?WeakMap:Map;J=new wr}function we(e,r){if(!e||re)return"";{var n=J.get(e);if(n!==void 0)return n}var s;re=!0;var p=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var m;m=Z.current,Z.current=null,Tr();try{if(r){var v=function(){throw Error()};if(Object.defineProperty(v.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(v,[])}catch(I){s=I}Reflect.construct(e,[],v)}else{try{v.call()}catch(I){s=I}e.call(v.prototype)}}else{try{throw Error()}catch(I){s=I}e()}}catch(I){if(I&&s&&typeof I.stack=="string"){for(var l=I.stack.split(`
|
|
11
|
+
`),w=s.stack.split(`
|
|
12
|
+
`),b=l.length-1,R=w.length-1;b>=1&&R>=0&&l[b]!==w[R];)R--;for(;b>=1&&R>=0;b--,R--)if(l[b]!==w[R]){if(b!==1||R!==1)do if(b--,R--,R<0||l[b]!==w[R]){var j=`
|
|
13
|
+
`+l[b].replace(" at new "," at ");return e.displayName&&j.includes("<anonymous>")&&(j=j.replace("<anonymous>",e.displayName)),typeof e=="function"&&J.set(e,j),j}while(b>=1&&R>=0);break}}}finally{re=!1,Z.current=m,Sr(),Error.prepareStackTrace=p}var V=e?e.displayName||e.name:"",We=V?G(V):"";return typeof e=="function"&&J.set(e,We),We}function Or(e,r,n){return we(e,!1)}function jr(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function q(e,r,n){if(e==null)return"";if(typeof e=="function")return we(e,jr(e));if(typeof e=="string")return G(e);switch(e){case h:return G("Suspense");case _:return G("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case c:return Or(e.render);case S:return q(e.type,r,n);case O:{var s=e,p=s._payload,m=s._init;try{return q(m(p),r,n)}catch{}}}return""}var X=Object.prototype.hasOwnProperty,Oe={},je=M.ReactDebugCurrentFrame;function H(e){if(e){var r=e._owner,n=q(e.type,e._source,r?r.type:null);je.setExtraStackFrame(n)}else je.setExtraStackFrame(null)}function Pr(e,r,n,s,p){{var m=Function.call.bind(X);for(var v in e)if(m(e,v)){var l=void 0;try{if(typeof e[v]!="function"){var w=Error((s||"React class")+": "+n+" type `"+v+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[v]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw w.name="Invariant Violation",w}l=e[v](r,v,s,n,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(b){l=b}l&&!(l instanceof Error)&&(H(p),T("%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",n,v,typeof l),H(null)),l instanceof Error&&!(l.message in Oe)&&(Oe[l.message]=!0,H(p),T("Failed %s type: %s",n,l.message),H(null))}}}var kr=Array.isArray;function te(e){return kr(e)}function Ar(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,n=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return n}}function xr(e){try{return Pe(e),!1}catch{return!0}}function Pe(e){return""+e}function ke(e){if(xr(e))return T("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Ar(e)),Pe(e)}var B=M.ReactCurrentOwner,Dr={key:!0,ref:!0,__self:!0,__source:!0},Ae,xe,ne;ne={};function Fr(e){if(X.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function Ir(e){if(X.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function Nr(e,r){if(typeof e.ref=="string"&&B.current&&r&&B.current.stateNode!==r){var n=F(B.current.type);ne[n]||(T('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(B.current.type),e.ref),ne[n]=!0)}}function Mr(e,r){{var n=function(){Ae||(Ae=!0,T("%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))};n.isReactWarning=!0,Object.defineProperty(e,"key",{get:n,configurable:!0})}}function Lr(e,r){{var n=function(){xe||(xe=!0,T("%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))};n.isReactWarning=!0,Object.defineProperty(e,"ref",{get:n,configurable:!0})}}var Wr=function(e,r,n,s,p,m,v){var l={$$typeof:a,type:e,key:r,ref:n,props:v,_owner:m};return l._store={},Object.defineProperty(l._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(l,"_self",{configurable:!1,enumerable:!1,writable:!1,value:s}),Object.defineProperty(l,"_source",{configurable:!1,enumerable:!1,writable:!1,value:p}),Object.freeze&&(Object.freeze(l.props),Object.freeze(l)),l};function Vr(e,r,n,s,p){{var m,v={},l=null,w=null;n!==void 0&&(ke(n),l=""+n),Ir(r)&&(ke(r.key),l=""+r.key),Fr(r)&&(w=r.ref,Nr(r,p));for(m in r)X.call(r,m)&&!Dr.hasOwnProperty(m)&&(v[m]=r[m]);if(e&&e.defaultProps){var b=e.defaultProps;for(m in b)v[m]===void 0&&(v[m]=b[m])}if(l||w){var R=typeof e=="function"?e.displayName||e.name||"Unknown":e;l&&Mr(v,R),w&&Lr(v,R)}return Wr(e,l,w,p,s,B.current,v)}}var ae=M.ReactCurrentOwner,De=M.ReactDebugCurrentFrame;function W(e){if(e){var r=e._owner,n=q(e.type,e._source,r?r.type:null);De.setExtraStackFrame(n)}else De.setExtraStackFrame(null)}var oe;oe=!1;function ie(e){return typeof e=="object"&&e!==null&&e.$$typeof===a}function Fe(){{if(ae.current){var e=F(ae.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 Yr(e){{if(e!==void 0){var r=e.fileName.replace(/^.*[\\\/]/,""),n=e.lineNumber;return`
|
|
16
16
|
|
|
17
|
-
Check your code at `+r+":"+
|
|
17
|
+
Check your code at `+r+":"+n+"."}return""}}var Ie={};function Ur(e){{var r=Fe();if(!r){var n=typeof e=="string"?e:e.displayName||e.name;n&&(r=`
|
|
18
18
|
|
|
19
|
-
Check the top-level render call using <`+
|
|
19
|
+
Check the top-level render call using <`+n+">.")}return r}}function Ne(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var n=Ur(r);if(Ie[n])return;Ie[n]=!0;var s="";e&&e._owner&&e._owner!==ae.current&&(s=" It was passed a child from "+F(e._owner.type)+"."),W(e),T('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',n,s),W(null)}}function Me(e,r){{if(typeof e!="object")return;if(te(e))for(var n=0;n<e.length;n++){var s=e[n];ie(s)&&Ne(s,r)}else if(ie(e))e._store&&(e._store.validated=!0);else if(e){var p=ge(e);if(typeof p=="function"&&p!==e.entries)for(var m=p.call(e),v;!(v=m.next()).done;)ie(v.value)&&Ne(v.value,r)}}}function zr(e){{var r=e.type;if(r==null||typeof r=="string")return;var n;if(typeof r=="function")n=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===c||r.$$typeof===S))n=r.propTypes;else return;if(n){var s=F(r);Pr(n,e.props,"prop",s,e)}else if(r.PropTypes!==void 0&&!oe){oe=!0;var p=F(r);T("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",p||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&T("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Br(e){{for(var r=Object.keys(e.props),n=0;n<r.length;n++){var s=r[n];if(s!=="children"&&s!=="key"){W(e),T("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",s),W(null);break}}e.ref!==null&&(W(e),T("Invalid attribute `ref` supplied to `React.Fragment`."),W(null))}}function Le(e,r,n,s,p,m){{var v=Rr(e);if(!v){var l="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(l+=" 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 w=Yr(p);w?l+=w:l+=Fe();var b;e===null?b="null":te(e)?b="array":e!==void 0&&e.$$typeof===a?(b="<"+(F(e.type)||"Unknown")+" />",l=" Did you accidentally export a JSX literal instead of a component?"):b=typeof e,T("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",b,l)}var R=Vr(e,r,n,p,m);if(R==null)return R;if(v){var j=r.children;if(j!==void 0)if(s)if(te(j)){for(var V=0;V<j.length;V++)Me(j[V],e);Object.freeze&&Object.freeze(j)}else T("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 Me(j,e)}return e===u?Br(R):zr(R),R}}function $r(e,r,n){return Le(e,r,n,!0)}function Gr(e,r,n){return Le(e,r,n,!1)}var Jr=Gr,qr=$r;Y.Fragment=u,Y.jsx=Jr,Y.jsxs=qr}()),Y}var U={};/**
|
|
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 <`+t+">.")}return r}}function Ie(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
|
|
27
|
+
*/var fe;function Je(){if(fe)return U;fe=1;var t=y,a=Symbol.for("react.element"),i=Symbol.for("react.fragment"),u=Object.prototype.hasOwnProperty,g=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,C={key:!0,ref:!0,__self:!0,__source:!0};function o(d,c,h){var _,S={},O=null,A=null;h!==void 0&&(O=""+h),c.key!==void 0&&(O=""+c.key),c.ref!==void 0&&(A=c.ref);for(_ in c)u.call(c,_)&&!C.hasOwnProperty(_)&&(S[_]=c[_]);if(d&&d.defaultProps)for(_ in c=d.defaultProps,c)S[_]===void 0&&(S[_]=c[_]);return{$$typeof:a,type:d,key:O,ref:A,props:S,_owner:g.current}}return U.Fragment=i,U.jsx=o,U.jsxs=o,U}process.env.NODE_ENV==="production"?Q.exports=Je():Q.exports=Ge();var D=Q.exports;const qe=({Fallback:t,loginPath:a="/login",localStorageKey:i="user",redirect401Path:u="/login",isLogged:g})=>{var S,O,A,N;const[C,o]=y.useState(null),d=k.useLocation(),c=y.useRef(!1),h=typeof g=="function"?g():!!g,_=typeof h=="boolean"?h:h==null?void 0:h.isLogged;return y.useLayoutEffect(()=>{c.current||(c.current=!0,P==null||P.interceptors.response.use(E=>E,async E=>{var T;return typeof E=="object"&&E&&"response"in E&&E.response&&typeof E.response=="object"&&"status"in E.response&&E.response&&typeof E.response=="object"&&"status"in E.response&&((T=E==null?void 0:E.response)==null?void 0:T.status)===401&&(P.defaults.headers.common.Authorization=null,localStorage.removeItem(i),o(u)),Promise.reject(E)}))},[i,u]),_&&!C?D.jsx(y.Suspense,{fallback:t,children:(O=(S=d.state)==null?void 0:S.from)!=null&&O.state&&((N=(A=d.state)==null?void 0:A.from)==null?void 0:N.pathname)===a?D.jsx(k.Navigate,{to:d.state.from.state.from.pathname+d.state.from.state.from.search,replace:!0}):D.jsx(k.Outlet,{})}):D.jsx(k.Navigate,{to:a,state:{from:d},replace:!0})},Xe=()=>{const{pathname:t}=k.useLocation(),{sendEvent:a}=Ve.useGoogleTagManager();return y.useEffect(()=>{a({event:"pageView",pathname:t})},[t,a]),D.jsx(k.Outlet,{})},$=y.createContext({apiURL:void 0,children:void 0}),He=({children:t,apiURL:a})=>{const i=y.useMemo(()=>({apiURL:a}),[a]);return D.jsx($.Provider,{value:i,children:t})},Ke=({tokenTypeKey:t="tokenType",userLocalStorageKey:a="user",tokenKey:i="accessToken",postContentType:u="application/json",...g})=>{const{apiURL:C=g.baseURL}=y.useContext($);if(!P.defaults)return null;const o=localStorage.getItem(a),d=o?JSON.parse(o):null,c=d!=null&&d[t]?d[t]:null,h=d!=null&&d[i]?d[i]:null,_=o?`${c} ${h}`:null;return P.defaults.baseURL=C,P.defaults.headers.post["Content-Type"]=u,_&&(P.defaults.headers.common.Authorization=_),null},Qe=({debug:t,resources:a})=>(x!=null&&x.isInitialized||(x.use(Ye).use(Ue.initReactI18next).init({debug:t,fallbackLng:"en",interpolation:{escapeValue:!1},load:"languageOnly",react:{bindI18n:!1,useSuspense:!0},resources:a,returnNull:!1}).then(()=>{document.documentElement.lang!==x.resolvedLanguage&&x.resolvedLanguage&&document.documentElement.setAttribute("lang",x.resolvedLanguage)}),x.on("languageChanged",i=>{document.documentElement.setAttribute("lang",i)})),null),Ze=({dsn:t,integrations:a,tracesSampleRate:i,replaysSessionSampleRate:u,replaysOnErrorSampleRate:g,tracePropagationTargets:C,ignoreErrors:o,debug:d,environment:c})=>(K.isInitialized()||(d||process.env.NODE_ENV==="prod"||process.env.NODE_ENV==="production")&&K.init({debug:d,dsn:t,environment:c||"production",ignoreErrors:[...o||[],/dynamically imported module/],integrations:[K.reactRouterV6BrowserTracingIntegration({createRoutesFromChildren:k.createRoutesFromChildren,matchRoutes:k.matchRoutes,useEffect:y.useEffect,useLocation:k.useLocation,useNavigationType:k.useNavigationType}),...a||[]],replaysOnErrorSampleRate:g||1,replaysSessionSampleRate:u||.1,tracePropagationTargets:C,tracesSampleRate:i||1}),null),er=({IMaskMixin:t,...a})=>{const i=y.useMemo(()=>t(({TextField:u,...g})=>D.jsx(u,{...g})),[t]);return D.jsx(i,{...a})},rr=({accessToken:t})=>(ue&&t&&(ue.accessToken=t),null),tr=({language:t=window.navigator.language})=>(y.useEffect(()=>{import(`dayjs/locale/${t}`).then(()=>{se.locale(t)}).catch(()=>{Promise.resolve().then(()=>gr)})},[t]),null),nr=({children:t,defaultQueriesOptions:a,defaultMutationsOptions:i})=>{const u=new ce.QueryClient({defaultOptions:{mutations:{...i},queries:{getNextPageParam:(g,C,o)=>g.length+(o||0),refetchOnWindowFocus:!1,retry:3,...a}}});return D.jsx(ce.QueryClientProvider,{client:u,children:t})},ar=t=>{const{unknownErrorTranslationKey:a="error.unknownError"}=t||{},i=x.t(a),u=y.useCallback(C=>{var d,c,h,_,S,O,A,N,E;const{response:o}=C||{};return o!=null&&o.reason?String(o.reason):(d=o==null?void 0:o.data)!=null&&d.reason?String(o.data.reason):(c=o==null?void 0:o.data)!=null&&c.message?String(o.data.message):(_=(h=o==null?void 0:o.data)==null?void 0:h.detail)!=null&&_.length&&Array.isArray((S=o==null?void 0:o.data)==null?void 0:S.detail)&&((A=(O=o==null?void 0:o.data)==null?void 0:O.detail[0])!=null&&A.msg)&&typeof((E=(N=o==null?void 0:o.data)==null?void 0:N.detail[0])==null?void 0:E.msg)=="string"?String(o.data.detail[0].msg):i},[i]);return{getErrorCode:y.useCallback(C=>{var d,c,h;const{response:o}=C||{};return o!=null&&o.error_code?String(o==null?void 0:o.error_code):(d=o==null?void 0:o.data)!=null&&d.error_code?String((c=o==null?void 0:o.data)==null?void 0:c.error_code):o!=null&&o.error_code?String(o==null?void 0:o.error_code):(h=o==null?void 0:o.data)!=null&&h.error_code?String(o.data.error_code):"unknown_error_code"},[]),printError:u}},or=({data:t,fetchNextPage:a,isFetchingNextPage:i,isInitialLoading:u,isLoading:g,enabled:C=!0})=>{const o=y.useCallback(async c=>{i||!C||await a({pageParam:(c==null?void 0:c.pageParam)||c.visibleRowsCount})},[C,a,i]),d=y.useMemo(()=>{if(t)return t.pages.reduce((c,h)=>[...c,...h],[])},[t]);return{fetchNextPageOnRowsScrollEnd:o,isLoading:i||g,loadingVariant:u?"skeleton":"linear",rows:d}},ir=()=>({clearAuthenticationToken:()=>{P.defaults.headers.common.Authorization=null},setAuthenticationToken:({tokenType:i,accessToken:u})=>{P.defaults.headers.common.Authorization=`${i} ${u}`}}),de=(t,a="ddd D MMM YY")=>se(t).format(a),ve=(t,a="km")=>{const i=Number(t);return Number.isNaN(i)?`0 ${a}`:`${i.toFixed(2)} ${a}`},ur=t=>{const a=t&&typeof t=="object"&&"pathname"in t&&t.pathname?t.pathname:t;return typeof a=="string"?a!=null&&a.startsWith("/")?a!=null&&a.startsWith("/files")?a:`/files${a}`:a!=null&&a.startsWith("files")?`/${a}`:a!=null&&a.startsWith("files")?`/${a}`:`/files/${a}`:a},pe=(t,a)=>{if(!t)return"";const i=ur(t),u=typeof t=="object"&&"pathname"in t?`${t.origin}${i}`:t;return typeof a=="number"?`${u.replace("/files",`/thumbs/${a}`)}`:u},sr=()=>{const{apiURL:t}=y.useContext($);return{dateAdapter:de,distanceAdapter:ve,filePathAdapter:(i,u)=>pe(t&&typeof i=="string"?{origin:t,pathname:i}:i,u)}},cr=t=>t.charAt(0).toUpperCase()+t.slice(1).toLowerCase(),lr=t=>{const u=t.split("/").filter(g=>g.length>0).map(g=>g.replace(/\${([^}]*)}/g,"$1").split(/[_-]/).map(c=>c.charAt(0).toUpperCase()+c.slice(1)).join("")).join("");return u.charAt(0).toLowerCase()+u.slice(1)},fr=(t,a,i)=>{const u=lr(a),g=cr(i);return`${u}${g}`},dr=t=>{if(t)return(t==null?void 0:t.reduce((a,i)=>(a[i]={query:{useInfinite:!0,useInfiniteQueryParam:"offset",useQuery:!0}},a),{}))||{}},vr=t=>{const{input:a="./openapi.json",operationsToGenerateInfiniteQueryHook:i=void 0}=t||{};return{api:{hooks:{afterAllFilesWrite:"prettier src/api/ --write"},input:a,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:fr,...(i==null?void 0:i.length)&&{operations:dr(i)},query:{useQuery:!0}},schemas:"src/api/model",target:"src/api/services/api.ts"}}}};var pr={exports:{}};(function(t,a){(function(i,u){t.exports=u()})($e,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"],g=i%100;return"["+i+(u[(g-20)%10]||u[g]||u[0])+"]"}}})})(pr);const gr=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));f.AxiosConfig=Ke,f.DaysJSConfig=tr,f.GTMSendPageView=Xe,f.I18nConfig=Qe,f.InjectDependenciesContext=$,f.InjectDependenciesProvider=He,f.MapBoxConfig=rr,f.MaskTextField=er,f.QueryClientConfigProvider=nr,f.RequireAuth=qe,f.SentryConfig=Ze,f.dateAdapter=de,f.distanceAdapter=ve,f.getOrvalConfig=vr,f.useAdapter=sr,f.useAuth=ir,f.useInfiniteDataGrid=or,f.useResponseError=ar,Object.defineProperty(f,Symbol.toStringTag,{value:"Module"})});
|