@opendoor/partner-sdk-client-react 1.3.1-beta.108.1 → 1.3.2-beta.109.1
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.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import xt, { createContext as
|
|
1
|
+
import xt, { createContext as Ue, useState as S, useEffect as se, useContext as Ae, useRef as G, useMemo as Ee, useCallback as Se, useLayoutEffect as Gt } from "react";
|
|
2
2
|
import { createPortal as Ut } from "react-dom";
|
|
3
|
-
var
|
|
3
|
+
var Ge = { exports: {} }, Ne = {};
|
|
4
4
|
/*
|
|
5
5
|
object-assign
|
|
6
6
|
(c) Sindre Sorhus
|
|
7
7
|
@license MIT
|
|
8
8
|
*/
|
|
9
|
-
var Fe,
|
|
9
|
+
var Fe, ot;
|
|
10
10
|
function Ct() {
|
|
11
|
-
if (
|
|
12
|
-
|
|
11
|
+
if (ot) return Fe;
|
|
12
|
+
ot = 1;
|
|
13
13
|
var e = Object.getOwnPropertySymbols, r = Object.prototype.hasOwnProperty, a = Object.prototype.propertyIsEnumerable;
|
|
14
14
|
function s(i) {
|
|
15
15
|
if (i == null)
|
|
@@ -60,24 +60,24 @@ function Ct() {
|
|
|
60
60
|
* This source code is licensed under the MIT license found in the
|
|
61
61
|
* LICENSE file in the root directory of this source tree.
|
|
62
62
|
*/
|
|
63
|
-
var
|
|
63
|
+
var it;
|
|
64
64
|
function Yt() {
|
|
65
|
-
if (
|
|
66
|
-
|
|
65
|
+
if (it) return Ne;
|
|
66
|
+
it = 1, Ct();
|
|
67
67
|
var e = xt, r = 60103;
|
|
68
|
-
if (
|
|
68
|
+
if (Ne.Fragment = 60107, typeof Symbol == "function" && Symbol.for) {
|
|
69
69
|
var a = Symbol.for;
|
|
70
|
-
r = a("react.element"),
|
|
70
|
+
r = a("react.element"), Ne.Fragment = a("react.fragment");
|
|
71
71
|
}
|
|
72
72
|
var s = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, o = Object.prototype.hasOwnProperty, i = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
73
73
|
function _(f, u, h) {
|
|
74
|
-
var d, m = {}, g = null,
|
|
75
|
-
h !== void 0 && (g = "" + h), u.key !== void 0 && (g = "" + u.key), u.ref !== void 0 && (
|
|
74
|
+
var d, m = {}, g = null, C = null;
|
|
75
|
+
h !== void 0 && (g = "" + h), u.key !== void 0 && (g = "" + u.key), u.ref !== void 0 && (C = u.ref);
|
|
76
76
|
for (d in u) o.call(u, d) && !i.hasOwnProperty(d) && (m[d] = u[d]);
|
|
77
77
|
if (f && f.defaultProps) for (d in u = f.defaultProps, u) m[d] === void 0 && (m[d] = u[d]);
|
|
78
|
-
return { $$typeof: r, type: f, key: g, ref:
|
|
78
|
+
return { $$typeof: r, type: f, key: g, ref: C, props: m, _owner: s.current };
|
|
79
79
|
}
|
|
80
|
-
return
|
|
80
|
+
return Ne.jsx = _, Ne.jsxs = _, Ne;
|
|
81
81
|
}
|
|
82
82
|
var We = {};
|
|
83
83
|
/** @license React v17.0.2
|
|
@@ -88,57 +88,57 @@ var We = {};
|
|
|
88
88
|
* This source code is licensed under the MIT license found in the
|
|
89
89
|
* LICENSE file in the root directory of this source tree.
|
|
90
90
|
*/
|
|
91
|
-
var
|
|
91
|
+
var lt;
|
|
92
92
|
function Zt() {
|
|
93
|
-
return
|
|
93
|
+
return lt || (lt = 1, function(e) {
|
|
94
94
|
process.env.NODE_ENV !== "production" && function() {
|
|
95
95
|
var r = xt, a = Ct(), s = 60103, o = 60106;
|
|
96
96
|
e.Fragment = 60107;
|
|
97
|
-
var i = 60108, _ = 60114, f = 60109, u = 60110, h = 60112, d = 60113, m = 60120, g = 60115,
|
|
97
|
+
var i = 60108, _ = 60114, f = 60109, u = 60110, h = 60112, d = 60113, m = 60120, g = 60115, C = 60116, E = 60121, k = 60122, H = 60117, P = 60129, Y = 60131;
|
|
98
98
|
if (typeof Symbol == "function" && Symbol.for) {
|
|
99
99
|
var j = Symbol.for;
|
|
100
|
-
s = j("react.element"), o = j("react.portal"), e.Fragment = j("react.fragment"), i = j("react.strict_mode"), _ = j("react.profiler"), f = j("react.provider"), u = j("react.context"), h = j("react.forward_ref"), d = j("react.suspense"), m = j("react.suspense_list"), g = j("react.memo"),
|
|
100
|
+
s = j("react.element"), o = j("react.portal"), e.Fragment = j("react.fragment"), i = j("react.strict_mode"), _ = j("react.profiler"), f = j("react.provider"), u = j("react.context"), h = j("react.forward_ref"), d = j("react.suspense"), m = j("react.suspense_list"), g = j("react.memo"), C = j("react.lazy"), E = j("react.block"), k = j("react.server.block"), H = j("react.fundamental"), j("react.scope"), j("react.opaque.id"), P = j("react.debug_trace_mode"), j("react.offscreen"), Y = j("react.legacy_hidden");
|
|
101
101
|
}
|
|
102
|
-
var ne = typeof Symbol == "function" && Symbol.iterator,
|
|
103
|
-
function
|
|
102
|
+
var ne = typeof Symbol == "function" && Symbol.iterator, $ = "@@iterator";
|
|
103
|
+
function oe(n) {
|
|
104
104
|
if (n === null || typeof n != "object")
|
|
105
105
|
return null;
|
|
106
|
-
var c = ne && n[ne] || n[
|
|
106
|
+
var c = ne && n[ne] || n[$];
|
|
107
107
|
return typeof c == "function" ? c : null;
|
|
108
108
|
}
|
|
109
|
-
var
|
|
110
|
-
function
|
|
109
|
+
var U = r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
110
|
+
function D(n) {
|
|
111
111
|
{
|
|
112
|
-
for (var c = arguments.length, b = new Array(c > 1 ? c - 1 : 0),
|
|
113
|
-
b[
|
|
114
|
-
|
|
112
|
+
for (var c = arguments.length, b = new Array(c > 1 ? c - 1 : 0), I = 1; I < c; I++)
|
|
113
|
+
b[I - 1] = arguments[I];
|
|
114
|
+
F("error", n, b);
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
|
-
function
|
|
117
|
+
function F(n, c, b) {
|
|
118
118
|
{
|
|
119
|
-
var
|
|
120
|
-
|
|
121
|
-
var
|
|
122
|
-
return "" +
|
|
119
|
+
var I = U.ReactDebugCurrentFrame, V = I.getStackAddendum();
|
|
120
|
+
V !== "" && (c += "%s", b = b.concat([V]));
|
|
121
|
+
var W = b.map(function(A) {
|
|
122
|
+
return "" + A;
|
|
123
123
|
});
|
|
124
|
-
|
|
124
|
+
W.unshift("Warning: " + c), Function.prototype.apply.call(console[n], console, W);
|
|
125
125
|
}
|
|
126
126
|
}
|
|
127
127
|
var Z = !1;
|
|
128
128
|
function ae(n) {
|
|
129
|
-
return !!(typeof n == "string" || typeof n == "function" || n === e.Fragment || n === _ || n === P || n === i || n === d || n === m || n === Y || Z || typeof n == "object" && n !== null && (n.$$typeof ===
|
|
129
|
+
return !!(typeof n == "string" || typeof n == "function" || n === e.Fragment || n === _ || n === P || n === i || n === d || n === m || n === Y || Z || typeof n == "object" && n !== null && (n.$$typeof === C || n.$$typeof === g || n.$$typeof === f || n.$$typeof === u || n.$$typeof === h || n.$$typeof === H || n.$$typeof === E || n[0] === k));
|
|
130
130
|
}
|
|
131
131
|
function z(n, c, b) {
|
|
132
|
-
var
|
|
133
|
-
return n.displayName || (
|
|
132
|
+
var I = c.displayName || c.name || "";
|
|
133
|
+
return n.displayName || (I !== "" ? b + "(" + I + ")" : b);
|
|
134
134
|
}
|
|
135
135
|
function K(n) {
|
|
136
136
|
return n.displayName || "Context";
|
|
137
137
|
}
|
|
138
|
-
function
|
|
138
|
+
function q(n) {
|
|
139
139
|
if (n == null)
|
|
140
140
|
return null;
|
|
141
|
-
if (typeof n.tag == "number" &&
|
|
141
|
+
if (typeof n.tag == "number" && D("Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."), typeof n == "function")
|
|
142
142
|
return n.displayName || n.name || null;
|
|
143
143
|
if (typeof n == "string")
|
|
144
144
|
return n;
|
|
@@ -167,13 +167,13 @@ function Zt() {
|
|
|
167
167
|
case h:
|
|
168
168
|
return z(n, n.render, "ForwardRef");
|
|
169
169
|
case g:
|
|
170
|
-
return
|
|
170
|
+
return q(n.type);
|
|
171
171
|
case E:
|
|
172
|
-
return
|
|
173
|
-
case
|
|
174
|
-
var
|
|
172
|
+
return q(n._render);
|
|
173
|
+
case C: {
|
|
174
|
+
var I = n, V = I._payload, W = I._init;
|
|
175
175
|
try {
|
|
176
|
-
return
|
|
176
|
+
return q(W(V));
|
|
177
177
|
} catch {
|
|
178
178
|
return null;
|
|
179
179
|
}
|
|
@@ -181,14 +181,14 @@ function Zt() {
|
|
|
181
181
|
}
|
|
182
182
|
return null;
|
|
183
183
|
}
|
|
184
|
-
var
|
|
184
|
+
var ie = 0, ue, v, x, y, R, J, ye;
|
|
185
185
|
function he() {
|
|
186
186
|
}
|
|
187
187
|
he.__reactDisabledLog = !0;
|
|
188
|
-
function
|
|
188
|
+
function me() {
|
|
189
189
|
{
|
|
190
|
-
if (
|
|
191
|
-
ue = console.log,
|
|
190
|
+
if (ie === 0) {
|
|
191
|
+
ue = console.log, v = console.info, x = console.warn, y = console.error, R = console.group, J = console.groupCollapsed, ye = console.groupEnd;
|
|
192
192
|
var n = {
|
|
193
193
|
configurable: !0,
|
|
194
194
|
enumerable: !0,
|
|
@@ -205,12 +205,12 @@ function Zt() {
|
|
|
205
205
|
groupEnd: n
|
|
206
206
|
});
|
|
207
207
|
}
|
|
208
|
-
|
|
208
|
+
ie++;
|
|
209
209
|
}
|
|
210
210
|
}
|
|
211
|
-
function
|
|
211
|
+
function pe() {
|
|
212
212
|
{
|
|
213
|
-
if (
|
|
213
|
+
if (ie--, ie === 0) {
|
|
214
214
|
var n = {
|
|
215
215
|
configurable: !0,
|
|
216
216
|
enumerable: !0,
|
|
@@ -221,120 +221,120 @@ function Zt() {
|
|
|
221
221
|
value: ue
|
|
222
222
|
}),
|
|
223
223
|
info: a({}, n, {
|
|
224
|
-
value:
|
|
224
|
+
value: v
|
|
225
225
|
}),
|
|
226
226
|
warn: a({}, n, {
|
|
227
|
-
value:
|
|
227
|
+
value: x
|
|
228
228
|
}),
|
|
229
229
|
error: a({}, n, {
|
|
230
|
-
value:
|
|
230
|
+
value: y
|
|
231
231
|
}),
|
|
232
232
|
group: a({}, n, {
|
|
233
|
-
value:
|
|
233
|
+
value: R
|
|
234
234
|
}),
|
|
235
235
|
groupCollapsed: a({}, n, {
|
|
236
|
-
value:
|
|
236
|
+
value: J
|
|
237
237
|
}),
|
|
238
238
|
groupEnd: a({}, n, {
|
|
239
|
-
value:
|
|
239
|
+
value: ye
|
|
240
240
|
})
|
|
241
241
|
});
|
|
242
242
|
}
|
|
243
|
-
|
|
243
|
+
ie < 0 && D("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
244
244
|
}
|
|
245
245
|
}
|
|
246
|
-
var
|
|
247
|
-
function
|
|
246
|
+
var N = U.ReactCurrentDispatcher, L;
|
|
247
|
+
function B(n, c, b) {
|
|
248
248
|
{
|
|
249
|
-
if (
|
|
249
|
+
if (L === void 0)
|
|
250
250
|
try {
|
|
251
251
|
throw Error();
|
|
252
|
-
} catch (
|
|
253
|
-
var
|
|
254
|
-
|
|
252
|
+
} catch (V) {
|
|
253
|
+
var I = V.stack.trim().match(/\n( *(at )?)/);
|
|
254
|
+
L = I && I[1] || "";
|
|
255
255
|
}
|
|
256
256
|
return `
|
|
257
|
-
` +
|
|
257
|
+
` + L + n;
|
|
258
258
|
}
|
|
259
259
|
}
|
|
260
|
-
var
|
|
260
|
+
var M = !1, le;
|
|
261
261
|
{
|
|
262
|
-
var
|
|
263
|
-
|
|
262
|
+
var xe = typeof WeakMap == "function" ? WeakMap : Map;
|
|
263
|
+
le = new xe();
|
|
264
264
|
}
|
|
265
|
-
function
|
|
266
|
-
if (!n ||
|
|
265
|
+
function ge(n, c) {
|
|
266
|
+
if (!n || M)
|
|
267
267
|
return "";
|
|
268
268
|
{
|
|
269
|
-
var b =
|
|
269
|
+
var b = le.get(n);
|
|
270
270
|
if (b !== void 0)
|
|
271
271
|
return b;
|
|
272
272
|
}
|
|
273
|
-
var
|
|
274
|
-
|
|
275
|
-
var
|
|
273
|
+
var I;
|
|
274
|
+
M = !0;
|
|
275
|
+
var V = Error.prepareStackTrace;
|
|
276
276
|
Error.prepareStackTrace = void 0;
|
|
277
|
-
var
|
|
278
|
-
|
|
277
|
+
var W;
|
|
278
|
+
W = N.current, N.current = null, me();
|
|
279
279
|
try {
|
|
280
280
|
if (c) {
|
|
281
|
-
var
|
|
281
|
+
var A = function() {
|
|
282
282
|
throw Error();
|
|
283
283
|
};
|
|
284
|
-
if (Object.defineProperty(
|
|
284
|
+
if (Object.defineProperty(A.prototype, "props", {
|
|
285
285
|
set: function() {
|
|
286
286
|
throw Error();
|
|
287
287
|
}
|
|
288
288
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
289
289
|
try {
|
|
290
|
-
Reflect.construct(
|
|
290
|
+
Reflect.construct(A, []);
|
|
291
291
|
} catch (be) {
|
|
292
|
-
|
|
292
|
+
I = be;
|
|
293
293
|
}
|
|
294
|
-
Reflect.construct(n, [],
|
|
294
|
+
Reflect.construct(n, [], A);
|
|
295
295
|
} else {
|
|
296
296
|
try {
|
|
297
|
-
|
|
297
|
+
A.call();
|
|
298
298
|
} catch (be) {
|
|
299
|
-
|
|
299
|
+
I = be;
|
|
300
300
|
}
|
|
301
|
-
n.call(
|
|
301
|
+
n.call(A.prototype);
|
|
302
302
|
}
|
|
303
303
|
} else {
|
|
304
304
|
try {
|
|
305
305
|
throw Error();
|
|
306
306
|
} catch (be) {
|
|
307
|
-
|
|
307
|
+
I = be;
|
|
308
308
|
}
|
|
309
309
|
n();
|
|
310
310
|
}
|
|
311
311
|
} catch (be) {
|
|
312
|
-
if (be &&
|
|
313
|
-
for (var
|
|
314
|
-
`), ce =
|
|
315
|
-
`),
|
|
312
|
+
if (be && I && typeof be.stack == "string") {
|
|
313
|
+
for (var T = be.stack.split(`
|
|
314
|
+
`), ce = I.stack.split(`
|
|
315
|
+
`), Q = T.length - 1, te = ce.length - 1; Q >= 1 && te >= 0 && T[Q] !== ce[te]; )
|
|
316
316
|
te--;
|
|
317
|
-
for (;
|
|
318
|
-
if (
|
|
319
|
-
if (
|
|
317
|
+
for (; Q >= 1 && te >= 0; Q--, te--)
|
|
318
|
+
if (T[Q] !== ce[te]) {
|
|
319
|
+
if (Q !== 1 || te !== 1)
|
|
320
320
|
do
|
|
321
|
-
if (
|
|
321
|
+
if (Q--, te--, te < 0 || T[Q] !== ce[te]) {
|
|
322
322
|
var _e = `
|
|
323
|
-
` +
|
|
324
|
-
return typeof n == "function" &&
|
|
323
|
+
` + T[Q].replace(" at new ", " at ");
|
|
324
|
+
return typeof n == "function" && le.set(n, _e), _e;
|
|
325
325
|
}
|
|
326
|
-
while (
|
|
326
|
+
while (Q >= 1 && te >= 0);
|
|
327
327
|
break;
|
|
328
328
|
}
|
|
329
329
|
}
|
|
330
330
|
} finally {
|
|
331
|
-
|
|
331
|
+
M = !1, N.current = W, pe(), Error.prepareStackTrace = V;
|
|
332
332
|
}
|
|
333
|
-
var
|
|
334
|
-
return typeof n == "function" &&
|
|
333
|
+
var je = n ? n.displayName || n.name : "", st = je ? B(je) : "";
|
|
334
|
+
return typeof n == "function" && le.set(n, st), st;
|
|
335
335
|
}
|
|
336
|
-
function
|
|
337
|
-
return
|
|
336
|
+
function Le(n, c, b) {
|
|
337
|
+
return ge(n, !1);
|
|
338
338
|
}
|
|
339
339
|
function ve(n) {
|
|
340
340
|
var c = n.prototype;
|
|
@@ -344,66 +344,66 @@ function Zt() {
|
|
|
344
344
|
if (n == null)
|
|
345
345
|
return "";
|
|
346
346
|
if (typeof n == "function")
|
|
347
|
-
return
|
|
347
|
+
return ge(n, ve(n));
|
|
348
348
|
if (typeof n == "string")
|
|
349
|
-
return
|
|
349
|
+
return B(n);
|
|
350
350
|
switch (n) {
|
|
351
351
|
case d:
|
|
352
|
-
return
|
|
352
|
+
return B("Suspense");
|
|
353
353
|
case m:
|
|
354
|
-
return
|
|
354
|
+
return B("SuspenseList");
|
|
355
355
|
}
|
|
356
356
|
if (typeof n == "object")
|
|
357
357
|
switch (n.$$typeof) {
|
|
358
358
|
case h:
|
|
359
|
-
return
|
|
359
|
+
return Le(n.render);
|
|
360
360
|
case g:
|
|
361
361
|
return w(n.type, c, b);
|
|
362
362
|
case E:
|
|
363
|
-
return
|
|
364
|
-
case
|
|
365
|
-
var
|
|
363
|
+
return Le(n._render);
|
|
364
|
+
case C: {
|
|
365
|
+
var I = n, V = I._payload, W = I._init;
|
|
366
366
|
try {
|
|
367
|
-
return w(
|
|
367
|
+
return w(W(V), c, b);
|
|
368
368
|
} catch {
|
|
369
369
|
}
|
|
370
370
|
}
|
|
371
371
|
}
|
|
372
372
|
return "";
|
|
373
373
|
}
|
|
374
|
-
var
|
|
375
|
-
function
|
|
374
|
+
var X = {}, ee = U.ReactDebugCurrentFrame;
|
|
375
|
+
function Ce(n) {
|
|
376
376
|
if (n) {
|
|
377
377
|
var c = n._owner, b = w(n.type, n._source, c ? c.type : null);
|
|
378
378
|
ee.setExtraStackFrame(b);
|
|
379
379
|
} else
|
|
380
380
|
ee.setExtraStackFrame(null);
|
|
381
381
|
}
|
|
382
|
-
function
|
|
382
|
+
function we(n, c, b, I, V) {
|
|
383
383
|
{
|
|
384
|
-
var
|
|
385
|
-
for (var
|
|
386
|
-
if (
|
|
387
|
-
var
|
|
384
|
+
var W = Function.call.bind(Object.prototype.hasOwnProperty);
|
|
385
|
+
for (var A in n)
|
|
386
|
+
if (W(n, A)) {
|
|
387
|
+
var T = void 0;
|
|
388
388
|
try {
|
|
389
|
-
if (typeof n[
|
|
390
|
-
var ce = Error((
|
|
389
|
+
if (typeof n[A] != "function") {
|
|
390
|
+
var ce = Error((I || "React class") + ": " + b + " type `" + A + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof n[A] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
391
391
|
throw ce.name = "Invariant Violation", ce;
|
|
392
392
|
}
|
|
393
|
-
|
|
394
|
-
} catch (
|
|
395
|
-
|
|
393
|
+
T = n[A](c, A, I, b, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
394
|
+
} catch (Q) {
|
|
395
|
+
T = Q;
|
|
396
396
|
}
|
|
397
|
-
|
|
397
|
+
T && !(T instanceof Error) && (Ce(V), D("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", I || "React class", b, A, typeof T), Ce(null)), T instanceof Error && !(T.message in X) && (X[T.message] = !0, Ce(V), D("Failed %s type: %s", b, T.message), Ce(null));
|
|
398
398
|
}
|
|
399
399
|
}
|
|
400
400
|
}
|
|
401
|
-
var
|
|
401
|
+
var Ie = U.ReactCurrentOwner, Re = Object.prototype.hasOwnProperty, St = {
|
|
402
402
|
key: !0,
|
|
403
403
|
ref: !0,
|
|
404
404
|
__self: !0,
|
|
405
405
|
__source: !0
|
|
406
|
-
},
|
|
406
|
+
}, Je, Xe;
|
|
407
407
|
function Pt(n) {
|
|
408
408
|
if (Re.call(n, "ref")) {
|
|
409
409
|
var c = Object.getOwnPropertyDescriptor(n, "ref").get;
|
|
@@ -421,12 +421,12 @@ function Zt() {
|
|
|
421
421
|
return n.key !== void 0;
|
|
422
422
|
}
|
|
423
423
|
function Tt(n, c) {
|
|
424
|
-
typeof n.ref == "string" &&
|
|
424
|
+
typeof n.ref == "string" && Ie.current;
|
|
425
425
|
}
|
|
426
426
|
function Dt(n, c) {
|
|
427
427
|
{
|
|
428
428
|
var b = function() {
|
|
429
|
-
|
|
429
|
+
Je || (Je = !0, D("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", c));
|
|
430
430
|
};
|
|
431
431
|
b.isReactWarning = !0, Object.defineProperty(n, "key", {
|
|
432
432
|
get: b,
|
|
@@ -437,7 +437,7 @@ function Zt() {
|
|
|
437
437
|
function At(n, c) {
|
|
438
438
|
{
|
|
439
439
|
var b = function() {
|
|
440
|
-
|
|
440
|
+
Xe || (Xe = !0, D("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", c));
|
|
441
441
|
};
|
|
442
442
|
b.isReactWarning = !0, Object.defineProperty(n, "ref", {
|
|
443
443
|
get: b,
|
|
@@ -445,70 +445,70 @@ function Zt() {
|
|
|
445
445
|
});
|
|
446
446
|
}
|
|
447
447
|
}
|
|
448
|
-
var Ot = function(n, c, b,
|
|
449
|
-
var
|
|
448
|
+
var Ot = function(n, c, b, I, V, W, A) {
|
|
449
|
+
var T = {
|
|
450
450
|
// This tag allows us to uniquely identify this as a React Element
|
|
451
451
|
$$typeof: s,
|
|
452
452
|
// Built-in properties that belong on the element
|
|
453
453
|
type: n,
|
|
454
454
|
key: c,
|
|
455
455
|
ref: b,
|
|
456
|
-
props:
|
|
456
|
+
props: A,
|
|
457
457
|
// Record the component responsible for creating this element.
|
|
458
|
-
_owner:
|
|
458
|
+
_owner: W
|
|
459
459
|
};
|
|
460
|
-
return
|
|
460
|
+
return T._store = {}, Object.defineProperty(T._store, "validated", {
|
|
461
461
|
configurable: !1,
|
|
462
462
|
enumerable: !1,
|
|
463
463
|
writable: !0,
|
|
464
464
|
value: !1
|
|
465
|
-
}), Object.defineProperty(
|
|
465
|
+
}), Object.defineProperty(T, "_self", {
|
|
466
466
|
configurable: !1,
|
|
467
467
|
enumerable: !1,
|
|
468
468
|
writable: !1,
|
|
469
|
-
value:
|
|
470
|
-
}), Object.defineProperty(
|
|
469
|
+
value: I
|
|
470
|
+
}), Object.defineProperty(T, "_source", {
|
|
471
471
|
configurable: !1,
|
|
472
472
|
enumerable: !1,
|
|
473
473
|
writable: !1,
|
|
474
|
-
value:
|
|
475
|
-
}), Object.freeze && (Object.freeze(
|
|
474
|
+
value: V
|
|
475
|
+
}), Object.freeze && (Object.freeze(T.props), Object.freeze(T)), T;
|
|
476
476
|
};
|
|
477
|
-
function Rt(n, c, b,
|
|
477
|
+
function Rt(n, c, b, I, V) {
|
|
478
478
|
{
|
|
479
|
-
var
|
|
480
|
-
b !== void 0 && (
|
|
481
|
-
for (
|
|
482
|
-
Re.call(c,
|
|
479
|
+
var W, A = {}, T = null, ce = null;
|
|
480
|
+
b !== void 0 && (T = "" + b), Lt(c) && (T = "" + c.key), Pt(c) && (ce = c.ref, Tt(c, V));
|
|
481
|
+
for (W in c)
|
|
482
|
+
Re.call(c, W) && !St.hasOwnProperty(W) && (A[W] = c[W]);
|
|
483
483
|
if (n && n.defaultProps) {
|
|
484
|
-
var
|
|
485
|
-
for (
|
|
486
|
-
|
|
484
|
+
var Q = n.defaultProps;
|
|
485
|
+
for (W in Q)
|
|
486
|
+
A[W] === void 0 && (A[W] = Q[W]);
|
|
487
487
|
}
|
|
488
|
-
if (
|
|
488
|
+
if (T || ce) {
|
|
489
489
|
var te = typeof n == "function" ? n.displayName || n.name || "Unknown" : n;
|
|
490
|
-
|
|
490
|
+
T && Dt(A, te), ce && At(A, te);
|
|
491
491
|
}
|
|
492
|
-
return Ot(n,
|
|
492
|
+
return Ot(n, T, ce, V, I, Ie.current, A);
|
|
493
493
|
}
|
|
494
494
|
}
|
|
495
|
-
var Be =
|
|
496
|
-
function
|
|
495
|
+
var Be = U.ReactCurrentOwner, Qe = U.ReactDebugCurrentFrame;
|
|
496
|
+
function ke(n) {
|
|
497
497
|
if (n) {
|
|
498
498
|
var c = n._owner, b = w(n.type, n._source, c ? c.type : null);
|
|
499
|
-
|
|
499
|
+
Qe.setExtraStackFrame(b);
|
|
500
500
|
} else
|
|
501
|
-
|
|
501
|
+
Qe.setExtraStackFrame(null);
|
|
502
502
|
}
|
|
503
503
|
var Me;
|
|
504
504
|
Me = !1;
|
|
505
505
|
function $e(n) {
|
|
506
506
|
return typeof n == "object" && n !== null && n.$$typeof === s;
|
|
507
507
|
}
|
|
508
|
-
function
|
|
508
|
+
function et() {
|
|
509
509
|
{
|
|
510
510
|
if (Be.current) {
|
|
511
|
-
var n =
|
|
511
|
+
var n = q(Be.current.type);
|
|
512
512
|
if (n)
|
|
513
513
|
return `
|
|
514
514
|
|
|
@@ -520,10 +520,10 @@ Check the render method of \`` + n + "`.";
|
|
|
520
520
|
function Bt(n) {
|
|
521
521
|
return "";
|
|
522
522
|
}
|
|
523
|
-
var
|
|
523
|
+
var tt = {};
|
|
524
524
|
function Mt(n) {
|
|
525
525
|
{
|
|
526
|
-
var c =
|
|
526
|
+
var c = et();
|
|
527
527
|
if (!c) {
|
|
528
528
|
var b = typeof n == "string" ? n : n.displayName || n.name;
|
|
529
529
|
b && (c = `
|
|
@@ -533,35 +533,35 @@ Check the top-level render call using <` + b + ">.");
|
|
|
533
533
|
return c;
|
|
534
534
|
}
|
|
535
535
|
}
|
|
536
|
-
function
|
|
536
|
+
function rt(n, c) {
|
|
537
537
|
{
|
|
538
538
|
if (!n._store || n._store.validated || n.key != null)
|
|
539
539
|
return;
|
|
540
540
|
n._store.validated = !0;
|
|
541
541
|
var b = Mt(c);
|
|
542
|
-
if (
|
|
542
|
+
if (tt[b])
|
|
543
543
|
return;
|
|
544
|
-
|
|
545
|
-
var
|
|
546
|
-
n && n._owner && n._owner !== Be.current && (
|
|
544
|
+
tt[b] = !0;
|
|
545
|
+
var I = "";
|
|
546
|
+
n && n._owner && n._owner !== Be.current && (I = " It was passed a child from " + q(n._owner.type) + "."), ke(n), D('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', b, I), ke(null);
|
|
547
547
|
}
|
|
548
548
|
}
|
|
549
|
-
function
|
|
549
|
+
function nt(n, c) {
|
|
550
550
|
{
|
|
551
551
|
if (typeof n != "object")
|
|
552
552
|
return;
|
|
553
553
|
if (Array.isArray(n))
|
|
554
554
|
for (var b = 0; b < n.length; b++) {
|
|
555
|
-
var
|
|
556
|
-
$e(
|
|
555
|
+
var I = n[b];
|
|
556
|
+
$e(I) && rt(I, c);
|
|
557
557
|
}
|
|
558
558
|
else if ($e(n))
|
|
559
559
|
n._store && (n._store.validated = !0);
|
|
560
560
|
else if (n) {
|
|
561
|
-
var
|
|
562
|
-
if (typeof
|
|
563
|
-
for (var
|
|
564
|
-
$e(
|
|
561
|
+
var V = oe(n);
|
|
562
|
+
if (typeof V == "function" && V !== n.entries)
|
|
563
|
+
for (var W = V.call(n), A; !(A = W.next()).done; )
|
|
564
|
+
$e(A.value) && rt(A.value, c);
|
|
565
565
|
}
|
|
566
566
|
}
|
|
567
567
|
}
|
|
@@ -580,82 +580,82 @@ Check the top-level render call using <` + b + ">.");
|
|
|
580
580
|
else
|
|
581
581
|
return;
|
|
582
582
|
if (b) {
|
|
583
|
-
var
|
|
584
|
-
|
|
583
|
+
var I = q(c);
|
|
584
|
+
we(b, n.props, "prop", I, n);
|
|
585
585
|
} else if (c.PropTypes !== void 0 && !Me) {
|
|
586
586
|
Me = !0;
|
|
587
|
-
var
|
|
588
|
-
|
|
587
|
+
var V = q(c);
|
|
588
|
+
D("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", V || "Unknown");
|
|
589
589
|
}
|
|
590
|
-
typeof c.getDefaultProps == "function" && !c.getDefaultProps.isReactClassApproved &&
|
|
590
|
+
typeof c.getDefaultProps == "function" && !c.getDefaultProps.isReactClassApproved && D("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
591
591
|
}
|
|
592
592
|
}
|
|
593
593
|
function Ft(n) {
|
|
594
594
|
{
|
|
595
595
|
for (var c = Object.keys(n.props), b = 0; b < c.length; b++) {
|
|
596
|
-
var
|
|
597
|
-
if (
|
|
598
|
-
|
|
596
|
+
var I = c[b];
|
|
597
|
+
if (I !== "children" && I !== "key") {
|
|
598
|
+
ke(n), D("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", I), ke(null);
|
|
599
599
|
break;
|
|
600
600
|
}
|
|
601
601
|
}
|
|
602
|
-
n.ref !== null && (
|
|
602
|
+
n.ref !== null && (ke(n), D("Invalid attribute `ref` supplied to `React.Fragment`."), ke(null));
|
|
603
603
|
}
|
|
604
604
|
}
|
|
605
|
-
function
|
|
605
|
+
function at(n, c, b, I, V, W) {
|
|
606
606
|
{
|
|
607
|
-
var
|
|
608
|
-
if (!
|
|
609
|
-
var
|
|
610
|
-
(n === void 0 || typeof n == "object" && n !== null && Object.keys(n).length === 0) && (
|
|
607
|
+
var A = ae(n);
|
|
608
|
+
if (!A) {
|
|
609
|
+
var T = "";
|
|
610
|
+
(n === void 0 || typeof n == "object" && n !== null && Object.keys(n).length === 0) && (T += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
611
611
|
var ce = Bt();
|
|
612
|
-
ce ?
|
|
613
|
-
var
|
|
614
|
-
n === null ?
|
|
612
|
+
ce ? T += ce : T += et();
|
|
613
|
+
var Q;
|
|
614
|
+
n === null ? Q = "null" : Array.isArray(n) ? Q = "array" : n !== void 0 && n.$$typeof === s ? (Q = "<" + (q(n.type) || "Unknown") + " />", T = " Did you accidentally export a JSX literal instead of a component?") : Q = typeof n, D("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", Q, T);
|
|
615
615
|
}
|
|
616
|
-
var te = Rt(n, c, b,
|
|
616
|
+
var te = Rt(n, c, b, V, W);
|
|
617
617
|
if (te == null)
|
|
618
618
|
return te;
|
|
619
|
-
if (
|
|
619
|
+
if (A) {
|
|
620
620
|
var _e = c.children;
|
|
621
621
|
if (_e !== void 0)
|
|
622
|
-
if (
|
|
622
|
+
if (I)
|
|
623
623
|
if (Array.isArray(_e)) {
|
|
624
|
-
for (var
|
|
625
|
-
|
|
624
|
+
for (var je = 0; je < _e.length; je++)
|
|
625
|
+
nt(_e[je], n);
|
|
626
626
|
Object.freeze && Object.freeze(_e);
|
|
627
627
|
} else
|
|
628
|
-
|
|
628
|
+
D("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
629
629
|
else
|
|
630
|
-
|
|
630
|
+
nt(_e, n);
|
|
631
631
|
}
|
|
632
632
|
return n === e.Fragment ? Ft(te) : $t(te), te;
|
|
633
633
|
}
|
|
634
634
|
}
|
|
635
635
|
function Wt(n, c, b) {
|
|
636
|
-
return
|
|
636
|
+
return at(n, c, b, !0);
|
|
637
637
|
}
|
|
638
638
|
function Ht(n, c, b) {
|
|
639
|
-
return
|
|
639
|
+
return at(n, c, b, !1);
|
|
640
640
|
}
|
|
641
641
|
var Vt = Ht, qt = Wt;
|
|
642
642
|
e.jsx = Vt, e.jsxs = qt;
|
|
643
643
|
}();
|
|
644
644
|
}(We)), We;
|
|
645
645
|
}
|
|
646
|
-
process.env.NODE_ENV === "production" ?
|
|
647
|
-
var t =
|
|
646
|
+
process.env.NODE_ENV === "production" ? Ge.exports = Yt() : Ge.exports = Zt();
|
|
647
|
+
var t = Ge.exports;
|
|
648
648
|
const Kt = {
|
|
649
649
|
production: "https://journey.apps.opendoor.com/_journey/api/v1/events",
|
|
650
650
|
staging: "https://journey.apps-staging.opendoor.com/_journey/api/v1/events"
|
|
651
|
-
}, zt = "partner-sdk", Jt = "1.0", Xt = 5e3, Qt = 20, er = 512, tr = 5,
|
|
651
|
+
}, zt = "partner-sdk", Jt = "1.0", Xt = 5e3, Qt = 20, er = 512, tr = 5, ct = 500, ut = "od_sdk_aid";
|
|
652
652
|
function rr() {
|
|
653
653
|
try {
|
|
654
|
-
const e = localStorage.getItem(
|
|
654
|
+
const e = localStorage.getItem(ut);
|
|
655
655
|
if (e)
|
|
656
656
|
return e;
|
|
657
657
|
const r = crypto.randomUUID();
|
|
658
|
-
return localStorage.setItem(
|
|
658
|
+
return localStorage.setItem(ut, r), r;
|
|
659
659
|
} catch {
|
|
660
660
|
return;
|
|
661
661
|
}
|
|
@@ -693,12 +693,12 @@ async function or(e, r) {
|
|
|
693
693
|
if (s.status === 202)
|
|
694
694
|
return;
|
|
695
695
|
if (s.status >= 500 && a >= 1)
|
|
696
|
-
await new Promise((o) => setTimeout(o,
|
|
696
|
+
await new Promise((o) => setTimeout(o, ct)), a--;
|
|
697
697
|
else
|
|
698
698
|
break;
|
|
699
699
|
} catch {
|
|
700
700
|
if (a >= 1)
|
|
701
|
-
await new Promise((s) => setTimeout(s,
|
|
701
|
+
await new Promise((s) => setTimeout(s, ct)), a--;
|
|
702
702
|
else
|
|
703
703
|
break;
|
|
704
704
|
}
|
|
@@ -751,7 +751,7 @@ class ir {
|
|
|
751
751
|
this.buffer.push(JSON.stringify(a)), (this.buffer.length >= Qt || sr(this.buffer)) && this.flush();
|
|
752
752
|
}
|
|
753
753
|
}
|
|
754
|
-
const
|
|
754
|
+
const Ye = {
|
|
755
755
|
trackPlatform() {
|
|
756
756
|
},
|
|
757
757
|
trackSell() {
|
|
@@ -760,36 +760,36 @@ const Ue = {
|
|
|
760
760
|
},
|
|
761
761
|
destroy() {
|
|
762
762
|
}
|
|
763
|
-
},
|
|
763
|
+
}, Ze = Ue(null), wt = Ue(Ye), Do = ({
|
|
764
764
|
client: e,
|
|
765
765
|
children: r
|
|
766
766
|
}) => {
|
|
767
|
-
const [a, s] = S(
|
|
768
|
-
return
|
|
767
|
+
const [a, s] = S(Ye);
|
|
768
|
+
return se(() => {
|
|
769
769
|
const o = new ir(e.environment);
|
|
770
770
|
return s(o), () => {
|
|
771
771
|
o.destroy();
|
|
772
772
|
};
|
|
773
|
-
}, [e]), /* @__PURE__ */ t.jsx(
|
|
773
|
+
}, [e]), /* @__PURE__ */ t.jsx(Ze.Provider, { value: e, children: /* @__PURE__ */ t.jsx(wt.Provider, { value: a, children: r }) });
|
|
774
774
|
}, kt = () => {
|
|
775
|
-
const e =
|
|
775
|
+
const e = Ae(Ze);
|
|
776
776
|
if (!e)
|
|
777
777
|
throw new Error(
|
|
778
778
|
"useOpendoorClient must be used within an <OpendoorProvider>. Wrap your component tree with <OpendoorProvider client={client}>."
|
|
779
779
|
);
|
|
780
780
|
return e;
|
|
781
|
-
},
|
|
781
|
+
}, Ke = () => Ae(wt);
|
|
782
782
|
function jt(e, r = {}) {
|
|
783
|
-
const a =
|
|
783
|
+
const a = Ke(), s = G(a);
|
|
784
784
|
s.current = a;
|
|
785
|
-
const o =
|
|
786
|
-
return
|
|
785
|
+
const o = G(null), i = G(!1);
|
|
786
|
+
return se(() => {
|
|
787
787
|
const _ = o.current;
|
|
788
788
|
if (!_ || !e || i.current) return;
|
|
789
789
|
const f = new IntersectionObserver(
|
|
790
790
|
([u]) => {
|
|
791
791
|
if (u.isIntersecting && !i.current) {
|
|
792
|
-
if (s.current ===
|
|
792
|
+
if (s.current === Ye) return;
|
|
793
793
|
i.current = !0, s.current.trackPlatform({
|
|
794
794
|
inputViewEvent: { targetName: e }
|
|
795
795
|
}), r.immediate && s.current.flush(), f.disconnect();
|
|
@@ -904,7 +904,7 @@ const Ao = [
|
|
|
904
904
|
"homebuilder-details",
|
|
905
905
|
"contact-info"
|
|
906
906
|
];
|
|
907
|
-
function
|
|
907
|
+
function Pe(e) {
|
|
908
908
|
const r = cr(e), a = {};
|
|
909
909
|
for (const [s, o] of Object.entries(r)) {
|
|
910
910
|
const i = s.replace(/([A-Z])/g, "-$1").toLowerCase();
|
|
@@ -912,7 +912,7 @@ function Se(e) {
|
|
|
912
912
|
}
|
|
913
913
|
return a;
|
|
914
914
|
}
|
|
915
|
-
const ur = "_attribution_11y4r_7", dr = "_text_11y4r_16",
|
|
915
|
+
const ur = "_attribution_11y4r_7", dr = "_text_11y4r_16", dt = {
|
|
916
916
|
attribution: ur,
|
|
917
917
|
text: dr
|
|
918
918
|
}, hr = () => /* @__PURE__ */ t.jsx(
|
|
@@ -935,12 +935,12 @@ const ur = "_attribution_11y4r_7", dr = "_text_11y4r_16", ut = {
|
|
|
935
935
|
}
|
|
936
936
|
);
|
|
937
937
|
function fr() {
|
|
938
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
939
|
-
/* @__PURE__ */ t.jsx("span", { className:
|
|
938
|
+
return /* @__PURE__ */ t.jsxs("div", { className: dt.attribution, "data-testid": "od-attribution", children: [
|
|
939
|
+
/* @__PURE__ */ t.jsx("span", { className: dt.text, children: "Powered by" }),
|
|
940
940
|
/* @__PURE__ */ t.jsx(hr, {})
|
|
941
941
|
] });
|
|
942
942
|
}
|
|
943
|
-
const mr = "_container_tu90h_8", pr = "_inputSection_tu90h_16", gr = "_inputWrapper_tu90h_22", _r = "_input_tu90h_16", br = "_inputIcon_tu90h_63", yr = "_button_tu90h_80", vr = "_spinner_tu90h_121", xr = "_suggestions_tu90h_136", Cr = "_errorState_tu90h_150", wr = "_suggestion_tu90h_136", kr = "_error_tu90h_150", jr = "_errorIcon_tu90h_199", Nr = "_errorBorder_tu90h_213", Ir = "_manualLink_tu90h_223", Er = "_manualForm_tu90h_245", Sr = "_manualFormField_tu90h_260", Pr = "_manualFormLabel_tu90h_264", Lr = "_manualFormInput_tu90h_273", Tr = "_formRow_tu90h_294", Dr = "_submitButton_tu90h_302",
|
|
943
|
+
const mr = "_container_tu90h_8", pr = "_inputSection_tu90h_16", gr = "_inputWrapper_tu90h_22", _r = "_input_tu90h_16", br = "_inputIcon_tu90h_63", yr = "_button_tu90h_80", vr = "_spinner_tu90h_121", xr = "_suggestions_tu90h_136", Cr = "_errorState_tu90h_150", wr = "_suggestion_tu90h_136", kr = "_error_tu90h_150", jr = "_errorIcon_tu90h_199", Nr = "_errorBorder_tu90h_213", Ir = "_manualLink_tu90h_223", Er = "_manualForm_tu90h_245", Sr = "_manualFormField_tu90h_260", Pr = "_manualFormLabel_tu90h_264", Lr = "_manualFormInput_tu90h_273", Tr = "_formRow_tu90h_294", Dr = "_submitButton_tu90h_302", O = {
|
|
944
944
|
container: mr,
|
|
945
945
|
inputSection: pr,
|
|
946
946
|
inputWrapper: gr,
|
|
@@ -961,7 +961,7 @@ const mr = "_container_tu90h_8", pr = "_inputSection_tu90h_16", gr = "_inputWrap
|
|
|
961
961
|
manualFormInput: Lr,
|
|
962
962
|
formRow: Tr,
|
|
963
963
|
submitButton: Dr
|
|
964
|
-
},
|
|
964
|
+
}, ht = () => /* @__PURE__ */ t.jsx(
|
|
965
965
|
"svg",
|
|
966
966
|
{
|
|
967
967
|
width: "20",
|
|
@@ -1002,7 +1002,7 @@ const mr = "_container_tu90h_8", pr = "_inputSection_tu90h_16", gr = "_inputWrap
|
|
|
1002
1002
|
]
|
|
1003
1003
|
}
|
|
1004
1004
|
);
|
|
1005
|
-
function
|
|
1005
|
+
function ft(e) {
|
|
1006
1006
|
const r = [e.street1];
|
|
1007
1007
|
return e.street2 && (r[0] += ` ${e.street2}`), r.push(`${e.city}, ${e.state} ${e.postalCode}`), r.join(", ");
|
|
1008
1008
|
}
|
|
@@ -1020,60 +1020,60 @@ function Oo({
|
|
|
1020
1020
|
manualEntryText: d = "Enter address manually instead",
|
|
1021
1021
|
appearance: m,
|
|
1022
1022
|
onReady: g,
|
|
1023
|
-
onChange:
|
|
1023
|
+
onChange: C,
|
|
1024
1024
|
onValidationError: E,
|
|
1025
1025
|
onAddressSuggestionsStart: k,
|
|
1026
|
-
onAddressSuggestionsComplete:
|
|
1026
|
+
onAddressSuggestionsComplete: H,
|
|
1027
1027
|
onError: P
|
|
1028
1028
|
}) {
|
|
1029
|
-
const Y = kt(), j =
|
|
1029
|
+
const Y = kt(), j = Ke(), ne = Pe(m), [$, oe] = S(""), [U, D] = S([]), [F, Z] = S(!1), [ae, z] = S(!1), [K, q] = S(null), [ie, ue] = S(!1), [v, x] = S(!1), [y, R] = S({
|
|
1030
1030
|
street1: "",
|
|
1031
1031
|
street2: "",
|
|
1032
1032
|
city: "",
|
|
1033
1033
|
state: "",
|
|
1034
1034
|
postalCode: ""
|
|
1035
|
-
}),
|
|
1035
|
+
}), J = G(null), ye = jt("partner-sdk-address-input", {
|
|
1036
1036
|
immediate: !0
|
|
1037
|
-
}), he =
|
|
1037
|
+
}), he = G(P);
|
|
1038
1038
|
he.current = P;
|
|
1039
|
-
const
|
|
1040
|
-
|
|
1041
|
-
const
|
|
1042
|
-
|
|
1043
|
-
const
|
|
1044
|
-
|
|
1039
|
+
const me = G(k);
|
|
1040
|
+
me.current = k;
|
|
1041
|
+
const pe = G(H);
|
|
1042
|
+
pe.current = H;
|
|
1043
|
+
const N = G(null), L = F && !ae && $.trim().length >= 3 && U.length === 0 && !v;
|
|
1044
|
+
se(() => {
|
|
1045
1045
|
g == null || g();
|
|
1046
|
-
}, []),
|
|
1047
|
-
if (!r ||
|
|
1048
|
-
|
|
1046
|
+
}, []), se(() => {
|
|
1047
|
+
if (!r || $.trim().length < 3 || ie) {
|
|
1048
|
+
$.trim().length === 0 && (D([]), Z(!1), q(null));
|
|
1049
1049
|
return;
|
|
1050
1050
|
}
|
|
1051
|
-
z(!0),
|
|
1051
|
+
z(!0), q(null);
|
|
1052
1052
|
const w = setTimeout(async () => {
|
|
1053
|
-
var
|
|
1054
|
-
(
|
|
1053
|
+
var X, ee, Ce;
|
|
1054
|
+
(X = me.current) == null || X.call(me, $);
|
|
1055
1055
|
try {
|
|
1056
|
-
const
|
|
1057
|
-
|
|
1058
|
-
} catch (
|
|
1059
|
-
const
|
|
1060
|
-
|
|
1056
|
+
const we = await Y.getAddressSuggestions($);
|
|
1057
|
+
D(we.addresses), Z(!0), (ee = pe.current) == null || ee.call(pe, we.addresses);
|
|
1058
|
+
} catch (we) {
|
|
1059
|
+
const Ie = we instanceof Error ? we : new Error("Failed to fetch address suggestions");
|
|
1060
|
+
q(Ie.message), D([]), Z(!0), (Ce = he.current) == null || Ce.call(he, Ie);
|
|
1061
1061
|
} finally {
|
|
1062
1062
|
z(!1);
|
|
1063
1063
|
}
|
|
1064
1064
|
}, a);
|
|
1065
1065
|
return () => clearTimeout(w);
|
|
1066
|
-
}, [
|
|
1067
|
-
const w = (
|
|
1068
|
-
|
|
1066
|
+
}, [$, ie, r, a, Y]), se(() => {
|
|
1067
|
+
const w = (X) => {
|
|
1068
|
+
N.current && !N.current.contains(X.target) && J.current && !J.current.contains(X.target) && Z(!1);
|
|
1069
1069
|
};
|
|
1070
1070
|
return document.addEventListener("mousedown", w), () => document.removeEventListener("mousedown", w);
|
|
1071
1071
|
}, []);
|
|
1072
|
-
const
|
|
1073
|
-
const
|
|
1074
|
-
|
|
1075
|
-
},
|
|
1076
|
-
ue(!0),
|
|
1072
|
+
const B = (w) => {
|
|
1073
|
+
const X = w.target.value;
|
|
1074
|
+
oe(X), ue(!1), C == null || C({ street1: X });
|
|
1075
|
+
}, M = async (w) => {
|
|
1076
|
+
ue(!0), oe(ft(w)), D([]), Z(!1), q(null), C == null || C(w), j.trackSell({
|
|
1077
1077
|
addressEntryV2: {
|
|
1078
1078
|
street1: w.street1,
|
|
1079
1079
|
city: w.city,
|
|
@@ -1085,41 +1085,41 @@ function Oo({
|
|
|
1085
1085
|
});
|
|
1086
1086
|
try {
|
|
1087
1087
|
await e(w);
|
|
1088
|
-
} catch (
|
|
1089
|
-
const ee =
|
|
1090
|
-
|
|
1088
|
+
} catch (X) {
|
|
1089
|
+
const ee = X instanceof Error ? X : new Error("Failed to process address");
|
|
1090
|
+
q(ee.message), P == null || P(ee), oe(""), ue(!1);
|
|
1091
1091
|
}
|
|
1092
|
-
},
|
|
1092
|
+
}, le = () => {
|
|
1093
1093
|
j.trackPlatform({
|
|
1094
1094
|
inputFocusEvent: { targetName: "partner-sdk-address-input" }
|
|
1095
|
-
}),
|
|
1096
|
-
},
|
|
1095
|
+
}), U.length > 0 && $.length > 0 && Z(!0);
|
|
1096
|
+
}, xe = () => {
|
|
1097
1097
|
j.trackPlatform({
|
|
1098
1098
|
linkClickEvent: { targetName: "partner-sdk-manual-entry" }
|
|
1099
|
-
}),
|
|
1100
|
-
},
|
|
1101
|
-
const ee = { ...
|
|
1102
|
-
|
|
1099
|
+
}), x(!0), Z(!1);
|
|
1100
|
+
}, ge = (w, X) => {
|
|
1101
|
+
const ee = { ...y, [w]: X };
|
|
1102
|
+
R(ee), C == null || C({
|
|
1103
1103
|
street1: ee.street1,
|
|
1104
1104
|
...ee.street2 ? { street2: ee.street2 } : {},
|
|
1105
1105
|
city: ee.city,
|
|
1106
1106
|
state: ee.state,
|
|
1107
1107
|
postalCode: ee.postalCode
|
|
1108
1108
|
});
|
|
1109
|
-
},
|
|
1110
|
-
if (!
|
|
1109
|
+
}, Le = async () => {
|
|
1110
|
+
if (!y.street1 || !y.city || !y.state || !y.postalCode) {
|
|
1111
1111
|
const w = "Please fill in all required fields";
|
|
1112
|
-
|
|
1112
|
+
q(w), E == null || E(w);
|
|
1113
1113
|
return;
|
|
1114
1114
|
}
|
|
1115
|
-
z(!0),
|
|
1115
|
+
z(!0), q(null);
|
|
1116
1116
|
try {
|
|
1117
1117
|
const w = {
|
|
1118
|
-
street1:
|
|
1119
|
-
...
|
|
1120
|
-
city:
|
|
1121
|
-
state:
|
|
1122
|
-
postalCode:
|
|
1118
|
+
street1: y.street1,
|
|
1119
|
+
...y.street2 ? { street2: y.street2 } : {},
|
|
1120
|
+
city: y.city,
|
|
1121
|
+
state: y.state,
|
|
1122
|
+
postalCode: y.postalCode
|
|
1123
1123
|
};
|
|
1124
1124
|
j.trackSell({
|
|
1125
1125
|
addressEntryV2: {
|
|
@@ -1132,86 +1132,86 @@ function Oo({
|
|
|
1132
1132
|
}
|
|
1133
1133
|
}), await e(w);
|
|
1134
1134
|
} catch (w) {
|
|
1135
|
-
const
|
|
1136
|
-
|
|
1135
|
+
const X = w instanceof Error ? w : new Error("Failed to submit address");
|
|
1136
|
+
q(X.message), P == null || P(X);
|
|
1137
1137
|
} finally {
|
|
1138
1138
|
z(!1);
|
|
1139
1139
|
}
|
|
1140
1140
|
}, ve = !!K;
|
|
1141
|
-
return /* @__PURE__ */ t.jsxs("div", { ref:
|
|
1142
|
-
|
|
1143
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1144
|
-
/* @__PURE__ */ t.jsx("label", { className:
|
|
1141
|
+
return /* @__PURE__ */ t.jsxs("div", { ref: ye, className: O.container, style: ne, children: [
|
|
1142
|
+
v ? /* @__PURE__ */ t.jsxs("div", { className: O.manualForm, children: [
|
|
1143
|
+
/* @__PURE__ */ t.jsxs("div", { className: O.manualFormField, children: [
|
|
1144
|
+
/* @__PURE__ */ t.jsx("label", { className: O.manualFormLabel, htmlFor: "ae-street1", children: "Street Address *" }),
|
|
1145
1145
|
/* @__PURE__ */ t.jsx(
|
|
1146
1146
|
"input",
|
|
1147
1147
|
{
|
|
1148
1148
|
id: "ae-street1",
|
|
1149
1149
|
type: "text",
|
|
1150
|
-
className:
|
|
1151
|
-
value:
|
|
1152
|
-
onChange: (w) =>
|
|
1150
|
+
className: O.manualFormInput,
|
|
1151
|
+
value: y.street1,
|
|
1152
|
+
onChange: (w) => ge("street1", w.target.value),
|
|
1153
1153
|
disabled: o,
|
|
1154
1154
|
placeholder: "123 Main St"
|
|
1155
1155
|
}
|
|
1156
1156
|
)
|
|
1157
1157
|
] }),
|
|
1158
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1159
|
-
/* @__PURE__ */ t.jsx("label", { className:
|
|
1158
|
+
/* @__PURE__ */ t.jsxs("div", { className: O.manualFormField, children: [
|
|
1159
|
+
/* @__PURE__ */ t.jsx("label", { className: O.manualFormLabel, htmlFor: "ae-street2", children: "Unit / Apt (optional)" }),
|
|
1160
1160
|
/* @__PURE__ */ t.jsx(
|
|
1161
1161
|
"input",
|
|
1162
1162
|
{
|
|
1163
1163
|
id: "ae-street2",
|
|
1164
1164
|
type: "text",
|
|
1165
|
-
className:
|
|
1166
|
-
value:
|
|
1167
|
-
onChange: (w) =>
|
|
1165
|
+
className: O.manualFormInput,
|
|
1166
|
+
value: y.street2,
|
|
1167
|
+
onChange: (w) => ge("street2", w.target.value),
|
|
1168
1168
|
disabled: o,
|
|
1169
1169
|
placeholder: "Apt 4B"
|
|
1170
1170
|
}
|
|
1171
1171
|
)
|
|
1172
1172
|
] }),
|
|
1173
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1174
|
-
/* @__PURE__ */ t.jsx("label", { className:
|
|
1173
|
+
/* @__PURE__ */ t.jsxs("div", { className: O.manualFormField, children: [
|
|
1174
|
+
/* @__PURE__ */ t.jsx("label", { className: O.manualFormLabel, htmlFor: "ae-city", children: "City *" }),
|
|
1175
1175
|
/* @__PURE__ */ t.jsx(
|
|
1176
1176
|
"input",
|
|
1177
1177
|
{
|
|
1178
1178
|
id: "ae-city",
|
|
1179
1179
|
type: "text",
|
|
1180
|
-
className:
|
|
1181
|
-
value:
|
|
1182
|
-
onChange: (w) =>
|
|
1180
|
+
className: O.manualFormInput,
|
|
1181
|
+
value: y.city,
|
|
1182
|
+
onChange: (w) => ge("city", w.target.value),
|
|
1183
1183
|
disabled: o,
|
|
1184
1184
|
placeholder: "Austin"
|
|
1185
1185
|
}
|
|
1186
1186
|
)
|
|
1187
1187
|
] }),
|
|
1188
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1189
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1190
|
-
/* @__PURE__ */ t.jsx("label", { className:
|
|
1188
|
+
/* @__PURE__ */ t.jsxs("div", { className: O.formRow, children: [
|
|
1189
|
+
/* @__PURE__ */ t.jsxs("div", { className: O.manualFormField, children: [
|
|
1190
|
+
/* @__PURE__ */ t.jsx("label", { className: O.manualFormLabel, htmlFor: "ae-state", children: "State *" }),
|
|
1191
1191
|
/* @__PURE__ */ t.jsx(
|
|
1192
1192
|
"input",
|
|
1193
1193
|
{
|
|
1194
1194
|
id: "ae-state",
|
|
1195
1195
|
type: "text",
|
|
1196
|
-
className:
|
|
1197
|
-
value:
|
|
1198
|
-
onChange: (w) =>
|
|
1196
|
+
className: O.manualFormInput,
|
|
1197
|
+
value: y.state,
|
|
1198
|
+
onChange: (w) => ge("state", w.target.value),
|
|
1199
1199
|
disabled: o,
|
|
1200
1200
|
placeholder: "TX",
|
|
1201
1201
|
maxLength: 2
|
|
1202
1202
|
}
|
|
1203
1203
|
)
|
|
1204
1204
|
] }),
|
|
1205
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1206
|
-
/* @__PURE__ */ t.jsx("label", { className:
|
|
1205
|
+
/* @__PURE__ */ t.jsxs("div", { className: O.manualFormField, children: [
|
|
1206
|
+
/* @__PURE__ */ t.jsx("label", { className: O.manualFormLabel, htmlFor: "ae-postalCode", children: "ZIP Code *" }),
|
|
1207
1207
|
/* @__PURE__ */ t.jsx(
|
|
1208
1208
|
"input",
|
|
1209
1209
|
{
|
|
1210
1210
|
id: "ae-postalCode",
|
|
1211
1211
|
type: "text",
|
|
1212
|
-
className:
|
|
1213
|
-
value:
|
|
1214
|
-
onChange: (w) =>
|
|
1212
|
+
className: O.manualFormInput,
|
|
1213
|
+
value: y.postalCode,
|
|
1214
|
+
onChange: (w) => ge("postalCode", w.target.value),
|
|
1215
1215
|
disabled: o,
|
|
1216
1216
|
placeholder: "78701",
|
|
1217
1217
|
maxLength: 5
|
|
@@ -1219,48 +1219,48 @@ function Oo({
|
|
|
1219
1219
|
)
|
|
1220
1220
|
] })
|
|
1221
1221
|
] }),
|
|
1222
|
-
K && /* @__PURE__ */ t.jsx("div", { className:
|
|
1222
|
+
K && /* @__PURE__ */ t.jsx("div", { className: O.error, children: K }),
|
|
1223
1223
|
/* @__PURE__ */ t.jsxs(
|
|
1224
1224
|
"button",
|
|
1225
1225
|
{
|
|
1226
1226
|
type: "button",
|
|
1227
|
-
className:
|
|
1228
|
-
onClick:
|
|
1227
|
+
className: O.submitButton,
|
|
1228
|
+
onClick: Le,
|
|
1229
1229
|
disabled: o,
|
|
1230
1230
|
children: [
|
|
1231
1231
|
/* @__PURE__ */ t.jsx("span", { children: _ }),
|
|
1232
|
-
u || /* @__PURE__ */ t.jsx(
|
|
1232
|
+
u || /* @__PURE__ */ t.jsx(ht, {})
|
|
1233
1233
|
]
|
|
1234
1234
|
}
|
|
1235
1235
|
)
|
|
1236
|
-
] }) : /* @__PURE__ */ t.jsxs("div", { className:
|
|
1236
|
+
] }) : /* @__PURE__ */ t.jsxs("div", { className: O.inputSection, children: [
|
|
1237
1237
|
/* @__PURE__ */ t.jsxs(
|
|
1238
1238
|
"div",
|
|
1239
1239
|
{
|
|
1240
|
-
className: `${
|
|
1240
|
+
className: `${O.inputWrapper} ${ve ? O.errorBorder : ""}`,
|
|
1241
1241
|
children: [
|
|
1242
1242
|
/* @__PURE__ */ t.jsx(
|
|
1243
1243
|
"input",
|
|
1244
1244
|
{
|
|
1245
|
-
ref:
|
|
1245
|
+
ref: J,
|
|
1246
1246
|
type: "text",
|
|
1247
|
-
value:
|
|
1248
|
-
onChange:
|
|
1249
|
-
onFocus:
|
|
1247
|
+
value: $,
|
|
1248
|
+
onChange: B,
|
|
1249
|
+
onFocus: le,
|
|
1250
1250
|
placeholder: i,
|
|
1251
|
-
className:
|
|
1251
|
+
className: O.input,
|
|
1252
1252
|
disabled: o,
|
|
1253
1253
|
"aria-label": "Address input",
|
|
1254
1254
|
"aria-autocomplete": "list",
|
|
1255
1255
|
"aria-controls": "address-suggestions",
|
|
1256
|
-
"aria-expanded":
|
|
1256
|
+
"aria-expanded": F
|
|
1257
1257
|
}
|
|
1258
1258
|
),
|
|
1259
|
-
h && /* @__PURE__ */ t.jsx("div", { className:
|
|
1259
|
+
h && /* @__PURE__ */ t.jsx("div", { className: O.inputIcon, children: h }),
|
|
1260
1260
|
f && /* @__PURE__ */ t.jsx(
|
|
1261
1261
|
"button",
|
|
1262
1262
|
{
|
|
1263
|
-
className:
|
|
1263
|
+
className: O.button,
|
|
1264
1264
|
type: "button",
|
|
1265
1265
|
disabled: o,
|
|
1266
1266
|
"aria-label": _,
|
|
@@ -1269,7 +1269,7 @@ function Oo({
|
|
|
1269
1269
|
/* @__PURE__ */ t.jsxs(
|
|
1270
1270
|
"svg",
|
|
1271
1271
|
{
|
|
1272
|
-
className:
|
|
1272
|
+
className: O.spinner,
|
|
1273
1273
|
width: "20",
|
|
1274
1274
|
height: "20",
|
|
1275
1275
|
viewBox: "0 0 24 24",
|
|
@@ -1301,44 +1301,44 @@ function Oo({
|
|
|
1301
1301
|
)
|
|
1302
1302
|
] }) : /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
1303
1303
|
/* @__PURE__ */ t.jsx("span", { children: _ }),
|
|
1304
|
-
u || /* @__PURE__ */ t.jsx(
|
|
1304
|
+
u || /* @__PURE__ */ t.jsx(ht, {})
|
|
1305
1305
|
] })
|
|
1306
1306
|
}
|
|
1307
1307
|
)
|
|
1308
1308
|
]
|
|
1309
1309
|
}
|
|
1310
1310
|
),
|
|
1311
|
-
(
|
|
1311
|
+
(F || ve) && /* @__PURE__ */ t.jsx(
|
|
1312
1312
|
"div",
|
|
1313
1313
|
{
|
|
1314
|
-
ref:
|
|
1315
|
-
className: `${
|
|
1314
|
+
ref: N,
|
|
1315
|
+
className: `${O.suggestions} ${ve ? O.errorState : ""}`,
|
|
1316
1316
|
id: "address-suggestions",
|
|
1317
|
-
role: ve &&
|
|
1318
|
-
"aria-live": ve &&
|
|
1319
|
-
children: ve ? /* @__PURE__ */ t.jsxs("div", { className:
|
|
1320
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
1317
|
+
role: ve && !F ? "alert" : "listbox",
|
|
1318
|
+
"aria-live": ve && !F ? "polite" : void 0,
|
|
1319
|
+
children: ve ? /* @__PURE__ */ t.jsxs("div", { className: O.error, children: [
|
|
1320
|
+
/* @__PURE__ */ t.jsx("div", { className: O.errorIcon, children: /* @__PURE__ */ t.jsx(Ar, {}) }),
|
|
1321
1321
|
/* @__PURE__ */ t.jsx("div", { children: K })
|
|
1322
|
-
] }) :
|
|
1322
|
+
] }) : U.length > 0 ? U.map((w, X) => /* @__PURE__ */ t.jsx(
|
|
1323
1323
|
"div",
|
|
1324
1324
|
{
|
|
1325
|
-
className:
|
|
1326
|
-
onClick: () =>
|
|
1325
|
+
className: O.suggestion,
|
|
1326
|
+
onClick: () => M(w),
|
|
1327
1327
|
role: "option",
|
|
1328
1328
|
"aria-selected": !1,
|
|
1329
1329
|
tabIndex: 0,
|
|
1330
1330
|
onKeyDown: (ee) => {
|
|
1331
|
-
(ee.key === "Enter" || ee.key === " ") && (ee.preventDefault(),
|
|
1331
|
+
(ee.key === "Enter" || ee.key === " ") && (ee.preventDefault(), M(w));
|
|
1332
1332
|
},
|
|
1333
|
-
children:
|
|
1333
|
+
children: ft(w)
|
|
1334
1334
|
},
|
|
1335
|
-
`${w.street1}-${w.city}-${w.postalCode}-${
|
|
1336
|
-
)) :
|
|
1335
|
+
`${w.street1}-${w.city}-${w.postalCode}-${X}`
|
|
1336
|
+
)) : L && /* @__PURE__ */ t.jsx(
|
|
1337
1337
|
"button",
|
|
1338
1338
|
{
|
|
1339
1339
|
type: "button",
|
|
1340
|
-
className:
|
|
1341
|
-
onClick:
|
|
1340
|
+
className: O.manualLink,
|
|
1341
|
+
onClick: xe,
|
|
1342
1342
|
children: d
|
|
1343
1343
|
}
|
|
1344
1344
|
)
|
|
@@ -1373,12 +1373,12 @@ function Ro({
|
|
|
1373
1373
|
onConfirm: a,
|
|
1374
1374
|
onEdit: s
|
|
1375
1375
|
}) {
|
|
1376
|
-
const o =
|
|
1376
|
+
const o = Ke(), _ = Pe(r), f = jt("partner-sdk-unit-input"), [u, h] = S(""), [d, m] = S(!1), [g, C] = S(null), E = () => {
|
|
1377
1377
|
if (!d && !u.trim()) {
|
|
1378
|
-
|
|
1378
|
+
C("Please enter a unit number or select 'No unit number'");
|
|
1379
1379
|
return;
|
|
1380
1380
|
}
|
|
1381
|
-
|
|
1381
|
+
C(null), o.trackPlatform({
|
|
1382
1382
|
buttonClickEvent: { targetName: "partner-sdk-confirm-unit" }
|
|
1383
1383
|
}), a(d ? { ...e } : { ...e, street2: u.trim() });
|
|
1384
1384
|
}, k = () => {
|
|
@@ -1387,9 +1387,9 @@ function Ro({
|
|
|
1387
1387
|
targetName: "partner-sdk-no-unit",
|
|
1388
1388
|
optionName: String(!d)
|
|
1389
1389
|
}
|
|
1390
|
-
}), m(!d), d || (h(""),
|
|
1391
|
-
},
|
|
1392
|
-
h(Y.target.value), g &&
|
|
1390
|
+
}), m(!d), d || (h(""), C(null));
|
|
1391
|
+
}, H = (Y) => {
|
|
1392
|
+
h(Y.target.value), g && C(null);
|
|
1393
1393
|
}, P = () => {
|
|
1394
1394
|
o.trackPlatform({
|
|
1395
1395
|
inputFocusEvent: { targetName: "partner-sdk-unit-input" }
|
|
@@ -1411,7 +1411,7 @@ function Ro({
|
|
|
1411
1411
|
className: de.input,
|
|
1412
1412
|
placeholder: "#1234",
|
|
1413
1413
|
value: u,
|
|
1414
|
-
onChange:
|
|
1414
|
+
onChange: H,
|
|
1415
1415
|
onFocus: P,
|
|
1416
1416
|
disabled: d
|
|
1417
1417
|
}
|
|
@@ -1447,7 +1447,7 @@ function nn(e, r, a) {
|
|
|
1447
1447
|
}
|
|
1448
1448
|
function an(e, r) {
|
|
1449
1449
|
const a = (r == null ? void 0 : r.mapboxAccessToken) ?? Xr, s = (r == null ? void 0 : r.mapPinMarker) ?? Qr, o = (r == null ? void 0 : r.width) ?? en, i = (r == null ? void 0 : r.height) ?? tn, _ = (r == null ? void 0 : r.zoom) ?? rn, [f, u] = S(void 0), [h, d] = S("loading");
|
|
1450
|
-
return
|
|
1450
|
+
return se(() => {
|
|
1451
1451
|
d("loading");
|
|
1452
1452
|
const m = [
|
|
1453
1453
|
e.street1,
|
|
@@ -1456,10 +1456,10 @@ function an(e, r) {
|
|
|
1456
1456
|
e.postalCode
|
|
1457
1457
|
].join(" ");
|
|
1458
1458
|
let g = !1;
|
|
1459
|
-
async function
|
|
1459
|
+
async function C() {
|
|
1460
1460
|
var E, k;
|
|
1461
1461
|
try {
|
|
1462
|
-
const
|
|
1462
|
+
const H = `${zr}/${encodeURIComponent(m)}.json?access_token=${a}&limit=1`, P = await fetch(H);
|
|
1463
1463
|
if (!P.ok || g) {
|
|
1464
1464
|
g || d("error");
|
|
1465
1465
|
return;
|
|
@@ -1469,13 +1469,13 @@ function an(e, r) {
|
|
|
1469
1469
|
g || d("error");
|
|
1470
1470
|
return;
|
|
1471
1471
|
}
|
|
1472
|
-
const [ne,
|
|
1473
|
-
g || u(
|
|
1472
|
+
const [ne, $] = j, oe = nn(s, ne, $), U = `${Jr}/${oe}/${ne},${$},${_}/${o}x${i}@2x?access_token=${a}&attribution=false&logo=false`;
|
|
1473
|
+
g || u(U);
|
|
1474
1474
|
} catch {
|
|
1475
1475
|
g || d("error");
|
|
1476
1476
|
}
|
|
1477
1477
|
}
|
|
1478
|
-
return
|
|
1478
|
+
return C(), () => {
|
|
1479
1479
|
g = !0;
|
|
1480
1480
|
};
|
|
1481
1481
|
}, [
|
|
@@ -1507,18 +1507,18 @@ function Bo({
|
|
|
1507
1507
|
onLoad: u,
|
|
1508
1508
|
onError: h
|
|
1509
1509
|
}) {
|
|
1510
|
-
const d =
|
|
1510
|
+
const d = Pe(r), { url: m, status: g } = an(e, {
|
|
1511
1511
|
mapboxAccessToken: a,
|
|
1512
1512
|
mapPinMarker: s,
|
|
1513
1513
|
width: o,
|
|
1514
1514
|
height: i,
|
|
1515
1515
|
zoom: _
|
|
1516
|
-
}), [
|
|
1516
|
+
}), [C, E] = S(!1), k = G(u);
|
|
1517
1517
|
k.current = u;
|
|
1518
|
-
const
|
|
1519
|
-
|
|
1518
|
+
const H = G(h);
|
|
1519
|
+
H.current = h, se(() => {
|
|
1520
1520
|
var j;
|
|
1521
|
-
g === "error" && ((j =
|
|
1521
|
+
g === "error" && ((j = H.current) == null || j.call(H, new Error("Failed to load map for address")));
|
|
1522
1522
|
}, [g]);
|
|
1523
1523
|
const P = () => {
|
|
1524
1524
|
var j;
|
|
@@ -1532,7 +1532,7 @@ function Bo({
|
|
|
1532
1532
|
{
|
|
1533
1533
|
src: m,
|
|
1534
1534
|
alt: "Map",
|
|
1535
|
-
className: `${Ve.mapImage} ${
|
|
1535
|
+
className: `${Ve.mapImage} ${C ? Ve.mapImageLoaded : ""}`.trim(),
|
|
1536
1536
|
onLoad: P
|
|
1537
1537
|
}
|
|
1538
1538
|
) });
|
|
@@ -1546,11 +1546,11 @@ function un(e) {
|
|
|
1546
1546
|
function dn(e) {
|
|
1547
1547
|
return "or" in e;
|
|
1548
1548
|
}
|
|
1549
|
-
function
|
|
1549
|
+
function De(e, r) {
|
|
1550
1550
|
if (un(e))
|
|
1551
|
-
return e.and.every((a) =>
|
|
1551
|
+
return e.and.every((a) => De(a, r));
|
|
1552
1552
|
if (dn(e))
|
|
1553
|
-
return e.or.some((a) =>
|
|
1553
|
+
return e.or.some((a) => De(a, r));
|
|
1554
1554
|
if (cn(e)) {
|
|
1555
1555
|
const a = r(e.field);
|
|
1556
1556
|
switch (e.op) {
|
|
@@ -1575,10 +1575,10 @@ function Te(e, r) {
|
|
|
1575
1575
|
return !1;
|
|
1576
1576
|
}
|
|
1577
1577
|
function Nt(e, r) {
|
|
1578
|
-
return e.questions.filter((a) => !a.showWhen ||
|
|
1578
|
+
return e.questions.filter((a) => !a.showWhen || De(a.showWhen, r));
|
|
1579
1579
|
}
|
|
1580
1580
|
function hn(e, r) {
|
|
1581
|
-
return e.filter((a) => !a.showWhen ||
|
|
1581
|
+
return e.filter((a) => !a.showWhen || De(a.showWhen, r));
|
|
1582
1582
|
}
|
|
1583
1583
|
function fn(e, r) {
|
|
1584
1584
|
const a = typeof r == "string" && r.trim() === "";
|
|
@@ -1599,7 +1599,7 @@ function fn(e, r) {
|
|
|
1599
1599
|
return e.validate(r);
|
|
1600
1600
|
}
|
|
1601
1601
|
}
|
|
1602
|
-
function
|
|
1602
|
+
function mt(e, r) {
|
|
1603
1603
|
const a = {}, s = Nt(e, r);
|
|
1604
1604
|
for (const o of s) {
|
|
1605
1605
|
const i = r(o.key), _ = fn(o, i);
|
|
@@ -1705,7 +1705,7 @@ class mn {
|
|
|
1705
1705
|
const r = this.currentPage;
|
|
1706
1706
|
if (!r)
|
|
1707
1707
|
return { valid: !1, errors: { _page: "No current page" } };
|
|
1708
|
-
const a =
|
|
1708
|
+
const a = mt(r, this.getAnswer);
|
|
1709
1709
|
if (!a.valid)
|
|
1710
1710
|
return this._validationErrors = a.errors, this.emit({ type: "validationError", errors: a.errors }), a;
|
|
1711
1711
|
if (this._validationErrors = {}, this.isLastPage)
|
|
@@ -1744,7 +1744,7 @@ class mn {
|
|
|
1744
1744
|
*/
|
|
1745
1745
|
validate() {
|
|
1746
1746
|
const r = this.currentPage;
|
|
1747
|
-
return r ?
|
|
1747
|
+
return r ? mt(r, this.getAnswer) : { valid: !1, errors: { _page: "No current page" } };
|
|
1748
1748
|
}
|
|
1749
1749
|
/**
|
|
1750
1750
|
* Get visible questions on the current page (filtered by showWhen).
|
|
@@ -2079,7 +2079,7 @@ const _n = {
|
|
|
2079
2079
|
high_end: "High-end",
|
|
2080
2080
|
luxury: "Luxury"
|
|
2081
2081
|
};
|
|
2082
|
-
function
|
|
2082
|
+
function Oe(e, r, a) {
|
|
2083
2083
|
return {
|
|
2084
2084
|
id: `${e}-condition`,
|
|
2085
2085
|
title: a,
|
|
@@ -2102,7 +2102,7 @@ function Ae(e, r, a) {
|
|
|
2102
2102
|
]
|
|
2103
2103
|
};
|
|
2104
2104
|
}
|
|
2105
|
-
const wn =
|
|
2105
|
+
const wn = Oe("kitchen", "home.kitchen_seller_score", "How would you describe your kitchen?"), kn = Oe("bathroom", "home.bathroom_seller_score", "How would you describe your main bathroom?"), jn = Oe("living-room", "home.living_room_seller_score", "How would you describe your living room?"), Nn = Oe("exterior", "home.exterior_seller_score", "How would you describe your home's exterior?"), In = {
|
|
2106
2106
|
id: "hoa",
|
|
2107
2107
|
title: "Is your home part of a homeowners association?",
|
|
2108
2108
|
subtitle: "This is often called an HOA. It's a group that helps maintain your community for a fee.",
|
|
@@ -2375,12 +2375,12 @@ const wn = Ae("kitchen", "home.kitchen_seller_score", "How would you describe yo
|
|
|
2375
2375
|
On,
|
|
2376
2376
|
Rn
|
|
2377
2377
|
];
|
|
2378
|
-
function
|
|
2378
|
+
function pt(e) {
|
|
2379
2379
|
return new mn(Bn, e);
|
|
2380
2380
|
}
|
|
2381
|
-
const Et =
|
|
2382
|
-
function
|
|
2383
|
-
const e =
|
|
2381
|
+
const Et = Ue(null);
|
|
2382
|
+
function fe() {
|
|
2383
|
+
const e = Ae(Et);
|
|
2384
2384
|
if (!e)
|
|
2385
2385
|
throw new Error(
|
|
2386
2386
|
"useDtc must be used within a <DtcOnboardingFlow> component"
|
|
@@ -2399,90 +2399,90 @@ const Mn = ({
|
|
|
2399
2399
|
onError: u,
|
|
2400
2400
|
children: h
|
|
2401
2401
|
}) => {
|
|
2402
|
-
var
|
|
2403
|
-
const d =
|
|
2402
|
+
var v;
|
|
2403
|
+
const d = G(o);
|
|
2404
2404
|
d.current = o;
|
|
2405
|
-
const m =
|
|
2405
|
+
const m = G(i);
|
|
2406
2406
|
m.current = i;
|
|
2407
|
-
const g =
|
|
2407
|
+
const g = G(_);
|
|
2408
2408
|
g.current = _;
|
|
2409
|
-
const
|
|
2410
|
-
|
|
2411
|
-
const E =
|
|
2409
|
+
const C = G(f);
|
|
2410
|
+
C.current = f;
|
|
2411
|
+
const E = G(u);
|
|
2412
2412
|
E.current = u;
|
|
2413
|
-
const [k,
|
|
2414
|
-
() =>
|
|
2415
|
-
), P = (r ?? []).join("|"), Y =
|
|
2416
|
-
|
|
2417
|
-
P !== Y.current && (Y.current = P,
|
|
2413
|
+
const [k, H] = S(
|
|
2414
|
+
() => pt({ initialAnswers: e, skipPages: r })
|
|
2415
|
+
), P = (r ?? []).join("|"), Y = G(P);
|
|
2416
|
+
se(() => {
|
|
2417
|
+
P !== Y.current && (Y.current = P, H(pt({ initialAnswers: e, skipPages: r })));
|
|
2418
2418
|
}, [P]);
|
|
2419
2419
|
const [j, ne] = S(
|
|
2420
2420
|
k.answers
|
|
2421
|
-
), [
|
|
2422
|
-
((
|
|
2423
|
-
), [
|
|
2421
|
+
), [$, oe] = S(
|
|
2422
|
+
((v = k.currentPage) == null ? void 0 : v.id) ?? ""
|
|
2423
|
+
), [U, D] = S({}), [F, Z] = S(
|
|
2424
2424
|
k.visiblePages
|
|
2425
2425
|
);
|
|
2426
|
-
|
|
2427
|
-
var
|
|
2428
|
-
const
|
|
2429
|
-
k.on("answerChange", (
|
|
2430
|
-
var
|
|
2431
|
-
ne(k.answers), Z([...k.visiblePages]),
|
|
2426
|
+
se(() => {
|
|
2427
|
+
var y;
|
|
2428
|
+
const x = [
|
|
2429
|
+
k.on("answerChange", (R) => {
|
|
2430
|
+
var J;
|
|
2431
|
+
ne(k.answers), Z([...k.visiblePages]), R.type === "answerChange" && ((J = g.current) == null || J.call(g, R.key, R.value));
|
|
2432
2432
|
}),
|
|
2433
|
-
k.on("pageChange", (
|
|
2434
|
-
var
|
|
2435
|
-
|
|
2433
|
+
k.on("pageChange", (R) => {
|
|
2434
|
+
var J;
|
|
2435
|
+
R.type === "pageChange" && (oe(R.pageId), Z([...k.visiblePages]), D({}), (J = m.current) == null || J.call(m, R.pageIndex, R.pageId));
|
|
2436
2436
|
}),
|
|
2437
|
-
k.on("validationError", (
|
|
2438
|
-
|
|
2437
|
+
k.on("validationError", (R) => {
|
|
2438
|
+
R.type === "validationError" && D(R.errors);
|
|
2439
2439
|
}),
|
|
2440
|
-
k.on("submit", (
|
|
2441
|
-
|
|
2440
|
+
k.on("submit", (R) => {
|
|
2441
|
+
R.type === "submit" && d.current(R.answers);
|
|
2442
2442
|
})
|
|
2443
2443
|
];
|
|
2444
|
-
return (
|
|
2445
|
-
|
|
2444
|
+
return (y = C.current) == null || y.call(C), () => {
|
|
2445
|
+
x.forEach((R) => R()), k.destroy();
|
|
2446
2446
|
};
|
|
2447
2447
|
}, [k]);
|
|
2448
|
-
const ae =
|
|
2449
|
-
|
|
2448
|
+
const ae = G(e);
|
|
2449
|
+
se(() => {
|
|
2450
2450
|
e && e !== ae.current && (ae.current = e, k.setAnswers(e));
|
|
2451
2451
|
}, [e, k]);
|
|
2452
|
-
const z =
|
|
2453
|
-
const
|
|
2454
|
-
return
|
|
2455
|
-
}, [
|
|
2452
|
+
const z = Ee(() => {
|
|
2453
|
+
const x = F.findIndex((y) => y.id === $);
|
|
2454
|
+
return x >= 0 ? x : 0;
|
|
2455
|
+
}, [F, $]), K = F[z], q = Ee(() => $ ? k.getVisibleQuestionsForCurrentPage() : [], [k, $, j]), ie = Ee(() => F.length <= 1 ? 0 : Math.min(
|
|
2456
2456
|
1,
|
|
2457
|
-
Math.max(0, z / (
|
|
2458
|
-
), [z,
|
|
2457
|
+
Math.max(0, z / (F.length - 1))
|
|
2458
|
+
), [z, F.length]), ue = Ee(
|
|
2459
2459
|
() => ({
|
|
2460
2460
|
engine: k,
|
|
2461
2461
|
currentPage: K,
|
|
2462
2462
|
currentPageIndex: z,
|
|
2463
|
-
visiblePages:
|
|
2464
|
-
visibleQuestions:
|
|
2463
|
+
visiblePages: F,
|
|
2464
|
+
visibleQuestions: q,
|
|
2465
2465
|
answers: j,
|
|
2466
|
-
validationErrors:
|
|
2467
|
-
progress:
|
|
2466
|
+
validationErrors: U,
|
|
2467
|
+
progress: ie,
|
|
2468
2468
|
isFirstPage: z === 0,
|
|
2469
2469
|
contactConsentText: s,
|
|
2470
|
-
isLastPage:
|
|
2471
|
-
setAnswer: (
|
|
2470
|
+
isLastPage: F.length > 0 && z === F.length - 1,
|
|
2471
|
+
setAnswer: (x, y) => k.setAnswer(x, y),
|
|
2472
2472
|
getAnswer: k.getAnswer,
|
|
2473
2473
|
goToNext: () => {
|
|
2474
|
-
var
|
|
2475
|
-
const
|
|
2476
|
-
if (!
|
|
2474
|
+
var y;
|
|
2475
|
+
const x = k.goToNext();
|
|
2476
|
+
if (!x.valid)
|
|
2477
2477
|
try {
|
|
2478
|
-
(
|
|
2478
|
+
(y = E.current) == null || y.call(
|
|
2479
2479
|
E,
|
|
2480
2480
|
new Error(
|
|
2481
|
-
`Validation failed: ${Object.values(
|
|
2481
|
+
`Validation failed: ${Object.values(x.errors).join(", ")}`
|
|
2482
2482
|
)
|
|
2483
2483
|
);
|
|
2484
|
-
} catch (
|
|
2485
|
-
console.error("[DtcOnboardingFlow] onError callback threw:",
|
|
2484
|
+
} catch (R) {
|
|
2485
|
+
console.error("[DtcOnboardingFlow] onError callback threw:", R);
|
|
2486
2486
|
}
|
|
2487
2487
|
},
|
|
2488
2488
|
goToPrev: () => k.goToPrev(),
|
|
@@ -2492,11 +2492,11 @@ const Mn = ({
|
|
|
2492
2492
|
k,
|
|
2493
2493
|
K,
|
|
2494
2494
|
z,
|
|
2495
|
-
|
|
2496
|
-
V,
|
|
2497
|
-
j,
|
|
2495
|
+
F,
|
|
2498
2496
|
q,
|
|
2499
|
-
|
|
2497
|
+
j,
|
|
2498
|
+
U,
|
|
2499
|
+
ie,
|
|
2500
2500
|
a,
|
|
2501
2501
|
s
|
|
2502
2502
|
]
|
|
@@ -2652,7 +2652,7 @@ const Mn = ({
|
|
|
2652
2652
|
}
|
|
2653
2653
|
);
|
|
2654
2654
|
}, ns = () => {
|
|
2655
|
-
const { isFirstPage: e, currentPage: r, progress: a, goToNext: s, goToPrev: o } =
|
|
2655
|
+
const { isFirstPage: e, currentPage: r, progress: a, goToNext: s, goToPrev: o } = fe();
|
|
2656
2656
|
if ((r == null ? void 0 : r.id) === "contact-info") return null;
|
|
2657
2657
|
const i = (r == null ? void 0 : r.submitLabel) ?? "Next";
|
|
2658
2658
|
return /* @__PURE__ */ t.jsxs("nav", { className: l.navigation, "aria-label": "Page navigation", children: [
|
|
@@ -2686,24 +2686,24 @@ const Mn = ({
|
|
|
2686
2686
|
] });
|
|
2687
2687
|
}, as = ({ question: e }) => {
|
|
2688
2688
|
var d;
|
|
2689
|
-
const { getAnswer: r, setAnswer: a, goToNext: s, validationErrors: o } =
|
|
2690
|
-
|
|
2689
|
+
const { getAnswer: r, setAnswer: a, goToNext: s, validationErrors: o } = fe(), i = r(e.key), _ = o[e.key], f = G(null);
|
|
2690
|
+
se(() => () => {
|
|
2691
2691
|
f.current && clearTimeout(f.current);
|
|
2692
2692
|
}, []);
|
|
2693
|
-
const u =
|
|
2693
|
+
const u = Se(
|
|
2694
2694
|
(m) => {
|
|
2695
2695
|
a(e.key, m), e.autoAdvance && (f.current && clearTimeout(f.current), f.current = setTimeout(() => s(), 150));
|
|
2696
2696
|
},
|
|
2697
2697
|
[e.key, e.autoAdvance, a, s]
|
|
2698
|
-
), h =
|
|
2698
|
+
), h = Se(
|
|
2699
2699
|
(m, g) => {
|
|
2700
|
-
var k,
|
|
2701
|
-
const
|
|
2702
|
-
if (!
|
|
2700
|
+
var k, H;
|
|
2701
|
+
const C = e.options;
|
|
2702
|
+
if (!C) return;
|
|
2703
2703
|
let E = null;
|
|
2704
|
-
if (m.key === "ArrowDown" || m.key === "ArrowRight" ? (m.preventDefault(), E = (g + 1) %
|
|
2704
|
+
if (m.key === "ArrowDown" || m.key === "ArrowRight" ? (m.preventDefault(), E = (g + 1) % C.length) : (m.key === "ArrowUp" || m.key === "ArrowLeft") && (m.preventDefault(), E = (g - 1 + C.length) % C.length), E !== null) {
|
|
2705
2705
|
const P = (k = m.currentTarget.closest('[role="radiogroup"]')) == null ? void 0 : k.querySelectorAll('[role="radio"]');
|
|
2706
|
-
(
|
|
2706
|
+
(H = P == null ? void 0 : P[E]) == null || H.focus(), u(C[E].value);
|
|
2707
2707
|
}
|
|
2708
2708
|
},
|
|
2709
2709
|
[e.options, u]
|
|
@@ -2716,15 +2716,15 @@ const Mn = ({
|
|
|
2716
2716
|
"aria-label": e.label,
|
|
2717
2717
|
children: [
|
|
2718
2718
|
(d = e.options) == null ? void 0 : d.map((m, g) => {
|
|
2719
|
-
const
|
|
2719
|
+
const C = i === m.value;
|
|
2720
2720
|
return /* @__PURE__ */ t.jsxs(
|
|
2721
2721
|
"button",
|
|
2722
2722
|
{
|
|
2723
2723
|
type: "button",
|
|
2724
2724
|
role: "radio",
|
|
2725
|
-
"aria-checked":
|
|
2726
|
-
tabIndex:
|
|
2727
|
-
className: `${l.radioCard} ${
|
|
2725
|
+
"aria-checked": C,
|
|
2726
|
+
tabIndex: C || g === 0 && !i ? 0 : -1,
|
|
2727
|
+
className: `${l.radioCard} ${C ? l.radioCardSelected : ""}`,
|
|
2728
2728
|
onClick: () => u(m.value),
|
|
2729
2729
|
onKeyDown: (E) => h(E, g),
|
|
2730
2730
|
children: [
|
|
@@ -2770,11 +2770,11 @@ const is = {
|
|
|
2770
2770
|
"exterior-luxury": re("2023-04-1681773220487-59852.png")
|
|
2771
2771
|
}, ls = ({ question: e }) => {
|
|
2772
2772
|
var h;
|
|
2773
|
-
const { getAnswer: r, setAnswer: a, goToNext: s, validationErrors: o } =
|
|
2774
|
-
|
|
2773
|
+
const { getAnswer: r, setAnswer: a, goToNext: s, validationErrors: o } = fe(), i = r(e.key), _ = o[e.key], f = G(null);
|
|
2774
|
+
se(() => () => {
|
|
2775
2775
|
f.current && clearTimeout(f.current);
|
|
2776
2776
|
}, []);
|
|
2777
|
-
const u =
|
|
2777
|
+
const u = Se(
|
|
2778
2778
|
(d) => {
|
|
2779
2779
|
a(e.key, d), e.autoAdvance && (f.current && clearTimeout(f.current), f.current = setTimeout(() => s(), 300));
|
|
2780
2780
|
},
|
|
@@ -2822,7 +2822,7 @@ const is = {
|
|
|
2822
2822
|
question: e
|
|
2823
2823
|
}) => {
|
|
2824
2824
|
var f;
|
|
2825
|
-
const { getAnswer: r, setAnswer: a, validationErrors: s } =
|
|
2825
|
+
const { getAnswer: r, setAnswer: a, validationErrors: s } = fe(), o = r(e.key) ?? [], i = s[e.key], _ = (u) => {
|
|
2826
2826
|
var m;
|
|
2827
2827
|
const h = (m = e.options) == null ? void 0 : m.find((g) => g.value === u);
|
|
2828
2828
|
if (h != null && h.exclusive) {
|
|
@@ -2831,12 +2831,12 @@ const is = {
|
|
|
2831
2831
|
}
|
|
2832
2832
|
const d = o.filter(
|
|
2833
2833
|
(g) => {
|
|
2834
|
-
var
|
|
2835
|
-
return !((E = (
|
|
2834
|
+
var C, E;
|
|
2835
|
+
return !((E = (C = e.options) == null ? void 0 : C.find((k) => k.value === g)) != null && E.exclusive);
|
|
2836
2836
|
}
|
|
2837
2837
|
);
|
|
2838
2838
|
if (d.includes(u)) {
|
|
2839
|
-
const g = d.filter((
|
|
2839
|
+
const g = d.filter((C) => C !== u);
|
|
2840
2840
|
a(e.key, g.length > 0 ? g : void 0);
|
|
2841
2841
|
} else
|
|
2842
2842
|
a(e.key, [...d, u]);
|
|
@@ -2890,7 +2890,7 @@ const is = {
|
|
|
2890
2890
|
);
|
|
2891
2891
|
}, us = ({ question: e }) => {
|
|
2892
2892
|
var f;
|
|
2893
|
-
const { getAnswer: r, setAnswer: a, validationErrors: s } =
|
|
2893
|
+
const { getAnswer: r, setAnswer: a, validationErrors: s } = fe(), o = r(e.key), i = s[e.key], _ = (u) => {
|
|
2894
2894
|
const h = u.target.value;
|
|
2895
2895
|
e.type === "number" && h !== "" ? a(e.key, Number(h)) : a(e.key, h || void 0);
|
|
2896
2896
|
};
|
|
@@ -2913,7 +2913,7 @@ const is = {
|
|
|
2913
2913
|
i && /* @__PURE__ */ t.jsx("p", { className: l.fieldError, children: i })
|
|
2914
2914
|
] });
|
|
2915
2915
|
}, ds = ({ question: e }) => {
|
|
2916
|
-
const { getAnswer: r, setAnswer: a, validationErrors: s } =
|
|
2916
|
+
const { getAnswer: r, setAnswer: a, validationErrors: s } = fe(), o = r(e.key), i = s[e.key], _ = (u) => {
|
|
2917
2917
|
const h = u.target.value;
|
|
2918
2918
|
if (e.type === "number") {
|
|
2919
2919
|
const d = h.replace(/[^0-9.]/g, ""), m = d === "" ? void 0 : Number(d), g = m !== void 0 && isNaN(m) ? void 0 : m;
|
|
@@ -2942,7 +2942,7 @@ const is = {
|
|
|
2942
2942
|
i && /* @__PURE__ */ t.jsx("p", { className: l.fieldError, children: i })
|
|
2943
2943
|
] });
|
|
2944
2944
|
}, hs = ({ question: e }) => {
|
|
2945
|
-
const { getAnswer: r, setAnswer: a, validationErrors: s } =
|
|
2945
|
+
const { getAnswer: r, setAnswer: a, validationErrors: s } = fe(), o = r(e.key), i = s[e.key], _ = (u) => {
|
|
2946
2946
|
const h = u.target.value.replace(/[^0-9]/g, ""), d = h === "" ? void 0 : Number(h);
|
|
2947
2947
|
a(e.key, d !== void 0 && isNaN(d) ? void 0 : d);
|
|
2948
2948
|
}, f = o != null ? String(o) : "";
|
|
@@ -2971,7 +2971,7 @@ function fs(e) {
|
|
|
2971
2971
|
return r.length <= 3 ? r : r.length <= 6 ? `(${r.slice(0, 3)}) ${r.slice(3)}` : `(${r.slice(0, 3)}) ${r.slice(3, 6)}-${r.slice(6)}`;
|
|
2972
2972
|
}
|
|
2973
2973
|
const ms = ({ question: e }) => {
|
|
2974
|
-
const { getAnswer: r, setAnswer: a, validationErrors: s } =
|
|
2974
|
+
const { getAnswer: r, setAnswer: a, validationErrors: s } = fe(), o = r(e.key) ?? "", i = s[e.key], _ = (f) => {
|
|
2975
2975
|
const h = f.target.value.replace(/\D/g, "").slice(0, 10);
|
|
2976
2976
|
a(e.key, h || void 0);
|
|
2977
2977
|
};
|
|
@@ -2991,7 +2991,7 @@ const ms = ({ question: e }) => {
|
|
|
2991
2991
|
i && /* @__PURE__ */ t.jsx("p", { className: l.fieldError, children: i })
|
|
2992
2992
|
] });
|
|
2993
2993
|
}, ps = ({ question: e }) => {
|
|
2994
|
-
const { getAnswer: r, setAnswer: a, smsConsentText: s } =
|
|
2994
|
+
const { getAnswer: r, setAnswer: a, smsConsentText: s } = fe(), o = r(e.key);
|
|
2995
2995
|
let i = e.label;
|
|
2996
2996
|
return e.key === "seller.sms_opt_in" && s && (i = s), /* @__PURE__ */ t.jsx("div", { className: l.toggleGroup, children: /* @__PURE__ */ t.jsxs("label", { className: l.toggleLabel, children: [
|
|
2997
2997
|
/* @__PURE__ */ t.jsx(
|
|
@@ -3005,7 +3005,7 @@ const ms = ({ question: e }) => {
|
|
|
3005
3005
|
),
|
|
3006
3006
|
/* @__PURE__ */ t.jsx("span", { className: l.toggleText, children: i })
|
|
3007
3007
|
] }) });
|
|
3008
|
-
},
|
|
3008
|
+
}, gt = 4, Te = 8, gs = 240, _s = 80;
|
|
3009
3009
|
function bs(e) {
|
|
3010
3010
|
const r = {};
|
|
3011
3011
|
for (let a = e; a; a = a.parentElement) {
|
|
@@ -3019,46 +3019,46 @@ function bs(e) {
|
|
|
3019
3019
|
}
|
|
3020
3020
|
const ys = ({ question: e }) => {
|
|
3021
3021
|
var ue;
|
|
3022
|
-
const { getAnswer: r, setAnswer: a, validationErrors: s } =
|
|
3023
|
-
|
|
3024
|
-
let
|
|
3025
|
-
return e.dataSource === "homebuilders" &&
|
|
3026
|
-
|
|
3027
|
-
|
|
3028
|
-
label:
|
|
3029
|
-
value:
|
|
3022
|
+
const { getAnswer: r, setAnswer: a, validationErrors: s } = fe(), o = r(e.key), i = s[e.key], _ = `${e.key}-combobox`, [f, u] = S(""), [h, d] = S(!1), [m, g] = S([]), [C, E] = S(!1), k = G(null), H = G(null), P = G(null), [Y, j] = S(null), [ne, $] = S({}), oe = Ae(Ze);
|
|
3023
|
+
se(() => {
|
|
3024
|
+
let v = !1;
|
|
3025
|
+
return e.dataSource === "homebuilders" && oe ? (E(!0), oe.getHomebuilders().then((x) => {
|
|
3026
|
+
v || g(
|
|
3027
|
+
x.homebuilders.map((y) => ({
|
|
3028
|
+
label: y.displayName,
|
|
3029
|
+
value: y.identifier
|
|
3030
3030
|
}))
|
|
3031
3031
|
);
|
|
3032
3032
|
}).catch(() => {
|
|
3033
|
-
|
|
3034
|
-
e.options.map((
|
|
3035
|
-
label:
|
|
3036
|
-
value: String(
|
|
3033
|
+
v || (e.options ? g(
|
|
3034
|
+
e.options.map((x) => ({
|
|
3035
|
+
label: x.label,
|
|
3036
|
+
value: String(x.value)
|
|
3037
3037
|
}))
|
|
3038
3038
|
) : g([]));
|
|
3039
3039
|
}).finally(() => {
|
|
3040
|
-
|
|
3040
|
+
v || E(!1);
|
|
3041
3041
|
})) : e.options ? g(
|
|
3042
|
-
e.options.map((
|
|
3043
|
-
label:
|
|
3044
|
-
value: String(
|
|
3042
|
+
e.options.map((x) => ({
|
|
3043
|
+
label: x.label,
|
|
3044
|
+
value: String(x.value)
|
|
3045
3045
|
}))
|
|
3046
3046
|
) : g([]), () => {
|
|
3047
|
-
|
|
3047
|
+
v = !0;
|
|
3048
3048
|
};
|
|
3049
|
-
}, [e.dataSource, e.options,
|
|
3050
|
-
const
|
|
3051
|
-
const
|
|
3052
|
-
if (!
|
|
3053
|
-
const
|
|
3049
|
+
}, [e.dataSource, e.options, oe]);
|
|
3050
|
+
const U = Se(() => {
|
|
3051
|
+
const v = H.current;
|
|
3052
|
+
if (!v) return;
|
|
3053
|
+
const x = v.getBoundingClientRect(), y = window.visualViewport, R = (y == null ? void 0 : y.height) ?? window.innerHeight, J = (y == null ? void 0 : y.width) ?? window.innerWidth, ye = (y == null ? void 0 : y.offsetTop) ?? 0, he = (y == null ? void 0 : y.offsetLeft) ?? 0, pe = ye + R - x.bottom - gt - Te, N = Math.max(
|
|
3054
3054
|
_s,
|
|
3055
|
-
Math.min(gs,
|
|
3056
|
-
),
|
|
3055
|
+
Math.min(gs, pe)
|
|
3056
|
+
), L = Math.min(x.width, J - Te * 2), B = he + Te, M = he + J - L - Te, le = Math.max(B, Math.min(x.left, M));
|
|
3057
3057
|
j({
|
|
3058
|
-
top:
|
|
3059
|
-
left:
|
|
3060
|
-
width:
|
|
3061
|
-
maxHeight:
|
|
3058
|
+
top: x.bottom + window.scrollY + gt,
|
|
3059
|
+
left: le + window.scrollX,
|
|
3060
|
+
width: L,
|
|
3061
|
+
maxHeight: N
|
|
3062
3062
|
});
|
|
3063
3063
|
}, []);
|
|
3064
3064
|
Gt(() => {
|
|
@@ -3066,54 +3066,54 @@ const ys = ({ question: e }) => {
|
|
|
3066
3066
|
j(null);
|
|
3067
3067
|
return;
|
|
3068
3068
|
}
|
|
3069
|
-
|
|
3070
|
-
const
|
|
3071
|
-
window.addEventListener("scroll",
|
|
3072
|
-
const
|
|
3073
|
-
|
|
3074
|
-
const
|
|
3069
|
+
H.current && $(bs(H.current)), U();
|
|
3070
|
+
const v = () => U();
|
|
3071
|
+
window.addEventListener("scroll", v, !0), window.addEventListener("resize", v);
|
|
3072
|
+
const x = window.visualViewport;
|
|
3073
|
+
x == null || x.addEventListener("resize", v), x == null || x.addEventListener("scroll", v);
|
|
3074
|
+
const y = window.setTimeout(v, 300);
|
|
3075
3075
|
return () => {
|
|
3076
|
-
window.removeEventListener("scroll",
|
|
3076
|
+
window.removeEventListener("scroll", v, !0), window.removeEventListener("resize", v), x == null || x.removeEventListener("resize", v), x == null || x.removeEventListener("scroll", v), window.clearTimeout(y);
|
|
3077
3077
|
};
|
|
3078
|
-
}, [h,
|
|
3079
|
-
const
|
|
3080
|
-
var
|
|
3081
|
-
const
|
|
3082
|
-
(
|
|
3078
|
+
}, [h, U]), se(() => {
|
|
3079
|
+
const v = (x) => {
|
|
3080
|
+
var R, J;
|
|
3081
|
+
const y = x.target;
|
|
3082
|
+
(R = k.current) != null && R.contains(y) || (J = P.current) != null && J.contains(y) || d(!1);
|
|
3083
3083
|
};
|
|
3084
|
-
return document.addEventListener("mousedown",
|
|
3084
|
+
return document.addEventListener("mousedown", v), () => document.removeEventListener("mousedown", v);
|
|
3085
3085
|
}, []);
|
|
3086
|
-
const
|
|
3087
|
-
(
|
|
3088
|
-
) : m,
|
|
3089
|
-
(
|
|
3090
|
-
a(e.key,
|
|
3086
|
+
const D = f ? m.filter(
|
|
3087
|
+
(v) => v.label.toLowerCase().includes(f.toLowerCase())
|
|
3088
|
+
) : m, F = (ue = m.find((v) => v.value === o)) == null ? void 0 : ue.label, [Z, ae] = S(-1), z = `${e.key}-listbox`, K = Se(
|
|
3089
|
+
(v) => {
|
|
3090
|
+
a(e.key, v), d(!1), u(""), ae(-1);
|
|
3091
3091
|
},
|
|
3092
3092
|
[e.key, a]
|
|
3093
|
-
),
|
|
3093
|
+
), q = (v) => {
|
|
3094
3094
|
if (!h) {
|
|
3095
|
-
(
|
|
3095
|
+
(v.key === "ArrowDown" || v.key === "Enter") && (v.preventDefault(), d(!0));
|
|
3096
3096
|
return;
|
|
3097
3097
|
}
|
|
3098
|
-
switch (
|
|
3098
|
+
switch (v.key) {
|
|
3099
3099
|
case "ArrowDown":
|
|
3100
|
-
|
|
3101
|
-
(
|
|
3100
|
+
v.preventDefault(), D.length > 0 && ae(
|
|
3101
|
+
(x) => x < D.length - 1 ? x + 1 : 0
|
|
3102
3102
|
);
|
|
3103
3103
|
break;
|
|
3104
3104
|
case "ArrowUp":
|
|
3105
|
-
|
|
3106
|
-
(
|
|
3105
|
+
v.preventDefault(), D.length > 0 && ae(
|
|
3106
|
+
(x) => x > 0 ? x - 1 : D.length - 1
|
|
3107
3107
|
);
|
|
3108
3108
|
break;
|
|
3109
3109
|
case "Enter":
|
|
3110
|
-
|
|
3110
|
+
v.preventDefault(), Z >= 0 && Z < D.length && K(D[Z].value);
|
|
3111
3111
|
break;
|
|
3112
3112
|
case "Escape":
|
|
3113
|
-
|
|
3113
|
+
v.preventDefault(), d(!1), ae(-1);
|
|
3114
3114
|
break;
|
|
3115
3115
|
}
|
|
3116
|
-
},
|
|
3116
|
+
}, ie = h && Y && typeof document < "u" ? Ut(
|
|
3117
3117
|
/* @__PURE__ */ t.jsx(
|
|
3118
3118
|
"div",
|
|
3119
3119
|
{
|
|
@@ -3130,38 +3130,38 @@ const ys = ({ question: e }) => {
|
|
|
3130
3130
|
maxHeight: Y.maxHeight,
|
|
3131
3131
|
...ne
|
|
3132
3132
|
},
|
|
3133
|
-
children:
|
|
3133
|
+
children: C ? /* @__PURE__ */ t.jsx("div", { className: l.searchableDropdownEmpty, children: "Loading..." }) : D.length === 0 ? /* @__PURE__ */ t.jsx("div", { className: l.searchableDropdownEmpty, children: "No results found" }) : D.map((v, x) => /* @__PURE__ */ t.jsx(
|
|
3134
3134
|
"button",
|
|
3135
3135
|
{
|
|
3136
|
-
id: `${z}-option-${
|
|
3136
|
+
id: `${z}-option-${x}`,
|
|
3137
3137
|
type: "button",
|
|
3138
3138
|
role: "option",
|
|
3139
|
-
"aria-selected":
|
|
3140
|
-
className: `${l.searchableDropdownOption} ${
|
|
3141
|
-
onMouseDown: (
|
|
3142
|
-
onClick: () => K(
|
|
3143
|
-
children:
|
|
3139
|
+
"aria-selected": v.value === o,
|
|
3140
|
+
className: `${l.searchableDropdownOption} ${v.value === o ? l.searchableDropdownOptionSelected : ""} ${x === Z ? l.searchableDropdownOptionHighlighted : ""}`,
|
|
3141
|
+
onMouseDown: (y) => y.preventDefault(),
|
|
3142
|
+
onClick: () => K(v.value),
|
|
3143
|
+
children: v.label
|
|
3144
3144
|
},
|
|
3145
|
-
|
|
3145
|
+
v.value
|
|
3146
3146
|
))
|
|
3147
3147
|
}
|
|
3148
3148
|
),
|
|
3149
3149
|
document.body
|
|
3150
3150
|
) : null;
|
|
3151
3151
|
return /* @__PURE__ */ t.jsxs("div", { ref: k, className: l.fieldGroup, children: [
|
|
3152
|
-
/* @__PURE__ */ t.jsxs("div", { ref:
|
|
3152
|
+
/* @__PURE__ */ t.jsxs("div", { ref: H, className: l.searchableDropdown, children: [
|
|
3153
3153
|
/* @__PURE__ */ t.jsx(
|
|
3154
3154
|
"input",
|
|
3155
3155
|
{
|
|
3156
3156
|
id: _,
|
|
3157
3157
|
type: "text",
|
|
3158
3158
|
className: l.fieldInput,
|
|
3159
|
-
value: h ? f :
|
|
3160
|
-
onChange: (
|
|
3161
|
-
u(
|
|
3159
|
+
value: h ? f : F ?? "",
|
|
3160
|
+
onChange: (v) => {
|
|
3161
|
+
u(v.target.value), ae(-1), h || d(!0);
|
|
3162
3162
|
},
|
|
3163
3163
|
onFocus: () => d(!0),
|
|
3164
|
-
onKeyDown:
|
|
3164
|
+
onKeyDown: q,
|
|
3165
3165
|
placeholder: e.placeholder || "Select or search...",
|
|
3166
3166
|
"aria-label": e.label,
|
|
3167
3167
|
"aria-expanded": h,
|
|
@@ -3193,7 +3193,7 @@ const ys = ({ question: e }) => {
|
|
|
3193
3193
|
)
|
|
3194
3194
|
] }),
|
|
3195
3195
|
i && /* @__PURE__ */ t.jsx("p", { className: l.fieldError, children: i }),
|
|
3196
|
-
|
|
3196
|
+
ie
|
|
3197
3197
|
] });
|
|
3198
3198
|
};
|
|
3199
3199
|
function vs(e) {
|
|
@@ -3222,8 +3222,8 @@ function vs(e) {
|
|
|
3222
3222
|
}
|
|
3223
3223
|
}
|
|
3224
3224
|
const xs = () => {
|
|
3225
|
-
const { currentPage: e, visibleQuestions: r, goToNext: a, contactConsentText: s } =
|
|
3226
|
-
return
|
|
3225
|
+
const { currentPage: e, visibleQuestions: r, goToNext: a, contactConsentText: s } = fe(), o = G(null);
|
|
3226
|
+
return se(() => {
|
|
3227
3227
|
var i, _, f;
|
|
3228
3228
|
(_ = (i = o.current) == null ? void 0 : i.scrollTo) == null || _.call(i, { top: 0, behavior: "smooth" }), (f = o.current) == null || f.focus();
|
|
3229
3229
|
}, [e == null ? void 0 : e.id]), e ? /* @__PURE__ */ t.jsxs(
|
|
@@ -3273,7 +3273,7 @@ const xs = () => {
|
|
|
3273
3273
|
}
|
|
3274
3274
|
) : null;
|
|
3275
3275
|
}, Cs = ({ address: e }) => {
|
|
3276
|
-
const { currentPage: r } =
|
|
3276
|
+
const { currentPage: r } = fe();
|
|
3277
3277
|
if (!r) return null;
|
|
3278
3278
|
const a = [
|
|
3279
3279
|
e.street1,
|
|
@@ -3328,8 +3328,8 @@ const xs = () => {
|
|
|
3328
3328
|
onError: m,
|
|
3329
3329
|
contactConsentText: g
|
|
3330
3330
|
}) => {
|
|
3331
|
-
const
|
|
3332
|
-
return /* @__PURE__ */ t.jsx("div", { className: l.container, style:
|
|
3331
|
+
const C = Pe(s);
|
|
3332
|
+
return /* @__PURE__ */ t.jsx("div", { className: l.container, style: C, children: /* @__PURE__ */ t.jsxs(
|
|
3333
3333
|
Mn,
|
|
3334
3334
|
{
|
|
3335
3335
|
initialAnswers: o,
|
|
@@ -3413,48 +3413,70 @@ function $o({
|
|
|
3413
3413
|
onReady: f,
|
|
3414
3414
|
onError: u
|
|
3415
3415
|
}) {
|
|
3416
|
-
const h = kt(), d =
|
|
3417
|
-
|
|
3418
|
-
|
|
3416
|
+
const h = kt(), d = Pe(o), [m, g] = S(_o), [C, E] = S("select"), [k, H] = S(null), [P, Y] = S(null), [j, ne] = S(null), [$, oe] = S(r ?? ""), [U, D] = S(qe(a ?? "")), [F, Z] = S(null), [ae, z] = S(""), [K, q] = S(!1), [ie, ue] = S(null), v = G(r);
|
|
3417
|
+
v.current = r;
|
|
3418
|
+
const x = G(a);
|
|
3419
|
+
x.current = a, se(() => {
|
|
3420
|
+
if (v.current && x.current)
|
|
3421
|
+
return;
|
|
3422
|
+
let N = !1;
|
|
3423
|
+
return (async () => {
|
|
3424
|
+
try {
|
|
3425
|
+
const L = await h.getCustomerContact({
|
|
3426
|
+
opendoorOfferRequestId: e
|
|
3427
|
+
});
|
|
3428
|
+
if (N) return;
|
|
3429
|
+
oe(
|
|
3430
|
+
(B) => !v.current && !B && L.fullName ? L.fullName : B
|
|
3431
|
+
), D(
|
|
3432
|
+
(B) => !x.current && !B && L.phoneNumber ? qe(L.phoneNumber) : B
|
|
3433
|
+
);
|
|
3434
|
+
} catch {
|
|
3435
|
+
}
|
|
3436
|
+
})(), () => {
|
|
3437
|
+
N = !0;
|
|
3438
|
+
};
|
|
3439
|
+
}, [h, e]), se(() => {
|
|
3440
|
+
let N = !1;
|
|
3419
3441
|
return (async () => {
|
|
3420
3442
|
try {
|
|
3421
|
-
const
|
|
3422
|
-
if (
|
|
3443
|
+
const L = await h.getAssessmentSlots({ offerId: e });
|
|
3444
|
+
if (N) return;
|
|
3423
3445
|
if (g({
|
|
3424
3446
|
loading: !1,
|
|
3425
3447
|
error: null,
|
|
3426
|
-
availableSlots:
|
|
3427
|
-
isSlotBased:
|
|
3428
|
-
timezone:
|
|
3429
|
-
}),
|
|
3448
|
+
availableSlots: L.availableSlots,
|
|
3449
|
+
isSlotBased: L.isSlotBased,
|
|
3450
|
+
timezone: L.timezone
|
|
3451
|
+
}), L.availableSlots.length > 0)
|
|
3430
3452
|
ne(
|
|
3431
3453
|
yo(
|
|
3432
|
-
_t(
|
|
3454
|
+
_t(L.availableSlots[0], L.timezone)
|
|
3433
3455
|
)
|
|
3434
3456
|
);
|
|
3435
3457
|
else {
|
|
3436
|
-
const
|
|
3437
|
-
ne({ year:
|
|
3458
|
+
const B = /* @__PURE__ */ new Date();
|
|
3459
|
+
ne({ year: B.getFullYear(), month: B.getMonth() });
|
|
3438
3460
|
}
|
|
3439
3461
|
f == null || f();
|
|
3440
|
-
} catch (
|
|
3441
|
-
const
|
|
3442
|
-
if (
|
|
3443
|
-
g((le) => ({ ...le, loading: !1, error:
|
|
3444
|
-
const
|
|
3445
|
-
ne({ year:
|
|
3462
|
+
} catch (L) {
|
|
3463
|
+
const B = L instanceof Error ? L : new Error(String(L));
|
|
3464
|
+
if (N) return;
|
|
3465
|
+
g((le) => ({ ...le, loading: !1, error: B }));
|
|
3466
|
+
const M = /* @__PURE__ */ new Date();
|
|
3467
|
+
ne({ year: M.getFullYear(), month: M.getMonth() }), u == null || u(B);
|
|
3446
3468
|
}
|
|
3447
3469
|
})(), () => {
|
|
3448
|
-
|
|
3470
|
+
N = !0;
|
|
3449
3471
|
};
|
|
3450
3472
|
}, [h, e]);
|
|
3451
|
-
const y =
|
|
3452
|
-
const
|
|
3453
|
-
for (const
|
|
3454
|
-
const
|
|
3455
|
-
|
|
3473
|
+
const y = Ee(() => {
|
|
3474
|
+
const N = /* @__PURE__ */ new Map();
|
|
3475
|
+
for (const L of m.availableSlots) {
|
|
3476
|
+
const B = _t(L, m.timezone), M = N.get(B) ?? [];
|
|
3477
|
+
M.push(L), N.set(B, M);
|
|
3456
3478
|
}
|
|
3457
|
-
return
|
|
3479
|
+
return N;
|
|
3458
3480
|
}, [m.availableSlots, m.timezone]);
|
|
3459
3481
|
if (m.loading || !j)
|
|
3460
3482
|
return /* @__PURE__ */ t.jsx(
|
|
@@ -3476,8 +3498,8 @@ function $o({
|
|
|
3476
3498
|
children: /* @__PURE__ */ t.jsx("div", { className: p.card, children: /* @__PURE__ */ t.jsx("p", { className: p.subtitle, children: "We couldn't load available times. Please try again in a few minutes." }) })
|
|
3477
3499
|
}
|
|
3478
3500
|
);
|
|
3479
|
-
if (
|
|
3480
|
-
const
|
|
3501
|
+
if (C === "success") {
|
|
3502
|
+
const N = P ? new Date(P) : null;
|
|
3481
3503
|
return /* @__PURE__ */ t.jsx(
|
|
3482
3504
|
"div",
|
|
3483
3505
|
{
|
|
@@ -3495,17 +3517,17 @@ function $o({
|
|
|
3495
3517
|
strokeLinejoin: "round"
|
|
3496
3518
|
}
|
|
3497
3519
|
) }) }),
|
|
3498
|
-
/* @__PURE__ */ t.jsx("h2", { className: p.title, children:
|
|
3520
|
+
/* @__PURE__ */ t.jsx("h2", { className: p.title, children: $ ? `${bo($)}, your assessment is scheduled!` : "Your assessment is scheduled!" }),
|
|
3499
3521
|
/* @__PURE__ */ t.jsx("p", { className: p.subtitle, children: "A calendar invite has been sent to your email address." }),
|
|
3500
3522
|
/* @__PURE__ */ t.jsxs("div", { className: p.summaryCard, children: [
|
|
3501
|
-
|
|
3523
|
+
N && /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
3502
3524
|
/* @__PURE__ */ t.jsxs("div", { className: p.summaryRow, children: [
|
|
3503
3525
|
/* @__PURE__ */ t.jsx(ko, {}),
|
|
3504
|
-
/* @__PURE__ */ t.jsx("span", { children: bt(
|
|
3526
|
+
/* @__PURE__ */ t.jsx("span", { children: bt(N, m.timezone) })
|
|
3505
3527
|
] }),
|
|
3506
3528
|
/* @__PURE__ */ t.jsxs("div", { className: p.summaryRow, children: [
|
|
3507
3529
|
/* @__PURE__ */ t.jsx(jo, {}),
|
|
3508
|
-
/* @__PURE__ */ t.jsx("span", { children: yt(
|
|
3530
|
+
/* @__PURE__ */ t.jsx("span", { children: yt(N, m.timezone) })
|
|
3509
3531
|
] })
|
|
3510
3532
|
] }),
|
|
3511
3533
|
s && /* @__PURE__ */ t.jsxs("div", { className: p.summaryRow, children: [
|
|
@@ -3526,29 +3548,29 @@ function $o({
|
|
|
3526
3548
|
}
|
|
3527
3549
|
);
|
|
3528
3550
|
}
|
|
3529
|
-
if (
|
|
3530
|
-
const
|
|
3531
|
-
if (!(!
|
|
3532
|
-
|
|
3551
|
+
if (C === "confirm") {
|
|
3552
|
+
const N = U.replace(/\D/g, ""), L = !K && $.trim().length > 0 && N.length >= 10 && F !== null && (!F || ae.trim().length > 0), B = async () => {
|
|
3553
|
+
if (!(!L || !P)) {
|
|
3554
|
+
q(!0), ue(null);
|
|
3533
3555
|
try {
|
|
3534
|
-
const
|
|
3556
|
+
const M = F ? `Customer: ${$.trim()}. Access instructions: ${ae.trim()}` : `Customer: ${$.trim()}. No gate code or entry restrictions.`, le = await h.scheduleAssessment({
|
|
3535
3557
|
offerId: e,
|
|
3536
3558
|
selectedInspectionTime: P,
|
|
3537
|
-
reminderPhone:
|
|
3538
|
-
notes:
|
|
3559
|
+
reminderPhone: U.replace(/\D/g, ""),
|
|
3560
|
+
notes: M
|
|
3539
3561
|
});
|
|
3540
3562
|
E("success");
|
|
3541
3563
|
try {
|
|
3542
3564
|
await (i == null ? void 0 : i(le.visitId));
|
|
3543
|
-
} catch (
|
|
3544
|
-
const ge =
|
|
3565
|
+
} catch (xe) {
|
|
3566
|
+
const ge = xe instanceof Error ? xe : new Error(String(xe));
|
|
3545
3567
|
u == null || u(ge);
|
|
3546
3568
|
}
|
|
3547
|
-
} catch (
|
|
3548
|
-
const le =
|
|
3569
|
+
} catch (M) {
|
|
3570
|
+
const le = M instanceof Error ? M : new Error(String(M));
|
|
3549
3571
|
ue(le.message), u == null || u(le);
|
|
3550
3572
|
} finally {
|
|
3551
|
-
|
|
3573
|
+
q(!1);
|
|
3552
3574
|
}
|
|
3553
3575
|
}
|
|
3554
3576
|
};
|
|
@@ -3567,8 +3589,8 @@ function $o({
|
|
|
3567
3589
|
{
|
|
3568
3590
|
className: p.input,
|
|
3569
3591
|
type: "text",
|
|
3570
|
-
value:
|
|
3571
|
-
onChange: (
|
|
3592
|
+
value: $,
|
|
3593
|
+
onChange: (M) => oe(M.target.value),
|
|
3572
3594
|
disabled: K
|
|
3573
3595
|
}
|
|
3574
3596
|
)
|
|
@@ -3583,8 +3605,8 @@ function $o({
|
|
|
3583
3605
|
inputMode: "tel",
|
|
3584
3606
|
autoComplete: "tel",
|
|
3585
3607
|
placeholder: "(555) 555-5555",
|
|
3586
|
-
value:
|
|
3587
|
-
onChange: (
|
|
3608
|
+
value: U,
|
|
3609
|
+
onChange: (M) => D(qe(M.target.value)),
|
|
3588
3610
|
disabled: K
|
|
3589
3611
|
}
|
|
3590
3612
|
)
|
|
@@ -3598,7 +3620,7 @@ function $o({
|
|
|
3598
3620
|
{
|
|
3599
3621
|
type: "radio",
|
|
3600
3622
|
name: "gate-code",
|
|
3601
|
-
checked:
|
|
3623
|
+
checked: F === !0,
|
|
3602
3624
|
onChange: () => Z(!0),
|
|
3603
3625
|
disabled: K
|
|
3604
3626
|
}
|
|
@@ -3611,7 +3633,7 @@ function $o({
|
|
|
3611
3633
|
{
|
|
3612
3634
|
type: "radio",
|
|
3613
3635
|
name: "gate-code",
|
|
3614
|
-
checked:
|
|
3636
|
+
checked: F === !1,
|
|
3615
3637
|
onChange: () => Z(!1),
|
|
3616
3638
|
disabled: K
|
|
3617
3639
|
}
|
|
@@ -3620,7 +3642,7 @@ function $o({
|
|
|
3620
3642
|
] })
|
|
3621
3643
|
] })
|
|
3622
3644
|
] }),
|
|
3623
|
-
|
|
3645
|
+
F && /* @__PURE__ */ t.jsxs("label", { className: p.field, children: [
|
|
3624
3646
|
/* @__PURE__ */ t.jsx("span", { className: p.fieldLabel, children: "Please provide access instructions for your home." }),
|
|
3625
3647
|
/* @__PURE__ */ t.jsx(
|
|
3626
3648
|
"input",
|
|
@@ -3629,12 +3651,12 @@ function $o({
|
|
|
3629
3651
|
type: "text",
|
|
3630
3652
|
placeholder: "Gate code, directions, etc.",
|
|
3631
3653
|
value: ae,
|
|
3632
|
-
onChange: (
|
|
3654
|
+
onChange: (M) => z(M.target.value),
|
|
3633
3655
|
disabled: K
|
|
3634
3656
|
}
|
|
3635
3657
|
)
|
|
3636
3658
|
] }),
|
|
3637
|
-
|
|
3659
|
+
ie && /* @__PURE__ */ t.jsx("p", { className: p.errorText, children: ie }),
|
|
3638
3660
|
/* @__PURE__ */ t.jsxs("div", { className: p.actionsRow, children: [
|
|
3639
3661
|
/* @__PURE__ */ t.jsx(
|
|
3640
3662
|
"button",
|
|
@@ -3651,8 +3673,8 @@ function $o({
|
|
|
3651
3673
|
{
|
|
3652
3674
|
type: "button",
|
|
3653
3675
|
className: p.primaryButton,
|
|
3654
|
-
onClick: () => void
|
|
3655
|
-
disabled: !
|
|
3676
|
+
onClick: () => void B(),
|
|
3677
|
+
disabled: !L,
|
|
3656
3678
|
children: K ? "Scheduling…" : "Schedule"
|
|
3657
3679
|
}
|
|
3658
3680
|
)
|
|
@@ -3662,7 +3684,7 @@ function $o({
|
|
|
3662
3684
|
}
|
|
3663
3685
|
);
|
|
3664
3686
|
}
|
|
3665
|
-
const
|
|
3687
|
+
const R = vo(j), J = xo(j), ye = Co(j, y), he = wo(j, y), me = k ? y.get(k) ?? [] : [], pe = me[0] ? bt(new Date(me[0]), m.timezone) : null;
|
|
3666
3688
|
return /* @__PURE__ */ t.jsx(
|
|
3667
3689
|
"div",
|
|
3668
3690
|
{
|
|
@@ -3675,10 +3697,10 @@ function $o({
|
|
|
3675
3697
|
/* @__PURE__ */ t.jsx("h2", { className: p.titleLarge, children: "Schedule your assessment" }),
|
|
3676
3698
|
/* @__PURE__ */ t.jsx("p", { className: p.subtitleLeft, children: "Pick a time that works for you." })
|
|
3677
3699
|
] }),
|
|
3678
|
-
/* @__PURE__ */ t.jsx("div", { className: p.featuresList, children: Io.map((
|
|
3679
|
-
/* @__PURE__ */ t.jsx("p", { className: p.featureTitle, children:
|
|
3680
|
-
/* @__PURE__ */ t.jsx("p", { className: p.featureDescription, children:
|
|
3681
|
-
] },
|
|
3700
|
+
/* @__PURE__ */ t.jsx("div", { className: p.featuresList, children: Io.map((N) => /* @__PURE__ */ t.jsxs("div", { className: p.feature, children: [
|
|
3701
|
+
/* @__PURE__ */ t.jsx("p", { className: p.featureTitle, children: N.title }),
|
|
3702
|
+
/* @__PURE__ */ t.jsx("p", { className: p.featureDescription, children: N.description })
|
|
3703
|
+
] }, N.title)) })
|
|
3682
3704
|
] }),
|
|
3683
3705
|
/* @__PURE__ */ t.jsxs("div", { className: p.schedule, children: [
|
|
3684
3706
|
/* @__PURE__ */ t.jsxs("div", { className: p.calendarHeader, children: [
|
|
@@ -3688,60 +3710,60 @@ function $o({
|
|
|
3688
3710
|
type: "button",
|
|
3689
3711
|
className: p.calendarNavButton,
|
|
3690
3712
|
onClick: () => ne(vt(j, -1)),
|
|
3691
|
-
disabled: !
|
|
3713
|
+
disabled: !ye,
|
|
3692
3714
|
"aria-label": "Previous month",
|
|
3693
3715
|
children: "‹"
|
|
3694
3716
|
}
|
|
3695
3717
|
),
|
|
3696
|
-
/* @__PURE__ */ t.jsx("span", { className: p.calendarMonthLabel, children:
|
|
3718
|
+
/* @__PURE__ */ t.jsx("span", { className: p.calendarMonthLabel, children: J }),
|
|
3697
3719
|
/* @__PURE__ */ t.jsx(
|
|
3698
3720
|
"button",
|
|
3699
3721
|
{
|
|
3700
3722
|
type: "button",
|
|
3701
3723
|
className: p.calendarNavButton,
|
|
3702
3724
|
onClick: () => ne(vt(j, 1)),
|
|
3703
|
-
disabled: !
|
|
3725
|
+
disabled: !he,
|
|
3704
3726
|
"aria-label": "Next month",
|
|
3705
3727
|
children: "›"
|
|
3706
3728
|
}
|
|
3707
3729
|
)
|
|
3708
3730
|
] }),
|
|
3709
3731
|
/* @__PURE__ */ t.jsxs("div", { className: p.calendarGrid, children: [
|
|
3710
|
-
["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"].map((
|
|
3711
|
-
|
|
3712
|
-
const
|
|
3732
|
+
["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"].map((N) => /* @__PURE__ */ t.jsx("div", { className: p.calendarDayHeader, children: N }, N)),
|
|
3733
|
+
R.map((N, L) => {
|
|
3734
|
+
const B = N ? y.has(N.key) : !1, M = !!N && N.key === k;
|
|
3713
3735
|
return /* @__PURE__ */ t.jsx(
|
|
3714
3736
|
"button",
|
|
3715
3737
|
{
|
|
3716
3738
|
type: "button",
|
|
3717
|
-
className:
|
|
3739
|
+
className: M ? p.calendarDaySelected : B ? p.calendarDayAvailable : p.calendarDayDisabled,
|
|
3718
3740
|
onClick: () => {
|
|
3719
|
-
|
|
3741
|
+
N && B && (H(N.key), Y(null));
|
|
3720
3742
|
},
|
|
3721
|
-
disabled: !
|
|
3722
|
-
"aria-pressed": !!
|
|
3723
|
-
children:
|
|
3743
|
+
disabled: !B,
|
|
3744
|
+
"aria-pressed": !!M,
|
|
3745
|
+
children: N ? N.day : ""
|
|
3724
3746
|
},
|
|
3725
|
-
|
|
3747
|
+
N ? N.key : `empty-${J}-${L}`
|
|
3726
3748
|
);
|
|
3727
3749
|
})
|
|
3728
3750
|
] }),
|
|
3729
|
-
|
|
3751
|
+
pe && /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
3730
3752
|
/* @__PURE__ */ t.jsxs("p", { className: p.timesHeader, children: [
|
|
3731
3753
|
"Available times for ",
|
|
3732
|
-
|
|
3754
|
+
pe
|
|
3733
3755
|
] }),
|
|
3734
|
-
/* @__PURE__ */ t.jsx("div", { className: p.timeRow, children:
|
|
3735
|
-
const
|
|
3756
|
+
/* @__PURE__ */ t.jsx("div", { className: p.timeRow, children: me.map((N) => {
|
|
3757
|
+
const L = N === P;
|
|
3736
3758
|
return /* @__PURE__ */ t.jsx(
|
|
3737
3759
|
"button",
|
|
3738
3760
|
{
|
|
3739
3761
|
type: "button",
|
|
3740
|
-
className:
|
|
3741
|
-
onClick: () => Y(
|
|
3742
|
-
children: yt(new Date(
|
|
3762
|
+
className: L ? p.timeButtonSelected : p.timeButton,
|
|
3763
|
+
onClick: () => Y(N),
|
|
3764
|
+
children: yt(new Date(N), m.timezone)
|
|
3743
3765
|
},
|
|
3744
|
-
|
|
3766
|
+
N
|
|
3745
3767
|
);
|
|
3746
3768
|
}) })
|
|
3747
3769
|
] }),
|
|
@@ -3763,7 +3785,7 @@ function $o({
|
|
|
3763
3785
|
function bo(e) {
|
|
3764
3786
|
return e.trim().split(/\s+/)[0] ?? "";
|
|
3765
3787
|
}
|
|
3766
|
-
function
|
|
3788
|
+
function qe(e) {
|
|
3767
3789
|
const r = e.replace(/\D/g, "").slice(0, 10);
|
|
3768
3790
|
return r.length === 0 ? "" : r.length <= 3 ? `(${r}` : r.length <= 6 ? `(${r.slice(0, 3)}) ${r.slice(3)}` : `(${r.slice(0, 3)}) ${r.slice(3, 6)}-${r.slice(6)}`;
|
|
3769
3791
|
}
|
|
@@ -3834,7 +3856,7 @@ function wo(e, r) {
|
|
|
3834
3856
|
}
|
|
3835
3857
|
return !1;
|
|
3836
3858
|
}
|
|
3837
|
-
function
|
|
3859
|
+
function ze() {
|
|
3838
3860
|
return {
|
|
3839
3861
|
width: 16,
|
|
3840
3862
|
height: 16,
|
|
@@ -3849,19 +3871,19 @@ function Ke() {
|
|
|
3849
3871
|
};
|
|
3850
3872
|
}
|
|
3851
3873
|
function ko() {
|
|
3852
|
-
return /* @__PURE__ */ t.jsxs("svg", { ...
|
|
3874
|
+
return /* @__PURE__ */ t.jsxs("svg", { ...ze(), children: [
|
|
3853
3875
|
/* @__PURE__ */ t.jsx("rect", { x: "2", y: "3.5", width: "12", height: "11", rx: "1.5" }),
|
|
3854
3876
|
/* @__PURE__ */ t.jsx("path", { d: "M2 6.5h12M5.5 2v3M10.5 2v3" })
|
|
3855
3877
|
] });
|
|
3856
3878
|
}
|
|
3857
3879
|
function jo() {
|
|
3858
|
-
return /* @__PURE__ */ t.jsxs("svg", { ...
|
|
3880
|
+
return /* @__PURE__ */ t.jsxs("svg", { ...ze(), children: [
|
|
3859
3881
|
/* @__PURE__ */ t.jsx("circle", { cx: "8", cy: "8", r: "6" }),
|
|
3860
3882
|
/* @__PURE__ */ t.jsx("path", { d: "M8 4.5V8l2.5 1.5" })
|
|
3861
3883
|
] });
|
|
3862
3884
|
}
|
|
3863
3885
|
function No() {
|
|
3864
|
-
return /* @__PURE__ */ t.jsxs("svg", { ...
|
|
3886
|
+
return /* @__PURE__ */ t.jsxs("svg", { ...ze(), children: [
|
|
3865
3887
|
/* @__PURE__ */ t.jsx("path", { d: "M8 14s-4.5-4-4.5-7.5a4.5 4.5 0 1 1 9 0C12.5 10 8 14 8 14z" }),
|
|
3866
3888
|
/* @__PURE__ */ t.jsx("circle", { cx: "8", cy: "6.5", r: "1.5" })
|
|
3867
3889
|
] });
|