@tracktor/shared-module 1.0.0 → 1.0.1

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 CHANGED
@@ -1,4 +1,4 @@
1
1
  # [Versions](https://github.com/Tracktor/shared-module/releases)
2
2
 
3
- ## v1.0.0
4
- - **[chore]** : Release v1.0.0
3
+ ## v1.0.1
4
+ - **[fix]** : GTMSendPageView import module
@@ -1,4 +1,4 @@
1
- import { c as o } from "./main-n8Gmn2zo.js";
1
+ import { c as o } from "./main-D2TKp5zS.js";
2
2
  var a = { exports: {} };
3
3
  (function(t, _) {
4
4
  (function(r, e) {
@@ -1,4 +1,4 @@
1
- import { c as m } from "./main-n8Gmn2zo.js";
1
+ import { c as m } from "./main-D2TKp5zS.js";
2
2
  import o from "dayjs";
3
3
  var i = { exports: {} };
4
4
  (function(n, s) {
@@ -1,16 +1,15 @@
1
- import Ie, { useState as Cr, useRef as Tr, useLayoutEffect as Ne, Suspense as Sr, useEffect as We, createContext as wr, useMemo as se, useContext as Ve, useCallback as oe } from "react";
1
+ import Ne, { useState as We, useRef as Tr, useLayoutEffect as Ve, Suspense as Sr, useEffect as se, createContext as wr, useMemo as ue, useContext as Ue, useCallback as oe } from "react";
2
2
  import $ from "axios";
3
- import { useLocation as ue, Navigate as $e, Outlet as Ue, createRoutesFromChildren as Or, matchRoutes as xr, useNavigationType as jr } from "react-router-dom";
4
- import { useGoogleTagManager as Pr } from "@tracktor/react-google-tag-manager";
5
- import I, { t as Ar } from "i18next";
6
- import kr from "i18next-browser-languagedetector";
7
- import { initReactI18next as Dr } from "react-i18next";
3
+ import { useLocation as le, Navigate as Me, Outlet as ze, createRoutesFromChildren as Or, matchRoutes as xr, useNavigationType as jr } from "react-router-dom";
4
+ import I, { t as Pr } from "i18next";
5
+ import Ar from "i18next-browser-languagedetector";
6
+ import { initReactI18next as kr } from "react-i18next";
8
7
  import * as ae from "@sentry/react";
9
8
  import Le from "mapbox-gl";
10
9
  import z from "dayjs";
11
- import { QueryClient as $r, QueryClientProvider as Lr } from "@tanstack/react-query";
10
+ import { QueryClient as Dr, QueryClientProvider as $r } from "@tanstack/react-query";
12
11
  var Mr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
13
- function Fr(t) {
12
+ function Lr(t) {
14
13
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
15
14
  }
16
15
  var ie = { exports: {} }, V = {};
@@ -23,10 +22,10 @@ var ie = { exports: {} }, V = {};
23
22
  * This source code is licensed under the MIT license found in the
24
23
  * LICENSE file in the root directory of this source tree.
25
24
  */
26
- var Me;
27
- function Yr() {
28
- return Me || (Me = 1, process.env.NODE_ENV !== "production" && function() {
29
- var t = Ie, n = Symbol.for("react.element"), i = Symbol.for("react.portal"), s = Symbol.for("react.fragment"), v = Symbol.for("react.strict_mode"), y = Symbol.for("react.profiler"), o = Symbol.for("react.provider"), c = Symbol.for("react.context"), l = Symbol.for("react.forward_ref"), g = Symbol.for("react.suspense"), h = Symbol.for("react.suspense_list"), C = Symbol.for("react.memo"), T = Symbol.for("react.lazy"), x = Symbol.for("react.offscreen"), j = Symbol.iterator, w = "@@iterator";
25
+ var Fe;
26
+ function Fr() {
27
+ return Fe || (Fe = 1, process.env.NODE_ENV !== "production" && function() {
28
+ var t = Ne, n = Symbol.for("react.element"), i = Symbol.for("react.portal"), s = Symbol.for("react.fragment"), v = Symbol.for("react.strict_mode"), y = Symbol.for("react.profiler"), o = Symbol.for("react.provider"), c = Symbol.for("react.context"), l = Symbol.for("react.forward_ref"), g = Symbol.for("react.suspense"), h = Symbol.for("react.suspense_list"), C = Symbol.for("react.memo"), T = Symbol.for("react.lazy"), x = Symbol.for("react.offscreen"), j = Symbol.iterator, w = "@@iterator";
30
29
  function R(e) {
31
30
  if (e === null || typeof e != "object")
32
31
  return null;
@@ -38,10 +37,10 @@ function Yr() {
38
37
  {
39
38
  for (var r = arguments.length, a = new Array(r > 1 ? r - 1 : 0), u = 1; u < r; u++)
40
39
  a[u - 1] = arguments[u];
41
- M("error", e, a);
40
+ L("error", e, a);
42
41
  }
43
42
  }
44
- function M(e, r, a) {
43
+ function L(e, r, a) {
45
44
  {
46
45
  var u = D.ReactDebugCurrentFrame, p = u.getStackAddendum();
47
46
  p !== "" && (r += "%s", a = a.concat([p]));
@@ -51,23 +50,23 @@ function Yr() {
51
50
  m.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, m);
52
51
  }
53
52
  }
54
- var qe = !1, Be = !1, Ge = !1, Je = !1, He = !1, ce;
55
- ce = Symbol.for("react.module.reference");
56
- function Xe(e) {
57
- return !!(typeof e == "string" || typeof e == "function" || e === s || e === y || He || e === v || e === g || e === h || Je || e === x || qe || Be || Ge || typeof e == "object" && e !== null && (e.$$typeof === T || e.$$typeof === C || e.$$typeof === o || e.$$typeof === c || e.$$typeof === l || // This needs to include all possible module reference object
53
+ var qe = !1, Be = !1, Je = !1, He = !1, Xe = !1, fe;
54
+ fe = Symbol.for("react.module.reference");
55
+ function Ke(e) {
56
+ return !!(typeof e == "string" || typeof e == "function" || e === s || e === y || Xe || e === v || e === g || e === h || He || e === x || qe || Be || Je || typeof e == "object" && e !== null && (e.$$typeof === T || e.$$typeof === C || e.$$typeof === o || e.$$typeof === c || e.$$typeof === l || // This needs to include all possible module reference object
58
57
  // types supported by any Flight configuration anywhere since
59
58
  // we don't know which Flight build this will end up being used
60
59
  // with.
61
- e.$$typeof === ce || e.getModuleId !== void 0));
60
+ e.$$typeof === fe || e.getModuleId !== void 0));
62
61
  }
63
- function Ke(e, r, a) {
62
+ function Ze(e, r, a) {
64
63
  var u = e.displayName;
65
64
  if (u)
66
65
  return u;
67
66
  var p = r.displayName || r.name || "";
68
67
  return p !== "" ? a + "(" + p + ")" : a;
69
68
  }
70
- function fe(e) {
69
+ function de(e) {
71
70
  return e.displayName || "Context";
72
71
  }
73
72
  function P(e) {
@@ -95,12 +94,12 @@ function Yr() {
95
94
  switch (e.$$typeof) {
96
95
  case c:
97
96
  var r = e;
98
- return fe(r) + ".Consumer";
97
+ return de(r) + ".Consumer";
99
98
  case o:
100
99
  var a = e;
101
- return fe(a._context) + ".Provider";
100
+ return de(a._context) + ".Provider";
102
101
  case l:
103
- return Ke(e, e.render, "ForwardRef");
102
+ return Ze(e, e.render, "ForwardRef");
104
103
  case C:
105
104
  var u = e.displayName || null;
106
105
  return u !== null ? u : P(e.type) || "Memo";
@@ -115,18 +114,18 @@ function Yr() {
115
114
  }
116
115
  return null;
117
116
  }
118
- var L = Object.assign, N = 0, de, pe, ve, me, ge, he, ye;
119
- function be() {
117
+ var M = Object.assign, N = 0, pe, ve, me, ge, he, ye, be;
118
+ function Ee() {
120
119
  }
121
- be.__reactDisabledLog = !0;
122
- function Ze() {
120
+ Ee.__reactDisabledLog = !0;
121
+ function Qe() {
123
122
  {
124
123
  if (N === 0) {
125
- de = console.log, pe = console.info, ve = console.warn, me = console.error, ge = console.group, he = console.groupCollapsed, ye = console.groupEnd;
124
+ pe = console.log, ve = console.info, me = console.warn, ge = console.error, he = console.group, ye = console.groupCollapsed, be = console.groupEnd;
126
125
  var e = {
127
126
  configurable: !0,
128
127
  enumerable: !0,
129
- value: be,
128
+ value: Ee,
130
129
  writable: !0
131
130
  };
132
131
  Object.defineProperties(console, {
@@ -142,7 +141,7 @@ function Yr() {
142
141
  N++;
143
142
  }
144
143
  }
145
- function Qe() {
144
+ function er() {
146
145
  {
147
146
  if (N--, N === 0) {
148
147
  var e = {
@@ -151,26 +150,26 @@ function Yr() {
151
150
  writable: !0
152
151
  };
153
152
  Object.defineProperties(console, {
154
- log: L({}, e, {
155
- value: de
156
- }),
157
- info: L({}, e, {
153
+ log: M({}, e, {
158
154
  value: pe
159
155
  }),
160
- warn: L({}, e, {
156
+ info: M({}, e, {
161
157
  value: ve
162
158
  }),
163
- error: L({}, e, {
159
+ warn: M({}, e, {
164
160
  value: me
165
161
  }),
166
- group: L({}, e, {
162
+ error: M({}, e, {
167
163
  value: ge
168
164
  }),
169
- groupCollapsed: L({}, e, {
165
+ group: M({}, e, {
170
166
  value: he
171
167
  }),
172
- groupEnd: L({}, e, {
168
+ groupCollapsed: M({}, e, {
173
169
  value: ye
170
+ }),
171
+ groupEnd: M({}, e, {
172
+ value: be
174
173
  })
175
174
  });
176
175
  }
@@ -178,7 +177,7 @@ function Yr() {
178
177
  }
179
178
  }
180
179
  var X = D.ReactCurrentDispatcher, K;
181
- function q(e, r, a) {
180
+ function G(e, r, a) {
182
181
  {
183
182
  if (K === void 0)
184
183
  try {
@@ -191,16 +190,16 @@ function Yr() {
191
190
  ` + K + e;
192
191
  }
193
192
  }
194
- var Z = !1, B;
193
+ var Z = !1, q;
195
194
  {
196
- var er = typeof WeakMap == "function" ? WeakMap : Map;
197
- B = new er();
195
+ var rr = typeof WeakMap == "function" ? WeakMap : Map;
196
+ q = new rr();
198
197
  }
199
- function Ee(e, r) {
198
+ function Re(e, r) {
200
199
  if (!e || Z)
201
200
  return "";
202
201
  {
203
- var a = B.get(e);
202
+ var a = q.get(e);
204
203
  if (a !== void 0)
205
204
  return a;
206
205
  }
@@ -209,7 +208,7 @@ function Yr() {
209
208
  var p = Error.prepareStackTrace;
210
209
  Error.prepareStackTrace = void 0;
211
210
  var m;
212
- m = X.current, X.current = null, Ze();
211
+ m = X.current, X.current = null, Qe();
213
212
  try {
214
213
  if (r) {
215
214
  var d = function() {
@@ -255,63 +254,63 @@ function Yr() {
255
254
  if (b--, E--, E < 0 || f[b] !== S[E]) {
256
255
  var O = `
257
256
  ` + f[b].replace(" at new ", " at ");
258
- return e.displayName && O.includes("<anonymous>") && (O = O.replace("<anonymous>", e.displayName)), typeof e == "function" && B.set(e, O), O;
257
+ return e.displayName && O.includes("<anonymous>") && (O = O.replace("<anonymous>", e.displayName)), typeof e == "function" && q.set(e, O), O;
259
258
  }
260
259
  while (b >= 1 && E >= 0);
261
260
  break;
262
261
  }
263
262
  }
264
263
  } finally {
265
- Z = !1, X.current = m, Qe(), Error.prepareStackTrace = p;
264
+ Z = !1, X.current = m, er(), Error.prepareStackTrace = p;
266
265
  }
267
- var Y = e ? e.displayName || e.name : "", De = Y ? q(Y) : "";
268
- return typeof e == "function" && B.set(e, De), De;
266
+ var Y = e ? e.displayName || e.name : "", $e = Y ? G(Y) : "";
267
+ return typeof e == "function" && q.set(e, $e), $e;
269
268
  }
270
- function rr(e, r, a) {
271
- return Ee(e, !1);
269
+ function tr(e, r, a) {
270
+ return Re(e, !1);
272
271
  }
273
- function tr(e) {
272
+ function nr(e) {
274
273
  var r = e.prototype;
275
274
  return !!(r && r.isReactComponent);
276
275
  }
277
- function G(e, r, a) {
276
+ function B(e, r, a) {
278
277
  if (e == null)
279
278
  return "";
280
279
  if (typeof e == "function")
281
- return Ee(e, tr(e));
280
+ return Re(e, nr(e));
282
281
  if (typeof e == "string")
283
- return q(e);
282
+ return G(e);
284
283
  switch (e) {
285
284
  case g:
286
- return q("Suspense");
285
+ return G("Suspense");
287
286
  case h:
288
- return q("SuspenseList");
287
+ return G("SuspenseList");
289
288
  }
290
289
  if (typeof e == "object")
291
290
  switch (e.$$typeof) {
292
291
  case l:
293
- return rr(e.render);
292
+ return tr(e.render);
294
293
  case C:
295
- return G(e.type, r, a);
294
+ return B(e.type, r, a);
296
295
  case T: {
297
296
  var u = e, p = u._payload, m = u._init;
298
297
  try {
299
- return G(m(p), r, a);
298
+ return B(m(p), r, a);
300
299
  } catch {
301
300
  }
302
301
  }
303
302
  }
304
303
  return "";
305
304
  }
306
- var J = Object.prototype.hasOwnProperty, Re = {}, _e = D.ReactDebugCurrentFrame;
305
+ var J = Object.prototype.hasOwnProperty, _e = {}, Ce = D.ReactDebugCurrentFrame;
307
306
  function H(e) {
308
307
  if (e) {
309
- var r = e._owner, a = G(e.type, e._source, r ? r.type : null);
310
- _e.setExtraStackFrame(a);
308
+ var r = e._owner, a = B(e.type, e._source, r ? r.type : null);
309
+ Ce.setExtraStackFrame(a);
311
310
  } else
312
- _e.setExtraStackFrame(null);
311
+ Ce.setExtraStackFrame(null);
313
312
  }
314
- function nr(e, r, a, u, p) {
313
+ function ar(e, r, a, u, p) {
315
314
  {
316
315
  var m = Function.call.bind(J);
317
316
  for (var d in e)
@@ -326,42 +325,42 @@ function Yr() {
326
325
  } catch (b) {
327
326
  f = b;
328
327
  }
329
- f && !(f instanceof Error) && (H(p), _("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", u || "React class", a, d, typeof f), H(null)), f instanceof Error && !(f.message in Re) && (Re[f.message] = !0, H(p), _("Failed %s type: %s", a, f.message), H(null));
328
+ f && !(f instanceof Error) && (H(p), _("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", u || "React class", a, d, typeof f), H(null)), f instanceof Error && !(f.message in _e) && (_e[f.message] = !0, H(p), _("Failed %s type: %s", a, f.message), H(null));
330
329
  }
331
330
  }
332
331
  }
333
- var ar = Array.isArray;
332
+ var or = Array.isArray;
334
333
  function Q(e) {
335
- return ar(e);
334
+ return or(e);
336
335
  }
337
- function or(e) {
336
+ function ir(e) {
338
337
  {
339
338
  var r = typeof Symbol == "function" && Symbol.toStringTag, a = r && e[Symbol.toStringTag] || e.constructor.name || "Object";
340
339
  return a;
341
340
  }
342
341
  }
343
- function ir(e) {
342
+ function sr(e) {
344
343
  try {
345
- return Ce(e), !1;
344
+ return Te(e), !1;
346
345
  } catch {
347
346
  return !0;
348
347
  }
349
348
  }
350
- function Ce(e) {
349
+ function Te(e) {
351
350
  return "" + e;
352
351
  }
353
- function Te(e) {
354
- if (ir(e))
355
- return _("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", or(e)), Ce(e);
352
+ function Se(e) {
353
+ if (sr(e))
354
+ return _("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", ir(e)), Te(e);
356
355
  }
357
- var W = D.ReactCurrentOwner, sr = {
356
+ var W = D.ReactCurrentOwner, ur = {
358
357
  key: !0,
359
358
  ref: !0,
360
359
  __self: !0,
361
360
  __source: !0
362
- }, Se, we, ee;
361
+ }, we, Oe, ee;
363
362
  ee = {};
364
- function ur(e) {
363
+ function lr(e) {
365
364
  if (J.call(e, "ref")) {
366
365
  var r = Object.getOwnPropertyDescriptor(e, "ref").get;
367
366
  if (r && r.isReactWarning)
@@ -369,7 +368,7 @@ function Yr() {
369
368
  }
370
369
  return e.ref !== void 0;
371
370
  }
372
- function lr(e) {
371
+ function cr(e) {
373
372
  if (J.call(e, "key")) {
374
373
  var r = Object.getOwnPropertyDescriptor(e, "key").get;
375
374
  if (r && r.isReactWarning)
@@ -377,16 +376,16 @@ function Yr() {
377
376
  }
378
377
  return e.key !== void 0;
379
378
  }
380
- function cr(e, r) {
379
+ function fr(e, r) {
381
380
  if (typeof e.ref == "string" && W.current && r && W.current.stateNode !== r) {
382
381
  var a = P(W.current.type);
383
382
  ee[a] || (_('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', P(W.current.type), e.ref), ee[a] = !0);
384
383
  }
385
384
  }
386
- function fr(e, r) {
385
+ function dr(e, r) {
387
386
  {
388
387
  var a = function() {
389
- 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
+ we || (we = !0, _("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
390
389
  };
391
390
  a.isReactWarning = !0, Object.defineProperty(e, "key", {
392
391
  get: a,
@@ -394,10 +393,10 @@ function Yr() {
394
393
  });
395
394
  }
396
395
  }
397
- function dr(e, r) {
396
+ function pr(e, r) {
398
397
  {
399
398
  var a = function() {
400
- 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));
399
+ Oe || (Oe = !0, _("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
401
400
  };
402
401
  a.isReactWarning = !0, Object.defineProperty(e, "ref", {
403
402
  get: a,
@@ -405,7 +404,7 @@ function Yr() {
405
404
  });
406
405
  }
407
406
  }
408
- var pr = function(e, r, a, u, p, m, d) {
407
+ var vr = function(e, r, a, u, p, m, d) {
409
408
  var f = {
410
409
  // This tag allows us to uniquely identify this as a React Element
411
410
  $$typeof: n,
@@ -434,12 +433,12 @@ function Yr() {
434
433
  value: p
435
434
  }), Object.freeze && (Object.freeze(f.props), Object.freeze(f)), f;
436
435
  };
437
- function vr(e, r, a, u, p) {
436
+ function mr(e, r, a, u, p) {
438
437
  {
439
438
  var m, d = {}, f = null, S = null;
440
- a !== void 0 && (Te(a), f = "" + a), lr(r) && (Te(r.key), f = "" + r.key), ur(r) && (S = r.ref, cr(r, p));
439
+ a !== void 0 && (Se(a), f = "" + a), cr(r) && (Se(r.key), f = "" + r.key), lr(r) && (S = r.ref, fr(r, p));
441
440
  for (m in r)
442
- J.call(r, m) && !sr.hasOwnProperty(m) && (d[m] = r[m]);
441
+ J.call(r, m) && !ur.hasOwnProperty(m) && (d[m] = r[m]);
443
442
  if (e && e.defaultProps) {
444
443
  var b = e.defaultProps;
445
444
  for (m in b)
@@ -447,25 +446,25 @@ function Yr() {
447
446
  }
448
447
  if (f || S) {
449
448
  var E = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
450
- f && fr(d, E), S && dr(d, E);
449
+ f && dr(d, E), S && pr(d, E);
451
450
  }
452
- return pr(e, f, S, p, u, W.current, d);
451
+ return vr(e, f, S, p, u, W.current, d);
453
452
  }
454
453
  }
455
- var re = D.ReactCurrentOwner, Oe = D.ReactDebugCurrentFrame;
454
+ var re = D.ReactCurrentOwner, xe = D.ReactDebugCurrentFrame;
456
455
  function F(e) {
457
456
  if (e) {
458
- var r = e._owner, a = G(e.type, e._source, r ? r.type : null);
459
- Oe.setExtraStackFrame(a);
457
+ var r = e._owner, a = B(e.type, e._source, r ? r.type : null);
458
+ xe.setExtraStackFrame(a);
460
459
  } else
461
- Oe.setExtraStackFrame(null);
460
+ xe.setExtraStackFrame(null);
462
461
  }
463
462
  var te;
464
463
  te = !1;
465
464
  function ne(e) {
466
465
  return typeof e == "object" && e !== null && e.$$typeof === n;
467
466
  }
468
- function xe() {
467
+ function je() {
469
468
  {
470
469
  if (re.current) {
471
470
  var e = P(re.current.type);
@@ -477,7 +476,7 @@ Check the render method of \`` + e + "`.";
477
476
  return "";
478
477
  }
479
478
  }
480
- function mr(e) {
479
+ function gr(e) {
481
480
  {
482
481
  if (e !== void 0) {
483
482
  var r = e.fileName.replace(/^.*[\\\/]/, ""), a = e.lineNumber;
@@ -488,10 +487,10 @@ Check your code at ` + r + ":" + a + ".";
488
487
  return "";
489
488
  }
490
489
  }
491
- var je = {};
492
- function gr(e) {
490
+ var Pe = {};
491
+ function hr(e) {
493
492
  {
494
- var r = xe();
493
+ var r = je();
495
494
  if (!r) {
496
495
  var a = typeof e == "string" ? e : e.displayName || e.name;
497
496
  a && (r = `
@@ -501,27 +500,27 @@ Check the top-level render call using <` + a + ">.");
501
500
  return r;
502
501
  }
503
502
  }
504
- function Pe(e, r) {
503
+ function Ae(e, r) {
505
504
  {
506
505
  if (!e._store || e._store.validated || e.key != null)
507
506
  return;
508
507
  e._store.validated = !0;
509
- var a = gr(r);
510
- if (je[a])
508
+ var a = hr(r);
509
+ if (Pe[a])
511
510
  return;
512
- je[a] = !0;
511
+ Pe[a] = !0;
513
512
  var u = "";
514
513
  e && e._owner && e._owner !== re.current && (u = " It was passed a child from " + P(e._owner.type) + "."), F(e), _('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', a, u), F(null);
515
514
  }
516
515
  }
517
- function Ae(e, r) {
516
+ function ke(e, r) {
518
517
  {
519
518
  if (typeof e != "object")
520
519
  return;
521
520
  if (Q(e))
522
521
  for (var a = 0; a < e.length; a++) {
523
522
  var u = e[a];
524
- ne(u) && Pe(u, r);
523
+ ne(u) && Ae(u, r);
525
524
  }
526
525
  else if (ne(e))
527
526
  e._store && (e._store.validated = !0);
@@ -529,11 +528,11 @@ Check the top-level render call using <` + a + ">.");
529
528
  var p = R(e);
530
529
  if (typeof p == "function" && p !== e.entries)
531
530
  for (var m = p.call(e), d; !(d = m.next()).done; )
532
- ne(d.value) && Pe(d.value, r);
531
+ ne(d.value) && Ae(d.value, r);
533
532
  }
534
533
  }
535
534
  }
536
- function hr(e) {
535
+ function yr(e) {
537
536
  {
538
537
  var r = e.type;
539
538
  if (r == null || typeof r == "string")
@@ -549,7 +548,7 @@ Check the top-level render call using <` + a + ">.");
549
548
  return;
550
549
  if (a) {
551
550
  var u = P(r);
552
- nr(a, e.props, "prop", u, e);
551
+ ar(a, e.props, "prop", u, e);
553
552
  } else if (r.PropTypes !== void 0 && !te) {
554
553
  te = !0;
555
554
  var p = P(r);
@@ -558,7 +557,7 @@ Check the top-level render call using <` + a + ">.");
558
557
  typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && _("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
559
558
  }
560
559
  }
561
- function yr(e) {
560
+ function br(e) {
562
561
  {
563
562
  for (var r = Object.keys(e.props), a = 0; a < r.length; a++) {
564
563
  var u = r[a];
@@ -570,18 +569,18 @@ Check the top-level render call using <` + a + ">.");
570
569
  e.ref !== null && (F(e), _("Invalid attribute `ref` supplied to `React.Fragment`."), F(null));
571
570
  }
572
571
  }
573
- function ke(e, r, a, u, p, m) {
572
+ function De(e, r, a, u, p, m) {
574
573
  {
575
- var d = Xe(e);
574
+ var d = Ke(e);
576
575
  if (!d) {
577
576
  var f = "";
578
577
  (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (f += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
579
- var S = mr(p);
580
- S ? f += S : f += xe();
578
+ var S = gr(p);
579
+ S ? f += S : f += je();
581
580
  var b;
582
581
  e === null ? b = "null" : Q(e) ? b = "array" : e !== void 0 && e.$$typeof === n ? (b = "<" + (P(e.type) || "Unknown") + " />", f = " Did you accidentally export a JSX literal instead of a component?") : b = typeof e, _("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", b, f);
583
582
  }
584
- var E = vr(e, r, a, p, m);
583
+ var E = mr(e, r, a, p, m);
585
584
  if (E == null)
586
585
  return E;
587
586
  if (d) {
@@ -590,24 +589,24 @@ Check the top-level render call using <` + a + ">.");
590
589
  if (u)
591
590
  if (Q(O)) {
592
591
  for (var Y = 0; Y < O.length; Y++)
593
- Ae(O[Y], e);
592
+ ke(O[Y], e);
594
593
  Object.freeze && Object.freeze(O);
595
594
  } else
596
595
  _("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
597
596
  else
598
- Ae(O, e);
597
+ ke(O, e);
599
598
  }
600
- return e === s ? yr(E) : hr(E), E;
599
+ return e === s ? br(E) : yr(E), E;
601
600
  }
602
601
  }
603
- function br(e, r, a) {
604
- return ke(e, r, a, !0);
605
- }
606
602
  function Er(e, r, a) {
607
- return ke(e, r, a, !1);
603
+ return De(e, r, a, !0);
604
+ }
605
+ function Rr(e, r, a) {
606
+ return De(e, r, a, !1);
608
607
  }
609
- var Rr = Er, _r = br;
610
- V.Fragment = s, V.jsx = Rr, V.jsxs = _r;
608
+ var _r = Rr, Cr = Er;
609
+ V.Fragment = s, V.jsx = _r, V.jsxs = Cr;
611
610
  }()), V;
612
611
  }
613
612
  var U = {};
@@ -620,12 +619,12 @@ var U = {};
620
619
  * This source code is licensed under the MIT license found in the
621
620
  * LICENSE file in the root directory of this source tree.
622
621
  */
623
- var Fe;
624
- function Ir() {
625
- if (Fe)
622
+ var Ye;
623
+ function Yr() {
624
+ if (Ye)
626
625
  return U;
627
- Fe = 1;
628
- var t = Ie, n = Symbol.for("react.element"), i = Symbol.for("react.fragment"), s = Object.prototype.hasOwnProperty, v = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, y = { key: !0, ref: !0, __self: !0, __source: !0 };
626
+ Ye = 1;
627
+ var t = Ne, n = Symbol.for("react.element"), i = Symbol.for("react.fragment"), s = Object.prototype.hasOwnProperty, v = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, y = { key: !0, ref: !0, __self: !0, __source: !0 };
629
628
  function o(c, l, g) {
630
629
  var h, C = {}, T = null, x = null;
631
630
  g !== void 0 && (T = "" + g), l.key !== void 0 && (T = "" + l.key), l.ref !== void 0 && (x = l.ref);
@@ -638,9 +637,9 @@ function Ir() {
638
637
  }
639
638
  return U.Fragment = i, U.jsx = o, U.jsxs = o, U;
640
639
  }
641
- process.env.NODE_ENV === "production" ? ie.exports = Ir() : ie.exports = Yr();
640
+ process.env.NODE_ENV === "production" ? ie.exports = Yr() : ie.exports = Fr();
642
641
  var k = ie.exports;
643
- const ot = ({
642
+ const at = ({
644
643
  Fallback: t,
645
644
  loginPath: n = "/login",
646
645
  localStorageKey: i = "user",
@@ -648,48 +647,63 @@ const ot = ({
648
647
  isLogged: v
649
648
  }) => {
650
649
  var C, T, x, j;
651
- const [y, o] = Cr(null), c = ue(), l = Tr(!1), g = typeof v == "function" ? v() : !!v, h = typeof g == "boolean" ? g : g == null ? void 0 : g.isLogged;
652
- return Ne(() => {
650
+ const [y, o] = We(null), c = le(), l = Tr(!1), g = typeof v == "function" ? v() : !!v, h = typeof g == "boolean" ? g : g == null ? void 0 : g.isLogged;
651
+ return Ve(() => {
653
652
  var w;
654
653
  l.current || (l.current = !0, (w = $) == null || w.interceptors.response.use(
655
654
  (R) => R,
656
655
  async (R) => {
657
- var M;
658
- return typeof R == "object" && R && "response" in R && R.response && typeof R.response == "object" && "status" in R.response && R.response && typeof R.response == "object" && "status" in R.response && ((M = R == null ? void 0 : R.response) == null ? void 0 : M.status) === 401 && ($.defaults.headers.common.Authorization = null, localStorage.removeItem(i), o(s)), Promise.reject(R);
656
+ var L;
657
+ 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 && ((L = R == null ? void 0 : R.response) == null ? void 0 : L.status) === 401 && ($.defaults.headers.common.Authorization = null, localStorage.removeItem(i), o(s)), Promise.reject(R);
659
658
  }
660
659
  ));
661
- }, [i, s]), h && !y ? /* @__PURE__ */ k.jsx(Sr, { fallback: t, children: (T = (C = c.state) == null ? void 0 : C.from) != null && T.state && ((j = (x = c.state) == null ? void 0 : x.from) == null ? void 0 : j.pathname) === n ? /* @__PURE__ */ k.jsx($e, { to: c.state.from.state.from.pathname + c.state.from.state.from.search, replace: !0 }) : /* @__PURE__ */ k.jsx(Ue, {}) }) : /* @__PURE__ */ k.jsx($e, { to: n, state: { from: c }, replace: !0 });
662
- }, it = () => {
663
- const { pathname: t } = ue(), { sendEvent: n } = Pr();
664
- return We(() => {
665
- n({ event: "pageView", pathname: t });
666
- }, [t, n]), /* @__PURE__ */ k.jsx(Ue, {});
667
- }, le = wr({
660
+ }, [i, s]), h && !y ? /* @__PURE__ */ k.jsx(Sr, { fallback: t, children: (T = (C = c.state) == null ? void 0 : C.from) != null && T.state && ((j = (x = c.state) == null ? void 0 : x.from) == null ? void 0 : j.pathname) === n ? /* @__PURE__ */ k.jsx(Me, { to: c.state.from.state.from.pathname + c.state.from.state.from.search, replace: !0 }) : /* @__PURE__ */ k.jsx(ze, {}) }) : /* @__PURE__ */ k.jsx(Me, { to: n, state: { from: c }, replace: !0 });
661
+ }, Ir = () => {
662
+ const [t, n] = We();
663
+ return se(() => {
664
+ (async () => {
665
+ try {
666
+ const { useGoogleTagManager: s } = await import("@tracktor/react-google-tag-manager");
667
+ n(s);
668
+ } catch (s) {
669
+ console.error(s);
670
+ }
671
+ })().then();
672
+ }, []), t;
673
+ }, ot = () => {
674
+ const { pathname: t } = le(), n = Ir();
675
+ return se(() => {
676
+ if (n) {
677
+ const { sendEvent: i } = n();
678
+ i({ event: "pageView", pathname: t });
679
+ }
680
+ }, [t, n]), /* @__PURE__ */ k.jsx(ze, {});
681
+ }, ce = wr({
668
682
  apiURL: void 0,
669
683
  children: void 0
670
- }), st = ({ children: t, apiURL: n }) => {
671
- const i = se(
684
+ }), it = ({ children: t, apiURL: n }) => {
685
+ const i = ue(
672
686
  () => ({
673
687
  apiURL: n
674
688
  }),
675
689
  [n]
676
690
  );
677
- return /* @__PURE__ */ k.jsx(le.Provider, { value: i, children: t });
678
- }, ut = ({
691
+ return /* @__PURE__ */ k.jsx(ce.Provider, { value: i, children: t });
692
+ }, st = ({
679
693
  tokenTypeKey: t = "tokenType",
680
694
  userLocalStorageKey: n = "user",
681
695
  tokenKey: i = "accessToken",
682
696
  postContentType: s = "application/json",
683
697
  ...v
684
698
  }) => {
685
- const { apiURL: y = v.baseURL } = Ve(le);
699
+ const { apiURL: y = v.baseURL } = Ue(ce);
686
700
  if (!$.defaults)
687
701
  return null;
688
702
  const o = localStorage.getItem(n), c = o ? JSON.parse(o) : null, l = c != null && c[t] ? c[t] : null, g = c != null && c[i] ? c[i] : null, h = o ? `${l} ${g}` : null;
689
703
  return $.defaults.baseURL = y, $.defaults.headers.post["Content-Type"] = s, h && ($.defaults.headers.common.Authorization = h), null;
690
- }, lt = ({ debug: t, resources: n }) => {
704
+ }, ut = ({ debug: t, resources: n }) => {
691
705
  var i;
692
- return (i = I) != null && i.isInitialized || (I.use(kr).use(Dr).init({
706
+ return (i = I) != null && i.isInitialized || (I.use(Ar).use(kr).init({
693
707
  debug: t,
694
708
  fallbackLng: "en",
695
709
  interpolation: {
@@ -707,7 +721,7 @@ const ot = ({
707
721
  }), I.on("languageChanged", (s) => {
708
722
  document.documentElement.setAttribute("lang", s);
709
723
  })), null;
710
- }, ct = ({
724
+ }, lt = ({
711
725
  dsn: t,
712
726
  integrations: n,
713
727
  tracesSampleRate: i,
@@ -726,8 +740,8 @@ const ot = ({
726
740
  ae.reactRouterV6BrowserTracingIntegration({
727
741
  createRoutesFromChildren: Or,
728
742
  matchRoutes: xr,
729
- useEffect: We,
730
- useLocation: ue,
743
+ useEffect: se,
744
+ useLocation: le,
731
745
  useNavigationType: jr
732
746
  }),
733
747
  ...n || []
@@ -736,15 +750,15 @@ const ot = ({
736
750
  replaysSessionSampleRate: s || 0.1,
737
751
  tracePropagationTargets: y,
738
752
  tracesSampleRate: i || 1
739
- }), null), ft = ({ IMaskMixin: t, ...n }) => {
740
- const i = se(
753
+ }), null), ct = ({ IMaskMixin: t, ...n }) => {
754
+ const i = ue(
741
755
  // eslint-disable-next-line react/jsx-props-no-spreading
742
756
  () => t(({ TextField: s, ...v }) => /* @__PURE__ */ k.jsx(s, { ...v })),
743
757
  [t]
744
758
  );
745
759
  return /* @__PURE__ */ k.jsx(i, { ...n });
746
- }, dt = ({ accessToken: t }) => (Le && t && (Le.accessToken = t), null);
747
- var ze = { exports: {} };
760
+ }, ft = ({ accessToken: t }) => (Le && t && (Le.accessToken = t), null);
761
+ var Ge = { exports: {} };
748
762
  (function(t, n) {
749
763
  (function(i, s) {
750
764
  t.exports = s();
@@ -757,8 +771,8 @@ var ze = { exports: {} };
757
771
  var g = this.$locale().formats, h = function(C, T) {
758
772
  return C.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, function(x, j, w) {
759
773
  var R = w && w.toUpperCase();
760
- return j || T[w] || i[w] || T[R].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function(D, _, M) {
761
- return _ || M.slice(1);
774
+ return j || T[w] || i[w] || T[R].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function(D, _, L) {
775
+ return _ || L.slice(1);
762
776
  });
763
777
  });
764
778
  }(l, g === void 0 ? {} : g);
@@ -766,28 +780,28 @@ var ze = { exports: {} };
766
780
  };
767
781
  };
768
782
  });
769
- })(ze);
770
- var Nr = ze.exports;
771
- const Wr = /* @__PURE__ */ Fr(Nr);
783
+ })(Ge);
784
+ var Nr = Ge.exports;
785
+ const Wr = /* @__PURE__ */ Lr(Nr);
772
786
  z.extend(Wr);
773
- const pt = ({ language: t }) => (Ne(() => {
787
+ const dt = ({ language: t }) => (Ve(() => {
774
788
  var i;
775
789
  const n = t || ((i = navigator.language) == null ? void 0 : i.slice(0, 2)) || "en";
776
790
  if (n === "en") {
777
- import("./en-gK0dFos9.js").then((s) => s.e).then(() => {
791
+ import("./en-PZ6S8N4v.js").then((s) => s.e).then(() => {
778
792
  z.locale(n);
779
793
  });
780
794
  return;
781
795
  }
782
- n === "fr" && import("./fr-tYyGRO0d.js").then((s) => s.f).then(() => {
796
+ n === "fr" && import("./fr-Q1qOJ6h9.js").then((s) => s.f).then(() => {
783
797
  z.locale(n);
784
798
  }).catch(() => {
785
- import("./en-gK0dFos9.js").then((s) => s.e).then(() => {
799
+ import("./en-PZ6S8N4v.js").then((s) => s.e).then(() => {
786
800
  z.locale("en");
787
801
  });
788
802
  });
789
- }, [t]), null), vt = ({ children: t, defaultQueriesOptions: n, defaultMutationsOptions: i }) => {
790
- const s = new $r({
803
+ }, [t]), null), pt = ({ children: t, defaultQueriesOptions: n, defaultMutationsOptions: i }) => {
804
+ const s = new Dr({
791
805
  defaultOptions: {
792
806
  mutations: {
793
807
  ...i
@@ -800,9 +814,9 @@ const pt = ({ language: t }) => (Ne(() => {
800
814
  }
801
815
  }
802
816
  });
803
- return /* @__PURE__ */ k.jsx(Lr, { client: s, children: t });
804
- }, mt = (t) => {
805
- const { unknownErrorTranslationKey: n = "error.unknownError" } = t || {}, i = Ar(n), s = oe(
817
+ return /* @__PURE__ */ k.jsx($r, { client: s, children: t });
818
+ }, vt = (t) => {
819
+ const { unknownErrorTranslationKey: n = "error.unknownError" } = t || {}, i = Pr(n), s = oe(
806
820
  (y) => {
807
821
  var c, l, g, h, C, T, x, j, w;
808
822
  const { response: o } = y || {};
@@ -815,7 +829,7 @@ const pt = ({ language: t }) => (Ne(() => {
815
829
  const { response: o } = y || {};
816
830
  return o != null && o.error_code ? String(o == null ? void 0 : o.error_code) : (c = o == null ? void 0 : o.data) != null && c.error_code ? String((l = o == null ? void 0 : o.data) == null ? void 0 : l.error_code) : o != null && o.error_code ? String(o == null ? void 0 : o.error_code) : (g = o == null ? void 0 : o.data) != null && g.error_code ? String(o.data.error_code) : "unknown_error_code";
817
831
  }, []), printError: s };
818
- }, gt = ({
832
+ }, mt = ({
819
833
  data: t,
820
834
  fetchNextPage: n,
821
835
  isFetchingNextPage: i,
@@ -828,7 +842,7 @@ const pt = ({ language: t }) => (Ne(() => {
828
842
  i || !y || await n({ pageParam: (l == null ? void 0 : l.pageParam) || l.visibleRowsCount });
829
843
  },
830
844
  [y, n, i]
831
- ), c = se(() => {
845
+ ), c = ue(() => {
832
846
  if (t)
833
847
  return t.pages.reduce((l, g) => [...l, ...g], []);
834
848
  }, [t]);
@@ -838,7 +852,7 @@ const pt = ({ language: t }) => (Ne(() => {
838
852
  loadingVariant: s ? "skeleton" : "linear",
839
853
  rows: c
840
854
  };
841
- }, ht = () => ({
855
+ }, gt = () => ({
842
856
  clearAuthenticationToken: () => {
843
857
  $.defaults.headers.common.Authorization = null;
844
858
  },
@@ -851,17 +865,17 @@ const pt = ({ language: t }) => (Ne(() => {
851
865
  }, zr = (t) => {
852
866
  const n = t && typeof t == "object" && "pathname" in t && t.pathname ? t.pathname : t;
853
867
  return typeof n == "string" ? n != null && n.startsWith("/") ? n != null && n.startsWith("/files") ? n : `/files${n}` : n != null && n.startsWith("files") ? `/${n}` : n != null && n.startsWith("files") ? `/${n}` : `/files/${n}` : n;
854
- }, Ye = (t, n) => {
868
+ }, Ie = (t, n) => {
855
869
  if (!t)
856
870
  return "";
857
871
  const i = zr(t), s = typeof t == "object" && "pathname" in t ? `${t.origin}${i}` : t;
858
872
  return typeof n == "number" ? `${s.replace("/files", `/thumbs/${n}`)}` : s;
859
- }, yt = () => {
860
- const { apiURL: t } = Ve(le);
873
+ }, ht = () => {
874
+ const { apiURL: t } = Ue(ce);
861
875
  return {
862
876
  dateAdapter: Vr,
863
877
  distanceAdapter: Ur,
864
- filePathAdapter: (i, s) => Ye(
878
+ filePathAdapter: (i, s) => Ie(
865
879
  t && typeof i == "string" ? {
866
880
  origin: t,
867
881
  pathname: i
@@ -869,11 +883,11 @@ const pt = ({ language: t }) => (Ne(() => {
869
883
  s
870
884
  )
871
885
  };
872
- }, qr = (t) => t.charAt(0).toUpperCase() + t.slice(1).toLowerCase(), Br = (t) => {
886
+ }, Gr = (t) => t.charAt(0).toUpperCase() + t.slice(1).toLowerCase(), qr = (t) => {
873
887
  const s = t.split("/").filter((v) => v.length > 0).map((v) => v.replace(/\${([^}]*)}/g, "$1").split(/[_-]/).map((l) => l.charAt(0).toUpperCase() + l.slice(1)).join("")).join("");
874
888
  return s.charAt(0).toLowerCase() + s.slice(1);
875
- }, Gr = (t, n, i) => {
876
- const s = Br(n), v = qr(i);
889
+ }, Br = (t, n, i) => {
890
+ const s = qr(n), v = Gr(i);
877
891
  return `${s}${v}`;
878
892
  }, Jr = (t) => {
879
893
  if (t)
@@ -884,7 +898,7 @@ const pt = ({ language: t }) => (Ne(() => {
884
898
  useQuery: !0
885
899
  }
886
900
  }, n), {})) || {};
887
- }, bt = (t) => {
901
+ }, yt = (t) => {
888
902
  const { input: n = "./openapi.json", operationsToGenerateInfiniteQueryHook: i = void 0 } = t || {};
889
903
  return {
890
904
  api: {
@@ -905,7 +919,7 @@ const pt = ({ language: t }) => (Ne(() => {
905
919
  name: "axiosCustomInstance",
906
920
  path: `${__dirname}/config/orval/mutator/axiosCustomInstance.ts`
907
921
  },
908
- operationName: Gr,
922
+ operationName: Br,
909
923
  ...(i == null ? void 0 : i.length) && { operations: Jr(i) },
910
924
  query: {
911
925
  useQuery: !0
@@ -918,23 +932,23 @@ const pt = ({ language: t }) => (Ne(() => {
918
932
  };
919
933
  };
920
934
  export {
921
- ut as A,
922
- pt as D,
923
- it as G,
924
- lt as I,
925
- ft as M,
926
- vt as Q,
927
- ot as R,
928
- ct as S,
929
- dt as a,
930
- st as b,
935
+ st as A,
936
+ dt as D,
937
+ ot as G,
938
+ ut as I,
939
+ ct as M,
940
+ pt as Q,
941
+ at as R,
942
+ lt as S,
943
+ ft as a,
944
+ it as b,
931
945
  Mr as c,
932
- gt as d,
933
- ht as e,
934
- yt as f,
935
- bt as g,
946
+ mt as d,
947
+ gt as e,
948
+ ht as f,
949
+ yt as g,
936
950
  Vr as h,
937
951
  Ur as i,
938
- le as j,
939
- mt as u
952
+ ce as j,
953
+ vt as u
940
954
  };
package/dist/main.js CHANGED
@@ -1,4 +1,4 @@
1
- import { A as s, D as n, G as i, I as t, j as r, b as o, a as d, M as f, Q as g, R as u, S as C, h as p, i as A, g as c, f as x, e as D, d as I, u as M } from "./main-n8Gmn2zo.js";
1
+ import { A as s, D as n, G as i, I as t, j as r, b as o, a as d, M as f, Q as g, R as u, S as C, h as p, i as A, g as c, f as x, e as D, d as I, u as M } from "./main-D2TKp5zS.js";
2
2
  export {
3
3
  s as AxiosConfig,
4
4
  n as DaysJSConfig,
package/dist/main.umd.cjs CHANGED
@@ -1,4 +1,4 @@
1
- (function(d,E){typeof exports=="object"&&typeof module<"u"?E(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"],E):(d=typeof globalThis<"u"?globalThis:d||self,E(d["@tracktor/shared-module"]={},d.React,d.axios,d.reactRouterDom,d.reactGoogleTagManager,d.i18n,d.LanguageDetector,d.reactI18next,d.Sentry,d.mapbox,d.dayjs,d.reactQuery))})(this,function(d,E,M,k,$e,A,Be,Ge,Je,fe,N,de){"use strict";function qe(t){const n=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(n,i,u.get?u:{enumerable:!0,get:()=>t[i]})}}return n.default=t,Object.freeze(n)}const Q=qe(Je);var ee=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function He(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var re={exports:{}},z={};/**
1
+ (function(v,y){typeof exports=="object"&&typeof module<"u"?y(exports,require("react"),require("axios"),require("react-router-dom"),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","i18next","i18next-browser-languagedetector","react-i18next","@sentry/react","mapbox-gl","dayjs","@tanstack/react-query"],y):(v=typeof globalThis<"u"?globalThis:v||self,y(v["@tracktor/shared-module"]={},v.React,v.axios,v.reactRouterDom,v.i18n,v.LanguageDetector,v.reactI18next,v.Sentry,v.mapbox,v.dayjs,v.reactQuery))})(this,function(v,y,M,x,k,Ge,Be,Je,fe,N,de){"use strict";function He(r){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const i in r)if(i!=="default"){const u=Object.getOwnPropertyDescriptor(r,i);Object.defineProperty(n,i,u.get?u:{enumerable:!0,get:()=>r[i]})}}return n.default=r,Object.freeze(n)}const Q=He(Je);var ee=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function $e(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var te={exports:{}},z={};/**
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 ve;function Xe(){return ve||(ve=1,process.env.NODE_ENV!=="production"&&function(){var t=E,n=Symbol.for("react.element"),i=Symbol.for("react.portal"),u=Symbol.for("react.fragment"),p=Symbol.for("react.strict_mode"),y=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),_=Symbol.for("react.suspense"),b=Symbol.for("react.suspense_list"),S=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),P=Symbol.for("react.offscreen"),x=Symbol.iterator,h="@@iterator";function J(e){if(e===null||typeof e!="object")return null;var r=x&&e[x]||e[h];return typeof r=="function"?r:null}var F=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function C(e){{for(var r=arguments.length,o=new Array(r>1?r-1:0),s=1;s<r;s++)o[s-1]=arguments[s];te("error",e,o)}}function te(e,r,o){{var s=F.ReactDebugCurrentFrame,m=s.getStackAddendum();m!==""&&(r+="%s",o=o.concat([m]));var g=o.map(function(v){return String(v)});g.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,g)}}var Cr=!1,Tr=!1,Sr=!1,jr=!1,Or=!1,be;be=Symbol.for("react.module.reference");function wr(e){return!!(typeof e=="string"||typeof e=="function"||e===u||e===y||Or||e===p||e===_||e===b||jr||e===P||Cr||Tr||Sr||typeof e=="object"&&e!==null&&(e.$$typeof===j||e.$$typeof===S||e.$$typeof===a||e.$$typeof===l||e.$$typeof===c||e.$$typeof===be||e.getModuleId!==void 0))}function Pr(e,r,o){var s=e.displayName;if(s)return s;var m=r.displayName||r.name||"";return m!==""?o+"("+m+")":o}function Ee(e){return e.displayName||"Context"}function Y(e){if(e==null)return null;if(typeof e.tag=="number"&&C("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 y:return"Profiler";case p:return"StrictMode";case _:return"Suspense";case b:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case l:var r=e;return Ee(r)+".Consumer";case a:var o=e;return Ee(o._context)+".Provider";case c:return Pr(e,e.render,"ForwardRef");case S:var s=e.displayName||null;return s!==null?s:Y(e.type)||"Memo";case j:{var m=e,g=m._payload,v=m._init;try{return Y(v(g))}catch{return null}}}return null}var I=Object.assign,$=0,Re,Ce,Te,Se,je,Oe,we;function Pe(){}Pe.__reactDisabledLog=!0;function Mr(){{if($===0){Re=console.log,Ce=console.info,Te=console.warn,Se=console.error,je=console.group,Oe=console.groupCollapsed,we=console.groupEnd;var e={configurable:!0,enumerable:!0,value:Pe,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}$++}}function kr(){{if($--,$===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:I({},e,{value:Re}),info:I({},e,{value:Ce}),warn:I({},e,{value:Te}),error:I({},e,{value:Se}),group:I({},e,{value:je}),groupCollapsed:I({},e,{value:Oe}),groupEnd:I({},e,{value:we})})}$<0&&C("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ne=F.ReactCurrentDispatcher,ae;function q(e,r,o){{if(ae===void 0)try{throw Error()}catch(m){var s=m.stack.trim().match(/\n( *(at )?)/);ae=s&&s[1]||""}return`
10
- `+ae+e}}var oe=!1,H;{var xr=typeof WeakMap=="function"?WeakMap:Map;H=new xr}function Me(e,r){if(!e||oe)return"";{var o=H.get(e);if(o!==void 0)return o}var s;oe=!0;var m=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var g;g=ne.current,ne.current=null,Mr();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(D){s=D}Reflect.construct(e,[],v)}else{try{v.call()}catch(D){s=D}e.call(v.prototype)}}else{try{throw Error()}catch(D){s=D}e()}}catch(D){if(D&&s&&typeof D.stack=="string"){for(var f=D.stack.split(`
11
- `),O=s.stack.split(`
12
- `),R=f.length-1,T=O.length-1;R>=1&&T>=0&&f[R]!==O[T];)T--;for(;R>=1&&T>=0;R--,T--)if(f[R]!==O[T]){if(R!==1||T!==1)do if(R--,T--,T<0||f[R]!==O[T]){var w=`
13
- `+f[R].replace(" at new "," at ");return e.displayName&&w.includes("<anonymous>")&&(w=w.replace("<anonymous>",e.displayName)),typeof e=="function"&&H.set(e,w),w}while(R>=1&&T>=0);break}}}finally{oe=!1,ne.current=g,kr(),Error.prepareStackTrace=m}var V=e?e.displayName||e.name:"",Ue=V?q(V):"";return typeof e=="function"&&H.set(e,Ue),Ue}function Ar(e,r,o){return Me(e,!1)}function Lr(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function X(e,r,o){if(e==null)return"";if(typeof e=="function")return Me(e,Lr(e));if(typeof e=="string")return q(e);switch(e){case _:return q("Suspense");case b:return q("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case c:return Ar(e.render);case S:return X(e.type,r,o);case j:{var s=e,m=s._payload,g=s._init;try{return X(g(m),r,o)}catch{}}}return""}var K=Object.prototype.hasOwnProperty,ke={},xe=F.ReactDebugCurrentFrame;function Z(e){if(e){var r=e._owner,o=X(e.type,e._source,r?r.type:null);xe.setExtraStackFrame(o)}else xe.setExtraStackFrame(null)}function Yr(e,r,o,s,m){{var g=Function.call.bind(K);for(var v in e)if(g(e,v)){var f=void 0;try{if(typeof e[v]!="function"){var O=Error((s||"React class")+": "+o+" 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 O.name="Invariant Violation",O}f=e[v](r,v,s,o,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(R){f=R}f&&!(f instanceof Error)&&(Z(m),C("%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",o,v,typeof f),Z(null)),f instanceof Error&&!(f.message in ke)&&(ke[f.message]=!0,Z(m),C("Failed %s type: %s",o,f.message),Z(null))}}}var Dr=Array.isArray;function ie(e){return Dr(e)}function Fr(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,o=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return o}}function Ir(e){try{return Ae(e),!1}catch{return!0}}function Ae(e){return""+e}function Le(e){if(Ir(e))return C("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Fr(e)),Ae(e)}var B=F.ReactCurrentOwner,Nr={key:!0,ref:!0,__self:!0,__source:!0},Ye,De,ue;ue={};function Wr(e){if(K.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function Vr(e){if(K.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function zr(e,r){if(typeof e.ref=="string"&&B.current&&r&&B.current.stateNode!==r){var o=Y(B.current.type);ue[o]||(C('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',Y(B.current.type),e.ref),ue[o]=!0)}}function Ur(e,r){{var o=function(){Ye||(Ye=!0,C("%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))};o.isReactWarning=!0,Object.defineProperty(e,"key",{get:o,configurable:!0})}}function $r(e,r){{var o=function(){De||(De=!0,C("%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))};o.isReactWarning=!0,Object.defineProperty(e,"ref",{get:o,configurable:!0})}}var Br=function(e,r,o,s,m,g,v){var f={$$typeof:n,type:e,key:r,ref:o,props:v,_owner:g};return f._store={},Object.defineProperty(f._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(f,"_self",{configurable:!1,enumerable:!1,writable:!1,value:s}),Object.defineProperty(f,"_source",{configurable:!1,enumerable:!1,writable:!1,value:m}),Object.freeze&&(Object.freeze(f.props),Object.freeze(f)),f};function Gr(e,r,o,s,m){{var g,v={},f=null,O=null;o!==void 0&&(Le(o),f=""+o),Vr(r)&&(Le(r.key),f=""+r.key),Wr(r)&&(O=r.ref,zr(r,m));for(g in r)K.call(r,g)&&!Nr.hasOwnProperty(g)&&(v[g]=r[g]);if(e&&e.defaultProps){var R=e.defaultProps;for(g in R)v[g]===void 0&&(v[g]=R[g])}if(f||O){var T=typeof e=="function"?e.displayName||e.name||"Unknown":e;f&&Ur(v,T),O&&$r(v,T)}return Br(e,f,O,m,s,B.current,v)}}var se=F.ReactCurrentOwner,Fe=F.ReactDebugCurrentFrame;function W(e){if(e){var r=e._owner,o=X(e.type,e._source,r?r.type:null);Fe.setExtraStackFrame(o)}else Fe.setExtraStackFrame(null)}var ce;ce=!1;function le(e){return typeof e=="object"&&e!==null&&e.$$typeof===n}function Ie(){{if(se.current){var e=Y(se.current.type);if(e)return`
9
+ */var ve;function qe(){return ve||(ve=1,process.env.NODE_ENV!=="production"&&function(){var r=y,n=Symbol.for("react.element"),i=Symbol.for("react.portal"),u=Symbol.for("react.fragment"),p=Symbol.for("react.strict_mode"),b=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),_=Symbol.for("react.suspense"),E=Symbol.for("react.suspense_list"),S=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),P=Symbol.for("react.offscreen"),A=Symbol.iterator,h="@@iterator";function H(e){if(e===null||typeof e!="object")return null;var t=A&&e[A]||e[h];return typeof t=="function"?t:null}var F=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function C(e){{for(var t=arguments.length,o=new Array(t>1?t-1:0),s=1;s<t;s++)o[s-1]=arguments[s];re("error",e,o)}}function re(e,t,o){{var s=F.ReactDebugCurrentFrame,m=s.getStackAddendum();m!==""&&(t+="%s",o=o.concat([m]));var g=o.map(function(d){return String(d)});g.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,g)}}var Ct=!1,Tt=!1,St=!1,jt=!1,wt=!1,be;be=Symbol.for("react.module.reference");function Ot(e){return!!(typeof e=="string"||typeof e=="function"||e===u||e===b||wt||e===p||e===_||e===E||jt||e===P||Ct||Tt||St||typeof e=="object"&&e!==null&&(e.$$typeof===j||e.$$typeof===S||e.$$typeof===a||e.$$typeof===l||e.$$typeof===c||e.$$typeof===be||e.getModuleId!==void 0))}function Pt(e,t,o){var s=e.displayName;if(s)return s;var m=t.displayName||t.name||"";return m!==""?o+"("+m+")":o}function Ee(e){return e.displayName||"Context"}function D(e){if(e==null)return null;if(typeof e.tag=="number"&&C("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 b:return"Profiler";case p:return"StrictMode";case _:return"Suspense";case E:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case l:var t=e;return Ee(t)+".Consumer";case a:var o=e;return Ee(o._context)+".Provider";case c:return Pt(e,e.render,"ForwardRef");case S:var s=e.displayName||null;return s!==null?s:D(e.type)||"Memo";case j:{var m=e,g=m._payload,d=m._init;try{return D(d(g))}catch{return null}}}return null}var I=Object.assign,G=0,Re,Ce,Te,Se,je,we,Oe;function Pe(){}Pe.__reactDisabledLog=!0;function Mt(){{if(G===0){Re=console.log,Ce=console.info,Te=console.warn,Se=console.error,je=console.group,we=console.groupCollapsed,Oe=console.groupEnd;var e={configurable:!0,enumerable:!0,value:Pe,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}G++}}function xt(){{if(G--,G===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:I({},e,{value:Re}),info:I({},e,{value:Ce}),warn:I({},e,{value:Te}),error:I({},e,{value:Se}),group:I({},e,{value:je}),groupCollapsed:I({},e,{value:we}),groupEnd:I({},e,{value:Oe})})}G<0&&C("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ne=F.ReactCurrentDispatcher,ae;function $(e,t,o){{if(ae===void 0)try{throw Error()}catch(m){var s=m.stack.trim().match(/\n( *(at )?)/);ae=s&&s[1]||""}return`
10
+ `+ae+e}}var oe=!1,q;{var At=typeof WeakMap=="function"?WeakMap:Map;q=new At}function Me(e,t){if(!e||oe)return"";{var o=q.get(e);if(o!==void 0)return o}var s;oe=!0;var m=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var g;g=ne.current,ne.current=null,Mt();try{if(t){var d=function(){throw Error()};if(Object.defineProperty(d.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(d,[])}catch(Y){s=Y}Reflect.construct(e,[],d)}else{try{d.call()}catch(Y){s=Y}e.call(d.prototype)}}else{try{throw Error()}catch(Y){s=Y}e()}}catch(Y){if(Y&&s&&typeof Y.stack=="string"){for(var f=Y.stack.split(`
11
+ `),w=s.stack.split(`
12
+ `),R=f.length-1,T=w.length-1;R>=1&&T>=0&&f[R]!==w[T];)T--;for(;R>=1&&T>=0;R--,T--)if(f[R]!==w[T]){if(R!==1||T!==1)do if(R--,T--,T<0||f[R]!==w[T]){var O=`
13
+ `+f[R].replace(" at new "," at ");return e.displayName&&O.includes("<anonymous>")&&(O=O.replace("<anonymous>",e.displayName)),typeof e=="function"&&q.set(e,O),O}while(R>=1&&T>=0);break}}}finally{oe=!1,ne.current=g,xt(),Error.prepareStackTrace=m}var V=e?e.displayName||e.name:"",Ue=V?$(V):"";return typeof e=="function"&&q.set(e,Ue),Ue}function kt(e,t,o){return Me(e,!1)}function Lt(e){var t=e.prototype;return!!(t&&t.isReactComponent)}function X(e,t,o){if(e==null)return"";if(typeof e=="function")return Me(e,Lt(e));if(typeof e=="string")return $(e);switch(e){case _:return $("Suspense");case E:return $("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case c:return kt(e.render);case S:return X(e.type,t,o);case j:{var s=e,m=s._payload,g=s._init;try{return X(g(m),t,o)}catch{}}}return""}var K=Object.prototype.hasOwnProperty,xe={},Ae=F.ReactDebugCurrentFrame;function Z(e){if(e){var t=e._owner,o=X(e.type,e._source,t?t.type:null);Ae.setExtraStackFrame(o)}else Ae.setExtraStackFrame(null)}function Dt(e,t,o,s,m){{var g=Function.call.bind(K);for(var d in e)if(g(e,d)){var f=void 0;try{if(typeof e[d]!="function"){var w=Error((s||"React class")+": "+o+" 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`.");throw w.name="Invariant Violation",w}f=e[d](t,d,s,o,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(R){f=R}f&&!(f instanceof Error)&&(Z(m),C("%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",o,d,typeof f),Z(null)),f instanceof Error&&!(f.message in xe)&&(xe[f.message]=!0,Z(m),C("Failed %s type: %s",o,f.message),Z(null))}}}var Yt=Array.isArray;function ie(e){return Yt(e)}function Ft(e){{var t=typeof Symbol=="function"&&Symbol.toStringTag,o=t&&e[Symbol.toStringTag]||e.constructor.name||"Object";return o}}function It(e){try{return ke(e),!1}catch{return!0}}function ke(e){return""+e}function Le(e){if(It(e))return C("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Ft(e)),ke(e)}var B=F.ReactCurrentOwner,Nt={key:!0,ref:!0,__self:!0,__source:!0},De,Ye,ue;ue={};function Wt(e){if(K.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return!1}return e.ref!==void 0}function Vt(e){if(K.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return e.key!==void 0}function zt(e,t){if(typeof e.ref=="string"&&B.current&&t&&B.current.stateNode!==t){var o=D(B.current.type);ue[o]||(C('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',D(B.current.type),e.ref),ue[o]=!0)}}function Ut(e,t){{var o=function(){De||(De=!0,C("%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))};o.isReactWarning=!0,Object.defineProperty(e,"key",{get:o,configurable:!0})}}function Gt(e,t){{var o=function(){Ye||(Ye=!0,C("%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))};o.isReactWarning=!0,Object.defineProperty(e,"ref",{get:o,configurable:!0})}}var Bt=function(e,t,o,s,m,g,d){var f={$$typeof:n,type:e,key:t,ref:o,props:d,_owner:g};return f._store={},Object.defineProperty(f._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(f,"_self",{configurable:!1,enumerable:!1,writable:!1,value:s}),Object.defineProperty(f,"_source",{configurable:!1,enumerable:!1,writable:!1,value:m}),Object.freeze&&(Object.freeze(f.props),Object.freeze(f)),f};function Jt(e,t,o,s,m){{var g,d={},f=null,w=null;o!==void 0&&(Le(o),f=""+o),Vt(t)&&(Le(t.key),f=""+t.key),Wt(t)&&(w=t.ref,zt(t,m));for(g in t)K.call(t,g)&&!Nt.hasOwnProperty(g)&&(d[g]=t[g]);if(e&&e.defaultProps){var R=e.defaultProps;for(g in R)d[g]===void 0&&(d[g]=R[g])}if(f||w){var T=typeof e=="function"?e.displayName||e.name||"Unknown":e;f&&Ut(d,T),w&&Gt(d,T)}return Bt(e,f,w,m,s,B.current,d)}}var se=F.ReactCurrentOwner,Fe=F.ReactDebugCurrentFrame;function W(e){if(e){var t=e._owner,o=X(e.type,e._source,t?t.type:null);Fe.setExtraStackFrame(o)}else Fe.setExtraStackFrame(null)}var ce;ce=!1;function le(e){return typeof e=="object"&&e!==null&&e.$$typeof===n}function Ie(){{if(se.current){var e=D(se.current.type);if(e)return`
14
14
 
15
- Check the render method of \``+e+"`."}return""}}function Jr(e){{if(e!==void 0){var r=e.fileName.replace(/^.*[\\\/]/,""),o=e.lineNumber;return`
15
+ Check the render method of \``+e+"`."}return""}}function Ht(e){{if(e!==void 0){var t=e.fileName.replace(/^.*[\\\/]/,""),o=e.lineNumber;return`
16
16
 
17
- Check your code at `+r+":"+o+"."}return""}}var Ne={};function qr(e){{var r=Ie();if(!r){var o=typeof e=="string"?e:e.displayName||e.name;o&&(r=`
17
+ Check your code at `+t+":"+o+"."}return""}}var Ne={};function $t(e){{var t=Ie();if(!t){var o=typeof e=="string"?e:e.displayName||e.name;o&&(t=`
18
18
 
19
- Check the top-level render call using <`+o+">.")}return r}}function We(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var o=qr(r);if(Ne[o])return;Ne[o]=!0;var s="";e&&e._owner&&e._owner!==se.current&&(s=" It was passed a child from "+Y(e._owner.type)+"."),W(e),C('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',o,s),W(null)}}function Ve(e,r){{if(typeof e!="object")return;if(ie(e))for(var o=0;o<e.length;o++){var s=e[o];le(s)&&We(s,r)}else if(le(e))e._store&&(e._store.validated=!0);else if(e){var m=J(e);if(typeof m=="function"&&m!==e.entries)for(var g=m.call(e),v;!(v=g.next()).done;)le(v.value)&&We(v.value,r)}}}function Hr(e){{var r=e.type;if(r==null||typeof r=="string")return;var o;if(typeof r=="function")o=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===c||r.$$typeof===S))o=r.propTypes;else return;if(o){var s=Y(r);Yr(o,e.props,"prop",s,e)}else if(r.PropTypes!==void 0&&!ce){ce=!0;var m=Y(r);C("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",m||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&C("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Xr(e){{for(var r=Object.keys(e.props),o=0;o<r.length;o++){var s=r[o];if(s!=="children"&&s!=="key"){W(e),C("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),C("Invalid attribute `ref` supplied to `React.Fragment`."),W(null))}}function ze(e,r,o,s,m,g){{var v=wr(e);if(!v){var f="";(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.");var O=Jr(m);O?f+=O:f+=Ie();var R;e===null?R="null":ie(e)?R="array":e!==void 0&&e.$$typeof===n?(R="<"+(Y(e.type)||"Unknown")+" />",f=" Did you accidentally export a JSX literal instead of a component?"):R=typeof e,C("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",R,f)}var T=Gr(e,r,o,m,g);if(T==null)return T;if(v){var w=r.children;if(w!==void 0)if(s)if(ie(w)){for(var V=0;V<w.length;V++)Ve(w[V],e);Object.freeze&&Object.freeze(w)}else C("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 Ve(w,e)}return e===u?Xr(T):Hr(T),T}}function Kr(e,r,o){return ze(e,r,o,!0)}function Zr(e,r,o){return ze(e,r,o,!1)}var Qr=Zr,et=Kr;z.Fragment=u,z.jsx=Qr,z.jsxs=et}()),z}var U={};/**
19
+ Check the top-level render call using <`+o+">.")}return t}}function We(e,t){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var o=$t(t);if(Ne[o])return;Ne[o]=!0;var s="";e&&e._owner&&e._owner!==se.current&&(s=" It was passed a child from "+D(e._owner.type)+"."),W(e),C('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',o,s),W(null)}}function Ve(e,t){{if(typeof e!="object")return;if(ie(e))for(var o=0;o<e.length;o++){var s=e[o];le(s)&&We(s,t)}else if(le(e))e._store&&(e._store.validated=!0);else if(e){var m=H(e);if(typeof m=="function"&&m!==e.entries)for(var g=m.call(e),d;!(d=g.next()).done;)le(d.value)&&We(d.value,t)}}}function qt(e){{var t=e.type;if(t==null||typeof t=="string")return;var o;if(typeof t=="function")o=t.propTypes;else if(typeof t=="object"&&(t.$$typeof===c||t.$$typeof===S))o=t.propTypes;else return;if(o){var s=D(t);Dt(o,e.props,"prop",s,e)}else if(t.PropTypes!==void 0&&!ce){ce=!0;var m=D(t);C("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",m||"Unknown")}typeof t.getDefaultProps=="function"&&!t.getDefaultProps.isReactClassApproved&&C("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Xt(e){{for(var t=Object.keys(e.props),o=0;o<t.length;o++){var s=t[o];if(s!=="children"&&s!=="key"){W(e),C("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),C("Invalid attribute `ref` supplied to `React.Fragment`."),W(null))}}function ze(e,t,o,s,m,g){{var d=Ot(e);if(!d){var f="";(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.");var w=Ht(m);w?f+=w:f+=Ie();var R;e===null?R="null":ie(e)?R="array":e!==void 0&&e.$$typeof===n?(R="<"+(D(e.type)||"Unknown")+" />",f=" Did you accidentally export a JSX literal instead of a component?"):R=typeof e,C("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",R,f)}var T=Jt(e,t,o,m,g);if(T==null)return T;if(d){var O=t.children;if(O!==void 0)if(s)if(ie(O)){for(var V=0;V<O.length;V++)Ve(O[V],e);Object.freeze&&Object.freeze(O)}else C("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 Ve(O,e)}return e===u?Xt(T):qt(T),T}}function Kt(e,t,o){return ze(e,t,o,!0)}function Zt(e,t,o){return ze(e,t,o,!1)}var Qt=Zt,er=Kt;z.Fragment=u,z.jsx=Qt,z.jsxs=er}()),z}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 <`+o+">.")}return r}}function We(e,r){{if(
24
24
  *
25
25
  * This source code is licensed under the MIT license found in the
26
26
  * LICENSE file in the root directory of this source tree.
27
- */var pe;function Ke(){if(pe)return U;pe=1;var t=E,n=Symbol.for("react.element"),i=Symbol.for("react.fragment"),u=Object.prototype.hasOwnProperty,p=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,y={key:!0,ref:!0,__self:!0,__source:!0};function a(l,c,_){var b,S={},j=null,P=null;_!==void 0&&(j=""+_),c.key!==void 0&&(j=""+c.key),c.ref!==void 0&&(P=c.ref);for(b in c)u.call(c,b)&&!y.hasOwnProperty(b)&&(S[b]=c[b]);if(l&&l.defaultProps)for(b in c=l.defaultProps,c)S[b]===void 0&&(S[b]=c[b]);return{$$typeof:n,type:l,key:j,ref:P,props:S,_owner:p.current}}return U.Fragment=i,U.jsx=a,U.jsxs=a,U}process.env.NODE_ENV==="production"?re.exports=Ke():re.exports=Xe();var L=re.exports;const Ze=({Fallback:t,loginPath:n="/login",localStorageKey:i="user",redirect401Path:u="/login",isLogged:p})=>{var S,j,P,x;const[y,a]=E.useState(null),l=k.useLocation(),c=E.useRef(!1),_=typeof p=="function"?p():!!p,b=typeof _=="boolean"?_:_==null?void 0:_.isLogged;return E.useLayoutEffect(()=>{c.current||(c.current=!0,M==null||M.interceptors.response.use(h=>h,async h=>{var C;return typeof h=="object"&&h&&"response"in h&&h.response&&typeof h.response=="object"&&"status"in h.response&&h.response&&typeof h.response=="object"&&"status"in h.response&&((C=h==null?void 0:h.response)==null?void 0:C.status)===401&&(M.defaults.headers.common.Authorization=null,localStorage.removeItem(i),a(u)),Promise.reject(h)}))},[i,u]),b&&!y?L.jsx(E.Suspense,{fallback:t,children:(j=(S=l.state)==null?void 0:S.from)!=null&&j.state&&((x=(P=l.state)==null?void 0:P.from)==null?void 0:x.pathname)===n?L.jsx(k.Navigate,{to:l.state.from.state.from.pathname+l.state.from.state.from.search,replace:!0}):L.jsx(k.Outlet,{})}):L.jsx(k.Navigate,{to:n,state:{from:l},replace:!0})},Qe=()=>{const{pathname:t}=k.useLocation(),{sendEvent:n}=$e.useGoogleTagManager();return E.useEffect(()=>{n({event:"pageView",pathname:t})},[t,n]),L.jsx(k.Outlet,{})},G=E.createContext({apiURL:void 0,children:void 0}),er=({children:t,apiURL:n})=>{const i=E.useMemo(()=>({apiURL:n}),[n]);return L.jsx(G.Provider,{value:i,children:t})},rr=({tokenTypeKey:t="tokenType",userLocalStorageKey:n="user",tokenKey:i="accessToken",postContentType:u="application/json",...p})=>{const{apiURL:y=p.baseURL}=E.useContext(G);if(!M.defaults)return null;const a=localStorage.getItem(n),l=a?JSON.parse(a):null,c=l!=null&&l[t]?l[t]:null,_=l!=null&&l[i]?l[i]:null,b=a?`${c} ${_}`:null;return M.defaults.baseURL=y,M.defaults.headers.post["Content-Type"]=u,b&&(M.defaults.headers.common.Authorization=b),null},tr=({debug:t,resources:n})=>(A!=null&&A.isInitialized||(A.use(Be).use(Ge.initReactI18next).init({debug:t,fallbackLng:"en",interpolation:{escapeValue:!1},load:"languageOnly",react:{bindI18n:!1,useSuspense:!0},resources:n,returnNull:!1}).then(()=>{document.documentElement.lang!==A.resolvedLanguage&&A.resolvedLanguage&&document.documentElement.setAttribute("lang",A.resolvedLanguage)}),A.on("languageChanged",i=>{document.documentElement.setAttribute("lang",i)})),null),nr=({dsn:t,integrations:n,tracesSampleRate:i,replaysSessionSampleRate:u,replaysOnErrorSampleRate:p,tracePropagationTargets:y,ignoreErrors:a,debug:l,environment:c})=>(Q.isInitialized()||(l||process.env.NODE_ENV==="prod"||process.env.NODE_ENV==="production")&&Q.init({debug:l,dsn:t,environment:c||"production",ignoreErrors:[...a||[],/dynamically imported module/],integrations:[Q.reactRouterV6BrowserTracingIntegration({createRoutesFromChildren:k.createRoutesFromChildren,matchRoutes:k.matchRoutes,useEffect:E.useEffect,useLocation:k.useLocation,useNavigationType:k.useNavigationType}),...n||[]],replaysOnErrorSampleRate:p||1,replaysSessionSampleRate:u||.1,tracePropagationTargets:y,tracesSampleRate:i||1}),null),ar=({IMaskMixin:t,...n})=>{const i=E.useMemo(()=>t(({TextField:u,...p})=>L.jsx(u,{...p})),[t]);return L.jsx(i,{...n})},or=({accessToken:t})=>(fe&&t&&(fe.accessToken=t),null);var me={exports:{}};(function(t,n){(function(i,u){t.exports=u()})(ee,function(){var i={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(u,p,y){var a=p.prototype,l=a.format;y.en.formats=i,a.format=function(c){c===void 0&&(c="YYYY-MM-DDTHH:mm:ssZ");var _=this.$locale().formats,b=function(S,j){return S.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(P,x,h){var J=h&&h.toUpperCase();return x||j[h]||i[h]||j[J].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(F,C,te){return C||te.slice(1)})})}(c,_===void 0?{}:_);return l.call(this,b)}}})})(me);var ir=me.exports;const ur=He(ir);N.extend(ur);const sr=({language:t})=>(E.useLayoutEffect(()=>{var i;const n=t||((i=navigator.language)==null?void 0:i.slice(0,2))||"en";if(n==="en"){Promise.resolve().then(()=>ye).then(()=>{N.locale(n)});return}n==="fr"&&Promise.resolve().then(()=>Rr).then(()=>{N.locale(n)}).catch(()=>{Promise.resolve().then(()=>ye).then(()=>{N.locale("en")})})},[t]),null),cr=({children:t,defaultQueriesOptions:n,defaultMutationsOptions:i})=>{const u=new de.QueryClient({defaultOptions:{mutations:{...i},queries:{getNextPageParam:(p,y,a)=>p.length+(a||0),refetchOnWindowFocus:!1,retry:3,...n}}});return L.jsx(de.QueryClientProvider,{client:u,children:t})},lr=t=>{const{unknownErrorTranslationKey:n="error.unknownError"}=t||{},i=A.t(n),u=E.useCallback(y=>{var l,c,_,b,S,j,P,x,h;const{response:a}=y||{};return a!=null&&a.reason?String(a.reason):(l=a==null?void 0:a.data)!=null&&l.reason?String(a.data.reason):(c=a==null?void 0:a.data)!=null&&c.message?String(a.data.message):(b=(_=a==null?void 0:a.data)==null?void 0:_.detail)!=null&&b.length&&Array.isArray((S=a==null?void 0:a.data)==null?void 0:S.detail)&&((P=(j=a==null?void 0:a.data)==null?void 0:j.detail[0])!=null&&P.msg)&&typeof((h=(x=a==null?void 0:a.data)==null?void 0:x.detail[0])==null?void 0:h.msg)=="string"?String(a.data.detail[0].msg):i},[i]);return{getErrorCode:E.useCallback(y=>{var l,c,_;const{response:a}=y||{};return a!=null&&a.error_code?String(a==null?void 0:a.error_code):(l=a==null?void 0:a.data)!=null&&l.error_code?String((c=a==null?void 0:a.data)==null?void 0:c.error_code):a!=null&&a.error_code?String(a==null?void 0:a.error_code):(_=a==null?void 0:a.data)!=null&&_.error_code?String(a.data.error_code):"unknown_error_code"},[]),printError:u}},fr=({data:t,fetchNextPage:n,isFetchingNextPage:i,isInitialLoading:u,isLoading:p,enabled:y=!0})=>{const a=E.useCallback(async c=>{i||!y||await n({pageParam:(c==null?void 0:c.pageParam)||c.visibleRowsCount})},[y,n,i]),l=E.useMemo(()=>{if(t)return t.pages.reduce((c,_)=>[...c,..._],[])},[t]);return{fetchNextPageOnRowsScrollEnd:a,isLoading:i||p,loadingVariant:u?"skeleton":"linear",rows:l}},dr=()=>({clearAuthenticationToken:()=>{M.defaults.headers.common.Authorization=null},setAuthenticationToken:({tokenType:i,accessToken:u})=>{M.defaults.headers.common.Authorization=`${i} ${u}`}}),ge=(t,n="ll")=>N(t).format(n),_e=(t,n="km")=>{const i=Number(t);return Number.isNaN(i)?`0 ${n}`:`${i.toFixed(2)} ${n}`},vr=t=>{const n=t&&typeof t=="object"&&"pathname"in t&&t.pathname?t.pathname:t;return typeof n=="string"?n!=null&&n.startsWith("/")?n!=null&&n.startsWith("/files")?n:`/files${n}`:n!=null&&n.startsWith("files")?`/${n}`:n!=null&&n.startsWith("files")?`/${n}`:`/files/${n}`:n},he=(t,n)=>{if(!t)return"";const i=vr(t),u=typeof t=="object"&&"pathname"in t?`${t.origin}${i}`:t;return typeof n=="number"?`${u.replace("/files",`/thumbs/${n}`)}`:u},pr=()=>{const{apiURL:t}=E.useContext(G);return{dateAdapter:ge,distanceAdapter:_e,filePathAdapter:(i,u)=>he(t&&typeof i=="string"?{origin:t,pathname:i}:i,u)}},mr=t=>t.charAt(0).toUpperCase()+t.slice(1).toLowerCase(),gr=t=>{const u=t.split("/").filter(p=>p.length>0).map(p=>p.replace(/\${([^}]*)}/g,"$1").split(/[_-]/).map(c=>c.charAt(0).toUpperCase()+c.slice(1)).join("")).join("");return u.charAt(0).toLowerCase()+u.slice(1)},_r=(t,n,i)=>{const u=gr(n),p=mr(i);return`${u}${p}`},hr=t=>{if(t)return(t==null?void 0:t.reduce((n,i)=>(n[i]={query:{useInfinite:!0,useInfiniteQueryParam:"offset",useQuery:!0}},n),{}))||{}},yr=t=>{const{input:n="./openapi.json",operationsToGenerateInfiniteQueryHook:i=void 0}=t||{};return{api:{hooks:{afterAllFilesWrite:"prettier src/api/ --write"},input:n,output:{client:"react-query",mode:"tags-split",override:{header:u=>["Generated by orval 🍺",...u.title?[u.title]:[],...u.description?[u.description]:[]],mutator:{name:"axiosCustomInstance",path:`${__dirname}/config/orval/mutator/axiosCustomInstance.ts`},operationName:_r,...(i==null?void 0:i.length)&&{operations:hr(i)},query:{useQuery:!0}},schemas:"src/api/model",target:"src/api/services/api.ts"}}}};var br={exports:{}};(function(t,n){(function(i,u){t.exports=u()})(ee,function(){return{name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(i){var u=["th","st","nd","rd"],p=i%100;return"["+i+(u[(p-20)%10]||u[p]||u[0])+"]"}}})})(br);const ye=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var Er={exports:{}};(function(t,n){(function(i,u){t.exports=u(N)})(ee,function(i){function u(a){return a&&typeof a=="object"&&"default"in a?a:{default:a}}var p=u(i),y={name:"fr",weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},ordinal:function(a){return""+a+(a===1?"er":"")}};return p.default.locale(y,null,!0),y})})(Er);const Rr=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));d.AxiosConfig=rr,d.DaysJSConfig=sr,d.GTMSendPageView=Qe,d.I18nConfig=tr,d.InjectDependenciesContext=G,d.InjectDependenciesProvider=er,d.MapBoxConfig=or,d.MaskTextField=ar,d.QueryClientConfigProvider=cr,d.RequireAuth=Ze,d.SentryConfig=nr,d.dateAdapter=ge,d.distanceAdapter=_e,d.getOrvalConfig=yr,d.useAdapter=pr,d.useAuth=dr,d.useInfiniteDataGrid=fr,d.useResponseError=lr,Object.defineProperty(d,Symbol.toStringTag,{value:"Module"})});
27
+ */var pe;function Xe(){if(pe)return U;pe=1;var r=y,n=Symbol.for("react.element"),i=Symbol.for("react.fragment"),u=Object.prototype.hasOwnProperty,p=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,b={key:!0,ref:!0,__self:!0,__source:!0};function a(l,c,_){var E,S={},j=null,P=null;_!==void 0&&(j=""+_),c.key!==void 0&&(j=""+c.key),c.ref!==void 0&&(P=c.ref);for(E in c)u.call(c,E)&&!b.hasOwnProperty(E)&&(S[E]=c[E]);if(l&&l.defaultProps)for(E in c=l.defaultProps,c)S[E]===void 0&&(S[E]=c[E]);return{$$typeof:n,type:l,key:j,ref:P,props:S,_owner:p.current}}return U.Fragment=i,U.jsx=a,U.jsxs=a,U}process.env.NODE_ENV==="production"?te.exports=Xe():te.exports=qe();var L=te.exports;const Ke=({Fallback:r,loginPath:n="/login",localStorageKey:i="user",redirect401Path:u="/login",isLogged:p})=>{var S,j,P,A;const[b,a]=y.useState(null),l=x.useLocation(),c=y.useRef(!1),_=typeof p=="function"?p():!!p,E=typeof _=="boolean"?_:_==null?void 0:_.isLogged;return y.useLayoutEffect(()=>{c.current||(c.current=!0,M==null||M.interceptors.response.use(h=>h,async h=>{var C;return typeof h=="object"&&h&&"response"in h&&h.response&&typeof h.response=="object"&&"status"in h.response&&h.response&&typeof h.response=="object"&&"status"in h.response&&((C=h==null?void 0:h.response)==null?void 0:C.status)===401&&(M.defaults.headers.common.Authorization=null,localStorage.removeItem(i),a(u)),Promise.reject(h)}))},[i,u]),E&&!b?L.jsx(y.Suspense,{fallback:r,children:(j=(S=l.state)==null?void 0:S.from)!=null&&j.state&&((A=(P=l.state)==null?void 0:P.from)==null?void 0:A.pathname)===n?L.jsx(x.Navigate,{to:l.state.from.state.from.pathname+l.state.from.state.from.search,replace:!0}):L.jsx(x.Outlet,{})}):L.jsx(x.Navigate,{to:n,state:{from:l},replace:!0})},Ze=()=>{const[r,n]=y.useState();return y.useEffect(()=>{(async()=>{try{const{useGoogleTagManager:u}=await import("@tracktor/react-google-tag-manager");n(u)}catch(u){console.error(u)}})().then()},[]),r},Qe=()=>{const{pathname:r}=x.useLocation(),n=Ze();return y.useEffect(()=>{if(n){const{sendEvent:i}=n();i({event:"pageView",pathname:r})}},[r,n]),L.jsx(x.Outlet,{})},J=y.createContext({apiURL:void 0,children:void 0}),et=({children:r,apiURL:n})=>{const i=y.useMemo(()=>({apiURL:n}),[n]);return L.jsx(J.Provider,{value:i,children:r})},tt=({tokenTypeKey:r="tokenType",userLocalStorageKey:n="user",tokenKey:i="accessToken",postContentType:u="application/json",...p})=>{const{apiURL:b=p.baseURL}=y.useContext(J);if(!M.defaults)return null;const a=localStorage.getItem(n),l=a?JSON.parse(a):null,c=l!=null&&l[r]?l[r]:null,_=l!=null&&l[i]?l[i]:null,E=a?`${c} ${_}`:null;return M.defaults.baseURL=b,M.defaults.headers.post["Content-Type"]=u,E&&(M.defaults.headers.common.Authorization=E),null},rt=({debug:r,resources:n})=>(k!=null&&k.isInitialized||(k.use(Ge).use(Be.initReactI18next).init({debug:r,fallbackLng:"en",interpolation:{escapeValue:!1},load:"languageOnly",react:{bindI18n:!1,useSuspense:!0},resources:n,returnNull:!1}).then(()=>{document.documentElement.lang!==k.resolvedLanguage&&k.resolvedLanguage&&document.documentElement.setAttribute("lang",k.resolvedLanguage)}),k.on("languageChanged",i=>{document.documentElement.setAttribute("lang",i)})),null),nt=({dsn:r,integrations:n,tracesSampleRate:i,replaysSessionSampleRate:u,replaysOnErrorSampleRate:p,tracePropagationTargets:b,ignoreErrors:a,debug:l,environment:c})=>(Q.isInitialized()||(l||process.env.NODE_ENV==="prod"||process.env.NODE_ENV==="production")&&Q.init({debug:l,dsn:r,environment:c||"production",ignoreErrors:[...a||[],/dynamically imported module/],integrations:[Q.reactRouterV6BrowserTracingIntegration({createRoutesFromChildren:x.createRoutesFromChildren,matchRoutes:x.matchRoutes,useEffect:y.useEffect,useLocation:x.useLocation,useNavigationType:x.useNavigationType}),...n||[]],replaysOnErrorSampleRate:p||1,replaysSessionSampleRate:u||.1,tracePropagationTargets:b,tracesSampleRate:i||1}),null),at=({IMaskMixin:r,...n})=>{const i=y.useMemo(()=>r(({TextField:u,...p})=>L.jsx(u,{...p})),[r]);return L.jsx(i,{...n})},ot=({accessToken:r})=>(fe&&r&&(fe.accessToken=r),null);var me={exports:{}};(function(r,n){(function(i,u){r.exports=u()})(ee,function(){var i={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(u,p,b){var a=p.prototype,l=a.format;b.en.formats=i,a.format=function(c){c===void 0&&(c="YYYY-MM-DDTHH:mm:ssZ");var _=this.$locale().formats,E=function(S,j){return S.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(P,A,h){var H=h&&h.toUpperCase();return A||j[h]||i[h]||j[H].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(F,C,re){return C||re.slice(1)})})}(c,_===void 0?{}:_);return l.call(this,E)}}})})(me);var it=me.exports;const ut=$e(it);N.extend(ut);const st=({language:r})=>(y.useLayoutEffect(()=>{var i;const n=r||((i=navigator.language)==null?void 0:i.slice(0,2))||"en";if(n==="en"){Promise.resolve().then(()=>ye).then(()=>{N.locale(n)});return}n==="fr"&&Promise.resolve().then(()=>Rt).then(()=>{N.locale(n)}).catch(()=>{Promise.resolve().then(()=>ye).then(()=>{N.locale("en")})})},[r]),null),ct=({children:r,defaultQueriesOptions:n,defaultMutationsOptions:i})=>{const u=new de.QueryClient({defaultOptions:{mutations:{...i},queries:{getNextPageParam:(p,b,a)=>p.length+(a||0),refetchOnWindowFocus:!1,retry:3,...n}}});return L.jsx(de.QueryClientProvider,{client:u,children:r})},lt=r=>{const{unknownErrorTranslationKey:n="error.unknownError"}=r||{},i=k.t(n),u=y.useCallback(b=>{var l,c,_,E,S,j,P,A,h;const{response:a}=b||{};return a!=null&&a.reason?String(a.reason):(l=a==null?void 0:a.data)!=null&&l.reason?String(a.data.reason):(c=a==null?void 0:a.data)!=null&&c.message?String(a.data.message):(E=(_=a==null?void 0:a.data)==null?void 0:_.detail)!=null&&E.length&&Array.isArray((S=a==null?void 0:a.data)==null?void 0:S.detail)&&((P=(j=a==null?void 0:a.data)==null?void 0:j.detail[0])!=null&&P.msg)&&typeof((h=(A=a==null?void 0:a.data)==null?void 0:A.detail[0])==null?void 0:h.msg)=="string"?String(a.data.detail[0].msg):i},[i]);return{getErrorCode:y.useCallback(b=>{var l,c,_;const{response:a}=b||{};return a!=null&&a.error_code?String(a==null?void 0:a.error_code):(l=a==null?void 0:a.data)!=null&&l.error_code?String((c=a==null?void 0:a.data)==null?void 0:c.error_code):a!=null&&a.error_code?String(a==null?void 0:a.error_code):(_=a==null?void 0:a.data)!=null&&_.error_code?String(a.data.error_code):"unknown_error_code"},[]),printError:u}},ft=({data:r,fetchNextPage:n,isFetchingNextPage:i,isInitialLoading:u,isLoading:p,enabled:b=!0})=>{const a=y.useCallback(async c=>{i||!b||await n({pageParam:(c==null?void 0:c.pageParam)||c.visibleRowsCount})},[b,n,i]),l=y.useMemo(()=>{if(r)return r.pages.reduce((c,_)=>[...c,..._],[])},[r]);return{fetchNextPageOnRowsScrollEnd:a,isLoading:i||p,loadingVariant:u?"skeleton":"linear",rows:l}},dt=()=>({clearAuthenticationToken:()=>{M.defaults.headers.common.Authorization=null},setAuthenticationToken:({tokenType:i,accessToken:u})=>{M.defaults.headers.common.Authorization=`${i} ${u}`}}),ge=(r,n="ll")=>N(r).format(n),_e=(r,n="km")=>{const i=Number(r);return Number.isNaN(i)?`0 ${n}`:`${i.toFixed(2)} ${n}`},vt=r=>{const n=r&&typeof r=="object"&&"pathname"in r&&r.pathname?r.pathname:r;return typeof n=="string"?n!=null&&n.startsWith("/")?n!=null&&n.startsWith("/files")?n:`/files${n}`:n!=null&&n.startsWith("files")?`/${n}`:n!=null&&n.startsWith("files")?`/${n}`:`/files/${n}`:n},he=(r,n)=>{if(!r)return"";const i=vt(r),u=typeof r=="object"&&"pathname"in r?`${r.origin}${i}`:r;return typeof n=="number"?`${u.replace("/files",`/thumbs/${n}`)}`:u},pt=()=>{const{apiURL:r}=y.useContext(J);return{dateAdapter:ge,distanceAdapter:_e,filePathAdapter:(i,u)=>he(r&&typeof i=="string"?{origin:r,pathname:i}:i,u)}},mt=r=>r.charAt(0).toUpperCase()+r.slice(1).toLowerCase(),gt=r=>{const u=r.split("/").filter(p=>p.length>0).map(p=>p.replace(/\${([^}]*)}/g,"$1").split(/[_-]/).map(c=>c.charAt(0).toUpperCase()+c.slice(1)).join("")).join("");return u.charAt(0).toLowerCase()+u.slice(1)},_t=(r,n,i)=>{const u=gt(n),p=mt(i);return`${u}${p}`},ht=r=>{if(r)return(r==null?void 0:r.reduce((n,i)=>(n[i]={query:{useInfinite:!0,useInfiniteQueryParam:"offset",useQuery:!0}},n),{}))||{}},yt=r=>{const{input:n="./openapi.json",operationsToGenerateInfiniteQueryHook:i=void 0}=r||{};return{api:{hooks:{afterAllFilesWrite:"prettier src/api/ --write"},input:n,output:{client:"react-query",mode:"tags-split",override:{header:u=>["Generated by orval 🍺",...u.title?[u.title]:[],...u.description?[u.description]:[]],mutator:{name:"axiosCustomInstance",path:`${__dirname}/config/orval/mutator/axiosCustomInstance.ts`},operationName:_t,...(i==null?void 0:i.length)&&{operations:ht(i)},query:{useQuery:!0}},schemas:"src/api/model",target:"src/api/services/api.ts"}}}};var bt={exports:{}};(function(r,n){(function(i,u){r.exports=u()})(ee,function(){return{name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(i){var u=["th","st","nd","rd"],p=i%100;return"["+i+(u[(p-20)%10]||u[p]||u[0])+"]"}}})})(bt);const ye=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var Et={exports:{}};(function(r,n){(function(i,u){r.exports=u(N)})(ee,function(i){function u(a){return a&&typeof a=="object"&&"default"in a?a:{default:a}}var p=u(i),b={name:"fr",weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},ordinal:function(a){return""+a+(a===1?"er":"")}};return p.default.locale(b,null,!0),b})})(Et);const Rt=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));v.AxiosConfig=tt,v.DaysJSConfig=st,v.GTMSendPageView=Qe,v.I18nConfig=rt,v.InjectDependenciesContext=J,v.InjectDependenciesProvider=et,v.MapBoxConfig=ot,v.MaskTextField=at,v.QueryClientConfigProvider=ct,v.RequireAuth=Ke,v.SentryConfig=nt,v.dateAdapter=ge,v.distanceAdapter=_e,v.getOrvalConfig=yt,v.useAdapter=pt,v.useAuth=dt,v.useInfiniteDataGrid=ft,v.useResponseError=lt,Object.defineProperty(v,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tracktor/shared-module",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "type": "module",
5
5
  "license": "UNLICENSED",
6
6
  "types": "./dist/main.d.ts",