@tracktor/shared-module 0.9.2 → 0.9.3

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/CHANGELOG.md CHANGED
@@ -1,4 +1,4 @@
1
1
  # [Versions](https://github.com/Tracktor/shared-module/releases)
2
2
 
3
- ## v0.9.2
4
- - **[fix]** : Axios dependency useLayoutEffect
3
+ ## v0.9.3
4
+ - **[improvement]** : `SentryConfig` component
@@ -4,9 +4,28 @@ interface SentryConfigProps<T> {
4
4
  */
5
5
  sentry: T & {
6
6
  init: (config: {
7
+ /**
8
+ * The Dsn used to connect to Sentry and identify the project. If omitted, the SDK will not send any data to Sentry.
9
+ */
7
10
  dsn: string;
11
+ /**
12
+ * List of integrations that should be installed after SDK was initialized.
13
+ */
8
14
  integrations: any[];
15
+ /**
16
+ * Sample rate to determine trace sampling.
17
+ *
18
+ * 0.0 = 0% chance of a given trace being sent (send no traces) 1.0 = 100% chance of a given trace being sent (send
19
+ * all traces)
20
+ *
21
+ * Tracing is enabled if either this or `tracesSampler` is defined. If both are defined, `tracesSampleRate` is
22
+ * ignored.
23
+ */
9
24
  tracesSampleRate: number;
25
+ /**
26
+ * The current environment of your application (e.g. "production").
27
+ */
28
+ environment: string;
10
29
  }) => void;
11
30
  BrowserTracing: any;
12
31
  };
package/dist/main.js CHANGED
@@ -14,7 +14,7 @@ function Er() {
14
14
  if (Fe)
15
15
  return W;
16
16
  Fe = 1;
17
- var n = $e, o = Symbol.for("react.element"), d = Symbol.for("react.fragment"), v = Object.prototype.hasOwnProperty, i = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, s = { key: !0, ref: !0, __self: !0, __source: !0 };
17
+ var n = $e, i = Symbol.for("react.element"), d = Symbol.for("react.fragment"), v = Object.prototype.hasOwnProperty, o = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, s = { key: !0, ref: !0, __self: !0, __source: !0 };
18
18
  function u(m, l, R) {
19
19
  var b, w = {}, C = null, T = null;
20
20
  R !== void 0 && (C = "" + R), l.key !== void 0 && (C = "" + l.key), l.ref !== void 0 && (T = l.ref);
@@ -23,7 +23,7 @@ function Er() {
23
23
  if (m && m.defaultProps)
24
24
  for (b in l = m.defaultProps, l)
25
25
  w[b] === void 0 && (w[b] = l[b]);
26
- return { $$typeof: o, type: m, key: C, ref: T, props: w, _owner: i.current };
26
+ return { $$typeof: i, type: m, key: C, ref: T, props: w, _owner: o.current };
27
27
  }
28
28
  return W.Fragment = d, W.jsx = u, W.jsxs = u, W;
29
29
  }
@@ -40,7 +40,7 @@ var M = {};
40
40
  var Ie;
41
41
  function yr() {
42
42
  return Ie || (Ie = 1, process.env.NODE_ENV !== "production" && function() {
43
- var n = $e, o = Symbol.for("react.element"), d = Symbol.for("react.portal"), v = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), s = Symbol.for("react.profiler"), u = Symbol.for("react.provider"), m = Symbol.for("react.context"), l = Symbol.for("react.forward_ref"), R = Symbol.for("react.suspense"), b = Symbol.for("react.suspense_list"), w = Symbol.for("react.memo"), C = Symbol.for("react.lazy"), T = Symbol.for("react.offscreen"), x = Symbol.iterator, A = "@@iterator";
43
+ var n = $e, i = Symbol.for("react.element"), d = Symbol.for("react.portal"), v = Symbol.for("react.fragment"), o = Symbol.for("react.strict_mode"), s = Symbol.for("react.profiler"), u = Symbol.for("react.provider"), m = Symbol.for("react.context"), l = Symbol.for("react.forward_ref"), R = Symbol.for("react.suspense"), b = Symbol.for("react.suspense_list"), w = Symbol.for("react.memo"), C = Symbol.for("react.lazy"), T = Symbol.for("react.offscreen"), x = Symbol.iterator, A = "@@iterator";
44
44
  function Y(e) {
45
45
  if (e === null || typeof e != "object")
46
46
  return null;
@@ -68,7 +68,7 @@ function yr() {
68
68
  var le = !1, N = !1, We = !1, Me = !1, Ye = !1, ce;
69
69
  ce = Symbol.for("react.module.reference");
70
70
  function Ne(e) {
71
- return !!(typeof e == "string" || typeof e == "function" || e === v || e === s || Ye || e === i || e === R || e === b || Me || e === T || le || N || We || typeof e == "object" && e !== null && (e.$$typeof === C || e.$$typeof === w || e.$$typeof === u || e.$$typeof === m || e.$$typeof === l || // This needs to include all possible module reference object
71
+ return !!(typeof e == "string" || typeof e == "function" || e === v || e === s || Ye || e === o || e === R || e === b || Me || e === T || le || N || We || typeof e == "object" && e !== null && (e.$$typeof === C || e.$$typeof === w || e.$$typeof === u || e.$$typeof === m || e.$$typeof === l || // This needs to include all possible module reference object
72
72
  // types supported by any Flight configuration anywhere since
73
73
  // we don't know which Flight build this will end up being used
74
74
  // with.
@@ -98,7 +98,7 @@ function yr() {
98
98
  return "Portal";
99
99
  case s:
100
100
  return "Profiler";
101
- case i:
101
+ case o:
102
102
  return "StrictMode";
103
103
  case R:
104
104
  return "Suspense";
@@ -422,7 +422,7 @@ function yr() {
422
422
  var ar = function(e, r, t, a, g, h, f) {
423
423
  var c = {
424
424
  // This tag allows us to uniquely identify this as a React Element
425
- $$typeof: o,
425
+ $$typeof: i,
426
426
  // Built-in properties that belong on the element
427
427
  type: e,
428
428
  key: r,
@@ -477,7 +477,7 @@ function yr() {
477
477
  var te;
478
478
  te = !1;
479
479
  function ne(e) {
480
- return typeof e == "object" && e !== null && e.$$typeof === o;
480
+ return typeof e == "object" && e !== null && e.$$typeof === i;
481
481
  }
482
482
  function je() {
483
483
  {
@@ -593,7 +593,7 @@ Check the top-level render call using <` + t + ">.");
593
593
  var _ = ir(g);
594
594
  _ ? c += _ : c += je();
595
595
  var E;
596
- e === null ? E = "null" : Z(e) ? E = "array" : e !== void 0 && e.$$typeof === o ? (E = "<" + (j(e.type) || "Unknown") + " />", c = " Did you accidentally export a JSX literal instead of a component?") : E = typeof e, p("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", E, c);
596
+ e === null ? E = "null" : Z(e) ? E = "array" : e !== void 0 && e.$$typeof === i ? (E = "<" + (j(e.type) || "Unknown") + " />", c = " Did you accidentally export a JSX literal instead of a component?") : E = typeof e, p("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", E, c);
597
597
  }
598
598
  var y = or(e, r, t, g, h);
599
599
  if (y == null)
@@ -636,10 +636,10 @@ const H = pr({
636
636
  useLocation: void 0
637
637
  }), wr = ({
638
638
  axios: n,
639
- children: o,
639
+ children: i,
640
640
  translate: d,
641
641
  useAuth: v,
642
- Outlet: i,
642
+ Outlet: o,
643
643
  Navigate: s,
644
644
  useLocation: u,
645
645
  useGoogleTagManager: m
@@ -648,29 +648,29 @@ const H = pr({
648
648
  () => ({
649
649
  axios: n,
650
650
  Navigate: s,
651
- Outlet: i,
651
+ Outlet: o,
652
652
  translate: d,
653
653
  useAuth: v,
654
654
  useGoogleTagManager: m,
655
655
  useLocation: u
656
656
  }),
657
- [s, i, n, d, v, m, u]
657
+ [s, o, n, d, v, m, u]
658
658
  );
659
- return /* @__PURE__ */ k.jsx(H.Provider, { value: l, children: o });
659
+ return /* @__PURE__ */ k.jsx(H.Provider, { value: l, children: i });
660
660
  }, G = (n) => `RequireAuth require « ${n} » dependency. You can provide with InjectDependenciesProvider or directly in props.`, Tr = ({
661
661
  Fallback: n,
662
- loginPath: o = "/login",
662
+ loginPath: i = "/login",
663
663
  localStorageKey: d = "user",
664
664
  redirect401Path: v = "/login",
665
- ...i
665
+ ...o
666
666
  }) => {
667
667
  var x, A, Y, S;
668
668
  const {
669
- axios: s = i.axios,
670
- useLocation: u = i.useLocation,
671
- useAuth: m = i.useAuth,
672
- Outlet: l = i.Outlet,
673
- Navigate: R = i.Navigate
669
+ axios: s = o.axios,
670
+ useLocation: u = o.useLocation,
671
+ useAuth: m = o.useAuth,
672
+ Outlet: l = o.Outlet,
673
+ Navigate: R = o.Navigate
674
674
  } = se(H);
675
675
  if (m === void 0)
676
676
  throw new Error(G("useAuth"));
@@ -689,39 +689,39 @@ const H = pr({
689
689
  return typeof p == "object" && p && "response" in p && p.response && typeof p.response == "object" && "status" in p.response && p.response && typeof p.response == "object" && "status" in p.response && ((N = p == null ? void 0 : p.response) == null ? void 0 : N.status) === 401 && (s.defaults.headers.common.Authorization = null, localStorage.removeItem(d), w(v)), Promise.reject(p);
690
690
  }
691
691
  );
692
- }, [s == null ? void 0 : s.defaults, s == null ? void 0 : s.interceptors.response, d, v]), C && !b ? /* @__PURE__ */ k.jsx(hr, { fallback: n, children: (A = (x = T.state) == null ? void 0 : x.from) != null && A.state && ((S = (Y = T.state) == null ? void 0 : Y.from) == null ? void 0 : S.pathname) === o ? /* @__PURE__ */ k.jsx(R, { to: T.state.from.state.from.pathname + T.state.from.state.from.search, replace: !0 }) : /* @__PURE__ */ k.jsx(l, {}) }) : /* @__PURE__ */ k.jsx(R, { to: o, state: { from: T }, replace: !0 });
692
+ }, [s == null ? void 0 : s.defaults, s == null ? void 0 : s.interceptors.response, d, v]), C && !b ? /* @__PURE__ */ k.jsx(hr, { fallback: n, children: (A = (x = T.state) == null ? void 0 : x.from) != null && A.state && ((S = (Y = T.state) == null ? void 0 : Y.from) == null ? void 0 : S.pathname) === i ? /* @__PURE__ */ k.jsx(R, { to: T.state.from.state.from.pathname + T.state.from.state.from.search, replace: !0 }) : /* @__PURE__ */ k.jsx(l, {}) }) : /* @__PURE__ */ k.jsx(R, { to: i, state: { from: T }, replace: !0 });
693
693
  }, ae = (n) => `GTMSendPageView require « ${n} » dependency. You can provide with InjectDependenciesProvider or directly in props.`, Cr = ({ ...n }) => {
694
694
  const {
695
- useLocation: o = n.useLocation,
695
+ useLocation: i = n.useLocation,
696
696
  Outlet: d = n.Outlet,
697
697
  useGoogleTagManager: v = n.useGoogleTagManager
698
698
  } = se(H);
699
- if (o === void 0)
699
+ if (i === void 0)
700
700
  throw new Error(ae("useLocation"));
701
701
  if (d === void 0)
702
702
  throw new Error(ae("Outlet"));
703
703
  if (v === void 0)
704
704
  throw new Error(ae("useGoogleTagManager"));
705
- const { pathname: i } = o(), { sendEvent: s } = v();
705
+ const { pathname: o } = i(), { sendEvent: s } = v();
706
706
  return mr(() => {
707
- s({ event: "pageView", pathname: i });
708
- }, [i, s]), /* @__PURE__ */ k.jsx(d, {});
707
+ s({ event: "pageView", pathname: o });
708
+ }, [o, s]), /* @__PURE__ */ k.jsx(d, {});
709
709
  }, Or = ({
710
710
  axios: n,
711
- baseURL: o,
711
+ baseURL: i,
712
712
  userLocalStorageKey: d = "user",
713
713
  postContentType: v = "application/json"
714
714
  }) => (J(() => {
715
715
  if (!n.defaults)
716
716
  return;
717
- const i = localStorage.getItem(d), s = i ? JSON.parse(i) : null, u = s && typeof s == "object" && "tokenType" in s && s.tokenType ? s.tokenType : null, m = s && typeof s == "object" && "accessToken" in s && s.accessToken ? s.accessToken : null, l = i ? `${u} ${m}` : null;
718
- n.defaults.baseURL = o, n.defaults.headers.post["Content-Type"] = v, l && (n.defaults.headers.common.Authorization = l);
719
- }, [n.defaults, o, v, d]), null), Sr = ({
717
+ const o = localStorage.getItem(d), s = o ? JSON.parse(o) : null, u = s && typeof s == "object" && "tokenType" in s && s.tokenType ? s.tokenType : null, m = s && typeof s == "object" && "accessToken" in s && s.accessToken ? s.accessToken : null, l = o ? `${u} ${m}` : null;
718
+ n.defaults.baseURL = i, n.defaults.headers.post["Content-Type"] = v, l && (n.defaults.headers.common.Authorization = l);
719
+ }, [n.defaults, i, v, d]), null), Sr = ({
720
720
  i18n: n,
721
- initReactI18next: o,
721
+ initReactI18next: i,
722
722
  resources: d,
723
723
  LanguageDetector: v
724
- }) => (n.use(v).use(o).init({
724
+ }) => (n.use(v).use(i).init({
725
725
  debug: !1,
726
726
  fallbackLng: "en",
727
727
  interpolation: {
@@ -735,78 +735,79 @@ const H = pr({
735
735
  returnNull: !1
736
736
  }).then(() => {
737
737
  document.documentElement.lang !== n.resolvedLanguage && n.resolvedLanguage && document.documentElement.setAttribute("lang", n.resolvedLanguage);
738
- }), n.on("languageChanged", (i) => {
739
- document.documentElement.setAttribute("lang", i);
740
- }), null), jr = ({ dsn: n, sentry: o }) => (J(() => {
741
- o && process.env.NODE_ENV !== "development" && o.init({
738
+ }), n.on("languageChanged", (o) => {
739
+ document.documentElement.setAttribute("lang", o);
740
+ }), null), jr = ({ dsn: n, sentry: i }) => (J(() => {
741
+ i.init({
742
742
  dsn: n,
743
- integrations: [new o.BrowserTracing()],
743
+ environment: "production",
744
+ integrations: [new i.BrowserTracing()],
744
745
  tracesSampleRate: 1
745
746
  });
746
- }, [n, o]), null), Pr = ({ IMaskMixin: n, ...o }) => {
747
+ }, [n, i]), null), Pr = ({ IMaskMixin: n, ...i }) => {
747
748
  const d = ie(
748
749
  // eslint-disable-next-line react/jsx-props-no-spreading
749
- () => n(({ TextField: v, ...i }) => /* @__PURE__ */ k.jsx(v, { ...i })),
750
+ () => n(({ TextField: v, ...o }) => /* @__PURE__ */ k.jsx(v, { ...o })),
750
751
  [n]
751
752
  );
752
- return /* @__PURE__ */ k.jsx(d, { ...o });
753
- }, kr = ({ mapbox: n, accessToken: o }) => (J(() => {
754
- n && o && (n.accessToken = o);
755
- }, [o, n]), null), xr = ({
753
+ return /* @__PURE__ */ k.jsx(d, { ...i });
754
+ }, kr = ({ mapbox: n, accessToken: i }) => (J(() => {
755
+ n && i && (n.accessToken = i);
756
+ }, [i, n]), null), xr = ({
756
757
  children: n,
757
- defaultOptions: o,
758
+ defaultOptions: i,
758
759
  QueryClient: d,
759
760
  QueryClientProvider: v
760
761
  }) => {
761
- const i = new d({
762
+ const o = new d({
762
763
  defaultOptions: {
763
764
  queries: {
764
765
  refetchOnWindowFocus: !1,
765
766
  retry: 3,
766
- ...o
767
+ ...i
767
768
  }
768
769
  }
769
770
  });
770
- return /* @__PURE__ */ k.jsx(v, { client: i, children: n });
771
+ return /* @__PURE__ */ k.jsx(v, { client: o, children: n });
771
772
  }, Ar = (n) => {
772
- const { unknownErrorTranslationKey: o = "error.unknownError" } = n || {}, { translate: d = n == null ? void 0 : n.translate } = se(H);
773
+ const { unknownErrorTranslationKey: i = "error.unknownError" } = n || {}, { translate: d = n == null ? void 0 : n.translate } = se(H);
773
774
  return { printError: Le(
774
- (i) => {
775
+ (o) => {
775
776
  var m, l, R, b, w, C, T, x, A;
776
- const s = d ? d(o) : "Unknown error", { response: u } = i || {};
777
- return i != null && i.reason ? String(i.reason) : (m = u == null ? void 0 : u.data) != null && m.reason ? String(u.data.reason) : (l = u == null ? void 0 : u.data) != null && l.message ? String(u.data.message) : (b = (R = u == null ? void 0 : u.data) == null ? void 0 : R.detail) != null && b.length && Array.isArray((w = u == null ? void 0 : u.data) == null ? void 0 : w.detail) && ((T = (C = u == null ? void 0 : u.data) == null ? void 0 : C.detail[0]) != null && T.msg) && typeof ((A = (x = u == null ? void 0 : u.data) == null ? void 0 : x.detail[0]) == null ? void 0 : A.msg) == "string" ? String(u.data.detail[0].msg) : s;
777
+ const s = d ? d(i) : "Unknown error", { response: u } = o || {};
778
+ return o != null && o.reason ? String(o.reason) : (m = u == null ? void 0 : u.data) != null && m.reason ? String(u.data.reason) : (l = u == null ? void 0 : u.data) != null && l.message ? String(u.data.message) : (b = (R = u == null ? void 0 : u.data) == null ? void 0 : R.detail) != null && b.length && Array.isArray((w = u == null ? void 0 : u.data) == null ? void 0 : w.detail) && ((T = (C = u == null ? void 0 : u.data) == null ? void 0 : C.detail[0]) != null && T.msg) && typeof ((A = (x = u == null ? void 0 : u.data) == null ? void 0 : x.detail[0]) == null ? void 0 : A.msg) == "string" ? String(u.data.detail[0].msg) : s;
778
779
  },
779
- [d, o]
780
+ [d, i]
780
781
  ) };
781
782
  }, Dr = ({
782
783
  data: n,
783
- fetchNextPage: o,
784
+ fetchNextPage: i,
784
785
  isFetchingNextPage: d,
785
786
  isInitialLoading: v,
786
- isLoading: i,
787
+ isLoading: o,
787
788
  enabled: s = !0
788
789
  }) => {
789
790
  const u = Le(
790
791
  async (l) => {
791
- d || !s || await o({ pageParam: (l == null ? void 0 : l.pageParam) || l.visibleRowsCount });
792
+ d || !s || await i({ pageParam: (l == null ? void 0 : l.pageParam) || l.visibleRowsCount });
792
793
  },
793
- [s, o, d]
794
+ [s, i, d]
794
795
  ), m = ie(() => {
795
796
  if (n)
796
797
  return n.pages.reduce((l, R) => [...l, ...R], []);
797
798
  }, [n]);
798
799
  return {
799
800
  fetchNextPageOnRowsScrollEnd: u,
800
- isLoading: d || i,
801
+ isLoading: d || o,
801
802
  loadingVariant: v ? "skeleton" : "linear",
802
803
  rows: m
803
804
  };
804
805
  }, br = (n) => n.charAt(0).toUpperCase() + n.slice(1).toLowerCase(), Rr = (n) => {
805
- const v = n.split("/").filter((i) => i.length > 0).map((i) => i.replace(/\${([^}]*)}/g, "$1").split(/[_-]/).map((l) => l.charAt(0).toUpperCase() + l.slice(1)).join("")).join("");
806
+ const v = n.split("/").filter((o) => o.length > 0).map((o) => o.replace(/\${([^}]*)}/g, "$1").split(/[_-]/).map((l) => l.charAt(0).toUpperCase() + l.slice(1)).join("")).join("");
806
807
  return v.charAt(0).toLowerCase() + v.slice(1);
807
- }, Fr = (n, o, d) => {
808
- const v = Rr(o), i = br(d);
809
- return `${v}${i}`;
808
+ }, Fr = (n, i, d) => {
809
+ const v = Rr(i), o = br(d);
810
+ return `${v}${o}`;
810
811
  };
811
812
  export {
812
813
  Or as AxiosConfig,
package/dist/main.umd.cjs CHANGED
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var se;function Ie(){if(se)return W;se=1;var n=m,o=Symbol.for("react.element"),d=Symbol.for("react.fragment"),v=Object.prototype.hasOwnProperty,i=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function u(E,c,T){var _,C={},S=null,O=null;T!==void 0&&(S=""+T),c.key!==void 0&&(S=""+c.key),c.ref!==void 0&&(O=c.ref);for(_ in c)v.call(c,_)&&!s.hasOwnProperty(_)&&(C[_]=c[_]);if(E&&E.defaultProps)for(_ in c=E.defaultProps,c)C[_]===void 0&&(C[_]=c[_]);return{$$typeof:o,type:E,key:S,ref:O,props:C,_owner:i.current}}return W.Fragment=d,W.jsx=u,W.jsxs=u,W}var N={};/**
9
+ */var se;function Ie(){if(se)return W;se=1;var n=m,i=Symbol.for("react.element"),d=Symbol.for("react.fragment"),v=Object.prototype.hasOwnProperty,o=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function u(y,c,T){var _,C={},S=null,O=null;T!==void 0&&(S=""+T),c.key!==void 0&&(S=""+c.key),c.ref!==void 0&&(O=c.ref);for(_ in c)v.call(c,_)&&!s.hasOwnProperty(_)&&(C[_]=c[_]);if(y&&y.defaultProps)for(_ in c=y.defaultProps,c)C[_]===void 0&&(C[_]=c[_]);return{$$typeof:i,type:y,key:S,ref:O,props:C,_owner:o.current}}return W.Fragment=d,W.jsx=u,W.jsxs=u,W}var Y={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,14 +14,14 @@
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var ue;function Le(){return ue||(ue=1,process.env.NODE_ENV!=="production"&&function(){var n=m,o=Symbol.for("react.element"),d=Symbol.for("react.portal"),v=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),u=Symbol.for("react.provider"),E=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),_=Symbol.for("react.suspense_list"),C=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),O=Symbol.for("react.offscreen"),D=Symbol.iterator,F="@@iterator";function G(e){if(e===null||typeof e!="object")return null;var r=D&&e[D]||e[F];return typeof r=="function"?r:null}var k=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function p(e){{for(var r=arguments.length,t=new Array(r>1?r-1:0),a=1;a<r;a++)t[a-1]=arguments[a];ce("error",e,t)}}function ce(e,r,t){{var a=k.ReactDebugCurrentFrame,g=a.getStackAddendum();g!==""&&(r+="%s",t=t.concat([g]));var h=t.map(function(f){return String(f)});h.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,h)}}var le=!1,z=!1,Ze=!1,qe=!1,$e=!1,fe;fe=Symbol.for("react.module.reference");function er(e){return!!(typeof e=="string"||typeof e=="function"||e===v||e===s||$e||e===i||e===T||e===_||qe||e===O||le||z||Ze||typeof e=="object"&&e!==null&&(e.$$typeof===S||e.$$typeof===C||e.$$typeof===u||e.$$typeof===E||e.$$typeof===c||e.$$typeof===fe||e.getModuleId!==void 0))}function rr(e,r,t){var a=e.displayName;if(a)return a;var g=r.displayName||r.name||"";return g!==""?t+"("+g+")":t}function de(e){return e.displayName||"Context"}function x(e){if(e==null)return null;if(typeof e.tag=="number"&&p("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case v:return"Fragment";case d:return"Portal";case s:return"Profiler";case i:return"StrictMode";case T:return"Suspense";case _:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case E:var r=e;return de(r)+".Consumer";case u:var t=e;return de(t._context)+".Provider";case c:return rr(e,e.render,"ForwardRef");case C:var a=e.displayName||null;return a!==null?a:x(e.type)||"Memo";case S:{var g=e,h=g._payload,f=g._init;try{return x(f(h))}catch{return null}}}return null}var I=Object.assign,V=0,ve,pe,ge,he,me,Ee,ye;function be(){}be.__reactDisabledLog=!0;function tr(){{if(V===0){ve=console.log,pe=console.info,ge=console.warn,he=console.error,me=console.group,Ee=console.groupCollapsed,ye=console.groupEnd;var e={configurable:!0,enumerable:!0,value:be,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}V++}}function nr(){{if(V--,V===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:I({},e,{value:ve}),info:I({},e,{value:pe}),warn:I({},e,{value:ge}),error:I({},e,{value:he}),group:I({},e,{value:me}),groupCollapsed:I({},e,{value:Ee}),groupEnd:I({},e,{value:ye})})}V<0&&p("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var $=k.ReactCurrentDispatcher,ee;function J(e,r,t){{if(ee===void 0)try{throw Error()}catch(g){var a=g.stack.trim().match(/\n( *(at )?)/);ee=a&&a[1]||""}return`
17
+ */var ue;function Le(){return ue||(ue=1,process.env.NODE_ENV!=="production"&&function(){var n=m,i=Symbol.for("react.element"),d=Symbol.for("react.portal"),v=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),u=Symbol.for("react.provider"),y=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),_=Symbol.for("react.suspense_list"),C=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),O=Symbol.for("react.offscreen"),D=Symbol.iterator,F="@@iterator";function G(e){if(e===null||typeof e!="object")return null;var r=D&&e[D]||e[F];return typeof r=="function"?r:null}var k=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function p(e){{for(var r=arguments.length,t=new Array(r>1?r-1:0),a=1;a<r;a++)t[a-1]=arguments[a];ce("error",e,t)}}function ce(e,r,t){{var a=k.ReactDebugCurrentFrame,g=a.getStackAddendum();g!==""&&(r+="%s",t=t.concat([g]));var h=t.map(function(f){return String(f)});h.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,h)}}var le=!1,z=!1,Ze=!1,qe=!1,$e=!1,fe;fe=Symbol.for("react.module.reference");function er(e){return!!(typeof e=="string"||typeof e=="function"||e===v||e===s||$e||e===o||e===T||e===_||qe||e===O||le||z||Ze||typeof e=="object"&&e!==null&&(e.$$typeof===S||e.$$typeof===C||e.$$typeof===u||e.$$typeof===y||e.$$typeof===c||e.$$typeof===fe||e.getModuleId!==void 0))}function rr(e,r,t){var a=e.displayName;if(a)return a;var g=r.displayName||r.name||"";return g!==""?t+"("+g+")":t}function de(e){return e.displayName||"Context"}function x(e){if(e==null)return null;if(typeof e.tag=="number"&&p("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case v:return"Fragment";case d:return"Portal";case s:return"Profiler";case o:return"StrictMode";case T:return"Suspense";case _:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case y:var r=e;return de(r)+".Consumer";case u:var t=e;return de(t._context)+".Provider";case c:return rr(e,e.render,"ForwardRef");case C:var a=e.displayName||null;return a!==null?a:x(e.type)||"Memo";case S:{var g=e,h=g._payload,f=g._init;try{return x(f(h))}catch{return null}}}return null}var I=Object.assign,V=0,ve,pe,ge,he,me,ye,Ee;function be(){}be.__reactDisabledLog=!0;function tr(){{if(V===0){ve=console.log,pe=console.info,ge=console.warn,he=console.error,me=console.group,ye=console.groupCollapsed,Ee=console.groupEnd;var e={configurable:!0,enumerable:!0,value:be,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}V++}}function nr(){{if(V--,V===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:I({},e,{value:ve}),info:I({},e,{value:pe}),warn:I({},e,{value:ge}),error:I({},e,{value:he}),group:I({},e,{value:me}),groupCollapsed:I({},e,{value:ye}),groupEnd:I({},e,{value:Ee})})}V<0&&p("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var $=k.ReactCurrentDispatcher,ee;function J(e,r,t){{if(ee===void 0)try{throw Error()}catch(g){var a=g.stack.trim().match(/\n( *(at )?)/);ee=a&&a[1]||""}return`
18
18
  `+ee+e}}var re=!1,H;{var ar=typeof WeakMap=="function"?WeakMap:Map;H=new ar}function Re(e,r){if(!e||re)return"";{var t=H.get(e);if(t!==void 0)return t}var a;re=!0;var g=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var h;h=$.current,$.current=null,tr();try{if(r){var f=function(){throw Error()};if(Object.defineProperty(f.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(f,[])}catch(A){a=A}Reflect.construct(e,[],f)}else{try{f.call()}catch(A){a=A}e.call(f.prototype)}}else{try{throw Error()}catch(A){a=A}e()}}catch(A){if(A&&a&&typeof A.stack=="string"){for(var l=A.stack.split(`
19
19
  `),w=a.stack.split(`
20
- `),y=l.length-1,b=w.length-1;y>=1&&b>=0&&l[y]!==w[b];)b--;for(;y>=1&&b>=0;y--,b--)if(l[y]!==w[b]){if(y!==1||b!==1)do if(y--,b--,b<0||l[y]!==w[b]){var j=`
21
- `+l[y].replace(" at new "," at ");return e.displayName&&j.includes("<anonymous>")&&(j=j.replace("<anonymous>",e.displayName)),typeof e=="function"&&H.set(e,j),j}while(y>=1&&b>=0);break}}}finally{re=!1,$.current=h,nr(),Error.prepareStackTrace=g}var M=e?e.displayName||e.name:"",Fe=M?J(M):"";return typeof e=="function"&&H.set(e,Fe),Fe}function or(e,r,t){return Re(e,!1)}function ir(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function K(e,r,t){if(e==null)return"";if(typeof e=="function")return Re(e,ir(e));if(typeof e=="string")return J(e);switch(e){case T:return J("Suspense");case _:return J("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case c:return or(e.render);case C:return K(e.type,r,t);case S:{var a=e,g=a._payload,h=a._init;try{return K(h(g),r,t)}catch{}}}return""}var X=Object.prototype.hasOwnProperty,_e={},Te=k.ReactDebugCurrentFrame;function Q(e){if(e){var r=e._owner,t=K(e.type,e._source,r?r.type:null);Te.setExtraStackFrame(t)}else Te.setExtraStackFrame(null)}function sr(e,r,t,a,g){{var h=Function.call.bind(X);for(var f in e)if(h(e,f)){var l=void 0;try{if(typeof e[f]!="function"){var w=Error((a||"React class")+": "+t+" type `"+f+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[f]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw w.name="Invariant Violation",w}l=e[f](r,f,a,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(y){l=y}l&&!(l instanceof Error)&&(Q(g),p("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",a||"React class",t,f,typeof l),Q(null)),l instanceof Error&&!(l.message in _e)&&(_e[l.message]=!0,Q(g),p("Failed %s type: %s",t,l.message),Q(null))}}}var ur=Array.isArray;function te(e){return ur(e)}function cr(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function lr(e){try{return we(e),!1}catch{return!0}}function we(e){return""+e}function Ce(e){if(lr(e))return p("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",cr(e)),we(e)}var U=k.ReactCurrentOwner,fr={key:!0,ref:!0,__self:!0,__source:!0},Oe,Se,ne;ne={};function dr(e){if(X.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function vr(e){if(X.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function pr(e,r){if(typeof e.ref=="string"&&U.current&&r&&U.current.stateNode!==r){var t=x(U.current.type);ne[t]||(p('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',x(U.current.type),e.ref),ne[t]=!0)}}function gr(e,r){{var t=function(){Oe||(Oe=!0,p("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}}function hr(e,r){{var t=function(){Se||(Se=!0,p("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"ref",{get:t,configurable:!0})}}var mr=function(e,r,t,a,g,h,f){var l={$$typeof:o,type:e,key:r,ref:t,props:f,_owner:h};return l._store={},Object.defineProperty(l._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(l,"_self",{configurable:!1,enumerable:!1,writable:!1,value:a}),Object.defineProperty(l,"_source",{configurable:!1,enumerable:!1,writable:!1,value:g}),Object.freeze&&(Object.freeze(l.props),Object.freeze(l)),l};function Er(e,r,t,a,g){{var h,f={},l=null,w=null;t!==void 0&&(Ce(t),l=""+t),vr(r)&&(Ce(r.key),l=""+r.key),dr(r)&&(w=r.ref,pr(r,g));for(h in r)X.call(r,h)&&!fr.hasOwnProperty(h)&&(f[h]=r[h]);if(e&&e.defaultProps){var y=e.defaultProps;for(h in y)f[h]===void 0&&(f[h]=y[h])}if(l||w){var b=typeof e=="function"?e.displayName||e.name||"Unknown":e;l&&gr(f,b),w&&hr(f,b)}return mr(e,l,w,g,a,U.current,f)}}var ae=k.ReactCurrentOwner,je=k.ReactDebugCurrentFrame;function L(e){if(e){var r=e._owner,t=K(e.type,e._source,r?r.type:null);je.setExtraStackFrame(t)}else je.setExtraStackFrame(null)}var oe;oe=!1;function ie(e){return typeof e=="object"&&e!==null&&e.$$typeof===o}function Pe(){{if(ae.current){var e=x(ae.current.type);if(e)return`
20
+ `),E=l.length-1,b=w.length-1;E>=1&&b>=0&&l[E]!==w[b];)b--;for(;E>=1&&b>=0;E--,b--)if(l[E]!==w[b]){if(E!==1||b!==1)do if(E--,b--,b<0||l[E]!==w[b]){var j=`
21
+ `+l[E].replace(" at new "," at ");return e.displayName&&j.includes("<anonymous>")&&(j=j.replace("<anonymous>",e.displayName)),typeof e=="function"&&H.set(e,j),j}while(E>=1&&b>=0);break}}}finally{re=!1,$.current=h,nr(),Error.prepareStackTrace=g}var M=e?e.displayName||e.name:"",Fe=M?J(M):"";return typeof e=="function"&&H.set(e,Fe),Fe}function or(e,r,t){return Re(e,!1)}function ir(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function K(e,r,t){if(e==null)return"";if(typeof e=="function")return Re(e,ir(e));if(typeof e=="string")return J(e);switch(e){case T:return J("Suspense");case _:return J("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case c:return or(e.render);case C:return K(e.type,r,t);case S:{var a=e,g=a._payload,h=a._init;try{return K(h(g),r,t)}catch{}}}return""}var X=Object.prototype.hasOwnProperty,_e={},Te=k.ReactDebugCurrentFrame;function Q(e){if(e){var r=e._owner,t=K(e.type,e._source,r?r.type:null);Te.setExtraStackFrame(t)}else Te.setExtraStackFrame(null)}function sr(e,r,t,a,g){{var h=Function.call.bind(X);for(var f in e)if(h(e,f)){var l=void 0;try{if(typeof e[f]!="function"){var w=Error((a||"React class")+": "+t+" type `"+f+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[f]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw w.name="Invariant Violation",w}l=e[f](r,f,a,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(E){l=E}l&&!(l instanceof Error)&&(Q(g),p("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",a||"React class",t,f,typeof l),Q(null)),l instanceof Error&&!(l.message in _e)&&(_e[l.message]=!0,Q(g),p("Failed %s type: %s",t,l.message),Q(null))}}}var ur=Array.isArray;function te(e){return ur(e)}function cr(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function lr(e){try{return we(e),!1}catch{return!0}}function we(e){return""+e}function Ce(e){if(lr(e))return p("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",cr(e)),we(e)}var U=k.ReactCurrentOwner,fr={key:!0,ref:!0,__self:!0,__source:!0},Oe,Se,ne;ne={};function dr(e){if(X.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function vr(e){if(X.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function pr(e,r){if(typeof e.ref=="string"&&U.current&&r&&U.current.stateNode!==r){var t=x(U.current.type);ne[t]||(p('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',x(U.current.type),e.ref),ne[t]=!0)}}function gr(e,r){{var t=function(){Oe||(Oe=!0,p("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}}function hr(e,r){{var t=function(){Se||(Se=!0,p("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"ref",{get:t,configurable:!0})}}var mr=function(e,r,t,a,g,h,f){var l={$$typeof:i,type:e,key:r,ref:t,props:f,_owner:h};return l._store={},Object.defineProperty(l._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(l,"_self",{configurable:!1,enumerable:!1,writable:!1,value:a}),Object.defineProperty(l,"_source",{configurable:!1,enumerable:!1,writable:!1,value:g}),Object.freeze&&(Object.freeze(l.props),Object.freeze(l)),l};function yr(e,r,t,a,g){{var h,f={},l=null,w=null;t!==void 0&&(Ce(t),l=""+t),vr(r)&&(Ce(r.key),l=""+r.key),dr(r)&&(w=r.ref,pr(r,g));for(h in r)X.call(r,h)&&!fr.hasOwnProperty(h)&&(f[h]=r[h]);if(e&&e.defaultProps){var E=e.defaultProps;for(h in E)f[h]===void 0&&(f[h]=E[h])}if(l||w){var b=typeof e=="function"?e.displayName||e.name||"Unknown":e;l&&gr(f,b),w&&hr(f,b)}return mr(e,l,w,g,a,U.current,f)}}var ae=k.ReactCurrentOwner,je=k.ReactDebugCurrentFrame;function L(e){if(e){var r=e._owner,t=K(e.type,e._source,r?r.type:null);je.setExtraStackFrame(t)}else je.setExtraStackFrame(null)}var oe;oe=!1;function ie(e){return typeof e=="object"&&e!==null&&e.$$typeof===i}function Pe(){{if(ae.current){var e=x(ae.current.type);if(e)return`
22
22
 
23
- Check the render method of \``+e+"`."}return""}}function yr(e){{if(e!==void 0){var r=e.fileName.replace(/^.*[\\\/]/,""),t=e.lineNumber;return`
23
+ Check the render method of \``+e+"`."}return""}}function Er(e){{if(e!==void 0){var r=e.fileName.replace(/^.*[\\\/]/,""),t=e.lineNumber;return`
24
24
 
25
25
  Check your code at `+r+":"+t+"."}return""}}var ke={};function br(e){{var r=Pe();if(!r){var t=typeof e=="string"?e:e.displayName||e.name;t&&(r=`
26
26
 
27
- Check the top-level render call using <`+t+">.")}return r}}function xe(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=br(r);if(ke[t])return;ke[t]=!0;var a="";e&&e._owner&&e._owner!==ae.current&&(a=" It was passed a child from "+x(e._owner.type)+"."),L(e),p('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',t,a),L(null)}}function Ae(e,r){{if(typeof e!="object")return;if(te(e))for(var t=0;t<e.length;t++){var a=e[t];ie(a)&&xe(a,r)}else if(ie(e))e._store&&(e._store.validated=!0);else if(e){var g=G(e);if(typeof g=="function"&&g!==e.entries)for(var h=g.call(e),f;!(f=h.next()).done;)ie(f.value)&&xe(f.value,r)}}}function Rr(e){{var r=e.type;if(r==null||typeof r=="string")return;var t;if(typeof r=="function")t=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===c||r.$$typeof===C))t=r.propTypes;else return;if(t){var a=x(r);sr(t,e.props,"prop",a,e)}else if(r.PropTypes!==void 0&&!oe){oe=!0;var g=x(r);p("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",g||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&p("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function _r(e){{for(var r=Object.keys(e.props),t=0;t<r.length;t++){var a=r[t];if(a!=="children"&&a!=="key"){L(e),p("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",a),L(null);break}}e.ref!==null&&(L(e),p("Invalid attribute `ref` supplied to `React.Fragment`."),L(null))}}function De(e,r,t,a,g,h){{var f=er(e);if(!f){var l="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(l+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var w=yr(g);w?l+=w:l+=Pe();var y;e===null?y="null":te(e)?y="array":e!==void 0&&e.$$typeof===o?(y="<"+(x(e.type)||"Unknown")+" />",l=" Did you accidentally export a JSX literal instead of a component?"):y=typeof e,p("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",y,l)}var b=Er(e,r,t,g,h);if(b==null)return b;if(f){var j=r.children;if(j!==void 0)if(a)if(te(j)){for(var M=0;M<j.length;M++)Ae(j[M],e);Object.freeze&&Object.freeze(j)}else p("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Ae(j,e)}return e===v?_r(b):Rr(b),b}}function Tr(e,r,t){return De(e,r,t,!0)}function wr(e,r,t){return De(e,r,t,!1)}var Cr=wr,Or=Tr;N.Fragment=v,N.jsx=Cr,N.jsxs=Or}()),N}process.env.NODE_ENV==="production"?Z.exports=Ie():Z.exports=Le();var P=Z.exports;const Y=m.createContext({axios:void 0,children:void 0,Navigate:void 0,Outlet:void 0,translate:void 0,useAuth:void 0,useLocation:void 0}),Me=({axios:n,children:o,translate:d,useAuth:v,Outlet:i,Navigate:s,useLocation:u,useGoogleTagManager:E})=>{const c=m.useMemo(()=>({axios:n,Navigate:s,Outlet:i,translate:d,useAuth:v,useGoogleTagManager:E,useLocation:u}),[s,i,n,d,v,E,u]);return P.jsx(Y.Provider,{value:c,children:o})},B=n=>`RequireAuth require « ${n} » dependency. You can provide with InjectDependenciesProvider or directly in props.`,We=({Fallback:n,loginPath:o="/login",localStorageKey:d="user",redirect401Path:v="/login",...i})=>{var D,F,G,k;const{axios:s=i.axios,useLocation:u=i.useLocation,useAuth:E=i.useAuth,Outlet:c=i.Outlet,Navigate:T=i.Navigate}=m.useContext(Y);if(E===void 0)throw new Error(B("useAuth"));if(u===void 0)throw new Error(B("useLocation"));if(c===void 0)throw new Error(B("Outlet"));if(T===void 0)throw new Error(B("Navigate"));const[_,C]=m.useState(null),{isLogged:S}=E(),O=u();return m.useLayoutEffect(()=>{s==null||s.interceptors.response.use(p=>p,async p=>{var z;return typeof p=="object"&&p&&"response"in p&&p.response&&typeof p.response=="object"&&"status"in p.response&&p.response&&typeof p.response=="object"&&"status"in p.response&&((z=p==null?void 0:p.response)==null?void 0:z.status)===401&&(s.defaults.headers.common.Authorization=null,localStorage.removeItem(d),C(v)),Promise.reject(p)})},[s==null?void 0:s.defaults,s==null?void 0:s.interceptors.response,d,v]),S&&!_?P.jsx(m.Suspense,{fallback:n,children:(F=(D=O.state)==null?void 0:D.from)!=null&&F.state&&((k=(G=O.state)==null?void 0:G.from)==null?void 0:k.pathname)===o?P.jsx(T,{to:O.state.from.state.from.pathname+O.state.from.state.from.search,replace:!0}):P.jsx(c,{})}):P.jsx(T,{to:o,state:{from:O},replace:!0})},q=n=>`GTMSendPageView require « ${n} » dependency. You can provide with InjectDependenciesProvider or directly in props.`,Ne=({...n})=>{const{useLocation:o=n.useLocation,Outlet:d=n.Outlet,useGoogleTagManager:v=n.useGoogleTagManager}=m.useContext(Y);if(o===void 0)throw new Error(q("useLocation"));if(d===void 0)throw new Error(q("Outlet"));if(v===void 0)throw new Error(q("useGoogleTagManager"));const{pathname:i}=o(),{sendEvent:s}=v();return m.useEffect(()=>{s({event:"pageView",pathname:i})},[i,s]),P.jsx(d,{})},Ye=({axios:n,baseURL:o,userLocalStorageKey:d="user",postContentType:v="application/json"})=>(m.useLayoutEffect(()=>{if(!n.defaults)return;const i=localStorage.getItem(d),s=i?JSON.parse(i):null,u=s&&typeof s=="object"&&"tokenType"in s&&s.tokenType?s.tokenType:null,E=s&&typeof s=="object"&&"accessToken"in s&&s.accessToken?s.accessToken:null,c=i?`${u} ${E}`:null;n.defaults.baseURL=o,n.defaults.headers.post["Content-Type"]=v,c&&(n.defaults.headers.common.Authorization=c)},[n.defaults,o,v,d]),null),Ve=({i18n:n,initReactI18next:o,resources:d,LanguageDetector:v})=>(n.use(v).use(o).init({debug:!1,fallbackLng:"en",interpolation:{escapeValue:!1},load:"languageOnly",react:{useSuspense:!0},resources:d,returnNull:!1}).then(()=>{document.documentElement.lang!==n.resolvedLanguage&&n.resolvedLanguage&&document.documentElement.setAttribute("lang",n.resolvedLanguage)}),n.on("languageChanged",i=>{document.documentElement.setAttribute("lang",i)}),null),Ue=({dsn:n,sentry:o})=>(m.useLayoutEffect(()=>{o&&process.env.NODE_ENV!=="development"&&o.init({dsn:n,integrations:[new o.BrowserTracing],tracesSampleRate:1})},[n,o]),null),Be=({IMaskMixin:n,...o})=>{const d=m.useMemo(()=>n(({TextField:v,...i})=>P.jsx(v,{...i})),[n]);return P.jsx(d,{...o})},Ge=({mapbox:n,accessToken:o})=>(m.useLayoutEffect(()=>{n&&o&&(n.accessToken=o)},[o,n]),null),ze=({children:n,defaultOptions:o,QueryClient:d,QueryClientProvider:v})=>{const i=new d({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:3,...o}}});return P.jsx(v,{client:i,children:n})},Je=n=>{const{unknownErrorTranslationKey:o="error.unknownError"}=n||{},{translate:d=n==null?void 0:n.translate}=m.useContext(Y);return{printError:m.useCallback(i=>{var E,c,T,_,C,S,O,D,F;const s=d?d(o):"Unknown error",{response:u}=i||{};return i!=null&&i.reason?String(i.reason):(E=u==null?void 0:u.data)!=null&&E.reason?String(u.data.reason):(c=u==null?void 0:u.data)!=null&&c.message?String(u.data.message):(_=(T=u==null?void 0:u.data)==null?void 0:T.detail)!=null&&_.length&&Array.isArray((C=u==null?void 0:u.data)==null?void 0:C.detail)&&((O=(S=u==null?void 0:u.data)==null?void 0:S.detail[0])!=null&&O.msg)&&typeof((F=(D=u==null?void 0:u.data)==null?void 0:D.detail[0])==null?void 0:F.msg)=="string"?String(u.data.detail[0].msg):s},[d,o])}},He=({data:n,fetchNextPage:o,isFetchingNextPage:d,isInitialLoading:v,isLoading:i,enabled:s=!0})=>{const u=m.useCallback(async c=>{d||!s||await o({pageParam:(c==null?void 0:c.pageParam)||c.visibleRowsCount})},[s,o,d]),E=m.useMemo(()=>{if(n)return n.pages.reduce((c,T)=>[...c,...T],[])},[n]);return{fetchNextPageOnRowsScrollEnd:u,isLoading:d||i,loadingVariant:v?"skeleton":"linear",rows:E}},Ke=n=>n.charAt(0).toUpperCase()+n.slice(1).toLowerCase(),Xe=n=>{const v=n.split("/").filter(i=>i.length>0).map(i=>i.replace(/\${([^}]*)}/g,"$1").split(/[_-]/).map(c=>c.charAt(0).toUpperCase()+c.slice(1)).join("")).join("");return v.charAt(0).toLowerCase()+v.slice(1)},Qe=(n,o,d)=>{const v=Xe(o),i=Ke(d);return`${v}${i}`};R.AxiosConfig=Ye,R.GTMSendPageView=Ne,R.I18nConfig=Ve,R.InjectDependenciesContext=Y,R.InjectDependenciesProvider=Me,R.MapBoxConfig=Ge,R.MaskTextField=Be,R.QueryClientConfigProvider=ze,R.RequireAuth=We,R.SentryConfig=Ue,R.getOrvalOperationName=Qe,R.useInfiniteDataGrid=He,R.useResponseError=Je,Object.defineProperty(R,Symbol.toStringTag,{value:"Module"})});
27
+ Check the top-level render call using <`+t+">.")}return r}}function xe(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=br(r);if(ke[t])return;ke[t]=!0;var a="";e&&e._owner&&e._owner!==ae.current&&(a=" It was passed a child from "+x(e._owner.type)+"."),L(e),p('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',t,a),L(null)}}function Ae(e,r){{if(typeof e!="object")return;if(te(e))for(var t=0;t<e.length;t++){var a=e[t];ie(a)&&xe(a,r)}else if(ie(e))e._store&&(e._store.validated=!0);else if(e){var g=G(e);if(typeof g=="function"&&g!==e.entries)for(var h=g.call(e),f;!(f=h.next()).done;)ie(f.value)&&xe(f.value,r)}}}function Rr(e){{var r=e.type;if(r==null||typeof r=="string")return;var t;if(typeof r=="function")t=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===c||r.$$typeof===C))t=r.propTypes;else return;if(t){var a=x(r);sr(t,e.props,"prop",a,e)}else if(r.PropTypes!==void 0&&!oe){oe=!0;var g=x(r);p("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",g||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&p("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function _r(e){{for(var r=Object.keys(e.props),t=0;t<r.length;t++){var a=r[t];if(a!=="children"&&a!=="key"){L(e),p("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",a),L(null);break}}e.ref!==null&&(L(e),p("Invalid attribute `ref` supplied to `React.Fragment`."),L(null))}}function De(e,r,t,a,g,h){{var f=er(e);if(!f){var l="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(l+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var w=Er(g);w?l+=w:l+=Pe();var E;e===null?E="null":te(e)?E="array":e!==void 0&&e.$$typeof===i?(E="<"+(x(e.type)||"Unknown")+" />",l=" Did you accidentally export a JSX literal instead of a component?"):E=typeof e,p("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",E,l)}var b=yr(e,r,t,g,h);if(b==null)return b;if(f){var j=r.children;if(j!==void 0)if(a)if(te(j)){for(var M=0;M<j.length;M++)Ae(j[M],e);Object.freeze&&Object.freeze(j)}else p("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Ae(j,e)}return e===v?_r(b):Rr(b),b}}function Tr(e,r,t){return De(e,r,t,!0)}function wr(e,r,t){return De(e,r,t,!1)}var Cr=wr,Or=Tr;Y.Fragment=v,Y.jsx=Cr,Y.jsxs=Or}()),Y}process.env.NODE_ENV==="production"?Z.exports=Ie():Z.exports=Le();var P=Z.exports;const N=m.createContext({axios:void 0,children:void 0,Navigate:void 0,Outlet:void 0,translate:void 0,useAuth:void 0,useLocation:void 0}),Me=({axios:n,children:i,translate:d,useAuth:v,Outlet:o,Navigate:s,useLocation:u,useGoogleTagManager:y})=>{const c=m.useMemo(()=>({axios:n,Navigate:s,Outlet:o,translate:d,useAuth:v,useGoogleTagManager:y,useLocation:u}),[s,o,n,d,v,y,u]);return P.jsx(N.Provider,{value:c,children:i})},B=n=>`RequireAuth require « ${n} » dependency. You can provide with InjectDependenciesProvider or directly in props.`,We=({Fallback:n,loginPath:i="/login",localStorageKey:d="user",redirect401Path:v="/login",...o})=>{var D,F,G,k;const{axios:s=o.axios,useLocation:u=o.useLocation,useAuth:y=o.useAuth,Outlet:c=o.Outlet,Navigate:T=o.Navigate}=m.useContext(N);if(y===void 0)throw new Error(B("useAuth"));if(u===void 0)throw new Error(B("useLocation"));if(c===void 0)throw new Error(B("Outlet"));if(T===void 0)throw new Error(B("Navigate"));const[_,C]=m.useState(null),{isLogged:S}=y(),O=u();return m.useLayoutEffect(()=>{s==null||s.interceptors.response.use(p=>p,async p=>{var z;return typeof p=="object"&&p&&"response"in p&&p.response&&typeof p.response=="object"&&"status"in p.response&&p.response&&typeof p.response=="object"&&"status"in p.response&&((z=p==null?void 0:p.response)==null?void 0:z.status)===401&&(s.defaults.headers.common.Authorization=null,localStorage.removeItem(d),C(v)),Promise.reject(p)})},[s==null?void 0:s.defaults,s==null?void 0:s.interceptors.response,d,v]),S&&!_?P.jsx(m.Suspense,{fallback:n,children:(F=(D=O.state)==null?void 0:D.from)!=null&&F.state&&((k=(G=O.state)==null?void 0:G.from)==null?void 0:k.pathname)===i?P.jsx(T,{to:O.state.from.state.from.pathname+O.state.from.state.from.search,replace:!0}):P.jsx(c,{})}):P.jsx(T,{to:i,state:{from:O},replace:!0})},q=n=>`GTMSendPageView require « ${n} » dependency. You can provide with InjectDependenciesProvider or directly in props.`,Ye=({...n})=>{const{useLocation:i=n.useLocation,Outlet:d=n.Outlet,useGoogleTagManager:v=n.useGoogleTagManager}=m.useContext(N);if(i===void 0)throw new Error(q("useLocation"));if(d===void 0)throw new Error(q("Outlet"));if(v===void 0)throw new Error(q("useGoogleTagManager"));const{pathname:o}=i(),{sendEvent:s}=v();return m.useEffect(()=>{s({event:"pageView",pathname:o})},[o,s]),P.jsx(d,{})},Ne=({axios:n,baseURL:i,userLocalStorageKey:d="user",postContentType:v="application/json"})=>(m.useLayoutEffect(()=>{if(!n.defaults)return;const o=localStorage.getItem(d),s=o?JSON.parse(o):null,u=s&&typeof s=="object"&&"tokenType"in s&&s.tokenType?s.tokenType:null,y=s&&typeof s=="object"&&"accessToken"in s&&s.accessToken?s.accessToken:null,c=o?`${u} ${y}`:null;n.defaults.baseURL=i,n.defaults.headers.post["Content-Type"]=v,c&&(n.defaults.headers.common.Authorization=c)},[n.defaults,i,v,d]),null),Ve=({i18n:n,initReactI18next:i,resources:d,LanguageDetector:v})=>(n.use(v).use(i).init({debug:!1,fallbackLng:"en",interpolation:{escapeValue:!1},load:"languageOnly",react:{useSuspense:!0},resources:d,returnNull:!1}).then(()=>{document.documentElement.lang!==n.resolvedLanguage&&n.resolvedLanguage&&document.documentElement.setAttribute("lang",n.resolvedLanguage)}),n.on("languageChanged",o=>{document.documentElement.setAttribute("lang",o)}),null),Ue=({dsn:n,sentry:i})=>(m.useLayoutEffect(()=>{i.init({dsn:n,environment:"production",integrations:[new i.BrowserTracing],tracesSampleRate:1})},[n,i]),null),Be=({IMaskMixin:n,...i})=>{const d=m.useMemo(()=>n(({TextField:v,...o})=>P.jsx(v,{...o})),[n]);return P.jsx(d,{...i})},Ge=({mapbox:n,accessToken:i})=>(m.useLayoutEffect(()=>{n&&i&&(n.accessToken=i)},[i,n]),null),ze=({children:n,defaultOptions:i,QueryClient:d,QueryClientProvider:v})=>{const o=new d({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:3,...i}}});return P.jsx(v,{client:o,children:n})},Je=n=>{const{unknownErrorTranslationKey:i="error.unknownError"}=n||{},{translate:d=n==null?void 0:n.translate}=m.useContext(N);return{printError:m.useCallback(o=>{var y,c,T,_,C,S,O,D,F;const s=d?d(i):"Unknown error",{response:u}=o||{};return o!=null&&o.reason?String(o.reason):(y=u==null?void 0:u.data)!=null&&y.reason?String(u.data.reason):(c=u==null?void 0:u.data)!=null&&c.message?String(u.data.message):(_=(T=u==null?void 0:u.data)==null?void 0:T.detail)!=null&&_.length&&Array.isArray((C=u==null?void 0:u.data)==null?void 0:C.detail)&&((O=(S=u==null?void 0:u.data)==null?void 0:S.detail[0])!=null&&O.msg)&&typeof((F=(D=u==null?void 0:u.data)==null?void 0:D.detail[0])==null?void 0:F.msg)=="string"?String(u.data.detail[0].msg):s},[d,i])}},He=({data:n,fetchNextPage:i,isFetchingNextPage:d,isInitialLoading:v,isLoading:o,enabled:s=!0})=>{const u=m.useCallback(async c=>{d||!s||await i({pageParam:(c==null?void 0:c.pageParam)||c.visibleRowsCount})},[s,i,d]),y=m.useMemo(()=>{if(n)return n.pages.reduce((c,T)=>[...c,...T],[])},[n]);return{fetchNextPageOnRowsScrollEnd:u,isLoading:d||o,loadingVariant:v?"skeleton":"linear",rows:y}},Ke=n=>n.charAt(0).toUpperCase()+n.slice(1).toLowerCase(),Xe=n=>{const v=n.split("/").filter(o=>o.length>0).map(o=>o.replace(/\${([^}]*)}/g,"$1").split(/[_-]/).map(c=>c.charAt(0).toUpperCase()+c.slice(1)).join("")).join("");return v.charAt(0).toLowerCase()+v.slice(1)},Qe=(n,i,d)=>{const v=Xe(i),o=Ke(d);return`${v}${o}`};R.AxiosConfig=Ne,R.GTMSendPageView=Ye,R.I18nConfig=Ve,R.InjectDependenciesContext=N,R.InjectDependenciesProvider=Me,R.MapBoxConfig=Ge,R.MaskTextField=Be,R.QueryClientConfigProvider=ze,R.RequireAuth=We,R.SentryConfig=Ue,R.getOrvalOperationName=Qe,R.useInfiniteDataGrid=He,R.useResponseError=Je,Object.defineProperty(R,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tracktor/shared-module",
3
- "version": "0.9.2",
3
+ "version": "0.9.3",
4
4
  "type": "module",
5
5
  "license": "UNLICENSED",
6
6
  "types": "./dist/main.d.ts",