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