@vehiclehistory/property-lib 0.0.952 → 0.0.954

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.es.js CHANGED
@@ -624,14 +624,14 @@ const W = {
624
624
  iconColor: "text-yellow-500",
625
625
  styles: "bg-yellow-50 border-yellow-300 text-yellow-700"
626
626
  }
627
- }, { icon: i, iconColor: p, styles: u } = r[o];
627
+ }, { icon: i, iconColor: u, styles: p } = r[o];
628
628
  return /* @__PURE__ */ c(
629
629
  "div",
630
630
  {
631
631
  id: o,
632
632
  className: m(
633
633
  "rounded w-full py-2 px-4 mb-4 border",
634
- u,
634
+ p,
635
635
  e
636
636
  ),
637
637
  ...l,
@@ -641,7 +641,7 @@ const W = {
641
641
  {
642
642
  name: i,
643
643
  viewBox: "0 0 24 24",
644
- className: p,
644
+ className: u,
645
645
  size: "xSmall"
646
646
  }
647
647
  ) }),
@@ -655,7 +655,7 @@ const W = {
655
655
  "list-disc space-y-1 pl-5 mt-2 text-xs",
656
656
  a
657
657
  ),
658
- children: t.map((H, C) => /* @__PURE__ */ c("li", { children: H }, C))
658
+ children: t.map((V, C) => /* @__PURE__ */ c("li", { children: V }, C))
659
659
  }
660
660
  ) : "",
661
661
  d
