@getspot/spot-widget 4.6.0 → 4.8.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/dist/index.es.js CHANGED
@@ -1,90 +1,94 @@
1
- async function S(c, t, r, s) {
1
+ async function k(c, e, o, s, a) {
2
2
  try {
3
- const a = s ? { ...r, state: s } : r, n = await fetch(c, {
3
+ const p = {
4
+ ...s ? { state: s } : {},
5
+ ...a !== void 0 ? { isUSResident: a } : {}
6
+ }, r = Object.keys(p).length === 0 ? o : { ...o, ...p }, t = await fetch(c, {
4
7
  method: "POST",
5
8
  headers: {
6
9
  "Content-Type": "application/json",
7
- "X-Spot-Partner-Id": t
10
+ "X-Spot-Partner-Id": e
8
11
  },
9
- body: JSON.stringify(a)
10
- }), o = await n.json();
11
- if (!n.ok) {
12
- const e = new Error((o == null ? void 0 : o.message) || "Failed to fetch quote");
13
- throw e.status = n.status, e.responseBody = o, e;
12
+ body: JSON.stringify(r)
13
+ }), i = await t.json();
14
+ if (!t.ok) {
15
+ const h = new Error((i == null ? void 0 : i.message) || "Failed to fetch quote");
16
+ throw h.status = t.status, h.responseBody = i, h;
14
17
  }
15
- return o;
16
- } catch (a) {
17
- throw a instanceof Error ? a : new Error("Unknown error occurred while fetching quote");
18
+ return i;
19
+ } catch (p) {
20
+ throw p instanceof Error ? p : new Error("Unknown error occurred while fetching quote");
18
21
  }
19
22
  }
20
- async function z(c, t, r) {
23
+ async function O(c, e, o) {
21
24
  try {
22
25
  const s = c.replace("/quote", "/quote/batch"), a = await fetch(s, {
23
26
  method: "POST",
24
27
  headers: {
25
28
  "Content-Type": "application/json",
26
- "X-Spot-Partner-Id": t
29
+ "X-Spot-Partner-Id": e
27
30
  },
28
- body: JSON.stringify(r)
29
- }), n = await a.json();
31
+ body: JSON.stringify(o)
32
+ }), p = await a.json();
30
33
  if (!a.ok) {
31
- const o = new Error((n == null ? void 0 : n.message) || "Failed to fetch batch quote");
32
- throw o.status = a.status, o.responseBody = n, o;
34
+ const r = new Error((p == null ? void 0 : p.message) || "Failed to fetch batch quote");
35
+ throw r.status = a.status, r.responseBody = p, r;
33
36
  }
34
- return n;
37
+ return p;
35
38
  } catch (s) {
36
39
  throw s instanceof Error ? s : new Error("Unknown error occurred while fetching batch quote");
37
40
  }
38
41
  }
39
- async function T(c, t, r, s) {
40
- var a;
42
+ async function x(c, e, o, s, a) {
43
+ var p;
41
44
  try {
42
- const n = {
43
- ...r,
45
+ const r = {
46
+ ...o,
44
47
  ...s ? { state: s } : {},
45
- isPartialPayment: r.isPartialPayment || !1,
46
- roundTo: r.roundTo || void 0,
47
- items: r.items.map((m, f) => ({
48
+ ...a !== void 0 ? { isUSResident: a } : {},
49
+ isPartialPayment: o.isPartialPayment || !1,
50
+ roundTo: o.roundTo || void 0,
51
+ items: o.items.map((m, f) => ({
48
52
  ...m,
49
53
  cartItemId: m.cartItemId || `item-${f + 1}`
50
54
  }))
51
- }, o = await z(c, t, n);
52
- if (o.status !== "QUOTES_AVAILABLE" && o.status !== "QUOTE_AVAILABLE")
55
+ }, t = await O(c, e, r);
56
+ if (t.status !== "QUOTES_AVAILABLE" && t.status !== "QUOTE_AVAILABLE")
53
57
  return { status: "NO_MATCHING_QUOTE" };
54
- const e = o.quotes.map((m) => {
55
- const f = r.items.find(
56
- (h, g) => (h.cartItemId || `item-${g + 1}`) === m.cartItemId
58
+ const i = t.quotes.map((m) => {
59
+ const f = o.items.find(
60
+ (g, l) => (g.cartItemId || `item-${l + 1}`) === m.cartItemId
57
61
  );
58
62
  return f ? f.participantDescription ? `${f.productName} - ${f.participantDescription}` : f.productName : `Item ${m.id}`;
59
- }), l = Math.round((o.totalSpotPrice || o.spotPrice || 0) * 100) / 100;
63
+ }), h = Math.round((t.totalSpotPrice || t.spotPrice || 0) * 100) / 100;
60
64
  return {
61
65
  status: "QUOTE_AVAILABLE",
62
66
  data: {
63
- id: o.quotes ? o.quotes.map((m) => m.id).join(",") : ((a = o.data) == null ? void 0 : a.id) || "",
64
- spotPrice: l,
65
- currencyCode: o.currencyCode || "",
67
+ id: t.quotes ? t.quotes.map((m) => m.id).join(",") : ((p = t.data) == null ? void 0 : p.id) || "",
68
+ spotPrice: h,
69
+ currencyCode: t.currencyCode || "",
66
70
  communication: {
67
- ...o.communication,
68
- yesOptionText: o.communication.yesOptionText.replace(
69
- String(o.totalSpotPrice),
70
- String(l)
71
+ ...t.communication,
72
+ yesOptionText: t.communication.yesOptionText.replace(
73
+ String(t.totalSpotPrice),
74
+ String(h)
71
75
  )
72
76
  },
73
- payoutSchedule: o.payoutSchedule.map((m) => ({
77
+ payoutSchedule: t.payoutSchedule.map((m) => ({
74
78
  ...m,
75
79
  amount: m.amount !== void 0 ? m.amount : 0
76
80
  })),
77
- coveredItems: e,
78
- originalQuotes: o.quotes || (o.data ? [o.data] : [])
81
+ coveredItems: i,
82
+ originalQuotes: t.quotes || (t.data ? [t.data] : [])
79
83
  },
80
- spotPrice: l,
81
- coveredItems: e
84
+ spotPrice: h,
85
+ coveredItems: i
82
86
  };
83
- } catch (n) {
84
- throw n instanceof Error ? n : new Error("Unknown error occurred while fetching multiple quotes");
87
+ } catch (r) {
88
+ throw r instanceof Error ? r : new Error("Unknown error occurred while fetching multiple quotes");
85
89
  }
86
90
  }
87
- const E = "non-us-resident", O = "Unfortunately, we are currently unable to offer coverage or process claims for non-US residents.", A = [
91
+ const E = "non-us-resident", L = "Unfortunately, we are currently unable to offer coverage or process claims for non-US residents.", H = [
88
92
  { value: "AL", label: "Alabama" },
89
93
  { value: "AK", label: "Alaska" },
90
94
  { value: "AS", label: "American Samoa" },
@@ -141,7 +145,7 @@ const E = "non-us-resident", O = "Unfortunately, we are currently unable to offe
141
145
  { value: "WV", label: "West Virginia" },
142
146
  { value: "WI", label: "Wisconsin" },
143
147
  { value: "WY", label: "Wyoming" }
144
- ], L = new Set(A.map((c) => c.value)), I = [
148
+ ], z = new Set(H.map((c) => c.value)), R = [
145
149
  "USD",
146
150
  "CAD",
147
151
  "AUD",
@@ -172,23 +176,23 @@ const E = "non-us-resident", O = "Unfortunately, we are currently unable to offe
172
176
  };
173
177
  function M(c) {
174
178
  const {
175
- apiConfig: t = {},
176
- quoteRequestData: r,
179
+ apiConfig: e = {},
180
+ quoteRequestData: o,
177
181
  callbacks: s = {},
178
182
  location: a,
179
- theme: n
183
+ theme: p
180
184
  } = c, {
181
- environment: o = "sandbox",
182
- partnerId: e,
183
- customEndpoint: l
184
- } = t;
185
- if (!e || typeof e != "string")
185
+ environment: r = "sandbox",
186
+ partnerId: t,
187
+ customEndpoint: i
188
+ } = e;
189
+ if (!t || typeof t != "string")
186
190
  throw new Error("Invalid or missing partnerId in apiConfig");
187
- if (!(l || P[o]))
188
- throw new Error(`Invalid environment in apiConfig: ${o}`);
189
- if (!r || typeof r != "object" && !Array.isArray(r))
191
+ if (!(i || P[r]))
192
+ throw new Error(`Invalid environment in apiConfig: ${r}`);
193
+ if (!o || typeof o != "object" && !Array.isArray(o))
190
194
  throw new Error("quoteRequestData must be a non-null object or array");
191
- const f = [
195
+ const m = [
192
196
  "startDate",
193
197
  "endDate",
194
198
  "currencyCode",
@@ -200,57 +204,57 @@ function M(c) {
200
204
  "cartId",
201
205
  "productName"
202
206
  ];
203
- function h(p, u = null) {
207
+ function f(l, u = null) {
204
208
  const d = u !== null ? `quoteRequestData[${u}]` : "quoteRequestData";
205
- f.forEach((v) => {
206
- if (!Object.prototype.hasOwnProperty.call(p, v) || p[v] === void 0 || p[v] === null)
209
+ m.forEach((v) => {
210
+ if (!Object.prototype.hasOwnProperty.call(l, v) || l[v] === void 0 || l[v] === null)
207
211
  throw new Error(`Missing required ${d} field: '${v}'`);
208
212
  });
209
- const b = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?Z$/;
210
- if (!b.test(p.startDate))
213
+ const _ = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?Z$/;
214
+ if (!_.test(l.startDate))
211
215
  throw new Error(`${d}.startDate must be a valid ISO8601 string`);
212
- if (!b.test(p.endDate))
216
+ if (!_.test(l.endDate))
213
217
  throw new Error(`${d}.endDate must be a valid ISO8601 string`);
214
- if (typeof p.currencyCode != "string")
218
+ if (typeof l.currencyCode != "string")
215
219
  throw new Error(`${d}.currencyCode must be a string`);
216
- if (!I.includes(p.currencyCode))
217
- throw new Error(`Invalid ${d}.currencyCode: ${p.currencyCode}`);
218
- if (typeof p.eventType != "string")
220
+ if (!R.includes(l.currencyCode))
221
+ throw new Error(`Invalid ${d}.currencyCode: ${l.currencyCode}`);
222
+ if (typeof l.eventType != "string")
219
223
  throw new Error(`${d}.eventType must be a string`);
220
- if (typeof p.productType != "string")
224
+ if (typeof l.productType != "string")
221
225
  throw new Error(`${d}.productType must be a string`);
222
- const _ = ["Pass", "Trip", "Registration"];
223
- if (!_.includes(p.productType))
226
+ const b = ["Pass", "Trip", "Registration"];
227
+ if (!b.includes(l.productType))
224
228
  throw new Error(
225
- `${d}.productType must be one of ${_.join(", ")}`
229
+ `${d}.productType must be one of ${b.join(", ")}`
226
230
  );
227
- if (typeof p.productDuration != "string")
231
+ if (typeof l.productDuration != "string")
228
232
  throw new Error(`${d}.productDuration must be a string`);
229
233
  const C = ["Daily", "Seasonal", "Trip", "Event"];
230
- if (!C.includes(p.productDuration))
234
+ if (!C.includes(l.productDuration))
231
235
  throw new Error(
232
236
  `${d}.productDuration must be one of ${C.join(", ")}`
233
237
  );
234
- if (typeof p.productPrice != "number" || isNaN(p.productPrice))
238
+ if (typeof l.productPrice != "number" || isNaN(l.productPrice))
235
239
  throw new Error(`${d}.productPrice must be a valid number`);
236
- if (typeof p.productId != "string")
240
+ if (typeof l.productId != "string")
237
241
  throw new Error(`${d}.productId must be a string`);
238
- if (typeof p.cartId != "string")
242
+ if (typeof l.cartId != "string")
239
243
  throw new Error(`${d}.cartId must be a string`);
240
- if (typeof p.productName != "string")
244
+ if (typeof l.productName != "string")
241
245
  throw new Error(`${d}.productName must be a string`);
242
246
  }
243
- if ("items" in r) {
244
- const p = r, { cartId: u, cartName: d, currencyCode: b, items: _ } = p;
247
+ if ("items" in o) {
248
+ const l = o, { cartId: u, cartName: d, currencyCode: _, items: b } = l;
245
249
  if (!u || typeof u != "string")
246
250
  throw new Error("quoteRequestData.cartId must be a string");
247
251
  if (!d || typeof d != "string")
248
252
  throw new Error("quoteRequestData.cartName must be a string");
249
- if (!b || typeof b != "string")
253
+ if (!_ || typeof _ != "string")
250
254
  throw new Error("quoteRequestData.currencyCode must be a string");
251
- if (!I.includes(b))
252
- throw new Error(`Invalid quoteRequestData.currencyCode: ${b}`);
253
- if (!Array.isArray(_) || _.length === 0)
255
+ if (!R.includes(_))
256
+ throw new Error(`Invalid quoteRequestData.currencyCode: ${_}`);
257
+ if (!Array.isArray(b) || b.length === 0)
254
258
  throw new Error("quoteRequestData.items must be a non-empty array");
255
259
  const C = [
256
260
  "startDate",
@@ -262,31 +266,31 @@ function M(c) {
262
266
  "productId",
263
267
  "productName"
264
268
  ];
265
- _.forEach((v, x) => {
269
+ b.forEach((v, S) => {
266
270
  if (!v || typeof v != "object")
267
- throw new Error(`quoteRequestData.items[${x}] must be a non-null object`);
268
- const y = `quoteRequestData.items[${x}]`;
271
+ throw new Error(`quoteRequestData.items[${S}] must be a non-null object`);
272
+ const y = `quoteRequestData.items[${S}]`;
269
273
  C.forEach((q) => {
270
274
  if (!Object.prototype.hasOwnProperty.call(v, q) || v[q] === void 0 || v[q] === null)
271
275
  throw new Error(`Missing required ${y} field: '${q}'`);
272
276
  });
273
- const k = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?Z$/;
274
- if (!k.test(v.startDate))
277
+ const N = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?Z$/;
278
+ if (!N.test(v.startDate))
275
279
  throw new Error(`${y}.startDate must be a valid ISO8601 string`);
276
- if (!k.test(v.endDate))
280
+ if (!N.test(v.endDate))
277
281
  throw new Error(`${y}.endDate must be a valid ISO8601 string`);
278
282
  if (typeof v.eventType != "string")
279
283
  throw new Error(`${y}.eventType must be a string`);
280
284
  if (typeof v.productType != "string")
281
285
  throw new Error(`${y}.productType must be a string`);
282
- const N = ["Pass", "Trip", "Registration"];
283
- if (!N.includes(v.productType))
284
- throw new Error(`${y}.productType must be one of ${N.join(", ")}`);
286
+ const I = ["Pass", "Trip", "Registration"];
287
+ if (!I.includes(v.productType))
288
+ throw new Error(`${y}.productType must be one of ${I.join(", ")}`);
285
289
  if (typeof v.productDuration != "string")
286
290
  throw new Error(`${y}.productDuration must be a string`);
287
- const D = ["Daily", "Seasonal", "Trip", "Event"];
288
- if (!D.includes(v.productDuration))
289
- throw new Error(`${y}.productDuration must be one of ${D.join(", ")}`);
291
+ const T = ["Daily", "Seasonal", "Trip", "Event"];
292
+ if (!T.includes(v.productDuration))
293
+ throw new Error(`${y}.productDuration must be one of ${T.join(", ")}`);
290
294
  if (typeof v.productPrice != "number" || isNaN(v.productPrice))
291
295
  throw new Error(`${y}.productPrice must be a valid number`);
292
296
  if (typeof v.productId != "string")
@@ -294,74 +298,74 @@ function M(c) {
294
298
  if (typeof v.productName != "string")
295
299
  throw new Error(`${y}.productName must be a string`);
296
300
  });
297
- } else if (Array.isArray(r)) {
298
- if (r.length === 0)
301
+ } else if (Array.isArray(o)) {
302
+ if (o.length === 0)
299
303
  throw new Error("quoteRequestData array cannot be empty");
300
- r.forEach((p, u) => {
301
- if (!p || typeof p != "object")
304
+ o.forEach((l, u) => {
305
+ if (!l || typeof l != "object")
302
306
  throw new Error(`quoteRequestData[${u}] must be a non-null object`);
303
- h(p, u);
307
+ f(l, u);
304
308
  });
305
309
  } else
306
- h(r);
310
+ f(o);
307
311
  if ([
308
312
  "onOptIn",
309
313
  "onOptOut",
310
314
  "onQuoteRetrieved",
311
315
  "onError",
312
316
  "noMatchingQuote"
313
- ].forEach((p) => {
314
- const u = s[p];
317
+ ].forEach((l) => {
318
+ const u = s[l];
315
319
  if (u && typeof u != "function")
316
- throw new Error(`Callback '${p}' must be a function.`);
320
+ throw new Error(`Callback '${l}' must be a function.`);
317
321
  }), typeof a == "string" && !document.querySelector(a))
318
322
  throw new Error(`Invalid location selector: '${a}'`);
319
- if (n && typeof n != "object")
323
+ if (p && typeof p != "object")
320
324
  throw new Error(
321
325
  "Theme must be an object with CSS variables, do not include the '--' prefix"
322
326
  );
323
- if (c.state && !L.has(c.state))
327
+ if (c.state && !z.has(c.state))
324
328
  throw new Error(`Invalid state: '${c.state}'. Must be a 2-character US state or territory code.`);
325
329
  }
326
330
  var w = /* @__PURE__ */ ((c) => (c.YES = "yes", c.NO = "no", c.UNSELECTED = "unselected", c))(w || {});
327
- function i(c, { text: t, className: r, parent: s, innerHTML: a, href: n, target: o } = {}) {
328
- const e = document.createElement(c);
329
- return r && (e.className = r), t != null && (e.textContent = t), a != null && (e.innerHTML = a), n && "href" in e && (e.href = n), o && "target" in e && (e.target = o), s && s.appendChild(e), e;
331
+ function n(c, { text: e, className: o, parent: s, innerHTML: a, href: p, target: r } = {}) {
332
+ const t = document.createElement(c);
333
+ return o && (t.className = o), e != null && (t.textContent = e), a != null && (t.innerHTML = a), p && "href" in t && (t.href = p), r && "target" in t && (t.target = r), s && s.appendChild(t), t;
330
334
  }
331
- function $(c, { name: t, description: r }) {
332
- i("div", {
335
+ function $(c, { name: e, description: o }) {
336
+ n("div", {
333
337
  className: "spot-header__title",
334
- text: t,
338
+ text: e,
335
339
  parent: c
336
- }), i("div", {
340
+ }), n("div", {
337
341
  className: "spot-header__description",
338
- text: r,
342
+ text: o,
339
343
  parent: c
340
344
  });
341
345
  }
342
- function V(c, t = []) {
343
- const r = i("ul", {
346
+ function U(c, e = []) {
347
+ const o = n("ul", {
344
348
  className: "spot-benefits__list",
345
349
  parent: c
346
350
  });
347
- t.forEach((s) => {
348
- const a = i("li", { parent: r });
351
+ e.forEach((s) => {
352
+ const a = n("li", { parent: o });
349
353
  a.innerHTML = `
350
354
  <svg width="14" height="14" viewBox="0 0 14 14" fill="none" class="spot-bullets__checkmark">
351
355
  <path d="M11.6666 3.5L5.24998 9.91667L2.33331 7"
352
356
  stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
353
- </svg>`, i("span", { text: s, parent: a });
357
+ </svg>`, n("span", { text: s, parent: a });
354
358
  });
355
359
  }
356
- function Q(c, t = []) {
357
- if (!t || t.length === 0) return;
358
- const r = i("div", {
360
+ function V(c, e = []) {
361
+ if (!e || e.length === 0) return;
362
+ const o = n("div", {
359
363
  className: "spot-qualifying-reasons__container",
360
364
  parent: c
361
- }), s = [...t].sort((e, l) => e.rank - l.rank), a = i("div", {
365
+ }), s = [...e].sort((t, i) => t.rank - i.rank), a = n("div", {
362
366
  className: "spot-qualifying-reasons__grid",
363
- parent: r
364
- }), n = {
367
+ parent: o
368
+ }), p = {
365
369
  "Accident & Illness": "cross.svg",
366
370
  "Family Emergencies": "users.svg",
367
371
  Layoffs: "building.svg",
@@ -371,101 +375,101 @@ function Q(c, t = []) {
371
375
  "Travel Interruption": "plane.svg",
372
376
  "Military Duty": "medal.svg"
373
377
  };
374
- let o;
378
+ let r;
375
379
  try {
376
- const e = document.currentScript;
377
- if (e != null && e.src) {
378
- const l = new URL(e.src);
379
- o = l.origin + l.pathname.replace(/\/[^/]*$/, "/");
380
+ const t = document.currentScript;
381
+ if (t != null && t.src) {
382
+ const i = new URL(t.src);
383
+ r = i.origin + i.pathname.replace(/\/[^/]*$/, "/");
380
384
  } else
381
- o = window.location.origin + window.location.pathname.replace(/\/[^/]*$/, "/");
382
- o += "assets/";
385
+ r = window.location.origin + window.location.pathname.replace(/\/[^/]*$/, "/");
386
+ r += "assets/";
383
387
  } catch {
384
- o = "./assets/";
388
+ r = "./assets/";
385
389
  }
386
- s.forEach((e) => {
387
- var h, g, p;
388
- const l = i("div", {
390
+ s.forEach((t) => {
391
+ var f, g, l;
392
+ const i = n("div", {
389
393
  className: "spot-qualifying-reasons__item",
390
394
  parent: a
391
- }), m = i("div", {
395
+ }), h = n("div", {
392
396
  className: "spot-qualifying-reasons__icon-wrapper",
393
- parent: l
394
- }), f = n[((h = e.benefitType) == null ? void 0 : h.name) || ""] || n[e.name || ""];
395
- if (f) {
396
- const u = i("img", {
397
- parent: m
397
+ parent: i
398
+ }), m = p[((f = t.benefitType) == null ? void 0 : f.name) || ""] || p[t.name || ""];
399
+ if (m) {
400
+ const u = n("img", {
401
+ parent: h
398
402
  });
399
- u.src = o + f, u.alt = ((g = e.benefitType) == null ? void 0 : g.name) || e.name || "", u.className = "spot-qualifying-reasons__icon";
403
+ u.src = r + m, u.alt = ((g = t.benefitType) == null ? void 0 : g.name) || t.name || "", u.className = "spot-qualifying-reasons__icon";
400
404
  }
401
- i("span", {
405
+ n("span", {
402
406
  className: "spot-qualifying-reasons__label",
403
- text: ((p = e.benefitType) == null ? void 0 : p.name) || e.name || "",
404
- parent: l
407
+ text: ((l = t.benefitType) == null ? void 0 : l.name) || t.name || "",
408
+ parent: i
405
409
  });
406
410
  });
407
411
  }
408
- function U(c, t = [], r) {
409
- if (t.length === 0 || !r || r <= 1)
412
+ function Q(c, e = [], o) {
413
+ if (e.length === 0 || !o || o <= 1)
410
414
  return;
411
415
  const s = /* @__PURE__ */ new Map();
412
- t.forEach((u) => {
416
+ e.forEach((u) => {
413
417
  s.set(u, (s.get(u) || 0) + 1);
414
418
  });
415
- const n = Array.from(s.entries()).map(
419
+ const p = Array.from(s.entries()).map(
416
420
  ([u, d]) => ({
417
421
  item: u,
418
422
  count: d,
419
423
  displayText: d > 1 ? `${d} x ${u}` : u
420
424
  })
421
425
  ).sort((u, d) => {
422
- const b = u.item.charAt(0), _ = d.item.charAt(0), C = /[a-zA-Z]/.test(b), v = /[a-zA-Z]/.test(_);
426
+ const _ = u.item.charAt(0), b = d.item.charAt(0), C = /[a-zA-Z]/.test(_), v = /[a-zA-Z]/.test(b);
423
427
  return !C && v ? -1 : C && !v ? 1 : u.item.localeCompare(d.item, void 0, { sensitivity: "base" });
424
- }), o = i("div", {
428
+ }), r = n("div", {
425
429
  className: "spot-covered-items__container",
426
430
  parent: c
427
- }), e = i("div", {
431
+ }), t = n("div", {
428
432
  className: "spot-covered-items__header",
429
- parent: o
430
- }), l = i("button", {
433
+ parent: r
434
+ }), i = n("button", {
431
435
  className: "spot-covered-items__toggle",
432
- parent: e
436
+ parent: t
433
437
  });
434
- l.type = "button", i("span", {
438
+ i.type = "button", n("span", {
435
439
  className: "spot-covered-items__title",
436
- text: `Items Covered in Your Cart (${t.length})`,
437
- parent: l
440
+ text: `Items Covered in Your Cart (${e.length})`,
441
+ parent: i
438
442
  });
439
- const m = i("div", {
443
+ const h = n("div", {
440
444
  className: "spot-covered-items__right-section",
441
- parent: l
445
+ parent: i
442
446
  });
443
- i("span", {
447
+ n("span", {
444
448
  className: "spot-covered-items__view-all",
445
449
  text: "View All",
446
- parent: m
450
+ parent: h
447
451
  });
448
- const f = i("span", {
452
+ const m = n("span", {
449
453
  className: "spot-covered-items__arrow",
450
454
  innerHTML: "▼",
451
- parent: m
452
- }), h = i("div", {
455
+ parent: h
456
+ }), f = n("div", {
453
457
  className: "spot-covered-items__content",
454
- parent: o
455
- }), g = i("ul", {
458
+ parent: r
459
+ }), g = n("ul", {
456
460
  className: "spot-covered-items__list",
457
- parent: h
461
+ parent: f
458
462
  });
459
- n.forEach(({ displayText: u }) => {
460
- const d = i("li", { parent: g });
461
- i("span", { text: u, parent: d });
463
+ p.forEach(({ displayText: u }) => {
464
+ const d = n("li", { parent: g });
465
+ n("span", { text: u, parent: d });
462
466
  });
463
- let p = !1;
464
- h.style.display = "none", l.addEventListener("click", (u) => {
465
- u.stopPropagation(), u.preventDefault(), p = !p, h.style.display = p ? "block" : "none", f.innerHTML = p ? "▲" : "▼", l.setAttribute("aria-expanded", p.toString());
466
- }), l.setAttribute("aria-expanded", "false"), l.setAttribute("aria-controls", "covered-items-list"), h.setAttribute("id", "covered-items-list");
467
+ let l = !1;
468
+ f.style.display = "none", i.addEventListener("click", (u) => {
469
+ u.stopPropagation(), u.preventDefault(), l = !l, f.style.display = l ? "block" : "none", m.innerHTML = l ? "▲" : "▼", i.setAttribute("aria-expanded", l.toString());
470
+ }), i.setAttribute("aria-expanded", "false"), i.setAttribute("aria-controls", "covered-items-list"), f.setAttribute("id", "covered-items-list");
467
471
  }
468
- const Z = {
472
+ const B = {
469
473
  USD: "$",
470
474
  CAD: "CAD $",
471
475
  AUD: "AUD $",
@@ -490,133 +494,133 @@ const Z = {
490
494
  THB: "THB ฿",
491
495
  ZAR: "ZAR R"
492
496
  };
493
- let B = 0;
494
- function j(c, t = [], r = "USD") {
495
- const s = Z[r] ?? `${r} `, a = `refund-schedule-content-${++B}`, n = i("div", {
497
+ let Z = 0;
498
+ function F(c, e = [], o = "USD") {
499
+ const s = B[o] ?? `${o} `, a = `refund-schedule-content-${++Z}`, p = n("div", {
496
500
  className: "spot-covered-items__container spot-refund-schedule",
497
501
  parent: c
498
- }), o = i("div", {
502
+ }), r = n("div", {
499
503
  className: "spot-covered-items__header",
500
- parent: n
501
- }), e = i("button", {
504
+ parent: p
505
+ }), t = n("button", {
502
506
  className: "spot-covered-items__toggle",
503
- parent: o
507
+ parent: r
504
508
  });
505
- i("span", {
509
+ n("span", {
506
510
  className: "spot-covered-items__title",
507
511
  text: "Refund Schedule",
508
- parent: e
512
+ parent: t
509
513
  });
510
- const l = i("div", {
514
+ const i = n("div", {
511
515
  className: "spot-covered-items__right-section",
512
- parent: e
513
- }), m = i("span", {
516
+ parent: t
517
+ }), h = n("span", {
514
518
  className: "spot-covered-items__view-all",
515
519
  text: "View",
516
- parent: l
517
- }), f = i("span", {
520
+ parent: i
521
+ }), m = n("span", {
518
522
  className: "spot-covered-items__arrow",
519
523
  innerHTML: "▼",
520
- parent: l
521
- }), h = i("div", {
524
+ parent: i
525
+ }), f = n("div", {
522
526
  className: "spot-covered-items__content",
523
- parent: n
524
- }), g = i("ul", {
527
+ parent: p
528
+ }), g = n("ul", {
525
529
  className: "spot-covered-items__list",
526
- parent: h
530
+ parent: f
527
531
  });
528
- t.forEach(({ text: u, percent: d, amount: b }) => {
529
- const _ = i("li", { parent: g });
530
- i("span", { text: u, parent: _ });
531
- const C = d === "Not eligible for refund" ? "Not eligible for a refund" : `${d} (${s}${b.toFixed(2)})`;
532
- i("span", { text: C, parent: _ });
532
+ e.forEach(({ text: u, percent: d, amount: _ }) => {
533
+ const b = n("li", { parent: g });
534
+ n("span", { text: u, parent: b });
535
+ const C = d === "Not eligible for refund" ? "Not eligible for a refund" : `${d} (${s}${_.toFixed(2)})`;
536
+ n("span", { text: C, parent: b });
533
537
  });
534
- let p = !1;
535
- h.style.display = "none", e.addEventListener("click", (u) => {
536
- u.stopPropagation(), p = !p, h.style.display = p ? "block" : "none", m.textContent = p ? "Close" : "View", f.innerHTML = p ? "▲" : "▼", e.setAttribute("aria-expanded", p.toString());
537
- }), e.setAttribute("aria-expanded", "false"), e.setAttribute("aria-controls", a), h.setAttribute("id", a);
538
+ let l = !1;
539
+ f.style.display = "none", t.addEventListener("click", (u) => {
540
+ u.stopPropagation(), l = !l, f.style.display = l ? "block" : "none", h.textContent = l ? "Close" : "View", m.innerHTML = l ? "▲" : "▼", t.setAttribute("aria-expanded", l.toString());
541
+ }), t.setAttribute("aria-expanded", "false"), t.setAttribute("aria-controls", a), f.setAttribute("id", a);
538
542
  }
539
- function F(c, t) {
540
- const r = i("div", {
543
+ function j(c, e) {
544
+ const o = n("div", {
541
545
  className: "spot-state-dropdown__wrapper",
542
546
  parent: c
543
547
  });
544
- i("label", {
548
+ n("label", {
545
549
  className: "spot-state-dropdown__label",
546
550
  text: "State of Residence",
547
- parent: r
551
+ parent: o
548
552
  });
549
- const s = i("select", {
553
+ const s = n("select", {
550
554
  className: "spot-state-dropdown__select",
551
- parent: r
555
+ parent: o
552
556
  });
553
557
  s.setAttribute("aria-label", "State of Residence");
554
- const a = i("option", {
558
+ const a = n("option", {
555
559
  text: "Select a state...",
556
560
  parent: s
557
561
  });
558
- a.value = "", a.selected = !t, A.forEach(({ value: o, label: e }) => {
559
- const l = i("option", { text: e, parent: s });
560
- l.value = o, o === t && (l.selected = !0);
562
+ a.value = "", a.selected = !e, H.forEach(({ value: r, label: t }) => {
563
+ const i = n("option", { text: t, parent: s });
564
+ i.value = r, r === e && (i.selected = !0);
561
565
  });
562
- const n = i("option", {
566
+ const p = n("option", {
563
567
  text: "Not a US Resident",
564
568
  parent: s
565
569
  });
566
- return n.value = E, t === E && (n.selected = !0), i("div", {
570
+ return p.value = E, e === E && (p.selected = !0), n("div", {
567
571
  className: "spot-state-dropdown__error",
568
- text: O,
569
- parent: r
572
+ text: L,
573
+ parent: o
570
574
  }), s;
571
575
  }
572
- function W(c, t, r, s = !1) {
573
- const a = i("div", {
576
+ function W(c, e, o, s = !1) {
577
+ const a = n("div", {
574
578
  className: `spot-selection__options${s ? " spot-selection__options--disabled" : ""}`,
575
579
  parent: c
576
- }), n = i("label", {
577
- className: `spot-selection__option ${t === w.YES ? "selected" : ""}`,
580
+ }), p = n("label", {
581
+ className: `spot-selection__option ${e === w.YES ? "selected" : ""}`,
578
582
  parent: a
579
- }), o = i("input", { parent: n });
580
- o.type = "radio", o.name = "selection", o.value = w.YES, t === w.YES && (o.checked = !0), s && (o.disabled = !0), i("strong", {
581
- text: r.yesOptionText,
582
- parent: n
583
- }), i("span", {
583
+ }), r = n("input", { parent: p });
584
+ r.type = "radio", r.name = "selection", r.value = w.YES, e === w.YES && (r.checked = !0), s && (r.disabled = !0), n("strong", {
585
+ text: o.yesOptionText,
586
+ parent: p
587
+ }), n("span", {
584
588
  className: "spot-selection__recommended-tag",
585
589
  text: "Recommended",
586
- parent: n
590
+ parent: p
587
591
  });
588
- const e = i("label", {
589
- className: `spot-selection__option ${t === w.NO ? "selected" : ""}`,
592
+ const t = n("label", {
593
+ className: `spot-selection__option ${e === w.NO ? "selected" : ""}`,
590
594
  parent: a
591
- }), l = i("input", { parent: e });
592
- return l.type = "radio", l.name = "selection", l.value = w.NO, t === w.NO && (l.checked = !0), s && (l.disabled = !0), i("span", { text: r.noOptionText, parent: e }), a;
595
+ }), i = n("input", { parent: t });
596
+ return i.type = "radio", i.name = "selection", i.value = w.NO, e === w.NO && (i.checked = !0), s && (i.disabled = !0), n("span", { text: o.noOptionText, parent: t }), a;
593
597
  }
594
- function H(c, t) {
598
+ function A(c, e) {
595
599
  var s;
596
- const r = (s = t.communication) == null ? void 0 : s.paymentTerms;
597
- if (r) {
598
- const a = i("div", {
600
+ const o = (s = e.communication) == null ? void 0 : s.paymentTerms;
601
+ if (o) {
602
+ const a = n("div", {
599
603
  className: "spot-payment-terms",
600
604
  parent: c
601
605
  });
602
- return i("div", {
606
+ return n("div", {
603
607
  className: "spot-payment-terms__header",
604
608
  text: "PAYMENT TERMS",
605
609
  parent: a
606
- }), i("div", {
610
+ }), n("div", {
607
611
  className: "spot-payment-terms__body",
608
- text: r || "",
612
+ text: o || "",
609
613
  parent: a
610
614
  }), a;
611
615
  }
612
616
  }
613
- function Y(c, t, r = "top-right") {
614
- if (r === "top-right") {
615
- const e = i("div", {
617
+ function Y(c, e, o = "top-right") {
618
+ if (o === "top-right") {
619
+ const t = n("div", {
616
620
  className: "spot-logo__top-right",
617
621
  parent: c
618
622
  });
619
- e.innerHTML = `
623
+ t.innerHTML = `
620
624
  <svg width="145" height="28" viewBox="0 0 145 28" fill="none" xmlns="http://www.w3.org/2000/svg">
621
625
  <path d="M11.98 19V9.2H14.878C16.754 9.2 18.154 10.474 18.154 12.364C18.154 14.254 16.754 15.528 14.878 15.528H13.828V19H11.98ZM13.828 13.806H14.878C15.746 13.806 16.236 13.176 16.236 12.364C16.236 11.552 15.746 10.936 14.878 10.936H13.828V13.806ZM22.0258 19.196C20.0938 19.196 18.2178 17.894 18.2178 15.43C18.2178 12.952 20.0938 11.65 22.0258 11.65C23.9438 11.65 25.8198 12.952 25.8198 15.43C25.8198 17.894 23.9438 19.196 22.0258 19.196ZM20.0518 15.43C20.0518 16.774 20.8778 17.544 22.0258 17.544C23.1598 17.544 23.9858 16.774 23.9858 15.43C23.9858 14.072 23.1598 13.302 22.0258 13.302C20.8778 13.302 20.0518 14.072 20.0518 15.43ZM27.7226 19L25.2446 11.846H27.0926L28.7026 16.732L29.9486 11.846H31.7266L33.0146 16.746L34.5966 11.846H36.4026L33.9946 19H32.1186L30.8446 14.198L29.6266 19H27.7226ZM39.531 19.196C37.683 19.196 35.849 17.894 35.849 15.43C35.849 12.952 37.641 11.65 39.461 11.65C41.253 11.65 43.073 12.924 43.073 15.416V15.962H37.599C37.795 17.096 38.607 17.614 39.531 17.614C40.161 17.614 40.609 17.418 40.889 17.054H42.933C42.317 18.496 40.889 19.196 39.531 19.196ZM37.627 14.702H41.211C41.043 13.526 40.217 13.092 39.461 13.092C38.607 13.092 37.851 13.624 37.627 14.702ZM44.0159 19V11.846H45.7799V12.798C46.3539 12.028 47.2219 11.65 48.0759 11.65V13.47C46.5919 13.19 45.7799 13.834 45.7799 15.024V19H44.0159ZM51.967 19.196C50.119 19.196 48.285 17.894 48.285 15.43C48.285 12.952 50.077 11.65 51.897 11.65C53.689 11.65 55.509 12.924 55.509 15.416V15.962H50.035C50.231 17.096 51.043 17.614 51.967 17.614C52.597 17.614 53.045 17.418 53.325 17.054H55.369C54.753 18.496 53.325 19.196 51.967 19.196ZM50.063 14.702H53.647C53.479 13.526 52.653 13.092 51.897 13.092C51.043 13.092 50.287 13.624 50.063 14.702ZM59.4762 19.196C57.7542 19.196 56.1022 17.894 56.1022 15.43C56.1022 12.952 57.7542 11.65 59.4762 11.65C60.4842 11.65 61.3102 12.014 61.8562 12.714V9.2H63.6202V19H61.8562V18.146C61.3102 18.832 60.4842 19.196 59.4762 19.196ZM57.9362 15.43C57.9362 16.774 58.7622 17.544 59.8962 17.544C61.0442 17.544 61.8562 16.774 61.8562 15.43C61.8562 14.072 61.0442 13.302 59.8962 13.302C58.7622 13.302 57.9362 14.072 57.9362 15.43ZM72.526 19.196C71.518 19.196 70.692 18.832 70.146 18.146V19H68.382V9.2H70.146V12.714C70.692 12.014 71.518 11.65 72.526 11.65C74.248 11.65 75.9 12.952 75.9 15.43C75.9 17.894 74.248 19.196 72.526 19.196ZM70.146 15.43C70.146 16.774 70.958 17.544 72.106 17.544C73.254 17.544 74.066 16.774 74.066 15.43C74.066 14.072 73.254 13.302 72.106 13.302C70.958 13.302 70.146 14.072 70.146 15.43ZM76.9259 21.66L78.2699 18.342L75.4559 11.846H77.3879L79.2079 16.158L80.9299 11.846H82.7639L78.7599 21.66H76.9259Z" fill="#111820"/>
622
626
  <g clip-path="url(#clip0_295_2094)">
@@ -629,25 +633,25 @@ function Y(c, t, r = "top-right") {
629
633
  </defs>
630
634
  </svg>`;
631
635
  }
632
- const s = i("div", {
636
+ const s = n("div", {
633
637
  className: "spot-footer__container",
634
638
  parent: c
635
- }), a = i("div", {
639
+ }), a = n("div", {
636
640
  className: "spot-footer__terms",
637
641
  parent: s
638
- }), n = `<a href="${t.communication.termsAndConditionsUrl}" target="_blank" class="spot-footer__terms-link">Terms & Conditions</a>`, o = t.communication.legalDisclaimer.replace(
642
+ }), p = `<a href="${e.communication.termsAndConditionsUrl}" target="_blank" class="spot-footer__terms-link">Terms & Conditions</a>`, r = e.communication.legalDisclaimer.replace(
639
643
  /terms (and|&) conditions/gi,
640
- n
644
+ p
641
645
  );
642
- if (i("span", {
643
- innerHTML: o,
646
+ if (n("span", {
647
+ innerHTML: r,
644
648
  parent: a
645
- }), r === "bottom-right") {
646
- const e = i("p", {
649
+ }), o === "bottom-right") {
650
+ const t = n("p", {
647
651
  className: "spot-footer__powered-by",
648
652
  parent: s
649
653
  });
650
- e.innerHTML = `
654
+ t.innerHTML = `
651
655
  <svg width="145" height="28" viewBox="0 0 145 28" fill="none" xmlns="http://www.w3.org/2000/svg">
652
656
  <rect width="145" height="28"/>
653
657
  <rect x="-655" y="-270" width="819" height="325" rx="10"/>
@@ -666,20 +670,20 @@ function Y(c, t, r = "top-right") {
666
670
  }
667
671
  return s;
668
672
  }
669
- const G = ":root{--spot-font-family: Arial;--spot-padding: 1.25rem;--spot-background-color: #ffffff;--spot-font-color: #000000;--spot-border-radius: .5rem;--spot-border-line-width: .0625rem;--spot-border-color: #e0e0e0;--spot-logo-background-color: #f3fd00;--spot-max-width: 51rem;--spot-margin: 1rem;--spot-title-font-size: 1.25rem;--spot-title-font-weight: 700;--spot-title-padding: 0 0 1.25rem 0;--spot-description-font-size: .875rem;--spot-description-font-weight: 400;--spot-description-padding: 0 0 .5rem 0;--spot-bullets-font-size: .875rem;--spot-bullets-font-weight: 400;--spot-bullets-padding: .3125rem;--spot-bullets-checkmark-color: #2e2e2e;--spot-table-border-radius: .625rem;--spot-table-header-font-size: .875rem;--spot-table-header-font-weight: 700;--spot-table-header-padding: 0 .5rem .625rem;--spot-table-cell-font-size: .815rem;--spot-table-cell-font-weight: 400;--spot-table-cell-padding: 0 .625rem;--spot-radio-border: #000000;--spot-radio-border-radius: .625rem;--spot-radio-checked-background: #000000;--spot-radio-text-font-size: .875rem;--spot-radio-text-font-weight: 400;--spot-radio-text-padding: .625rem;--spot-radio-selection-background: #f4f4f4;--spot-radio-selection-border-radius: .625rem;--spot-radio-selection-padding: .625rem;--spot-recommended-tag-background: #000000;--spot-recommended-tag-font-color: #ffffff;--spot-recommended-tag-font-size: .875rem;--spot-recommended-tag-font-weight: 700;--spot-recommended-tag-padding: .25rem .5rem;--spot-recommended-tag-border-radius: .5rem;--spot-state-dropdown-label-font-size: .875rem;--spot-state-dropdown-label-font-weight: 600;--spot-state-dropdown-label-margin-bottom: .25rem;--spot-state-dropdown-select-border: .0625rem solid #e0e0e0;--spot-state-dropdown-select-border-radius: .375rem;--spot-state-dropdown-select-padding: .5rem .75rem;--spot-state-dropdown-select-font-size: .875rem;--spot-state-dropdown-select-background: #ffffff;--spot-state-dropdown-wrapper-margin-bottom: .75rem;--spot-state-dropdown-error-color: var(--spot-selection-error-font-color);--spot-state-dropdown-error-font-size: .8125rem;--spot-state-dropdown-error-margin-top: .25rem;--spot-selection-error-font-color: #ff0000;--spot-selection-error-font-size: .875rem;--spot-qualifying-reasons-margin: .75rem 0;--spot-qualifying-reasons-padding: 0 .3125rem;--spot-qualifying-reasons-column-gap: 3rem;--spot-qualifying-reasons-row-gap: .25rem;--spot-qualifying-reasons-grid-padding-left: 1rem;--spot-qualifying-reasons-icon-wrapper-size: 1.125rem;--spot-qualifying-reasons-icon-size: .75rem;--spot-qualifying-reasons-icon-border-color: #2e2e2e;--spot-qualifying-reasons-icon-border-width: 1px;--spot-qualifying-reasons-icon-background: #ffffff;--spot-qualifying-reasons-item-gap: .625rem;--spot-qualifying-reasons-label-font-size: .8rem;--spot-qualifying-reasons-label-font-weight: 400;--spot-qualifying-reasons-label-font-color: #000000;--spot-qualifying-reasons-label-font-family: Arial;--spot-selection-error-padding: .5rem;--spot-payment-terms-background: #f4f4f4;--spot-payment-terms-border-radius: .625rem;--spot-payment-terms-padding: 1rem;--spot-payment-terms-font-color: #636569;--spot-payment-terms-font-size: .75rem;--spot-payment-terms-header-font-weight: 700;--spot-payment-terms-header-font-size: .875rem;--spot-payment-terms-header-margin-bottom: .5rem;--spot-payment-terms-header-border-color: #c2c2c2;--spot-payment-terms-header-padding: 0 0 .5rem 0;--spot-terms-font-size: .75rem;--spot-terms-font-weight: 400;--spot-terms-font-color: #636569;--spot-terms-padding: 0;--spot-terms-link-text-decoration: underline;--spot-terms-link-font-size: .75rem;--spot-terms-link-font-weight: 400;--spot-terms-link-font-color: #636569;--spot-terms-link-padding: 0;--spot-covered-items-background: #f1f3f5;--spot-covered-items-hover-background: #e9ecef;--spot-covered-items-border-radius: .5rem;--spot-covered-items-padding: .75rem 1rem;--spot-covered-items-font-size: .875rem;--spot-covered-items-font-weight: 400;--spot-covered-items-font-color: #000000;--spot-covered-items-font-family: Arial;--spot-covered-items-arrow-font-size: .6rem;--spot-covered-items-arrow-color: #636569;--spot-covered-items-view-all-color: #636569;--spot-covered-items-view-all-font-size: .875rem;--spot-covered-items-view-all-font-weight: 400;--spot-covered-items-content-background: #f8f9fa;--spot-covered-items-content-border: 1px solid #e0e0e0;--spot-covered-items-content-border-radius: .5rem;--spot-covered-items-content-padding: .75rem 1rem;--spot-desktop-radio-margin-top: -1.5rem;--spot-benefits-margin-bottom: 0rem;--spot-covered-items-margin-bottom: 1.5rem;--spot-footer-gap: 1rem;--spot-footer-terms-margin-right: 7rem;--spot-payment-terms-margin-top: .5rem;--spot-logo-top-right-margin: 1rem}.spot-refund-guarantee{font-family:var(--spot-font-family);padding:var(--spot-padding);background-color:var(--spot-background-color);color:var(--spot-font-color);border:var(--spot-border-line-width) solid var(--spot-border-color);border-radius:var(--spot-border-radius);max-width:var(--spot-max-width);margin:var(--spot-margin);container-type:inline-size;position:relative;word-wrap:normal;overflow-wrap:normal;-webkit-hyphens:none;hyphens:none}.spot-refund-guarantee *{color:inherit}.spot-header__title{font-size:var(--spot-title-font-size);font-weight:var(--spot-title-font-weight);padding:var(--spot-title-padding);color:var(--spot-title-font-color);font-family:var(--spot-title-font-family);line-height:120%;letter-spacing:-.03125rem}.spot-header__description{font-size:var(--spot-description-font-size);font-weight:var(--spot-description-font-weight);color:var(--spot-description-font-color);font-family:var(--spot-description-font-family);padding:var(--spot-description-padding);line-height:125%;letter-spacing:-.025rem}.spot-content__wrapper{display:flex;flex-direction:column}.spot-content__wrapper.desktop-layout{display:grid;grid-template-columns:1fr auto;align-items:start;gap:1rem}.desktop-layout .spot-benefits__list,.desktop-layout .spot-qualifying-reasons__container,.desktop-layout .spot-covered-items__container,.desktop-layout .spot-selection__wrapper{min-width:0;word-wrap:normal}.desktop-layout .spot-benefits__list,.desktop-layout .spot-qualifying-reasons__container{grid-row:1;margin-bottom:var(--spot-benefits-margin-bottom)}.desktop-layout .spot-covered-items__container{grid-row:2;grid-column:1;margin-bottom:var(--spot-covered-items-margin-bottom)}.desktop-layout .spot-selection__wrapper{grid-row:3;grid-column:1;margin-top:var(--spot-desktop-radio-margin-top)}.desktop-layout .spot-payment-terms__wrapper{grid-row:4;grid-column:1;margin-top:var(--spot-payment-terms-margin-top)}.desktop-layout .spot-table__container{grid-row:1 / span 4;grid-column:2;width:auto;min-width:20.3125rem}.spot-content__wrapper:not(.desktop-layout) .spot-table__container{display:flex;justify-content:flex-start;margin-top:1rem;margin-bottom:1rem;box-sizing:border-box;padding:0 .3125rem}.spot-content__wrapper:not(.desktop-layout) .spot-refund__table{width:100%;max-width:22rem;table-layout:auto}@media (max-width: 850px){.spot-selection__recommended-tag{display:inline-block;margin-left:0}}@media (max-width: 500px){.spot-selection__recommended-tag{margin-top:.5rem}}@media (max-width: 600px){.spot-refund__table th{padding:0rem}}.spot-benefits__list{list-style-type:none;line-height:125%;gap:.5625rem;font-size:var(--spot-bullets-font-size);font-weight:var(--spot-bullets-font-weight);color:var(--spot-bullets-font-color);font-family:var(--spot-bullets-font-family);padding:var(--spot-bullets-padding);margin-block-start:0rem;margin-block-end:0rem}.spot-benefits__list li{margin-bottom:.375rem;display:flex;align-items:flex-start;gap:.5rem}.spot-benefits__list li svg{flex-shrink:0;position:relative;top:.125rem}.spot-bullets__checkmark path{stroke:var(--spot-bullets-checkmark-color)}.spot-qualifying-reasons__container{margin:var(--spot-qualifying-reasons-margin);padding:var(--spot-qualifying-reasons-padding)}.spot-qualifying-reasons__grid{display:grid;grid-template-columns:repeat(2,minmax(0,max-content));column-gap:var(--spot-qualifying-reasons-column-gap);row-gap:var(--spot-qualifying-reasons-row-gap);max-width:100%;padding-left:var(--spot-qualifying-reasons-grid-padding-left)}.spot-qualifying-reasons__item{display:flex;align-items:center;gap:var(--spot-qualifying-reasons-item-gap)}.spot-qualifying-reasons__icon-wrapper{width:var(--spot-qualifying-reasons-icon-wrapper-size);height:var(--spot-qualifying-reasons-icon-wrapper-size);border-radius:50%;border:var(--spot-qualifying-reasons-icon-border-width) solid var(--spot-qualifying-reasons-icon-border-color);background-color:var(--spot-qualifying-reasons-icon-background);display:flex;align-items:center;justify-content:center;flex-shrink:0}.spot-qualifying-reasons__icon{width:var(--spot-qualifying-reasons-icon-size);height:var(--spot-qualifying-reasons-icon-size)}.spot-qualifying-reasons__label{font-size:var(--spot-qualifying-reasons-label-font-size);font-weight:var(--spot-qualifying-reasons-label-font-weight);color:var(--spot-qualifying-reasons-label-font-color);font-family:var(--spot-qualifying-reasons-label-font-family);line-height:1.2}@media (max-width: 480px){.spot-qualifying-reasons__grid{grid-template-columns:1fr}}.spot-covered-items__container{margin-top:.85rem;margin-bottom:.5rem;max-width:26rem}.spot-content__wrapper.desktop-layout:has(.spot-table__container) .spot-covered-items__container{margin-top:0rem;margin-bottom:1rem}.spot-covered-items__title{font-size:var(--spot-covered-items-font-size);font-weight:var(--spot-covered-items-font-weight);color:var(--spot-covered-items-font-color);font-family:var(--spot-covered-items-font-family);padding:0 .3125rem .25rem;line-height:125%;margin:0}.spot-covered-items__list{list-style-type:disc;list-style-position:inside;line-height:125%;gap:.5625rem;font-size:var(--spot-bullets-font-size);font-weight:var(--spot-bullets-font-weight);color:var(--spot-bullets-font-color);font-family:var(--spot-bullets-font-family);padding:var(--spot-bullets-padding);margin-block-start:0rem;margin-block-end:0rem}.spot-covered-items__list li{margin-bottom:.3rem;text-align:left}.spot-covered-items__list li:last-child{margin-bottom:0}.spot-covered-items__header{margin-bottom:.5rem}.spot-covered-items__toggle{background:var(--spot-covered-items-background);border:none;border-radius:var(--spot-covered-items-border-radius);padding:var(--spot-covered-items-padding);cursor:pointer;display:flex;align-items:center;justify-content:space-between;width:100%;font-size:var(--spot-covered-items-font-size);font-weight:var(--spot-covered-items-font-weight);color:var(--spot-covered-items-font-color);font-family:var(--spot-covered-items-font-family);line-height:125%;transition:all .2s ease}.spot-covered-items__toggle:hover{background-color:var(--spot-covered-items-hover-background)}.spot-covered-items__toggle:focus{outline:none;box-shadow:0 0 0 2px #0000001a}.spot-covered-items__title{font-size:var(--spot-covered-items-font-size);font-weight:var(--spot-covered-items-font-weight);color:var(--spot-covered-items-font-color);font-family:var(--spot-covered-items-font-family);line-height:125%;margin:0;padding:0}.spot-covered-items__right-section{display:flex;align-items:center;gap:.5rem;margin-left:auto}.spot-covered-items__view-all{font-size:var(--spot-covered-items-view-all-font-size);font-weight:var(--spot-covered-items-view-all-font-weight);color:var(--spot-covered-items-view-all-color);font-family:var(--spot-covered-items-font-family);line-height:125%}.spot-covered-items__arrow{font-size:var(--spot-covered-items-arrow-font-size);transition:transform .2s ease;color:var(--spot-covered-items-arrow-color);flex-shrink:0;transform:scaleX(1.5)}.spot-covered-items__content{margin-top:.5rem;transition:all .2s ease;overflow:hidden}.spot-covered-items__list{background-color:var(--spot-covered-items-content-background);border:var(--spot-covered-items-content-border);border-radius:var(--spot-covered-items-content-border-radius);margin:0;padding:var(--spot-covered-items-content-padding)}.spot-refund-schedule{border:var(--spot-covered-items-content-border);border-radius:var(--spot-covered-items-border-radius);overflow:hidden;margin-bottom:1rem}.spot-refund-schedule .spot-covered-items__header{margin-bottom:0}.spot-refund-schedule .spot-covered-items__toggle{border-radius:0}.spot-refund-schedule .spot-covered-items__content{margin-top:0}.spot-refund-schedule .spot-covered-items__list{border:none;border-radius:0;background:transparent;padding:.5rem 1rem;list-style:none}.spot-refund-schedule .spot-covered-items__list li{display:flex;justify-content:space-between;padding:.375rem 0;margin:0;gap:.75rem}.spot-refund-schedule .spot-covered-items__list li>span:first-child{min-width:0}.spot-refund-schedule .spot-covered-items__list li>span:last-child{text-align:right;white-space:nowrap}.spot-table__container{width:100%}.spot-refund__table{max-width:22rem;border-radius:var(--spot-table-border-radius);overflow:hidden;border:.09375rem solid #636569;table-layout:fixed;margin-bottom:.5rem;margin-top:.25rem;padding:.625rem}.spot-refund__table--dynamic{height:auto!important;min-height:7.5rem}.spot-refund__table td,.spot-refund__table th{padding:.375rem .625rem;text-align:left}.spot-refund__table th{text-align:left;font-size:var(--spot-table-header-font-size);font-weight:var(--spot-table-header-font-weight);color:var(--spot-table-header-font-color);font-family:var(--spot-table-header-font-family);padding:var(--spot-table-header-padding)}.spot-refund__table td{text-align:left;font-size:var(--spot-table-cell-font-size);font-weight:var(--spot-table-cell-font-weight);color:var(--spot-table-cell-font-color);font-family:var(--spot-table-cell-font-family);padding:var(--spot-table-cell-padding)}.spot-state-dropdown__wrapper{display:flex;flex-direction:column;margin-bottom:var(--spot-state-dropdown-wrapper-margin-bottom)}.spot-state-dropdown__label{font-size:var(--spot-state-dropdown-label-font-size);font-weight:var(--spot-state-dropdown-label-font-weight);font-family:var(--spot-font-family);color:var(--spot-font-color);margin-bottom:var(--spot-state-dropdown-label-margin-bottom)}.spot-state-dropdown__select{width:100%;box-sizing:border-box;border:var(--spot-state-dropdown-select-border);border-radius:var(--spot-state-dropdown-select-border-radius);padding:var(--spot-state-dropdown-select-padding);font-size:var(--spot-state-dropdown-select-font-size);font-family:var(--spot-font-family);color:var(--spot-font-color);background-color:var(--spot-state-dropdown-select-background);cursor:pointer;-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}.spot-state-dropdown__select:focus{outline:none;box-shadow:0 0 0 2px #00000026}.spot-state-dropdown__select--error{border-color:var(--spot-state-dropdown-error-color)}.spot-state-dropdown__select--error:focus{box-shadow:0 0 0 2px #ff000026}.spot-state-dropdown__error{display:none;color:var(--spot-state-dropdown-error-color);font-size:var(--spot-state-dropdown-error-font-size);font-family:var(--spot-font-family);margin-top:var(--spot-state-dropdown-error-margin-top)}.spot-state-dropdown__error--visible{display:block}input[type=radio]{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:.75rem;height:.75rem;min-width:.75rem;border:.0625rem solid var(--spot-radio-border);border-radius:var(--spot-radio-border-radius);margin-right:.5rem;position:relative;vertical-align:middle;top:-.0625rem;cursor:pointer;flex-shrink:0}input[type=radio]:checked{background:var(--spot-radio-checked-background);box-shadow:inset 0 0 0 .0625rem #fff}.spot-selection__wrapper{max-width:26rem}.spot-selection__options{display:flex;flex-direction:column;gap:.5rem}.spot-selection__option{display:flex;align-items:center;flex-wrap:nowrap;position:relative;transition:background .2s;cursor:pointer;font-size:var(--spot-radio-text-font-size);font-weight:var(--spot-radio-text-font-weight);color:var(--spot-radio-text-font-color);font-family:var(--spot-radio-text-font-family);padding:var(--spot-radio-text-padding);margin-right:.5rem}.spot-selection__option.selected{background:var(--spot-radio-selection-background);border-radius:var(--spot-radio-selection-border-radius);padding:var(--spot-radio-selection-padding)}.spot-selection__recommended-tag{background:var(--spot-recommended-tag-background);color:var(--spot-recommended-tag-font-color);font-size:var(--spot-recommended-tag-font-size);font-weight:var(--spot-recommended-tag-font-weight);padding:var(--spot-recommended-tag-padding);border-radius:var(--spot-recommended-tag-border-radius);margin-left:.75rem;white-space:nowrap;flex-shrink:0}@media (max-width: 850px){.spot-selection__recommended-tag{margin-left:.5rem}}@media (max-width: 600px){.spot-selection__recommended-tag{margin-left:.5rem;font-size:.75rem;padding:.1875rem .4375rem}}.spot-selection__error{color:var(--spot-selection-error-font-color);font-size:var(--spot-selection-error-font-size);padding:var(--spot-selection-error-padding);display:none}.spot-selection__options--disabled .spot-selection__option{opacity:.4;cursor:not-allowed;pointer-events:none}.spot-selection__options--disabled input[type=radio]{cursor:not-allowed}.spot-payment-terms__wrapper{margin-top:1rem;max-width:26rem}.spot-payment-terms__header{font-weight:var(--spot-payment-terms-header-font-weight);margin-bottom:.5rem;padding:var(--spot-payment-terms-header-padding);font-size:var(--spot-payment-terms-header-font-size);border-bottom:1px solid var(--spot-payment-terms-header-border-color)}.spot-payment-terms{background-color:var(--spot-payment-terms-background);border-radius:var(--spot-payment-terms-border-radius);padding:var(--spot-payment-terms-padding);color:var(--spot-payment-terms-font-color);font-size:var(--spot-payment-terms-font-size)}.spot-footer__terms{margin-top:.625rem;margin-right:.25rem;font-size:var(--spot-terms-font-size);font-weight:var(--spot-terms-font-weight);color:var(--spot-terms-font-color);font-family:var(--spot-terms-font-family);padding:var(--spot-terms-padding);line-height:1.4;word-wrap:normal;-webkit-hyphens:none;hyphens:none;flex:1;min-width:0;overflow-wrap:normal}.spot-footer__terms-link{text-decoration:var(--spot-terms-link-text-decoration);font-size:var(--spot-terms-link-font-size);font-weight:var(--spot-terms-link-font-weight);color:var(--spot-terms-link-font-color);font-family:var(--spot-terms-link-font-family);padding:var(--spot-terms-link-padding)}.spot-footer__container{display:flex;flex-direction:row;justify-content:space-between;align-items:flex-start;flex-wrap:nowrap;gap:var(--spot-footer-gap)}@container (max-width: 650px){.spot-footer__container{flex-direction:column!important;align-items:flex-start!important;flex-wrap:wrap!important}.spot-footer__terms{margin-right:0!important;margin-bottom:.5rem!important;flex:none!important;width:100%!important;max-width:none!important}}@media (max-width: 650px){.spot-footer__container{flex-direction:column!important;align-items:flex-start!important;flex-wrap:wrap!important}.spot-footer__terms{margin-right:0!important;margin-bottom:.5rem!important;flex:none!important;width:100%!important;max-width:none!important}}.spot-footer__powered-by{margin-top:0;flex-shrink:0}.spot-logo__top-right{position:absolute;top:-14px;right:5%;z-index:10;background:linear-gradient(to bottom,transparent 50%,inherit 50%);padding:0 .25rem}.spot-logo__top-right svg{border-radius:9999px;overflow:hidden;border:var(--spot-border-line-width) solid var(--spot-border-color);display:block;background:var(--spot-logo-background-color)}@container (min-width: 651px){.spot-footer__powered-by{margin-top:0;align-self:center}.spot-footer__terms{margin-right:var(--spot-footer-terms-margin-right)}}@media (min-width: 651px){.spot-footer__powered-by{margin-top:0;align-self:center}.spot-footer__terms{margin-right:var(--spot-footer-terms-margin-right)}}";
673
+ const G = ":root{--spot-font-family: Arial;--spot-padding: 1.25rem;--spot-background-color: #ffffff;--spot-font-color: #000000;--spot-border-radius: .5rem;--spot-border-line-width: .0625rem;--spot-border-color: #e0e0e0;--spot-logo-background-color: #f3fd00;--spot-max-width: 51rem;--spot-margin: 1rem;--spot-title-font-size: 1.25rem;--spot-title-font-weight: 700;--spot-title-padding: 0 0 1.25rem 0;--spot-description-font-size: .875rem;--spot-description-font-weight: 400;--spot-description-padding: 0 0 .5rem 0;--spot-bullets-font-size: .875rem;--spot-bullets-font-weight: 400;--spot-bullets-padding: .3125rem;--spot-bullets-checkmark-color: #2e2e2e;--spot-table-border-radius: .625rem;--spot-table-header-font-size: .875rem;--spot-table-header-font-weight: 700;--spot-table-header-padding: 0 .5rem .625rem;--spot-table-cell-font-size: .815rem;--spot-table-cell-font-weight: 400;--spot-table-cell-padding: 0 .625rem;--spot-radio-border: #000000;--spot-radio-border-radius: .625rem;--spot-radio-checked-background: #000000;--spot-radio-text-font-size: .875rem;--spot-radio-text-font-weight: 400;--spot-radio-text-padding: .625rem;--spot-radio-selection-background: #f4f4f4;--spot-radio-selection-border-radius: .625rem;--spot-radio-selection-padding: .625rem;--spot-recommended-tag-background: #000000;--spot-recommended-tag-font-color: #ffffff;--spot-recommended-tag-font-size: .875rem;--spot-recommended-tag-font-weight: 700;--spot-recommended-tag-padding: .25rem .5rem;--spot-recommended-tag-border-radius: .5rem;--spot-state-dropdown-label-font-size: .875rem;--spot-state-dropdown-label-font-weight: 600;--spot-state-dropdown-label-margin-bottom: .25rem;--spot-state-dropdown-select-border: .0625rem solid #e0e0e0;--spot-state-dropdown-select-border-radius: .375rem;--spot-state-dropdown-select-padding: .5rem .75rem;--spot-state-dropdown-select-font-size: .875rem;--spot-state-dropdown-select-background: #ffffff;--spot-state-dropdown-wrapper-margin-bottom: .75rem;--spot-state-dropdown-error-color: var(--spot-selection-error-font-color);--spot-state-dropdown-error-font-size: .8125rem;--spot-state-dropdown-error-margin-top: .25rem;--spot-selection-error-font-color: #ff0000;--spot-selection-error-font-size: .875rem;--spot-qualifying-reasons-margin: .75rem 0;--spot-qualifying-reasons-padding: 0 .3125rem;--spot-qualifying-reasons-column-gap: 3rem;--spot-qualifying-reasons-row-gap: .25rem;--spot-qualifying-reasons-grid-padding-left: 1rem;--spot-qualifying-reasons-icon-wrapper-size: 1.125rem;--spot-qualifying-reasons-icon-size: .75rem;--spot-qualifying-reasons-icon-border-color: #2e2e2e;--spot-qualifying-reasons-icon-border-width: 1px;--spot-qualifying-reasons-icon-background: #ffffff;--spot-qualifying-reasons-item-gap: .625rem;--spot-qualifying-reasons-label-font-size: .8rem;--spot-qualifying-reasons-label-font-weight: 400;--spot-qualifying-reasons-label-font-color: #000000;--spot-qualifying-reasons-label-font-family: Arial;--spot-selection-error-padding: .5rem;--spot-payment-terms-background: #f4f4f4;--spot-payment-terms-border-radius: .625rem;--spot-payment-terms-padding: 1rem;--spot-payment-terms-font-color: #636569;--spot-payment-terms-font-size: .75rem;--spot-payment-terms-header-font-weight: 700;--spot-payment-terms-header-font-size: .875rem;--spot-payment-terms-header-margin-bottom: .5rem;--spot-payment-terms-header-border-color: #c2c2c2;--spot-payment-terms-header-padding: 0 0 .5rem 0;--spot-terms-font-size: .75rem;--spot-terms-font-weight: 400;--spot-terms-font-color: #636569;--spot-terms-padding: 0;--spot-terms-link-text-decoration: underline;--spot-terms-link-font-size: .75rem;--spot-terms-link-font-weight: 400;--spot-terms-link-font-color: #636569;--spot-terms-link-padding: 0;--spot-covered-items-background: #f1f3f5;--spot-covered-items-hover-background: #e9ecef;--spot-covered-items-border-radius: .5rem;--spot-covered-items-padding: .75rem 1rem;--spot-covered-items-font-size: .875rem;--spot-covered-items-font-weight: 400;--spot-covered-items-font-color: #000000;--spot-covered-items-font-family: Arial;--spot-covered-items-arrow-font-size: .6rem;--spot-covered-items-arrow-color: #636569;--spot-covered-items-view-all-color: #636569;--spot-covered-items-view-all-font-size: .875rem;--spot-covered-items-view-all-font-weight: 400;--spot-covered-items-content-background: #f8f9fa;--spot-covered-items-content-border: 1px solid #e0e0e0;--spot-covered-items-content-border-radius: .5rem;--spot-covered-items-content-padding: .75rem 1rem;--spot-desktop-radio-margin-top: -1.5rem;--spot-benefits-margin-bottom: 0rem;--spot-footer-gap: 1rem;--spot-footer-terms-margin-right: 7rem;--spot-payment-terms-margin-top: .5rem;--spot-selection-options-gap: .5rem;--spot-refund-schedule-margin-top: 0rem;--spot-refund-schedule-margin-bottom: 1rem}.spot-refund-guarantee{font-family:var(--spot-font-family);padding:var(--spot-padding);background-color:var(--spot-background-color);color:var(--spot-font-color);border:var(--spot-border-line-width) solid var(--spot-border-color);border-radius:var(--spot-border-radius);max-width:var(--spot-max-width);margin:var(--spot-margin);container-type:inline-size;position:relative;word-wrap:normal;overflow-wrap:normal;-webkit-hyphens:none;hyphens:none}.spot-refund-guarantee *{color:inherit}.spot-header__title{font-size:var(--spot-title-font-size);font-weight:var(--spot-title-font-weight);padding:var(--spot-title-padding);color:var(--spot-title-font-color);font-family:var(--spot-title-font-family);line-height:120%;letter-spacing:-.03125rem}.spot-header__description{font-size:var(--spot-description-font-size);font-weight:var(--spot-description-font-weight);color:var(--spot-description-font-color);font-family:var(--spot-description-font-family);padding:var(--spot-description-padding);line-height:125%;letter-spacing:-.025rem}.spot-content__wrapper{display:flex;flex-direction:column}.spot-content__wrapper.desktop-layout{display:grid;grid-template-columns:1fr auto;align-items:start;gap:1rem}.desktop-layout .spot-benefits__list,.desktop-layout .spot-qualifying-reasons__container,.desktop-layout .spot-covered-items__container,.desktop-layout .spot-selection__wrapper{min-width:0;word-wrap:normal}.desktop-layout .spot-benefits__list,.desktop-layout .spot-qualifying-reasons__container{grid-row:1;margin-bottom:var(--spot-benefits-margin-bottom)}.desktop-layout .spot-covered-items__container{grid-row:2;grid-column:1;margin-top:var(--spot-covered-items-margin-top, .85rem);margin-bottom:var(--spot-covered-items-margin-bottom, 1.5rem)}.desktop-layout .spot-selection__wrapper{grid-row:3;grid-column:1;margin-top:var(--spot-desktop-radio-margin-top)}.desktop-layout .spot-payment-terms__wrapper{grid-row:4;grid-column:1;margin-top:var(--spot-payment-terms-margin-top)}.desktop-layout .spot-table__container{grid-row:1 / span 4;grid-column:2;width:auto;min-width:20.3125rem}.spot-content__wrapper:not(.desktop-layout) .spot-table__container{display:flex;justify-content:flex-start;margin-top:1rem;margin-bottom:1rem;box-sizing:border-box;padding:0 .3125rem}.spot-content__wrapper:not(.desktop-layout) .spot-refund__table{width:100%;max-width:22rem;table-layout:auto}@media (max-width: 850px){.spot-selection__recommended-tag{display:inline-block;margin-left:0}}@media (max-width: 500px){.spot-selection__recommended-tag{margin-top:.5rem}}@media (max-width: 600px){.spot-refund__table th{padding:0rem}}.spot-benefits__list{list-style-type:none;line-height:125%;gap:.5625rem;font-size:var(--spot-bullets-font-size);font-weight:var(--spot-bullets-font-weight);color:var(--spot-bullets-font-color);font-family:var(--spot-bullets-font-family);padding:var(--spot-bullets-padding);margin-block-start:0rem;margin-block-end:0rem}.spot-benefits__list li{margin-bottom:.375rem;display:flex;align-items:flex-start;gap:.5rem}.spot-benefits__list li svg{flex-shrink:0;position:relative;top:.125rem}.spot-bullets__checkmark path{stroke:var(--spot-bullets-checkmark-color)}.spot-qualifying-reasons__container{margin:var(--spot-qualifying-reasons-margin);padding:var(--spot-qualifying-reasons-padding)}.spot-qualifying-reasons__grid{display:grid;grid-template-columns:repeat(2,minmax(0,max-content));column-gap:var(--spot-qualifying-reasons-column-gap);row-gap:var(--spot-qualifying-reasons-row-gap);max-width:100%;padding-left:var(--spot-qualifying-reasons-grid-padding-left)}.spot-qualifying-reasons__item{display:flex;align-items:center;gap:var(--spot-qualifying-reasons-item-gap)}.spot-qualifying-reasons__icon-wrapper{width:var(--spot-qualifying-reasons-icon-wrapper-size);height:var(--spot-qualifying-reasons-icon-wrapper-size);border-radius:50%;border:var(--spot-qualifying-reasons-icon-border-width) solid var(--spot-qualifying-reasons-icon-border-color);background-color:var(--spot-qualifying-reasons-icon-background);display:flex;align-items:center;justify-content:center;flex-shrink:0}.spot-qualifying-reasons__icon{width:var(--spot-qualifying-reasons-icon-size);height:var(--spot-qualifying-reasons-icon-size)}.spot-qualifying-reasons__label{font-size:var(--spot-qualifying-reasons-label-font-size);font-weight:var(--spot-qualifying-reasons-label-font-weight);color:var(--spot-qualifying-reasons-label-font-color);font-family:var(--spot-qualifying-reasons-label-font-family);line-height:1.2}@media (max-width: 480px){.spot-qualifying-reasons__grid{grid-template-columns:1fr}}.spot-covered-items__container{margin-top:var(--spot-covered-items-margin-top, .85rem);margin-bottom:var(--spot-covered-items-margin-bottom, .5rem);max-width:26rem}.spot-content__wrapper.desktop-layout:has(.spot-table__container) .spot-covered-items__container{margin-top:var(--spot-covered-items-margin-top, 0rem);margin-bottom:var(--spot-covered-items-margin-bottom, 1rem)}.spot-covered-items__title{font-size:var(--spot-covered-items-font-size);font-weight:var(--spot-covered-items-font-weight);color:var(--spot-covered-items-font-color);font-family:var(--spot-covered-items-font-family);padding:0 .3125rem .25rem;line-height:125%;margin:0}.spot-covered-items__list{list-style-type:disc;list-style-position:inside;line-height:125%;gap:.5625rem;font-size:var(--spot-bullets-font-size);font-weight:var(--spot-bullets-font-weight);color:var(--spot-bullets-font-color);font-family:var(--spot-bullets-font-family);padding:var(--spot-bullets-padding);margin-block-start:0rem;margin-block-end:0rem}.spot-covered-items__list li{margin-bottom:.3rem;text-align:left}.spot-covered-items__list li:last-child{margin-bottom:0}.spot-covered-items__header{margin-bottom:.5rem}.spot-covered-items__toggle{background:var(--spot-covered-items-background);border:none;border-radius:var(--spot-covered-items-border-radius);padding:var(--spot-covered-items-padding);cursor:pointer;display:flex;align-items:center;justify-content:space-between;width:100%;font-size:var(--spot-covered-items-font-size);font-weight:var(--spot-covered-items-font-weight);color:var(--spot-covered-items-font-color);font-family:var(--spot-covered-items-font-family);line-height:125%;transition:all .2s ease}.spot-covered-items__toggle:hover{background-color:var(--spot-covered-items-hover-background)}.spot-covered-items__toggle:focus{outline:none;box-shadow:0 0 0 2px #0000001a}.spot-covered-items__title{font-size:var(--spot-covered-items-font-size);font-weight:var(--spot-covered-items-font-weight);color:var(--spot-covered-items-font-color);font-family:var(--spot-covered-items-font-family);line-height:125%;margin:0;padding:0}.spot-covered-items__right-section{display:flex;align-items:center;gap:.5rem;margin-left:auto}.spot-covered-items__view-all{font-size:var(--spot-covered-items-view-all-font-size);font-weight:var(--spot-covered-items-view-all-font-weight);color:var(--spot-covered-items-view-all-color);font-family:var(--spot-covered-items-font-family);line-height:125%}.spot-covered-items__arrow{font-size:var(--spot-covered-items-arrow-font-size);transition:transform .2s ease;color:var(--spot-covered-items-arrow-color);flex-shrink:0;transform:scaleX(1.5)}.spot-covered-items__content{margin-top:.5rem;transition:all .2s ease;overflow:hidden}.spot-covered-items__list{background-color:var(--spot-covered-items-content-background);border:var(--spot-covered-items-content-border);border-radius:var(--spot-covered-items-content-border-radius);margin:0;padding:var(--spot-covered-items-content-padding)}.spot-refund-schedule{border:var(--spot-covered-items-content-border);border-radius:var(--spot-covered-items-border-radius);overflow:hidden;margin-top:var(--spot-refund-schedule-margin-top);margin-bottom:var(--spot-refund-schedule-margin-bottom)}.spot-refund-schedule .spot-covered-items__header{margin-bottom:0}.spot-refund-schedule .spot-covered-items__toggle{border-radius:0}.spot-refund-schedule .spot-covered-items__content{margin-top:0}.spot-refund-schedule .spot-covered-items__list{border:none;border-radius:0;background:transparent;padding:.5rem 1rem;list-style:none}.spot-refund-schedule .spot-covered-items__list li{display:flex;justify-content:space-between;padding:.375rem 0;margin:0;gap:.75rem}.spot-refund-schedule .spot-covered-items__list li>span:first-child{min-width:0}.spot-refund-schedule .spot-covered-items__list li>span:last-child{text-align:right;white-space:nowrap}.spot-table__container{width:100%}.spot-refund__table{max-width:22rem;border-radius:var(--spot-table-border-radius);overflow:hidden;border:.09375rem solid #636569;table-layout:fixed;margin-bottom:.5rem;margin-top:.25rem;padding:.625rem}.spot-refund__table--dynamic{height:auto!important;min-height:7.5rem}.spot-refund__table td,.spot-refund__table th{padding:.375rem .625rem;text-align:left}.spot-refund__table th{text-align:left;font-size:var(--spot-table-header-font-size);font-weight:var(--spot-table-header-font-weight);color:var(--spot-table-header-font-color);font-family:var(--spot-table-header-font-family);padding:var(--spot-table-header-padding)}.spot-refund__table td{text-align:left;font-size:var(--spot-table-cell-font-size);font-weight:var(--spot-table-cell-font-weight);color:var(--spot-table-cell-font-color);font-family:var(--spot-table-cell-font-family);padding:var(--spot-table-cell-padding)}.spot-state-dropdown__wrapper{display:flex;flex-direction:column;margin-bottom:var(--spot-state-dropdown-wrapper-margin-bottom)}.spot-state-dropdown__label{font-size:var(--spot-state-dropdown-label-font-size);font-weight:var(--spot-state-dropdown-label-font-weight);font-family:var(--spot-font-family);color:var(--spot-font-color);margin-bottom:var(--spot-state-dropdown-label-margin-bottom)}.spot-state-dropdown__select{width:100%;box-sizing:border-box;border:var(--spot-state-dropdown-select-border);border-radius:var(--spot-state-dropdown-select-border-radius);padding:var(--spot-state-dropdown-select-padding);font-size:var(--spot-state-dropdown-select-font-size);font-family:var(--spot-font-family);color:var(--spot-font-color);background-color:var(--spot-state-dropdown-select-background);cursor:pointer;-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}.spot-state-dropdown__select:focus{outline:none;box-shadow:0 0 0 2px #00000026}.spot-state-dropdown__select--error{border-color:var(--spot-state-dropdown-error-color)}.spot-state-dropdown__select--error:focus{box-shadow:0 0 0 2px #ff000026}.spot-state-dropdown__error{display:none;color:var(--spot-state-dropdown-error-color);font-size:var(--spot-state-dropdown-error-font-size);font-family:var(--spot-font-family);margin-top:var(--spot-state-dropdown-error-margin-top)}.spot-state-dropdown__error--visible{display:block}input[type=radio]{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:.75rem;height:.75rem;min-width:.75rem;border:.0625rem solid var(--spot-radio-border);border-radius:var(--spot-radio-border-radius);margin-right:.5rem;position:relative;vertical-align:middle;top:-.0625rem;cursor:pointer;flex-shrink:0}input[type=radio]:checked{background:var(--spot-radio-checked-background);box-shadow:inset 0 0 0 .0625rem #fff}.spot-selection__wrapper{max-width:26rem}.spot-selection__options{display:flex;flex-direction:column;gap:var(--spot-selection-options-gap)}.spot-selection__option{display:flex;align-items:center;flex-wrap:nowrap;position:relative;transition:background .2s;cursor:pointer;font-size:var(--spot-radio-text-font-size);font-weight:var(--spot-radio-text-font-weight);color:var(--spot-radio-text-font-color);font-family:var(--spot-radio-text-font-family);padding:var(--spot-radio-text-padding);margin-right:.5rem}.spot-selection__option.selected{background:var(--spot-radio-selection-background);border-radius:var(--spot-radio-selection-border-radius);padding:var(--spot-radio-selection-padding)}.spot-selection__recommended-tag{background:var(--spot-recommended-tag-background);color:var(--spot-recommended-tag-font-color);font-size:var(--spot-recommended-tag-font-size);font-weight:var(--spot-recommended-tag-font-weight);padding:var(--spot-recommended-tag-padding);border-radius:var(--spot-recommended-tag-border-radius);margin-left:.75rem;white-space:nowrap;flex-shrink:0}@media (max-width: 850px){.spot-selection__recommended-tag{margin-left:.5rem}}@media (max-width: 600px){.spot-selection__recommended-tag{margin-left:.5rem;font-size:.75rem;padding:.1875rem .4375rem}}.spot-selection__error{color:var(--spot-selection-error-font-color);font-size:var(--spot-selection-error-font-size);padding:var(--spot-selection-error-padding);display:none}.spot-selection__options--disabled .spot-selection__option{opacity:.4;cursor:not-allowed;pointer-events:none}.spot-selection__options--disabled input[type=radio]{cursor:not-allowed}.spot-payment-terms__wrapper{margin-top:1rem;max-width:26rem}.spot-payment-terms__header{font-weight:var(--spot-payment-terms-header-font-weight);margin-bottom:var(--spot-payment-terms-header-margin-bottom);padding:var(--spot-payment-terms-header-padding);font-size:var(--spot-payment-terms-header-font-size);border-bottom:1px solid var(--spot-payment-terms-header-border-color)}.spot-payment-terms{background-color:var(--spot-payment-terms-background);border-radius:var(--spot-payment-terms-border-radius);padding:var(--spot-payment-terms-padding);color:var(--spot-payment-terms-font-color);font-size:var(--spot-payment-terms-font-size)}.spot-footer__terms{margin-top:.625rem;margin-right:.25rem;font-size:var(--spot-terms-font-size);font-weight:var(--spot-terms-font-weight);color:var(--spot-terms-font-color);font-family:var(--spot-terms-font-family);padding:var(--spot-terms-padding);line-height:1.4;word-wrap:normal;-webkit-hyphens:none;hyphens:none;flex:1;min-width:0;overflow-wrap:normal}.spot-footer__terms-link{text-decoration:var(--spot-terms-link-text-decoration);font-size:var(--spot-terms-link-font-size);font-weight:var(--spot-terms-link-font-weight);color:var(--spot-terms-link-font-color);font-family:var(--spot-terms-link-font-family);padding:var(--spot-terms-link-padding)}.spot-footer__container{display:flex;flex-direction:row;justify-content:space-between;align-items:flex-start;flex-wrap:nowrap;gap:var(--spot-footer-gap)}@container (max-width: 650px){.spot-footer__container{flex-direction:column!important;align-items:flex-start!important;flex-wrap:wrap!important}.spot-footer__terms{margin-right:0!important;margin-bottom:.5rem!important;flex:none!important;width:100%!important;max-width:none!important}}@media (max-width: 650px){.spot-footer__container{flex-direction:column!important;align-items:flex-start!important;flex-wrap:wrap!important}.spot-footer__terms{margin-right:0!important;margin-bottom:.5rem!important;flex:none!important;width:100%!important;max-width:none!important}}.spot-footer__powered-by{margin-top:0;flex-shrink:0}.spot-logo__top-right{position:absolute;top:-14px;right:5%;z-index:10;background:linear-gradient(to bottom,transparent 50%,inherit 50%);padding:0 .25rem}.spot-logo__top-right svg{border-radius:9999px;overflow:hidden;border:var(--spot-border-line-width) solid var(--spot-border-color);display:block;background:var(--spot-logo-background-color)}@container (min-width: 651px){.spot-footer__powered-by{margin-top:0;align-self:center}.spot-footer__terms{margin-right:var(--spot-footer-terms-margin-right)}}@media (min-width: 651px){.spot-footer__powered-by{margin-top:0;align-self:center}.spot-footer__terms{margin-right:var(--spot-footer-terms-margin-right)}}";
670
674
  function K(c) {
671
- const t = document.createElement("style");
672
- t.textContent = c, document.head.appendChild(t);
675
+ const e = document.createElement("style");
676
+ e.textContent = c, document.head.appendChild(e);
673
677
  }
674
678
  K(G);
675
- const R = {
679
+ const D = {
676
680
  sandbox: "https://api.sandbox.getspot.com/api/v1/quote",
677
681
  production: "https://api.getspot.com/api/v1/quote",
678
682
  local: "http://localhost:3999/api/v1/quote"
679
683
  };
680
684
  class X {
681
- constructor(t = {}) {
682
- this._destroyed = !1, this.options = {
685
+ constructor(e = {}) {
686
+ this._destroyed = !1, this._internationalBlocked = !1, this._residencyRequestId = 0, this._residencyFetchPending = !1, this.options = {
683
687
  location: "body",
684
688
  showTable: !0,
685
689
  logoPosition: "top-right",
@@ -687,114 +691,116 @@ class X {
687
691
  quoteRequestData: {},
688
692
  callbacks: {},
689
693
  useMockData: !1,
690
- ...t,
691
- selection: t.selection ?? w.UNSELECTED
694
+ ...e,
695
+ selection: e.selection ?? w.UNSELECTED
692
696
  }, this._onResize = this._updateLayout.bind(this), this.root = typeof this.options.location == "string" ? document.querySelector(this.options.location) : this.options.location, this.currentSelection = this.options.selection, this._init();
693
697
  }
694
698
  async _init() {
695
- var t, r, s, a, n;
699
+ var e, o, s, a, p;
696
700
  try {
697
701
  M(this.options), this.currentState = this.options.state;
698
- let o;
702
+ let r;
699
703
  if (this.options.useMockData && this.options.mockData)
700
- o = this.options.mockData;
704
+ r = this.options.mockData;
701
705
  else {
702
- const { environment: e, partnerId: l } = this.options.apiConfig, f = this.options.apiConfig.customEndpoint || R[e];
703
- o = "items" in this.options.quoteRequestData ? await T(
704
- f,
705
- l,
706
+ const { environment: t, partnerId: i } = this.options.apiConfig, m = this.options.apiConfig.customEndpoint || D[t];
707
+ r = "items" in this.options.quoteRequestData ? await x(
708
+ m,
709
+ i,
706
710
  this.options.quoteRequestData,
707
- this._validState()
708
- ) : await S(
709
- f,
710
- l,
711
+ this._validState(),
712
+ this._computeIsUSResident(this.currentState)
713
+ ) : await k(
714
+ m,
715
+ i,
711
716
  this.options.quoteRequestData,
712
- this._validState()
717
+ this._validState(),
718
+ this._computeIsUSResident(this.currentState)
713
719
  );
714
720
  }
715
721
  if (this._destroyed) return;
716
- if (o.status !== "QUOTE_AVAILABLE") {
717
- o.status === "NO_MATCHING_QUOTE" && ((t = this.options.callbacks) != null && t.noMatchingQuote) && this.options.callbacks.noMatchingQuote({
722
+ if (r.status !== "QUOTE_AVAILABLE") {
723
+ r.status === "NO_MATCHING_QUOTE" && ((e = this.options.callbacks) != null && e.noMatchingQuote) && this.options.callbacks.noMatchingQuote({
718
724
  status: "NO_MATCHING_QUOTE",
719
725
  data: this.options.quoteRequestData
720
726
  });
721
727
  return;
722
728
  }
723
- if (this.quote = o.data, !this.quote)
729
+ if (this.quote = r.data, !this.quote)
724
730
  throw new Error("No quote data in response");
725
- if (this._renderWidget(), this.options.selection === w.YES && ((r = this.options.callbacks) != null && r.onOptIn)) {
726
- const e = {
731
+ if (this._renderWidget(), this.options.selection === w.YES && ((o = this.options.callbacks) != null && o.onOptIn)) {
732
+ const t = {
727
733
  status: "QUOTE_ACCEPTED",
728
734
  spotPrice: this.quote.spotPrice,
729
735
  quoteId: this.quote.id,
730
736
  state: this._validState()
731
737
  };
732
738
  if (this.quote.originalQuotes && this.quote.originalQuotes.length > 0) {
733
- const l = this.options.quoteRequestData;
734
- e.batchQuoteDetails = this.quote.originalQuotes.map((m) => {
735
- var h;
736
- const f = (h = l.items) == null ? void 0 : h.find(
737
- (g) => (g.cartItemId || `item-${l.items.indexOf(g) + 1}`) === m.cartItemId
739
+ const i = this.options.quoteRequestData;
740
+ t.batchQuoteDetails = this.quote.originalQuotes.map((h) => {
741
+ var f;
742
+ const m = (f = i.items) == null ? void 0 : f.find(
743
+ (g) => (g.cartItemId || `item-${i.items.indexOf(g) + 1}`) === h.cartItemId
738
744
  );
739
745
  return {
740
- quoteId: m.id,
741
- productPrice: (f == null ? void 0 : f.productPrice) || m.spotPrice,
742
- cartItemId: (f == null ? void 0 : f.cartItemId) || ""
746
+ quoteId: h.id,
747
+ productPrice: (m == null ? void 0 : m.productPrice) || h.spotPrice,
748
+ cartItemId: (m == null ? void 0 : m.cartItemId) || ""
743
749
  };
744
750
  });
745
751
  }
746
- this.options.callbacks.onOptIn(e);
752
+ this.options.callbacks.onOptIn(t);
747
753
  }
748
754
  if ((s = this.options.callbacks) != null && s.onQuoteRetrieved) {
749
- const e = this.options.callbacks.onQuoteRetrieved(this.quote);
750
- e && this._applyQuoteUpdates(e);
755
+ const t = this.options.callbacks.onQuoteRetrieved(this.quote);
756
+ t && this._applyQuoteUpdates(t);
751
757
  }
752
- } catch (o) {
758
+ } catch (r) {
753
759
  if (this._destroyed) return;
754
760
  if ((a = this.options.callbacks) != null && a.onError) {
755
- const e = o;
756
- (n = this.options.callbacks) == null || n.onError({
757
- message: e.message,
758
- status: e.status,
759
- responseBody: e.responseBody
761
+ const t = r;
762
+ (p = this.options.callbacks) == null || p.onError({
763
+ message: t.message,
764
+ status: t.status,
765
+ responseBody: t.responseBody
760
766
  });
761
767
  }
762
768
  }
763
769
  }
764
770
  _renderWidget() {
765
771
  if (!this.quote) return;
766
- this.container = document.createElement("div"), this.container.className = "spot-refund-guarantee", this.root.appendChild(this.container), Object.entries(this.options.theme || {}).forEach(([o, e]) => {
767
- const l = `--${o}`;
768
- this.container.style.setProperty(l, e);
772
+ this.container = document.createElement("div"), this.container.className = "spot-refund-guarantee", this.root.appendChild(this.container), Object.entries(this.options.theme || {}).forEach(([r, t]) => {
773
+ const i = `--${r}`;
774
+ this.container.style.setProperty(i, t);
769
775
  }), $(this.container, this.quote.communication);
770
- const t = document.createElement("div");
771
- if (t.className = "spot-content__wrapper", this.container.appendChild(t), this.quote.qualifyingReasons ? Q(t, this.quote.qualifyingReasons) : V(t, this.quote.communication.bulletPoints), this.quote.coveredItems) {
772
- const o = this._getTotalItemsInRequest();
773
- U(t, this.quote.coveredItems, o);
776
+ const e = document.createElement("div");
777
+ if (e.className = "spot-content__wrapper", this.container.appendChild(e), this.quote.qualifyingReasons ? V(e, this.quote.qualifyingReasons) : U(e, this.quote.communication.bulletPoints), this.quote.coveredItems) {
778
+ const r = this._getTotalItemsInRequest();
779
+ Q(e, this.quote.coveredItems, r);
774
780
  }
775
- this.options.showTable && !this.quote.qualifyingReasons && j(t, this.quote.payoutSchedule, this.quote.currencyCode);
776
- const r = i("div", {
781
+ this.options.showTable && !this.quote.qualifyingReasons && F(e, this.quote.payoutSchedule, this.quote.currencyCode);
782
+ const o = n("div", {
777
783
  className: "spot-selection__wrapper",
778
- parent: t
784
+ parent: e
779
785
  });
780
- this._isPassOrTrip() && !this.options.state && (this._stateSelectEl = F(r, this.currentState), this._setNonUsResidentError(this.currentState === E));
781
- const a = !this._isQuotingAvailable(), n = W(
782
- r,
786
+ this._isPassOrTrip() && !this.options.state && (this._stateSelectEl = j(o, this.currentState), this._setNonUsResidentError(this._shouldShowNonUsError()));
787
+ const a = !this._isQuotingAvailable(), p = W(
788
+ o,
783
789
  this.currentSelection,
784
790
  this.quote.communication,
785
791
  a
786
792
  );
787
- this.paymentTermsEl = i("div", {
793
+ this.paymentTermsEl = n("div", {
788
794
  className: "spot-payment-terms__wrapper",
789
- parent: t
790
- }), this.currentSelection === w.YES && H(this.paymentTermsEl, this.quote), Y(this.container, this.quote, this.options.logoPosition), window.addEventListener("resize", this._onResize), this._setupResizeObserver(), this._updateLayout(), this._setupOptionListeners(n), this._setupStateDropdownListener();
795
+ parent: e
796
+ }), this.currentSelection === w.YES && A(this.paymentTermsEl, this.quote), Y(this.container, this.quote, this.options.logoPosition), window.addEventListener("resize", this._onResize), this._setupResizeObserver(), this._updateLayout(), this._setupOptionListeners(p), this._setupStateDropdownListener();
791
797
  }
792
798
  _updateLayout() {
793
799
  if (!this.container || !this.quote) return;
794
- const t = this.container.querySelector(
800
+ const e = this.container.querySelector(
795
801
  ".spot-content__wrapper"
796
802
  );
797
- t == null || t.classList.remove("desktop-layout");
803
+ e == null || e.classList.remove("desktop-layout");
798
804
  }
799
805
  _setupResizeObserver() {
800
806
  !this.container || !window.ResizeObserver || (this._resizeObserver = new ResizeObserver(() => {
@@ -806,64 +812,138 @@ class X {
806
812
  _getTotalItemsInRequest() {
807
813
  return "items" in this.options.quoteRequestData ? this.options.quoteRequestData.items.length : 1;
808
814
  }
809
- _applyQuoteUpdates(t) {
810
- !this.quote || !this.container || (t.spotPriceWithFees !== void 0 && (this.quote.communication.yesOptionText = this.quote.communication.yesOptionText.replace(
815
+ _applyQuoteUpdates(e) {
816
+ !this.quote || !this.container || (e.spotPriceWithFees !== void 0 && (this.quote.communication.yesOptionText = this.quote.communication.yesOptionText.replace(
811
817
  `$${this.quote.spotPrice.toFixed(2)}`,
812
- `$${t.spotPriceWithFees.toFixed(2)}`
818
+ `$${e.spotPriceWithFees.toFixed(2)}`
813
819
  )), this._teardownDom(), this._renderWidget());
814
820
  }
815
- _isPassOrTrip() {
816
- const t = this.options.quoteRequestData;
817
- if (Array.isArray(t))
818
- return t.some((s) => s.productType === "Pass" || s.productType === "Trip");
819
- if ("items" in t)
820
- return t.items.some(
821
+ _isPassOrTrip(e = this.options.quoteRequestData) {
822
+ if (Array.isArray(e))
823
+ return e.some((s) => s.productType === "Pass" || s.productType === "Trip");
824
+ if ("items" in e)
825
+ return e.items.some(
821
826
  (s) => s.productType === "Pass" || s.productType === "Trip"
822
827
  );
823
- const r = t;
824
- return r.productType === "Pass" || r.productType === "Trip";
828
+ const o = e;
829
+ return o.productType === "Pass" || o.productType === "Trip";
825
830
  }
826
- _validState() {
827
- if (this._isPassOrTrip() && !(!this.currentState || this.currentState === E))
831
+ // `data` lets updateQuote reason about the request it's switching to (Registration → Trip or
832
+ // vice versa) instead of the one currently on the widget — otherwise a shape change would
833
+ // drop state/residency from the first fetch of the new request.
834
+ _validState(e) {
835
+ if (this._isPassOrTrip(e) && !(!this.currentState || this.currentState === E))
828
836
  return this.currentState;
829
837
  }
838
+ // Mirrors the backend's `isUSResident` DTO field. Undefined when no residency has been
839
+ // declared (no partner-provided state and nothing picked yet), so the server stays free
840
+ // to pick either an international-friendly or US-only offer.
841
+ _computeIsUSResident(e, o) {
842
+ if (this._isPassOrTrip(o) && e)
843
+ return e !== E;
844
+ }
830
845
  _isQuotingAvailable() {
831
- return !this._isPassOrTrip() || this.options.state ? !0 : !!this.currentState && this.currentState !== E;
832
- }
833
- _setRadiosDisabled(t) {
834
- var a, n, o;
835
- const r = (a = this.container) == null ? void 0 : a.querySelectorAll('input[name="selection"]'), s = (n = this.container) == null ? void 0 : n.querySelector(".spot-selection__options");
836
- r == null || r.forEach((e) => {
837
- e.disabled = t;
838
- }), s == null || s.classList.toggle("spot-selection__options--disabled", t), t && (r == null || r.forEach((e) => {
839
- e.checked = !1;
840
- }), (o = this.container) == null || o.querySelectorAll(".spot-selection__option").forEach((e) => {
841
- e.classList.remove("selected");
846
+ return !this._isPassOrTrip() || this.options.state ? !0 : !(!this.currentState || this.currentState === E && this._internationalBlocked);
847
+ }
848
+ _shouldShowNonUsError() {
849
+ return this.currentState === E && this._internationalBlocked;
850
+ }
851
+ _setRadiosDisabled(e) {
852
+ var a, p, r;
853
+ const o = (a = this.container) == null ? void 0 : a.querySelectorAll('input[name="selection"]'), s = (p = this.container) == null ? void 0 : p.querySelector(".spot-selection__options");
854
+ o == null || o.forEach((t) => {
855
+ t.disabled = e;
856
+ }), s == null || s.classList.toggle("spot-selection__options--disabled", e), e && (o == null || o.forEach((t) => {
857
+ t.checked = !1;
858
+ }), (r = this.container) == null || r.querySelectorAll(".spot-selection__option").forEach((t) => {
859
+ t.classList.remove("selected");
842
860
  }), this.currentSelection = w.UNSELECTED, this.paymentTermsEl && (this.paymentTermsEl.innerHTML = ""));
843
861
  }
844
- _setNonUsResidentError(t) {
862
+ _setNonUsResidentError(e) {
845
863
  var s;
846
864
  if (!this._stateSelectEl) return;
847
- this._stateSelectEl.classList.toggle("spot-state-dropdown__select--error", t);
848
- const r = (s = this._stateSelectEl.parentElement) == null ? void 0 : s.querySelector(
865
+ this._stateSelectEl.classList.toggle("spot-state-dropdown__select--error", e);
866
+ const o = (s = this._stateSelectEl.parentElement) == null ? void 0 : s.querySelector(
849
867
  ".spot-state-dropdown__error"
850
868
  );
851
- r == null || r.classList.toggle("spot-state-dropdown__error--visible", t);
869
+ o == null || o.classList.toggle("spot-state-dropdown__error--visible", e);
852
870
  }
853
871
  _setupStateDropdownListener() {
854
872
  this._stateSelectEl && this._stateSelectEl.addEventListener("change", () => {
855
- this.currentState = this._stateSelectEl.value, this._setRadiosDisabled(!this._isQuotingAvailable()), this._setNonUsResidentError(this.currentState === E);
873
+ const e = this._computeIsUSResident(this.currentState);
874
+ this.currentState = this._stateSelectEl.value;
875
+ const o = this._computeIsUSResident(this.currentState);
876
+ if (e === !1 || o === !1) {
877
+ this._setRadiosDisabled(!0), this._refetchForResidencyChange(o);
878
+ return;
879
+ }
880
+ this._setRadiosDisabled(this._residencyFetchPending || !this._isQuotingAvailable()), this._setNonUsResidentError(this._shouldShowNonUsError());
856
881
  });
857
882
  }
858
- _setupOptionListeners(t) {
859
- const r = t.querySelectorAll(
883
+ async _refetchForResidencyChange(e) {
884
+ var s, a, p, r;
885
+ const o = ++this._residencyRequestId;
886
+ this._residencyFetchPending = !0;
887
+ try {
888
+ let t;
889
+ if (this.options.useMockData) {
890
+ const i = this.options.mockRefetchData ?? this.options.mockData;
891
+ t = await (typeof i == "function" ? i(e) : i);
892
+ } else {
893
+ const { environment: i, partnerId: h, customEndpoint: m } = this.options.apiConfig, f = m || D[i];
894
+ t = "items" in this.options.quoteRequestData ? await x(
895
+ f,
896
+ h,
897
+ this.options.quoteRequestData,
898
+ this._validState(),
899
+ e
900
+ ) : await k(
901
+ f,
902
+ h,
903
+ this.options.quoteRequestData,
904
+ this._validState(),
905
+ e
906
+ );
907
+ }
908
+ if (this._destroyed || o !== this._residencyRequestId) return;
909
+ if (t.status === "QUOTE_AVAILABLE" && t.data) {
910
+ const i = t.data;
911
+ if (this._internationalBlocked = !1, this.quote = i, this.currentSelection = w.UNSELECTED, this._teardownDom(), this._renderWidget(), (s = this.options.callbacks) != null && s.onQuoteRetrieved) {
912
+ const h = this.options.callbacks.onQuoteRetrieved(i);
913
+ h && this._applyQuoteUpdates(h);
914
+ }
915
+ return;
916
+ }
917
+ if (e === !1) {
918
+ this._internationalBlocked = !0, this._setRadiosDisabled(!0), this._setNonUsResidentError(!0);
919
+ return;
920
+ }
921
+ this._teardownDom(), (a = this.options.callbacks) != null && a.noMatchingQuote && this.options.callbacks.noMatchingQuote({
922
+ status: "NO_MATCHING_QUOTE",
923
+ data: this.options.quoteRequestData
924
+ });
925
+ } catch (t) {
926
+ if (this._destroyed || o !== this._residencyRequestId) return;
927
+ this.currentSelection = w.UNSELECTED, this._teardownDom();
928
+ const i = t;
929
+ (r = (p = this.options.callbacks) == null ? void 0 : p.onError) == null || r.call(p, {
930
+ message: i.message,
931
+ status: i.status,
932
+ responseBody: i.responseBody
933
+ });
934
+ } finally {
935
+ o === this._residencyRequestId && (this._residencyFetchPending = !1);
936
+ }
937
+ }
938
+ _setupOptionListeners(e) {
939
+ const o = e.querySelectorAll(
860
940
  'input[type="radio"]'
861
- ), s = t.querySelectorAll(".spot-selection__option");
862
- r.forEach((a) => {
863
- a.addEventListener("change", (n) => {
864
- var l, m, f, h;
865
- const o = n.target, e = o.value;
866
- if (this.hideSelectionError(), this.currentSelection = e, s.forEach((g) => g.classList.remove("selected")), (l = o.closest(".spot-selection__option")) == null || l.classList.add("selected"), this.paymentTermsEl && (this.paymentTermsEl.innerHTML = ""), e === w.YES && ((m = this.quote) != null && m.communication.paymentTerms && H(this.paymentTermsEl, this.quote), (f = this.options.callbacks) != null && f.onOptIn)) {
941
+ ), s = e.querySelectorAll(".spot-selection__option");
942
+ o.forEach((a) => {
943
+ a.addEventListener("change", (p) => {
944
+ var i, h, m, f;
945
+ const r = p.target, t = r.value;
946
+ if (this.hideSelectionError(), this.currentSelection = t, s.forEach((g) => g.classList.remove("selected")), (i = r.closest(".spot-selection__option")) == null || i.classList.add("selected"), this.paymentTermsEl && (this.paymentTermsEl.innerHTML = ""), t === w.YES && ((h = this.quote) != null && h.communication.paymentTerms && A(this.paymentTermsEl, this.quote), (m = this.options.callbacks) != null && m.onOptIn)) {
867
947
  const g = {
868
948
  status: "QUOTE_ACCEPTED",
869
949
  spotPrice: this.quote.spotPrice,
@@ -871,12 +951,12 @@ class X {
871
951
  state: this._validState()
872
952
  };
873
953
  if (this.quote.originalQuotes && this.quote.originalQuotes.length > 0) {
874
- const p = this.options.quoteRequestData;
954
+ const l = this.options.quoteRequestData;
875
955
  g.batchQuoteDetails = this.quote.originalQuotes.map(
876
956
  (u) => {
877
- var b;
878
- const d = (b = p.items) == null ? void 0 : b.find(
879
- (_) => (_.cartItemId || `item-${p.items.indexOf(_) + 1}`) === u.cartItemId
957
+ var _;
958
+ const d = (_ = l.items) == null ? void 0 : _.find(
959
+ (b) => (b.cartItemId || `item-${l.items.indexOf(b) + 1}`) === u.cartItemId
880
960
  );
881
961
  return {
882
962
  quoteId: u.id,
@@ -888,19 +968,19 @@ class X {
888
968
  }
889
969
  this.options.callbacks.onOptIn(g);
890
970
  }
891
- if (e === w.NO && ((h = this.options.callbacks) != null && h.onOptOut)) {
971
+ if (t === w.NO && ((f = this.options.callbacks) != null && f.onOptOut)) {
892
972
  const g = {
893
973
  status: "QUOTE_DECLINED",
894
974
  quoteId: this.quote.id,
895
975
  state: this._validState()
896
976
  };
897
977
  if (this.quote.originalQuotes && this.quote.originalQuotes.length > 0) {
898
- const p = this.options.quoteRequestData;
978
+ const l = this.options.quoteRequestData;
899
979
  g.batchQuoteDetails = this.quote.originalQuotes.map(
900
980
  (u) => {
901
- var b;
902
- const d = (b = p.items) == null ? void 0 : b.find(
903
- (_) => (_.cartItemId || `item-${p.items.indexOf(_) + 1}`) === u.cartItemId
981
+ var _;
982
+ const d = (_ = l.items) == null ? void 0 : _.find(
983
+ (b) => (b.cartItemId || `item-${l.items.indexOf(b) + 1}`) === u.cartItemId
904
984
  );
905
985
  return {
906
986
  quoteId: u.id,
@@ -916,13 +996,13 @@ class X {
916
996
  });
917
997
  }
918
998
  showSelectionError() {
919
- var t;
999
+ var e;
920
1000
  if (!this.errorEl) {
921
1001
  this.errorEl = document.createElement("div"), this.errorEl.className = "spot-selection__error", this.errorEl.textContent = "Please make a selection";
922
- const r = (t = this.container) == null ? void 0 : t.querySelector(
1002
+ const o = (e = this.container) == null ? void 0 : e.querySelector(
923
1003
  ".spot-selection__options"
924
1004
  );
925
- r && r.insertAdjacentElement("afterend", this.errorEl);
1005
+ o && o.insertAdjacentElement("afterend", this.errorEl);
926
1006
  }
927
1007
  this.errorEl.style.display = "block";
928
1008
  }
@@ -931,77 +1011,80 @@ class X {
931
1011
  }
932
1012
  validateSelection() {
933
1013
  if (!this.container) return !1;
934
- const t = !!this.container.querySelector(
1014
+ const e = !!this.container.querySelector(
935
1015
  'input[name="selection"]:checked'
936
1016
  );
937
- return t ? this.hideSelectionError() : this.showSelectionError(), t;
1017
+ return e ? this.hideSelectionError() : this.showSelectionError(), e;
938
1018
  }
939
- async updateQuote(t) {
940
- var r, s, a, n;
1019
+ async updateQuote(e) {
1020
+ var o, s, a, p;
941
1021
  if (this._destroyed) return !1;
1022
+ ++this._residencyRequestId, this._residencyFetchPending = !1;
942
1023
  try {
943
- const o = {
1024
+ const r = {
944
1025
  ...this.options,
945
- quoteRequestData: t
1026
+ quoteRequestData: e
946
1027
  };
947
- M(o);
948
- const { environment: e, partnerId: l, customEndpoint: m } = this.options.apiConfig, f = m || R[e], g = "items" in o.quoteRequestData ? await T(
949
- f,
950
- l,
951
- o.quoteRequestData,
952
- this._validState()
953
- ) : await S(
954
- f,
955
- l,
956
- o.quoteRequestData,
957
- this._validState()
1028
+ M(r);
1029
+ const { environment: t, partnerId: i, customEndpoint: h } = this.options.apiConfig, m = h || D[t], g = "items" in r.quoteRequestData ? await x(
1030
+ m,
1031
+ i,
1032
+ r.quoteRequestData,
1033
+ this._validState(r.quoteRequestData),
1034
+ this._computeIsUSResident(this.currentState, r.quoteRequestData)
1035
+ ) : await k(
1036
+ m,
1037
+ i,
1038
+ r.quoteRequestData,
1039
+ this._validState(r.quoteRequestData),
1040
+ this._computeIsUSResident(this.currentState, r.quoteRequestData)
958
1041
  );
959
1042
  if (this._destroyed) return !1;
960
1043
  if (g.status !== "QUOTE_AVAILABLE")
961
- return this._teardownDom(), g.status === "NO_MATCHING_QUOTE" && ((r = this.options.callbacks) != null && r.noMatchingQuote) && this.options.callbacks.noMatchingQuote({
1044
+ return g.status === "NO_MATCHING_QUOTE" && this._computeIsUSResident(this.currentState, r.quoteRequestData) === !1 ? (this.options.quoteRequestData = r.quoteRequestData, this._internationalBlocked = !0, this._setRadiosDisabled(!0), this._setNonUsResidentError(!0), !1) : (this._teardownDom(), g.status === "NO_MATCHING_QUOTE" && ((o = this.options.callbacks) != null && o.noMatchingQuote) && this.options.callbacks.noMatchingQuote({
962
1045
  status: "NO_MATCHING_QUOTE",
963
- data: o.quoteRequestData
964
- }), !1;
965
- if (this.options.quoteRequestData = o.quoteRequestData, this.quote = g.data, this._teardownDom(), this._renderWidget(), (s = this.options.callbacks) != null && s.onQuoteRetrieved) {
966
- const p = this.options.callbacks.onQuoteRetrieved(this.quote);
967
- p && this._applyQuoteUpdates(p);
1046
+ data: r.quoteRequestData
1047
+ }), !1);
1048
+ if (this.options.quoteRequestData = r.quoteRequestData, this.quote = g.data, this._internationalBlocked = !1, this._teardownDom(), this._renderWidget(), (s = this.options.callbacks) != null && s.onQuoteRetrieved) {
1049
+ const l = this.options.callbacks.onQuoteRetrieved(this.quote);
1050
+ l && this._applyQuoteUpdates(l);
968
1051
  }
969
1052
  return !0;
970
- } catch (o) {
1053
+ } catch (r) {
971
1054
  if (this._destroyed) return !1;
972
- const e = o;
973
- return (n = (a = this.options.callbacks) == null ? void 0 : a.onError) == null || n.call(a, {
974
- message: e.message,
975
- status: e.status,
976
- responseBody: e.responseBody
1055
+ const t = r;
1056
+ return (p = (a = this.options.callbacks) == null ? void 0 : a.onError) == null || p.call(a, {
1057
+ message: t.message,
1058
+ status: t.status,
1059
+ responseBody: t.responseBody
977
1060
  }), !1;
978
1061
  }
979
1062
  }
980
1063
  getSelection() {
981
- var r, s, a;
1064
+ var o, s, a;
982
1065
  if (this.currentSelection == null || this.currentSelection == w.UNSELECTED) return null;
983
- const t = {
1066
+ const e = {
984
1067
  selection: this.currentSelection,
985
- quoteId: (r = this.quote) == null ? void 0 : r.id,
1068
+ quoteId: (o = this.quote) == null ? void 0 : o.id,
986
1069
  spotPrice: (s = this.quote) == null ? void 0 : s.spotPrice,
987
1070
  status: this.currentSelection === w.YES ? "QUOTE_ACCEPTED" : "QUOTE_DECLINED",
988
1071
  state: this.currentState
989
1072
  };
990
1073
  if ((a = this.quote) != null && a.originalQuotes && this.quote.originalQuotes.length > 0) {
991
- const n = this.options.quoteRequestData;
992
- t.batchQuoteDetails = this.quote.originalQuotes.map((o) => {
993
- var l;
994
- const e = (l = n.items) == null ? void 0 : l.find(
995
- (m) => (m.cartItemId || `item-${n.items.indexOf(m) + 1}`) === o.cartItemId
1074
+ const p = this.options.quoteRequestData;
1075
+ e.batchQuoteDetails = this.quote.originalQuotes.map((r) => {
1076
+ var i;
1077
+ const t = (i = p.items) == null ? void 0 : i.find(
1078
+ (h) => (h.cartItemId || `item-${p.items.indexOf(h) + 1}`) === r.cartItemId
996
1079
  );
997
1080
  return {
998
- quoteId: o.id,
999
- productPrice: (e == null ? void 0 : e.productPrice) || o.spotPrice,
1000
- cartItemId: (e == null ? void 0 : e.cartItemId) || ""
1081
+ quoteId: r.id,
1082
+ productPrice: (t == null ? void 0 : t.productPrice) || r.spotPrice,
1083
+ cartItemId: (t == null ? void 0 : t.cartItemId) || ""
1001
1084
  };
1002
1085
  });
1003
1086
  }
1004
- return t;
1087
+ return e;
1005
1088
  }
1006
1089
  destroy() {
1007
1090
  this._destroyed = !0, this._teardownDom();