@getsoren/shared-module 2.46.1 → 2.47.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 CHANGED
@@ -57,6 +57,7 @@ export default App;
57
57
  | InitializeMapBoxConfig | React Component | Initialize MapBox | mapbox-gl |
58
58
  | InitializeDaysJSConfig | React Component | Initialize DayJS | dayjs |
59
59
  | InitializeHubSpot | React Component | Initialize HubSpot chat widget | - |
60
+ | InitializeAmplitude | React Component | Initialize Amplitude (autocapture, session replay) | @amplitude/analytics-browser & plugin-session-replay |
60
61
  | PreloadErrorHandler | React Component | his component is used to handle preload error. | dayjs |
61
62
 
62
63
  ## Hooks
@@ -70,6 +71,7 @@ export default App;
70
71
  | useCurrentLanguage | This get the current language of app | - |
71
72
  | useFilters | Hook to handle filter | - |
72
73
  | useChat | Hook to consume the ChatProvider context (threads, messaging, presence) | ChatProvider |
74
+ | useAmplitude | Hook to track events, identify users and groups in Amplitude | InitializeAmplitude |
73
75
 
74
76
 
75
77
  ## WebSocket
@@ -1,5 +1,15 @@
1
+ import { SessionReplayOptions } from '@amplitude/plugin-session-replay-browser';
1
2
  import { InjectDependenciesContextProps } from '../../context/InjectDependenciesProvider';
2
- interface InitializeAmplitudeProps {
3
+ import type * as amplitudeAnalytics from "@amplitude/analytics-browser";
4
+ type AutocaptureOptions = amplitudeAnalytics.Types.AutocaptureOptions;
5
+ type ElementInteractionsOptions = amplitudeAnalytics.Types.ElementInteractionsOptions;
6
+ type FrustrationInteractionsOptions = Exclude<NonNullable<AutocaptureOptions["frustrationInteractions"]>, boolean>;
7
+ /**
8
+ * CSS selector matching any element tagged with a feature id. Appended to the SDK default allowlist so a tagged
9
+ * `div`/`span` (e.g. a clickable MUI Card) is tracked even though it isn't a native interactive element.
10
+ */
11
+ export declare const AMPLITUDE_FEATURE_SELECTOR = "[data-amp-track-feature]";
12
+ export interface InitializeAmplitudeProps {
3
13
  /**
4
14
  * Amplitude libraries. Pass `{ analytics, sessionReplayPlugin }` here or inject them via `InjectDependenciesProvider`.
5
15
  */
@@ -8,20 +18,51 @@ interface InitializeAmplitudeProps {
8
18
  * Amplitude project API key. When absent the component is a no-op, so dev builds without a key stay silent.
9
19
  */
10
20
  apiKey?: string;
21
+ /**
22
+ * App version (e.g. `package.json` version) sent as `version_name` on every event.
23
+ * Lets you split any chart by release and spot regressions after a deploy. Strongly recommended.
24
+ */
25
+ appVersion?: string;
26
+ /**
27
+ * Click / change autocapture (`[Amplitude] Element Clicked` / `Element Changed`), the data source for heatmaps and
28
+ * "feature usage" charts. Defaults to `true`. Pass `false` to opt out, or an options object to refine
29
+ * (`pageUrlExcludelist`, `cssSelectorAllowlist`, `shouldTrackEventResolver`...). Our `[data-amp-track-feature]`
30
+ * selector is always appended to the allowlist unless you provide your own `cssSelectorAllowlist`.
31
+ * Object values must be referentially stable (module constant / `useMemo`): they are effect deps and re-init the SDK.
32
+ */
33
+ elementInteractions?: boolean | ElementInteractionsOptions;
34
+ /**
35
+ * Rage / dead click detection (`[Amplitude] Rage Click` / `Dead Click`). Low volume, high UX signal.
36
+ * Defaults to `true` (both enabled) whenever `elementInteractions` is enabled. Pass `false` to opt out.
37
+ */
38
+ frustrationInteractions?: boolean | FrustrationInteractionsOptions;
11
39
  /**
12
40
  * Value injected as `platform` on every tracked event (e.g. "desktop", "supplier", "mobile"). Defaults to "desktop".
13
41
  */
14
42
  platform?: string;
15
43
  /**
16
- * Session replay sample rate between 0 and 1. Defaults to 0.25.
44
+ * Amplitude data center hosting the project. Must match the project (US key on the EU endpoint sends nothing).
45
+ * Defaults to the SDK default ("US"). Applies to analytics events, remote config and session replay uploads.
46
+ */
47
+ serverZone?: amplitudeAnalytics.Types.ServerZoneType;
48
+ /**
49
+ * Session replay privacy settings. Defaults to `{ defaultMaskLevel: "medium" }`: every input is masked, page text is
50
+ * captured. Tag elements with the SDK classes `amp-mask` / `amp-unmask` / `amp-block` for per-element control.
51
+ */
52
+ sessionReplayPrivacy?: SessionReplayOptions["privacyConfig"];
53
+ /**
54
+ * Fixed session replay sample rate between 0 and 1. Leave `undefined` (default) to let Amplitude drive the rate
55
+ * remotely, which is required for Dynamic Sampling (Amplitude > Settings > Session Replay). Setting a value here
56
+ * overrides the remote rate for this app and disables Dynamic Sampling org-wide.
17
57
  */
18
58
  sessionReplaySampleRate?: number;
19
59
  }
20
60
  /**
21
61
  * Initializes the Amplitude SDK once at mount:
22
- * - disables click autocapture so only explicit `track` calls are sent,
23
- * - registers the session replay plugin with configurable sampling (when provided),
62
+ * - enables click autocapture (with our feature selector) and rage/dead click detection, the data behind heatmaps,
63
+ * - tracks SPA page views on path changes only (query-string churn from filters doesn't count as a new view),
64
+ * - registers the session replay plugin, remote-controlled sample rate by default (Dynamic Sampling ready),
24
65
  * - registers an enrichment plugin that adds `platform` to every event's properties.
25
66
  */
26
- declare const InitializeAmplitude: ({ apiKey, platform, sessionReplaySampleRate, ...props }: InitializeAmplitudeProps) => null;
67
+ declare const InitializeAmplitude: ({ apiKey, appVersion, elementInteractions, frustrationInteractions, platform, serverZone, sessionReplayPrivacy, sessionReplaySampleRate, ...props }: InitializeAmplitudeProps) => null;
27
68
  export default InitializeAmplitude;
package/dist/main.js CHANGED
@@ -1,6 +1,13 @@
1
1
  import { t as e } from "./orval-Bf_zcxLE.js";
2
2
  import { Suspense as t, createContext as n, lazy as r, useCallback as i, useContext as a, useEffect as o, useMemo as s, useRef as c, useState as l } from "react";
3
3
  import { jsx as u } from "react/jsx-runtime";
4
+ import "dayjs/locale/ar";
5
+ import "dayjs/locale/de";
6
+ import "dayjs/locale/en";
7
+ import "dayjs/locale/es";
8
+ import "dayjs/locale/fr";
9
+ import "dayjs/locale/it";
10
+ import "dayjs/locale/pt";
4
11
  //#region src/chat/ChatClient.ts
5
12
  var d = 3e4, f = 1e3, p = 1e4, m = (e) => Array.isArray(e) ? e.map(m) : typeof e == "object" && e ? Object.fromEntries(Object.entries(e).map(([e, t]) => [e.replace(/_([a-z])/g, (e, t) => t.toUpperCase()), m(t)])) : e, h = (e) => Array.isArray(e) ? e.map(h) : typeof e == "object" && e ? Object.fromEntries(Object.entries(e).map(([e, t]) => [e.replace(/[A-Z]/g, (e) => `_${e.toLowerCase()}`), h(t)])) : e, g = class {
6
13
  url;
@@ -122,17 +129,17 @@ var d = 3e4, f = 1e3, p = 1e4, m = (e) => Array.isArray(e) ? e.map(m) : typeof e
122
129
  value: i,
123
130
  children: e
124
131
  });
125
- }, b = 900 * 1e3, x = 60 * 1e3, S = 600 * 1e3, C = "auto-reload-on-new-version-timestamp", w = /<meta[^>]*name="version"[^>]*content="([^"]*)"/, T = (e) => {
132
+ }, b = 900 * 1e3, x = 60 * 1e3, S = 600 * 1e3, C = "auto-reload-on-new-version-timestamp", w = /<meta[^>]*name="version"[^>]*content="([^"]*)"/, ee = (e) => {
126
133
  try {
127
134
  return sessionStorage.getItem(e);
128
135
  } catch {
129
136
  return null;
130
137
  }
