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