@getsoren/shared-module 2.68.0 → 2.69.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/README.md +15 -0
- package/dist/documentImport/index.d.ts +9 -0
- package/dist/documentImport/types.d.ts +127 -0
- package/dist/documentImport/utils/matching/matching.d.ts +144 -0
- package/dist/documentImport/utils/matching/matching.test.d.ts +1 -0
- package/dist/documentImport/utils/proposals/proposals.d.ts +10 -0
- package/dist/documentImport/utils/proposals/proposals.test.d.ts +1 -0
- package/dist/documentImport/utils/reading/reading.d.ts +26 -0
- package/dist/documentImport/utils/reading/reading.test.d.ts +1 -0
- package/dist/documentImport.js +202 -0
- package/dist/hourSheets/constants.d.ts +33 -0
- package/dist/hourSheets/index.d.ts +13 -0
- package/dist/hourSheets/types.d.ts +143 -0
- package/dist/hourSheets/utils/billingReferences/billingReferences.d.ts +35 -0
- package/dist/hourSheets/utils/billingReferences/billingReferences.test.d.ts +1 -0
- package/dist/hourSheets/utils/imputation/imputation.d.ts +44 -0
- package/dist/hourSheets/utils/imputation/imputation.test.d.ts +1 -0
- package/dist/hourSheets/utils/readCostCentres/readCostCentres.d.ts +42 -0
- package/dist/hourSheets/utils/readCostCentres/readCostCentres.test.d.ts +1 -0
- package/dist/hourSheets/utils/sheetBlocker/sheetBlocker.d.ts +53 -0
- package/dist/hourSheets/utils/sheetBlocker/sheetBlocker.test.d.ts +1 -0
- package/dist/hourSheets/utils/sheetDays/sheetDays.d.ts +68 -0
- package/dist/hourSheets/utils/sheetDays/sheetDays.test.d.ts +1 -0
- package/dist/hourSheets/utils/sheetLines/sheetLines.d.ts +103 -0
- package/dist/hourSheets/utils/sheetLines/sheetLines.test.d.ts +1 -0
- package/dist/hourSheets.js +58 -0
- package/dist/main.js +339 -375
- package/dist/operator-Cj1X_Zg5.js +41 -0
- package/dist/orval.js +1 -1
- package/dist/sheetLines-DzQEyJOO.js +123 -0
- package/package.json +16 -1
- /package/dist/{orval-Bf_zcxLE.js → orval-BSFwOlVR.js} +0 -0
package/dist/main.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { a as e, c as t, i as n, l as r, n as i, o as a, r as o, s, t as c, u as l } from "./operator-Cj1X_Zg5.js";
|
|
2
|
+
import { t as u } from "./orval-BSFwOlVR.js";
|
|
3
|
+
import { Suspense as d, createContext as f, lazy as p, useCallback as m, useContext as h, useEffect as g, useLayoutEffect as _, useMemo as v, useRef as y, useState as b } from "react";
|
|
4
|
+
import { jsx as x } from "react/jsx-runtime";
|
|
4
5
|
import "dayjs/locale/ar";
|
|
5
6
|
import "dayjs/locale/de";
|
|
6
7
|
import "dayjs/locale/en";
|
|
@@ -9,7 +10,7 @@ import "dayjs/locale/fr";
|
|
|
9
10
|
import "dayjs/locale/it";
|
|
10
11
|
import "dayjs/locale/pt";
|
|
11
12
|
//#region src/chat/ChatClient.ts
|
|
12
|
-
var
|
|
13
|
+
var S = 3e4, C = 1e3, w = 1e4, T = (e) => Array.isArray(e) ? e.map(T) : typeof e == "object" && e ? Object.fromEntries(Object.entries(e).map(([e, t]) => [e.replace(/_([a-z])/g, (e, t) => t.toUpperCase()), T(t)])) : e, E = (e) => Array.isArray(e) ? e.map(E) : typeof e == "object" && e ? Object.fromEntries(Object.entries(e).map(([e, t]) => [e.replace(/[A-Z]/g, (e) => `_${e.toLowerCase()}`), E(t)])) : e, ee = class {
|
|
13
14
|
url;
|
|
14
15
|
getToken;
|
|
15
16
|
onEvent;
|
|
@@ -27,7 +28,7 @@ var f = 3e4, p = 1e3, m = 1e4, h = (e) => Array.isArray(e) ? e.map(h) : typeof e
|
|
|
27
28
|
_connected = !1;
|
|
28
29
|
_ready = !1;
|
|
29
30
|
constructor(e) {
|
|
30
|
-
this.url = e.url, this.getToken = e.getToken, this.onEvent = e.onEvent, this.onConnectionChange = e.onConnectionChange, this.shouldReconnect = e.reconnect ?? !0, this.maxReconnectAttempts = e.maxReconnectAttempts ?? Infinity, this.reconnectBaseDelay = e.reconnectBaseDelay ??
|
|
31
|
+
this.url = e.url, this.getToken = e.getToken, this.onEvent = e.onEvent, this.onConnectionChange = e.onConnectionChange, this.shouldReconnect = e.reconnect ?? !0, this.maxReconnectAttempts = e.maxReconnectAttempts ?? Infinity, this.reconnectBaseDelay = e.reconnectBaseDelay ?? C, this.maxMessageBodyLength = e.maxMessageBodyLength ?? w;
|
|
31
32
|
}
|
|
32
33
|
get connected() {
|
|
33
34
|
return this._connected;
|
|
@@ -44,7 +45,7 @@ var f = 3e4, p = 1e3, m = 1e4, h = (e) => Array.isArray(e) ? e.map(h) : typeof e
|
|
|
44
45
|
this._connected = !0, this.reconnectAttempt = 0, this.onConnectionChange?.(!0), this.rejoinThreads(), this.flushPendingMessages();
|
|
45
46
|
}, this.ws.onmessage = (e) => {
|
|
46
47
|
try {
|
|
47
|
-
let t =
|
|
48
|
+
let t = T(JSON.parse(e.data));
|
|
48
49
|
t.type === "ready" && (this._ready = !0), this.onEvent?.(t);
|
|
49
50
|
} catch {}
|
|
50
51
|
}, this.ws.onclose = () => {
|
|
@@ -92,7 +93,7 @@ var f = 3e4, p = 1e3, m = 1e4, h = (e) => Array.isArray(e) ? e.map(h) : typeof e
|
|
|
92
93
|
this.pendingMessages.push(e);
|
|
93
94
|
return;
|
|
94
95
|
}
|
|
95
|
-
this.ws.send(JSON.stringify(
|
|
96
|
+
this.ws.send(JSON.stringify(E(e)));
|
|
96
97
|
}
|
|
97
98
|
flushPendingMessages() {
|
|
98
99
|
let e = [...this.pendingMessages];
|
|
@@ -107,7 +108,7 @@ var f = 3e4, p = 1e3, m = 1e4, h = (e) => Array.isArray(e) ? e.map(h) : typeof e
|
|
|
107
108
|
}
|
|
108
109
|
scheduleReconnect() {
|
|
109
110
|
this.clearReconnectTimer();
|
|
110
|
-
let e = Math.min(this.reconnectBaseDelay * 2 ** this.reconnectAttempt,
|
|
111
|
+
let e = Math.min(this.reconnectBaseDelay * 2 ** this.reconnectAttempt, S);
|
|
111
112
|
this.reconnectAttempt++, this.reconnectTimer = setTimeout(() => {
|
|
112
113
|
this.connect();
|
|
113
114
|
}, e);
|
|
@@ -115,8 +116,8 @@ var f = 3e4, p = 1e3, m = 1e4, h = (e) => Array.isArray(e) ? e.map(h) : typeof e
|
|
|
115
116
|
clearReconnectTimer() {
|
|
116
117
|
this.reconnectTimer !== null && (clearTimeout(this.reconnectTimer), this.reconnectTimer = null);
|
|
117
118
|
}
|
|
118
|
-
},
|
|
119
|
-
let i =
|
|
119
|
+
}, D = ({ IMaskMixin: e, ...t }) => /* @__PURE__ */ x(v(() => e(({ TextField: e, ...t }) => /* @__PURE__ */ x(e, { ...t })), [e]), { ...t }), O = f({}), k = ({ children: e, apiURL: t, libraries: n, localStorageKeys: r }) => {
|
|
120
|
+
let i = v(() => ({
|
|
120
121
|
apiURL: t,
|
|
121
122
|
libraries: n,
|
|
122
123
|
localStorageKeys: r
|
|
@@ -125,34 +126,34 @@ var f = 3e4, p = 1e3, m = 1e4, h = (e) => Array.isArray(e) ? e.map(h) : typeof e
|
|
|
125
126
|
n,
|
|
126
127
|
r
|
|
127
128
|
]);
|
|
128
|
-
return /* @__PURE__ */
|
|
129
|
+
return /* @__PURE__ */ x(O.Provider, {
|
|
129
130
|
value: i,
|
|
130
131
|
children: e
|
|
131
132
|
});
|
|
132
|
-
},
|
|
133
|
+
}, A = 900 * 1e3, te = 60 * 1e3, ne = 600 * 1e3, j = "auto-reload-on-new-version-timestamp", M = /<meta[^>]*name="version"[^>]*content="([^"]*)"/, N = (e) => {
|
|
133
134
|
try {
|
|
134
135
|
return sessionStorage.getItem(e);
|
|
135
136
|
} catch {
|
|
136
137
|
return null;
|
|
137
138
|
}
|
|
138
|
-
},
|
|
139
|
+
}, P = (e, t) => {
|
|
139
140
|
try {
|
|
140
141
|
sessionStorage.setItem(e, t);
|
|
141
142
|
} catch {}
|
|
142
|
-
},
|
|
143
|
-
let { libraries: i } =
|
|
144
|
-
if (!
|
|
145
|
-
let { useLocation:
|
|
146
|
-
return
|
|
143
|
+
}, re = ({ version: e, checkInterval: t = A, children: n, ...r }) => {
|
|
144
|
+
let { libraries: i } = h(O), a = r?.reactRouter || i?.reactRouter, o = y(!1), s = y(0);
|
|
145
|
+
if (!a) throw Error("React Router is not provided. You can provide it with InjectDependenciesProvider or directly in props of AutoReloadOnNewVersion.");
|
|
146
|
+
let { useLocation: c, Outlet: l } = a, { pathname: u } = c(), d = y(u);
|
|
147
|
+
return g(() => {
|
|
147
148
|
if (!e || typeof window > "u") return;
|
|
148
149
|
let n = async () => {
|
|
149
|
-
if (!(
|
|
150
|
-
|
|
150
|
+
if (!(o.current || Date.now() - s.current < te)) {
|
|
151
|
+
s.current = Date.now();
|
|
151
152
|
try {
|
|
152
153
|
let t = await fetch("/index.html", { cache: "no-store" });
|
|
153
154
|
if (!t.ok) return;
|
|
154
|
-
let n = (await t.text()).match(
|
|
155
|
-
n && n !== "%VERSION%" && n !== e && (
|
|
155
|
+
let n = (await t.text()).match(M)?.[1];
|
|
156
|
+
n && n !== "%VERSION%" && n !== e && (o.current = !0);
|
|
156
157
|
} catch {}
|
|
157
158
|
}
|
|
158
159
|
}, r = () => {
|
|
@@ -161,29 +162,29 @@ var f = 3e4, p = 1e3, m = 1e4, h = (e) => Array.isArray(e) ? e.map(h) : typeof e
|
|
|
161
162
|
return document.addEventListener("visibilitychange", r), () => {
|
|
162
163
|
clearInterval(i), document.removeEventListener("visibilitychange", r);
|
|
163
164
|
};
|
|
164
|
-
}, [e, t]),
|
|
165
|
-
if (
|
|
166
|
-
|
|
167
|
-
let e = Number(
|
|
168
|
-
Date.now() - e <
|
|
169
|
-
}, [
|
|
170
|
-
},
|
|
171
|
-
let { libraries: n } =
|
|
165
|
+
}, [e, t]), g(() => {
|
|
166
|
+
if (u === d.current || (d.current = u, !o.current)) return;
|
|
167
|
+
o.current = !1;
|
|
168
|
+
let e = Number(N(j) || "0");
|
|
169
|
+
Date.now() - e < ne || (P(j, String(Date.now())), window.location.reload());
|
|
170
|
+
}, [u]), n ?? /* @__PURE__ */ x(l, {});
|
|
171
|
+
}, ie = ({ data: e, ...t }) => {
|
|
172
|
+
let { libraries: n } = h(O), r = t?.reactRouter || n?.reactRouter, i = t?.gtm || n?.gtm;
|
|
172
173
|
if (!r) throw Error("React Router is not provided. You can provide it with InjectDependenciesProvider or directly in props of GTMSendPageView.");
|
|
173
174
|
if (!i) throw Error("GTM is not provided. You can provide it with InjectDependenciesProvider or directly in props of GTMSendPageView.");
|
|
174
|
-
let { useGoogleTagManager:
|
|
175
|
-
return
|
|
176
|
-
|
|
175
|
+
let { useGoogleTagManager: a } = i, { useLocation: o, Outlet: s } = r, { pathname: c } = o(), { sendEvent: l } = a();
|
|
176
|
+
return g(() => {
|
|
177
|
+
l({
|
|
177
178
|
event: "pageView",
|
|
178
|
-
pathname:
|
|
179
|
+
pathname: c,
|
|
179
180
|
...e
|
|
180
181
|
});
|
|
181
182
|
}, [
|
|
182
183
|
e,
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
]), /* @__PURE__ */
|
|
186
|
-
},
|
|
184
|
+
c,
|
|
185
|
+
l
|
|
186
|
+
]), /* @__PURE__ */ x(s, {});
|
|
187
|
+
}, ae = "[data-amp-track-feature]", oe = [
|
|
187
188
|
"a",
|
|
188
189
|
"button",
|
|
189
190
|
"input",
|
|
@@ -195,97 +196,97 @@ var f = 3e4, p = 1e3, m = 1e4, h = (e) => Array.isArray(e) ? e.map(h) : typeof e
|
|
|
195
196
|
"[contenteditable=\"true\" i]",
|
|
196
197
|
"[data-amp-default-track]",
|
|
197
198
|
".amp-default-track"
|
|
198
|
-
],
|
|
199
|
+
], se = { defaultMaskLevel: "medium" }, ce = (e, t) => {
|
|
199
200
|
if (e === !1) return !1;
|
|
200
201
|
let n = e === !0 ? {} : e;
|
|
201
202
|
return {
|
|
202
|
-
cssSelectorAllowlist: [...t,
|
|
203
|
+
cssSelectorAllowlist: [...t, ae],
|
|
203
204
|
...n
|
|
204
205
|
};
|
|
205
|
-
},
|
|
206
|
+
}, le = (e, t) => !t || e === !1 ? !1 : {
|
|
206
207
|
deadClicks: !0,
|
|
207
208
|
rageClicks: !0,
|
|
208
209
|
...e === !0 ? {} : e
|
|
209
|
-
},
|
|
210
|
-
let [
|
|
210
|
+
}, ue = ({ apiKey: e, appVersion: t, sessionReplaySampleRate: n, serverZone: r, elementInteractions: i = !0, frustrationInteractions: a = !0, platform: o = "desktop", sessionReplayPrivacy: s = se, userId: c, ...l }) => {
|
|
211
|
+
let [u, d] = b(!!c), { libraries: f } = h(O), p = l.amplitude || f?.amplitude, m = y({
|
|
211
212
|
elementInteractions: i,
|
|
212
|
-
frustrationInteractions:
|
|
213
|
-
sessionReplayPrivacy:
|
|
214
|
-
}),
|
|
215
|
-
return
|
|
216
|
-
|
|
213
|
+
frustrationInteractions: a,
|
|
214
|
+
sessionReplayPrivacy: s
|
|
215
|
+
}), v = y(c);
|
|
216
|
+
return c && !u && d(!0), _(() => {
|
|
217
|
+
m.current = {
|
|
217
218
|
elementInteractions: i,
|
|
218
|
-
frustrationInteractions:
|
|
219
|
-
sessionReplayPrivacy:
|
|
220
|
-
},
|
|
221
|
-
}),
|
|
222
|
-
let i =
|
|
223
|
-
if (!(e && i &&
|
|
224
|
-
let { elementInteractions:
|
|
225
|
-
return i.init(e,
|
|
219
|
+
frustrationInteractions: a,
|
|
220
|
+
sessionReplayPrivacy: s
|
|
221
|
+
}, v.current = c;
|
|
222
|
+
}), g(() => {
|
|
223
|
+
let i = p?.analytics, a = p?.sessionReplayPlugin;
|
|
224
|
+
if (!(e && i && u)) return;
|
|
225
|
+
let { elementInteractions: s, frustrationInteractions: c, sessionReplayPrivacy: l } = m.current, d = v.current, f = !d, h = "platform-enrichment", g = ce(s, i.Types?.DEFAULT_CSS_SELECTOR_ALLOWLIST ?? oe);
|
|
226
|
+
return i.init(e, d, {
|
|
226
227
|
appVersion: t,
|
|
227
228
|
autocapture: {
|
|
228
|
-
elementInteractions:
|
|
229
|
-
frustrationInteractions:
|
|
229
|
+
elementInteractions: g,
|
|
230
|
+
frustrationInteractions: le(c, g !== !1),
|
|
230
231
|
pageViews: { trackHistoryChanges: "pathOnly" }
|
|
231
232
|
},
|
|
232
|
-
optOut:
|
|
233
|
+
optOut: f,
|
|
233
234
|
serverZone: r
|
|
234
|
-
}), i.setOptOut(
|
|
235
|
-
privacyConfig:
|
|
235
|
+
}), i.setOptOut(f), a && i.add(a({
|
|
236
|
+
privacyConfig: l,
|
|
236
237
|
...n === void 0 ? {} : { sampleRate: n }
|
|
237
238
|
})), i.add({
|
|
238
239
|
execute: async (e) => ({
|
|
239
240
|
...e,
|
|
240
241
|
event_properties: {
|
|
241
242
|
...e.event_properties,
|
|
242
|
-
platform:
|
|
243
|
+
platform: o
|
|
243
244
|
}
|
|
244
245
|
}),
|
|
245
|
-
name:
|
|
246
|
+
name: h,
|
|
246
247
|
type: "enrichment"
|
|
247
248
|
}), () => {
|
|
248
|
-
a && i.remove("@amplitude/plugin-session-replay-browser"), i.remove(
|
|
249
|
+
a && i.remove("@amplitude/plugin-session-replay-browser"), i.remove(h), i.setOptOut(!0);
|
|
249
250
|
};
|
|
250
251
|
}, [
|
|
251
252
|
e,
|
|
252
|
-
|
|
253
|
+
p,
|
|
253
254
|
t,
|
|
254
|
-
|
|
255
|
+
o,
|
|
255
256
|
r,
|
|
256
257
|
n,
|
|
257
|
-
|
|
258
|
-
]),
|
|
259
|
-
let t =
|
|
260
|
-
if (e && t &&
|
|
261
|
-
if (!
|
|
258
|
+
u
|
|
259
|
+
]), g(() => {
|
|
260
|
+
let t = p?.analytics;
|
|
261
|
+
if (e && t && u) {
|
|
262
|
+
if (!c) {
|
|
262
263
|
t.setOptOut(!0);
|
|
263
264
|
return;
|
|
264
265
|
}
|
|
265
|
-
t.setUserId(
|
|
266
|
+
t.setUserId(c), t.setOptOut(!1);
|
|
266
267
|
}
|
|
267
268
|
}, [
|
|
268
269
|
e,
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
270
|
+
p,
|
|
271
|
+
u,
|
|
272
|
+
c
|
|
272
273
|
]), null;
|
|
273
|
-
},
|
|
274
|
+
}, F = (() => {
|
|
274
275
|
try {
|
|
275
276
|
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;
|
|
276
277
|
} catch {
|
|
277
278
|
return !1;
|
|
278
279
|
}
|
|
279
|
-
})(),
|
|
280
|
-
let { apiURL: i = r.apiURL, libraries:
|
|
281
|
-
if (!
|
|
282
|
-
if (!
|
|
280
|
+
})(), de = "user", fe = ({ tokenTypeKey: e = "tokenType", tokenKey: t = "accessToken", postContentType: n = "application/json", ...r }) => {
|
|
281
|
+
let { apiURL: i = r.apiURL, libraries: a, localStorageKeys: o } = h(O), s = r?.userLocalStorageKey || o?.user || de, c = r?.axios || a?.axios;
|
|
282
|
+
if (!c) throw Error("Axios is not provided. You can provide it with InjectDependenciesProvider or directly in props.");
|
|
283
|
+
if (!c?.defaults || F) return null;
|
|
283
284
|
if (typeof window < "u" && window.localStorage) {
|
|
284
|
-
let n = localStorage.getItem(
|
|
285
|
-
o && (
|
|
285
|
+
let n = localStorage.getItem(s), r = n ? JSON.parse(n) : null, i = r?.[e] ? r[e] : null, a = r?.[t] ? r[t] : null, o = n ? `${i} ${a}` : null;
|
|
286
|
+
o && (c.defaults.headers.common.Authorization = o);
|
|
286
287
|
}
|
|
287
|
-
return
|
|
288
|
-
},
|
|
288
|
+
return c.defaults.baseURL = i, c.defaults.headers.post["Content-Type"] = n, null;
|
|
289
|
+
}, pe = [
|
|
289
290
|
"ar",
|
|
290
291
|
"de",
|
|
291
292
|
"en",
|
|
@@ -293,21 +294,21 @@ var f = 3e4, p = 1e3, m = 1e4, h = (e) => Array.isArray(e) ? e.map(h) : typeof e
|
|
|
293
294
|
"fr",
|
|
294
295
|
"it",
|
|
295
296
|
"pt"
|
|
296
|
-
],
|
|
297
|
-
let { libraries: n } =
|
|
297
|
+
], me = (e) => pe.includes(e), he = ({ language: e, ...t }) => {
|
|
298
|
+
let { libraries: n } = h(O), r = t?.dayjs || n?.dayjs, i = t?.plugin || n?.dayjsPlugin;
|
|
298
299
|
if (!r) throw Error("Dayjs is not provided. You can provide it with InjectDependenciesProvider or directly in props of InitializeDaysJSConfig.");
|
|
299
300
|
r.extend(t.localizedFormat), i && i.forEach((e) => {
|
|
300
301
|
e && r.extend(e);
|
|
301
302
|
});
|
|
302
|
-
let
|
|
303
|
-
return r.locale() !==
|
|
304
|
-
}, I = "hubspot-messages-iframe-container", L = "hs-show", R = "data-hs-hidden",
|
|
303
|
+
let a = e || navigator.language?.slice(0, 2) || "en", o = me(a) ? a : "en";
|
|
304
|
+
return r.locale() !== o && r.locale(o), null;
|
|
305
|
+
}, I = "hubspot-messages-iframe-container", L = "hs-show", R = "data-hs-hidden", ge = ({ hubId: e }) => (g(() => {
|
|
305
306
|
if (!e) return;
|
|
306
307
|
let t = document.createElement("script");
|
|
307
308
|
return t.id = "hs-script-loader", t.src = `//js-eu1.hs-scripts.com/${e}.js`, t.async = !0, t.defer = !0, document.body.appendChild(t), () => {
|
|
308
309
|
t.remove();
|
|
309
310
|
};
|
|
310
|
-
}, [e]),
|
|
311
|
+
}, [e]), g(() => {
|
|
311
312
|
let e = document.createElement("style");
|
|
312
313
|
return e.textContent = `
|
|
313
314
|
html[${R}] div#${I} { display: none !important; }
|
|
@@ -315,11 +316,11 @@ var f = 3e4, p = 1e3, m = 1e4, h = (e) => Array.isArray(e) ? e.map(h) : typeof e
|
|
|
315
316
|
`, document.head.appendChild(e), document.documentElement.setAttribute(R, ""), () => {
|
|
316
317
|
e.remove(), document.documentElement.removeAttribute(R);
|
|
317
318
|
};
|
|
318
|
-
}, []), null),
|
|
319
|
-
let { libraries: r } =
|
|
320
|
-
if (
|
|
321
|
-
if (!(i &&
|
|
322
|
-
return
|
|
319
|
+
}, []), null), _e = ({ debug: e, resources: t, ...n }) => {
|
|
320
|
+
let { libraries: r } = h(O), i = n?.i18 || r?.i18, { i18next: a, initReactI18next: o, languageDetector: s } = i || {};
|
|
321
|
+
if (F) return null;
|
|
322
|
+
if (!(i && a && s && o)) throw Error("i18 is not provided. You can provide it with InjectDependenciesProvider or directly in props.");
|
|
323
|
+
return a.isInitialized ? null : (a.use(s).use(o).init({
|
|
323
324
|
debug: e,
|
|
324
325
|
fallbackLng: "en",
|
|
325
326
|
interpolation: { escapeValue: !1 },
|
|
@@ -331,20 +332,20 @@ var f = 3e4, p = 1e3, m = 1e4, h = (e) => Array.isArray(e) ? e.map(h) : typeof e
|
|
|
331
332
|
resources: t,
|
|
332
333
|
returnNull: !1
|
|
333
334
|
}).then(() => {
|
|
334
|
-
document.documentElement.lang !==
|
|
335
|
-
}),
|
|
335
|
+
document.documentElement.lang !== a.resolvedLanguage && a.resolvedLanguage && document.documentElement.setAttribute("lang", a.resolvedLanguage);
|
|
336
|
+
}), a.on("languageChanged", (e) => {
|
|
336
337
|
document.documentElement.setAttribute("lang", e);
|
|
337
338
|
}), null);
|
|
338
|
-
},
|
|
339
|
-
let { libraries:
|
|
340
|
-
if (!
|
|
339
|
+
}, z = { replay: "keep" }, B = (e) => e.tags?.replay === z.replay, V = [/^https:\/\/(api|events)\.mapbox\.com\//], H = (e, t) => t.some((t) => typeof t == "string" ? e.includes(t) : t.test(e)), ve = ({ dsn: e, integrations: t, tracesSampleRate: n, tracePropagationTargets: r, ignoreErrors: i, ignoreRequestUrls: a, debug: o, environment: s, release: c, replaysSessionSampleRate: l = 0, replaysOnErrorSampleRate: u = 1, replayBeforeErrorSampling: d = B, ...f }) => {
|
|
340
|
+
let { libraries: p } = h(O), m = f?.sentry || p?.sentry, _ = f?.reactRouter || p?.reactRouter;
|
|
341
|
+
if (!m) throw Error("Sentry is not provided. You can provide it with InjectDependenciesProvider or directly in props.");
|
|
341
342
|
if (!_) throw Error("React Router is not provided. You can provide it with InjectDependenciesProvider or directly in props.");
|
|
342
|
-
if (
|
|
343
|
-
let { createRoutesFromChildren: v, matchRoutes:
|
|
344
|
-
return (
|
|
345
|
-
debug:
|
|
343
|
+
if (m.isInitialized()) return null;
|
|
344
|
+
let { createRoutesFromChildren: v, matchRoutes: y, useLocation: b, useNavigationType: x } = _, S = l > 0 || u > 0, C = [...a || [], ...V];
|
|
345
|
+
return (o || process.env.NODE_ENV === "prod" || process.env.NODE_ENV === "production") && m.init({
|
|
346
|
+
debug: o,
|
|
346
347
|
dsn: e,
|
|
347
|
-
environment:
|
|
348
|
+
environment: s || "production",
|
|
348
349
|
ignoreErrors: [
|
|
349
350
|
...i || [],
|
|
350
351
|
/dynamically imported module/,
|
|
@@ -355,237 +356,237 @@ var f = 3e4, p = 1e3, m = 1e4, h = (e) => Array.isArray(e) ? e.map(h) : typeof e
|
|
|
355
356
|
/vite:preloadError/
|
|
356
357
|
],
|
|
357
358
|
integrations: [
|
|
358
|
-
|
|
359
|
+
m.reactRouterV6BrowserTracingIntegration({
|
|
359
360
|
createRoutesFromChildren: v,
|
|
360
|
-
matchRoutes:
|
|
361
|
-
shouldCreateSpanForRequest: (e) => !
|
|
362
|
-
useEffect:
|
|
363
|
-
useLocation:
|
|
364
|
-
useNavigationType:
|
|
361
|
+
matchRoutes: y,
|
|
362
|
+
shouldCreateSpanForRequest: (e) => !H(e, C),
|
|
363
|
+
useEffect: g,
|
|
364
|
+
useLocation: b,
|
|
365
|
+
useNavigationType: x
|
|
365
366
|
}),
|
|
366
|
-
...
|
|
367
|
+
...S ? [m.replayIntegration({ beforeErrorSampling: d })] : [],
|
|
367
368
|
...t || []
|
|
368
369
|
],
|
|
369
|
-
release:
|
|
370
|
-
replaysOnErrorSampleRate:
|
|
371
|
-
replaysSessionSampleRate:
|
|
370
|
+
release: c,
|
|
371
|
+
replaysOnErrorSampleRate: u,
|
|
372
|
+
replaysSessionSampleRate: l,
|
|
372
373
|
tracePropagationTargets: r,
|
|
373
374
|
tracesSampleRate: n ?? 1
|
|
374
375
|
}), null;
|
|
375
|
-
},
|
|
376
|
-
let { libraries:
|
|
377
|
-
if (!
|
|
378
|
-
let [
|
|
379
|
-
return
|
|
380
|
-
|
|
376
|
+
}, U = /* @__PURE__ */ new WeakMap(), ye = "user", be = ({ Fallback: e, isLogged: t, loginPath: n = "/login", redirect401Path: r = "/login", ...i }) => {
|
|
377
|
+
let { libraries: a, localStorageKeys: o } = h(O), s = i?.reactRouter || a?.reactRouter, c = i?.axios || a?.axios, l = i?.localStorageKey || o?.user || ye;
|
|
378
|
+
if (!s) throw Error("React Router is not provided. You can provide it with InjectDependenciesProvider or directly in props.");
|
|
379
|
+
let [u, f] = b(null), { useLocation: p, Navigate: m, Outlet: _ } = s, v = p(), y = typeof t == "function" ? t() : !!t, S = typeof y == "boolean" ? y : y?.isLogged;
|
|
380
|
+
return g(() => {
|
|
381
|
+
c && (U.has(c) || (U.set(c, !0), c.interceptors.response.use((e) => e, (e) => (typeof e == "object" && e && "response" in e && e.response && typeof e.response == "object" && "status" in e.response && e.response && typeof e.response == "object" && "status" in e.response && e?.response?.status === 401 && (typeof e == "object" && e && "config" in e && e.config && typeof e.config == "object" && "headers" in e.config && e.config.headers && typeof e.config.headers == "object" && "Authorization" in e.config.headers && e.config.headers.Authorization && (c.defaults.headers.common.Authorization = null, typeof window < "u" && window.localStorage && localStorage.removeItem(l)), f(r)), Promise.reject(e)))));
|
|
381
382
|
}, [
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
]),
|
|
383
|
+
c,
|
|
384
|
+
l,
|
|
385
|
+
r
|
|
386
|
+
]), S && !u ? /* @__PURE__ */ x(d, {
|
|
386
387
|
fallback: e,
|
|
387
|
-
children:
|
|
388
|
-
to:
|
|
388
|
+
children: v.state?.from?.state && v.state?.from?.pathname === n ? /* @__PURE__ */ x(m, {
|
|
389
|
+
to: v.state.from.state.from.pathname + v.state.from.state.from.search,
|
|
389
390
|
replace: !0
|
|
390
|
-
}) : /* @__PURE__ */
|
|
391
|
-
}) : /* @__PURE__ */
|
|
392
|
-
to:
|
|
393
|
-
state: { from:
|
|
391
|
+
}) : /* @__PURE__ */ x(_, {})
|
|
392
|
+
}) : /* @__PURE__ */ x(m, {
|
|
393
|
+
to: n + v.search,
|
|
394
|
+
state: { from: v },
|
|
394
395
|
replace: !0
|
|
395
396
|
});
|
|
396
|
-
},
|
|
397
|
+
}, W = /* @__PURE__ */ new Set(), xe = () => (g(() => {
|
|
397
398
|
let e = Symbol();
|
|
398
|
-
return
|
|
399
|
-
|
|
399
|
+
return W.add(e), document.documentElement.removeAttribute(R), () => {
|
|
400
|
+
W.delete(e), W.size === 0 && document.documentElement.setAttribute(R, "");
|
|
400
401
|
};
|
|
401
|
-
}, []), null),
|
|
402
|
+
}, []), null), Se = "user", Ce = {
|
|
402
403
|
client: "/v2/threads/ws",
|
|
403
404
|
supplier: "/v1/threads/ws"
|
|
404
|
-
},
|
|
405
|
+
}, we = (e, t) => `${e.startsWith("https") ? "wss" : "ws"}://${e.replace(/^https?:\/\//, "")}${t}`, Te = (e) => {
|
|
405
406
|
try {
|
|
406
407
|
let t = localStorage.getItem(e);
|
|
407
408
|
return t ? JSON.parse(t)?.accessToken ?? null : null;
|
|
408
409
|
} catch {
|
|
409
410
|
return null;
|
|
410
411
|
}
|
|
411
|
-
},
|
|
412
|
-
let [
|
|
413
|
-
|
|
414
|
-
if (!
|
|
415
|
-
let e = r ??
|
|
416
|
-
if (!
|
|
417
|
-
let
|
|
412
|
+
}, G = f(null), Ee = ({ children: e, token: t, url: n, wsPath: r, maxReconnectAttempts: i, reconnectBaseDelay: a, maxMessageBodyLength: o = 1e4, reconnect: s = !0, enabled: c = !0, context: l = "client" }) => {
|
|
413
|
+
let [u, d] = b(!1), [f, p] = b(!1), [_, v] = b(0), [S, C] = b(c), w = c && S, { apiURL: T, localStorageKeys: E } = h(O), D = E?.user || Se, k = y(null), A = y(/* @__PURE__ */ new Set());
|
|
414
|
+
g(() => {
|
|
415
|
+
if (!w) return;
|
|
416
|
+
let e = r ?? Ce[l], c = n || (T ? we(T, e) : null);
|
|
417
|
+
if (!c) return;
|
|
418
|
+
let u = () => t ?? Te(D), f = (e) => {
|
|
418
419
|
switch (e.type) {
|
|
419
420
|
case "ready":
|
|
420
|
-
|
|
421
|
+
p(!0), v(e.unreadCount ?? 0);
|
|
421
422
|
break;
|
|
422
423
|
}
|
|
423
|
-
for (let t of
|
|
424
|
-
},
|
|
425
|
-
let e = new
|
|
426
|
-
getToken:
|
|
427
|
-
maxMessageBodyLength:
|
|
428
|
-
maxReconnectAttempts:
|
|
424
|
+
for (let t of A.current) t(e);
|
|
425
|
+
}, m = setTimeout(() => {
|
|
426
|
+
let e = new ee({
|
|
427
|
+
getToken: u,
|
|
428
|
+
maxMessageBodyLength: o,
|
|
429
|
+
maxReconnectAttempts: i,
|
|
429
430
|
onConnectionChange: (e) => {
|
|
430
|
-
|
|
431
|
+
d(e), e || p(!1);
|
|
431
432
|
},
|
|
432
|
-
onEvent:
|
|
433
|
-
reconnect:
|
|
434
|
-
reconnectBaseDelay:
|
|
435
|
-
url:
|
|
433
|
+
onEvent: f,
|
|
434
|
+
reconnect: s,
|
|
435
|
+
reconnectBaseDelay: a,
|
|
436
|
+
url: c
|
|
436
437
|
});
|
|
437
|
-
|
|
438
|
+
k.current = e, e.connect();
|
|
438
439
|
}, 0);
|
|
439
440
|
return () => {
|
|
440
|
-
clearTimeout(
|
|
441
|
+
clearTimeout(m), k.current?.disconnect(), k.current = null;
|
|
441
442
|
};
|
|
442
443
|
}, [
|
|
443
|
-
|
|
444
|
+
w,
|
|
444
445
|
n,
|
|
445
446
|
r,
|
|
446
|
-
|
|
447
|
+
l,
|
|
447
448
|
t,
|
|
448
|
-
p,
|
|
449
|
-
D,
|
|
450
|
-
k,
|
|
451
|
-
f,
|
|
452
449
|
s,
|
|
453
|
-
|
|
450
|
+
T,
|
|
451
|
+
D,
|
|
452
|
+
o,
|
|
453
|
+
i,
|
|
454
|
+
a
|
|
454
455
|
]);
|
|
455
|
-
let
|
|
456
|
-
|
|
457
|
-
}, []),
|
|
458
|
-
|
|
459
|
-
}, []),
|
|
460
|
-
|
|
461
|
-
}, []), M =
|
|
462
|
-
|
|
463
|
-
}, []), N =
|
|
464
|
-
|
|
465
|
-
}, []), P =
|
|
466
|
-
|
|
467
|
-
}, []),
|
|
468
|
-
decrementUnreadCount:
|
|
469
|
-
|
|
456
|
+
let te = m((e) => {
|
|
457
|
+
k.current?.joinThread(e);
|
|
458
|
+
}, []), ne = m((e) => {
|
|
459
|
+
k.current?.leaveThread(e);
|
|
460
|
+
}, []), j = m((e, t) => {
|
|
461
|
+
k.current?.sendMessage(e, t);
|
|
462
|
+
}, []), M = m((e) => {
|
|
463
|
+
k.current?.markRead(e);
|
|
464
|
+
}, []), N = m((e, t) => {
|
|
465
|
+
k.current?.listThreads(e, t);
|
|
466
|
+
}, []), P = m((e = 1) => {
|
|
467
|
+
v((t) => t + e);
|
|
468
|
+
}, []), re = {
|
|
469
|
+
decrementUnreadCount: m((e = 1) => {
|
|
470
|
+
v((t) => Math.max(0, t - e));
|
|
470
471
|
}, []),
|
|
471
|
-
disconnect:
|
|
472
|
-
|
|
472
|
+
disconnect: m(() => {
|
|
473
|
+
k.current?.disconnect(), k.current = null;
|
|
473
474
|
}, []),
|
|
474
475
|
incrementUnreadCount: P,
|
|
475
|
-
isConnected:
|
|
476
|
-
isReady:
|
|
477
|
-
joinThread:
|
|
478
|
-
leaveThread:
|
|
476
|
+
isConnected: u,
|
|
477
|
+
isReady: f,
|
|
478
|
+
joinThread: te,
|
|
479
|
+
leaveThread: ne,
|
|
479
480
|
listThreads: N,
|
|
480
481
|
markRead: M,
|
|
481
|
-
sendMessage:
|
|
482
|
-
setEnabled:
|
|
483
|
-
|
|
482
|
+
sendMessage: j,
|
|
483
|
+
setEnabled: m((e) => {
|
|
484
|
+
C(e);
|
|
484
485
|
}, []),
|
|
485
|
-
subscribe:
|
|
486
|
-
|
|
486
|
+
subscribe: m((e) => (A.current.add(e), () => {
|
|
487
|
+
A.current.delete(e);
|
|
487
488
|
}), []),
|
|
488
|
-
unreadCount:
|
|
489
|
+
unreadCount: _
|
|
489
490
|
};
|
|
490
|
-
return /* @__PURE__ */
|
|
491
|
-
value:
|
|
491
|
+
return /* @__PURE__ */ x(G.Provider, {
|
|
492
|
+
value: re,
|
|
492
493
|
children: e
|
|
493
494
|
});
|
|
494
|
-
},
|
|
495
|
+
}, De = 3, Oe = new Set([
|
|
495
496
|
400,
|
|
496
497
|
401,
|
|
497
498
|
403,
|
|
498
499
|
404
|
|
499
|
-
]),
|
|
500
|
-
let n =
|
|
501
|
-
return e <
|
|
502
|
-
},
|
|
503
|
-
let { libraries: i } =
|
|
504
|
-
if (!
|
|
505
|
-
if (!
|
|
506
|
-
let [
|
|
500
|
+
]), ke = (e) => e?.response?.status, K = (e, t) => {
|
|
501
|
+
let n = ke(t);
|
|
502
|
+
return e < De && !(n !== void 0 && Oe.has(n));
|
|
503
|
+
}, Ae = (e, t, n) => (Array.isArray(e) ? e.length : 0) + (typeof n == "number" ? n : 0), je = ({ children: e, defaultQueriesOptions: t, defaultMutationsOptions: n, ...r }) => {
|
|
504
|
+
let { libraries: i } = h(O), a = r.QueryClient || i?.reactQuery?.QueryClient, o = r.QueryClientProvider || i?.reactQuery?.QueryClientProvider;
|
|
505
|
+
if (!a) throw Error("QueryClient is not provided. You can provide it with InjectDependenciesProvider or directly in props.");
|
|
506
|
+
if (!o) throw Error("QueryClientProvider is not provided. You can provide it with InjectDependenciesProvider or directly in props.");
|
|
507
|
+
let [s] = b(() => new a({ defaultOptions: {
|
|
507
508
|
mutations: n,
|
|
508
509
|
queries: {
|
|
509
|
-
getNextPageParam:
|
|
510
|
-
retry:
|
|
510
|
+
getNextPageParam: Ae,
|
|
511
|
+
retry: K,
|
|
511
512
|
...t
|
|
512
513
|
}
|
|
513
514
|
} }));
|
|
514
|
-
return /* @__PURE__ */
|
|
515
|
-
client:
|
|
515
|
+
return /* @__PURE__ */ x(o, {
|
|
516
|
+
client: s,
|
|
516
517
|
children: e
|
|
517
518
|
});
|
|
518
|
-
},
|
|
519
|
+
}, q = ({ library: e, date: t, format: n = "ll" }) => e(t).format(n), J = (e, t) => {
|
|
519
520
|
let { fractionDigits: n = 0, metric: r = "km", spacingBetween: i = !0 } = t || {}, a = Number(e), o = i ? " " : "";
|
|
520
521
|
return Number.isNaN(a) ? `0${o}${r}` : `${a.toFixed(n)}${o}${r}`;
|
|
521
|
-
},
|
|
522
|
+
}, Me = (e) => !e || typeof e != "string" ? "" : e.replace(/_/g, " ").toLowerCase().split(" ").map((e) => e.length > 0 ? e.charAt(0).toUpperCase() + e.slice(1) : e).join(" "), Ne = (e) => e?.startsWith("/") ? e?.startsWith("/files") ? e : `/files${e}` : e?.startsWith("files") ? `/${e}` : `/files/${e}`, Pe = ({ path: e, size: t, apiURL: n }) => {
|
|
522
523
|
if (!e) return "";
|
|
523
|
-
let r = `${n}${
|
|
524
|
+
let r = `${n}${Ne(e)}`, i = r.match(/\.(jpeg|jpg|png|gif|bmp|webp|svg|avif)$/) !== null;
|
|
524
525
|
return typeof t == "number" && i ? `${r.replace("/files", `/thumbs/${t}`)}` : r;
|
|
525
|
-
},
|
|
526
|
-
let { apiURL: t, libraries: n } =
|
|
526
|
+
}, Fe = (e) => {
|
|
527
|
+
let { apiURL: t, libraries: n } = h(O), r = e?.dayjs || n?.dayjs, i = m((e, n) => {
|
|
527
528
|
if (!t) throw Error("API URL is not provided. You can provide it with InjectDependenciesProvider or directly in props to filePathAdapter.");
|
|
528
|
-
return typeof e == "string" && /^https?:\/\//.test(e) ? e :
|
|
529
|
+
return typeof e == "string" && /^https?:\/\//.test(e) ? e : Pe({
|
|
529
530
|
apiURL: t,
|
|
530
531
|
path: e,
|
|
531
532
|
size: n
|
|
532
533
|
});
|
|
533
534
|
}, [t]);
|
|
534
535
|
return {
|
|
535
|
-
dateAdapter:
|
|
536
|
+
dateAdapter: m((e, t) => {
|
|
536
537
|
if (!r) throw Error("Dayjs is not provided. You can provide it with InjectDependenciesProvider or directly in props.");
|
|
537
|
-
return
|
|
538
|
+
return q({
|
|
538
539
|
date: e,
|
|
539
540
|
format: t,
|
|
540
541
|
library: r
|
|
541
542
|
});
|
|
542
543
|
}, [r]),
|
|
543
|
-
distanceAdapter:
|
|
544
|
-
filePathAdapter:
|
|
545
|
-
worksiteNameAdapter:
|
|
544
|
+
distanceAdapter: J,
|
|
545
|
+
filePathAdapter: i,
|
|
546
|
+
worksiteNameAdapter: Me
|
|
546
547
|
};
|
|
547
|
-
},
|
|
548
|
-
let { libraries: e } =
|
|
548
|
+
}, Ie = () => {
|
|
549
|
+
let { libraries: e } = h(O), t = e?.amplitude?.analytics, n = m((e, n) => {
|
|
549
550
|
if (!t || (t.setUserId(e), !n)) return;
|
|
550
551
|
let r = new t.Identify();
|
|
551
552
|
Object.entries(n).forEach(([e, t]) => {
|
|
552
553
|
r.set(e, t);
|
|
553
554
|
}), t.identify(r);
|
|
554
|
-
}, [t]), r =
|
|
555
|
+
}, [t]), r = m((e, n, r) => {
|
|
555
556
|
if (!t || (t.setGroup(e, n), !r)) return;
|
|
556
557
|
let i = new t.Identify();
|
|
557
558
|
Object.entries(r).forEach(([e, t]) => {
|
|
558
559
|
i.set(e, t);
|
|
559
560
|
}), t.groupIdentify(e, n, i);
|
|
560
|
-
}, [t]),
|
|
561
|
+
}, [t]), i = m((e, n) => {
|
|
561
562
|
t && t.track(e, n);
|
|
562
563
|
}, [t]);
|
|
563
564
|
return {
|
|
564
565
|
identify: n,
|
|
565
|
-
reset:
|
|
566
|
+
reset: m(() => {
|
|
566
567
|
t && (t.setOptOut(!0), t.reset());
|
|
567
568
|
}, [t]),
|
|
568
569
|
setGroup: r,
|
|
569
|
-
track:
|
|
570
|
+
track: i
|
|
570
571
|
};
|
|
571
|
-
},
|
|
572
|
-
let { libraries: t, localStorageKeys: n } =
|
|
572
|
+
}, Le = (e) => {
|
|
573
|
+
let { libraries: t, localStorageKeys: n } = h(O), r = e?.axios || t?.axios, i = e?.localStorageKey || n?.user || "user";
|
|
573
574
|
if (!r) throw Error("Axios is not provided. You can provide it with InjectDependenciesProvider or directly in params of useAuth.");
|
|
574
|
-
let
|
|
575
|
+
let a = m(({ tokenType: e, accessToken: t }) => {
|
|
575
576
|
r.defaults.headers.common.Authorization = `${e} ${t}`;
|
|
576
|
-
}, [r.defaults.headers.common]),
|
|
577
|
+
}, [r.defaults.headers.common]), o = m(() => {
|
|
577
578
|
r.defaults.headers.common.Authorization = null;
|
|
578
579
|
}, [r.defaults.headers.common]);
|
|
579
|
-
return
|
|
580
|
-
if (
|
|
580
|
+
return g(() => {
|
|
581
|
+
if (F) return;
|
|
581
582
|
let e = ({ newValue: e, key: t }) => {
|
|
582
|
-
if (t ===
|
|
583
|
+
if (t === i) try {
|
|
583
584
|
let { accessToken: t, tokenType: n } = JSON.parse(e ?? "null") ?? {};
|
|
584
585
|
if (!t) {
|
|
585
|
-
|
|
586
|
+
o();
|
|
586
587
|
return;
|
|
587
588
|
}
|
|
588
|
-
|
|
589
|
+
a({
|
|
589
590
|
accessToken: t,
|
|
590
591
|
tokenType: n
|
|
591
592
|
});
|
|
@@ -597,16 +598,16 @@ var f = 3e4, p = 1e3, m = 1e4, h = (e) => Array.isArray(e) ? e.map(h) : typeof e
|
|
|
597
598
|
window.removeEventListener("storage", e);
|
|
598
599
|
};
|
|
599
600
|
}, [
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
601
|
+
o,
|
|
602
|
+
i,
|
|
603
|
+
a
|
|
603
604
|
]), {
|
|
604
|
-
clearAuthenticationToken:
|
|
605
|
-
setAuthenticationToken:
|
|
605
|
+
clearAuthenticationToken: o,
|
|
606
|
+
setAuthenticationToken: a
|
|
606
607
|
};
|
|
607
|
-
},
|
|
608
|
+
}, Re = "New message", ze = (e, t) => {
|
|
608
609
|
if (!("Notification" in window) || typeof Notification != "function" || Notification.permission !== "granted" || !document.hidden) return;
|
|
609
|
-
let n = new Notification(t.title ??
|
|
610
|
+
let n = new Notification(t.title ?? Re, {
|
|
610
611
|
badge: t?.badge,
|
|
611
612
|
body: t?.body || e.bodyPreview,
|
|
612
613
|
data: t?.data,
|
|
@@ -621,16 +622,16 @@ var f = 3e4, p = 1e3, m = 1e4, h = (e) => Array.isArray(e) ? e.map(h) : typeof e
|
|
|
621
622
|
let { onClick: r } = t;
|
|
622
623
|
n.onclick = () => r(e);
|
|
623
624
|
}
|
|
624
|
-
},
|
|
625
|
-
let t =
|
|
625
|
+
}, Be = (e) => {
|
|
626
|
+
let t = h(G);
|
|
626
627
|
if (!t) throw Error("useChat must be used within ChatProvider");
|
|
627
|
-
let { subscribe: n, setEnabled: r, ...i } = t,
|
|
628
|
-
return
|
|
628
|
+
let { subscribe: n, setEnabled: r, ...i } = t, a = y(e);
|
|
629
|
+
return a.current = e, g(() => {
|
|
629
630
|
e?.enabled !== void 0 && r(e.enabled);
|
|
630
|
-
}, [e?.enabled, r]),
|
|
631
|
+
}, [e?.enabled, r]), g(() => {
|
|
631
632
|
e?.browserNotification && e.browserNotification.enabled !== !1 && "Notification" in window && Notification.permission === "default" && typeof Notification.requestPermission == "function" && Notification.requestPermission();
|
|
632
|
-
}, [e?.browserNotification]),
|
|
633
|
-
let { browserNotification: t, onReady: n, onNewMessage: r, onNewMessageNotification: i, onPresence:
|
|
633
|
+
}, [e?.browserNotification]), g(() => n((e) => {
|
|
634
|
+
let { browserNotification: t, onReady: n, onNewMessage: r, onNewMessageNotification: i, onPresence: o, onError: s, onJoinedThread: c, onLeftThread: l, onMarkedRead: u, onThreadArchived: d, onThreadsList: f } = a.current ?? {};
|
|
634
635
|
switch (e.type) {
|
|
635
636
|
case "ready":
|
|
636
637
|
n?.(e);
|
|
@@ -639,13 +640,13 @@ var f = 3e4, p = 1e3, m = 1e4, h = (e) => Array.isArray(e) ? e.map(h) : typeof e
|
|
|
639
640
|
r?.(e);
|
|
640
641
|
break;
|
|
641
642
|
case "new_message_notification":
|
|
642
|
-
i?.(e), t && t.enabled !== !1 &&
|
|
643
|
+
i?.(e), t && t.enabled !== !1 && ze(e, t);
|
|
643
644
|
break;
|
|
644
645
|
case "presence":
|
|
645
|
-
|
|
646
|
+
o?.(e);
|
|
646
647
|
break;
|
|
647
648
|
case "error":
|
|
648
|
-
|
|
649
|
+
s?.(e);
|
|
649
650
|
break;
|
|
650
651
|
case "joined_thread":
|
|
651
652
|
c?.(e);
|
|
@@ -664,73 +665,73 @@ var f = 3e4, p = 1e3, m = 1e4, h = (e) => Array.isArray(e) ? e.map(h) : typeof e
|
|
|
664
665
|
break;
|
|
665
666
|
}
|
|
666
667
|
}), [n]), i;
|
|
667
|
-
},
|
|
668
|
+
}, Y = (e, t = "full") => {
|
|
668
669
|
let n = e || navigator.language;
|
|
669
670
|
return t === "short" ? n.split("-")[0] : n;
|
|
670
|
-
},
|
|
671
|
-
let [n, r] =
|
|
672
|
-
return
|
|
673
|
-
e && "isInitialized" in e && e.isInitialized && e.language && r(
|
|
671
|
+
}, Ve = (e, t = "full") => {
|
|
672
|
+
let [n, r] = b(() => Y(e?.language, t));
|
|
673
|
+
return g(() => {
|
|
674
|
+
e && "isInitialized" in e && e.isInitialized && e.language && r(Y(e.language, t));
|
|
674
675
|
let n = (e) => {
|
|
675
|
-
r(
|
|
676
|
+
r(Y(e, t));
|
|
676
677
|
};
|
|
677
678
|
return e?.on?.("languageChanged", n), () => {
|
|
678
679
|
e?.off?.("languageChanged", n);
|
|
679
680
|
};
|
|
680
681
|
}, [e, t]), n;
|
|
681
|
-
},
|
|
682
|
+
}, He = "tracktor.filter", Ue = {
|
|
682
683
|
getFilter: () => void 0,
|
|
683
684
|
getFilters: () => ({}),
|
|
684
685
|
handleFilter: () => () => {},
|
|
685
686
|
setFilter: () => {}
|
|
686
|
-
},
|
|
687
|
+
}, We = (e) => {
|
|
687
688
|
try {
|
|
688
689
|
return JSON.parse(e);
|
|
689
690
|
} catch {
|
|
690
691
|
return e;
|
|
691
692
|
}
|
|
692
|
-
},
|
|
693
|
+
}, Ge = (e, t, n) => `${n}_${e}=>${t}`, Ke = (e) => e.reduce((e, t) => {
|
|
693
694
|
let n = localStorage.getItem(t);
|
|
694
695
|
if (n) try {
|
|
695
696
|
let t = JSON.parse(n), r = Object.keys(t)?.[0];
|
|
696
697
|
r && (e[r] = Object.values(t)?.[0]);
|
|
697
698
|
} catch {}
|
|
698
699
|
return e;
|
|
699
|
-
}, {}),
|
|
700
|
-
let { libraries: t, localStorageKeys: n } =
|
|
701
|
-
if (
|
|
700
|
+
}, {}), qe = (e) => {
|
|
701
|
+
let { libraries: t, localStorageKeys: n } = h(O), r = e?.reactRouter || t?.reactRouter, { pathname: i } = r?.useLocation?.() ?? { pathname: "/" }, [a, o] = r?.useSearchParams?.() ?? [new URLSearchParams(), () => {}], [s, c] = b({}), l = n?.filter || He, u = e?.syncWithUrl === void 0 ? !0 : e?.syncWithUrl, d = e?.persistToLocalStorage === void 0 ? !0 : e?.persistToLocalStorage;
|
|
702
|
+
if (F) return Ue;
|
|
702
703
|
if (!r) throw Error("React Router is not provided. You can provide it with InjectDependenciesProvider or directly in props of reactRouter.");
|
|
703
|
-
let
|
|
704
|
-
let
|
|
704
|
+
let f = () => Object.keys(localStorage).filter((t) => t.startsWith(l) && t.endsWith(e?.pathname || i)), p = (t, n, r = !0) => {
|
|
705
|
+
let s = Ge(t, e?.pathname || i, l);
|
|
705
706
|
if (!n || Array.isArray(n) && !n.length) {
|
|
706
|
-
|
|
707
|
+
u ? (a.delete(t), o(a)) : c((e) => {
|
|
707
708
|
let n = { ...e };
|
|
708
709
|
return delete n[t], n;
|
|
709
|
-
}),
|
|
710
|
+
}), d && localStorage.removeItem(s);
|
|
710
711
|
return;
|
|
711
712
|
}
|
|
712
|
-
|
|
713
|
-
...
|
|
713
|
+
d && r && n && localStorage.setItem(s, JSON.stringify({
|
|
714
|
+
...a,
|
|
714
715
|
[t]: n
|
|
715
|
-
})),
|
|
716
|
+
})), u && n ? (a.set(t, JSON.stringify(n)), o(a)) : !u && n && c((e) => ({
|
|
716
717
|
...e,
|
|
717
718
|
[t]: n
|
|
718
719
|
}));
|
|
719
720
|
};
|
|
720
721
|
return {
|
|
721
722
|
getFilter: (t, n) => {
|
|
722
|
-
if (
|
|
723
|
-
let e =
|
|
724
|
-
if (e) return
|
|
723
|
+
if (u) {
|
|
724
|
+
let e = a.get(t);
|
|
725
|
+
if (e) return We(e);
|
|
725
726
|
} else {
|
|
726
|
-
let e =
|
|
727
|
+
let e = s[t];
|
|
727
728
|
if (e !== void 0) return e;
|
|
728
729
|
}
|
|
729
|
-
if (
|
|
730
|
-
let n =
|
|
730
|
+
if (d) {
|
|
731
|
+
let n = Ge(t, e?.pathname || i, l), r = localStorage.getItem(n);
|
|
731
732
|
if (r) try {
|
|
732
733
|
let e = JSON.parse(r)[t];
|
|
733
|
-
return !
|
|
734
|
+
return !u && e !== void 0 && c((n) => ({
|
|
734
735
|
...n,
|
|
735
736
|
[t]: e
|
|
736
737
|
})), e;
|
|
@@ -739,9 +740,9 @@ var f = 3e4, p = 1e3, m = 1e4, h = (e) => Array.isArray(e) ? e.map(h) : typeof e
|
|
|
739
740
|
return n;
|
|
740
741
|
},
|
|
741
742
|
getFilters: () => {
|
|
742
|
-
let e =
|
|
743
|
-
if (
|
|
744
|
-
let t = Array.from(
|
|
743
|
+
let e = d ? Ke(f()) : {};
|
|
744
|
+
if (u) {
|
|
745
|
+
let t = Array.from(a.entries()).reduce((e, [t, n]) => (e[t] = We(n), e), {});
|
|
745
746
|
return {
|
|
746
747
|
...e,
|
|
747
748
|
...t
|
|
@@ -749,56 +750,56 @@ var f = 3e4, p = 1e3, m = 1e4, h = (e) => Array.isArray(e) ? e.map(h) : typeof e
|
|
|
749
750
|
}
|
|
750
751
|
return {
|
|
751
752
|
...e,
|
|
752
|
-
...
|
|
753
|
+
...s
|
|
753
754
|
};
|
|
754
755
|
},
|
|
755
756
|
handleFilter: (e, t) => (n, r) => {
|
|
756
757
|
if (r || Array.isArray(r) && r.length === 0) {
|
|
757
758
|
let n = t || "value";
|
|
758
|
-
|
|
759
|
+
p(e, typeof r == "object" && n in r ? r[n || "value"] : r);
|
|
759
760
|
return;
|
|
760
761
|
}
|
|
761
|
-
|
|
762
|
+
p(e, void 0);
|
|
762
763
|
},
|
|
763
|
-
setFilter:
|
|
764
|
+
setFilter: p
|
|
764
765
|
};
|
|
765
|
-
},
|
|
766
|
-
let [e, t] =
|
|
767
|
-
return
|
|
766
|
+
}, Je = () => document.getElementById(I), Ye = () => {
|
|
767
|
+
let [e, t] = b(() => !!window.HubSpotConversations);
|
|
768
|
+
return g(() => {
|
|
768
769
|
if (window.HubSpotConversations) {
|
|
769
770
|
t(!0);
|
|
770
771
|
return;
|
|
771
772
|
}
|
|
772
773
|
window.hsConversationsOnReady = [() => t(!0)];
|
|
773
|
-
}, []),
|
|
774
|
+
}, []), g(() => {
|
|
774
775
|
e && window.HubSpotConversations?.on("widgetClosed", () => {
|
|
775
|
-
|
|
776
|
+
Je()?.classList.remove(L);
|
|
776
777
|
});
|
|
777
778
|
}, [e]), {
|
|
778
779
|
isAvailable: e,
|
|
779
|
-
toggle:
|
|
780
|
-
let e = window.HubSpotConversations, t =
|
|
780
|
+
toggle: m(() => {
|
|
781
|
+
let e = window.HubSpotConversations, t = Je();
|
|
781
782
|
e && t && (t.classList.contains("hs-show") ? (e.widget.close(), t.classList.remove(L)) : (t.classList.add(L), e.widget.open()));
|
|
782
783
|
}, [])
|
|
783
784
|
};
|
|
784
|
-
},
|
|
785
|
-
let
|
|
786
|
-
n || !
|
|
785
|
+
}, Xe = ({ data: e, fetchNextPage: t, isFetchingNextPage: n, isInitialLoading: r, isLoading: i, enabled: a = !0 }) => {
|
|
786
|
+
let o = m(async (e) => {
|
|
787
|
+
n || !a || await t({ pageParam: e?.pageParam || e.visibleRowsCount });
|
|
787
788
|
}, [
|
|
788
|
-
|
|
789
|
+
a,
|
|
789
790
|
t,
|
|
790
791
|
n
|
|
791
|
-
]),
|
|
792
|
+
]), s = v(() => {
|
|
792
793
|
if (e) return e.pages.reduce((e, t) => [...e, ...t], []);
|
|
793
794
|
}, [e]);
|
|
794
795
|
return {
|
|
795
|
-
fetchNextPageOnRowsScrollEnd:
|
|
796
|
-
isLoading: n ||
|
|
796
|
+
fetchNextPageOnRowsScrollEnd: o,
|
|
797
|
+
isLoading: n || i,
|
|
797
798
|
loadingVariant: r ? "skeleton" : "linear-progress",
|
|
798
|
-
rows:
|
|
799
|
+
rows: s
|
|
799
800
|
};
|
|
800
|
-
},
|
|
801
|
-
let { libraries: t } =
|
|
801
|
+
}, Ze = (e) => {
|
|
802
|
+
let { libraries: t } = h(O), n = e?.i18 || t?.i18, r = e?.i18?.translateFunction || t?.i18?.translateFunction, i = n?.i18next?.t || r || ((e) => e), { unknownErrorTranslationKey: a = "error.unknownError" } = e || {}, o = i(a), s = m((e) => {
|
|
802
803
|
if (e && typeof e == "object" && "response" in e) {
|
|
803
804
|
let { response: t } = e || {};
|
|
804
805
|
if (t && typeof t == "object" && "reason" in t && t.reason) return String(t.reason);
|
|
@@ -812,78 +813,47 @@ var f = 3e4, p = 1e3, m = 1e4, h = (e) => Array.isArray(e) ? e.map(h) : typeof e
|
|
|
812
813
|
}
|
|
813
814
|
}
|
|
814
815
|
}
|
|
815
|
-
return e instanceof Error ? e.message :
|
|
816
|
-
}, [
|
|
816
|
+
return e instanceof Error ? e.message : o;
|
|
817
|
+
}, [o]);
|
|
817
818
|
return {
|
|
818
|
-
getErrorCode:
|
|
819
|
+
getErrorCode: m((e) => {
|
|
819
820
|
let { response: t } = e || {};
|
|
820
821
|
return t?.error_code ? String(t?.error_code) : t?.data?.error_code ? String(t?.data?.error_code) : t?.error_code ? String(t?.error_code) : t?.data?.error_code ? String(t.data.error_code) : "unknown_error_code";
|
|
821
822
|
}, []),
|
|
822
|
-
printError:
|
|
823
|
-
};
|
|
824
|
-
}, We = String.raw`(?:chauffeur|conducteur|op[ée]rateur|machiniste|driver|operator)`, Ge = String.raw`(?:(?:avec|with|incl(?:\.|uding|us)?|y\s+compris)\s+|\+\s*)(?:(?:un|une|le|la|son|sa|an?|the|its)\s+)?`, Ke = String.raw`(?:\s+(?:inclus|compris|included))?`, qe = String.raw`(?:(?:(?:à\s+la|par|per|by\s+the|tarif)\s+)?(jours?|journ[ée]es?|journalier|days?)|(?:(?:à\s+l['’]\s*|(?:par|per|by\s+the|tarif)\s+))?(heures?|horaire|hours?))`, Je = String.raw`(?:\s*[-–—,/·:]?\s*${qe}|\s*\(\s*${qe}\s*\))?`, Ye = String.raw`(?:(?:location|rental|rented)\s+)?(?:${Ge}${We}${Ke}|${We}\s+(?:inclus|compris|included))${Je}`, Xe = new RegExp(String.raw`\s*[[(]\s*${Ye}\s*[\])]`, "giu"), Ze = new RegExp(String.raw`(?:^|[\s,;:/|–—-])\s*${Ye}\s*$`, "iu"), Qe = /[\s,;:/|–—-]+$/u, $e = ([e]) => {
|
|
825
|
-
let t = e.replace(/^[\s,;:/|–—-]+/u, "").trim(), n = (/^[[(]/u.test(t) ? t.slice(1, -1) : t).trim().replace(/\s+/g, " ");
|
|
826
|
-
return n.charAt(0).toLocaleUpperCase() + n.slice(1);
|
|
827
|
-
}, et = (e) => e[1] || e[3] ? "days" : e[2] || e[4] ? "hours" : void 0, tt = (e, { readDriver: t = !0 } = {}) => {
|
|
828
|
-
if (typeof e != "string") return {
|
|
829
|
-
label: "",
|
|
830
|
-
withDriver: !1
|
|
831
|
-
};
|
|
832
|
-
if (!t) return {
|
|
833
|
-
label: e.trim(),
|
|
834
|
-
withDriver: !1
|
|
835
|
-
};
|
|
836
|
-
let n = e.normalize("NFC"), r = [...n.matchAll(Xe)], i = n.replace(Xe, ""), a = i.match(Ze), o = a ? i.slice(0, a.index) : i;
|
|
837
|
-
if (o === n) return {
|
|
838
|
-
label: e.trim(),
|
|
839
|
-
withDriver: !1
|
|
840
|
-
};
|
|
841
|
-
let s = o.replace(Qe, "").replace(/\s{2,}/g, " ").trim(), c = [...r, ...a ? [a] : []], l = c.map(et).find(Boolean), u = $e(c[0]);
|
|
842
|
-
return s ? l ? {
|
|
843
|
-
driverMention: u,
|
|
844
|
-
driverUnit: l,
|
|
845
|
-
label: s,
|
|
846
|
-
withDriver: !0
|
|
847
|
-
} : {
|
|
848
|
-
driverMention: u,
|
|
849
|
-
label: s,
|
|
850
|
-
withDriver: !0
|
|
851
|
-
} : {
|
|
852
|
-
label: e.trim(),
|
|
853
|
-
withDriver: !1
|
|
823
|
+
printError: s
|
|
854
824
|
};
|
|
855
|
-
},
|
|
856
|
-
if (!
|
|
825
|
+
}, Qe = "chunk-reload-timestamp", X = "chunk-reload", $e = 1e4, Z = 2, et = !1;
|
|
826
|
+
if (!F && typeof window < "u") {
|
|
857
827
|
try {
|
|
858
828
|
let e = new URL(window.location.href);
|
|
859
|
-
e.searchParams.has(
|
|
829
|
+
e.searchParams.has(X) && (et = !0, e.searchParams.delete(X), window.history.replaceState(null, "", e.toString()));
|
|
860
830
|
} catch {}
|
|
861
831
|
window.addEventListener("vite:preloadError", (e) => {
|
|
862
832
|
e.preventDefault();
|
|
863
833
|
});
|
|
864
834
|
}
|
|
865
|
-
var
|
|
835
|
+
var tt = (e) => {
|
|
866
836
|
if (!(e instanceof Error)) return !1;
|
|
867
837
|
let t = e.message.toLowerCase();
|
|
868
838
|
return t.includes("dynamically imported module") || t.includes("importing a module script failed") || t.includes("loading chunk") || t.includes("loading css chunk") || t.includes("unable to preload css") || t.includes("failed to fetch") || t.includes("error loading dynamically imported module") || t.includes("load failed") || t.includes("without a valid default export") || e.name === "ChunkLoadError";
|
|
869
|
-
},
|
|
839
|
+
}, nt = /import\s*\(\s*(['"])((\w+:(\/?\/?))?[^\s,]+)\1/, rt = (e) => e.toString().match(nt)?.[2] ?? null, it = (e) => {
|
|
870
840
|
try {
|
|
871
841
|
return sessionStorage.getItem(e);
|
|
872
842
|
} catch {
|
|
873
843
|
return null;
|
|
874
844
|
}
|
|
875
|
-
},
|
|
845
|
+
}, at = (e, t) => {
|
|
876
846
|
try {
|
|
877
847
|
sessionStorage.setItem(e, t);
|
|
878
848
|
} catch {}
|
|
879
|
-
},
|
|
880
|
-
for (let t = 0; t <
|
|
881
|
-
return await
|
|
849
|
+
}, ot = (e) => Function("url", "return import(url)")(e), st = async (e) => {
|
|
850
|
+
for (let t = 0; t < Z; t++) try {
|
|
851
|
+
return await ot(`${e}?t=${Date.now()}`);
|
|
882
852
|
} catch {
|
|
883
|
-
t <
|
|
853
|
+
t < Z - 1 && await new Promise((e) => setTimeout(e, 500 * 2 ** t));
|
|
884
854
|
}
|
|
885
|
-
throw Error(`Failed to import ${e} after ${
|
|
886
|
-
},
|
|
855
|
+
throw Error(`Failed to import ${e} after ${Z} retries`);
|
|
856
|
+
}, ct = async () => {
|
|
887
857
|
try {
|
|
888
858
|
if (typeof navigator < "u" && "serviceWorker" in navigator) {
|
|
889
859
|
let e = await navigator.serviceWorker.getRegistrations();
|
|
@@ -894,34 +864,28 @@ var at = (e) => {
|
|
|
894
864
|
await Promise.all(e.map((e) => caches.delete(e)));
|
|
895
865
|
}
|
|
896
866
|
} catch {}
|
|
897
|
-
},
|
|
898
|
-
await
|
|
867
|
+
}, lt = async () => {
|
|
868
|
+
await ct();
|
|
899
869
|
let e = new URL(window.location.href);
|
|
900
|
-
e.searchParams.set(
|
|
901
|
-
},
|
|
870
|
+
e.searchParams.set(X, String(Date.now())), window.location.replace(e.toString());
|
|
871
|
+
}, Q = (e) => e != null && e.default !== void 0, ut = (e) => p(async () => {
|
|
902
872
|
let t;
|
|
903
873
|
try {
|
|
904
874
|
let n = await e();
|
|
905
|
-
if (
|
|
875
|
+
if (Q(n)) return n;
|
|
906
876
|
t = /* @__PURE__ */ Error("Module resolved without a valid default export");
|
|
907
877
|
} catch (e) {
|
|
908
878
|
t = e;
|
|
909
879
|
}
|
|
910
|
-
if (
|
|
911
|
-
let n =
|
|
880
|
+
if (F || !tt(t)) throw t;
|
|
881
|
+
let n = rt(e);
|
|
912
882
|
if (n) try {
|
|
913
|
-
let e = await
|
|
914
|
-
if (
|
|
883
|
+
let e = await st(n);
|
|
884
|
+
if (Q(e)) return e;
|
|
915
885
|
} catch {}
|
|
916
|
-
let r = Number(
|
|
917
|
-
return Date.now() - r <
|
|
918
|
-
}),
|
|
919
|
-
let t = Z(e?.items);
|
|
920
|
-
return t && Q(t) && t.quantity ? t.quantity : void 0;
|
|
921
|
-
}, Ct = (e) => {
|
|
922
|
-
let t = Z(e?.items);
|
|
923
|
-
return !!t && Q(t) && t.unitPrice == null;
|
|
924
|
-
}, wt = "Page Left", Tt = 1800 * 1e3, Et = 1e3, Dt = (e, t = !0) => {
|
|
886
|
+
let r = Number(it(Qe) || "0");
|
|
887
|
+
return Date.now() - r < $e || et || (at(Qe, String(Date.now())), await lt()), { default: () => null };
|
|
888
|
+
}), dt = "Page Left", ft = 1800 * 1e3, pt = 1e3, mt = (e, t = !0) => {
|
|
925
889
|
let n = 0, r = t ? e : null, i = !1, a = (e) => {
|
|
926
890
|
r !== null && (n += Math.max(0, e - r), r = null);
|
|
927
891
|
};
|
|
@@ -932,39 +896,39 @@ var at = (e) => {
|
|
|
932
896
|
resume: (e) => {
|
|
933
897
|
!i && r === null && (r = e);
|
|
934
898
|
},
|
|
935
|
-
stop: (e) => (i ||= (a(e), !0), Math.min(
|
|
899
|
+
stop: (e) => (i ||= (a(e), !0), Math.min(ft, Math.round(n)))
|
|
936
900
|
};
|
|
937
|
-
},
|
|
901
|
+
}, ht = (e, t) => t < 1e3 ? null : {
|
|
938
902
|
duration_ms: Math.round(t),
|
|
939
903
|
page_path: e
|
|
940
|
-
},
|
|
904
|
+
}, gt = (e) => {
|
|
941
905
|
if (typeof e != "object" || !e) return !1;
|
|
942
906
|
let { exp: t, sub: n, entity_id: r, scope: i } = e;
|
|
943
907
|
return typeof t == "number" && typeof n == "string" && typeof r == "number" && Array.isArray(i) && i.every((e) => typeof e == "string");
|
|
944
|
-
},
|
|
908
|
+
}, _t = (e) => {
|
|
945
909
|
let t = e.replace(/-/g, "+").replace(/_/g, "/"), n = t + "=".repeat((4 - t.length % 4) % 4);
|
|
946
910
|
return decodeURIComponent(Array.from(atob(n), (e) => `%${e.charCodeAt(0).toString(16).padStart(2, "0")}`).join(""));
|
|
947
|
-
},
|
|
911
|
+
}, vt = (e) => {
|
|
948
912
|
let t = e?.split(".")[1];
|
|
949
913
|
if (!t) return null;
|
|
950
914
|
try {
|
|
951
|
-
let e = JSON.parse(
|
|
952
|
-
return
|
|
915
|
+
let e = JSON.parse(_t(t));
|
|
916
|
+
return gt(e) ? e : null;
|
|
953
917
|
} catch {
|
|
954
918
|
return null;
|
|
955
919
|
}
|
|
956
|
-
}, $ = (e) => btoa(e).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, ""),
|
|
920
|
+
}, $ = (e) => btoa(e).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, ""), yt = async (e, t) => {
|
|
957
921
|
let n = new TextEncoder(), r = await crypto.subtle.importKey("raw", n.encode(e), {
|
|
958
922
|
hash: "SHA-256",
|
|
959
923
|
name: "HMAC"
|
|
960
924
|
}, !1, ["sign"]), i = await crypto.subtle.sign("HMAC", r, n.encode(t));
|
|
961
925
|
return $(String.fromCharCode(...new Uint8Array(i)));
|
|
962
|
-
},
|
|
926
|
+
}, bt = async (e, t) => {
|
|
963
927
|
let n = `${$(JSON.stringify({
|
|
964
928
|
alg: "HS256",
|
|
965
929
|
typ: "JWT"
|
|
966
930
|
}))}.${$(JSON.stringify(e))}`;
|
|
967
|
-
return `${n}.${await
|
|
931
|
+
return `${n}.${await yt(t, n)}`;
|
|
968
932
|
};
|
|
969
933
|
//#endregion
|
|
970
|
-
export {
|
|
934
|
+
export { ae as AMPLITUDE_FEATURE_SELECTOR, re as AutoReloadOnNewVersion, ee as ChatClient, G as ChatContext, Ee as ChatProvider, c as DEFAULT_OPERATOR_HOURS_PER_DAY, ie as GTMSendPageView, ue as InitializeAmplitude, fe as InitializeAxiosConfig, he as InitializeDaysJSConfig, ge as InitializeHubSpot, _e as InitializeI18nConfig, ve as InitializeSentryConfig, O as InjectDependenciesContext, k as InjectDependenciesProvider, i as MAX_OPERATOR_HOURS_PER_DAY, D as MaskTextField, ft as PAGE_DURATION_CAP_MS, pt as PAGE_DURATION_MIN_MS, dt as PAGE_LEFT_EVENT, je as QueryProvider, be as RequireAuth, V as SENTRY_IGNORED_REQUEST_URLS, z as SENTRY_KEEP_REPLAY, pe as SUPPORTED_LANGUAGE, xe as ShowHubSpotBubble, l as articleNameAdapter, mt as createVisibleStopwatch, q as dateAdapter, vt as decodeToken, J as distanceAdapter, bt as encodeToken, o as findOperatorItem, Y as getCurrentLanguage, n as getOperatorHoursPerDay, u as getOrvalConfig, e as getUnitCount, a as isHourlyLine, s as isOperatorArticle, t as isOperatorRateMissing, r as isOrderedByTheHour, B as isReplayKeptForError, ut as lazyWithRetry, H as matchesRequestUrl, ht as pageLeftProperties, K as shouldRetryQuery, Fe as useAdapter, Ie as useAmplitude, Le as useAuth, Be as useChat, Ve as useCurrentLanguage, qe as useFilters, Ye as useHubSpot, Xe as useInfiniteDataGrid, Ze as useResponseError, Me as worksiteNameAdapter };
|