@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
@@ -0,0 +1,224 @@
1
+ import { s as z, K as H, L as g, Q as q, R as v, I as $, a0 as O, a1 as U } from "./widget-fDShn8w9.js";
2
+ import { t as G } from "./question-list-BK2EN74l-Cn9ka_Tm.js";
3
+ import { S as J, w as Q, D as Y, x as C, P as j } from "./review-panel-BQmrPgdC-CXP39hws.js";
4
+ import { o as X, n as Z, r as M } from "./stage-zClSIgVN-CC_teHAO.js";
5
+ import { useState as _, useMemo as b, useCallback as T, useRef as A, useEffect as ee } from "react";
6
+ import { jsxs as i, jsx as s, Fragment as se } from "react/jsx-runtime";
7
+ import { C as te } from "./check-CwRR4vvM.js";
8
+ (function() {
9
+ if (typeof a > "u")
10
+ var a = { env: {} };
11
+ })();
12
+ var me = /* @__PURE__ */ z({ IntakeReviewPanel: () => ae }), K = {
13
+ call: {
14
+ heading: "Review your information",
15
+ body: "Here's what we took down during your call. Check each section, fix anything we got wrong, and fill in anything missing — then confirm below to see your quotes."
16
+ },
17
+ lead: {
18
+ heading: "Review your quote",
19
+ body: "We started your quote with the details you shared when you asked for quotes. Check each section, fill in anything missing, then confirm below to see your prices."
20
+ }
21
+ }, I = (a) => `${a} ${a === 1 ? "answer needs" : "answers need"} your attention`, ie = ({ label: a, open: n, onClick: d }) => /* @__PURE__ */ i("button", {
22
+ type: "button",
23
+ onClick: d,
24
+ "aria-expanded": n,
25
+ "aria-label": n ? `Done editing ${a}` : `Edit ${a}`,
26
+ className: v("cds-inline-flex cds-items-center cds-gap-1 cds-rounded cds-px-2 cds-py-1 cds-text-xs cds-font-semibold cds-text-fg hover:cds-bg-highlight", $),
27
+ children: [s(n ? te : j, {
28
+ "aria-hidden": "true",
29
+ className: "cds-h-3.5 cds-w-3.5"
30
+ }), n ? "Done" : "Edit"]
31
+ }), ae = ({ stages: a, questionsByStage: n, values: d, quoteId: E, origin: r = "call", loading: o, busy: h, error: S, suppressedKeys: l, onPatch: P, onConfirm: R }) => {
32
+ let [B, f] = _(null), [x, D] = _(!1), w = b(() => a.filter((e) => !H.has(e)), [a]), p = b(() => w.map((e) => {
33
+ let t = n[e] ?? [];
34
+ return {
35
+ stage: e,
36
+ questions: t,
37
+ rows: M({
38
+ questions: t,
39
+ values: d,
40
+ stageKey: e,
41
+ suppressedKeys: l
42
+ }),
43
+ groups: Z({
44
+ questions: t,
45
+ values: d,
46
+ stageKey: e,
47
+ suppressedKeys: l
48
+ }),
49
+ validation: X({
50
+ questions: t,
51
+ values: d,
52
+ stageKey: e
53
+ })
54
+ };
55
+ }), [
56
+ w,
57
+ n,
58
+ d,
59
+ l
60
+ ]), u = b(() => p.filter((e) => !e.validation.isValid), [p]), c = u.reduce((e, t) => e + t.validation.issues.length, 0), V = T((e) => {
61
+ f(e), g("intake_review_section_open", {
62
+ origin: r,
63
+ stage: e,
64
+ via: "callout"
65
+ }), requestAnimationFrame(() => {
66
+ document.getElementById(`intake-review-${e}`)?.scrollIntoView?.({
67
+ behavior: "smooth",
68
+ block: "start"
69
+ });
70
+ });
71
+ }, [r]), k = A(!1);
72
+ ee(() => {
73
+ o || k.current || (k.current = !0, g("intake_review_view", {
74
+ origin: r,
75
+ issueCount: c,
76
+ sectionsWithIssues: u.length
77
+ }));
78
+ }, [
79
+ o,
80
+ r,
81
+ c,
82
+ u.length
83
+ ]);
84
+ let W = (e, t) => {
85
+ if (t) {
86
+ f(null);
87
+ return;
88
+ }
89
+ f(e), g("intake_review_section_open", {
90
+ origin: r,
91
+ stage: e,
92
+ via: "edit"
93
+ });
94
+ }, F = () => {
95
+ g("intake_review_confirm_click", { origin: r }), R();
96
+ }, L = !o && !h && c === 0 && x;
97
+ return o ? /* @__PURE__ */ i("div", {
98
+ className: "cds-py-12 cds-text-center",
99
+ "aria-live": "polite",
100
+ children: [/* @__PURE__ */ s("div", {
101
+ className: "cds-mx-auto cds-mb-4 cds-h-8 cds-w-8 cds-animate-spin cds-rounded-full cds-border-4 cds-border-accent cds-border-t-transparent",
102
+ "aria-hidden": "true"
103
+ }), /* @__PURE__ */ s("p", {
104
+ className: "cds-text-fg-muted",
105
+ children: "Loading your details…"
106
+ })]
107
+ }) : /* @__PURE__ */ i("div", {
108
+ className: "cds-py-2",
109
+ children: [
110
+ /* @__PURE__ */ s("h2", {
111
+ className: "cds-mb-1 cds-text-2xl cds-font-bold cds-text-fg",
112
+ children: K[r].heading
113
+ }),
114
+ /* @__PURE__ */ s("p", {
115
+ className: "cds-mb-5 cds-text-sm cds-text-fg-muted",
116
+ children: K[r].body
117
+ }),
118
+ c ? /* @__PURE__ */ i("div", {
119
+ className: "cds-mb-5 cds-rounded-xl cds-border cds-border-warning cds-bg-warning-surface cds-p-4",
120
+ children: [/* @__PURE__ */ s("h3", {
121
+ className: "cds-mb-2 cds-text-sm cds-font-bold cds-text-fg",
122
+ children: I(c)
123
+ }), /* @__PURE__ */ s("ul", {
124
+ className: "cds-space-y-1 cds-text-sm cds-text-fg-muted",
125
+ children: u.map((e) => /* @__PURE__ */ i("li", { children: [
126
+ /* @__PURE__ */ s("button", {
127
+ type: "button",
128
+ onClick: () => V(e.stage),
129
+ className: v("cds-font-semibold cds-text-fg cds-underline", $),
130
+ children: q(e.stage).short
131
+ }),
132
+ ": ",
133
+ e.validation.issues[0],
134
+ e.validation.issues.length > 1 ? ` (+${e.validation.issues.length - 1} more)` : ""
135
+ ] }, e.stage))
136
+ })]
137
+ }) : null,
138
+ p.map((e) => {
139
+ let t = q(e.stage).short, m = B === e.stage, y = !e.validation.isValid;
140
+ return !m && !e.rows.length && !e.groups.length && !y ? null : /* @__PURE__ */ i("section", {
141
+ id: `intake-review-${e.stage}`,
142
+ className: v(C, y && "cds-border-warning"),
143
+ children: [/* @__PURE__ */ i("div", {
144
+ className: "cds-mb-2 cds-flex cds-items-center cds-justify-between",
145
+ children: [/* @__PURE__ */ s("h3", {
146
+ className: J,
147
+ children: t
148
+ }), /* @__PURE__ */ s(ie, {
149
+ label: t,
150
+ open: m,
151
+ onClick: () => W(e.stage, m)
152
+ })]
153
+ }), m ? /* @__PURE__ */ s(G, {
154
+ questions: e.questions,
155
+ values: d,
156
+ errors: e.validation.errorsByKey,
157
+ itemErrors: e.validation.itemErrors,
158
+ stageKey: e.stage,
159
+ quoteId: E,
160
+ suppressedKeys: l,
161
+ onPatch: P
162
+ }) : /* @__PURE__ */ i(se, { children: [
163
+ y ? /* @__PURE__ */ s("p", {
164
+ className: "cds-mb-2 cds-text-sm cds-font-semibold cds-text-warning-foreground",
165
+ children: I(e.validation.issues.length)
166
+ }) : null,
167
+ e.rows.length ? /* @__PURE__ */ s(Q, { rows: e.rows }) : null,
168
+ e.groups.map((N) => /* @__PURE__ */ s(Y, { group: N }, N.groupKey))
169
+ ] })]
170
+ }, e.stage);
171
+ }),
172
+ /* @__PURE__ */ i("section", {
173
+ className: C,
174
+ children: [/* @__PURE__ */ i("label", {
175
+ className: "cds-flex cds-cursor-pointer cds-items-start cds-gap-2 cds-text-sm cds-text-fg-muted",
176
+ children: [/* @__PURE__ */ s("input", {
177
+ type: "checkbox",
178
+ checked: x,
179
+ disabled: h,
180
+ onChange: (e) => D(e.target.checked),
181
+ className: "cds-mt-1 cds-h-4 cds-w-4 cds-shrink-0 cds-accent-brand-accent"
182
+ }), /* @__PURE__ */ s("span", { children: "I have reviewed my information and confirm it is accurate, and I agree to the Terms of Service and Privacy Policy." })]
183
+ }), /* @__PURE__ */ i("p", {
184
+ className: "cds-mt-3 cds-text-xs cds-leading-relaxed cds-text-fg-muted",
185
+ children: [
186
+ "Credify Corporation – Texas #3309669.",
187
+ " ",
188
+ /* @__PURE__ */ s("a", {
189
+ href: "/privacy-policy",
190
+ target: "_blank",
191
+ rel: "noreferrer",
192
+ className: "cds-font-semibold cds-text-fg cds-underline",
193
+ children: "Privacy Policy"
194
+ }),
195
+ " ",
196
+ "|",
197
+ " ",
198
+ /* @__PURE__ */ s("a", {
199
+ href: "/terms-of-service",
200
+ target: "_blank",
201
+ rel: "noreferrer",
202
+ className: "cds-font-semibold cds-text-fg cds-underline",
203
+ children: "Terms of Service"
204
+ })
205
+ ]
206
+ })]
207
+ }),
208
+ /* @__PURE__ */ s(O, { message: S }),
209
+ /* @__PURE__ */ s(U, {
210
+ disabled: !L,
211
+ onClick: F,
212
+ children: h ? "Submitting…" : "Confirm & see my quotes"
213
+ }),
214
+ /* @__PURE__ */ s("p", {
215
+ className: "cds-mt-3 cds-text-xs cds-text-fg-muted",
216
+ children: "Submitting runs a soft credit inquiry with the carriers you authorized. It does not affect your credit score."
217
+ })
218
+ ]
219
+ });
220
+ };
221
+ export {
222
+ me as n,
223
+ ae as t
224
+ };
@@ -1,4 +1,4 @@
1
- import { i as o } from "./widget-DcTSEv8D.js";
1
+ import { g as o } from "./widget-fDShn8w9.js";
2
2
  (function() {
3
3
  if (typeof t > "u")
4
4
  var t = { env: {} };
@@ -1,6 +1,6 @@
1
- import { t as w, G as d, I as E } from "./widget-DcTSEv8D.js";
1
+ import { s as w, z as d, G as E } from "./widget-fDShn8w9.js";
2
2
  import { n as c, t as f } from "./types-LUGvo5ic-CiVRcsV9.js";
3
- import { t as M, n as N } from "./address-BEVwov8q-CtbG3tfj.js";
3
+ import { t as M, n as N } from "./address-BEVwov8q-CazC1JIl.js";
4
4
  (function() {
5
5
  if (typeof t > "u")
6
6
  var t = { env: {} };
@@ -25,30 +25,30 @@ var $ = /* @__PURE__ */ w({
25
25
  return e < 1 ? t : Math.min(e, p) * 100;
26
26
  }, m = (t, e) => {
27
27
  if (typeof t != "string" || !e) return t;
28
- let s = t.trim();
29
- if (!s || e[s]) return t;
30
- let n = s.toLowerCase();
28
+ let a = t.trim();
29
+ if (!a || e[a]) return t;
30
+ let n = a.toLowerCase();
31
31
  return Object.keys(e).find((i) => i.toLowerCase() === n || e[i]?.toLowerCase() === n) ?? t;
32
32
  }, b = (t) => m(t, d.industry), v = (t) => m(t, d.education_level), A = (t) => m(t, E), j = (t) => {
33
- let e = {}, s = Object.keys(t).filter((r) => !r.includes(f)), n = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set();
33
+ let e = {}, a = Object.keys(t).filter((r) => !r.includes(f)), n = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set();
34
34
  for (let [r, o] of Object.entries(t)) if (r.endsWith("__items") && Array.isArray(o)) {
35
35
  let u = r.slice(0, -f.length);
36
- i.add(u), s.includes(u) && o.forEach((_) => {
36
+ i.add(u), a.includes(u) && o.forEach((_) => {
37
37
  _ && typeof _ == "object" && Object.keys(_).forEach((g) => n.add(g));
38
38
  });
39
39
  }
40
40
  for (let [r, o] of Object.entries(t)) {
41
41
  if (r.endsWith("__items")) {
42
42
  let u = r.slice(0, -f.length);
43
- if (!s.includes(u)) continue;
43
+ if (!a.includes(u)) continue;
44
44
  e[u] = Array.isArray(o) ? o.map((_) => j(_)) : o;
45
45
  continue;
46
46
  }
47
47
  i.has(r) || n.has(r) || r.startsWith("__") || (e[r] = y.has(r) ? x(o) : L(o));
48
48
  }
49
- let a = e.auto_prior_carrier_name;
50
- if (typeof a == "string" && a.trim() !== "") {
51
- let r = a === "NoPriorInsurance";
49
+ let s = e.auto_prior_carrier_name;
50
+ if (typeof s == "string" && s.trim() !== "") {
51
+ let r = s === "NoPriorInsurance";
52
52
  if (e.auto_has_prior_insurance = !r, r) for (let o of [
53
53
  "auto_prior_years",
54
54
  "auto_prior_months",
@@ -88,8 +88,8 @@ var $ = /* @__PURE__ */ w({
88
88
  for (let [n, i] of Object.entries(t)) if (i != null) {
89
89
  if (Array.isArray(i)) {
90
90
  if (h.includes(n)) {
91
- let a = i.map((l) => l && typeof l == "object" ? O(l) : l);
92
- e[c(n)] = a, e[n] = a.length ? "Yes" : "No";
91
+ let s = i.map((l) => l && typeof l == "object" ? O(l) : l);
92
+ e[c(n)] = s, e[n] = s.length ? "Yes" : "No";
93
93
  }
94
94
  continue;
95
95
  }
@@ -101,19 +101,19 @@ var $ = /* @__PURE__ */ w({
101
101
  e[n] = P(i);
102
102
  }
103
103
  }
104
- let s = e[c("home_losses")];
105
- Array.isArray(s) && (e[c("home_losses")] = s.map((n) => {
106
- let i = n, a = i?.amount_paid_cents;
107
- return typeof a == "number" ? {
104
+ let a = e[c("home_losses")];
105
+ Array.isArray(a) && (e[c("home_losses")] = a.map((n) => {
106
+ let i = n, s = i?.amount_paid_cents;
107
+ return typeof s == "number" ? {
108
108
  ...i,
109
- amount_paid_cents: Math.round(a / 100)
109
+ amount_paid_cents: Math.round(s / 100)
110
110
  } : i;
111
111
  }));
112
112
  for (let [n, i] of Object.entries(e)) typeof i == "string" && /^\d{4}-\d{2}-\d{2}T/.test(i) && (e[n] = i.slice(0, 10));
113
113
  for (let [n, i] of Object.entries(M)) {
114
114
  if (e[n]) continue;
115
- let a = N(t, i);
116
- a && (e[n] = a);
115
+ let s = N(t, i);
116
+ s && (e[n] = s);
117
117
  }
118
118
  return e;
119
119
  };
@@ -1,21 +1,21 @@
1
- import { a6 as A, ai as ge, aj as ca, t as la, af as F, am as da, an as ua, ao as gn, K as z, ap as ha, W as et, a7 as fa, aq as pa, ar as ma, as as va, at as ya, au as ga, av as Un, O as ba, k as xa, aw as ka } from "./widget-DcTSEv8D.js";
1
+ import { a7 as A, ai as ge, aj as ca, s as la, af as F, am as da, an as ua, ao as gn, I as z, ap as ha, R as et, a8 as fa, aq as pa, ar as ma, as as va, at as ya, au as ga, av as Un, O as ba, b as xa, aw as ka } from "./widget-fDShn8w9.js";
2
2
  import { n as Ue } from "./types-LUGvo5ic-CiVRcsV9.js";
3
- import { s as wa, a as _a } from "./address-BEVwov8q-CtbG3tfj.js";
4
- import { _ as Ma, U as Ca, g as Sa, s as Ea } from "./householdPrefill-DLm3pxFH-BcyrqxRq.js";
5
- import { k as Na, n as Pa, u as Aa, c as $a, d as Ra, j as Oa, A as Ta } from "./visibility-iwttXt0y-DOQ-bNNl.js";
6
- import { E as Da, w as La, p as Kr } from "./validation-Db4WCn17-TOMPypn_.js";
7
- import { i as Ia, a as Fa, t as Yr, u as Va, f as Ba, n as Ha, r as za, s as ja, p as Wa } from "./vehicleCoverage-CDBtkdww-VeL7TnDy.js";
8
- import { t as qa, d as Ua, l as Ka, u as Ya } from "./stage-CnucLiNn-B6xWk5jk.js";
9
- import { s as Ga, u as Gr, l as Xa, c as Qa, U as Za } from "./copy-from-record-DL503itm-B5M9p1aR.js";
10
- import { c as Ja, d as ei, s as ti } from "./coverageDerivation-CV2ORogj-C4Tevu9q.js";
3
+ import { s as wa, a as _a } from "./address-BEVwov8q-CazC1JIl.js";
4
+ import { _ as Ma, U as Ca, g as Sa, s as Ea } from "./householdPrefill-DLm3pxFH-dPJrX2ul.js";
5
+ import { k as Na, n as Pa, u as Aa, c as $a, d as Ra, j as Oa, A as Ta } from "./visibility-xQNTF1no-t9wamJ9M.js";
6
+ import { E as Da, w as La, p as Kr } from "./validation-D9L1J71d-BF62B66y.js";
7
+ import { i as Ia, a as Fa, t as Yr, u as Va, f as Ba, n as Ha, r as za, s as ja, p as Wa } from "./vehicleCoverage-CgeEazR0-C3ugp85r.js";
8
+ import { t as qa, d as Ua, l as Ka, u as Ya } from "./stage-zClSIgVN-CC_teHAO.js";
9
+ import { s as Ga, u as Gr, l as Xa, c as Qa, U as Za } from "./copy-from-record-DL503itm-2slKSwa4.js";
10
+ import { c as Ja, d as ei, s as ti } from "./coverageDerivation-CV2ORogj-BoLiDnjR.js";
11
11
  import * as x from "react";
12
12
  import { useState as ee, useLayoutEffect as ni, useMemo as Y, useCallback as me, useId as bn, useRef as fe, useEffect as Ie } from "react";
13
13
  import { jsx as o, jsxs as k, Fragment as N } from "react/jsx-runtime";
14
- import { e as Xe, P as le, b as J, f as ri, c as xn, d as kn, u as Xr, a as oi, C as Qr } from "./index-CK3tklPT.js";
14
+ import { e as Xe, P as le, b as J, f as ri, c as xn, d as kn, u as Xr, a as oi, C as Qr } from "./index-DbadJytg.js";
15
15
  import * as Zr from "react-dom";
16
- import { C as Jr } from "./check-5ywqVwF9.js";
17
- import { W as Kn, H as Tt, S as ai } from "./waves-Cx-ZZIde.js";
18
- import { C as Yn } from "./car-C4roRGIN.js";
16
+ import { C as Jr } from "./check-CwRR4vvM.js";
17
+ import { W as Kn, H as Tt, S as ai } from "./waves-BpyYhsaC.js";
18
+ import { C as Yn } from "./car-B21VP4YN.js";
19
19
  (function() {
20
20
  if (typeof e > "u")
21
21
  var e = { env: {} };
@@ -1,9 +1,9 @@
1
- import { a6 as ne, a8 as Ve, t as Je, p as Ke, a9 as Ne, aa as ve, ab as Ze, a0 as E, ac as S, ad as se, ae as G, af as Qe, $ as ke, K as w, _ as Xe, x as et, ag as _e, s as tt, e as we, y as st, H as at, w as rt, ah as dt } from "./widget-DcTSEv8D.js";
2
- import { useState as b, useRef as ae, useCallback as re, useEffect as L, useMemo as Ae } from "react";
1
+ import { a7 as ne, a9 as Ve, s as Je, q as Ke, aa as Ne, ab as ve, ac as Ze, a1 as E, ad as I, L as se, ae as G, af as Qe, a0 as ke, I as w, _ as Xe, x as et, ag as _e, r as tt, e as we, y as st, W as at, w as rt, ah as dt } from "./widget-fDShn8w9.js";
2
+ import { useState as b, useRef as ae, useCallback as re, useEffect as D, useMemo as Ae } from "react";
3
3
  import { jsxs as r, jsx as t, Fragment as ct } from "react/jsx-runtime";
4
- import { S as de, W as Ce, H as nt } from "./waves-Cx-ZZIde.js";
5
- import { C as lt } from "./car-C4roRGIN.js";
6
- import { C as it } from "./check-5ywqVwF9.js";
4
+ import { S as de, W as Ce, H as nt } from "./waves-BpyYhsaC.js";
5
+ import { C as lt } from "./car-B21VP4YN.js";
6
+ import { C as it } from "./check-CwRR4vvM.js";
7
7
  (function() {
8
8
  if (typeof e > "u")
9
9
  var e = { env: {} };
@@ -43,7 +43,7 @@ const ft = [
43
43
  key: "9njp5v"
44
44
  }
45
45
  ]
46
- ], Ie = ne("phone", ft);
46
+ ], Se = ne("phone", ft);
47
47
  var pt = {
48
48
  SafecoPersonal: "Safeco",
49
49
  SafecoPersoanl: "Safeco",
@@ -323,7 +323,7 @@ var pt = {
323
323
  if (u) return u;
324
324
  }
325
325
  return _t[e];
326
- }, Me = (e) => e && (e[0] ?? "").toUpperCase() + e.slice(1), Mt = (e) => e.length <= 1 ? e[0] ?? "" : e.length === 2 ? `${e[0]} and ${e[1]}` : `${e.slice(0, -1).join(", ")}, and ${e[e.length - 1]}`, St = (e, a = {}) => {
326
+ }, Me = (e) => e && (e[0] ?? "").toUpperCase() + e.slice(1), Mt = (e) => e.length <= 1 ? e[0] ?? "" : e.length === 2 ? `${e[0]} and ${e[1]}` : `${e.slice(0, -1).join(", ")}, and ${e[e.length - 1]}`, It = (e, a = {}) => {
327
327
  let i = /* @__PURE__ */ new Map(), n = [], u = 0;
328
328
  for (let d of e ?? []) {
329
329
  let o = Ve(d.field ?? ""), g = (o.key ? a.describeField?.(o.key) : void 0)?.label ?? (o.isOpaque ? void 0 : o.label);
@@ -366,16 +366,16 @@ var pt = {
366
366
  isOpaque: m.length === 0,
367
367
  keys: [...new Set(n)]
368
368
  };
369
- }, It = (e) => e.label ? `${e.label}: ${Me(e.message)}` : Me(e.message), Pt = 2500, $t = (e) => {
369
+ }, St = (e) => e.label ? `${e.label}: ${Me(e.message)}` : Me(e.message), Pt = 2500, $t = (e) => {
370
370
  if (!e) return null;
371
371
  let a = Math.round((Date.parse(e) - Date.now()) / 864e5);
372
372
  return !Number.isFinite(a) || a < 1 ? null : a === 1 ? "It works for 1 more day." : `It works for the next ${a} days.`;
373
373
  }, Ft = ({ quoteId: e }) => {
374
374
  let [a, i] = b({ kind: "pending" }), [n, u] = b(!1), m = ae(null), d = ae(!1);
375
- L(() => {
375
+ D(() => {
376
376
  d.current || (d.current = !0, (async () => {
377
377
  try {
378
- let [{ issueResumeLink: f }, { buildResumeUrl: p }] = await Promise.all([import("./api-FFY6fre4.js"), import("./widget-DcTSEv8D.js").then((v) => v.ay).then((v) => v.u)]), { resumeToken: _, expiresAt: A } = await f(e ?? void 0);
378
+ let [{ issueResumeLink: f }, { buildResumeUrl: p }] = await Promise.all([import("./api-Bepbbwlb.js"), import("./widget-fDShn8w9.js").then((v) => v.ay).then((v) => v.u)]), { resumeToken: _, expiresAt: A } = await f(e ?? void 0);
379
379
  i({
380
380
  kind: "ready",
381
381
  url: p(_),
@@ -385,7 +385,7 @@ var pt = {
385
385
  dt() && console.error("Resume link unavailable:", f), i({ kind: "unavailable" });
386
386
  }
387
387
  })());
388
- }, [e]), L(() => {
388
+ }, [e]), D(() => {
389
389
  if (!n) return;
390
390
  let f = setTimeout(() => u(!1), Pt);
391
391
  return () => clearTimeout(f);
@@ -452,7 +452,7 @@ var pt = {
452
452
  })]
453
453
  })
454
454
  });
455
- }, Kt = /* @__PURE__ */ Je({ RatesPanel: () => Lt }), Ht = 3e3, Tt = 33e4, ce = (e) => `$${(e / 100).toLocaleString("en-US", { maximumFractionDigits: 0 })}`, Ot = (e) => e.split(/\s+/).filter(Boolean).slice(0, 2).map((a) => a[0]?.toUpperCase() ?? "").join(""), Rt = [
455
+ }, Kt = /* @__PURE__ */ Je({ RatesPanel: () => Dt }), Ht = 3e3, Tt = 33e4, ce = (e) => `$${(e / 100).toLocaleString("en-US", { maximumFractionDigits: 0 })}`, Ot = (e) => e.split(/\s+/).filter(Boolean).slice(0, 2).map((a) => a[0]?.toUpperCase() ?? "").join(""), Rt = [
456
456
  {
457
457
  market: "admitted",
458
458
  label: "Admitted"
@@ -479,7 +479,7 @@ var pt = {
479
479
  className: `cds-flex ${n} cds-shrink-0 cds-items-center cds-justify-center cds-rounded cds-bg-primary/10 cds-text-sm cds-font-bold cds-text-fg`,
480
480
  children: Ot(i)
481
481
  });
482
- }, Se = {
482
+ }, Ie = {
483
483
  PersonalAuto: "Personal Auto",
484
484
  PersonalHome: "Homeowners"
485
485
  }, Bt = {
@@ -487,7 +487,7 @@ var pt = {
487
487
  PersonalAuto: lt,
488
488
  Flood: Ce,
489
489
  ExcessFlood: Ce
490
- }, D = ({ lob: e, size: a = "md" }) => {
490
+ }, L = ({ lob: e, size: a = "md" }) => {
491
491
  let i = e && Bt[e] || de, n = a === "sm" ? "cds-h-5 cds-w-5" : "cds-h-7 cds-w-7", u = a === "sm" ? "cds-h-3 cds-w-3" : "cds-h-4 cds-w-4";
492
492
  return /* @__PURE__ */ t("span", {
493
493
  "aria-hidden": "true",
@@ -504,7 +504,7 @@ var pt = {
504
504
  children: [
505
505
  g ? /* @__PURE__ */ r("p", {
506
506
  className: "cds-mb-2 cds-flex cds-items-center cds-gap-1.5 cds-text-xs cds-font-semibold cds-uppercase cds-tracking-wide cds-text-fg",
507
- children: [/* @__PURE__ */ t(D, {
507
+ children: [/* @__PURE__ */ t(L, {
508
508
  lob: e.lob,
509
509
  size: "sm"
510
510
  }), g]
@@ -641,16 +641,16 @@ var pt = {
641
641
  href: G,
642
642
  onClick: () => se("phone_call_click", {
643
643
  placement: "quote_rates_fallback",
644
- phone: S
644
+ phone: I
645
645
  }),
646
646
  className: `cds-inline-flex cds-items-center cds-gap-2 cds-rounded-xl cds-bg-accent cds-px-8 cds-py-3.5 cds-text-base cds-font-bold cds-text-primary-foreground hover:cds-bg-accent ${w}`,
647
647
  children: [
648
- /* @__PURE__ */ t(Ie, {
648
+ /* @__PURE__ */ t(Se, {
649
649
  "aria-hidden": "true",
650
650
  className: "cds-h-4 cds-w-4"
651
651
  }),
652
652
  "Call ",
653
- S
653
+ I
654
654
  ]
655
655
  }),
656
656
  /* @__PURE__ */ t("div", { children: /* @__PURE__ */ t(O, { quoteId: i }) })
@@ -662,7 +662,7 @@ var pt = {
662
662
  }, P = (e) => e.length <= 1 ? e[0] ?? "" : `${e.slice(0, -1).join(", ")} and ${e[e.length - 1]}`, ee = (e) => e.lob ?? "_other", te = (e, a) => {
663
663
  let i = new Set(a.map((n) => n.lob));
664
664
  return [...new Set(e.filter((n) => $e(n) !== "not_quoted").map((n) => n.lob).filter((n) => !!n))].filter((n) => !i.has(n));
665
- }, Dt = ({ appetites: e, product: a }) => {
665
+ }, Lt = ({ appetites: e, product: a }) => {
666
666
  let i = Gt[a] ?? Object.keys(e ?? {}), n = [...new Set(i.flatMap((u) => e?.[u] ?? []).map(y))].slice(0, 8);
667
667
  return n.length ? /* @__PURE__ */ r("p", {
668
668
  className: "cds-mt-4 cds-text-sm cds-text-fg-muted",
@@ -673,8 +673,8 @@ var pt = {
673
673
  "…"
674
674
  ]
675
675
  }) : null;
676
- }, Lt = ({ product: e, quoteId: a, describeField: i, onFixAnswers: n, onRetry: u, onBound: m }) => {
677
- let [d, o] = b({ kind: "polling" }), [g, f] = b(null), [p, _] = b(), [A, v] = b({}), [k, He] = b([]), [Te, Oe] = b(!1), [U, le] = b(""), [Re, $] = b(), [z, ie] = b(!1), [F, Y] = b(0), [oe, ue] = b(!1), [V, me] = b(!1), [Be, he] = b(), I = ae(0), H = re((s) => {
676
+ }, Dt = ({ product: e, quoteId: a, describeField: i, onFixAnswers: n, onRetry: u, onBound: m }) => {
677
+ let [d, o] = b({ kind: "polling" }), [g, f] = b(null), [p, _] = b(), [A, v] = b({}), [k, He] = b([]), [Te, Oe] = b(!1), [U, le] = b(""), [Re, $] = b(), [z, ie] = b(!1), [F, Y] = b(0), [oe, ue] = b(!1), [V, me] = b(!1), [Be, he] = b(), S = ae(0), H = re((s) => {
678
678
  a && (async () => {
679
679
  try {
680
680
  await Ke({ current_stage: s }, !1, a);
@@ -686,17 +686,17 @@ var pt = {
686
686
  }
687
687
  })();
688
688
  }, [a]), J = re(() => {
689
- I.current += 1;
690
- let s = I.current, c = Date.now(), l = async () => {
691
- if (s === I.current) {
689
+ S.current += 1;
690
+ let s = S.current, c = Date.now(), l = async () => {
691
+ if (s === S.current) {
692
692
  try {
693
693
  let { quote: h } = await Xe(a ?? void 0);
694
- if (s !== I.current) return;
694
+ if (s !== S.current) return;
695
695
  _(h);
696
696
  let Q = h?.rates_status;
697
697
  if (Q === "completed") {
698
698
  let { rates: B } = await et(a ?? void 0);
699
- if (s !== I.current) return;
699
+ if (s !== S.current) return;
700
700
  let T = B ?? [];
701
701
  o(T.length ? {
702
702
  kind: "ready",
@@ -754,14 +754,14 @@ var pt = {
754
754
  e,
755
755
  H
756
756
  ]);
757
- L(() => (J(), () => {
758
- I.current += 1;
759
- }), [J]), L(() => {
757
+ D(() => (J(), () => {
758
+ S.current += 1;
759
+ }), [J]), D(() => {
760
760
  if (F <= 0) return;
761
761
  let s = setTimeout(() => Y((c) => c - 1), 1e3);
762
762
  return () => clearTimeout(s);
763
763
  }, [F]);
764
- let x = Ae(() => bt(d.kind === "ready" ? d.rates : []), [d]), fe = (s) => Array.isArray(s) ? s.filter((c) => c && typeof c == "object") : [], Ee = Ae(() => d.kind === "validation_failed" ? St(d.errors, {
764
+ let x = Ae(() => bt(d.kind === "ready" ? d.rates : []), [d]), fe = (s) => Array.isArray(s) ? s.filter((c) => c && typeof c == "object") : [], Ee = Ae(() => d.kind === "validation_failed" ? It(d.errors, {
765
765
  describeField: i,
766
766
  vehicles: fe(p?.vehicles),
767
767
  drivers: fe(p?.drivers)
@@ -847,7 +847,7 @@ var pt = {
847
847
  className: "cds-mt-2 cds-text-fg-muted",
848
848
  children: "If you get disconnected, your progress is saved in this browser — reopen this page and you'll pick up where you left off. Thanks for your patience."
849
849
  }),
850
- /* @__PURE__ */ t(Dt, {
850
+ /* @__PURE__ */ t(Lt, {
851
851
  appetites: p?.appetites,
852
852
  product: e
853
853
  })
@@ -896,7 +896,7 @@ var pt = {
896
896
  ]
897
897
  }) : /* @__PURE__ */ t("ul", {
898
898
  className: "cds-mt-1 cds-list-outside cds-list-disc cds-space-y-1 cds-pl-5 cds-text-sm cds-text-fg-muted",
899
- children: c.issues.map((l) => /* @__PURE__ */ t("li", { children: It(l) }, `${l.label ?? ""}-${l.message}`))
899
+ children: c.issues.map((l) => /* @__PURE__ */ t("li", { children: St(l) }, `${l.label ?? ""}-${l.message}`))
900
900
  })] }, c.id))
901
901
  }),
902
902
  s.otherCount ? /* @__PURE__ */ r("p", {
@@ -924,10 +924,10 @@ var pt = {
924
924
  href: G,
925
925
  onClick: () => se("phone_call_click", {
926
926
  placement: "quote_rates_validation",
927
- phone: S
927
+ phone: I
928
928
  }),
929
929
  className: "cds-font-semibold cds-text-fg cds-underline",
930
- children: S
930
+ children: I
931
931
  }),
932
932
  " ",
933
933
  "and an agent will finish it with you."
@@ -969,7 +969,7 @@ var pt = {
969
969
  /* @__PURE__ */ t("a", {
970
970
  href: G,
971
971
  className: "cds-font-semibold cds-text-fg cds-underline",
972
- children: S
972
+ children: I
973
973
  }),
974
974
  " ",
975
975
  "and an agent will pull them for you."
@@ -1063,7 +1063,7 @@ var pt = {
1063
1063
  className: "cds-mx-auto cds-max-w-sm cds-space-y-2 cds-text-left",
1064
1064
  children: d.rates.map((c) => /* @__PURE__ */ r("li", {
1065
1065
  className: "cds-flex cds-items-center cds-gap-2 cds-rounded-lg cds-border cds-border-border cds-bg-surface-elevated cds-p-3 cds-text-sm",
1066
- children: [/* @__PURE__ */ t(D, { lob: c.lob }), /* @__PURE__ */ r("span", { children: [/* @__PURE__ */ t("span", {
1066
+ children: [/* @__PURE__ */ t(L, { lob: c.lob }), /* @__PURE__ */ r("span", { children: [/* @__PURE__ */ t("span", {
1067
1067
  className: "cds-font-bold cds-text-fg",
1068
1068
  children: y(c.carrier_name)
1069
1069
  }), M(c.lob) ? /* @__PURE__ */ r("span", {
@@ -1084,12 +1084,12 @@ var pt = {
1084
1084
  ]
1085
1085
  });
1086
1086
  }
1087
- let K = new Set(k.map((s) => s.quote_rate_id)), De = new Set(k.map((s) => s.lob)), be = (s) => A[ee(s)] === s.quote_rate_id, C = d.rates.filter((s) => be(s) && !K.has(s.quote_rate_id)), Le = Te, Z = te(d.rates, k), je = te(d.rates, []).length > 1, ye = Z.filter((s) => !C.some((c) => c.lob === s)), q = Rt.filter((s) => s.market !== "not_quoted" || x.not_quoted.length > 0), Ue = x.admitted.length + x.non_admitted.length, ze = Nt(N === "not_quoted" ? x.not_quoted : x[N], { sortBy: N === "not_quoted" ? "carrier" : "premium" }), xe = e === "Bundle" ? [{
1087
+ let K = new Set(k.map((s) => s.quote_rate_id)), Le = new Set(k.map((s) => s.lob)), be = (s) => A[ee(s)] === s.quote_rate_id, C = d.rates.filter((s) => be(s) && !K.has(s.quote_rate_id)), De = Te, Z = te(d.rates, k), je = te(d.rates, []).length > 1, ye = Z.filter((s) => !C.some((c) => c.lob === s)), q = Rt.filter((s) => s.market !== "not_quoted" || x.not_quoted.length > 0), Ue = x.admitted.length + x.non_admitted.length, ze = Nt(N === "not_quoted" ? x.not_quoted : x[N], { sortBy: N === "not_quoted" ? "carrier" : "premium" }), xe = e === "Bundle" ? [{
1088
1088
  lob: "PersonalAuto",
1089
- label: Se.PersonalAuto
1089
+ label: Ie.PersonalAuto
1090
1090
  }, {
1091
1091
  lob: "PersonalHome",
1092
- label: Se.PersonalHome
1092
+ label: Ie.PersonalHome
1093
1093
  }].filter(({ lob: s }) => !d.rates.some((c) => c.lob === s)) : [], Ye = (s) => {
1094
1094
  let c = s.key === "ArrowRight" ? 1 : s.key === "ArrowLeft" ? -1 : 0, l = s.key === "Home" ? q[0] : s.key === "End" ? q[q.length - 1] : c ? q[(q.findIndex((h) => h.market === N) + c + q.length) % q.length] : void 0;
1095
1095
  l && (s.preventDefault(), f(l.market), setTimeout(() => document.getElementById(W(l.market).tab)?.focus(), 0));
@@ -1205,7 +1205,7 @@ var pt = {
1205
1205
  }) : null,
1206
1206
  s.lob ? /* @__PURE__ */ r("h3", {
1207
1207
  className: "cds-mb-2 cds-flex cds-items-center cds-gap-2 cds-text-sm cds-font-bold cds-uppercase cds-tracking-wide cds-text-fg",
1208
- children: [/* @__PURE__ */ t(D, { lob: s.lob }), s.title]
1208
+ children: [/* @__PURE__ */ t(L, { lob: s.lob }), s.title]
1209
1209
  }) : null,
1210
1210
  /* @__PURE__ */ t("ul", {
1211
1211
  className: "cds-space-y-3",
@@ -1214,8 +1214,8 @@ var pt = {
1214
1214
  showLob: !s.lob,
1215
1215
  isSelected: be(l),
1216
1216
  isRequested: K.has(l.quote_rate_id),
1217
- lobLocked: !K.has(l.quote_rate_id) && De.has(l.lob),
1218
- onSelect: () => Le ? v((h) => ({
1217
+ lobLocked: !K.has(l.quote_rate_id) && Le.has(l.lob),
1218
+ onSelect: () => De ? v((h) => ({
1219
1219
  ...h,
1220
1220
  [ee(l)]: l.quote_rate_id
1221
1221
  })) : void pe(l, d.rates)
@@ -1236,16 +1236,16 @@ var pt = {
1236
1236
  href: G,
1237
1237
  onClick: () => se("phone_call_click", {
1238
1238
  placement: "quote_rates_all_declined",
1239
- phone: S
1239
+ phone: I
1240
1240
  }),
1241
1241
  className: `cds-inline-flex cds-items-center cds-gap-2 cds-rounded-xl cds-bg-accent cds-px-6 cds-py-3 cds-text-sm cds-font-bold cds-text-primary-foreground hover:cds-bg-accent ${w}`,
1242
1242
  children: [
1243
- /* @__PURE__ */ t(Ie, {
1243
+ /* @__PURE__ */ t(Se, {
1244
1244
  "aria-hidden": "true",
1245
1245
  className: "cds-h-4 cds-w-4"
1246
1246
  }),
1247
1247
  "Call ",
1248
- S
1248
+ I
1249
1249
  ]
1250
1250
  }),
1251
1251
  /* @__PURE__ */ t("div", { children: /* @__PURE__ */ t(O, { quoteId: a }) })
@@ -1264,7 +1264,7 @@ var pt = {
1264
1264
  className: "cds-flex cds-justify-between cds-gap-2 cds-text-xs",
1265
1265
  children: [/* @__PURE__ */ r("span", {
1266
1266
  className: "cds-flex cds-items-center cds-gap-1.5 cds-text-fg-muted",
1267
- children: [/* @__PURE__ */ t(D, {
1267
+ children: [/* @__PURE__ */ t(L, {
1268
1268
  lob: s.lob,
1269
1269
  size: "sm"
1270
1270
  }), M(s.lob) ?? "Policy"]
@@ -1334,5 +1334,5 @@ var pt = {
1334
1334
  export {
1335
1335
  Kt as n,
1336
1336
  Ft as r,
1337
- Lt as t
1337
+ Dt as t
1338
1338
  };