@getcredify/credify-insurance-widget 1.46.0 → 1.48.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 (59) hide show
  1. package/dist/{address-BEVwov8q-D41kOVu6.js → address-BEVwov8q-CtbG3tfj.js} +1 -1
  2. package/dist/api-FFY6fre4.js +53 -0
  3. package/dist/{car-CMnEV9_b.js → car-C4roRGIN.js} +3 -3
  4. package/dist/{check-BTgVTfcC.js → check-5ywqVwF9.js} +1 -1
  5. package/dist/{copy-applicant-offer-UApiJBeU-CKq7ImsF.js → copy-applicant-offer-UApiJBeU-6X1OfCXd.js} +3 -3
  6. package/dist/{copy-from-record-DL503itm-CTS4E7Rf.js → copy-from-record-DL503itm-B5M9p1aR.js} +15 -15
  7. package/dist/{coverageDerivation-CV2ORogj-jMf2SoK5.js → coverageDerivation-CV2ORogj-C4Tevu9q.js} +1 -1
  8. package/dist/{fixtures-ijbZ16Zg-ChdBIfNy.js → fixtures-ijbZ16Zg-C7CkQCGW.js} +1 -1
  9. package/dist/{household-prefill-BwSS00qI-BV0ZiWyf.js → household-prefill-BwSS00qI-Bxr1Is5P.js} +9 -9
  10. package/dist/{householdPrefill-DLm3pxFH-CsBUhGpI.js → householdPrefill-DLm3pxFH-BcyrqxRq.js} +3 -3
  11. package/dist/iframe/assets/{address-BEVwov8q-WHZXNW9V.js → address-BEVwov8q-Bjv6MIfT.js} +1 -1
  12. package/dist/iframe/assets/{car-B5QKRfCv.js → car-D1-bpPP6.js} +2 -2
  13. package/dist/iframe/assets/{check-COpOqcK1.js → check-Dby5nO_M.js} +1 -1
  14. package/dist/iframe/assets/{copy-applicant-offer-UApiJBeU-DzSzRNkI.js → copy-applicant-offer-UApiJBeU-D2hxv9k7.js} +1 -1
  15. package/dist/iframe/assets/{copy-from-record-DL503itm-uUs1HZ1W.js → copy-from-record-DL503itm-KY0q_TtI.js} +2 -2
  16. package/dist/iframe/assets/{coverageDerivation-CV2ORogj-BRpZ-qnO.js → coverageDerivation-CV2ORogj-DnNTue88.js} +1 -1
  17. package/dist/iframe/assets/{dob-calendar-RIJ5S6YU-Bc9pcr1S.js → dob-calendar-RIJ5S6YU-DDSHfA2t.js} +1 -1
  18. package/dist/iframe/assets/{fixtures-ijbZ16Zg-DHtl-XVn.js → fixtures-ijbZ16Zg-kEYhiItG.js} +1 -1
  19. package/dist/iframe/assets/{household-prefill-BwSS00qI-DoI-FWTT.js → household-prefill-BwSS00qI-fvGXj4Ih.js} +1 -1
  20. package/dist/iframe/assets/{householdPrefill-DLm3pxFH-Dh4Zfx2N.js → householdPrefill-DLm3pxFH-xdUCbCYH.js} +1 -1
  21. package/dist/iframe/assets/{iframe-B0t_86Ff.js → iframe-7bSlpZsw.js} +35 -35
  22. package/dist/iframe/assets/{index-Dn7YHcfA.js → index-CqjzcFiq.js} +2 -2
  23. package/dist/iframe/assets/intake-review-panel-CjiYTJXh-DDHj7c_F.js +1 -0
  24. package/dist/iframe/assets/{mockJump-DCZoGtRl-COeVYgAv.js → mockJump-DCZoGtRl-36W1hR0W.js} +1 -1
  25. package/dist/iframe/assets/{payload-DurIYSZk-BKyiqX4B.js → payload-DurIYSZk-COUWlGbP.js} +1 -1
  26. package/dist/iframe/assets/{question-list-CjN64tfw-C635WZhw.js → question-list-CjN64tfw-DcMrD36l.js} +3 -3
  27. package/dist/iframe/assets/rates-panel-B1xVYtTQ-CL1y9CqV.js +17 -0
  28. package/dist/iframe/assets/{review-panel-DuzWoTKP-ClL_jf1q.js → review-panel-DuzWoTKP-DSKT5yTF.js} +2 -2
  29. package/dist/iframe/assets/stage-CnucLiNn-BR-spl1Z.js +1 -0
  30. package/dist/iframe/assets/validation-Db4WCn17-C0CXVR_C.js +3 -0
  31. package/dist/iframe/assets/{vehicleCoverage-CDBtkdww-B2U8GTFu.js → vehicleCoverage-CDBtkdww-DXXIbGVV.js} +1 -1
  32. package/dist/iframe/assets/visibility-iwttXt0y-DkmB_m7Z.js +1 -0
  33. package/dist/iframe/assets/{waves-BTFsI5kF.js → waves-DIsSB_DU.js} +1 -1
  34. package/dist/iframe/iframe.html +1 -1
  35. package/dist/{index-BWYDsqpp.js → index-CK3tklPT.js} +20 -20
  36. package/dist/index.es.js +1 -1
  37. package/dist/index.umd.js +79 -79
  38. package/dist/{intake-review-panel-CjiYTJXh-CEbA61Dc.js → intake-review-panel-CjiYTJXh-7Uej_QY4.js} +17 -17
  39. package/dist/{mockJump-DCZoGtRl-Bo7POlsv.js → mockJump-DCZoGtRl-BmpMdaSt.js} +1 -1
  40. package/dist/{payload-DurIYSZk-DIu_QDwm.js → payload-DurIYSZk-C0uMF9Tq.js} +22 -22
  41. package/dist/{question-list-CjN64tfw-1IKhM3Qt.js → question-list-CjN64tfw-DFqbiQWc.js} +13 -13
  42. package/dist/{rates-panel-B1xVYtTQ-zlc6y8FP.js → rates-panel-B1xVYtTQ-Cj9JDZXZ.js} +5 -5
  43. package/dist/{review-panel-DuzWoTKP-fVqE5OXc.js → review-panel-DuzWoTKP-BLy4wrtf.js} +19 -19
  44. package/dist/{stage-CnucLiNn-cNOWRm4u.js → stage-CnucLiNn-B6xWk5jk.js} +4 -4
  45. package/dist/utils/support/cobrowse.d.ts +1 -1
  46. package/dist/utils/support/index.d.ts +2 -0
  47. package/dist/{validation-Db4WCn17-MXpuK34u.js → validation-Db4WCn17-TOMPypn_.js} +2 -2
  48. package/dist/{vehicleCoverage-CDBtkdww-PMT13g0U.js → vehicleCoverage-CDBtkdww-VeL7TnDy.js} +3 -3
  49. package/dist/{visibility-iwttXt0y-DPpMfYyV.js → visibility-iwttXt0y-DOQ-bNNl.js} +1 -1
  50. package/dist/{waves-B32--xu4.js → waves-Cx-ZZIde.js} +1 -1
  51. package/dist/{widget-D6Yu93a3.js → widget-DcTSEv8D.js} +1810 -1762
  52. package/package.json +1 -1
  53. package/dist/api-Cw2AUM88.js +0 -77
  54. package/dist/iframe/assets/api-DAGqvZlL.js +0 -1
  55. package/dist/iframe/assets/intake-review-panel-CjiYTJXh-RzRGAMUY.js +0 -1
  56. package/dist/iframe/assets/rates-panel-B1xVYtTQ-7LijnnnG.js +0 -17
  57. package/dist/iframe/assets/stage-CnucLiNn-CeNTIedd.js +0 -1
  58. package/dist/iframe/assets/validation-Db4WCn17-CWj8NSXn.js +0 -3
  59. package/dist/iframe/assets/visibility-iwttXt0y-DdU95s24.js +0 -1
