@opendoor/partner-sdk-client-react 1.2.1-beta.103.1 → 1.2.1-beta.105.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/client-react/src/components/DtcOnboardingFlow/DtcProvider.d.ts +1 -1
- package/dist/client-react/src/components/DtcOnboardingFlow/DtcProvider.d.ts.map +1 -1
- package/dist/client-react/src/components/DtcOnboardingFlow/index.d.ts +21 -2
- package/dist/client-react/src/components/DtcOnboardingFlow/index.d.ts.map +1 -1
- package/dist/index.js +499 -498
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import xt, { createContext as Ue, useState as
|
|
1
|
+
import xt, { createContext as Ue, useState as S, useEffect as oe, useContext as De, useRef as G, useMemo as Ie, useCallback as Ee, useLayoutEffect as Ut } from "react";
|
|
2
2
|
import { createPortal as Gt } from "react-dom";
|
|
3
3
|
var qe = { exports: {} }, je = {};
|
|
4
4
|
/*
|
|
@@ -94,51 +94,51 @@ function Zt() {
|
|
|
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, x = 60116,
|
|
97
|
+
var i = 60108, _ = 60114, f = 60109, u = 60110, h = 60112, d = 60113, m = 60120, g = 60115, x = 60116, E = 60121, k = 60122, W = 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"), x = j("react.lazy"),
|
|
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"), x = j("react.lazy"), E = j("react.block"), k = j("react.server.block"), W = 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
|
|
103
|
-
function
|
|
102
|
+
var ne = typeof Symbol == "function" && Symbol.iterator, M = "@@iterator";
|
|
103
|
+
function ie(n) {
|
|
104
104
|
if (n === null || typeof n != "object")
|
|
105
105
|
return null;
|
|
106
|
-
var c =
|
|
106
|
+
var c = ne && n[ne] || n[M];
|
|
107
107
|
return typeof c == "function" ? c : null;
|
|
108
108
|
}
|
|
109
|
-
var
|
|
110
|
-
function
|
|
109
|
+
var q = r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
110
|
+
function A(n) {
|
|
111
111
|
{
|
|
112
112
|
for (var c = arguments.length, b = new Array(c > 1 ? c - 1 : 0), N = 1; N < c; N++)
|
|
113
113
|
b[N - 1] = arguments[N];
|
|
114
|
-
|
|
114
|
+
$("error", n, b);
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
|
-
function
|
|
117
|
+
function $(n, c, b) {
|
|
118
118
|
{
|
|
119
|
-
var N =
|
|
120
|
-
|
|
121
|
-
var
|
|
122
|
-
return "" +
|
|
119
|
+
var N = q.ReactDebugCurrentFrame, H = N.getStackAddendum();
|
|
120
|
+
H !== "" && (c += "%s", b = b.concat([H]));
|
|
121
|
+
var F = b.map(function(T) {
|
|
122
|
+
return "" + T;
|
|
123
123
|
});
|
|
124
|
-
|
|
124
|
+
F.unshift("Warning: " + c), Function.prototype.apply.call(console[n], console, F);
|
|
125
125
|
}
|
|
126
126
|
}
|
|
127
|
-
var
|
|
128
|
-
function
|
|
129
|
-
return !!(typeof n == "string" || typeof n == "function" || n === e.Fragment || n === _ || n ===
|
|
127
|
+
var Z = !1;
|
|
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 === x || n.$$typeof === g || n.$$typeof === f || n.$$typeof === u || n.$$typeof === h || n.$$typeof === W || n.$$typeof === E || n[0] === k));
|
|
130
130
|
}
|
|
131
|
-
function
|
|
131
|
+
function z(n, c, b) {
|
|
132
132
|
var N = c.displayName || c.name || "";
|
|
133
133
|
return n.displayName || (N !== "" ? b + "(" + N + ")" : b);
|
|
134
134
|
}
|
|
135
|
-
function
|
|
135
|
+
function K(n) {
|
|
136
136
|
return n.displayName || "Context";
|
|
137
137
|
}
|
|
138
|
-
function
|
|
138
|
+
function V(n) {
|
|
139
139
|
if (n == null)
|
|
140
140
|
return null;
|
|
141
|
-
if (typeof n.tag == "number" &&
|
|
141
|
+
if (typeof n.tag == "number" && A("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;
|
|
@@ -160,20 +160,20 @@ function Zt() {
|
|
|
160
160
|
switch (n.$$typeof) {
|
|
161
161
|
case u:
|
|
162
162
|
var c = n;
|
|
163
|
-
return
|
|
163
|
+
return K(c) + ".Consumer";
|
|
164
164
|
case f:
|
|
165
165
|
var b = n;
|
|
166
|
-
return
|
|
166
|
+
return K(b._context) + ".Provider";
|
|
167
167
|
case h:
|
|
168
|
-
return
|
|
168
|
+
return z(n, n.render, "ForwardRef");
|
|
169
169
|
case g:
|
|
170
|
-
return
|
|
171
|
-
case
|
|
172
|
-
return
|
|
170
|
+
return V(n.type);
|
|
171
|
+
case E:
|
|
172
|
+
return V(n._render);
|
|
173
173
|
case x: {
|
|
174
|
-
var N = n,
|
|
174
|
+
var N = n, H = N._payload, F = N._init;
|
|
175
175
|
try {
|
|
176
|
-
return F(
|
|
176
|
+
return V(F(H));
|
|
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 se = 0, ue, y, C, v, O, Q, pe;
|
|
185
185
|
function he() {
|
|
186
186
|
}
|
|
187
187
|
he.__reactDisabledLog = !0;
|
|
188
188
|
function I() {
|
|
189
189
|
{
|
|
190
|
-
if (
|
|
191
|
-
|
|
190
|
+
if (se === 0) {
|
|
191
|
+
ue = console.log, y = console.info, C = console.warn, v = console.error, O = console.group, Q = console.groupCollapsed, pe = 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
|
+
se++;
|
|
209
209
|
}
|
|
210
210
|
}
|
|
211
|
-
function
|
|
211
|
+
function R() {
|
|
212
212
|
{
|
|
213
|
-
if (
|
|
213
|
+
if (se--, se === 0) {
|
|
214
214
|
var n = {
|
|
215
215
|
configurable: !0,
|
|
216
216
|
enumerable: !0,
|
|
@@ -218,7 +218,7 @@ function Zt() {
|
|
|
218
218
|
};
|
|
219
219
|
Object.defineProperties(console, {
|
|
220
220
|
log: a({}, n, {
|
|
221
|
-
value:
|
|
221
|
+
value: ue
|
|
222
222
|
}),
|
|
223
223
|
info: a({}, n, {
|
|
224
224
|
value: y
|
|
@@ -230,31 +230,31 @@ function Zt() {
|
|
|
230
230
|
value: v
|
|
231
231
|
}),
|
|
232
232
|
group: a({}, n, {
|
|
233
|
-
value:
|
|
233
|
+
value: O
|
|
234
234
|
}),
|
|
235
235
|
groupCollapsed: a({}, n, {
|
|
236
|
-
value:
|
|
236
|
+
value: Q
|
|
237
237
|
}),
|
|
238
238
|
groupEnd: a({}, n, {
|
|
239
239
|
value: pe
|
|
240
240
|
})
|
|
241
241
|
});
|
|
242
242
|
}
|
|
243
|
-
|
|
243
|
+
se < 0 && A("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
244
244
|
}
|
|
245
245
|
}
|
|
246
|
-
var
|
|
246
|
+
var U = q.ReactCurrentDispatcher, B;
|
|
247
247
|
function le(n, c, b) {
|
|
248
248
|
{
|
|
249
|
-
if (
|
|
249
|
+
if (B === void 0)
|
|
250
250
|
try {
|
|
251
251
|
throw Error();
|
|
252
|
-
} catch (
|
|
253
|
-
var N =
|
|
254
|
-
|
|
252
|
+
} catch (H) {
|
|
253
|
+
var N = H.stack.trim().match(/\n( *(at )?)/);
|
|
254
|
+
B = N && N[1] || "";
|
|
255
255
|
}
|
|
256
256
|
return `
|
|
257
|
-
` +
|
|
257
|
+
` + B + n;
|
|
258
258
|
}
|
|
259
259
|
}
|
|
260
260
|
var fe = !1, ge;
|
|
@@ -272,33 +272,33 @@ function Zt() {
|
|
|
272
272
|
}
|
|
273
273
|
var N;
|
|
274
274
|
fe = !0;
|
|
275
|
-
var
|
|
275
|
+
var H = Error.prepareStackTrace;
|
|
276
276
|
Error.prepareStackTrace = void 0;
|
|
277
|
-
var
|
|
278
|
-
|
|
277
|
+
var F;
|
|
278
|
+
F = U.current, U.current = null, I();
|
|
279
279
|
try {
|
|
280
280
|
if (c) {
|
|
281
|
-
var
|
|
281
|
+
var T = function() {
|
|
282
282
|
throw Error();
|
|
283
283
|
};
|
|
284
|
-
if (Object.defineProperty(
|
|
284
|
+
if (Object.defineProperty(T.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(T, []);
|
|
291
291
|
} catch (be) {
|
|
292
292
|
N = be;
|
|
293
293
|
}
|
|
294
|
-
Reflect.construct(n, [],
|
|
294
|
+
Reflect.construct(n, [], T);
|
|
295
295
|
} else {
|
|
296
296
|
try {
|
|
297
|
-
|
|
297
|
+
T.call();
|
|
298
298
|
} catch (be) {
|
|
299
299
|
N = be;
|
|
300
300
|
}
|
|
301
|
-
n.call(
|
|
301
|
+
n.call(T.prototype);
|
|
302
302
|
}
|
|
303
303
|
} else {
|
|
304
304
|
try {
|
|
@@ -310,25 +310,25 @@ function Zt() {
|
|
|
310
310
|
}
|
|
311
311
|
} catch (be) {
|
|
312
312
|
if (be && N && typeof be.stack == "string") {
|
|
313
|
-
for (var
|
|
313
|
+
for (var L = be.stack.split(`
|
|
314
314
|
`), ce = N.stack.split(`
|
|
315
|
-
`),
|
|
316
|
-
|
|
317
|
-
for (;
|
|
318
|
-
if (
|
|
319
|
-
if (
|
|
315
|
+
`), X = L.length - 1, te = ce.length - 1; X >= 1 && te >= 0 && L[X] !== ce[te]; )
|
|
316
|
+
te--;
|
|
317
|
+
for (; X >= 1 && te >= 0; X--, te--)
|
|
318
|
+
if (L[X] !== ce[te]) {
|
|
319
|
+
if (X !== 1 || te !== 1)
|
|
320
320
|
do
|
|
321
|
-
if (
|
|
321
|
+
if (X--, te--, te < 0 || L[X] !== ce[te]) {
|
|
322
322
|
var _e = `
|
|
323
|
-
` +
|
|
323
|
+
` + L[X].replace(" at new ", " at ");
|
|
324
324
|
return typeof n == "function" && ge.set(n, _e), _e;
|
|
325
325
|
}
|
|
326
|
-
while (
|
|
326
|
+
while (X >= 1 && te >= 0);
|
|
327
327
|
break;
|
|
328
328
|
}
|
|
329
329
|
}
|
|
330
330
|
} finally {
|
|
331
|
-
fe = !1,
|
|
331
|
+
fe = !1, U.current = F, R(), Error.prepareStackTrace = H;
|
|
332
332
|
}
|
|
333
333
|
var ke = n ? n.displayName || n.name : "", at = ke ? le(ke) : "";
|
|
334
334
|
return typeof n == "function" && ge.set(n, at), at;
|
|
@@ -359,46 +359,46 @@ function Zt() {
|
|
|
359
359
|
return Pe(n.render);
|
|
360
360
|
case g:
|
|
361
361
|
return w(n.type, c, b);
|
|
362
|
-
case
|
|
362
|
+
case E:
|
|
363
363
|
return Pe(n._render);
|
|
364
364
|
case x: {
|
|
365
|
-
var N = n,
|
|
365
|
+
var N = n, H = N._payload, F = N._init;
|
|
366
366
|
try {
|
|
367
|
-
return w(
|
|
367
|
+
return w(F(H), c, b);
|
|
368
368
|
} catch {
|
|
369
369
|
}
|
|
370
370
|
}
|
|
371
371
|
}
|
|
372
372
|
return "";
|
|
373
373
|
}
|
|
374
|
-
var
|
|
374
|
+
var J = {}, ee = q.ReactDebugCurrentFrame;
|
|
375
375
|
function xe(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 Ce(n, c, b, N,
|
|
382
|
+
function Ce(n, c, b, N, H) {
|
|
383
383
|
{
|
|
384
|
-
var
|
|
385
|
-
for (var
|
|
386
|
-
if (
|
|
387
|
-
var
|
|
384
|
+
var F = Function.call.bind(Object.prototype.hasOwnProperty);
|
|
385
|
+
for (var T in n)
|
|
386
|
+
if (F(n, T)) {
|
|
387
|
+
var L = void 0;
|
|
388
388
|
try {
|
|
389
|
-
if (typeof n[
|
|
390
|
-
var ce = Error((N || "React class") + ": " + b + " type `" +
|
|
389
|
+
if (typeof n[T] != "function") {
|
|
390
|
+
var ce = Error((N || "React class") + ": " + b + " type `" + T + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof n[T] + "`.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
|
+
L = n[T](c, T, N, b, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
394
|
+
} catch (X) {
|
|
395
|
+
L = X;
|
|
396
396
|
}
|
|
397
|
-
|
|
397
|
+
L && !(L instanceof Error) && (xe(H), A("%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).", N || "React class", b, T, typeof L), xe(null)), L instanceof Error && !(L.message in J) && (J[L.message] = !0, xe(H), A("Failed %s type: %s", b, L.message), xe(null));
|
|
398
398
|
}
|
|
399
399
|
}
|
|
400
400
|
}
|
|
401
|
-
var Ne =
|
|
401
|
+
var Ne = q.ReactCurrentOwner, Re = Object.prototype.hasOwnProperty, St = {
|
|
402
402
|
key: !0,
|
|
403
403
|
ref: !0,
|
|
404
404
|
__self: !0,
|
|
@@ -426,7 +426,7 @@ function Zt() {
|
|
|
426
426
|
function Dt(n, c) {
|
|
427
427
|
{
|
|
428
428
|
var b = function() {
|
|
429
|
-
ze || (ze = !0,
|
|
429
|
+
ze || (ze = !0, A("%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
|
-
Je || (Je = !0,
|
|
440
|
+
Je || (Je = !0, A("%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,54 +445,54 @@ function Zt() {
|
|
|
445
445
|
});
|
|
446
446
|
}
|
|
447
447
|
}
|
|
448
|
-
var Ot = function(n, c, b, N,
|
|
449
|
-
var
|
|
448
|
+
var Ot = function(n, c, b, N, H, F, T) {
|
|
449
|
+
var L = {
|
|
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: T,
|
|
457
457
|
// Record the component responsible for creating this element.
|
|
458
|
-
_owner:
|
|
458
|
+
_owner: F
|
|
459
459
|
};
|
|
460
|
-
return
|
|
460
|
+
return L._store = {}, Object.defineProperty(L._store, "validated", {
|
|
461
461
|
configurable: !1,
|
|
462
462
|
enumerable: !1,
|
|
463
463
|
writable: !0,
|
|
464
464
|
value: !1
|
|
465
|
-
}), Object.defineProperty(
|
|
465
|
+
}), Object.defineProperty(L, "_self", {
|
|
466
466
|
configurable: !1,
|
|
467
467
|
enumerable: !1,
|
|
468
468
|
writable: !1,
|
|
469
469
|
value: N
|
|
470
|
-
}), Object.defineProperty(
|
|
470
|
+
}), Object.defineProperty(L, "_source", {
|
|
471
471
|
configurable: !1,
|
|
472
472
|
enumerable: !1,
|
|
473
473
|
writable: !1,
|
|
474
|
-
value:
|
|
475
|
-
}), Object.freeze && (Object.freeze(
|
|
474
|
+
value: H
|
|
475
|
+
}), Object.freeze && (Object.freeze(L.props), Object.freeze(L)), L;
|
|
476
476
|
};
|
|
477
|
-
function Rt(n, c, b, N,
|
|
477
|
+
function Rt(n, c, b, N, H) {
|
|
478
478
|
{
|
|
479
|
-
var
|
|
480
|
-
b !== void 0 && (
|
|
481
|
-
for (
|
|
482
|
-
Re.call(c,
|
|
479
|
+
var F, T = {}, L = null, ce = null;
|
|
480
|
+
b !== void 0 && (L = "" + b), Lt(c) && (L = "" + c.key), Pt(c) && (ce = c.ref, Tt(c, H));
|
|
481
|
+
for (F in c)
|
|
482
|
+
Re.call(c, F) && !St.hasOwnProperty(F) && (T[F] = c[F]);
|
|
483
483
|
if (n && n.defaultProps) {
|
|
484
|
-
var
|
|
485
|
-
for (
|
|
486
|
-
|
|
484
|
+
var X = n.defaultProps;
|
|
485
|
+
for (F in X)
|
|
486
|
+
T[F] === void 0 && (T[F] = X[F]);
|
|
487
487
|
}
|
|
488
|
-
if (
|
|
489
|
-
var
|
|
490
|
-
|
|
488
|
+
if (L || ce) {
|
|
489
|
+
var te = typeof n == "function" ? n.displayName || n.name || "Unknown" : n;
|
|
490
|
+
L && Dt(T, te), ce && At(T, te);
|
|
491
491
|
}
|
|
492
|
-
return Ot(n,
|
|
492
|
+
return Ot(n, L, ce, H, N, Ne.current, T);
|
|
493
493
|
}
|
|
494
494
|
}
|
|
495
|
-
var Be =
|
|
495
|
+
var Be = q.ReactCurrentOwner, Xe = q.ReactDebugCurrentFrame;
|
|
496
496
|
function we(n) {
|
|
497
497
|
if (n) {
|
|
498
498
|
var c = n._owner, b = w(n.type, n._source, c ? c.type : null);
|
|
@@ -508,7 +508,7 @@ function Zt() {
|
|
|
508
508
|
function Qe() {
|
|
509
509
|
{
|
|
510
510
|
if (Be.current) {
|
|
511
|
-
var n =
|
|
511
|
+
var n = V(Be.current.type);
|
|
512
512
|
if (n)
|
|
513
513
|
return `
|
|
514
514
|
|
|
@@ -543,7 +543,7 @@ Check the top-level render call using <` + b + ">.");
|
|
|
543
543
|
return;
|
|
544
544
|
et[b] = !0;
|
|
545
545
|
var N = "";
|
|
546
|
-
n && n._owner && n._owner !== Be.current && (N = " It was passed a child from " +
|
|
546
|
+
n && n._owner && n._owner !== Be.current && (N = " It was passed a child from " + V(n._owner.type) + "."), we(n), A('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', b, N), we(null);
|
|
547
547
|
}
|
|
548
548
|
}
|
|
549
549
|
function rt(n, c) {
|
|
@@ -558,10 +558,10 @@ Check the top-level render call using <` + b + ">.");
|
|
|
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 H = ie(n);
|
|
562
|
+
if (typeof H == "function" && H !== n.entries)
|
|
563
|
+
for (var F = H.call(n), T; !(T = F.next()).done; )
|
|
564
|
+
$e(T.value) && tt(T.value, c);
|
|
565
565
|
}
|
|
566
566
|
}
|
|
567
567
|
}
|
|
@@ -580,14 +580,14 @@ Check the top-level render call using <` + b + ">.");
|
|
|
580
580
|
else
|
|
581
581
|
return;
|
|
582
582
|
if (b) {
|
|
583
|
-
var N =
|
|
583
|
+
var N = V(c);
|
|
584
584
|
Ce(b, n.props, "prop", N, n);
|
|
585
585
|
} else if (c.PropTypes !== void 0 && !Me) {
|
|
586
586
|
Me = !0;
|
|
587
|
-
var
|
|
588
|
-
|
|
587
|
+
var H = V(c);
|
|
588
|
+
A("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", H || "Unknown");
|
|
589
589
|
}
|
|
590
|
-
typeof c.getDefaultProps == "function" && !c.getDefaultProps.isReactClassApproved &&
|
|
590
|
+
typeof c.getDefaultProps == "function" && !c.getDefaultProps.isReactClassApproved && A("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) {
|
|
@@ -595,28 +595,28 @@ Check the top-level render call using <` + b + ">.");
|
|
|
595
595
|
for (var c = Object.keys(n.props), b = 0; b < c.length; b++) {
|
|
596
596
|
var N = c[b];
|
|
597
597
|
if (N !== "children" && N !== "key") {
|
|
598
|
-
we(n),
|
|
598
|
+
we(n), A("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", N), we(null);
|
|
599
599
|
break;
|
|
600
600
|
}
|
|
601
601
|
}
|
|
602
|
-
n.ref !== null && (we(n),
|
|
602
|
+
n.ref !== null && (we(n), A("Invalid attribute `ref` supplied to `React.Fragment`."), we(null));
|
|
603
603
|
}
|
|
604
604
|
}
|
|
605
|
-
function nt(n, c, b, N,
|
|
605
|
+
function nt(n, c, b, N, H, F) {
|
|
606
606
|
{
|
|
607
|
-
var
|
|
608
|
-
if (!
|
|
609
|
-
var
|
|
610
|
-
(n === void 0 || typeof n == "object" && n !== null && Object.keys(n).length === 0) && (
|
|
607
|
+
var T = ae(n);
|
|
608
|
+
if (!T) {
|
|
609
|
+
var L = "";
|
|
610
|
+
(n === void 0 || typeof n == "object" && n !== null && Object.keys(n).length === 0) && (L += " 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 ? L += ce : L += Qe();
|
|
613
|
+
var X;
|
|
614
|
+
n === null ? X = "null" : Array.isArray(n) ? X = "array" : n !== void 0 && n.$$typeof === s ? (X = "<" + (V(n.type) || "Unknown") + " />", L = " Did you accidentally export a JSX literal instead of a component?") : X = typeof n, A("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", X, L);
|
|
615
615
|
}
|
|
616
|
-
var
|
|
617
|
-
if (
|
|
618
|
-
return
|
|
619
|
-
if (
|
|
616
|
+
var te = Rt(n, c, b, H, F);
|
|
617
|
+
if (te == null)
|
|
618
|
+
return te;
|
|
619
|
+
if (T) {
|
|
620
620
|
var _e = c.children;
|
|
621
621
|
if (_e !== void 0)
|
|
622
622
|
if (N)
|
|
@@ -625,11 +625,11 @@ Check the top-level render call using <` + b + ">.");
|
|
|
625
625
|
rt(_e[ke], n);
|
|
626
626
|
Object.freeze && Object.freeze(_e);
|
|
627
627
|
} else
|
|
628
|
-
|
|
628
|
+
A("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
|
rt(_e, n);
|
|
631
631
|
}
|
|
632
|
-
return n === e.Fragment ? Ft(
|
|
632
|
+
return n === e.Fragment ? Ft(te) : $t(te), te;
|
|
633
633
|
}
|
|
634
634
|
}
|
|
635
635
|
function Wt(n, c, b) {
|
|
@@ -764,8 +764,8 @@ const Ge = {
|
|
|
764
764
|
client: e,
|
|
765
765
|
children: r
|
|
766
766
|
}) => {
|
|
767
|
-
const [a, s] =
|
|
768
|
-
return
|
|
767
|
+
const [a, s] = S(Ge);
|
|
768
|
+
return oe(() => {
|
|
769
769
|
const o = new ir(e.environment);
|
|
770
770
|
return s(o), () => {
|
|
771
771
|
o.destroy();
|
|
@@ -780,10 +780,10 @@ const Ge = {
|
|
|
780
780
|
return e;
|
|
781
781
|
}, Ze = () => De(wt);
|
|
782
782
|
function jt(e, r = {}) {
|
|
783
|
-
const a = Ze(), s =
|
|
783
|
+
const a = Ze(), s = G(a);
|
|
784
784
|
s.current = a;
|
|
785
|
-
const o =
|
|
786
|
-
return
|
|
785
|
+
const o = G(null), i = G(!1);
|
|
786
|
+
return oe(() => {
|
|
787
787
|
const _ = o.current;
|
|
788
788
|
if (!_ || !e || i.current) return;
|
|
789
789
|
const f = new IntersectionObserver(
|
|
@@ -921,7 +921,7 @@ function fr() {
|
|
|
921
921
|
/* @__PURE__ */ t.jsx(hr, {})
|
|
922
922
|
] });
|
|
923
923
|
}
|
|
924
|
-
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",
|
|
924
|
+
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", D = {
|
|
925
925
|
container: mr,
|
|
926
926
|
inputSection: pr,
|
|
927
927
|
inputWrapper: gr,
|
|
@@ -1002,59 +1002,59 @@ function Ao({
|
|
|
1002
1002
|
appearance: m,
|
|
1003
1003
|
onReady: g,
|
|
1004
1004
|
onChange: x,
|
|
1005
|
-
onValidationError:
|
|
1005
|
+
onValidationError: E,
|
|
1006
1006
|
onAddressSuggestionsStart: k,
|
|
1007
|
-
onAddressSuggestionsComplete:
|
|
1008
|
-
onError:
|
|
1007
|
+
onAddressSuggestionsComplete: W,
|
|
1008
|
+
onError: P
|
|
1009
1009
|
}) {
|
|
1010
|
-
const
|
|
1010
|
+
const Y = kt(), j = Ze(), ne = Se(m), [M, ie] = S(""), [q, A] = S([]), [$, Z] = S(!1), [ae, z] = S(!1), [K, V] = S(null), [se, ue] = S(!1), [y, C] = S(!1), [v, O] = S({
|
|
1011
1011
|
street1: "",
|
|
1012
1012
|
street2: "",
|
|
1013
1013
|
city: "",
|
|
1014
1014
|
state: "",
|
|
1015
1015
|
postalCode: ""
|
|
1016
|
-
}),
|
|
1016
|
+
}), Q = G(null), pe = jt("partner-sdk-address-input", {
|
|
1017
1017
|
immediate: !0
|
|
1018
|
-
}), he =
|
|
1019
|
-
he.current =
|
|
1020
|
-
const I =
|
|
1018
|
+
}), he = G(P);
|
|
1019
|
+
he.current = P;
|
|
1020
|
+
const I = G(k);
|
|
1021
1021
|
I.current = k;
|
|
1022
|
-
const
|
|
1023
|
-
|
|
1024
|
-
const
|
|
1025
|
-
|
|
1022
|
+
const R = G(W);
|
|
1023
|
+
R.current = W;
|
|
1024
|
+
const U = G(null), B = $ && !ae && M.trim().length >= 3 && q.length === 0 && !y;
|
|
1025
|
+
oe(() => {
|
|
1026
1026
|
g == null || g();
|
|
1027
|
-
}, []),
|
|
1028
|
-
if (!r ||
|
|
1029
|
-
|
|
1027
|
+
}, []), oe(() => {
|
|
1028
|
+
if (!r || M.trim().length < 3 || se) {
|
|
1029
|
+
M.trim().length === 0 && (A([]), Z(!1), V(null));
|
|
1030
1030
|
return;
|
|
1031
1031
|
}
|
|
1032
|
-
|
|
1032
|
+
z(!0), V(null);
|
|
1033
1033
|
const w = setTimeout(async () => {
|
|
1034
|
-
var
|
|
1035
|
-
(
|
|
1034
|
+
var J, ee, xe;
|
|
1035
|
+
(J = I.current) == null || J.call(I, M);
|
|
1036
1036
|
try {
|
|
1037
|
-
const Ce = await
|
|
1038
|
-
|
|
1037
|
+
const Ce = await Y.getAddressSuggestions(M);
|
|
1038
|
+
A(Ce.addresses), Z(!0), (ee = R.current) == null || ee.call(R, Ce.addresses);
|
|
1039
1039
|
} catch (Ce) {
|
|
1040
1040
|
const Ne = Ce instanceof Error ? Ce : new Error("Failed to fetch address suggestions");
|
|
1041
|
-
|
|
1041
|
+
V(Ne.message), A([]), Z(!0), (xe = he.current) == null || xe.call(he, Ne);
|
|
1042
1042
|
} finally {
|
|
1043
|
-
|
|
1043
|
+
z(!1);
|
|
1044
1044
|
}
|
|
1045
1045
|
}, a);
|
|
1046
1046
|
return () => clearTimeout(w);
|
|
1047
|
-
}, [
|
|
1048
|
-
const w = (
|
|
1049
|
-
|
|
1047
|
+
}, [M, se, r, a, Y]), oe(() => {
|
|
1048
|
+
const w = (J) => {
|
|
1049
|
+
U.current && !U.current.contains(J.target) && Q.current && !Q.current.contains(J.target) && Z(!1);
|
|
1050
1050
|
};
|
|
1051
1051
|
return document.addEventListener("mousedown", w), () => document.removeEventListener("mousedown", w);
|
|
1052
1052
|
}, []);
|
|
1053
1053
|
const le = (w) => {
|
|
1054
|
-
const
|
|
1055
|
-
|
|
1054
|
+
const J = w.target.value;
|
|
1055
|
+
ie(J), ue(!1), x == null || x({ street1: J });
|
|
1056
1056
|
}, fe = async (w) => {
|
|
1057
|
-
|
|
1057
|
+
ue(!0), ie(ht(w)), A([]), Z(!1), V(null), x == null || x(w), j.trackSell({
|
|
1058
1058
|
addressEntryV2: {
|
|
1059
1059
|
street1: w.street1,
|
|
1060
1060
|
city: w.city,
|
|
@@ -1066,34 +1066,34 @@ function Ao({
|
|
|
1066
1066
|
});
|
|
1067
1067
|
try {
|
|
1068
1068
|
await e(w);
|
|
1069
|
-
} catch (
|
|
1070
|
-
const
|
|
1071
|
-
|
|
1069
|
+
} catch (J) {
|
|
1070
|
+
const ee = J instanceof Error ? J : new Error("Failed to process address");
|
|
1071
|
+
V(ee.message), P == null || P(ee), ie(""), ue(!1);
|
|
1072
1072
|
}
|
|
1073
1073
|
}, ge = () => {
|
|
1074
1074
|
j.trackPlatform({
|
|
1075
1075
|
inputFocusEvent: { targetName: "partner-sdk-address-input" }
|
|
1076
|
-
}),
|
|
1076
|
+
}), q.length > 0 && M.length > 0 && Z(!0);
|
|
1077
1077
|
}, Oe = () => {
|
|
1078
1078
|
j.trackPlatform({
|
|
1079
1079
|
linkClickEvent: { targetName: "partner-sdk-manual-entry" }
|
|
1080
|
-
}), C(!0),
|
|
1081
|
-
}, ye = (w,
|
|
1082
|
-
const
|
|
1083
|
-
|
|
1084
|
-
street1:
|
|
1085
|
-
...
|
|
1086
|
-
city:
|
|
1087
|
-
state:
|
|
1088
|
-
postalCode:
|
|
1080
|
+
}), C(!0), Z(!1);
|
|
1081
|
+
}, ye = (w, J) => {
|
|
1082
|
+
const ee = { ...v, [w]: J };
|
|
1083
|
+
O(ee), x == null || x({
|
|
1084
|
+
street1: ee.street1,
|
|
1085
|
+
...ee.street2 ? { street2: ee.street2 } : {},
|
|
1086
|
+
city: ee.city,
|
|
1087
|
+
state: ee.state,
|
|
1088
|
+
postalCode: ee.postalCode
|
|
1089
1089
|
});
|
|
1090
1090
|
}, Pe = async () => {
|
|
1091
1091
|
if (!v.street1 || !v.city || !v.state || !v.postalCode) {
|
|
1092
1092
|
const w = "Please fill in all required fields";
|
|
1093
|
-
|
|
1093
|
+
V(w), E == null || E(w);
|
|
1094
1094
|
return;
|
|
1095
1095
|
}
|
|
1096
|
-
|
|
1096
|
+
z(!0), V(null);
|
|
1097
1097
|
try {
|
|
1098
1098
|
const w = {
|
|
1099
1099
|
street1: v.street1,
|
|
@@ -1113,22 +1113,22 @@ function Ao({
|
|
|
1113
1113
|
}
|
|
1114
1114
|
}), await e(w);
|
|
1115
1115
|
} catch (w) {
|
|
1116
|
-
const
|
|
1117
|
-
|
|
1116
|
+
const J = w instanceof Error ? w : new Error("Failed to submit address");
|
|
1117
|
+
V(J.message), P == null || P(J);
|
|
1118
1118
|
} finally {
|
|
1119
|
-
|
|
1119
|
+
z(!1);
|
|
1120
1120
|
}
|
|
1121
|
-
}, ve = !!
|
|
1122
|
-
return /* @__PURE__ */ t.jsxs("div", { ref: pe, className:
|
|
1123
|
-
y ? /* @__PURE__ */ t.jsxs("div", { className:
|
|
1124
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1125
|
-
/* @__PURE__ */ t.jsx("label", { className:
|
|
1121
|
+
}, ve = !!K;
|
|
1122
|
+
return /* @__PURE__ */ t.jsxs("div", { ref: pe, className: D.container, style: ne, children: [
|
|
1123
|
+
y ? /* @__PURE__ */ t.jsxs("div", { className: D.manualForm, children: [
|
|
1124
|
+
/* @__PURE__ */ t.jsxs("div", { className: D.manualFormField, children: [
|
|
1125
|
+
/* @__PURE__ */ t.jsx("label", { className: D.manualFormLabel, htmlFor: "ae-street1", children: "Street Address *" }),
|
|
1126
1126
|
/* @__PURE__ */ t.jsx(
|
|
1127
1127
|
"input",
|
|
1128
1128
|
{
|
|
1129
1129
|
id: "ae-street1",
|
|
1130
1130
|
type: "text",
|
|
1131
|
-
className:
|
|
1131
|
+
className: D.manualFormInput,
|
|
1132
1132
|
value: v.street1,
|
|
1133
1133
|
onChange: (w) => ye("street1", w.target.value),
|
|
1134
1134
|
disabled: o,
|
|
@@ -1136,14 +1136,14 @@ function Ao({
|
|
|
1136
1136
|
}
|
|
1137
1137
|
)
|
|
1138
1138
|
] }),
|
|
1139
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1140
|
-
/* @__PURE__ */ t.jsx("label", { className:
|
|
1139
|
+
/* @__PURE__ */ t.jsxs("div", { className: D.manualFormField, children: [
|
|
1140
|
+
/* @__PURE__ */ t.jsx("label", { className: D.manualFormLabel, htmlFor: "ae-street2", children: "Unit / Apt (optional)" }),
|
|
1141
1141
|
/* @__PURE__ */ t.jsx(
|
|
1142
1142
|
"input",
|
|
1143
1143
|
{
|
|
1144
1144
|
id: "ae-street2",
|
|
1145
1145
|
type: "text",
|
|
1146
|
-
className:
|
|
1146
|
+
className: D.manualFormInput,
|
|
1147
1147
|
value: v.street2,
|
|
1148
1148
|
onChange: (w) => ye("street2", w.target.value),
|
|
1149
1149
|
disabled: o,
|
|
@@ -1151,14 +1151,14 @@ function Ao({
|
|
|
1151
1151
|
}
|
|
1152
1152
|
)
|
|
1153
1153
|
] }),
|
|
1154
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1155
|
-
/* @__PURE__ */ t.jsx("label", { className:
|
|
1154
|
+
/* @__PURE__ */ t.jsxs("div", { className: D.manualFormField, children: [
|
|
1155
|
+
/* @__PURE__ */ t.jsx("label", { className: D.manualFormLabel, htmlFor: "ae-city", children: "City *" }),
|
|
1156
1156
|
/* @__PURE__ */ t.jsx(
|
|
1157
1157
|
"input",
|
|
1158
1158
|
{
|
|
1159
1159
|
id: "ae-city",
|
|
1160
1160
|
type: "text",
|
|
1161
|
-
className:
|
|
1161
|
+
className: D.manualFormInput,
|
|
1162
1162
|
value: v.city,
|
|
1163
1163
|
onChange: (w) => ye("city", w.target.value),
|
|
1164
1164
|
disabled: o,
|
|
@@ -1166,15 +1166,15 @@ function Ao({
|
|
|
1166
1166
|
}
|
|
1167
1167
|
)
|
|
1168
1168
|
] }),
|
|
1169
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1170
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1171
|
-
/* @__PURE__ */ t.jsx("label", { className:
|
|
1169
|
+
/* @__PURE__ */ t.jsxs("div", { className: D.formRow, children: [
|
|
1170
|
+
/* @__PURE__ */ t.jsxs("div", { className: D.manualFormField, children: [
|
|
1171
|
+
/* @__PURE__ */ t.jsx("label", { className: D.manualFormLabel, htmlFor: "ae-state", children: "State *" }),
|
|
1172
1172
|
/* @__PURE__ */ t.jsx(
|
|
1173
1173
|
"input",
|
|
1174
1174
|
{
|
|
1175
1175
|
id: "ae-state",
|
|
1176
1176
|
type: "text",
|
|
1177
|
-
className:
|
|
1177
|
+
className: D.manualFormInput,
|
|
1178
1178
|
value: v.state,
|
|
1179
1179
|
onChange: (w) => ye("state", w.target.value),
|
|
1180
1180
|
disabled: o,
|
|
@@ -1183,14 +1183,14 @@ function Ao({
|
|
|
1183
1183
|
}
|
|
1184
1184
|
)
|
|
1185
1185
|
] }),
|
|
1186
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1187
|
-
/* @__PURE__ */ t.jsx("label", { className:
|
|
1186
|
+
/* @__PURE__ */ t.jsxs("div", { className: D.manualFormField, children: [
|
|
1187
|
+
/* @__PURE__ */ t.jsx("label", { className: D.manualFormLabel, htmlFor: "ae-postalCode", children: "ZIP Code *" }),
|
|
1188
1188
|
/* @__PURE__ */ t.jsx(
|
|
1189
1189
|
"input",
|
|
1190
1190
|
{
|
|
1191
1191
|
id: "ae-postalCode",
|
|
1192
1192
|
type: "text",
|
|
1193
|
-
className:
|
|
1193
|
+
className: D.manualFormInput,
|
|
1194
1194
|
value: v.postalCode,
|
|
1195
1195
|
onChange: (w) => ye("postalCode", w.target.value),
|
|
1196
1196
|
disabled: o,
|
|
@@ -1200,12 +1200,12 @@ function Ao({
|
|
|
1200
1200
|
)
|
|
1201
1201
|
] })
|
|
1202
1202
|
] }),
|
|
1203
|
-
|
|
1203
|
+
K && /* @__PURE__ */ t.jsx("div", { className: D.error, children: K }),
|
|
1204
1204
|
/* @__PURE__ */ t.jsxs(
|
|
1205
1205
|
"button",
|
|
1206
1206
|
{
|
|
1207
1207
|
type: "button",
|
|
1208
|
-
className:
|
|
1208
|
+
className: D.submitButton,
|
|
1209
1209
|
onClick: Pe,
|
|
1210
1210
|
disabled: o,
|
|
1211
1211
|
children: [
|
|
@@ -1214,43 +1214,43 @@ function Ao({
|
|
|
1214
1214
|
]
|
|
1215
1215
|
}
|
|
1216
1216
|
)
|
|
1217
|
-
] }) : /* @__PURE__ */ t.jsxs("div", { className:
|
|
1217
|
+
] }) : /* @__PURE__ */ t.jsxs("div", { className: D.inputSection, children: [
|
|
1218
1218
|
/* @__PURE__ */ t.jsxs(
|
|
1219
1219
|
"div",
|
|
1220
1220
|
{
|
|
1221
|
-
className: `${
|
|
1221
|
+
className: `${D.inputWrapper} ${ve ? D.errorBorder : ""}`,
|
|
1222
1222
|
children: [
|
|
1223
1223
|
/* @__PURE__ */ t.jsx(
|
|
1224
1224
|
"input",
|
|
1225
1225
|
{
|
|
1226
|
-
ref:
|
|
1226
|
+
ref: Q,
|
|
1227
1227
|
type: "text",
|
|
1228
|
-
value:
|
|
1228
|
+
value: M,
|
|
1229
1229
|
onChange: le,
|
|
1230
1230
|
onFocus: ge,
|
|
1231
1231
|
placeholder: i,
|
|
1232
|
-
className:
|
|
1232
|
+
className: D.input,
|
|
1233
1233
|
disabled: o,
|
|
1234
1234
|
"aria-label": "Address input",
|
|
1235
1235
|
"aria-autocomplete": "list",
|
|
1236
1236
|
"aria-controls": "address-suggestions",
|
|
1237
|
-
"aria-expanded":
|
|
1237
|
+
"aria-expanded": $
|
|
1238
1238
|
}
|
|
1239
1239
|
),
|
|
1240
|
-
h && /* @__PURE__ */ t.jsx("div", { className:
|
|
1240
|
+
h && /* @__PURE__ */ t.jsx("div", { className: D.inputIcon, children: h }),
|
|
1241
1241
|
f && /* @__PURE__ */ t.jsx(
|
|
1242
1242
|
"button",
|
|
1243
1243
|
{
|
|
1244
|
-
className:
|
|
1244
|
+
className: D.button,
|
|
1245
1245
|
type: "button",
|
|
1246
1246
|
disabled: o,
|
|
1247
1247
|
"aria-label": _,
|
|
1248
|
-
children:
|
|
1248
|
+
children: ae ? /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
1249
1249
|
/* @__PURE__ */ t.jsx("span", { children: _ }),
|
|
1250
1250
|
/* @__PURE__ */ t.jsxs(
|
|
1251
1251
|
"svg",
|
|
1252
1252
|
{
|
|
1253
|
-
className:
|
|
1253
|
+
className: D.spinner,
|
|
1254
1254
|
width: "20",
|
|
1255
1255
|
height: "20",
|
|
1256
1256
|
viewBox: "0 0 24 24",
|
|
@@ -1289,36 +1289,36 @@ function Ao({
|
|
|
1289
1289
|
]
|
|
1290
1290
|
}
|
|
1291
1291
|
),
|
|
1292
|
-
(
|
|
1292
|
+
($ || ve) && /* @__PURE__ */ t.jsx(
|
|
1293
1293
|
"div",
|
|
1294
1294
|
{
|
|
1295
|
-
ref:
|
|
1296
|
-
className: `${
|
|
1295
|
+
ref: U,
|
|
1296
|
+
className: `${D.suggestions} ${ve ? D.errorState : ""}`,
|
|
1297
1297
|
id: "address-suggestions",
|
|
1298
|
-
role: ve &&
|
|
1299
|
-
"aria-live": ve &&
|
|
1300
|
-
children: ve ? /* @__PURE__ */ t.jsxs("div", { className:
|
|
1301
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
1302
|
-
/* @__PURE__ */ t.jsx("div", { children:
|
|
1303
|
-
] }) :
|
|
1298
|
+
role: ve && !$ ? "alert" : "listbox",
|
|
1299
|
+
"aria-live": ve && !$ ? "polite" : void 0,
|
|
1300
|
+
children: ve ? /* @__PURE__ */ t.jsxs("div", { className: D.error, children: [
|
|
1301
|
+
/* @__PURE__ */ t.jsx("div", { className: D.errorIcon, children: /* @__PURE__ */ t.jsx(Ar, {}) }),
|
|
1302
|
+
/* @__PURE__ */ t.jsx("div", { children: K })
|
|
1303
|
+
] }) : q.length > 0 ? q.map((w, J) => /* @__PURE__ */ t.jsx(
|
|
1304
1304
|
"div",
|
|
1305
1305
|
{
|
|
1306
|
-
className:
|
|
1306
|
+
className: D.suggestion,
|
|
1307
1307
|
onClick: () => fe(w),
|
|
1308
1308
|
role: "option",
|
|
1309
1309
|
"aria-selected": !1,
|
|
1310
1310
|
tabIndex: 0,
|
|
1311
|
-
onKeyDown: (
|
|
1312
|
-
(
|
|
1311
|
+
onKeyDown: (ee) => {
|
|
1312
|
+
(ee.key === "Enter" || ee.key === " ") && (ee.preventDefault(), fe(w));
|
|
1313
1313
|
},
|
|
1314
1314
|
children: ht(w)
|
|
1315
1315
|
},
|
|
1316
|
-
`${w.street1}-${w.city}-${w.postalCode}-${
|
|
1317
|
-
)) :
|
|
1316
|
+
`${w.street1}-${w.city}-${w.postalCode}-${J}`
|
|
1317
|
+
)) : B && /* @__PURE__ */ t.jsx(
|
|
1318
1318
|
"button",
|
|
1319
1319
|
{
|
|
1320
1320
|
type: "button",
|
|
1321
|
-
className:
|
|
1321
|
+
className: D.manualLink,
|
|
1322
1322
|
onClick: Oe,
|
|
1323
1323
|
children: d
|
|
1324
1324
|
}
|
|
@@ -1354,7 +1354,7 @@ function Oo({
|
|
|
1354
1354
|
onConfirm: a,
|
|
1355
1355
|
onEdit: s
|
|
1356
1356
|
}) {
|
|
1357
|
-
const o = Ze(), _ = Se(r), f = jt("partner-sdk-unit-input"), [u, h] =
|
|
1357
|
+
const o = Ze(), _ = Se(r), f = jt("partner-sdk-unit-input"), [u, h] = S(""), [d, m] = S(!1), [g, x] = S(null), E = () => {
|
|
1358
1358
|
if (!d && !u.trim()) {
|
|
1359
1359
|
x("Please enter a unit number or select 'No unit number'");
|
|
1360
1360
|
return;
|
|
@@ -1369,9 +1369,9 @@ function Oo({
|
|
|
1369
1369
|
optionName: String(!d)
|
|
1370
1370
|
}
|
|
1371
1371
|
}), m(!d), d || (h(""), x(null));
|
|
1372
|
-
},
|
|
1373
|
-
h(
|
|
1374
|
-
},
|
|
1372
|
+
}, W = (Y) => {
|
|
1373
|
+
h(Y.target.value), g && x(null);
|
|
1374
|
+
}, P = () => {
|
|
1375
1375
|
o.trackPlatform({
|
|
1376
1376
|
inputFocusEvent: { targetName: "partner-sdk-unit-input" }
|
|
1377
1377
|
});
|
|
@@ -1392,8 +1392,8 @@ function Oo({
|
|
|
1392
1392
|
className: de.input,
|
|
1393
1393
|
placeholder: "#1234",
|
|
1394
1394
|
value: u,
|
|
1395
|
-
onChange:
|
|
1396
|
-
onFocus:
|
|
1395
|
+
onChange: W,
|
|
1396
|
+
onFocus: P,
|
|
1397
1397
|
disabled: d
|
|
1398
1398
|
}
|
|
1399
1399
|
)
|
|
@@ -1416,7 +1416,7 @@ function Oo({
|
|
|
1416
1416
|
{
|
|
1417
1417
|
type: "button",
|
|
1418
1418
|
className: de.confirmButton,
|
|
1419
|
-
onClick:
|
|
1419
|
+
onClick: E,
|
|
1420
1420
|
children: "Confirm address"
|
|
1421
1421
|
}
|
|
1422
1422
|
) })
|
|
@@ -1427,8 +1427,8 @@ function nn(e, r, a) {
|
|
|
1427
1427
|
return e.startsWith("http://") || e.startsWith("https://") ? `url-${encodeURIComponent(e)}(${r},${a})` : `${e}(${r},${a})`;
|
|
1428
1428
|
}
|
|
1429
1429
|
function an(e, r) {
|
|
1430
|
-
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] =
|
|
1431
|
-
return
|
|
1430
|
+
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");
|
|
1431
|
+
return oe(() => {
|
|
1432
1432
|
d("loading");
|
|
1433
1433
|
const m = [
|
|
1434
1434
|
e.street1,
|
|
@@ -1438,20 +1438,20 @@ function an(e, r) {
|
|
|
1438
1438
|
].join(" ");
|
|
1439
1439
|
let g = !1;
|
|
1440
1440
|
async function x() {
|
|
1441
|
-
var
|
|
1441
|
+
var E, k;
|
|
1442
1442
|
try {
|
|
1443
|
-
const
|
|
1444
|
-
if (!
|
|
1443
|
+
const W = `${zr}/${encodeURIComponent(m)}.json?access_token=${a}&limit=1`, P = await fetch(W);
|
|
1444
|
+
if (!P.ok || g) {
|
|
1445
1445
|
g || d("error");
|
|
1446
1446
|
return;
|
|
1447
1447
|
}
|
|
1448
|
-
const j = (k = (
|
|
1448
|
+
const j = (k = (E = (await P.json()).features) == null ? void 0 : E[0]) == null ? void 0 : k.center;
|
|
1449
1449
|
if (!j || g) {
|
|
1450
1450
|
g || d("error");
|
|
1451
1451
|
return;
|
|
1452
1452
|
}
|
|
1453
|
-
const [
|
|
1454
|
-
g || u(
|
|
1453
|
+
const [ne, M] = j, ie = nn(s, ne, M), q = `${Jr}/${ie}/${ne},${M},${_}/${o}x${i}@2x?access_token=${a}&attribution=false&logo=false`;
|
|
1454
|
+
g || u(q);
|
|
1455
1455
|
} catch {
|
|
1456
1456
|
g || d("error");
|
|
1457
1457
|
}
|
|
@@ -1494,27 +1494,27 @@ function Ro({
|
|
|
1494
1494
|
width: o,
|
|
1495
1495
|
height: i,
|
|
1496
1496
|
zoom: _
|
|
1497
|
-
}), [x,
|
|
1497
|
+
}), [x, E] = S(!1), k = G(u);
|
|
1498
1498
|
k.current = u;
|
|
1499
|
-
const
|
|
1500
|
-
|
|
1499
|
+
const W = G(h);
|
|
1500
|
+
W.current = h, oe(() => {
|
|
1501
1501
|
var j;
|
|
1502
|
-
g === "error" && ((j =
|
|
1502
|
+
g === "error" && ((j = W.current) == null || j.call(W, new Error("Failed to load map for address")));
|
|
1503
1503
|
}, [g]);
|
|
1504
|
-
const
|
|
1504
|
+
const P = () => {
|
|
1505
1505
|
var j;
|
|
1506
|
-
|
|
1507
|
-
},
|
|
1506
|
+
E(!0), (j = k.current) == null || j.call(k);
|
|
1507
|
+
}, Y = {
|
|
1508
1508
|
...d,
|
|
1509
1509
|
...f ? { borderRadius: f } : {}
|
|
1510
1510
|
};
|
|
1511
|
-
return /* @__PURE__ */ t.jsx("div", { className: Ve.container, style:
|
|
1511
|
+
return /* @__PURE__ */ t.jsx("div", { className: Ve.container, style: Y, children: m && /* @__PURE__ */ t.jsx(
|
|
1512
1512
|
"img",
|
|
1513
1513
|
{
|
|
1514
1514
|
src: m,
|
|
1515
1515
|
alt: "Map",
|
|
1516
1516
|
className: `${Ve.mapImage} ${x ? Ve.mapImageLoaded : ""}`.trim(),
|
|
1517
|
-
onLoad:
|
|
1517
|
+
onLoad: P
|
|
1518
1518
|
}
|
|
1519
1519
|
) });
|
|
1520
1520
|
}
|
|
@@ -1593,14 +1593,18 @@ function ft(e, r) {
|
|
|
1593
1593
|
}
|
|
1594
1594
|
class mn {
|
|
1595
1595
|
constructor(r, a) {
|
|
1596
|
-
this._validationErrors = {}, this._submitted = !1, this._listeners = /* @__PURE__ */ new Map(), this.getAnswer = (o) => this._answers[o], this._allPages = r, this._answers = a != null && a.initialAnswers ? { ...a.initialAnswers } : {}, this.
|
|
1596
|
+
this._validationErrors = {}, this._submitted = !1, this._listeners = /* @__PURE__ */ new Map(), this.getAnswer = (o) => this._answers[o], this._allPages = r, this._answers = a != null && a.initialAnswers ? { ...a.initialAnswers } : {}, this._skipPages = new Set((a == null ? void 0 : a.skipPages) ?? []);
|
|
1597
1597
|
const s = this.visiblePages;
|
|
1598
1598
|
this._currentPageId = s.length > 0 ? s[0].id : "";
|
|
1599
1599
|
}
|
|
1600
1600
|
// ── Derived state (recomputed on access) ──────────────────────────────────
|
|
1601
|
-
/**
|
|
1601
|
+
/**
|
|
1602
|
+
* Pages visible given current answers — filtered by both `showWhen`
|
|
1603
|
+
* conditions and the partner-supplied `skipPages` allowlist.
|
|
1604
|
+
*/
|
|
1602
1605
|
get visiblePages() {
|
|
1603
|
-
|
|
1606
|
+
const r = hn(this._allPages, this.getAnswer);
|
|
1607
|
+
return this._skipPages.size === 0 ? r : r.filter((a) => !this._skipPages.has(a.id));
|
|
1604
1608
|
}
|
|
1605
1609
|
/** The current page, or undefined if no pages are visible. */
|
|
1606
1610
|
get currentPage() {
|
|
@@ -1637,9 +1641,6 @@ class mn {
|
|
|
1637
1641
|
get validationErrors() {
|
|
1638
1642
|
return { ...this._validationErrors };
|
|
1639
1643
|
}
|
|
1640
|
-
get market() {
|
|
1641
|
-
return this._market;
|
|
1642
|
-
}
|
|
1643
1644
|
// ── Actions ───────────────────────────────────────────────────────────────
|
|
1644
1645
|
/**
|
|
1645
1646
|
* Set an answer value. Clears any validation error for that field.
|
|
@@ -2368,8 +2369,8 @@ function me() {
|
|
|
2368
2369
|
return e;
|
|
2369
2370
|
}
|
|
2370
2371
|
const Mn = ({
|
|
2371
|
-
|
|
2372
|
-
|
|
2372
|
+
initialAnswers: e,
|
|
2373
|
+
skipPages: r,
|
|
2373
2374
|
smsConsentText: a,
|
|
2374
2375
|
contactConsentText: s,
|
|
2375
2376
|
onSubmit: o,
|
|
@@ -2379,90 +2380,90 @@ const Mn = ({
|
|
|
2379
2380
|
onError: u,
|
|
2380
2381
|
children: h
|
|
2381
2382
|
}) => {
|
|
2382
|
-
var
|
|
2383
|
-
const d =
|
|
2383
|
+
var y;
|
|
2384
|
+
const d = G(o);
|
|
2384
2385
|
d.current = o;
|
|
2385
|
-
const m =
|
|
2386
|
+
const m = G(i);
|
|
2386
2387
|
m.current = i;
|
|
2387
|
-
const g =
|
|
2388
|
+
const g = G(_);
|
|
2388
2389
|
g.current = _;
|
|
2389
|
-
const x =
|
|
2390
|
+
const x = G(f);
|
|
2390
2391
|
x.current = f;
|
|
2391
|
-
const
|
|
2392
|
-
|
|
2393
|
-
const [k,
|
|
2394
|
-
() => mt({
|
|
2395
|
-
),
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
}, [
|
|
2399
|
-
const [
|
|
2392
|
+
const E = G(u);
|
|
2393
|
+
E.current = u;
|
|
2394
|
+
const [k, W] = S(
|
|
2395
|
+
() => mt({ initialAnswers: e, skipPages: r })
|
|
2396
|
+
), P = (r ?? []).join("|"), Y = G(P);
|
|
2397
|
+
oe(() => {
|
|
2398
|
+
P !== Y.current && (Y.current = P, W(mt({ initialAnswers: e, skipPages: r })));
|
|
2399
|
+
}, [P]);
|
|
2400
|
+
const [j, ne] = S(
|
|
2400
2401
|
k.answers
|
|
2401
|
-
), [
|
|
2402
|
-
((
|
|
2403
|
-
), [
|
|
2402
|
+
), [M, ie] = S(
|
|
2403
|
+
((y = k.currentPage) == null ? void 0 : y.id) ?? ""
|
|
2404
|
+
), [q, A] = S({}), [$, Z] = S(
|
|
2404
2405
|
k.visiblePages
|
|
2405
2406
|
);
|
|
2406
|
-
|
|
2407
|
-
var
|
|
2408
|
-
const
|
|
2409
|
-
k.on("answerChange", (
|
|
2410
|
-
var
|
|
2411
|
-
|
|
2407
|
+
oe(() => {
|
|
2408
|
+
var v;
|
|
2409
|
+
const C = [
|
|
2410
|
+
k.on("answerChange", (O) => {
|
|
2411
|
+
var Q;
|
|
2412
|
+
ne(k.answers), Z([...k.visiblePages]), O.type === "answerChange" && ((Q = g.current) == null || Q.call(g, O.key, O.value));
|
|
2412
2413
|
}),
|
|
2413
|
-
k.on("pageChange", (
|
|
2414
|
-
var
|
|
2415
|
-
|
|
2414
|
+
k.on("pageChange", (O) => {
|
|
2415
|
+
var Q;
|
|
2416
|
+
O.type === "pageChange" && (ie(O.pageId), Z([...k.visiblePages]), A({}), (Q = m.current) == null || Q.call(m, O.pageIndex, O.pageId));
|
|
2416
2417
|
}),
|
|
2417
|
-
k.on("validationError", (
|
|
2418
|
-
|
|
2418
|
+
k.on("validationError", (O) => {
|
|
2419
|
+
O.type === "validationError" && A(O.errors);
|
|
2419
2420
|
}),
|
|
2420
|
-
k.on("submit", (
|
|
2421
|
-
|
|
2421
|
+
k.on("submit", (O) => {
|
|
2422
|
+
O.type === "submit" && d.current(O.answers);
|
|
2422
2423
|
})
|
|
2423
2424
|
];
|
|
2424
|
-
return (
|
|
2425
|
-
|
|
2425
|
+
return (v = x.current) == null || v.call(x), () => {
|
|
2426
|
+
C.forEach((O) => O()), k.destroy();
|
|
2426
2427
|
};
|
|
2427
2428
|
}, [k]);
|
|
2428
|
-
const
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
}, [
|
|
2432
|
-
const
|
|
2433
|
-
const
|
|
2434
|
-
return
|
|
2435
|
-
}, [
|
|
2429
|
+
const ae = G(e);
|
|
2430
|
+
oe(() => {
|
|
2431
|
+
e && e !== ae.current && (ae.current = e, k.setAnswers(e));
|
|
2432
|
+
}, [e, k]);
|
|
2433
|
+
const z = Ie(() => {
|
|
2434
|
+
const C = $.findIndex((v) => v.id === M);
|
|
2435
|
+
return C >= 0 ? C : 0;
|
|
2436
|
+
}, [$, M]), K = $[z], V = Ie(() => M ? k.getVisibleQuestionsForCurrentPage() : [], [k, M, j]), se = Ie(() => $.length <= 1 ? 0 : Math.min(
|
|
2436
2437
|
1,
|
|
2437
|
-
Math.max(0,
|
|
2438
|
-
), [
|
|
2438
|
+
Math.max(0, z / ($.length - 1))
|
|
2439
|
+
), [z, $.length]), ue = Ie(
|
|
2439
2440
|
() => ({
|
|
2440
2441
|
engine: k,
|
|
2441
|
-
currentPage:
|
|
2442
|
-
currentPageIndex:
|
|
2443
|
-
visiblePages:
|
|
2444
|
-
visibleQuestions:
|
|
2445
|
-
answers:
|
|
2446
|
-
validationErrors:
|
|
2447
|
-
progress:
|
|
2448
|
-
isFirstPage:
|
|
2442
|
+
currentPage: K,
|
|
2443
|
+
currentPageIndex: z,
|
|
2444
|
+
visiblePages: $,
|
|
2445
|
+
visibleQuestions: V,
|
|
2446
|
+
answers: j,
|
|
2447
|
+
validationErrors: q,
|
|
2448
|
+
progress: se,
|
|
2449
|
+
isFirstPage: z === 0,
|
|
2449
2450
|
contactConsentText: s,
|
|
2450
|
-
isLastPage:
|
|
2451
|
-
setAnswer: (
|
|
2451
|
+
isLastPage: $.length > 0 && z === $.length - 1,
|
|
2452
|
+
setAnswer: (C, v) => k.setAnswer(C, v),
|
|
2452
2453
|
getAnswer: k.getAnswer,
|
|
2453
2454
|
goToNext: () => {
|
|
2454
|
-
var
|
|
2455
|
-
const
|
|
2456
|
-
if (!
|
|
2455
|
+
var v;
|
|
2456
|
+
const C = k.goToNext();
|
|
2457
|
+
if (!C.valid)
|
|
2457
2458
|
try {
|
|
2458
|
-
(
|
|
2459
|
-
|
|
2459
|
+
(v = E.current) == null || v.call(
|
|
2460
|
+
E,
|
|
2460
2461
|
new Error(
|
|
2461
|
-
`Validation failed: ${Object.values(
|
|
2462
|
+
`Validation failed: ${Object.values(C.errors).join(", ")}`
|
|
2462
2463
|
)
|
|
2463
2464
|
);
|
|
2464
|
-
} catch (
|
|
2465
|
-
console.error("[DtcOnboardingFlow] onError callback threw:",
|
|
2465
|
+
} catch (O) {
|
|
2466
|
+
console.error("[DtcOnboardingFlow] onError callback threw:", O);
|
|
2466
2467
|
}
|
|
2467
2468
|
},
|
|
2468
2469
|
goToPrev: () => k.goToPrev(),
|
|
@@ -2470,18 +2471,18 @@ const Mn = ({
|
|
|
2470
2471
|
}),
|
|
2471
2472
|
[
|
|
2472
2473
|
k,
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2474
|
+
K,
|
|
2475
|
+
z,
|
|
2476
|
+
$,
|
|
2477
|
+
V,
|
|
2478
|
+
j,
|
|
2477
2479
|
q,
|
|
2478
|
-
|
|
2479
|
-
F,
|
|
2480
|
+
se,
|
|
2480
2481
|
a,
|
|
2481
2482
|
s
|
|
2482
2483
|
]
|
|
2483
2484
|
);
|
|
2484
|
-
return /* @__PURE__ */ t.jsx(Et.Provider, { value:
|
|
2485
|
+
return /* @__PURE__ */ t.jsx(Et.Provider, { value: ue, children: h });
|
|
2485
2486
|
}, $n = "_container_uharh_7", Fn = "_header_uharh_20", Wn = "_headerLogos_uharh_30", Hn = "_headerPartnerLogo_uharh_36", Vn = "_headerOpendoorLogo_uharh_42", qn = "_headerCloseButton_uharh_46", Un = "_layout_uharh_71", Gn = "_layoutScrollable_uharh_78", Yn = "_addressBar_uharh_94", Zn = "_addressIcon_uharh_102", Kn = "_addressText_uharh_106", zn = "_contentSplit_uharh_112", Jn = "_contentLeft_uharh_126", Xn = "_contentRight_uharh_132", Qn = "_pageTitle_uharh_148", ea = "_pageSubtitle_uharh_156", ta = "_pageContent_uharh_165", ra = "_navigation_uharh_173", na = "_navigationButtons_uharh_187", aa = "_backButton_uharh_193", sa = "_nextButton_uharh_216", oa = "_progressBar_uharh_242", ia = "_progressBarFill_uharh_249", la = "_radioCardGroup_uharh_257", ca = "_radioCard_uharh_257", ua = "_radioCardSelected_uharh_289", da = "_radioCardLabel_uharh_294", ha = "_radioCardDescription_uharh_300", fa = "_imageCardGroup_uharh_307", ma = "_imageCard_uharh_307", pa = "_imageCardSelected_uharh_339", ga = "_imageCardPhoto_uharh_344", _a = "_imageCardLabel_uharh_351", ba = "_imageCardDescription_uharh_358", ya = "_fieldGroup_uharh_367", va = "_fieldLabel_uharh_373", xa = "_fieldDescription_uharh_380", Ca = "_fieldSelect_uharh_387", wa = "_fieldSelectError_uharh_413", ka = "_fieldInputWrapper_uharh_417", ja = "_fieldInput_uharh_417", Na = "_fieldInputError_uharh_455", Ia = "_fieldSuffix_uharh_459", Ea = "_fieldError_uharh_470", Sa = "_checkboxCardGroup_uharh_479", Pa = "_checkboxCard_uharh_479", La = "_checkboxCardSelected_uharh_511", Ta = "_checkboxCardContent_uharh_516", Da = "_checkboxCardLabel_uharh_523", Aa = "_checkboxCardHelper_uharh_529", Oa = "_checkboxIndicator_uharh_534", Ra = "_checkboxIndicatorChecked_uharh_546", Ba = "_currencyWrapper_uharh_554", Ma = "_currencyPrefix_uharh_560", $a = "_currencyInput_uharh_569", Fa = "_consentText_uharh_589", Wa = "_consentLink_uharh_597", Ha = "_ctaButton_uharh_602", Va = "_toggleGroup_uharh_634", qa = "_toggleLabel_uharh_638", Ua = "_toggleCheckbox_uharh_646", Ga = "_toggleText_uharh_655", Ya = "_searchableDropdown_uharh_663", Za = "_searchableDropdownToggle_uharh_673", Ka = "_searchableDropdownList_uharh_686", za = "_searchableDropdownOption_uharh_695", Ja = "_searchableDropdownOptionSelected_uharh_713", Xa = "_searchableDropdownOptionHighlighted_uharh_718", Qa = "_searchableDropdownEmpty_uharh_722", l = {
|
|
2486
2487
|
container: $n,
|
|
2487
2488
|
header: Fn,
|
|
@@ -2666,8 +2667,8 @@ const Mn = ({
|
|
|
2666
2667
|
] });
|
|
2667
2668
|
}, as = ({ question: e }) => {
|
|
2668
2669
|
var d;
|
|
2669
|
-
const { getAnswer: r, setAnswer: a, goToNext: s, validationErrors: o } = me(), i = r(e.key), _ = o[e.key], f =
|
|
2670
|
-
|
|
2670
|
+
const { getAnswer: r, setAnswer: a, goToNext: s, validationErrors: o } = me(), i = r(e.key), _ = o[e.key], f = G(null);
|
|
2671
|
+
oe(() => () => {
|
|
2671
2672
|
f.current && clearTimeout(f.current);
|
|
2672
2673
|
}, []);
|
|
2673
2674
|
const u = Ee(
|
|
@@ -2677,13 +2678,13 @@ const Mn = ({
|
|
|
2677
2678
|
[e.key, e.autoAdvance, a, s]
|
|
2678
2679
|
), h = Ee(
|
|
2679
2680
|
(m, g) => {
|
|
2680
|
-
var k,
|
|
2681
|
+
var k, W;
|
|
2681
2682
|
const x = e.options;
|
|
2682
2683
|
if (!x) return;
|
|
2683
|
-
let
|
|
2684
|
-
if (m.key === "ArrowDown" || m.key === "ArrowRight" ? (m.preventDefault(),
|
|
2685
|
-
const
|
|
2686
|
-
(
|
|
2684
|
+
let E = null;
|
|
2685
|
+
if (m.key === "ArrowDown" || m.key === "ArrowRight" ? (m.preventDefault(), E = (g + 1) % x.length) : (m.key === "ArrowUp" || m.key === "ArrowLeft") && (m.preventDefault(), E = (g - 1 + x.length) % x.length), E !== null) {
|
|
2686
|
+
const P = (k = m.currentTarget.closest('[role="radiogroup"]')) == null ? void 0 : k.querySelectorAll('[role="radio"]');
|
|
2687
|
+
(W = P == null ? void 0 : P[E]) == null || W.focus(), u(x[E].value);
|
|
2687
2688
|
}
|
|
2688
2689
|
},
|
|
2689
2690
|
[e.options, u]
|
|
@@ -2706,7 +2707,7 @@ const Mn = ({
|
|
|
2706
2707
|
tabIndex: x || g === 0 && !i ? 0 : -1,
|
|
2707
2708
|
className: `${l.radioCard} ${x ? l.radioCardSelected : ""}`,
|
|
2708
2709
|
onClick: () => u(m.value),
|
|
2709
|
-
onKeyDown: (
|
|
2710
|
+
onKeyDown: (E) => h(E, g),
|
|
2710
2711
|
children: [
|
|
2711
2712
|
/* @__PURE__ */ t.jsx("span", { className: l.radioCardLabel, children: m.label }),
|
|
2712
2713
|
m.description && /* @__PURE__ */ t.jsx("span", { className: l.radioCardDescription, children: m.description })
|
|
@@ -2720,38 +2721,38 @@ const Mn = ({
|
|
|
2720
2721
|
}
|
|
2721
2722
|
);
|
|
2722
2723
|
}, ss = "https://images.opendoor.com/source/s3/imgdrop-production", os = "service=reception-fe&dpr=2&fit=scale-down";
|
|
2723
|
-
function
|
|
2724
|
+
function re(e, r = "3:2-sm") {
|
|
2724
2725
|
return `${ss}/${e}?${os}&preset=${r}`;
|
|
2725
2726
|
}
|
|
2726
2727
|
const is = {
|
|
2727
2728
|
// Kitchen
|
|
2728
|
-
"kitchen-fixer_upper":
|
|
2729
|
-
"kitchen-dated":
|
|
2730
|
-
"kitchen-standard":
|
|
2731
|
-
"kitchen-high_end":
|
|
2732
|
-
"kitchen-luxury":
|
|
2729
|
+
"kitchen-fixer_upper": re("2023-04-1681772974083-61414.png"),
|
|
2730
|
+
"kitchen-dated": re("2023-04-1681772974089-39460.png"),
|
|
2731
|
+
"kitchen-standard": re("2023-04-1681772974093-51260.png"),
|
|
2732
|
+
"kitchen-high_end": re("2023-04-1682444345875-57331.jpeg", "3:2-xl"),
|
|
2733
|
+
"kitchen-luxury": re("2023-04-1682444629335-69661.jpeg", "3:2-xl"),
|
|
2733
2734
|
// Bathroom
|
|
2734
|
-
"bathroom-fixer_upper":
|
|
2735
|
-
"bathroom-dated":
|
|
2736
|
-
"bathroom-standard":
|
|
2737
|
-
"bathroom-high_end":
|
|
2738
|
-
"bathroom-luxury":
|
|
2735
|
+
"bathroom-fixer_upper": re("2023-04-1682103091299-33543.jpeg"),
|
|
2736
|
+
"bathroom-dated": re("2023-04-1681773104207-98555.png"),
|
|
2737
|
+
"bathroom-standard": re("2023-04-1682103088251-79730.jpeg", "3:2-xl"),
|
|
2738
|
+
"bathroom-high_end": re("2023-04-1681773104214-77488.png"),
|
|
2739
|
+
"bathroom-luxury": re("2023-04-1681773104217-27390.png"),
|
|
2739
2740
|
// Living Room
|
|
2740
|
-
"living-room-fixer_upper":
|
|
2741
|
-
"living-room-dated":
|
|
2742
|
-
"living-room-standard":
|
|
2743
|
-
"living-room-high_end":
|
|
2744
|
-
"living-room-luxury":
|
|
2741
|
+
"living-room-fixer_upper": re("2023-04-1681773170815-60328.png"),
|
|
2742
|
+
"living-room-dated": re("2023-04-1681773170823-03451.png"),
|
|
2743
|
+
"living-room-standard": re("2023-04-1681773170826-47471.png"),
|
|
2744
|
+
"living-room-high_end": re("2023-04-1681773170828-76415.png"),
|
|
2745
|
+
"living-room-luxury": re("2023-04-1681773170832-20699.png"),
|
|
2745
2746
|
// Exterior
|
|
2746
|
-
"exterior-fixer_upper":
|
|
2747
|
-
"exterior-dated":
|
|
2748
|
-
"exterior-standard":
|
|
2749
|
-
"exterior-high_end":
|
|
2750
|
-
"exterior-luxury":
|
|
2747
|
+
"exterior-fixer_upper": re("2023-04-1681773220493-46489.png"),
|
|
2748
|
+
"exterior-dated": re("2023-04-1681773220495-22229.png"),
|
|
2749
|
+
"exterior-standard": re("2023-04-1681773220498-64940.png"),
|
|
2750
|
+
"exterior-high_end": re("2023-04-1682103085417-24272.jpeg", "3:2-md"),
|
|
2751
|
+
"exterior-luxury": re("2023-04-1681773220487-59852.png")
|
|
2751
2752
|
}, ls = ({ question: e }) => {
|
|
2752
2753
|
var h;
|
|
2753
|
-
const { getAnswer: r, setAnswer: a, goToNext: s, validationErrors: o } = me(), i = r(e.key), _ = o[e.key], f =
|
|
2754
|
-
|
|
2754
|
+
const { getAnswer: r, setAnswer: a, goToNext: s, validationErrors: o } = me(), i = r(e.key), _ = o[e.key], f = G(null);
|
|
2755
|
+
oe(() => () => {
|
|
2755
2756
|
f.current && clearTimeout(f.current);
|
|
2756
2757
|
}, []);
|
|
2757
2758
|
const u = Ee(
|
|
@@ -2811,8 +2812,8 @@ const is = {
|
|
|
2811
2812
|
}
|
|
2812
2813
|
const d = o.filter(
|
|
2813
2814
|
(g) => {
|
|
2814
|
-
var x,
|
|
2815
|
-
return !((
|
|
2815
|
+
var x, E;
|
|
2816
|
+
return !((E = (x = e.options) == null ? void 0 : x.find((k) => k.value === g)) != null && E.exclusive);
|
|
2816
2817
|
}
|
|
2817
2818
|
);
|
|
2818
2819
|
if (d.includes(u)) {
|
|
@@ -2998,11 +2999,11 @@ function bs(e) {
|
|
|
2998
2999
|
return r;
|
|
2999
3000
|
}
|
|
3000
3001
|
const ys = ({ question: e }) => {
|
|
3001
|
-
var
|
|
3002
|
-
const { getAnswer: r, setAnswer: a, validationErrors: s } = me(), o = r(e.key), i = s[e.key], _ = `${e.key}-combobox`, [f, u] =
|
|
3003
|
-
|
|
3002
|
+
var ue;
|
|
3003
|
+
const { getAnswer: r, setAnswer: a, validationErrors: s } = me(), o = r(e.key), i = s[e.key], _ = `${e.key}-combobox`, [f, u] = S(""), [h, d] = S(!1), [m, g] = S([]), [x, E] = S(!1), k = G(null), W = G(null), P = G(null), [Y, j] = S(null), [ne, M] = S({}), ie = De(Ye);
|
|
3004
|
+
oe(() => {
|
|
3004
3005
|
let y = !1;
|
|
3005
|
-
return e.dataSource === "homebuilders" &&
|
|
3006
|
+
return e.dataSource === "homebuilders" && ie ? (E(!0), ie.getHomebuilders().then((C) => {
|
|
3006
3007
|
y || g(
|
|
3007
3008
|
C.homebuilders.map((v) => ({
|
|
3008
3009
|
label: v.displayName,
|
|
@@ -3017,7 +3018,7 @@ const ys = ({ question: e }) => {
|
|
|
3017
3018
|
}))
|
|
3018
3019
|
) : g([]));
|
|
3019
3020
|
}).finally(() => {
|
|
3020
|
-
y ||
|
|
3021
|
+
y || E(!1);
|
|
3021
3022
|
})) : e.options ? g(
|
|
3022
3023
|
e.options.map((C) => ({
|
|
3023
3024
|
label: C.label,
|
|
@@ -3026,19 +3027,19 @@ const ys = ({ question: e }) => {
|
|
|
3026
3027
|
) : g([]), () => {
|
|
3027
3028
|
y = !0;
|
|
3028
3029
|
};
|
|
3029
|
-
}, [e.dataSource, e.options,
|
|
3030
|
-
const
|
|
3031
|
-
const y =
|
|
3030
|
+
}, [e.dataSource, e.options, ie]);
|
|
3031
|
+
const q = Ee(() => {
|
|
3032
|
+
const y = W.current;
|
|
3032
3033
|
if (!y) return;
|
|
3033
|
-
const C = y.getBoundingClientRect(), v = window.visualViewport,
|
|
3034
|
+
const C = y.getBoundingClientRect(), v = window.visualViewport, O = (v == null ? void 0 : v.height) ?? window.innerHeight, Q = (v == null ? void 0 : v.width) ?? window.innerWidth, pe = (v == null ? void 0 : v.offsetTop) ?? 0, he = (v == null ? void 0 : v.offsetLeft) ?? 0, R = pe + O - C.bottom - pt - Le, U = Math.max(
|
|
3034
3035
|
_s,
|
|
3035
|
-
Math.min(gs,
|
|
3036
|
-
),
|
|
3036
|
+
Math.min(gs, R)
|
|
3037
|
+
), B = Math.min(C.width, Q - Le * 2), le = he + Le, fe = he + Q - B - Le, ge = Math.max(le, Math.min(C.left, fe));
|
|
3037
3038
|
j({
|
|
3038
3039
|
top: C.bottom + window.scrollY + pt,
|
|
3039
3040
|
left: ge + window.scrollX,
|
|
3040
|
-
width:
|
|
3041
|
-
maxHeight:
|
|
3041
|
+
width: B,
|
|
3042
|
+
maxHeight: U
|
|
3042
3043
|
});
|
|
3043
3044
|
}, []);
|
|
3044
3045
|
Ut(() => {
|
|
@@ -3046,8 +3047,8 @@ const ys = ({ question: e }) => {
|
|
|
3046
3047
|
j(null);
|
|
3047
3048
|
return;
|
|
3048
3049
|
}
|
|
3049
|
-
|
|
3050
|
-
const y = () =>
|
|
3050
|
+
W.current && M(bs(W.current)), q();
|
|
3051
|
+
const y = () => q();
|
|
3051
3052
|
window.addEventListener("scroll", y, !0), window.addEventListener("resize", y);
|
|
3052
3053
|
const C = window.visualViewport;
|
|
3053
3054
|
C == null || C.addEventListener("resize", y), C == null || C.addEventListener("scroll", y);
|
|
@@ -3055,71 +3056,71 @@ const ys = ({ question: e }) => {
|
|
|
3055
3056
|
return () => {
|
|
3056
3057
|
window.removeEventListener("scroll", y, !0), window.removeEventListener("resize", y), C == null || C.removeEventListener("resize", y), C == null || C.removeEventListener("scroll", y), window.clearTimeout(v);
|
|
3057
3058
|
};
|
|
3058
|
-
}, [h,
|
|
3059
|
+
}, [h, q]), oe(() => {
|
|
3059
3060
|
const y = (C) => {
|
|
3060
|
-
var
|
|
3061
|
+
var O, Q;
|
|
3061
3062
|
const v = C.target;
|
|
3062
|
-
(
|
|
3063
|
+
(O = k.current) != null && O.contains(v) || (Q = P.current) != null && Q.contains(v) || d(!1);
|
|
3063
3064
|
};
|
|
3064
3065
|
return document.addEventListener("mousedown", y), () => document.removeEventListener("mousedown", y);
|
|
3065
3066
|
}, []);
|
|
3066
|
-
const
|
|
3067
|
+
const A = f ? m.filter(
|
|
3067
3068
|
(y) => y.label.toLowerCase().includes(f.toLowerCase())
|
|
3068
|
-
) : m,
|
|
3069
|
+
) : m, $ = (ue = m.find((y) => y.value === o)) == null ? void 0 : ue.label, [Z, ae] = S(-1), z = `${e.key}-listbox`, K = Ee(
|
|
3069
3070
|
(y) => {
|
|
3070
|
-
a(e.key, y), d(!1), u(""),
|
|
3071
|
+
a(e.key, y), d(!1), u(""), ae(-1);
|
|
3071
3072
|
},
|
|
3072
3073
|
[e.key, a]
|
|
3073
|
-
),
|
|
3074
|
+
), V = (y) => {
|
|
3074
3075
|
if (!h) {
|
|
3075
3076
|
(y.key === "ArrowDown" || y.key === "Enter") && (y.preventDefault(), d(!0));
|
|
3076
3077
|
return;
|
|
3077
3078
|
}
|
|
3078
3079
|
switch (y.key) {
|
|
3079
3080
|
case "ArrowDown":
|
|
3080
|
-
y.preventDefault(),
|
|
3081
|
-
(C) => C <
|
|
3081
|
+
y.preventDefault(), A.length > 0 && ae(
|
|
3082
|
+
(C) => C < A.length - 1 ? C + 1 : 0
|
|
3082
3083
|
);
|
|
3083
3084
|
break;
|
|
3084
3085
|
case "ArrowUp":
|
|
3085
|
-
y.preventDefault(),
|
|
3086
|
-
(C) => C > 0 ? C - 1 :
|
|
3086
|
+
y.preventDefault(), A.length > 0 && ae(
|
|
3087
|
+
(C) => C > 0 ? C - 1 : A.length - 1
|
|
3087
3088
|
);
|
|
3088
3089
|
break;
|
|
3089
3090
|
case "Enter":
|
|
3090
|
-
y.preventDefault(),
|
|
3091
|
+
y.preventDefault(), Z >= 0 && Z < A.length && K(A[Z].value);
|
|
3091
3092
|
break;
|
|
3092
3093
|
case "Escape":
|
|
3093
|
-
y.preventDefault(), d(!1),
|
|
3094
|
+
y.preventDefault(), d(!1), ae(-1);
|
|
3094
3095
|
break;
|
|
3095
3096
|
}
|
|
3096
|
-
},
|
|
3097
|
+
}, se = h && Y && typeof document < "u" ? Gt(
|
|
3097
3098
|
/* @__PURE__ */ t.jsx(
|
|
3098
3099
|
"div",
|
|
3099
3100
|
{
|
|
3100
|
-
ref:
|
|
3101
|
+
ref: P,
|
|
3101
3102
|
className: l.searchableDropdownList,
|
|
3102
3103
|
role: "listbox",
|
|
3103
|
-
id:
|
|
3104
|
+
id: z,
|
|
3104
3105
|
style: {
|
|
3105
3106
|
position: "absolute",
|
|
3106
|
-
top:
|
|
3107
|
-
left:
|
|
3107
|
+
top: Y.top,
|
|
3108
|
+
left: Y.left,
|
|
3108
3109
|
right: "auto",
|
|
3109
|
-
width:
|
|
3110
|
-
maxHeight:
|
|
3111
|
-
...
|
|
3110
|
+
width: Y.width,
|
|
3111
|
+
maxHeight: Y.maxHeight,
|
|
3112
|
+
...ne
|
|
3112
3113
|
},
|
|
3113
|
-
children: x ? /* @__PURE__ */ t.jsx("div", { className: l.searchableDropdownEmpty, children: "Loading..." }) :
|
|
3114
|
+
children: x ? /* @__PURE__ */ t.jsx("div", { className: l.searchableDropdownEmpty, children: "Loading..." }) : A.length === 0 ? /* @__PURE__ */ t.jsx("div", { className: l.searchableDropdownEmpty, children: "No results found" }) : A.map((y, C) => /* @__PURE__ */ t.jsx(
|
|
3114
3115
|
"button",
|
|
3115
3116
|
{
|
|
3116
|
-
id: `${
|
|
3117
|
+
id: `${z}-option-${C}`,
|
|
3117
3118
|
type: "button",
|
|
3118
3119
|
role: "option",
|
|
3119
3120
|
"aria-selected": y.value === o,
|
|
3120
|
-
className: `${l.searchableDropdownOption} ${y.value === o ? l.searchableDropdownOptionSelected : ""} ${C ===
|
|
3121
|
+
className: `${l.searchableDropdownOption} ${y.value === o ? l.searchableDropdownOptionSelected : ""} ${C === Z ? l.searchableDropdownOptionHighlighted : ""}`,
|
|
3121
3122
|
onMouseDown: (v) => v.preventDefault(),
|
|
3122
|
-
onClick: () =>
|
|
3123
|
+
onClick: () => K(y.value),
|
|
3123
3124
|
children: y.label
|
|
3124
3125
|
},
|
|
3125
3126
|
y.value
|
|
@@ -3129,26 +3130,26 @@ const ys = ({ question: e }) => {
|
|
|
3129
3130
|
document.body
|
|
3130
3131
|
) : null;
|
|
3131
3132
|
return /* @__PURE__ */ t.jsxs("div", { ref: k, className: l.fieldGroup, children: [
|
|
3132
|
-
/* @__PURE__ */ t.jsxs("div", { ref:
|
|
3133
|
+
/* @__PURE__ */ t.jsxs("div", { ref: W, className: l.searchableDropdown, children: [
|
|
3133
3134
|
/* @__PURE__ */ t.jsx(
|
|
3134
3135
|
"input",
|
|
3135
3136
|
{
|
|
3136
3137
|
id: _,
|
|
3137
3138
|
type: "text",
|
|
3138
3139
|
className: l.fieldInput,
|
|
3139
|
-
value: h ? f :
|
|
3140
|
+
value: h ? f : $ ?? "",
|
|
3140
3141
|
onChange: (y) => {
|
|
3141
|
-
u(y.target.value),
|
|
3142
|
+
u(y.target.value), ae(-1), h || d(!0);
|
|
3142
3143
|
},
|
|
3143
3144
|
onFocus: () => d(!0),
|
|
3144
|
-
onKeyDown:
|
|
3145
|
+
onKeyDown: V,
|
|
3145
3146
|
placeholder: e.placeholder || "Select or search...",
|
|
3146
3147
|
"aria-label": e.label,
|
|
3147
3148
|
"aria-expanded": h,
|
|
3148
3149
|
role: "combobox",
|
|
3149
3150
|
"aria-haspopup": "listbox",
|
|
3150
|
-
"aria-controls": h ?
|
|
3151
|
-
"aria-activedescendant": h &&
|
|
3151
|
+
"aria-controls": h ? z : void 0,
|
|
3152
|
+
"aria-activedescendant": h && Z >= 0 ? `${z}-option-${Z}` : void 0
|
|
3152
3153
|
}
|
|
3153
3154
|
),
|
|
3154
3155
|
/* @__PURE__ */ t.jsx(
|
|
@@ -3173,7 +3174,7 @@ const ys = ({ question: e }) => {
|
|
|
3173
3174
|
)
|
|
3174
3175
|
] }),
|
|
3175
3176
|
i && /* @__PURE__ */ t.jsx("p", { className: l.fieldError, children: i }),
|
|
3176
|
-
|
|
3177
|
+
se
|
|
3177
3178
|
] });
|
|
3178
3179
|
};
|
|
3179
3180
|
function vs(e) {
|
|
@@ -3202,8 +3203,8 @@ function vs(e) {
|
|
|
3202
3203
|
}
|
|
3203
3204
|
}
|
|
3204
3205
|
const xs = () => {
|
|
3205
|
-
const { currentPage: e, visibleQuestions: r, goToNext: a, contactConsentText: s } = me(), o =
|
|
3206
|
-
return
|
|
3206
|
+
const { currentPage: e, visibleQuestions: r, goToNext: a, contactConsentText: s } = me(), o = G(null);
|
|
3207
|
+
return oe(() => {
|
|
3207
3208
|
var i, _, f;
|
|
3208
3209
|
(_ = (i = o.current) == null ? void 0 : i.scrollTo) == null || _.call(i, { top: 0, behavior: "smooth" }), (f = o.current) == null || f.focus();
|
|
3209
3210
|
}, [e == null ? void 0 : e.id]), e ? /* @__PURE__ */ t.jsxs(
|
|
@@ -3299,30 +3300,30 @@ const xs = () => {
|
|
|
3299
3300
|
partnerLogoUrl: a,
|
|
3300
3301
|
appearance: s = { theme: "minimal" },
|
|
3301
3302
|
initialAnswers: o,
|
|
3302
|
-
|
|
3303
|
-
|
|
3304
|
-
|
|
3305
|
-
|
|
3306
|
-
|
|
3307
|
-
|
|
3308
|
-
|
|
3303
|
+
skipPages: i,
|
|
3304
|
+
smsConsentText: _,
|
|
3305
|
+
onPageChange: f,
|
|
3306
|
+
onAnswerChange: u,
|
|
3307
|
+
onClose: h,
|
|
3308
|
+
onReady: d,
|
|
3309
|
+
onError: m,
|
|
3309
3310
|
contactConsentText: g
|
|
3310
3311
|
}) => {
|
|
3311
3312
|
const x = Se(s);
|
|
3312
3313
|
return /* @__PURE__ */ t.jsx("div", { className: l.container, style: x, children: /* @__PURE__ */ t.jsxs(
|
|
3313
3314
|
Mn,
|
|
3314
3315
|
{
|
|
3315
|
-
market: m,
|
|
3316
3316
|
initialAnswers: o,
|
|
3317
|
-
|
|
3317
|
+
skipPages: i,
|
|
3318
|
+
smsConsentText: _,
|
|
3318
3319
|
contactConsentText: g,
|
|
3319
3320
|
onSubmit: r,
|
|
3320
|
-
onPageChange:
|
|
3321
|
-
onAnswerChange:
|
|
3322
|
-
onReady:
|
|
3323
|
-
onError:
|
|
3321
|
+
onPageChange: f,
|
|
3322
|
+
onAnswerChange: u,
|
|
3323
|
+
onReady: d,
|
|
3324
|
+
onError: m,
|
|
3324
3325
|
children: [
|
|
3325
|
-
/* @__PURE__ */ t.jsx(ts, { partnerLogoUrl: a, onClose:
|
|
3326
|
+
/* @__PURE__ */ t.jsx(ts, { partnerLogoUrl: a, onClose: h }),
|
|
3326
3327
|
/* @__PURE__ */ t.jsx(Cs, { address: e })
|
|
3327
3328
|
]
|
|
3328
3329
|
}
|
|
@@ -3393,36 +3394,36 @@ function Mo({
|
|
|
3393
3394
|
onReady: f,
|
|
3394
3395
|
onError: u
|
|
3395
3396
|
}) {
|
|
3396
|
-
const h = kt(), d = Se(o), [m, g] =
|
|
3397
|
-
|
|
3397
|
+
const h = kt(), d = Se(o), [m, g] = S(_o), [x, E] = S("select"), [k, W] = S(null), [P, Y] = S(null), [j, ne] = S(null), [M, ie] = S(r ?? ""), [q, A] = S(gt(a ?? "")), [$, Z] = S(null), [ae, z] = S(""), [K, V] = S(!1), [se, ue] = S(null);
|
|
3398
|
+
oe(() => {
|
|
3398
3399
|
let I = !1;
|
|
3399
3400
|
return (async () => {
|
|
3400
3401
|
try {
|
|
3401
|
-
const
|
|
3402
|
+
const R = await h.getAssessmentSlots({ offerId: e });
|
|
3402
3403
|
if (I) return;
|
|
3403
3404
|
if (g({
|
|
3404
3405
|
loading: !1,
|
|
3405
3406
|
error: null,
|
|
3406
|
-
availableSlots:
|
|
3407
|
-
isSlotBased:
|
|
3408
|
-
timezone:
|
|
3409
|
-
}),
|
|
3410
|
-
|
|
3407
|
+
availableSlots: R.availableSlots,
|
|
3408
|
+
isSlotBased: R.isSlotBased,
|
|
3409
|
+
timezone: R.timezone
|
|
3410
|
+
}), R.availableSlots.length > 0)
|
|
3411
|
+
ne(
|
|
3411
3412
|
yo(
|
|
3412
|
-
_t(
|
|
3413
|
+
_t(R.availableSlots[0], R.timezone)
|
|
3413
3414
|
)
|
|
3414
3415
|
);
|
|
3415
3416
|
else {
|
|
3416
|
-
const
|
|
3417
|
-
|
|
3417
|
+
const U = /* @__PURE__ */ new Date();
|
|
3418
|
+
ne({ year: U.getFullYear(), month: U.getMonth() });
|
|
3418
3419
|
}
|
|
3419
3420
|
f == null || f();
|
|
3420
|
-
} catch (
|
|
3421
|
-
const
|
|
3421
|
+
} catch (R) {
|
|
3422
|
+
const U = R instanceof Error ? R : new Error(String(R));
|
|
3422
3423
|
if (I) return;
|
|
3423
|
-
g((le) => ({ ...le, loading: !1, error:
|
|
3424
|
-
const
|
|
3425
|
-
|
|
3424
|
+
g((le) => ({ ...le, loading: !1, error: U }));
|
|
3425
|
+
const B = /* @__PURE__ */ new Date();
|
|
3426
|
+
ne({ year: B.getFullYear(), month: B.getMonth() }), u == null || u(U);
|
|
3426
3427
|
}
|
|
3427
3428
|
})(), () => {
|
|
3428
3429
|
I = !0;
|
|
@@ -3430,9 +3431,9 @@ function Mo({
|
|
|
3430
3431
|
}, [h, e]);
|
|
3431
3432
|
const y = Ie(() => {
|
|
3432
3433
|
const I = /* @__PURE__ */ new Map();
|
|
3433
|
-
for (const
|
|
3434
|
-
const
|
|
3435
|
-
|
|
3434
|
+
for (const R of m.availableSlots) {
|
|
3435
|
+
const U = _t(R, m.timezone), B = I.get(U) ?? [];
|
|
3436
|
+
B.push(R), I.set(U, B);
|
|
3436
3437
|
}
|
|
3437
3438
|
return I;
|
|
3438
3439
|
}, [m.availableSlots, m.timezone]);
|
|
@@ -3457,7 +3458,7 @@ function Mo({
|
|
|
3457
3458
|
}
|
|
3458
3459
|
);
|
|
3459
3460
|
if (x === "success") {
|
|
3460
|
-
const I =
|
|
3461
|
+
const I = P ? new Date(P) : null;
|
|
3461
3462
|
return /* @__PURE__ */ t.jsx(
|
|
3462
3463
|
"div",
|
|
3463
3464
|
{
|
|
@@ -3475,7 +3476,7 @@ function Mo({
|
|
|
3475
3476
|
strokeLinejoin: "round"
|
|
3476
3477
|
}
|
|
3477
3478
|
) }) }),
|
|
3478
|
-
/* @__PURE__ */ t.jsx("h2", { className: p.title, children:
|
|
3479
|
+
/* @__PURE__ */ t.jsx("h2", { className: p.title, children: M ? `${bo(M)}, your assessment is scheduled!` : "Your assessment is scheduled!" }),
|
|
3479
3480
|
/* @__PURE__ */ t.jsx("p", { className: p.subtitle, children: "A calendar invite has been sent to your email address." }),
|
|
3480
3481
|
/* @__PURE__ */ t.jsxs("div", { className: p.summaryCard, children: [
|
|
3481
3482
|
I && /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
@@ -3507,28 +3508,28 @@ function Mo({
|
|
|
3507
3508
|
);
|
|
3508
3509
|
}
|
|
3509
3510
|
if (x === "confirm") {
|
|
3510
|
-
const I =
|
|
3511
|
-
if (!(!
|
|
3512
|
-
|
|
3511
|
+
const I = q.replace(/\D/g, ""), R = !K && M.trim().length > 0 && I.length >= 10 && $ !== null && (!$ || ae.trim().length > 0), U = async () => {
|
|
3512
|
+
if (!(!R || !P)) {
|
|
3513
|
+
V(!0), ue(null);
|
|
3513
3514
|
try {
|
|
3514
|
-
const
|
|
3515
|
+
const B = $ ? `Customer: ${M.trim()}. Access instructions: ${ae.trim()}` : `Customer: ${M.trim()}. No gate code or entry restrictions.`, le = await h.scheduleAssessment({
|
|
3515
3516
|
offerId: e,
|
|
3516
|
-
selectedInspectionTime:
|
|
3517
|
-
reminderPhone:
|
|
3518
|
-
notes:
|
|
3517
|
+
selectedInspectionTime: P,
|
|
3518
|
+
reminderPhone: q.replace(/\D/g, ""),
|
|
3519
|
+
notes: B
|
|
3519
3520
|
});
|
|
3520
|
-
|
|
3521
|
+
E("success");
|
|
3521
3522
|
try {
|
|
3522
3523
|
await (i == null ? void 0 : i(le.visitId));
|
|
3523
3524
|
} catch (fe) {
|
|
3524
3525
|
const ge = fe instanceof Error ? fe : new Error(String(fe));
|
|
3525
3526
|
u == null || u(ge);
|
|
3526
3527
|
}
|
|
3527
|
-
} catch (
|
|
3528
|
-
const le =
|
|
3529
|
-
|
|
3528
|
+
} catch (B) {
|
|
3529
|
+
const le = B instanceof Error ? B : new Error(String(B));
|
|
3530
|
+
ue(le.message), u == null || u(le);
|
|
3530
3531
|
} finally {
|
|
3531
|
-
|
|
3532
|
+
V(!1);
|
|
3532
3533
|
}
|
|
3533
3534
|
}
|
|
3534
3535
|
};
|
|
@@ -3547,9 +3548,9 @@ function Mo({
|
|
|
3547
3548
|
{
|
|
3548
3549
|
className: p.input,
|
|
3549
3550
|
type: "text",
|
|
3550
|
-
value:
|
|
3551
|
-
onChange: (
|
|
3552
|
-
disabled:
|
|
3551
|
+
value: M,
|
|
3552
|
+
onChange: (B) => ie(B.target.value),
|
|
3553
|
+
disabled: K
|
|
3553
3554
|
}
|
|
3554
3555
|
)
|
|
3555
3556
|
] }),
|
|
@@ -3563,9 +3564,9 @@ function Mo({
|
|
|
3563
3564
|
inputMode: "tel",
|
|
3564
3565
|
autoComplete: "tel",
|
|
3565
3566
|
placeholder: "(555) 555-5555",
|
|
3566
|
-
value:
|
|
3567
|
-
onChange: (
|
|
3568
|
-
disabled:
|
|
3567
|
+
value: q,
|
|
3568
|
+
onChange: (B) => A(gt(B.target.value)),
|
|
3569
|
+
disabled: K
|
|
3569
3570
|
}
|
|
3570
3571
|
)
|
|
3571
3572
|
] }),
|
|
@@ -3578,9 +3579,9 @@ function Mo({
|
|
|
3578
3579
|
{
|
|
3579
3580
|
type: "radio",
|
|
3580
3581
|
name: "gate-code",
|
|
3581
|
-
checked:
|
|
3582
|
-
onChange: () =>
|
|
3583
|
-
disabled:
|
|
3582
|
+
checked: $ === !0,
|
|
3583
|
+
onChange: () => Z(!0),
|
|
3584
|
+
disabled: K
|
|
3584
3585
|
}
|
|
3585
3586
|
),
|
|
3586
3587
|
/* @__PURE__ */ t.jsx("span", { children: "Yes" })
|
|
@@ -3591,16 +3592,16 @@ function Mo({
|
|
|
3591
3592
|
{
|
|
3592
3593
|
type: "radio",
|
|
3593
3594
|
name: "gate-code",
|
|
3594
|
-
checked:
|
|
3595
|
-
onChange: () =>
|
|
3596
|
-
disabled:
|
|
3595
|
+
checked: $ === !1,
|
|
3596
|
+
onChange: () => Z(!1),
|
|
3597
|
+
disabled: K
|
|
3597
3598
|
}
|
|
3598
3599
|
),
|
|
3599
3600
|
/* @__PURE__ */ t.jsx("span", { children: "No" })
|
|
3600
3601
|
] })
|
|
3601
3602
|
] })
|
|
3602
3603
|
] }),
|
|
3603
|
-
|
|
3604
|
+
$ && /* @__PURE__ */ t.jsxs("label", { className: p.field, children: [
|
|
3604
3605
|
/* @__PURE__ */ t.jsx("span", { className: p.fieldLabel, children: "Please provide access instructions for your home." }),
|
|
3605
3606
|
/* @__PURE__ */ t.jsx(
|
|
3606
3607
|
"input",
|
|
@@ -3608,21 +3609,21 @@ function Mo({
|
|
|
3608
3609
|
className: p.input,
|
|
3609
3610
|
type: "text",
|
|
3610
3611
|
placeholder: "Gate code, directions, etc.",
|
|
3611
|
-
value:
|
|
3612
|
-
onChange: (
|
|
3613
|
-
disabled:
|
|
3612
|
+
value: ae,
|
|
3613
|
+
onChange: (B) => z(B.target.value),
|
|
3614
|
+
disabled: K
|
|
3614
3615
|
}
|
|
3615
3616
|
)
|
|
3616
3617
|
] }),
|
|
3617
|
-
|
|
3618
|
+
se && /* @__PURE__ */ t.jsx("p", { className: p.errorText, children: se }),
|
|
3618
3619
|
/* @__PURE__ */ t.jsxs("div", { className: p.actionsRow, children: [
|
|
3619
3620
|
/* @__PURE__ */ t.jsx(
|
|
3620
3621
|
"button",
|
|
3621
3622
|
{
|
|
3622
3623
|
type: "button",
|
|
3623
3624
|
className: p.linkButton,
|
|
3624
|
-
onClick: () =>
|
|
3625
|
-
disabled:
|
|
3625
|
+
onClick: () => E("select"),
|
|
3626
|
+
disabled: K,
|
|
3626
3627
|
children: "← Back"
|
|
3627
3628
|
}
|
|
3628
3629
|
),
|
|
@@ -3631,9 +3632,9 @@ function Mo({
|
|
|
3631
3632
|
{
|
|
3632
3633
|
type: "button",
|
|
3633
3634
|
className: p.primaryButton,
|
|
3634
|
-
onClick: () => void
|
|
3635
|
-
disabled: !
|
|
3636
|
-
children:
|
|
3635
|
+
onClick: () => void U(),
|
|
3636
|
+
disabled: !R,
|
|
3637
|
+
children: K ? "Scheduling…" : "Schedule"
|
|
3637
3638
|
}
|
|
3638
3639
|
)
|
|
3639
3640
|
] }),
|
|
@@ -3642,7 +3643,7 @@ function Mo({
|
|
|
3642
3643
|
}
|
|
3643
3644
|
);
|
|
3644
3645
|
}
|
|
3645
|
-
const C = vo(j), v = xo(j),
|
|
3646
|
+
const C = vo(j), v = xo(j), O = Co(j, y), Q = wo(j, y), pe = k ? y.get(k) ?? [] : [], he = pe[0] ? bt(new Date(pe[0]), m.timezone) : null;
|
|
3646
3647
|
return /* @__PURE__ */ t.jsx(
|
|
3647
3648
|
"div",
|
|
3648
3649
|
{
|
|
@@ -3667,8 +3668,8 @@ function Mo({
|
|
|
3667
3668
|
{
|
|
3668
3669
|
type: "button",
|
|
3669
3670
|
className: p.calendarNavButton,
|
|
3670
|
-
onClick: () =>
|
|
3671
|
-
disabled: !
|
|
3671
|
+
onClick: () => ne(vt(j, -1)),
|
|
3672
|
+
disabled: !O,
|
|
3672
3673
|
"aria-label": "Previous month",
|
|
3673
3674
|
children: "‹"
|
|
3674
3675
|
}
|
|
@@ -3679,8 +3680,8 @@ function Mo({
|
|
|
3679
3680
|
{
|
|
3680
3681
|
type: "button",
|
|
3681
3682
|
className: p.calendarNavButton,
|
|
3682
|
-
onClick: () =>
|
|
3683
|
-
disabled: !
|
|
3683
|
+
onClick: () => ne(vt(j, 1)),
|
|
3684
|
+
disabled: !Q,
|
|
3684
3685
|
"aria-label": "Next month",
|
|
3685
3686
|
children: "›"
|
|
3686
3687
|
}
|
|
@@ -3688,21 +3689,21 @@ function Mo({
|
|
|
3688
3689
|
] }),
|
|
3689
3690
|
/* @__PURE__ */ t.jsxs("div", { className: p.calendarGrid, children: [
|
|
3690
3691
|
["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"].map((I) => /* @__PURE__ */ t.jsx("div", { className: p.calendarDayHeader, children: I }, I)),
|
|
3691
|
-
C.map((I,
|
|
3692
|
-
const
|
|
3692
|
+
C.map((I, R) => {
|
|
3693
|
+
const U = I ? y.has(I.key) : !1, B = !!I && I.key === k;
|
|
3693
3694
|
return /* @__PURE__ */ t.jsx(
|
|
3694
3695
|
"button",
|
|
3695
3696
|
{
|
|
3696
3697
|
type: "button",
|
|
3697
|
-
className:
|
|
3698
|
+
className: B ? p.calendarDaySelected : U ? p.calendarDayAvailable : p.calendarDayDisabled,
|
|
3698
3699
|
onClick: () => {
|
|
3699
|
-
I &&
|
|
3700
|
+
I && U && (W(I.key), Y(null));
|
|
3700
3701
|
},
|
|
3701
|
-
disabled: !
|
|
3702
|
-
"aria-pressed": !!
|
|
3702
|
+
disabled: !U,
|
|
3703
|
+
"aria-pressed": !!B,
|
|
3703
3704
|
children: I ? I.day : ""
|
|
3704
3705
|
},
|
|
3705
|
-
I ? I.key : `empty-${v}-${
|
|
3706
|
+
I ? I.key : `empty-${v}-${R}`
|
|
3706
3707
|
);
|
|
3707
3708
|
})
|
|
3708
3709
|
] }),
|
|
@@ -3712,13 +3713,13 @@ function Mo({
|
|
|
3712
3713
|
he
|
|
3713
3714
|
] }),
|
|
3714
3715
|
/* @__PURE__ */ t.jsx("div", { className: p.timeRow, children: pe.map((I) => {
|
|
3715
|
-
const
|
|
3716
|
+
const R = I === P;
|
|
3716
3717
|
return /* @__PURE__ */ t.jsx(
|
|
3717
3718
|
"button",
|
|
3718
3719
|
{
|
|
3719
3720
|
type: "button",
|
|
3720
|
-
className:
|
|
3721
|
-
onClick: () =>
|
|
3721
|
+
className: R ? p.timeButtonSelected : p.timeButton,
|
|
3722
|
+
onClick: () => Y(I),
|
|
3722
3723
|
children: yt(new Date(I), m.timezone)
|
|
3723
3724
|
},
|
|
3724
3725
|
I
|
|
@@ -3730,8 +3731,8 @@ function Mo({
|
|
|
3730
3731
|
{
|
|
3731
3732
|
type: "button",
|
|
3732
3733
|
className: p.primaryButton,
|
|
3733
|
-
onClick: () =>
|
|
3734
|
-
disabled: !
|
|
3734
|
+
onClick: () => E("confirm"),
|
|
3735
|
+
disabled: !P,
|
|
3735
3736
|
children: "Continue"
|
|
3736
3737
|
}
|
|
3737
3738
|
)
|