131
- }, E = (e, t) => {
138
+ }, T = (e, t) => {
132
139
  try {
133
140
  sessionStorage.setItem(e, t);
134
141
  } catch {}
135
- }, D = ({ version: e, checkInterval: t = b, children: n, ...r }) => {
142
+ }, E = ({ version: e, checkInterval: t = b, children: n, ...r }) => {
136
143
  let { libraries: i } = a(v), s = r?.reactRouter || i?.reactRouter, l = c(!1), d = c(0);
137
144
  if (!s) throw Error("React Router is not provided. You can provide it with InjectDependenciesProvider or directly in props of AutoReloadOnNewVersion.");
138
145
  let { useLocation: f, Outlet: p } = s, { pathname: m } = f(), h = c(m);
@@ -157,10 +164,10 @@ var d = 3e4, f = 1e3, p = 1e4, m = (e) => Array.isArray(e) ? e.map(m) : typeof e
157
164
  }, [e, t]), o(() => {
158
165
  if (m === h.current || (h.current = m, !l.current)) return;
159
166
  l.current = !1;
160
- let e = Number(T(C) || "0");
161
- Date.now() - e < S || (E(C, String(Date.now())), window.location.reload());
167
+ let e = Number(ee(C) || "0");
168
+ Date.now() - e < S || (T(C, String(Date.now())), window.location.reload());
162
169
  }, [m]), n ?? /* @__PURE__ */ u(p, {});
163
- }, O = ({ data: e, ...t }) => {
170
+ }, D = ({ data: e, ...t }) => {
164
171
  let { libraries: n } = a(v), r = t?.reactRouter || n?.reactRouter, i = t?.gtm || n?.gtm;
165
172
  if (!r) throw Error("React Router is not provided. You can provide it with InjectDependenciesProvider or directly in props of GTMSendPageView.");
166
173
  if (!i) throw Error("GTM is not provided. You can provide it with InjectDependenciesProvider or directly in props of GTMSendPageView.");
@@ -176,47 +183,86 @@ var d = 3e4, f = 1e3, p = 1e4, m = (e) => Array.isArray(e) ? e.map(m) : typeof e
176
183
  d,
177
184
  f
178
185
  ]), /* @__PURE__ */ u(l, {});
