tf-checkout-react-native 2.0.0-beta.13 → 2.0.0-beta.15
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.d.mts +38 -37
- package/dist/index.d.ts +38 -37
- package/dist/index.js +732 -343
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +686 -294
- package/dist/index.mjs.map +1 -1
- package/package.json +6 -3
- package/src/confirmer.ts +338 -99
- package/src/index.tsx +10 -2
- package/src/instance.ts +1 -3
- package/src/paymentSheet.ts +170 -0
- package/src/sections/Payment.tsx +41 -24
- package/src/ui/CheckoutProvider.tsx +14 -12
- package/src/ui/CustomFields.tsx +7 -4
- package/src/ui/Select.tsx +30 -6
- package/src/useCheckout.ts +78 -3
package/dist/index.js
CHANGED
|
@@ -6833,8 +6833,8 @@ var beginRequest = (currentScope) => {
|
|
|
6833
6833
|
var createActionLock = () => {
|
|
6834
6834
|
const held = /* @__PURE__ */ new Set();
|
|
6835
6835
|
const waiting = /* @__PURE__ */ new Map();
|
|
6836
|
-
const
|
|
6837
|
-
const notify = () =>
|
|
6836
|
+
const listeners42 = /* @__PURE__ */ new Set();
|
|
6837
|
+
const notify = () => listeners42.forEach((listener) => listener());
|
|
6838
6838
|
return {
|
|
6839
6839
|
acquire: (scope) => {
|
|
6840
6840
|
if (held.has(scope)) return null;
|
|
@@ -6858,9 +6858,9 @@ var createActionLock = () => {
|
|
|
6858
6858
|
waiting.set(scope, [...(_a2 = waiting.get(scope)) != null ? _a2 : [], resolve]);
|
|
6859
6859
|
}) : Promise.resolve(),
|
|
6860
6860
|
subscribe: (listener) => {
|
|
6861
|
-
|
|
6861
|
+
listeners42.add(listener);
|
|
6862
6862
|
return () => {
|
|
6863
|
-
|
|
6863
|
+
listeners42.delete(listener);
|
|
6864
6864
|
};
|
|
6865
6865
|
}
|
|
6866
6866
|
};
|
|
@@ -8893,9 +8893,9 @@ var withOrderFixed = (snapshot, progress) => {
|
|
|
8893
8893
|
};
|
|
8894
8894
|
var createCheckoutStore = (initial = initialSnapshot()) => {
|
|
8895
8895
|
let state = initial;
|
|
8896
|
-
const
|
|
8896
|
+
const listeners42 = /* @__PURE__ */ new Set();
|
|
8897
8897
|
const emit = () => {
|
|
8898
|
-
|
|
8898
|
+
listeners42.forEach((listener) => listener(state));
|
|
8899
8899
|
};
|
|
8900
8900
|
const store = {
|
|
8901
8901
|
progress: {},
|
|
@@ -8908,9 +8908,9 @@ var createCheckoutStore = (initial = initialSnapshot()) => {
|
|
|
8908
8908
|
emit();
|
|
8909
8909
|
},
|
|
8910
8910
|
subscribe: (listener) => {
|
|
8911
|
-
|
|
8911
|
+
listeners42.add(listener);
|
|
8912
8912
|
return () => {
|
|
8913
|
-
|
|
8913
|
+
listeners42.delete(listener);
|
|
8914
8914
|
};
|
|
8915
8915
|
},
|
|
8916
8916
|
reset: () => {
|
|
@@ -14388,8 +14388,8 @@ var withCheckoutStart = async (lock2, scope, work) => {
|
|
|
14388
14388
|
var createCardOwnership = () => {
|
|
14389
14389
|
const registered = [];
|
|
14390
14390
|
let chosen = null;
|
|
14391
|
-
const
|
|
14392
|
-
const emit = () =>
|
|
14391
|
+
const listeners42 = /* @__PURE__ */ new Set();
|
|
14392
|
+
const emit = () => listeners42.forEach((listener) => listener());
|
|
14393
14393
|
return {
|
|
14394
14394
|
register: (id2) => {
|
|
14395
14395
|
if (!chosen && registered.length === 1 && registered[0] !== id2)
|
|
@@ -14414,8 +14414,8 @@ var createCardOwnership = () => {
|
|
|
14414
14414
|
// single section never flashes "Continue paying here" while it mounts.
|
|
14415
14415
|
owns: (id2) => registered.includes(id2) ? chosen ? chosen === id2 : registered.every((other) => other === id2) : registered.length === 0,
|
|
14416
14416
|
subscribe: (listener) => {
|
|
14417
|
-
|
|
14418
|
-
return () =>
|
|
14417
|
+
listeners42.add(listener);
|
|
14418
|
+
return () => listeners42.delete(listener);
|
|
14419
14419
|
}
|
|
14420
14420
|
};
|
|
14421
14421
|
};
|
|
@@ -14496,8 +14496,8 @@ var gateCheckoutActions = (actions, gateway, holder) => {
|
|
|
14496
14496
|
};
|
|
14497
14497
|
var createConfirmerGateway = (lock2, scope) => {
|
|
14498
14498
|
let current5 = null;
|
|
14499
|
-
const
|
|
14500
|
-
const emit = () =>
|
|
14499
|
+
const listeners42 = /* @__PURE__ */ new Set();
|
|
14500
|
+
const emit = () => listeners42.forEach((listener) => listener());
|
|
14501
14501
|
const held = async (release, holder, work) => {
|
|
14502
14502
|
current5 = holder;
|
|
14503
14503
|
emit();
|
|
@@ -14527,9 +14527,9 @@ var createConfirmerGateway = (lock2, scope) => {
|
|
|
14527
14527
|
},
|
|
14528
14528
|
holder: () => current5,
|
|
14529
14529
|
subscribe: (listener) => {
|
|
14530
|
-
|
|
14530
|
+
listeners42.add(listener);
|
|
14531
14531
|
return () => {
|
|
14532
|
-
|
|
14532
|
+
listeners42.delete(listener);
|
|
14533
14533
|
};
|
|
14534
14534
|
}
|
|
14535
14535
|
};
|
|
@@ -14600,8 +14600,8 @@ var createPaymentMarks = () => {
|
|
|
14600
14600
|
let marks = {};
|
|
14601
14601
|
let details = {};
|
|
14602
14602
|
const live = /* @__PURE__ */ new Set();
|
|
14603
|
-
const
|
|
14604
|
-
const emit = () =>
|
|
14603
|
+
const listeners42 = /* @__PURE__ */ new Set();
|
|
14604
|
+
const emit = () => listeners42.forEach((listener) => listener());
|
|
14605
14605
|
const state = (ticketHash, owner) => {
|
|
14606
14606
|
const by = marks[ticketHash];
|
|
14607
14607
|
if (!by) return "none";
|
|
@@ -14638,9 +14638,9 @@ var createPaymentMarks = () => {
|
|
|
14638
14638
|
emit();
|
|
14639
14639
|
},
|
|
14640
14640
|
subscribe: (listener) => {
|
|
14641
|
-
|
|
14641
|
+
listeners42.add(listener);
|
|
14642
14642
|
return () => {
|
|
14643
|
-
|
|
14643
|
+
listeners42.delete(listener);
|
|
14644
14644
|
};
|
|
14645
14645
|
}
|
|
14646
14646
|
};
|
|
@@ -15336,8 +15336,8 @@ var bindAppCheckoutEngine = (engine) => {
|
|
|
15336
15336
|
);
|
|
15337
15337
|
};
|
|
15338
15338
|
var ttfKeys = {
|
|
15339
|
-
trips: (
|
|
15340
|
-
trip: (
|
|
15339
|
+
trips: (accountKey2, query) => ["ttf", "trips", accountKey2, query],
|
|
15340
|
+
trip: (accountKey2, eventId, query) => ["ttf", "trip", accountKey2, eventId, query],
|
|
15341
15341
|
profile: ["ttf", "profile"],
|
|
15342
15342
|
countries: ["ttf", "countries"],
|
|
15343
15343
|
states: (countryId) => ["ttf", "states", countryId],
|
|
@@ -17874,22 +17874,22 @@ var useWaiverSigning = (eventId, waiver, attach, hold) => {
|
|
|
17874
17874
|
sign
|
|
17875
17875
|
};
|
|
17876
17876
|
};
|
|
17877
|
-
var useTrips = (
|
|
17877
|
+
var useTrips = (accountKey2, query = {}, options) => {
|
|
17878
17878
|
var _a2;
|
|
17879
17879
|
return useSessionQuery({
|
|
17880
17880
|
...options,
|
|
17881
|
-
queryKey: ttfKeys.trips(
|
|
17881
|
+
queryKey: ttfKeys.trips(accountKey2 != null ? accountKey2 : "", query),
|
|
17882
17882
|
queryFn: () => ttf.trips.list(query),
|
|
17883
|
-
enabled:
|
|
17883
|
+
enabled: accountKey2 ? (_a2 = options == null ? void 0 : options.enabled) != null ? _a2 : true : false
|
|
17884
17884
|
});
|
|
17885
17885
|
};
|
|
17886
|
-
var useTrip = (
|
|
17886
|
+
var useTrip = (accountKey2, eventId, query = {}, options) => {
|
|
17887
17887
|
var _a2;
|
|
17888
17888
|
return useSessionQuery({
|
|
17889
17889
|
...options,
|
|
17890
|
-
queryKey: ttfKeys.trip(
|
|
17890
|
+
queryKey: ttfKeys.trip(accountKey2 != null ? accountKey2 : "", eventId != null ? eventId : "", query),
|
|
17891
17891
|
queryFn: () => ttf.trips.get(eventId, query),
|
|
17892
|
-
enabled:
|
|
17892
|
+
enabled: accountKey2 && eventId ? (_a2 = options == null ? void 0 : options.enabled) != null ? _a2 : true : false
|
|
17893
17893
|
});
|
|
17894
17894
|
};
|
|
17895
17895
|
var useCheckoutPhoneIdentity = (options) => {
|
|
@@ -24010,6 +24010,9 @@ var translateAccountMessage = (translate2, english, vars) => {
|
|
|
24010
24010
|
return english.replace(/\{\{\s*(\w+)\s*\}\}/g, (whole, name) => (vars == null ? void 0 : vars[name]) === void 0 ? whole : String(vars[name]));
|
|
24011
24011
|
};
|
|
24012
24012
|
|
|
24013
|
+
// src/useCheckout.ts
|
|
24014
|
+
var import_react46 = require("react");
|
|
24015
|
+
|
|
24013
24016
|
// src/CardInput.tsx
|
|
24014
24017
|
var import_react45 = require("react");
|
|
24015
24018
|
var import_react_native4 = require("react-native");
|
|
@@ -24527,7 +24530,10 @@ var getQueryClient = () => {
|
|
|
24527
24530
|
}
|
|
24528
24531
|
return sharedQueryClient;
|
|
24529
24532
|
};
|
|
24530
|
-
var CheckoutThemeProvider = ({
|
|
24533
|
+
var CheckoutThemeProvider = ({
|
|
24534
|
+
theme,
|
|
24535
|
+
children
|
|
24536
|
+
}) => {
|
|
24531
24537
|
const resolved = (0, import_react44.useMemo)(() => resolveTheme(theme), [theme]);
|
|
24532
24538
|
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ThemeCtx.Provider, { value: resolved, children });
|
|
24533
24539
|
};
|
|
@@ -24550,7 +24556,8 @@ var SelfProvidedCheckout = ({
|
|
|
24550
24556
|
const { providerPage, page: page2 } = useProviderPages();
|
|
24551
24557
|
const checkout = useCheckout2({
|
|
24552
24558
|
ports: { onInstallmentOffers, providerPage },
|
|
24553
|
-
options: rest.options
|
|
24559
|
+
options: rest.options,
|
|
24560
|
+
paymentSheet: rest.paymentSheet
|
|
24554
24561
|
});
|
|
24555
24562
|
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(CheckoutRoot, { checkout, ...rest, children: [
|
|
24556
24563
|
children,
|
|
@@ -24652,6 +24659,107 @@ var styles2 = import_react_native4.StyleSheet.create({
|
|
|
24652
24659
|
// src/confirmer.ts
|
|
24653
24660
|
var import_react_native5 = require("react-native");
|
|
24654
24661
|
var import_stripe_react_native2 = require("@stripe/stripe-react-native");
|
|
24662
|
+
|
|
24663
|
+
// src/paymentSheet.ts
|
|
24664
|
+
var nativePaymentSheetAvailable = (snapshot) => {
|
|
24665
|
+
var _a2;
|
|
24666
|
+
return snapshot.gateway === "stripe_payment_intents" && typeof ((_a2 = snapshot.breakdown) == null ? void 0 : _a2.currencyCode) === "string" && /^[A-Z]{3}$/.test(snapshot.breakdown.currencyCode) && snapshot.breakdown.currencyCode !== "MXN";
|
|
24667
|
+
};
|
|
24668
|
+
var NATIVE_SHEET_CARD_FIELD_REQUIRED = "NATIVE_SHEET_CARD_FIELD_REQUIRED";
|
|
24669
|
+
var NATIVE_SHEET_CARD_FIELD_MESSAGE = "Enter your card details below, then select Pay to continue.";
|
|
24670
|
+
var NATIVE_SHEET_REVIEW_REQUIRED = "The original payment details changed. Review this order before paying.";
|
|
24671
|
+
var nativeSheetIntentIdentity = (intent, intentId, reviewed) => {
|
|
24672
|
+
if (!intent || typeof intent !== "object" || !reviewed || !Number.isSafeInteger(reviewed.amountMinor) || reviewed.amountMinor <= 0 || !/^[A-Z]{3}$/.test(reviewed.currency))
|
|
24673
|
+
return false;
|
|
24674
|
+
const own = (key5) => {
|
|
24675
|
+
var _a2;
|
|
24676
|
+
return (_a2 = Object.getOwnPropertyDescriptor(intent, key5)) == null ? void 0 : _a2.value;
|
|
24677
|
+
};
|
|
24678
|
+
const amount2 = own("amount");
|
|
24679
|
+
const currency = own("currency");
|
|
24680
|
+
return own("id") === intentId && Number.isSafeInteger(amount2) && amount2 === reviewed.amountMinor && typeof currency === "string" && /^[A-Za-z]{3}$/.test(currency) && currency.toUpperCase() === reviewed.currency;
|
|
24681
|
+
};
|
|
24682
|
+
var nativeSheetCardMethods = (intent) => {
|
|
24683
|
+
var _a2;
|
|
24684
|
+
if (!intent || typeof intent !== "object") return false;
|
|
24685
|
+
const methods = (_a2 = Object.getOwnPropertyDescriptor(intent, "paymentMethodTypes")) == null ? void 0 : _a2.value;
|
|
24686
|
+
return Array.isArray(methods) && methods.length === 1 && methods[0] === "card";
|
|
24687
|
+
};
|
|
24688
|
+
var createPaymentSheetConfirmation = (sdk, options) => {
|
|
24689
|
+
let active2 = false;
|
|
24690
|
+
const assertAfterPresentation = () => {
|
|
24691
|
+
try {
|
|
24692
|
+
options.assertCurrent();
|
|
24693
|
+
} catch (e) {
|
|
24694
|
+
throw paymentProviderError("The original payment owner changed.", "unknown");
|
|
24695
|
+
}
|
|
24696
|
+
};
|
|
24697
|
+
return async (clientSecret, billing) => {
|
|
24698
|
+
var _a2;
|
|
24699
|
+
if (active2)
|
|
24700
|
+
throw paymentProviderError("Another payment sheet is active.", "notStarted");
|
|
24701
|
+
const intentId = (_a2 = /^(pi_[A-Za-z0-9]+)_secret_[A-Za-z0-9]+$/.exec(clientSecret)) == null ? void 0 : _a2[1];
|
|
24702
|
+
if (!intentId || !options.merchantDisplayName.trim() || !options.returnURL)
|
|
24703
|
+
throw paymentProviderError("Payment sheet details are unavailable.", "notStarted");
|
|
24704
|
+
options.assertCurrent();
|
|
24705
|
+
active2 = true;
|
|
24706
|
+
try {
|
|
24707
|
+
const before = await sdk.retrievePaymentIntent(clientSecret);
|
|
24708
|
+
options.assertCurrent();
|
|
24709
|
+
const requireAdmittedIntent = (result4) => {
|
|
24710
|
+
if (result4.error || !nativeSheetIntentIdentity(result4.paymentIntent, intentId, options.reviewed))
|
|
24711
|
+
throw paymentProviderError(NATIVE_SHEET_REVIEW_REQUIRED, "notStarted");
|
|
24712
|
+
if (!nativeSheetCardMethods(result4.paymentIntent))
|
|
24713
|
+
throw paymentProviderError(NATIVE_SHEET_CARD_FIELD_MESSAGE, "notStarted", {
|
|
24714
|
+
code: NATIVE_SHEET_CARD_FIELD_REQUIRED
|
|
24715
|
+
});
|
|
24716
|
+
};
|
|
24717
|
+
requireAdmittedIntent(before);
|
|
24718
|
+
if (CONFIRMED_INTENT_STATUSES.includes(before.paymentIntent.status))
|
|
24719
|
+
return confirmedStripeIntentStatus(before.paymentIntent);
|
|
24720
|
+
const initialized = await sdk.initPaymentSheet({
|
|
24721
|
+
paymentIntentClientSecret: clientSecret,
|
|
24722
|
+
merchantDisplayName: options.merchantDisplayName,
|
|
24723
|
+
returnURL: options.returnURL,
|
|
24724
|
+
defaultBillingDetails: billing,
|
|
24725
|
+
customFlow: false,
|
|
24726
|
+
allowsDelayedPaymentMethods: false,
|
|
24727
|
+
// A native Link selection can have a different canonical fee class.
|
|
24728
|
+
// Do not infer equivalence from PI eligibility or a display preference.
|
|
24729
|
+
link: { display: sdk.LinkDisplay.NEVER }
|
|
24730
|
+
});
|
|
24731
|
+
if (initialized.error)
|
|
24732
|
+
throw paymentProviderError(NATIVE_SHEET_CARD_FIELD_MESSAGE, "notStarted", {
|
|
24733
|
+
code: NATIVE_SHEET_CARD_FIELD_REQUIRED
|
|
24734
|
+
});
|
|
24735
|
+
options.assertCurrent();
|
|
24736
|
+
const ready = await sdk.retrievePaymentIntent(clientSecret);
|
|
24737
|
+
options.assertCurrent();
|
|
24738
|
+
requireAdmittedIntent(ready);
|
|
24739
|
+
if (CONFIRMED_INTENT_STATUSES.includes(ready.paymentIntent.status))
|
|
24740
|
+
return confirmedStripeIntentStatus(ready.paymentIntent);
|
|
24741
|
+
const presented = await sdk.presentPaymentSheet();
|
|
24742
|
+
if (presented.error)
|
|
24743
|
+
throw paymentProviderError(
|
|
24744
|
+
presented.error.message || "Payment failed.",
|
|
24745
|
+
nativeStripeErrorOutcome(presented.error)
|
|
24746
|
+
);
|
|
24747
|
+
assertAfterPresentation();
|
|
24748
|
+
const result3 = await sdk.retrievePaymentIntent(clientSecret);
|
|
24749
|
+
if (result3.error || !nativeSheetIntentIdentity(result3.paymentIntent, intentId, options.reviewed) || !nativeSheetCardMethods(result3.paymentIntent))
|
|
24750
|
+
throw paymentProviderError(
|
|
24751
|
+
"The original payment could not be verified.",
|
|
24752
|
+
"unknown"
|
|
24753
|
+
);
|
|
24754
|
+
assertAfterPresentation();
|
|
24755
|
+
return confirmedStripeIntentStatus(result3.paymentIntent);
|
|
24756
|
+
} finally {
|
|
24757
|
+
active2 = false;
|
|
24758
|
+
}
|
|
24759
|
+
};
|
|
24760
|
+
};
|
|
24761
|
+
|
|
24762
|
+
// src/confirmer.ts
|
|
24655
24763
|
var toBillingDetails = (billing) => ({
|
|
24656
24764
|
email: billing.email,
|
|
24657
24765
|
name: `${billing.firstName} ${billing.lastName}`.trim(),
|
|
@@ -24674,23 +24782,169 @@ var stripeFailure = (error, fallback) => {
|
|
|
24674
24782
|
code: (_a2 = error.stripeErrorCode) != null ? _a2 : error.code
|
|
24675
24783
|
});
|
|
24676
24784
|
};
|
|
24785
|
+
var initKey = null;
|
|
24786
|
+
var accountKey = null;
|
|
24787
|
+
var listeners4 = /* @__PURE__ */ new Set();
|
|
24788
|
+
var initializedScheme;
|
|
24789
|
+
var initializing = false;
|
|
24790
|
+
var sheetPresenting = false;
|
|
24791
|
+
var nativeOperationActive = false;
|
|
24792
|
+
var sheetOwner = null;
|
|
24793
|
+
var assertNativeLeaseFree = () => {
|
|
24794
|
+
if (sheetOwner || initializing || nativeOperationActive)
|
|
24795
|
+
throw paymentProviderError(
|
|
24796
|
+
"The payment SDK is owned by another operation.",
|
|
24797
|
+
"notStarted"
|
|
24798
|
+
);
|
|
24799
|
+
};
|
|
24800
|
+
var nativeSdkCall = async (operation) => {
|
|
24801
|
+
assertNativeLeaseFree();
|
|
24802
|
+
nativeOperationActive = true;
|
|
24803
|
+
try {
|
|
24804
|
+
return await operation();
|
|
24805
|
+
} finally {
|
|
24806
|
+
nativeOperationActive = false;
|
|
24807
|
+
}
|
|
24808
|
+
};
|
|
24677
24809
|
var createRnStripeConfirmer = () => {
|
|
24678
|
-
|
|
24679
|
-
let accountKey = null;
|
|
24680
|
-
const listeners4 = /* @__PURE__ */ new Set();
|
|
24681
|
-
return {
|
|
24810
|
+
const adapter = {
|
|
24682
24811
|
init: async ({ publishableKey, accountId, merchantIdentifier, urlScheme }) => {
|
|
24683
|
-
const key5 =
|
|
24684
|
-
if (initKey === key5) return;
|
|
24685
|
-
await (0, import_stripe_react_native2.initStripe)({
|
|
24812
|
+
const key5 = JSON.stringify([
|
|
24686
24813
|
publishableKey,
|
|
24687
|
-
|
|
24688
|
-
|
|
24689
|
-
|
|
24690
|
-
|
|
24691
|
-
|
|
24692
|
-
|
|
24693
|
-
|
|
24814
|
+
accountId != null ? accountId : null,
|
|
24815
|
+
merchantIdentifier != null ? merchantIdentifier : null,
|
|
24816
|
+
urlScheme != null ? urlScheme : null
|
|
24817
|
+
]);
|
|
24818
|
+
if (initializing || sheetOwner && sheetOwner.key !== key5)
|
|
24819
|
+
throw paymentProviderError(
|
|
24820
|
+
"The payment SDK is owned by another operation.",
|
|
24821
|
+
"notStarted"
|
|
24822
|
+
);
|
|
24823
|
+
if (initKey === key5) return;
|
|
24824
|
+
if (nativeOperationActive)
|
|
24825
|
+
throw paymentProviderError(
|
|
24826
|
+
"The payment SDK is owned by another operation.",
|
|
24827
|
+
"notStarted"
|
|
24828
|
+
);
|
|
24829
|
+
initializing = true;
|
|
24830
|
+
initKey = null;
|
|
24831
|
+
accountKey = null;
|
|
24832
|
+
initializedScheme = void 0;
|
|
24833
|
+
try {
|
|
24834
|
+
await (0, import_stripe_react_native2.initStripe)({
|
|
24835
|
+
publishableKey,
|
|
24836
|
+
...accountId ? { stripeAccountId: accountId } : {},
|
|
24837
|
+
...merchantIdentifier ? { merchantIdentifier } : {},
|
|
24838
|
+
...urlScheme ? { urlScheme } : {}
|
|
24839
|
+
});
|
|
24840
|
+
initKey = key5;
|
|
24841
|
+
initializedScheme = urlScheme;
|
|
24842
|
+
accountKey = `${publishableKey}:${accountId != null ? accountId : ""}`;
|
|
24843
|
+
listeners4.forEach((listener) => listener());
|
|
24844
|
+
} finally {
|
|
24845
|
+
initializing = false;
|
|
24846
|
+
}
|
|
24847
|
+
},
|
|
24848
|
+
createPaymentSheetSession: (options) => {
|
|
24849
|
+
let running = false;
|
|
24850
|
+
let owner = null;
|
|
24851
|
+
let requiresCardField = false;
|
|
24852
|
+
let reviewed;
|
|
24853
|
+
return {
|
|
24854
|
+
requiresCardField: () => requiresCardField,
|
|
24855
|
+
cardFieldOperation: async (operation) => {
|
|
24856
|
+
if (running) {
|
|
24857
|
+
requiresCardField = true;
|
|
24858
|
+
throw paymentProviderError("Use the card form for this order.", "notStarted");
|
|
24859
|
+
}
|
|
24860
|
+
return operation();
|
|
24861
|
+
},
|
|
24862
|
+
confirmer: {
|
|
24863
|
+
...adapter,
|
|
24864
|
+
prepareCardPayment: async (context) => {
|
|
24865
|
+
if (!running) return;
|
|
24866
|
+
reviewed = stripeElementsPaymentContext(
|
|
24867
|
+
context == null ? void 0 : context.amountMinor,
|
|
24868
|
+
context == null ? void 0 : context.currency
|
|
24869
|
+
);
|
|
24870
|
+
if (!reviewed || !owner || sheetOwner !== owner) {
|
|
24871
|
+
throw paymentProviderError(NATIVE_SHEET_REVIEW_REQUIRED, "notStarted");
|
|
24872
|
+
}
|
|
24873
|
+
},
|
|
24874
|
+
confirmCard: async (clientSecret, billing) => {
|
|
24875
|
+
if (!running) return adapter.confirmCard(clientSecret, billing);
|
|
24876
|
+
if (requiresCardField)
|
|
24877
|
+
throw paymentProviderError(
|
|
24878
|
+
"Use the card form for this order.",
|
|
24879
|
+
"notStarted"
|
|
24880
|
+
);
|
|
24881
|
+
if (!owner || sheetOwner !== owner)
|
|
24882
|
+
throw paymentProviderError(
|
|
24883
|
+
"The payment sheet was not claimed.",
|
|
24884
|
+
"notStarted"
|
|
24885
|
+
);
|
|
24886
|
+
{
|
|
24887
|
+
if (sheetPresenting)
|
|
24888
|
+
throw paymentProviderError(
|
|
24889
|
+
"Another payment sheet is active.",
|
|
24890
|
+
"notStarted"
|
|
24891
|
+
);
|
|
24892
|
+
const confirm = createPaymentSheetConfirmation(
|
|
24893
|
+
{
|
|
24894
|
+
initPaymentSheet: import_stripe_react_native2.initPaymentSheet,
|
|
24895
|
+
presentPaymentSheet: import_stripe_react_native2.presentPaymentSheet,
|
|
24896
|
+
retrievePaymentIntent: import_stripe_react_native2.retrievePaymentIntent,
|
|
24897
|
+
LinkDisplay: import_stripe_react_native2.LinkDisplay
|
|
24898
|
+
},
|
|
24899
|
+
{
|
|
24900
|
+
...owner.options,
|
|
24901
|
+
reviewed,
|
|
24902
|
+
assertCurrent: () => {
|
|
24903
|
+
if (sheetOwner !== owner || initKey !== owner.key || initializing)
|
|
24904
|
+
throw paymentProviderError(
|
|
24905
|
+
"The original payment owner changed.",
|
|
24906
|
+
"notStarted"
|
|
24907
|
+
);
|
|
24908
|
+
}
|
|
24909
|
+
}
|
|
24910
|
+
);
|
|
24911
|
+
sheetPresenting = true;
|
|
24912
|
+
try {
|
|
24913
|
+
return await confirm(clientSecret, toBillingDetails(billing));
|
|
24914
|
+
} catch (error) {
|
|
24915
|
+
if ((error == null ? void 0 : error.providerCode) === NATIVE_SHEET_CARD_FIELD_REQUIRED)
|
|
24916
|
+
requiresCardField = true;
|
|
24917
|
+
throw error;
|
|
24918
|
+
} finally {
|
|
24919
|
+
sheetPresenting = false;
|
|
24920
|
+
}
|
|
24921
|
+
}
|
|
24922
|
+
}
|
|
24923
|
+
},
|
|
24924
|
+
run: async (operation) => {
|
|
24925
|
+
if (running)
|
|
24926
|
+
throw paymentProviderError("This payment is already active.", "notStarted");
|
|
24927
|
+
running = true;
|
|
24928
|
+
reviewed = void 0;
|
|
24929
|
+
let admitted = true;
|
|
24930
|
+
const claim = () => {
|
|
24931
|
+
if (!admitted || nativeOperationActive || initializing || !initKey || sheetOwner || !initializedScheme || options.returnURL !== `${initializedScheme}://stripe-redirect` || !options.merchantDisplayName.trim())
|
|
24932
|
+
return "unavailable";
|
|
24933
|
+
owner = { key: initKey, options: { ...options } };
|
|
24934
|
+
sheetOwner = owner;
|
|
24935
|
+
return "attached";
|
|
24936
|
+
};
|
|
24937
|
+
try {
|
|
24938
|
+
return await operation(claim);
|
|
24939
|
+
} finally {
|
|
24940
|
+
admitted = false;
|
|
24941
|
+
if (owner && sheetOwner === owner) sheetOwner = null;
|
|
24942
|
+
owner = null;
|
|
24943
|
+
reviewed = void 0;
|
|
24944
|
+
running = false;
|
|
24945
|
+
}
|
|
24946
|
+
}
|
|
24947
|
+
};
|
|
24694
24948
|
},
|
|
24695
24949
|
// `publishableKey:accountId`, the shape `bundleConfirmerKey` expects.
|
|
24696
24950
|
currentKey: () => accountKey,
|
|
@@ -24702,19 +24956,25 @@ var createRnStripeConfirmer = () => {
|
|
|
24702
24956
|
},
|
|
24703
24957
|
// Native statuses are already the port's PascalCase vocabulary — no normalize.
|
|
24704
24958
|
getIntentStatus: async (clientSecret) => {
|
|
24705
|
-
|
|
24959
|
+
assertNativeLeaseFree();
|
|
24960
|
+
const { paymentIntent } = await nativeSdkCall(
|
|
24961
|
+
() => (0, import_stripe_react_native2.retrievePaymentIntent)(clientSecret)
|
|
24962
|
+
);
|
|
24706
24963
|
return paymentIntent == null ? void 0 : paymentIntent.status;
|
|
24707
24964
|
},
|
|
24708
24965
|
confirmCard: async (clientSecret, billing) => {
|
|
24709
|
-
|
|
24710
|
-
|
|
24711
|
-
|
|
24712
|
-
|
|
24966
|
+
assertNativeLeaseFree();
|
|
24967
|
+
const { error, paymentIntent } = await nativeSdkCall(
|
|
24968
|
+
() => (0, import_stripe_react_native2.confirmPayment)(clientSecret, {
|
|
24969
|
+
paymentMethodType: "Card",
|
|
24970
|
+
paymentMethodData: { billingDetails: toBillingDetails(billing) }
|
|
24971
|
+
})
|
|
24972
|
+
);
|
|
24713
24973
|
if (error) throw stripeFailure(error, "Payment failed.");
|
|
24714
24974
|
return confirmedStripeIntentStatus(paymentIntent);
|
|
24715
24975
|
},
|
|
24716
24976
|
confirmApplePay: async (clientSecret, total, currencyCode, merchant) => {
|
|
24717
|
-
|
|
24977
|
+
assertNativeLeaseFree();
|
|
24718
24978
|
const context = stripeWalletPaymentContext(
|
|
24719
24979
|
total,
|
|
24720
24980
|
currencyCode,
|
|
@@ -24725,24 +24985,29 @@ var createRnStripeConfirmer = () => {
|
|
|
24725
24985
|
"The order wallet details are unavailable.",
|
|
24726
24986
|
"notStarted"
|
|
24727
24987
|
);
|
|
24728
|
-
const { error, paymentIntent } = await (
|
|
24729
|
-
|
|
24730
|
-
|
|
24731
|
-
|
|
24732
|
-
|
|
24733
|
-
|
|
24734
|
-
|
|
24735
|
-
|
|
24736
|
-
|
|
24988
|
+
const { error, paymentIntent } = await nativeSdkCall(
|
|
24989
|
+
() => {
|
|
24990
|
+
var _a2;
|
|
24991
|
+
return (0, import_stripe_react_native2.confirmPlatformPayPayment)(clientSecret, {
|
|
24992
|
+
applePay: {
|
|
24993
|
+
merchantCountryCode: context.merchantCountry,
|
|
24994
|
+
currencyCode: context.currency,
|
|
24995
|
+
cartItems: [
|
|
24996
|
+
{
|
|
24997
|
+
label: (_a2 = merchant.merchantName) != null ? _a2 : "Order",
|
|
24998
|
+
amount: context.amount,
|
|
24999
|
+
paymentType: import_stripe_react_native2.PlatformPay.PaymentType.Immediate
|
|
25000
|
+
}
|
|
25001
|
+
]
|
|
24737
25002
|
}
|
|
24738
|
-
|
|
25003
|
+
});
|
|
24739
25004
|
}
|
|
24740
|
-
|
|
25005
|
+
);
|
|
24741
25006
|
if (error) throw stripeFailure(error, "Apple Pay failed.");
|
|
24742
25007
|
return confirmedStripeIntentStatus(paymentIntent);
|
|
24743
25008
|
},
|
|
24744
25009
|
confirmGooglePay: async (clientSecret, total, currencyCode, merchant) => {
|
|
24745
|
-
|
|
25010
|
+
assertNativeLeaseFree();
|
|
24746
25011
|
const context = stripeWalletPaymentContext(
|
|
24747
25012
|
total,
|
|
24748
25013
|
currencyCode,
|
|
@@ -24753,88 +25018,118 @@ var createRnStripeConfirmer = () => {
|
|
|
24753
25018
|
"The order wallet details are unavailable.",
|
|
24754
25019
|
"notStarted"
|
|
24755
25020
|
);
|
|
24756
|
-
const { error, paymentIntent } = await (
|
|
24757
|
-
|
|
24758
|
-
|
|
24759
|
-
|
|
24760
|
-
|
|
24761
|
-
|
|
25021
|
+
const { error, paymentIntent } = await nativeSdkCall(
|
|
25022
|
+
() => {
|
|
25023
|
+
var _a2;
|
|
25024
|
+
return (0, import_stripe_react_native2.confirmPlatformPayPayment)(clientSecret, {
|
|
25025
|
+
googlePay: {
|
|
25026
|
+
testEnv: merchant.testEnv === true,
|
|
25027
|
+
merchantCountryCode: context.merchantCountry,
|
|
25028
|
+
currencyCode: context.currency,
|
|
25029
|
+
merchantName: (_a2 = merchant.merchantName) != null ? _a2 : "Order"
|
|
25030
|
+
}
|
|
25031
|
+
});
|
|
24762
25032
|
}
|
|
24763
|
-
|
|
25033
|
+
);
|
|
24764
25034
|
if (error) throw stripeFailure(error, "Google Pay failed.");
|
|
24765
25035
|
return confirmedStripeIntentStatus(paymentIntent);
|
|
24766
25036
|
}
|
|
24767
25037
|
};
|
|
25038
|
+
return adapter;
|
|
24768
25039
|
};
|
|
24769
25040
|
var createRnPorts = () => ({
|
|
24770
25041
|
// The promise is handed back: a URL the device cannot open rejects, and the
|
|
24771
25042
|
// caller shows its failure (for example "We could not open the payment page").
|
|
24772
25043
|
openUrl: (url2) => import_react_native5.Linking.openURL(url2).then(() => void 0),
|
|
24773
25044
|
createCardPaymentMethod: async (billing) => {
|
|
24774
|
-
|
|
24775
|
-
|
|
24776
|
-
|
|
24777
|
-
|
|
25045
|
+
assertNativeLeaseFree();
|
|
25046
|
+
const { paymentMethod, error } = await nativeSdkCall(
|
|
25047
|
+
() => (0, import_stripe_react_native2.createPaymentMethod)({
|
|
25048
|
+
paymentMethodType: "Card",
|
|
25049
|
+
paymentMethodData: { billingDetails: toBillingDetails(billing) }
|
|
25050
|
+
})
|
|
25051
|
+
);
|
|
24778
25052
|
if (error || !(paymentMethod == null ? void 0 : paymentMethod.id)) throw failed(error == null ? void 0 : error.message, "Payment failed");
|
|
24779
25053
|
return paymentMethod.id;
|
|
24780
25054
|
},
|
|
24781
25055
|
createRedirectPaymentMethod: async (methodType, billing) => {
|
|
24782
25056
|
var _a2, _b;
|
|
25057
|
+
assertNativeLeaseFree();
|
|
24783
25058
|
const details = toBillingDetails(billing);
|
|
24784
25059
|
const result3 = await (() => {
|
|
24785
25060
|
switch (methodType) {
|
|
24786
25061
|
case "klarna":
|
|
24787
|
-
return (
|
|
24788
|
-
|
|
24789
|
-
|
|
24790
|
-
|
|
25062
|
+
return nativeSdkCall(
|
|
25063
|
+
() => (0, import_stripe_react_native2.createPaymentMethod)({
|
|
25064
|
+
paymentMethodType: "Klarna",
|
|
25065
|
+
paymentMethodData: { billingDetails: details }
|
|
25066
|
+
})
|
|
25067
|
+
);
|
|
24791
25068
|
case "afterpay_clearpay":
|
|
24792
|
-
return (
|
|
24793
|
-
|
|
24794
|
-
|
|
24795
|
-
|
|
25069
|
+
return nativeSdkCall(
|
|
25070
|
+
() => (0, import_stripe_react_native2.createPaymentMethod)({
|
|
25071
|
+
paymentMethodType: "AfterpayClearpay",
|
|
25072
|
+
paymentMethodData: { billingDetails: details, shippingDetails: details }
|
|
25073
|
+
})
|
|
25074
|
+
);
|
|
24796
25075
|
case "affirm":
|
|
24797
|
-
return (
|
|
24798
|
-
|
|
24799
|
-
|
|
24800
|
-
|
|
25076
|
+
return nativeSdkCall(
|
|
25077
|
+
() => (0, import_stripe_react_native2.createPaymentMethod)({
|
|
25078
|
+
paymentMethodType: "Affirm",
|
|
25079
|
+
paymentMethodData: { billingDetails: details }
|
|
25080
|
+
})
|
|
25081
|
+
);
|
|
24801
25082
|
case "ideal":
|
|
24802
|
-
return (
|
|
24803
|
-
|
|
24804
|
-
|
|
24805
|
-
|
|
25083
|
+
return nativeSdkCall(
|
|
25084
|
+
() => (0, import_stripe_react_native2.createPaymentMethod)({
|
|
25085
|
+
paymentMethodType: "Ideal",
|
|
25086
|
+
paymentMethodData: { billingDetails: details }
|
|
25087
|
+
})
|
|
25088
|
+
);
|
|
24806
25089
|
case "bancontact":
|
|
24807
|
-
return (
|
|
24808
|
-
|
|
24809
|
-
|
|
24810
|
-
|
|
25090
|
+
return nativeSdkCall(
|
|
25091
|
+
() => (0, import_stripe_react_native2.createPaymentMethod)({
|
|
25092
|
+
paymentMethodType: "Bancontact",
|
|
25093
|
+
paymentMethodData: { billingDetails: details }
|
|
25094
|
+
})
|
|
25095
|
+
);
|
|
24811
25096
|
case "eps":
|
|
24812
|
-
return (
|
|
24813
|
-
|
|
24814
|
-
|
|
24815
|
-
|
|
25097
|
+
return nativeSdkCall(
|
|
25098
|
+
() => (0, import_stripe_react_native2.createPaymentMethod)({
|
|
25099
|
+
paymentMethodType: "Eps",
|
|
25100
|
+
paymentMethodData: { billingDetails: details }
|
|
25101
|
+
})
|
|
25102
|
+
);
|
|
24816
25103
|
case "p24":
|
|
24817
|
-
return (
|
|
24818
|
-
|
|
24819
|
-
|
|
24820
|
-
|
|
25104
|
+
return nativeSdkCall(
|
|
25105
|
+
() => (0, import_stripe_react_native2.createPaymentMethod)({
|
|
25106
|
+
paymentMethodType: "P24",
|
|
25107
|
+
paymentMethodData: { billingDetails: details }
|
|
25108
|
+
})
|
|
25109
|
+
);
|
|
24821
25110
|
case "alipay":
|
|
24822
|
-
return (0, import_stripe_react_native2.createPaymentMethod)({ paymentMethodType: "Alipay" });
|
|
25111
|
+
return nativeSdkCall(() => (0, import_stripe_react_native2.createPaymentMethod)({ paymentMethodType: "Alipay" }));
|
|
24823
25112
|
case "grabpay":
|
|
24824
|
-
return (
|
|
24825
|
-
|
|
24826
|
-
|
|
24827
|
-
|
|
25113
|
+
return nativeSdkCall(
|
|
25114
|
+
() => (0, import_stripe_react_native2.createPaymentMethod)({
|
|
25115
|
+
paymentMethodType: "GrabPay",
|
|
25116
|
+
paymentMethodData: { billingDetails: details }
|
|
25117
|
+
})
|
|
25118
|
+
);
|
|
24828
25119
|
case "cashapp":
|
|
24829
|
-
return (
|
|
24830
|
-
|
|
24831
|
-
|
|
24832
|
-
|
|
25120
|
+
return nativeSdkCall(
|
|
25121
|
+
() => (0, import_stripe_react_native2.createPaymentMethod)({
|
|
25122
|
+
paymentMethodType: "CashApp",
|
|
25123
|
+
paymentMethodData: { billingDetails: details }
|
|
25124
|
+
})
|
|
25125
|
+
);
|
|
24833
25126
|
case "paypal":
|
|
24834
|
-
return (
|
|
24835
|
-
|
|
24836
|
-
|
|
24837
|
-
|
|
25127
|
+
return nativeSdkCall(
|
|
25128
|
+
() => (0, import_stripe_react_native2.createPaymentMethod)({
|
|
25129
|
+
paymentMethodType: "PayPal",
|
|
25130
|
+
paymentMethodData: { billingDetails: details }
|
|
25131
|
+
})
|
|
25132
|
+
);
|
|
24838
25133
|
default:
|
|
24839
25134
|
throw new Error("This payment method is not available on this device.");
|
|
24840
25135
|
}
|
|
@@ -24844,24 +25139,31 @@ var createRnPorts = () => ({
|
|
|
24844
25139
|
return result3.paymentMethod.id;
|
|
24845
25140
|
},
|
|
24846
25141
|
handleNextAction: async (clientSecret) => {
|
|
24847
|
-
|
|
25142
|
+
assertNativeLeaseFree();
|
|
25143
|
+
const { error } = await nativeSdkCall(() => (0, import_stripe_react_native2.handleNextAction)(clientSecret));
|
|
24848
25144
|
if (error) throw stripeFailure(error, "Payment failed");
|
|
24849
25145
|
},
|
|
24850
25146
|
confirmOxxo: async (clientSecret, billing) => {
|
|
24851
|
-
|
|
24852
|
-
|
|
24853
|
-
|
|
24854
|
-
|
|
25147
|
+
assertNativeLeaseFree();
|
|
25148
|
+
const { error, paymentIntent } = await nativeSdkCall(
|
|
25149
|
+
() => (0, import_stripe_react_native2.confirmPayment)(clientSecret, {
|
|
25150
|
+
paymentMethodType: "Oxxo",
|
|
25151
|
+
paymentMethodData: { billingDetails: toBillingDetails(billing) }
|
|
25152
|
+
})
|
|
25153
|
+
);
|
|
24855
25154
|
return { error: error == null ? void 0 : error.message, nextAction: paymentIntent == null ? void 0 : paymentIntent.nextAction };
|
|
24856
25155
|
},
|
|
24857
25156
|
// Payment plan (new card): confirm the SetupIntent to SAVE the card (nothing
|
|
24858
25157
|
// charged) and return its PaymentMethod id for the server-side plan.
|
|
24859
25158
|
confirmPaymentPlanSetup: async (clientSecret, billing) => {
|
|
24860
25159
|
var _a2;
|
|
24861
|
-
|
|
24862
|
-
|
|
24863
|
-
|
|
24864
|
-
|
|
25160
|
+
assertNativeLeaseFree();
|
|
25161
|
+
const { setupIntent, error } = await nativeSdkCall(
|
|
25162
|
+
() => (0, import_stripe_react_native2.confirmSetupIntent)(clientSecret, {
|
|
25163
|
+
paymentMethodType: "Card",
|
|
25164
|
+
paymentMethodData: { billingDetails: toBillingDetails(billing) }
|
|
25165
|
+
})
|
|
25166
|
+
);
|
|
24865
25167
|
const paymentMethodId = (_a2 = setupIntent == null ? void 0 : setupIntent.paymentMethod) == null ? void 0 : _a2.id;
|
|
24866
25168
|
if (error || !paymentMethodId) throw failed(error == null ? void 0 : error.message, "Card setup failed");
|
|
24867
25169
|
return paymentMethodId;
|
|
@@ -24869,10 +25171,13 @@ var createRnPorts = () => ({
|
|
|
24869
25171
|
// Payment plan (saved-card 3DS): confirm the pending charge against the
|
|
24870
25172
|
// existing PaymentMethod when the plan comes back requires_action.
|
|
24871
25173
|
confirmSavedCardPayment: async (clientSecret, paymentMethodId) => {
|
|
24872
|
-
|
|
24873
|
-
|
|
24874
|
-
|
|
24875
|
-
|
|
25174
|
+
assertNativeLeaseFree();
|
|
25175
|
+
const { error } = await nativeSdkCall(
|
|
25176
|
+
() => (0, import_stripe_react_native2.confirmPayment)(clientSecret, {
|
|
25177
|
+
paymentMethodType: "Card",
|
|
25178
|
+
paymentMethodData: { paymentMethodId }
|
|
25179
|
+
})
|
|
25180
|
+
);
|
|
24876
25181
|
if (error) throw stripeFailure(error, "Payment failed");
|
|
24877
25182
|
}
|
|
24878
25183
|
});
|
|
@@ -24882,11 +25187,61 @@ var rnConfirmer = createRnStripeConfirmer();
|
|
|
24882
25187
|
var rnPorts = createRnPorts();
|
|
24883
25188
|
|
|
24884
25189
|
// src/useCheckout.ts
|
|
24885
|
-
var useCheckout2 = (opts = {}) =>
|
|
24886
|
-
|
|
24887
|
-
|
|
24888
|
-
|
|
24889
|
-
|
|
25190
|
+
var useCheckout2 = (opts = {}) => {
|
|
25191
|
+
var _a2;
|
|
25192
|
+
const [sheetConfig] = (0, import_react46.useState)(
|
|
25193
|
+
() => opts.paymentSheet ? { ...opts.paymentSheet } : void 0
|
|
25194
|
+
);
|
|
25195
|
+
const [sheetScheme] = (0, import_react46.useState)(() => {
|
|
25196
|
+
var _a3;
|
|
25197
|
+
return (_a3 = opts.options) == null ? void 0 : _a3.urlScheme;
|
|
25198
|
+
});
|
|
25199
|
+
const [sheet] = (0, import_react46.useState)(
|
|
25200
|
+
() => sheetConfig ? rnConfirmer.createPaymentSheetSession(sheetConfig) : void 0
|
|
25201
|
+
);
|
|
25202
|
+
const nativePorts = { ...rnPorts, ...opts.ports };
|
|
25203
|
+
const checkout = useCheckout({
|
|
25204
|
+
// A Pay without its own claim uses the default ticket field (`checkout`).
|
|
25205
|
+
ports: {
|
|
25206
|
+
confirmer: (_a2 = sheet == null ? void 0 : sheet.confirmer) != null ? _a2 : rnConfirmer,
|
|
25207
|
+
claimDefaultCardField,
|
|
25208
|
+
...nativePorts,
|
|
25209
|
+
...sheet && nativePorts.createCardPaymentMethod ? {
|
|
25210
|
+
createCardPaymentMethod: (billing) => sheet.cardFieldOperation(
|
|
25211
|
+
() => nativePorts.createCardPaymentMethod(billing)
|
|
25212
|
+
)
|
|
25213
|
+
} : {}
|
|
25214
|
+
},
|
|
25215
|
+
options: opts.options
|
|
25216
|
+
});
|
|
25217
|
+
return {
|
|
25218
|
+
...checkout,
|
|
25219
|
+
paymentSheet: sheet && !sheet.requiresCardField() ? {
|
|
25220
|
+
placeOrder: () => {
|
|
25221
|
+
var _a3, _b, _c, _d;
|
|
25222
|
+
if (sheet.requiresCardField())
|
|
25223
|
+
return Promise.reject(
|
|
25224
|
+
paymentProviderError(NATIVE_SHEET_CARD_FIELD_MESSAGE, "notStarted")
|
|
25225
|
+
);
|
|
25226
|
+
if (!((_a3 = opts.options) == null ? void 0 : _a3.urlScheme) || !(sheetConfig == null ? void 0 : sheetConfig.merchantDisplayName.trim()) || opts.options.urlScheme !== sheetScheme || ((_b = opts.paymentSheet) == null ? void 0 : _b.merchantDisplayName) !== (sheetConfig == null ? void 0 : sheetConfig.merchantDisplayName) || ((_c = opts.paymentSheet) == null ? void 0 : _c.returnURL) !== (sheetConfig == null ? void 0 : sheetConfig.returnURL) || ((_d = opts.paymentSheet) == null ? void 0 : _d.returnURL) !== `${opts.options.urlScheme}://stripe-redirect`)
|
|
25227
|
+
return Promise.reject(
|
|
25228
|
+
paymentProviderError(
|
|
25229
|
+
"The payment return route is not configured.",
|
|
25230
|
+
"notStarted"
|
|
25231
|
+
)
|
|
25232
|
+
);
|
|
25233
|
+
if (!nativePaymentSheetAvailable(checkout.store.getState()))
|
|
25234
|
+
return Promise.reject(
|
|
25235
|
+
paymentProviderError(
|
|
25236
|
+
"Use the installment card form for this currency.",
|
|
25237
|
+
"notStarted"
|
|
25238
|
+
)
|
|
25239
|
+
);
|
|
25240
|
+
return sheet.run((claimCard) => checkout.placeOrder("card", { claimCard }));
|
|
25241
|
+
}
|
|
25242
|
+
} : void 0
|
|
25243
|
+
};
|
|
25244
|
+
};
|
|
24890
25245
|
|
|
24891
25246
|
// src/storage.ts
|
|
24892
25247
|
var import_react_native_mmkv = require("react-native-mmkv");
|
|
@@ -24923,7 +25278,7 @@ var configureCheckout = (config) => configure({
|
|
|
24923
25278
|
});
|
|
24924
25279
|
|
|
24925
25280
|
// src/ui/Field.tsx
|
|
24926
|
-
var
|
|
25281
|
+
var import_react47 = require("react");
|
|
24927
25282
|
var import_react_native6 = require("react-native");
|
|
24928
25283
|
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
24929
25284
|
var Field = ({ label, error, required, children }) => {
|
|
@@ -24954,7 +25309,7 @@ var Input = ({
|
|
|
24954
25309
|
const editable = editableProp && !frozen;
|
|
24955
25310
|
const theme = useTheme();
|
|
24956
25311
|
const s9 = useFieldStyles(theme);
|
|
24957
|
-
const [focused, setFocused] = (0,
|
|
25312
|
+
const [focused, setFocused] = (0, import_react47.useState)(false);
|
|
24958
25313
|
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
24959
25314
|
import_react_native6.TextInput,
|
|
24960
25315
|
{
|
|
@@ -25011,7 +25366,7 @@ var Checkbox = ({ checked, onChange, label, invalid: invalid3 = false }) => {
|
|
|
25011
25366
|
}
|
|
25012
25367
|
);
|
|
25013
25368
|
};
|
|
25014
|
-
var useFieldStyles = (theme) => (0,
|
|
25369
|
+
var useFieldStyles = (theme) => (0, import_react47.useMemo)(
|
|
25015
25370
|
() => import_react_native6.StyleSheet.create({
|
|
25016
25371
|
field: { gap: 6 },
|
|
25017
25372
|
label: {
|
|
@@ -25061,7 +25416,7 @@ var useFieldStyles = (theme) => (0, import_react46.useMemo)(
|
|
|
25061
25416
|
);
|
|
25062
25417
|
|
|
25063
25418
|
// src/ui/Select.tsx
|
|
25064
|
-
var
|
|
25419
|
+
var import_react48 = require("react");
|
|
25065
25420
|
var import_react_native7 = require("react-native");
|
|
25066
25421
|
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
25067
25422
|
function Select({
|
|
@@ -25076,7 +25431,18 @@ function Select({
|
|
|
25076
25431
|
const disabled = disabledProp || frozen;
|
|
25077
25432
|
const theme = useTheme();
|
|
25078
25433
|
const s9 = useSelectStyles(theme);
|
|
25079
|
-
const [open, setOpen] = (0,
|
|
25434
|
+
const [open, setOpen] = (0, import_react48.useState)(false);
|
|
25435
|
+
const interaction = (0, import_react48.useRef)({ disabled, open: false, revision: 0 });
|
|
25436
|
+
interaction.current.disabled = disabled;
|
|
25437
|
+
const revision = interaction.current.revision;
|
|
25438
|
+
const close = (0, import_react48.useCallback)(() => {
|
|
25439
|
+
interaction.current.open = false;
|
|
25440
|
+
interaction.current.revision += 1;
|
|
25441
|
+
setOpen(false);
|
|
25442
|
+
}, []);
|
|
25443
|
+
(0, import_react48.useEffect)(() => {
|
|
25444
|
+
if (disabled && interaction.current.open) close();
|
|
25445
|
+
}, [disabled, close]);
|
|
25080
25446
|
const selected = options.find((o) => o.value === value6);
|
|
25081
25447
|
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
|
|
25082
25448
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
@@ -25084,7 +25450,12 @@ function Select({
|
|
|
25084
25450
|
{
|
|
25085
25451
|
accessibilityRole: "button",
|
|
25086
25452
|
disabled,
|
|
25087
|
-
onPress: () =>
|
|
25453
|
+
onPress: () => {
|
|
25454
|
+
if (interaction.current.disabled) return;
|
|
25455
|
+
interaction.current.open = true;
|
|
25456
|
+
interaction.current.revision += 1;
|
|
25457
|
+
setOpen(true);
|
|
25458
|
+
},
|
|
25088
25459
|
style: [s9.control, invalid3 && s9.controlInvalid, disabled && s9.controlDisabled],
|
|
25089
25460
|
children: [
|
|
25090
25461
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_native7.Text, { style: [s9.value, !selected && s9.placeholder], numberOfLines: 1, children: selected ? selected.label : placeholder }),
|
|
@@ -25095,11 +25466,11 @@ function Select({
|
|
|
25095
25466
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
25096
25467
|
import_react_native7.Modal,
|
|
25097
25468
|
{
|
|
25098
|
-
visible: open,
|
|
25469
|
+
visible: open && !disabled,
|
|
25099
25470
|
transparent: true,
|
|
25100
25471
|
animationType: "fade",
|
|
25101
|
-
onRequestClose:
|
|
25102
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_native7.Pressable, { style: s9.backdrop, onPress:
|
|
25472
|
+
onRequestClose: close,
|
|
25473
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_native7.Pressable, { style: s9.backdrop, onPress: close, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_native7.Pressable, { style: s9.sheet, onPress: () => {
|
|
25103
25474
|
}, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
25104
25475
|
import_react_native7.FlatList,
|
|
25105
25476
|
{
|
|
@@ -25112,9 +25483,13 @@ function Select({
|
|
|
25112
25483
|
import_react_native7.Pressable,
|
|
25113
25484
|
{
|
|
25114
25485
|
style: s9.option,
|
|
25486
|
+
disabled,
|
|
25115
25487
|
onPress: () => {
|
|
25488
|
+
const current5 = interaction.current;
|
|
25489
|
+
if (current5.disabled || !current5.open || current5.revision !== revision)
|
|
25490
|
+
return;
|
|
25116
25491
|
onChange(item.value);
|
|
25117
|
-
|
|
25492
|
+
close();
|
|
25118
25493
|
},
|
|
25119
25494
|
children: [
|
|
25120
25495
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_native7.Text, { style: [s9.optionLabel, isSelected && s9.optionLabelSelected], children: item.label }),
|
|
@@ -25130,7 +25505,7 @@ function Select({
|
|
|
25130
25505
|
)
|
|
25131
25506
|
] });
|
|
25132
25507
|
}
|
|
25133
|
-
var useSelectStyles = (theme) => (0,
|
|
25508
|
+
var useSelectStyles = (theme) => (0, import_react48.useMemo)(
|
|
25134
25509
|
() => import_react_native7.StyleSheet.create({
|
|
25135
25510
|
control: {
|
|
25136
25511
|
flexDirection: "row",
|
|
@@ -25191,7 +25566,7 @@ var useSelectStyles = (theme) => (0, import_react47.useMemo)(
|
|
|
25191
25566
|
);
|
|
25192
25567
|
|
|
25193
25568
|
// src/ui/QuantitySelect.tsx
|
|
25194
|
-
var
|
|
25569
|
+
var import_react49 = require("react");
|
|
25195
25570
|
var import_react_native8 = require("react-native");
|
|
25196
25571
|
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
25197
25572
|
var QuantitySelect = ({
|
|
@@ -25262,7 +25637,7 @@ var QuantitySelect = ({
|
|
|
25262
25637
|
}
|
|
25263
25638
|
);
|
|
25264
25639
|
};
|
|
25265
|
-
var useQuantityStyles = (theme) => (0,
|
|
25640
|
+
var useQuantityStyles = (theme) => (0, import_react49.useMemo)(
|
|
25266
25641
|
() => import_react_native8.StyleSheet.create({
|
|
25267
25642
|
stepper: { flexDirection: "row", alignItems: "center", gap: 14 },
|
|
25268
25643
|
btn: {
|
|
@@ -25290,7 +25665,7 @@ var useQuantityStyles = (theme) => (0, import_react48.useMemo)(
|
|
|
25290
25665
|
);
|
|
25291
25666
|
|
|
25292
25667
|
// src/ui/Timer.tsx
|
|
25293
|
-
var
|
|
25668
|
+
var import_react50 = require("react");
|
|
25294
25669
|
var import_react_native9 = require("react-native");
|
|
25295
25670
|
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
25296
25671
|
var clock = (s9) => {
|
|
@@ -25309,7 +25684,7 @@ var Timer = ({ seconds: seconds2, urgentAt = 60, label }) => {
|
|
|
25309
25684
|
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react_native9.Text, { style: [s9.clock, urgent && s9.clockUrgent], children: clock(seconds2) })
|
|
25310
25685
|
] });
|
|
25311
25686
|
};
|
|
25312
|
-
var useTimerStyles = (theme) => (0,
|
|
25687
|
+
var useTimerStyles = (theme) => (0, import_react50.useMemo)(
|
|
25313
25688
|
() => import_react_native9.StyleSheet.create({
|
|
25314
25689
|
row: { flexDirection: "row", alignItems: "center", gap: 6 },
|
|
25315
25690
|
label: {
|
|
@@ -25330,7 +25705,7 @@ var useTimerStyles = (theme) => (0, import_react49.useMemo)(
|
|
|
25330
25705
|
);
|
|
25331
25706
|
|
|
25332
25707
|
// src/ui/TimerBanner.tsx
|
|
25333
|
-
var
|
|
25708
|
+
var import_react51 = require("react");
|
|
25334
25709
|
var import_react_native10 = require("react-native");
|
|
25335
25710
|
var import_jsx_runtime11 = (
|
|
25336
25711
|
// `accessibilityLiveRegion="polite"` is the RN analogue of the web
|
|
@@ -25349,7 +25724,7 @@ var TimerBanner = ({
|
|
|
25349
25724
|
}) => {
|
|
25350
25725
|
const theme = useTheme();
|
|
25351
25726
|
const s9 = useBannerStyles(theme);
|
|
25352
|
-
const [dismissed, setDismissed] = (0,
|
|
25727
|
+
const [dismissed, setDismissed] = (0, import_react51.useState)(false);
|
|
25353
25728
|
if (seconds2 === void 0 || seconds2 <= 0 || dismissed) return null;
|
|
25354
25729
|
const urgent = seconds2 <= urgentAt;
|
|
25355
25730
|
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_react_native10.View, { accessibilityLiveRegion: "polite", style: [s9.banner, urgent && s9.bannerUrgent], children: [
|
|
@@ -25368,7 +25743,7 @@ var TimerBanner = ({
|
|
|
25368
25743
|
)
|
|
25369
25744
|
] });
|
|
25370
25745
|
};
|
|
25371
|
-
var useBannerStyles = (theme) => (0,
|
|
25746
|
+
var useBannerStyles = (theme) => (0, import_react51.useMemo)(
|
|
25372
25747
|
() => import_react_native10.StyleSheet.create({
|
|
25373
25748
|
banner: {
|
|
25374
25749
|
flexDirection: "row",
|
|
@@ -25408,7 +25783,7 @@ var useBannerStyles = (theme) => (0, import_react50.useMemo)(
|
|
|
25408
25783
|
);
|
|
25409
25784
|
|
|
25410
25785
|
// src/ui/PaymentMethods.tsx
|
|
25411
|
-
var
|
|
25786
|
+
var import_react52 = require("react");
|
|
25412
25787
|
var import_react_native11 = require("react-native");
|
|
25413
25788
|
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
25414
25789
|
var EXTRA_LABEL = {
|
|
@@ -25487,7 +25862,7 @@ var PaymentMethods = ({
|
|
|
25487
25862
|
] }, option.value);
|
|
25488
25863
|
}) });
|
|
25489
25864
|
};
|
|
25490
|
-
var useStyles3 = (theme) => (0,
|
|
25865
|
+
var useStyles3 = (theme) => (0, import_react52.useMemo)(
|
|
25491
25866
|
() => import_react_native11.StyleSheet.create({
|
|
25492
25867
|
list: { gap: 8 },
|
|
25493
25868
|
row: {
|
|
@@ -25531,14 +25906,14 @@ var useStyles3 = (theme) => (0, import_react51.useMemo)(
|
|
|
25531
25906
|
);
|
|
25532
25907
|
|
|
25533
25908
|
// src/sections/Tickets.tsx
|
|
25534
|
-
var
|
|
25909
|
+
var import_react53 = require("react");
|
|
25535
25910
|
var import_react_native12 = require("react-native");
|
|
25536
25911
|
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
25537
25912
|
var money = (sym, n) => `${sym} ${Number(n).toFixed(2)}`;
|
|
25538
25913
|
var WaitingListForm = ({ ticket, onJoin }) => {
|
|
25539
|
-
const [form, setForm] = (0,
|
|
25540
|
-
const [state, setState] = (0,
|
|
25541
|
-
const [error, setError] = (0,
|
|
25914
|
+
const [form, setForm] = (0, import_react53.useState)({ firstName: "", lastName: "", email: "" });
|
|
25915
|
+
const [state, setState] = (0, import_react53.useState)("idle");
|
|
25916
|
+
const [error, setError] = (0, import_react53.useState)("");
|
|
25542
25917
|
const ok = Boolean(form.firstName.trim() && form.lastName.trim() && form.email.trim());
|
|
25543
25918
|
if (state === "done")
|
|
25544
25919
|
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(MutedText, { children: "You\u2019re on the waiting list \u2014 we\u2019ll email you if a spot opens." });
|
|
@@ -25612,32 +25987,32 @@ var Tickets = ({
|
|
|
25612
25987
|
const bundleStarting = bundleWait !== null;
|
|
25613
25988
|
const promoMeta = (_a2 = ticketsQuery.data) == null ? void 0 : _a2.promo;
|
|
25614
25989
|
const showWaitingList = (_c = (_b = ticketsQuery.data) == null ? void 0 : _b.showWaitingList) != null ? _c : false;
|
|
25615
|
-
const [qty, setQty] = (0,
|
|
25616
|
-
const [slotDate, setSlotDate] = (0,
|
|
25990
|
+
const [qty, setQty] = (0, import_react53.useState)({});
|
|
25991
|
+
const [slotDate, setSlotDate] = (0, import_react53.useState)("");
|
|
25617
25992
|
const eventInfo = hooks_exports.useEvent(eventId).data;
|
|
25618
25993
|
const isTimeSlot = Boolean((timeSlotDates == null ? void 0 : timeSlotDates.length) || (eventInfo == null ? void 0 : eventInfo.isTimeSlotEvent));
|
|
25619
|
-
const dates = (0,
|
|
25994
|
+
const dates = (0, import_react53.useMemo)(
|
|
25620
25995
|
() => {
|
|
25621
25996
|
var _a3;
|
|
25622
25997
|
return (_a3 = timeSlotDates != null ? timeSlotDates : eventInfo == null ? void 0 : eventInfo.availableDates) != null ? _a3 : [];
|
|
25623
25998
|
},
|
|
25624
25999
|
[timeSlotDates, eventInfo == null ? void 0 : eventInfo.availableDates]
|
|
25625
26000
|
);
|
|
25626
|
-
(0,
|
|
26001
|
+
(0, import_react53.useEffect)(() => {
|
|
25627
26002
|
if (isTimeSlot && !slotDate && dates.length) setSlotDate(dates[0]);
|
|
25628
26003
|
}, [isTimeSlot, slotDate, dates]);
|
|
25629
26004
|
const slotQuery = hooks_exports.useTimeSlotTickets(eventId, isTimeSlot ? slotDate : void 0);
|
|
25630
|
-
const tickets = (0,
|
|
26005
|
+
const tickets = (0, import_react53.useMemo)(
|
|
25631
26006
|
() => {
|
|
25632
26007
|
var _a3, _b2, _c2;
|
|
25633
26008
|
return isTimeSlot ? (_a3 = slotQuery.data) != null ? _a3 : [] : (_c2 = (_b2 = ticketsQuery.data) == null ? void 0 : _b2.tickets) != null ? _c2 : [];
|
|
25634
26009
|
},
|
|
25635
26010
|
[isTimeSlot, slotQuery.data, (_d = ticketsQuery.data) == null ? void 0 : _d.tickets]
|
|
25636
26011
|
);
|
|
25637
|
-
const [error, setError] = (0,
|
|
25638
|
-
const [code, setCode] = (0,
|
|
25639
|
-
const [codeState, setCodeState] = (0,
|
|
25640
|
-
const [promoOpen, setPromoOpen] = (0,
|
|
26012
|
+
const [error, setError] = (0, import_react53.useState)("");
|
|
26013
|
+
const [code, setCode] = (0, import_react53.useState)("");
|
|
26014
|
+
const [codeState, setCodeState] = (0, import_react53.useState)("idle");
|
|
26015
|
+
const [promoOpen, setPromoOpen] = (0, import_react53.useState)(false);
|
|
25641
26016
|
hooks_exports.useOnEventChange(eventId, () => {
|
|
25642
26017
|
setQty({});
|
|
25643
26018
|
setSlotDate("");
|
|
@@ -25645,10 +26020,10 @@ var Tickets = ({
|
|
|
25645
26020
|
setPromoOpen(false);
|
|
25646
26021
|
setError("");
|
|
25647
26022
|
});
|
|
25648
|
-
const [wlOpen, setWlOpen] = (0,
|
|
25649
|
-
const [visibleDescription, setVisibleDescription] = (0,
|
|
25650
|
-
const attributionEvent = (0,
|
|
25651
|
-
(0,
|
|
26023
|
+
const [wlOpen, setWlOpen] = (0, import_react53.useState)({});
|
|
26024
|
+
const [visibleDescription, setVisibleDescription] = (0, import_react53.useState)(null);
|
|
26025
|
+
const attributionEvent = (0, import_react53.useRef)(null);
|
|
26026
|
+
(0, import_react53.useEffect)(() => {
|
|
25652
26027
|
var _a3;
|
|
25653
26028
|
if (attributionEvent.current === eventId) return;
|
|
25654
26029
|
attributionEvent.current = eventId;
|
|
@@ -25666,7 +26041,7 @@ var Tickets = ({
|
|
|
25666
26041
|
});
|
|
25667
26042
|
}
|
|
25668
26043
|
}, [eventId, initialPromoCode, referrer, readAttributionFromUrl]);
|
|
25669
|
-
(0,
|
|
26044
|
+
(0, import_react53.useEffect)(() => {
|
|
25670
26045
|
checkout.syncCurrency(eventId, void 0, { seed: true }).catch(() => void 0);
|
|
25671
26046
|
}, [eventId]);
|
|
25672
26047
|
const changeCurrency = (nextCode) => {
|
|
@@ -25677,8 +26052,8 @@ var Tickets = ({
|
|
|
25677
26052
|
}
|
|
25678
26053
|
}).catch(() => void 0);
|
|
25679
26054
|
};
|
|
25680
|
-
const originals = (0,
|
|
25681
|
-
(0,
|
|
26055
|
+
const originals = (0, import_react53.useRef)({});
|
|
26056
|
+
(0, import_react53.useEffect)(() => {
|
|
25682
26057
|
for (const t of tickets)
|
|
25683
26058
|
if (originals.current[t.id] == null) originals.current[t.id] = t.price;
|
|
25684
26059
|
}, [tickets]);
|
|
@@ -25745,7 +26120,7 @@ var Tickets = ({
|
|
|
25745
26120
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Divider, {}),
|
|
25746
26121
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_native12.Text, { style: s9.group, children: "Reserve tables" })
|
|
25747
26122
|
] }) : null;
|
|
25748
|
-
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
26123
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react53.Fragment, { children: [
|
|
25749
26124
|
groupHeading,
|
|
25750
26125
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react_native12.View, { style: renderTicket ? void 0 : s9.rowWrap, children: [
|
|
25751
26126
|
renderTicket ? renderTicket({
|
|
@@ -25864,7 +26239,7 @@ var Tickets = ({
|
|
|
25864
26239
|
)
|
|
25865
26240
|
] }) : null,
|
|
25866
26241
|
isTimeSlot && !slotQuery.isLoading && tickets.length === 0 && slotDate ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(MutedText, { children: "No sessions available on this date." }) : null,
|
|
25867
|
-
isTimeSlot ? timeGroups.map((g) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
26242
|
+
isTimeSlot ? timeGroups.map((g) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react53.Fragment, { children: [
|
|
25868
26243
|
g.time ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_native12.Text, { style: s9.slotTime, children: g.time }) : null,
|
|
25869
26244
|
g.items.map(renderRow)
|
|
25870
26245
|
] }, g.time)) : tickets.map(renderRow),
|
|
@@ -25928,7 +26303,7 @@ var Tickets = ({
|
|
|
25928
26303
|
var staticStyles = import_react_native12.StyleSheet.create({
|
|
25929
26304
|
wlForm: { gap: 8 }
|
|
25930
26305
|
});
|
|
25931
|
-
var useTicketStyles = (theme) => (0,
|
|
26306
|
+
var useTicketStyles = (theme) => (0, import_react53.useMemo)(
|
|
25932
26307
|
() => import_react_native12.StyleSheet.create({
|
|
25933
26308
|
loading: { paddingVertical: 24, alignItems: "center" },
|
|
25934
26309
|
selectBlock: { gap: 6 },
|
|
@@ -26067,7 +26442,7 @@ var useTicketStyles = (theme) => (0, import_react52.useMemo)(
|
|
|
26067
26442
|
);
|
|
26068
26443
|
|
|
26069
26444
|
// src/sections/SeatsIoMap.tsx
|
|
26070
|
-
var
|
|
26445
|
+
var import_react54 = require("react");
|
|
26071
26446
|
var import_react_native13 = require("react-native");
|
|
26072
26447
|
var import_react_native_webview2 = require("react-native-webview");
|
|
26073
26448
|
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
@@ -26076,7 +26451,7 @@ var SeatsIoMap = ({ eventId, initial, onContinue }) => {
|
|
|
26076
26451
|
const checkout = useCheckoutContext();
|
|
26077
26452
|
const flow = hooks_exports.useSeatsIoSelection(eventId, checkout, initial, onContinue);
|
|
26078
26453
|
const bundleStarting = hooks_exports.useBundleStarting(checkout.store);
|
|
26079
|
-
const html = (0,
|
|
26454
|
+
const html = (0, import_react54.useMemo)(
|
|
26080
26455
|
() => flow.data.chart ? seatsIoChartDocument(flow.data.chart, flow.nonce) : "",
|
|
26081
26456
|
[flow.data.chart, flow.nonce]
|
|
26082
26457
|
);
|
|
@@ -26162,7 +26537,7 @@ var SeatsIoMap = ({ eventId, initial, onContinue }) => {
|
|
|
26162
26537
|
};
|
|
26163
26538
|
|
|
26164
26539
|
// src/sections/SeatMap.tsx
|
|
26165
|
-
var
|
|
26540
|
+
var import_react55 = require("react");
|
|
26166
26541
|
var import_react_native14 = require("react-native");
|
|
26167
26542
|
var import_react_native_webview3 = require("react-native-webview");
|
|
26168
26543
|
|
|
@@ -26178,9 +26553,9 @@ var SeatMap = ({ eventId, onContinue }) => {
|
|
|
26178
26553
|
const theme = useTheme();
|
|
26179
26554
|
const flow = hooks_exports.useSeatSelection(eventId, checkout, onContinue);
|
|
26180
26555
|
const bundleStarting = hooks_exports.useBundleStarting(checkout.store);
|
|
26181
|
-
const webview = (0,
|
|
26182
|
-
const [rendererError, setRendererError] = (0,
|
|
26183
|
-
const [size, setSize] = (0,
|
|
26556
|
+
const webview = (0, import_react55.useRef)(null);
|
|
26557
|
+
const [rendererError, setRendererError] = (0, import_react55.useState)(false);
|
|
26558
|
+
const [size, setSize] = (0, import_react55.useState)(320);
|
|
26184
26559
|
const properties = flow.chart.state === "ready" ? {
|
|
26185
26560
|
seatData: flow.chart.data.seatData,
|
|
26186
26561
|
statuses: flow.statuses,
|
|
@@ -26196,7 +26571,7 @@ var SeatMap = ({ eventId, onContinue }) => {
|
|
|
26196
26571
|
predefinedSeats: flow.chart.data.predefinedSeats
|
|
26197
26572
|
} : null;
|
|
26198
26573
|
const chart = flow.chart.state === "ready" ? flow.chart.data : null;
|
|
26199
|
-
const html = (0,
|
|
26574
|
+
const html = (0, import_react55.useMemo)(
|
|
26200
26575
|
() => chart ? `<!doctype html><html><head><meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1"><style>html,body,#seat-map{margin:0;width:100%;height:100%;overflow:hidden}body{background:#fff}${SEAT_MAP_CSS}</style></head><body><div id="seat-map"></div><script>${SEAT_MAP_SCRIPT.replace(/<\/script/gi, "<\\/script")}</script></body></html>` : "",
|
|
26201
26576
|
[chart]
|
|
26202
26577
|
);
|
|
@@ -26207,7 +26582,7 @@ var SeatMap = ({ eventId, onContinue }) => {
|
|
|
26207
26582
|
`window.__tfSeatMapUpdate&&window.__tfSeatMapUpdate(${safeJson2(properties)});true;`
|
|
26208
26583
|
);
|
|
26209
26584
|
};
|
|
26210
|
-
(0,
|
|
26585
|
+
(0, import_react55.useEffect)(update, [properties && safeJson2(properties)]);
|
|
26211
26586
|
if (flow.chart.state === "provider") return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(SeatsIoMap, { eventId, initial: flow.chart.data, onContinue });
|
|
26212
26587
|
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(FrozenFields, { frozen: checkout.orderFixed, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(Card, { children: [
|
|
26213
26588
|
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(SectionHeader, { title: "Select your seats" }),
|
|
@@ -26343,7 +26718,7 @@ var styles3 = import_react_native14.StyleSheet.create({
|
|
|
26343
26718
|
});
|
|
26344
26719
|
|
|
26345
26720
|
// src/sections/AddOns.tsx
|
|
26346
|
-
var
|
|
26721
|
+
var import_react56 = require("react");
|
|
26347
26722
|
var import_react_native16 = require("react-native");
|
|
26348
26723
|
|
|
26349
26724
|
// src/ui/CustomFields.tsx
|
|
@@ -26394,7 +26769,15 @@ var CustomFieldInput = ({
|
|
|
26394
26769
|
case "textarea":
|
|
26395
26770
|
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(Field, { label: field.label, required: field.required, error, children: [
|
|
26396
26771
|
desc,
|
|
26397
|
-
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
26772
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
26773
|
+
Input,
|
|
26774
|
+
{
|
|
26775
|
+
multiline: true,
|
|
26776
|
+
value: asString(value6),
|
|
26777
|
+
onChangeText: onChange,
|
|
26778
|
+
invalid: invalid3
|
|
26779
|
+
}
|
|
26780
|
+
)
|
|
26398
26781
|
] });
|
|
26399
26782
|
case "select":
|
|
26400
26783
|
case "radio": {
|
|
@@ -26542,7 +26925,7 @@ var AddOns = ({
|
|
|
26542
26925
|
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native16.Text, { style: s9.subtitle, children: "PLEASE SELECT FROM THE OPTIONAL ADD-ONS BELOW" }),
|
|
26543
26926
|
groups.map((g, gi) => {
|
|
26544
26927
|
var _a3;
|
|
26545
|
-
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
26928
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react56.Fragment, { children: [
|
|
26546
26929
|
g.heading ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native16.Text, { style: s9.group, children: g.heading }) : null,
|
|
26547
26930
|
g.items.map((a) => {
|
|
26548
26931
|
var _a4, _b2;
|
|
@@ -26607,7 +26990,7 @@ var AddOns = ({
|
|
|
26607
26990
|
error || checkout.error ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ErrorText, { children: error || checkout.error }) : null
|
|
26608
26991
|
] }) });
|
|
26609
26992
|
};
|
|
26610
|
-
var useAddonStyles = (theme) => (0,
|
|
26993
|
+
var useAddonStyles = (theme) => (0, import_react56.useMemo)(
|
|
26611
26994
|
() => import_react_native16.StyleSheet.create({
|
|
26612
26995
|
head: { flexDirection: "row", alignItems: "center", flexWrap: "wrap", gap: 8 },
|
|
26613
26996
|
eyebrow: {
|
|
@@ -26701,7 +27084,7 @@ var useAddonStyles = (theme) => (0, import_react55.useMemo)(
|
|
|
26701
27084
|
);
|
|
26702
27085
|
|
|
26703
27086
|
// src/sections/Bundles.tsx
|
|
26704
|
-
var
|
|
27087
|
+
var import_react57 = require("react");
|
|
26705
27088
|
var import_react_native17 = require("react-native");
|
|
26706
27089
|
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
26707
27090
|
var money3 = (currency, amount2) => `${currency} ${amount2.toFixed(2)}`;
|
|
@@ -26952,7 +27335,7 @@ var Bundles = ({
|
|
|
26952
27335
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Button, { onPress: flow.continueToDetails, disabled: !anySelected, children: t("bundles.continue") })
|
|
26953
27336
|
] });
|
|
26954
27337
|
};
|
|
26955
|
-
var useBundleStyles = (theme) => (0,
|
|
27338
|
+
var useBundleStyles = (theme) => (0, import_react57.useMemo)(
|
|
26956
27339
|
() => import_react_native17.StyleSheet.create({
|
|
26957
27340
|
loader: { paddingVertical: 20, alignItems: "center" },
|
|
26958
27341
|
heading: {
|
|
@@ -27005,7 +27388,7 @@ var useBundleStyles = (theme) => (0, import_react56.useMemo)(
|
|
|
27005
27388
|
);
|
|
27006
27389
|
|
|
27007
27390
|
// src/sections/BillingInfo.tsx
|
|
27008
|
-
var
|
|
27391
|
+
var import_react60 = require("react");
|
|
27009
27392
|
var import_react_native22 = require("react-native");
|
|
27010
27393
|
|
|
27011
27394
|
// src/sections/billing/BillingAddressFields.tsx
|
|
@@ -27113,11 +27496,11 @@ var styles4 = import_react_native18.StyleSheet.create({
|
|
|
27113
27496
|
});
|
|
27114
27497
|
|
|
27115
27498
|
// src/sections/billing/PhoneIdentity.tsx
|
|
27116
|
-
var
|
|
27499
|
+
var import_react59 = require("react");
|
|
27117
27500
|
var import_react_native20 = require("react-native");
|
|
27118
27501
|
|
|
27119
27502
|
// src/auth/TwoFactorForm.tsx
|
|
27120
|
-
var
|
|
27503
|
+
var import_react58 = require("react");
|
|
27121
27504
|
var import_react_native19 = require("react-native");
|
|
27122
27505
|
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
27123
27506
|
var TwoFactorForm = ({
|
|
@@ -27130,7 +27513,7 @@ var TwoFactorForm = ({
|
|
|
27130
27513
|
onSendSms,
|
|
27131
27514
|
onCancel
|
|
27132
27515
|
}) => {
|
|
27133
|
-
const [code, setCode] = (0,
|
|
27516
|
+
const [code, setCode] = (0, import_react58.useState)("");
|
|
27134
27517
|
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react_native19.View, { style: { gap: 14 }, children: [
|
|
27135
27518
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(MutedText, { children: "Enter the six-digit code from your authenticator app or registered phone to complete sign-in." }),
|
|
27136
27519
|
error ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ErrorText, { children: error }) : null,
|
|
@@ -27182,8 +27565,8 @@ var PhoneIdentity = ({
|
|
|
27182
27565
|
}) => {
|
|
27183
27566
|
var _a2;
|
|
27184
27567
|
const identity = hooks_exports.useCheckoutPhoneIdentity(options);
|
|
27185
|
-
const [code, setCode] = (0,
|
|
27186
|
-
const [emailInstead, setEmailInstead] = (0,
|
|
27568
|
+
const [code, setCode] = (0, import_react59.useState)("");
|
|
27569
|
+
const [emailInstead, setEmailInstead] = (0, import_react59.useState)(false);
|
|
27187
27570
|
if (emailInstead) return null;
|
|
27188
27571
|
if (identity.challenge)
|
|
27189
27572
|
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
@@ -27498,17 +27881,17 @@ var BillingInfo = ({
|
|
|
27498
27881
|
const profile = hooks_exports.useCheckoutBuyerProfile(eventId);
|
|
27499
27882
|
const event = hooks_exports.useEvent(eventId);
|
|
27500
27883
|
const combined = !onContinue;
|
|
27501
|
-
const [billing, setBilling] = (0,
|
|
27884
|
+
const [billing, setBilling] = (0, import_react60.useState)(
|
|
27502
27885
|
() => billingDraftFrom(checkout.billing)
|
|
27503
27886
|
);
|
|
27504
|
-
const [dataCapture, setDataCapture] = (0,
|
|
27887
|
+
const [dataCapture, setDataCapture] = (0, import_react60.useState)(
|
|
27505
27888
|
(_b = (_a2 = checkout.billing) == null ? void 0 : _a2.dataCapture) != null ? _b : {}
|
|
27506
27889
|
);
|
|
27507
|
-
const [holders, setHolders] = (0,
|
|
27890
|
+
const [holders, setHolders] = (0, import_react60.useState)(
|
|
27508
27891
|
() => holderDraftsFrom(checkout.holders, checkout.backfilledHolderIndexes)
|
|
27509
27892
|
);
|
|
27510
|
-
const [consent, setConsent] = (0,
|
|
27511
|
-
const [dob, setDob] = (0,
|
|
27893
|
+
const [consent, setConsent] = (0, import_react60.useState)({ ttfOptIn: false, brandOptIn: false });
|
|
27894
|
+
const [dob, setDob] = (0, import_react60.useState)(() => billingDobIso(checkout.billing));
|
|
27512
27895
|
hooks_exports.useOnOrderReleased(checkout.orderFixed, () => {
|
|
27513
27896
|
var _a3, _b2;
|
|
27514
27897
|
setBilling(billingDraftFrom(checkout.billing));
|
|
@@ -27519,35 +27902,35 @@ var BillingInfo = ({
|
|
|
27519
27902
|
(prev) => holderDraftsReloaded(prev, checkout.holders, checkout.backfilledHolderIndexes)
|
|
27520
27903
|
);
|
|
27521
27904
|
});
|
|
27522
|
-
const restoredHolders = (0,
|
|
27905
|
+
const restoredHolders = (0, import_react60.useRef)(checkout.holders);
|
|
27523
27906
|
hooks_exports.useOnEventChange(checkout.eventId, () => {
|
|
27524
27907
|
restoredHolders.current = [];
|
|
27525
27908
|
setHolders([]);
|
|
27526
27909
|
setDataCapture({});
|
|
27527
27910
|
});
|
|
27528
|
-
const profileSeeded = (0,
|
|
27529
|
-
const countryDefaultApplied = (0,
|
|
27911
|
+
const profileSeeded = (0, import_react60.useRef)(false);
|
|
27912
|
+
const countryDefaultApplied = (0, import_react60.useRef)(Boolean((_c = checkout.billing) == null ? void 0 : _c.countryId));
|
|
27530
27913
|
const {
|
|
27531
27914
|
setBilling: commitBilling,
|
|
27532
27915
|
setHolders: commitHolders,
|
|
27533
27916
|
setConsent: commitConsent
|
|
27534
27917
|
} = checkout;
|
|
27535
27918
|
const gates = checkout.fieldGates;
|
|
27536
|
-
const orderGroups = (0,
|
|
27919
|
+
const orderGroups = (0, import_react60.useMemo)(
|
|
27537
27920
|
() => checkout.customFields.filter((g) => g.scope === "order"),
|
|
27538
27921
|
[checkout.customFields]
|
|
27539
27922
|
);
|
|
27540
|
-
const ticketGroups = (0,
|
|
27923
|
+
const ticketGroups = (0, import_react60.useMemo)(
|
|
27541
27924
|
() => checkout.customFields.filter((g) => g.scope === "ticket"),
|
|
27542
27925
|
[checkout.customFields]
|
|
27543
27926
|
);
|
|
27544
|
-
const ticketFields = (0,
|
|
27927
|
+
const ticketFields = (0, import_react60.useMemo)(
|
|
27545
27928
|
() => ticketGroups.flatMap((g) => g.fields),
|
|
27546
27929
|
[ticketGroups]
|
|
27547
27930
|
);
|
|
27548
27931
|
const holderNamesRequired = checkout.holderNamesRequired || collectTicketHolders;
|
|
27549
27932
|
const showHolders = holderNamesRequired || ticketFields.length > 0;
|
|
27550
|
-
const slots = (0,
|
|
27933
|
+
const slots = (0, import_react60.useMemo)(() => {
|
|
27551
27934
|
var _a3, _b2;
|
|
27552
27935
|
const out = [];
|
|
27553
27936
|
const lines = (_b2 = (_a3 = checkout.breakdown) == null ? void 0 : _a3.tickets) != null ? _b2 : [];
|
|
@@ -27560,7 +27943,7 @@ var BillingInfo = ({
|
|
|
27560
27943
|
}
|
|
27561
27944
|
return out;
|
|
27562
27945
|
}, [checkout.breakdown, checkout.selections]);
|
|
27563
|
-
(0,
|
|
27946
|
+
(0, import_react60.useEffect)(() => {
|
|
27564
27947
|
const p = profile.data;
|
|
27565
27948
|
if (!p || profileSeeded.current) return;
|
|
27566
27949
|
profileSeeded.current = true;
|
|
@@ -27583,10 +27966,10 @@ var BillingInfo = ({
|
|
|
27583
27966
|
return keys.every((k) => next[k] === prev[k]) ? prev : next;
|
|
27584
27967
|
});
|
|
27585
27968
|
}, [profile.data, checkout.isLoggedIn]);
|
|
27586
|
-
(0,
|
|
27969
|
+
(0, import_react60.useEffect)(() => {
|
|
27587
27970
|
setHolders((prev) => holderDraftsForSlots(prev, slots, restoredHolders.current));
|
|
27588
27971
|
}, [slots]);
|
|
27589
|
-
(0,
|
|
27972
|
+
(0, import_react60.useEffect)(() => {
|
|
27590
27973
|
if (!showHolders) return;
|
|
27591
27974
|
setHolders(
|
|
27592
27975
|
(prev) => holderDraftsMirroringBuyer(prev, {
|
|
@@ -27597,7 +27980,7 @@ var BillingInfo = ({
|
|
|
27597
27980
|
})
|
|
27598
27981
|
);
|
|
27599
27982
|
}, [showHolders, billing.firstName, billing.lastName, billing.email, billing.phone]);
|
|
27600
|
-
(0,
|
|
27983
|
+
(0, import_react60.useEffect)(() => {
|
|
27601
27984
|
const email = billing.email.trim();
|
|
27602
27985
|
if (checkout.isLoggedIn || !isEmail(email)) return;
|
|
27603
27986
|
const t = setTimeout(
|
|
@@ -27611,18 +27994,18 @@ var BillingInfo = ({
|
|
|
27611
27994
|
const countriesQuery = hooks_exports.useCountries({
|
|
27612
27995
|
enabled: needsNationality || gates.showAddress
|
|
27613
27996
|
});
|
|
27614
|
-
const countries = (0,
|
|
27997
|
+
const countries = (0, import_react60.useMemo)(() => {
|
|
27615
27998
|
var _a3;
|
|
27616
27999
|
return (_a3 = countriesQuery.data) != null ? _a3 : [];
|
|
27617
28000
|
}, [countriesQuery.data]);
|
|
27618
28001
|
const statesQuery = hooks_exports.useStates(billing.countryId, {
|
|
27619
28002
|
enabled: Boolean(billing.countryId)
|
|
27620
28003
|
});
|
|
27621
|
-
const states = (0,
|
|
28004
|
+
const states = (0, import_react60.useMemo)(() => {
|
|
27622
28005
|
var _a3;
|
|
27623
28006
|
return (_a3 = statesQuery.data) != null ? _a3 : [];
|
|
27624
28007
|
}, [statesQuery.data]);
|
|
27625
|
-
(0,
|
|
28008
|
+
(0, import_react60.useEffect)(() => {
|
|
27626
28009
|
var _a3, _b2, _c2, _d2;
|
|
27627
28010
|
if (countryDefaultApplied.current || billing.countryId || countries.length === 0 || profile.isLoading || eventId && event.isLoading) {
|
|
27628
28011
|
return;
|
|
@@ -27661,7 +28044,7 @@ var BillingInfo = ({
|
|
|
27661
28044
|
event.isLoading,
|
|
27662
28045
|
(_e = event.data) == null ? void 0 : _e.countryCode
|
|
27663
28046
|
]);
|
|
27664
|
-
(0,
|
|
28047
|
+
(0, import_react60.useEffect)(() => {
|
|
27665
28048
|
var _a3;
|
|
27666
28049
|
if (!billing.countryId) return;
|
|
27667
28050
|
const country = countries.find(
|
|
@@ -27672,7 +28055,7 @@ var BillingInfo = ({
|
|
|
27672
28055
|
setBilling((current5) => ({ ...current5, countryCode }));
|
|
27673
28056
|
}
|
|
27674
28057
|
}, [billing.countryId, billing.countryCode, countries]);
|
|
27675
|
-
(0,
|
|
28058
|
+
(0, import_react60.useEffect)(() => {
|
|
27676
28059
|
if (!billing.stateId) return;
|
|
27677
28060
|
const state = states.find(
|
|
27678
28061
|
(candidate) => String(candidate.id) === String(billing.stateId)
|
|
@@ -27732,7 +28115,7 @@ var BillingInfo = ({
|
|
|
27732
28115
|
});
|
|
27733
28116
|
if (ttfOptInLabel || brandOptInLabel) commitConsent(consent);
|
|
27734
28117
|
};
|
|
27735
|
-
(0,
|
|
28118
|
+
(0, import_react60.useEffect)(() => {
|
|
27736
28119
|
if (combined) commit();
|
|
27737
28120
|
}, [
|
|
27738
28121
|
combined,
|
|
@@ -27929,7 +28312,7 @@ var BillingInfo = ({
|
|
|
27929
28312
|
setBilling
|
|
27930
28313
|
}
|
|
27931
28314
|
) : null,
|
|
27932
|
-
orderGroups.map((g) => /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
28315
|
+
orderGroups.map((g) => /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_react60.Fragment, { children: [
|
|
27933
28316
|
g.label ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react_native22.Text, { style: s9.sectionLabel, children: g.label }) : null,
|
|
27934
28317
|
renderGroupFields(
|
|
27935
28318
|
g,
|
|
@@ -28006,7 +28389,7 @@ var BillingInfo = ({
|
|
|
28006
28389
|
showHolders ? continueButton : null
|
|
28007
28390
|
] });
|
|
28008
28391
|
};
|
|
28009
|
-
var useStyles4 = (theme) => (0,
|
|
28392
|
+
var useStyles4 = (theme) => (0, import_react60.useMemo)(
|
|
28010
28393
|
() => import_react_native22.StyleSheet.create({
|
|
28011
28394
|
loginRow: {
|
|
28012
28395
|
flexDirection: "row",
|
|
@@ -28199,7 +28582,7 @@ var Accommodation = ({ eventId }) => {
|
|
|
28199
28582
|
var styles7 = import_react_native24.StyleSheet.create({ room: { gap: 12, paddingVertical: 12 }, title: { fontSize: 16, fontWeight: "600" } });
|
|
28200
28583
|
|
|
28201
28584
|
// src/sections/Payment.tsx
|
|
28202
|
-
var
|
|
28585
|
+
var import_react61 = require("react");
|
|
28203
28586
|
var import_react_native25 = require("react-native");
|
|
28204
28587
|
var import_stripe_react_native3 = require("@stripe/stripe-react-native");
|
|
28205
28588
|
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
@@ -28253,14 +28636,14 @@ var Payment = ({
|
|
|
28253
28636
|
const bundleWait = hooks_exports.useTicketGatewayWait(checkout.store);
|
|
28254
28637
|
const bundleStarting = bundleWait !== null;
|
|
28255
28638
|
const validation = useCheckoutValidation();
|
|
28256
|
-
const [error, setError] = (0,
|
|
28639
|
+
const [error, setError] = (0, import_react61.useState)("");
|
|
28257
28640
|
const paymentMethods = hooks_exports.useCheckoutPaymentMethods(checkout.store);
|
|
28258
28641
|
const methods = (_a2 = paymentMethods.data) != null ? _a2 : null;
|
|
28259
|
-
const [selected, setSelected] = (0,
|
|
28260
|
-
const [extras, setExtras] = (0,
|
|
28261
|
-
const [useSavedCard, setUseSavedCard] = (0,
|
|
28262
|
-
const [nativeWalletSupported, setNativeWalletSupported] = (0,
|
|
28263
|
-
(0,
|
|
28642
|
+
const [selected, setSelected] = (0, import_react61.useState)("");
|
|
28643
|
+
const [extras, setExtras] = (0, import_react61.useState)({});
|
|
28644
|
+
const [useSavedCard, setUseSavedCard] = (0, import_react61.useState)(true);
|
|
28645
|
+
const [nativeWalletSupported, setNativeWalletSupported] = (0, import_react61.useState)(false);
|
|
28646
|
+
(0, import_react61.useEffect)(() => {
|
|
28264
28647
|
let mounted = true;
|
|
28265
28648
|
const env = getConfig().env;
|
|
28266
28649
|
(0, import_stripe_react_native3.isPlatformPaySupported)({ googlePay: { testEnv: env === "STAG" || env === "DEV" } }).then((supported) => {
|
|
@@ -28276,7 +28659,7 @@ var Payment = ({
|
|
|
28276
28659
|
const isFree = bd !== void 0 && Number(bd.total) === 0;
|
|
28277
28660
|
const isXendit = checkout.gateway === "xendit";
|
|
28278
28661
|
const offersOxxo = stripeOffersOxxo(checkout.stripeElementsConfig);
|
|
28279
|
-
const options = (0,
|
|
28662
|
+
const options = (0, import_react61.useMemo)(() => {
|
|
28280
28663
|
var _a3, _b2, _c2, _d2, _e2;
|
|
28281
28664
|
if (isFree || !methods) return [];
|
|
28282
28665
|
const out = [];
|
|
@@ -28333,7 +28716,7 @@ var Payment = ({
|
|
|
28333
28716
|
nativeWalletSupported,
|
|
28334
28717
|
offersOxxo
|
|
28335
28718
|
]);
|
|
28336
|
-
(0,
|
|
28719
|
+
(0, import_react61.useEffect)(() => {
|
|
28337
28720
|
if (options.length && !options.some((o) => o.value === selected))
|
|
28338
28721
|
setSelected(options[0].value);
|
|
28339
28722
|
}, [options, selected]);
|
|
@@ -28343,7 +28726,10 @@ var Payment = ({
|
|
|
28343
28726
|
const isPlanSelected = (selectedOption == null ? void 0 : selectedOption.id.kind) === "paymentPlan";
|
|
28344
28727
|
const savedLast4 = methods == null ? void 0 : methods.savedPlanCardLast4;
|
|
28345
28728
|
const reuseSavedCard = planUsesSavedCard(savedLast4, useSavedCard);
|
|
28346
|
-
const
|
|
28729
|
+
const useStripeSheet = Boolean(
|
|
28730
|
+
checkout.paymentSheet && isCardSelected && nativePaymentSheetAvailable(checkout)
|
|
28731
|
+
);
|
|
28732
|
+
const showStripeCardField = !isXendit && (!useStripeSheet && isCardSelected || isPlanSelected && !reuseSavedCard);
|
|
28347
28733
|
const showXenditCardNote = isXendit && isCardSelected;
|
|
28348
28734
|
const ticketCard = hooks_exports.useTicketCardForm({
|
|
28349
28735
|
confirmer: rnConfirmer,
|
|
@@ -28405,14 +28791,16 @@ var Payment = ({
|
|
|
28405
28791
|
req = { method: "xenditEWallet", walletKey: id2.walletKey, extra: extras[selected] };
|
|
28406
28792
|
else if (id2.kind === "redirect")
|
|
28407
28793
|
req = { method: "redirect", methodType: id2.methodType };
|
|
28408
|
-
else if (id2.kind === "paymentPlan")
|
|
28794
|
+
else if (id2.kind === "paymentPlan")
|
|
28795
|
+
req = { method: "paymentPlan", useSavedCard: reuseSavedCard };
|
|
28409
28796
|
else req = { method: id2.kind };
|
|
28410
|
-
checkout.placeOrder(
|
|
28797
|
+
const payment = useStripeSheet && checkout.paymentSheet && !isFree ? checkout.paymentSheet.placeOrder() : checkout.placeOrder(
|
|
28411
28798
|
req,
|
|
28412
28799
|
usesOwnCardField ? {
|
|
28413
28800
|
claimCard: cardClaimStep("nativeCard", () => claimCardField(cardOwner))
|
|
28414
28801
|
} : void 0
|
|
28415
|
-
)
|
|
28802
|
+
);
|
|
28803
|
+
payment.then((order) => onComplete == null ? void 0 : onComplete(order)).catch(
|
|
28416
28804
|
(e) => setError(
|
|
28417
28805
|
e instanceof CartChangedError ? t("checkout.error.cartChanged") : e instanceof CardClaimError || e instanceof ConfirmerBusyError ? createTranslator()(e.message) : errorMessage(e)
|
|
28418
28806
|
)
|
|
@@ -28425,6 +28813,7 @@ var Payment = ({
|
|
|
28425
28813
|
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(MutedText, { children: createTranslator()("bundles.payingElsewhere") }),
|
|
28426
28814
|
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Button, { variant: "ghost", onPress: ticketCard.payHere, children: createTranslator()("bundles.payHere") })
|
|
28427
28815
|
] }) : showStripeCardField ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(CardInput, { owner: cardOwner }) : null,
|
|
28816
|
+
useStripeSheet && !isFree ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(MutedText, { children: "Choose your payment details securely with Stripe when you pay." }) : null,
|
|
28428
28817
|
showXenditCardNote ? (
|
|
28429
28818
|
// Xendit card tokenizes in a WebView sheet (deferred — see confirmer.ts).
|
|
28430
28819
|
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(MutedText, { children: "Card details are entered in a secure Xendit window when you pay." })
|
|
@@ -28503,17 +28892,17 @@ var Payment = ({
|
|
|
28503
28892
|
};
|
|
28504
28893
|
|
|
28505
28894
|
// src/sections/WaiverSigning.tsx
|
|
28506
|
-
var
|
|
28895
|
+
var import_react63 = require("react");
|
|
28507
28896
|
var import_react_native27 = require("react-native");
|
|
28508
28897
|
|
|
28509
28898
|
// src/ui/SignaturePad.tsx
|
|
28510
|
-
var
|
|
28899
|
+
var import_react62 = require("react");
|
|
28511
28900
|
var import_react_native26 = require("react-native");
|
|
28512
28901
|
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
28513
28902
|
var LINE_WIDTH = 2.5;
|
|
28514
28903
|
var PAD_HEIGHT = 160;
|
|
28515
28904
|
var MIN_STEP = 1.5;
|
|
28516
|
-
var StrokeView = (0,
|
|
28905
|
+
var StrokeView = (0, import_react62.memo)(
|
|
28517
28906
|
({ stroke }) => stroke.length === 1 ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
28518
28907
|
import_react_native26.View,
|
|
28519
28908
|
{
|
|
@@ -28553,13 +28942,13 @@ var SignaturePad = ({
|
|
|
28553
28942
|
disabled
|
|
28554
28943
|
}) => {
|
|
28555
28944
|
const theme = useTheme();
|
|
28556
|
-
const strokesRef = (0,
|
|
28557
|
-
const [, setFrame] = (0,
|
|
28558
|
-
const frameRequest = (0,
|
|
28559
|
-
const size = (0,
|
|
28560
|
-
const report = (0,
|
|
28945
|
+
const strokesRef = (0, import_react62.useRef)([]);
|
|
28946
|
+
const [, setFrame] = (0, import_react62.useState)(0);
|
|
28947
|
+
const frameRequest = (0, import_react62.useRef)(null);
|
|
28948
|
+
const size = (0, import_react62.useRef)({ width: 0, height: PAD_HEIGHT });
|
|
28949
|
+
const report = (0, import_react62.useRef)(onChange);
|
|
28561
28950
|
report.current = onChange;
|
|
28562
|
-
const disabledRef = (0,
|
|
28951
|
+
const disabledRef = (0, import_react62.useRef)(disabled);
|
|
28563
28952
|
disabledRef.current = disabled;
|
|
28564
28953
|
const render = () => {
|
|
28565
28954
|
if (frameRequest.current !== null) cancelAnimationFrame(frameRequest.current);
|
|
@@ -28570,7 +28959,7 @@ var SignaturePad = ({
|
|
|
28570
28959
|
if (frameRequest.current !== null) return;
|
|
28571
28960
|
frameRequest.current = requestAnimationFrame(render);
|
|
28572
28961
|
};
|
|
28573
|
-
(0,
|
|
28962
|
+
(0, import_react62.useEffect)(
|
|
28574
28963
|
() => () => {
|
|
28575
28964
|
if (frameRequest.current !== null) cancelAnimationFrame(frameRequest.current);
|
|
28576
28965
|
},
|
|
@@ -28585,7 +28974,7 @@ var SignaturePad = ({
|
|
|
28585
28974
|
});
|
|
28586
28975
|
if (ended) report.current(ended.pngDataUrl, ended.inkLength);
|
|
28587
28976
|
};
|
|
28588
|
-
const responder = (0,
|
|
28977
|
+
const responder = (0, import_react62.useMemo)(
|
|
28589
28978
|
() => import_react_native26.PanResponder.create({
|
|
28590
28979
|
onStartShouldSetPanResponder: () => !disabledRef.current,
|
|
28591
28980
|
onMoveShouldSetPanResponder: () => !disabledRef.current,
|
|
@@ -28697,8 +29086,8 @@ var WaiverSigning = ({
|
|
|
28697
29086
|
checkout.setWaiverSignature,
|
|
28698
29087
|
checkout.holdWaiverSigning
|
|
28699
29088
|
);
|
|
28700
|
-
const [open, setOpen] = (0,
|
|
28701
|
-
const [reloading, setReloading] = (0,
|
|
29089
|
+
const [open, setOpen] = (0, import_react63.useState)({});
|
|
29090
|
+
const [reloading, setReloading] = (0, import_react63.useState)(false);
|
|
28702
29091
|
if ((_a2 = checkout.unavailableDetails) == null ? void 0 : _a2.includes("waiver")) {
|
|
28703
29092
|
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Card, { children: [
|
|
28704
29093
|
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(SectionHeader, { title: t("waivers.heading") }),
|
|
@@ -28792,17 +29181,17 @@ var TicketForm = ({ ticket, consentText, t, methods, busy, locked = false, error
|
|
|
28792
29181
|
var _a2, _b, _c, _d;
|
|
28793
29182
|
const theme = useTheme();
|
|
28794
29183
|
const s9 = useWaiverStyles(theme);
|
|
28795
|
-
const [heldDraft, setDraft] = (0,
|
|
29184
|
+
const [heldDraft, setDraft] = (0, import_react63.useState)(
|
|
28796
29185
|
() => emptyWaiverDraft(
|
|
28797
29186
|
{ firstName: ticket.holderFirstName, lastName: ticket.holderLastName },
|
|
28798
29187
|
{ signatureMethods: methods }
|
|
28799
29188
|
)
|
|
28800
29189
|
);
|
|
28801
29190
|
const draft = draftWithAllowedMethod(heldDraft, methods);
|
|
28802
|
-
const [problems, setProblems] = (0,
|
|
28803
|
-
const [pressed, setPressed] = (0,
|
|
29191
|
+
const [problems, setProblems] = (0, import_react63.useState)([]);
|
|
29192
|
+
const [pressed, setPressed] = (0, import_react63.useState)(false);
|
|
28804
29193
|
const frozen = busy || locked;
|
|
28805
|
-
const draftRef = (0,
|
|
29194
|
+
const draftRef = (0, import_react63.useRef)(draft);
|
|
28806
29195
|
draftRef.current = draft;
|
|
28807
29196
|
const patch2 = (next) => {
|
|
28808
29197
|
if (!frozen) setDraft((d) => ({ ...d, ...next }));
|
|
@@ -28956,7 +29345,7 @@ var TicketForm = ({ ticket, consentText, t, methods, busy, locked = false, error
|
|
|
28956
29345
|
)
|
|
28957
29346
|
] });
|
|
28958
29347
|
};
|
|
28959
|
-
var useWaiverStyles = (theme) => (0,
|
|
29348
|
+
var useWaiverStyles = (theme) => (0, import_react63.useMemo)(
|
|
28960
29349
|
() => import_react_native27.StyleSheet.create({
|
|
28961
29350
|
muted: {
|
|
28962
29351
|
color: theme.muted,
|
|
@@ -29001,7 +29390,7 @@ var useWaiverStyles = (theme) => (0, import_react62.useMemo)(
|
|
|
29001
29390
|
);
|
|
29002
29391
|
|
|
29003
29392
|
// src/sections/IDVerification.tsx
|
|
29004
|
-
var
|
|
29393
|
+
var import_react64 = require("react");
|
|
29005
29394
|
var import_react_native28 = require("react-native");
|
|
29006
29395
|
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
29007
29396
|
var MESSAGE = {
|
|
@@ -29016,8 +29405,8 @@ var IDVerification = () => {
|
|
|
29016
29405
|
const checkout = useCheckoutContext();
|
|
29017
29406
|
const theme = useTheme();
|
|
29018
29407
|
const order = checkout.order;
|
|
29019
|
-
const [phase, setPhase] = (0,
|
|
29020
|
-
const [error, setError] = (0,
|
|
29408
|
+
const [phase, setPhase] = (0, import_react64.useState)("idle");
|
|
29409
|
+
const [error, setError] = (0, import_react64.useState)("");
|
|
29021
29410
|
if (!(order == null ? void 0 : order.needIdVerification)) return null;
|
|
29022
29411
|
const done = phase === "verified";
|
|
29023
29412
|
const running = phase === "starting" || phase === "polling";
|
|
@@ -29044,7 +29433,7 @@ var IDVerification = () => {
|
|
|
29044
29433
|
};
|
|
29045
29434
|
|
|
29046
29435
|
// src/sections/Confirmation.tsx
|
|
29047
|
-
var
|
|
29436
|
+
var import_react65 = require("react");
|
|
29048
29437
|
var import_react_native29 = require("react-native");
|
|
29049
29438
|
var import_clipboard = __toESM(require("@react-native-clipboard/clipboard"));
|
|
29050
29439
|
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
@@ -29058,7 +29447,7 @@ var Confirmation = ({
|
|
|
29058
29447
|
const checkout = useCheckoutContext();
|
|
29059
29448
|
const theme = useTheme();
|
|
29060
29449
|
const order = checkout.order;
|
|
29061
|
-
const [copied, setCopied] = (0,
|
|
29450
|
+
const [copied, setCopied] = (0, import_react65.useState)(false);
|
|
29062
29451
|
if (!order) return null;
|
|
29063
29452
|
const pending3 = order.pending;
|
|
29064
29453
|
const url2 = shareUrl != null ? shareUrl : "";
|
|
@@ -29112,12 +29501,12 @@ var styles9 = import_react_native29.StyleSheet.create({
|
|
|
29112
29501
|
});
|
|
29113
29502
|
|
|
29114
29503
|
// src/sections/Rewards.tsx
|
|
29115
|
-
var
|
|
29504
|
+
var import_react68 = require("react");
|
|
29116
29505
|
var import_react_native32 = require("react-native");
|
|
29117
29506
|
var import_clipboard2 = __toESM(require("@react-native-clipboard/clipboard"));
|
|
29118
29507
|
|
|
29119
29508
|
// src/sections/rewards/RewardsLadder.tsx
|
|
29120
|
-
var
|
|
29509
|
+
var import_react66 = require("react");
|
|
29121
29510
|
var import_react_native30 = require("react-native");
|
|
29122
29511
|
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
29123
29512
|
var AWARD_STATUS_KEYS = {
|
|
@@ -29127,9 +29516,9 @@ var AWARD_STATUS_KEYS = {
|
|
|
29127
29516
|
cancelled: "rewards.awards.cancelled"
|
|
29128
29517
|
};
|
|
29129
29518
|
var DeliveryDetails = ({ fields, translate: t, onSubmit }) => {
|
|
29130
|
-
const [values2, setValues] = (0,
|
|
29131
|
-
const [saving, setSaving] = (0,
|
|
29132
|
-
const [failure, setFailure] = (0,
|
|
29519
|
+
const [values2, setValues] = (0, import_react66.useState)({});
|
|
29520
|
+
const [saving, setSaving] = (0, import_react66.useState)(false);
|
|
29521
|
+
const [failure, setFailure] = (0, import_react66.useState)("");
|
|
29133
29522
|
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_react_native30.View, { style: { gap: 10 }, children: [
|
|
29134
29523
|
fields.map((field) => {
|
|
29135
29524
|
var _a2;
|
|
@@ -29221,7 +29610,7 @@ var styles10 = import_react_native30.StyleSheet.create({
|
|
|
29221
29610
|
});
|
|
29222
29611
|
|
|
29223
29612
|
// src/sections/rewards/RewardsTree.tsx
|
|
29224
|
-
var
|
|
29613
|
+
var import_react67 = require("react");
|
|
29225
29614
|
var import_react_native31 = require("react-native");
|
|
29226
29615
|
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
29227
29616
|
var MAX_NODES = 120;
|
|
@@ -29229,11 +29618,11 @@ var DOT = 10;
|
|
|
29229
29618
|
var ROOT_DOT = 16;
|
|
29230
29619
|
var RewardsTree = ({ tree, size = 260 }) => {
|
|
29231
29620
|
const theme = useTheme();
|
|
29232
|
-
const nodes = (0,
|
|
29621
|
+
const nodes = (0, import_react67.useMemo)(() => {
|
|
29233
29622
|
var _a2;
|
|
29234
29623
|
return ((_a2 = tree == null ? void 0 : tree.nodes) != null ? _a2 : []).slice(0, MAX_NODES);
|
|
29235
29624
|
}, [tree]);
|
|
29236
|
-
const { layout, edges, rootId } = (0,
|
|
29625
|
+
const { layout, edges, rootId } = (0, import_react67.useMemo)(() => {
|
|
29237
29626
|
const root = treeRootId(nodes);
|
|
29238
29627
|
const computed = computeRadialTreeLayout(nodes, root);
|
|
29239
29628
|
return { layout: computed, edges: radialTreeEdges(nodes, computed), rootId: root };
|
|
@@ -29320,10 +29709,10 @@ var RewardsView = ({
|
|
|
29320
29709
|
var _a2, _b, _c, _d, _e, _f;
|
|
29321
29710
|
const t = translate2 != null ? translate2 : createTranslator({ locale, messages });
|
|
29322
29711
|
const { rewards, failure, busy, hash } = flow;
|
|
29323
|
-
const [packName, setPackName] = (0,
|
|
29324
|
-
const [packCode, setPackCode] = (0,
|
|
29325
|
-
const [copied, setCopied] = (0,
|
|
29326
|
-
(0,
|
|
29712
|
+
const [packName, setPackName] = (0, import_react68.useState)("");
|
|
29713
|
+
const [packCode, setPackCode] = (0, import_react68.useState)("");
|
|
29714
|
+
const [copied, setCopied] = (0, import_react68.useState)(false);
|
|
29715
|
+
(0, import_react68.useEffect)(() => {
|
|
29327
29716
|
setCopied(false);
|
|
29328
29717
|
}, [rewards == null ? void 0 : rewards.share_link]);
|
|
29329
29718
|
if (!rewards)
|
|
@@ -29511,7 +29900,7 @@ var styles12 = import_react_native32.StyleSheet.create({
|
|
|
29511
29900
|
});
|
|
29512
29901
|
|
|
29513
29902
|
// src/sections/TicketChange.tsx
|
|
29514
|
-
var
|
|
29903
|
+
var import_react69 = require("react");
|
|
29515
29904
|
var import_react_native33 = require("react-native");
|
|
29516
29905
|
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
29517
29906
|
var TicketChange = ({
|
|
@@ -29721,7 +30110,7 @@ var TicketChange = ({
|
|
|
29721
30110
|
flow.notice ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_native33.Text, { style: s9.muted, children: t(flow.notice) }) : null
|
|
29722
30111
|
] });
|
|
29723
30112
|
};
|
|
29724
|
-
var useChangeStyles = (theme) => (0,
|
|
30113
|
+
var useChangeStyles = (theme) => (0, import_react69.useMemo)(
|
|
29725
30114
|
() => import_react_native33.StyleSheet.create({
|
|
29726
30115
|
loader: { paddingVertical: 20, alignItems: "center" },
|
|
29727
30116
|
muted: {
|
|
@@ -29817,17 +30206,17 @@ var Trips = ({
|
|
|
29817
30206
|
};
|
|
29818
30207
|
|
|
29819
30208
|
// src/sections/EventDiscussionView.tsx
|
|
29820
|
-
var
|
|
30209
|
+
var import_react73 = require("react");
|
|
29821
30210
|
var import_react_native37 = require("react-native");
|
|
29822
30211
|
|
|
29823
30212
|
// src/sections/discussion/CommentImages.tsx
|
|
29824
|
-
var
|
|
30213
|
+
var import_react71 = require("react");
|
|
29825
30214
|
var import_react_native35 = require("react-native");
|
|
29826
30215
|
|
|
29827
30216
|
// src/ui/useAccountT.ts
|
|
29828
|
-
var
|
|
30217
|
+
var import_react70 = require("react");
|
|
29829
30218
|
var useAccountT = (locale) => {
|
|
29830
|
-
const translate2 = (0,
|
|
30219
|
+
const translate2 = (0, import_react70.useMemo)(
|
|
29831
30220
|
() => createTranslator({ locale: resolveLocale(locale) }),
|
|
29832
30221
|
[locale]
|
|
29833
30222
|
);
|
|
@@ -29891,8 +30280,8 @@ var CommentImages = ({
|
|
|
29891
30280
|
const t = useAccountT(locale);
|
|
29892
30281
|
const theme = useTheme();
|
|
29893
30282
|
const white = [s.white, { fontFamily: theme.fontFamily }];
|
|
29894
|
-
const [selected, setSelected] = (0,
|
|
29895
|
-
(0,
|
|
30283
|
+
const [selected, setSelected] = (0, import_react71.useState)(null);
|
|
30284
|
+
(0, import_react71.useEffect)(() => {
|
|
29896
30285
|
if (selected === null) return;
|
|
29897
30286
|
onPreviewChange(true);
|
|
29898
30287
|
return () => onPreviewChange(false);
|
|
@@ -30148,7 +30537,7 @@ var s = import_react_native35.StyleSheet.create({
|
|
|
30148
30537
|
});
|
|
30149
30538
|
|
|
30150
30539
|
// src/sections/discussion/SwipeReply.tsx
|
|
30151
|
-
var
|
|
30540
|
+
var import_react72 = require("react");
|
|
30152
30541
|
var import_react_native36 = require("react-native");
|
|
30153
30542
|
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
30154
30543
|
var SwipeReply = ({
|
|
@@ -30159,8 +30548,8 @@ var SwipeReply = ({
|
|
|
30159
30548
|
children
|
|
30160
30549
|
}) => {
|
|
30161
30550
|
const theme = useTheme();
|
|
30162
|
-
const offset = (0,
|
|
30163
|
-
const gesture = (0,
|
|
30551
|
+
const offset = (0, import_react72.useRef)(new import_react_native36.Animated.Value(0)).current;
|
|
30552
|
+
const gesture = (0, import_react72.useMemo)(() => {
|
|
30164
30553
|
const reset = () => import_react_native36.Animated.spring(offset, { toValue: 0, useNativeDriver: true }).start();
|
|
30165
30554
|
return import_react_native36.PanResponder.create({
|
|
30166
30555
|
onMoveShouldSetPanResponder: (_, value6) => enabled && value6.dx < -12 && Math.abs(value6.dx) > Math.abs(value6.dy) * 1.5,
|
|
@@ -30240,17 +30629,17 @@ var EventDiscussionBody = ({
|
|
|
30240
30629
|
var _a2, _b, _c;
|
|
30241
30630
|
const theme = useTheme();
|
|
30242
30631
|
const t = useAccountT(locale);
|
|
30243
|
-
const list2 = (0,
|
|
30244
|
-
const firstContent = (0,
|
|
30245
|
-
const [actions, setActions] = (0,
|
|
30246
|
-
const [reporting, setReporting] = (0,
|
|
30247
|
-
const [moderating, setModerating] = (0,
|
|
30248
|
-
const [reason, setReason] = (0,
|
|
30249
|
-
const [blocksVisible, setBlocksVisible] = (0,
|
|
30250
|
-
const [pickerError, setPickerError] = (0,
|
|
30251
|
-
const [imageOpen, setImageOpen] = (0,
|
|
30252
|
-
const [pickerBusy, setPickerBusy] = (0,
|
|
30253
|
-
const picking = (0,
|
|
30632
|
+
const list2 = (0, import_react73.useRef)(null);
|
|
30633
|
+
const firstContent = (0, import_react73.useRef)(true);
|
|
30634
|
+
const [actions, setActions] = (0, import_react73.useState)(null);
|
|
30635
|
+
const [reporting, setReporting] = (0, import_react73.useState)(null);
|
|
30636
|
+
const [moderating, setModerating] = (0, import_react73.useState)(null);
|
|
30637
|
+
const [reason, setReason] = (0, import_react73.useState)("");
|
|
30638
|
+
const [blocksVisible, setBlocksVisible] = (0, import_react73.useState)(false);
|
|
30639
|
+
const [pickerError, setPickerError] = (0, import_react73.useState)("");
|
|
30640
|
+
const [imageOpen, setImageOpen] = (0, import_react73.useState)(false);
|
|
30641
|
+
const [pickerBusy, setPickerBusy] = (0, import_react73.useState)(false);
|
|
30642
|
+
const picking = (0, import_react73.useRef)(false);
|
|
30254
30643
|
const text6 = { color: theme.text, fontFamily: theme.fontFamily };
|
|
30255
30644
|
const muted = { color: theme.muted, fontFamily: theme.fontFamily };
|
|
30256
30645
|
const closeActions = (work) => {
|
|
@@ -31264,7 +31653,7 @@ var styles13 = import_react_native42.StyleSheet.create({
|
|
|
31264
31653
|
});
|
|
31265
31654
|
|
|
31266
31655
|
// src/sections/Streaming.tsx
|
|
31267
|
-
var
|
|
31656
|
+
var import_react74 = require("react");
|
|
31268
31657
|
var import_react_native43 = require("react-native");
|
|
31269
31658
|
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
31270
31659
|
var Streaming = (props) => {
|
|
@@ -31286,14 +31675,14 @@ var StreamingView = ({
|
|
|
31286
31675
|
const defaultT = useAccountT(locale);
|
|
31287
31676
|
const t = translate2 != null ? translate2 : defaultT;
|
|
31288
31677
|
const inherited = useTheme();
|
|
31289
|
-
const theme = (0,
|
|
31678
|
+
const theme = (0, import_react74.useMemo)(
|
|
31290
31679
|
() => override ? resolveTheme({ ...inherited, ...override }) : inherited,
|
|
31291
31680
|
[inherited, override]
|
|
31292
31681
|
);
|
|
31293
31682
|
const session = hooks_exports.useAuthSession();
|
|
31294
31683
|
const assertOwner = hooks_exports.useSessionAction();
|
|
31295
|
-
const pendingBrowser = (0,
|
|
31296
|
-
const [stored, setStored] = (0,
|
|
31684
|
+
const pendingBrowser = (0, import_react74.useRef)({ scope: session.sessionScope, locked: false });
|
|
31685
|
+
const [stored, setStored] = (0, import_react74.useState)({
|
|
31297
31686
|
scope: session.sessionScope,
|
|
31298
31687
|
busy: false,
|
|
31299
31688
|
error: ""
|
|
@@ -31456,7 +31845,7 @@ var s4 = import_react_native43.StyleSheet.create({
|
|
|
31456
31845
|
});
|
|
31457
31846
|
|
|
31458
31847
|
// src/sections/AccountDeletion.tsx
|
|
31459
|
-
var
|
|
31848
|
+
var import_react75 = require("react");
|
|
31460
31849
|
var import_react_native44 = require("react-native");
|
|
31461
31850
|
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
31462
31851
|
var AccountDeletion = (props) => {
|
|
@@ -31479,7 +31868,7 @@ var AccountDeletionView = ({
|
|
|
31479
31868
|
const defaultT = useAccountT(locale);
|
|
31480
31869
|
const t = translate2 != null ? translate2 : defaultT;
|
|
31481
31870
|
const inherited = useTheme();
|
|
31482
|
-
const theme = (0,
|
|
31871
|
+
const theme = (0, import_react75.useMemo)(
|
|
31483
31872
|
() => override ? resolveTheme({ ...inherited, ...override }) : inherited,
|
|
31484
31873
|
[inherited, override]
|
|
31485
31874
|
);
|
|
@@ -31708,7 +32097,7 @@ var s5 = import_react_native44.StyleSheet.create({
|
|
|
31708
32097
|
});
|
|
31709
32098
|
|
|
31710
32099
|
// src/sections/ProfileSettings.tsx
|
|
31711
|
-
var
|
|
32100
|
+
var import_react76 = require("react");
|
|
31712
32101
|
var import_react_native45 = require("react-native");
|
|
31713
32102
|
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
31714
32103
|
var ProfileSettings = (props) => {
|
|
@@ -31732,7 +32121,7 @@ var ProfileSettingsView = ({
|
|
|
31732
32121
|
const defaultT = useAccountT(locale);
|
|
31733
32122
|
const t = translate2 != null ? translate2 : defaultT;
|
|
31734
32123
|
const inherited = useTheme();
|
|
31735
|
-
const theme = (0,
|
|
32124
|
+
const theme = (0, import_react76.useMemo)(
|
|
31736
32125
|
() => override ? resolveTheme({ ...inherited, ...override }) : inherited,
|
|
31737
32126
|
[inherited, override]
|
|
31738
32127
|
);
|
|
@@ -31744,7 +32133,7 @@ var ProfileSettingsView = ({
|
|
|
31744
32133
|
} catch (e) {
|
|
31745
32134
|
}
|
|
31746
32135
|
};
|
|
31747
|
-
(0,
|
|
32136
|
+
(0, import_react76.useEffect)(() => {
|
|
31748
32137
|
if (flow.settings) flow.open(mode);
|
|
31749
32138
|
}, [mode, flow.scopeKey, Boolean(flow.settings)]);
|
|
31750
32139
|
const text6 = { color: theme.text, fontFamily: theme.fontFamily };
|
|
@@ -32249,7 +32638,7 @@ var AccountPaymentPlanSection = ({
|
|
|
32249
32638
|
};
|
|
32250
32639
|
|
|
32251
32640
|
// src/sections/NotificationPreferences.tsx
|
|
32252
|
-
var
|
|
32641
|
+
var import_react77 = require("react");
|
|
32253
32642
|
var import_react_native48 = require("react-native");
|
|
32254
32643
|
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
32255
32644
|
var NotificationPreferences = (props) => {
|
|
@@ -32272,7 +32661,7 @@ var NotificationPreferencesView = ({
|
|
|
32272
32661
|
const defaultT = useAccountT(locale);
|
|
32273
32662
|
const t = translate2 != null ? translate2 : defaultT;
|
|
32274
32663
|
const inherited = useTheme();
|
|
32275
|
-
const theme = (0,
|
|
32664
|
+
const theme = (0, import_react77.useMemo)(
|
|
32276
32665
|
() => override ? resolveTheme({ ...inherited, ...override }) : inherited,
|
|
32277
32666
|
[inherited, override]
|
|
32278
32667
|
);
|
|
@@ -32284,7 +32673,7 @@ var NotificationPreferencesView = ({
|
|
|
32284
32673
|
} catch (e) {
|
|
32285
32674
|
}
|
|
32286
32675
|
};
|
|
32287
|
-
(0,
|
|
32676
|
+
(0, import_react77.useEffect)(() => {
|
|
32288
32677
|
var _a3;
|
|
32289
32678
|
if ((_a3 = flow.preferences) == null ? void 0 : _a3.available) flow.begin();
|
|
32290
32679
|
}, [flow.scopeKey, Boolean(flow.preferences), (_a2 = flow.preferences) == null ? void 0 : _a2.available]);
|
|
@@ -32449,15 +32838,15 @@ var s7 = import_react_native48.StyleSheet.create({
|
|
|
32449
32838
|
var import_react_native54 = require("react-native");
|
|
32450
32839
|
|
|
32451
32840
|
// src/auth/LoginForm.tsx
|
|
32452
|
-
var
|
|
32841
|
+
var import_react79 = require("react");
|
|
32453
32842
|
var import_react_native50 = require("react-native");
|
|
32454
32843
|
|
|
32455
32844
|
// src/auth/PasswordInput.tsx
|
|
32456
|
-
var
|
|
32845
|
+
var import_react78 = require("react");
|
|
32457
32846
|
var import_react_native49 = require("react-native");
|
|
32458
32847
|
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
32459
32848
|
var PasswordInput = (props) => {
|
|
32460
|
-
const [visible, setVisible] = (0,
|
|
32849
|
+
const [visible, setVisible] = (0, import_react78.useState)(false);
|
|
32461
32850
|
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_react_native49.View, { style: styles14.wrap, children: [
|
|
32462
32851
|
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Input, { ...props, autoCapitalize: "none", secureTextEntry: !visible }),
|
|
32463
32852
|
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
@@ -32499,9 +32888,9 @@ var LoginForm = ({
|
|
|
32499
32888
|
onFieldChange
|
|
32500
32889
|
}) => {
|
|
32501
32890
|
const theme = useTheme();
|
|
32502
|
-
const [email, setEmail] = (0,
|
|
32503
|
-
const [password, setPassword] = (0,
|
|
32504
|
-
(0,
|
|
32891
|
+
const [email, setEmail] = (0, import_react79.useState)(initialEmail);
|
|
32892
|
+
const [password, setPassword] = (0, import_react79.useState)("");
|
|
32893
|
+
(0, import_react79.useEffect)(() => {
|
|
32505
32894
|
if (initialEmail && !email) setEmail(initialEmail);
|
|
32506
32895
|
}, [email, initialEmail]);
|
|
32507
32896
|
const submit = () => void onSubmit({ email, password });
|
|
@@ -32553,7 +32942,7 @@ var styles15 = import_react_native50.StyleSheet.create({
|
|
|
32553
32942
|
});
|
|
32554
32943
|
|
|
32555
32944
|
// src/auth/EmailCodeForm.tsx
|
|
32556
|
-
var
|
|
32945
|
+
var import_react80 = require("react");
|
|
32557
32946
|
var import_react_native51 = require("react-native");
|
|
32558
32947
|
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
32559
32948
|
var EmailCodeForm = ({
|
|
@@ -32568,8 +32957,8 @@ var EmailCodeForm = ({
|
|
|
32568
32957
|
onVerify,
|
|
32569
32958
|
onBack
|
|
32570
32959
|
}) => {
|
|
32571
|
-
const [email, setEmail] = (0,
|
|
32572
|
-
const [code, setCode] = (0,
|
|
32960
|
+
const [email, setEmail] = (0, import_react80.useState)(initialEmail);
|
|
32961
|
+
const [code, setCode] = (0, import_react80.useState)("");
|
|
32573
32962
|
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(import_react_native51.View, { style: { gap: 14 }, children: [
|
|
32574
32963
|
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(MutedText, { children: sent ? `Enter the sign-in code sent to ${target}.` : "Receive a one-time sign-in code by email." }),
|
|
32575
32964
|
error ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(ErrorText, { children: error }) : null,
|
|
@@ -32625,7 +33014,7 @@ var EmailCodeForm = ({
|
|
|
32625
33014
|
};
|
|
32626
33015
|
|
|
32627
33016
|
// src/auth/ForgotPasswordForm.tsx
|
|
32628
|
-
var
|
|
33017
|
+
var import_react81 = require("react");
|
|
32629
33018
|
var import_react_native52 = require("react-native");
|
|
32630
33019
|
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
32631
33020
|
var ForgotPasswordForm = ({
|
|
@@ -32639,8 +33028,8 @@ var ForgotPasswordForm = ({
|
|
|
32639
33028
|
onFieldChange
|
|
32640
33029
|
}) => {
|
|
32641
33030
|
const theme = useTheme();
|
|
32642
|
-
const [email, setEmail] = (0,
|
|
32643
|
-
(0,
|
|
33031
|
+
const [email, setEmail] = (0, import_react81.useState)(initialEmail);
|
|
33032
|
+
(0, import_react81.useEffect)(() => {
|
|
32644
33033
|
if (initialEmail && !email) setEmail(initialEmail);
|
|
32645
33034
|
}, [email, initialEmail]);
|
|
32646
33035
|
const submit = () => void onSubmit(email);
|
|
@@ -32688,7 +33077,7 @@ var styles16 = import_react_native52.StyleSheet.create({
|
|
|
32688
33077
|
});
|
|
32689
33078
|
|
|
32690
33079
|
// src/auth/RegisterForm.tsx
|
|
32691
|
-
var
|
|
33080
|
+
var import_react82 = require("react");
|
|
32692
33081
|
var import_react_native53 = require("react-native");
|
|
32693
33082
|
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
32694
33083
|
var emptyRegistration = (email) => ({
|
|
@@ -32717,30 +33106,30 @@ var RegisterForm = ({
|
|
|
32717
33106
|
onFieldChange
|
|
32718
33107
|
}) => {
|
|
32719
33108
|
var _a2, _b, _c, _d, _e, _f;
|
|
32720
|
-
const t = (0,
|
|
32721
|
-
const [values2, setValues] = (0,
|
|
33109
|
+
const t = (0, import_react82.useMemo)(() => createTranslator({ locale }), [locale]);
|
|
33110
|
+
const [values2, setValues] = (0, import_react82.useState)(
|
|
32722
33111
|
() => emptyRegistration(initialEmail)
|
|
32723
33112
|
);
|
|
32724
|
-
const [termsAccepted, setTermsAccepted] = (0,
|
|
32725
|
-
const [refreshingProof, setRefreshingProof] = (0,
|
|
32726
|
-
const [refreshCode, setRefreshCode] = (0,
|
|
33113
|
+
const [termsAccepted, setTermsAccepted] = (0, import_react82.useState)(false);
|
|
33114
|
+
const [refreshingProof, setRefreshingProof] = (0, import_react82.useState)(false);
|
|
33115
|
+
const [refreshCode, setRefreshCode] = (0, import_react82.useState)("");
|
|
32727
33116
|
const countriesQuery = hooks_exports.useCountries();
|
|
32728
|
-
const countries = (0,
|
|
33117
|
+
const countries = (0, import_react82.useMemo)(() => {
|
|
32729
33118
|
var _a3;
|
|
32730
33119
|
return (_a3 = countriesQuery.data) != null ? _a3 : [];
|
|
32731
33120
|
}, [countriesQuery.data]);
|
|
32732
33121
|
const statesQuery = hooks_exports.useStates(values2.countryId, {
|
|
32733
33122
|
enabled: requireAddress && Boolean(values2.countryId)
|
|
32734
33123
|
});
|
|
32735
|
-
const states = (0,
|
|
33124
|
+
const states = (0, import_react82.useMemo)(() => {
|
|
32736
33125
|
var _a3;
|
|
32737
33126
|
return (_a3 = statesQuery.data) != null ? _a3 : [];
|
|
32738
33127
|
}, [statesQuery.data]);
|
|
32739
|
-
(0,
|
|
33128
|
+
(0, import_react82.useEffect)(() => {
|
|
32740
33129
|
if (initialEmail && !values2.email)
|
|
32741
33130
|
setValues((current5) => ({ ...current5, email: initialEmail }));
|
|
32742
33131
|
}, [initialEmail, values2.email]);
|
|
32743
|
-
(0,
|
|
33132
|
+
(0, import_react82.useEffect)(() => {
|
|
32744
33133
|
var _a3;
|
|
32745
33134
|
if (!requireAddress || values2.countryId || countries.length === 0) return;
|
|
32746
33135
|
const preferred = (_a3 = countries.find((country) => {
|
|
@@ -32761,11 +33150,11 @@ var RegisterForm = ({
|
|
|
32761
33150
|
setValues((current5) => ({ ...current5, [field]: value6 }));
|
|
32762
33151
|
onFieldChange == null ? void 0 : onFieldChange(field);
|
|
32763
33152
|
};
|
|
32764
|
-
const countryOptions = (0,
|
|
33153
|
+
const countryOptions = (0, import_react82.useMemo)(
|
|
32765
33154
|
() => countries.map((country) => ({ label: country.name, value: String(country.id) })),
|
|
32766
33155
|
[countries]
|
|
32767
33156
|
);
|
|
32768
|
-
const stateOptions = (0,
|
|
33157
|
+
const stateOptions = (0, import_react82.useMemo)(
|
|
32769
33158
|
() => states.map((state) => ({ label: state.name, value: String(state.id) })),
|
|
32770
33159
|
[states]
|
|
32771
33160
|
);
|
|
@@ -33364,7 +33753,7 @@ function AccountEmailEnrichment({
|
|
|
33364
33753
|
}
|
|
33365
33754
|
|
|
33366
33755
|
// src/auth/AuthModal.tsx
|
|
33367
|
-
var
|
|
33756
|
+
var import_react83 = require("react");
|
|
33368
33757
|
var import_react_native56 = require("react-native");
|
|
33369
33758
|
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
33370
33759
|
var Tab = ({
|
|
@@ -33399,7 +33788,7 @@ var CredentialAuthModal = ({
|
|
|
33399
33788
|
}) => {
|
|
33400
33789
|
const theme = useTheme();
|
|
33401
33790
|
const t = useAccountT();
|
|
33402
|
-
const closeAfterAuth = (0,
|
|
33791
|
+
const closeAfterAuth = (0, import_react83.useCallback)(
|
|
33403
33792
|
(profile) => {
|
|
33404
33793
|
onAuthenticated == null ? void 0 : onAuthenticated(profile);
|
|
33405
33794
|
onClose();
|
|
@@ -33591,8 +33980,8 @@ var PhoneAccountModal = ({
|
|
|
33591
33980
|
},
|
|
33592
33981
|
onCancelled: onClose
|
|
33593
33982
|
});
|
|
33594
|
-
const prepared = (0,
|
|
33595
|
-
(0,
|
|
33983
|
+
const prepared = (0, import_react83.useRef)(false);
|
|
33984
|
+
(0, import_react83.useEffect)(() => {
|
|
33596
33985
|
if (prepared.current) return;
|
|
33597
33986
|
prepared.current = true;
|
|
33598
33987
|
if (initialEmail) flow.emailAuth.showLogin(initialEmail);
|
|
@@ -33682,7 +34071,7 @@ var styles18 = import_react_native56.StyleSheet.create({
|
|
|
33682
34071
|
});
|
|
33683
34072
|
|
|
33684
34073
|
// src/auth/ResetPasswordForm.tsx
|
|
33685
|
-
var
|
|
34074
|
+
var import_react84 = require("react");
|
|
33686
34075
|
var import_react_native57 = require("react-native");
|
|
33687
34076
|
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
33688
34077
|
var ResetPasswordForm = ({
|
|
@@ -33691,11 +34080,11 @@ var ResetPasswordForm = ({
|
|
|
33691
34080
|
onBackToLogin
|
|
33692
34081
|
}) => {
|
|
33693
34082
|
const theme = useTheme();
|
|
33694
|
-
const [password, setPassword] = (0,
|
|
33695
|
-
const [confirmation, setConfirmation] = (0,
|
|
33696
|
-
const [submitted, setSubmitted] = (0,
|
|
33697
|
-
const [success, setSuccess] = (0,
|
|
33698
|
-
const validation = (0,
|
|
34083
|
+
const [password, setPassword] = (0, import_react84.useState)("");
|
|
34084
|
+
const [confirmation, setConfirmation] = (0, import_react84.useState)("");
|
|
34085
|
+
const [submitted, setSubmitted] = (0, import_react84.useState)(false);
|
|
34086
|
+
const [success, setSuccess] = (0, import_react84.useState)(false);
|
|
34087
|
+
const validation = (0, import_react84.useMemo)(() => {
|
|
33699
34088
|
if (!submitted)
|
|
33700
34089
|
return {};
|
|
33701
34090
|
return {
|
|
@@ -33754,7 +34143,7 @@ var styles19 = import_react_native57.StyleSheet.create({
|
|
|
33754
34143
|
});
|
|
33755
34144
|
|
|
33756
34145
|
// src/EmbeddedCheckout.tsx
|
|
33757
|
-
var
|
|
34146
|
+
var import_react85 = require("react");
|
|
33758
34147
|
var import_react_native58 = require("react-native");
|
|
33759
34148
|
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
33760
34149
|
var Flow = ({
|
|
@@ -33782,13 +34171,13 @@ var Flow = ({
|
|
|
33782
34171
|
var _a2;
|
|
33783
34172
|
const checkout = useCheckoutContext();
|
|
33784
34173
|
const theme = useTheme();
|
|
33785
|
-
const [view, setView] = (0,
|
|
33786
|
-
const [selectionView, setSelectionView] = (0,
|
|
33787
|
-
const editedDetailsRef = (0,
|
|
33788
|
-
const [authRequest, setAuthRequest] = (0,
|
|
34174
|
+
const [view, setView] = (0, import_react85.useState)(initialView);
|
|
34175
|
+
const [selectionView, setSelectionView] = (0, import_react85.useState)(initialView);
|
|
34176
|
+
const editedDetailsRef = (0, import_react85.useRef)(null);
|
|
34177
|
+
const [authRequest, setAuthRequest] = (0, import_react85.useState)(
|
|
33789
34178
|
null
|
|
33790
34179
|
);
|
|
33791
|
-
const [privacyAttempted, setPrivacyAttempted] = (0,
|
|
34180
|
+
const [privacyAttempted, setPrivacyAttempted] = (0, import_react85.useState)(false);
|
|
33792
34181
|
const openBuiltInAuth = (email) => setAuthRequest((current5) => {
|
|
33793
34182
|
var _a3;
|
|
33794
34183
|
return { email, key: ((_a3 = current5 == null ? void 0 : current5.key) != null ? _a3 : 0) + 1 };
|
|
@@ -33801,7 +34190,7 @@ var Flow = ({
|
|
|
33801
34190
|
orderFixed: checkout.orderFixed
|
|
33802
34191
|
});
|
|
33803
34192
|
const leaveAllowed = canLeavePayment(checkout);
|
|
33804
|
-
(0,
|
|
34193
|
+
(0, import_react85.useEffect)(() => {
|
|
33805
34194
|
if (visibleView === view) return;
|
|
33806
34195
|
if (visibleView === "checkout") setView("checkout");
|
|
33807
34196
|
else {
|
|
@@ -33809,7 +34198,7 @@ var Flow = ({
|
|
|
33809
34198
|
setSelectionView("tickets");
|
|
33810
34199
|
}
|
|
33811
34200
|
}, [view, visibleView]);
|
|
33812
|
-
(0,
|
|
34201
|
+
(0, import_react85.useEffect)(() => {
|
|
33813
34202
|
onViewChange == null ? void 0 : onViewChange(visibleView);
|
|
33814
34203
|
}, [onViewChange, visibleView]);
|
|
33815
34204
|
const enterCheckout = (from) => {
|