@getcredify/credify-insurance-widget 1.28.0 → 1.29.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 CHANGED
@@ -298,6 +298,46 @@ The widget will open as a full-page modal overlay that covers the entire viewpor
298
298
 
299
299
  See `examples/fullpage.html` for a complete example.
300
300
 
301
+ ## Mock Mode (Demo / Test Drive)
302
+
303
+ Mock mode lets you walk through the **entire quote flow** — postal code, every form
304
+ stage, SMS verification, rate results, and bind — without entering real data or
305
+ submitting a real quote. While active, every widget API call is answered from
306
+ built-in sample data instead of hitting Credify's servers, so no SMS is sent and no
307
+ quote is ever created.
308
+
309
+ Use it to demo or evaluate the widget on your own page before going live.
310
+
311
+ ### Enabling it
312
+
313
+ Mock mode is gated by an **unguessable key, provided by the Credify team**. It turns
314
+ on only when the page the widget runs in is loaded with a matching `?mock=<key>`
315
+ query parameter — so where you add it depends on which embedding method (above) you
316
+ use:
317
+
318
+ - **npm Package, Script Tag (UMD), or Full Page Mode** — the widget runs in your own
319
+ page, so add `?mock=<key>` to that page's address:
320
+
321
+ ```
322
+ https://your-site.com/insurance?mock=YOUR_KEY_FROM_CREDIFY
323
+ ```
324
+
325
+ - **Iframe Embedding** — the widget runs inside the iframe, so add `?mock=<key>` to
326
+ the iframe's `src`:
327
+
328
+ ```html
329
+ <iframe src="https://your-widget-domain.com/iframe.html?mock=YOUR_KEY_FROM_CREDIFY"></iframe>
330
+ ```
331
+
332
+ Open and step through the widget exactly as a real user would. A small red
333
+ **`MOCK MODE`** badge appears in the bottom-left corner as a reminder that nothing is
334
+ being submitted. Remove the `?mock=` parameter to return to the live flow.
335
+
336
+ > **Note:** Without the matching key, mock mode stays completely off and the widget
337
+ > talks to the live API as usual — so the same embed code is safe to ship to
338
+ > production. The key only gates demo behaviour in the browser session that supplies
339
+ > it; it grants no access and carries no risk if shared.
340
+
301
341
  ## PostMessage API
302
342
 
303
343
  When using iframe embedding, the widget communicates via the [postMessage API](https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage).
@@ -396,15 +436,15 @@ CredifyInsuranceWidget.on('stageCompleted', (data) => {
396
436
  });
