@getsoren/shared-module 2.64.0 → 2.65.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/main.js CHANGED
@@ -129,17 +129,17 @@ var f = 3e4, p = 1e3, m = 1e4, h = (e) => Array.isArray(e) ? e.map(h) : typeof e
129
129
  value: i,
130
130
  children: e
131
131
  });
132
- }, x = 900 * 1e3, S = 60 * 1e3, C = 600 * 1e3, w = "auto-reload-on-new-version-timestamp", T = /<meta[^>]*name="version"[^>]*content="([^"]*)"/, E = (e) => {
132
+ }, x = 900 * 1e3, S = 60 * 1e3, C = 600 * 1e3, w = "auto-reload-on-new-version-timestamp", ee = /<meta[^>]*name="version"[^>]*content="([^"]*)"/, T = (e) => {
133
133
  try {
134
134
  return sessionStorage.getItem(e);
135
135
  } catch {
136
136
  return null;
137
137
  }
138
- }, D = (e, t) => {
138
+ }, E = (e, t) => {
139
139
  try {
140
140
  sessionStorage.setItem(e, t);
141
141
  } catch {}
142
- }, O = ({ version: e, checkInterval: t = x, children: n, ...r }) => {
142
+ }, D = ({ version: e, checkInterval: t = x, children: n, ...r }) => {
143
143
  let { libraries: i } = a(y), s = r?.reactRouter || i?.reactRouter, c = l(!1), u = l(0);
144
144
  if (!s) throw Error("React Router is not provided. You can provide it with InjectDependenciesProvider or directly in props of AutoReloadOnNewVersion.");
145
145
  let { useLocation: f, Outlet: p } = s, { pathname: m } = f(), h = l(m);
@@ -151,7 +151,7 @@ var f = 3e4, p = 1e3, m = 1e4, h = (e) => Array.isArray(e) ? e.map(h) : typeof e
151
151
  try {
152
152
  let t = await fetch("/index.html", { cache: "no-store" });
153
153
  if (!t.ok) return;
154
- let n = (await t.text()).match(T)?.[1];
154
+ let n = (await t.text()).match(ee)?.[1];
155
155
  n && n !== "%VERSION%" && n !== e && (c.current = !0);
156
156
  } catch {}
157
157
  }
@@ -164,10 +164,10 @@ var f = 3e4, p = 1e3, m = 1e4, h = (e) => Array.isArray(e) ? e.map(h) : typeof e
164
164
  }, [e, t]), o(() => {
165
165
  if (m === h.current || (h.current = m, !c.current)) return;
166
166
  c.current = !1;
167
- let e = Number(E(w) || "0");
168
- Date.now() - e < C || (D(w, String(Date.now())), window.location.reload());
167
+ let e = Number(T(w) || "0");
168
+ Date.now() - e < C || (E(w, String(Date.now())), window.location.reload());
169
169
  }, [m]), n ?? /* @__PURE__ */ d(p, {});
170
- }, k = ({ data: e, ...t }) => {
170
+ }, O = ({ data: e, ...t }) => {
171
171
  let { libraries: n } = a(y), r = t?.reactRouter || n?.reactRouter, i = t?.gtm || n?.gtm;
172
172
  if (!r) throw Error("React Router is not provided. You can provide it with InjectDependenciesProvider or directly in props of GTMSendPageView.");
173
173
  if (!i) throw Error("GTM is not provided. You can provide it with InjectDependenciesProvider or directly in props of GTMSendPageView.");
@@ -183,7 +183,7 @@ var f = 3e4, p = 1e3, m = 1e4, h = (e) => Array.isArray(e) ? e.map(h) : typeof e
183
183
  u,
184
184
  f
185
185
  ]), /* @__PURE__ */ d(l, {});