@@ -674,9 +674,9 @@ const W = {
674
674
  leftIcon: o = "homeSearch",
675
675
  mobileBackdrop: r = !1,
676
676
  name: i = "",
677
- options: p = [],
678
- parentProps: u = {},
679
- placeholder: H = "",
677
+ options: u = [],
678
+ parentProps: p = {},
679
+ placeholder: V = "",
680
680
  props: C = {},
681
681
  rightIcon: f = "",
682
682
  required: g = !1,
@@ -699,7 +699,7 @@ const W = {
699
699
  "data-use-google": j,
700
700
  className: m("Autocomplete", e),
701
701
  style: w ? { ...w } : null,
702
- ...u,
702
+ ...p,
703
703
  children: [
704
704
  x && /* @__PURE__ */ M(
705
705
  "span",
@@ -750,7 +750,7 @@ const W = {
750
750
  ),
751
751
  required: g,
752
752
  autoComplete: "off",
753
- placeholder: !H && n ? " " : H,
753
+ placeholder: !V && n ? " " : V,
754
754
  type: "search",
755
755
  name: i || "search-input",
756
756
  "data-id": "search-input",
@@ -828,7 +828,7 @@ const W = {
828
828
  "data-title": b,
829
829
  "aria-labelledby": "Label",
830
830
  "aria-activedescendant": "search-item-0",
831
- children: p.length > 0 ? p.map((k, z) => /* @__PURE__ */ c(
831
+ children: u.length > 0 ? u.map((k, z) => /* @__PURE__ */ c(
832
832
  "li",
833
833
  {
834
834
  id: `search-item-${z}`,
@@ -848,7 +848,7 @@ const W = {
848
848
  ]
849
849
  }
850
850
  );
851
- }, O1 = ({
851
+ }, I1 = ({
852
852
  children: d,
853
853
  className: e,
854
854
  size: t = "sm",
@@ -878,9 +878,9 @@ const W = {
878
878
  props: o = {},
879
879
  rightIcon: r,
880
880
  rightIconProps: i = {},
881
- rounded: p = !1,
882
- size: u = "md",
883
- type: H = "button",
881
+ rounded: u = !1,
882
+ size: p = "md",
883
+ type: V = "button",
884
884
  uppercase: C = !1,
885
885
  variation: f = "primary"
886
886
  }) => {
@@ -888,13 +888,13 @@ const W = {
888
888
  return /* @__PURE__ */ M(
889
889
  g,
890
890
  {
891
- type: g !== "a" ? H : null,
891
+ type: g !== "a" ? V : null,
892
892
  className: m(
893
893
  "button",
894
894
  {
895
895
  [`button--${f}`]: f,
896
- [`button--${u}`]: u,
897
- "button--rounded": p,
896
+ [`button--${p}`]: p,
897
+ "button--rounded": u,
898
898
  "button--disabled": s,
899
899
  "button--custom-link": l,
900
900
  "button--uppercase": C,
@@ -910,7 +910,7 @@ const W = {
910
910
  y,
911
911
  {
912
912
  name: e,
913
- size: u === "md" ? "small" : "xSmall",
913
+ size: p === "md" ? "small" : "xSmall",
914
914
  viewBox: "0 0 24 24",
915
915
  ...t
916
916
  }
@@ -920,7 +920,7 @@ const W = {
920
920
  y,
921
921
  {
922
922
  name: r,
923
- size: u === "md" ? "small" : "xSmall",
923
+ size: p === "md" ? "small" : "xSmall",
924
924
  viewBox: "0 0 24 24",
925
925
  ...i
926
926
  }
@@ -939,14 +939,14 @@ const W = {
939
939
  name: o = "",
940
940
  props: r = {},
941
941
  variation: i = "primary",
942
- value: p = ""
942
+ value: u = ""
943
943
  }) => {
944
- const u = l ? "div" : "label", H = u === "label" ? { htmlFor: s } : {};
944
+ const p = l ? "div" : "label", V = p === "label" ? { htmlFor: s } : {};
945
945
  return /* @__PURE__ */ M(
946
- u,
946
+ p,
947
947
  {
948
948
  className: m("checkbox flex items-center", i, t),
949
- ...H,
949
+ ...V,
950
950
  children: [
951
951
  /* @__PURE__ */ c(
952
952
  "input",
@@ -962,7 +962,7 @@ const W = {
962
962
  id: s,
963
963
  name: o,
964
964
  type: "checkbox",
965
- value: p,
965
+ value: u,
966
966
  ...r
967
967
  }
968
968
  ),
@@ -970,7 +970,7 @@ const W = {
970
970
  ]
971
971
  }
972
972
  );
973
- }, I1 = A(K), X = ({
973
+ }, O1 = A(K), X = ({
974
974
  activator: d,
975
975
  id: e = "",
976
976
  children: t,
@@ -981,9 +981,9 @@ const W = {
981
981
  disableClose: o = !1,
982
982
  footer: r,
983
983
  fullMobile: i = !0,
984
- headerClass: p,
985
- hideClose: u = !1,
986
- iconSize: H = "medium",
984
+ headerClass: u,
985
+ hideClose: p = !1,
986
+ iconSize: V = "medium",
987
987
  preventPageScroll: C = !0,
988
988
  stickyHeader: f = !1,
989
989
  title: g = "",
@@ -1024,11 +1024,11 @@ const W = {
1024
1024
  "!pb-0 border-0 justify-end": !g,
1025
1025
  "justify-between border-b": g
1026
1026
  },
1027
- p
1027
+ u
1028
1028
  ),
1029
1029
  children: [
1030
1030
  g && /* @__PURE__ */ c("h3", { id: `${e}-dialog-title`, className: x, children: g }),
1031
- !u && /* @__PURE__ */ c(
1031
+ !p && /* @__PURE__ */ c(
1032
1032
  "button",
1033
1033
  {
1034
1034
  type: "button",
@@ -1040,7 +1040,7 @@ const W = {
1040
1040
  y,
1041
1041
  {
1042
1042
  name: "close",
1043
- size: H,
1043
+ size: V,
1044
1044
  className: "pointer-events-none"
1045
1045
  }
1046
1046
  )
@@ -1090,17 +1090,17 @@ const W = {
1090
1090
  function l({ cb: o }) {
1091
1091
  const r = document.querySelector(".loading-bar__inner");
1092
1092
  if (!r) return;
1093
- let i, p, u = !1;
1094
- function H(C) {
1093
+ let i, u, p = !1;
1094
+ function V(C) {
1095
1095
  i === void 0 && (i = C);
1096
1096
  const f = C - i;
1097
- if (p !== C) {
1097
+ if (u !== C) {
1098
1098
  const g = f / n * 101;
1099
- r.style.width = `${g}%`, e && e({ elapsed: f, percentage: g }), g >= 101 && (o && o(), u = !0, window.cancelAnimationFrame(C));
1099
+ r.style.width = `${g}%`, e && e({ elapsed: f, percentage: g }), g >= 101 && (o && o(), p = !0, window.cancelAnimationFrame(C));
1100
1100
  }
1101
- f < n && (p = C, u || window.requestAnimationFrame(H));
1101
+ f < n && (u = C, p || window.requestAnimationFrame(V));
1102
1102
  }
1103
- window.requestAnimationFrame(H);
1103
+ window.requestAnimationFrame(V);
1104
1104
  }
1105
1105
  return N(() => {
1106
1106
  l({ cb: d });
@@ -1185,9 +1185,9 @@ const W = {
1185
1185
  rounded: r = !0,
1186
1186
  showLabel: i = !1
1187
1187
  }) => {
1188
- const u = ((H, C) => {
1189
- if (H) {
1190
- const f = Number(C) / H;
1188
+ const p = ((V, C) => {
1189
+ if (V) {
1190
+ const f = Number(C) / V;
1191
1191
  return f > 1 ? 100 : f * 100;
1192
1192
  }
1193
1193
  return n;
@@ -1212,7 +1212,7 @@ const W = {
1212
1212
  "h-full text-right flex items-center justify-end rounded-full",
1213
1213
  t
1214
1214
  ),
1215
- style: { width: `${u}%` },
1215
+ style: { width: `${p}%` },
1216
1216
  children: i && /* @__PURE__ */ c(
1217
1217
  "span",
1218
1218
  {
@@ -1220,7 +1220,7 @@ const W = {
1220
1220
  "font-bold text-white text-xs mr-2",
1221
1221
  l
1222
1222
  ),
1223
- children: s || Math.round(u)
1223
+ children: s || Math.round(p)
1224
1224
  }
1225
1225
  )
1226
1226
  }
@@ -1239,12 +1239,12 @@ const W = {
1239
1239
  variation: r = "primary",
1240
1240
  value: i = ""
1241
1241
  }) => {
1242
- const p = s ? "div" : "label", u = p === "label" ? { htmlFor: a } : {};
1242
+ const u = s ? "div" : "label", p = u === "label" ? { htmlFor: a } : {};
1243
1243
  return /* @__PURE__ */ M(
1244
- p,
1244
+ u,
1245
1245
  {
1246
1246
  className: m("radio flex items-center", t),
1247
- ...u,
1247
+ ...p,
1248
1248
  children: [
1249
1249
  /* @__PURE__ */ c(
1250
1250
  "input",
@@ -1279,16 +1279,16 @@ const W = {
1279
1279
  placeholder: o = "",
1280
1280
  props: r = {},
1281
1281
  selectClass: i = "",
1282
- styles: p = null,
1283
- variation: u = "primary",
1284
- value: H
1282
+ styles: u = null,
1283
+ variation: p = "primary",
1284
+ value: V
1285
1285
  }) => {
1286
1286
  const C = o ? { defaultValue: "" } : {};
1287
1287
  return /* @__PURE__ */ M(
1288
1288
  "label",
1289
1289
  {
1290
- className: m("relative select", d, u),
1291
- style: p ? { ...p } : null,
1290
+ className: m("relative select", d, p),
1291
+ style: u ? { ...u } : null,
1292
1292
  children: [
1293
1293
  n,
1294
1294
  /* @__PURE__ */ M(
@@ -1303,7 +1303,7 @@ const W = {
1303
1303
  ),
1304
1304
  id: a,
1305
1305
  name: s,
1306
- value: H,
1306
+ value: V,
1307
1307
  ...C,
1308
1308
  ...r,
1309
1309
  children: [
@@ -1407,8 +1407,8 @@ const W = {
1407
1407
  placeholder: o = "",
1408
1408
  props: r = {},
1409
1409
  rows: i = 4,
1410
- variation: p = "primary"
1411
- }) => /* @__PURE__ */ M("div", { className: m("relative textarea", p, d), children: [
1410
+ variation: u = "primary"
1411
+ }) => /* @__PURE__ */ M("div", { className: m("relative textarea", u, d), children: [
1412
1412
  /* @__PURE__ */ c(
1413
1413
  "textarea",
1414
1414
  {
@@ -1454,15 +1454,15 @@ const W = {
1454
1454
  name: o = "",
1455
1455
  placeholder: r = "",
1456
1456
  props: i = {},
1457
- styles: p = null,
1458
- type: u = "text",
1459
- value: H,
1457
+ styles: u = null,
1458
+ type: p = "text",
1459
+ value: V,
1460
1460
  variation: C = "primary"
1461
1461
  }) => /* @__PURE__ */ M(
1462
1462
  "div",
1463
1463
  {
1464
1464
  className: m("relative textbox", C, d),
1465
- style: p ? { ...p } : null,
1465
+ style: u ? { ...u } : null,
1466
1466
  children: [
1467
1467
  n && /* @__PURE__ */ c("div", { className: "pointer-events-none absolute inset-y-0 left-0 flex items-center px-2", children: /* @__PURE__ */ c(
1468
1468
  y,
@@ -1479,8 +1479,8 @@ const W = {
1479
1479
  placeholder: r,
1480
1480
  id: s,
1481
1481
  name: o,
1482
- type: u,
1483
- value: H,
1482
+ type: p,
1483
+ value: V,
1484
1484
  autoComplete: "off",
1485
1485
  className: m(
1486
1486
  "form-input",
@@ -1644,23 +1644,23 @@ const W = {
1644
1644
  headerClass: o,
1645
1645
  list: r = !1,
1646
1646
  props: i = {},
1647
- variation: p = "primary"
1647
+ variation: u = "primary"
1648
1648
  }) => {
1649
- const u = r ? "ul" : "div";
1649
+ const p = r ? "ul" : "div";
1650
1650
  return /* @__PURE__ */ M(
1651
1651
  "div",
1652
1652
  {
1653
1653
  className: m(
1654
1654
  "content-card",
1655
1655
  { "content-card--block": d },
1656
- `content-card--${p}`,
1656
+ `content-card--${u}`,
1657
1657
  t
1658
1658
  ),
1659
1659
  ...i,
1660
1660
  children: [
1661
1661
  l && /* @__PURE__ */ c("div", { className: m("content-card__header", o), children: typeof l == "string" ? /* @__PURE__ */ c("h3", { children: l }) : l }),
1662
1662
  /* @__PURE__ */ c(
1663
- u,
1663
+ p,
1664
1664
  {
1665
1665
  className: m("content-card__content", a),
1666
1666
  role: r ? "list" : null,
@@ -1682,7 +1682,7 @@ const W = {
1682
1682
  rowGap: o = 1,
1683
1683
  value: r,
1684
1684
  valueClass: i,
1685
- wrap: p = !1
1685
+ wrap: u = !1
1686
1686
  }) => /* @__PURE__ */ M(
1687
1687
  "div",
1688
1688
  {
@@ -1691,7 +1691,7 @@ const W = {
1691
1691
  {
1692
1692
  "flex-col items-start": a === "col",
1693
1693
  "flex-row items-center": a === "row",
1694
- "flex-wrap": p
1694
+ "flex-wrap": u
1695
1695
  },
1696
1696
  e
1697
1697
  ),
@@ -1890,7 +1890,7 @@ const W = {
1890
1890
  50: "50ms"
1891
1891
  }, y1 = {
1892
1892
  "center-top": "center 30%"
1893
- }, O = {
1893
+ }, I = {
1894
1894
  animation: V1,
1895
1895
  backgroundImage: H1,
1896
1896
  fontSize: C1,
@@ -1901,7 +1901,7 @@ const W = {
1901
1901
  screens: b1,
1902
1902
  transitionDuration: A1,
1903
1903
  transformOrigin: y1
1904
- }, I = {
1904
+ }, O = {
1905
1905
  black: {
1906
1906
  50: "#FCFCFC",
1907
1907
  100: "#F9F9F9",
@@ -2009,7 +2009,7 @@ const W = {
2009
2009
  white: "hsl(0 0% 100%)",
2010
2010
  transparent: "hsl(0 0% 100% / 0)"
2011
2011
  }, s2 = {
2012
- ...I,
2012
+ ...O,
2013
2013
  ...B
2014
2014
  }, x1 = ({ matchUtilities: d, theme: e }) => d(
2015
2015
  {
@@ -2060,18 +2060,18 @@ const W = {
2060
2060
  weightProps: o = null
2061
2061
  }) => {
2062
2062
  const r = {};
2063
- Object.entries(s).forEach(([i, p]) => {
2064
- const u = {
2065
- "font-size": p,
2063
+ Object.entries(s).forEach(([i, u]) => {
2064
+ const p = {
2065
+ "font-size": u,
2066
2066
  ...a
2067
- }, H = `.${e(`${t}-${i}`)}`, C = n ? n({ sizeKey: i, sizeValue: p }) : {};
2068
- r[H] = {
2069
- ...u,
2067
+ }, V = `.${e(`${t}-${i}`)}`, C = n ? n({ sizeKey: i, sizeValue: u }) : {};
2068
+ r[V] = {
2069
+ ...p,
2070
2070
  ...C
2071
2071
  }, Object.entries(l).forEach(([f, g]) => {
2072
- const x = `.${e(`${t}-${i}-${f}`)}`, h = o ? o({ sizeKey: i, sizeValue: p, weightKey: f, weightValue: g }) : {};
2072
+ const x = `.${e(`${t}-${i}-${f}`)}`, h = o ? o({ sizeKey: i, sizeValue: u, weightKey: f, weightValue: g }) : {};
2073
2073
  r[x] = {
2074
- ...u,
2074
+ ...p,
2075
2075
  "font-weight": g,
2076
2076
  ...h
2077
2077
  };
@@ -2185,14 +2185,14 @@ const W = {
2185
2185
  }
2186
2186
  ], r2 = {
2187
2187
  theme: {
2188
- extend: O,
2189
- colors: I
2188
+ extend: I,
2189
+ colors: O
2190
2190
  },
2191
2191
  plugins: q,
2192
2192
  corePlugins: $
2193
2193
  }, l2 = {
2194
2194
  theme: {
2195
- extend: O,
2195
+ extend: I,
2196
2196
  colors: B
2197
2197
  },
2198
2198
  plugins: q,
@@ -2218,11 +2218,11 @@ function o2(d, e = []) {
2218
2218
  function c2({ cb: d, form: e, formData: t, validations: a, reactive: n = !1 }) {
2219
2219
  let s = !0;
2220
2220
  for (const [l, o] of t.entries()) {
2221
- const r = e.querySelector(`[name="${l}"]`), i = a[l], p = [];
2222
- i.forEach((u) => {
2223
- u.isValid(o) || p.push(u.message);
2224
- }), p.length ? (s = !1, r.classList.add("field-error"), d && d({ isValid: s, field: r, validations: a })) : (r.classList.remove("field-error"), d && d({ isValid: !0, field: r, validations: a })), n && (r == null || r.addEventListener("input", (u) => {
2225
- u.preventDefault(), r.classList.contains("field-error") && r.classList.remove("field-error");
2221
+ const r = e.querySelector(`[name="${l}"]`), i = a[l], u = [];
2222
+ i.forEach((p) => {
2223
+ p.isValid(o) || u.push(p.message);
2224
+ }), u.length ? (s = !1, r.classList.add("field-error"), d && d({ isValid: s, field: r, validations: a })) : (r.classList.remove("field-error"), d && d({ isValid: !0, field: r, validations: a })), n && (r == null || r.addEventListener("input", (p) => {
2225
+ p.preventDefault(), r.classList.contains("field-error") && r.classList.remove("field-error");
2226
2226
  }));
2227
2227
  }
2228
2228
  return s;
@@ -2323,10 +2323,10 @@ class h2 {
2323
2323
  }
2324
2324
  }
2325
2325
  }
2326
- class V {
2326
+ class H {
2327
2327
  static calcCrow(e, t, a, n) {
2328
- const l = V.toRad(a - e), o = V.toRad(n - t);
2329
- e = V.toRad(e), a = V.toRad(a);
2328
+ const l = H.toRad(a - e), o = H.toRad(n - t);
2329
+ e = H.toRad(e), a = H.toRad(a);
2330
2330
  const r = Math.sin(l / 2) * Math.sin(l / 2) + Math.sin(o / 2) * Math.sin(o / 2) * Math.cos(e) * Math.cos(a);
2331
2331
  return 6371 * (2 * Math.atan2(Math.sqrt(r), Math.sqrt(1 - r)));
2332
2332
  }
@@ -2341,9 +2341,9 @@ class V {
2341
2341
  return;
2342
2342
  window.dataLayer = window.dataLayer || [];
2343
2343
  const t = document.querySelectorAll("[data-div-track]");
2344
- typeof V == "function" && t.forEach((a) => {
2344
+ typeof H == "function" && t.forEach((a) => {
2345
2345
  a.addEventListener("click", () => {
2346
- V.clickTrackEvent(a.dataset.divTrack);
2346
+ H.clickTrackEvent(a.dataset.divTrack);
2347
2347
  });
2348
2348
  });
2349
2349
  }
@@ -2356,22 +2356,22 @@ class V {
2356
2356
  static async createData(e, t = null, a = !0, n = {}) {
2357
2357
  if (!t)
2358
2358
  return null;
2359
- const { tolken: s = null, ip: l = null } = await V.getHeaders(), o = a === !1 ? "" : "&tolken=" + s + "&ip=" + l, r = e + o, i = typeof t == "string" ? t : JSON.stringify(t), p = (t == null ? void 0 : t.website) ?? V.getWebsiteHeaderName();
2359
+ const { tolken: s = null, ip: l = null } = await H.getHeaders(), o = a === !1 ? "" : "&tolken=" + s + "&ip=" + l, r = e + o, i = typeof t == "string" ? t : JSON.stringify(t), u = (t == null ? void 0 : t.website) ?? H.getWebsiteHeaderName();
2360
2360
  try {
2361
- const u = await fetch(r, {
2361
+ const p = await fetch(r, {
2362
2362
  method: "POST",
2363
2363
  body: i === "null" ? null : i,
2364
2364
  headers: {
2365
- website: p
2365
+ website: u
2366
2366
  },
2367
2367
  ...n
2368
- }), H = u.headers.get("content-type");
2369
- if (H && H.indexOf("application/json") !== -1)
2370
- return u.json();
2371
- const C = await u.text();
2368
+ }), V = p.headers.get("content-type");
2369
+ if (V && V.indexOf("application/json") !== -1)
2370
+ return p.json();
2371
+ const C = await p.text();
2372
2372
  return C ? C.replace("__next", "") : null;
2373
- } catch (u) {
2374
- console.error("createData", u);
2373
+ } catch (p) {
2374
+ console.error("createData", p);
2375
2375
  }
2376
2376
  return null;
2377
2377
  }
@@ -2380,7 +2380,7 @@ class V {
2380
2380
  }
2381
2381
  static async deleteSearchValue(e = "recsSearchValue") {
2382
2382
  try {
2383
- return await V.createData(`/api/cookie/remove?name=${e}`);
2383
+ return await H.createData(`/api/cookie/remove?name=${e}`);
2384
2384
  } catch (t) {
2385
2385
  console.error("deleteSearchValue", t.message);
2386
2386
  }
@@ -2429,12 +2429,12 @@ class V {
2429
2429
  });
2430
2430
  }
2431
2431
  static async fetchData(e, t = !1, a = !0) {
2432
- const { tolken: n = null, ip: s = null } = await V.getHeaders(), o = e.replace("#", "").replace("%23", "") + "&tolken=" + n + "&ip=" + s;
2432
+ const { tolken: n = null, ip: s = null } = await H.getHeaders(), o = e.replace("#", "").replace("%23", "") + "&tolken=" + n + "&ip=" + s;
2433
2433
  try {
2434
2434
  const r = await fetch(o, { method: "GET" });
2435
2435
  if (t === !0) {
2436
- const p = await r.text();
2437
- return p ? p.replace("__next", "") : null;
2436
+ const u = await r.text();
2437
+ return u ? u.replace("__next", "") : null;
2438
2438
  }
2439
2439
  const i = r.headers.get("content-type");
2440
2440
  return i && i.indexOf("application/json") !== -1 ? r.json() : null;
@@ -2449,8 +2449,8 @@ class V {
2449
2449
  }
2450
2450
  static formatDate(e = null) {
2451
2451
  return e ? (e = new Date(e), [
2452
- V.padTo2Digits(e.getMonth() + 1),
2453
- V.padTo2Digits(e.getDate()),
2452
+ H.padTo2Digits(e.getMonth() + 1),
2453
+ H.padTo2Digits(e.getDate()),
2454
2454
  e.getFullYear()
2455
2455
  ].join("-")) : null;
2456
2456
  }
@@ -2499,8 +2499,8 @@ class V {
2499
2499
  if (t === "license" || t === "license-plate")
2500
2500
  return "/report/license-plate";
2501
2501
  }
2502
- static async getHeaders(e = 300) {
2503
- var o;
2502
+ static async getHeaders(e = 600) {
2503
+ var r;
2504
2504
  const {
2505
2505
  userAgent: t = null,
2506
2506
  userAgentData: a = null,
@@ -2511,13 +2511,32 @@ class V {
2511
2511
  userAgent: t,
2512
2512
  platform: s
2513
2513
  };
2514
- if ((o = window == null ? void 0 : window.options) != null && o.isPdf)
2514
+ if (typeof window.localStorage > "u")
2515
+ return l;
2516
+ const o = localStorage.getItem("headerSessionId");
2517
+ if (o) {
2518
+ const i = JSON.parse(o), u = (/* @__PURE__ */ new Date()).getTime();
2519
+ return console.log(i.expire, u), i.expire - u < 0 && localStorage.removeItem("headerSessionId"), {
2520
+ tolken: i.tolken,
2521
+ ip: i.ip,
2522
+ userAgent: t,
2523
+ platform: s
2524
+ };
2525
+ }
2526
+ if ((r = window == null ? void 0 : window.options) != null && r.isPdf)
2515
2527
  return l;
2516
2528
  try {
2517
- const i = await (await fetch("/api/headers")).json(), p = (i == null ? void 0 : i.sessionId) ?? "sessionId", u = (i == null ? void 0 : i.ip) ?? null;
2518
- return { tolken: p, ip: u, userAgent: t, platform: s };
2519
- } catch (r) {
2520
- console.error("getHeaders", r);
2529
+ const u = await (await fetch("/api/client-headers")).json(), p = (u == null ? void 0 : u.sessionId) ?? "noSessionId", V = (u == null ? void 0 : u.ip) ?? null;
2530
+ return localStorage.setItem(
2531
+ "headerSessionId",
2532
+ JSON.stringify({
2533
+ tolken: p,
2534
+ ip: V,
2535
+ expire: (/* @__PURE__ */ new Date()).getTime() + e
2536
+ })
2537
+ ), { tolken: p, ip: V, userAgent: t, platform: s };
2538
+ } catch (i) {
2539
+ console.error("getHeaders", i);
2521
2540
  }
2522
2541
  return l;
2523
2542
  }
@@ -2528,19 +2547,19 @@ class V {
2528
2547
  }[e];
2529
2548
  }
2530
2549
  static async getLocationData(e) {
2531
- const { swLat: t, neLng: a, neLat: n, swLng: s } = V.getBounds(e, 3, 0.05), l = "zip-location&swLat=" + t + "&neLng=" + a + "&neLat=" + n + "&swLng=" + s;
2532
- return await V.fetchData("/api/client?query=" + l);
2550
+ const { swLat: t, neLng: a, neLat: n, swLng: s } = H.getBounds(e, 3, 0.05), l = "zip-location&swLat=" + t + "&neLng=" + a + "&neLat=" + n + "&swLng=" + s;
2551
+ return await H.fetchData("/api/client?query=" + l);
2533
2552
  }
2534
2553
  static getReportUrl(e, t = null) {
2535
- var r, i, p;
2536
- const a = ((r = e == null ? void 0 : e.state) == null ? void 0 : r.slug) ?? null, n = ((i = e == null ? void 0 : e.city) == null ? void 0 : i.slug) ?? null, s = ((p = e == null ? void 0 : e.name) == null ? void 0 : p.slug) ?? null, l = (e == null ? void 0 : e.zip) ?? null;
2554
+ var r, i, u;
2555
+ const a = ((r = e == null ? void 0 : e.state) == null ? void 0 : r.slug) ?? null, n = ((i = e == null ? void 0 : e.city) == null ? void 0 : i.slug) ?? null, s = ((u = e == null ? void 0 : e.name) == null ? void 0 : u.slug) ?? null, l = (e == null ? void 0 : e.zip) ?? null;
2537
2556
  t = t || ((e == null ? void 0 : e.id) ?? null);
2538
- const o = [l, "-piq", t].filter((u) => u).join("");
2539
- return "/" + [a, n, s].filter((u) => u).map((u) => V.toSlug(u)).join("/") + "/" + o;
2557
+ const o = [l, "-piq", t].filter((p) => p).join("");
2558
+ return "/" + [a, n, s].filter((p) => p).map((p) => H.toSlug(p)).join("/") + "/" + o;
2540
2559
  }
2541
2560
  static async getSearchValue(e = "recsSearchValue") {
2542
2561
  try {
2543
- return await V.createData(`/api/cookie/fetch?name=${e}`);
2562
+ return await H.createData(`/api/cookie/fetch?name=${e}`);
2544
2563
  } catch (t) {
2545
2564
  console.error("getSearchValue", t.message);
2546
2565
  }
@@ -2668,7 +2687,7 @@ class V {
2668
2687
  if ((e = window == null ? void 0 : window.options) != null && e.isPdf)
2669
2688
  return null;
2670
2689
  try {
2671
- return await V.createData("/api/cookie/fetch?name=odrUser");
2690
+ return await H.createData("/api/cookie/fetch?name=odrUser");
2672
2691
  } catch (t) {
2673
2692
  console.error("getUser", t.message);
2674
2693
  }
@@ -2684,7 +2703,7 @@ class V {
2684
2703
  uuid: t
2685
2704
  }
2686
2705
  });
2687
- return await V.makeSearchFetchCall(
2706
+ return await H.makeSearchFetchCall(
2688
2707
  `/api/client?query=user-get-history&filter=${a}`
2689
2708
  );
2690
2709
  }
@@ -2746,7 +2765,7 @@ class V {
2746
2765
  selfClose: l = !1,
2747
2766
  target: o = null
2748
2767
  }) {
2749
- const r = o ? document.querySelectorAll(o) : [], i = document.getElementById(`${t}-dialog`), p = l ? i == null ? void 0 : i.querySelectorAll("[data-dialog-close]") : document.querySelectorAll("[data-dialog-close]"), u = [
2768
+ const r = o ? document.querySelectorAll(o) : [], i = document.getElementById(`${t}-dialog`), u = l ? i == null ? void 0 : i.querySelectorAll("[data-dialog-close]") : document.querySelectorAll("[data-dialog-close]"), p = [
2750
2769
  "closing",
2751
2770
  "closed",
2752
2771
  "opening",
@@ -2759,22 +2778,22 @@ class V {
2759
2778
  [v]: new Event(v)
2760
2779
  }),
2761
2780
  {}
2762
- ), H = new MutationObserver((h, v) => {
2781
+ ), V = new MutationObserver((h, v) => {
2763
2782
  h.forEach(async (w) => {
2764
2783
  if (w.attributeName === "open") {
2765
2784
  const b = w.target;
2766
2785
  if (!(b == null ? void 0 : b.hasAttribute("open"))) return;
2767
- b == null || b.removeAttribute("inert"), b == null || b.dispatchEvent(u.opening), b && await x(b), b == null || b.dispatchEvent(u.opened);
2786
+ b == null || b.removeAttribute("inert"), b == null || b.dispatchEvent(p.opening), b && await x(b), b == null || b.dispatchEvent(p.opened);
2768
2787
  }
2769
2788
  });
2770
2789
  }), C = new MutationObserver((h, v) => {
2771
2790
  h.forEach((w) => {
2772
2791
  w.removedNodes.forEach((b) => {
2773
- b.nodeName === "DIALOG" && (b.removeEventListener("click", g), b.removeEventListener("close", f), b.dispatchEvent(u.removed), C == null || C.disconnect(), H == null || H.disconnect());
2792
+ b.nodeName === "DIALOG" && (b.removeEventListener("click", g), b.removeEventListener("close", f), b.dispatchEvent(p.removed), C == null || C.disconnect(), V == null || V.disconnect());
2774
2793
  });
2775
2794
  });
2776
2795
  });
2777
- i && (H.observe(i, {
2796
+ i && (V.observe(i, {
2778
2797
  attributes: !0
2779
2798
  }), C.observe(document.body, {
2780
2799
  attributes: !1,
@@ -2782,9 +2801,9 @@ class V {
2782
2801
  childList: !0
2783
2802
  }));
2784
2803
  const f = async ({ target: h }) => {
2785
- h == null || h.classList.add("closing"), h == null || h.setAttribute("inert", ""), h == null || h.dispatchEvent(u.closing), h && await x(h), h == null || h.classList.remove("closing"), h == null || h.dispatchEvent(u.closed);
2804
+ h == null || h.classList.add("closing"), h == null || h.setAttribute("inert", ""), h == null || h.dispatchEvent(p.closing), h && await x(h), h == null || h.classList.remove("closing"), h == null || h.dispatchEvent(p.closed);
2786
2805
  }, g = async ({ target: h }) => {
2787
- (h == null ? void 0 : h.nodeName) === "DIALOG" && (h == null || h.dispatchEvent(u.outside), i == null || i.close("outside"));
2806
+ (h == null ? void 0 : h.nodeName) === "DIALOG" && (h == null || h.dispatchEvent(p.outside), i == null || i.close("outside"));
2788
2807
  }, x = (h) => Promise.allSettled(
2789
2808
  h == null ? void 0 : h.getAnimations().map((v) => v == null ? void 0 : v.finished)
2790
2809
  );
@@ -2800,7 +2819,7 @@ class V {
2800
2819
  h.addEventListener("click", (v) => {
2801
2820
  i == null || i.showModal(), s && s(v, i);
2802
2821
  });
2803
- }), p == null || p.forEach((h) => {
2822
+ }), u == null || u.forEach((h) => {
2804
2823
  h.addEventListener("click", async (v) => {
2805
2824
  i == null || i.close("close");
2806
2825
  });
@@ -2810,7 +2829,7 @@ class V {
2810
2829
  };
2811
2830
  }
2812
2831
  static hasBoundsEntry(e, t = "bounds") {
2813
- return V.getBoundsEntries(t).includes(e);
2832
+ return H.getBoundsEntries(t).includes(e);
2814
2833
  }
2815
2834
  static initObserver(e, t, a = null) {
2816
2835
  if (!e)
@@ -2869,7 +2888,7 @@ class V {
2869
2888
  url: n,
2870
2889
  data: s
2871
2890
  };
2872
- return await V.createData("/api/client?query=log/save&method=POST", l), null;
2891
+ return await H.createData("/api/client?query=log/save&method=POST", l), null;
2873
2892
  }
2874
2893
  static loadAds() {
2875
2894
  window.dataLayer = window.dataLayer || [];
@@ -2887,7 +2906,7 @@ class V {
2887
2906
  if (e) {
2888
2907
  const s = "/scripts/" + e + ".js?v=" + n;
2889
2908
  try {
2890
- return await V.injectScript({
2909
+ return await H.injectScript({
2891
2910
  src: s,
2892
2911
  id: t || e,
2893
2912
  async: !1,
@@ -2903,11 +2922,11 @@ class V {
2903
2922
  if (window.options.googleMapsLoaded === !0)
2904
2923
  return;
2905
2924
  const e = "https://maps.googleapis.com/maps/api/js", t = window.options.googleApiKey, a = e + "?key=" + t + "&libraries=marker&v=beta&callback=mapCb";
2906
- await V.injectScript({ src: a, id: "googleapis", async: !1 });
2925
+ await H.injectScript({ src: a, id: "googleapis", async: !1 });
2907
2926
  }
2908
2927
  static async loadLeafletApi() {
2909
2928
  const e = "/leaflet/leaflet.js", t = "/leaflet/leaflet.css", a = "/leaflet/leaflet-gesture-handling.min.js", n = "/leaflet/leaflet-gesture-handling.min.css";
2910
- await V.injectLink({ href: t, id: "leafletCss" }), await V.injectLink({ href: n, id: "gestureCss" }), await V.injectScript({ src: e, id: "leafletJs", async: !1 }), await V.injectScript({
2929
+ await H.injectLink({ href: t, id: "leafletCss" }), await H.injectLink({ href: n, id: "gestureCss" }), await H.injectScript({ src: e, id: "leafletJs", async: !1 }), await H.injectScript({
2911
2930
  src: a,
2912
2931
  id: "gestureJs",
2913
2932
  async: !1
@@ -2922,7 +2941,7 @@ class V {
2922
2941
  }
2923
2942
  static async loadSwiper() {
2924
2943
  const e = "/slider/swiper-bundle.min.js";
2925
- await V.injectLink({ href: "/slider/swiper-bundle.min.css", id: "swiperCss" }), await V.injectScript({ src: e, id: "swiperJs", async: !1 });
2944
+ await H.injectLink({ href: "/slider/swiper-bundle.min.css", id: "swiperCss" }), await H.injectScript({ src: e, id: "swiperJs", async: !1 });
2926
2945
  }
2927
2946
  static async makeSearchFetchCall(e) {
2928
2947
  try {
@@ -2959,13 +2978,13 @@ class V {
2959
2978
  max: o = null,
2960
2979
  city: r = null,
2961
2980
  state: i = null,
2962
- vin: p = null,
2963
- license: u = null,
2964
- token: H = null,
2981
+ vin: u = null,
2982
+ license: p = null,
2983
+ token: V = null,
2965
2984
  phone: C = null
2966
2985
  } = e || {}, f = t && t !== "", g = l && l !== "" && l !== "18", x = o && o !== "" && l !== "99";
2967
2986
  let h = [];
2968
- return t && t !== "" && h.push("name=" + t), f || (a && a !== "" && h.push("first=" + a), n && n !== "" && h.push("middle=" + n), s && s !== "" && h.push("last=" + s)), g && x ? parseInt(l) > parseInt(o) ? (h.push("min=" + o), h.push("max=" + l)) : (h.push("min=" + l), h.push("max=" + o)) : (g && h.push("min=" + l), x && h.push("max=" + o)), C && C !== "" && h.push("phone=" + C), r && r !== "" && h.push("city=" + r), u && u !== "" && h.push("license=" + u), p && p !== "" && h.push("vin=" + p), i && i !== "" && h.push("state=" + i), H && H !== "" && h.push("token=" + H), h.join("&");
2987
+ return t && t !== "" && h.push("name=" + t), f || (a && a !== "" && h.push("first=" + a), n && n !== "" && h.push("middle=" + n), s && s !== "" && h.push("last=" + s)), g && x ? parseInt(l) > parseInt(o) ? (h.push("min=" + o), h.push("max=" + l)) : (h.push("min=" + l), h.push("max=" + o)) : (g && h.push("min=" + l), x && h.push("max=" + o)), C && C !== "" && h.push("phone=" + C), r && r !== "" && h.push("city=" + r), p && p !== "" && h.push("license=" + p), u && u !== "" && h.push("vin=" + u), i && i !== "" && h.push("state=" + i), V && V !== "" && h.push("token=" + V), h.join("&");
2969
2988
  }
2970
2989
  static padTo2Digits(e) {
2971
2990
  return e.toString().padStart(2, "0");
@@ -2983,11 +3002,11 @@ class V {
2983
3002
  useLocation: o = !0,
2984
3003
  state: r = "",
2985
3004
  useGoogle: i = !1,
2986
- useGoogleOverride: p = !1,
2987
- useAmazonOverride: u = !1,
2988
- isSandboxAccount: H = !1,
3005
+ useGoogleOverride: u = !1,
3006
+ useAmazonOverride: p = !1,
3007
+ isSandboxAccount: V = !1,
2989
3008
  isOptOutSearch: C = !1
2990
- } = t ?? {}, { tolken: f = null, ip: g = null } = await V.getHeaders(), h = [
3009
+ } = t ?? {}, { tolken: f = null, ip: g = null } = await H.getHeaders(), h = [
2991
3010
  "query=" + encodeURIComponent(this.cleanupAddress(e)),
2992
3011
  "addressesOnly=" + a,
2993
3012
  "useSearch=" + l,
@@ -2995,14 +3014,14 @@ class V {
2995
3014
  "useCityStateSearch=" + s,
2996
3015
  "useLocation=" + o,
2997
3016
  "useGoogle=" + i,
2998
- "useGoogleOverride=" + p,
2999
- "useAmazonOverride=" + u,
3000
- "isSandboxAccount=" + H,
3017
+ "useGoogleOverride=" + u,
3018
+ "useAmazonOverride=" + p,
3019
+ "isSandboxAccount=" + V,
3001
3020
  "isOptOutSearch=" + C
3002
3021
  ];
3003
3022
  r && r !== "" && !s && h.push("state=" + r), f && f !== "" && h.push("tolken=" + f), g && g !== "" && h.push("ip=" + g);
3004
3023
  const v = h.join("&"), b = (n || s ? "/api/autocomplete-city" : "/api/autocomplete") + "?" + v;
3005
- return await V.makeSearchFetchCall(b);
3024
+ return await H.makeSearchFetchCall(b);
3006
3025
  }
3007
3026
  static removeElements(e) {
3008
3027
  document.querySelectorAll(e).forEach((t) => t == null ? void 0 : t.remove());
@@ -3021,7 +3040,7 @@ class V {
3021
3040
  });
3022
3041
  }
3023
3042
  static searchInStates(e) {
3024
- const t = V.getStates(), a = e.toLowerCase();
3043
+ const t = H.getStates(), a = e.toLowerCase();
3025
3044
  let n = t.find((s) => s.short.toLowerCase() === a) ?? null;
3026
3045
  return n || (n = t.find((s) => s.name.toLowerCase() === a) ?? null), n;
3027
3046
  }
@@ -3029,7 +3048,7 @@ class V {
3029
3048
  typeof woopra == "object" && woopra.track(e, t);
3030
3049
  }
3031
3050
  static setBoundsEntries(e, t = "bounds") {
3032
- const a = V.getBoundsEntries(t);
3051
+ const a = H.getBoundsEntries(t);
3033
3052
  a.push(e), localStorage.setItem(t, JSON.stringify(a));
3034
3053
  }
3035
3054
  static async setCityState(e = null) {
@@ -3038,7 +3057,7 @@ class V {
3038
3057
  return e;
3039
3058
  t = t.toLowerCase().replace(" usa", "").replace("city or state", "").replace(" state", "").trim();
3040
3059
  let [a = null, n = null] = t.split(",").map((s) => s.trim());
3041
- if (V.getStates(), a && !n) {
3060
+ if (H.getStates(), a && !n) {
3042
3061
  const s = this.searchInStates(a);
3043
3062
  s && (a = null, n = s.short);
3044
3063
  }
@@ -3063,16 +3082,16 @@ class V {
3063
3082
  static async setRandomFileNameVersion(e, t = "scripts") {
3064
3083
  const a = Date.now(), n = typeof window < "u" ? window.location.origin : "", s = t ? `/${t}/` : "/";
3065
3084
  try {
3066
- const l = e.map(({ fileName: i, initFunctionName: p }) => import(`${n}${s}${i}?v=${a}`)), o = await Promise.all(l), r = [];
3067
- o.forEach((i, p) => {
3068
- i && typeof i[e[p].initFunctionName] == "function" ? r.push(i[e[p].initFunctionName]()) : console.error(`error loading ${e[p].initFunctionName}()`);
3085
+ const l = e.map(({ fileName: i, initFunctionName: u }) => import(`${n}${s}${i}?v=${a}`)), o = await Promise.all(l), r = [];
3086
+ o.forEach((i, u) => {
3087
+ i && typeof i[e[u].initFunctionName] == "function" ? r.push(i[e[u].initFunctionName]()) : console.error(`error loading ${e[u].initFunctionName}()`);
3069
3088
  }), r.length > 0 && await Promise.all(r);
3070
3089
  } catch (l) {
3071
3090
  console.error("Failed to load one or more search modules:", l);
3072
3091
  }
3073
3092
  }
3074
3093
  static async setSearchValueClient(e, t = "recsSearchValue", a = {}) {
3075
- localStorage.setItem(t, JSON.stringify(e)), await V.createData(
3094
+ localStorage.setItem(t, JSON.stringify(e)), await H.createData(
3076
3095
  `/api/cookie/create?name=${t}`,
3077
3096
  e,
3078
3097
  !0,
@@ -3104,7 +3123,7 @@ class V {
3104
3123
  return t.charAt(0).toUpperCase() + t.slice(1);
3105
3124
  }
3106
3125
  static useLayerTitle(e, t) {
3107
- const a = V.getLayerTitle(e);
3126
+ const a = H.getLayerTitle(e);
3108
3127
  L.tileLayer(a, {
3109
3128
  maxNativeZoom: 19,
3110
3129
  maxZoom: 25,
@@ -3113,7 +3132,7 @@ class V {
3113
3132
  }).addTo(t);
3114
3133
  }
3115
3134
  static ucWords(e) {
3116
- return e ? e.toString().split(" ").map((t) => V.ucFirst(t)).join(" ") : null;
3135
+ return e ? e.toString().split(" ").map((t) => H.ucFirst(t)).join(" ") : null;
3117
3136
  }
3118
3137
  /**
3119
3138
  * HOW TO USE EVENTS
@@ -3159,11 +3178,11 @@ export {
3159
3178
  F1 as Accordion,
3160
3179
  D1 as Alert,
3161
3180
  T1 as Autocomplete,
3162
- O1 as Badge,
3181
+ I1 as Badge,
3163
3182
  F as Button,
3164
3183
  h2 as CardSlider,
3165
- I1 as Checkbox,
3166
- V as Common,
3184
+ O1 as Checkbox,
3185
+ H as Common,
3167
3186
  K1 as ContactForm,
3168
3187
  X1 as ContentCard,
3169
3188
  B1 as Dialog,
@@ -3190,7 +3209,7 @@ export {
3190
3209
  s2 as colors,
3191
3210
  $ as corePlugins,
3192
3211
  l2 as elerisPreset,
3193
- O as extensions,
3212
+ I as extensions,
3194
3213
  q as plugins,
3195
3214
  r2 as propertyPreset,
3196
3215
  o2 as removeClass,