@@ -1,4 +1,4 @@
1
- import { t as _ } from "./widget-D6Yu93a3.js";
1
+ import { t as _ } from "./widget-DcTSEv8D.js";
2
2
  (function() {
3
3
  if (typeof t > "u")
4
4
  var t = { env: {} };
@@ -0,0 +1,53 @@
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";
2
+ (function() {
3
+ if (typeof e > "u")
4
+ var e = { env: {} };
5
+ })();
6
+ export {
7
+ i as AUTH_TOKEN_STORAGE_KEY,
8
+ o as CredifyApiError,
9
+ t as QUOTE_ID_STORAGE_KEY,
10
+ r as applyDriverPrefill,
11
+ u as applyVehiclePrefill,
12
+ l as bodyWithQuoteId,
13
+ n as buildResumeUrl,
14
+ d as captureLandingUtm,
15
+ p as captureResumeTokenFromUrl,
16
+ f as cityFromZip,
17
+ g as clearQuoteSession,
18
+ c as configureApi,
19
+ m as configureZipCityLookup,
20
+ S as consumeResumeToken,
21
+ T as createQuote,
22
+ h as decodeVin,
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,
31
+ C as getStagesForQuote,
32
+ _ as getVehicleOptions,
33
+ O as hasResumeToken,
34
+ U as isMockEnabled,
35
+ V as isSupportedState,
36
+ b as isTestModeEnabled,
37
+ D as issueResumeLink,
38
+ F as loadAuthToken,
39
+ I as loadQuoteId,
40
+ B as parseUtm,
41
+ K as post,
42
+ L as prefillProperty,
43
+ M as prefillSuggestions,
44
+ Y as redeemResumeToken,
45
+ Z as requestBind,
46
+ q as resetApiConfig,
47
+ x as resetPrefillSuggestions,
48
+ G as saveAuthToken,
49
+ H as saveQuoteId,
50
+ N as sendSmsCode,
51
+ j as updateQuote,
52
+ w as verifySmsCode
53
+ };
@@ -1,4 +1,4 @@
1
- import { $ as e } from "./widget-D6Yu93a3.js";
1
+ import { a6 as e } from "./widget-DcTSEv8D.js";
2
2
  (function() {
3
3
  if (typeof c > "u")
4
4
  var c = { env: {} };
@@ -20,7 +20,7 @@ const r = [
20
20
  ["circle", { cx: "7", cy: "17", r: "2", key: "u2ysq9" }],
21
21
  ["path", { d: "M9 17h6", key: "r8uit2" }],
22
22
  ["circle", { cx: "17", cy: "17", r: "2", key: "axvx0g" }]
23
- ], n = e("car", r);
23
+ ], a = e("car", r);
24
24
  export {
25
- n as C
25
+ a as C
26
26
  };
@@ -1,4 +1,4 @@
1
- import { $ as c } from "./widget-D6Yu93a3.js";
1
+ import { a6 as c } from "./widget-DcTSEv8D.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-D6Yu93a3.js";
2
- import { k as y, j as h } from "./visibility-iwttXt0y-DPpMfYyV.js";
3
- import { u as m, l as f, s as c } from "./copy-from-record-DL503itm-CTS4E7Rf.js";
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";
4
4
  import { useMemo as p, useCallback as b } from "react";
5
5
  import { jsx as g } from "react/jsx-runtime";
6
6
  (function() {
@@ -1,9 +1,9 @@
1
- import { $ as x, a7 as b, G as v } from "./widget-D6Yu93a3.js";
2
- import { j as N } from "./visibility-iwttXt0y-DPpMfYyV.js";
3
- import { k as f } from "./validation-Db4WCn17-MXpuK34u.js";
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";
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-BTgVTfcC.js";
6
+ import { C as K } from "./check-5ywqVwF9.js";
7
7
  (function() {
8
8
  if (typeof t > "u")
9
9
  var t = { env: {} };
@@ -18,8 +18,8 @@ const S = [
18
18
  ["path", { d: "M2 21a8 8 0 0 1 13.292-6", key: "bjp14o" }],
19
19
  ["circle", { cx: "10", cy: "8", r: "5", key: "o932ke" }],
20
20
  ["path", { d: "m16 19 2 2 4-4", key: "1b14m6" }]
21
- ], $ = x("user-round-check", S);
22
- var w = {
21
+ ], w = x("user-round-check", S);
22
+ var A = {
23
23
  applicant: {
24
24
  gender: "gender",
25
25
  marital_status: "marital_status",
@@ -48,7 +48,7 @@ var w = {
48
48
  occupation: "occupation",
49
49
  social_security_number: "social_security_number"
50
50
  }
51
- }, A = {
51
+ }, $ = {
52
52
  applicant: {
53
53
  industryKey: "employment_industry",
54
54
  occupationKey: "occupation"
@@ -78,9 +78,9 @@ var w = {
78
78
  index: i,
79
79
  name: a || `Driver ${i + 1}`
80
80
  }] : [];
81
- }), G = ({ kind: t, source: c, targetQuestions: e }) => {
81
+ }), O = ({ kind: t, source: c, targetQuestions: e }) => {
82
82
  let i = new Map(e.map((d) => [d.key, d])), a = {};
83
- for (let [d, o] of Object.entries(w[t])) {
83
+ for (let [d, o] of Object.entries(A[t])) {
84
84
  let m = i.get(d);
85
85
  if (!m) continue;
86
86
  let u = c[o];
@@ -88,9 +88,9 @@ var w = {
88
88
  let l = C(m, u);
89
89
  l !== void 0 && (a[d] = l);
90
90
  }
91
- let r = A[t];
91
+ let r = $[t];
92
92
  return r && a[r.occupationKey] !== void 0 && (b(a[r.industryKey])?.includes(String(a[r.occupationKey])) || delete a[r.occupationKey]), a;
93
- }, O = ({ heading: t, body: c, candidates: e, applyLabel: i = "Use these details", onApply: a }) => {
93
+ }, Q = ({ heading: t, body: c, candidates: e, applyLabel: i = "Use these details", onApply: a }) => {
94
94
  let [r, d] = y(e[0]?.index ?? 0), [o, m] = y(null);
95
95
  if (!e.length) return null;
96
96
  if (o) return /* @__PURE__ */ p("p", {
@@ -126,7 +126,7 @@ var w = {
126
126
  className: "cds-mb-5 cds-rounded-xl cds-border cds-border-accent/40 cds-bg-highlight cds-p-4",
127
127
  children: /* @__PURE__ */ p("div", {
128
128
  className: "cds-flex cds-items-start cds-gap-3",
129
- children: [/* @__PURE__ */ n($, {
129
+ children: [/* @__PURE__ */ n(w, {
130
130
  "aria-hidden": "true",
131
131
  className: "cds-mt-0.5 cds-h-5 cds-w-5 cds-shrink-0 cds-text-accent"
132
132
  }), /* @__PURE__ */ p("div", {
@@ -181,9 +181,9 @@ var w = {
181
181
  });
182
182
  };
183
183
  export {
184
- $ as U,
184
+ w as U,
185
185
  L as c,
186
186
  B as l,
187
- O as s,
188
- G as u
187
+ Q as s,
188
+ O as u
189
189
  };
@@ -1,4 +1,4 @@
1
- import { t as E } from "./widget-D6Yu93a3.js";
1
+ import { t as E } from "./widget-DcTSEv8D.js";
2
2
  (function() {
3
3
  if (typeof r > "u")
4
4
  var r = { env: {} };
@@ -1,4 +1,4 @@
1
- import { t } from "./widget-D6Yu93a3.js";
1
+ import { t } from "./widget-DcTSEv8D.js";
2
2
  (function() {
3
3
  if (typeof e > "u")
4
4
  var e = { env: {} };
@@ -1,23 +1,23 @@
1
- import { t as U, F as z, P as E, l as p, M as L, a as q, G as w } from "./widget-D6Yu93a3.js";
2
- import { U as B, y as D, h as F, m as G, d as H, u as M, l as R } from "./householdPrefill-DLm3pxFH-CsBUhGpI.js";
3
- import { j as T } from "./visibility-iwttXt0y-DPpMfYyV.js";
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";
4
4
  import { useState as u, useRef as C, useEffect as I } from "react";
5
5
  import { jsx as d, jsxs as r } from "react/jsx-runtime";
6
- import { C as J } from "./car-CMnEV9_b.js";
6
+ import { C as G } from "./car-C4roRGIN.js";
7
7
  (function() {
8
8
  if (typeof t > "u")
9
9
  var t = { env: {} };
10
10
  })();
11
- var de = /* @__PURE__ */ U({ HouseholdPrefill: () => Q }), K = {
11
+ var de = /* @__PURE__ */ U({ HouseholdPrefill: () => Q }), J = {
12
12
  vehicle: {
13
13
  fetch: p.vehicle.fetch,
14
14
  peek: p.vehicle.peek,
15
15
  apply: q,
16
16
  dismiss: L,
17
- mergeInto: G,
17
+ mergeInto: H,
18
18
  skip: () => !1,
19
19
  alreadyPresent: () => !1,
20
- icon: J,
20
+ icon: G,
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 }), K = {
30
30
  dismiss: z,
31
31
  mergeInto: F,
32
32
  skip: D,
33
- alreadyPresent: (t, c) => T(t, "drivers").some((i) => H(R(i), M(c.label))),
33
+ alreadyPresent: (t, c) => T(t, "drivers").some((i) => K(R(i), M(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,7 +38,7 @@ var de = /* @__PURE__ */ U({ HouseholdPrefill: () => Q }), K = {
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 = K[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 = 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);
42
42
  I(() => {
43
43
  k.current = i;
44
44
  }), I(() => {
@@ -1,4 +1,4 @@
1
- import { $ } from "./widget-D6Yu93a3.js";
1
+ import { a6 as A } from "./widget-DcTSEv8D.js";
2
2
  import { t as c } from "./types-LUGvo5ic-CiVRcsV9.js";
3
3
  (function() {
4
4
  if (typeof e > "u")
@@ -10,12 +10,12 @@ import { t as c } from "./types-LUGvo5ic-CiVRcsV9.js";
10
10
  * This source code is licensed under the ISC license.
11
11
  * See the LICENSE file in the root directory of this source tree.
12
12
  */
13
- const A = [
13
+ const $ = [
14
14
  ["path", { d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2", key: "1yyitq" }],
15
15
  ["path", { d: "M16 3.128a4 4 0 0 1 0 7.744", key: "16gr8j" }],
16
16
  ["path", { d: "M22 21v-2a4 4 0 0 0-3-3.87", key: "kshegd" }],
17
17
  ["circle", { cx: "9", cy: "7", r: "4", key: "nufk8" }]
18
- ], N = $("users", A);
18
+ ], N = A("users", $);
19
19
  var k = `vehicles${c}`, o = `drivers${c}`, S = [
20
20
  "vin",
21
21
  "year",
@@ -1 +1 @@
1
- import{t as _}from"./iframe-B0t_86Ff.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-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,6 +1,6 @@
1
- import{a1 as c}from"./iframe-B0t_86Ff.js";/**
1
+ import{l as c}from"./iframe-7bSlpZsw.js";/**
2
2
  * @license lucide-react v0.562.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
5
5
  * See the LICENSE file in the root directory of this source tree.
6
- */const e=[["path",{d:"M19 17h2c.6 0 1-.4 1-1v-3c0-.9-.7-1.7-1.5-1.9C18.7 10.6 16 10 16 10s-1.3-1.4-2.2-2.3c-.5-.4-1.1-.7-1.8-.7H5c-.6 0-1.1.4-1.4.9l-1.4 2.9A3.7 3.7 0 0 0 2 12v4c0 .6.4 1 1 1h2",key:"5owen"}],["circle",{cx:"7",cy:"17",r:"2",key:"u2ysq9"}],["path",{d:"M9 17h6",key:"r8uit2"}],["circle",{cx:"17",cy:"17",r:"2",key:"axvx0g"}]],a=c("car",e);export{a as C};
6
+ */const e=[["path",{d:"M19 17h2c.6 0 1-.4 1-1v-3c0-.9-.7-1.7-1.5-1.9C18.7 10.6 16 10 16 10s-1.3-1.4-2.2-2.3c-.5-.4-1.1-.7-1.8-.7H5c-.6 0-1.1.4-1.4.9l-1.4 2.9A3.7 3.7 0 0 0 2 12v4c0 .6.4 1 1 1h2",key:"5owen"}],["circle",{cx:"7",cy:"17",r:"2",key:"u2ysq9"}],["path",{d:"M9 17h6",key:"r8uit2"}],["circle",{cx:"17",cy:"17",r:"2",key:"axvx0g"}]],o=c("car",e);export{o as C};
@@ -1,4 +1,4 @@
1
- import{a1 as c}from"./iframe-B0t_86Ff.js";/**
1
+ import{l as c}from"./iframe-7bSlpZsw.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,G as s,I as d}from"./iframe-B0t_86Ff.js";import{k as h,j as m}from"./visibility-iwttXt0y-DdU95s24.js";import{u as c,l as b,s as g}from"./copy-from-record-DL503itm-uUs1HZ1W.js";import"./types-LUGvo5ic-CB-wcgK3.js";import"./validation-Db4WCn17-CWj8NSXn.js";import"./check-COpOqcK1.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-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,6 +1,6 @@
1
- import{a1 as f,ab as g,G as _,I as t,K as b}from"./iframe-B0t_86Ff.js";import{j}from"./visibility-iwttXt0y-DdU95s24.js";import{k as y}from"./validation-Db4WCn17-CWj8NSXn.js";import{C as v}from"./check-COpOqcK1.js";/**
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";/**
2
2
  * @license lucide-react v0.562.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
5
5
  * See the LICENSE file in the root directory of this source tree.
6
- */const N=[["path",{d:"M2 21a8 8 0 0 1 13.292-6",key:"bjp14o"}],["circle",{cx:"10",cy:"8",r:"5",key:"o932ke"}],["path",{d:"m16 19 2 2 4-4",key:"1b14m6"}]],k=f("user-round-check",N);var K={applicant:{gender:"gender",marital_status:"marital_status",employment_industry:"industry",occupation:"occupation"},applicantSsn:{social_security_number:"social_security_number"},coApplicant:{co_applicant_first_name:"first_name",co_applicant_middle_name:"middle_name",co_applicant_last_name:"last_name",co_applicant_date_of_birth:"date_of_birth",co_applicant_gender:"gender",co_applicant_marital_status:"marital_status",co_applicant_employment_industry:"industry",co_applicant_occupation:"occupation",co_applicant_relationship:"relationship_to_insured"},driverFromApplicant:{first_name:"first_name",last_name:"last_name",date_of_birth:"date_of_birth",gender:"gender",marital_status:"marital_status",industry:"employment_industry",occupation:"occupation",social_security_number:"social_security_number"}},S={applicant:{industryKey:"employment_industry",occupationKey:"occupation"},coApplicant:{industryKey:"co_applicant_employment_industry",occupationKey:"co_applicant_occupation"},driverFromApplicant:{industryKey:"industry",occupationKey:"occupation"}},w={Separated:["Seperated"],Seperated:["Separated"],DomesticPartner:["Domestic Partner"],"Domestic Partner":["DomesticPartner"]},A=(a,c)=>{let e=a.options;if(!Array.isArray(e)||e.length===0)return c;let n=String(c);return e.includes(n)?c:(w[n]??[]).find(s=>e.includes(s))},h=(a,c="")=>[a[`${c}first_name`],a[`${c}last_name`]].map(e=>String(e??"").trim()).filter(Boolean).join(" "),P=a=>h(a),I=(a,c={})=>j(a,"drivers").flatMap((e,n)=>{if(c.exclude?.(e,n))return[];let s=h(e);return s||!y(e.date_of_birth)?[{index:n,name:s||`Driver ${n+1}`}]:[]}),M=({kind:a,source:c,targetQuestions:e})=>{let n=new Map(e.map(d=>[d.key,d])),s={};for(let[d,o]of Object.entries(K[a])){let p=n.get(d);if(!p)continue;let m=c[o];if(y(m,p.inputType))continue;let l=A(p,m);l!==void 0&&(s[d]=l)}let i=S[a];return i&&s[i.occupationKey]!==void 0&&(g(s[i.industryKey])?.includes(String(s[i.occupationKey]))||delete s[i.occupationKey]),s},U=({heading:a,body:c,candidates:e,applyLabel:n="Use these details",onApply:s})=>{let[i,d]=_.useState(e[0]?.index??0),[o,p]=_.useState(null);if(!e.length)return null;if(o)return t.jsxs("p",{className:"cds-mb-4 cds-flex cds-items-center cds-gap-2 cds-text-sm cds-text-fg-muted","aria-live":"polite",children:[t.jsx(v,{"aria-hidden":"true",className:"cds-h-4 cds-w-4 cds-shrink-0 cds-text-accent"}),"Filled ",o.count," ",o.count===1?"answer":"answers"," from ",t.jsx("span",{"data-credify-redact":!0,children:o.name}),". Change anything below that is not right."]});let m=()=>{let r=e.find(x=>x.index===i)??e[0];if(!r)return;let u=s(r.index);u>0&&p({name:r.name,count:u})},l=e.length===1?e[0]:void 0;return t.jsx("div",{className:"cds-mb-5 cds-rounded-xl cds-border cds-border-accent/40 cds-bg-highlight cds-p-4",children:t.jsxs("div",{className:"cds-flex cds-items-start cds-gap-3",children:[t.jsx(k,{"aria-hidden":"true",className:"cds-mt-0.5 cds-h-5 cds-w-5 cds-shrink-0 cds-text-accent"}),t.jsxs("div",{className:"cds-min-w-0 cds-flex-1",children:[t.jsx("h3",{className:"cds-text-sm cds-font-bold cds-text-fg",children:a}),t.jsx("p",{className:"cds-mt-0.5 cds-text-sm cds-text-fg-muted",children:c}),l?null:t.jsxs("fieldset",{className:"cds-mt-3",children:[t.jsx("legend",{className:"sr-only",children:a}),t.jsx("div",{className:"cds-space-y-1.5",children:e.map(r=>t.jsxs("label",{className:"cds-flex cds-cursor-pointer cds-items-center cds-gap-2 cds-text-sm cds-text-fg",children:[t.jsx("input",{type:"radio",name:`copy-source-${a.replace(/\W+/g,"-")}`,checked:i===r.index,onChange:()=>d(r.index)}),t.jsx("span",{"data-credify-redact":!0,className:"cds-font-semibold",children:r.name})]},r.index))})]}),t.jsx("button",{type:"button",onClick:m,className:`cds-mt-4 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 ${b}`,children:l?t.jsxs(t.Fragment,{children:[n," from ",t.jsx("span",{"data-credify-redact":!0,children:l.name})]}):n})]})]})})};export{k as U,P as c,I as l,U as s,M as u};
6
+ */const N=[["path",{d:"M2 21a8 8 0 0 1 13.292-6",key:"bjp14o"}],["circle",{cx:"10",cy:"8",r:"5",key:"o932ke"}],["path",{d:"m16 19 2 2 4-4",key:"1b14m6"}]],k=f("user-round-check",N);var K={applicant:{gender:"gender",marital_status:"marital_status",employment_industry:"industry",occupation:"occupation"},applicantSsn:{social_security_number:"social_security_number"},coApplicant:{co_applicant_first_name:"first_name",co_applicant_middle_name:"middle_name",co_applicant_last_name:"last_name",co_applicant_date_of_birth:"date_of_birth",co_applicant_gender:"gender",co_applicant_marital_status:"marital_status",co_applicant_employment_industry:"industry",co_applicant_occupation:"occupation",co_applicant_relationship:"relationship_to_insured"},driverFromApplicant:{first_name:"first_name",last_name:"last_name",date_of_birth:"date_of_birth",gender:"gender",marital_status:"marital_status",industry:"employment_industry",occupation:"occupation",social_security_number:"social_security_number"}},S={applicant:{industryKey:"employment_industry",occupationKey:"occupation"},coApplicant:{industryKey:"co_applicant_employment_industry",occupationKey:"co_applicant_occupation"},driverFromApplicant:{industryKey:"industry",occupationKey:"occupation"}},w={Separated:["Seperated"],Seperated:["Separated"],DomesticPartner:["Domestic Partner"],"Domestic Partner":["DomesticPartner"]},A=(a,s)=>{let e=a.options;if(!Array.isArray(e)||e.length===0)return s;let n=String(s);return e.includes(n)?s:(w[n]??[]).find(c=>e.includes(c))},h=(a,s="")=>[a[`${s}first_name`],a[`${s}last_name`]].map(e=>String(e??"").trim()).filter(Boolean).join(" "),P=a=>h(a),M=(a,s={})=>j(a,"drivers").flatMap((e,n)=>{if(s.exclude?.(e,n))return[];let c=h(e);return c||!y(e.date_of_birth)?[{index:n,name:c||`Driver ${n+1}`}]:[]}),U=({kind:a,source:s,targetQuestions:e})=>{let n=new Map(e.map(d=>[d.key,d])),c={};for(let[d,o]of Object.entries(K[a])){let p=n.get(d);if(!p)continue;let m=s[o];if(y(m,p.inputType))continue;let l=A(p,m);l!==void 0&&(c[d]=l)}let i=S[a];return i&&c[i.occupationKey]!==void 0&&(g(c[i.industryKey])?.includes(String(c[i.occupationKey]))||delete c[i.occupationKey]),c},E=({heading:a,body:s,candidates:e,applyLabel:n="Use these details",onApply:c})=>{let[i,d]=_.useState(e[0]?.index??0),[o,p]=_.useState(null);if(!e.length)return null;if(o)return t.jsxs("p",{className:"cds-mb-4 cds-flex cds-items-center cds-gap-2 cds-text-sm cds-text-fg-muted","aria-live":"polite",children:[t.jsx(v,{"aria-hidden":"true",className:"cds-h-4 cds-w-4 cds-shrink-0 cds-text-accent"}),"Filled ",o.count," ",o.count===1?"answer":"answers"," from ",t.jsx("span",{"data-credify-redact":!0,children:o.name}),". Change anything below that is not right."]});let m=()=>{let r=e.find(x=>x.index===i)??e[0];if(!r)return;let u=c(r.index);u>0&&p({name:r.name,count:u})},l=e.length===1?e[0]:void 0;return t.jsx("div",{className:"cds-mb-5 cds-rounded-xl cds-border cds-border-accent/40 cds-bg-highlight cds-p-4",children:t.jsxs("div",{className:"cds-flex cds-items-start cds-gap-3",children:[t.jsx(k,{"aria-hidden":"true",className:"cds-mt-0.5 cds-h-5 cds-w-5 cds-shrink-0 cds-text-accent"}),t.jsxs("div",{className:"cds-min-w-0 cds-flex-1",children:[t.jsx("h3",{className:"cds-text-sm cds-font-bold cds-text-fg",children:a}),t.jsx("p",{className:"cds-mt-0.5 cds-text-sm cds-text-fg-muted",children:s}),l?null:t.jsxs("fieldset",{className:"cds-mt-3",children:[t.jsx("legend",{className:"sr-only",children:a}),t.jsx("div",{className:"cds-space-y-1.5",children:e.map(r=>t.jsxs("label",{className:"cds-flex cds-cursor-pointer cds-items-center cds-gap-2 cds-text-sm cds-text-fg",children:[t.jsx("input",{type:"radio",name:`copy-source-${a.replace(/\W+/g,"-")}`,checked:i===r.index,onChange:()=>d(r.index)}),t.jsx("span",{"data-credify-redact":!0,className:"cds-font-semibold",children:r.name})]},r.index))})]}),t.jsx("button",{type:"button",onClick:m,className:`cds-mt-4 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 ${b}`,children:l?t.jsxs(t.Fragment,{children:[n," from ",t.jsx("span",{"data-credify-redact":!0,children:l.name})]}):n})]})]})})};export{k as U,P as c,M as l,E as s,U as u};
@@ -1 +1 @@
1
- import{t as E}from"./iframe-B0t_86Ff.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-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};