@getmicdrop/venue-calendar 4.3.127 → 4.3.129
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/{AddOnCard-VVZpbBUD.js → AddOnCard-DVIyT413.js} +5 -5
- package/dist/{ArrowLeftIcon-Aa8szJd2.js → ArrowLeftIcon-DEgh32lp.js} +1 -1
- package/dist/{BlockPlaceholder-DKO3qMQN.js → BlockPlaceholder-hgRNmGkj.js} +1 -1
- package/dist/{Calendar-Cg5l_9pw.js → Calendar-CO2OMTWv.js} +4 -4
- package/dist/{CalendarFoundryView-CNu_W30L.js → CalendarFoundryView-CWfg6a0c.js} +2874 -2902
- package/dist/{CalendarIcon-CziWNNkR.js → CalendarIcon-BiIhqa3c.js} +1 -1
- package/dist/{CartView-zPuyNVKW.js → CartView-Bs9zBAU_.js} +16 -16
- package/dist/{CheckIcon-CcwbTMNG.js → CheckIcon-BSKGGU_P.js} +1 -1
- package/dist/Checkout-BsHhdptN.js +1082 -0
- package/dist/Checkout-D70Q34Uw.js +1944 -0
- package/dist/{CheckoutTimer-BFA8H-w8.js → CheckoutTimer-D1Xt-i3-.js} +2 -2
- package/dist/{ChevronDownIcon-1yEEieej.js → ChevronDownIcon-BYOUR8W8.js} +1 -1
- package/dist/{CloseIcon-CkOE_Ni1.js → CloseIcon-BhUrqAhx.js} +1 -1
- package/dist/{CollectionView-Cyn-BLBr.js → CollectionView-2VCrkvH6.js} +6 -6
- package/dist/CropImage-D1M-bKxG.js +548 -0
- package/dist/{Event-7yU5yR2k.js → Event-Fu8YUf0U.js} +71 -68
- package/dist/{EventCard-DLl7DOTD.js → EventCard-DRuU3Q_r.js} +1 -1
- package/dist/EventPage-B-M4WKSO.js +1344 -0
- package/dist/{Input-DCQoY3gA.js → Input-RNcqmqlD.js} +1 -1
- package/dist/{LocationIcon-DQEJpYBw.js → LocationIcon-_PcJ1uA2.js} +1 -1
- package/dist/{Modal-kG0LKgMZ.js → Modal-rt9KVfYa.js} +2 -2
- package/dist/{ModalFooter-CM5RDuvB.js → ModalFooter-Cru7v0io.js} +76 -61
- package/dist/{ModalHeader-DBVXezSL.js → ModalHeader-CpgkuttK.js} +1 -1
- package/dist/{PasswordInput-C3n2QNdS.js → PasswordInput-D8MdExEM.js} +1 -1
- package/dist/{RecommendationsRail-CScFl_At.js → RecommendationsRail-CASaEhsf.js} +8 -8
- package/dist/{ScarcityBadge-CSKC_j03.js → ScarcityBadge-DnTalbV0.js} +4 -4
- package/dist/{SeriesPage-DwuakMd9.js → SeriesPage-Dq6VsOyY.js} +2 -2
- package/dist/{Spinner-Bwv1t2qb.js → Spinner-BskKgkwa.js} +1 -1
- package/dist/{Success-D0ebXckE.js → Success-_2EsGGvn.js} +17 -17
- package/dist/{TagIcon-CAvDPJz4.js → TagIcon-BTaz1xN5.js} +1 -1
- package/dist/{ViewTicketsEmbed-CAzgURnh.js → ViewTicketsEmbed-5FmtN5FE.js} +5 -5
- package/dist/{WarningCircleIcon-BlUg0seF.js → WarningCircleIcon-B1KX3p19.js} +1 -1
- package/dist/{WarningTriIcon-UJ3XBDgX.js → WarningTriIcon-C40Ul16E.js} +1 -1
- package/dist/{adapter-CfFKIE_3.js → adapter-BZCYrL13.js} +1 -1
- package/dist/{api-DKPREg-N.js → api-BxKvWBu_.js} +4 -4
- package/dist/{copyToClipboard-CZr5Q5pm.js → copyToClipboard-G1JW70Qn.js} +1 -1
- package/dist/createErrorGate.svelte-hewD6v3X.js +114 -0
- package/dist/{cta-CGxow_mH.js → cta-CcGCIhvk.js} +3 -3
- package/dist/{datetime-D-9opf7E.js → datetime-BSb_4_yZ.js} +1 -1
- package/dist/{de-DbmaTzvj.js → de-8y4zZw4b.js} +1 -0
- package/dist/{defaultLabels-Bs-Aev13.js → defaultLabels-B0ug1Vhr.js} +1 -0
- package/dist/{defaults-lMW0sYGs.js → defaults-BclZlhyX.js} +1 -1
- package/dist/{es-BkaIiy__.js → es-DeS00ow9.js} +1 -0
- package/dist/{event-B9aCkZWH.js → event-B-GHKOCV.js} +1 -1
- package/dist/{event-transform-Ba1CEX8U.js → event-transform-BttnreVZ.js} +18 -18
- package/dist/{fr-lwcVCakh.js → fr-wj3wN-iZ.js} +1 -0
- package/dist/{href-B2VQzARQ.js → href-z8jrNd6b.js} +3 -3
- package/dist/{i18n-CcmYyf6q.js → i18n-Bi0xxbMT.js} +5 -5
- package/dist/i18n-C352Rlkq.js +28 -0
- package/dist/{id-CuwXmxz0.js → id-Bb-uh99i.js} +1 -0
- package/dist/{imageOptimizer-B3fj8_30.js → imageOptimizer-Gew5vPWh.js} +1 -1
- package/dist/{it-BPjJ_YAa.js → it-BtjDiYDd.js} +1 -0
- package/dist/{ja-DlsZs62-.js → ja-BRZa3RPq.js} +1 -0
- package/dist/{ko-CZe2-vDf.js → ko-0W8onUpE.js} +1 -0
- package/dist/locales/4.3.129/main/de.js +1 -0
- package/dist/locales/4.3.129/main/es.js +1 -0
- package/dist/locales/4.3.129/main/fr.js +1 -0
- package/dist/locales/4.3.129/main/id.js +1 -0
- package/dist/locales/4.3.129/main/it.js +1 -0
- package/dist/locales/4.3.129/main/ja.js +1 -0
- package/dist/locales/4.3.129/main/ko.js +1 -0
- package/dist/locales/4.3.129/main/nl.js +1 -0
- package/dist/locales/4.3.129/main/pl.js +1 -0
- package/dist/locales/4.3.129/main/pt-br.js +1 -0
- package/dist/locales/4.3.129/main/tr.js +1 -0
- package/dist/locales/4.3.129/main/zh.js +1 -0
- package/dist/{look-island.svelte-BQkxbtxy.js → look-island.svelte-DErOsA9l.js} +491 -491
- package/dist/looks/{4.3.127 → 4.3.129}/looks.js +1 -1
- package/dist/{navigation-DLQdkYAe.js → navigation-6-Uc3FBI.js} +96 -35
- package/dist/{nl-DfrW5joq.js → nl-BOmYOo99.js} +1 -0
- package/dist/{pixels-Cnqi5LS9.js → pixels-Dxa1FA4t.js} +1 -1
- package/dist/{pl-Dlj27oBg.js → pl-DPWWFKMv.js} +1 -0
- package/dist/{pt-br-PASK8TtQ.js → pt-br-DLGmNm-Y.js} +1 -0
- package/dist/{serverTotals-Dnf5sfs0.js → serverTotals-KkOXYaTu.js} +1 -1
- package/dist/{showcase-state-options-BuP2V_bQ.js → showcase-state-options-DzD18XlL.js} +1 -1
- package/dist/{to-event-card-props-PMXq6eMn.js → to-event-card-props-PMhCTmUc.js} +2 -2
- package/dist/{tr-BSLLeMNP.js → tr-BWV_tdGl.js} +1 -0
- package/dist/{utils-xgVF6KTU.js → utils-kb8Go96U.js} +2 -2
- package/dist/venue-calendar.css +1 -1
- package/dist/venue-calendar.es.js +1969 -1773
- package/dist/venue-calendar.iife.js +35 -35
- package/dist/venue-calendar.umd.js +53 -53
- package/dist/{widget-key-context-DaVnGw3w.js → widget-key-context-B-rITlo1.js} +1 -1
- package/dist/{zh-BlnjAnmE.js → zh-pihqmu9w.js} +1 -0
- package/package.json +1 -1
- package/dist/Checkout-Cpx7Ga2R.js +0 -1079
- package/dist/Checkout-DkiPMGiX.js +0 -1934
- package/dist/CropImage-C8W_Xb_V.js +0 -549
- package/dist/EventPage-0zAx_hw6.js +0 -1225
- package/dist/LiveRegion-D9Me4kBs.js +0 -18
- package/dist/createErrorGate.svelte-BXJit8kE.js +0 -86
- package/dist/i18n-DGMP75RM.js +0 -28
- package/dist/locales/4.3.127/main/de.js +0 -1
- package/dist/locales/4.3.127/main/es.js +0 -1
- package/dist/locales/4.3.127/main/fr.js +0 -1
- package/dist/locales/4.3.127/main/id.js +0 -1
- package/dist/locales/4.3.127/main/it.js +0 -1
- package/dist/locales/4.3.127/main/ja.js +0 -1
- package/dist/locales/4.3.127/main/ko.js +0 -1
- package/dist/locales/4.3.127/main/nl.js +0 -1
- package/dist/locales/4.3.127/main/pl.js +0 -1
- package/dist/locales/4.3.127/main/pt-br.js +0 -1
- package/dist/locales/4.3.127/main/tr.js +0 -1
- package/dist/locales/4.3.127/main/zh.js +0 -1
- /package/dist/locales/{4.3.127 → 4.3.129}/flow/de.js +0 -0
- /package/dist/locales/{4.3.127 → 4.3.129}/flow/es.js +0 -0
- /package/dist/locales/{4.3.127 → 4.3.129}/flow/fr.js +0 -0
- /package/dist/locales/{4.3.127 → 4.3.129}/flow/id.js +0 -0
- /package/dist/locales/{4.3.127 → 4.3.129}/flow/it.js +0 -0
- /package/dist/locales/{4.3.127 → 4.3.129}/flow/ja.js +0 -0
- /package/dist/locales/{4.3.127 → 4.3.129}/flow/ko.js +0 -0
- /package/dist/locales/{4.3.127 → 4.3.129}/flow/nl.js +0 -0
- /package/dist/locales/{4.3.127 → 4.3.129}/flow/pl.js +0 -0
- /package/dist/locales/{4.3.127 → 4.3.129}/flow/pt-br.js +0 -0
- /package/dist/locales/{4.3.127 → 4.3.129}/flow/tr.js +0 -0
- /package/dist/locales/{4.3.127 → 4.3.129}/flow/zh.js +0 -0
- /package/dist/looks/{4.3.127 → 4.3.129}/micdrop-wordmark-BYMG6vLR.svg +0 -0
- /package/dist/looks/{4.3.127 → 4.3.129}/microphone-Ccv4r-kd.webp +0 -0
- /package/dist/looks/{4.3.127 → 4.3.129}/superuser-CZF6a5gO.webp +0 -0
- /package/dist/looks/{4.3.127 → 4.3.129}/treasury-DUE7lZzT.webp +0 -0
- /package/dist/looks/{4.3.127 → 4.3.129}/user-image-yuS4errP.svg +0 -0
|
@@ -1,1079 +0,0 @@
|
|
|
1
|
-
import { g as e, m as t, p as n } from "./sizing-B7ixYndz.js";
|
|
2
|
-
import { n as r, t as i } from "./CloseIcon-CkOE_Ni1.js";
|
|
3
|
-
import { r as a } from "./Input-DCQoY3gA.js";
|
|
4
|
-
import { A as o, T as s, d as c } from "./datetime-D-9opf7E.js";
|
|
5
|
-
import { t as l } from "./CheckIcon-CcwbTMNG.js";
|
|
6
|
-
import { o as u, r as d } from "./ScarcityBadge-CSKC_j03.js";
|
|
7
|
-
import { t as f } from "./TagIcon-CAvDPJz4.js";
|
|
8
|
-
import { t as p } from "./WarningTriIcon-UJ3XBDgX.js";
|
|
9
|
-
import { l as m, y as h } from "./portalContainment-CeAVqIb-.js";
|
|
10
|
-
import { E as g, N as ee, g as _, n as v, t as y } from "./defaultLabels-Bs-Aev13.js";
|
|
11
|
-
import { t as b } from "./Button-VUB2WJ88.js";
|
|
12
|
-
import { a as x, c as S, h as C, i as w, n as te, o as T, r as E, u as D } from "./widget-key-context-DaVnGw3w.js";
|
|
13
|
-
import { n as ne, t as re } from "./serverTotals-Dnf5sfs0.js";
|
|
14
|
-
import { S as ie, c as ae, l as oe, o as se, s as ce } from "./api-DKPREg-N.js";
|
|
15
|
-
import { a as O, i as k, n as A, r as j, t as M } from "./ModalFooter-CM5RDuvB.js";
|
|
16
|
-
import { c as N } from "./navigation-DLQdkYAe.js";
|
|
17
|
-
import { n as le } from "./event-transform-Ba1CEX8U.js";
|
|
18
|
-
import { t as ue } from "./venue-BBoZBuhu.js";
|
|
19
|
-
import { c as de, p as fe, s as pe, t as me, u as he } from "./checkoutState-DKdzYK3y.js";
|
|
20
|
-
import { r as ge } from "./utils-xgVF6KTU.js";
|
|
21
|
-
import { a as _e } from "./AddOnCard-VVZpbBUD.js";
|
|
22
|
-
import ve, { n as ye, t as be } from "./Checkout-DkiPMGiX.js";
|
|
23
|
-
import { n as xe } from "./buyerEmail-BfCq-gDt.js";
|
|
24
|
-
import "svelte/internal/disclose-version";
|
|
25
|
-
import * as P from "svelte/internal/client";
|
|
26
|
-
import { onMount as Se } from "svelte";
|
|
27
|
-
//#region node_modules/@stripe/stripe-js/dist/index.mjs
|
|
28
|
-
function F(e) {
|
|
29
|
-
"@babel/helpers - typeof";
|
|
30
|
-
return F = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
31
|
-
return typeof e;
|
|
32
|
-
} : function(e) {
|
|
33
|
-
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
34
|
-
}, F(e);
|
|
35
|
-
}
|
|
36
|
-
var I = "dahlia", Ce = function(e) {
|
|
37
|
-
return e === 3 ? "v3" : e;
|
|
38
|
-
}, L = "https://js.stripe.com", we = `${L}/${I}/stripe.js`, R = /^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/, z = /^https:\/\/js\.stripe\.com\/(v3|[a-z]+)\/stripe\.js(\?.*)?$/, B = "loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used", Te = function(e) {
|
|
39
|
-
return R.test(e) || z.test(e);
|
|
40
|
-
}, Ee = function() {
|
|
41
|
-
for (var e = document.querySelectorAll(`script[src^="${L}"]`), t = 0; t < e.length; t++) {
|
|
42
|
-
var n = e[t];
|
|
43
|
-
if (Te(n.src)) return n;
|
|
44
|
-
}
|
|
45
|
-
return null;
|
|
46
|
-
}, V = function(e) {
|
|
47
|
-
var t = e && !e.advancedFraudSignals ? "?advancedFraudSignals=false" : "", n = document.createElement("script");
|
|
48
|
-
n.src = `${we}${t}`;
|
|
49
|
-
var r = document.head || document.body;
|
|
50
|
-
if (!r) throw Error("Expected document.body not to be null. Stripe.js requires a <body> element.");
|
|
51
|
-
return r.appendChild(n), n;
|
|
52
|
-
}, H = function(e, t) {
|
|
53
|
-
!e || !e._registerWrapper || e._registerWrapper({
|
|
54
|
-
name: "stripe-js",
|
|
55
|
-
version: "9.13.0",
|
|
56
|
-
startTime: t
|
|
57
|
-
});
|
|
58
|
-
}, U = null, W = null, G = null, De = function(e) {
|
|
59
|
-
return function(t) {
|
|
60
|
-
e(Error("Failed to load Stripe.js", { cause: t }));
|
|
61
|
-
};
|
|
62
|
-
}, Oe = function(e, t) {
|
|
63
|
-
return function() {
|
|
64
|
-
window.Stripe ? e(window.Stripe) : t(/* @__PURE__ */ Error("Stripe.js not available"));
|
|
65
|
-
};
|
|
66
|
-
}, K = function(e) {
|
|
67
|
-
return U === null ? (U = new Promise(function(t, n) {
|
|
68
|
-
if (typeof window > "u" || typeof document > "u") {
|
|
69
|
-
t(null);
|
|
70
|
-
return;
|
|
71
|
-
}
|
|
72
|
-
if (window.Stripe && e && console.warn(B), window.Stripe) {
|
|
73
|
-
t(window.Stripe);
|
|
74
|
-
return;
|
|
75
|
-
}
|
|
76
|
-
try {
|
|
77
|
-
var r = Ee();
|
|
78
|
-
if (r && e) console.warn(B);
|
|
79
|
-
else if (!r) r = V(e);
|
|
80
|
-
else if (r && G !== null && W !== null) {
|
|
81
|
-
var i;
|
|
82
|
-
r.removeEventListener("load", G), r.removeEventListener("error", W), (i = r.parentNode) == null || i.removeChild(r), r = V(e);
|
|
83
|
-
}
|
|
84
|
-
G = Oe(t, n), W = De(n), r.addEventListener("load", G), r.addEventListener("error", W);
|
|
85
|
-
} catch (e) {
|
|
86
|
-
n(e);
|
|
87
|
-
return;
|
|
88
|
-
}
|
|
89
|
-
}), U.catch(function(e) {
|
|
90
|
-
return U = null, Promise.reject(e);
|
|
91
|
-
})) : U;
|
|
92
|
-
}, ke = function(e, t, n) {
|
|
93
|
-
if (e === null) return null;
|
|
94
|
-
var r = t[0];
|
|
95
|
-
if (typeof r != "string") throw Error(`Expected publishable key to be of type string, got type ${F(r)} instead.`);
|
|
96
|
-
var i = r.match(/^pk_test/), a = Ce(e.version), o = I;
|
|
97
|
-
i && a !== o && console.warn(`Stripe.js@${a} was loaded on the page, but @stripe/stripe-js@9.13.0 expected Stripe.js@${o}. This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning`);
|
|
98
|
-
var s = e.apply(void 0, t);
|
|
99
|
-
return H(s, n), s;
|
|
100
|
-
}, q, J = !1, Y = function() {
|
|
101
|
-
return q || (q = K(null).catch(function(e) {
|
|
102
|
-
return q = null, Promise.reject(e);
|
|
103
|
-
}), q);
|
|
104
|
-
};
|
|
105
|
-
Promise.resolve().then(function() {
|
|
106
|
-
return Y();
|
|
107
|
-
}).catch(function(e) {
|
|
108
|
-
J || console.warn(e);
|
|
109
|
-
});
|
|
110
|
-
var Ae = function() {
|
|
111
|
-
var e = [...arguments];
|
|
112
|
-
J = !0;
|
|
113
|
-
var t = Date.now();
|
|
114
|
-
return Y().then(function(n) {
|
|
115
|
-
return ke(n, e, t);
|
|
116
|
-
});
|
|
117
|
-
};
|
|
118
|
-
//#endregion
|
|
119
|
-
//#region src/lib/utils/stripe-errors.ts
|
|
120
|
-
function X(e, t = y) {
|
|
121
|
-
let n = e?.code || e?.decline_code || "", r = e?.type || "", i = e?.message || "";
|
|
122
|
-
if (n === "card_declined" || r === "card_error") {
|
|
123
|
-
let n = e?.decline_code || "";
|
|
124
|
-
return n === "insufficient_funds" ? {
|
|
125
|
-
type: "card_declined",
|
|
126
|
-
title: t.cardInsufficientFundsTitle || "Insufficient funds",
|
|
127
|
-
message: t.cardInsufficientFundsMessage || "Your card has insufficient funds to complete this purchase",
|
|
128
|
-
suggestion: t.cardInsufficientFundsSuggestion || "Please try a different payment method or contact your bank",
|
|
129
|
-
retryable: !0
|
|
130
|
-
} : n === "lost_card" || n === "stolen_card" ? {
|
|
131
|
-
type: "card_declined",
|
|
132
|
-
title: t.cardUnusableTitle || "Card cannot be used",
|
|
133
|
-
message: t.cardUnusableMessage || "This card cannot be used for this transaction",
|
|
134
|
-
suggestion: t.cardUnusableSuggestion || "Please use a different payment method",
|
|
135
|
-
retryable: !0
|
|
136
|
-
} : n === "expired_card" ? {
|
|
137
|
-
type: "card_declined",
|
|
138
|
-
title: t.cardExpiredTitle || "Card expired",
|
|
139
|
-
message: t.cardExpiredMessage || "Your card has expired",
|
|
140
|
-
suggestion: t.cardExpiredSuggestion || "Please use a different card or update your card details",
|
|
141
|
-
retryable: !0
|
|
142
|
-
} : n === "do_not_honor" ? {
|
|
143
|
-
type: "card_declined",
|
|
144
|
-
title: t.cardDeclinedTitle || "Card declined",
|
|
145
|
-
message: t.cardDoNotHonorMessage || "Your bank declined this card",
|
|
146
|
-
suggestion: t.cardDoNotHonorSuggestion || "Try another card or call your bank",
|
|
147
|
-
retryable: !0
|
|
148
|
-
} : {
|
|
149
|
-
type: "card_declined",
|
|
150
|
-
title: t.cardDeclinedTitle || "Card declined",
|
|
151
|
-
message: t.cardDeclinedMessage || "Your card was declined by your bank",
|
|
152
|
-
suggestion: t.cardDeclinedSuggestion || "Please try a different card or contact your bank for more information",
|
|
153
|
-
retryable: !0
|
|
154
|
-
};
|
|
155
|
-
}
|
|
156
|
-
return r === "api_connection_error" || i.includes("network") || i.includes("connection") ? {
|
|
157
|
-
type: "network",
|
|
158
|
-
title: t.connectionError || "Connection error",
|
|
159
|
-
message: t.paymentConnectionErrorMessage || "We couldn't connect to the payment server",
|
|
160
|
-
suggestion: t.paymentConnectionErrorSuggestion || "Please check your internet connection and try again",
|
|
161
|
-
retryable: !0
|
|
162
|
-
} : n === "rate_limit" ? {
|
|
163
|
-
type: "rate_limit",
|
|
164
|
-
title: t.tooManyAttemptsTitle || "Too many attempts",
|
|
165
|
-
message: t.tooManyAttemptsMessage || "Too many payment attempts. Please wait a moment",
|
|
166
|
-
suggestion: t.tooManyAttemptsSuggestion || "Wait 30 seconds before trying again",
|
|
167
|
-
retryable: !0
|
|
168
|
-
} : n === "incorrect_number" || n === "invalid_number" ? {
|
|
169
|
-
type: "validation",
|
|
170
|
-
title: t.invalidCardNumberTitle || "Invalid card number",
|
|
171
|
-
message: t.invalidCardNumberMessage || "The card number you entered is invalid",
|
|
172
|
-
suggestion: t.invalidCardNumberSuggestion || "Please check your card number and try again",
|
|
173
|
-
retryable: !0
|
|
174
|
-
} : n === "incorrect_cvc" || n === "invalid_cvc" ? {
|
|
175
|
-
type: "validation",
|
|
176
|
-
title: t.invalidCvcTitle || "Invalid security code",
|
|
177
|
-
message: t.invalidCvcMessage || "The security code (CVC) is incorrect",
|
|
178
|
-
suggestion: t.invalidCvcSuggestion || "Please check the 3-digit code on the back of your card",
|
|
179
|
-
retryable: !0
|
|
180
|
-
} : n === "invalid_expiry_month" || n === "invalid_expiry_year" ? {
|
|
181
|
-
type: "validation",
|
|
182
|
-
title: t.invalidExpiryTitle || "Invalid expiration date",
|
|
183
|
-
message: t.invalidExpiryMessage || "The expiration date is invalid",
|
|
184
|
-
suggestion: t.invalidExpirySuggestion || "Please check your card's expiration date",
|
|
185
|
-
retryable: !0
|
|
186
|
-
} : {
|
|
187
|
-
type: "general",
|
|
188
|
-
title: t.paymentFailedTitle || "Payment failed",
|
|
189
|
-
message: i || t.paymentFailedMessage || "Something went wrong with your payment",
|
|
190
|
-
suggestion: t.paymentFailedSuggestion || "Please try again or use a different payment method",
|
|
191
|
-
retryable: !0
|
|
192
|
-
};
|
|
193
|
-
}
|
|
194
|
-
//#endregion
|
|
195
|
-
//#region src/components/Events/Checkout/GiftCardInput.svelte
|
|
196
|
-
var Z = e("GiftCardInput"), je = P.from_html("<div class=\"applied-card mb-2 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=\"type-caption text-status-success-text\"> </span> <span class=\"type-body font-mono text-text-primary\"> </span></div> <span class=\"type-label text-accent-success\"> </span> <!></div></div>"), Q = P.from_html("<div class=\"applied-card mb-3 svelte-emw0hd\"><div><!> <span> </span></div></div>"), Me = P.from_html("<div class=\"flex items-center gap-1.5 mt-2 type-body text-accent-danger\"><!> <span> </span></div>"), Ne = P.from_html("<div class=\"input-section svelte-emw0hd\"><div class=\"flex gap-2\"><input type=\"text\" name=\"giftCardCode\" autocomplete=\"off\" autocapitalize=\"characters\"/> <!></div> <!></div>"), Pe = P.from_html("<div class=\"mb-4\"><!> <!> <button type=\"button\"><!> <span> </span> <span class=\"toggle-indicator svelte-emw0hd\"> </span></button> <!></div>");
|
|
197
|
-
function Fe(e, r) {
|
|
198
|
-
P.push(r, !0);
|
|
199
|
-
let a = te(), o = P.prop(r, "onApplied", 3, () => {}), c = P.prop(r, "onRemoved", 3, () => {}), u = P.prop(r, "disabled", 3, !1), d = P.prop(r, "labels", 3, y), g = P.prop(r, "owedTotal", 3, 0), ee = P.prop(r, "serverGiftCardAmount", 3, null), _ = P.state(""), v = P.state(!1), S = P.state(""), C = P.state(P.proxy([])), w = P.state(!1), T = P.state(0);
|
|
200
|
-
P.user_effect(() => {
|
|
201
|
-
if (!r.cartId || P.get(C).length > 0 || ee() === 0) return;
|
|
202
|
-
let e = !1;
|
|
203
|
-
return x(r.cartId, void 0, { widgetKey: a }).then((t) => {
|
|
204
|
-
if (e || !t?.giftCards?.length) return;
|
|
205
|
-
let n = t.giftCards.filter((e) => typeof e.amount == "number");
|
|
206
|
-
n.length !== t.giftCards.length && Z.error("Ignored applied gift card(s) with an unusable amount while restoring the panel"), n.length !== 0 && (P.set(C, n.map((e) => ({
|
|
207
|
-
giftCardId: e.giftCardId,
|
|
208
|
-
code: e.maskedCode,
|
|
209
|
-
giftCardAmount: e.amount
|
|
210
|
-
})), !0), P.set(T, P.get(C).reduce((e, t) => e + (t.giftCardAmount || 0), 0) + (g() || 0)));
|
|
211
|
-
}).catch((e) => Z.error("Could not restore applied gift cards:", e)), () => {
|
|
212
|
-
e = !0;
|
|
213
|
-
};
|
|
214
|
-
});
|
|
215
|
-
let E = P.derived(() => P.get(C).reduce((e, t) => e + (t.giftCardAmount || 0), 0)), D = P.derived(() => Math.max(0, P.get(T) - P.get(E))), ne = P.derived(() => P.get(C).length > 0 && P.get(D) <= 0);
|
|
216
|
-
function re() {
|
|
217
|
-
if (P.get(C).length === 0) {
|
|
218
|
-
c()();
|
|
219
|
-
return;
|
|
220
|
-
}
|
|
221
|
-
o()({
|
|
222
|
-
code: P.get(C).map((e) => e.code).join(", "),
|
|
223
|
-
giftCardAmount: P.get(E),
|
|
224
|
-
stripeAmount: P.get(D),
|
|
225
|
-
requiresStripe: P.get(D) > 0,
|
|
226
|
-
paymentType: P.get(D) > 0 ? "split" : "gift_card_only",
|
|
227
|
-
orderTotal: P.get(T)
|
|
228
|
-
});
|
|
229
|
-
}
|
|
230
|
-
async function ie() {
|
|
231
|
-
let e = P.get(_).trim().toUpperCase();
|
|
232
|
-
if (!(!e || P.get(v) || !r.cartId)) {
|
|
233
|
-
if (P.get(C).some((t) => t.code === e)) {
|
|
234
|
-
P.set(S, d().giftCardAlreadyApplied || "That gift card is already applied", !0);
|
|
235
|
-
return;
|
|
236
|
-
}
|
|
237
|
-
P.set(v, !0), P.set(S, "");
|
|
238
|
-
try {
|
|
239
|
-
let t = await ce(r.cartId, e, { widgetKey: a });
|
|
240
|
-
t.valid ? (P.set(C, [...P.get(C), {
|
|
241
|
-
code: t.giftCardCode || e,
|
|
242
|
-
giftCardAmount: t.giftCardAmount || 0
|
|
243
|
-
}], !0), P.set(T, P.get(E) + (t.stripeAmount || 0)), P.set(_, ""), P.set(w, !1), re()) : P.set(S, t.error || d().invalidGiftCardCode || "Invalid gift card code", !0);
|
|
244
|
-
} catch (e) {
|
|
245
|
-
Z.error("Error applying gift card:", e);
|
|
246
|
-
let t = e && typeof e == "object" && typeof e.message == "string" ? e.message : "";
|
|
247
|
-
P.set(S, t || d().failedToApplyGiftCard || "Failed to apply gift card. Please try again", !0);
|
|
248
|
-
}
|
|
249
|
-
P.set(v, !1);
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
async function ae(e) {
|
|
253
|
-
if (!(P.get(v) || !r.cartId)) {
|
|
254
|
-
P.set(v, !0), P.set(S, "");
|
|
255
|
-
try {
|
|
256
|
-
let t = P.get(C).find((t) => t.code === e), n = await oe(r.cartId, t?.giftCardId ? { giftCardId: t.giftCardId } : { code: e }, { widgetKey: a });
|
|
257
|
-
n.success !== !1 && !n.error ? (P.set(C, P.get(C).filter((t) => t.code !== e), !0), typeof n.remainingTotal == "number" && P.set(T, P.get(E) + n.remainingTotal), re()) : P.set(S, n.error || d().failedToRemoveGiftCard || "Failed to remove gift card. Please try again", !0);
|
|
258
|
-
} catch (e) {
|
|
259
|
-
Z.error("Error removing gift card:", e), P.set(S, d().failedToRemoveGiftCard || "Failed to remove gift card. Please try again", !0);
|
|
260
|
-
}
|
|
261
|
-
P.set(v, !1);
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
function se(e) {
|
|
265
|
-
e.key === "Enter" && !P.get(v) && ie();
|
|
266
|
-
}
|
|
267
|
-
function O() {
|
|
268
|
-
P.set(w, !P.get(w)), P.get(w) || (P.set(_, ""), P.set(S, ""));
|
|
269
|
-
}
|
|
270
|
-
var k = Pe(), A = P.child(k);
|
|
271
|
-
P.each(A, 17, () => P.get(C), (e) => e.code, (e, t) => {
|
|
272
|
-
var n = je(), r = P.child(n), a = P.child(r), o = P.child(a);
|
|
273
|
-
l(o, { size: "16" }), P.reset(a);
|
|
274
|
-
var c = P.sibling(a, 2), f = P.child(c), p = P.child(f, !0);
|
|
275
|
-
P.reset(f);
|
|
276
|
-
var g = P.sibling(f, 2), ee = P.child(g, !0);
|
|
277
|
-
P.reset(g), P.reset(c);
|
|
278
|
-
var _ = P.sibling(c, 2), y = P.child(_);
|
|
279
|
-
P.reset(_);
|
|
280
|
-
var x = P.sibling(_, 2);
|
|
281
|
-
{
|
|
282
|
-
let e = P.derived(() => d().removeGiftCard || "Remove gift card");
|
|
283
|
-
b(x, {
|
|
284
|
-
variant: "icon",
|
|
285
|
-
size: "icon-sm",
|
|
286
|
-
class: "rounded-full hover:bg-status-error-bg hover:text-accent-danger",
|
|
287
|
-
onclick: () => ae(P.get(t).code),
|
|
288
|
-
get loading() {
|
|
289
|
-
return P.get(v);
|
|
290
|
-
},
|
|
291
|
-
get disabled() {
|
|
292
|
-
return u();
|
|
293
|
-
},
|
|
294
|
-
get "aria-label"() {
|
|
295
|
-
return P.get(e);
|
|
296
|
-
},
|
|
297
|
-
children: (e, t) => {
|
|
298
|
-
i(e, { size: "16" });
|
|
299
|
-
},
|
|
300
|
-
$$slots: { default: !0 }
|
|
301
|
-
});
|
|
302
|
-
}
|
|
303
|
-
P.reset(r), P.reset(n), P.template_effect((e) => {
|
|
304
|
-
P.set_text(p, d().giftCardApplied || "Gift card applied"), P.set_text(ee, P.get(t).code), P.set_text(y, `-${e ?? ""}`);
|
|
305
|
-
}, [() => s(P.get(t).giftCardAmount)]), P.transition(3, n, () => h, () => ({ duration: m.fast })), P.append(e, n);
|
|
306
|
-
});
|
|
307
|
-
var j = P.sibling(A, 2), M = (e) => {
|
|
308
|
-
var r = Q(), i = P.child(r), a = P.child(i);
|
|
309
|
-
l(a, { size: "16" });
|
|
310
|
-
var o = P.sibling(a, 2), s = P.child(o, !0);
|
|
311
|
-
P.reset(o), P.reset(i), P.reset(r), P.template_effect(() => {
|
|
312
|
-
P.set_class(i, 1, `full-coverage-badge ${t.caption ?? ""} ${n.emphasis ?? ""}`, "svelte-emw0hd"), P.set_text(s, d().fullyCoveredByGiftCard || "Fully covered by gift card");
|
|
313
|
-
}), P.append(e, r);
|
|
314
|
-
};
|
|
315
|
-
P.if(j, (e) => {
|
|
316
|
-
P.get(ne) && e(M);
|
|
317
|
-
});
|
|
318
|
-
var N = P.sibling(j, 2), le = P.child(N);
|
|
319
|
-
f(le, {
|
|
320
|
-
size: "20",
|
|
321
|
-
class: "gift-icon"
|
|
322
|
-
});
|
|
323
|
-
var ue = P.sibling(le, 2), de = P.child(ue, !0);
|
|
324
|
-
P.reset(ue);
|
|
325
|
-
var fe = P.sibling(ue, 2), pe = P.child(fe, !0);
|
|
326
|
-
P.reset(fe), P.reset(N);
|
|
327
|
-
var me = P.sibling(N, 2), he = (e) => {
|
|
328
|
-
var n = Ne(), r = P.child(n), i = P.child(r);
|
|
329
|
-
P.remove_input_defaults(i);
|
|
330
|
-
let a;
|
|
331
|
-
var o = P.sibling(i, 2);
|
|
332
|
-
{
|
|
333
|
-
let e = P.derived(() => !P.get(_).trim() || u());
|
|
334
|
-
b(o, {
|
|
335
|
-
variant: "default",
|
|
336
|
-
size: "sm",
|
|
337
|
-
class: "min-w-16 shrink-0",
|
|
338
|
-
onclick: ie,
|
|
339
|
-
get loading() {
|
|
340
|
-
return P.get(v);
|
|
341
|
-
},
|
|
342
|
-
get disabled() {
|
|
343
|
-
return P.get(e);
|
|
344
|
-
},
|
|
345
|
-
children: (e, t) => {
|
|
346
|
-
P.next();
|
|
347
|
-
var n = P.text();
|
|
348
|
-
P.template_effect(() => P.set_text(n, d().apply || "Apply")), P.append(e, n);
|
|
349
|
-
},
|
|
350
|
-
$$slots: { default: !0 }
|
|
351
|
-
});
|
|
352
|
-
}
|
|
353
|
-
P.reset(r);
|
|
354
|
-
var s = P.sibling(r, 2), c = (e) => {
|
|
355
|
-
var t = Me(), n = P.child(t);
|
|
356
|
-
p(n, { size: "16" });
|
|
357
|
-
var r = P.sibling(n, 2), i = P.child(r, !0);
|
|
358
|
-
P.reset(r), P.reset(t), P.template_effect(() => P.set_text(i, P.get(S))), P.transition(3, t, () => h, () => ({ duration: m.micro })), P.append(e, t);
|
|
359
|
-
};
|
|
360
|
-
P.if(s, (e) => {
|
|
361
|
-
P.get(S) && e(c);
|
|
362
|
-
}), P.reset(n), P.template_effect(() => {
|
|
363
|
-
P.set_attribute(i, "aria-label", d().enterGiftCardCode || "Enter gift card code"), P.set_attribute(i, "placeholder", d().enterGiftCardCode || "Enter gift card code"), i.disabled = P.get(v) || u(), a = P.set_class(i, 1, `gift-input ${t.body ?? ""}`, "svelte-emw0hd", a, { "has-error": !!P.get(S) });
|
|
364
|
-
}), P.delegated("keydown", i, se), P.bind_value(i, () => P.get(_), (e) => P.set(_, e)), P.transition(3, n, () => h, () => ({ duration: m.fast })), P.append(e, n);
|
|
365
|
-
};
|
|
366
|
-
P.if(me, (e) => {
|
|
367
|
-
P.get(w) && e(he);
|
|
368
|
-
}), P.reset(k), P.template_effect(() => {
|
|
369
|
-
P.set_class(N, 1, `gift-card-toggle ${t.label ?? ""}`, "svelte-emw0hd"), N.disabled = u(), P.set_attribute(N, "aria-expanded", P.get(w)), P.set_text(de, P.get(C).length > 0 ? d().addAnotherGiftCard || "Add another gift card" : d().haveAGiftCard || "Have a gift card?"), P.set_text(pe, P.get(w) ? "-" : "+");
|
|
370
|
-
}), P.delegated("click", N, O), P.append(e, k), P.pop();
|
|
371
|
-
}
|
|
372
|
-
P.delegate(["click", "keydown"]);
|
|
373
|
-
//#endregion
|
|
374
|
-
//#region src/components/Modals/EventUnavailableModal.svelte
|
|
375
|
-
var Ie = P.from_html("<div class=\"flex flex-col items-center text-center pt-6 px-4 pb-4\"><div aria-hidden=\"true\"><!></div> <h3 id=\"event-unavailable-title\"> </h3> <p id=\"event-unavailable-body\" class=\"type-body tone-secondary max-w-72\"> </p></div>"), Le = P.from_html("<!> <!>", 1);
|
|
376
|
-
function Re(e, n) {
|
|
377
|
-
P.push(n, !0);
|
|
378
|
-
let i = P.prop(n, "open", 15, !1), o = P.prop(n, "onBackToEvents", 3, () => {}), s = P.prop(n, "labels", 3, y), c = P.derived(() => n.reason === "canceled"), l = P.derived(() => P.get(c) ? s().eventCanceledTitle || "Event canceled" : s().eventPostponedTitle || "Event postponed"), u = P.derived(() => P.get(c) ? s().eventCanceledBody || "This event was canceled — you weren't charged" : s().eventPostponedBody || "Sales are paused while this show is rescheduled — you weren't charged"), d = P.derived(() => s().backToEvents || "Back to events");
|
|
379
|
-
O(e, {
|
|
380
|
-
size: "sm",
|
|
381
|
-
role: "alertdialog",
|
|
382
|
-
class: "micdrop",
|
|
383
|
-
get open() {
|
|
384
|
-
return i();
|
|
385
|
-
},
|
|
386
|
-
set open(e) {
|
|
387
|
-
i(e);
|
|
388
|
-
},
|
|
389
|
-
children: (e, n) => {
|
|
390
|
-
var i = Le(), s = P.first_child(i);
|
|
391
|
-
k(s, {});
|
|
392
|
-
var f = P.sibling(s, 2);
|
|
393
|
-
j(f, {
|
|
394
|
-
children: (e, n) => {
|
|
395
|
-
var i = Le(), s = P.first_child(i);
|
|
396
|
-
A(s, {
|
|
397
|
-
children: (e, n) => {
|
|
398
|
-
var i = Ie(), o = P.child(i), s = P.child(o), d = (e) => {
|
|
399
|
-
a(e, { size: "32" });
|
|
400
|
-
}, f = (e) => {
|
|
401
|
-
r(e, { size: "32" });
|
|
402
|
-
};
|
|
403
|
-
P.if(s, (e) => {
|
|
404
|
-
P.get(c) ? e(d) : e(f, -1);
|
|
405
|
-
}), P.reset(o);
|
|
406
|
-
var p = P.sibling(o, 2), m = P.child(p, !0);
|
|
407
|
-
P.reset(p);
|
|
408
|
-
var h = P.sibling(p, 2), g = P.child(h, !0);
|
|
409
|
-
P.reset(h), P.reset(i), P.template_effect(() => {
|
|
410
|
-
P.set_class(o, 1, `w-16 h-16 rounded-full flex items-center justify-center mb-4 ${P.get(c) ? "bg-accent-danger/10 text-accent-danger" : "bg-accent-warning/10 text-accent-warning"}`), P.set_class(p, 1, `mb-2 ${t.heading ?? ""}`), P.set_text(m, P.get(l)), P.set_text(g, P.get(u));
|
|
411
|
-
}), P.append(e, i);
|
|
412
|
-
},
|
|
413
|
-
$$slots: { default: !0 }
|
|
414
|
-
});
|
|
415
|
-
var f = P.sibling(s, 2);
|
|
416
|
-
M(f, {
|
|
417
|
-
children: (e, t) => {
|
|
418
|
-
b(e, {
|
|
419
|
-
size: "full",
|
|
420
|
-
variant: "default",
|
|
421
|
-
get onclick() {
|
|
422
|
-
return o();
|
|
423
|
-
},
|
|
424
|
-
get "aria-label"() {
|
|
425
|
-
return P.get(d);
|
|
426
|
-
},
|
|
427
|
-
children: (e, t) => {
|
|
428
|
-
P.next();
|
|
429
|
-
var n = P.text();
|
|
430
|
-
P.template_effect(() => P.set_text(n, P.get(d))), P.append(e, n);
|
|
431
|
-
},
|
|
432
|
-
$$slots: { default: !0 }
|
|
433
|
-
});
|
|
434
|
-
},
|
|
435
|
-
$$slots: { default: !0 }
|
|
436
|
-
}), P.append(e, i);
|
|
437
|
-
},
|
|
438
|
-
$$slots: { default: !0 }
|
|
439
|
-
}), P.append(e, i);
|
|
440
|
-
},
|
|
441
|
-
$$slots: { default: !0 }
|
|
442
|
-
}), P.pop();
|
|
443
|
-
}
|
|
444
|
-
//#endregion
|
|
445
|
-
//#region src/components/Views/Checkout.svelte
|
|
446
|
-
var $ = e("Checkout"), ze = P.from_html("<div class=\"p-8 text-center\"><p class=\"text-accent-danger\"> </p></div>"), Be = P.from_html("<div class=\"p-8 text-center\"><p class=\"tone-muted\"> </p></div>"), Ve = P.from_html("<!> <!>", 1);
|
|
447
|
-
function He(e, t) {
|
|
448
|
-
P.push(t, !0);
|
|
449
|
-
let n = te(), r = P.prop(t, "availableTickets", 23, () => []);
|
|
450
|
-
P.prop(t, "value", 3, "");
|
|
451
|
-
let i = P.prop(t, "venueId", 3, ""), a = P.prop(t, "organizationId", 3, ""), s = P.prop(t, "onNavigateBack", 3, void 0), l = P.prop(t, "initialError", 3, void 0), f = P.prop(t, "widgetId", 3, null), p = P.prop(t, "labels", 3, y), m = P.prop(t, "locale", 3, void 0);
|
|
452
|
-
function h(e) {
|
|
453
|
-
if (!e) return {};
|
|
454
|
-
let t = { ...e.venue ?? {} };
|
|
455
|
-
for (let n of [
|
|
456
|
-
"askForPhoneAtCheckout",
|
|
457
|
-
"requiredPhoneAtCheckout",
|
|
458
|
-
"hasCustomCheckout",
|
|
459
|
-
"requiredCustomCheckout",
|
|
460
|
-
"questionPrompt"
|
|
461
|
-
]) e[n] !== void 0 && (t[n] = e[n]);
|
|
462
|
-
return t;
|
|
463
|
-
}
|
|
464
|
-
let b = P.derived(() => (t.data || {}).id);
|
|
465
|
-
P.derived(() => (t.data || {}).orgSlug);
|
|
466
|
-
let x = P.derived(() => (t.data || {}).slug), oe = P.derived(() => (t.data || {}).event), ce = P.derived(() => ue(h(P.get(oe)))), O = P.derived(() => P.get(oe) ? {
|
|
467
|
-
...le(P.get(oe)),
|
|
468
|
-
...P.get(ce)
|
|
469
|
-
} : t.data && (t.data.id || P.get(b)) ? {
|
|
470
|
-
id: t.data.id || P.get(b),
|
|
471
|
-
eventID: t.data.id || P.get(b),
|
|
472
|
-
venueID: t.data.venueID ?? t.data.venueId ?? null,
|
|
473
|
-
venueId: t.data.venueId ?? t.data.venueID ?? null,
|
|
474
|
-
eventTicketingType: 0,
|
|
475
|
-
ticketType: 0,
|
|
476
|
-
availableTickets: []
|
|
477
|
-
} : null), k = P.state(""), A = P.state(P.proxy({})), j = P.state(P.proxy({})), M = P.state(P.proxy({})), F = P.state(P.proxy([])), I = P.state(""), Ce = P.state(0), L = P.state(!1), we = P.state(!1), R = P.state(!1), z = P.state(!1), B = P.state(!1), Te = P.state(null), Ee = P.derived(() => Object.values(P.get(A)).reduce((e, t) => e + (Number(t) || 0), 0)), V = P.state(null), H = P.state(""), U = P.state(void 0), W = P.state(null), G = P.state(""), De = P.state(!1), Oe = P.state(""), K = P.state(null), ke = P.derived(() => P.get(K) !== null), q = P.state(null), J = P.state(null), Y = null, Z = P.state(!1);
|
|
478
|
-
function je() {
|
|
479
|
-
return {
|
|
480
|
-
value: Y?.total ?? null,
|
|
481
|
-
currency: Y?.currency || "USD"
|
|
482
|
-
};
|
|
483
|
-
}
|
|
484
|
-
Se(async () => {
|
|
485
|
-
if (P.set(k, ye(me) || ye(be.CHECKOUT_CARTID), !0), !P.get(k)) {
|
|
486
|
-
P.set(De, !0), P.set(Oe, p().noCheckoutSession || "No checkout session found. Please select tickets first", !0);
|
|
487
|
-
return;
|
|
488
|
-
}
|
|
489
|
-
C(P.get(O)?.eventID || P.get(O)?.id || P.get(b), f(), i() || P.get(O)?.venueID || P.get(O)?.venueId || null, P.get(k));
|
|
490
|
-
let e = P.get(O)?.eventID || P.get(O)?.id || P.get(b);
|
|
491
|
-
try {
|
|
492
|
-
let t = de(e);
|
|
493
|
-
P.set(A, t.quantities || {}, !0), P.set(j, t.donationAmounts || {}, !0), P.set(M, t.addOnQuantities || {}, !0), P.set(I, t.promocode || "", !0), P.set(Ce, t.promoDiscountAmount || 0, !0), P.set(F, t.tickets || [], !0);
|
|
494
|
-
} catch (e) {
|
|
495
|
-
$.error("Error loading checkout state:", e), P.set(A, {}, !0), P.set(M, {}, !0), P.set(F, [], !0);
|
|
496
|
-
}
|
|
497
|
-
P.get(F).length > 0 && P.get(O) && (P.get(O).availableTickets = P.get(F), r(P.get(F)));
|
|
498
|
-
let t = ge(P.get(O)?.venueID || P.get(O)?.venueId || i(), { widgetKey: n }).then((e) => ({ data: e }), (e) => ({ error: e }));
|
|
499
|
-
await (Object.keys(P.get(A)).length > 0 ? Me() : null);
|
|
500
|
-
let a = {
|
|
501
|
-
serviceFeeCents: 0,
|
|
502
|
-
serviceFeePercentage: 0,
|
|
503
|
-
serviceFeeChargeType: "both",
|
|
504
|
-
maxServiceFeeCents: 0,
|
|
505
|
-
absorbServiceFee: !1,
|
|
506
|
-
taxPercentage: 0
|
|
507
|
-
};
|
|
508
|
-
try {
|
|
509
|
-
let e = await t;
|
|
510
|
-
if ("error" in e) throw e.error;
|
|
511
|
-
let n = e.data;
|
|
512
|
-
a = {
|
|
513
|
-
serviceFeeCents: Number(n?.serviceFeeCents == null ? 0 : n.serviceFeeCents),
|
|
514
|
-
serviceFeePercentage: Number(n?.serviceFeePercentage ?? 0),
|
|
515
|
-
serviceFeeChargeType: String(n?.serviceFeeChargeType ?? "both"),
|
|
516
|
-
maxServiceFeeCents: Number(n?.maxServiceFeeCents == null ? 0 : n.maxServiceFeeCents),
|
|
517
|
-
absorbServiceFee: n?.absorbServiceFee === !0,
|
|
518
|
-
taxPercentage: Number(n?.taxPercentage ?? 0)
|
|
519
|
-
};
|
|
520
|
-
} catch (e) {
|
|
521
|
-
$.error("Error fetching venue data:", e);
|
|
522
|
-
}
|
|
523
|
-
let s = [...Pe(P.get(A), P.get(F), a), ...Ie(P.get(M), P.get(O)?.addOns)], c = 900, m = "", h, g;
|
|
524
|
-
if (P.get(k)) {
|
|
525
|
-
let e = he(P.get(k));
|
|
526
|
-
if (e) {
|
|
527
|
-
let t = Math.max(0, Math.floor((e - Date.now()) / 1e3));
|
|
528
|
-
t > 0 && (c = t);
|
|
529
|
-
}
|
|
530
|
-
try {
|
|
531
|
-
let e = await T(P.get(k), { widgetKey: n });
|
|
532
|
-
if (e.error || (e.remainingExtensions !== void 0 && (h = e.remainingExtensions), e.canExtend !== void 0 && (g = e.canExtend)), !e.error && e.expiresAt) {
|
|
533
|
-
let t = _(e.expiresAt).getTime();
|
|
534
|
-
c = Math.max(0, Math.floor((t - Date.now()) / 1e3)), m = e.expiresAt, fe(P.get(k), t);
|
|
535
|
-
}
|
|
536
|
-
} catch {}
|
|
537
|
-
}
|
|
538
|
-
let ee = ye(`checkout-promo-discount-type-${e}`), v = [];
|
|
539
|
-
try {
|
|
540
|
-
let t = ye(`checkout-promo-ticket-ids-${e}`), n = t ? JSON.parse(t) : [];
|
|
541
|
-
Array.isArray(n) && (v = n);
|
|
542
|
-
} catch {
|
|
543
|
-
v = [];
|
|
544
|
-
}
|
|
545
|
-
let y = o(s.filter((e) => d(v, e.ticketId)).reduce((e, t) => e + (t.subtotal == null ? 0 : t.subtotal), 0)), x = u(y, P.get(Ce), ee);
|
|
546
|
-
if (P.set(J, {
|
|
547
|
-
event: Ne(P.get(O), a),
|
|
548
|
-
lines: s,
|
|
549
|
-
timerStart: c,
|
|
550
|
-
...m ? { deadlineAt: m } : {},
|
|
551
|
-
...h === void 0 ? {} : { remainingExtensions: h },
|
|
552
|
-
...g === void 0 ? {} : { canExtend: g },
|
|
553
|
-
promoApplied: !!P.get(I),
|
|
554
|
-
promoDiscount: x,
|
|
555
|
-
forceExpired: !1,
|
|
556
|
-
...Y ? { serverTotals: Y } : {}
|
|
557
|
-
}, !0), l()) {
|
|
558
|
-
let e = X(typeof l() == "object" ? l() : {
|
|
559
|
-
code: "card_declined",
|
|
560
|
-
message: "Your card was declined. Please try a different payment method."
|
|
561
|
-
}, p());
|
|
562
|
-
P.set(W, {
|
|
563
|
-
message: e.message,
|
|
564
|
-
suggestion: e.suggestion
|
|
565
|
-
}, !0);
|
|
566
|
-
}
|
|
567
|
-
});
|
|
568
|
-
let Q = 0;
|
|
569
|
-
async function Me() {
|
|
570
|
-
let e = ++Q;
|
|
571
|
-
if (!P.get(k)) {
|
|
572
|
-
$.error("Missing cartId!");
|
|
573
|
-
return;
|
|
574
|
-
}
|
|
575
|
-
let t = Object.fromEntries(Object.entries(P.get(A)).filter(([e, t]) => t > 0));
|
|
576
|
-
try {
|
|
577
|
-
let r = Object.fromEntries(Object.entries(P.get(j)).filter(([, e]) => parseFloat(String(e)) > 0).map(([e, t]) => [parseInt(e, 10), parseFloat(String(t))]));
|
|
578
|
-
if (P.get(I)) {
|
|
579
|
-
let t = await ie(P.get(k), P.get(I), void 0, { widgetKey: n });
|
|
580
|
-
if (e !== Q) return;
|
|
581
|
-
t.success ? P.set(G, "") : ($.error("Failed to apply promo code to cart:", t.error), P.set(G, (p().promoCodeNotApplied || "We couldn't apply promo code {code}. It isn't included in this total — go back to re-enter it, or continue at the full price").replace("{code}", P.get(I)), !0));
|
|
582
|
-
}
|
|
583
|
-
let i = await E(P.get(k), t, Object.keys(r).length > 0 ? r : void 0, void 0, m(), { widgetKey: n });
|
|
584
|
-
if (e !== Q) return;
|
|
585
|
-
if (!i) {
|
|
586
|
-
P.set(W, { message: p().failedToCreatePaymentIntent || "Failed to create payment intent. Please try again" }, !0);
|
|
587
|
-
return;
|
|
588
|
-
}
|
|
589
|
-
P.set(Z, !1), Y = re(i), P.get(J) && P.set(J, {
|
|
590
|
-
...P.get(J),
|
|
591
|
-
serverTotals: Y
|
|
592
|
-
}, !0);
|
|
593
|
-
let a = i;
|
|
594
|
-
if (a.requires_stripe === !1 || a.payment_type === "free") {
|
|
595
|
-
P.set(H, "free");
|
|
596
|
-
return;
|
|
597
|
-
}
|
|
598
|
-
P.set(Z, Y === null);
|
|
599
|
-
let o = i.stripe_publishable_key;
|
|
600
|
-
if (!o) {
|
|
601
|
-
$.error("No Stripe publishable key in payment intent response"), P.set(W, { message: p().paymentConfigError || "Payment configuration error. Please try again" }, !0);
|
|
602
|
-
return;
|
|
603
|
-
}
|
|
604
|
-
let s = await Ae(o);
|
|
605
|
-
if (e !== Q) return;
|
|
606
|
-
P.set(V, s, !0), i.client_secret ? P.set(H, i.client_secret, !0) : P.set(W, { message: p().failedToInitPayment || "Failed to initialize payment. Please try again" }, !0);
|
|
607
|
-
} catch (t) {
|
|
608
|
-
if ($.error("Failed to initialize Stripe payment:", t), e !== Q) return;
|
|
609
|
-
P.set(W, { message: t.message || p().failedToInitPayment || "Failed to initialize payment. Please try again" }, !0);
|
|
610
|
-
}
|
|
611
|
-
}
|
|
612
|
-
function Ne(e, t) {
|
|
613
|
-
return e ? {
|
|
614
|
-
id: e.id || e.eventID,
|
|
615
|
-
title: e.name || e.title || "",
|
|
616
|
-
slug: e.slug || P.get(x) || "",
|
|
617
|
-
description: e.description || "",
|
|
618
|
-
date: e.date || "",
|
|
619
|
-
startDateTime: e.startDateTime || "",
|
|
620
|
-
endDateTime: e.endDateTime || "",
|
|
621
|
-
doorsOpenTime: e.doorsOpenTime || "",
|
|
622
|
-
timezone: e.timeZone || e.timezone || v(),
|
|
623
|
-
imageUrl: e.imageUrl || e.image || "",
|
|
624
|
-
...P.get(ce),
|
|
625
|
-
venue: {
|
|
626
|
-
id: e.venueID || e.venueId || 0,
|
|
627
|
-
name: e.venueName || e.venue?.name || "",
|
|
628
|
-
address: e.venueAddress || "",
|
|
629
|
-
timezone: e.timeZone || e.timezone || v(),
|
|
630
|
-
serviceFeePercentage: t.serviceFeePercentage,
|
|
631
|
-
serviceFeeCents: t.serviceFeeCents,
|
|
632
|
-
taxPercentage: t.taxPercentage,
|
|
633
|
-
serviceFeeChargeType: t.serviceFeeChargeType,
|
|
634
|
-
maxServiceFeeCents: t.maxServiceFeeCents,
|
|
635
|
-
absorbServiceFee: t.absorbServiceFee
|
|
636
|
-
},
|
|
637
|
-
performers: e.performers || [],
|
|
638
|
-
addOns: e.addOns || [],
|
|
639
|
-
tickets: (e.availableTickets || []).map((e) => ({
|
|
640
|
-
id: e.ID || e.id,
|
|
641
|
-
name: e.name || "",
|
|
642
|
-
description: e.description || "",
|
|
643
|
-
price: c(e.price),
|
|
644
|
-
fee: 0,
|
|
645
|
-
quantityAvailable: e.quantityAvailable || 0,
|
|
646
|
-
quantityTotal: e.quantityTotal || 0,
|
|
647
|
-
minPerOrder: e.minPerOrder || 1,
|
|
648
|
-
maxPerOrder: e.maxPerOrder || 10,
|
|
649
|
-
status: "on_sale",
|
|
650
|
-
isDonation: pe(e),
|
|
651
|
-
isHidden: !1
|
|
652
|
-
})),
|
|
653
|
-
faqs: e.faqs || [],
|
|
654
|
-
status: "on_sale",
|
|
655
|
-
isPasswordProtected: !1,
|
|
656
|
-
isRegistrationEvent: e.eventTicketingType === 1 || e.ticketType === 1,
|
|
657
|
-
totalTicketsRemaining: 100,
|
|
658
|
-
totalTicketsCapacity: 100
|
|
659
|
-
} : null;
|
|
660
|
-
}
|
|
661
|
-
function Pe(e, t, n) {
|
|
662
|
-
let r = [];
|
|
663
|
-
for (let [i, a] of Object.entries(e)) {
|
|
664
|
-
if (a <= 0) continue;
|
|
665
|
-
let e = t.find((e) => String(e.ID) === i || String(e.id) === i);
|
|
666
|
-
if (!e) continue;
|
|
667
|
-
let s = pe(e), c = e.price;
|
|
668
|
-
if (!s && (c == null || !Number.isFinite(c))) {
|
|
669
|
-
r.push({
|
|
670
|
-
ticketId: parseInt(i),
|
|
671
|
-
ticketName: e.name || "",
|
|
672
|
-
quantity: a,
|
|
673
|
-
unitPrice: null,
|
|
674
|
-
fee: 0,
|
|
675
|
-
subtotal: null,
|
|
676
|
-
isDonation: !1
|
|
677
|
-
});
|
|
678
|
-
continue;
|
|
679
|
-
}
|
|
680
|
-
let l = c ?? 0, u = _e(l, n, s);
|
|
681
|
-
r.push({
|
|
682
|
-
ticketId: parseInt(i),
|
|
683
|
-
ticketName: e.name || "",
|
|
684
|
-
quantity: a,
|
|
685
|
-
unitPrice: l,
|
|
686
|
-
fee: u,
|
|
687
|
-
subtotal: o(l * a),
|
|
688
|
-
isDonation: s
|
|
689
|
-
});
|
|
690
|
-
}
|
|
691
|
-
return r;
|
|
692
|
-
}
|
|
693
|
-
function Ie(e, t) {
|
|
694
|
-
let n = t || [], r = [];
|
|
695
|
-
for (let [t, i] of Object.entries(e || {})) {
|
|
696
|
-
if (!(i > 0)) continue;
|
|
697
|
-
let e = n.find((e) => String(e.id) === String(t));
|
|
698
|
-
if (!e) continue;
|
|
699
|
-
let a = g(ee(Number(e.priceCents) || 0));
|
|
700
|
-
r.push({
|
|
701
|
-
ticketId: parseInt(t, 10),
|
|
702
|
-
lineKey: `a:${t}`,
|
|
703
|
-
kind: "addon",
|
|
704
|
-
ticketName: e.name || "",
|
|
705
|
-
quantity: i,
|
|
706
|
-
unitPrice: a,
|
|
707
|
-
fee: 0,
|
|
708
|
-
subtotal: o(a * i),
|
|
709
|
-
isDonation: !1
|
|
710
|
-
});
|
|
711
|
-
}
|
|
712
|
-
return r;
|
|
713
|
-
}
|
|
714
|
-
let Le = P.derived(() => Object.values(P.get(j)).some((e) => (Number(e) || 0) > 0)), He = P.derived(() => !P.get(Le) && (!P.get(J) || P.get(J).lines.every((e) => e.unitPrice === 0)));
|
|
715
|
-
async function Ue(e) {
|
|
716
|
-
if (!P.get(L)) {
|
|
717
|
-
P.set(L, !0), P.set(W, null);
|
|
718
|
-
try {
|
|
719
|
-
if (P.get(R)) {
|
|
720
|
-
P.set(W, { message: p().paymentReinitializing || "Updating your total. Please wait a moment and try again" }, !0);
|
|
721
|
-
return;
|
|
722
|
-
}
|
|
723
|
-
if (P.get(q) && !P.get(q).requiresStripe) {
|
|
724
|
-
await We(e);
|
|
725
|
-
return;
|
|
726
|
-
}
|
|
727
|
-
if (P.get(He) || P.get(H) === "free" || Y?.total === 0) {
|
|
728
|
-
await Ge(e);
|
|
729
|
-
return;
|
|
730
|
-
}
|
|
731
|
-
if (!P.get(U)) {
|
|
732
|
-
P.set(W, {
|
|
733
|
-
message: p().paymentFormNotReady || "Payment form is not ready. Please wait a moment and try again",
|
|
734
|
-
blocking: !0
|
|
735
|
-
}, !0), P.set(L, !1);
|
|
736
|
-
return;
|
|
737
|
-
}
|
|
738
|
-
if (!P.get(V)) {
|
|
739
|
-
P.set(W, {
|
|
740
|
-
message: p().paymentSystemNotInitialized || "Payment system is not initialized. Please refresh the page",
|
|
741
|
-
blocking: !0
|
|
742
|
-
}, !0), P.set(L, !1);
|
|
743
|
-
return;
|
|
744
|
-
}
|
|
745
|
-
let r = await S(P.get(k), Object.fromEntries(Object.entries(P.get(A)).filter(([e, t]) => t > 0)), Object.keys(P.get(j)).length > 0 ? Object.fromEntries(Object.entries(P.get(j)).filter(([, e]) => parseFloat(String(e)) > 0).map(([e, t]) => [parseInt(e, 10), parseFloat(String(t))])) : void 0, {
|
|
746
|
-
firstName: e.firstName,
|
|
747
|
-
lastName: e.lastName,
|
|
748
|
-
email: e.email,
|
|
749
|
-
phone: e.phone,
|
|
750
|
-
questionAnswer: e.questionAnswer,
|
|
751
|
-
mailingList: e.keepMeUpdated
|
|
752
|
-
}, m(), { widgetKey: n });
|
|
753
|
-
if (r.refusal) {
|
|
754
|
-
P.set(W, { message: r.refusal }, !0), P.set(L, !1);
|
|
755
|
-
return;
|
|
756
|
-
}
|
|
757
|
-
if (r.clientSecret && r.clientSecret !== P.get(H)) {
|
|
758
|
-
P.set(H, r.clientSecret, !0), P.set(W, { message: p().paymentReinitializing || "Updating your total. Please wait a moment and try again" }, !0), P.set(L, !1);
|
|
759
|
-
return;
|
|
760
|
-
}
|
|
761
|
-
let { error: o } = await P.get(U).submit();
|
|
762
|
-
if (o) {
|
|
763
|
-
let e = X(o, p());
|
|
764
|
-
P.set(W, {
|
|
765
|
-
message: e.message,
|
|
766
|
-
suggestion: e.suggestion
|
|
767
|
-
}, !0), P.set(L, !1);
|
|
768
|
-
return;
|
|
769
|
-
}
|
|
770
|
-
let s = await P.get(V).confirmPayment({
|
|
771
|
-
elements: P.get(U),
|
|
772
|
-
redirect: "if_required",
|
|
773
|
-
confirmParams: { return_url: N(P.get(O)?.id || P.get(O)?.eventID || P.get(b), P.get(O)?.slug || P.get(x) || "", {
|
|
774
|
-
orderId: P.get(k),
|
|
775
|
-
ticketCount: Object.values(P.get(A)).reduce((e, t) => e + (Number(t) || 0), 0)
|
|
776
|
-
}) }
|
|
777
|
-
});
|
|
778
|
-
if (s.error) {
|
|
779
|
-
let e = X(s.error, p());
|
|
780
|
-
P.set(W, {
|
|
781
|
-
message: e.message,
|
|
782
|
-
suggestion: e.suggestion
|
|
783
|
-
}, !0), P.set(L, !1);
|
|
784
|
-
return;
|
|
785
|
-
}
|
|
786
|
-
let c = {
|
|
787
|
-
id: P.get(k),
|
|
788
|
-
paymentIntentId: s.paymentIntent.id,
|
|
789
|
-
tickets: P.get(A),
|
|
790
|
-
firstName: e.firstName,
|
|
791
|
-
lastName: e.lastName,
|
|
792
|
-
email: e.email,
|
|
793
|
-
phone: e.phone,
|
|
794
|
-
questionAnswer: e.questionAnswer,
|
|
795
|
-
paymentMethod: "credit-card",
|
|
796
|
-
mailingList: e.keepMeUpdated,
|
|
797
|
-
saleType: "online"
|
|
798
|
-
}, l = await D(P.get(k), c, m(), { widgetKey: n });
|
|
799
|
-
if (l?.eventCanceled || l?.eventPostponed) {
|
|
800
|
-
P.set(K, l.eventCanceled ? "canceled" : "postponed", !0), P.set(W, null);
|
|
801
|
-
return;
|
|
802
|
-
}
|
|
803
|
-
if (l?.status === "Payment succeeded") {
|
|
804
|
-
xe(P.get(k), e.email);
|
|
805
|
-
let n = {
|
|
806
|
-
orderId: P.get(k),
|
|
807
|
-
eventId: P.get(O)?.id || P.get(O)?.eventID || null,
|
|
808
|
-
event: P.get(O) || null,
|
|
809
|
-
venueId: i() || P.get(O)?.venueId || null,
|
|
810
|
-
organizationId: a() || P.get(O)?.organizationId || null,
|
|
811
|
-
...je()
|
|
812
|
-
};
|
|
813
|
-
t.onNavigateToSuccess && t.onNavigateToSuccess(n);
|
|
814
|
-
} else l?.status === "Payment amount does not match the total price" ? P.set(W, { message: p().paymentAmountMismatch || "Payment amount mismatch. Please refresh and try again" }, !0) : P.set(W, { message: p().paymentValidationFailed || "Payment validation failed. Please try again" }, !0);
|
|
815
|
-
} catch (e) {
|
|
816
|
-
$.error("Payment execution error:", e);
|
|
817
|
-
let t = X(e, p());
|
|
818
|
-
P.set(W, {
|
|
819
|
-
message: t.message,
|
|
820
|
-
suggestion: t.suggestion
|
|
821
|
-
}, !0);
|
|
822
|
-
} finally {
|
|
823
|
-
P.set(L, !1);
|
|
824
|
-
}
|
|
825
|
-
}
|
|
826
|
-
}
|
|
827
|
-
async function We(e) {
|
|
828
|
-
try {
|
|
829
|
-
let r = await ae(P.get(k), {
|
|
830
|
-
firstName: e.firstName,
|
|
831
|
-
lastName: e.lastName,
|
|
832
|
-
email: e.email,
|
|
833
|
-
phoneNumber: e.phone || null,
|
|
834
|
-
questionAnswer: e.questionAnswer,
|
|
835
|
-
mailingList: e.keepMeUpdated
|
|
836
|
-
}, m(), { widgetKey: n });
|
|
837
|
-
if (r?.success) {
|
|
838
|
-
xe(r.orderId || P.get(k), e.email);
|
|
839
|
-
let n = {
|
|
840
|
-
orderId: r.orderId || P.get(k),
|
|
841
|
-
eventId: P.get(O)?.id || P.get(O)?.eventID || null,
|
|
842
|
-
event: P.get(O) || null,
|
|
843
|
-
venueId: i() || P.get(O)?.venueId || null,
|
|
844
|
-
organizationId: a() || P.get(O)?.organizationId || null,
|
|
845
|
-
paymentType: "gift_card_only",
|
|
846
|
-
...je()
|
|
847
|
-
};
|
|
848
|
-
t.onNavigateToSuccess && t.onNavigateToSuccess(n);
|
|
849
|
-
} else P.set(W, { message: r?.error || p().failedToCompleteOrder || "Failed to complete order. Please try again" }, !0);
|
|
850
|
-
} catch (e) {
|
|
851
|
-
$.error("Gift card payment error:", e);
|
|
852
|
-
let t = X(e, p());
|
|
853
|
-
P.set(W, {
|
|
854
|
-
message: t.message,
|
|
855
|
-
suggestion: t.suggestion
|
|
856
|
-
}, !0);
|
|
857
|
-
} finally {
|
|
858
|
-
P.set(L, !1);
|
|
859
|
-
}
|
|
860
|
-
}
|
|
861
|
-
async function Ge(e) {
|
|
862
|
-
try {
|
|
863
|
-
let r = Object.fromEntries(Object.entries(P.get(A)).filter(([e, t]) => t > 0)), o = Object.fromEntries(Object.entries(P.get(j)).filter(([, e]) => parseFloat(String(e)) > 0).map(([e, t]) => [parseInt(e, 10), parseFloat(String(t))])), s = await E(P.get(k), r, Object.keys(o).length > 0 ? o : void 0, {
|
|
864
|
-
firstName: e.firstName,
|
|
865
|
-
lastName: e.lastName,
|
|
866
|
-
email: e.email,
|
|
867
|
-
phone: e.phone,
|
|
868
|
-
questionAnswer: e.questionAnswer,
|
|
869
|
-
mailingList: e.keepMeUpdated
|
|
870
|
-
}, m(), { widgetKey: n });
|
|
871
|
-
if (s?.requires_stripe !== !1 && s?.payment_type !== "free" || s?.order_finalized === !1) {
|
|
872
|
-
P.set(W, { message: p().failedToCompleteOrder || "Failed to complete order. Please try again" }, !0);
|
|
873
|
-
return;
|
|
874
|
-
}
|
|
875
|
-
P.set(H, "free"), xe(P.get(k), e.email);
|
|
876
|
-
let c = {
|
|
877
|
-
orderId: P.get(k),
|
|
878
|
-
eventId: P.get(O)?.id || P.get(O)?.eventID || null,
|
|
879
|
-
event: P.get(O) || null,
|
|
880
|
-
venueId: i() || P.get(O)?.venueId || null,
|
|
881
|
-
organizationId: a() || P.get(O)?.organizationId || null,
|
|
882
|
-
paymentType: "free",
|
|
883
|
-
...je()
|
|
884
|
-
};
|
|
885
|
-
t.onNavigateToSuccess && t.onNavigateToSuccess(c);
|
|
886
|
-
} catch (e) {
|
|
887
|
-
$.error("Free order completion error:", e);
|
|
888
|
-
let t = X(e, p());
|
|
889
|
-
P.set(W, {
|
|
890
|
-
message: t.message,
|
|
891
|
-
suggestion: t.suggestion
|
|
892
|
-
}, !0);
|
|
893
|
-
} finally {
|
|
894
|
-
P.set(L, !1);
|
|
895
|
-
}
|
|
896
|
-
}
|
|
897
|
-
async function Ke(e) {
|
|
898
|
-
if (P.set(q, e, !0), P.get(J) && Y && P.set(J, {
|
|
899
|
-
...P.get(J),
|
|
900
|
-
serverTotals: ne(Y, e)
|
|
901
|
-
}, !0), !e.requiresStripe) Q++, P.set(U, void 0), P.set(V, null), P.set(H, "");
|
|
902
|
-
else if (P.get(k) && Object.keys(P.get(A)).length > 0) {
|
|
903
|
-
P.set(R, !0);
|
|
904
|
-
try {
|
|
905
|
-
await Me();
|
|
906
|
-
} finally {
|
|
907
|
-
P.set(R, !1);
|
|
908
|
-
}
|
|
909
|
-
}
|
|
910
|
-
}
|
|
911
|
-
async function qe() {
|
|
912
|
-
if (P.set(q, null), P.get(J) && Y && P.set(J, {
|
|
913
|
-
...P.get(J),
|
|
914
|
-
serverTotals: Y
|
|
915
|
-
}, !0), P.get(k) && Object.keys(P.get(A)).length > 0) {
|
|
916
|
-
P.set(R, !0);
|
|
917
|
-
try {
|
|
918
|
-
await Me();
|
|
919
|
-
} finally {
|
|
920
|
-
P.set(R, !1);
|
|
921
|
-
}
|
|
922
|
-
}
|
|
923
|
-
}
|
|
924
|
-
async function Je(e, t) {
|
|
925
|
-
if (!P.get(k) || P.get(z)) return;
|
|
926
|
-
let r = { ...P.get(M) };
|
|
927
|
-
t > 0 ? r[e] = t : delete r[e], P.set(z, !0), P.set(B, !1), P.set(Te, null), P.set(R, !0);
|
|
928
|
-
try {
|
|
929
|
-
let e = await se(P.get(k), r, { widgetKey: n });
|
|
930
|
-
if (!e.success) {
|
|
931
|
-
P.set(B, !0), P.set(Te, e.error, !0);
|
|
932
|
-
return;
|
|
933
|
-
}
|
|
934
|
-
let t = {};
|
|
935
|
-
for (let n of e.lines) t[n.addOnId] = n.quantity;
|
|
936
|
-
P.set(M, t, !0), e.repriced && await Me();
|
|
937
|
-
} finally {
|
|
938
|
-
P.set(z, !1), P.set(R, !1);
|
|
939
|
-
}
|
|
940
|
-
}
|
|
941
|
-
function Ye() {
|
|
942
|
-
s() ? s()() : window.history.back();
|
|
943
|
-
}
|
|
944
|
-
function Xe() {
|
|
945
|
-
s() ? s()() : window.history.back();
|
|
946
|
-
}
|
|
947
|
-
function Ze() {
|
|
948
|
-
P.set(K, null), Ye();
|
|
949
|
-
}
|
|
950
|
-
async function Qe() {
|
|
951
|
-
if (!P.get(k)) return null;
|
|
952
|
-
try {
|
|
953
|
-
let e = await w(P.get(k), { widgetKey: n });
|
|
954
|
-
return e.success ? {
|
|
955
|
-
newExpiryTime: e.newExpiryTime,
|
|
956
|
-
remainingExtensions: e.remainingExtensions
|
|
957
|
-
} : ($.error("Failed to extend session:", e.error), null);
|
|
958
|
-
} catch (e) {
|
|
959
|
-
return $.error("Error extending checkout session:", e), null;
|
|
960
|
-
}
|
|
961
|
-
}
|
|
962
|
-
var $e = Ve(), et = P.first_child($e), tt = (e) => {
|
|
963
|
-
{
|
|
964
|
-
let t = (e) => {
|
|
965
|
-
{
|
|
966
|
-
let t = P.derived(() => P.get(L) || P.get(R)), n = P.derived(() => P.get(J)?.serverTotals?.total ?? 0), r = P.derived(() => P.get(J)?.serverTotals?.giftCardAmount ?? null);
|
|
967
|
-
Fe(e, {
|
|
968
|
-
get cartId() {
|
|
969
|
-
return P.get(k);
|
|
970
|
-
},
|
|
971
|
-
onApplied: Ke,
|
|
972
|
-
onRemoved: qe,
|
|
973
|
-
get disabled() {
|
|
974
|
-
return P.get(t);
|
|
975
|
-
},
|
|
976
|
-
get owedTotal() {
|
|
977
|
-
return P.get(n);
|
|
978
|
-
},
|
|
979
|
-
get serverGiftCardAmount() {
|
|
980
|
-
return P.get(r);
|
|
981
|
-
},
|
|
982
|
-
get labels() {
|
|
983
|
-
return p();
|
|
984
|
-
}
|
|
985
|
-
});
|
|
986
|
-
}
|
|
987
|
-
}, n = P.derived(() => P.get(W) ?? (P.get(G) ? { message: P.get(G) } : null)), r = P.derived(() => P.get(O)?.addOns || []);
|
|
988
|
-
ve(e, {
|
|
989
|
-
get config() {
|
|
990
|
-
return P.get(J);
|
|
991
|
-
},
|
|
992
|
-
onPlaceOrder: Ue,
|
|
993
|
-
onBack: Ye,
|
|
994
|
-
onRetryExpired: Xe,
|
|
995
|
-
onExtendSession: Qe,
|
|
996
|
-
get stripe() {
|
|
997
|
-
return P.get(V);
|
|
998
|
-
},
|
|
999
|
-
get paymentIntent() {
|
|
1000
|
-
return P.get(H);
|
|
1001
|
-
},
|
|
1002
|
-
get serverTotalsUnavailable() {
|
|
1003
|
-
return P.get(Z);
|
|
1004
|
-
},
|
|
1005
|
-
get repricing() {
|
|
1006
|
-
return P.get(R);
|
|
1007
|
-
},
|
|
1008
|
-
get paymentError() {
|
|
1009
|
-
return P.get(n);
|
|
1010
|
-
},
|
|
1011
|
-
get labels() {
|
|
1012
|
-
return p();
|
|
1013
|
-
},
|
|
1014
|
-
get locale() {
|
|
1015
|
-
return m();
|
|
1016
|
-
},
|
|
1017
|
-
get checkoutAddOns() {
|
|
1018
|
-
return P.get(r);
|
|
1019
|
-
},
|
|
1020
|
-
get addOnQuantities() {
|
|
1021
|
-
return P.get(M);
|
|
1022
|
-
},
|
|
1023
|
-
get addOnTicketCount() {
|
|
1024
|
-
return P.get(Ee);
|
|
1025
|
-
},
|
|
1026
|
-
onAddOnQuantityChange: Je,
|
|
1027
|
-
get addOnsBusy() {
|
|
1028
|
-
return P.get(z);
|
|
1029
|
-
},
|
|
1030
|
-
get addOnsFailed() {
|
|
1031
|
-
return P.get(B);
|
|
1032
|
-
},
|
|
1033
|
-
get addOnsError() {
|
|
1034
|
-
return P.get(Te);
|
|
1035
|
-
},
|
|
1036
|
-
get elements() {
|
|
1037
|
-
return P.get(U);
|
|
1038
|
-
},
|
|
1039
|
-
set elements(e) {
|
|
1040
|
-
P.set(U, e, !0);
|
|
1041
|
-
},
|
|
1042
|
-
get eventEnded() {
|
|
1043
|
-
return P.get(we);
|
|
1044
|
-
},
|
|
1045
|
-
set eventEnded(e) {
|
|
1046
|
-
P.set(we, e, !0);
|
|
1047
|
-
},
|
|
1048
|
-
giftCard: t,
|
|
1049
|
-
$$slots: { giftCard: !0 }
|
|
1050
|
-
});
|
|
1051
|
-
}
|
|
1052
|
-
}, nt = (e) => {
|
|
1053
|
-
var t = ze(), n = P.child(t), r = P.child(n, !0);
|
|
1054
|
-
P.reset(n), P.reset(t), P.template_effect(() => P.set_text(r, P.get(Oe))), P.append(e, t);
|
|
1055
|
-
}, rt = (e) => {
|
|
1056
|
-
var t = Be(), n = P.child(t), r = P.child(n, !0);
|
|
1057
|
-
P.reset(n), P.reset(t), P.template_effect(() => P.set_text(r, p().loadingSecurePaymentForm || "Loading secure payment form...")), P.append(e, t);
|
|
1058
|
-
};
|
|
1059
|
-
P.if(et, (e) => {
|
|
1060
|
-
P.get(J) ? e(tt) : P.get(De) ? e(nt, 1) : e(rt, -1);
|
|
1061
|
-
});
|
|
1062
|
-
var it = P.sibling(et, 2), at = (e) => {
|
|
1063
|
-
Re(e, {
|
|
1064
|
-
open: !0,
|
|
1065
|
-
get reason() {
|
|
1066
|
-
return P.get(K);
|
|
1067
|
-
},
|
|
1068
|
-
onBackToEvents: Ze,
|
|
1069
|
-
get labels() {
|
|
1070
|
-
return p();
|
|
1071
|
-
}
|
|
1072
|
-
});
|
|
1073
|
-
};
|
|
1074
|
-
P.if(it, (e) => {
|
|
1075
|
-
P.get(ke) && e(at);
|
|
1076
|
-
}), P.append(e, $e), P.pop();
|
|
1077
|
-
}
|
|
1078
|
-
//#endregion
|
|
1079
|
-
export { He as default };
|