@getcredify/credify-insurance-widget 1.44.0 → 1.45.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.
- package/README.md +5 -5
- package/dist/{address-BEVwov8q-CuX4iOBo.js → address-BEVwov8q-BHA-1zzm.js} +1 -1
- package/dist/api-BLmgLEy-.js +51 -0
- package/dist/{car-CR69ZjJ2.js → car-B8Sfr377.js} +1 -1
- package/dist/{check-Bo3wjuln.js → check-B8qTJ1zD.js} +1 -1
- package/dist/{copy-applicant-offer-CqzfNhkJ-C01V9k7v.js → copy-applicant-offer-BPo842pD-COcsLcbo.js} +3 -3
- package/dist/{copy-from-record-BNP6CFFR-B0wsM313.js → copy-from-record-DL503itm-B05F775l.js} +10 -10
- package/dist/{coverageDerivation-CV2ORogj-CEEm5ZWr.js → coverageDerivation-CV2ORogj-D4IAkVAP.js} +1 -1
- package/dist/{fixtures-ijbZ16Zg-C9Egb9wf.js → fixtures-ijbZ16Zg-CB6WPBEx.js} +1 -1
- package/dist/{household-prefill-CmtB9R3R-D86kYzTo.js → household-prefill-DJ-Y0NcP-TwmnYrqf.js} +30 -30
- package/dist/{householdPrefill-DLm3pxFH-BWVN4BLJ.js → householdPrefill-DLm3pxFH-Gudko0w4.js} +1 -1
- package/dist/iframe/assets/{address-BEVwov8q-BckjuR7s.js → address-BEVwov8q-RcBegFnh.js} +1 -1
- package/dist/iframe/assets/{car-DKll0kXc.js → car-DQIQf4LA.js} +1 -1
- package/dist/iframe/assets/{check-B9ojZKSs.js → check-BiNh2j82.js} +1 -1
- package/dist/iframe/assets/{copy-applicant-offer-CqzfNhkJ-DJkKq7un.js → copy-applicant-offer-BPo842pD-Cj352DzN.js} +1 -1
- package/dist/iframe/assets/{copy-from-record-BNP6CFFR-Dk7QPvpr.js → copy-from-record-DL503itm-B7hBbUhh.js} +2 -2
- package/dist/iframe/assets/{coverageDerivation-CV2ORogj-BaQlJ22H.js → coverageDerivation-CV2ORogj-D3oRqD1U.js} +1 -1
- package/dist/iframe/assets/{dob-calendar-RIJ5S6YU-C3ZYmy3v.js → dob-calendar-RIJ5S6YU-vOGgSHSK.js} +1 -1
- package/dist/iframe/assets/{fixtures-ijbZ16Zg-B0KKADMf.js → fixtures-ijbZ16Zg-BmEw6uDw.js} +1 -1
- package/dist/iframe/assets/household-prefill-DJ-Y0NcP-z6AnkJcR.js +1 -0
- package/dist/iframe/assets/{householdPrefill-DLm3pxFH-DNBBTd54.js → householdPrefill-DLm3pxFH-BZXueCa7.js} +1 -1
- package/dist/iframe/assets/iframe-ku_diR98.js +107 -0
- package/dist/iframe/assets/{index-D81Toecg.js → index-IiQzPjFm.js} +2 -2
- package/dist/iframe/assets/intake-review-panel-CWz2efw4-CP-sEc-j.js +1 -0
- package/dist/iframe/assets/{mockJump-hNzgzUmO-B4HifTQZ.js → mockJump-H1NFTDah-yzeq4yea.js} +1 -1
- package/dist/iframe/assets/payload-CQc06PZC-BxklUdmW.js +1 -0
- package/dist/iframe/assets/{question-list-DFjWa8ZA-5HX-Q_DR.js → question-list-CcoyuyQD-DCzTkzeE.js} +11 -11
- package/dist/iframe/assets/rates-panel-MXCbnqpL-TFkvW-DN.js +17 -0
- package/dist/iframe/assets/{review-panel-C_WxX33U-BnudlA3G.js → review-panel-CFVxGU7F-CqUUCDLK.js} +2 -2
- package/dist/iframe/assets/stage-BSRsu--X-BAWfI2cm.js +1 -0
- package/dist/iframe/assets/validation-ELW00AsL-ytOMlsxG.js +3 -0
- package/dist/iframe/assets/{vehicleCoverage-CBWORI1l-Bs6c4Xhh.js → vehicleCoverage-DI2dKrnI-DVXwPfxd.js} +1 -1
- package/dist/iframe/assets/{visibility-CKRGC3Il-DVTBboJH.js → visibility-CyRoLvg5-CxslMJYX.js} +1 -1
- package/dist/iframe/assets/waves-vdL6w3zC.js +16 -0
- package/dist/iframe/iframe.html +1 -1
- package/dist/{index-7nmHdjZ4.js → index-IZRzz1Mi.js} +1 -1
- package/dist/index.es.js +1 -1
- package/dist/index.umd.js +103 -103
- package/dist/{intake-review-panel-D27t8CZO-CKLXjEb0.js → intake-review-panel-CWz2efw4-BQ-Nog4K.js} +27 -27
- package/dist/{mockJump-hNzgzUmO-De8oea8T.js → mockJump-H1NFTDah-CkqZVQxf.js} +1 -1
- package/dist/{payload-DrGFAxms-CivFCNuj.js → payload-CQc06PZC-KA6cBCno.js} +26 -26
- package/dist/{question-list-DFjWa8ZA-sWgoo34K.js → question-list-CcoyuyQD-_c4J4n0G.js} +51 -51
- package/dist/rates-panel-MXCbnqpL-DGYBAFto.js +1323 -0
- package/dist/{review-panel-C_WxX33U-qkUKI77r.js → review-panel-CFVxGU7F-CtO3WmnD.js} +51 -51
- package/dist/stage-BSRsu--X-DJs8ps3K.js +197 -0
- package/dist/utils/branding.d.ts +1 -1
- package/dist/utils/prefill.d.ts +2 -4
- package/dist/{validation-D42QXxck-DFkyiEd-.js → validation-ELW00AsL-C4xgPdbr.js} +341 -343
- package/dist/{vehicleCoverage-CBWORI1l-Br309K1G.js → vehicleCoverage-DI2dKrnI-Lq9BCjQm.js} +3 -3
- package/dist/{visibility-CKRGC3Il-SsuTwW3e.js → visibility-CyRoLvg5-DNRgF2sH.js} +6 -6
- package/dist/waves-DM8Lgssk.js +71 -0
- package/dist/{widget-Bc0CD2Yh.js → widget-3S1xkGig.js} +2972 -2827
- package/package.json +2 -2
- package/dist/api-DYP3b3gY.js +0 -51
- package/dist/core-CrEw_I-E-D_5b2Ij3.js +0 -417
- package/dist/iframe/assets/core-CrEw_I-E-Cgrp_zkJ.js +0 -16
- package/dist/iframe/assets/household-prefill-CmtB9R3R-DtfByJ8T.js +0 -1
- package/dist/iframe/assets/iframe-Chy4dD4i.js +0 -107
- package/dist/iframe/assets/intake-review-panel-D27t8CZO-CyXFTi_6.js +0 -1
- package/dist/iframe/assets/payload-DrGFAxms-CKeiScMv.js +0 -1
- package/dist/iframe/assets/rates-panel-BSFiWEZX-CUbwWzwJ.js +0 -17
- package/dist/iframe/assets/stage-knShj71W-BrRsgDlE.js +0 -1
- package/dist/iframe/assets/validation-D42QXxck-DJUS31-5.js +0 -3
- package/dist/rates-panel-BSFiWEZX-D2Z8IzSh.js +0 -1001
- package/dist/stage-knShj71W-Cndh8rxW.js +0 -197
|
@@ -1,197 +0,0 @@
|
|
|
1
|
-
import { t as O, $ as V, a0 as x, a1 as D, a2 as F } from "./widget-Bc0CD2Yh.js";
|
|
2
|
-
import { t as q, n as g } from "./types-LUGvo5ic-CiVRcsV9.js";
|
|
3
|
-
import { k as h, j as f, n as L, u as P, c as R, d as U, A as j } from "./visibility-CKRGC3Il-SsuTwW3e.js";
|
|
4
|
-
import { k as A } from "./validation-D42QXxck-DFkyiEd-.js";
|
|
5
|
-
import { t as $, l as Y, a as Q, o as M, i as K, f as B, n as W, r as I } from "./vehicleCoverage-CBWORI1l-Br309K1G.js";
|
|
6
|
-
(function() {
|
|
7
|
-
if (typeof s > "u")
|
|
8
|
-
var s = { env: {} };
|
|
9
|
-
})();
|
|
10
|
-
var C = /* @__PURE__ */ new Set([
|
|
11
|
-
"sale_price_cents",
|
|
12
|
-
"dwelling_replacement_cost",
|
|
13
|
-
"other_structures_coverage",
|
|
14
|
-
"personal_property_coverage",
|
|
15
|
-
"loss_of_use_coverage",
|
|
16
|
-
"custom_equipment_value_cents",
|
|
17
|
-
"cost_new_value_cents",
|
|
18
|
-
"stated_value_amount_cents",
|
|
19
|
-
"property_damage_amount_paid_cents",
|
|
20
|
-
"personal_injury_amount_paid_cents",
|
|
21
|
-
"auto_current_annual_premium_cents",
|
|
22
|
-
"amount_paid_cents"
|
|
23
|
-
]), G = /* @__PURE__ */ new Set([
|
|
24
|
-
"total_area_sq_ft",
|
|
25
|
-
"annual_mileage",
|
|
26
|
-
"miles_to_work",
|
|
27
|
-
"distance_to_coast_miles"
|
|
28
|
-
]), H = (s) => C.has(s), Z = (s) => C.has(s) || G.has(s), z = (s, e) => {
|
|
29
|
-
let r = String(s ?? "").replace(/\D/g, "");
|
|
30
|
-
if (!r) return "";
|
|
31
|
-
let t = Number(r);
|
|
32
|
-
if (!Number.isFinite(t)) return "";
|
|
33
|
-
let o = t.toLocaleString("en-US");
|
|
34
|
-
return e ? `$${o}` : o;
|
|
35
|
-
}, pe = /* @__PURE__ */ O({
|
|
36
|
-
STAGES_BY_PRODUCT: () => F,
|
|
37
|
-
ZIP_FIRST_PAINT_CACHE_KEY: () => D,
|
|
38
|
-
ZIP_FIRST_PAINT_QUESTIONS: () => x,
|
|
39
|
-
itemScope: () => w,
|
|
40
|
-
reviewGroupsForStage: () => le,
|
|
41
|
-
reviewRowsForStage: () => oe,
|
|
42
|
-
stageSlice: () => te,
|
|
43
|
-
validateStage: () => se
|
|
44
|
-
}), J = ["ssn_display"], w = (s, e) => {
|
|
45
|
-
let r = {
|
|
46
|
-
...s,
|
|
47
|
-
...e
|
|
48
|
-
};
|
|
49
|
-
for (let t of J) t in e || delete r[t];
|
|
50
|
-
return r;
|
|
51
|
-
}, X = (s, e, r) => {
|
|
52
|
-
let t = w(s, e);
|
|
53
|
-
for (let o of r) o.key in e ? t[o.key] = e[o.key] : delete t[o.key];
|
|
54
|
-
return t;
|
|
55
|
-
}, ee = {
|
|
56
|
-
vehicles: "Vehicle",
|
|
57
|
-
drivers: "Driver",
|
|
58
|
-
driver_accidents: "Accident",
|
|
59
|
-
driver_violations: "Violation",
|
|
60
|
-
losses: "Loss",
|
|
61
|
-
home_losses: "Loss"
|
|
62
|
-
}, d = (s) => ee[s] ?? "Entry", b = (s, e, r, t) => {
|
|
63
|
-
let o = (l, i) => {
|
|
64
|
-
l.forEach((a) => {
|
|
65
|
-
let u = P(a);
|
|
66
|
-
if (u) {
|
|
67
|
-
let n = R(a) || i[a.key] === u.conditionalValue;
|
|
68
|
-
t(a.key, u.conditionalQuestions ?? [], n);
|
|
69
|
-
}
|
|
70
|
-
U(a, i).forEach((n) => {
|
|
71
|
-
n.conditionalQuestionsAllowMultiple || o(n.conditionalQuestions ?? [], i);
|
|
72
|
-
});
|
|
73
|
-
});
|
|
74
|
-
};
|
|
75
|
-
o(L(s), e);
|
|
76
|
-
}, se = ({ questions: s, values: e, stageKey: r }) => {
|
|
77
|
-
let t = h(s, e, r), o = A(t, e), l = [], i = [];
|
|
78
|
-
for (let [a, u] of Object.entries(o)) {
|
|
79
|
-
let n = t.find((c) => c.key === a);
|
|
80
|
-
i.push(`${n?.question ?? a}: ${u}`);
|
|
81
|
-
}
|
|
82
|
-
if (b(s, e, r, (a, u, n) => {
|
|
83
|
-
if (!n) return;
|
|
84
|
-
let c = f(e, a);
|
|
85
|
-
if (!c.length) {
|
|
86
|
-
i.push(`Add at least one ${d(a).toLowerCase()}.`), o[g(a)] = `Add at least one ${d(a).toLowerCase()}.`;
|
|
87
|
-
return;
|
|
88
|
-
}
|
|
89
|
-
c.forEach((y, p) => {
|
|
90
|
-
let _ = j(u, y, e, r, p), N = A(_, X(e, y, _)), m = {};
|
|
91
|
-
for (let v of _) {
|
|
92
|
-
let k = N[v.key];
|
|
93
|
-
k && (m[v.key] = k, i.push(`${d(a)} ${p + 1} — ${v.question}: ${k}`));
|
|
94
|
-
}
|
|
95
|
-
Object.keys(m).length && l.push({
|
|
96
|
-
groupKey: a,
|
|
97
|
-
index: p,
|
|
98
|
-
errorsByKey: m
|
|
99
|
-
});
|
|
100
|
-
});
|
|
101
|
-
}), t.some((a) => a.key === "vehicle_policy_selections")) {
|
|
102
|
-
let a = f(e, "vehicles"), u = /* @__PURE__ */ new Map();
|
|
103
|
-
for (let y of Y(a)) u.set(y.index, { ...y.errorsByKey }), i.push(`Vehicle ${y.index + 1} — coverage selections are incomplete.`);
|
|
104
|
-
let n = Q(e), c = f(e, "drivers").length;
|
|
105
|
-
a.forEach((y, p) => {
|
|
106
|
-
let _ = M(n, p, c);
|
|
107
|
-
_ && (u.set(p, {
|
|
108
|
-
...u.get(p) ?? {},
|
|
109
|
-
[$]: _
|
|
110
|
-
}), i.push(`Vehicle ${p + 1} — ${_}`));
|
|
111
|
-
});
|
|
112
|
-
for (let [y, p] of u) l.push({
|
|
113
|
-
groupKey: "vehicles",
|
|
114
|
-
index: y,
|
|
115
|
-
errorsByKey: p
|
|
116
|
-
});
|
|
117
|
-
}
|
|
118
|
-
return {
|
|
119
|
-
errorsByKey: o,
|
|
120
|
-
itemErrors: l,
|
|
121
|
-
issues: i,
|
|
122
|
-
isValid: Object.keys(o).length === 0 && l.length === 0
|
|
123
|
-
};
|
|
124
|
-
}, E = (s) => Object.values(s).every((e) => e == null || String(e).trim() === ""), te = (s, e, r) => {
|
|
125
|
-
let t = {};
|
|
126
|
-
for (let l of h(s, e, r)) l.key in e && (t[l.key] = e[l.key]);
|
|
127
|
-
b(s, e, r, (l, i, a) => {
|
|
128
|
-
let u = g(l);
|
|
129
|
-
if (!a || !(u in e)) return;
|
|
130
|
-
let n = f(e, l), c = n.filter((y) => !E(y));
|
|
131
|
-
!c.length && n.length || (t[u] = c, t[l] = e[l] ?? "Yes");
|
|
132
|
-
});
|
|
133
|
-
let o = g("vehicles");
|
|
134
|
-
return h(s, e, r).some((l) => l.key === "vehicle_policy_selections") && o in e && !(o in t) && (t[o] = f(e, "vehicles").filter((l) => !E(l)), t.vehicles = e.vehicles ?? "Yes", "driver_vehicle_assignments" in e && (t[$] = e[$])), t;
|
|
135
|
-
}, re = (s, e) => [s.first_name, s.last_name].map((r) => String(r ?? "").trim()).filter(Boolean).join(" ") || `Driver ${e + 1}`, ie = (s, e, r) => s === "vehicles" ? B(e, r) : s === "drivers" ? re(e, r) : `${d(s)} ${r + 1}`, le = ({ questions: s, values: e, stageKey: r, suppressedKeys: t }) => {
|
|
136
|
-
let o = [];
|
|
137
|
-
return b(s, e, r, (l, i, a) => {
|
|
138
|
-
if (!a) return;
|
|
139
|
-
let u = f(e, l).map((n, c) => {
|
|
140
|
-
let y = w(e, n), p = j(i, n, e, r, c);
|
|
141
|
-
return {
|
|
142
|
-
name: ie(l, n, c),
|
|
143
|
-
rows: p.filter((_) => !_.key.endsWith(q)).filter((_) => !t?.has(_.key)).map((_) => ({
|
|
144
|
-
key: `${l}__${c}__${_.key}`,
|
|
145
|
-
label: _.question,
|
|
146
|
-
value: S(_, n[_.key], y)
|
|
147
|
-
}))
|
|
148
|
-
};
|
|
149
|
-
});
|
|
150
|
-
o.push({
|
|
151
|
-
groupKey: l,
|
|
152
|
-
label: l.replace(/_/g, " ").replace(/^./, (n) => n.toUpperCase()),
|
|
153
|
-
entries: u
|
|
154
|
-
});
|
|
155
|
-
}), o;
|
|
156
|
-
}, T = (s) => {
|
|
157
|
-
let e = String(s ?? "").replace(/\D/g, "");
|
|
158
|
-
return e.length >= 4 ? e.slice(-4) : null;
|
|
159
|
-
}, S = (s, e, r) => {
|
|
160
|
-
if (s.key === "social_security_number") {
|
|
161
|
-
let t = T(e) ?? T(r.ssn_display);
|
|
162
|
-
return t ? `•••–••–${t}` : "—";
|
|
163
|
-
}
|
|
164
|
-
return e == null || e === "" ? "—" : e === !0 ? "Yes" : e === !1 ? "No" : Array.isArray(e) ? `${e.length} added` : s.inputType === "select" || s.inputType === "radio" ? V(s.key, String(e)) : s.inputType === "number" && Z(s.key) && z(e, H(s.key)) || String(e);
|
|
165
|
-
}, ae = (s) => ({
|
|
166
|
-
question: I[s],
|
|
167
|
-
key: s,
|
|
168
|
-
required: !0,
|
|
169
|
-
inputType: "select"
|
|
170
|
-
}), oe = ({ questions: s, values: e, stageKey: r, suppressedKeys: t }) => {
|
|
171
|
-
let o = h(s, e, r), l = o.filter((i) => !i.key.endsWith(q)).filter((i) => i.key !== K).filter((i) => !t?.has(i.key)).map((i) => ({
|
|
172
|
-
key: i.key,
|
|
173
|
-
label: i.question,
|
|
174
|
-
value: S(i, e[i.key], e)
|
|
175
|
-
}));
|
|
176
|
-
return o.some((i) => i.key === "vehicle_policy_selections") && f(e, "vehicles").forEach((i, a) => {
|
|
177
|
-
let u = B(i, a);
|
|
178
|
-
for (let n of W) l.push({
|
|
179
|
-
key: `${K}__${a}__${n}`,
|
|
180
|
-
label: `${u} — ${I[n]}`,
|
|
181
|
-
value: S(ae(n), i[n], e)
|
|
182
|
-
});
|
|
183
|
-
}), l;
|
|
184
|
-
};
|
|
185
|
-
export {
|
|
186
|
-
pe as a,
|
|
187
|
-
G as c,
|
|
188
|
-
Z as d,
|
|
189
|
-
te as i,
|
|
190
|
-
z as l,
|
|
191
|
-
le as n,
|
|
192
|
-
se as o,
|
|
193
|
-
oe as r,
|
|
194
|
-
C as s,
|
|
195
|
-
w as t,
|
|
196
|
-
H as u
|
|
197
|
-
};
|