@getmicdrop/venue-calendar 4.0.82 → 4.0.83
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/CartView-DBrUqLSR.js +2365 -0
- package/dist/CartView-DBrUqLSR.js.map +1 -0
- package/dist/{Checkout-B15JygVy.js → Checkout-BAtOdBIM.js} +466 -470
- package/dist/Checkout-BAtOdBIM.js.map +1 -0
- package/dist/Checkout-BEcmGOZm.js +789 -0
- package/dist/Checkout-BEcmGOZm.js.map +1 -0
- package/dist/{CheckoutTimer-qLOtPDt3.js → CheckoutTimer-CayvrAa9.js} +13 -13
- package/dist/{CheckoutTimer-qLOtPDt3.js.map → CheckoutTimer-CayvrAa9.js.map} +1 -1
- package/dist/CollectionView-kk90OMFq.js +299 -0
- package/dist/CollectionView-kk90OMFq.js.map +1 -0
- package/dist/{Event-DZpU-Ec1.js → Event-N959l6uT.js} +1875 -1249
- package/dist/Event-N959l6uT.js.map +1 -0
- package/dist/EventPage-DaEMiLjY.js +529 -0
- package/dist/EventPage-DaEMiLjY.js.map +1 -0
- package/dist/{Heading-5CT9Nk0b.js → Heading-A_nixT3L.js} +2 -2
- package/dist/{Heading-5CT9Nk0b.js.map → Heading-A_nixT3L.js.map} +1 -1
- package/dist/{ModalHeader-CGaXzdcs.js → ModalHeader-CxMVzApa.js} +2 -2
- package/dist/{ModalHeader-CGaXzdcs.js.map → ModalHeader-CxMVzApa.js.map} +1 -1
- package/dist/ScarcityBadge-CiF-JsPl.js +90 -0
- package/dist/ScarcityBadge-CiF-JsPl.js.map +1 -0
- package/dist/SeriesPage-CQJHrpTH.js +33 -0
- package/dist/SeriesPage-CQJHrpTH.js.map +1 -0
- package/dist/Success-R-1NhLjx.js +729 -0
- package/dist/{Success-B4CM_cy1.js.map → Success-R-1NhLjx.js.map} +1 -1
- package/dist/{Text-WY42WIKI.js → Text-F6D2QvI6.js} +16 -16
- package/dist/{Text-WY42WIKI.js.map → Text-F6D2QvI6.js.map} +1 -1
- package/dist/{VenueCalendar-DMSeDRSN.js → VenueCalendar-DdRkxjxd.js} +3821 -4111
- package/dist/VenueCalendar-DdRkxjxd.js.map +1 -0
- package/dist/{ViewTicketsEmbed-AlVzNvxE.js → ViewTicketsEmbed-BwvS8VgE.js} +31 -31
- package/dist/{ViewTicketsEmbed-AlVzNvxE.js.map → ViewTicketsEmbed-BwvS8VgE.js.map} +1 -1
- package/dist/api/api.cjs.map +1 -1
- package/dist/api/api.mjs +3 -6
- package/dist/api/api.mjs.map +1 -1
- package/dist/{data-toggle-store.svelte-CtW4s3Vw.js → data-toggle-store.svelte-D9XyVwDW.js} +2 -2
- package/dist/{data-toggle-store.svelte-CtW4s3Vw.js.map → data-toggle-store.svelte-D9XyVwDW.js.map} +1 -1
- package/dist/{labels-BB1JG19g.js → labels-DG5wh_vD.js} +29 -30
- package/dist/{labels-BB1JG19g.js.map → labels-DG5wh_vD.js.map} +1 -1
- package/dist/seo/seo.cjs +1 -1
- package/dist/seo/seo.cjs.map +1 -1
- package/dist/seo/seo.mjs +79 -58
- package/dist/seo/seo.mjs.map +1 -1
- package/dist/{transform-BlXf-shc.js → transform-C5S2acqv.js} +2 -4
- package/dist/{transform-BlXf-shc.js.map → transform-C5S2acqv.js.map} +1 -1
- package/dist/venue-calendar.css +1 -1
- package/dist/venue-calendar.es.js +18 -18
- package/dist/venue-calendar.iife.js +31 -41
- package/dist/venue-calendar.iife.js.map +1 -1
- package/dist/venue-calendar.umd.js +24 -34
- package/dist/venue-calendar.umd.js.map +1 -1
- package/package.json +171 -170
- package/dist/CarouselView.legacy-DAixPl6l.js +0 -65
- package/dist/CarouselView.legacy-DAixPl6l.js.map +0 -1
- package/dist/CartView-CsdqWB24.js +0 -1744
- package/dist/CartView-CsdqWB24.js.map +0 -1
- package/dist/Checkout-B15JygVy.js.map +0 -1
- package/dist/Checkout-CUwOrErt.js +0 -831
- package/dist/Checkout-CUwOrErt.js.map +0 -1
- package/dist/Checkout.legacy-CrFgAYYe.js +0 -1156
- package/dist/Checkout.legacy-CrFgAYYe.js.map +0 -1
- package/dist/CollectionView-D2bRelLR.js +0 -338
- package/dist/CollectionView-D2bRelLR.js.map +0 -1
- package/dist/CollectionView.legacy-DLb5fzi-.js +0 -241
- package/dist/CollectionView.legacy-DLb5fzi-.js.map +0 -1
- package/dist/Event-DZpU-Ec1.js.map +0 -1
- package/dist/EventPage-CL0yuKWZ.js +0 -577
- package/dist/EventPage-CL0yuKWZ.js.map +0 -1
- package/dist/EventPage.legacy-EujdNc3A.js +0 -1324
- package/dist/EventPage.legacy-EujdNc3A.js.map +0 -1
- package/dist/FeaturedView.legacy-CbLBD-tn.js +0 -128
- package/dist/FeaturedView.legacy-CbLBD-tn.js.map +0 -1
- package/dist/GalleryCard-BcIcYghD.js +0 -93
- package/dist/GalleryCard-BcIcYghD.js.map +0 -1
- package/dist/GalleryView.legacy-XpQUg-5_.js +0 -52
- package/dist/GalleryView.legacy-XpQUg-5_.js.map +0 -1
- package/dist/GroupedListView.legacy-qvwIV5Qm.js +0 -145
- package/dist/GroupedListView.legacy-qvwIV5Qm.js.map +0 -1
- package/dist/OrderSummarySkeleton-pqfhjvKT.js +0 -632
- package/dist/OrderSummarySkeleton-pqfhjvKT.js.map +0 -1
- package/dist/ScarcityBadge-BkRFHRif.js +0 -77
- package/dist/ScarcityBadge-BkRFHRif.js.map +0 -1
- package/dist/SeriesPage-NWCA_Aez.js +0 -54
- package/dist/SeriesPage-NWCA_Aez.js.map +0 -1
- package/dist/SeriesPage.legacy-BXSwM5jV.js +0 -193
- package/dist/SeriesPage.legacy-BXSwM5jV.js.map +0 -1
- package/dist/Success-B4CM_cy1.js +0 -748
- package/dist/Success.legacy-BWAmPmZz.js +0 -192
- package/dist/Success.legacy-BWAmPmZz.js.map +0 -1
- package/dist/VenueCalendar-DMSeDRSN.js.map +0 -1
- package/dist/__SKIP_NAVIGATION__-CmipjatL.js +0 -18
- package/dist/__SKIP_NAVIGATION__-CmipjatL.js.map +0 -1
- package/dist/api-ChzBkXfo.js +0 -6
- package/dist/api-ChzBkXfo.js.map +0 -1
- package/dist/colors-CmP-sSZD.js +0 -56
- package/dist/colors-CmP-sSZD.js.map +0 -1
|
@@ -1,831 +0,0 @@
|
|
|
1
|
-
import "svelte/internal/disclose-version";
|
|
2
|
-
import * as e from "svelte/internal/client";
|
|
3
|
-
import { C as me, m as pe, s as ue, D as ge, G as ke, r as Ee, h as be, n as Fe, o as Ae, W as De, q as Ne, u as Oe, w as Re, x as ze, y as je, z as Ge, A as ve, E as ye, F as Le, H as qe, I as Me } from "./VenueCalendar-DMSeDRSN.js";
|
|
4
|
-
import { onMount as Ue } from "svelte";
|
|
5
|
-
import { g as Ve, C as Be, a as We } from "./Checkout-B15JygVy.js";
|
|
6
|
-
function oe(f) {
|
|
7
|
-
"@babel/helpers - typeof";
|
|
8
|
-
return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? oe = function(t) {
|
|
9
|
-
return typeof t;
|
|
10
|
-
} : oe = function(t) {
|
|
11
|
-
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
12
|
-
}, oe(f);
|
|
13
|
-
}
|
|
14
|
-
var xe = "clover", Ke = function(t) {
|
|
15
|
-
return t === 3 ? "v3" : t;
|
|
16
|
-
}, Ce = "https://js.stripe.com", Ye = "".concat(Ce, "/").concat(xe, "/stripe.js"), He = /^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/, Je = /^https:\/\/js\.stripe\.com\/(v3|[a-z]+)\/stripe\.js(\?.*)?$/;
|
|
17
|
-
var Xe = function(t) {
|
|
18
|
-
return He.test(t) || Je.test(t);
|
|
19
|
-
}, Ze = function() {
|
|
20
|
-
for (var t = document.querySelectorAll('script[src^="'.concat(Ce, '"]')), s = 0; s < t.length; s++) {
|
|
21
|
-
var d = t[s];
|
|
22
|
-
if (Xe(d.src))
|
|
23
|
-
return d;
|
|
24
|
-
}
|
|
25
|
-
return null;
|
|
26
|
-
}, he = function(t) {
|
|
27
|
-
var s = "", d = document.createElement("script");
|
|
28
|
-
d.src = "".concat(Ye).concat(s);
|
|
29
|
-
var o = document.head || document.body;
|
|
30
|
-
if (!o)
|
|
31
|
-
throw new Error("Expected document.body not to be null. Stripe.js requires a <body> element.");
|
|
32
|
-
return o.appendChild(d), d;
|
|
33
|
-
}, Qe = function(t, s) {
|
|
34
|
-
!t || !t._registerWrapper || t._registerWrapper({
|
|
35
|
-
name: "stripe-js",
|
|
36
|
-
version: "8.8.0",
|
|
37
|
-
startTime: s
|
|
38
|
-
});
|
|
39
|
-
}, re = null, ie = null, se = null, $e = function(t) {
|
|
40
|
-
return function(s) {
|
|
41
|
-
t(new Error("Failed to load Stripe.js", {
|
|
42
|
-
cause: s
|
|
43
|
-
}));
|
|
44
|
-
};
|
|
45
|
-
}, et = function(t, s) {
|
|
46
|
-
return function() {
|
|
47
|
-
window.Stripe ? t(window.Stripe) : s(new Error("Stripe.js not available"));
|
|
48
|
-
};
|
|
49
|
-
}, tt = function(t) {
|
|
50
|
-
return re !== null ? re : (re = new Promise(function(s, d) {
|
|
51
|
-
if (typeof window > "u" || typeof document > "u") {
|
|
52
|
-
s(null);
|
|
53
|
-
return;
|
|
54
|
-
}
|
|
55
|
-
if (window.Stripe) {
|
|
56
|
-
s(window.Stripe);
|
|
57
|
-
return;
|
|
58
|
-
}
|
|
59
|
-
try {
|
|
60
|
-
var o = Ze();
|
|
61
|
-
if (!(o && t)) {
|
|
62
|
-
if (!o)
|
|
63
|
-
o = he(t);
|
|
64
|
-
else if (o && se !== null && ie !== null) {
|
|
65
|
-
var h;
|
|
66
|
-
o.removeEventListener("load", se), o.removeEventListener("error", ie), (h = o.parentNode) === null || h === void 0 || h.removeChild(o), o = he(t);
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
se = et(s, d), ie = $e(d), o.addEventListener("load", se), o.addEventListener("error", ie);
|
|
70
|
-
} catch (C) {
|
|
71
|
-
d(C);
|
|
72
|
-
return;
|
|
73
|
-
}
|
|
74
|
-
}), re.catch(function(s) {
|
|
75
|
-
return re = null, Promise.reject(s);
|
|
76
|
-
}));
|
|
77
|
-
}, rt = function(t, s, d) {
|
|
78
|
-
if (t === null)
|
|
79
|
-
return null;
|
|
80
|
-
var o = s[0];
|
|
81
|
-
if (typeof o != "string")
|
|
82
|
-
throw new Error("Expected publishable key to be of type string, got type ".concat(oe(o), " instead."));
|
|
83
|
-
var h = o.match(/^pk_test/), C = Ke(t.version), b = xe;
|
|
84
|
-
h && C !== b && console.warn("Stripe.js@".concat(C, " was loaded on the page, but @stripe/stripe-js@").concat("8.8.0", " expected Stripe.js@").concat(b, ". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));
|
|
85
|
-
var S = t.apply(void 0, s);
|
|
86
|
-
return Qe(S, d), S;
|
|
87
|
-
}, ae, Se = !1, Ie = function() {
|
|
88
|
-
return ae || (ae = tt(null).catch(function(t) {
|
|
89
|
-
return ae = null, Promise.reject(t);
|
|
90
|
-
}), ae);
|
|
91
|
-
};
|
|
92
|
-
Promise.resolve().then(function() {
|
|
93
|
-
return Ie();
|
|
94
|
-
}).catch(function(f) {
|
|
95
|
-
Se || console.warn(f);
|
|
96
|
-
});
|
|
97
|
-
var at = function() {
|
|
98
|
-
for (var t = arguments.length, s = new Array(t), d = 0; d < t; d++)
|
|
99
|
-
s[d] = arguments[d];
|
|
100
|
-
Se = !0;
|
|
101
|
-
var o = Date.now();
|
|
102
|
-
return Ie().then(function(h) {
|
|
103
|
-
return rt(h, s, o);
|
|
104
|
-
});
|
|
105
|
-
};
|
|
106
|
-
function Z(f) {
|
|
107
|
-
const t = f?.code || f?.decline_code || "", s = f?.type || "", d = f?.message || "";
|
|
108
|
-
if (t === "card_declined" || s === "card_error") {
|
|
109
|
-
const o = f?.decline_code || "";
|
|
110
|
-
return o === "insufficient_funds" ? {
|
|
111
|
-
type: "card_declined",
|
|
112
|
-
title: "Insufficient funds",
|
|
113
|
-
message: "Your card has insufficient funds to complete this purchase.",
|
|
114
|
-
suggestion: "Please try a different payment method or contact your bank.",
|
|
115
|
-
retryable: !0
|
|
116
|
-
} : o === "lost_card" || o === "stolen_card" ? {
|
|
117
|
-
type: "card_declined",
|
|
118
|
-
title: "Card cannot be used",
|
|
119
|
-
message: "This card cannot be used for this transaction.",
|
|
120
|
-
suggestion: "Please use a different payment method.",
|
|
121
|
-
retryable: !0
|
|
122
|
-
} : o === "expired_card" ? {
|
|
123
|
-
type: "card_declined",
|
|
124
|
-
title: "Card expired",
|
|
125
|
-
message: "Your card has expired.",
|
|
126
|
-
suggestion: "Please use a different card or update your card details.",
|
|
127
|
-
retryable: !0
|
|
128
|
-
} : {
|
|
129
|
-
type: "card_declined",
|
|
130
|
-
title: "Card declined",
|
|
131
|
-
message: "Your card was declined by your bank.",
|
|
132
|
-
suggestion: "Please try a different card or contact your bank for more information.",
|
|
133
|
-
retryable: !0
|
|
134
|
-
};
|
|
135
|
-
}
|
|
136
|
-
return s === "api_connection_error" || d.includes("network") || d.includes("connection") ? {
|
|
137
|
-
type: "network",
|
|
138
|
-
title: "Connection error",
|
|
139
|
-
message: "We couldn't connect to the payment server.",
|
|
140
|
-
suggestion: "Please check your internet connection and try again.",
|
|
141
|
-
retryable: !0
|
|
142
|
-
} : t === "rate_limit" ? {
|
|
143
|
-
type: "rate_limit",
|
|
144
|
-
title: "Too many attempts",
|
|
145
|
-
message: "Too many payment attempts. Please wait a moment.",
|
|
146
|
-
suggestion: "Wait 30 seconds before trying again.",
|
|
147
|
-
retryable: !0
|
|
148
|
-
} : t === "incorrect_number" || t === "invalid_number" ? {
|
|
149
|
-
type: "validation",
|
|
150
|
-
title: "Invalid card number",
|
|
151
|
-
message: "The card number you entered is invalid.",
|
|
152
|
-
suggestion: "Please check your card number and try again.",
|
|
153
|
-
retryable: !0
|
|
154
|
-
} : t === "incorrect_cvc" || t === "invalid_cvc" ? {
|
|
155
|
-
type: "validation",
|
|
156
|
-
title: "Invalid security code",
|
|
157
|
-
message: "The security code (CVC) is incorrect.",
|
|
158
|
-
suggestion: "Please check the 3-digit code on the back of your card.",
|
|
159
|
-
retryable: !0
|
|
160
|
-
} : t === "invalid_expiry_month" || t === "invalid_expiry_year" ? {
|
|
161
|
-
type: "validation",
|
|
162
|
-
title: "Invalid expiration date",
|
|
163
|
-
message: "The expiration date is invalid.",
|
|
164
|
-
suggestion: "Please check your card's expiration date.",
|
|
165
|
-
retryable: !0
|
|
166
|
-
} : {
|
|
167
|
-
type: "general",
|
|
168
|
-
title: "Payment failed",
|
|
169
|
-
message: d || "Something went wrong with your payment.",
|
|
170
|
-
suggestion: "Please try again or use a different payment method.",
|
|
171
|
-
retryable: !0
|
|
172
|
-
};
|
|
173
|
-
}
|
|
174
|
-
const _e = be("GiftCardInput");
|
|
175
|
-
var nt = e.from_html('<span class="gc-spinner gc-spinner-sm svelte-emw0hd"></span>'), it = e.from_html('<div class="full-coverage-badge svelte-emw0hd"><!> <span> </span></div>'), st = e.from_html('<div class="flex justify-between items-center text-sm mt-1.5"><span class="text-text-secondary"> </span> <span class="font-medium text-text-primary"> </span></div>'), ot = e.from_html('<div class="applied-card svelte-emw0hd"><div class="flex items-center gap-3"><div class="applied-icon svelte-emw0hd"><!></div> <div class="flex flex-col flex-1"><span class="text-xs text-status-success-text font-medium"> </span> <span class="text-sm font-mono text-text-primary"> </span></div> <button class="remove-btn svelte-emw0hd"><!></button></div> <div class="applied-details svelte-emw0hd"><div class="flex justify-between items-center text-sm"><span class="text-text-secondary"> </span> <span class="font-medium text-accent-success"> </span></div> <!></div></div>'), lt = e.from_html('<span class="gc-spinner svelte-emw0hd"></span>'), dt = e.from_html('<div class="flex items-center gap-1.5 mt-2 text-sm text-accent-danger"><!> <span> </span></div>'), ct = e.from_html('<div class="input-section svelte-emw0hd"><div class="flex gap-2"><input type="text" name="giftCardCode" autocomplete="off" autocapitalize="characters"/> <button class="apply-btn svelte-emw0hd"><!></button></div> <!></div>'), ut = e.from_html('<button class="gift-card-toggle svelte-emw0hd"><!> <span> </span> <span class="toggle-indicator svelte-emw0hd"> </span></button> <!>', 1), gt = e.from_html('<div class="mb-4"><!></div>');
|
|
176
|
-
function ft(f, t) {
|
|
177
|
-
e.push(t, !0);
|
|
178
|
-
let s = e.prop(t, "onApplied", 3, () => {
|
|
179
|
-
}), d = e.prop(t, "onRemoved", 3, () => {
|
|
180
|
-
}), o = e.prop(t, "disabled", 3, !1), h = e.prop(t, "labels", 19, () => ({})), C = e.state(""), b = e.state(!1), S = e.state(""), T = e.state(null), y = e.state(!1);
|
|
181
|
-
async function U() {
|
|
182
|
-
if (!(!e.get(C).trim() || e.get(b) || !t.cartId)) {
|
|
183
|
-
e.set(b, !0), e.set(S, "");
|
|
184
|
-
try {
|
|
185
|
-
const l = await Ae(t.cartId, e.get(C).trim().toUpperCase());
|
|
186
|
-
l.valid ? (e.set(
|
|
187
|
-
T,
|
|
188
|
-
{
|
|
189
|
-
code: l.giftCardCode || e.get(C).trim().toUpperCase(),
|
|
190
|
-
giftCardAmount: l.giftCardAmount,
|
|
191
|
-
giftCardBalance: l.giftCardBalance,
|
|
192
|
-
paymentType: l.paymentType,
|
|
193
|
-
stripeAmount: l.stripeAmount,
|
|
194
|
-
orderTotal: l.orderTotal,
|
|
195
|
-
requiresStripe: l.requiresStripe
|
|
196
|
-
},
|
|
197
|
-
!0
|
|
198
|
-
), e.set(C, ""), e.set(y, !1), s()(e.get(T))) : e.set(S, l.error || h().invalidGiftCardCode || "Invalid gift card code", !0);
|
|
199
|
-
} catch (l) {
|
|
200
|
-
_e.error("Error applying gift card:", l), e.set(S, h().failedToApplyGiftCard || "Failed to apply gift card. Please try again.", !0);
|
|
201
|
-
}
|
|
202
|
-
e.set(b, !1);
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
async function le() {
|
|
206
|
-
if (!(e.get(b) || !t.cartId)) {
|
|
207
|
-
e.set(b, !0), e.set(S, "");
|
|
208
|
-
try {
|
|
209
|
-
const l = await Ee(t.cartId);
|
|
210
|
-
if (l.error)
|
|
211
|
-
e.set(S, l.error, !0);
|
|
212
|
-
else {
|
|
213
|
-
const F = e.get(T);
|
|
214
|
-
e.set(T, null), e.set(y, !1), d()(F);
|
|
215
|
-
}
|
|
216
|
-
} catch (l) {
|
|
217
|
-
_e.error("Error removing gift card:", l), e.set(S, h().failedToRemoveGiftCard || "Failed to remove gift card. Please try again.", !0);
|
|
218
|
-
}
|
|
219
|
-
e.set(b, !1);
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
function ne(l) {
|
|
223
|
-
l.key === "Enter" && !e.get(b) && U();
|
|
224
|
-
}
|
|
225
|
-
function m() {
|
|
226
|
-
e.get(T) || (e.set(y, !e.get(y)), e.get(y) || (e.set(C, ""), e.set(S, "")));
|
|
227
|
-
}
|
|
228
|
-
var p = gt(), z = e.child(p);
|
|
229
|
-
{
|
|
230
|
-
var Q = (l) => {
|
|
231
|
-
var F = ot(), _ = e.child(F), A = e.child(_), D = e.child(A);
|
|
232
|
-
me(D, { size: 16 }), e.reset(A);
|
|
233
|
-
var N = e.sibling(A, 2), g = e.child(N), Y = e.child(g, !0);
|
|
234
|
-
e.reset(g);
|
|
235
|
-
var V = e.sibling(g, 2), M = e.child(V, !0);
|
|
236
|
-
e.reset(V), e.reset(N);
|
|
237
|
-
var v = e.sibling(N, 2), w = e.child(v);
|
|
238
|
-
{
|
|
239
|
-
var j = (x) => {
|
|
240
|
-
var k = nt();
|
|
241
|
-
e.append(x, k);
|
|
242
|
-
}, O = (x) => {
|
|
243
|
-
Fe(x, { size: 16 });
|
|
244
|
-
};
|
|
245
|
-
e.if(w, (x) => {
|
|
246
|
-
e.get(b) ? x(j) : x(O, -1);
|
|
247
|
-
});
|
|
248
|
-
}
|
|
249
|
-
e.reset(v), e.reset(_);
|
|
250
|
-
var B = e.sibling(_, 2), G = e.child(B), W = e.child(G), H = e.child(W, !0);
|
|
251
|
-
e.reset(W);
|
|
252
|
-
var J = e.sibling(W, 2), $ = e.child(J);
|
|
253
|
-
e.reset(J), e.reset(G);
|
|
254
|
-
var ee = e.sibling(G, 2);
|
|
255
|
-
{
|
|
256
|
-
var I = (x) => {
|
|
257
|
-
var k = it(), L = e.child(k);
|
|
258
|
-
me(L, { size: 16 });
|
|
259
|
-
var K = e.sibling(L, 2), X = e.child(K, !0);
|
|
260
|
-
e.reset(K), e.reset(k), e.template_effect(() => e.set_text(X, h().fullyCoveredByGiftCard || "Fully covered by gift card")), e.append(x, k);
|
|
261
|
-
}, E = (x) => {
|
|
262
|
-
var k = st(), L = e.child(k), K = e.child(L, !0);
|
|
263
|
-
e.reset(L);
|
|
264
|
-
var X = e.sibling(L, 2), de = e.child(X, !0);
|
|
265
|
-
e.reset(X), e.reset(k), e.template_effect(
|
|
266
|
-
(ce) => {
|
|
267
|
-
e.set_text(K, h().remainingToPay || "Remaining to pay"), e.set_text(de, ce);
|
|
268
|
-
},
|
|
269
|
-
[() => pe(e.get(T).stripeAmount)]
|
|
270
|
-
), e.append(x, k);
|
|
271
|
-
};
|
|
272
|
-
e.if(ee, (x) => {
|
|
273
|
-
e.get(T).paymentType === "gift_card_only" ? x(I) : e.get(T).paymentType === "split" && x(E, 1);
|
|
274
|
-
});
|
|
275
|
-
}
|
|
276
|
-
e.reset(B), e.reset(F), e.template_effect(
|
|
277
|
-
(x) => {
|
|
278
|
-
e.set_text(Y, h().giftCardApplied || "Gift card applied"), e.set_text(M, e.get(T).code), v.disabled = e.get(b) || o(), e.set_attribute(v, "aria-label", h().removeGiftCard || "Remove gift card"), e.set_text(H, h().appliedToOrder || "Applied to order"), e.set_text($, `-${x ?? ""}`);
|
|
279
|
-
},
|
|
280
|
-
[() => pe(e.get(T).giftCardAmount)]
|
|
281
|
-
), e.delegated("click", v, le), e.transition(3, F, () => ue, () => ({ duration: ge.fast })), e.append(l, F);
|
|
282
|
-
}, q = (l) => {
|
|
283
|
-
var F = ut(), _ = e.first_child(F), A = e.child(_);
|
|
284
|
-
ke(A, { size: 20, class: "gift-icon" });
|
|
285
|
-
var D = e.sibling(A, 2), N = e.child(D, !0);
|
|
286
|
-
e.reset(D);
|
|
287
|
-
var g = e.sibling(D, 2), Y = e.child(g, !0);
|
|
288
|
-
e.reset(g), e.reset(_);
|
|
289
|
-
var V = e.sibling(_, 2);
|
|
290
|
-
{
|
|
291
|
-
var M = (v) => {
|
|
292
|
-
var w = ct(), j = e.child(w), O = e.child(j);
|
|
293
|
-
e.remove_input_defaults(O);
|
|
294
|
-
let B;
|
|
295
|
-
var G = e.sibling(O, 2), W = e.child(G);
|
|
296
|
-
{
|
|
297
|
-
var H = (I) => {
|
|
298
|
-
var E = lt();
|
|
299
|
-
e.append(I, E);
|
|
300
|
-
}, J = (I) => {
|
|
301
|
-
var E = e.text();
|
|
302
|
-
e.template_effect(() => e.set_text(E, h().apply || "Apply")), e.append(I, E);
|
|
303
|
-
};
|
|
304
|
-
e.if(W, (I) => {
|
|
305
|
-
e.get(b) ? I(H) : I(J, -1);
|
|
306
|
-
});
|
|
307
|
-
}
|
|
308
|
-
e.reset(G), e.reset(j);
|
|
309
|
-
var $ = e.sibling(j, 2);
|
|
310
|
-
{
|
|
311
|
-
var ee = (I) => {
|
|
312
|
-
var E = dt(), x = e.child(E);
|
|
313
|
-
De(x, { size: 16 });
|
|
314
|
-
var k = e.sibling(x, 2), L = e.child(k, !0);
|
|
315
|
-
e.reset(k), e.reset(E), e.template_effect(() => e.set_text(L, e.get(S))), e.transition(3, E, () => ue, () => ({ duration: ge.micro })), e.append(I, E);
|
|
316
|
-
};
|
|
317
|
-
e.if($, (I) => {
|
|
318
|
-
e.get(S) && I(ee);
|
|
319
|
-
});
|
|
320
|
-
}
|
|
321
|
-
e.reset(w), e.template_effect(
|
|
322
|
-
(I) => {
|
|
323
|
-
e.set_attribute(O, "aria-label", h().enterGiftCardCode || "Enter gift card code"), e.set_attribute(O, "placeholder", h().enterGiftCardCode || "Enter gift card code"), O.disabled = e.get(b) || o(), B = e.set_class(O, 1, "gift-input svelte-emw0hd", null, B, { "has-error": !!e.get(S) }), G.disabled = I;
|
|
324
|
-
},
|
|
325
|
-
[() => !e.get(C).trim() || e.get(b) || o()]
|
|
326
|
-
), e.delegated("keydown", O, ne), e.bind_value(O, () => e.get(C), (I) => e.set(C, I)), e.delegated("click", G, U), e.transition(3, w, () => ue, () => ({ duration: ge.fast })), e.append(v, w);
|
|
327
|
-
};
|
|
328
|
-
e.if(V, (v) => {
|
|
329
|
-
e.get(y) && v(M);
|
|
330
|
-
});
|
|
331
|
-
}
|
|
332
|
-
e.template_effect(() => {
|
|
333
|
-
_.disabled = o(), e.set_attribute(_, "aria-expanded", e.get(y)), e.set_text(N, h().haveAGiftCard || "Have a gift card?"), e.set_text(Y, e.get(y) ? "-" : "+");
|
|
334
|
-
}), e.delegated("click", _, m), e.append(l, F);
|
|
335
|
-
};
|
|
336
|
-
e.if(z, (l) => {
|
|
337
|
-
e.get(T) ? l(Q) : l(q, -1);
|
|
338
|
-
});
|
|
339
|
-
}
|
|
340
|
-
e.reset(p), e.append(f, p), e.pop();
|
|
341
|
-
}
|
|
342
|
-
e.delegate(["click", "keydown"]);
|
|
343
|
-
const R = be("Checkout");
|
|
344
|
-
var mt = e.from_html('<div class="max-w-6xl mx-auto px-4 md:px-6 -mt-4 mb-8"><!></div>'), pt = e.from_html("<!> <!>", 1), vt = e.from_html('<div class="p-8 text-center"><p class="text-accent-danger"> </p></div>'), yt = e.from_html('<div class="p-8 text-center"><p class="text-muted-foreground"> </p></div>');
|
|
345
|
-
function ht(f, t) {
|
|
346
|
-
e.push(t, !0);
|
|
347
|
-
let s = e.state(!1), d = e.state(null);
|
|
348
|
-
typeof window < "u" && new URLSearchParams(window.location.search).get("legacy") === "1" && e.set(s, !0), e.user_effect(() => {
|
|
349
|
-
e.get(s) && !e.get(d) && (R.warn("[VC] DEPRECATED: ?legacy=1 fallback for Checkout retires on 2026-08-13. See docs/LEGACY_RETIREMENT.md."), import("./Checkout.legacy-CrFgAYYe.js").then((r) => {
|
|
350
|
-
e.set(d, r.default, !0);
|
|
351
|
-
}).catch(() => {
|
|
352
|
-
e.set(s, !1);
|
|
353
|
-
}));
|
|
354
|
-
});
|
|
355
|
-
let o = e.prop(t, "availableTickets", 23, () => []), h = e.prop(t, "value", 3, ""), C = e.prop(t, "venueId", 3, ""), b = e.prop(t, "organizationId", 3, ""), S = e.prop(t, "onNavigateBack", 3, void 0), T = e.prop(t, "initialError", 3, void 0), y = e.prop(t, "labels", 19, () => ({})), U = e.derived(() => (t.data || {}).id);
|
|
356
|
-
e.derived(() => (t.data || {}).orgSlug);
|
|
357
|
-
let le = e.derived(() => (t.data || {}).slug), ne = e.derived(() => (t.data || {}).event), m = e.derived(() => e.get(ne) ? Ne(e.get(ne)) : t.data && (t.data.id || e.get(U)) ? {
|
|
358
|
-
id: t.data.id || e.get(U),
|
|
359
|
-
eventID: t.data.id || e.get(U),
|
|
360
|
-
venueID: t.data.venueID ?? t.data.venueId ?? null,
|
|
361
|
-
venueId: t.data.venueId ?? t.data.venueID ?? null,
|
|
362
|
-
eventTicketingType: 0,
|
|
363
|
-
ticketType: 0,
|
|
364
|
-
availableTickets: []
|
|
365
|
-
} : null), p = e.state(""), z = e.state(e.proxy({})), Q = e.state(e.proxy({})), q = e.state(e.proxy([])), l = e.state(""), F = e.state(0), _ = e.state(!1), A = e.state(null), D = e.state(""), N = e.state(void 0), g = e.state(""), Y = e.state(!1), V = e.state(""), M = e.state(null), v = e.state(null), w = null;
|
|
366
|
-
Ue(async () => {
|
|
367
|
-
if (e.set(p, Ve(We.CHECKOUT_CARTID), !0), !e.get(p)) {
|
|
368
|
-
e.set(Y, !0), e.set(V, y().noCheckoutSession || "No checkout session found. Please select tickets first.", !0);
|
|
369
|
-
return;
|
|
370
|
-
}
|
|
371
|
-
try {
|
|
372
|
-
const i = Oe(e.get(m)?.eventID || e.get(m)?.id || e.get(U));
|
|
373
|
-
e.set(z, i.quantities || {}, !0), e.set(Q, i.donationAmounts || {}, !0), e.set(l, i.promocode || "", !0), e.set(F, i.promoDiscountAmount || 0, !0), e.set(q, i.tickets || [], !0);
|
|
374
|
-
} catch (i) {
|
|
375
|
-
R.error("Error loading checkout state:", i), e.set(z, {}, !0), e.set(q, [], !0);
|
|
376
|
-
}
|
|
377
|
-
e.get(q).length > 0 && e.get(m) && (e.get(m).availableTickets = e.get(q), o(e.get(q)));
|
|
378
|
-
let r = {
|
|
379
|
-
serviceFeeCents: 0,
|
|
380
|
-
serviceFeePercentage: 0,
|
|
381
|
-
serviceFeeChargeType: "both",
|
|
382
|
-
maxServiceFeeCents: 0,
|
|
383
|
-
taxPercentage: 0
|
|
384
|
-
};
|
|
385
|
-
try {
|
|
386
|
-
const i = (
|
|
387
|
-
/** @type {any} */
|
|
388
|
-
await Re(e.get(m)?.venueID || e.get(m)?.venueId || C())
|
|
389
|
-
);
|
|
390
|
-
r = {
|
|
391
|
-
serviceFeeCents: Number(i?.serviceFeeCents ?? 0),
|
|
392
|
-
serviceFeePercentage: Number(i?.serviceFeePercentage ?? 0),
|
|
393
|
-
serviceFeeChargeType: String(i?.serviceFeeChargeType ?? "both"),
|
|
394
|
-
maxServiceFeeCents: Number(i?.maxServiceFeeCents ?? 0),
|
|
395
|
-
taxPercentage: Number(i?.taxPercentage ?? 0)
|
|
396
|
-
};
|
|
397
|
-
} catch (i) {
|
|
398
|
-
R.error("Error fetching venue data:", i);
|
|
399
|
-
}
|
|
400
|
-
const a = B(e.get(z), e.get(q), r);
|
|
401
|
-
Object.keys(e.get(z)).length > 0 && await j();
|
|
402
|
-
let n = 900;
|
|
403
|
-
if (e.get(p)) {
|
|
404
|
-
const i = typeof localStorage < "u" ? localStorage.getItem(`checkout-expiry-${e.get(
|
|
405
|
-
p
|
|
406
|
-
// @storage-escape: checkout-timer state (intentional raw localStorage)
|
|
407
|
-
)}`) : null;
|
|
408
|
-
if (i) {
|
|
409
|
-
const c = Math.max(0, Math.floor((parseInt(i, 10) - Date.now()) / 1e3));
|
|
410
|
-
c > 0 && (n = c);
|
|
411
|
-
}
|
|
412
|
-
try {
|
|
413
|
-
const c = await ze(e.get(p));
|
|
414
|
-
!c.error && c.expiresAt && (n = Math.max(0, Math.floor((new Date(c.expiresAt).getTime() - Date.now()) / 1e3)), localStorage.setItem(
|
|
415
|
-
// @storage-escape: checkout-timer state (intentional raw localStorage)
|
|
416
|
-
`checkout-expiry-${e.get(p)}`,
|
|
417
|
-
String(new Date(c.expiresAt).getTime())
|
|
418
|
-
));
|
|
419
|
-
} catch {
|
|
420
|
-
}
|
|
421
|
-
}
|
|
422
|
-
if (e.set(
|
|
423
|
-
v,
|
|
424
|
-
{
|
|
425
|
-
event: O(e.get(m), r),
|
|
426
|
-
lines: a,
|
|
427
|
-
timerStart: n,
|
|
428
|
-
promoApplied: !!e.get(l),
|
|
429
|
-
promoDiscount: e.get(F),
|
|
430
|
-
forceExpired: !1,
|
|
431
|
-
...w ? { serverTotals: w } : {}
|
|
432
|
-
},
|
|
433
|
-
!0
|
|
434
|
-
), T()) {
|
|
435
|
-
const i = Z(typeof T() == "object" ? T() : {
|
|
436
|
-
code: "card_declined",
|
|
437
|
-
message: "Your card was declined. Please try a different payment method."
|
|
438
|
-
});
|
|
439
|
-
e.set(g, i.message, !0);
|
|
440
|
-
}
|
|
441
|
-
});
|
|
442
|
-
async function j() {
|
|
443
|
-
if (!e.get(p)) {
|
|
444
|
-
R.error("Missing cartId!");
|
|
445
|
-
return;
|
|
446
|
-
}
|
|
447
|
-
const r = Object.fromEntries(Object.entries(e.get(z)).filter(([a, n]) => n > 0));
|
|
448
|
-
try {
|
|
449
|
-
const a = Object.fromEntries(Object.entries(e.get(Q)).filter(([, u]) => parseFloat(String(u)) > 0).map(([u, P]) => [parseInt(u, 10), parseFloat(String(P))]));
|
|
450
|
-
if (e.get(l)) {
|
|
451
|
-
const u = await je(e.get(p), e.get(l));
|
|
452
|
-
u.success || R.error("Failed to apply promo code to cart:", u.error);
|
|
453
|
-
}
|
|
454
|
-
const n = await Ge(e.get(p), r, Object.keys(a).length > 0 ? a : void 0);
|
|
455
|
-
if (!n) {
|
|
456
|
-
e.set(g, y().failedToCreatePaymentIntent || "Failed to create payment intent. Please try again.", !0);
|
|
457
|
-
return;
|
|
458
|
-
}
|
|
459
|
-
const i = (
|
|
460
|
-
/** @type {any} */
|
|
461
|
-
n
|
|
462
|
-
);
|
|
463
|
-
if (w = {
|
|
464
|
-
subtotal: (i.subtotal ?? 0) / 100,
|
|
465
|
-
fees: (i.service_fee ?? 0) / 100,
|
|
466
|
-
taxes: (i.tax_amount_exclusive ?? 0) / 100,
|
|
467
|
-
total: (i.amount_total ?? 0) / 100,
|
|
468
|
-
promoDiscount: (i.discount ?? 0) / 100,
|
|
469
|
-
giftCardAmount: (i.gift_card_amount ?? 0) / 100,
|
|
470
|
-
stripeAmount: (i.stripe_amount ?? 0) / 100
|
|
471
|
-
}, e.get(v) && e.set(
|
|
472
|
-
v,
|
|
473
|
-
{
|
|
474
|
-
...e.get(v),
|
|
475
|
-
serverTotals: w
|
|
476
|
-
},
|
|
477
|
-
!0
|
|
478
|
-
), i.requires_stripe === !1 || i.payment_type === "free") {
|
|
479
|
-
e.set(D, "free");
|
|
480
|
-
return;
|
|
481
|
-
}
|
|
482
|
-
const c = n.stripe_publishable_key;
|
|
483
|
-
if (!c) {
|
|
484
|
-
R.error("No Stripe publishable key in payment intent response"), e.set(g, y().paymentConfigError || "Payment configuration error. Please try again.", !0);
|
|
485
|
-
return;
|
|
486
|
-
}
|
|
487
|
-
e.set(A, await at(c), !0), n.client_secret ? e.set(D, n.client_secret, !0) : e.set(g, y().failedToInitPayment || "Failed to initialize payment. Please try again.", !0);
|
|
488
|
-
} catch (a) {
|
|
489
|
-
R.error("Failed to initialize Stripe payment:", a), e.set(g, a.message || y().failedToInitPayment || "Failed to initialize payment. Please try again.", !0);
|
|
490
|
-
}
|
|
491
|
-
}
|
|
492
|
-
function O(r, a) {
|
|
493
|
-
return r ? {
|
|
494
|
-
id: r.id || r.eventID,
|
|
495
|
-
title: r.name || r.title || "",
|
|
496
|
-
slug: r.slug || e.get(le) || "",
|
|
497
|
-
description: r.description || "",
|
|
498
|
-
date: r.date || "",
|
|
499
|
-
startDateTime: r.startDateTime || "",
|
|
500
|
-
endDateTime: r.endDateTime || "",
|
|
501
|
-
doorsOpenTime: r.doorsOpenTime || "",
|
|
502
|
-
timezone: r.timeZone || r.timezone || ve(),
|
|
503
|
-
imageUrl: r.imageUrl || r.image || "",
|
|
504
|
-
venue: {
|
|
505
|
-
id: r.venueID || r.venueId || 0,
|
|
506
|
-
name: r.venueName || "",
|
|
507
|
-
address: r.venueAddress || "",
|
|
508
|
-
timezone: r.timeZone || r.timezone || ve(),
|
|
509
|
-
serviceFeePercentage: a.serviceFeePercentage,
|
|
510
|
-
serviceFeeCents: a.serviceFeeCents,
|
|
511
|
-
taxPercentage: a.taxPercentage,
|
|
512
|
-
serviceFeeChargeType: a.serviceFeeChargeType,
|
|
513
|
-
maxServiceFeeCents: a.maxServiceFeeCents
|
|
514
|
-
},
|
|
515
|
-
performers: r.performers || [],
|
|
516
|
-
tickets: (r.availableTickets || []).map((n) => ({
|
|
517
|
-
id: n.ID || n.id,
|
|
518
|
-
name: n.name || "",
|
|
519
|
-
description: n.description || "",
|
|
520
|
-
price: (n.price || 0) / 100,
|
|
521
|
-
fee: 0,
|
|
522
|
-
quantityAvailable: n.quantityAvailable || 0,
|
|
523
|
-
quantityTotal: n.quantityTotal || 0,
|
|
524
|
-
minPerOrder: n.minPerOrder || 1,
|
|
525
|
-
maxPerOrder: n.maxPerOrder || 10,
|
|
526
|
-
status: "on_sale",
|
|
527
|
-
isDonation: n.type === 2,
|
|
528
|
-
isHidden: !1
|
|
529
|
-
})),
|
|
530
|
-
faqs: r.faqs || [],
|
|
531
|
-
status: "on_sale",
|
|
532
|
-
isPasswordProtected: !1,
|
|
533
|
-
isRegistrationEvent: r.eventTicketingType === 1 || r.ticketType === 1,
|
|
534
|
-
totalTicketsRemaining: 100,
|
|
535
|
-
totalTicketsCapacity: 100
|
|
536
|
-
} : null;
|
|
537
|
-
}
|
|
538
|
-
function B(r, a, n) {
|
|
539
|
-
const i = [];
|
|
540
|
-
for (const [c, u] of Object.entries(r)) {
|
|
541
|
-
if (u <= 0) continue;
|
|
542
|
-
const P = a.find((fe) => String(fe.ID) === c || String(fe.id) === c);
|
|
543
|
-
if (!P) continue;
|
|
544
|
-
const te = P.price || 0, Pe = G(te, n);
|
|
545
|
-
i.push({
|
|
546
|
-
ticketId: parseInt(c),
|
|
547
|
-
ticketName: P.name || "",
|
|
548
|
-
quantity: u,
|
|
549
|
-
unitPrice: te,
|
|
550
|
-
fee: Pe,
|
|
551
|
-
subtotal: ye(te * u)
|
|
552
|
-
});
|
|
553
|
-
}
|
|
554
|
-
return i;
|
|
555
|
-
}
|
|
556
|
-
function G(r, a) {
|
|
557
|
-
if (r === 0) return 0;
|
|
558
|
-
const {
|
|
559
|
-
serviceFeePercentage: n = 0,
|
|
560
|
-
serviceFeeCents: i = 0,
|
|
561
|
-
serviceFeeChargeType: c = "both",
|
|
562
|
-
maxServiceFeeCents: u = 0
|
|
563
|
-
} = a;
|
|
564
|
-
let P = 0;
|
|
565
|
-
return (c === "percentage" || c === "both") && (P += r * (n / 100)), (c === "fixed" || c === "flat" || c === "cents" || c === "both") && (P += i / 100), u > 0 && (P = Math.min(P, u / 100)), ye(P);
|
|
566
|
-
}
|
|
567
|
-
let W = e.derived(() => Object.values(e.get(Q)).some((r) => (Number(r) || 0) > 0)), H = e.derived(() => !e.get(W) && (e.get(v) ? e.get(v).lines.every((r) => r.unitPrice === 0) : !0));
|
|
568
|
-
async function J(r) {
|
|
569
|
-
if (!e.get(_)) {
|
|
570
|
-
e.set(_, !0), e.set(g, "");
|
|
571
|
-
try {
|
|
572
|
-
if (e.get(M) && !e.get(M).requiresStripe) {
|
|
573
|
-
await $(r);
|
|
574
|
-
return;
|
|
575
|
-
}
|
|
576
|
-
if (e.get(H)) {
|
|
577
|
-
await ee(r);
|
|
578
|
-
return;
|
|
579
|
-
}
|
|
580
|
-
if (!e.get(N)) {
|
|
581
|
-
e.set(g, y().paymentFormNotReady || "Payment form is not ready. Please wait a moment and try again.", !0), e.set(_, !1);
|
|
582
|
-
return;
|
|
583
|
-
}
|
|
584
|
-
if (!e.get(A)) {
|
|
585
|
-
e.set(g, y().paymentSystemNotInitialized || "Payment system is not initialized. Please refresh the page.", !0), e.set(_, !1);
|
|
586
|
-
return;
|
|
587
|
-
}
|
|
588
|
-
const { error: a } = await e.get(N).submit();
|
|
589
|
-
if (a) {
|
|
590
|
-
const u = Z(a);
|
|
591
|
-
e.set(g, u.message, !0), e.set(_, !1);
|
|
592
|
-
return;
|
|
593
|
-
}
|
|
594
|
-
const n = await e.get(A).confirmPayment({ elements: e.get(N), redirect: "if_required" });
|
|
595
|
-
if (n.error) {
|
|
596
|
-
const u = Z(n.error);
|
|
597
|
-
e.set(g, u.message, !0), e.set(_, !1);
|
|
598
|
-
return;
|
|
599
|
-
}
|
|
600
|
-
const i = {
|
|
601
|
-
id: e.get(p),
|
|
602
|
-
paymentIntentId: n.paymentIntent.id,
|
|
603
|
-
tickets: e.get(z),
|
|
604
|
-
firstName: r.firstName,
|
|
605
|
-
lastName: r.lastName,
|
|
606
|
-
email: r.email,
|
|
607
|
-
paymentMethod: "credit-card",
|
|
608
|
-
mailingList: r.keepMeUpdated,
|
|
609
|
-
saleType: "online"
|
|
610
|
-
}, c = await qe(e.get(p), i);
|
|
611
|
-
if (c?.status === "Payment succeeded") {
|
|
612
|
-
const u = {
|
|
613
|
-
orderId: e.get(p),
|
|
614
|
-
eventId: e.get(m)?.id || e.get(m)?.eventID || null,
|
|
615
|
-
event: e.get(m) || null,
|
|
616
|
-
venueId: C() || e.get(m)?.venueId || null,
|
|
617
|
-
organizationId: b() || e.get(m)?.organizationId || null
|
|
618
|
-
};
|
|
619
|
-
t.onNavigateToSuccess && t.onNavigateToSuccess(u);
|
|
620
|
-
} else c?.status === "Payment amount does not match the total price" ? e.set(g, y().paymentAmountMismatch || "Payment amount mismatch. Please refresh and try again.", !0) : e.set(g, y().paymentValidationFailed || "Payment validation failed. Please try again.", !0);
|
|
621
|
-
} catch (a) {
|
|
622
|
-
R.error("Payment execution error:", a);
|
|
623
|
-
const n = Z(a);
|
|
624
|
-
e.set(g, n.message, !0);
|
|
625
|
-
} finally {
|
|
626
|
-
e.set(_, !1);
|
|
627
|
-
}
|
|
628
|
-
}
|
|
629
|
-
}
|
|
630
|
-
async function $(r) {
|
|
631
|
-
try {
|
|
632
|
-
const a = await Me(e.get(p), {
|
|
633
|
-
firstName: r.firstName,
|
|
634
|
-
lastName: r.lastName,
|
|
635
|
-
email: r.email,
|
|
636
|
-
phoneNumber: null,
|
|
637
|
-
mailingList: r.keepMeUpdated
|
|
638
|
-
});
|
|
639
|
-
if (a?.success) {
|
|
640
|
-
const n = {
|
|
641
|
-
orderId: a.orderId || e.get(p),
|
|
642
|
-
eventId: e.get(m)?.id || e.get(m)?.eventID || null,
|
|
643
|
-
event: e.get(m) || null,
|
|
644
|
-
venueId: C() || e.get(m)?.venueId || null,
|
|
645
|
-
organizationId: b() || e.get(m)?.organizationId || null,
|
|
646
|
-
paymentType: "gift_card_only"
|
|
647
|
-
};
|
|
648
|
-
t.onNavigateToSuccess && t.onNavigateToSuccess(n);
|
|
649
|
-
} else
|
|
650
|
-
e.set(g, a?.error || y().failedToCompleteOrder || "Failed to complete order. Please try again.", !0);
|
|
651
|
-
} catch (a) {
|
|
652
|
-
R.error("Gift card payment error:", a);
|
|
653
|
-
const n = Z(a);
|
|
654
|
-
e.set(g, n.message, !0);
|
|
655
|
-
} finally {
|
|
656
|
-
e.set(_, !1);
|
|
657
|
-
}
|
|
658
|
-
}
|
|
659
|
-
async function ee(r) {
|
|
660
|
-
try {
|
|
661
|
-
if (e.get(D) !== "free" && await j(), e.get(D) !== "free") {
|
|
662
|
-
e.set(g, y().failedToCompleteOrder || "Could not complete the order. Please try again.", !0);
|
|
663
|
-
return;
|
|
664
|
-
}
|
|
665
|
-
const a = {
|
|
666
|
-
orderId: e.get(p),
|
|
667
|
-
eventId: e.get(m)?.id || e.get(m)?.eventID || null,
|
|
668
|
-
event: e.get(m) || null,
|
|
669
|
-
venueId: C() || e.get(m)?.venueId || null,
|
|
670
|
-
organizationId: b() || e.get(m)?.organizationId || null,
|
|
671
|
-
paymentType: "free"
|
|
672
|
-
};
|
|
673
|
-
t.onNavigateToSuccess && t.onNavigateToSuccess(a);
|
|
674
|
-
} catch (a) {
|
|
675
|
-
R.error("Free order completion error:", a);
|
|
676
|
-
const n = Z(a);
|
|
677
|
-
e.set(g, n.message, !0);
|
|
678
|
-
} finally {
|
|
679
|
-
e.set(_, !1);
|
|
680
|
-
}
|
|
681
|
-
}
|
|
682
|
-
function I(r) {
|
|
683
|
-
if (e.set(M, r, !0), e.get(v) && w) {
|
|
684
|
-
const a = r.requiresStripe ? r.stripeAmount ?? 0 : 0;
|
|
685
|
-
e.set(
|
|
686
|
-
v,
|
|
687
|
-
{
|
|
688
|
-
...e.get(v),
|
|
689
|
-
serverTotals: {
|
|
690
|
-
...w,
|
|
691
|
-
giftCardAmount: r.giftCardAmount ?? 0,
|
|
692
|
-
total: a
|
|
693
|
-
}
|
|
694
|
-
},
|
|
695
|
-
!0
|
|
696
|
-
);
|
|
697
|
-
}
|
|
698
|
-
r.requiresStripe ? e.get(p) && Object.keys(e.get(z)).length > 0 && j() : (e.set(N, void 0), e.set(A, null), e.set(D, ""));
|
|
699
|
-
}
|
|
700
|
-
function E() {
|
|
701
|
-
e.set(M, null), e.get(v) && w && e.set(
|
|
702
|
-
v,
|
|
703
|
-
{
|
|
704
|
-
...e.get(v),
|
|
705
|
-
serverTotals: w
|
|
706
|
-
},
|
|
707
|
-
!0
|
|
708
|
-
), e.get(p) && Object.keys(e.get(z)).length > 0 && j();
|
|
709
|
-
}
|
|
710
|
-
function x() {
|
|
711
|
-
S() ? S()() : window.history.back();
|
|
712
|
-
}
|
|
713
|
-
function k() {
|
|
714
|
-
S() ? S()() : window.history.back();
|
|
715
|
-
}
|
|
716
|
-
async function L() {
|
|
717
|
-
if (!e.get(p)) return null;
|
|
718
|
-
try {
|
|
719
|
-
const r = await Le(e.get(p));
|
|
720
|
-
return r.success ? {
|
|
721
|
-
newExpiryTime: r.newExpiryTime,
|
|
722
|
-
remainingExtensions: r.remainingExtensions
|
|
723
|
-
} : (R.error("Failed to extend session:", r.error), null);
|
|
724
|
-
} catch (r) {
|
|
725
|
-
return R.error("Error extending checkout session:", r), null;
|
|
726
|
-
}
|
|
727
|
-
}
|
|
728
|
-
var K = e.comment(), X = e.first_child(K);
|
|
729
|
-
{
|
|
730
|
-
var de = (r) => {
|
|
731
|
-
var a = e.comment(), n = e.first_child(a);
|
|
732
|
-
e.component(n, () => e.get(d), (i, c) => {
|
|
733
|
-
c(i, {
|
|
734
|
-
get data() {
|
|
735
|
-
return t.data;
|
|
736
|
-
},
|
|
737
|
-
get availableTickets() {
|
|
738
|
-
return o();
|
|
739
|
-
},
|
|
740
|
-
get value() {
|
|
741
|
-
return h();
|
|
742
|
-
},
|
|
743
|
-
get venueId() {
|
|
744
|
-
return C();
|
|
745
|
-
},
|
|
746
|
-
get organizationId() {
|
|
747
|
-
return b();
|
|
748
|
-
},
|
|
749
|
-
get onNavigateToSuccess() {
|
|
750
|
-
return t.onNavigateToSuccess;
|
|
751
|
-
},
|
|
752
|
-
get initialError() {
|
|
753
|
-
return T();
|
|
754
|
-
},
|
|
755
|
-
get labels() {
|
|
756
|
-
return y();
|
|
757
|
-
}
|
|
758
|
-
});
|
|
759
|
-
}), e.append(r, a);
|
|
760
|
-
}, ce = (r) => {
|
|
761
|
-
var a = pt(), n = e.first_child(a);
|
|
762
|
-
Be(n, {
|
|
763
|
-
get config() {
|
|
764
|
-
return e.get(v);
|
|
765
|
-
},
|
|
766
|
-
onPlaceOrder: J,
|
|
767
|
-
onBack: x,
|
|
768
|
-
onRetryExpired: k,
|
|
769
|
-
onExtendSession: L,
|
|
770
|
-
get stripe() {
|
|
771
|
-
return e.get(A);
|
|
772
|
-
},
|
|
773
|
-
get paymentIntent() {
|
|
774
|
-
return e.get(D);
|
|
775
|
-
},
|
|
776
|
-
get paymentError() {
|
|
777
|
-
return e.get(g);
|
|
778
|
-
},
|
|
779
|
-
get labels() {
|
|
780
|
-
return y();
|
|
781
|
-
},
|
|
782
|
-
get elements() {
|
|
783
|
-
return e.get(N);
|
|
784
|
-
},
|
|
785
|
-
set elements(u) {
|
|
786
|
-
e.set(N, u, !0);
|
|
787
|
-
}
|
|
788
|
-
});
|
|
789
|
-
var i = e.sibling(n, 2);
|
|
790
|
-
{
|
|
791
|
-
var c = (u) => {
|
|
792
|
-
var P = mt(), te = e.child(P);
|
|
793
|
-
ft(te, {
|
|
794
|
-
get cartId() {
|
|
795
|
-
return e.get(p);
|
|
796
|
-
},
|
|
797
|
-
onApplied: I,
|
|
798
|
-
onRemoved: E,
|
|
799
|
-
get disabled() {
|
|
800
|
-
return e.get(_);
|
|
801
|
-
}
|
|
802
|
-
}), e.reset(P), e.append(u, P);
|
|
803
|
-
};
|
|
804
|
-
e.if(i, (u) => {
|
|
805
|
-
e.get(H) || u(c);
|
|
806
|
-
});
|
|
807
|
-
}
|
|
808
|
-
e.append(r, a);
|
|
809
|
-
}, Te = (r) => {
|
|
810
|
-
var a = vt(), n = e.child(a), i = e.child(n, !0);
|
|
811
|
-
e.reset(n), e.reset(a), e.template_effect(() => e.set_text(i, e.get(V))), e.append(r, a);
|
|
812
|
-
}, we = (r) => {
|
|
813
|
-
var a = yt(), n = e.child(a), i = e.child(n, !0);
|
|
814
|
-
e.reset(n), e.reset(a), e.template_effect(() => e.set_text(i, y().loadingSecurePaymentForm || "Loading secure payment form...")), e.append(r, a);
|
|
815
|
-
};
|
|
816
|
-
e.if(X, (r) => {
|
|
817
|
-
e.get(s) && e.get(d) ? r(de) : e.get(v) ? r(ce, 1) : e.get(Y) ? r(Te, 2) : r(we, -1);
|
|
818
|
-
});
|
|
819
|
-
}
|
|
820
|
-
e.append(f, K), e.pop();
|
|
821
|
-
}
|
|
822
|
-
const St = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
823
|
-
__proto__: null,
|
|
824
|
-
default: ht
|
|
825
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
826
|
-
export {
|
|
827
|
-
St as C,
|
|
828
|
-
ft as G,
|
|
829
|
-
at as l
|
|
830
|
-
};
|
|
831
|
-
//# sourceMappingURL=Checkout-CUwOrErt.js.map
|