@tracktor/shared-module 2.27.0 → 2.28.0
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 +70 -63
- package/dist/main.umd.cjs +2 -2
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -20,7 +20,7 @@ const Ke = (e, t) => {
|
|
|
20
20
|
ee(n)
|
|
21
21
|
])
|
|
22
22
|
) : e;
|
|
23
|
-
class
|
|
23
|
+
class _e {
|
|
24
24
|
url;
|
|
25
25
|
getToken;
|
|
26
26
|
onEvent;
|
|
@@ -114,7 +114,7 @@ class Re {
|
|
|
114
114
|
}
|
|
115
115
|
var V = { exports: {} }, M = {};
|
|
116
116
|
var le;
|
|
117
|
-
function
|
|
117
|
+
function Re() {
|
|
118
118
|
if (le) return M;
|
|
119
119
|
le = 1;
|
|
120
120
|
var e = /* @__PURE__ */ Symbol.for("react.transitional.element"), t = /* @__PURE__ */ Symbol.for("react.fragment");
|
|
@@ -137,7 +137,7 @@ function _e() {
|
|
|
137
137
|
}
|
|
138
138
|
var U = {};
|
|
139
139
|
var ue;
|
|
140
|
-
function
|
|
140
|
+
function be() {
|
|
141
141
|
return ue || (ue = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
142
142
|
function e(r) {
|
|
143
143
|
if (r == null) return null;
|
|
@@ -164,9 +164,9 @@ function Te() {
|
|
|
164
164
|
), r.$$typeof) {
|
|
165
165
|
case A:
|
|
166
166
|
return "Portal";
|
|
167
|
-
case
|
|
167
|
+
case _:
|
|
168
168
|
return r.displayName || "Context";
|
|
169
|
-
case
|
|
169
|
+
case T:
|
|
170
170
|
return (r._context.displayName || "Context") + ".Consumer";
|
|
171
171
|
case S:
|
|
172
172
|
var p = r.render;
|
|
@@ -194,11 +194,11 @@ function Te() {
|
|
|
194
194
|
}
|
|
195
195
|
if (p) {
|
|
196
196
|
p = console;
|
|
197
|
-
var E = p.error,
|
|
197
|
+
var E = p.error, R = typeof Symbol == "function" && Symbol.toStringTag && r[Symbol.toStringTag] || r.constructor.name || "Object";
|
|
198
198
|
return E.call(
|
|
199
199
|
p,
|
|
200
200
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
201
|
-
|
|
201
|
+
R
|
|
202
202
|
), t(r);
|
|
203
203
|
}
|
|
204
204
|
}
|
|
@@ -245,15 +245,15 @@ function Te() {
|
|
|
245
245
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
246
246
|
)), r = this.props.ref, r !== void 0 ? r : null;
|
|
247
247
|
}
|
|
248
|
-
function f(r, p, E,
|
|
249
|
-
var
|
|
248
|
+
function f(r, p, E, R, W, B) {
|
|
249
|
+
var b = E.ref;
|
|
250
250
|
return r = {
|
|
251
251
|
$$typeof: v,
|
|
252
252
|
type: r,
|
|
253
253
|
key: p,
|
|
254
254
|
props: E,
|
|
255
|
-
_owner:
|
|
256
|
-
}, (
|
|
255
|
+
_owner: R
|
|
256
|
+
}, (b !== void 0 ? b : null) !== null ? Object.defineProperty(r, "ref", {
|
|
257
257
|
enumerable: !1,
|
|
258
258
|
get: l
|
|
259
259
|
}) : Object.defineProperty(r, "ref", { enumerable: !1, value: null }), r._store = {}, Object.defineProperty(r._store, "validated", {
|
|
@@ -278,48 +278,48 @@ function Te() {
|
|
|
278
278
|
value: B
|
|
279
279
|
}), Object.freeze && (Object.freeze(r.props), Object.freeze(r)), r;
|
|
280
280
|
}
|
|
281
|
-
function i(r, p, E,
|
|
282
|
-
var
|
|
283
|
-
if (
|
|
284
|
-
if (
|
|
285
|
-
if ($(
|
|
286
|
-
for (
|
|
287
|
-
h(
|
|
288
|
-
Object.freeze && Object.freeze(
|
|
281
|
+
function i(r, p, E, R, W, B) {
|
|
282
|
+
var b = p.children;
|
|
283
|
+
if (b !== void 0)
|
|
284
|
+
if (R)
|
|
285
|
+
if ($(b)) {
|
|
286
|
+
for (R = 0; R < b.length; R++)
|
|
287
|
+
h(b[R]);
|
|
288
|
+
Object.freeze && Object.freeze(b);
|
|
289
289
|
} else
|
|
290
290
|
console.error(
|
|
291
291
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
292
292
|
);
|
|
293
|
-
else h(
|
|
293
|
+
else h(b);
|
|
294
294
|
if (N.call(p, "key")) {
|
|
295
|
-
|
|
295
|
+
b = e(r);
|
|
296
296
|
var F = Object.keys(p).filter(function(ye) {
|
|
297
297
|
return ye !== "key";
|
|
298
298
|
});
|
|
299
|
-
|
|
299
|
+
R = 0 < F.length ? "{key: someKey, " + F.join(": ..., ") + ": ...}" : "{key: someKey}", ae[b + R] || (F = 0 < F.length ? "{" + F.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
300
300
|
`A props object containing a "key" prop is being spread into JSX:
|
|
301
301
|
let props = %s;
|
|
302
302
|
<%s {...props} />
|
|
303
303
|
React keys must be passed directly to JSX without using spread:
|
|
304
304
|
let props = %s;
|
|
305
305
|
<%s key={someKey} {...props} />`,
|
|
306
|
-
|
|
307
|
-
|
|
306
|
+
R,
|
|
307
|
+
b,
|
|
308
308
|
F,
|
|
309
|
-
|
|
310
|
-
), ae[
|
|
309
|
+
b
|
|
310
|
+
), ae[b + R] = !0);
|
|
311
311
|
}
|
|
312
|
-
if (
|
|
312
|
+
if (b = null, E !== void 0 && (n(E), b = "" + E), c(p) && (n(p.key), b = "" + p.key), "key" in p) {
|
|
313
313
|
E = {};
|
|
314
314
|
for (var H in p)
|
|
315
315
|
H !== "key" && (E[H] = p[H]);
|
|
316
316
|
} else E = p;
|
|
317
|
-
return
|
|
317
|
+
return b && u(
|
|
318
318
|
E,
|
|
319
319
|
typeof r == "function" ? r.displayName || r.name || "Unknown" : r
|
|
320
320
|
), f(
|
|
321
321
|
r,
|
|
322
|
-
|
|
322
|
+
b,
|
|
323
323
|
E,
|
|
324
324
|
o(),
|
|
325
325
|
W,
|
|
@@ -332,7 +332,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
332
332
|
function m(r) {
|
|
333
333
|
return typeof r == "object" && r !== null && r.$$typeof === v;
|
|
334
334
|
}
|
|
335
|
-
var y = we, v = /* @__PURE__ */ Symbol.for("react.transitional.element"), A = /* @__PURE__ */ Symbol.for("react.portal"), k = /* @__PURE__ */ Symbol.for("react.fragment"), g = /* @__PURE__ */ Symbol.for("react.strict_mode"), d = /* @__PURE__ */ Symbol.for("react.profiler"),
|
|
335
|
+
var y = we, v = /* @__PURE__ */ Symbol.for("react.transitional.element"), A = /* @__PURE__ */ Symbol.for("react.portal"), k = /* @__PURE__ */ Symbol.for("react.fragment"), g = /* @__PURE__ */ Symbol.for("react.strict_mode"), d = /* @__PURE__ */ Symbol.for("react.profiler"), T = /* @__PURE__ */ Symbol.for("react.consumer"), _ = /* @__PURE__ */ Symbol.for("react.context"), S = /* @__PURE__ */ Symbol.for("react.forward_ref"), O = /* @__PURE__ */ Symbol.for("react.suspense"), J = /* @__PURE__ */ Symbol.for("react.suspense_list"), G = /* @__PURE__ */ Symbol.for("react.memo"), w = /* @__PURE__ */ Symbol.for("react.lazy"), x = /* @__PURE__ */ Symbol.for("react.activity"), K = /* @__PURE__ */ Symbol.for("react.client.reference"), Y = y.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, N = Object.prototype.hasOwnProperty, $ = Array.isArray, q = console.createTask ? console.createTask : function() {
|
|
336
336
|
return null;
|
|
337
337
|
};
|
|
338
338
|
y = {
|
|
@@ -345,33 +345,33 @@ React keys must be passed directly to JSX without using spread:
|
|
|
345
345
|
a
|
|
346
346
|
)(), se = q(s(a)), ae = {};
|
|
347
347
|
U.Fragment = k, U.jsx = function(r, p, E) {
|
|
348
|
-
var
|
|
348
|
+
var R = 1e4 > Y.recentlyCreatedOwnerStacks++;
|
|
349
349
|
return i(
|
|
350
350
|
r,
|
|
351
351
|
p,
|
|
352
352
|
E,
|
|
353
353
|
!1,
|
|
354
|
-
|
|
355
|
-
|
|
354
|
+
R ? Error("react-stack-top-frame") : oe,
|
|
355
|
+
R ? q(s(r)) : se
|
|
356
356
|
);
|
|
357
357
|
}, U.jsxs = function(r, p, E) {
|
|
358
|
-
var
|
|
358
|
+
var R = 1e4 > Y.recentlyCreatedOwnerStacks++;
|
|
359
359
|
return i(
|
|
360
360
|
r,
|
|
361
361
|
p,
|
|
362
362
|
E,
|
|
363
363
|
!0,
|
|
364
|
-
|
|
365
|
-
|
|
364
|
+
R ? Error("react-stack-top-frame") : oe,
|
|
365
|
+
R ? q(s(r)) : se
|
|
366
366
|
);
|
|
367
367
|
};
|
|
368
368
|
})()), U;
|
|
369
369
|
}
|
|
370
370
|
var de;
|
|
371
|
-
function
|
|
372
|
-
return de || (de = 1, process.env.NODE_ENV === "production" ? V.exports =
|
|
371
|
+
function Te() {
|
|
372
|
+
return de || (de = 1, process.env.NODE_ENV === "production" ? V.exports = Re() : V.exports = be()), V.exports;
|
|
373
373
|
}
|
|
374
|
-
var I =
|
|
374
|
+
var I = Te();
|
|
375
375
|
const qe = ({ IMaskMixin: e, ...t }) => {
|
|
376
376
|
const n = te(
|
|
377
377
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
@@ -619,11 +619,18 @@ const qe = ({ IMaskMixin: e, ...t }) => {
|
|
|
619
619
|
if (!w)
|
|
620
620
|
return;
|
|
621
621
|
const x = () => o ?? Le(y), K = (N) => {
|
|
622
|
-
N.type
|
|
622
|
+
switch (N.type) {
|
|
623
|
+
case "ready":
|
|
624
|
+
l(!0), i(N.unreadCount ?? 0);
|
|
625
|
+
break;
|
|
626
|
+
case "new_message_notification":
|
|
627
|
+
i(($) => $ + 1);
|
|
628
|
+
break;
|
|
629
|
+
}
|
|
623
630
|
for (const $ of A.current)
|
|
624
631
|
$(N);
|
|
625
632
|
}, Y = setTimeout(() => {
|
|
626
|
-
const N = new
|
|
633
|
+
const N = new _e({
|
|
627
634
|
getToken: x,
|
|
628
635
|
onConnectionChange: ($) => {
|
|
629
636
|
c($), $ || l(!1);
|
|
@@ -644,9 +651,9 @@ const qe = ({ IMaskMixin: e, ...t }) => {
|
|
|
644
651
|
v.current?.leaveThread(w);
|
|
645
652
|
}, []), d = P((w, x) => {
|
|
646
653
|
v.current?.sendMessage(w, x);
|
|
647
|
-
}, []),
|
|
654
|
+
}, []), T = P((w) => {
|
|
648
655
|
v.current?.markRead(w);
|
|
649
|
-
}, []),
|
|
656
|
+
}, []), _ = P((w, x) => {
|
|
650
657
|
v.current?.listThreads(w, x);
|
|
651
658
|
}, []), S = P((w = 1) => {
|
|
652
659
|
i((x) => x + w);
|
|
@@ -661,8 +668,8 @@ const qe = ({ IMaskMixin: e, ...t }) => {
|
|
|
661
668
|
isReady: u,
|
|
662
669
|
joinThread: k,
|
|
663
670
|
leaveThread: g,
|
|
664
|
-
listThreads:
|
|
665
|
-
markRead:
|
|
671
|
+
listThreads: _,
|
|
672
|
+
markRead: T,
|
|
666
673
|
sendMessage: d,
|
|
667
674
|
subscribe: J,
|
|
668
675
|
unreadCount: f
|
|
@@ -857,33 +864,33 @@ const qe = ({ IMaskMixin: e, ...t }) => {
|
|
|
857
864
|
);
|
|
858
865
|
const m = () => Object.keys(localStorage).filter(
|
|
859
866
|
(g) => g.startsWith(f) && g.endsWith(e?.pathname || o)
|
|
860
|
-
), y = (g, d,
|
|
861
|
-
const
|
|
867
|
+
), y = (g, d, T = !0) => {
|
|
868
|
+
const _ = he(g, e?.pathname || o, f);
|
|
862
869
|
if (!d || Array.isArray(d) && !d.length) {
|
|
863
870
|
i ? (a.delete(g), c(a)) : l((S) => {
|
|
864
871
|
const O = { ...S };
|
|
865
872
|
return delete O[g], O;
|
|
866
|
-
}), h && localStorage.removeItem(
|
|
873
|
+
}), h && localStorage.removeItem(_);
|
|
867
874
|
return;
|
|
868
875
|
}
|
|
869
|
-
h &&
|
|
876
|
+
h && T && d && localStorage.setItem(_, JSON.stringify({ ...a, [g]: d })), i && d ? (a.set(g, JSON.stringify(d)), c(a)) : !i && d && l((S) => ({ ...S, [g]: d }));
|
|
870
877
|
};
|
|
871
878
|
return {
|
|
872
879
|
getFilter: (g, d) => {
|
|
873
880
|
if (i) {
|
|
874
|
-
const
|
|
875
|
-
if (
|
|
876
|
-
return pe(
|
|
881
|
+
const T = a.get(g);
|
|
882
|
+
if (T)
|
|
883
|
+
return pe(T);
|
|
877
884
|
} else {
|
|
878
|
-
const
|
|
879
|
-
if (
|
|
880
|
-
return
|
|
885
|
+
const T = u[g];
|
|
886
|
+
if (T !== void 0)
|
|
887
|
+
return T;
|
|
881
888
|
}
|
|
882
889
|
if (h) {
|
|
883
|
-
const
|
|
884
|
-
if (
|
|
890
|
+
const T = he(g, e?.pathname || o, f), _ = localStorage.getItem(T);
|
|
891
|
+
if (_)
|
|
885
892
|
try {
|
|
886
|
-
const S = JSON.parse(
|
|
893
|
+
const S = JSON.parse(_)[g];
|
|
887
894
|
return !i && S !== void 0 && l((O) => ({ ...O, [g]: S })), S;
|
|
888
895
|
} catch {
|
|
889
896
|
}
|
|
@@ -893,7 +900,7 @@ const qe = ({ IMaskMixin: e, ...t }) => {
|
|
|
893
900
|
getFilters: () => {
|
|
894
901
|
const g = h ? Qe(m()) : {};
|
|
895
902
|
if (i) {
|
|
896
|
-
const d = Array.from(a.entries()).reduce((
|
|
903
|
+
const d = Array.from(a.entries()).reduce((T, [_, S]) => (T[_] = pe(S), T), {});
|
|
897
904
|
return {
|
|
898
905
|
...g,
|
|
899
906
|
...d
|
|
@@ -904,9 +911,9 @@ const qe = ({ IMaskMixin: e, ...t }) => {
|
|
|
904
911
|
...u
|
|
905
912
|
};
|
|
906
913
|
},
|
|
907
|
-
handleFilter: (g, d) => (
|
|
908
|
-
if (
|
|
909
|
-
const S = d || "value", O = typeof
|
|
914
|
+
handleFilter: (g, d) => (T, _) => {
|
|
915
|
+
if (_ || Array.isArray(_) && _.length === 0) {
|
|
916
|
+
const S = d || "value", O = typeof _ == "object" && S in _ ? _[S] : _;
|
|
910
917
|
y(g, O);
|
|
911
918
|
return;
|
|
912
919
|
}
|
|
@@ -967,7 +974,7 @@ const qe = ({ IMaskMixin: e, ...t }) => {
|
|
|
967
974
|
}, []), printError: u };
|
|
968
975
|
};
|
|
969
976
|
export {
|
|
970
|
-
|
|
977
|
+
_e as ChatClient,
|
|
971
978
|
me as ChatContext,
|
|
972
979
|
st as ChatProvider,
|
|
973
980
|
He as GTMSendPageView,
|
package/dist/main.umd.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
(function(g,
|
|
1
|
+
(function(g,F){typeof exports=="object"&&typeof module<"u"?F(exports,require("axios"),require("react")):typeof define=="function"&&define.amd?define(["exports","axios","react"],F):(g=typeof globalThis<"u"?globalThis:g||self,F(g["@tracktor/shared-module"]={},g.axios,g.React))})(this,(function(g,F,l){"use strict";const ge=(e,t)=>{const r=F.CancelToken.source(),s=F({...e,...t,cancelToken:r.token}).then(({data:o})=>o);return s.cancel=()=>{r.cancel("Query was cancelled")},s},Q=e=>Array.isArray(e)?e.map(Q):e!==null&&typeof e=="object"?Object.fromEntries(Object.entries(e).map(([t,r])=>[t.replace(/_([a-z])/g,(s,o)=>o.toUpperCase()),Q(r)])):e,J=e=>Array.isArray(e)?e.map(J):e!==null&&typeof e=="object"?Object.fromEntries(Object.entries(e).map(([t,r])=>[t.replace(/[A-Z]/g,s=>`_${s.toLowerCase()}`),J(r)])):e;class ee{url;getToken;onEvent;onConnectionChange;shouldReconnect;maxReconnectAttempts;reconnectBaseDelay;ws=null;reconnectAttempt=0;reconnectTimer=null;intentionalClose=!1;joinedThreads=new Set;pendingMessages=[];_connected=!1;_ready=!1;constructor(t){this.url=t.url,this.getToken=t.getToken,this.onEvent=t.onEvent,this.onConnectionChange=t.onConnectionChange,this.shouldReconnect=t.reconnect??!0,this.maxReconnectAttempts=t.maxReconnectAttempts??Number.POSITIVE_INFINITY,this.reconnectBaseDelay=t.reconnectBaseDelay??1e3}get connected(){return this._connected}get ready(){return this._ready}connect(){const t=this.getToken();if(!t)return;this.intentionalClose=!1;const r=this.url.includes("?")?"&":"?",s=`${this.url}${r}token=${t}`;this.ws=new WebSocket(s),this.ws.onopen=()=>{this._connected=!0,this.reconnectAttempt=0,this.onConnectionChange?.(!0),this.rejoinThreads(),this.flushPendingMessages()},this.ws.onmessage=o=>{try{const a=JSON.parse(o.data),c=Q(a);c.type==="ready"&&(this._ready=!0),this.onEvent?.(c)}catch{}},this.ws.onclose=()=>{this._connected=!1,this._ready=!1,this.onConnectionChange?.(!1),!this.intentionalClose&&this.shouldReconnect&&this.reconnectAttempt<this.maxReconnectAttempts&&this.scheduleReconnect()},this.ws.onerror=()=>{}}disconnect(){this.intentionalClose=!0,this.pendingMessages=[],this.clearReconnectTimer(),this.ws&&(this.ws.close(),this.ws=null)}joinThread(t){this.joinedThreads.add(t),this.send({threadId:t,type:"join_thread"})}leaveThread(t){this.joinedThreads.delete(t),this.send({threadId:t,type:"leave_thread"})}sendMessage(t,r){if(r.length>1e3)throw new Error("Message body exceeds maximum length of 1000 characters");this.send({body:r,threadId:t,type:"send_message"})}markRead(t){this.send({threadId:t,type:"mark_read"})}listThreads(t,r){this.send({limit:t,offset:r,type:"list_threads"})}send(t){if(!this.ws||this.ws.readyState!==WebSocket.OPEN){this.pendingMessages.push(t);return}this.ws.send(JSON.stringify(J(t)))}flushPendingMessages(){const t=[...this.pendingMessages];this.pendingMessages=[];for(const r of t)this.send(r)}rejoinThreads(){for(const t of this.joinedThreads)this.send({threadId:t,type:"join_thread"})}scheduleReconnect(){this.clearReconnectTimer();const t=Math.min(this.reconnectBaseDelay*2**this.reconnectAttempt,3e4);this.reconnectAttempt++,this.reconnectTimer=setTimeout(()=>{this.connect()},t)}clearReconnectTimer(){this.reconnectTimer!==null&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null)}}var W={exports:{}},M={};var te;function me(){if(te)return M;te=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(s,o,a){var c=null;if(a!==void 0&&(c=""+a),o.key!==void 0&&(c=""+o.key),"key"in o){a={};for(var d in o)d!=="key"&&(a[d]=o[d])}else a=o;return o=a.ref,{$$typeof:e,type:s,key:c,ref:o!==void 0?o:null,props:a}}return M.Fragment=t,M.jsx=r,M.jsxs=r,M}var Y={};var ne;function ye(){return ne||(ne=1,process.env.NODE_ENV!=="production"&&(function(){function e(n){if(n==null)return null;if(typeof n=="function")return n.$$typeof===X?null:n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case P:return"Fragment";case f:return"Profiler";case y:return"StrictMode";case N:return"Suspense";case B:return"SuspenseList";case O:return"Activity"}if(typeof n=="object")switch(typeof n.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),n.$$typeof){case k:return"Portal";case R:return n.displayName||"Context";case S:return(n._context.displayName||"Context")+".Consumer";case A:var p=n.render;return n=n.displayName,n||(n=p.displayName||p.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case H:return p=n.displayName||null,p!==null?p:e(n.type)||"Memo";case v:p=n._payload,n=n._init;try{return e(n(p))}catch{}}return null}function t(n){return""+n}function r(n){try{t(n);var p=!1}catch{p=!0}if(p){p=console;var C=p.error,b=typeof Symbol=="function"&&Symbol.toStringTag&&n[Symbol.toStringTag]||n.constructor.name||"Object";return C.call(p,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",b),t(n)}}function s(n){if(n===P)return"<>";if(typeof n=="object"&&n!==null&&n.$$typeof===v)return"<...>";try{var p=e(n);return p?"<"+p+">":"<...>"}catch{return"<...>"}}function o(){var n=z.A;return n===null?null:n.getOwner()}function a(){return Error("react-stack-top-frame")}function c(n){if(x.call(n,"key")){var p=Object.getOwnPropertyDescriptor(n,"key").get;if(p&&p.isReactWarning)return!1}return n.key!==void 0}function d(n,p){function C(){ue||(ue=!0,console.error("%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://react.dev/link/special-props)",p))}C.isReactWarning=!0,Object.defineProperty(n,"key",{get:C,configurable:!0})}function u(){var n=e(this.type);return de[n]||(de[n]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),n=this.props.ref,n!==void 0?n:null}function h(n,p,C,b,V,q){var T=C.ref;return n={$$typeof:_,type:n,key:p,props:C,_owner:b},(T!==void 0?T:null)!==null?Object.defineProperty(n,"ref",{enumerable:!1,get:u}):Object.defineProperty(n,"ref",{enumerable:!1,value:null}),n._store={},Object.defineProperty(n._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(n,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(n,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:V}),Object.defineProperty(n,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:q}),Object.freeze&&(Object.freeze(n.props),Object.freeze(n)),n}function i(n,p,C,b,V,q){var T=p.children;if(T!==void 0)if(b)if(L(T)){for(b=0;b<T.length;b++)m(T[b]);Object.freeze&&Object.freeze(T)}else console.error("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 m(T);if(x.call(p,"key")){T=e(n);var D=Object.keys(p).filter(function(nt){return nt!=="key"});b=0<D.length?"{key: someKey, "+D.join(": ..., ")+": ...}":"{key: someKey}",pe[T+b]||(D=0<D.length?"{"+D.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
2
2
|
let props = %s;
|
|
3
3
|
<%s {...props} />
|
|
4
4
|
React keys must be passed directly to JSX without using spread:
|
|
5
5
|
let props = %s;
|
|
6
|
-
<%s key={someKey} {...props} />`,b,T,D,T),he[T+b]=!0)}if(T=null,C!==void 0&&(r(C),T=""+C),c(h)&&(r(h.key),T=""+h.key),"key"in h){C={};for(var $ in h)$!=="key"&&(C[$]=h[$])}else C=h;return T&&d(C,typeof n=="function"?n.displayName||n.name||"Unknown":n),p(n,T,C,o(),V,q)}function m(n){E(n)?n._store&&(n._store.validated=1):typeof n=="object"&&n!==null&&n.$$typeof===w&&(n._payload.status==="fulfilled"?E(n._payload.value)&&n._payload.value._store&&(n._payload.value._store.validated=1):n._store&&(n._store.validated=1))}function E(n){return typeof n=="object"&&n!==null&&n.$$typeof===_}var v=l,_=Symbol.for("react.transitional.element"),k=Symbol.for("react.portal"),P=Symbol.for("react.fragment"),y=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),S=Symbol.for("react.consumer"),R=Symbol.for("react.context"),A=Symbol.for("react.forward_ref"),N=Symbol.for("react.suspense"),B=Symbol.for("react.suspense_list"),H=Symbol.for("react.memo"),w=Symbol.for("react.lazy"),O=Symbol.for("react.activity"),X=Symbol.for("react.client.reference"),z=v.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,x=Object.prototype.hasOwnProperty,F=Array.isArray,Z=console.createTask?console.createTask:function(){return null};v={react_stack_bottom_frame:function(n){return n()}};var ue,de={},fe=v.react_stack_bottom_frame.bind(v,a)(),pe=Z(s(a)),he={};Y.Fragment=P,Y.jsx=function(n,h,C){var b=1e4>z.recentlyCreatedOwnerStacks++;return i(n,h,C,!1,b?Error("react-stack-top-frame"):fe,b?Z(s(n)):pe)},Y.jsxs=function(n,h,C){var b=1e4>z.recentlyCreatedOwnerStacks++;return i(n,h,C,!0,b?Error("react-stack-top-frame"):fe,b?Z(s(n)):pe)}})()),Y}var re;function Ee(){return re||(re=1,process.env.NODE_ENV==="production"?W.exports=me():W.exports=ye()),W.exports}var I=Ee();const ve=({IMaskMixin:e,...t})=>{const r=l.useMemo(()=>e(({TextField:s,...o})=>I.jsx(s,{...o})),[e]);return I.jsx(r,{...t})},j=l.createContext({}),we=({children:e,apiURL:t,libraries:r,localStorageKeys:s})=>{const o=l.useMemo(()=>({apiURL:t,libraries:r,localStorageKeys:s}),[t,r,s]);return I.jsx(j.Provider,{value:o,children:e})},Ce=({data:e,...t})=>{const{libraries:r}=l.useContext(j),s=t?.reactRouter||r?.reactRouter,o=t?.gtm||r?.gtm;if(!s)throw new Error("React Router is not provided. You can provide it with InjectDependenciesProvider or directly in props of GTMSendPageView.");if(!o)throw new Error("GTM is not provided. You can provide it with InjectDependenciesProvider or directly in props of GTMSendPageView.");const{useGoogleTagManager:a}=o,{useLocation:c,Outlet:d}=s,{pathname:u}=c(),{sendEvent:p}=a();return l.useEffect(()=>{p({event:"pageView",pathname:u,...e})},[e,u,p]),I.jsx(d,{})},U=(()=>{try{return typeof global=="object"&&global!==null&&("HermesInternal"in global||"__fbBatchedBridge"in global||"__metro"in global)||typeof window>"u"&&typeof global<"u"?!0:typeof navigator<"u"&&navigator.userAgent?/react.native|ReactNative/i.test(navigator.userAgent):!1}catch{return!1}})(),_e="user",Re=({tokenTypeKey:e="tokenType",tokenKey:t="accessToken",postContentType:r="application/json",...s})=>{const{apiURL:o=s.apiURL,libraries:a,localStorageKeys:c}=l.useContext(j),d=s?.userLocalStorageKey||c?.user||_e,u=s?.axios||a?.axios;if(!u)throw new Error("Axios is not provided. You can provide it with InjectDependenciesProvider or directly in props.");if(!u?.defaults||U)return null;if(typeof window<"u"&&window.localStorage){const p=localStorage.getItem(d),i=p?JSON.parse(p):null,m=i?.[e]?i[e]:null,E=i?.[t]?i[t]:null,v=p?`${m} ${E}`:null;v&&(u.defaults.headers.common.Authorization=v)}return u.defaults.baseURL=o,u.defaults.headers.post["Content-Type"]=r,null},be=({language:e,...t})=>{const{libraries:r}=l.useContext(j),s=t?.dayjs||r?.dayjs,o=t?.plugin||r?.dayjsPlugin;if(!s)throw new Error("Dayjs is not provided. You can provide it with InjectDependenciesProvider or directly in props of InitializeDaysJSConfig.");return l.useEffect(()=>{(async()=>{const c=e||navigator.language?.slice(0,2)||"en";o&&o.forEach(d=>{d&&s.extend(d)}),await import("dayjs/locale/en"),await import("dayjs/locale/fr"),s.locale(c)})().then()},[s,o,e]),null},Te=({debug:e,resources:t,...r})=>{const{libraries:s}=l.useContext(j),o=r?.i18||s?.i18,{i18next:a,initReactI18next:c,languageDetector:d}=o||{};if(U)return null;if(!o)throw new Error("i18 is not provided. You can provide it with InjectDependenciesProvider or directly in props.");return a?.isInitialized||(a.use(d).use(c).init({debug:e,fallbackLng:"en",interpolation:{escapeValue:!1},load:"languageOnly",react:{bindI18n:"languageChanged loaded",useSuspense:!0},resources:t,returnNull:!1}).then(()=>{document.documentElement.lang!==a.resolvedLanguage&&a.resolvedLanguage&&document.documentElement.setAttribute("lang",a.resolvedLanguage)}),a.on("languageChanged",u=>{document.documentElement.setAttribute("lang",u)})),null},Se=({dsn:e,integrations:t,tracesSampleRate:r,replaysSessionSampleRate:s,replaysOnErrorSampleRate:o,tracePropagationTargets:a,ignoreErrors:c,debug:d,environment:u,release:p,...i})=>{const{libraries:m}=l.useContext(j),E=i?.sentry||m?.sentry,v=i?.reactRouter||m?.reactRouter;if(!E)throw new Error("Sentry is not provided. You can provide it with InjectDependenciesProvider or directly in props.");if(!v)throw new Error("React Router is not provided. You can provide it with InjectDependenciesProvider or directly in props.");if(E.isInitialized())return null;const{createRoutesFromChildren:_,matchRoutes:k,useLocation:P,useNavigationType:y}=v;return(d||process.env.NODE_ENV==="prod"||process.env.NODE_ENV==="production")&&E.init({debug:d,dsn:e,environment:u||"production",ignoreErrors:[...c||[],/dynamically imported module/,/Cannot read properties of undefined \(reading 'default'\)/,/Loading chunk \d+ failed/,/ChunkLoadError/,/Failed to fetch dynamically imported module/,/vite:preloadError/],integrations:[E.reactRouterV6BrowserTracingIntegration({createRoutesFromChildren:_,matchRoutes:k,useEffect:l.useEffect,useLocation:P,useNavigationType:y}),...t||[]],release:p,replaysOnErrorSampleRate:o||1,replaysSessionSampleRate:s||.1,tracePropagationTargets:a,tracesSampleRate:r||1}),null},Ae=()=>(l.useEffect(()=>{if(U)return;const e=t=>{try{t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation(),window.location.reload()}catch{}};return window.addEventListener("vite:preloadError",e),()=>{window.removeEventListener("vite:preloadError",e)}},[]),null),oe=new WeakMap,ke="user",je=({Fallback:e,isLogged:t,loginPath:r="/login",redirect401Path:s="/login",...o})=>{const{libraries:a,localStorageKeys:c}=l.useContext(j),d=o?.reactRouter||a?.reactRouter,u=o?.axios||a?.axios,p=o?.localStorageKey||c?.user||ke;if(!d)throw new Error("React Router is not provided. You can provide it with InjectDependenciesProvider or directly in props.");const[i,m]=l.useState(null),{useLocation:E,Navigate:v,Outlet:_}=d,k=E(),P=typeof t=="function"?t():!!t,y=typeof P=="boolean"?P:P?.isLogged;return l.useEffect(()=>{oe.has(u)||(oe.set(u,!0),u.interceptors.response.use(f=>f,f=>(typeof f=="object"&&f&&"response"in f&&f.response&&typeof f.response=="object"&&"status"in f.response&&f.response&&typeof f.response=="object"&&"status"in f.response&&f?.response?.status===401&&(typeof f=="object"&&f&&"config"in f&&f.config&&typeof f.config=="object"&&"headers"in f.config&&f.config.headers&&typeof f.config.headers=="object"&&"Authorization"in f.config.headers&&f.config.headers.Authorization&&(u.defaults.headers.common.Authorization=null,typeof window<"u"&&window.localStorage&&localStorage.removeItem(p)),m(s)),Promise.reject(f))))},[u,p,s]),y&&!i?I.jsx(l.Suspense,{fallback:e,children:k.state?.from?.state&&k.state?.from?.pathname===r?I.jsx(v,{to:k.state.from.state.from.pathname+k.state.from.state.from.search,replace:!0}):I.jsx(_,{})}):I.jsx(v,{to:r+k.search,state:{from:k},replace:!0})},Pe=e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase(),Oe=e=>{const t=e.split(/[/\\]/).pop()||"";return t.substring(0,t.lastIndexOf("."))},Ie=e=>{const s=e.split("/").filter(o=>o.length>0).map(o=>o.replace(/\${([^}]*)}/g,"$1").split(/[_-]/).map(u=>u.charAt(0).toUpperCase()+u.slice(1)).join("")).join("");return s.charAt(0).toLowerCase()+s.slice(1)},Ne=e=>(e.split("/").pop()||e).replace(/\.json$/,"").replace(/^openapi\./,""),xe=(e,t,r,s)=>{const o=Ie(t),a=Pe(r),c=`${o}${a}`;return e&&typeof e=="object"&&"operationId"in e&&s?.includes(String(e.operationId))?`${c}AsQuery`:c},Le=(e,t)=>{const r={};return e?.forEach(s=>{r[s]={query:{useInfinite:!0,useInfiniteQueryParam:"offset",useQuery:!0}}}),t?.filter(s=>!r[s]).forEach(s=>{r[s]={query:{useQuery:!0}}}),Object.keys(r).length?r:void 0},Fe=e=>(Array.isArray(e)?e:[e]).reduce((r,s)=>{const{output:o,useInfiniteIds:a,useQueryIds:c,input:d="./openapi.json",customAxiosInstancePath:u,overrideApiName:p}=s||{},i=p||Ne(d),m=u||"./node_modules/@tracktor/shared-module/dist/axiosCustomInstance.ts";return{...r,[i]:{input:d,output:{baseUrl:o?.baseUrl,client:"react-query",mode:"tags-split",override:{...(a?.length||c?.length)&&{operations:Le(a,c)},header:E=>["Generated by orval 🍺",...E.title?[E.title]:[],...E.description?[E.description]:[]],mutator:{name:Oe(m),path:m},operationName:(E,v,_)=>xe(E,v,_,c),query:{useQuery:!0}},schemas:o?.schemas||`src/api/${i}/model`,target:o?.target||`src/api/${i}/services/api.ts`,...o}}}},{}),De="user",Me=e=>{const t=e.startsWith("https")?"wss":"ws",r=e.replace(/^https?:\/\//,"");return`${t}://${r}/v2/threads/ws`},Ye=e=>{try{const t=localStorage.getItem(e);return t?JSON.parse(t)?.accessToken??null:null}catch{return null}},K=l.createContext(null),Ue=({children:e,reconnect:t=!0,enabled:r=!0,url:s,token:o})=>{const[a,c]=l.useState(!1),[d,u]=l.useState(!1),[p,i]=l.useState(0),{apiURL:m,localStorageKeys:E}=l.useContext(j),v=E?.user||De,_=l.useRef(null),k=l.useRef(new Set);l.useEffect(()=>{if(!r)return;const w=s||(m?Me(m):null);if(!w)return;const O=()=>o??Ye(v),X=x=>{x.type==="ready"&&(u(!0),i(x.unreadCount??0));for(const F of k.current)F(x)},z=setTimeout(()=>{const x=new ee({getToken:O,onConnectionChange:F=>{c(F),F||u(!1)},onEvent:X,reconnect:t,url:w});_.current=x,x.connect()},0);return()=>{clearTimeout(z),_.current?.disconnect(),_.current=null}},[r,s,o,m,t,v]);const P=l.useCallback(w=>{_.current?.joinThread(w)},[]),y=l.useCallback(w=>{_.current?.leaveThread(w)},[]),f=l.useCallback((w,O)=>{_.current?.sendMessage(w,O)},[]),S=l.useCallback(w=>{_.current?.markRead(w)},[]),R=l.useCallback((w,O)=>{_.current?.listThreads(w,O)},[]),A=l.useCallback((w=1)=>{i(O=>O+w)},[]),N=l.useCallback((w=1)=>{i(O=>Math.max(0,O-w))},[]),B=l.useCallback(w=>(k.current.add(w),()=>{k.current.delete(w)}),[]),H={decrementUnreadCount:N,incrementUnreadCount:A,isConnected:a,isReady:d,joinThread:P,leaveThread:y,listThreads:R,markRead:S,sendMessage:f,subscribe:B,unreadCount:p};return I.jsx(K.Provider,{value:H,children:e})},ze=e=>e&&typeof e=="function",We=e=>e&&typeof e=="function",Ge=({children:e,defaultQueriesOptions:t,defaultMutationsOptions:r,...s})=>{const{libraries:o}=l.useContext(j),a=s?.QueryClient||o?.reactQuery?.QueryClient,c=s?.QueryClientProvider||o?.reactQuery?.QueryClientProvider;if(!a)throw new Error("QueryClient is not provided. You can provide it with InjectDependenciesProvider or directly in props.");if(!c)throw new Error("QueryClientProvider is not provided. You can provide it with InjectDependenciesProvider or directly in props.");if(!ze(c))throw new Error("Provided QueryClientProvider dependencies are not valid.");if(!We(a))throw new Error("Provided QueryClient dependencies are not valid.");const d=new a({defaultOptions:{mutations:{...r},queries:{getNextPageParam:(u,p,i)=>u.length+(i||0),refetchOnWindowFocus:!1,retry:3,...t}}});return I.jsx(c,{client:d,children:e})},se=({library:e,date:t,format:r="ll"})=>e(t).format(r),ae=(e,t)=>{const{fractionDigits:r=0,metric:s="km",spacingBetween:o=!0}=t||{},a=Number(e),c=o?" ":"";return Number.isNaN(a)?`0${c}${s}`:`${a.toFixed(r)}${c}${s}`},ie=e=>!e||typeof e!="string"?"":e.replace(/_/g," ").toLowerCase().split(" ").map(r=>r.length>0?r.charAt(0).toUpperCase()+r.slice(1):r).join(" "),Ve=e=>e?.startsWith("/")?e?.startsWith("/files")?e:`/files${e}`:e?.startsWith("files")?`/${e}`:`/files/${e}`,Qe=({path:e,size:t,apiURL:r})=>{if(!e)return"";const s=Ve(e),o=`${r}${s}`,a=o.match(/\.(jpeg|jpg|png|gif|bmp|webp|svg|avif)$/)!==null;return typeof t=="number"&&a?`${o.replace("/files",`/thumbs/${t}`)}`:o},Je=e=>{const{apiURL:t,libraries:r}=l.useContext(j),s=e?.dayjs||r?.dayjs;return{dateAdapter:(c,d)=>{if(!s)throw new Error("Dayjs is not provided. You can provide it with InjectDependenciesProvider or directly in props.");return se({date:c,format:d,library:s})},distanceAdapter:ae,filePathAdapter:(c,d)=>{if(!t)throw new Error("API URL is not provided. You can provide it with InjectDependenciesProvider or directly in props to filePathAdapter.");return typeof c=="string"&&/^https?:\/\//.test(c)?c:Qe({apiURL:t,path:c,size:d})},worksiteNameAdapter:ie}},Ke=e=>{const{libraries:t,localStorageKeys:r}=l.useContext(j),s=e?.axios||t?.axios,o=e?.localStorageKey||r?.user||"user";if(!s)throw new Error("Axios is not provided. You can provide it with InjectDependenciesProvider or directly in params of useAuth.");const a=l.useCallback(({tokenType:d,accessToken:u})=>{s.defaults.headers.common.Authorization=`${d} ${u}`},[s.defaults.headers.common]),c=()=>{s.defaults.headers.common.Authorization=null};return l.useEffect(()=>{if(U)return;const d=({newValue:u,key:p})=>{if(p===o&&u)try{const{accessToken:i,tokenType:m}=JSON.parse(u);a({accessToken:i,tokenType:m})}catch(i){console.error("Failed to parse newValue from localStorage:",i)}};return window.addEventListener("storage",d),()=>{window.removeEventListener("storage",d)}},[o,a]),{clearAuthenticationToken:c,setAuthenticationToken:a}},Be=e=>{const t=l.useContext(K);if(!t)throw new Error("useChat must be used within ChatProvider");const{subscribe:r,...s}=t,o=l.useRef(e);return o.current=e,l.useEffect(()=>r(a=>{const{onReady:c,onNewMessage:d,onNewMessageNotification:u,onPresence:p,onError:i,onJoinedThread:m,onLeftThread:E,onMarkedRead:v,onThreadsList:_}=o.current??{};switch(a.type){case"ready":c?.(a);break;case"new_message":d?.(a);break;case"new_message_notification":u?.(a);break;case"presence":p?.(a);break;case"error":i?.(a);break;case"joined_thread":m?.(a);break;case"left_thread":E?.(a);break;case"marked_read":v?.(a);break;case"threads_list":_?.(a);break}}),[r]),s},G=(e,t)=>t==="short"?e.split("-")[0]:e,He=(e,t="full")=>{const[r,s]=l.useState(()=>{const o=e?.language||navigator.language;return e&&"isInitialized"in e&&e.isInitialized,G(o,t)});return l.useEffect(()=>{e&&"isInitialized"in e&&e.isInitialized&&e.language&&s(G(e.language,t));const o=a=>{s(G(a,t))};return e?.on?.("languageChanged",o),()=>{e?.off?.("languageChanged",o)}},[e,t]),r},Xe="tracktor.filter",Ze={getFilter:()=>{},getFilters:()=>({}),handleFilter:()=>()=>{},setFilter:()=>{}},ce=e=>{try{return JSON.parse(e)}catch{return e}},le=(e,t,r)=>`${r}_${e}=>${t}`,qe=e=>e.reduce((t,r)=>{const s=localStorage.getItem(r);if(s)try{const o=JSON.parse(s),a=Object.keys(o)?.[0];a&&(t[a]=Object.values(o)?.[0])}catch{}return t},{}),$e=e=>{const{libraries:t,localStorageKeys:r}=l.useContext(j),s=e?.reactRouter||t?.reactRouter,{pathname:o}=s?.useLocation?.()??{pathname:"/"},[a,c]=s?.useSearchParams?.()??[new URLSearchParams,()=>{}],[d,u]=l.useState({}),p=r?.filter||Xe,i=e?.syncWithUrl===void 0?!0:e?.syncWithUrl,m=e?.persistToLocalStorage===void 0?!0:e?.persistToLocalStorage;if(U)return Ze;if(!s)throw new Error("React Router is not provided. You can provide it with InjectDependenciesProvider or directly in props of reactRouter.");const E=()=>Object.keys(localStorage).filter(y=>y.startsWith(p)&&y.endsWith(e?.pathname||o)),v=(y,f,S=!0)=>{const R=le(y,e?.pathname||o,p);if(!f||Array.isArray(f)&&!f.length){i?(a.delete(y),c(a)):u(A=>{const N={...A};return delete N[y],N}),m&&localStorage.removeItem(R);return}m&&S&&f&&localStorage.setItem(R,JSON.stringify({...a,[y]:f})),i&&f?(a.set(y,JSON.stringify(f)),c(a)):!i&&f&&u(A=>({...A,[y]:f}))};return{getFilter:(y,f)=>{if(i){const S=a.get(y);if(S)return ce(S)}else{const S=d[y];if(S!==void 0)return S}if(m){const S=le(y,e?.pathname||o,p),R=localStorage.getItem(S);if(R)try{const A=JSON.parse(R)[y];return!i&&A!==void 0&&u(N=>({...N,[y]:A})),A}catch{}}return f},getFilters:()=>{const y=m?qe(E()):{};if(i){const f=Array.from(a.entries()).reduce((S,[R,A])=>(S[R]=ce(A),S),{});return{...y,...f}}return{...y,...d}},handleFilter:(y,f)=>(S,R)=>{if(R||Array.isArray(R)&&R.length===0){const A=f||"value",N=typeof R=="object"&&A in R?R[A]:R;v(y,N);return}v(y,void 0)},setFilter:v}},et=({data:e,fetchNextPage:t,isFetchingNextPage:r,isInitialLoading:s,isLoading:o,enabled:a=!0})=>{const c=l.useCallback(async u=>{r||!a||await t({pageParam:u?.pageParam||u.visibleRowsCount})},[a,t,r]),d=l.useMemo(()=>{if(e)return e.pages.reduce((u,p)=>[...u,...p],[])},[e]);return{fetchNextPageOnRowsScrollEnd:c,isLoading:r||o,loadingVariant:s?"skeleton":"linear-progress",rows:d}},tt=e=>{const{libraries:t}=l.useContext(j),r=e?.i18||t?.i18,s=e?.i18?.translateFunction||t?.i18?.translateFunction,o=r?.i18next?.t||s||(p=>p),{unknownErrorTranslationKey:a="error.unknownError"}=e||{},c=o(a),d=l.useCallback(p=>{if(p&&typeof p=="object"&&"response"in p){const{response:i}=p||{};if(i&&typeof i=="object"&&"reason"in i&&i.reason)return String(i.reason);if(i&&typeof i=="object"&&"data"in i&&i.data&&typeof i.data=="object"&&"reason"in i.data&&i.data.reason)return String(i.data.reason);if(i&&typeof i=="object"&&"data"in i&&i.data&&typeof i.data=="object"&&"message"in i.data&&i.data.message)return String(i.data.message);if(i&&typeof i=="object"&&"data"in i&&i.data&&typeof i.data=="object"&&"detail"in i.data){const{detail:m}=i.data;if(Array.isArray(m)&&m.length>0&&typeof m[0]=="object"&&m[0]!==null&&"msg"in m[0]){const{msg:E}=m[0];if(typeof E=="string")return String(E)}}}return p instanceof Error?p.message:c},[c]);return{getErrorCode:l.useCallback(p=>{const{response:i}=p||{};return i?.error_code?String(i?.error_code):i?.data?.error_code?String(i?.data?.error_code):i?.error_code?String(i?.error_code):i?.data?.error_code?String(i.data.error_code):"unknown_error_code"},[]),printError:d}};g.ChatClient=ee,g.ChatContext=K,g.ChatProvider=Ue,g.GTMSendPageView=Ce,g.InitializeAxiosConfig=Re,g.InitializeDaysJSConfig=be,g.InitializeI18nConfig=Te,g.InitializeSentryConfig=Se,g.InjectDependenciesContext=j,g.InjectDependenciesProvider=we,g.MaskTextField=ve,g.PreloadErrorHandler=Ae,g.QueryClientProviderWithConfig=Ge,g.RequireAuth=je,g.axiosCustomInstance=ge,g.dateAdapter=se,g.distanceAdapter=ae,g.getOrvalConfig=Fe,g.useAdapter=Je,g.useAuth=Ke,g.useChat=Be,g.useCurrentLanguage=He,g.useFilters=$e,g.useInfiniteDataGrid=et,g.useResponseError=tt,g.worksiteNameAdapter=ie,Object.defineProperty(g,Symbol.toStringTag,{value:"Module"})}));
|
|
6
|
+
<%s key={someKey} {...props} />`,b,T,D,T),pe[T+b]=!0)}if(T=null,C!==void 0&&(r(C),T=""+C),c(p)&&(r(p.key),T=""+p.key),"key"in p){C={};for(var $ in p)$!=="key"&&(C[$]=p[$])}else C=p;return T&&d(C,typeof n=="function"?n.displayName||n.name||"Unknown":n),h(n,T,C,o(),V,q)}function m(n){E(n)?n._store&&(n._store.validated=1):typeof n=="object"&&n!==null&&n.$$typeof===v&&(n._payload.status==="fulfilled"?E(n._payload.value)&&n._payload.value._store&&(n._payload.value._store.validated=1):n._store&&(n._store.validated=1))}function E(n){return typeof n=="object"&&n!==null&&n.$$typeof===_}var w=l,_=Symbol.for("react.transitional.element"),k=Symbol.for("react.portal"),P=Symbol.for("react.fragment"),y=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),S=Symbol.for("react.consumer"),R=Symbol.for("react.context"),A=Symbol.for("react.forward_ref"),N=Symbol.for("react.suspense"),B=Symbol.for("react.suspense_list"),H=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),O=Symbol.for("react.activity"),X=Symbol.for("react.client.reference"),z=w.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,x=Object.prototype.hasOwnProperty,L=Array.isArray,Z=console.createTask?console.createTask:function(){return null};w={react_stack_bottom_frame:function(n){return n()}};var ue,de={},fe=w.react_stack_bottom_frame.bind(w,a)(),he=Z(s(a)),pe={};Y.Fragment=P,Y.jsx=function(n,p,C){var b=1e4>z.recentlyCreatedOwnerStacks++;return i(n,p,C,!1,b?Error("react-stack-top-frame"):fe,b?Z(s(n)):he)},Y.jsxs=function(n,p,C){var b=1e4>z.recentlyCreatedOwnerStacks++;return i(n,p,C,!0,b?Error("react-stack-top-frame"):fe,b?Z(s(n)):he)}})()),Y}var re;function Ee(){return re||(re=1,process.env.NODE_ENV==="production"?W.exports=me():W.exports=ye()),W.exports}var I=Ee();const we=({IMaskMixin:e,...t})=>{const r=l.useMemo(()=>e(({TextField:s,...o})=>I.jsx(s,{...o})),[e]);return I.jsx(r,{...t})},j=l.createContext({}),ve=({children:e,apiURL:t,libraries:r,localStorageKeys:s})=>{const o=l.useMemo(()=>({apiURL:t,libraries:r,localStorageKeys:s}),[t,r,s]);return I.jsx(j.Provider,{value:o,children:e})},Ce=({data:e,...t})=>{const{libraries:r}=l.useContext(j),s=t?.reactRouter||r?.reactRouter,o=t?.gtm||r?.gtm;if(!s)throw new Error("React Router is not provided. You can provide it with InjectDependenciesProvider or directly in props of GTMSendPageView.");if(!o)throw new Error("GTM is not provided. You can provide it with InjectDependenciesProvider or directly in props of GTMSendPageView.");const{useGoogleTagManager:a}=o,{useLocation:c,Outlet:d}=s,{pathname:u}=c(),{sendEvent:h}=a();return l.useEffect(()=>{h({event:"pageView",pathname:u,...e})},[e,u,h]),I.jsx(d,{})},U=(()=>{try{return typeof global=="object"&&global!==null&&("HermesInternal"in global||"__fbBatchedBridge"in global||"__metro"in global)||typeof window>"u"&&typeof global<"u"?!0:typeof navigator<"u"&&navigator.userAgent?/react.native|ReactNative/i.test(navigator.userAgent):!1}catch{return!1}})(),_e="user",Re=({tokenTypeKey:e="tokenType",tokenKey:t="accessToken",postContentType:r="application/json",...s})=>{const{apiURL:o=s.apiURL,libraries:a,localStorageKeys:c}=l.useContext(j),d=s?.userLocalStorageKey||c?.user||_e,u=s?.axios||a?.axios;if(!u)throw new Error("Axios is not provided. You can provide it with InjectDependenciesProvider or directly in props.");if(!u?.defaults||U)return null;if(typeof window<"u"&&window.localStorage){const h=localStorage.getItem(d),i=h?JSON.parse(h):null,m=i?.[e]?i[e]:null,E=i?.[t]?i[t]:null,w=h?`${m} ${E}`:null;w&&(u.defaults.headers.common.Authorization=w)}return u.defaults.baseURL=o,u.defaults.headers.post["Content-Type"]=r,null},be=({language:e,...t})=>{const{libraries:r}=l.useContext(j),s=t?.dayjs||r?.dayjs,o=t?.plugin||r?.dayjsPlugin;if(!s)throw new Error("Dayjs is not provided. You can provide it with InjectDependenciesProvider or directly in props of InitializeDaysJSConfig.");return l.useEffect(()=>{(async()=>{const c=e||navigator.language?.slice(0,2)||"en";o&&o.forEach(d=>{d&&s.extend(d)}),await import("dayjs/locale/en"),await import("dayjs/locale/fr"),s.locale(c)})().then()},[s,o,e]),null},Te=({debug:e,resources:t,...r})=>{const{libraries:s}=l.useContext(j),o=r?.i18||s?.i18,{i18next:a,initReactI18next:c,languageDetector:d}=o||{};if(U)return null;if(!o)throw new Error("i18 is not provided. You can provide it with InjectDependenciesProvider or directly in props.");return a?.isInitialized||(a.use(d).use(c).init({debug:e,fallbackLng:"en",interpolation:{escapeValue:!1},load:"languageOnly",react:{bindI18n:"languageChanged loaded",useSuspense:!0},resources:t,returnNull:!1}).then(()=>{document.documentElement.lang!==a.resolvedLanguage&&a.resolvedLanguage&&document.documentElement.setAttribute("lang",a.resolvedLanguage)}),a.on("languageChanged",u=>{document.documentElement.setAttribute("lang",u)})),null},Se=({dsn:e,integrations:t,tracesSampleRate:r,replaysSessionSampleRate:s,replaysOnErrorSampleRate:o,tracePropagationTargets:a,ignoreErrors:c,debug:d,environment:u,release:h,...i})=>{const{libraries:m}=l.useContext(j),E=i?.sentry||m?.sentry,w=i?.reactRouter||m?.reactRouter;if(!E)throw new Error("Sentry is not provided. You can provide it with InjectDependenciesProvider or directly in props.");if(!w)throw new Error("React Router is not provided. You can provide it with InjectDependenciesProvider or directly in props.");if(E.isInitialized())return null;const{createRoutesFromChildren:_,matchRoutes:k,useLocation:P,useNavigationType:y}=w;return(d||process.env.NODE_ENV==="prod"||process.env.NODE_ENV==="production")&&E.init({debug:d,dsn:e,environment:u||"production",ignoreErrors:[...c||[],/dynamically imported module/,/Cannot read properties of undefined \(reading 'default'\)/,/Loading chunk \d+ failed/,/ChunkLoadError/,/Failed to fetch dynamically imported module/,/vite:preloadError/],integrations:[E.reactRouterV6BrowserTracingIntegration({createRoutesFromChildren:_,matchRoutes:k,useEffect:l.useEffect,useLocation:P,useNavigationType:y}),...t||[]],release:h,replaysOnErrorSampleRate:o||1,replaysSessionSampleRate:s||.1,tracePropagationTargets:a,tracesSampleRate:r||1}),null},Ae=()=>(l.useEffect(()=>{if(U)return;const e=t=>{try{t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation(),window.location.reload()}catch{}};return window.addEventListener("vite:preloadError",e),()=>{window.removeEventListener("vite:preloadError",e)}},[]),null),oe=new WeakMap,ke="user",je=({Fallback:e,isLogged:t,loginPath:r="/login",redirect401Path:s="/login",...o})=>{const{libraries:a,localStorageKeys:c}=l.useContext(j),d=o?.reactRouter||a?.reactRouter,u=o?.axios||a?.axios,h=o?.localStorageKey||c?.user||ke;if(!d)throw new Error("React Router is not provided. You can provide it with InjectDependenciesProvider or directly in props.");const[i,m]=l.useState(null),{useLocation:E,Navigate:w,Outlet:_}=d,k=E(),P=typeof t=="function"?t():!!t,y=typeof P=="boolean"?P:P?.isLogged;return l.useEffect(()=>{oe.has(u)||(oe.set(u,!0),u.interceptors.response.use(f=>f,f=>(typeof f=="object"&&f&&"response"in f&&f.response&&typeof f.response=="object"&&"status"in f.response&&f.response&&typeof f.response=="object"&&"status"in f.response&&f?.response?.status===401&&(typeof f=="object"&&f&&"config"in f&&f.config&&typeof f.config=="object"&&"headers"in f.config&&f.config.headers&&typeof f.config.headers=="object"&&"Authorization"in f.config.headers&&f.config.headers.Authorization&&(u.defaults.headers.common.Authorization=null,typeof window<"u"&&window.localStorage&&localStorage.removeItem(h)),m(s)),Promise.reject(f))))},[u,h,s]),y&&!i?I.jsx(l.Suspense,{fallback:e,children:k.state?.from?.state&&k.state?.from?.pathname===r?I.jsx(w,{to:k.state.from.state.from.pathname+k.state.from.state.from.search,replace:!0}):I.jsx(_,{})}):I.jsx(w,{to:r+k.search,state:{from:k},replace:!0})},Pe=e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase(),Oe=e=>{const t=e.split(/[/\\]/).pop()||"";return t.substring(0,t.lastIndexOf("."))},Ie=e=>{const s=e.split("/").filter(o=>o.length>0).map(o=>o.replace(/\${([^}]*)}/g,"$1").split(/[_-]/).map(u=>u.charAt(0).toUpperCase()+u.slice(1)).join("")).join("");return s.charAt(0).toLowerCase()+s.slice(1)},Ne=e=>(e.split("/").pop()||e).replace(/\.json$/,"").replace(/^openapi\./,""),xe=(e,t,r,s)=>{const o=Ie(t),a=Pe(r),c=`${o}${a}`;return e&&typeof e=="object"&&"operationId"in e&&s?.includes(String(e.operationId))?`${c}AsQuery`:c},Le=(e,t)=>{const r={};return e?.forEach(s=>{r[s]={query:{useInfinite:!0,useInfiniteQueryParam:"offset",useQuery:!0}}}),t?.filter(s=>!r[s]).forEach(s=>{r[s]={query:{useQuery:!0}}}),Object.keys(r).length?r:void 0},Fe=e=>(Array.isArray(e)?e:[e]).reduce((r,s)=>{const{output:o,useInfiniteIds:a,useQueryIds:c,input:d="./openapi.json",customAxiosInstancePath:u,overrideApiName:h}=s||{},i=h||Ne(d),m=u||"./node_modules/@tracktor/shared-module/dist/axiosCustomInstance.ts";return{...r,[i]:{input:d,output:{baseUrl:o?.baseUrl,client:"react-query",mode:"tags-split",override:{...(a?.length||c?.length)&&{operations:Le(a,c)},header:E=>["Generated by orval 🍺",...E.title?[E.title]:[],...E.description?[E.description]:[]],mutator:{name:Oe(m),path:m},operationName:(E,w,_)=>xe(E,w,_,c),query:{useQuery:!0}},schemas:o?.schemas||`src/api/${i}/model`,target:o?.target||`src/api/${i}/services/api.ts`,...o}}}},{}),De="user",Me=e=>{const t=e.startsWith("https")?"wss":"ws",r=e.replace(/^https?:\/\//,"");return`${t}://${r}/v2/threads/ws`},Ye=e=>{try{const t=localStorage.getItem(e);return t?JSON.parse(t)?.accessToken??null:null}catch{return null}},K=l.createContext(null),Ue=({children:e,reconnect:t=!0,enabled:r=!0,url:s,token:o})=>{const[a,c]=l.useState(!1),[d,u]=l.useState(!1),[h,i]=l.useState(0),{apiURL:m,localStorageKeys:E}=l.useContext(j),w=E?.user||De,_=l.useRef(null),k=l.useRef(new Set);l.useEffect(()=>{if(!r)return;const v=s||(m?Me(m):null);if(!v)return;const O=()=>o??Ye(w),X=x=>{switch(x.type){case"ready":u(!0),i(x.unreadCount??0);break;case"new_message_notification":i(L=>L+1);break}for(const L of k.current)L(x)},z=setTimeout(()=>{const x=new ee({getToken:O,onConnectionChange:L=>{c(L),L||u(!1)},onEvent:X,reconnect:t,url:v});_.current=x,x.connect()},0);return()=>{clearTimeout(z),_.current?.disconnect(),_.current=null}},[r,s,o,m,t,w]);const P=l.useCallback(v=>{_.current?.joinThread(v)},[]),y=l.useCallback(v=>{_.current?.leaveThread(v)},[]),f=l.useCallback((v,O)=>{_.current?.sendMessage(v,O)},[]),S=l.useCallback(v=>{_.current?.markRead(v)},[]),R=l.useCallback((v,O)=>{_.current?.listThreads(v,O)},[]),A=l.useCallback((v=1)=>{i(O=>O+v)},[]),N=l.useCallback((v=1)=>{i(O=>Math.max(0,O-v))},[]),B=l.useCallback(v=>(k.current.add(v),()=>{k.current.delete(v)}),[]),H={decrementUnreadCount:N,incrementUnreadCount:A,isConnected:a,isReady:d,joinThread:P,leaveThread:y,listThreads:R,markRead:S,sendMessage:f,subscribe:B,unreadCount:h};return I.jsx(K.Provider,{value:H,children:e})},ze=e=>e&&typeof e=="function",We=e=>e&&typeof e=="function",Ge=({children:e,defaultQueriesOptions:t,defaultMutationsOptions:r,...s})=>{const{libraries:o}=l.useContext(j),a=s?.QueryClient||o?.reactQuery?.QueryClient,c=s?.QueryClientProvider||o?.reactQuery?.QueryClientProvider;if(!a)throw new Error("QueryClient is not provided. You can provide it with InjectDependenciesProvider or directly in props.");if(!c)throw new Error("QueryClientProvider is not provided. You can provide it with InjectDependenciesProvider or directly in props.");if(!ze(c))throw new Error("Provided QueryClientProvider dependencies are not valid.");if(!We(a))throw new Error("Provided QueryClient dependencies are not valid.");const d=new a({defaultOptions:{mutations:{...r},queries:{getNextPageParam:(u,h,i)=>u.length+(i||0),refetchOnWindowFocus:!1,retry:3,...t}}});return I.jsx(c,{client:d,children:e})},se=({library:e,date:t,format:r="ll"})=>e(t).format(r),ae=(e,t)=>{const{fractionDigits:r=0,metric:s="km",spacingBetween:o=!0}=t||{},a=Number(e),c=o?" ":"";return Number.isNaN(a)?`0${c}${s}`:`${a.toFixed(r)}${c}${s}`},ie=e=>!e||typeof e!="string"?"":e.replace(/_/g," ").toLowerCase().split(" ").map(r=>r.length>0?r.charAt(0).toUpperCase()+r.slice(1):r).join(" "),Ve=e=>e?.startsWith("/")?e?.startsWith("/files")?e:`/files${e}`:e?.startsWith("files")?`/${e}`:`/files/${e}`,Qe=({path:e,size:t,apiURL:r})=>{if(!e)return"";const s=Ve(e),o=`${r}${s}`,a=o.match(/\.(jpeg|jpg|png|gif|bmp|webp|svg|avif)$/)!==null;return typeof t=="number"&&a?`${o.replace("/files",`/thumbs/${t}`)}`:o},Je=e=>{const{apiURL:t,libraries:r}=l.useContext(j),s=e?.dayjs||r?.dayjs;return{dateAdapter:(c,d)=>{if(!s)throw new Error("Dayjs is not provided. You can provide it with InjectDependenciesProvider or directly in props.");return se({date:c,format:d,library:s})},distanceAdapter:ae,filePathAdapter:(c,d)=>{if(!t)throw new Error("API URL is not provided. You can provide it with InjectDependenciesProvider or directly in props to filePathAdapter.");return typeof c=="string"&&/^https?:\/\//.test(c)?c:Qe({apiURL:t,path:c,size:d})},worksiteNameAdapter:ie}},Ke=e=>{const{libraries:t,localStorageKeys:r}=l.useContext(j),s=e?.axios||t?.axios,o=e?.localStorageKey||r?.user||"user";if(!s)throw new Error("Axios is not provided. You can provide it with InjectDependenciesProvider or directly in params of useAuth.");const a=l.useCallback(({tokenType:d,accessToken:u})=>{s.defaults.headers.common.Authorization=`${d} ${u}`},[s.defaults.headers.common]),c=()=>{s.defaults.headers.common.Authorization=null};return l.useEffect(()=>{if(U)return;const d=({newValue:u,key:h})=>{if(h===o&&u)try{const{accessToken:i,tokenType:m}=JSON.parse(u);a({accessToken:i,tokenType:m})}catch(i){console.error("Failed to parse newValue from localStorage:",i)}};return window.addEventListener("storage",d),()=>{window.removeEventListener("storage",d)}},[o,a]),{clearAuthenticationToken:c,setAuthenticationToken:a}},Be=e=>{const t=l.useContext(K);if(!t)throw new Error("useChat must be used within ChatProvider");const{subscribe:r,...s}=t,o=l.useRef(e);return o.current=e,l.useEffect(()=>r(a=>{const{onReady:c,onNewMessage:d,onNewMessageNotification:u,onPresence:h,onError:i,onJoinedThread:m,onLeftThread:E,onMarkedRead:w,onThreadsList:_}=o.current??{};switch(a.type){case"ready":c?.(a);break;case"new_message":d?.(a);break;case"new_message_notification":u?.(a);break;case"presence":h?.(a);break;case"error":i?.(a);break;case"joined_thread":m?.(a);break;case"left_thread":E?.(a);break;case"marked_read":w?.(a);break;case"threads_list":_?.(a);break}}),[r]),s},G=(e,t)=>t==="short"?e.split("-")[0]:e,He=(e,t="full")=>{const[r,s]=l.useState(()=>{const o=e?.language||navigator.language;return e&&"isInitialized"in e&&e.isInitialized,G(o,t)});return l.useEffect(()=>{e&&"isInitialized"in e&&e.isInitialized&&e.language&&s(G(e.language,t));const o=a=>{s(G(a,t))};return e?.on?.("languageChanged",o),()=>{e?.off?.("languageChanged",o)}},[e,t]),r},Xe="tracktor.filter",Ze={getFilter:()=>{},getFilters:()=>({}),handleFilter:()=>()=>{},setFilter:()=>{}},ce=e=>{try{return JSON.parse(e)}catch{return e}},le=(e,t,r)=>`${r}_${e}=>${t}`,qe=e=>e.reduce((t,r)=>{const s=localStorage.getItem(r);if(s)try{const o=JSON.parse(s),a=Object.keys(o)?.[0];a&&(t[a]=Object.values(o)?.[0])}catch{}return t},{}),$e=e=>{const{libraries:t,localStorageKeys:r}=l.useContext(j),s=e?.reactRouter||t?.reactRouter,{pathname:o}=s?.useLocation?.()??{pathname:"/"},[a,c]=s?.useSearchParams?.()??[new URLSearchParams,()=>{}],[d,u]=l.useState({}),h=r?.filter||Xe,i=e?.syncWithUrl===void 0?!0:e?.syncWithUrl,m=e?.persistToLocalStorage===void 0?!0:e?.persistToLocalStorage;if(U)return Ze;if(!s)throw new Error("React Router is not provided. You can provide it with InjectDependenciesProvider or directly in props of reactRouter.");const E=()=>Object.keys(localStorage).filter(y=>y.startsWith(h)&&y.endsWith(e?.pathname||o)),w=(y,f,S=!0)=>{const R=le(y,e?.pathname||o,h);if(!f||Array.isArray(f)&&!f.length){i?(a.delete(y),c(a)):u(A=>{const N={...A};return delete N[y],N}),m&&localStorage.removeItem(R);return}m&&S&&f&&localStorage.setItem(R,JSON.stringify({...a,[y]:f})),i&&f?(a.set(y,JSON.stringify(f)),c(a)):!i&&f&&u(A=>({...A,[y]:f}))};return{getFilter:(y,f)=>{if(i){const S=a.get(y);if(S)return ce(S)}else{const S=d[y];if(S!==void 0)return S}if(m){const S=le(y,e?.pathname||o,h),R=localStorage.getItem(S);if(R)try{const A=JSON.parse(R)[y];return!i&&A!==void 0&&u(N=>({...N,[y]:A})),A}catch{}}return f},getFilters:()=>{const y=m?qe(E()):{};if(i){const f=Array.from(a.entries()).reduce((S,[R,A])=>(S[R]=ce(A),S),{});return{...y,...f}}return{...y,...d}},handleFilter:(y,f)=>(S,R)=>{if(R||Array.isArray(R)&&R.length===0){const A=f||"value",N=typeof R=="object"&&A in R?R[A]:R;w(y,N);return}w(y,void 0)},setFilter:w}},et=({data:e,fetchNextPage:t,isFetchingNextPage:r,isInitialLoading:s,isLoading:o,enabled:a=!0})=>{const c=l.useCallback(async u=>{r||!a||await t({pageParam:u?.pageParam||u.visibleRowsCount})},[a,t,r]),d=l.useMemo(()=>{if(e)return e.pages.reduce((u,h)=>[...u,...h],[])},[e]);return{fetchNextPageOnRowsScrollEnd:c,isLoading:r||o,loadingVariant:s?"skeleton":"linear-progress",rows:d}},tt=e=>{const{libraries:t}=l.useContext(j),r=e?.i18||t?.i18,s=e?.i18?.translateFunction||t?.i18?.translateFunction,o=r?.i18next?.t||s||(h=>h),{unknownErrorTranslationKey:a="error.unknownError"}=e||{},c=o(a),d=l.useCallback(h=>{if(h&&typeof h=="object"&&"response"in h){const{response:i}=h||{};if(i&&typeof i=="object"&&"reason"in i&&i.reason)return String(i.reason);if(i&&typeof i=="object"&&"data"in i&&i.data&&typeof i.data=="object"&&"reason"in i.data&&i.data.reason)return String(i.data.reason);if(i&&typeof i=="object"&&"data"in i&&i.data&&typeof i.data=="object"&&"message"in i.data&&i.data.message)return String(i.data.message);if(i&&typeof i=="object"&&"data"in i&&i.data&&typeof i.data=="object"&&"detail"in i.data){const{detail:m}=i.data;if(Array.isArray(m)&&m.length>0&&typeof m[0]=="object"&&m[0]!==null&&"msg"in m[0]){const{msg:E}=m[0];if(typeof E=="string")return String(E)}}}return h instanceof Error?h.message:c},[c]);return{getErrorCode:l.useCallback(h=>{const{response:i}=h||{};return i?.error_code?String(i?.error_code):i?.data?.error_code?String(i?.data?.error_code):i?.error_code?String(i?.error_code):i?.data?.error_code?String(i.data.error_code):"unknown_error_code"},[]),printError:d}};g.ChatClient=ee,g.ChatContext=K,g.ChatProvider=Ue,g.GTMSendPageView=Ce,g.InitializeAxiosConfig=Re,g.InitializeDaysJSConfig=be,g.InitializeI18nConfig=Te,g.InitializeSentryConfig=Se,g.InjectDependenciesContext=j,g.InjectDependenciesProvider=ve,g.MaskTextField=we,g.PreloadErrorHandler=Ae,g.QueryClientProviderWithConfig=Ge,g.RequireAuth=je,g.axiosCustomInstance=ge,g.dateAdapter=se,g.distanceAdapter=ae,g.getOrvalConfig=Fe,g.useAdapter=Je,g.useAuth=Ke,g.useChat=Be,g.useCurrentLanguage=He,g.useFilters=$e,g.useInfiniteDataGrid=et,g.useResponseError=tt,g.worksiteNameAdapter=ie,Object.defineProperty(g,Symbol.toStringTag,{value:"Module"})}));
|