179
- }, k = ({ apiKey: e, platform: t = "desktop", sessionReplaySampleRate: n = .25, ...r }) => {
180
- let { libraries: i } = a(v), s = r.amplitude || i?.amplitude;
186
+ }, O = "[data-amp-track-feature]", k = [
187
+ "a",
188
+ "button",
189
+ "input",
190
+ "select",
191
+ "textarea",
192
+ "label",
193
+ "video",
194
+ "audio",
195
+ "[contenteditable=\"true\" i]",
196
+ "[data-amp-default-track]",
197
+ ".amp-default-track"
198
+ ], A = { defaultMaskLevel: "medium" }, j = (e, t) => {
199
+ if (e === !1) return !1;
200
+ let n = e === !0 ? {} : e;
201
+ return {
202
+ cssSelectorAllowlist: [...t, O],
203
+ ...n
204
+ };
205
+ }, M = (e, t) => !t || e === !1 ? !1 : {
206
+ deadClicks: !0,
207
+ rageClicks: !0,
208
+ ...e === !0 ? {} : e
209
+ }, N = ({ apiKey: e, appVersion: t, elementInteractions: n = !0, frustrationInteractions: r = !0, platform: i = "desktop", serverZone: s, sessionReplayPrivacy: c = A, sessionReplaySampleRate: l, ...u }) => {
210
+ let { libraries: d } = a(v), f = u.amplitude || d?.amplitude;
181
211
  return o(() => {
182
- let r = s?.analytics, i = s?.sessionReplayPlugin;
183
- if (!(e && r)) return;
184
- let a = "platform-enrichment";
185
- return r.init(e, { autocapture: { elementInteractions: !1 } }), i && r.add(i({ sampleRate: n })), r.add({
212
+ let a = f?.analytics, o = f?.sessionReplayPlugin;
213
+ if (!(e && a)) return;
214
+ let u = "platform-enrichment", d = j(n, a.Types?.DEFAULT_CSS_SELECTOR_ALLOWLIST ?? k);
215
+ return a.init(e, {
216
+ appVersion: t,
217
+ autocapture: {
218
+ elementInteractions: d,
219
+ frustrationInteractions: M(r, d !== !1),
220
+ pageViews: { trackHistoryChanges: "pathOnly" }
221
+ },
222
+ serverZone: s
223
+ }), o && a.add(o({
224
+ privacyConfig: c,
225
+ ...l === void 0 ? {} : { sampleRate: l }
226
+ })), a.add({
186
227
  execute: async (e) => ({
187
228
  ...e,
188
229
  event_properties: {
189
230
  ...e.event_properties,
190
- platform: t
231
+ platform: i
191
232
  }
192
233
  }),
193
- name: a,
234
+ name: u,
194
235
  type: "enrichment"
195
236
  }), () => {
196
- i && r.remove("@amplitude/plugin-session-replay-browser"), r.remove(a);
237
+ o && a.remove("@amplitude/plugin-session-replay-browser"), a.remove(u);
197
238
  };
198
239
  }, [
199
240
  e,
200
- s,
241
+ f,
201
242
  t,
202
- n
243
+ n,
244
+ r,
245
+ i,
246
+ s,
247
+ c,
248
+ l
203
249
  ]), null;
204
- }, A = (() => {
250
+ }, P = (() => {
205
251
  try {
206
252
  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;
207
253
  } catch {
208
254
  return !1;
209
255
  }
210
- })(), j = "user", M = ({ tokenTypeKey: e = "tokenType", tokenKey: t = "accessToken", postContentType: n = "application/json", ...r }) => {
211
- let { apiURL: i = r.apiURL, libraries: o, localStorageKeys: s } = a(v), c = r?.userLocalStorageKey || s?.user || j, l = r?.axios || o?.axios;
256
+ })(), F = "user", I = ({ tokenTypeKey: e = "tokenType", tokenKey: t = "accessToken", postContentType: n = "application/json", ...r }) => {
257
+ let { apiURL: i = r.apiURL, libraries: o, localStorageKeys: s } = a(v), c = r?.userLocalStorageKey || s?.user || F, l = r?.axios || o?.axios;
212
258
  if (!l) throw Error("Axios is not provided. You can provide it with InjectDependenciesProvider or directly in props.");
213
- if (!l?.defaults || A) return null;
259
+ if (!l?.defaults || P) return null;
214
260
  if (typeof window < "u" && window.localStorage) {
215
261
  let n = localStorage.getItem(c), r = n ? JSON.parse(n) : null, i = r?.[e] ? r[e] : null, a = r?.[t] ? r[t] : null, o = n ? `${i} ${a}` : null;
216
262
  o && (l.defaults.headers.common.Authorization = o);
217
263
  }
218
264
  return l.defaults.baseURL = i, l.defaults.headers.post["Content-Type"] = n, null;
219
- }, N = [
265
+ }, L = [
220
266
  "ar",
221
267
  "de",
222
268
  "en",
@@ -224,23 +270,15 @@ var d = 3e4, f = 1e3, p = 1e4, m = (e) => Array.isArray(e) ? e.map(m) : typeof e
224
270
  "fr",
225
271
  "it",
226
272
  "pt"
227
- ], P = (e) => N.includes(e), F = ({ language: e, ...t }) => {
273
+ ], te = (e) => L.includes(e), ne = ({ language: e, ...t }) => {
228
274
  let { libraries: n } = a(v), r = t?.dayjs || n?.dayjs, i = t?.plugin || n?.dayjsPlugin;
229
275
  if (!r) throw Error("Dayjs is not provided. You can provide it with InjectDependenciesProvider or directly in props of InitializeDaysJSConfig.");
230
- return o(() => {
231
- (async () => {
232
- let n = e || navigator.language?.slice(0, 2) || "en";
233
- r.extend(t.localizedFormat), i && i.forEach((e) => {
234
- e && r.extend(e);
235
- }), await import("dayjs/locale/ar"), await import("dayjs/locale/de"), await import("dayjs/locale/en"), await import("dayjs/locale/es"), await import("dayjs/locale/fr"), await import("dayjs/locale/it"), await import("dayjs/locale/pt"), r.locale(P(n) ? n : "en");
236
- })().then();
237
- }, [
238
- r,
239
- i,
240
- e,
241
- t.localizedFormat
242
- ]), null;
243
- }, I = "hubspot-messages-iframe-container", L = "hs-show", R = "data-hs-hidden", ee = ({ hubId: e }) => (o(() => {
276
+ r.extend(t.localizedFormat), i && i.forEach((e) => {
277
+ e && r.extend(e);
278
+ });
279
+ let o = e || navigator.language?.slice(0, 2) || "en", s = te(o) ? o : "en";
280
+ return r.locale() !== s && r.locale(s), null;
281
+ }, R = "hubspot-messages-iframe-container", z = "hs-show", B = "data-hs-hidden", re = ({ hubId: e }) => (o(() => {
244
282
  if (!e) return;
245
283
  let t = document.createElement("script");
246
284
  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), () => {
@@ -249,14 +287,14 @@ var d = 3e4, f = 1e3, p = 1e4, m = (e) => Array.isArray(e) ? e.map(m) : typeof e
249
287
  }, [e]), o(() => {
250
288
  let e = document.createElement("style");
251
289
  return e.textContent = `
252
- html[${R}] div#${I} { display: none !important; }
253
- html[${R}] div#${I}.${L} { display: initial !important; }
254
- `, document.head.appendChild(e), document.documentElement.setAttribute(R, ""), () => {
255
- e.remove(), document.documentElement.removeAttribute(R);
290
+ html[${B}] div#${R} { display: none !important; }
291
+ html[${B}] div#${R}.${z} { display: initial !important; }
292
+ `, document.head.appendChild(e), document.documentElement.setAttribute(B, ""), () => {
293
+ e.remove(), document.documentElement.removeAttribute(B);
256
294
  };
257
- }, []), null), te = ({ debug: e, resources: t, ...n }) => {
295
+ }, []), null), ie = ({ debug: e, resources: t, ...n }) => {
258
296
  let { libraries: r } = a(v), i = n?.i18 || r?.i18, { i18next: o, initReactI18next: s, languageDetector: c } = i || {};
259
- if (A) return null;
297
+ if (P) return null;
260
298
  if (!(i && o && c && s)) throw Error("i18 is not provided. You can provide it with InjectDependenciesProvider or directly in props.");
261
299
  return o.isInitialized ? null : (o.use(c).use(s).init({
262
300
  debug: e,
@@ -274,7 +312,7 @@ var d = 3e4, f = 1e3, p = 1e4, m = (e) => Array.isArray(e) ? e.map(m) : typeof e
274
312
  }), o.on("languageChanged", (e) => {
275
313
  document.documentElement.setAttribute("lang", e);
276
314
  }), null);
277
- }, ne = ({ dsn: e, integrations: t, tracesSampleRate: n, replaysSessionSampleRate: r, replaysOnErrorSampleRate: i, tracePropagationTargets: s, ignoreErrors: c, debug: l, environment: u, release: d, ...f }) => {
315
+ }, ae = ({ dsn: e, integrations: t, tracesSampleRate: n, replaysSessionSampleRate: r, replaysOnErrorSampleRate: i, tracePropagationTargets: s, ignoreErrors: c, debug: l, environment: u, release: d, ...f }) => {
278
316
  let { libraries: p } = a(v), m = f?.sentry || p?.sentry, h = f?.reactRouter || p?.reactRouter;
279
317
  if (!m) throw Error("Sentry is not provided. You can provide it with InjectDependenciesProvider or directly in props.");
280
318
  if (!h) throw Error("React Router is not provided. You can provide it with InjectDependenciesProvider or directly in props.");
@@ -306,12 +344,12 @@ var d = 3e4, f = 1e3, p = 1e4, m = (e) => Array.isArray(e) ? e.map(m) : typeof e
306
344
  tracePropagationTargets: s,
307
345
  tracesSampleRate: n || 1
308
346
  }), null;
309
- }, z = /* @__PURE__ */ new WeakMap(), re = "user", ie = ({ Fallback: e, isLogged: n, loginPath: r = "/login", redirect401Path: i = "/login", ...s }) => {
310
- let { libraries: c, localStorageKeys: d } = a(v), f = s?.reactRouter || c?.reactRouter, p = s?.axios || c?.axios, m = s?.localStorageKey || d?.user || re;
347
+ }, V = /* @__PURE__ */ new WeakMap(), oe = "user", se = ({ Fallback: e, isLogged: n, loginPath: r = "/login", redirect401Path: i = "/login", ...s }) => {
348
+ let { libraries: c, localStorageKeys: d } = a(v), f = s?.reactRouter || c?.reactRouter, p = s?.axios || c?.axios, m = s?.localStorageKey || d?.user || oe;
311
349
  if (!f) throw Error("React Router is not provided. You can provide it with InjectDependenciesProvider or directly in props.");
312
350
  let [h, g] = l(null), { useLocation: _, Navigate: y, Outlet: b } = f, x = _(), S = typeof n == "function" ? n() : !!n, C = typeof S == "boolean" ? S : S?.isLogged;
313
351
  return o(() => {
314
- p && (z.has(p) || (z.set(p, !0), p.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 && (p.defaults.headers.common.Authorization = null, typeof window < "u" && window.localStorage && localStorage.removeItem(m)), g(i)), Promise.reject(e)))));
352
+ p && (V.has(p) || (V.set(p, !0), p.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 && (p.defaults.headers.common.Authorization = null, typeof window < "u" && window.localStorage && localStorage.removeItem(m)), g(i)), Promise.reject(e)))));
315
353
  }, [
316
354
  p,
317
355
  m,
@@ -327,34 +365,34 @@ var d = 3e4, f = 1e3, p = 1e4, m = (e) => Array.isArray(e) ? e.map(m) : typeof e
327
365
  state: { from: x },
328
366
  replace: !0
329
367
  });
330
- }, B = /* @__PURE__ */ new Set(), ae = () => (o(() => {
368
+ }, H = /* @__PURE__ */ new Set(), ce = () => (o(() => {
331
369
  let e = Symbol();
332
- return B.add(e), document.documentElement.removeAttribute(R), () => {
333
- B.delete(e), B.size === 0 && document.documentElement.setAttribute(R, "");
370
+ return H.add(e), document.documentElement.removeAttribute(B), () => {
371
+ H.delete(e), H.size === 0 && document.documentElement.setAttribute(B, "");
334
372
  };
335
- }, []), null), oe = "user", se = {
373
+ }, []), null), le = "user", ue = {
336
374
  client: "/v2/threads/ws",
337
375
  supplier: "/v1/threads/ws"
338
- }, ce = (e, t) => `${e.startsWith("https") ? "wss" : "ws"}://${e.replace(/^https?:\/\//, "")}${t}`, le = (e) => {
376
+ }, de = (e, t) => `${e.startsWith("https") ? "wss" : "ws"}://${e.replace(/^https?:\/\//, "")}${t}`, fe = (e) => {
339
377
  try {
340
378
  let t = localStorage.getItem(e);
341
379
  return t ? JSON.parse(t)?.accessToken ?? null : null;
342
380
  } catch {
343
381
  return null;
344
382
  }
345
- }, V = n(null), ue = ({ children: e, token: t, url: n, wsPath: r, maxReconnectAttempts: s, reconnectBaseDelay: d, maxMessageBodyLength: f = 1e4, reconnect: p = !0, enabled: m = !0, context: h = "client" }) => {
346
- let [_, y] = l(!1), [b, x] = l(!1), [S, C] = l(0), [w, T] = l(m), E = m && w, { apiURL: D, localStorageKeys: O } = a(v), k = O?.user || oe, A = c(null), j = c(/* @__PURE__ */ new Set());
383
+ }, U = n(null), pe = ({ children: e, token: t, url: n, wsPath: r, maxReconnectAttempts: s, reconnectBaseDelay: d, maxMessageBodyLength: f = 1e4, reconnect: p = !0, enabled: m = !0, context: h = "client" }) => {
384
+ let [_, y] = l(!1), [b, x] = l(!1), [S, C] = l(0), [w, ee] = l(m), T = m && w, { apiURL: E, localStorageKeys: D } = a(v), O = D?.user || le, k = c(null), A = c(/* @__PURE__ */ new Set());
347
385
  o(() => {
348
- if (!E) return;
349
- let e = r ?? se[h], i = n || (D ? ce(D, e) : null);
386
+ if (!T) return;
387
+ let e = r ?? ue[h], i = n || (E ? de(E, e) : null);
350
388
  if (!i) return;
351
- let a = () => t ?? le(k), o = (e) => {
389
+ let a = () => t ?? fe(O), o = (e) => {
352
390
  switch (e.type) {
353
391
  case "ready":
354
392
  x(!0), C(e.unreadCount ?? 0);
355
393
  break;
356
394
  }
357
- for (let t of j.current) t(e);
395
+ for (let t of A.current) t(e);
358
396
  }, c = setTimeout(() => {
359
397
  let e = new g({
360
398
  getToken: a,
@@ -368,69 +406,69 @@ var d = 3e4, f = 1e3, p = 1e4, m = (e) => Array.isArray(e) ? e.map(m) : typeof e
368
406
  reconnectBaseDelay: d,
369
407
  url: i
370
408
  });
371
- A.current = e, e.connect();
409
+ k.current = e, e.connect();
372
410
  }, 0);
373
411
  return () => {
374
- clearTimeout(c), A.current?.disconnect(), A.current = null;
412
+ clearTimeout(c), k.current?.disconnect(), k.current = null;
375
413
  };
376
414
  }, [
377
- E,
415
+ T,
378
416
  n,
379
417
  r,
380
418
  h,
381
419
  t,
382
420
  p,
383
- D,
384
- k,
421
+ E,
422
+ O,
385
423
  f,
386
424
  s,
387
425
  d
388
426
  ]);
389
- let M = i((e) => {
390
- A.current?.joinThread(e);
391
- }, []), N = i((e) => {
392
- A.current?.leaveThread(e);
393
- }, []), P = i((e, t) => {
394
- A.current?.sendMessage(e, t);
395
- }, []), F = i((e) => {
396
- A.current?.markRead(e);
397
- }, []), I = i((e, t) => {
398
- A.current?.listThreads(e, t);
399
- }, []), L = i((e = 1) => {
427
+ let j = i((e) => {
428
+ k.current?.joinThread(e);
429
+ }, []), M = i((e) => {
430
+ k.current?.leaveThread(e);
431
+ }, []), N = i((e, t) => {
432
+ k.current?.sendMessage(e, t);
433
+ }, []), P = i((e) => {
434
+ k.current?.markRead(e);
435
+ }, []), F = i((e, t) => {
436
+ k.current?.listThreads(e, t);
437
+ }, []), I = i((e = 1) => {
400
438
  C((t) => t + e);
401
- }, []), R = {
439
+ }, []), L = {
402
440
  decrementUnreadCount: i((e = 1) => {
403
441
  C((t) => Math.max(0, t - e));
404
442
  }, []),
405
443
  disconnect: i(() => {
406
- A.current?.disconnect(), A.current = null;
444
+ k.current?.disconnect(), k.current = null;
407
445
  }, []),
408
- incrementUnreadCount: L,
446
+ incrementUnreadCount: I,
409
447
  isConnected: _,
410
448
  isReady: b,
411
- joinThread: M,
412
- leaveThread: N,
413
- listThreads: I,
414
- markRead: F,
415
- sendMessage: P,
449
+ joinThread: j,
450
+ leaveThread: M,
451
+ listThreads: F,
452
+ markRead: P,
453
+ sendMessage: N,
416
454
  setEnabled: i((e) => {
417
- T(e);
455
+ ee(e);
418
456
  }, []),
419
- subscribe: i((e) => (j.current.add(e), () => {
420
- j.current.delete(e);
457
+ subscribe: i((e) => (A.current.add(e), () => {
458
+ A.current.delete(e);
421
459
  }), []),
422
460
  unreadCount: S
423
461
  };
424
- return /* @__PURE__ */ u(V.Provider, {
425
- value: R,
462
+ return /* @__PURE__ */ u(U.Provider, {
463
+ value: L,
426
464
  children: e
427
465
  });
428
- }, de = (e) => e && typeof e == "function", fe = (e) => e && typeof e == "function", pe = ({ children: e, defaultQueriesOptions: t, defaultMutationsOptions: n, ...r }) => {
466
+ }, me = (e) => e && typeof e == "function", he = (e) => e && typeof e == "function", ge = ({ children: e, defaultQueriesOptions: t, defaultMutationsOptions: n, ...r }) => {
429
467
  let { libraries: i } = a(v), o = r?.QueryClient || i?.reactQuery?.QueryClient, s = r?.QueryClientProvider || i?.reactQuery?.QueryClientProvider;
430
468
  if (!o) throw Error("QueryClient is not provided. You can provide it with InjectDependenciesProvider or directly in props.");
431
469
  if (!s) throw Error("QueryClientProvider is not provided. You can provide it with InjectDependenciesProvider or directly in props.");
432
- if (!de(s)) throw Error("Provided QueryClientProvider dependencies are not valid.");
433
- if (!fe(o)) throw Error("Provided QueryClient dependencies are not valid.");
470
+ if (!me(s)) throw Error("Provided QueryClientProvider dependencies are not valid.");
471
+ if (!he(o)) throw Error("Provided QueryClient dependencies are not valid.");
434
472
  let l = c(null);
435
473
  return l.current ||= new o({ defaultOptions: {
436
474
  mutations: { ...n },
@@ -444,36 +482,36 @@ var d = 3e4, f = 1e3, p = 1e4, m = (e) => Array.isArray(e) ? e.map(m) : typeof e
444
482
  client: l.current,
445
483
  children: e
446
484
  });
447
- }, H = ({ library: e, date: t, format: n = "ll" }) => e(t).format(n), U = (e, t) => {
485
+ }, W = ({ library: e, date: t, format: n = "ll" }) => e(t).format(n), G = (e, t) => {
448
486
  let { fractionDigits: n = 0, metric: r = "km", spacingBetween: i = !0 } = t || {}, a = Number(e), o = i ? " " : "";
449
487
  return Number.isNaN(a) ? `0${o}${r}` : `${a.toFixed(n)}${o}${r}`;
450
- }, W = (e) => !e || typeof e != "string" ? "" : e.replace(/_/g, " ").toLowerCase().split(" ").map((e) => e.length > 0 ? e.charAt(0).toUpperCase() + e.slice(1) : e).join(" "), me = (e) => e?.startsWith("/") ? e?.startsWith("/files") ? e : `/files${e}` : e?.startsWith("files") ? `/${e}` : `/files/${e}`, he = ({ path: e, size: t, apiURL: n }) => {
488
+ }, K = (e) => !e || typeof e != "string" ? "" : e.replace(/_/g, " ").toLowerCase().split(" ").map((e) => e.length > 0 ? e.charAt(0).toUpperCase() + e.slice(1) : e).join(" "), _e = (e) => e?.startsWith("/") ? e?.startsWith("/files") ? e : `/files${e}` : e?.startsWith("files") ? `/${e}` : `/files/${e}`, ve = ({ path: e, size: t, apiURL: n }) => {
451
489
  if (!e) return "";
452
- let r = `${n}${me(e)}`, i = r.match(/\.(jpeg|jpg|png|gif|bmp|webp|svg|avif)$/) !== null;
490
+ let r = `${n}${_e(e)}`, i = r.match(/\.(jpeg|jpg|png|gif|bmp|webp|svg|avif)$/) !== null;
453
491
  return typeof t == "number" && i ? `${r.replace("/files", `/thumbs/${t}`)}` : r;
454
- }, ge = (e) => {
492
+ }, ye = (e) => {
455
493
  let { apiURL: t, libraries: n } = a(v), r = e?.dayjs || n?.dayjs;
456
494
  return {
457
495
  dateAdapter: (e, t) => {
458
496
  if (!r) throw Error("Dayjs is not provided. You can provide it with InjectDependenciesProvider or directly in props.");
459
- return H({
497
+ return W({
460
498
  date: e,
461
499
  format: t,
462
500
  library: r
463
501
  });
464
502
  },
465
- distanceAdapter: U,
503
+ distanceAdapter: G,
466
504
  filePathAdapter: (e, n) => {
467
505
  if (!t) throw Error("API URL is not provided. You can provide it with InjectDependenciesProvider or directly in props to filePathAdapter.");
468
- return typeof e == "string" && /^https?:\/\//.test(e) ? e : he({
506
+ return typeof e == "string" && /^https?:\/\//.test(e) ? e : ve({
469
507
  apiURL: t,
470
508
  path: e,
471
509
  size: n
472
510
  });
473
511
  },
474
- worksiteNameAdapter: W
512
+ worksiteNameAdapter: K
475
513
  };
476
- }, _e = () => {
514
+ }, be = () => {
477
515
  let { libraries: e } = a(v), t = e?.amplitude?.analytics, n = i((e, n) => {
478
516
  if (!t || (t.setUserId(e), !n)) return;
479
517
  let r = new t.Identify();
@@ -497,14 +535,14 @@ var d = 3e4, f = 1e3, p = 1e4, m = (e) => Array.isArray(e) ? e.map(m) : typeof e
497
535
  setGroup: r,
498
536
  track: o
499
537
  };
500
- }, ve = (e) => {
538
+ }, xe = (e) => {
501
539
  let { libraries: t, localStorageKeys: n } = a(v), r = e?.axios || t?.axios, s = e?.localStorageKey || n?.user || "user";
502
540
  if (!r) throw Error("Axios is not provided. You can provide it with InjectDependenciesProvider or directly in params of useAuth.");
503
541
  let c = i(({ tokenType: e, accessToken: t }) => {
504
542
  r.defaults.headers.common.Authorization = `${e} ${t}`;
505
543
  }, [r.defaults.headers.common]);
506
544
  return o(() => {
507
- if (A) return;
545
+ if (P) return;
508
546
  let e = ({ newValue: e, key: t }) => {
509
547
  if (t === s && e) try {
510
548
  let { accessToken: t, tokenType: n } = JSON.parse(e);
@@ -525,9 +563,9 @@ var d = 3e4, f = 1e3, p = 1e4, m = (e) => Array.isArray(e) ? e.map(m) : typeof e
525
563
  },
526
564
  setAuthenticationToken: c
527
565
  };
528
- }, ye = "New message", be = (e, t) => {
566
+ }, Se = "New message", Ce = (e, t) => {
529
567
  if (!("Notification" in window) || typeof Notification != "function" || Notification.permission !== "granted" || !document.hidden) return;
530
- let n = new Notification(t.title ?? ye, {
568
+ let n = new Notification(t.title ?? Se, {
531
569
  badge: t?.badge,
532
570
  body: t?.body || e.bodyPreview,
533
571
  data: t?.data,
@@ -542,8 +580,8 @@ var d = 3e4, f = 1e3, p = 1e4, m = (e) => Array.isArray(e) ? e.map(m) : typeof e
542
580
  let { onClick: r } = t;
543
581
  n.onclick = () => r(e);
544
582
  }
545
- }, xe = (e) => {
546
- let t = a(V);
583
+ }, we = (e) => {
584
+ let t = a(U);
547
585
  if (!t) throw Error("useChat must be used within ChatProvider");
548
586
  let { subscribe: n, setEnabled: r, ...i } = t, s = c(e);
549
587
  return s.current = e, o(() => {
@@ -560,7 +598,7 @@ var d = 3e4, f = 1e3, p = 1e4, m = (e) => Array.isArray(e) ? e.map(m) : typeof e
560
598
  r?.(e);
561
599
  break;
562
600
  case "new_message_notification":
563
- i?.(e), t && t.enabled !== !1 && be(e, t);
601
+ i?.(e), t && t.enabled !== !1 && Ce(e, t);
564
602
  break;
565
603
  case "presence":
566
604
  a?.(e);
@@ -585,44 +623,44 @@ var d = 3e4, f = 1e3, p = 1e4, m = (e) => Array.isArray(e) ? e.map(m) : typeof e
585
623
  break;
586
624
  }
587
625
  }), [n]), i;
588
- }, G = (e, t) => t === "short" ? e.split("-")[0] : e, Se = (e, t = "full") => {
626
+ }, q = (e, t) => t === "short" ? e.split("-")[0] : e, Te = (e, t = "full") => {
589
627
  let [n, r] = l(() => {
590
628
  let n = e?.language || navigator.language;
591
- return e && "isInitialized" in e && e.isInitialized, G(n, t);
629
+ return e && "isInitialized" in e && e.isInitialized, q(n, t);
592
630
  });
593
631
  return o(() => {
594
- e && "isInitialized" in e && e.isInitialized && e.language && r(G(e.language, t));
632
+ e && "isInitialized" in e && e.isInitialized && e.language && r(q(e.language, t));
595
633
  let n = (e) => {
596
- r(G(e, t));
634
+ r(q(e, t));
597
635
  };
598
636
  return e?.on?.("languageChanged", n), () => {
599
637
  e?.off?.("languageChanged", n);
600
638
  };
601
639
  }, [e, t]), n;
602
- }, Ce = "tracktor.filter", we = {
640
+ }, Ee = "tracktor.filter", De = {
603
641
  getFilter: () => void 0,
604
642
  getFilters: () => ({}),
605
643
  handleFilter: () => () => {},
606
644
  setFilter: () => {}
607
- }, K = (e) => {
645
+ }, J = (e) => {
608
646
  try {
609
647
  return JSON.parse(e);
610
648
  } catch {
611
649
  return e;
612
650
  }
613
- }, q = (e, t, n) => `${n}_${e}=>${t}`, Te = (e) => e.reduce((e, t) => {
651
+ }, Y = (e, t, n) => `${n}_${e}=>${t}`, Oe = (e) => e.reduce((e, t) => {
614
652
  let n = localStorage.getItem(t);
615
653
  if (n) try {
616
654
  let t = JSON.parse(n), r = Object.keys(t)?.[0];
617
655
  r && (e[r] = Object.values(t)?.[0]);
618
656
  } catch {}
619
657
  return e;
620
- }, {}), Ee = (e) => {
621
- let { libraries: t, localStorageKeys: n } = a(v), r = e?.reactRouter || t?.reactRouter, { pathname: i } = r?.useLocation?.() ?? { pathname: "/" }, [o, s] = r?.useSearchParams?.() ?? [new URLSearchParams(), () => {}], [c, u] = l({}), d = n?.filter || Ce, f = e?.syncWithUrl === void 0 ? !0 : e?.syncWithUrl, p = e?.persistToLocalStorage === void 0 ? !0 : e?.persistToLocalStorage;
622
- if (A) return we;
658
+ }, {}), ke = (e) => {
659
+ let { libraries: t, localStorageKeys: n } = a(v), r = e?.reactRouter || t?.reactRouter, { pathname: i } = r?.useLocation?.() ?? { pathname: "/" }, [o, s] = r?.useSearchParams?.() ?? [new URLSearchParams(), () => {}], [c, u] = l({}), d = n?.filter || Ee, f = e?.syncWithUrl === void 0 ? !0 : e?.syncWithUrl, p = e?.persistToLocalStorage === void 0 ? !0 : e?.persistToLocalStorage;
660
+ if (P) return De;
623
661
  if (!r) throw Error("React Router is not provided. You can provide it with InjectDependenciesProvider or directly in props of reactRouter.");
624
662
  let m = () => Object.keys(localStorage).filter((t) => t.startsWith(d) && t.endsWith(e?.pathname || i)), h = (t, n, r = !0) => {
625
- let a = q(t, e?.pathname || i, d);
663
+ let a = Y(t, e?.pathname || i, d);
626
664
  if (!n || Array.isArray(n) && !n.length) {
627
665
  f ? (o.delete(t), s(o)) : u((e) => {
628
666
  let n = { ...e };
@@ -642,13 +680,13 @@ var d = 3e4, f = 1e3, p = 1e4, m = (e) => Array.isArray(e) ? e.map(m) : typeof e
642
680
  getFilter: (t, n) => {
643
681
  if (f) {
644
682
  let e = o.get(t);
645
- if (e) return K(e);
683
+ if (e) return J(e);
646
684
  } else {
647
685
  let e = c[t];
648
686
  if (e !== void 0) return e;
649
687
  }
650
688
  if (p) {
651
- let n = q(t, e?.pathname || i, d), r = localStorage.getItem(n);
689
+ let n = Y(t, e?.pathname || i, d), r = localStorage.getItem(n);
652
690
  if (r) try {
653
691
  let e = JSON.parse(r)[t];
654
692
  return !f && e !== void 0 && u((n) => ({
@@ -660,9 +698,9 @@ var d = 3e4, f = 1e3, p = 1e4, m = (e) => Array.isArray(e) ? e.map(m) : typeof e
660
698
  return n;
661
699
  },
662
700
  getFilters: () => {
663
- let e = p ? Te(m()) : {};
701
+ let e = p ? Oe(m()) : {};
664
702
  if (f) {
665
- let t = Array.from(o.entries()).reduce((e, [t, n]) => (e[t] = K(n), e), {});
703
+ let t = Array.from(o.entries()).reduce((e, [t, n]) => (e[t] = J(n), e), {});
666
704
  return {
667
705
  ...e,
668
706
  ...t
@@ -683,7 +721,7 @@ var d = 3e4, f = 1e3, p = 1e4, m = (e) => Array.isArray(e) ? e.map(m) : typeof e
683
721
  },
684
722
  setFilter: h
685
723
  };
686
- }, J = () => document.getElementById(I), De = () => {
724
+ }, X = () => document.getElementById(R), Ae = () => {
687
725
  let [e, t] = l(() => !!window.HubSpotConversations);
688
726
  return o(() => {
689
727
  if (window.HubSpotConversations) {
@@ -693,16 +731,16 @@ var d = 3e4, f = 1e3, p = 1e4, m = (e) => Array.isArray(e) ? e.map(m) : typeof e
693
731
  window.hsConversationsOnReady = [() => t(!0)];
694
732
  }, []), o(() => {
695
733
  e && window.HubSpotConversations?.on("widgetClosed", () => {
696
- J()?.classList.remove(L);
734
+ X()?.classList.remove(z);
697
735
  });
698
736
  }, [e]), {
699
737
  isAvailable: e,
700
738
  toggle: i(() => {
701
- let e = window.HubSpotConversations, t = J();
702
- e && t && (t.classList.contains("hs-show") ? (e.widget.close(), t.classList.remove(L)) : (t.classList.add(L), e.widget.open()));
739
+ let e = window.HubSpotConversations, t = X();
740
+ e && t && (t.classList.contains("hs-show") ? (e.widget.close(), t.classList.remove(z)) : (t.classList.add(z), e.widget.open()));
703
741
  }, [])
704
742
  };
705
- }, Oe = ({ data: e, fetchNextPage: t, isFetchingNextPage: n, isInitialLoading: r, isLoading: a, enabled: o = !0 }) => {
743
+ }, je = ({ data: e, fetchNextPage: t, isFetchingNextPage: n, isInitialLoading: r, isLoading: a, enabled: o = !0 }) => {
706
744
  let c = i(async (e) => {
707
745
  n || !o || await t({ pageParam: e?.pageParam || e.visibleRowsCount });
708
746
  }, [
@@ -718,7 +756,7 @@ var d = 3e4, f = 1e3, p = 1e4, m = (e) => Array.isArray(e) ? e.map(m) : typeof e
718
756
  loadingVariant: r ? "skeleton" : "linear-progress",
719
757
  rows: l
720
758
  };
721
- }, ke = (e) => {
759
+ }, Me = (e) => {
722
760
  let { libraries: t } = a(v), n = e?.i18 || t?.i18, r = e?.i18?.translateFunction || t?.i18?.translateFunction, o = n?.i18next?.t || r || ((e) => e), { unknownErrorTranslationKey: s = "error.unknownError" } = e || {}, c = o(s), l = i((e) => {
723
761
  if (e && typeof e == "object" && "response" in e) {
724
762
  let { response: t } = e || {};
@@ -742,38 +780,38 @@ var d = 3e4, f = 1e3, p = 1e4, m = (e) => Array.isArray(e) ? e.map(m) : typeof e
742
780
  }, []),
743
781
  printError: l
744
782
  };
745
- }, Y = "chunk-reload-timestamp", X = "chunk-reload", Ae = 1e4, Z = 2, Q = !1;
746
- if (!A && typeof window < "u") {
783
+ }, Z = "chunk-reload-timestamp", Q = "chunk-reload", Ne = 1e4, $ = 2, Pe = !1;
784
+ if (!P && typeof window < "u") {
747
785
  try {
748
786
  let e = new URL(window.location.href);
749
- e.searchParams.has(X) && (Q = !0, e.searchParams.delete(X), window.history.replaceState(null, "", e.toString()));
787
+ e.searchParams.has(Q) && (Pe = !0, e.searchParams.delete(Q), window.history.replaceState(null, "", e.toString()));
750
788
  } catch {}
751
789
  window.addEventListener("vite:preloadError", (e) => {
752
790
  e.preventDefault();
753
791
  });
754
792
  }
755
- var je = (e) => {
793
+ var Fe = (e) => {
756
794
  if (!(e instanceof Error)) return !1;
757
795
  let t = e.message.toLowerCase();
758
796
  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";
759
- }, Me = /import\s*\(\s*(['"])((\w+:(\/?\/?))?[^\s,]+)\1/, Ne = (e) => e.toString().match(Me)?.[2] ?? null, Pe = (e) => {
797
+ }, Ie = /import\s*\(\s*(['"])((\w+:(\/?\/?))?[^\s,]+)\1/, Le = (e) => e.toString().match(Ie)?.[2] ?? null, Re = (e) => {
760
798
  try {
761
799
  return sessionStorage.getItem(e);
762
800
  } catch {
763
801
  return null;
764
802
  }
765
- }, Fe = (e, t) => {
803
+ }, ze = (e, t) => {
766
804
  try {
767
805
  sessionStorage.setItem(e, t);
768
806
  } catch {}
769
- }, Ie = (e) => Function("url", "return import(url)")(e), Le = async (e) => {
770
- for (let t = 0; t < Z; t++) try {
771
- return await Ie(`${e}?t=${Date.now()}`);
807
+ }, Be = (e) => Function("url", "return import(url)")(e), Ve = async (e) => {
808
+ for (let t = 0; t < $; t++) try {
809
+ return await Be(`${e}?t=${Date.now()}`);
772
810
  } catch {
773
- t < Z - 1 && await new Promise((e) => setTimeout(e, 500 * 2 ** t));
811
+ t < $ - 1 && await new Promise((e) => setTimeout(e, 500 * 2 ** t));
774
812
  }
775
- throw Error(`Failed to import ${e} after ${Z} retries`);
776
- }, Re = async () => {
813
+ throw Error(`Failed to import ${e} after ${$} retries`);
814
+ }, He = async () => {
777
815
  try {
778
816
  if (typeof navigator < "u" && "serviceWorker" in navigator) {
779
817
  let e = await navigator.serviceWorker.getRegistrations();
@@ -784,27 +822,27 @@ var je = (e) => {
784
822
  await Promise.all(e.map((e) => caches.delete(e)));
785
823
  }
786
824
  } catch {}
787
- }, ze = async () => {
788
- await Re();
825
+ }, Ue = async () => {
826
+ await He();
789
827
  let e = new URL(window.location.href);
790
- e.searchParams.set(X, String(Date.now())), window.location.replace(e.toString());
791
- }, $ = (e) => e != null && e.default !== void 0, Be = (e) => r(async () => {
828
+ e.searchParams.set(Q, String(Date.now())), window.location.replace(e.toString());
829
+ }, We = (e) => e != null && e.default !== void 0, Ge = (e) => r(async () => {
792
830
  let t;
793
831
  try {
794
832
  let n = await e();
795
- if ($(n)) return n;
833
+ if (We(n)) return n;
796
834
  t = /* @__PURE__ */ Error("Module resolved without a valid default export");
797
835
  } catch (e) {
798
836
  t = e;
799
837
  }
800
- if (A || !je(t)) throw t;
801
- let n = Ne(e);
838
+ if (P || !Fe(t)) throw t;
839
+ let n = Le(e);
802
840
  if (n) try {
803
- let e = await Le(n);
804
- if ($(e)) return e;
841
+ let e = await Ve(n);
842
+ if (We(e)) return e;
805
843
  } catch {}
806
- let r = Number(Pe(Y) || "0");
807
- return Date.now() - r < Ae || Q || (Fe(Y, String(Date.now())), await ze()), { default: () => null };
844
+ let r = Number(Re(Z) || "0");
845
+ return Date.now() - r < Ne || Pe || (ze(Z, String(Date.now())), await Ue()), { default: () => null };
808
846
  });
809
847
  //#endregion
810
- export { D as AutoReloadOnNewVersion, g as ChatClient, V as ChatContext, ue as ChatProvider, O as GTMSendPageView, k as InitializeAmplitude, M as InitializeAxiosConfig, F as InitializeDaysJSConfig, ee as InitializeHubSpot, te as InitializeI18nConfig, ne as InitializeSentryConfig, v as InjectDependenciesContext, y as InjectDependenciesProvider, _ as MaskTextField, pe as QueryProvider, ie as RequireAuth, N as SUPPORTED_LANGUAGE, ae as ShowHubSpotBubble, H as dateAdapter, U as distanceAdapter, e as getOrvalConfig, Be as lazyWithRetry, ge as useAdapter, _e as useAmplitude, ve as useAuth, xe as useChat, Se as useCurrentLanguage, Ee as useFilters, De as useHubSpot, Oe as useInfiniteDataGrid, ke as useResponseError, W as worksiteNameAdapter };
848
+ export { O as AMPLITUDE_FEATURE_SELECTOR, E as AutoReloadOnNewVersion, g as ChatClient, U as ChatContext, pe as ChatProvider, D as GTMSendPageView, N as InitializeAmplitude, I as InitializeAxiosConfig, ne as InitializeDaysJSConfig, re as InitializeHubSpot, ie as InitializeI18nConfig, ae as InitializeSentryConfig, v as InjectDependenciesContext, y as InjectDependenciesProvider, _ as MaskTextField, ge as QueryProvider, se as RequireAuth, L as SUPPORTED_LANGUAGE, ce as ShowHubSpotBubble, W as dateAdapter, G as distanceAdapter, e as getOrvalConfig, Ge as lazyWithRetry, ye as useAdapter, be as useAmplitude, xe as useAuth, we as useChat, Te as useCurrentLanguage, ke as useFilters, Ae as useHubSpot, je as useInfiniteDataGrid, Me as useResponseError, K as worksiteNameAdapter };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getsoren/shared-module",
3
- "version": "2.46.1",
3
+ "version": "2.47.0",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "types": "./dist/main.d.ts",