186
- }, A = "[data-amp-track-feature]", j = [
186
+ }, k = "[data-amp-track-feature]", A = [
187
187
  "a",
188
188
  "button",
189
189
  "input",
@@ -195,18 +195,18 @@ var f = 3e4, p = 1e3, m = 1e4, h = (e) => Array.isArray(e) ? e.map(h) : typeof e
195
195
  "[contenteditable=\"true\" i]",
196
196
  "[data-amp-default-track]",
197
197
  ".amp-default-track"
198
- ], ee = { defaultMaskLevel: "medium" }, te = (e, t) => {
198
+ ], te = { defaultMaskLevel: "medium" }, j = (e, t) => {
199
199
  if (e === !1) return !1;
200
200
  let n = e === !0 ? {} : e;
201
201
  return {
202
- cssSelectorAllowlist: [...t, A],
202
+ cssSelectorAllowlist: [...t, k],
203
203
  ...n
204
204
  };
205
205
  }, M = (e, t) => !t || e === !1 ? !1 : {
206
206
  deadClicks: !0,
207
207
  rageClicks: !0,
208
208
  ...e === !0 ? {} : e
209
- }, N = ({ apiKey: e, appVersion: t, sessionReplaySampleRate: n, serverZone: r, elementInteractions: i = !0, frustrationInteractions: c = !0, platform: d = "desktop", sessionReplayPrivacy: f = ee, userId: p, ...m }) => {
209
+ }, N = ({ apiKey: e, appVersion: t, sessionReplaySampleRate: n, serverZone: r, elementInteractions: i = !0, frustrationInteractions: c = !0, platform: d = "desktop", sessionReplayPrivacy: f = te, userId: p, ...m }) => {
210
210
  let [h, g] = u(!!p), { libraries: _ } = a(y), v = m.amplitude || _?.amplitude, b = l({
211
211
  elementInteractions: i,
212
212
  frustrationInteractions: c,
@@ -221,7 +221,7 @@ var f = 3e4, p = 1e3, m = 1e4, h = (e) => Array.isArray(e) ? e.map(h) : typeof e
221
221
  }), o(() => {
222
222
  let i = v?.analytics, a = v?.sessionReplayPlugin;
223
223
  if (!(e && i && h)) return;
224
- let { elementInteractions: o, frustrationInteractions: s, sessionReplayPrivacy: c } = b.current, l = x.current, u = !l, f = "platform-enrichment", p = te(o, i.Types?.DEFAULT_CSS_SELECTOR_ALLOWLIST ?? j);
224
+ let { elementInteractions: o, frustrationInteractions: s, sessionReplayPrivacy: c } = b.current, l = x.current, u = !l, f = "platform-enrichment", p = j(o, i.Types?.DEFAULT_CSS_SELECTOR_ALLOWLIST ?? A);
225
225
  return i.init(e, l, {
226
226
  appVersion: t,
227
227
  autocapture: {
@@ -285,7 +285,7 @@ var f = 3e4, p = 1e3, m = 1e4, h = (e) => Array.isArray(e) ? e.map(h) : typeof e
285
285
  o && (l.defaults.headers.common.Authorization = o);
286
286
  }
287
287
  return l.defaults.baseURL = i, l.defaults.headers.post["Content-Type"] = n, null;
288
- }, F = [
288
+ }, ie = [
289
289
  "ar",
290
290
  "de",
291
291
  "en",
@@ -293,15 +293,15 @@ var f = 3e4, p = 1e3, m = 1e4, h = (e) => Array.isArray(e) ? e.map(h) : typeof e
293
293
  "fr",
294
294
  "it",
295
295
  "pt"
296
- ], ie = (e) => F.includes(e), ae = ({ language: e, ...t }) => {
296
+ ], ae = (e) => ie.includes(e), oe = ({ language: e, ...t }) => {
297
297
  let { libraries: n } = a(y), r = t?.dayjs || n?.dayjs, i = t?.plugin || n?.dayjsPlugin;
298
298
  if (!r) throw Error("Dayjs is not provided. You can provide it with InjectDependenciesProvider or directly in props of InitializeDaysJSConfig.");
299
299
  r.extend(t.localizedFormat), i && i.forEach((e) => {
300
300
  e && r.extend(e);
301
301
  });
302
- let o = e || navigator.language?.slice(0, 2) || "en", s = ie(o) ? o : "en";
302
+ let o = e || navigator.language?.slice(0, 2) || "en", s = ae(o) ? o : "en";
303
303
  return r.locale() !== s && r.locale(s), null;
304
- }, I = "hubspot-messages-iframe-container", L = "hs-show", R = "data-hs-hidden", oe = ({ hubId: e }) => (o(() => {
304
+ }, F = "hubspot-messages-iframe-container", I = "hs-show", L = "data-hs-hidden", se = ({ hubId: e }) => (o(() => {
305
305
  if (!e) return;
306
306
  let t = document.createElement("script");
307
307
  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), () => {
@@ -310,12 +310,12 @@ var f = 3e4, p = 1e3, m = 1e4, h = (e) => Array.isArray(e) ? e.map(h) : typeof e
310
310
  }, [e]), o(() => {
311
311
  let e = document.createElement("style");
312
312
  return e.textContent = `
313
- html[${R}] div#${I} { display: none !important; }
314
- html[${R}] div#${I}.${L} { display: initial !important; }
315
- `, document.head.appendChild(e), document.documentElement.setAttribute(R, ""), () => {
316
- e.remove(), document.documentElement.removeAttribute(R);
313
+ html[${L}] div#${F} { display: none !important; }
314
+ html[${L}] div#${F}.${I} { display: initial !important; }
315
+ `, document.head.appendChild(e), document.documentElement.setAttribute(L, ""), () => {
316
+ e.remove(), document.documentElement.removeAttribute(L);
317
317
  };
318
- }, []), null), se = ({ debug: e, resources: t, ...n }) => {
318
+ }, []), null), ce = ({ debug: e, resources: t, ...n }) => {
319
319
  let { libraries: r } = a(y), i = n?.i18 || r?.i18, { i18next: o, initReactI18next: s, languageDetector: c } = i || {};
320
320
  if (P) return null;
321
321
  if (!(i && o && c && s)) throw Error("i18 is not provided. You can provide it with InjectDependenciesProvider or directly in props.");
@@ -335,12 +335,12 @@ var f = 3e4, p = 1e3, m = 1e4, h = (e) => Array.isArray(e) ? e.map(h) : typeof e
335
335
  }), o.on("languageChanged", (e) => {
336
336
  document.documentElement.setAttribute("lang", e);
337
337
  }), null);
338
- }, 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)), ce = ({ dsn: e, integrations: t, tracesSampleRate: n, tracePropagationTargets: r, ignoreErrors: i, ignoreRequestUrls: s, debug: c, environment: l, release: u, replaysSessionSampleRate: d = 0, replaysOnErrorSampleRate: f = 1, replayBeforeErrorSampling: p = B, ...m }) => {
338
+ }, R = { replay: "keep" }, z = (e) => e.tags?.replay === R.replay, B = [/^https:\/\/(api|events)\.mapbox\.com\//], V = (e, t) => t.some((t) => typeof t == "string" ? e.includes(t) : t.test(e)), le = ({ dsn: e, integrations: t, tracesSampleRate: n, tracePropagationTargets: r, ignoreErrors: i, ignoreRequestUrls: s, debug: c, environment: l, release: u, replaysSessionSampleRate: d = 0, replaysOnErrorSampleRate: f = 1, replayBeforeErrorSampling: p = z, ...m }) => {
339
339
  let { libraries: h } = a(y), g = m?.sentry || h?.sentry, _ = m?.reactRouter || h?.reactRouter;
340
340
  if (!g) throw Error("Sentry is not provided. You can provide it with InjectDependenciesProvider or directly in props.");
341
341
  if (!_) throw Error("React Router is not provided. You can provide it with InjectDependenciesProvider or directly in props.");
342
342
  if (g.isInitialized()) return null;
343
- let { createRoutesFromChildren: v, matchRoutes: b, useLocation: x, useNavigationType: S } = _, C = d > 0 || f > 0, w = [...s || [], ...V];
343
+ let { createRoutesFromChildren: v, matchRoutes: b, useLocation: x, useNavigationType: S } = _, C = d > 0 || f > 0, w = [...s || [], ...B];
344
344
  return (c || process.env.NODE_ENV === "prod" || process.env.NODE_ENV === "production") && g.init({
345
345
  debug: c,
346
346
  dsn: e,
@@ -358,7 +358,7 @@ var f = 3e4, p = 1e3, m = 1e4, h = (e) => Array.isArray(e) ? e.map(h) : typeof e
358
358
  g.reactRouterV6BrowserTracingIntegration({
359
359
  createRoutesFromChildren: v,
360
360
  matchRoutes: b,
361
- shouldCreateSpanForRequest: (e) => !H(e, w),
361
+ shouldCreateSpanForRequest: (e) => !V(e, w),
362
362
  useEffect: o,
363
363
  useLocation: x,
364
364
  useNavigationType: S
@@ -372,12 +372,12 @@ var f = 3e4, p = 1e3, m = 1e4, h = (e) => Array.isArray(e) ? e.map(h) : typeof e
372
372
  tracePropagationTargets: r,
373
373
  tracesSampleRate: n ?? 1
374
374
  }), null;
375
- }, U = /* @__PURE__ */ new WeakMap(), le = "user", ue = ({ Fallback: e, isLogged: n, loginPath: r = "/login", redirect401Path: i = "/login", ...s }) => {
376
- let { libraries: c, localStorageKeys: l } = a(y), f = s?.reactRouter || c?.reactRouter, p = s?.axios || c?.axios, m = s?.localStorageKey || l?.user || le;
375
+ }, H = /* @__PURE__ */ new WeakMap(), ue = "user", de = ({ Fallback: e, isLogged: n, loginPath: r = "/login", redirect401Path: i = "/login", ...s }) => {
376
+ let { libraries: c, localStorageKeys: l } = a(y), f = s?.reactRouter || c?.reactRouter, p = s?.axios || c?.axios, m = s?.localStorageKey || l?.user || ue;
377
377
  if (!f) throw Error("React Router is not provided. You can provide it with InjectDependenciesProvider or directly in props.");
378
378
  let [h, g] = u(null), { useLocation: _, Navigate: v, Outlet: b } = f, x = _(), S = typeof n == "function" ? n() : !!n, C = typeof S == "boolean" ? S : S?.isLogged;
379
379
  return o(() => {
380
- p && (U.has(p) || (U.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)))));
380
+ p && (H.has(p) || (H.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)))));
381
381
  }, [
382
382
  p,
383
383
  m,
@@ -393,34 +393,34 @@ var f = 3e4, p = 1e3, m = 1e4, h = (e) => Array.isArray(e) ? e.map(h) : typeof e
393
393
  state: { from: x },
394
394
  replace: !0
395
395
  });
396
- }, W = /* @__PURE__ */ new Set(), de = () => (o(() => {
396
+ }, U = /* @__PURE__ */ new Set(), fe = () => (o(() => {
397
397
  let e = Symbol();
398
- return W.add(e), document.documentElement.removeAttribute(R), () => {
399
- W.delete(e), W.size === 0 && document.documentElement.setAttribute(R, "");
398
+ return U.add(e), document.documentElement.removeAttribute(L), () => {
399
+ U.delete(e), U.size === 0 && document.documentElement.setAttribute(L, "");
400
400
  };
401
- }, []), null), fe = "user", pe = {
401
+ }, []), null), pe = "user", me = {
402
402
  client: "/v2/threads/ws",
403
403
  supplier: "/v1/threads/ws"
404
- }, me = (e, t) => `${e.startsWith("https") ? "wss" : "ws"}://${e.replace(/^https?:\/\//, "")}${t}`, he = (e) => {
404
+ }, he = (e, t) => `${e.startsWith("https") ? "wss" : "ws"}://${e.replace(/^https?:\/\//, "")}${t}`, ge = (e) => {
405
405
  try {
406
406
  let t = localStorage.getItem(e);
407
407
  return t ? JSON.parse(t)?.accessToken ?? null : null;
408
408
  } catch {
409
409
  return null;
410
410
  }
411
- }, G = n(null), ge = ({ children: e, token: t, url: n, wsPath: r, maxReconnectAttempts: s, reconnectBaseDelay: c, maxMessageBodyLength: f = 1e4, reconnect: p = !0, enabled: m = !0, context: h = "client" }) => {
412
- let [g, v] = u(!1), [b, x] = u(!1), [S, C] = u(0), [w, T] = u(m), E = m && w, { apiURL: D, localStorageKeys: O } = a(y), k = O?.user || fe, A = l(null), j = l(/* @__PURE__ */ new Set());
411
+ }, W = n(null), _e = ({ children: e, token: t, url: n, wsPath: r, maxReconnectAttempts: s, reconnectBaseDelay: c, maxMessageBodyLength: f = 1e4, reconnect: p = !0, enabled: m = !0, context: h = "client" }) => {
412
+ let [g, v] = u(!1), [b, x] = u(!1), [S, C] = u(0), [w, ee] = u(m), T = m && w, { apiURL: E, localStorageKeys: D } = a(y), O = D?.user || pe, k = l(null), A = l(/* @__PURE__ */ new Set());
413
413
  o(() => {
414
- if (!E) return;
415
- let e = r ?? pe[h], i = n || (D ? me(D, e) : null);
414
+ if (!T) return;
415
+ let e = r ?? me[h], i = n || (E ? he(E, e) : null);
416
416
  if (!i) return;
417
- let a = () => t ?? he(k), o = (e) => {
417
+ let a = () => t ?? ge(O), o = (e) => {
418
418
  switch (e.type) {
419
419
  case "ready":
420
420
  x(!0), C(e.unreadCount ?? 0);
421
421
  break;
422
422
  }
423
- for (let t of j.current) t(e);
423
+ for (let t of A.current) t(e);
424
424
  }, l = setTimeout(() => {
425
425
  let e = new _({
426
426
  getToken: a,
@@ -434,34 +434,34 @@ var f = 3e4, p = 1e3, m = 1e4, h = (e) => Array.isArray(e) ? e.map(h) : typeof e
434
434
  reconnectBaseDelay: c,
435
435
  url: i
436
436
  });
437
- A.current = e, e.connect();
437
+ k.current = e, e.connect();
438
438
  }, 0);
439
439
  return () => {
440
- clearTimeout(l), A.current?.disconnect(), A.current = null;
440
+ clearTimeout(l), k.current?.disconnect(), k.current = null;
441
441
  };
442
442
  }, [
443
- E,
443
+ T,
444
444
  n,
445
445
  r,
446
446
  h,
447
447
  t,
448
448
  p,
449
- D,
450
- k,
449
+ E,
450
+ O,
451
451
  f,
452
452
  s,
453
453
  c
454
454
  ]);
455
- let ee = i((e) => {
456
- A.current?.joinThread(e);
457
- }, []), te = i((e) => {
458
- A.current?.leaveThread(e);
455
+ let te = i((e) => {
456
+ k.current?.joinThread(e);
457
+ }, []), j = i((e) => {
458
+ k.current?.leaveThread(e);
459
459
  }, []), M = i((e, t) => {
460
- A.current?.sendMessage(e, t);
460
+ k.current?.sendMessage(e, t);
461
461
  }, []), N = i((e) => {
462
- A.current?.markRead(e);
462
+ k.current?.markRead(e);
463
463
  }, []), P = i((e, t) => {
464
- A.current?.listThreads(e, t);
464
+ k.current?.listThreads(e, t);
465
465
  }, []), ne = i((e = 1) => {
466
466
  C((t) => t + e);
467
467
  }, []), re = {
@@ -469,45 +469,45 @@ var f = 3e4, p = 1e3, m = 1e4, h = (e) => Array.isArray(e) ? e.map(h) : typeof e
469
469
  C((t) => Math.max(0, t - e));
470
470
  }, []),
471
471
  disconnect: i(() => {
472
- A.current?.disconnect(), A.current = null;
472
+ k.current?.disconnect(), k.current = null;
473
473
  }, []),
474
474
  incrementUnreadCount: ne,
475
475
  isConnected: g,
476
476
  isReady: b,
477
- joinThread: ee,
478
- leaveThread: te,
477
+ joinThread: te,
478
+ leaveThread: j,
479
479
  listThreads: P,
480
480
  markRead: N,
481
481
  sendMessage: M,
482
482
  setEnabled: i((e) => {
483
- T(e);
483
+ ee(e);
484
484
  }, []),
485
- subscribe: i((e) => (j.current.add(e), () => {
486
- j.current.delete(e);
485
+ subscribe: i((e) => (A.current.add(e), () => {
486
+ A.current.delete(e);
487
487
  }), []),
488
488
  unreadCount: S
489
489
  };
490
- return /* @__PURE__ */ d(G.Provider, {
490
+ return /* @__PURE__ */ d(W.Provider, {
491
491
  value: re,
492
492
  children: e
493
493
  });
494
- }, _e = 3, ve = new Set([
494
+ }, ve = 3, ye = new Set([
495
495
  400,
496
496
  401,
497
497
  403,
498
498
  404
499
- ]), ye = (e) => e?.response?.status, K = (e, t) => {
500
- let n = ye(t);
501
- return e < _e && !(n !== void 0 && ve.has(n));
502
- }, be = (e, t, n) => (Array.isArray(e) ? e.length : 0) + (typeof n == "number" ? n : 0), xe = ({ children: e, defaultQueriesOptions: t, defaultMutationsOptions: n, ...r }) => {
499
+ ]), be = (e) => e?.response?.status, G = (e, t) => {
500
+ let n = be(t);
501
+ return e < ve && !(n !== void 0 && ye.has(n));
502
+ }, xe = (e, t, n) => (Array.isArray(e) ? e.length : 0) + (typeof n == "number" ? n : 0), Se = ({ children: e, defaultQueriesOptions: t, defaultMutationsOptions: n, ...r }) => {
503
503
  let { libraries: i } = a(y), o = r.QueryClient || i?.reactQuery?.QueryClient, s = r.QueryClientProvider || i?.reactQuery?.QueryClientProvider;
504
504
  if (!o) throw Error("QueryClient is not provided. You can provide it with InjectDependenciesProvider or directly in props.");
505
505
  if (!s) throw Error("QueryClientProvider is not provided. You can provide it with InjectDependenciesProvider or directly in props.");
506
506
  let [c] = u(() => new o({ defaultOptions: {
507
507
  mutations: n,
508
508
  queries: {
509
- getNextPageParam: be,
510
- retry: K,
509
+ getNextPageParam: xe,
510
+ retry: G,
511
511
  ...t
512
512
  }
513
513
  } }));
@@ -515,17 +515,17 @@ var f = 3e4, p = 1e3, m = 1e4, h = (e) => Array.isArray(e) ? e.map(h) : typeof e
515
515
  client: c,
516
516
  children: e
517
517
  });
518
- }, q = ({ library: e, date: t, format: n = "ll" }) => e(t).format(n), J = (e, t) => {
518
+ }, K = ({ library: e, date: t, format: n = "ll" }) => e(t).format(n), q = (e, t) => {
519
519
  let { fractionDigits: n = 0, metric: r = "km", spacingBetween: i = !0 } = t || {}, a = Number(e), o = i ? " " : "";
520
520
  return Number.isNaN(a) ? `0${o}${r}` : `${a.toFixed(n)}${o}${r}`;
521
- }, Y = (e) => !e || typeof e != "string" ? "" : e.replace(/_/g, " ").toLowerCase().split(" ").map((e) => e.length > 0 ? e.charAt(0).toUpperCase() + e.slice(1) : e).join(" "), Se = (e) => e?.startsWith("/") ? e?.startsWith("/files") ? e : `/files${e}` : e?.startsWith("files") ? `/${e}` : `/files/${e}`, Ce = ({ path: e, size: t, apiURL: n }) => {
521
+ }, J = (e) => !e || typeof e != "string" ? "" : e.replace(/_/g, " ").toLowerCase().split(" ").map((e) => e.length > 0 ? e.charAt(0).toUpperCase() + e.slice(1) : e).join(" "), Ce = (e) => e?.startsWith("/") ? e?.startsWith("/files") ? e : `/files${e}` : e?.startsWith("files") ? `/${e}` : `/files/${e}`, we = ({ path: e, size: t, apiURL: n }) => {
522
522
  if (!e) return "";
523
- let r = `${n}${Se(e)}`, i = r.match(/\.(jpeg|jpg|png|gif|bmp|webp|svg|avif)$/) !== null;
523
+ let r = `${n}${Ce(e)}`, i = r.match(/\.(jpeg|jpg|png|gif|bmp|webp|svg|avif)$/) !== null;
524
524
  return typeof t == "number" && i ? `${r.replace("/files", `/thumbs/${t}`)}` : r;
525
- }, we = (e) => {
525
+ }, Te = (e) => {
526
526
  let { apiURL: t, libraries: n } = a(y), r = e?.dayjs || n?.dayjs, o = i((e, n) => {
527
527
  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 : Ce({
528
+ return typeof e == "string" && /^https?:\/\//.test(e) ? e : we({
529
529
  apiURL: t,
530
530
  path: e,
531
531
  size: n
@@ -534,17 +534,17 @@ var f = 3e4, p = 1e3, m = 1e4, h = (e) => Array.isArray(e) ? e.map(h) : typeof e
534
534
  return {
535
535
  dateAdapter: i((e, t) => {
536
536
  if (!r) throw Error("Dayjs is not provided. You can provide it with InjectDependenciesProvider or directly in props.");
537
- return q({
537
+ return K({
538
538
  date: e,
539
539
  format: t,
540
540
  library: r
541
541
  });
542
542
  }, [r]),
543
- distanceAdapter: J,
543
+ distanceAdapter: q,
544
544
  filePathAdapter: o,
545
- worksiteNameAdapter: Y
545
+ worksiteNameAdapter: J
546
546
  };
547
- }, Te = () => {
547
+ }, Ee = () => {
548
548
  let { libraries: e } = a(y), t = e?.amplitude?.analytics, n = i((e, n) => {
549
549
  if (!t || (t.setUserId(e), !n)) return;
550
550
  let r = new t.Identify();
@@ -568,7 +568,7 @@ var f = 3e4, p = 1e3, m = 1e4, h = (e) => Array.isArray(e) ? e.map(h) : typeof e
568
568
  setGroup: r,
569
569
  track: o
570
570
  };
571
- }, Ee = (e) => {
571
+ }, De = (e) => {
572
572
  let { libraries: t, localStorageKeys: n } = a(y), r = e?.axios || t?.axios, s = e?.localStorageKey || n?.user || "user";
573
573
  if (!r) throw Error("Axios is not provided. You can provide it with InjectDependenciesProvider or directly in params of useAuth.");
574
574
  let c = i(({ tokenType: e, accessToken: t }) => {
@@ -604,9 +604,9 @@ var f = 3e4, p = 1e3, m = 1e4, h = (e) => Array.isArray(e) ? e.map(h) : typeof e
604
604
  clearAuthenticationToken: l,
605
605
  setAuthenticationToken: c
606
606
  };
607
- }, De = "New message", Oe = (e, t) => {
607
+ }, Oe = "New message", ke = (e, t) => {
608
608
  if (!("Notification" in window) || typeof Notification != "function" || Notification.permission !== "granted" || !document.hidden) return;
609
- let n = new Notification(t.title ?? De, {
609
+ let n = new Notification(t.title ?? Oe, {
610
610
  badge: t?.badge,
611
611
  body: t?.body || e.bodyPreview,
612
612
  data: t?.data,
@@ -621,8 +621,8 @@ var f = 3e4, p = 1e3, m = 1e4, h = (e) => Array.isArray(e) ? e.map(h) : typeof e
621
621
  let { onClick: r } = t;
622
622
  n.onclick = () => r(e);
623
623
  }
624
- }, ke = (e) => {
625
- let t = a(G);
624
+ }, Ae = (e) => {
625
+ let t = a(W);
626
626
  if (!t) throw Error("useChat must be used within ChatProvider");
627
627
  let { subscribe: n, setEnabled: r, ...i } = t, s = l(e);
628
628
  return s.current = e, o(() => {
@@ -639,7 +639,7 @@ var f = 3e4, p = 1e3, m = 1e4, h = (e) => Array.isArray(e) ? e.map(h) : typeof e
639
639
  r?.(e);
640
640
  break;
641
641
  case "new_message_notification":
642
- i?.(e), t && t.enabled !== !1 && Oe(e, t);
642
+ i?.(e), t && t.enabled !== !1 && ke(e, t);
643
643
  break;
644
644
  case "presence":
645
645
  a?.(e);
@@ -664,44 +664,44 @@ var f = 3e4, p = 1e3, m = 1e4, h = (e) => Array.isArray(e) ? e.map(h) : typeof e
664
664
  break;
665
665
  }
666
666
  }), [n]), i;
667
- }, X = (e, t = "full") => {
667
+ }, Y = (e, t = "full") => {
668
668
  let n = e || navigator.language;
669
669
  return t === "short" ? n.split("-")[0] : n;
670
- }, Ae = (e, t = "full") => {
671
- let [n, r] = u(() => X(e?.language, t));
670
+ }, je = (e, t = "full") => {
671
+ let [n, r] = u(() => Y(e?.language, t));
672
672
  return o(() => {
673
- e && "isInitialized" in e && e.isInitialized && e.language && r(X(e.language, t));
673
+ e && "isInitialized" in e && e.isInitialized && e.language && r(Y(e.language, t));
674
674
  let n = (e) => {
675
- r(X(e, t));
675
+ r(Y(e, t));
676
676
  };
677
677
  return e?.on?.("languageChanged", n), () => {
678
678
  e?.off?.("languageChanged", n);
679
679
  };
680
680
  }, [e, t]), n;
681
- }, je = "tracktor.filter", Me = {
681
+ }, Me = "tracktor.filter", Ne = {
682
682
  getFilter: () => void 0,
683
683
  getFilters: () => ({}),
684
684
  handleFilter: () => () => {},
685
685
  setFilter: () => {}
686
- }, Ne = (e) => {
686
+ }, Pe = (e) => {
687
687
  try {
688
688
  return JSON.parse(e);
689
689
  } catch {
690
690
  return e;
691
691
  }
692
- }, Pe = (e, t, n) => `${n}_${e}=>${t}`, Fe = (e) => e.reduce((e, t) => {
692
+ }, Fe = (e, t, n) => `${n}_${e}=>${t}`, Ie = (e) => e.reduce((e, t) => {
693
693
  let n = localStorage.getItem(t);
694
694
  if (n) try {
695
695
  let t = JSON.parse(n), r = Object.keys(t)?.[0];
696
696
  r && (e[r] = Object.values(t)?.[0]);
697
697
  } catch {}
698
698
  return e;
699
- }, {}), Ie = (e) => {
700
- let { libraries: t, localStorageKeys: n } = a(y), r = e?.reactRouter || t?.reactRouter, { pathname: i } = r?.useLocation?.() ?? { pathname: "/" }, [o, s] = r?.useSearchParams?.() ?? [new URLSearchParams(), () => {}], [c, l] = u({}), d = n?.filter || je, f = e?.syncWithUrl === void 0 ? !0 : e?.syncWithUrl, p = e?.persistToLocalStorage === void 0 ? !0 : e?.persistToLocalStorage;
701
- if (P) return Me;
699
+ }, {}), Le = (e) => {
700
+ let { libraries: t, localStorageKeys: n } = a(y), r = e?.reactRouter || t?.reactRouter, { pathname: i } = r?.useLocation?.() ?? { pathname: "/" }, [o, s] = r?.useSearchParams?.() ?? [new URLSearchParams(), () => {}], [c, l] = u({}), d = n?.filter || Me, f = e?.syncWithUrl === void 0 ? !0 : e?.syncWithUrl, p = e?.persistToLocalStorage === void 0 ? !0 : e?.persistToLocalStorage;
701
+ if (P) return Ne;
702
702
  if (!r) throw Error("React Router is not provided. You can provide it with InjectDependenciesProvider or directly in props of reactRouter.");
703
703
  let m = () => Object.keys(localStorage).filter((t) => t.startsWith(d) && t.endsWith(e?.pathname || i)), h = (t, n, r = !0) => {
704
- let a = Pe(t, e?.pathname || i, d);
704
+ let a = Fe(t, e?.pathname || i, d);
705
705
  if (!n || Array.isArray(n) && !n.length) {
706
706
  f ? (o.delete(t), s(o)) : l((e) => {
707
707
  let n = { ...e };
@@ -721,13 +721,13 @@ var f = 3e4, p = 1e3, m = 1e4, h = (e) => Array.isArray(e) ? e.map(h) : typeof e
721
721
  getFilter: (t, n) => {
722
722
  if (f) {
723
723
  let e = o.get(t);
724
- if (e) return Ne(e);
724
+ if (e) return Pe(e);
725
725
  } else {
726
726
  let e = c[t];
727
727
  if (e !== void 0) return e;
728
728
  }
729
729
  if (p) {
730
- let n = Pe(t, e?.pathname || i, d), r = localStorage.getItem(n);
730
+ let n = Fe(t, e?.pathname || i, d), r = localStorage.getItem(n);
731
731
  if (r) try {
732
732
  let e = JSON.parse(r)[t];
733
733
  return !f && e !== void 0 && l((n) => ({
@@ -739,9 +739,9 @@ var f = 3e4, p = 1e3, m = 1e4, h = (e) => Array.isArray(e) ? e.map(h) : typeof e
739
739
  return n;
740
740
  },
741
741
  getFilters: () => {
742
- let e = p ? Fe(m()) : {};
742
+ let e = p ? Ie(m()) : {};
743
743
  if (f) {
744
- let t = Array.from(o.entries()).reduce((e, [t, n]) => (e[t] = Ne(n), e), {});
744
+ let t = Array.from(o.entries()).reduce((e, [t, n]) => (e[t] = Pe(n), e), {});
745
745
  return {
746
746
  ...e,
747
747
  ...t
@@ -762,7 +762,7 @@ var f = 3e4, p = 1e3, m = 1e4, h = (e) => Array.isArray(e) ? e.map(h) : typeof e
762
762
  },
763
763
  setFilter: h
764
764
  };
765
- }, Le = () => document.getElementById(I), Re = () => {
765
+ }, Re = () => document.getElementById(F), ze = () => {
766
766
  let [e, t] = u(() => !!window.HubSpotConversations);
767
767
  return o(() => {
768
768
  if (window.HubSpotConversations) {
@@ -772,16 +772,16 @@ var f = 3e4, p = 1e3, m = 1e4, h = (e) => Array.isArray(e) ? e.map(h) : typeof e
772
772
  window.hsConversationsOnReady = [() => t(!0)];
773
773
  }, []), o(() => {
774
774
  e && window.HubSpotConversations?.on("widgetClosed", () => {
775
- Le()?.classList.remove(L);
775
+ Re()?.classList.remove(I);
776
776
  });
777
777
  }, [e]), {
778
778
  isAvailable: e,
779
779
  toggle: i(() => {
780
- let e = window.HubSpotConversations, t = Le();
781
- e && t && (t.classList.contains("hs-show") ? (e.widget.close(), t.classList.remove(L)) : (t.classList.add(L), e.widget.open()));
780
+ let e = window.HubSpotConversations, t = Re();
781
+ e && t && (t.classList.contains("hs-show") ? (e.widget.close(), t.classList.remove(I)) : (t.classList.add(I), e.widget.open()));
782
782
  }, [])
783
783
  };
784
- }, ze = ({ data: e, fetchNextPage: t, isFetchingNextPage: n, isInitialLoading: r, isLoading: a, enabled: o = !0 }) => {
784
+ }, Be = ({ data: e, fetchNextPage: t, isFetchingNextPage: n, isInitialLoading: r, isLoading: a, enabled: o = !0 }) => {
785
785
  let s = i(async (e) => {
786
786
  n || !o || await t({ pageParam: e?.pageParam || e.visibleRowsCount });
787
787
  }, [
@@ -797,7 +797,7 @@ var f = 3e4, p = 1e3, m = 1e4, h = (e) => Array.isArray(e) ? e.map(h) : typeof e
797
797
  loadingVariant: r ? "skeleton" : "linear-progress",
798
798
  rows: l
799
799
  };
800
- }, Be = (e) => {
800
+ }, Ve = (e) => {
801
801
  let { libraries: t } = a(y), 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) => {
802
802
  if (e && typeof e == "object" && "response" in e) {
803
803
  let { response: t } = e || {};
@@ -821,7 +821,7 @@ var f = 3e4, p = 1e3, m = 1e4, h = (e) => Array.isArray(e) ? e.map(h) : typeof e
821
821
  }, []),
822
822
  printError: l
823
823
  };
824
- }, Ve = String.raw`(?:chauffeur|conducteur|op[ée]rateur|machiniste|driver|operator)`, He = String.raw`(?:(?:avec|with|incl(?:\.|uding|us)?|y\s+compris)\s+|\+\s*)(?:(?:un|une|le|la|son|sa|an?|the|its)\s+)?`, Ue = String.raw`(?:\s+(?:inclus|compris|included))?`, We = String.raw`(?:${He}${Ve}${Ue}|${Ve}\s+(?:inclus|compris|included))`, Ge = new RegExp(String.raw`\s*[[(]\s*${We}\s*[\])]`, "giu"), Ke = new RegExp(String.raw`(?:^|[\s,;:/|–—-])\s*${We}\s*$`, "iu"), qe = /[\s,;:/|–—-]+$/u, Je = (e, { readDriver: t = !0 } = {}) => {
824
+ }, He = String.raw`(?:chauffeur|conducteur|op[ée]rateur|machiniste|driver|operator)`, Ue = String.raw`(?:(?:avec|with|incl(?:\.|uding|us)?|y\s+compris)\s+|\+\s*)(?:(?:un|une|le|la|son|sa|an?|the|its)\s+)?`, We = String.raw`(?:\s+(?:inclus|compris|included))?`, Ge = 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?))`, Ke = String.raw`(?:\s*[-–—,/·:]?\s*${Ge}|\s*\(\s*${Ge}\s*\))?`, qe = String.raw`(?:(?:location|rental|rented)\s+)?(?:${Ue}${He}${We}|${He}\s+(?:inclus|compris|included))${Ke}`, X = new RegExp(String.raw`\s*[[(]\s*${qe}\s*[\])]`, "giu"), Je = new RegExp(String.raw`(?:^|[\s,;:/|–—-])\s*${qe}\s*$`, "iu"), Ye = /[\s,;:/|–—-]+$/u, Xe = (e) => e[1] || e[3] ? "days" : e[2] || e[4] ? "hours" : void 0, Ze = (e, { readDriver: t = !0 } = {}) => {
825
825
  if (typeof e != "string") return {
826
826
  label: "",
827
827
  withDriver: !1
@@ -830,51 +830,55 @@ var f = 3e4, p = 1e3, m = 1e4, h = (e) => Array.isArray(e) ? e.map(h) : typeof e
830
830
  label: e.trim(),
831
831
  withDriver: !1
832
832
  };
833
- let n = e.normalize("NFC"), r = n.replace(Ge, "").replace(Ke, "");
834
- if (r === n) return {
833
+ let n = e.normalize("NFC"), r = [...n.matchAll(X)], i = n.replace(X, ""), a = i.match(Je), o = a ? i.slice(0, a.index) : i;
834
+ if (o === n) return {
835
835
  label: e.trim(),
836
836
  withDriver: !1
837
837
  };
838
- let i = r.replace(qe, "").replace(/\s{2,}/g, " ").trim();
839
- return i ? {
840
- label: i,
838
+ let s = o.replace(Ye, "").replace(/\s{2,}/g, " ").trim(), c = [...r, ...a ? [a] : []].map(Xe).find(Boolean);
839
+ return s ? c ? {
840
+ driverUnit: c,
841
+ label: s,
842
+ withDriver: !0
843
+ } : {
844
+ label: s,
841
845
  withDriver: !0
842
846
  } : {
843
847
  label: e.trim(),
844
848
  withDriver: !1
845
849
  };
846
- }, Ye = "chunk-reload-timestamp", Z = "chunk-reload", Xe = 1e4, Q = 2, Ze = !1;
850
+ }, Qe = "chunk-reload-timestamp", Z = "chunk-reload", $e = 1e4, Q = 2, et = !1;
847
851
  if (!P && typeof window < "u") {
848
852
  try {
849
853
  let e = new URL(window.location.href);
850
- e.searchParams.has(Z) && (Ze = !0, e.searchParams.delete(Z), window.history.replaceState(null, "", e.toString()));
854
+ e.searchParams.has(Z) && (et = !0, e.searchParams.delete(Z), window.history.replaceState(null, "", e.toString()));
851
855
  } catch {}
852
856
  window.addEventListener("vite:preloadError", (e) => {
853
857
  e.preventDefault();
854
858
  });
855
859
  }
856
- var Qe = (e) => {
860
+ var tt = (e) => {
857
861
  if (!(e instanceof Error)) return !1;
858
862
  let t = e.message.toLowerCase();
859
863
  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";
860
- }, $e = /import\s*\(\s*(['"])((\w+:(\/?\/?))?[^\s,]+)\1/, et = (e) => e.toString().match($e)?.[2] ?? null, tt = (e) => {
864
+ }, nt = /import\s*\(\s*(['"])((\w+:(\/?\/?))?[^\s,]+)\1/, rt = (e) => e.toString().match(nt)?.[2] ?? null, it = (e) => {
861
865
  try {
862
866
  return sessionStorage.getItem(e);
863
867
  } catch {
864
868
  return null;
865
869
  }
866
- }, nt = (e, t) => {
870
+ }, at = (e, t) => {
867
871
  try {
868
872
  sessionStorage.setItem(e, t);
869
873
  } catch {}
870
- }, rt = (e) => Function("url", "return import(url)")(e), it = async (e) => {
874
+ }, ot = (e) => Function("url", "return import(url)")(e), st = async (e) => {
871
875
  for (let t = 0; t < Q; t++) try {
872
- return await rt(`${e}?t=${Date.now()}`);
876
+ return await ot(`${e}?t=${Date.now()}`);
873
877
  } catch {
874
878
  t < Q - 1 && await new Promise((e) => setTimeout(e, 500 * 2 ** t));
875
879
  }
876
880
  throw Error(`Failed to import ${e} after ${Q} retries`);
877
- }, at = async () => {
881
+ }, ct = async () => {
878
882
  try {
879
883
  if (typeof navigator < "u" && "serviceWorker" in navigator) {
880
884
  let e = await navigator.serviceWorker.getRegistrations();
@@ -885,28 +889,28 @@ var Qe = (e) => {
885
889
  await Promise.all(e.map((e) => caches.delete(e)));
886
890
  }
887
891
  } catch {}
888
- }, ot = async () => {
889
- await at();
892
+ }, lt = async () => {
893
+ await ct();
890
894
  let e = new URL(window.location.href);
891
895
  e.searchParams.set(Z, String(Date.now())), window.location.replace(e.toString());
892
- }, st = (e) => e != null && e.default !== void 0, ct = (e) => r(async () => {
896
+ }, ut = (e) => e != null && e.default !== void 0, dt = (e) => r(async () => {
893
897
  let t;
894
898
  try {
895
899
  let n = await e();
896
- if (st(n)) return n;
900
+ if (ut(n)) return n;
897
901
  t = /* @__PURE__ */ Error("Module resolved without a valid default export");
898
902
  } catch (e) {
899
903
  t = e;
900
904
  }
901
- if (P || !Qe(t)) throw t;
902
- let n = et(e);
905
+ if (P || !tt(t)) throw t;
906
+ let n = rt(e);
903
907
  if (n) try {
904
- let e = await it(n);
905
- if (st(e)) return e;
908
+ let e = await st(n);
909
+ if (ut(e)) return e;
906
910
  } catch {}
907
- let r = Number(tt(Ye) || "0");
908
- return Date.now() - r < Xe || Ze || (nt(Ye, String(Date.now())), await ot()), { default: () => null };
909
- }), lt = "Page Left", ut = 1800 * 1e3, dt = 1e3, ft = (e, t = !0) => {
911
+ let r = Number(it(Qe) || "0");
912
+ return Date.now() - r < $e || et || (at(Qe, String(Date.now())), await lt()), { default: () => null };
913
+ }), ft = "Page Left", pt = 1800 * 1e3, mt = 1e3, ht = (e, t = !0) => {
910
914
  let n = 0, r = t ? e : null, i = !1, a = (e) => {
911
915
  r !== null && (n += Math.max(0, e - r), r = null);
912
916
  };
@@ -917,39 +921,39 @@ var Qe = (e) => {
917
921
  resume: (e) => {
918
922
  !i && r === null && (r = e);
919
923
  },
920
- stop: (e) => (i ||= (a(e), !0), Math.min(ut, Math.round(n)))
924
+ stop: (e) => (i ||= (a(e), !0), Math.min(pt, Math.round(n)))
921
925
  };
922
- }, pt = (e, t) => t < 1e3 ? null : {
926
+ }, gt = (e, t) => t < 1e3 ? null : {
923
927
  duration_ms: Math.round(t),
924
928
  page_path: e
925
- }, mt = (e) => {
929
+ }, _t = (e) => {
926
930
  if (typeof e != "object" || !e) return !1;
927
931
  let { exp: t, sub: n, entity_id: r, scope: i } = e;
928
932
  return typeof t == "number" && typeof n == "string" && typeof r == "number" && Array.isArray(i) && i.every((e) => typeof e == "string");
929
- }, ht = (e) => {
933
+ }, vt = (e) => {
930
934
  let t = e.replace(/-/g, "+").replace(/_/g, "/"), n = t + "=".repeat((4 - t.length % 4) % 4);
931
935
  return decodeURIComponent(Array.from(atob(n), (e) => `%${e.charCodeAt(0).toString(16).padStart(2, "0")}`).join(""));
932
- }, gt = (e) => {
936
+ }, yt = (e) => {
933
937
  let t = e?.split(".")[1];
934
938
  if (!t) return null;
935
939
  try {
936
- let e = JSON.parse(ht(t));
937
- return mt(e) ? e : null;
940
+ let e = JSON.parse(vt(t));
941
+ return _t(e) ? e : null;
938
942
  } catch {
939
943
  return null;
940
944
  }
941
- }, $ = (e) => btoa(e).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, ""), _t = async (e, t) => {
945
+ }, $ = (e) => btoa(e).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, ""), bt = async (e, t) => {
942
946
  let n = new TextEncoder(), r = await crypto.subtle.importKey("raw", n.encode(e), {
943
947
  hash: "SHA-256",
944
948
  name: "HMAC"
945
949
  }, !1, ["sign"]), i = await crypto.subtle.sign("HMAC", r, n.encode(t));
946
950
  return $(String.fromCharCode(...new Uint8Array(i)));
947
- }, vt = async (e, t) => {
951
+ }, xt = async (e, t) => {
948
952
  let n = `${$(JSON.stringify({
949
953
  alg: "HS256",
950
954
  typ: "JWT"
951
955
  }))}.${$(JSON.stringify(e))}`;
952
- return `${n}.${await _t(t, n)}`;
956
+ return `${n}.${await bt(t, n)}`;
953
957
  };
954
958
  //#endregion
955
- export { A as AMPLITUDE_FEATURE_SELECTOR, O as AutoReloadOnNewVersion, _ as ChatClient, G as ChatContext, ge as ChatProvider, k as GTMSendPageView, N as InitializeAmplitude, re as InitializeAxiosConfig, ae as InitializeDaysJSConfig, oe as InitializeHubSpot, se as InitializeI18nConfig, ce as InitializeSentryConfig, y as InjectDependenciesContext, b as InjectDependenciesProvider, v as MaskTextField, ut as PAGE_DURATION_CAP_MS, dt as PAGE_DURATION_MIN_MS, lt as PAGE_LEFT_EVENT, xe as QueryProvider, ue as RequireAuth, V as SENTRY_IGNORED_REQUEST_URLS, z as SENTRY_KEEP_REPLAY, F as SUPPORTED_LANGUAGE, de as ShowHubSpotBubble, Je as articleNameAdapter, ft as createVisibleStopwatch, q as dateAdapter, gt as decodeToken, J as distanceAdapter, vt as encodeToken, X as getCurrentLanguage, e as getOrvalConfig, B as isReplayKeptForError, ct as lazyWithRetry, H as matchesRequestUrl, pt as pageLeftProperties, K as shouldRetryQuery, we as useAdapter, Te as useAmplitude, Ee as useAuth, ke as useChat, Ae as useCurrentLanguage, Ie as useFilters, Re as useHubSpot, ze as useInfiniteDataGrid, Be as useResponseError, Y as worksiteNameAdapter };
959
+ export { k as AMPLITUDE_FEATURE_SELECTOR, D as AutoReloadOnNewVersion, _ as ChatClient, W as ChatContext, _e as ChatProvider, O as GTMSendPageView, N as InitializeAmplitude, re as InitializeAxiosConfig, oe as InitializeDaysJSConfig, se as InitializeHubSpot, ce as InitializeI18nConfig, le as InitializeSentryConfig, y as InjectDependenciesContext, b as InjectDependenciesProvider, v as MaskTextField, pt as PAGE_DURATION_CAP_MS, mt as PAGE_DURATION_MIN_MS, ft as PAGE_LEFT_EVENT, Se as QueryProvider, de as RequireAuth, B as SENTRY_IGNORED_REQUEST_URLS, R as SENTRY_KEEP_REPLAY, ie as SUPPORTED_LANGUAGE, fe as ShowHubSpotBubble, Ze as articleNameAdapter, ht as createVisibleStopwatch, K as dateAdapter, yt as decodeToken, q as distanceAdapter, xt as encodeToken, Y as getCurrentLanguage, e as getOrvalConfig, z as isReplayKeptForError, dt as lazyWithRetry, V as matchesRequestUrl, gt as pageLeftProperties, G as shouldRetryQuery, Te as useAdapter, Ee as useAmplitude, De as useAuth, Ae as useChat, je as useCurrentLanguage, Le as useFilters, ze as useHubSpot, Be as useInfiniteDataGrid, Ve as useResponseError, J as worksiteNameAdapter };
@@ -10,7 +10,13 @@ export interface ArticleName {
10
10
  * The name said the machine comes with its driver.
11
11
  */
12
12
  withDriver: boolean;
13
+ /**
14
+ * How the name says the driver is billed, when it does: by the day or by the hour. Two articles of a catalog can
15
+ * differ by it alone ("[Avec opérateur Jours]", "[Avec opérateur Heures]"): the tag says it.
16
+ */
17
+ driverUnit?: DriverUnit;
13
18
  }
19
+ export type DriverUnit = "days" | "hours";
14
20
  export interface ArticleNameOptions {
15
21
  /**
16
22
  * Off, the mention of the driver is left in the name, as written, and never read: where no tag would say it
@@ -20,9 +26,10 @@ export interface ArticleNameOptions {
20
26
  }
21
27
  /**
22
28
  * Reads the mention of the driver a catalog or a supplier writes in an article's name ("Grue mobile 50T [avec
23
- * chauffeur]", "Pelle 9-10 t - avec conducteur", "Crane (with an operator)"), so that a tag says it instead. A
24
- * mention between brackets or parentheses is read anywhere; one without them only at the end of the name, where it
25
- * cannot be part of it. "Sans chauffeur" and any other wording are left in the name.
29
+ * chauffeur]", "Pelle 9-10 t - avec conducteur", "Chariot télescopique [Avec opérateur Jours]"), and how the driver is
30
+ * billed when the name says so, so that a tag says it instead. A mention between brackets or parentheses is read
31
+ * anywhere; one without them only at the end of the name, where it cannot be part of it. "Sans chauffeur" and any
32
+ * other wording are left in the name.
26
33
  */
27
34
  declare const articleNameAdapter: (name: unknown, { readDriver }?: ArticleNameOptions) => ArticleName;
28
35
  export default articleNameAdapter;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getsoren/shared-module",
3
- "version": "2.64.0",
3
+ "version": "2.65.0",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "types": "./dist/main.d.ts",