@tracktor/shared-module 1.0.5 → 1.0.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/README.md +10 -12
- package/dist/components/Utils/GTMSendPageView.d.ts +1 -13
- package/dist/components/Utils/RequireAuth.d.ts +12 -22
- package/dist/context/InjectDependenciesProvider.d.ts +3 -42
- package/dist/{en-1o5U8jiL.js → en-QSkYj0iy.js} +1 -1
- package/dist/{fr-EMqEUav3.js → fr-TlWvAsWw.js} +1 -1
- package/dist/hooks/useAdapter/useAdapter.d.ts +2 -13
- package/dist/hooks/useAuth/useAuth.d.ts +1 -8
- package/dist/hooks/useResponseError/useResponseError.d.ts +1 -6
- package/dist/main-srWqMrqy.js +968 -0
- package/dist/main.js +1 -1
- package/dist/main.umd.cjs +10 -10
- package/dist/utils/adapter/dateAdapter.d.ts +2 -5
- package/package.json +1 -1
- package/dist/main-EkPM5n5x.js +0 -973
|
@@ -0,0 +1,968 @@
|
|
|
1
|
+
import Ie, { useState as ie, useRef as _r, useLayoutEffect as Ne, Suspense as Cr, useEffect as X, createContext as Tr, useMemo as le, useContext as We, useCallback as se } from "react";
|
|
2
|
+
import M from "axios";
|
|
3
|
+
import { useLocation as Ve, Navigate as Le, Outlet as wr, createRoutesFromChildren as Sr, matchRoutes as xr, useNavigationType as Or } from "react-router-dom";
|
|
4
|
+
import I, { t as jr } from "i18next";
|
|
5
|
+
import Pr from "i18next-browser-languagedetector";
|
|
6
|
+
import { initReactI18next as Ar } from "react-i18next";
|
|
7
|
+
import * as oe from "@sentry/react";
|
|
8
|
+
import U from "dayjs";
|
|
9
|
+
import { QueryClient as kr, QueryClientProvider as Dr } from "@tanstack/react-query";
|
|
10
|
+
var Mr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
11
|
+
function Lr(t) {
|
|
12
|
+
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
13
|
+
}
|
|
14
|
+
var ue = { exports: {} }, V = {};
|
|
15
|
+
/**
|
|
16
|
+
* @license React
|
|
17
|
+
* react-jsx-runtime.development.js
|
|
18
|
+
*
|
|
19
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
20
|
+
*
|
|
21
|
+
* This source code is licensed under the MIT license found in the
|
|
22
|
+
* LICENSE file in the root directory of this source tree.
|
|
23
|
+
*/
|
|
24
|
+
var $e;
|
|
25
|
+
function $r() {
|
|
26
|
+
return $e || ($e = 1, process.env.NODE_ENV !== "production" && function() {
|
|
27
|
+
var t = Ie, n = Symbol.for("react.element"), i = Symbol.for("react.portal"), s = Symbol.for("react.fragment"), p = Symbol.for("react.strict_mode"), g = Symbol.for("react.profiler"), o = Symbol.for("react.provider"), c = Symbol.for("react.context"), l = Symbol.for("react.forward_ref"), h = Symbol.for("react.suspense"), y = Symbol.for("react.suspense_list"), C = Symbol.for("react.memo"), T = Symbol.for("react.lazy"), O = Symbol.for("react.offscreen"), j = Symbol.iterator, S = "@@iterator";
|
|
28
|
+
function R(e) {
|
|
29
|
+
if (e === null || typeof e != "object")
|
|
30
|
+
return null;
|
|
31
|
+
var r = j && e[j] || e[S];
|
|
32
|
+
return typeof r == "function" ? r : null;
|
|
33
|
+
}
|
|
34
|
+
var D = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
35
|
+
function _(e) {
|
|
36
|
+
{
|
|
37
|
+
for (var r = arguments.length, a = new Array(r > 1 ? r - 1 : 0), u = 1; u < r; u++)
|
|
38
|
+
a[u - 1] = arguments[u];
|
|
39
|
+
$("error", e, a);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
function $(e, r, a) {
|
|
43
|
+
{
|
|
44
|
+
var u = D.ReactDebugCurrentFrame, v = u.getStackAddendum();
|
|
45
|
+
v !== "" && (r += "%s", a = a.concat([v]));
|
|
46
|
+
var m = a.map(function(d) {
|
|
47
|
+
return String(d);
|
|
48
|
+
});
|
|
49
|
+
m.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, m);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
var Ue = !1, Be = !1, Ge = !1, qe = !1, Je = !1, fe;
|
|
53
|
+
fe = Symbol.for("react.module.reference");
|
|
54
|
+
function He(e) {
|
|
55
|
+
return !!(typeof e == "string" || typeof e == "function" || e === s || e === g || Je || e === p || e === h || e === y || qe || e === O || Ue || 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
|
|
56
|
+
// types supported by any Flight configuration anywhere since
|
|
57
|
+
// we don't know which Flight build this will end up being used
|
|
58
|
+
// with.
|
|
59
|
+
e.$$typeof === fe || e.getModuleId !== void 0));
|
|
60
|
+
}
|
|
61
|
+
function Xe(e, r, a) {
|
|
62
|
+
var u = e.displayName;
|
|
63
|
+
if (u)
|
|
64
|
+
return u;
|
|
65
|
+
var v = r.displayName || r.name || "";
|
|
66
|
+
return v !== "" ? a + "(" + v + ")" : a;
|
|
67
|
+
}
|
|
68
|
+
function de(e) {
|
|
69
|
+
return e.displayName || "Context";
|
|
70
|
+
}
|
|
71
|
+
function A(e) {
|
|
72
|
+
if (e == null)
|
|
73
|
+
return null;
|
|
74
|
+
if (typeof e.tag == "number" && _("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
|
|
75
|
+
return e.displayName || e.name || null;
|
|
76
|
+
if (typeof e == "string")
|
|
77
|
+
return e;
|
|
78
|
+
switch (e) {
|
|
79
|
+
case s:
|
|
80
|
+
return "Fragment";
|
|
81
|
+
case i:
|
|
82
|
+
return "Portal";
|
|
83
|
+
case g:
|
|
84
|
+
return "Profiler";
|
|
85
|
+
case p:
|
|
86
|
+
return "StrictMode";
|
|
87
|
+
case h:
|
|
88
|
+
return "Suspense";
|
|
89
|
+
case y:
|
|
90
|
+
return "SuspenseList";
|
|
91
|
+
}
|
|
92
|
+
if (typeof e == "object")
|
|
93
|
+
switch (e.$$typeof) {
|
|
94
|
+
case c:
|
|
95
|
+
var r = e;
|
|
96
|
+
return de(r) + ".Consumer";
|
|
97
|
+
case o:
|
|
98
|
+
var a = e;
|
|
99
|
+
return de(a._context) + ".Provider";
|
|
100
|
+
case l:
|
|
101
|
+
return Xe(e, e.render, "ForwardRef");
|
|
102
|
+
case C:
|
|
103
|
+
var u = e.displayName || null;
|
|
104
|
+
return u !== null ? u : A(e.type) || "Memo";
|
|
105
|
+
case T: {
|
|
106
|
+
var v = e, m = v._payload, d = v._init;
|
|
107
|
+
try {
|
|
108
|
+
return A(d(m));
|
|
109
|
+
} catch {
|
|
110
|
+
return null;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
return null;
|
|
115
|
+
}
|
|
116
|
+
var L = Object.assign, N = 0, pe, ve, me, ge, he, ye, be;
|
|
117
|
+
function Ee() {
|
|
118
|
+
}
|
|
119
|
+
Ee.__reactDisabledLog = !0;
|
|
120
|
+
function Ke() {
|
|
121
|
+
{
|
|
122
|
+
if (N === 0) {
|
|
123
|
+
pe = console.log, ve = console.info, me = console.warn, ge = console.error, he = console.group, ye = console.groupCollapsed, be = console.groupEnd;
|
|
124
|
+
var e = {
|
|
125
|
+
configurable: !0,
|
|
126
|
+
enumerable: !0,
|
|
127
|
+
value: Ee,
|
|
128
|
+
writable: !0
|
|
129
|
+
};
|
|
130
|
+
Object.defineProperties(console, {
|
|
131
|
+
info: e,
|
|
132
|
+
log: e,
|
|
133
|
+
warn: e,
|
|
134
|
+
error: e,
|
|
135
|
+
group: e,
|
|
136
|
+
groupCollapsed: e,
|
|
137
|
+
groupEnd: e
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
N++;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
function Ze() {
|
|
144
|
+
{
|
|
145
|
+
if (N--, N === 0) {
|
|
146
|
+
var e = {
|
|
147
|
+
configurable: !0,
|
|
148
|
+
enumerable: !0,
|
|
149
|
+
writable: !0
|
|
150
|
+
};
|
|
151
|
+
Object.defineProperties(console, {
|
|
152
|
+
log: L({}, e, {
|
|
153
|
+
value: pe
|
|
154
|
+
}),
|
|
155
|
+
info: L({}, e, {
|
|
156
|
+
value: ve
|
|
157
|
+
}),
|
|
158
|
+
warn: L({}, e, {
|
|
159
|
+
value: me
|
|
160
|
+
}),
|
|
161
|
+
error: L({}, e, {
|
|
162
|
+
value: ge
|
|
163
|
+
}),
|
|
164
|
+
group: L({}, e, {
|
|
165
|
+
value: he
|
|
166
|
+
}),
|
|
167
|
+
groupCollapsed: L({}, e, {
|
|
168
|
+
value: ye
|
|
169
|
+
}),
|
|
170
|
+
groupEnd: L({}, e, {
|
|
171
|
+
value: be
|
|
172
|
+
})
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
N < 0 && _("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
var K = D.ReactCurrentDispatcher, Z;
|
|
179
|
+
function B(e, r, a) {
|
|
180
|
+
{
|
|
181
|
+
if (Z === void 0)
|
|
182
|
+
try {
|
|
183
|
+
throw Error();
|
|
184
|
+
} catch (v) {
|
|
185
|
+
var u = v.stack.trim().match(/\n( *(at )?)/);
|
|
186
|
+
Z = u && u[1] || "";
|
|
187
|
+
}
|
|
188
|
+
return `
|
|
189
|
+
` + Z + e;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
var Q = !1, G;
|
|
193
|
+
{
|
|
194
|
+
var Qe = typeof WeakMap == "function" ? WeakMap : Map;
|
|
195
|
+
G = new Qe();
|
|
196
|
+
}
|
|
197
|
+
function Re(e, r) {
|
|
198
|
+
if (!e || Q)
|
|
199
|
+
return "";
|
|
200
|
+
{
|
|
201
|
+
var a = G.get(e);
|
|
202
|
+
if (a !== void 0)
|
|
203
|
+
return a;
|
|
204
|
+
}
|
|
205
|
+
var u;
|
|
206
|
+
Q = !0;
|
|
207
|
+
var v = Error.prepareStackTrace;
|
|
208
|
+
Error.prepareStackTrace = void 0;
|
|
209
|
+
var m;
|
|
210
|
+
m = K.current, K.current = null, Ke();
|
|
211
|
+
try {
|
|
212
|
+
if (r) {
|
|
213
|
+
var d = function() {
|
|
214
|
+
throw Error();
|
|
215
|
+
};
|
|
216
|
+
if (Object.defineProperty(d.prototype, "props", {
|
|
217
|
+
set: function() {
|
|
218
|
+
throw Error();
|
|
219
|
+
}
|
|
220
|
+
}), typeof Reflect == "object" && Reflect.construct) {
|
|
221
|
+
try {
|
|
222
|
+
Reflect.construct(d, []);
|
|
223
|
+
} catch (k) {
|
|
224
|
+
u = k;
|
|
225
|
+
}
|
|
226
|
+
Reflect.construct(e, [], d);
|
|
227
|
+
} else {
|
|
228
|
+
try {
|
|
229
|
+
d.call();
|
|
230
|
+
} catch (k) {
|
|
231
|
+
u = k;
|
|
232
|
+
}
|
|
233
|
+
e.call(d.prototype);
|
|
234
|
+
}
|
|
235
|
+
} else {
|
|
236
|
+
try {
|
|
237
|
+
throw Error();
|
|
238
|
+
} catch (k) {
|
|
239
|
+
u = k;
|
|
240
|
+
}
|
|
241
|
+
e();
|
|
242
|
+
}
|
|
243
|
+
} catch (k) {
|
|
244
|
+
if (k && u && typeof k.stack == "string") {
|
|
245
|
+
for (var f = k.stack.split(`
|
|
246
|
+
`), w = u.stack.split(`
|
|
247
|
+
`), b = f.length - 1, E = w.length - 1; b >= 1 && E >= 0 && f[b] !== w[E]; )
|
|
248
|
+
E--;
|
|
249
|
+
for (; b >= 1 && E >= 0; b--, E--)
|
|
250
|
+
if (f[b] !== w[E]) {
|
|
251
|
+
if (b !== 1 || E !== 1)
|
|
252
|
+
do
|
|
253
|
+
if (b--, E--, E < 0 || f[b] !== w[E]) {
|
|
254
|
+
var x = `
|
|
255
|
+
` + f[b].replace(" at new ", " at ");
|
|
256
|
+
return e.displayName && x.includes("<anonymous>") && (x = x.replace("<anonymous>", e.displayName)), typeof e == "function" && G.set(e, x), x;
|
|
257
|
+
}
|
|
258
|
+
while (b >= 1 && E >= 0);
|
|
259
|
+
break;
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
} finally {
|
|
263
|
+
Q = !1, K.current = m, Ze(), Error.prepareStackTrace = v;
|
|
264
|
+
}
|
|
265
|
+
var Y = e ? e.displayName || e.name : "", Me = Y ? B(Y) : "";
|
|
266
|
+
return typeof e == "function" && G.set(e, Me), Me;
|
|
267
|
+
}
|
|
268
|
+
function er(e, r, a) {
|
|
269
|
+
return Re(e, !1);
|
|
270
|
+
}
|
|
271
|
+
function rr(e) {
|
|
272
|
+
var r = e.prototype;
|
|
273
|
+
return !!(r && r.isReactComponent);
|
|
274
|
+
}
|
|
275
|
+
function q(e, r, a) {
|
|
276
|
+
if (e == null)
|
|
277
|
+
return "";
|
|
278
|
+
if (typeof e == "function")
|
|
279
|
+
return Re(e, rr(e));
|
|
280
|
+
if (typeof e == "string")
|
|
281
|
+
return B(e);
|
|
282
|
+
switch (e) {
|
|
283
|
+
case h:
|
|
284
|
+
return B("Suspense");
|
|
285
|
+
case y:
|
|
286
|
+
return B("SuspenseList");
|
|
287
|
+
}
|
|
288
|
+
if (typeof e == "object")
|
|
289
|
+
switch (e.$$typeof) {
|
|
290
|
+
case l:
|
|
291
|
+
return er(e.render);
|
|
292
|
+
case C:
|
|
293
|
+
return q(e.type, r, a);
|
|
294
|
+
case T: {
|
|
295
|
+
var u = e, v = u._payload, m = u._init;
|
|
296
|
+
try {
|
|
297
|
+
return q(m(v), r, a);
|
|
298
|
+
} catch {
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
return "";
|
|
303
|
+
}
|
|
304
|
+
var J = Object.prototype.hasOwnProperty, _e = {}, Ce = D.ReactDebugCurrentFrame;
|
|
305
|
+
function H(e) {
|
|
306
|
+
if (e) {
|
|
307
|
+
var r = e._owner, a = q(e.type, e._source, r ? r.type : null);
|
|
308
|
+
Ce.setExtraStackFrame(a);
|
|
309
|
+
} else
|
|
310
|
+
Ce.setExtraStackFrame(null);
|
|
311
|
+
}
|
|
312
|
+
function tr(e, r, a, u, v) {
|
|
313
|
+
{
|
|
314
|
+
var m = Function.call.bind(J);
|
|
315
|
+
for (var d in e)
|
|
316
|
+
if (m(e, d)) {
|
|
317
|
+
var f = void 0;
|
|
318
|
+
try {
|
|
319
|
+
if (typeof e[d] != "function") {
|
|
320
|
+
var w = Error((u || "React class") + ": " + a + " type `" + d + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[d] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
321
|
+
throw w.name = "Invariant Violation", w;
|
|
322
|
+
}
|
|
323
|
+
f = e[d](r, d, u, a, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
324
|
+
} catch (b) {
|
|
325
|
+
f = b;
|
|
326
|
+
}
|
|
327
|
+
f && !(f instanceof Error) && (H(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", a, d, typeof f), H(null)), f instanceof Error && !(f.message in _e) && (_e[f.message] = !0, H(v), _("Failed %s type: %s", a, f.message), H(null));
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
var nr = Array.isArray;
|
|
332
|
+
function ee(e) {
|
|
333
|
+
return nr(e);
|
|
334
|
+
}
|
|
335
|
+
function ar(e) {
|
|
336
|
+
{
|
|
337
|
+
var r = typeof Symbol == "function" && Symbol.toStringTag, a = r && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
338
|
+
return a;
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
function or(e) {
|
|
342
|
+
try {
|
|
343
|
+
return Te(e), !1;
|
|
344
|
+
} catch {
|
|
345
|
+
return !0;
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
function Te(e) {
|
|
349
|
+
return "" + e;
|
|
350
|
+
}
|
|
351
|
+
function we(e) {
|
|
352
|
+
if (or(e))
|
|
353
|
+
return _("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", ar(e)), Te(e);
|
|
354
|
+
}
|
|
355
|
+
var W = D.ReactCurrentOwner, ir = {
|
|
356
|
+
key: !0,
|
|
357
|
+
ref: !0,
|
|
358
|
+
__self: !0,
|
|
359
|
+
__source: !0
|
|
360
|
+
}, Se, xe, re;
|
|
361
|
+
re = {};
|
|
362
|
+
function sr(e) {
|
|
363
|
+
if (J.call(e, "ref")) {
|
|
364
|
+
var r = Object.getOwnPropertyDescriptor(e, "ref").get;
|
|
365
|
+
if (r && r.isReactWarning)
|
|
366
|
+
return !1;
|
|
367
|
+
}
|
|
368
|
+
return e.ref !== void 0;
|
|
369
|
+
}
|
|
370
|
+
function ur(e) {
|
|
371
|
+
if (J.call(e, "key")) {
|
|
372
|
+
var r = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
373
|
+
if (r && r.isReactWarning)
|
|
374
|
+
return !1;
|
|
375
|
+
}
|
|
376
|
+
return e.key !== void 0;
|
|
377
|
+
}
|
|
378
|
+
function lr(e, r) {
|
|
379
|
+
if (typeof e.ref == "string" && W.current && r && W.current.stateNode !== r) {
|
|
380
|
+
var a = A(W.current.type);
|
|
381
|
+
re[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', A(W.current.type), e.ref), re[a] = !0);
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
function cr(e, r) {
|
|
385
|
+
{
|
|
386
|
+
var a = function() {
|
|
387
|
+
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));
|
|
388
|
+
};
|
|
389
|
+
a.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
390
|
+
get: a,
|
|
391
|
+
configurable: !0
|
|
392
|
+
});
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
function fr(e, r) {
|
|
396
|
+
{
|
|
397
|
+
var a = function() {
|
|
398
|
+
xe || (xe = !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));
|
|
399
|
+
};
|
|
400
|
+
a.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
|
401
|
+
get: a,
|
|
402
|
+
configurable: !0
|
|
403
|
+
});
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
var dr = function(e, r, a, u, v, m, d) {
|
|
407
|
+
var f = {
|
|
408
|
+
// This tag allows us to uniquely identify this as a React Element
|
|
409
|
+
$$typeof: n,
|
|
410
|
+
// Built-in properties that belong on the element
|
|
411
|
+
type: e,
|
|
412
|
+
key: r,
|
|
413
|
+
ref: a,
|
|
414
|
+
props: d,
|
|
415
|
+
// Record the component responsible for creating this element.
|
|
416
|
+
_owner: m
|
|
417
|
+
};
|
|
418
|
+
return f._store = {}, Object.defineProperty(f._store, "validated", {
|
|
419
|
+
configurable: !1,
|
|
420
|
+
enumerable: !1,
|
|
421
|
+
writable: !0,
|
|
422
|
+
value: !1
|
|
423
|
+
}), Object.defineProperty(f, "_self", {
|
|
424
|
+
configurable: !1,
|
|
425
|
+
enumerable: !1,
|
|
426
|
+
writable: !1,
|
|
427
|
+
value: u
|
|
428
|
+
}), Object.defineProperty(f, "_source", {
|
|
429
|
+
configurable: !1,
|
|
430
|
+
enumerable: !1,
|
|
431
|
+
writable: !1,
|
|
432
|
+
value: v
|
|
433
|
+
}), Object.freeze && (Object.freeze(f.props), Object.freeze(f)), f;
|
|
434
|
+
};
|
|
435
|
+
function pr(e, r, a, u, v) {
|
|
436
|
+
{
|
|
437
|
+
var m, d = {}, f = null, w = null;
|
|
438
|
+
a !== void 0 && (we(a), f = "" + a), ur(r) && (we(r.key), f = "" + r.key), sr(r) && (w = r.ref, lr(r, v));
|
|
439
|
+
for (m in r)
|
|
440
|
+
J.call(r, m) && !ir.hasOwnProperty(m) && (d[m] = r[m]);
|
|
441
|
+
if (e && e.defaultProps) {
|
|
442
|
+
var b = e.defaultProps;
|
|
443
|
+
for (m in b)
|
|
444
|
+
d[m] === void 0 && (d[m] = b[m]);
|
|
445
|
+
}
|
|
446
|
+
if (f || w) {
|
|
447
|
+
var E = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
448
|
+
f && cr(d, E), w && fr(d, E);
|
|
449
|
+
}
|
|
450
|
+
return dr(e, f, w, v, u, W.current, d);
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
var te = D.ReactCurrentOwner, Oe = D.ReactDebugCurrentFrame;
|
|
454
|
+
function F(e) {
|
|
455
|
+
if (e) {
|
|
456
|
+
var r = e._owner, a = q(e.type, e._source, r ? r.type : null);
|
|
457
|
+
Oe.setExtraStackFrame(a);
|
|
458
|
+
} else
|
|
459
|
+
Oe.setExtraStackFrame(null);
|
|
460
|
+
}
|
|
461
|
+
var ne;
|
|
462
|
+
ne = !1;
|
|
463
|
+
function ae(e) {
|
|
464
|
+
return typeof e == "object" && e !== null && e.$$typeof === n;
|
|
465
|
+
}
|
|
466
|
+
function je() {
|
|
467
|
+
{
|
|
468
|
+
if (te.current) {
|
|
469
|
+
var e = A(te.current.type);
|
|
470
|
+
if (e)
|
|
471
|
+
return `
|
|
472
|
+
|
|
473
|
+
Check the render method of \`` + e + "`.";
|
|
474
|
+
}
|
|
475
|
+
return "";
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
function vr(e) {
|
|
479
|
+
{
|
|
480
|
+
if (e !== void 0) {
|
|
481
|
+
var r = e.fileName.replace(/^.*[\\\/]/, ""), a = e.lineNumber;
|
|
482
|
+
return `
|
|
483
|
+
|
|
484
|
+
Check your code at ` + r + ":" + a + ".";
|
|
485
|
+
}
|
|
486
|
+
return "";
|
|
487
|
+
}
|
|
488
|
+
}
|
|
489
|
+
var Pe = {};
|
|
490
|
+
function mr(e) {
|
|
491
|
+
{
|
|
492
|
+
var r = je();
|
|
493
|
+
if (!r) {
|
|
494
|
+
var a = typeof e == "string" ? e : e.displayName || e.name;
|
|
495
|
+
a && (r = `
|
|
496
|
+
|
|
497
|
+
Check the top-level render call using <` + a + ">.");
|
|
498
|
+
}
|
|
499
|
+
return r;
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
function Ae(e, r) {
|
|
503
|
+
{
|
|
504
|
+
if (!e._store || e._store.validated || e.key != null)
|
|
505
|
+
return;
|
|
506
|
+
e._store.validated = !0;
|
|
507
|
+
var a = mr(r);
|
|
508
|
+
if (Pe[a])
|
|
509
|
+
return;
|
|
510
|
+
Pe[a] = !0;
|
|
511
|
+
var u = "";
|
|
512
|
+
e && e._owner && e._owner !== te.current && (u = " It was passed a child from " + A(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);
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
function ke(e, r) {
|
|
516
|
+
{
|
|
517
|
+
if (typeof e != "object")
|
|
518
|
+
return;
|
|
519
|
+
if (ee(e))
|
|
520
|
+
for (var a = 0; a < e.length; a++) {
|
|
521
|
+
var u = e[a];
|
|
522
|
+
ae(u) && Ae(u, r);
|
|
523
|
+
}
|
|
524
|
+
else if (ae(e))
|
|
525
|
+
e._store && (e._store.validated = !0);
|
|
526
|
+
else if (e) {
|
|
527
|
+
var v = R(e);
|
|
528
|
+
if (typeof v == "function" && v !== e.entries)
|
|
529
|
+
for (var m = v.call(e), d; !(d = m.next()).done; )
|
|
530
|
+
ae(d.value) && Ae(d.value, r);
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
function gr(e) {
|
|
535
|
+
{
|
|
536
|
+
var r = e.type;
|
|
537
|
+
if (r == null || typeof r == "string")
|
|
538
|
+
return;
|
|
539
|
+
var a;
|
|
540
|
+
if (typeof r == "function")
|
|
541
|
+
a = r.propTypes;
|
|
542
|
+
else if (typeof r == "object" && (r.$$typeof === l || // Note: Memo only checks outer props here.
|
|
543
|
+
// Inner props are checked in the reconciler.
|
|
544
|
+
r.$$typeof === C))
|
|
545
|
+
a = r.propTypes;
|
|
546
|
+
else
|
|
547
|
+
return;
|
|
548
|
+
if (a) {
|
|
549
|
+
var u = A(r);
|
|
550
|
+
tr(a, e.props, "prop", u, e);
|
|
551
|
+
} else if (r.PropTypes !== void 0 && !ne) {
|
|
552
|
+
ne = !0;
|
|
553
|
+
var v = A(r);
|
|
554
|
+
_("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", v || "Unknown");
|
|
555
|
+
}
|
|
556
|
+
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && _("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
557
|
+
}
|
|
558
|
+
}
|
|
559
|
+
function hr(e) {
|
|
560
|
+
{
|
|
561
|
+
for (var r = Object.keys(e.props), a = 0; a < r.length; a++) {
|
|
562
|
+
var u = r[a];
|
|
563
|
+
if (u !== "children" && u !== "key") {
|
|
564
|
+
F(e), _("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", u), F(null);
|
|
565
|
+
break;
|
|
566
|
+
}
|
|
567
|
+
}
|
|
568
|
+
e.ref !== null && (F(e), _("Invalid attribute `ref` supplied to `React.Fragment`."), F(null));
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
function De(e, r, a, u, v, m) {
|
|
572
|
+
{
|
|
573
|
+
var d = He(e);
|
|
574
|
+
if (!d) {
|
|
575
|
+
var f = "";
|
|
576
|
+
(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.");
|
|
577
|
+
var w = vr(v);
|
|
578
|
+
w ? f += w : f += je();
|
|
579
|
+
var b;
|
|
580
|
+
e === null ? b = "null" : ee(e) ? b = "array" : e !== void 0 && e.$$typeof === n ? (b = "<" + (A(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);
|
|
581
|
+
}
|
|
582
|
+
var E = pr(e, r, a, v, m);
|
|
583
|
+
if (E == null)
|
|
584
|
+
return E;
|
|
585
|
+
if (d) {
|
|
586
|
+
var x = r.children;
|
|
587
|
+
if (x !== void 0)
|
|
588
|
+
if (u)
|
|
589
|
+
if (ee(x)) {
|
|
590
|
+
for (var Y = 0; Y < x.length; Y++)
|
|
591
|
+
ke(x[Y], e);
|
|
592
|
+
Object.freeze && Object.freeze(x);
|
|
593
|
+
} else
|
|
594
|
+
_("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
595
|
+
else
|
|
596
|
+
ke(x, e);
|
|
597
|
+
}
|
|
598
|
+
return e === s ? hr(E) : gr(E), E;
|
|
599
|
+
}
|
|
600
|
+
}
|
|
601
|
+
function yr(e, r, a) {
|
|
602
|
+
return De(e, r, a, !0);
|
|
603
|
+
}
|
|
604
|
+
function br(e, r, a) {
|
|
605
|
+
return De(e, r, a, !1);
|
|
606
|
+
}
|
|
607
|
+
var Er = br, Rr = yr;
|
|
608
|
+
V.Fragment = s, V.jsx = Er, V.jsxs = Rr;
|
|
609
|
+
}()), V;
|
|
610
|
+
}
|
|
611
|
+
var z = {};
|
|
612
|
+
/**
|
|
613
|
+
* @license React
|
|
614
|
+
* react-jsx-runtime.production.min.js
|
|
615
|
+
*
|
|
616
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
617
|
+
*
|
|
618
|
+
* This source code is licensed under the MIT license found in the
|
|
619
|
+
* LICENSE file in the root directory of this source tree.
|
|
620
|
+
*/
|
|
621
|
+
var Fe;
|
|
622
|
+
function Fr() {
|
|
623
|
+
if (Fe)
|
|
624
|
+
return z;
|
|
625
|
+
Fe = 1;
|
|
626
|
+
var t = Ie, n = Symbol.for("react.element"), i = Symbol.for("react.fragment"), s = Object.prototype.hasOwnProperty, p = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, g = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
627
|
+
function o(c, l, h) {
|
|
628
|
+
var y, C = {}, T = null, O = null;
|
|
629
|
+
h !== void 0 && (T = "" + h), l.key !== void 0 && (T = "" + l.key), l.ref !== void 0 && (O = l.ref);
|
|
630
|
+
for (y in l)
|
|
631
|
+
s.call(l, y) && !g.hasOwnProperty(y) && (C[y] = l[y]);
|
|
632
|
+
if (c && c.defaultProps)
|
|
633
|
+
for (y in l = c.defaultProps, l)
|
|
634
|
+
C[y] === void 0 && (C[y] = l[y]);
|
|
635
|
+
return { $$typeof: n, type: c, key: T, ref: O, props: C, _owner: p.current };
|
|
636
|
+
}
|
|
637
|
+
return z.Fragment = i, z.jsx = o, z.jsxs = o, z;
|
|
638
|
+
}
|
|
639
|
+
process.env.NODE_ENV === "production" ? ue.exports = Fr() : ue.exports = $r();
|
|
640
|
+
var P = ue.exports;
|
|
641
|
+
const tt = ({
|
|
642
|
+
Fallback: t,
|
|
643
|
+
loginPath: n = "/login",
|
|
644
|
+
localStorageKey: i = "user",
|
|
645
|
+
redirect401Path: s = "/login",
|
|
646
|
+
isLogged: p
|
|
647
|
+
}) => {
|
|
648
|
+
var C, T, O, j;
|
|
649
|
+
const [g, o] = ie(null), c = Ve(), l = _r(!1), h = typeof p == "function" ? p() : !!p, y = typeof h == "boolean" ? h : h == null ? void 0 : h.isLogged;
|
|
650
|
+
return Ne(() => {
|
|
651
|
+
var S;
|
|
652
|
+
l.current || (l.current = !0, (S = M) == null || S.interceptors.response.use(
|
|
653
|
+
(R) => R,
|
|
654
|
+
async (R) => {
|
|
655
|
+
var $;
|
|
656
|
+
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 && (($ = R == null ? void 0 : R.response) == null ? void 0 : $.status) === 401 && (M.defaults.headers.common.Authorization = null, localStorage.removeItem(i), o(s)), Promise.reject(R);
|
|
657
|
+
}
|
|
658
|
+
));
|
|
659
|
+
}, [i, s]), y && !g ? /* @__PURE__ */ P.jsx(Cr, { fallback: t, children: (T = (C = c.state) == null ? void 0 : C.from) != null && T.state && ((j = (O = c.state) == null ? void 0 : O.from) == null ? void 0 : j.pathname) === n ? /* @__PURE__ */ P.jsx(Le, { to: c.state.from.state.from.pathname + c.state.from.state.from.search, replace: !0 }) : /* @__PURE__ */ P.jsx(wr, {}) }) : /* @__PURE__ */ P.jsx(Le, { to: n, state: { from: c }, replace: !0 });
|
|
660
|
+
}, Yr = ({ useLocation: t, useGoogleTagManager: n, Outlet: i }) => {
|
|
661
|
+
const { pathname: s } = t(), { sendEvent: p } = n();
|
|
662
|
+
return X(() => {
|
|
663
|
+
p({ event: "pageView", pathname: s });
|
|
664
|
+
}, [s, p]), i ? /* @__PURE__ */ P.jsx(i, {}) : null;
|
|
665
|
+
}, nt = () => {
|
|
666
|
+
const [t, n] = ie(), [i, s] = ie();
|
|
667
|
+
if (X(() => {
|
|
668
|
+
(async () => {
|
|
669
|
+
try {
|
|
670
|
+
n(await import("@tracktor/react-google-tag-manager")), s(await import("react-router-dom"));
|
|
671
|
+
} catch (g) {
|
|
672
|
+
console.error(g);
|
|
673
|
+
}
|
|
674
|
+
})().then();
|
|
675
|
+
}, []), t && i) {
|
|
676
|
+
const { useGoogleTagManager: p } = t, { useLocation: g, Outlet: o } = i;
|
|
677
|
+
return /* @__PURE__ */ P.jsx(Yr, { useLocation: g, Outlet: o, useGoogleTagManager: p });
|
|
678
|
+
}
|
|
679
|
+
return null;
|
|
680
|
+
}, ce = Tr({
|
|
681
|
+
apiURL: void 0,
|
|
682
|
+
children: void 0
|
|
683
|
+
}), at = ({ children: t, apiURL: n }) => {
|
|
684
|
+
const i = le(
|
|
685
|
+
() => ({
|
|
686
|
+
apiURL: n
|
|
687
|
+
}),
|
|
688
|
+
[n]
|
|
689
|
+
);
|
|
690
|
+
return /* @__PURE__ */ P.jsx(ce.Provider, { value: i, children: t });
|
|
691
|
+
}, ot = ({
|
|
692
|
+
tokenTypeKey: t = "tokenType",
|
|
693
|
+
userLocalStorageKey: n = "user",
|
|
694
|
+
tokenKey: i = "accessToken",
|
|
695
|
+
postContentType: s = "application/json",
|
|
696
|
+
...p
|
|
697
|
+
}) => {
|
|
698
|
+
const { apiURL: g = p.apiURL } = We(ce);
|
|
699
|
+
if (!M.defaults)
|
|
700
|
+
return null;
|
|
701
|
+
const o = localStorage.getItem(n), c = o ? JSON.parse(o) : null, l = c != null && c[t] ? c[t] : null, h = c != null && c[i] ? c[i] : null, y = o ? `${l} ${h}` : null;
|
|
702
|
+
return M.defaults.baseURL = g, M.defaults.headers.post["Content-Type"] = s, y && (M.defaults.headers.common.Authorization = y), null;
|
|
703
|
+
}, it = ({ debug: t, resources: n }) => {
|
|
704
|
+
var i;
|
|
705
|
+
return (i = I) != null && i.isInitialized || (I.use(Pr).use(Ar).init({
|
|
706
|
+
debug: t,
|
|
707
|
+
fallbackLng: "en",
|
|
708
|
+
interpolation: {
|
|
709
|
+
escapeValue: !1
|
|
710
|
+
},
|
|
711
|
+
load: "languageOnly",
|
|
712
|
+
react: {
|
|
713
|
+
bindI18n: !1,
|
|
714
|
+
useSuspense: !0
|
|
715
|
+
},
|
|
716
|
+
resources: n,
|
|
717
|
+
returnNull: !1
|
|
718
|
+
}).then(() => {
|
|
719
|
+
document.documentElement.lang !== I.resolvedLanguage && I.resolvedLanguage && document.documentElement.setAttribute("lang", I.resolvedLanguage);
|
|
720
|
+
}), I.on("languageChanged", (s) => {
|
|
721
|
+
document.documentElement.setAttribute("lang", s);
|
|
722
|
+
})), null;
|
|
723
|
+
}, st = ({
|
|
724
|
+
dsn: t,
|
|
725
|
+
integrations: n,
|
|
726
|
+
tracesSampleRate: i,
|
|
727
|
+
replaysSessionSampleRate: s,
|
|
728
|
+
replaysOnErrorSampleRate: p,
|
|
729
|
+
tracePropagationTargets: g,
|
|
730
|
+
ignoreErrors: o,
|
|
731
|
+
debug: c,
|
|
732
|
+
environment: l
|
|
733
|
+
}) => (oe.isInitialized() || (c || process.env.NODE_ENV === "prod" || process.env.NODE_ENV === "production") && oe.init({
|
|
734
|
+
debug: c,
|
|
735
|
+
dsn: t,
|
|
736
|
+
environment: l || "production",
|
|
737
|
+
ignoreErrors: [...o || [], /dynamically imported module/],
|
|
738
|
+
integrations: [
|
|
739
|
+
oe.reactRouterV6BrowserTracingIntegration({
|
|
740
|
+
createRoutesFromChildren: Sr,
|
|
741
|
+
matchRoutes: xr,
|
|
742
|
+
useEffect: X,
|
|
743
|
+
useLocation: Ve,
|
|
744
|
+
useNavigationType: Or
|
|
745
|
+
}),
|
|
746
|
+
...n || []
|
|
747
|
+
],
|
|
748
|
+
replaysOnErrorSampleRate: p || 1,
|
|
749
|
+
replaysSessionSampleRate: s || 0.1,
|
|
750
|
+
tracePropagationTargets: g,
|
|
751
|
+
tracesSampleRate: i || 1
|
|
752
|
+
}), null), ut = ({ IMaskMixin: t, ...n }) => {
|
|
753
|
+
const i = le(
|
|
754
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
755
|
+
() => t(({ TextField: s, ...p }) => /* @__PURE__ */ P.jsx(s, { ...p })),
|
|
756
|
+
[t]
|
|
757
|
+
);
|
|
758
|
+
return /* @__PURE__ */ P.jsx(i, { ...n });
|
|
759
|
+
}, lt = ({ accessToken: t }) => (X(() => {
|
|
760
|
+
if (!t)
|
|
761
|
+
return;
|
|
762
|
+
(async () => {
|
|
763
|
+
try {
|
|
764
|
+
const i = await import("mapbox-gl");
|
|
765
|
+
i.default.accessToken = t;
|
|
766
|
+
} catch (i) {
|
|
767
|
+
console.error(i);
|
|
768
|
+
}
|
|
769
|
+
})().then();
|
|
770
|
+
}, [t]), null);
|
|
771
|
+
var ze = { exports: {} };
|
|
772
|
+
(function(t, n) {
|
|
773
|
+
(function(i, s) {
|
|
774
|
+
t.exports = s();
|
|
775
|
+
})(Mr, function() {
|
|
776
|
+
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" };
|
|
777
|
+
return function(s, p, g) {
|
|
778
|
+
var o = p.prototype, c = o.format;
|
|
779
|
+
g.en.formats = i, o.format = function(l) {
|
|
780
|
+
l === void 0 && (l = "YYYY-MM-DDTHH:mm:ssZ");
|
|
781
|
+
var h = this.$locale().formats, y = function(C, T) {
|
|
782
|
+
return C.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, function(O, j, S) {
|
|
783
|
+
var R = S && S.toUpperCase();
|
|
784
|
+
return j || T[S] || i[S] || T[R].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function(D, _, $) {
|
|
785
|
+
return _ || $.slice(1);
|
|
786
|
+
});
|
|
787
|
+
});
|
|
788
|
+
}(l, h === void 0 ? {} : h);
|
|
789
|
+
return c.call(this, y);
|
|
790
|
+
};
|
|
791
|
+
};
|
|
792
|
+
});
|
|
793
|
+
})(ze);
|
|
794
|
+
var Ir = ze.exports;
|
|
795
|
+
const Nr = /* @__PURE__ */ Lr(Ir);
|
|
796
|
+
U.extend(Nr);
|
|
797
|
+
const ct = ({ language: t }) => (Ne(() => {
|
|
798
|
+
var i;
|
|
799
|
+
const n = t || ((i = navigator.language) == null ? void 0 : i.slice(0, 2)) || "en";
|
|
800
|
+
if (n === "en") {
|
|
801
|
+
import("./en-QSkYj0iy.js").then((s) => s.e).then(() => {
|
|
802
|
+
U.locale(n);
|
|
803
|
+
});
|
|
804
|
+
return;
|
|
805
|
+
}
|
|
806
|
+
n === "fr" && import("./fr-TlWvAsWw.js").then((s) => s.f).then(() => {
|
|
807
|
+
U.locale(n);
|
|
808
|
+
}).catch(() => {
|
|
809
|
+
import("./en-QSkYj0iy.js").then((s) => s.e).then(() => {
|
|
810
|
+
U.locale("en");
|
|
811
|
+
});
|
|
812
|
+
});
|
|
813
|
+
}, [t]), null), ft = ({
|
|
814
|
+
children: t,
|
|
815
|
+
defaultQueriesOptions: n,
|
|
816
|
+
defaultMutationsOptions: i
|
|
817
|
+
}) => {
|
|
818
|
+
const s = new kr({
|
|
819
|
+
defaultOptions: {
|
|
820
|
+
mutations: {
|
|
821
|
+
...i
|
|
822
|
+
},
|
|
823
|
+
queries: {
|
|
824
|
+
getNextPageParam: (p, g, o) => p.length + (o || 0),
|
|
825
|
+
refetchOnWindowFocus: !1,
|
|
826
|
+
retry: 3,
|
|
827
|
+
...n
|
|
828
|
+
}
|
|
829
|
+
}
|
|
830
|
+
});
|
|
831
|
+
return /* @__PURE__ */ P.jsx(Dr, { client: s, children: t });
|
|
832
|
+
}, dt = (t) => {
|
|
833
|
+
const { unknownErrorTranslationKey: n = "error.unknownError" } = t || {}, i = jr(n), s = se(
|
|
834
|
+
(g) => {
|
|
835
|
+
var c, l, h, y, C, T, O, j, S;
|
|
836
|
+
const { response: o } = g || {};
|
|
837
|
+
return o != null && o.reason ? String(o.reason) : (c = o == null ? void 0 : o.data) != null && c.reason ? String(o.data.reason) : (l = o == null ? void 0 : o.data) != null && l.message ? String(o.data.message) : (y = (h = o == null ? void 0 : o.data) == null ? void 0 : h.detail) != null && y.length && Array.isArray((C = o == null ? void 0 : o.data) == null ? void 0 : C.detail) && ((O = (T = o == null ? void 0 : o.data) == null ? void 0 : T.detail[0]) != null && O.msg) && typeof ((S = (j = o == null ? void 0 : o.data) == null ? void 0 : j.detail[0]) == null ? void 0 : S.msg) == "string" ? String(o.data.detail[0].msg) : i;
|
|
838
|
+
},
|
|
839
|
+
[i]
|
|
840
|
+
);
|
|
841
|
+
return { getErrorCode: se((g) => {
|
|
842
|
+
var c, l, h;
|
|
843
|
+
const { response: o } = g || {};
|
|
844
|
+
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) : (h = o == null ? void 0 : o.data) != null && h.error_code ? String(o.data.error_code) : "unknown_error_code";
|
|
845
|
+
}, []), printError: s };
|
|
846
|
+
}, pt = ({
|
|
847
|
+
data: t,
|
|
848
|
+
fetchNextPage: n,
|
|
849
|
+
isFetchingNextPage: i,
|
|
850
|
+
isInitialLoading: s,
|
|
851
|
+
isLoading: p,
|
|
852
|
+
enabled: g = !0
|
|
853
|
+
}) => {
|
|
854
|
+
const o = se(
|
|
855
|
+
async (l) => {
|
|
856
|
+
i || !g || await n({ pageParam: (l == null ? void 0 : l.pageParam) || l.visibleRowsCount });
|
|
857
|
+
},
|
|
858
|
+
[g, n, i]
|
|
859
|
+
), c = le(() => {
|
|
860
|
+
if (t)
|
|
861
|
+
return t.pages.reduce((l, h) => [...l, ...h], []);
|
|
862
|
+
}, [t]);
|
|
863
|
+
return {
|
|
864
|
+
fetchNextPageOnRowsScrollEnd: o,
|
|
865
|
+
isLoading: i || p,
|
|
866
|
+
loadingVariant: s ? "skeleton" : "linear",
|
|
867
|
+
rows: c
|
|
868
|
+
};
|
|
869
|
+
}, vt = () => ({
|
|
870
|
+
clearAuthenticationToken: () => {
|
|
871
|
+
M.defaults.headers.common.Authorization = null;
|
|
872
|
+
},
|
|
873
|
+
setAuthenticationToken: ({ tokenType: i, accessToken: s }) => {
|
|
874
|
+
M.defaults.headers.common.Authorization = `${i} ${s}`;
|
|
875
|
+
}
|
|
876
|
+
}), Wr = (t, n = "ll") => U(t).format(n), Vr = (t, n = "km") => {
|
|
877
|
+
const i = Number(t);
|
|
878
|
+
return Number.isNaN(i) ? `0 ${n}` : `${i.toFixed(2)} ${n}`;
|
|
879
|
+
}, zr = (t) => {
|
|
880
|
+
const n = t && typeof t == "object" && "pathname" in t && t.pathname ? t.pathname : t;
|
|
881
|
+
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;
|
|
882
|
+
}, Ye = (t, n) => {
|
|
883
|
+
if (!t)
|
|
884
|
+
return "";
|
|
885
|
+
const i = zr(t), s = typeof t == "object" && "pathname" in t ? `${t.origin}${i}` : t;
|
|
886
|
+
return typeof n == "number" ? `${s.replace("/files", `/thumbs/${n}`)}` : s;
|
|
887
|
+
}, mt = () => {
|
|
888
|
+
const { apiURL: t } = We(ce);
|
|
889
|
+
return {
|
|
890
|
+
dateAdapter: Wr,
|
|
891
|
+
distanceAdapter: Vr,
|
|
892
|
+
filePathAdapter: (i, s) => Ye(
|
|
893
|
+
t && typeof i == "string" ? {
|
|
894
|
+
origin: t,
|
|
895
|
+
pathname: i
|
|
896
|
+
} : i,
|
|
897
|
+
s
|
|
898
|
+
)
|
|
899
|
+
};
|
|
900
|
+
}, Ur = (t) => t.charAt(0).toUpperCase() + t.slice(1).toLowerCase(), Br = (t) => {
|
|
901
|
+
const s = t.split("/").filter((p) => p.length > 0).map((p) => p.replace(/\${([^}]*)}/g, "$1").split(/[_-]/).map((l) => l.charAt(0).toUpperCase() + l.slice(1)).join("")).join("");
|
|
902
|
+
return s.charAt(0).toLowerCase() + s.slice(1);
|
|
903
|
+
}, Gr = (t, n, i) => {
|
|
904
|
+
const s = Br(n), p = Ur(i);
|
|
905
|
+
return `${s}${p}`;
|
|
906
|
+
}, qr = (t) => {
|
|
907
|
+
if (t)
|
|
908
|
+
return (t == null ? void 0 : t.reduce((n, i) => (n[i] = {
|
|
909
|
+
query: {
|
|
910
|
+
useInfinite: !0,
|
|
911
|
+
useInfiniteQueryParam: "offset",
|
|
912
|
+
useQuery: !0
|
|
913
|
+
}
|
|
914
|
+
}, n), {})) || {};
|
|
915
|
+
}, gt = (t) => {
|
|
916
|
+
const { input: n = "./openapi.json", operationsToGenerateInfiniteQueryHook: i = void 0 } = t || {};
|
|
917
|
+
return {
|
|
918
|
+
api: {
|
|
919
|
+
hooks: {
|
|
920
|
+
afterAllFilesWrite: "prettier src/api/ --write"
|
|
921
|
+
},
|
|
922
|
+
input: n,
|
|
923
|
+
output: {
|
|
924
|
+
client: "react-query",
|
|
925
|
+
mode: "tags-split",
|
|
926
|
+
override: {
|
|
927
|
+
header: (s) => [
|
|
928
|
+
"Generated by orval 🍺",
|
|
929
|
+
...s.title ? [s.title] : [],
|
|
930
|
+
...s.description ? [s.description] : []
|
|
931
|
+
],
|
|
932
|
+
mutator: {
|
|
933
|
+
name: "axiosCustomInstance",
|
|
934
|
+
path: `${__dirname}/config/orval/mutator/axiosCustomInstance.ts`
|
|
935
|
+
},
|
|
936
|
+
operationName: Gr,
|
|
937
|
+
...(i == null ? void 0 : i.length) && { operations: qr(i) },
|
|
938
|
+
query: {
|
|
939
|
+
useQuery: !0
|
|
940
|
+
}
|
|
941
|
+
},
|
|
942
|
+
schemas: "src/api/model",
|
|
943
|
+
target: "src/api/services/api.ts"
|
|
944
|
+
}
|
|
945
|
+
}
|
|
946
|
+
};
|
|
947
|
+
};
|
|
948
|
+
export {
|
|
949
|
+
nt as G,
|
|
950
|
+
ot as I,
|
|
951
|
+
ut as M,
|
|
952
|
+
ft as Q,
|
|
953
|
+
tt as R,
|
|
954
|
+
it as a,
|
|
955
|
+
st as b,
|
|
956
|
+
Mr as c,
|
|
957
|
+
lt as d,
|
|
958
|
+
ct as e,
|
|
959
|
+
at as f,
|
|
960
|
+
pt as g,
|
|
961
|
+
vt as h,
|
|
962
|
+
mt as i,
|
|
963
|
+
gt as j,
|
|
964
|
+
Wr as k,
|
|
965
|
+
Vr as l,
|
|
966
|
+
ce as m,
|
|
967
|
+
dt as u
|
|
968
|
+
};
|