@getcredify/credify-insurance-widget 1.48.0 → 1.49.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.
Files changed (53) hide show
  1. package/dist/{address-BEVwov8q-CtbG3tfj.js → address-BEVwov8q-CazC1JIl.js} +1 -1
  2. package/dist/{api-FFY6fre4.js → api-Bepbbwlb.js} +15 -15
  3. package/dist/{car-C4roRGIN.js → car-B21VP4YN.js} +1 -1
  4. package/dist/{check-5ywqVwF9.js → check-CwRR4vvM.js} +1 -1
  5. package/dist/{copy-applicant-offer-UApiJBeU-6X1OfCXd.js → copy-applicant-offer-B-BuqAOO-a4y-KPDr.js} +11 -11
  6. package/dist/{copy-from-record-DL503itm-B5M9p1aR.js → copy-from-record-DL503itm-2slKSwa4.js} +4 -4
  7. package/dist/{coverageDerivation-CV2ORogj-C4Tevu9q.js → coverageDerivation-CV2ORogj-BoLiDnjR.js} +1 -1
  8. package/dist/{fixtures-ijbZ16Zg-C7CkQCGW.js → fixtures-ijbZ16Zg-CwFDJNFI.js} +1 -1
  9. package/dist/{household-prefill-BwSS00qI-Bxr1Is5P.js → household-prefill-CdB4ZxsR-D4_lkTx8.js} +26 -26
  10. package/dist/{householdPrefill-DLm3pxFH-BcyrqxRq.js → householdPrefill-DLm3pxFH-dPJrX2ul.js} +1 -1
  11. package/dist/iframe/assets/{address-BEVwov8q-Bjv6MIfT.js → address-BEVwov8q-EtrExGBv.js} +1 -1
  12. package/dist/iframe/assets/{car-D1-bpPP6.js → car-lKtbZzIv.js} +1 -1
  13. package/dist/iframe/assets/{check-Dby5nO_M.js → check-DafU7JDn.js} +1 -1
  14. package/dist/iframe/assets/{copy-applicant-offer-UApiJBeU-D2hxv9k7.js → copy-applicant-offer-B-BuqAOO-CtFqk8YK.js} +1 -1
  15. package/dist/iframe/assets/{copy-from-record-DL503itm-KY0q_TtI.js → copy-from-record-DL503itm-BXJJYs1Y.js} +1 -1
  16. package/dist/iframe/assets/{coverageDerivation-CV2ORogj-DnNTue88.js → coverageDerivation-CV2ORogj-Dne34PDQ.js} +1 -1
  17. package/dist/iframe/assets/{dob-calendar-RIJ5S6YU-DDSHfA2t.js → dob-calendar-RIJ5S6YU-BfbUKPI9.js} +1 -1
  18. package/dist/iframe/assets/{fixtures-ijbZ16Zg-kEYhiItG.js → fixtures-ijbZ16Zg-D-3ehYX7.js} +1 -1
  19. package/dist/iframe/assets/{household-prefill-BwSS00qI-fvGXj4Ih.js → household-prefill-CdB4ZxsR-BPthWPX-.js} +1 -1
  20. package/dist/iframe/assets/{householdPrefill-DLm3pxFH-xdUCbCYH.js → householdPrefill-DLm3pxFH-jl-HbpRV.js} +1 -1
  21. package/dist/iframe/assets/iframe-ZamrsKm7.js +107 -0
  22. package/dist/iframe/assets/{index-CqjzcFiq.js → index-BeV6waqv.js} +1 -1
  23. package/dist/iframe/assets/intake-review-panel-BJRYQaBx-CIkJtRek.js +1 -0
  24. package/dist/iframe/assets/{mockJump-DCZoGtRl-36W1hR0W.js → mockJump-CKjCOGxR-tRN3Jwzq.js} +1 -1
  25. package/dist/iframe/assets/{payload-DurIYSZk-COUWlGbP.js → payload-BMtl8VDy-DSIXtfb-.js} +1 -1
  26. package/dist/iframe/assets/{question-list-CjN64tfw-DcMrD36l.js → question-list-BK2EN74l-8nbZZnvU.js} +3 -3
  27. package/dist/iframe/assets/{rates-panel-B1xVYtTQ-CL1y9CqV.js → rates-panel-BOaKRZ_Y-DspzIEmi.js} +3 -3
  28. package/dist/iframe/assets/{review-panel-DuzWoTKP-DSKT5yTF.js → review-panel-BQmrPgdC-Dh84GHcf.js} +2 -2
  29. package/dist/iframe/assets/{stage-CnucLiNn-BR-spl1Z.js → stage-zClSIgVN-CQ0m7lYx.js} +1 -1
  30. package/dist/iframe/assets/{validation-Db4WCn17-C0CXVR_C.js → validation-D9L1J71d-D-I9M7xX.js} +2 -2
  31. package/dist/iframe/assets/{vehicleCoverage-CDBtkdww-DXXIbGVV.js → vehicleCoverage-CgeEazR0-DlDAnkau.js} +1 -1
  32. package/dist/iframe/assets/{visibility-iwttXt0y-DkmB_m7Z.js → visibility-xQNTF1no-_O_ggMOv.js} +1 -1
  33. package/dist/iframe/assets/{waves-DIsSB_DU.js → waves-CGWFF4s2.js} +1 -1
  34. package/dist/iframe/iframe.html +1 -1
  35. package/dist/{index-CK3tklPT.js → index-DbadJytg.js} +1 -1
  36. package/dist/index.es.js +1 -1
  37. package/dist/index.umd.js +103 -103
  38. package/dist/intake-review-panel-BJRYQaBx-Bb4VAszN.js +224 -0
  39. package/dist/{mockJump-DCZoGtRl-BmpMdaSt.js → mockJump-CKjCOGxR-Boxby2dZ.js} +1 -1
  40. package/dist/{payload-DurIYSZk-C0uMF9Tq.js → payload-BMtl8VDy-maqSOQIZ.js} +20 -20
  41. package/dist/{question-list-CjN64tfw-DFqbiQWc.js → question-list-BK2EN74l-Cn9ka_Tm.js} +13 -13
  42. package/dist/{rates-panel-B1xVYtTQ-Cj9JDZXZ.js → rates-panel-BOaKRZ_Y-ciWr81fl.js} +47 -47
  43. package/dist/{review-panel-DuzWoTKP-BLy4wrtf.js → review-panel-BQmrPgdC-CXP39hws.js} +98 -98
  44. package/dist/{stage-CnucLiNn-B6xWk5jk.js → stage-zClSIgVN-CC_teHAO.js} +26 -26
  45. package/dist/{validation-Db4WCn17-TOMPypn_.js → validation-D9L1J71d-BF62B66y.js} +22 -17
  46. package/dist/{vehicleCoverage-CDBtkdww-VeL7TnDy.js → vehicleCoverage-CgeEazR0-C3ugp85r.js} +8 -8
  47. package/dist/{visibility-iwttXt0y-DOQ-bNNl.js → visibility-xQNTF1no-t9wamJ9M.js} +7 -7
  48. package/dist/{waves-Cx-ZZIde.js → waves-BpyYhsaC.js} +1 -1
  49. package/dist/{widget-DcTSEv8D.js → widget-fDShn8w9.js} +2873 -2849
  50. package/package.json +2 -2
  51. package/dist/iframe/assets/iframe-7bSlpZsw.js +0 -107
  52. package/dist/iframe/assets/intake-review-panel-CjiYTJXh-DDHj7c_F.js +0 -1
  53. package/dist/intake-review-panel-CjiYTJXh-7Uej_QY4.js +0 -186
