tf-checkout-react 2.0.0-beta.2 → 2.0.0-beta.4
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 +108 -81
- package/dist/index.d.ts +108 -81
- package/dist/index.esm.js +264 -97
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +253 -85
- package/dist/index.js.map +1 -1
- package/dist/styles/tickets.css +18 -1
- package/package.json +1 -1
- package/src/EmbeddedCheckout.tsx +3 -5
- package/src/sections/Confirmation.tsx +2 -2
- package/src/sections/IDVerification.tsx +16 -9
- package/src/sections/OrderConfirmation.tsx +32 -23
- package/src/sections/OrderIDVerification.tsx +23 -11
- package/src/sections/Payment.tsx +1 -1
- package/src/sections/Tickets.tsx +36 -13
- package/src/styles/tickets.css +18 -1
- package/src/ui/InstallmentPicker.tsx +4 -2
- package/src/ui/Loader.tsx +11 -7
- package/src/ui/Stepper.tsx +27 -23
package/dist/index.js
CHANGED
|
@@ -141,6 +141,7 @@ __export(index_exports, {
|
|
|
141
141
|
missingCheckoutDetails: () => missingCheckoutDetails,
|
|
142
142
|
missingRequiredAddOns: () => missingRequiredAddOns,
|
|
143
143
|
normalizeAuthEmail: () => normalizeAuthEmail,
|
|
144
|
+
orderTicketsBeforeTables: () => orderTicketsBeforeTables,
|
|
144
145
|
oxxoVoucherFromNextAction: () => oxxoVoucherFromNextAction,
|
|
145
146
|
payOrderWith: () => payOrderWith,
|
|
146
147
|
paymentIntentIdFromClientSecret: () => paymentIntentIdFromClientSecret,
|
|
@@ -168,6 +169,7 @@ __export(index_exports, {
|
|
|
168
169
|
syncCurrency: () => syncCurrency,
|
|
169
170
|
syncCurrencyWith: () => syncCurrencyWith,
|
|
170
171
|
themeToVars: () => themeToVars,
|
|
172
|
+
ticketBadgeTranslation: () => ticketBadgeTranslation,
|
|
171
173
|
ticketFieldsFor: () => ticketFieldsFor,
|
|
172
174
|
ticketQuantityRange: () => ticketQuantityRange,
|
|
173
175
|
ttf: () => ttf,
|
|
@@ -1355,6 +1357,31 @@ var createIdVerificationPoller = (callbacks) => {
|
|
|
1355
1357
|
};
|
|
1356
1358
|
};
|
|
1357
1359
|
|
|
1360
|
+
// ../tf-checkout-shared/src/logic/tickets.ts
|
|
1361
|
+
var BADGE_PRESETS = {
|
|
1362
|
+
"almost gone": "tickets.badge.almostGone",
|
|
1363
|
+
"high demand": "tickets.badge.highDemand",
|
|
1364
|
+
"in demand": "tickets.badge.inDemand",
|
|
1365
|
+
"limited stock": "tickets.badge.limitedStock",
|
|
1366
|
+
"limited time": "tickets.badge.limitedTime",
|
|
1367
|
+
"running low": "tickets.badge.runningLow",
|
|
1368
|
+
"selling fast": "tickets.badge.sellingFast",
|
|
1369
|
+
"selling out": "tickets.badge.sellingOut"
|
|
1370
|
+
};
|
|
1371
|
+
var PERCENT_LEFT = /^(\d{1,3})% left$/i;
|
|
1372
|
+
var ticketBadgeTranslation = (badgeText) => {
|
|
1373
|
+
const text = (badgeText != null ? badgeText : "").trim();
|
|
1374
|
+
if (!text) return null;
|
|
1375
|
+
const preset = BADGE_PRESETS[text.toLowerCase()];
|
|
1376
|
+
if (preset) return { key: preset };
|
|
1377
|
+
const percent = PERCENT_LEFT.exec(text);
|
|
1378
|
+
return percent ? { key: "tickets.badge.percentLeft", vars: { percent: percent[1] } } : null;
|
|
1379
|
+
};
|
|
1380
|
+
var orderTicketsBeforeTables = (tickets) => [
|
|
1381
|
+
...tickets.filter((ticket) => !ticket.isTable),
|
|
1382
|
+
...tickets.filter((ticket) => ticket.isTable)
|
|
1383
|
+
];
|
|
1384
|
+
|
|
1358
1385
|
// ../tf-checkout-shared/src/engine/store.ts
|
|
1359
1386
|
var initialSnapshot = () => ({
|
|
1360
1387
|
status: "idle",
|
|
@@ -1649,7 +1676,7 @@ var buildXenditCheckoutHtml = (options) => {
|
|
|
1649
1676
|
|
|
1650
1677
|
// ../tf-checkout-shared/src/engine/errors.ts
|
|
1651
1678
|
var errorMessage = (error) => toTtfError(error).message;
|
|
1652
|
-
var EXPIRED_WORDS = /expir|caduc|scadut|abgelaufen|verlopen|udløbet|löpt ut|utløpt|vypršel|wygasł|истек|expirou|kedaluwarsa|hết hạn|期限切れ|已过期|已過期|만료/i;
|
|
1679
|
+
var EXPIRED_WORDS = /expir|caduc|scadut|abgelaufen|verlopen|udløbet|löpt ut|utløpt|vypršel|wygasł|истек|expirou|kedaluwarsa|vanhentu|hết hạn|期限切れ|已过期|已過期|만료/i;
|
|
1653
1680
|
var isCartExpiredError = (error) => {
|
|
1654
1681
|
const e = toTtfError(error);
|
|
1655
1682
|
if (e.status !== 422) return false;
|
|
@@ -2051,8 +2078,12 @@ var removeReservedSeats = async (eventId, tierId, seatIds) => (
|
|
|
2051
2078
|
var refreshReservation = async (eventId, orderId) => patch(ENDPOINTS.seatmap.refreshReservation(eventId), { order_id: orderId });
|
|
2052
2079
|
|
|
2053
2080
|
// ../tf-checkout-shared/src/api/events.ts
|
|
2081
|
+
var badgeOf = (raw) => {
|
|
2082
|
+
const text = typeof raw === "string" ? raw.trim() : "";
|
|
2083
|
+
return text || null;
|
|
2084
|
+
};
|
|
2054
2085
|
var mapTicket = (t) => {
|
|
2055
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
|
|
2086
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
|
|
2056
2087
|
return {
|
|
2057
2088
|
id: String(t.id),
|
|
2058
2089
|
name: (_a = t.displayName) != null ? _a : "",
|
|
@@ -2080,7 +2111,8 @@ var mapTicket = (t) => {
|
|
|
2080
2111
|
allowDirectPurchase: Boolean(t.allowDirectPurchase),
|
|
2081
2112
|
waitingListEnabled: Boolean(t.waitingListEnabled),
|
|
2082
2113
|
waitingListMaxQuantity: t.waitingListMaxQuantity != null ? Number(t.waitingListMaxQuantity) : void 0,
|
|
2083
|
-
descriptionRich: (_m = t.descriptionRich) != null ? _m : null
|
|
2114
|
+
descriptionRich: (_m = t.descriptionRich) != null ? _m : null,
|
|
2115
|
+
badgeText: badgeOf((_n = t.badgeText) != null ? _n : t.badge_text)
|
|
2084
2116
|
};
|
|
2085
2117
|
};
|
|
2086
2118
|
var getEventTickets = async (eventId) => {
|
|
@@ -2134,7 +2166,7 @@ var getEventConditions = async (eventId) => {
|
|
|
2134
2166
|
}).filter((c) => c.content || c.name);
|
|
2135
2167
|
};
|
|
2136
2168
|
var getEventTimeSlotTickets = async (eventId, date, options) => {
|
|
2137
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t;
|
|
2169
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u;
|
|
2138
2170
|
const body = await get(ENDPOINTS.events.timeSlotByDate(eventId), {
|
|
2139
2171
|
params: {
|
|
2140
2172
|
date,
|
|
@@ -2171,6 +2203,7 @@ var getEventTimeSlotTickets = async (eventId, date, options) => {
|
|
|
2171
2203
|
isTable: Boolean(s.is_table),
|
|
2172
2204
|
allowDirectPurchase: true,
|
|
2173
2205
|
descriptionRich: (_t = s.description) != null ? _t : null,
|
|
2206
|
+
badgeText: badgeOf((_u = s.badge_text) != null ? _u : s.badgeText),
|
|
2174
2207
|
timeSlot: { date: slotDate, time: timeKey }
|
|
2175
2208
|
});
|
|
2176
2209
|
}
|
|
@@ -4369,7 +4402,64 @@ var en = {
|
|
|
4369
4402
|
"auth.passwordsMustMatch": "Passwords must match.",
|
|
4370
4403
|
"auth.passwordChanged": "Your password has been changed. You can now log in.",
|
|
4371
4404
|
"auth.selectState": "Select state / region",
|
|
4372
|
-
"auth.notRequired": "Not required"
|
|
4405
|
+
"auth.notRequired": "Not required",
|
|
4406
|
+
// --- Previously hardcoded in components ---------------------------------
|
|
4407
|
+
"tickets.waitingListJoined": "You\u2019re on the waiting list \u2014 we\u2019ll email you if a spot opens.",
|
|
4408
|
+
"tickets.firstName": "First name",
|
|
4409
|
+
"tickets.lastName": "Last name",
|
|
4410
|
+
"tickets.email": "Email",
|
|
4411
|
+
"tickets.joinWaitingList": "Join the waiting list",
|
|
4412
|
+
"tickets.free": "FREE",
|
|
4413
|
+
"tickets.feesIncluded": "(incl. fees)",
|
|
4414
|
+
"tickets.feesExcluded": "(excl. fees)",
|
|
4415
|
+
"tickets.deposit": "{{percent}}% DEPOSIT",
|
|
4416
|
+
"tickets.gotPromoCode": "Got a promo code? Click here",
|
|
4417
|
+
"payment.conditionRequired": "You must accept this condition to continue.",
|
|
4418
|
+
"payment.payInFull": "Pay in full instead",
|
|
4419
|
+
"payment.installmentTotal": "{{amount}} total",
|
|
4420
|
+
"confirmation.viewVoucher": "View payment voucher",
|
|
4421
|
+
"confirmation.viewTickets": "View my tickets",
|
|
4422
|
+
"confirmation.orderConfirmed": "Your order has been confirmed!",
|
|
4423
|
+
"confirmation.emailed": "Your tickets have been emailed to you",
|
|
4424
|
+
"confirmation.inMyTickets": "Your tickets are available in My Tickets.",
|
|
4425
|
+
"confirmation.bringThem": "Please bring them with you to the event",
|
|
4426
|
+
"confirmation.viewOrder": "View Order",
|
|
4427
|
+
"confirmation.missingReference": "The order reference is missing.",
|
|
4428
|
+
"referral.titleStart": "Your ticket can become",
|
|
4429
|
+
"referral.titleCheaper": "cheaper",
|
|
4430
|
+
"referral.titleOr": "or even",
|
|
4431
|
+
"referral.titleFree": "FREE!",
|
|
4432
|
+
"referral.inviteMiddle": "and we'll refund up to",
|
|
4433
|
+
"referral.inviteEnd": "of your ticket money, if they buy tickets as well!",
|
|
4434
|
+
"referral.copy": "Copy",
|
|
4435
|
+
"referral.currentPrice": "Your ticket is currently",
|
|
4436
|
+
"referral.ifFriendsBuy": "If your friends buy {{count}} tickets",
|
|
4437
|
+
"referral.becomes": "Your ticket becomes",
|
|
4438
|
+
"referral.goesDownTo": "Your ticket goes down to",
|
|
4439
|
+
"verification.title": "Account Verification",
|
|
4440
|
+
"verification.checking": "Checking your verification status\u2026",
|
|
4441
|
+
"verification.idle": "To complete the purchase, please verify your identity.",
|
|
4442
|
+
"verification.starting": "Opening the verification page\u2026",
|
|
4443
|
+
"verification.polling": "Waiting for verification to complete in the other tab\u2026",
|
|
4444
|
+
"verification.verified": "Identity verified \u2014 your tickets are on their way.",
|
|
4445
|
+
"verification.timeoutCheckAgain": "Still not confirmed. Finish in the other tab, then check again.",
|
|
4446
|
+
"verification.timeoutSafe": "Verification is taking longer than usual. Your payment is safe.",
|
|
4447
|
+
"verification.error": "We couldn\u2019t reach the verification service. Try again.",
|
|
4448
|
+
"verification.verify": "Verify",
|
|
4449
|
+
"verification.verifying": "Verifying\u2026",
|
|
4450
|
+
"verification.checkAgain": "Check again",
|
|
4451
|
+
"verification.tryAgain": "Try again",
|
|
4452
|
+
"auth.existingAccount": "This email already has an account. Log in to autofill your checkout details.",
|
|
4453
|
+
// --- Ticket-type badges: the dashboard's presets ------------------------
|
|
4454
|
+
"tickets.badge.almostGone": "Almost gone",
|
|
4455
|
+
"tickets.badge.highDemand": "High demand",
|
|
4456
|
+
"tickets.badge.inDemand": "In demand",
|
|
4457
|
+
"tickets.badge.limitedStock": "Limited stock",
|
|
4458
|
+
"tickets.badge.limitedTime": "Limited time",
|
|
4459
|
+
"tickets.badge.runningLow": "Running low",
|
|
4460
|
+
"tickets.badge.sellingFast": "Selling fast",
|
|
4461
|
+
"tickets.badge.sellingOut": "Selling out",
|
|
4462
|
+
"tickets.badge.percentLeft": "{{percent}}% left"
|
|
4373
4463
|
};
|
|
4374
4464
|
|
|
4375
4465
|
// ../tf-checkout-shared/src/i18n/resolve.ts
|
|
@@ -4585,7 +4675,64 @@ var esMX = {
|
|
|
4585
4675
|
"auth.passwordsMustMatch": "Las contrase\xF1as deben coincidir.",
|
|
4586
4676
|
"auth.passwordChanged": "Tu contrase\xF1a se cambi\xF3. Ya puedes iniciar sesi\xF3n.",
|
|
4587
4677
|
"auth.selectState": "Selecciona estado / regi\xF3n",
|
|
4588
|
-
"auth.notRequired": "No requerido"
|
|
4678
|
+
"auth.notRequired": "No requerido",
|
|
4679
|
+
// --- Previously hardcoded in components ---------------------------------
|
|
4680
|
+
"tickets.waitingListJoined": "Ya est\xE1s en la lista de espera \u2014 te escribiremos si se libera un lugar.",
|
|
4681
|
+
"tickets.firstName": "Nombre",
|
|
4682
|
+
"tickets.lastName": "Apellido",
|
|
4683
|
+
"tickets.email": "Correo electr\xF3nico",
|
|
4684
|
+
"tickets.joinWaitingList": "Unirme a la lista de espera",
|
|
4685
|
+
"tickets.free": "GRATIS",
|
|
4686
|
+
"tickets.feesIncluded": "(incl. cargos)",
|
|
4687
|
+
"tickets.feesExcluded": "(excl. cargos)",
|
|
4688
|
+
"tickets.deposit": "{{percent}}% DE ANTICIPO",
|
|
4689
|
+
"tickets.gotPromoCode": "\xBFTienes un c\xF3digo promocional? Haz clic aqu\xED",
|
|
4690
|
+
"payment.conditionRequired": "Debes aceptar esta condici\xF3n para continuar.",
|
|
4691
|
+
"payment.payInFull": "Mejor pagar en una sola exhibici\xF3n",
|
|
4692
|
+
"payment.installmentTotal": "{{amount}} en total",
|
|
4693
|
+
"confirmation.viewVoucher": "Ver ficha de pago",
|
|
4694
|
+
"confirmation.viewTickets": "Ver mis boletos",
|
|
4695
|
+
"confirmation.orderConfirmed": "\xA1Tu pedido est\xE1 confirmado!",
|
|
4696
|
+
"confirmation.emailed": "Te enviamos tus boletos por correo",
|
|
4697
|
+
"confirmation.inMyTickets": "Tus boletos est\xE1n disponibles en Mis boletos.",
|
|
4698
|
+
"confirmation.bringThem": "Ll\xE9valos contigo al evento",
|
|
4699
|
+
"confirmation.viewOrder": "Ver pedido",
|
|
4700
|
+
"confirmation.missingReference": "Falta la referencia del pedido.",
|
|
4701
|
+
"referral.titleStart": "Tu boleto puede salirte",
|
|
4702
|
+
"referral.titleCheaper": "m\xE1s barato",
|
|
4703
|
+
"referral.titleOr": "o incluso",
|
|
4704
|
+
"referral.titleFree": "\xA1GRATIS!",
|
|
4705
|
+
"referral.inviteMiddle": "y te reembolsamos hasta el",
|
|
4706
|
+
"referral.inviteEnd": "de lo que pagaste por tu boleto si ellos tambi\xE9n compran.",
|
|
4707
|
+
"referral.copy": "Copiar",
|
|
4708
|
+
"referral.currentPrice": "Tu boleto cuesta ahora",
|
|
4709
|
+
"referral.ifFriendsBuy": "Si tus amigos compran {{count}} boletos",
|
|
4710
|
+
"referral.becomes": "Tu boleto queda",
|
|
4711
|
+
"referral.goesDownTo": "Tu boleto baja a",
|
|
4712
|
+
"verification.title": "Verificaci\xF3n de cuenta",
|
|
4713
|
+
"verification.checking": "Revisando el estado de tu verificaci\xF3n\u2026",
|
|
4714
|
+
"verification.idle": "Para completar la compra, verifica tu identidad.",
|
|
4715
|
+
"verification.starting": "Abriendo la p\xE1gina de verificaci\xF3n\u2026",
|
|
4716
|
+
"verification.polling": "Esperando a que termines la verificaci\xF3n en la otra pesta\xF1a\u2026",
|
|
4717
|
+
"verification.verified": "Identidad verificada \u2014 tus boletos van en camino.",
|
|
4718
|
+
"verification.timeoutCheckAgain": "A\xFAn no se confirma. Termina en la otra pesta\xF1a y vuelve a revisar.",
|
|
4719
|
+
"verification.timeoutSafe": "La verificaci\xF3n est\xE1 tardando m\xE1s de lo normal. Tu pago est\xE1 seguro.",
|
|
4720
|
+
"verification.error": "No pudimos conectar con el servicio de verificaci\xF3n. Int\xE9ntalo de nuevo.",
|
|
4721
|
+
"verification.verify": "Verificar",
|
|
4722
|
+
"verification.verifying": "Verificando\u2026",
|
|
4723
|
+
"verification.checkAgain": "Revisar de nuevo",
|
|
4724
|
+
"verification.tryAgain": "Intentar de nuevo",
|
|
4725
|
+
"auth.existingAccount": "Este correo ya tiene una cuenta. Inicia sesi\xF3n para autocompletar tus datos de compra.",
|
|
4726
|
+
// --- Ticket-type badges: the dashboard's presets ------------------------
|
|
4727
|
+
"tickets.badge.almostGone": "Casi agotado",
|
|
4728
|
+
"tickets.badge.highDemand": "Alta demanda",
|
|
4729
|
+
"tickets.badge.inDemand": "Muy solicitado",
|
|
4730
|
+
"tickets.badge.limitedStock": "Disponibilidad limitada",
|
|
4731
|
+
"tickets.badge.limitedTime": "Por tiempo limitado",
|
|
4732
|
+
"tickets.badge.runningLow": "Quedan pocos",
|
|
4733
|
+
"tickets.badge.sellingFast": "Se venden r\xE1pido",
|
|
4734
|
+
"tickets.badge.sellingOut": "A punto de agotarse",
|
|
4735
|
+
"tickets.badge.percentLeft": "Queda el {{percent}}%"
|
|
4589
4736
|
};
|
|
4590
4737
|
|
|
4591
4738
|
// ../tf-checkout-shared/src/i18n/locales/index.ts
|
|
@@ -5442,14 +5589,17 @@ var import_react7 = __toESM(require("react"));
|
|
|
5442
5589
|
|
|
5443
5590
|
// src/ui/Loader.tsx
|
|
5444
5591
|
var import_react6 = __toESM(require("react"));
|
|
5445
|
-
var Loader = ({ className }) =>
|
|
5446
|
-
|
|
5447
|
-
|
|
5448
|
-
|
|
5449
|
-
|
|
5450
|
-
|
|
5451
|
-
|
|
5452
|
-
)
|
|
5592
|
+
var Loader = ({ className }) => {
|
|
5593
|
+
const t = useT();
|
|
5594
|
+
return /* @__PURE__ */ import_react6.default.createElement(
|
|
5595
|
+
"span",
|
|
5596
|
+
{
|
|
5597
|
+
className: cx("tf-checkout-loader", className),
|
|
5598
|
+
role: "status",
|
|
5599
|
+
"aria-label": t("common.loading")
|
|
5600
|
+
}
|
|
5601
|
+
);
|
|
5602
|
+
};
|
|
5453
5603
|
|
|
5454
5604
|
// src/ui/Button.tsx
|
|
5455
5605
|
var Button = (0, import_react7.forwardRef)(
|
|
@@ -5503,9 +5653,9 @@ var useInstallmentPicker = () => {
|
|
|
5503
5653
|
onClick: () => choose(o)
|
|
5504
5654
|
},
|
|
5505
5655
|
/* @__PURE__ */ import_react8.default.createElement("span", null, o.count, " \xD7 ", (_a = o.per_installment_formatted) != null ? _a : o.per_installment),
|
|
5506
|
-
/* @__PURE__ */ import_react8.default.createElement("span", { className: "tf-checkout-installments__meta" }, o.total_formatted ?
|
|
5656
|
+
/* @__PURE__ */ import_react8.default.createElement("span", { className: "tf-checkout-installments__meta" }, o.total_formatted ? t("payment.installmentTotal", { amount: o.total_formatted }) : "", o.diff_from_original_formatted ? ` \xB7 ${o.diff_from_original_formatted}` : "")
|
|
5507
5657
|
);
|
|
5508
|
-
})), /* @__PURE__ */ import_react8.default.createElement(Button, { variant: "ghost", block: true, onClick: () => choose(null) }, "
|
|
5658
|
+
})), /* @__PURE__ */ import_react8.default.createElement(Button, { variant: "ghost", block: true, onClick: () => choose(null) }, t("payment.payInFull")))
|
|
5509
5659
|
) : null;
|
|
5510
5660
|
return { onInstallmentOffers, picker };
|
|
5511
5661
|
};
|
|
@@ -5906,27 +6056,30 @@ var PaymentMethods = ({
|
|
|
5906
6056
|
|
|
5907
6057
|
// src/ui/Stepper.tsx
|
|
5908
6058
|
var import_react14 = __toESM(require("react"));
|
|
5909
|
-
var Stepper = ({ value, onChange, min = 0, max = Infinity, step = 1, disabled, className }) =>
|
|
5910
|
-
|
|
5911
|
-
{
|
|
5912
|
-
|
|
5913
|
-
|
|
5914
|
-
|
|
5915
|
-
|
|
5916
|
-
|
|
5917
|
-
|
|
5918
|
-
|
|
5919
|
-
|
|
5920
|
-
|
|
5921
|
-
{
|
|
5922
|
-
|
|
5923
|
-
|
|
5924
|
-
|
|
5925
|
-
|
|
5926
|
-
|
|
5927
|
-
|
|
5928
|
-
|
|
5929
|
-
|
|
6059
|
+
var Stepper = ({ value, onChange, min = 0, max = Infinity, step = 1, disabled, className }) => {
|
|
6060
|
+
const t = useT();
|
|
6061
|
+
return /* @__PURE__ */ import_react14.default.createElement("div", { className: cx("tf-checkout-stepper", className) }, /* @__PURE__ */ import_react14.default.createElement(
|
|
6062
|
+
"button",
|
|
6063
|
+
{
|
|
6064
|
+
type: "button",
|
|
6065
|
+
className: "tf-checkout-stepper__btn",
|
|
6066
|
+
"aria-label": t("common.decrease"),
|
|
6067
|
+
disabled: disabled || value <= min,
|
|
6068
|
+
onClick: () => onChange(Math.max(min, value - step))
|
|
6069
|
+
},
|
|
6070
|
+
"\u2212"
|
|
6071
|
+
), /* @__PURE__ */ import_react14.default.createElement("span", { className: "tf-checkout-stepper__value" }, value), /* @__PURE__ */ import_react14.default.createElement(
|
|
6072
|
+
"button",
|
|
6073
|
+
{
|
|
6074
|
+
type: "button",
|
|
6075
|
+
className: "tf-checkout-stepper__btn",
|
|
6076
|
+
"aria-label": t("common.increase"),
|
|
6077
|
+
disabled: disabled || value >= max,
|
|
6078
|
+
onClick: () => onChange(Math.min(max, value + step))
|
|
6079
|
+
},
|
|
6080
|
+
"+"
|
|
6081
|
+
));
|
|
6082
|
+
};
|
|
5930
6083
|
|
|
5931
6084
|
// src/ui/QuantitySelect.tsx
|
|
5932
6085
|
var import_react15 = __toESM(require("react"));
|
|
@@ -6768,30 +6921,31 @@ var ResetPasswordForm = ({
|
|
|
6768
6921
|
// src/sections/Tickets.tsx
|
|
6769
6922
|
var import_react25 = __toESM(require("react"));
|
|
6770
6923
|
var WaitingListForm = ({ ticket, onJoin }) => {
|
|
6924
|
+
const tr = useT();
|
|
6771
6925
|
const [form, setForm] = (0, import_react25.useState)({ firstName: "", lastName: "", email: "" });
|
|
6772
6926
|
const [state, setState] = (0, import_react25.useState)("idle");
|
|
6773
6927
|
const [error, setError] = (0, import_react25.useState)("");
|
|
6774
6928
|
const ok = form.firstName.trim() && form.lastName.trim() && form.email.trim();
|
|
6775
6929
|
if (state === "done")
|
|
6776
|
-
return /* @__PURE__ */ import_react25.default.createElement("p", { className: "tf-checkout-note tf-checkout-tickets__wl-done" }, "
|
|
6930
|
+
return /* @__PURE__ */ import_react25.default.createElement("p", { className: "tf-checkout-note tf-checkout-tickets__wl-done" }, tr("tickets.waitingListJoined"));
|
|
6777
6931
|
return /* @__PURE__ */ import_react25.default.createElement("div", { className: "tf-checkout-tickets__wl" }, /* @__PURE__ */ import_react25.default.createElement(FieldRow, null, /* @__PURE__ */ import_react25.default.createElement(Field, null, /* @__PURE__ */ import_react25.default.createElement(
|
|
6778
6932
|
Input,
|
|
6779
6933
|
{
|
|
6780
|
-
placeholder: "
|
|
6934
|
+
placeholder: tr("tickets.firstName"),
|
|
6781
6935
|
value: form.firstName,
|
|
6782
6936
|
onChange: (e) => setForm((f) => ({ ...f, firstName: e.target.value }))
|
|
6783
6937
|
}
|
|
6784
6938
|
)), /* @__PURE__ */ import_react25.default.createElement(Field, null, /* @__PURE__ */ import_react25.default.createElement(
|
|
6785
6939
|
Input,
|
|
6786
6940
|
{
|
|
6787
|
-
placeholder: "
|
|
6941
|
+
placeholder: tr("tickets.lastName"),
|
|
6788
6942
|
value: form.lastName,
|
|
6789
6943
|
onChange: (e) => setForm((f) => ({ ...f, lastName: e.target.value }))
|
|
6790
6944
|
}
|
|
6791
6945
|
))), /* @__PURE__ */ import_react25.default.createElement(Field, null, /* @__PURE__ */ import_react25.default.createElement(
|
|
6792
6946
|
Input,
|
|
6793
6947
|
{
|
|
6794
|
-
placeholder: "
|
|
6948
|
+
placeholder: tr("tickets.email"),
|
|
6795
6949
|
value: form.email,
|
|
6796
6950
|
onChange: (e) => setForm((f) => ({ ...f, email: e.target.value }))
|
|
6797
6951
|
}
|
|
@@ -6810,7 +6964,7 @@ var WaitingListForm = ({ ticket, onJoin }) => {
|
|
|
6810
6964
|
disabled: !ok || state === "busy",
|
|
6811
6965
|
variant: "secondary"
|
|
6812
6966
|
},
|
|
6813
|
-
"
|
|
6967
|
+
tr("tickets.joinWaitingList")
|
|
6814
6968
|
), error && /* @__PURE__ */ import_react25.default.createElement("p", { className: "tf-checkout-error-text" }, error));
|
|
6815
6969
|
};
|
|
6816
6970
|
var Tickets = ({
|
|
@@ -6826,7 +6980,7 @@ var Tickets = ({
|
|
|
6826
6980
|
readAttributionFromUrl = true,
|
|
6827
6981
|
className
|
|
6828
6982
|
}) => {
|
|
6829
|
-
var _a, _b, _c, _d, _e, _f, _g, _h
|
|
6983
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
6830
6984
|
const tr = useT();
|
|
6831
6985
|
const checkout = useCheckoutContext();
|
|
6832
6986
|
const buttonText = buttonLabel != null ? buttonLabel : tr("tickets.getTickets");
|
|
@@ -6842,7 +6996,12 @@ var Tickets = ({
|
|
|
6842
6996
|
if (isTimeSlot && !slotDate && dates.length) setSlotDate(dates[0]);
|
|
6843
6997
|
}, [isTimeSlot, slotDate, dates]);
|
|
6844
6998
|
const slotQuery = hooks_exports.useTimeSlotTickets(eventId, isTimeSlot ? slotDate : void 0);
|
|
6845
|
-
const
|
|
6999
|
+
const slotTickets = slotQuery.data;
|
|
7000
|
+
const eventTickets = (_e = ticketsQuery.data) == null ? void 0 : _e.tickets;
|
|
7001
|
+
const tickets = (0, import_react25.useMemo)(
|
|
7002
|
+
() => isTimeSlot ? slotTickets != null ? slotTickets : [] : orderTicketsBeforeTables(eventTickets != null ? eventTickets : []),
|
|
7003
|
+
[isTimeSlot, slotTickets, eventTickets]
|
|
7004
|
+
);
|
|
6846
7005
|
const [error, setError] = (0, import_react25.useState)("");
|
|
6847
7006
|
const [code, setCode] = (0, import_react25.useState)("");
|
|
6848
7007
|
const [codeState, setCodeState] = (0, import_react25.useState)("idle");
|
|
@@ -6911,7 +7070,7 @@ var Tickets = ({
|
|
|
6911
7070
|
return next;
|
|
6912
7071
|
});
|
|
6913
7072
|
const money = (sym, n) => `${sym} ${Number(n).toFixed(2)}`;
|
|
6914
|
-
const isSeated = (
|
|
7073
|
+
const isSeated = (_f = eventInfo == null ? void 0 : eventInfo.isSeatedEvent) != null ? _f : false;
|
|
6915
7074
|
const seatMapRow = (t) => isSeated && !t.allowDirectPurchase;
|
|
6916
7075
|
const hasSeatMapTickets = tickets.some(seatMapRow);
|
|
6917
7076
|
const directPurchasable = tickets.filter((t) => !seatMapRow(t));
|
|
@@ -6945,6 +7104,7 @@ var Tickets = ({
|
|
|
6945
7104
|
const isFree = Number(t.price) === 0;
|
|
6946
7105
|
const sym = t.priceSymbol || t.currency;
|
|
6947
7106
|
const range = ticketQuantityRange(t);
|
|
7107
|
+
const badge = ticketBadgeTranslation(t.badgeText);
|
|
6948
7108
|
const ticketIndex = tickets.findIndex((candidate) => candidate.id === t.id);
|
|
6949
7109
|
const previousTicket = ticketIndex > 0 ? tickets[ticketIndex - 1] : void 0;
|
|
6950
7110
|
const startsNamedGroup = Boolean(t.groupName) && t.groupName !== (previousTicket == null ? void 0 : previousTicket.groupName);
|
|
@@ -6958,7 +7118,7 @@ var Tickets = ({
|
|
|
6958
7118
|
onClick: () => setVisibleDescription((current2) => current2 === t.id ? null : t.id)
|
|
6959
7119
|
},
|
|
6960
7120
|
visibleDescription === t.id ? tr("tickets.hideInfo") : tr("tickets.viewInfo")
|
|
6961
|
-
)), /* @__PURE__ */ import_react25.default.createElement("div", { className: "tf-checkout-tickets__price" }, discounted && /* @__PURE__ */ import_react25.default.createElement("span", { className: "tf-checkout-tickets__old" }, money(sym, original)), /* @__PURE__ */ import_react25.default.createElement(
|
|
7121
|
+
)), t.badgeText && !unavailable && /* @__PURE__ */ import_react25.default.createElement("span", { className: "tf-checkout-tickets__badge" }, badge ? tr(badge.key, badge.vars) : t.badgeText), /* @__PURE__ */ import_react25.default.createElement("div", { className: "tf-checkout-tickets__price" }, discounted && /* @__PURE__ */ import_react25.default.createElement("span", { className: "tf-checkout-tickets__old" }, money(sym, original)), /* @__PURE__ */ import_react25.default.createElement(
|
|
6962
7122
|
"span",
|
|
6963
7123
|
{
|
|
6964
7124
|
className: cx(
|
|
@@ -6966,8 +7126,8 @@ var Tickets = ({
|
|
|
6966
7126
|
isFree && "tf-checkout-tickets__amount--free"
|
|
6967
7127
|
)
|
|
6968
7128
|
},
|
|
6969
|
-
isFree ? "
|
|
6970
|
-
), !isFree && !t.soldOut && /* @__PURE__ */ import_react25.default.createElement("span", { className: "tf-checkout-tickets__fees" },
|
|
7129
|
+
isFree ? tr("tickets.free") : money(sym, t.price)
|
|
7130
|
+
), !isFree && !t.soldOut && /* @__PURE__ */ import_react25.default.createElement("span", { className: "tf-checkout-tickets__fees" }, tr(t.feeIncluded ? "tickets.feesIncluded" : "tickets.feesExcluded")), t.depositPercent != null && /* @__PURE__ */ import_react25.default.createElement("span", { className: "tf-checkout-tickets__deposit" }, tr("tickets.deposit", { percent: t.depositPercent.toFixed(2) })))), seatMapRow(t) ? null : unavailable ? /* @__PURE__ */ import_react25.default.createElement("span", { className: "tf-checkout-tickets__soldout" }, t.soldOut ? tr("tickets.soldOut") : notStarted ? tr("tickets.salesNotStarted") : tr("tickets.salesEnded")) : /* @__PURE__ */ import_react25.default.createElement("div", { className: "tf-checkout-tickets__qty" }, t.isTable && /* @__PURE__ */ import_react25.default.createElement("span", { className: "tf-checkout-tickets__guests" }, tr("tickets.guests")), /* @__PURE__ */ import_react25.default.createElement(
|
|
6971
7131
|
QuantitySelect,
|
|
6972
7132
|
{
|
|
6973
7133
|
value: (_a2 = qty[t.id]) != null ? _a2 : 0,
|
|
@@ -6996,13 +7156,13 @@ var Tickets = ({
|
|
|
6996
7156
|
className: "tf-checkout-tickets__wl-toggle",
|
|
6997
7157
|
onClick: () => setWlOpen((w) => ({ ...w, [t.id]: true }))
|
|
6998
7158
|
},
|
|
6999
|
-
"
|
|
7159
|
+
tr("tickets.joinWaitingList")
|
|
7000
7160
|
))));
|
|
7001
7161
|
};
|
|
7002
7162
|
const timeGroups = [];
|
|
7003
7163
|
if (isTimeSlot)
|
|
7004
7164
|
for (const t of tickets) {
|
|
7005
|
-
const time = (
|
|
7165
|
+
const time = (_h = (_g = t.timeSlot) == null ? void 0 : _g.time) != null ? _h : "";
|
|
7006
7166
|
const g = timeGroups.find((x) => x.time === time);
|
|
7007
7167
|
if (g) g.items.push(t);
|
|
7008
7168
|
else timeGroups.push({ time, items: [t] });
|
|
@@ -7040,7 +7200,7 @@ var Tickets = ({
|
|
|
7040
7200
|
className: "tf-checkout-tickets__promo-toggle",
|
|
7041
7201
|
onClick: () => setPromoOpen(true)
|
|
7042
7202
|
},
|
|
7043
|
-
"
|
|
7203
|
+
tr("tickets.gotPromoCode")
|
|
7044
7204
|
) : /* @__PURE__ */ import_react25.default.createElement(import_react25.default.Fragment, null, /* @__PURE__ */ import_react25.default.createElement(FieldRow, null, /* @__PURE__ */ import_react25.default.createElement(Field, null, /* @__PURE__ */ import_react25.default.createElement(
|
|
7045
7205
|
Input,
|
|
7046
7206
|
{
|
|
@@ -8743,7 +8903,7 @@ var Payment = ({
|
|
|
8743
8903
|
label: /* @__PURE__ */ import_react33.default.createElement(import_react33.default.Fragment, null, /* @__PURE__ */ import_react33.default.createElement("span", { dangerouslySetInnerHTML: { __html: c.content || c.name } }), c.isRequired && " *")
|
|
8744
8904
|
}
|
|
8745
8905
|
),
|
|
8746
|
-
invalid && /* @__PURE__ */ import_react33.default.createElement("div", { className: "tf-checkout-consent__error" }, "
|
|
8906
|
+
invalid && /* @__PURE__ */ import_react33.default.createElement("div", { className: "tf-checkout-consent__error" }, t("payment.conditionRequired"))
|
|
8747
8907
|
);
|
|
8748
8908
|
})), /* @__PURE__ */ import_react33.default.createElement(OrderSummary, { eventId }), /* @__PURE__ */ import_react33.default.createElement("div", { className: "tf-checkout-payment__cta" }, /* @__PURE__ */ import_react33.default.createElement(
|
|
8749
8909
|
Button,
|
|
@@ -8759,14 +8919,15 @@ var Payment = ({
|
|
|
8759
8919
|
// src/sections/IDVerification.tsx
|
|
8760
8920
|
var import_react34 = __toESM(require("react"));
|
|
8761
8921
|
var MESSAGE = {
|
|
8762
|
-
idle: "
|
|
8763
|
-
starting: "
|
|
8764
|
-
polling: "
|
|
8765
|
-
verified: "
|
|
8766
|
-
timeout: "
|
|
8767
|
-
error: "
|
|
8922
|
+
idle: "verification.idle",
|
|
8923
|
+
starting: "verification.starting",
|
|
8924
|
+
polling: "verification.polling",
|
|
8925
|
+
verified: "verification.verified",
|
|
8926
|
+
timeout: "verification.timeoutCheckAgain",
|
|
8927
|
+
error: "verification.error"
|
|
8768
8928
|
};
|
|
8769
8929
|
var IDVerification = ({ className }) => {
|
|
8930
|
+
const t = useT();
|
|
8770
8931
|
const checkout = useCheckoutContext();
|
|
8771
8932
|
const order = checkout.order;
|
|
8772
8933
|
const [phase, setPhase] = (0, import_react34.useState)("idle");
|
|
@@ -8787,7 +8948,7 @@ var IDVerification = ({ className }) => {
|
|
|
8787
8948
|
setError(errorMessage(e));
|
|
8788
8949
|
});
|
|
8789
8950
|
};
|
|
8790
|
-
return /* @__PURE__ */ import_react34.default.createElement(Card, { className: cx("tf-checkout-idverify", className) }, /* @__PURE__ */ import_react34.default.createElement(SectionHeader, { title: "
|
|
8951
|
+
return /* @__PURE__ */ import_react34.default.createElement(Card, { className: cx("tf-checkout-idverify", className) }, /* @__PURE__ */ import_react34.default.createElement(SectionHeader, { title: t("verification.title") }), /* @__PURE__ */ import_react34.default.createElement("p", { className: cx("tf-checkout-note", done && "tf-checkout-idverify__done") }, t(MESSAGE[phase])), !done && /* @__PURE__ */ import_react34.default.createElement(Button, { block: true, onClick: run, loading: running, disabled: running }, phase === "idle" ? t("verification.verify") : running ? t("verification.verifying") : t("verification.checkAgain")), error && /* @__PURE__ */ import_react34.default.createElement("p", { className: "tf-checkout-error-text" }, error));
|
|
8791
8952
|
};
|
|
8792
8953
|
|
|
8793
8954
|
// src/sections/Confirmation.tsx
|
|
@@ -8841,14 +9002,14 @@ var Confirmation = ({
|
|
|
8841
9002
|
target: "_blank",
|
|
8842
9003
|
rel: "noopener noreferrer"
|
|
8843
9004
|
},
|
|
8844
|
-
"
|
|
9005
|
+
t("confirmation.viewVoucher")
|
|
8845
9006
|
), viewOrderUrl && /* @__PURE__ */ import_react35.default.createElement(
|
|
8846
9007
|
"a",
|
|
8847
9008
|
{
|
|
8848
9009
|
className: "tf-checkout-button tf-checkout-button--secondary tf-checkout-button--block",
|
|
8849
9010
|
href: viewOrderUrl
|
|
8850
9011
|
},
|
|
8851
|
-
"
|
|
9012
|
+
t("confirmation.viewTickets")
|
|
8852
9013
|
), children, !pending && url && /* @__PURE__ */ import_react35.default.createElement("div", { className: "tf-checkout-confirmation__share" }, /* @__PURE__ */ import_react35.default.createElement("strong", null, t("referral.cheaperOrFree")), /* @__PURE__ */ import_react35.default.createElement("p", { className: "tf-checkout-note" }, "Invite friends with your link. When they buy, you get rewarded."), /* @__PURE__ */ import_react35.default.createElement("div", { className: "tf-checkout-confirmation__share-link" }, /* @__PURE__ */ import_react35.default.createElement("input", { className: "tf-checkout-input", readOnly: true, value: url }), /* @__PURE__ */ import_react35.default.createElement(Button, { variant: "secondary", onClick: copy }, copied ? t("referral.copied") : t("referral.copyLink"))), /* @__PURE__ */ import_react35.default.createElement("div", { className: "tf-checkout-confirmation__socials" }, shares.map((s) => /* @__PURE__ */ import_react35.default.createElement(
|
|
8853
9014
|
"a",
|
|
8854
9015
|
{
|
|
@@ -8871,9 +9032,10 @@ var attributesOf = (response) => {
|
|
|
8871
9032
|
if (data && typeof data === "object") return data;
|
|
8872
9033
|
return response;
|
|
8873
9034
|
};
|
|
9035
|
+
var MISSING_REFERENCE = "\0missing-reference";
|
|
8874
9036
|
var OrderConfirmation = ({
|
|
8875
9037
|
orderHash,
|
|
8876
|
-
title
|
|
9038
|
+
title,
|
|
8877
9039
|
message,
|
|
8878
9040
|
helper,
|
|
8879
9041
|
eventTitle,
|
|
@@ -8887,6 +9049,7 @@ var OrderConfirmation = ({
|
|
|
8887
9049
|
className
|
|
8888
9050
|
}) => {
|
|
8889
9051
|
var _a, _b, _c, _d;
|
|
9052
|
+
const t = useT();
|
|
8890
9053
|
const [data, setData] = (0, import_react36.useState)(null);
|
|
8891
9054
|
const [failure, setFailure] = (0, import_react36.useState)("");
|
|
8892
9055
|
const [copied, setCopied] = (0, import_react36.useState)(false);
|
|
@@ -8898,7 +9061,7 @@ var OrderConfirmation = ({
|
|
|
8898
9061
|
}, [onError, onLoaded]);
|
|
8899
9062
|
(0, import_react36.useEffect)(() => {
|
|
8900
9063
|
if (!orderHash) {
|
|
8901
|
-
setFailure(
|
|
9064
|
+
setFailure(MISSING_REFERENCE);
|
|
8902
9065
|
return;
|
|
8903
9066
|
}
|
|
8904
9067
|
let active = true;
|
|
@@ -8923,7 +9086,7 @@ var OrderConfirmation = ({
|
|
|
8923
9086
|
};
|
|
8924
9087
|
}, [orderHash]);
|
|
8925
9088
|
if (failure) {
|
|
8926
|
-
return /* @__PURE__ */ import_react36.default.createElement("div", { className: cx("confirmation-page tf-checkout-confirmation-page", className) }, /* @__PURE__ */ import_react36.default.createElement("div", { className: "tf-checkout-auth__alert", role: "alert" }, failure));
|
|
9089
|
+
return /* @__PURE__ */ import_react36.default.createElement("div", { className: cx("confirmation-page tf-checkout-confirmation-page", className) }, /* @__PURE__ */ import_react36.default.createElement("div", { className: "tf-checkout-auth__alert", role: "alert" }, failure === MISSING_REFERENCE ? t("confirmation.missingReference") : failure));
|
|
8927
9090
|
}
|
|
8928
9091
|
if (!data) {
|
|
8929
9092
|
return /* @__PURE__ */ import_react36.default.createElement("div", { className: "tf-checkout-confirmation-page__loading" }, /* @__PURE__ */ import_react36.default.createElement(Loader, { className: "tf-checkout-loader--page" }));
|
|
@@ -8939,14 +9102,14 @@ var OrderConfirmation = ({
|
|
|
8939
9102
|
const pricing = [
|
|
8940
9103
|
...Number.isFinite(currentPrice) ? [
|
|
8941
9104
|
{
|
|
8942
|
-
label: "
|
|
9105
|
+
label: t("referral.currentPrice"),
|
|
8943
9106
|
price: `${symbol}${currentPrice.toFixed(2)}`
|
|
8944
9107
|
}
|
|
8945
9108
|
] : [],
|
|
8946
9109
|
...sales.map((sale) => ({
|
|
8947
|
-
label:
|
|
8948
|
-
subLabel: Number(sale.price) === 0 ? "
|
|
8949
|
-
price: Number(sale.price) === 0 ? "
|
|
9110
|
+
label: t("referral.ifFriendsBuy", { count: sale.sales }),
|
|
9111
|
+
subLabel: Number(sale.price) === 0 ? t("referral.becomes") : t("referral.goesDownTo"),
|
|
9112
|
+
price: Number(sale.price) === 0 ? t("referral.titleFree") : `${symbol}${Number(sale.price).toFixed(2)}`
|
|
8950
9113
|
}))
|
|
8951
9114
|
];
|
|
8952
9115
|
const copy = () => {
|
|
@@ -8956,20 +9119,20 @@ var OrderConfirmation = ({
|
|
|
8956
9119
|
window.setTimeout(() => setCopied(false), 1500);
|
|
8957
9120
|
});
|
|
8958
9121
|
};
|
|
8959
|
-
return /* @__PURE__ */ import_react36.default.createElement("div", { className: cx("confirmation-page tf-checkout-confirmation-page", className) }, /* @__PURE__ */ import_react36.default.createElement("div", { className: "header-container" }, /* @__PURE__ */ import_react36.default.createElement("div", { className: "header-product-text" }, /* @__PURE__ */ import_react36.default.createElement("p", { className: "title" }, title), (eventTitle || eventDate || eventLocation) && /* @__PURE__ */ import_react36.default.createElement("div", { className: "event-details" }, eventTitle && /* @__PURE__ */ import_react36.default.createElement("div", { className: "event-title" }, eventTitle), eventDate && /* @__PURE__ */ import_react36.default.createElement("div", { className: "event-date" }, eventDate), eventLocation && /* @__PURE__ */ import_react36.default.createElement("div", { className: "event-location" }, eventLocation)), /* @__PURE__ */ import_react36.default.createElement("div", { className: "share-message-section" }, customReplacement ? /* @__PURE__ */ import_react36.default.createElement("div", { dangerouslySetInnerHTML: { __html: customText } }) : /* @__PURE__ */ import_react36.default.createElement(import_react36.default.Fragment, null, /* @__PURE__ */ import_react36.default.createElement("span", { className: "main" }, attachTickets ? "
|
|
9122
|
+
return /* @__PURE__ */ import_react36.default.createElement("div", { className: cx("confirmation-page tf-checkout-confirmation-page", className) }, /* @__PURE__ */ import_react36.default.createElement("div", { className: "header-container" }, /* @__PURE__ */ import_react36.default.createElement("div", { className: "header-product-text" }, /* @__PURE__ */ import_react36.default.createElement("p", { className: "title" }, title != null ? title : t("confirmation.orderConfirmed")), (eventTitle || eventDate || eventLocation) && /* @__PURE__ */ import_react36.default.createElement("div", { className: "event-details" }, eventTitle && /* @__PURE__ */ import_react36.default.createElement("div", { className: "event-title" }, eventTitle), eventDate && /* @__PURE__ */ import_react36.default.createElement("div", { className: "event-date" }, eventDate), eventLocation && /* @__PURE__ */ import_react36.default.createElement("div", { className: "event-location" }, eventLocation)), /* @__PURE__ */ import_react36.default.createElement("div", { className: "share-message-section" }, customReplacement ? /* @__PURE__ */ import_react36.default.createElement("div", { dangerouslySetInnerHTML: { __html: customText } }) : /* @__PURE__ */ import_react36.default.createElement(import_react36.default.Fragment, null, /* @__PURE__ */ import_react36.default.createElement("span", { className: "main" }, attachTickets ? t("confirmation.emailed") : message != null ? message : t("confirmation.inMyTickets")), /* @__PURE__ */ import_react36.default.createElement("span", { className: "helper" }, attachTickets ? t("confirmation.bringThem") : helper))))), customText && !customReplacement && /* @__PURE__ */ import_react36.default.createElement(
|
|
8960
9123
|
"div",
|
|
8961
9124
|
{
|
|
8962
9125
|
className: "custom-confirmation-page-text tf-checkout-confirmation-page__custom",
|
|
8963
9126
|
dangerouslySetInnerHTML: { __html: customText }
|
|
8964
9127
|
}
|
|
8965
|
-
), orderUrl && /* @__PURE__ */ import_react36.default.createElement("div", { className: "order-details-button-container" }, /* @__PURE__ */ import_react36.default.createElement("a", { className: "view-order-button", href: orderUrl }, "
|
|
9128
|
+
), orderUrl && /* @__PURE__ */ import_react36.default.createElement("div", { className: "order-details-button-container" }, /* @__PURE__ */ import_react36.default.createElement("a", { className: "view-order-button", href: orderUrl }, t("confirmation.viewOrder"))), showReferral && data.disable_referral === false && shareUrl && /* @__PURE__ */ import_react36.default.createElement(import_react36.default.Fragment, null, /* @__PURE__ */ import_react36.default.createElement("div", { className: "referral_text_image_section" }, /* @__PURE__ */ import_react36.default.createElement("div", { className: "referral_text_section" }, /* @__PURE__ */ import_react36.default.createElement("div", { className: "referral_title_text" }, t("referral.titleStart"), /* @__PURE__ */ import_react36.default.createElement("span", { className: "strong-text" }, " ", t("referral.titleCheaper"), " "), t("referral.titleOr"), /* @__PURE__ */ import_react36.default.createElement("span", { className: "strong-text" }, " ", t("referral.titleFree"))), /* @__PURE__ */ import_react36.default.createElement("div", { className: "referral_text" }, /* @__PURE__ */ import_react36.default.createElement("span", { className: "strong-text" }, t("referral.inviteFriends"), " "), t("referral.inviteMiddle"), /* @__PURE__ */ import_react36.default.createElement("span", { className: "strong-text" }, " 100% "), t("referral.inviteEnd")))), /* @__PURE__ */ import_react36.default.createElement("div", { className: "share_wrapper" }, /* @__PURE__ */ import_react36.default.createElement("div", { className: "share_section" }, /* @__PURE__ */ import_react36.default.createElement("div", { className: "invitation_section" }, /* @__PURE__ */ import_react36.default.createElement("div", { className: "invitation_title" }, t("referral.howToInvite")), /* @__PURE__ */ import_react36.default.createElement("div", { className: "share_buttons" }, /* @__PURE__ */ import_react36.default.createElement("div", { className: "share-by-link" }, /* @__PURE__ */ import_react36.default.createElement("h5", { className: "share-by-link label" }, t("referral.sendThisLink")), /* @__PURE__ */ import_react36.default.createElement("div", { className: "share-btn-inner" }, /* @__PURE__ */ import_react36.default.createElement("input", { className: "share-input", readOnly: true, value: shareUrl }), /* @__PURE__ */ import_react36.default.createElement(
|
|
8966
9129
|
"button",
|
|
8967
9130
|
{
|
|
8968
9131
|
className: "share-by-link-copy-icon",
|
|
8969
9132
|
type: "button",
|
|
8970
9133
|
onClick: copy
|
|
8971
9134
|
},
|
|
8972
|
-
/* @__PURE__ */ import_react36.default.createElement("span", { className: "copy-icon" }, copied ? "
|
|
9135
|
+
/* @__PURE__ */ import_react36.default.createElement("span", { className: "copy-icon" }, copied ? t("referral.copied") : t("referral.copy"))
|
|
8973
9136
|
))), showShareButtons && /* @__PURE__ */ import_react36.default.createElement("div", { className: "social-media-btns" }, /* @__PURE__ */ import_react36.default.createElement(
|
|
8974
9137
|
"a",
|
|
8975
9138
|
{
|
|
@@ -8990,31 +9153,33 @@ var OrderConfirmation = ({
|
|
|
8990
9153
|
rel: "noopener noreferrer"
|
|
8991
9154
|
},
|
|
8992
9155
|
"WhatsApp"
|
|
8993
|
-
))))), pricing.length > 0 && /* @__PURE__ */ import_react36.default.createElement("div", { className: "pricing-section" }, /* @__PURE__ */ import_react36.default.createElement("div", { className: "invitation_title" }, "
|
|
9156
|
+
))))), pricing.length > 0 && /* @__PURE__ */ import_react36.default.createElement("div", { className: "pricing-section" }, /* @__PURE__ */ import_react36.default.createElement("div", { className: "invitation_title" }, t("referral.howMuchCheaper")), pricing.map((item, index) => /* @__PURE__ */ import_react36.default.createElement("div", { className: "pricing-section_wrapper", key: `${item.label}-${index}` }, /* @__PURE__ */ import_react36.default.createElement("div", { className: "pricing-section_label" }, item.label, item.subLabel && /* @__PURE__ */ import_react36.default.createElement("div", { className: "pricing-section_sublabel" }, item.subLabel)), /* @__PURE__ */ import_react36.default.createElement("div", { className: "pricing-section_price" }, item.price)))))));
|
|
8994
9157
|
};
|
|
8995
9158
|
|
|
8996
9159
|
// src/sections/OrderIDVerification.tsx
|
|
8997
9160
|
var import_react37 = __toESM(require("react"));
|
|
8998
9161
|
var PHASE_MESSAGE = {
|
|
8999
|
-
checking: "
|
|
9000
|
-
idle: "
|
|
9001
|
-
starting: "
|
|
9002
|
-
polling: "
|
|
9003
|
-
verified: "
|
|
9004
|
-
timeout: "
|
|
9005
|
-
error: "
|
|
9006
|
-
};
|
|
9162
|
+
checking: "verification.checking",
|
|
9163
|
+
idle: "verification.idle",
|
|
9164
|
+
starting: "verification.starting",
|
|
9165
|
+
polling: "verification.polling",
|
|
9166
|
+
verified: "verification.verified",
|
|
9167
|
+
timeout: "verification.timeoutSafe",
|
|
9168
|
+
error: "verification.error"
|
|
9169
|
+
};
|
|
9170
|
+
var MISSING_REFERENCE2 = "\0missing-reference";
|
|
9007
9171
|
var OrderIDVerification = ({
|
|
9008
9172
|
orderHash,
|
|
9009
9173
|
onVerified,
|
|
9010
9174
|
className
|
|
9011
9175
|
}) => {
|
|
9176
|
+
const t = useT();
|
|
9012
9177
|
const [phase, setPhase] = (0, import_react37.useState)("checking");
|
|
9013
9178
|
const [failure, setFailure] = (0, import_react37.useState)("");
|
|
9014
9179
|
(0, import_react37.useEffect)(() => {
|
|
9015
9180
|
if (!orderHash) {
|
|
9016
9181
|
setPhase("error");
|
|
9017
|
-
setFailure(
|
|
9182
|
+
setFailure(MISSING_REFERENCE2);
|
|
9018
9183
|
return;
|
|
9019
9184
|
}
|
|
9020
9185
|
let active = true;
|
|
@@ -9067,7 +9232,7 @@ var OrderIDVerification = ({
|
|
|
9067
9232
|
}
|
|
9068
9233
|
);
|
|
9069
9234
|
};
|
|
9070
|
-
return /* @__PURE__ */ import_react37.default.createElement(Card, { className: cx("tf-checkout-idverify", className) }, /* @__PURE__ */ import_react37.default.createElement(SectionHeader, { title: "
|
|
9235
|
+
return /* @__PURE__ */ import_react37.default.createElement(Card, { className: cx("tf-checkout-idverify", className) }, /* @__PURE__ */ import_react37.default.createElement(SectionHeader, { title: t("verification.title") }), /* @__PURE__ */ import_react37.default.createElement(
|
|
9071
9236
|
"p",
|
|
9072
9237
|
{
|
|
9073
9238
|
className: cx(
|
|
@@ -9075,8 +9240,8 @@ var OrderIDVerification = ({
|
|
|
9075
9240
|
phase === "verified" && "tf-checkout-idverify__done"
|
|
9076
9241
|
)
|
|
9077
9242
|
},
|
|
9078
|
-
failure || PHASE_MESSAGE[phase]
|
|
9079
|
-
), phase !== "verified" && orderHash && /* @__PURE__ */ import_react37.default.createElement(Button, { block: true, onClick: run, loading: running, disabled: running || !orderHash }, phase === "idle" ? "
|
|
9243
|
+
failure === MISSING_REFERENCE2 ? t("confirmation.missingReference") : failure || t(PHASE_MESSAGE[phase])
|
|
9244
|
+
), phase !== "verified" && orderHash && /* @__PURE__ */ import_react37.default.createElement(Button, { block: true, onClick: run, loading: running, disabled: running || !orderHash }, phase === "idle" ? t("verification.verify") : running ? t("verification.verifying") : t("verification.tryAgain")));
|
|
9080
9245
|
};
|
|
9081
9246
|
|
|
9082
9247
|
// src/EmbeddedCheckout.tsx
|
|
@@ -9104,6 +9269,7 @@ var Flow = ({
|
|
|
9104
9269
|
showTestCardHint
|
|
9105
9270
|
}) => {
|
|
9106
9271
|
var _a;
|
|
9272
|
+
const t = useT();
|
|
9107
9273
|
const checkout = useCheckoutContext();
|
|
9108
9274
|
const [view, setView] = (0, import_react38.useState)(initialView);
|
|
9109
9275
|
const [selectionView, setSelectionView] = (0, import_react38.useState)(initialView);
|
|
@@ -9230,7 +9396,7 @@ var Flow = ({
|
|
|
9230
9396
|
key: authRequest.key,
|
|
9231
9397
|
open: true,
|
|
9232
9398
|
initialEmail: authRequest.email,
|
|
9233
|
-
message: authRequest.email ? "
|
|
9399
|
+
message: authRequest.email ? t("auth.existingAccount") : void 0,
|
|
9234
9400
|
allowRegistration: auth == null ? void 0 : auth.allowRegistration,
|
|
9235
9401
|
allowPasswordReset: auth == null ? void 0 : auth.allowPasswordReset,
|
|
9236
9402
|
requireRegistrationAddress: auth == null ? void 0 : auth.requireRegistrationAddress,
|
|
@@ -9494,6 +9660,7 @@ var ResumedCheckout = ({
|
|
|
9494
9660
|
missingCheckoutDetails,
|
|
9495
9661
|
missingRequiredAddOns,
|
|
9496
9662
|
normalizeAuthEmail,
|
|
9663
|
+
orderTicketsBeforeTables,
|
|
9497
9664
|
oxxoVoucherFromNextAction,
|
|
9498
9665
|
payOrderWith,
|
|
9499
9666
|
paymentIntentIdFromClientSecret,
|
|
@@ -9521,6 +9688,7 @@ var ResumedCheckout = ({
|
|
|
9521
9688
|
syncCurrency,
|
|
9522
9689
|
syncCurrencyWith,
|
|
9523
9690
|
themeToVars,
|
|
9691
|
+
ticketBadgeTranslation,
|
|
9524
9692
|
ticketFieldsFor,
|
|
9525
9693
|
ticketQuantityRange,
|
|
9526
9694
|
ttf,
|