397
437
  ```
398
438
 
399
- | Event | Payload | Fires when |
400
- | ------------------ | ---------------------------------------------------- | ---------------------------------------------- |
401
- | `widgetOpened` | _none_ | The widget overlay opens |
402
- | `widgetClosed` | _none_ | The widget overlay closes |
403
- | `stageViewed` | `{ stageKey, stageTitle, stepIndex, totalSteps }` | A form stage becomes visible |
404
- | `stageCompleted` | `{ stageKey, stageTitle, stepIndex, totalSteps }` | A form stage is successfully completed |
405
- | `flowCompleted` | _none_ | All stages are done and rate generation starts |
406
- | `ratesViewed` | `{ rateCount: number }` | The rates screen is shown |
407
- | `ratesBack` | _none_ | The user navigates back from the rates screen |
439
+ | Event | Payload | Fires when |
440
+ | ------------------ | ---------------------------------------------------- | ---------------------------------------------------------------------------- |
441
+ | `widgetOpened` | _none_ | The widget overlay opens |
442
+ | `widgetClosed` | _none_ | The widget overlay closes |
443
+ | `stageViewed` | `{ stageKey, stageTitle, stepIndex, totalSteps }` | A form stage becomes visible |
444
+ | `stageCompleted` | `{ stageKey, stageTitle, stepIndex, totalSteps }` | A form stage is successfully completed |
445
+ | `flowCompleted` | _none_ | All stages are done and rate generation starts |
446
+ | `ratesViewed` | `{ rateCount: number }` | The rates screen is shown |
447
+ | `ratesBack` | _none_ | The user navigates back from the rates screen |
408
448
  | `submissionFailed` | `{ reason: 'submission' \| 'timeout' \| 'network' }` | A quote submission fails (worker error, timeout, or repeated network errors) |
409
449
 
410
450
  The event names and payload types (`WidgetEventName`, `WidgetEventMap`,
@@ -0,0 +1,340 @@
1
+ (function() {
2
+ if (typeof e > "u")
3
+ var e = { env: {} };
4
+ })();
5
+ const d = ["Zip", "Email", "Product"], c = {
6
+ Auto: ["Zip", "Email", "Product", "Name", "Vehicle", "Driver", "AutoCurrentCarrier", "Demographics", "Ssn", "Phone", "SMSVerification"],
7
+ Home: ["Zip", "Email", "Product", "Name", "Home", "HomePolicy", "Demographics", "Ssn", "Phone", "SMSVerification"],
8
+ Bundle: ["Zip", "Email", "Product", "Name", "Home", "Vehicle", "Driver", "BundlePolicy", "Demographics", "Ssn", "Phone", "SMSVerification"]
9
+ };
10
+ function p(e) {
11
+ return e === "Auto" || e === "Home" || e === "Bundle" ? c[e] : d;
12
+ }
13
+ const s = ["Allstate", "State Farm", "GEICO", "Progressive", "Liberty Mutual", "Nationwide", "Farmers", "NoPriorInsurance"], n = ["25/50", "50/100", "100/300", "250/500"], y = Array.from({ length: 35 }, (e, t) => String(2024 - t)), m = [{ question: "What's your ZIP code?", inputType: "text", key: "postal_code", required: !0 }], _ = [{ question: "What is your email address?", inputType: "email", key: "email", required: !0 }], q = [
14
+ { question: "Do you want to quote auto, home, or both?", inputType: "select", options: ["Auto", "Home", "Bundle"], key: "product", required: !0 },
15
+ { question: "What is your property address?", inputType: "address", key: "address", required: !0 }
16
+ ], h = [
17
+ { question: "What is your first name?", inputType: "text", key: "first_name", required: !0 },
18
+ { question: "What is your last name?", inputType: "text", key: "last_name", required: !0 },
19
+ { question: "What is your date of birth?", inputType: "date", key: "date_of_birth", required: !0 }
20
+ ], T = [
21
+ {
22
+ question: "Add Vehicles",
23
+ inputType: "radio",
24
+ options: ["Yes"],
25
+ key: "vehicles",
26
+ required: !0,
27
+ conditionals: [
28
+ {
29
+ conditionalType: "equals",
30
+ conditionalValue: "Yes",
31
+ conditionalQuestionsAllowMultiple: !0,
32
+ conditionalQuestions: [
33
+ { question: "Vehicle Identification Number (VIN)", inputType: "text", key: "vin", required: !1 },
34
+ { question: "Year", inputType: "select", options: y, key: "year", required: !0 },
35
+ { question: "Make", inputType: "select", options: [], key: "make", required: !0 },
36
+ { question: "Model", inputType: "select", options: [], key: "model", required: !0 },
37
+ { question: "Body style", inputType: "select", options: [], key: "body_style", required: !0 },
38
+ { question: "Vehicle ownership type", inputType: "select", options: ["Owned", "Leased", "Lien"], key: "ownership_type", required: !0 },
39
+ {
40
+ question: "What is the primary use of this vehicle?",
41
+ inputType: "select",
42
+ options: ["Pleasure", "To_FromWork", "To_FromSchool", "Business", "Farming"],
43
+ key: "usage",
44
+ required: !0
45
+ },
46
+ { question: "Annual mileage driven", inputType: "number", key: "annual_mileage", required: !0 }
47
+ ]
48
+ }
49
+ ]
50
+ }
51
+ ], k = [
52
+ {
53
+ question: "Add Drivers",
54
+ inputType: "radio",
55
+ options: ["Yes"],
56
+ key: "drivers",
57
+ required: !0,
58
+ conditionals: [
59
+ {
60
+ conditionalType: "equals",
61
+ conditionalValue: "Yes",
62
+ conditionalQuestionsAllowMultiple: !0,
63
+ conditionalQuestions: [
64
+ { question: "First Name", inputType: "text", key: "first_name", required: !0 },
65
+ { question: "Middle Name Initial", inputType: "text", key: "middle_name", required: !1 },
66
+ { question: "Last Name", inputType: "text", key: "last_name", required: !0 },
67
+ { question: "Date of Birth", inputType: "date", key: "date_of_birth", required: !0 },
68
+ { question: "Gender", inputType: "select", options: ["Male", "Female"], key: "gender", required: !0 },
69
+ {
70
+ question: "What is the relationship to Driver #1?",
71
+ inputType: "select",
72
+ options: ["Spouse", "Parent", "Child", "Domestic Partner", "Relative", "Employee", "Other"],
73
+ key: "relationship_to_insured",
74
+ required: !0
75
+ },
76
+ {
77
+ question: "Marital status",
78
+ inputType: "select",
79
+ options: ["Single", "Married", "Divorced", "Widowed"],
80
+ key: "marital_status",
81
+ required: !0
82
+ }
83
+ ]
84
+ }
85
+ ]
86
+ }
87
+ ], a = [
88
+ { question: "When do you need your insurance to begin?", inputType: "date", key: "effective_date", required: !0 },
89
+ {
90
+ question: "Type of residence",
91
+ inputType: "select",
92
+ options: ["Single Family Dwelling", "Condo", "Apartment", "Townhouse", "Mobile Home"],
93
+ key: "residence_type",
94
+ required: !0
95
+ },
96
+ {
97
+ question: "Please select your current auto insurance company",
98
+ inputType: "select",
99
+ options: s,
100
+ key: "auto_prior_carrier_name",
101
+ required: !0,
102
+ conditionals: [
103
+ {
104
+ conditionalType: "notEquals",
105
+ conditionalValue: "NoPriorInsurance",
106
+ conditionalQuestions: [
107
+ { question: "Years with prior personal auto carrier", inputType: "number", key: "auto_prior_years", required: !0 },
108
+ { question: "Months with prior personal auto carrier", inputType: "number", key: "auto_prior_months", required: !0 },
109
+ { question: "When does the current policy expire?", inputType: "date", key: "auto_prior_expiration_date", required: !0 },
110
+ {
111
+ question: "What is your current or most recent Bodily Injury Limit?",
112
+ inputType: "select",
113
+ options: n,
114
+ key: "auto_prior_liability_limit",
115
+ required: !0
116
+ }
117
+ ]
118
+ }
119
+ ]
120
+ },
121
+ {
122
+ question: "Has any auto insurance company cancelled, declined or refused to renew you in the last 5 years?",
123
+ inputType: "radio",
124
+ options: ["Yes", "No"],
125
+ key: "auto_cancelled_declined_refused_to_renew",
126
+ required: !0
127
+ },
128
+ { question: "Bodily Injury liability", inputType: "select", options: n, key: "policy_bi", required: !0 },
129
+ { question: "Property Damage Liability", inputType: "select", options: ["25000", "50000", "100000"], key: "policy_pd", required: !0 }
130
+ ], f = [
131
+ { question: "Year built", inputType: "number", key: "year_built", required: !0 },
132
+ { question: "Total living area (sq ft)", inputType: "number", key: "total_area_sq_ft", required: !0 },
133
+ {
134
+ question: "Dwelling type",
135
+ inputType: "select",
136
+ options: ["Single Family", "Condo", "Townhouse", "Multi-Family"],
137
+ key: "dwelling_type",
138
+ required: !0
139
+ },
140
+ {
141
+ question: "Construction type",
142
+ inputType: "select",
143
+ options: ["Frame", "Masonry", "Masonry Veneer", "Fire Resistive"],
144
+ key: "construction_type",
145
+ required: !0
146
+ },
147
+ {
148
+ question: "Roof material",
149
+ inputType: "select",
150
+ options: ["Asphalt Shingle", "Metal", "Tile", "Wood Shake", "Slate"],
151
+ key: "roof_material_type",
152
+ required: !0
153
+ },
154
+ { question: "Number of stories", inputType: "select", options: ["1", "1.5", "2", "2.5", "3"], key: "number_of_stories", required: !0 }
155
+ ], l = [
156
+ { question: "When do you need your insurance to begin?", inputType: "date", key: "effective_date", required: !0 },
157
+ {
158
+ question: "Do you currently have a Homeowners policy?",
159
+ inputType: "radio",
160
+ options: ["Yes", "No"],
161
+ key: "home_has_prior_insurance",
162
+ required: !0,
163
+ conditionals: [
164
+ {
165
+ conditionalType: "equals",
166
+ conditionalValue: "Yes",
167
+ conditionalQuestions: [
168
+ {
169
+ question: "Which carrier currently insures the home?",
170
+ inputType: "select",
171
+ options: s,
172
+ key: "home_prior_carrier_name",
173
+ required: !0
174
+ }
175
+ ]
176
+ }
177
+ ]
178
+ },
179
+ {
180
+ question: "Personal liability limit",
181
+ inputType: "select",
182
+ options: ["100000", "300000", "500000", "1000000"],
183
+ key: "home_personal_liability",
184
+ required: !0
185
+ },
186
+ {
187
+ question: "All-perils deductible",
188
+ inputType: "select",
189
+ options: ["500", "1000", "2500", "5000"],
190
+ key: "home_all_perils_deductible",
191
+ required: !0
192
+ }
193
+ ], S = [...l, ...a], M = [
194
+ { question: "Gender", inputType: "radio", options: ["Male", "Female"], key: "gender", required: !0 },
195
+ {
196
+ question: "Marital status",
197
+ inputType: "select",
198
+ options: ["Single", "Married", "Divorced", "Widowed", "Domestic Partner"],
199
+ key: "marital_status",
200
+ required: !0
201
+ },
202
+ {
203
+ question: "Employment industry",
204
+ inputType: "select",
205
+ options: ["Technology", "Healthcare", "Education", "Finance", "Retail", "Construction", "Other"],
206
+ key: "employment_industry",
207
+ required: !0
208
+ },
209
+ { question: "How many occupants live in the household?", inputType: "number", key: "household_size", required: !0 },
210
+ {
211
+ question: "Do you authorize us to check your credit?",
212
+ inputType: "radio",
213
+ options: ["Yes", "No"],
214
+ key: "order_credit_authorized",
215
+ required: !0
216
+ }
217
+ ], g = [{ question: "Social Security Number", inputType: "text", key: "social_security_number", required: !1 }], E = [{ question: "What is your phone number?", inputType: "tel", key: "phone", required: !0 }], v = [
218
+ { question: "Please enter the code we sent to your phone number.", inputType: "text", key: "sms_code", required: !0 }
219
+ ], b = {
220
+ Zip: m,
221
+ Email: _,
222
+ Product: q,
223
+ Name: h,
224
+ Vehicle: T,
225
+ Driver: k,
226
+ AutoCurrentCarrier: a,
227
+ Home: f,
228
+ HomePolicy: l,
229
+ BundlePolicy: S,
230
+ Demographics: M,
231
+ Ssn: g,
232
+ Phone: E,
233
+ SMSVerification: v
234
+ };
235
+ function C(e) {
236
+ return b[e] ?? [];
237
+ }
238
+ const P = [
239
+ {
240
+ quote_rate_id: "mock-rate-1",
241
+ carrier_name: "Progressive",
242
+ carrier_logo_base64: null,
243
+ carrier_quote_id: "MOCK-PRG-001",
244
+ premium_cents: 142800,
245
+ monthly_premium_cents: 11900,
246
+ term_months: 12,
247
+ lob: "auto",
248
+ admitted_status: "admitted",
249
+ effective_date: "2026-07-01",
250
+ policy_end_date: "2027-07-01"
251
+ },
252
+ {
253
+ quote_rate_id: "mock-rate-2",
254
+ carrier_name: "Nationwide",
255
+ carrier_logo_base64: null,
256
+ carrier_quote_id: "MOCK-NW-002",
257
+ premium_cents: 156e3,
258
+ monthly_premium_cents: 13e3,
259
+ term_months: 12,
260
+ lob: "auto",
261
+ admitted_status: "admitted",
262
+ effective_date: "2026-07-01",
263
+ policy_end_date: "2027-07-01"
264
+ },
265
+ {
266
+ quote_rate_id: "mock-rate-3",
267
+ carrier_name: "Liberty Mutual",
268
+ carrier_logo_base64: null,
269
+ carrier_quote_id: "MOCK-LM-003",
270
+ premium_cents: 173400,
271
+ monthly_premium_cents: 14450,
272
+ term_months: 12,
273
+ lob: "auto",
274
+ admitted_status: "non_admitted",
275
+ effective_date: "2026-07-01",
276
+ policy_end_date: "2027-07-01"
277
+ }
278
+ ], A = ["Toyota", "Honda", "Ford", "Chevrolet", "Tesla", "Subaru"], I = {
279
+ Toyota: ["Camry", "Corolla", "RAV4", "Highlander", "Tacoma"],
280
+ Honda: ["Civic", "Accord", "CR-V", "Pilot", "Odyssey"],
281
+ Ford: ["F-150", "Escape", "Explorer", "Mustang", "Bronco"],
282
+ Chevrolet: ["Silverado", "Equinox", "Malibu", "Tahoe", "Camaro"],
283
+ // cspell:disable-line
284
+ Tesla: ["Model 3", "Model Y", "Model S", "Model X"],
285
+ Subaru: ["Outback", "Forester", "Crosstrek", "Impreza"]
286
+ // cspell:disable-line
287
+ }, D = ["Sedan", "SUV", "Truck", "Coupe", "Hatchback", "Minivan"];
288
+ function V(e) {
289
+ return e.make && e.model ? { ready: !0, bodyStyles: D } : e.make ? { ready: !0, models: I[e.make] ?? ["Base", "Sport", "Limited"] } : { ready: !0, makes: A };
290
+ }
291
+ function O() {
292
+ return { year: 2022, make: "Toyota", model: "Camry", bodyStyle: "Sedan" };
293
+ }
294
+ const r = "mock-quote-0001", u = "mock-jwt-token";
295
+ let i = { quote_id: r };
296
+ function N(e = {}) {
297
+ i = { quote_id: r, ...e };
298
+ }
299
+ function w(e) {
300
+ return e.action === "send" ? { success: !0 } : e.action === "resume" ? { isVerified: !0, token: u, quoteId: r } : { isVerified: !0, token: u };
301
+ }
302
+ function H(e) {
303
+ return e.action === "vinDecode" ? O() : V({
304
+ year: typeof e.year == "number" ? e.year : void 0,
305
+ make: typeof e.make == "string" ? e.make : void 0,
306
+ model: typeof e.model == "string" ? e.model : void 0
307
+ });
308
+ }
309
+ function R(e, t) {
310
+ switch (e) {
311
+ case "/create-quote":
312
+ return N({ postal_code: t.postal_code }), { quoteId: r };
313
+ case "/get-stages-for-quote":
314
+ return { stages: p(i.product) };
315
+ case "/get-questions-by-stage":
316
+ return { questions: C(t.stage) };
317
+ case "/update-quote": {
318
+ const o = { ...t.payload ?? {} };
319
+ return delete o.current_stage, i = { ...i, ...o }, { status: "success" };
320
+ }
321
+ case "/verify-quote":
322
+ return w(t);
323
+ case "/is-supported-state":
324
+ return { isSupported: !0 };
325
+ case "/get-rates":
326
+ return { rates: P };
327
+ case "/get-quote":
328
+ return { quote: i };
329
+ case "/get-vehicle-options":
330
+ return H(t);
331
+ case "/request-bind":
332
+ return { success: !0 };
333
+ default:
334
+ throw new Error(`No mock handler for ${e}`);
335
+ }
336
+ }
337
+ export {
338
+ R as handleMockRequest
339
+ };
340
+ //# sourceMappingURL=backend-DPdOdxwz.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"backend-DPdOdxwz.js","sources":["../src/mock/fixtures/stages.ts","../src/mock/fixtures/questions.ts","../src/mock/fixtures/rates.ts","../src/mock/fixtures/vehicleOptions.ts","../src/mock/backend.ts"],"sourcesContent":["/**\n * Stage lists per product, copied verbatim from the real backend resolver\n * (packages/rating/packages/getStagesForQuote/src/index.ts). Keeping these in\n * lockstep is what makes the mocked flow reshape exactly like production: after\n * the Product stage is answered, `getStagesForQuote` returns the matching list\n * and the wizard rebuilds its step order.\n *\n * CanopyConnect is intentionally omitted because IS_CANOPY_CONNECT_ENABLED is\n * currently false in the backend; add it here if/when that flips.\n */\nimport type { Stage } from '@getcredify/credify-insurance-types';\n\n/** Pre-product-selection stages (also returned when there is no quote yet). */\nexport const DEFAULT_STAGES: Stage[] = ['Zip', 'Email', 'Product'];\n\nexport const STAGES_BY_PRODUCT: Record<'Auto' | 'Home' | 'Bundle', Stage[]> = {\n Auto: ['Zip', 'Email', 'Product', 'Name', 'Vehicle', 'Driver', 'AutoCurrentCarrier', 'Demographics', 'Ssn', 'Phone', 'SMSVerification'],\n Home: ['Zip', 'Email', 'Product', 'Name', 'Home', 'HomePolicy', 'Demographics', 'Ssn', 'Phone', 'SMSVerification'],\n Bundle: ['Zip', 'Email', 'Product', 'Name', 'Home', 'Vehicle', 'Driver', 'BundlePolicy', 'Demographics', 'Ssn', 'Phone', 'SMSVerification']\n};\n\n/** Resolve the stage list for a stored product value, falling back to defaults. */\nexport function resolveStages(product: unknown): Stage[] {\n if (product === 'Auto' || product === 'Home' || product === 'Bundle') {\n return STAGES_BY_PRODUCT[product];\n }\n return DEFAULT_STAGES;\n}\n","/**\n * Mock question definitions per stage.\n *\n * Keys, input types, options and conditional structure mirror the real backend\n * definitions (packages/rating/packages/getQuestionsByStage/src/const.ts) so the\n * mocked screens render and persist exactly like production. Option lists are\n * representative subsets (the real lists hold 100+ carriers/makes) — enough to\n * exercise every input type and the repeatable vehicle/driver sections for\n * design and flow verification. Vehicle make/model/body_style options are left\n * empty on purpose: the FormRenderer populates them via the (mocked) vehicle\n * options endpoint, just like production.\n *\n * Typed as `Question[]` so the discriminated `inputType`/`options` union is\n * enforced by the compiler and can never drift from the shared type's shape.\n */\nimport type { Question, Stage } from '@getcredify/credify-insurance-types';\n\nconst CARRIERS = ['Allstate', 'State Farm', 'GEICO', 'Progressive', 'Liberty Mutual', 'Nationwide', 'Farmers', 'NoPriorInsurance'];\nconst LIABILITY_LIMITS = ['25/50', '50/100', '100/300', '250/500'];\nconst VEHICLE_YEARS = Array.from({ length: 2024 - 1990 + 1 }, (_, i) => String(2024 - i));\n\nconst ZIP: Question[] = [{ question: \"What's your ZIP code?\", inputType: 'text', key: 'postal_code', required: true }];\n\nconst EMAIL: Question[] = [{ question: 'What is your email address?', inputType: 'email', key: 'email', required: true }];\n\nconst PRODUCT: Question[] = [\n { question: 'Do you want to quote auto, home, or both?', inputType: 'select', options: ['Auto', 'Home', 'Bundle'], key: 'product', required: true },\n { question: 'What is your property address?', inputType: 'address', key: 'address', required: true }\n];\n\nconst NAME: Question[] = [\n { question: 'What is your first name?', inputType: 'text', key: 'first_name', required: true },\n { question: 'What is your last name?', inputType: 'text', key: 'last_name', required: true },\n { question: 'What is your date of birth?', inputType: 'date', key: 'date_of_birth', required: true }\n];\n\nconst VEHICLE: Question[] = [\n {\n question: 'Add Vehicles',\n inputType: 'radio',\n options: ['Yes'],\n key: 'vehicles',\n required: true,\n conditionals: [\n {\n conditionalType: 'equals',\n conditionalValue: 'Yes',\n conditionalQuestionsAllowMultiple: true,\n conditionalQuestions: [\n { question: 'Vehicle Identification Number (VIN)', inputType: 'text', key: 'vin', required: false },\n { question: 'Year', inputType: 'select', options: VEHICLE_YEARS, key: 'year', required: true },\n { question: 'Make', inputType: 'select', options: [], key: 'make', required: true },\n { question: 'Model', inputType: 'select', options: [], key: 'model', required: true },\n { question: 'Body style', inputType: 'select', options: [], key: 'body_style', required: true },\n { question: 'Vehicle ownership type', inputType: 'select', options: ['Owned', 'Leased', 'Lien'], key: 'ownership_type', required: true },\n {\n question: 'What is the primary use of this vehicle?',\n inputType: 'select',\n options: ['Pleasure', 'To_FromWork', 'To_FromSchool', 'Business', 'Farming'],\n key: 'usage',\n required: true\n },\n { question: 'Annual mileage driven', inputType: 'number', key: 'annual_mileage', required: true }\n ]\n }\n ]\n }\n];\n\nconst DRIVER: Question[] = [\n {\n question: 'Add Drivers',\n inputType: 'radio',\n options: ['Yes'],\n key: 'drivers',\n required: true,\n conditionals: [\n {\n conditionalType: 'equals',\n conditionalValue: 'Yes',\n conditionalQuestionsAllowMultiple: true,\n conditionalQuestions: [\n { question: 'First Name', inputType: 'text', key: 'first_name', required: true },\n { question: 'Middle Name Initial', inputType: 'text', key: 'middle_name', required: false },\n { question: 'Last Name', inputType: 'text', key: 'last_name', required: true },\n { question: 'Date of Birth', inputType: 'date', key: 'date_of_birth', required: true },\n { question: 'Gender', inputType: 'select', options: ['Male', 'Female'], key: 'gender', required: true },\n {\n question: 'What is the relationship to Driver #1?',\n inputType: 'select',\n options: ['Spouse', 'Parent', 'Child', 'Domestic Partner', 'Relative', 'Employee', 'Other'],\n key: 'relationship_to_insured',\n required: true\n },\n {\n question: 'Marital status',\n inputType: 'select',\n options: ['Single', 'Married', 'Divorced', 'Widowed'],\n key: 'marital_status',\n required: true\n }\n ]\n }\n ]\n }\n];\n\nconst AUTO_CURRENT_CARRIER: Question[] = [\n { question: 'When do you need your insurance to begin?', inputType: 'date', key: 'effective_date', required: true },\n {\n question: 'Type of residence',\n inputType: 'select',\n options: ['Single Family Dwelling', 'Condo', 'Apartment', 'Townhouse', 'Mobile Home'],\n key: 'residence_type',\n required: true\n },\n {\n question: 'Please select your current auto insurance company',\n inputType: 'select',\n options: CARRIERS,\n key: 'auto_prior_carrier_name',\n required: true,\n conditionals: [\n {\n conditionalType: 'notEquals',\n conditionalValue: 'NoPriorInsurance',\n conditionalQuestions: [\n { question: 'Years with prior personal auto carrier', inputType: 'number', key: 'auto_prior_years', required: true },\n { question: 'Months with prior personal auto carrier', inputType: 'number', key: 'auto_prior_months', required: true },\n { question: 'When does the current policy expire?', inputType: 'date', key: 'auto_prior_expiration_date', required: true },\n {\n question: 'What is your current or most recent Bodily Injury Limit?',\n inputType: 'select',\n options: LIABILITY_LIMITS,\n key: 'auto_prior_liability_limit',\n required: true\n }\n ]\n }\n ]\n },\n {\n question: 'Has any auto insurance company cancelled, declined or refused to renew you in the last 5 years?',\n inputType: 'radio',\n options: ['Yes', 'No'],\n key: 'auto_cancelled_declined_refused_to_renew',\n required: true\n },\n { question: 'Bodily Injury liability', inputType: 'select', options: LIABILITY_LIMITS, key: 'policy_bi', required: true },\n { question: 'Property Damage Liability', inputType: 'select', options: ['25000', '50000', '100000'], key: 'policy_pd', required: true }\n];\n\nconst HOME: Question[] = [\n { question: 'Year built', inputType: 'number', key: 'year_built', required: true },\n { question: 'Total living area (sq ft)', inputType: 'number', key: 'total_area_sq_ft', required: true },\n {\n question: 'Dwelling type',\n inputType: 'select',\n options: ['Single Family', 'Condo', 'Townhouse', 'Multi-Family'],\n key: 'dwelling_type',\n required: true\n },\n {\n question: 'Construction type',\n inputType: 'select',\n options: ['Frame', 'Masonry', 'Masonry Veneer', 'Fire Resistive'],\n key: 'construction_type',\n required: true\n },\n {\n question: 'Roof material',\n inputType: 'select',\n options: ['Asphalt Shingle', 'Metal', 'Tile', 'Wood Shake', 'Slate'],\n key: 'roof_material_type',\n required: true\n },\n { question: 'Number of stories', inputType: 'select', options: ['1', '1.5', '2', '2.5', '3'], key: 'number_of_stories', required: true }\n];\n\nconst HOME_POLICY: Question[] = [\n { question: 'When do you need your insurance to begin?', inputType: 'date', key: 'effective_date', required: true },\n {\n question: 'Do you currently have a Homeowners policy?',\n inputType: 'radio',\n options: ['Yes', 'No'],\n key: 'home_has_prior_insurance',\n required: true,\n conditionals: [\n {\n conditionalType: 'equals',\n conditionalValue: 'Yes',\n conditionalQuestions: [\n {\n question: 'Which carrier currently insures the home?',\n inputType: 'select',\n options: CARRIERS,\n key: 'home_prior_carrier_name',\n required: true\n }\n ]\n }\n ]\n },\n {\n question: 'Personal liability limit',\n inputType: 'select',\n options: ['100000', '300000', '500000', '1000000'],\n key: 'home_personal_liability',\n required: true\n },\n {\n question: 'All-perils deductible',\n inputType: 'select',\n options: ['500', '1000', '2500', '5000'],\n key: 'home_all_perils_deductible',\n required: true\n }\n];\n\n// Bundle reuses the home policy questions plus the auto policy questions.\nconst BUNDLE_POLICY: Question[] = [...HOME_POLICY, ...AUTO_CURRENT_CARRIER];\n\nconst DEMOGRAPHICS: Question[] = [\n { question: 'Gender', inputType: 'radio', options: ['Male', 'Female'], key: 'gender', required: true },\n {\n question: 'Marital status',\n inputType: 'select',\n options: ['Single', 'Married', 'Divorced', 'Widowed', 'Domestic Partner'],\n key: 'marital_status',\n required: true\n },\n {\n question: 'Employment industry',\n inputType: 'select',\n options: ['Technology', 'Healthcare', 'Education', 'Finance', 'Retail', 'Construction', 'Other'],\n key: 'employment_industry',\n required: true\n },\n { question: 'How many occupants live in the household?', inputType: 'number', key: 'household_size', required: true },\n {\n question: 'Do you authorize us to check your credit?',\n inputType: 'radio',\n options: ['Yes', 'No'],\n key: 'order_credit_authorized',\n required: true\n }\n];\n\nconst SSN: Question[] = [{ question: 'Social Security Number', inputType: 'text', key: 'social_security_number', required: false }];\n\nconst PHONE: Question[] = [{ question: 'What is your phone number?', inputType: 'tel', key: 'phone', required: true }];\n\nconst SMS_VERIFICATION: Question[] = [\n { question: 'Please enter the code we sent to your phone number.', inputType: 'text', key: 'sms_code', required: true }\n];\n\nexport const QUESTIONS_BY_STAGE: Partial<Record<Stage, Question[]>> = {\n Zip: ZIP,\n Email: EMAIL,\n Product: PRODUCT,\n Name: NAME,\n Vehicle: VEHICLE,\n Driver: DRIVER,\n AutoCurrentCarrier: AUTO_CURRENT_CARRIER,\n Home: HOME,\n HomePolicy: HOME_POLICY,\n BundlePolicy: BUNDLE_POLICY,\n Demographics: DEMOGRAPHICS,\n Ssn: SSN,\n Phone: PHONE,\n SMSVerification: SMS_VERIFICATION\n};\n\nexport function resolveQuestions(stage: Stage): Question[] {\n return QUESTIONS_BY_STAGE[stage] ?? [];\n}\n","/**\n * Mock rate results, shaped exactly as the real `GetRatesResponse` (an array of\n * carrier quotes). Logos are null so the Rates UI falls back to its text/initial\n * treatment — no embedded base64 needed for design review.\n */\nimport type { GetRatesResponse } from '@getcredify/credify-insurance-types';\n\nexport const MOCK_RATES: GetRatesResponse = [\n {\n quote_rate_id: 'mock-rate-1',\n carrier_name: 'Progressive',\n carrier_logo_base64: null,\n carrier_quote_id: 'MOCK-PRG-001',\n premium_cents: 142800,\n monthly_premium_cents: 11900,\n term_months: 12,\n lob: 'auto',\n admitted_status: 'admitted',\n effective_date: '2026-07-01',\n policy_end_date: '2027-07-01'\n },\n {\n quote_rate_id: 'mock-rate-2',\n carrier_name: 'Nationwide',\n carrier_logo_base64: null,\n carrier_quote_id: 'MOCK-NW-002',\n premium_cents: 156000,\n monthly_premium_cents: 13000,\n term_months: 12,\n lob: 'auto',\n admitted_status: 'admitted',\n effective_date: '2026-07-01',\n policy_end_date: '2027-07-01'\n },\n {\n quote_rate_id: 'mock-rate-3',\n carrier_name: 'Liberty Mutual',\n carrier_logo_base64: null,\n carrier_quote_id: 'MOCK-LM-003',\n premium_cents: 173400,\n monthly_premium_cents: 14450,\n term_months: 12,\n lob: 'auto',\n admitted_status: 'non_admitted',\n effective_date: '2026-07-01',\n policy_end_date: '2027-07-01'\n }\n];\n","/**\n * Mock vehicle-options data. The real `getVehicleOptions` endpoint progressively\n * resolves makes → models → body styles as the user drills in, and `decodeVin`\n * returns a full vehicle from a VIN. The mock reproduces that cascade with a\n * small representative dataset so the dependent dropdowns behave like production.\n */\n\nexport const VEHICLE_MAKES = ['Toyota', 'Honda', 'Ford', 'Chevrolet', 'Tesla', 'Subaru'];\n\nconst MODELS_BY_MAKE: Record<string, string[]> = {\n Toyota: ['Camry', 'Corolla', 'RAV4', 'Highlander', 'Tacoma'],\n Honda: ['Civic', 'Accord', 'CR-V', 'Pilot', 'Odyssey'],\n Ford: ['F-150', 'Escape', 'Explorer', 'Mustang', 'Bronco'],\n Chevrolet: ['Silverado', 'Equinox', 'Malibu', 'Tahoe', 'Camaro'], // cspell:disable-line\n Tesla: ['Model 3', 'Model Y', 'Model S', 'Model X'],\n Subaru: ['Outback', 'Forester', 'Crosstrek', 'Impreza'] // cspell:disable-line\n};\n\nconst BODY_STYLES = ['Sedan', 'SUV', 'Truck', 'Coupe', 'Hatchback', 'Minivan'];\n\n/** Resolve the cascading option set, mirroring the real endpoint's response shape. */\nexport function resolveVehicleOptions(params: { year?: number; make?: string; model?: string }): {\n ready: boolean;\n makes?: string[];\n models?: string[];\n bodyStyles?: string[];\n} {\n if (params.make && params.model) {\n return { ready: true, bodyStyles: BODY_STYLES };\n }\n if (params.make) {\n return { ready: true, models: MODELS_BY_MAKE[params.make] ?? ['Base', 'Sport', 'Limited'] };\n }\n return { ready: true, makes: VEHICLE_MAKES };\n}\n\n/** Mock VIN decode — returns a deterministic vehicle regardless of the VIN supplied. */\nexport function decodeVinMock(): { year: number; make: string; model: string; bodyStyle: string } {\n return { year: 2022, make: 'Toyota', model: 'Camry', bodyStyle: 'Sedan' };\n}\n","/**\n * In-memory mock backend for the widget.\n *\n * This is the chunk lazily loaded by installMockFetch when mock mode is active.\n * It holds a single quote's state in memory and answers each API endpoint from\n * fixtures, reproducing the parts of backend behaviour the wizard depends on —\n * most importantly the product-driven flow reshaping (`update-quote` records the\n * chosen product; `get-stages-for-quote` then returns that product's stage list).\n *\n * No network requests are made and there are no side effects beyond this module's\n * own state, which resets whenever a new quote is created.\n */\nimport { resolveStages } from './fixtures/stages';\nimport { resolveQuestions } from './fixtures/questions';\nimport { MOCK_RATES } from './fixtures/rates';\nimport { resolveVehicleOptions, decodeVinMock } from './fixtures/vehicleOptions';\n\nconst MOCK_QUOTE_ID = 'mock-quote-0001';\nconst MOCK_TOKEN = 'mock-jwt-token';\n\ntype Json = Record<string, unknown>;\n\n/** Mutable in-memory quote, accumulated across `update-quote` calls. */\nlet quote: Json = { quote_id: MOCK_QUOTE_ID };\n\nfunction resetQuote(seed: Json = {}): void {\n quote = { quote_id: MOCK_QUOTE_ID, ...seed };\n}\n\nfunction handleVerifyQuote(body: Json): Json {\n if (body.action === 'send') return { success: true };\n if (body.action === 'resume') return { isVerified: true, token: MOCK_TOKEN, quoteId: MOCK_QUOTE_ID };\n // Default: SMS code verification — any code passes in mock mode.\n return { isVerified: true, token: MOCK_TOKEN };\n}\n\nfunction handleVehicleOptions(body: Json): Json {\n if (body.action === 'vinDecode') return decodeVinMock();\n return resolveVehicleOptions({\n year: typeof body.year === 'number' ? body.year : undefined,\n make: typeof body.make === 'string' ? body.make : undefined,\n model: typeof body.model === 'string' ? body.model : undefined\n });\n}\n\n/**\n * Route a mocked request to its canned response. `pathname` is the API path\n * (e.g. `/create-quote`); `body` is the parsed JSON request body. Returns the\n * response payload object (serialized by the caller). Throws for unknown paths\n * so the interceptor can fall through to a 404-style response.\n */\nexport function handleMockRequest(pathname: string, body: Json): Json {\n switch (pathname) {\n case '/create-quote':\n resetQuote({ postal_code: body.postal_code });\n return { quoteId: MOCK_QUOTE_ID };\n\n case '/get-stages-for-quote':\n return { stages: resolveStages(quote.product) };\n\n case '/get-questions-by-stage':\n return { questions: resolveQuestions(body.stage as never) };\n\n case '/update-quote': {\n const rest = { ...((body.payload as Json) ?? {}) };\n // current_stage is navigation metadata, not a persisted quote field.\n delete rest.current_stage;\n quote = { ...quote, ...rest };\n return { status: 'success' };\n }\n\n case '/verify-quote':\n return handleVerifyQuote(body);\n\n case '/is-supported-state':\n return { isSupported: true };\n\n case '/get-rates':\n return { rates: MOCK_RATES };\n\n case '/get-quote':\n return { quote };\n\n case '/get-vehicle-options':\n return handleVehicleOptions(body);\n\n case '/request-bind':\n return { success: true };\n\n default:\n throw new Error(`No mock handler for ${pathname}`);\n }\n}\n"],"names":["DEFAULT_STAGES","STAGES_BY_PRODUCT","resolveStages","product","CARRIERS","LIABILITY_LIMITS","VEHICLE_YEARS","_","i","ZIP","EMAIL","PRODUCT","NAME","VEHICLE","DRIVER","AUTO_CURRENT_CARRIER","HOME","HOME_POLICY","BUNDLE_POLICY","DEMOGRAPHICS","SSN","PHONE","SMS_VERIFICATION","QUESTIONS_BY_STAGE","resolveQuestions","stage","MOCK_RATES","VEHICLE_MAKES","MODELS_BY_MAKE","BODY_STYLES","resolveVehicleOptions","params","decodeVinMock","MOCK_QUOTE_ID","MOCK_TOKEN","quote","resetQuote","seed","handleVerifyQuote","body","handleVehicleOptions","handleMockRequest","pathname","rest"],"mappings":";;;;AAaO,MAAMA,IAA0B,CAAC,OAAO,SAAS,SAAS,GAEpDC,IAAiE;AAAA,EAC5E,MAAM,CAAC,OAAO,SAAS,WAAW,QAAQ,WAAW,UAAU,sBAAsB,gBAAgB,OAAO,SAAS,iBAAiB;AAAA,EACtI,MAAM,CAAC,OAAO,SAAS,WAAW,QAAQ,QAAQ,cAAc,gBAAgB,OAAO,SAAS,iBAAiB;AAAA,EACjH,QAAQ,CAAC,OAAO,SAAS,WAAW,QAAQ,QAAQ,WAAW,UAAU,gBAAgB,gBAAgB,OAAO,SAAS,iBAAiB;AAC5I;AAGO,SAASC,EAAcC,GAA2B;AACvD,SAAIA,MAAY,UAAUA,MAAY,UAAUA,MAAY,WACnDF,EAAkBE,CAAO,IAE3BH;AACT;ACVA,MAAMI,IAAW,CAAC,YAAY,cAAc,SAAS,eAAe,kBAAkB,cAAc,WAAW,kBAAkB,GAC3HC,IAAmB,CAAC,SAAS,UAAU,WAAW,SAAS,GAC3DC,IAAgB,MAAM,KAAK,EAAE,QAAQ,GAAc,GAAK,CAACC,GAAGC,MAAM,OAAO,OAAOA,CAAC,CAAC,GAElFC,IAAkB,CAAC,EAAE,UAAU,yBAAyB,WAAW,QAAQ,KAAK,eAAe,UAAU,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aG,EAAK,YAAA,CAAa,GACrC,EAAE,SAASN,EAAA;AAAA,IAEpB,KAAK;AACH,aAAO,EAAE,QAAQ/B,EAAciC,EAAM,OAAO,EAAA;AAAA,IAE9C,KAAK;AACH,aAAO,EAAE,WAAWX,EAAiBe,EAAK,KAAc,EAAA;AAAA,IAE1D,KAAK,iBAAiB;AACpB,YAAMI,IAAO,EAAE,GAAKJ,EAAK,WAAoB,CAAA,EAAC;AAE9C,oBAAOI,EAAK,eACZR,IAAQ,EAAE,GAAGA,GAAO,GAAGQ,EAAA,GAChB,EAAE,QAAQ,UAAA;AAAA,IACnB;AAAA,IAEA,KAAK;AACH,aAAOL,EAAkBC,CAAI;AAAA,IAE/B,KAAK;AACH,aAAO,EAAE,aAAa,GAAA;AAAA,IAExB,KAAK;AACH,aAAO,EAAE,OAAOb,EAAA;AAAA,IAElB,KAAK;AACH,aAAO,EAAE,OAAAS,EAAA;AAAA,IAEX,KAAK;AACH,aAAOK,EAAqBD,CAAI;AAAA,IAElC,KAAK;AACH,aAAO,EAAE,SAAS,GAAA;AAAA,IAEpB;AACE,YAAM,IAAI,MAAM,uBAAuBG,CAAQ,EAAE;AAAA,EAAA;AAEvD;"}
@@ -0,0 +1,2 @@
1
+ const d=["Zip","Email","Product"],c={Auto:["Zip","Email","Product","Name","Vehicle","Driver","AutoCurrentCarrier","Demographics","Ssn","Phone","SMSVerification"],Home:["Zip","Email","Product","Name","Home","HomePolicy","Demographics","Ssn","Phone","SMSVerification"],Bundle:["Zip","Email","Product","Name","Home","Vehicle","Driver","BundlePolicy","Demographics","Ssn","Phone","SMSVerification"]};function p(e){return e==="Auto"||e==="Home"||e==="Bundle"?c[e]:d}const s=["Allstate","State Farm","GEICO","Progressive","Liberty Mutual","Nationwide","Farmers","NoPriorInsurance"],n=["25/50","50/100","100/300","250/500"],y=Array.from({length:35},(e,t)=>String(2024-t)),m=[{question:"What's your ZIP code?",inputType:"text",key:"postal_code",required:!0}],_=[{question:"What is your email address?",inputType:"email",key:"email",required:!0}],q=[{question:"Do you want to quote auto, home, or both?",inputType:"select",options:["Auto","Home","Bundle"],key:"product",required:!0},{question:"What is your property address?",inputType:"address",key:"address",required:!0}],h=[{question:"What is your first name?",inputType:"text",key:"first_name",required:!0},{question:"What is your last name?",inputType:"text",key:"last_name",required:!0},{question:"What is your date of birth?",inputType:"date",key:"date_of_birth",required:!0}],T=[{question:"Add Vehicles",inputType:"radio",options:["Yes"],key:"vehicles",required:!0,conditionals:[{conditionalType:"equals",conditionalValue:"Yes",conditionalQuestionsAllowMultiple:!0,conditionalQuestions:[{question:"Vehicle Identification Number (VIN)",inputType:"text",key:"vin",required:!1},{question:"Year",inputType:"select",options:y,key:"year",required:!0},{question:"Make",inputType:"select",options:[],key:"make",required:!0},{question:"Model",inputType:"select",options:[],key:"model",required:!0},{question:"Body style",inputType:"select",options:[],key:"body_style",required:!0},{question:"Vehicle ownership type",inputType:"select",options:["Owned","Leased","Lien"],key:"ownership_type",required:!0},{question:"What is the primary use of this vehicle?",inputType:"select",options:["Pleasure","To_FromWork","To_FromSchool","Business","Farming"],key:"usage",required:!0},{question:"Annual mileage driven",inputType:"number",key:"annual_mileage",required:!0}]}]}],k=[{question:"Add Drivers",inputType:"radio",options:["Yes"],key:"drivers",required:!0,conditionals:[{conditionalType:"equals",conditionalValue:"Yes",conditionalQuestionsAllowMultiple:!0,conditionalQuestions:[{question:"First Name",inputType:"text",key:"first_name",required:!0},{question:"Middle Name Initial",inputType:"text",key:"middle_name",required:!1},{question:"Last Name",inputType:"text",key:"last_name",required:!0},{question:"Date of Birth",inputType:"date",key:"date_of_birth",required:!0},{question:"Gender",inputType:"select",options:["Male","Female"],key:"gender",required:!0},{question:"What is the relationship to Driver #1?",inputType:"select",options:["Spouse","Parent","Child","Domestic Partner","Relative","Employee","Other"],key:"relationship_to_insured",required:!0},{question:"Marital status",inputType:"select",options:["Single","Married","Divorced","Widowed"],key:"marital_status",required:!0}]}]}],a=[{question:"When do you need your insurance to begin?",inputType:"date",key:"effective_date",required:!0},{question:"Type of residence",inputType:"select",options:["Single Family Dwelling","Condo","Apartment","Townhouse","Mobile Home"],key:"residence_type",required:!0},{question:"Please select your current auto insurance company",inputType:"select",options:s,key:"auto_prior_carrier_name",required:!0,conditionals:[{conditionalType:"notEquals",conditionalValue:"NoPriorInsurance",conditionalQuestions:[{question:"Years with prior personal auto carrier",inputType:"number",key:"auto_prior_years",required:!0},{question:"Months with prior personal auto carrier",inputType:"number",key:"auto_prior_months",required:!0},{question:"When does the current policy expire?",inputType:"date",key:"auto_prior_expiration_date",required:!0},{question:"What is your current or most recent Bodily Injury Limit?",inputType:"select",options:n,key:"auto_prior_liability_limit",required:!0}]}]},{question:"Has any auto insurance company cancelled, declined or refused to renew you in the last 5 years?",inputType:"radio",options:["Yes","No"],key:"auto_cancelled_declined_refused_to_renew",required:!0},{question:"Bodily Injury liability",inputType:"select",options:n,key:"policy_bi",required:!0},{question:"Property Damage Liability",inputType:"select",options:["25000","50000","100000"],key:"policy_pd",required:!0}],f=[{question:"Year built",inputType:"number",key:"year_built",required:!0},{question:"Total living area (sq ft)",inputType:"number",key:"total_area_sq_ft",required:!0},{question:"Dwelling type",inputType:"select",options:["Single Family","Condo","Townhouse","Multi-Family"],key:"dwelling_type",required:!0},{question:"Construction type",inputType:"select",options:["Frame","Masonry","Masonry Veneer","Fire Resistive"],key:"construction_type",required:!0},{question:"Roof material",inputType:"select",options:["Asphalt Shingle","Metal","Tile","Wood Shake","Slate"],key:"roof_material_type",required:!0},{question:"Number of stories",inputType:"select",options:["1","1.5","2","2.5","3"],key:"number_of_stories",required:!0}],l=[{question:"When do you need your insurance to begin?",inputType:"date",key:"effective_date",required:!0},{question:"Do you currently have a Homeowners policy?",inputType:"radio",options:["Yes","No"],key:"home_has_prior_insurance",required:!0,conditionals:[{conditionalType:"equals",conditionalValue:"Yes",conditionalQuestions:[{question:"Which carrier currently insures the home?",inputType:"select",options:s,key:"home_prior_carrier_name",required:!0}]}]},{question:"Personal liability limit",inputType:"select",options:["100000","300000","500000","1000000"],key:"home_personal_liability",required:!0},{question:"All-perils deductible",inputType:"select",options:["500","1000","2500","5000"],key:"home_all_perils_deductible",required:!0}],S=[...l,...a],M=[{question:"Gender",inputType:"radio",options:["Male","Female"],key:"gender",required:!0},{question:"Marital status",inputType:"select",options:["Single","Married","Divorced","Widowed","Domestic Partner"],key:"marital_status",required:!0},{question:"Employment industry",inputType:"select",options:["Technology","Healthcare","Education","Finance","Retail","Construction","Other"],key:"employment_industry",required:!0},{question:"How many occupants live in the household?",inputType:"number",key:"household_size",required:!0},{question:"Do you authorize us to check your credit?",inputType:"radio",options:["Yes","No"],key:"order_credit_authorized",required:!0}],g=[{question:"Social Security Number",inputType:"text",key:"social_security_number",required:!1}],E=[{question:"What is your phone number?",inputType:"tel",key:"phone",required:!0}],b=[{question:"Please enter the code we sent to your phone number.",inputType:"text",key:"sms_code",required:!0}],v={Zip:m,Email:_,Product:q,Name:h,Vehicle:T,Driver:k,AutoCurrentCarrier:a,Home:f,HomePolicy:l,BundlePolicy:S,Demographics:M,Ssn:g,Phone:E,SMSVerification:b};function C(e){return v[e]??[]}const P=[{quote_rate_id:"mock-rate-1",carrier_name:"Progressive",carrier_logo_base64:null,carrier_quote_id:"MOCK-PRG-001",premium_cents:142800,monthly_premium_cents:11900,term_months:12,lob:"auto",admitted_status:"admitted",effective_date:"2026-07-01",policy_end_date:"2027-07-01"},{quote_rate_id:"mock-rate-2",carrier_name:"Nationwide",carrier_logo_base64:null,carrier_quote_id:"MOCK-NW-002",premium_cents:156e3,monthly_premium_cents:13e3,term_months:12,lob:"auto",admitted_status:"admitted",effective_date:"2026-07-01",policy_end_date:"2027-07-01"},{quote_rate_id:"mock-rate-3",carrier_name:"Liberty Mutual",carrier_logo_base64:null,carrier_quote_id:"MOCK-LM-003",premium_cents:173400,monthly_premium_cents:14450,term_months:12,lob:"auto",admitted_status:"non_admitted",effective_date:"2026-07-01",policy_end_date:"2027-07-01"}],A=["Toyota","Honda","Ford","Chevrolet","Tesla","Subaru"],I={Toyota:["Camry","Corolla","RAV4","Highlander","Tacoma"],Honda:["Civic","Accord","CR-V","Pilot","Odyssey"],Ford:["F-150","Escape","Explorer","Mustang","Bronco"],Chevrolet:["Silverado","Equinox","Malibu","Tahoe","Camaro"],Tesla:["Model 3","Model Y","Model S","Model X"],Subaru:["Outback","Forester","Crosstrek","Impreza"]},D=["Sedan","SUV","Truck","Coupe","Hatchback","Minivan"];function V(e){return e.make&&e.model?{ready:!0,bodyStyles:D}:e.make?{ready:!0,models:I[e.make]??["Base","Sport","Limited"]}:{ready:!0,makes:A}}function O(){return{year:2022,make:"Toyota",model:"Camry",bodyStyle:"Sedan"}}const r="mock-quote-0001",u="mock-jwt-token";let i={quote_id:r};function N(e={}){i={quote_id:r,...e}}function w(e){return e.action==="send"?{success:!0}:e.action==="resume"?{isVerified:!0,token:u,quoteId:r}:{isVerified:!0,token:u}}function H(e){return e.action==="vinDecode"?O():V({year:typeof e.year=="number"?e.year:void 0,make:typeof e.make=="string"?e.make:void 0,model:typeof e.model=="string"?e.model:void 0})}function R(e,t){switch(e){case"/create-quote":return N({postal_code:t.postal_code}),{quoteId:r};case"/get-stages-for-quote":return{stages:p(i.product)};case"/get-questions-by-stage":return{questions:C(t.stage)};case"/update-quote":{const o={...t.payload??{}};return delete o.current_stage,i={...i,...o},{status:"success"}}case"/verify-quote":return w(t);case"/is-supported-state":return{isSupported:!0};case"/get-rates":return{rates:P};case"/get-quote":return{quote:i};case"/get-vehicle-options":return H(t);case"/request-bind":return{success:!0};default:throw new Error(`No mock handler for ${e}`)}}export{R as handleMockRequest};
2
+ //# sourceMappingURL=backend-BU-uiCtu.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"backend-BU-uiCtu.js","sources":["../../../src/mock/fixtures/stages.ts","../../../src/mock/fixtures/questions.ts","../../../src/mock/fixtures/rates.ts","../../../src/mock/fixtures/vehicleOptions.ts","../../../src/mock/backend.ts"],"sourcesContent":["/**\n * Stage lists per product, copied verbatim from the real backend resolver\n * (packages/rating/packages/getStagesForQuote/src/index.ts). Keeping these in\n * lockstep is what makes the mocked flow reshape exactly like production: after\n * the Product stage is answered, `getStagesForQuote` returns the matching list\n * and the wizard rebuilds its step order.\n *\n * CanopyConnect is intentionally omitted because IS_CANOPY_CONNECT_ENABLED is\n * currently false in the backend; add it here if/when that flips.\n */\nimport type { Stage } from '@getcredify/credify-insurance-types';\n\n/** Pre-product-selection stages (also returned when there is no quote yet). */\nexport const DEFAULT_STAGES: Stage[] = ['Zip', 'Email', 'Product'];\n\nexport const STAGES_BY_PRODUCT: Record<'Auto' | 'Home' | 'Bundle', Stage[]> = {\n Auto: ['Zip', 'Email', 'Product', 'Name', 'Vehicle', 'Driver', 'AutoCurrentCarrier', 'Demographics', 'Ssn', 'Phone', 'SMSVerification'],\n Home: ['Zip', 'Email', 'Product', 'Name', 'Home', 'HomePolicy', 'Demographics', 'Ssn', 'Phone', 'SMSVerification'],\n Bundle: ['Zip', 'Email', 'Product', 'Name', 'Home', 'Vehicle', 'Driver', 'BundlePolicy', 'Demographics', 'Ssn', 'Phone', 'SMSVerification']\n};\n\n/** Resolve the stage list for a stored product value, falling back to defaults. */\nexport function resolveStages(product: unknown): Stage[] {\n if (product === 'Auto' || product === 'Home' || product === 'Bundle') {\n return STAGES_BY_PRODUCT[product];\n }\n return DEFAULT_STAGES;\n}\n","/**\n * Mock question definitions per stage.\n *\n * Keys, input types, options and conditional structure mirror the real backend\n * definitions (packages/rating/packages/getQuestionsByStage/src/const.ts) so the\n * mocked screens render and persist exactly like production. Option lists are\n * representative subsets (the real lists hold 100+ carriers/makes) — enough to\n * exercise every input type and the repeatable vehicle/driver sections for\n * design and flow verification. Vehicle make/model/body_style options are left\n * empty on purpose: the FormRenderer populates them via the (mocked) vehicle\n * options endpoint, just like production.\n *\n * Typed as `Question[]` so the discriminated `inputType`/`options` union is\n * enforced by the compiler and can never drift from the shared type's shape.\n */\nimport type { Question, Stage } from '@getcredify/credify-insurance-types';\n\nconst CARRIERS = ['Allstate', 'State Farm', 'GEICO', 'Progressive', 'Liberty Mutual', 'Nationwide', 'Farmers', 'NoPriorInsurance'];\nconst LIABILITY_LIMITS = ['25/50', '50/100', '100/300', '250/500'];\nconst VEHICLE_YEARS = Array.from({ length: 2024 - 1990 + 1 }, (_, i) => String(2024 - i));\n\nconst ZIP: Question[] = [{ question: \"What's your ZIP code?\", inputType: 'text', key: 'postal_code', required: true }];\n\nconst EMAIL: Question[] = [{ question: 'What is your email address?', inputType: 'email', key: 'email', required: true }];\n\nconst PRODUCT: Question[] = [\n { question: 'Do you want to quote auto, home, or both?', inputType: 'select', options: ['Auto', 'Home', 'Bundle'], key: 'product', required: true },\n { question: 'What is your property address?', inputType: 'address', key: 'address', required: true }\n];\n\nconst NAME: Question[] = [\n { question: 'What is your first name?', inputType: 'text', key: 'first_name', required: true },\n { question: 'What is your last name?', inputType: 'text', key: 'last_name', required: true },\n { question: 'What is your date of birth?', inputType: 'date', key: 'date_of_birth', required: true }\n];\n\nconst VEHICLE: Question[] = [\n {\n question: 'Add Vehicles',\n inputType: 'radio',\n options: ['Yes'],\n key: 'vehicles',\n required: true,\n conditionals: [\n {\n conditionalType: 'equals',\n conditionalValue: 'Yes',\n conditionalQuestionsAllowMultiple: true,\n conditionalQuestions: [\n { question: 'Vehicle Identification Number (VIN)', inputType: 'text', key: 'vin', required: false },\n { question: 'Year', inputType: 'select', options: VEHICLE_YEARS, key: 'year', required: true },\n { question: 'Make', inputType: 'select', options: [], key: 'make', required: true },\n { question: 'Model', inputType: 'select', options: [], key: 'model', required: true },\n { question: 'Body style', inputType: 'select', options: [], key: 'body_style', required: true },\n { question: 'Vehicle ownership type', inputType: 'select', options: ['Owned', 'Leased', 'Lien'], key: 'ownership_type', required: true },\n {\n question: 'What is the primary use of this vehicle?',\n inputType: 'select',\n options: ['Pleasure', 'To_FromWork', 'To_FromSchool', 'Business', 'Farming'],\n key: 'usage',\n required: true\n },\n { question: 'Annual mileage driven', inputType: 'number', key: 'annual_mileage', required: true }\n ]\n }\n ]\n }\n];\n\nconst DRIVER: Question[] = [\n {\n question: 'Add Drivers',\n inputType: 'radio',\n options: ['Yes'],\n key: 'drivers',\n required: true,\n conditionals: [\n {\n conditionalType: 'equals',\n conditionalValue: 'Yes',\n conditionalQuestionsAllowMultiple: true,\n conditionalQuestions: [\n { question: 'First Name', inputType: 'text', key: 'first_name', required: true },\n { question: 'Middle Name Initial', inputType: 'text', key: 'middle_name', required: false },\n { question: 'Last Name', inputType: 'text', key: 'last_name', required: true },\n { question: 'Date of Birth', inputType: 'date', key: 'date_of_birth', required: true },\n { question: 'Gender', inputType: 'select', options: ['Male', 'Female'], key: 'gender', required: true },\n {\n question: 'What is the relationship to Driver #1?',\n inputType: 'select',\n options: ['Spouse', 'Parent', 'Child', 'Domestic Partner', 'Relative', 'Employee', 'Other'],\n key: 'relationship_to_insured',\n required: true\n },\n {\n question: 'Marital status',\n inputType: 'select',\n options: ['Single', 'Married', 'Divorced', 'Widowed'],\n key: 'marital_status',\n required: true\n }\n ]\n }\n ]\n }\n];\n\nconst AUTO_CURRENT_CARRIER: Question[] = [\n { question: 'When do you need your insurance to begin?', inputType: 'date', key: 'effective_date', required: true },\n {\n question: 'Type of residence',\n inputType: 'select',\n options: ['Single Family Dwelling', 'Condo', 'Apartment', 'Townhouse', 'Mobile Home'],\n key: 'residence_type',\n required: true\n },\n {\n question: 'Please select your current auto insurance company',\n inputType: 'select',\n options: CARRIERS,\n key: 'auto_prior_carrier_name',\n required: true,\n conditionals: [\n {\n conditionalType: 'notEquals',\n conditionalValue: 'NoPriorInsurance',\n conditionalQuestions: [\n { question: 'Years with prior personal auto carrier', inputType: 'number', key: 'auto_prior_years', required: true },\n { question: 'Months with prior personal auto carrier', inputType: 'number', key: 'auto_prior_months', required: true },\n { question: 'When does the current policy expire?', inputType: 'date', key: 'auto_prior_expiration_date', required: true },\n {\n question: 'What is your current or most recent Bodily Injury Limit?',\n inputType: 'select',\n options: LIABILITY_LIMITS,\n key: 'auto_prior_liability_limit',\n required: true\n }\n ]\n }\n ]\n },\n {\n question: 'Has any auto insurance company cancelled, declined or refused to renew you in the last 5 years?',\n inputType: 'radio',\n options: ['Yes', 'No'],\n key: 'auto_cancelled_declined_refused_to_renew',\n required: true\n },\n { question: 'Bodily Injury liability', inputType: 'select', options: LIABILITY_LIMITS, key: 'policy_bi', required: true },\n { question: 'Property Damage Liability', inputType: 'select', options: ['25000', '50000', '100000'], key: 'policy_pd', required: true }\n];\n\nconst HOME: Question[] = [\n { question: 'Year built', inputType: 'number', key: 'year_built', required: true },\n { question: 'Total living area (sq ft)', inputType: 'number', key: 'total_area_sq_ft', required: true },\n {\n question: 'Dwelling type',\n inputType: 'select',\n options: ['Single Family', 'Condo', 'Townhouse', 'Multi-Family'],\n key: 'dwelling_type',\n required: true\n },\n {\n question: 'Construction type',\n inputType: 'select',\n options: ['Frame', 'Masonry', 'Masonry Veneer', 'Fire Resistive'],\n key: 'construction_type',\n required: true\n },\n {\n question: 'Roof material',\n inputType: 'select',\n options: ['Asphalt Shingle', 'Metal', 'Tile', 'Wood Shake', 'Slate'],\n key: 'roof_material_type',\n required: true\n },\n { question: 'Number of stories', inputType: 'select', options: ['1', '1.5', '2', '2.5', '3'], key: 'number_of_stories', required: true }\n];\n\nconst HOME_POLICY: Question[] = [\n { question: 'When do you need your insurance to begin?', inputType: 'date', key: 'effective_date', required: true },\n {\n question: 'Do you currently have a Homeowners policy?',\n inputType: 'radio',\n options: ['Yes', 'No'],\n key: 'home_has_prior_insurance',\n required: true,\n conditionals: [\n {\n conditionalType: 'equals',\n conditionalValue: 'Yes',\n conditionalQuestions: [\n {\n question: 'Which carrier currently insures the home?',\n inputType: 'select',\n options: CARRIERS,\n key: 'home_prior_carrier_name',\n required: true\n }\n ]\n }\n ]\n },\n {\n question: 'Personal liability limit',\n inputType: 'select',\n options: ['100000', '300000', '500000', '1000000'],\n key: 'home_personal_liability',\n required: true\n },\n {\n question: 'All-perils deductible',\n inputType: 'select',\n options: ['500', '1000', '2500', '5000'],\n key: 'home_all_perils_deductible',\n required: true\n }\n];\n\n// Bundle reuses the home policy questions plus the auto policy questions.\nconst BUNDLE_POLICY: Question[] = [...HOME_POLICY, ...AUTO_CURRENT_CARRIER];\n\nconst DEMOGRAPHICS: Question[] = [\n { question: 'Gender', inputType: 'radio', options: ['Male', 'Female'], key: 'gender', required: true },\n {\n question: 'Marital status',\n inputType: 'select',\n options: ['Single', 'Married', 'Divorced', 'Widowed', 'Domestic Partner'],\n key: 'marital_status',\n required: true\n },\n {\n question: 'Employment industry',\n inputType: 'select',\n options: ['Technology', 'Healthcare', 'Education', 'Finance', 'Retail', 'Construction', 'Other'],\n key: 'employment_industry',\n required: true\n },\n { question: 'How many occupants live in the household?', inputType: 'number', key: 'household_size', required: true },\n {\n question: 'Do you authorize us to check your credit?',\n inputType: 'radio',\n options: ['Yes', 'No'],\n key: 'order_credit_authorized',\n required: true\n }\n];\n\nconst SSN: Question[] = [{ question: 'Social Security Number', inputType: 'text', key: 'social_security_number', required: false }];\n\nconst PHONE: Question[] = [{ question: 'What is your phone number?', inputType: 'tel', key: 'phone', required: true }];\n\nconst SMS_VERIFICATION: Question[] = [\n { question: 'Please enter the code we sent to your phone number.', inputType: 'text', key: 'sms_code', required: true }\n];\n\nexport const QUESTIONS_BY_STAGE: Partial<Record<Stage, Question[]>> = {\n Zip: ZIP,\n Email: EMAIL,\n Product: PRODUCT,\n Name: NAME,\n Vehicle: VEHICLE,\n Driver: DRIVER,\n AutoCurrentCarrier: AUTO_CURRENT_CARRIER,\n Home: HOME,\n HomePolicy: HOME_POLICY,\n BundlePolicy: BUNDLE_POLICY,\n Demographics: DEMOGRAPHICS,\n Ssn: SSN,\n Phone: PHONE,\n SMSVerification: SMS_VERIFICATION\n};\n\nexport function resolveQuestions(stage: Stage): Question[] {\n return QUESTIONS_BY_STAGE[stage] ?? [];\n}\n","/**\n * Mock rate results, shaped exactly as the real `GetRatesResponse` (an array of\n * carrier quotes). Logos are null so the Rates UI falls back to its text/initial\n * treatment — no embedded base64 needed for design review.\n */\nimport type { GetRatesResponse } from '@getcredify/credify-insurance-types';\n\nexport const MOCK_RATES: GetRatesResponse = [\n {\n quote_rate_id: 'mock-rate-1',\n carrier_name: 'Progressive',\n carrier_logo_base64: null,\n carrier_quote_id: 'MOCK-PRG-001',\n premium_cents: 142800,\n monthly_premium_cents: 11900,\n term_months: 12,\n lob: 'auto',\n admitted_status: 'admitted',\n effective_date: '2026-07-01',\n policy_end_date: '2027-07-01'\n },\n {\n quote_rate_id: 'mock-rate-2',\n carrier_name: 'Nationwide',\n carrier_logo_base64: null,\n carrier_quote_id: 'MOCK-NW-002',\n premium_cents: 156000,\n monthly_premium_cents: 13000,\n term_months: 12,\n lob: 'auto',\n admitted_status: 'admitted',\n effective_date: '2026-07-01',\n policy_end_date: '2027-07-01'\n },\n {\n quote_rate_id: 'mock-rate-3',\n carrier_name: 'Liberty Mutual',\n carrier_logo_base64: null,\n carrier_quote_id: 'MOCK-LM-003',\n premium_cents: 173400,\n monthly_premium_cents: 14450,\n term_months: 12,\n lob: 'auto',\n admitted_status: 'non_admitted',\n effective_date: '2026-07-01',\n policy_end_date: '2027-07-01'\n }\n];\n","/**\n * Mock vehicle-options data. The real `getVehicleOptions` endpoint progressively\n * resolves makes → models → body styles as the user drills in, and `decodeVin`\n * returns a full vehicle from a VIN. The mock reproduces that cascade with a\n * small representative dataset so the dependent dropdowns behave like production.\n */\n\nexport const VEHICLE_MAKES = ['Toyota', 'Honda', 'Ford', 'Chevrolet', 'Tesla', 'Subaru'];\n\nconst MODELS_BY_MAKE: Record<string, string[]> = {\n Toyota: ['Camry', 'Corolla', 'RAV4', 'Highlander', 'Tacoma'],\n Honda: ['Civic', 'Accord', 'CR-V', 'Pilot', 'Odyssey'],\n Ford: ['F-150', 'Escape', 'Explorer', 'Mustang', 'Bronco'],\n Chevrolet: ['Silverado', 'Equinox', 'Malibu', 'Tahoe', 'Camaro'], // cspell:disable-line\n Tesla: ['Model 3', 'Model Y', 'Model S', 'Model X'],\n Subaru: ['Outback', 'Forester', 'Crosstrek', 'Impreza'] // cspell:disable-line\n};\n\nconst BODY_STYLES = ['Sedan', 'SUV', 'Truck', 'Coupe', 'Hatchback', 'Minivan'];\n\n/** Resolve the cascading option set, mirroring the real endpoint's response shape. */\nexport function resolveVehicleOptions(params: { year?: number; make?: string; model?: string }): {\n ready: boolean;\n makes?: string[];\n models?: string[];\n bodyStyles?: string[];\n} {\n if (params.make && params.model) {\n return { ready: true, bodyStyles: BODY_STYLES };\n }\n if (params.make) {\n return { ready: true, models: MODELS_BY_MAKE[params.make] ?? ['Base', 'Sport', 'Limited'] };\n }\n return { ready: true, makes: VEHICLE_MAKES };\n}\n\n/** Mock VIN decode — returns a deterministic vehicle regardless of the VIN supplied. */\nexport function decodeVinMock(): { year: number; make: string; model: string; bodyStyle: string } {\n return { year: 2022, make: 'Toyota', model: 'Camry', bodyStyle: 'Sedan' };\n}\n","/**\n * In-memory mock backend for the widget.\n *\n * This is the chunk lazily loaded by installMockFetch when mock mode is active.\n * It holds a single quote's state in memory and answers each API endpoint from\n * fixtures, reproducing the parts of backend behaviour the wizard depends on —\n * most importantly the product-driven flow reshaping (`update-quote` records the\n * chosen product; `get-stages-for-quote` then returns that product's stage list).\n *\n * No network requests are made and there are no side effects beyond this module's\n * own state, which resets whenever a new quote is created.\n */\nimport { resolveStages } from './fixtures/stages';\nimport { resolveQuestions } from './fixtures/questions';\nimport { MOCK_RATES } from './fixtures/rates';\nimport { resolveVehicleOptions, decodeVinMock } from './fixtures/vehicleOptions';\n\nconst MOCK_QUOTE_ID = 'mock-quote-0001';\nconst MOCK_TOKEN = 'mock-jwt-token';\n\ntype Json = Record<string, unknown>;\n\n/** Mutable in-memory quote, accumulated across `update-quote` calls. */\nlet quote: Json = { quote_id: MOCK_QUOTE_ID };\n\nfunction resetQuote(seed: Json = {}): void {\n quote = { quote_id: MOCK_QUOTE_ID, ...seed };\n}\n\nfunction handleVerifyQuote(body: Json): Json {\n if (body.action === 'send') return { success: true };\n if (body.action === 'resume') return { isVerified: true, token: MOCK_TOKEN, quoteId: MOCK_QUOTE_ID };\n // Default: SMS code verification — any code passes in mock mode.\n return { isVerified: true, token: MOCK_TOKEN };\n}\n\nfunction handleVehicleOptions(body: Json): Json {\n if (body.action === 'vinDecode') return decodeVinMock();\n return resolveVehicleOptions({\n year: typeof body.year === 'number' ? body.year : undefined,\n make: typeof body.make === 'string' ? body.make : undefined,\n model: typeof body.model === 'string' ? body.model : undefined\n });\n}\n\n/**\n * Route a mocked request to its canned response. `pathname` is the API path\n * (e.g. `/create-quote`); `body` is the parsed JSON request body. Returns the\n * response payload object (serialized by the caller). Throws for unknown paths\n * so the interceptor can fall through to a 404-style response.\n */\nexport function handleMockRequest(pathname: string, body: Json): Json {\n switch (pathname) {\n case '/create-quote':\n resetQuote({ postal_code: body.postal_code });\n return { quoteId: MOCK_QUOTE_ID };\n\n case '/get-stages-for-quote':\n return { stages: resolveStages(quote.product) };\n\n case '/get-questions-by-stage':\n return { questions: resolveQuestions(body.stage as never) };\n\n case '/update-quote': {\n const rest = { ...((body.payload as Json) ?? {}) };\n // current_stage is navigation metadata, not a persisted quote field.\n delete rest.current_stage;\n quote = { ...quote, ...rest };\n return { status: 'success' };\n }\n\n case '/verify-quote':\n return handleVerifyQuote(body);\n\n case '/is-supported-state':\n return { isSupported: true };\n\n case '/get-rates':\n return { rates: MOCK_RATES };\n\n case '/get-quote':\n return { quote };\n\n case '/get-vehicle-options':\n return handleVehicleOptions(body);\n\n case '/request-bind':\n return { success: true };\n\n default:\n throw new Error(`No mock handler for ${pathname}`);\n }\n}\n"],"names":["DEFAULT_STAGES","STAGES_BY_PRODUCT","resolveStages","product","CARRIERS","LIABILITY_LIMITS","VEHICLE_YEARS","_","i","ZIP","EMAIL","PRODUCT","NAME","VEHICLE","DRIVER","AUTO_CURRENT_CARRIER","HOME","HOME_POLICY","BUNDLE_POLICY","DEMOGRAPHICS","SSN","PHONE","SMS_VERIFICATION","QUESTIONS_BY_STAGE","resolveQuestions","stage","MOCK_RATES","VEHICLE_MAKES","MODELS_BY_MAKE","BODY_STYLES","resolveVehicleOptions","params","decodeVinMock","MOCK_QUOTE_ID","MOCK_TOKEN","quote","resetQuote","seed","handleVerifyQuote","body","handleVehicleOptions","handleMockRequest","pathname","rest"],"mappings":"AAaO,MAAMA,EAA0B,CAAC,MAAO,QAAS,SAAS,EAEpDC,EAAiE,CAC5E,KAAM,CAAC,MAAO,QAAS,UAAW,OAAQ,UAAW,SAAU,qBAAsB,eAAgB,MAAO,QAAS,iBAAiB,EACtI,KAAM,CAAC,MAAO,QAAS,UAAW,OAAQ,OAAQ,aAAc,eAAgB,MAAO,QAAS,iBAAiB,EACjH,OAAQ,CAAC,MAAO,QAAS,UAAW,OAAQ,OAAQ,UAAW,SAAU,eAAgB,eAAgB,MAAO,QAAS,iBAAiB,CAC5I,EAGO,SAASC,EAAcC,EAA2B,CACvD,OAAIA,IAAY,QAAUA,IAAY,QAAUA,IAAY,SACnDF,EAAkBE,CAAO,EAE3BH,CACT,CCVA,MAAMI,EAAW,CAAC,WAAY,aAAc,QAAS,cAAe,iBAAkB,aAAc,UAAW,kBAAkB,EAC3HC,EAAmB,CAAC,QAAS,SAAU,UAAW,SAAS,EAC3DC,EAAgB,MAAM,KAAK,CAAE,OAAQ,EAAc,EAAK,CAACC,EAAGC,IAAM,OAAO,KAAOA,CAAC,CAAC,EAElFC,EAAkB,CAAC,CAAE,SAAU,wBAAyB,UAAW,OAAQ,IAAK,cAAe,SAAU,GAAM,EAE/GC,EAAoB,CAAC,CAAE,SAAU,8BAA+B,UAAW,QAAS,IAAK,QAAS,SAAU,GAAM,EAElHC,EAAsB,CAC1B,CAAE,SAAU,4CAA6C,UAAW,SAAU,QAAS,CAAC,OAAQ,OAAQ,QAAQ,EAAG,IAAK,UAAW,SAAU,EAAA,EAC7I,CAAE,SAAU,iCAAkC,UAAW,UAAW,IAAK,UAAW,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