@@ -1,4 +1,4 @@
1
- import { t as _ } from "./widget-DcTSEv8D.js";
1
+ import { s as _ } from "./widget-fDShn8w9.js";
2
2
  (function() {
3
3
  if (typeof t > "u")
4
4
  var t = { env: {} };
@@ -1,12 +1,12 @@
1
- import { j as i, e as o, A as t, P as r, a as u, d as l, X as n, r as d, q as p, b as f, H as g, Y as c, Q as m, c as S, h as T, k as h, F as y, M as Q, N as k, f as A, g as E, D as R, _ as v, x as P, E as C, O as _, J as O, i as U, v as V, Z as b, S as D, B as F, R as I, n as B, u as K, T as L, l as M, C as Y, w as Z, m as q, V as x, o as G, z as H, y as N, p as j, s as w } from "./widget-DcTSEv8D.js";
1
+ import { P as i, e as t, N as o, a as r, j as u, d as l, Z as n, i as d, J as p, t as f, W as g, k as c, $ as m, X as S, h as T, b as h, F as y, M as k, c as A, A as E, f as Q, D as v, _ as P, x as R, E as C, O as U, Y as _, g as O, v as V, l as b, S as D, H as F, B as I, n as B, u as K, T as L, m as M, C as Y, w as Z, o as q, V as x, U as G, p as H, y as N, q as W, r as j } from "./widget-fDShn8w9.js";
2
2
  (function() {
3
3
  if (typeof e > "u")
4
4
  var e = { env: {} };
5
5
  })();
6
6
  export {
7
7
  i as AUTH_TOKEN_STORAGE_KEY,
8
- o as CredifyApiError,
9
- t as QUOTE_ID_STORAGE_KEY,
8
+ t as CredifyApiError,
9
+ o as QUOTE_ID_STORAGE_KEY,
10
10
  r as applyDriverPrefill,
11
11
  u as applyVehiclePrefill,
12
12
  l as bodyWithQuoteId,
@@ -21,17 +21,17 @@ export {
21
21
  T as createQuote,
22
22
  h as decodeVin,
23
23
  y as dismissDriverPrefill,
24
- Q as dismissVehiclePrefill,
25
- k as fetchDriverPrefillSuggestions,
26
- A as fetchVehiclePrefillSuggestions,
27
- E as getApiConfig,
28
- R as getQuestionsByStage,
29
- v as getQuote,
30
- P as getRates,
24
+ k as dismissVehiclePrefill,
25
+ A as fetchDriverPrefillSuggestions,
26
+ E as fetchVehiclePrefillSuggestions,
27
+ Q as getApiConfig,
28
+ v as getQuestionsByStage,
29
+ P as getQuote,
30
+ R as getRates,
31
31
  C as getStagesForQuote,
32
- _ as getVehicleOptions,
33
- O as hasResumeToken,
34
- U as isMockEnabled,
32
+ U as getVehicleOptions,
33
+ _ as hasResumeToken,
34
+ O as isMockEnabled,
35
35
  V as isSupportedState,
36
36
  b as isTestModeEnabled,
37
37
  D as issueResumeLink,
@@ -48,6 +48,6 @@ export {
48
48
  G as saveAuthToken,
49
49
  H as saveQuoteId,
50
50
  N as sendSmsCode,
51
- j as updateQuote,
52
- w as verifySmsCode
51
+ W as updateQuote,
52
+ j as verifySmsCode
53
53
  };
@@ -1,4 +1,4 @@
1
- import { a6 as e } from "./widget-DcTSEv8D.js";
1
+ import { a7 as e } from "./widget-fDShn8w9.js";
2
2
  (function() {
3
3
  if (typeof c > "u")
4
4
  var c = { env: {} };
@@ -1,4 +1,4 @@
1
- import { a6 as c } from "./widget-DcTSEv8D.js";
1
+ import { a7 as c } from "./widget-fDShn8w9.js";
2
2
  (function() {
3
3
  if (typeof e > "u")
4
4
  var e = { env: {} };
@@ -1,6 +1,6 @@
1
- import { t as d } from "./widget-DcTSEv8D.js";
2
- import { k as y, j as h } from "./visibility-iwttXt0y-DOQ-bNNl.js";
3
- import { u as m, l as f, s as c } from "./copy-from-record-DL503itm-B5M9p1aR.js";
1
+ import { s as d } from "./widget-fDShn8w9.js";
2
+ import { k as y, j as h } from "./visibility-xQNTF1no-t9wamJ9M.js";
3
+ import { u as m, l as f, s as c } from "./copy-from-record-DL503itm-2slKSwa4.js";
4
4
  import { useMemo as p, useCallback as b } from "react";
5
5
  import { jsx as g } from "react/jsx-runtime";
6
6
  (function() {
@@ -21,7 +21,7 @@ var O = /* @__PURE__ */ d({ CopyApplicantOffer: () => v }), k = {
21
21
  applyLabel: "Use the SSN"
22
22
  }
23
23
  }, v = ({ stage: a, questions: n, values: t, onPatch: u }) => {
24
- let e = k[a], i = p(() => e ? y(n, t, a) : [], [
24
+ let e = k[a], s = p(() => e ? y(n, t, a) : [], [
25
25
  e,
26
26
  n,
27
27
  t,
@@ -29,24 +29,24 @@ var O = /* @__PURE__ */ d({ CopyApplicantOffer: () => v }), k = {
29
29
  ]), r = b((o) => e ? m({
30
30
  kind: e.kind,
31
31
  source: h(t, "drivers")[o] ?? {},
32
- targetQuestions: i
32
+ targetQuestions: s
33
33
  }) : {}, [
34
34
  e,
35
35
  t,
36
- i
37
- ]), l = p(() => e ? f(t).filter((o) => Object.keys(r(o.index)).length > 0) : [], [
36
+ s
37
+ ]), i = p(() => e ? f(t).filter((o) => Object.keys(r(o.index)).length > 0) : [], [
38
38
  e,
39
39
  t,
40
40
  r
41
41
  ]);
42
- return !e || !l.length ? null : /* @__PURE__ */ g(c, {
42
+ return !e || !i.length ? null : /* @__PURE__ */ g(c, {
43
43
  heading: e.heading,
44
44
  body: e.body,
45
45
  applyLabel: e.applyLabel,
46
- candidates: l,
46
+ candidates: i,
47
47
  onApply: (o) => {
48
- let s = r(o);
49
- return u(s), Object.keys(s).length;
48
+ let l = r(o);
49
+ return u(l), Object.keys(l).length;
50
50
  }
51
51
  });
52
52
  };
@@ -1,9 +1,9 @@
1
- import { a6 as x, a7 as b, K as v } from "./widget-DcTSEv8D.js";
2
- import { j as N } from "./visibility-iwttXt0y-DOQ-bNNl.js";
3
- import { k as f } from "./validation-Db4WCn17-TOMPypn_.js";
1
+ import { a7 as x, a8 as b, I as v } from "./widget-fDShn8w9.js";
2
+ import { j as N } from "./visibility-xQNTF1no-t9wamJ9M.js";
3
+ import { k as f } from "./validation-D9L1J71d-BF62B66y.js";
4
4
  import { useState as y } from "react";
5
5
  import { jsxs as p, jsx as n, Fragment as k } from "react/jsx-runtime";
6
- import { C as K } from "./check-5ywqVwF9.js";
6
+ import { C as K } from "./check-CwRR4vvM.js";
7
7
  (function() {
8
8
  if (typeof t > "u")
9
9
  var t = { env: {} };
@@ -1,4 +1,4 @@
1
- import { t as E } from "./widget-DcTSEv8D.js";
1
+ import { s as E } from "./widget-fDShn8w9.js";
2
2
  (function() {
3
3
  if (typeof r > "u")
4
4
  var r = { env: {} };
@@ -1,4 +1,4 @@
1
- import { t } from "./widget-DcTSEv8D.js";
1
+ import { s as t } from "./widget-fDShn8w9.js";
2
2
  (function() {
3
3
  if (typeof e > "u")
4
4
  var e = { env: {} };
@@ -1,14 +1,14 @@
1
- import { t as U, F as z, P as E, l as p, M as L, a as q, K as w } from "./widget-DcTSEv8D.js";
2
- import { U as B, y as D, h as F, m as H, d as K, u as M, l as R } from "./householdPrefill-DLm3pxFH-BcyrqxRq.js";
3
- import { j as T } from "./visibility-iwttXt0y-DOQ-bNNl.js";
1
+ import { s as U, F as z, a as E, m as p, M as L, j as q, I as w } from "./widget-fDShn8w9.js";
2
+ import { U as B, y as D, h as F, m as H, d as M, u as R, l as T } from "./householdPrefill-DLm3pxFH-dPJrX2ul.js";
3
+ import { j as G } from "./visibility-xQNTF1no-t9wamJ9M.js";
4
4
  import { useState as u, useRef as C, useEffect as I } from "react";
5
- import { jsx as d, jsxs as r } from "react/jsx-runtime";
6
- import { C as G } from "./car-C4roRGIN.js";
5
+ import { jsx as d, jsxs as a } from "react/jsx-runtime";
6
+ import { C as J } from "./car-B21VP4YN.js";
7
7
  (function() {
8
8
  if (typeof t > "u")
9
9
  var t = { env: {} };
10
10
  })();
11
- var de = /* @__PURE__ */ U({ HouseholdPrefill: () => Q }), J = {
11
+ var de = /* @__PURE__ */ U({ HouseholdPrefill: () => Q }), K = {
12
12
  vehicle: {
13
13
  fetch: p.vehicle.fetch,
14
14
  peek: p.vehicle.peek,
@@ -17,7 +17,7 @@ var de = /* @__PURE__ */ U({ HouseholdPrefill: () => Q }), J = {
17
17
  mergeInto: H,
18
18
  skip: () => !1,
19
19
  alreadyPresent: () => !1,
20
- icon: G,
20
+ icon: J,
21
21
  heading: (t) => t === 1 ? "We found a vehicle at your address" : `We found ${t} vehicles at your address`,
22
22
  body: "Pick the ones you want covered and we'll fill in the details.",
23
23
  decline: "I'll add them myself",
@@ -30,7 +30,7 @@ var de = /* @__PURE__ */ U({ HouseholdPrefill: () => Q }), J = {
30
30
  dismiss: z,
31
31
  mergeInto: F,
32
32
  skip: D,
33
- alreadyPresent: (t, c) => T(t, "drivers").some((i) => K(R(i), M(c.label))),
33
+ alreadyPresent: (t, c) => G(t, "drivers").some((i) => M(T(i), R(c.label))),
34
34
  icon: B,
35
35
  heading: (t) => t === 1 ? "We found another driver in your household" : `We found ${t} drivers in your household`,
36
36
  body: "Add anyone who drives these vehicles. We already have you.",
@@ -38,30 +38,30 @@ var de = /* @__PURE__ */ U({ HouseholdPrefill: () => Q }), J = {
38
38
  searching: "Looking for other drivers in your household…"
39
39
  }
40
40
  }, Q = ({ kind: t, quoteId: c, values: i, onApply: P }) => {
41
- let s = J[t], [g] = u(() => s.skip(i)), b = !!c && !g, n = b && c ? s.peek(c) : void 0, [v, a] = u(n ? n.length ? "offering" : "done" : "idle"), [$, A] = u(n ?? []), [o, x] = u(() => new Set((n ?? []).filter((e) => e.alreadyOnApplication).map((e) => e.id))), N = C(!1), k = C(i);
41
+ let s = K[t], [g] = u(() => s.skip(i)), b = !!c && !g, n = b && c ? s.peek(c) : void 0, [v, r] = u(n ? n.length ? "offering" : "done" : "idle"), [$, j] = u(n ?? []), [o, x] = u(() => new Set((n ?? []).filter((e) => e.alreadyOnApplication).map((e) => e.id))), N = C(!1), k = C(i);
42
42
  I(() => {
43
43
  k.current = i;
44
44
  }), I(() => {
45
45
  !c || N.current || g || (N.current = !0, s.fetch(c).then((e) => {
46
- A(e), x(new Set(e.filter((l) => l.alreadyOnApplication).map((l) => l.id))), a(e.length ? "offering" : "done");
46
+ j(e), x(new Set(e.filter((l) => l.alreadyOnApplication).map((l) => l.id))), r(e.length ? "offering" : "done");
47
47
  }).catch(() => {
48
- a("done");
48
+ r("done");
49
49
  }));
50
50
  }, [
51
51
  c,
52
52
  s,
53
53
  g
54
54
  ]);
55
- let S = s.icon, h = v === "idle" && b ? "searching" : v;
55
+ let A = s.icon, h = v === "idle" && b ? "searching" : v;
56
56
  if (h === "searching") return /* @__PURE__ */ d("div", {
57
57
  className: "cds-mb-5 cds-rounded-xl cds-border cds-border-accent/40 cds-bg-highlight cds-p-4",
58
58
  "aria-live": "polite",
59
- children: /* @__PURE__ */ r("div", {
59
+ children: /* @__PURE__ */ a("div", {
60
60
  className: "cds-flex cds-items-center cds-gap-3",
61
61
  children: [/* @__PURE__ */ d("div", {
62
62
  className: "cds-h-5 cds-w-5 cds-shrink-0 cds-animate-spin cds-rounded-full cds-border-2 cds-border-accent cds-border-t-transparent",
63
63
  "aria-hidden": "true"
64
- }), /* @__PURE__ */ r("div", {
64
+ }), /* @__PURE__ */ a("div", {
65
65
  className: "cds-min-w-0 cds-flex-1",
66
66
  children: [/* @__PURE__ */ d("p", {
67
67
  className: "cds-text-sm cds-font-bold cds-text-fg",
@@ -76,27 +76,27 @@ var de = /* @__PURE__ */ U({ HouseholdPrefill: () => Q }), J = {
76
76
  if (h !== "offering" && h !== "applying") return null;
77
77
  let y = $.filter((e) => !s.alreadyPresent(i, e));
78
78
  if (!y.length) return null;
79
- let W = (e) => {
79
+ let S = (e) => {
80
80
  x((l) => {
81
81
  let f = new Set(l);
82
82
  return f.has(e) ? f.delete(e) : f.add(e), f;
83
83
  });
84
- }, j = async () => {
84
+ }, W = async () => {
85
85
  if (!c || !o.size) return;
86
- a("applying");
86
+ r("applying");
87
87
  let e = await s.apply([...o], c);
88
- e.length && P(s.mergeInto(k.current, e)), a("done");
88
+ e.length && P(s.mergeInto(k.current, e)), r("done");
89
89
  }, O = () => {
90
- a("done"), c && s.dismiss(c);
90
+ r("done"), c && s.dismiss(c);
91
91
  }, m = h === "applying";
92
92
  return /* @__PURE__ */ d("div", {
93
93
  className: "cds-mb-5 cds-rounded-xl cds-border cds-border-accent/40 cds-bg-highlight cds-p-4",
94
- children: /* @__PURE__ */ r("div", {
94
+ children: /* @__PURE__ */ a("div", {
95
95
  className: "cds-flex cds-items-start cds-gap-3",
96
- children: [/* @__PURE__ */ d(S, {
96
+ children: [/* @__PURE__ */ d(A, {
97
97
  "aria-hidden": "true",
98
98
  className: "cds-mt-0.5 cds-h-5 cds-w-5 cds-shrink-0 cds-text-accent"
99
- }), /* @__PURE__ */ r("div", {
99
+ }), /* @__PURE__ */ a("div", {
100
100
  className: "cds-min-w-0 cds-flex-1",
101
101
  children: [
102
102
  /* @__PURE__ */ d("h3", {
@@ -109,14 +109,14 @@ var de = /* @__PURE__ */ U({ HouseholdPrefill: () => Q }), J = {
109
109
  }),
110
110
  /* @__PURE__ */ d("ul", {
111
111
  className: "cds-mt-3 cds-space-y-2",
112
- children: y.map((e) => /* @__PURE__ */ d("li", { children: /* @__PURE__ */ r("label", {
112
+ children: y.map((e) => /* @__PURE__ */ d("li", { children: /* @__PURE__ */ a("label", {
113
113
  className: "cds-flex cds-cursor-pointer cds-items-start cds-gap-2 cds-text-sm cds-text-fg",
114
114
  children: [/* @__PURE__ */ d("input", {
115
115
  type: "checkbox",
116
116
  className: "cds-mt-0.5",
117
117
  checked: o.has(e.id),
118
118
  disabled: m,
119
- onChange: () => W(e.id)
119
+ onChange: () => S(e.id)
120
120
  }), /* @__PURE__ */ d("span", {
121
121
  "data-credify-redact": !0,
122
122
  className: "cds-font-semibold",
@@ -124,12 +124,12 @@ var de = /* @__PURE__ */ U({ HouseholdPrefill: () => Q }), J = {
124
124
  })]
125
125
  }) }, e.id))
126
126
  }),
127
- /* @__PURE__ */ r("div", {
127
+ /* @__PURE__ */ a("div", {
128
128
  className: "cds-mt-4 cds-flex cds-flex-wrap cds-items-center cds-gap-3",
129
129
  children: [/* @__PURE__ */ d("button", {
130
130
  type: "button",
131
131
  disabled: m || !o.size,
132
- onClick: () => void j(),
132
+ onClick: () => void W(),
133
133
  className: `cds-rounded-lg cds-bg-accent cds-px-4 cds-py-2 cds-text-sm cds-font-bold cds-text-primary-foreground hover:cds-bg-accent disabled:cds-cursor-not-allowed disabled:cds-opacity-50 ${w}`,
134
134
  children: m ? "Adding…" : "Use these"
135
135
  }), /* @__PURE__ */ d("button", {
@@ -1,4 +1,4 @@
1
- import { a6 as A } from "./widget-DcTSEv8D.js";
1
+ import { a7 as A } from "./widget-fDShn8w9.js";
2
2
  import { t as c } from "./types-LUGvo5ic-CiVRcsV9.js";
3
3
  (function() {
4
4
  if (typeof e > "u")
@@ -1 +1 @@
1
- import{t as _}from"./iframe-7bSlpZsw.js";var u=_({ADDRESS_COLUMN_PREFIXES:()=>m,addressFromColumns:()=>p,addressToColumns:()=>c,composeAddress:()=>n,normalizeStateCode:()=>a,parseAddress:()=>i}),a=r=>{let t=r.trim();return/^[A-Za-z]{2}$/.test(t)?t.toUpperCase():t},i=r=>{let[t="",e="",o=""]=r.split(",").map(d=>d.trim()).filter(Boolean),l=/^([A-Za-z .]{2,})\s+(\d{5})(?:-\d{4})?$/.exec(o);return{line_1:t,city:e,state:a(l?.[1]?.trim()??""),postal_code:l?.[2]??""}},n=r=>{let t=[r.line_1.trim(),r.line_2.trim()].filter(Boolean).join(" ");if(!t)return"";let e=a(r.state.trim());return`${t}, ${r.city.trim()}, ${e} ${r.postal_code.trim()}`.replace(/\s+/g," ").trim()},m={address:"",prior_address:"prior_",garaging_address:"garaging_address_"},s=(r,t)=>{let e=r[t];return e==null?"":String(e)},p=(r,t)=>n({line_1:s(r,`${t}line_1`),line_2:s(r,`${t}line_2`),city:s(r,`${t}city`),state:s(r,`${t}state`),postal_code:s(r,`${t}postal_code`)}),c=(r,t)=>{let e=i(r);return{[`${t}line_1`]:e.line_1||null,[`${t}city`]:e.city||null,[`${t}state`]:e.state||null,[`${t}postal_code`]:e.postal_code||null}};export{n as a,u as i,p as n,a as o,c as r,i as s,m as t};
1
+ import{t as _}from"./iframe-ZamrsKm7.js";var u=_({ADDRESS_COLUMN_PREFIXES:()=>m,addressFromColumns:()=>p,addressToColumns:()=>c,composeAddress:()=>n,normalizeStateCode:()=>a,parseAddress:()=>i}),a=r=>{let t=r.trim();return/^[A-Za-z]{2}$/.test(t)?t.toUpperCase():t},i=r=>{let[t="",e="",o=""]=r.split(",").map(d=>d.trim()).filter(Boolean),l=/^([A-Za-z .]{2,})\s+(\d{5})(?:-\d{4})?$/.exec(o);return{line_1:t,city:e,state:a(l?.[1]?.trim()??""),postal_code:l?.[2]??""}},n=r=>{let t=[r.line_1.trim(),r.line_2.trim()].filter(Boolean).join(" ");if(!t)return"";let e=a(r.state.trim());return`${t}, ${r.city.trim()}, ${e} ${r.postal_code.trim()}`.replace(/\s+/g," ").trim()},m={address:"",prior_address:"prior_",garaging_address:"garaging_address_"},s=(r,t)=>{let e=r[t];return e==null?"":String(e)},p=(r,t)=>n({line_1:s(r,`${t}line_1`),line_2:s(r,`${t}line_2`),city:s(r,`${t}city`),state:s(r,`${t}state`),postal_code:s(r,`${t}postal_code`)}),c=(r,t)=>{let e=i(r);return{[`${t}line_1`]:e.line_1||null,[`${t}city`]:e.city||null,[`${t}state`]:e.state||null,[`${t}postal_code`]:e.postal_code||null}};export{n as a,u as i,p as n,a as o,c as r,i as s,m as t};
@@ -1,4 +1,4 @@
1
- import{l as c}from"./iframe-7bSlpZsw.js";/**
1
+ import{m as c}from"./iframe-ZamrsKm7.js";/**
2
2
  * @license lucide-react v0.562.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{l as c}from"./iframe-7bSlpZsw.js";/**
1
+ import{m as c}from"./iframe-ZamrsKm7.js";/**
2
2
  * @license lucide-react v0.562.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1 +1 @@
1
- import{t as y,r as s,a as d}from"./iframe-7bSlpZsw.js";import{k as h,j as m}from"./visibility-iwttXt0y-DkmB_m7Z.js";import{u as c,l as b,s as g}from"./copy-from-record-DL503itm-KY0q_TtI.js";import"./types-LUGvo5ic-CB-wcgK3.js";import"./validation-Db4WCn17-C0CXVR_C.js";import"./check-Dby5nO_M.js";var O=y({CopyApplicantOffer:()=>k}),f={Demographics:{kind:"applicant",heading:"Are you one of the drivers?",body:"We'll reuse the details you already gave for them, so you don't type them twice.",applyLabel:"Use these details"},Ssn:{kind:"applicantSsn",heading:"Are you one of the drivers?",body:"We can reuse the Social Security number you already entered for them.",applyLabel:"Use the SSN"}},k=({stage:r,questions:n,values:t,onPatch:u})=>{let e=f[r],i=s.useMemo(()=>e?h(n,t,r):[],[e,n,t,r]),o=s.useCallback(a=>e?c({kind:e.kind,source:m(t,"drivers")[a]??{},targetQuestions:i}):{},[e,t,i]),l=s.useMemo(()=>e?b(t).filter(a=>Object.keys(o(a.index)).length>0):[],[e,t,o]);return!e||!l.length?null:d.jsx(g,{heading:e.heading,body:e.body,applyLabel:e.applyLabel,candidates:l,onApply:a=>{let p=o(a);return u(p),Object.keys(p).length}})};export{O as n,k as t};
1
+ import{t as y,r as s,a as d}from"./iframe-ZamrsKm7.js";import{k as h,j as m}from"./visibility-xQNTF1no-_O_ggMOv.js";import{u as c,l as b,s as g}from"./copy-from-record-DL503itm-BXJJYs1Y.js";import"./types-LUGvo5ic-CB-wcgK3.js";import"./validation-D9L1J71d-D-I9M7xX.js";import"./check-DafU7JDn.js";var O=y({CopyApplicantOffer:()=>k}),f={Demographics:{kind:"applicant",heading:"Are you one of the drivers?",body:"We'll reuse the details you already gave for them, so you don't type them twice.",applyLabel:"Use these details"},Ssn:{kind:"applicantSsn",heading:"Are you one of the drivers?",body:"We can reuse the Social Security number you already entered for them.",applyLabel:"Use the SSN"}},k=({stage:r,questions:n,values:t,onPatch:u})=>{let e=f[r],i=s.useMemo(()=>e?h(n,t,r):[],[e,n,t,r]),o=s.useCallback(a=>e?c({kind:e.kind,source:m(t,"drivers")[a]??{},targetQuestions:i}):{},[e,t,i]),l=s.useMemo(()=>e?b(t).filter(a=>Object.keys(o(a.index)).length>0):[],[e,t,o]);return!e||!l.length?null:d.jsx(g,{heading:e.heading,body:e.body,applyLabel:e.applyLabel,candidates:l,onApply:a=>{let p=o(a);return u(p),Object.keys(p).length}})};export{O as n,k as t};
@@ -1,4 +1,4 @@
1
- import{l as f,I as g,r as _,a as t,f as b}from"./iframe-7bSlpZsw.js";import{j}from"./visibility-iwttXt0y-DkmB_m7Z.js";import{k as y}from"./validation-Db4WCn17-C0CXVR_C.js";import{C as v}from"./check-Dby5nO_M.js";/**
1
+ import{m as f,u as g,r as _,a as t,f as b}from"./iframe-ZamrsKm7.js";import{j}from"./visibility-xQNTF1no-_O_ggMOv.js";import{k as y}from"./validation-D9L1J71d-D-I9M7xX.js";import{C as v}from"./check-DafU7JDn.js";/**
2
2
  * @license lucide-react v0.562.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1 +1 @@
1
- import{t as E}from"./iframe-7bSlpZsw.js";var b=E({COVERAGE_EDITED_KEY:()=>o,COVERAGE_SHARE_OF_DWELLING:()=>i,DWELLING_KEY:()=>s,PURCHASE_PRICE_KEY:()=>d,backfillRelatedCoverages:()=>g,coverageSharePercent:()=>p,deriveRelatedCoverages:()=>C,derivedCoverageAmount:()=>u,isCoverageEdited:()=>f,markCoverageEdited:()=>m,seedHomeCoverages:()=>A}),i={other_structures_coverage:.1,personal_property_coverage:.5,loss_of_use_coverage:.2},s="dwelling_replacement_cost",d="sale_price_cents",o="__coverage_edited",_=500,u=(r,e)=>Math.round(r*e/_)*_,p=r=>{let e=i[r];return e===void 0?null:Math.round(e*100)},c=r=>{let e=r[o];return Array.isArray(e)?e.filter(t=>typeof t=="string"):[]},f=(r,e)=>c(r).includes(e),a=r=>{let e=String(r??"").replace(/\D/g,"");if(!e)return null;let t=Number(e);return Number.isFinite(t)&&t>0?t:null},m=(r,e,t)=>{if(i[e]===void 0)return{};let l=c(r);return a(t)===null?l.includes(e)?{[o]:l.filter(n=>n!==e)}:{}:l.includes(e)?{}:{[o]:[...l,e]}},C=(r,e)=>{let t=a(e);if(t===null)return{};let l={};for(let[n,v]of Object.entries(i))f(r,n)||(l[n]=u(t,v));return l},g=r=>{let e=a(r[s]);if(e===null)return{};let t={};for(let[l,n]of Object.entries(i))a(r[l])===null&&(t[l]=u(e,n));return t},A=r=>{let e={};if(a(r.dwelling_replacement_cost)===null){let t=a(r[d]);t!==null&&(e[s]=t)}return{...e,...g({...r,...e})}};export{g as a,C as c,m as d,A as f,d as i,u as l,i as n,b as o,s as r,p as s,o as t,f as u};
1
+ import{t as E}from"./iframe-ZamrsKm7.js";var b=E({COVERAGE_EDITED_KEY:()=>o,COVERAGE_SHARE_OF_DWELLING:()=>i,DWELLING_KEY:()=>s,PURCHASE_PRICE_KEY:()=>d,backfillRelatedCoverages:()=>g,coverageSharePercent:()=>p,deriveRelatedCoverages:()=>C,derivedCoverageAmount:()=>u,isCoverageEdited:()=>f,markCoverageEdited:()=>m,seedHomeCoverages:()=>A}),i={other_structures_coverage:.1,personal_property_coverage:.5,loss_of_use_coverage:.2},s="dwelling_replacement_cost",d="sale_price_cents",o="__coverage_edited",_=500,u=(r,e)=>Math.round(r*e/_)*_,p=r=>{let e=i[r];return e===void 0?null:Math.round(e*100)},c=r=>{let e=r[o];return Array.isArray(e)?e.filter(t=>typeof t=="string"):[]},f=(r,e)=>c(r).includes(e),a=r=>{let e=String(r??"").replace(/\D/g,"");if(!e)return null;let t=Number(e);return Number.isFinite(t)&&t>0?t:null},m=(r,e,t)=>{if(i[e]===void 0)return{};let l=c(r);return a(t)===null?l.includes(e)?{[o]:l.filter(n=>n!==e)}:{}:l.includes(e)?{}:{[o]:[...l,e]}},C=(r,e)=>{let t=a(e);if(t===null)return{};let l={};for(let[n,v]of Object.entries(i))f(r,n)||(l[n]=u(t,v));return l},g=r=>{let e=a(r[s]);if(e===null)return{};let t={};for(let[l,n]of Object.entries(i))a(r[l])===null&&(t[l]=u(e,n));return t},A=r=>{let e={};if(a(r.dwelling_replacement_cost)===null){let t=a(r[d]);t!==null&&(e[s]=t)}return{...e,...g({...r,...e})}};export{g as a,C as c,m as d,A as f,d as i,u as l,i as n,b as o,s as r,p as s,o as t,f as u};