@getmicdrop/venue-calendar 4.0.110 → 4.0.111
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-bMHSoj75.js → CartView-DiSdmuA_.js} +9 -9
- package/dist/{CartView-bMHSoj75.js.map → CartView-DiSdmuA_.js.map} +1 -1
- package/dist/{Checkout-DDXZc-yj.js → Checkout-DBaNrRya.js} +9 -9
- package/dist/{Checkout-DDXZc-yj.js.map → Checkout-DBaNrRya.js.map} +1 -1
- package/dist/{Checkout-DG2iHmHC.js → Checkout-DwJr030c.js} +5 -5
- package/dist/{Checkout-DG2iHmHC.js.map → Checkout-DwJr030c.js.map} +1 -1
- package/dist/{CheckoutTimer-Bwq6a_Hl.js → CheckoutTimer-DPFVh7QG.js} +5 -5
- package/dist/{CheckoutTimer-Bwq6a_Hl.js.map → CheckoutTimer-DPFVh7QG.js.map} +1 -1
- package/dist/{ClockIcon-ZgeMNNI1.js → ClockIcon-BoEIfS3d.js} +2 -2
- package/dist/{ClockIcon-ZgeMNNI1.js.map → ClockIcon-BoEIfS3d.js.map} +1 -1
- package/dist/{CollectionView-1pf2C4kX.js → CollectionView-DM3WLpLu.js} +5 -5
- package/dist/{CollectionView-1pf2C4kX.js.map → CollectionView-DM3WLpLu.js.map} +1 -1
- package/dist/{Event-D3o0fguY.js → Event-DymZpajQ.js} +8 -8
- package/dist/{Event-D3o0fguY.js.map → Event-DymZpajQ.js.map} +1 -1
- package/dist/{EventPage-DqO-AV8i.js → EventPage-D7GG_BWH.js} +8 -8
- package/dist/{EventPage-DqO-AV8i.js.map → EventPage-D7GG_BWH.js.map} +1 -1
- package/dist/{Heading-pURRwiIC.js → Heading-C8oOcA05.js} +2 -2
- package/dist/{Heading-pURRwiIC.js.map → Heading-C8oOcA05.js.map} +1 -1
- package/dist/{ScarcityBadge-ykz32KS9.js → ScarcityBadge-BqJHRkab.js} +2 -2
- package/dist/{ScarcityBadge-ykz32KS9.js.map → ScarcityBadge-BqJHRkab.js.map} +1 -1
- package/dist/{SeriesPage-BmNk80cF.js → SeriesPage-DsJ9zGPQ.js} +5 -5
- package/dist/{SeriesPage-BmNk80cF.js.map → SeriesPage-DsJ9zGPQ.js.map} +1 -1
- package/dist/{Spinner-OGA1hrc5.js → Spinner-DPzuHWU6.js} +2 -2
- package/dist/{Spinner-OGA1hrc5.js.map → Spinner-DPzuHWU6.js.map} +1 -1
- package/dist/{Success-DLlQ54_-.js → Success-C0D_INAc.js} +8 -8
- package/dist/{Success-DLlQ54_-.js.map → Success-C0D_INAc.js.map} +1 -1
- package/dist/{Text-DMpMLgcU.js → Text-DOd8068v.js} +2 -2
- package/dist/{Text-DMpMLgcU.js.map → Text-DOd8068v.js.map} +1 -1
- package/dist/{VenueCalendar-ClSRsS6u.js → VenueCalendar-B809Hecp.js} +4308 -4315
- package/dist/{VenueCalendar-ClSRsS6u.js.map → VenueCalendar-B809Hecp.js.map} +1 -1
- package/dist/{ViewTicketsEmbed-5LMG2xwn.js → ViewTicketsEmbed-BPMp4JM0.js} +5 -5
- package/dist/{ViewTicketsEmbed-5LMG2xwn.js.map → ViewTicketsEmbed-BPMp4JM0.js.map} +1 -1
- package/dist/{labels-Ws4MJjH5.js → labels-wFEhrJkb.js} +3 -3
- package/dist/{labels-Ws4MJjH5.js.map → labels-wFEhrJkb.js.map} +1 -1
- package/dist/{modalManager.svelte-BPA2JF6c.js → modalManager.svelte-DjiZPIja.js} +2 -2
- package/dist/{modalManager.svelte-BPA2JF6c.js.map → modalManager.svelte-DjiZPIja.js.map} +1 -1
- package/dist/{promo-vXx1bxQm.js → promo-DK6Hxogl.js} +2 -2
- package/dist/{promo-vXx1bxQm.js.map → promo-DK6Hxogl.js.map} +1 -1
- package/dist/{showcase-state-options-9SoS5WuT.js → showcase-state-options-BuPnUf0V.js} +2 -2
- package/dist/{showcase-state-options-9SoS5WuT.js.map → showcase-state-options-BuPnUf0V.js.map} +1 -1
- package/dist/{transform-BD9xXAq7.js → transform-C6LCkao6.js} +2 -2
- package/dist/{transform-BD9xXAq7.js.map → transform-C6LCkao6.js.map} +1 -1
- package/dist/{utm-rT0TPh8G.js → utm-DYGTGbVA.js} +2 -2
- package/dist/{utm-rT0TPh8G.js.map → utm-DYGTGbVA.js.map} +1 -1
- package/dist/venue-calendar.css +1 -1
- package/dist/venue-calendar.es.js +2 -2
- package/dist/venue-calendar.iife.js +47 -47
- package/dist/venue-calendar.iife.js.map +1 -1
- package/dist/venue-calendar.umd.js +44 -44
- package/dist/venue-calendar.umd.js.map +1 -1
- package/package.json +199 -199
- package/dist/api/api/client.d.ts +0 -17
- package/dist/api/api/cta.d.ts +0 -34
- package/dist/api/api/events.d.ts +0 -183
- package/dist/api/api/gift-cards.d.ts +0 -108
- package/dist/api/api/index.d.ts +0 -46
- package/dist/api/api/orders.d.ts +0 -149
- package/dist/api/api/promo.d.ts +0 -45
- package/dist/api/api/result.d.ts +0 -78
- package/dist/api/api/route-manifest.d.ts +0 -179
- package/dist/api/api/transformers/address.d.ts +0 -18
- package/dist/api/api/transformers/cart.d.ts +0 -19
- package/dist/api/api/transformers/collection.d.ts +0 -12
- package/dist/api/api/transformers/event.d.ts +0 -173
- package/dist/api/api/transformers/giftCard.d.ts +0 -11
- package/dist/api/api/transformers/index.d.ts +0 -27
- package/dist/api/api/transformers/order.d.ts +0 -44
- package/dist/api/api/transformers/performer.d.ts +0 -8
- package/dist/api/api/transformers/series.d.ts +0 -12
- package/dist/api/api/transformers/venue.d.ts +0 -39
- package/dist/api/api/venues.d.ts +0 -33
- package/dist/api/api/waitlist.d.ts +0 -49
- package/dist/api/api.cjs +0 -2
- package/dist/api/api.cjs.map +0 -1
- package/dist/api/api.mjs +0 -1302
- package/dist/api/api.mjs.map +0 -1
- package/dist/api/types.d.ts +0 -483
- package/dist/seo/HostSeoController.d.ts +0 -68
- package/dist/seo/buildCollectionJsonLd.d.ts +0 -8
- package/dist/seo/buildEventJsonLd.d.ts +0 -9
- package/dist/seo/buildSeriesJsonLd.d.ts +0 -6
- package/dist/seo/helpers.d.ts +0 -88
- package/dist/seo/index.d.ts +0 -10
- package/dist/seo/seo.cjs +0 -2
- package/dist/seo/seo.cjs.map +0 -1
- package/dist/seo/seo.mjs +0 -688
- package/dist/seo/seo.mjs.map +0 -1
- package/dist/seo/types.d.ts +0 -149
package/dist/api/api.mjs
DELETED
|
@@ -1,1302 +0,0 @@
|
|
|
1
|
-
import { createLogger as T } from "@getmicdrop/svelte-components/utils/logger";
|
|
2
|
-
import { ApiError as Q, NotFoundError as Y } from "@getmicdrop/svelte-components/errors";
|
|
3
|
-
import { getLocalStorage as fe, setLocalStorage as me, getSessionStorage as X, setSessionStorage as pe, createLogger as ye, formatFullName as ge, formatCurrency as ve, asUSD as he, resolveImageUrl as Z } from "@getmicdrop/svelte-components";
|
|
4
|
-
import { browserNow as _e, toInstantOrNull as F, compareInstants as U, formatLocal as M } from "@getmicdrop/svelte-components/datetime";
|
|
5
|
-
import { isHiddenTicketPurchasable as we } from "@getmicdrop/svelte-components/transforms";
|
|
6
|
-
import "@getmicdrop/svelte-components/utils/timezones";
|
|
7
|
-
const ke = {};
|
|
8
|
-
function be() {
|
|
9
|
-
typeof import.meta < "u" && ke?.VITE_WIDGET_KEY;
|
|
10
|
-
}
|
|
11
|
-
const G = T("VC");
|
|
12
|
-
function ee(t) {
|
|
13
|
-
const e = be();
|
|
14
|
-
return e ? { ...t, "X-Widget-Key": e } : t;
|
|
15
|
-
}
|
|
16
|
-
const $e = {
|
|
17
|
-
baseUrl: "https://get-micdrop.com",
|
|
18
|
-
timeout: 3e4,
|
|
19
|
-
retries: 2,
|
|
20
|
-
retryDelay: 500,
|
|
21
|
-
onError: (t) => G.error("API Error:", t)
|
|
22
|
-
};
|
|
23
|
-
let p = { ...$e };
|
|
24
|
-
function gt(t) {
|
|
25
|
-
p = { ...p, ...t };
|
|
26
|
-
}
|
|
27
|
-
function vt() {
|
|
28
|
-
return { ...p };
|
|
29
|
-
}
|
|
30
|
-
function c() {
|
|
31
|
-
return `${p.baseUrl}/api/v2/public`;
|
|
32
|
-
}
|
|
33
|
-
function ht() {
|
|
34
|
-
return `${p.baseUrl}/api/public`;
|
|
35
|
-
}
|
|
36
|
-
function _() {
|
|
37
|
-
return `${p.baseUrl}/api/orders/v2/public`;
|
|
38
|
-
}
|
|
39
|
-
async function _t() {
|
|
40
|
-
return "";
|
|
41
|
-
}
|
|
42
|
-
const Ce = (t) => new Promise((e) => setTimeout(e, t));
|
|
43
|
-
async function te(t, e, r) {
|
|
44
|
-
const n = (e.method || "GET").toUpperCase(), s = n === "GET" || n === "HEAD" ? r.retries + 1 : 1;
|
|
45
|
-
let o;
|
|
46
|
-
for (let i = 1; i <= s; i++) {
|
|
47
|
-
const u = new AbortController(), I = setTimeout(() => u.abort(), r.timeout), y = e.signal;
|
|
48
|
-
let b;
|
|
49
|
-
y && (y.aborted ? u.abort() : (b = () => u.abort(), y.addEventListener("abort", b, { once: !0 })));
|
|
50
|
-
try {
|
|
51
|
-
const g = await fetch(t, { ...e, signal: u.signal });
|
|
52
|
-
if (g.status >= 500 && i < s)
|
|
53
|
-
o = new Error(`HTTP ${g.status}`);
|
|
54
|
-
else
|
|
55
|
-
return g;
|
|
56
|
-
} catch (g) {
|
|
57
|
-
if (o = g, y?.aborted) throw g;
|
|
58
|
-
} finally {
|
|
59
|
-
clearTimeout(I), y && b && y.removeEventListener("abort", b);
|
|
60
|
-
}
|
|
61
|
-
i < s && await Ce(r.retryDelay * Math.pow(2, i - 1));
|
|
62
|
-
}
|
|
63
|
-
throw o;
|
|
64
|
-
}
|
|
65
|
-
async function S(t, e) {
|
|
66
|
-
return q("GET", t, void 0, e);
|
|
67
|
-
}
|
|
68
|
-
async function f(t, e, r) {
|
|
69
|
-
return q("POST", t, e, r);
|
|
70
|
-
}
|
|
71
|
-
async function wt(t, e, r) {
|
|
72
|
-
return q("PUT", t, e, r);
|
|
73
|
-
}
|
|
74
|
-
async function Te(t, e) {
|
|
75
|
-
return q("DELETE", t, void 0, e);
|
|
76
|
-
}
|
|
77
|
-
async function q(t, e, r, n) {
|
|
78
|
-
const a = e.startsWith("http") ? e : `${c()}${e}`;
|
|
79
|
-
try {
|
|
80
|
-
const s = await te(
|
|
81
|
-
a,
|
|
82
|
-
{
|
|
83
|
-
method: t,
|
|
84
|
-
headers: ee({
|
|
85
|
-
"Content-Type": "application/json",
|
|
86
|
-
...n?.headers
|
|
87
|
-
}),
|
|
88
|
-
body: r !== void 0 ? JSON.stringify(r) : void 0,
|
|
89
|
-
credentials: "include",
|
|
90
|
-
...n
|
|
91
|
-
},
|
|
92
|
-
p
|
|
93
|
-
);
|
|
94
|
-
if (!s.ok) {
|
|
95
|
-
const i = await s.json().catch(() => ({})), u = i.error || i.message || `HTTP ${s.status}`;
|
|
96
|
-
return p.onError(new Error(u)), { success: !1, error: u, statusCode: s.status };
|
|
97
|
-
}
|
|
98
|
-
return { success: !0, data: await s.json(), statusCode: s.status };
|
|
99
|
-
} catch (s) {
|
|
100
|
-
const o = s instanceof Error ? s.name === "AbortError" ? "Request timed out" : s.message : "Unknown error";
|
|
101
|
-
return p.onError(
|
|
102
|
-
s instanceof Error ? s : new Error(o)
|
|
103
|
-
), { success: !1, error: o };
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
async function A(t, e) {
|
|
107
|
-
try {
|
|
108
|
-
const r = t.startsWith(p.baseUrl), n = await te(
|
|
109
|
-
t,
|
|
110
|
-
{
|
|
111
|
-
credentials: "include",
|
|
112
|
-
...e,
|
|
113
|
-
...r ? { headers: ee(e?.headers) } : {}
|
|
114
|
-
},
|
|
115
|
-
p
|
|
116
|
-
);
|
|
117
|
-
if (!n.ok) {
|
|
118
|
-
const a = await n.json().catch(() => ({}));
|
|
119
|
-
return G.error(`API request failed: ${n.status}`, a), null;
|
|
120
|
-
}
|
|
121
|
-
return n.json();
|
|
122
|
-
} catch (r) {
|
|
123
|
-
return G.error("API request error:", r), null;
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
function Se(t) {
|
|
127
|
-
const e = t ?? {};
|
|
128
|
-
return {
|
|
129
|
-
ticketID: Number(e.TicketID ?? e.ticketID ?? 0),
|
|
130
|
-
quantity: Number(e.Quantity ?? e.quantity ?? 0),
|
|
131
|
-
priceAtReservation: Number(
|
|
132
|
-
e.PriceAtReservation ?? e.priceAtReservation ?? 0
|
|
133
|
-
),
|
|
134
|
-
status: String(e.Status ?? e.status ?? "")
|
|
135
|
-
};
|
|
136
|
-
}
|
|
137
|
-
function Ie(t) {
|
|
138
|
-
const e = t ?? {}, r = e.UUID ?? e.uuid ?? "", n = Number(e.EventID ?? e.eventID ?? 0), a = e.Status ?? e.status ?? "", s = e.ExpiresAt ?? e.expiresAt ?? "", i = (e.Reservations ?? e.reservations ?? []).map(Se);
|
|
139
|
-
return { uuid: r, eventID: n, status: a, expiresAt: s, reservations: i };
|
|
140
|
-
}
|
|
141
|
-
const re = [
|
|
142
|
-
"utmSource",
|
|
143
|
-
"utmMedium",
|
|
144
|
-
"utmCampaign",
|
|
145
|
-
"utmContent",
|
|
146
|
-
"utmTerm"
|
|
147
|
-
], Pe = {
|
|
148
|
-
utmSource: "utm_source",
|
|
149
|
-
utmMedium: "utm_medium",
|
|
150
|
-
utmCampaign: "utm_campaign",
|
|
151
|
-
utmContent: "utm_content",
|
|
152
|
-
utmTerm: "utm_term"
|
|
153
|
-
}, ne = "direct";
|
|
154
|
-
function ae(t) {
|
|
155
|
-
return t ? t.trim().toLowerCase().replace(/\s+/g, "_") : "";
|
|
156
|
-
}
|
|
157
|
-
function Ee(t) {
|
|
158
|
-
const e = {};
|
|
159
|
-
for (const r of re)
|
|
160
|
-
e[r] = ae(t[r]);
|
|
161
|
-
return e.utmSource || (e.utmSource = ne), e;
|
|
162
|
-
}
|
|
163
|
-
function Ne(t) {
|
|
164
|
-
const e = {};
|
|
165
|
-
for (const r of re)
|
|
166
|
-
e[r] = t.get(Pe[r]);
|
|
167
|
-
return Ee(e);
|
|
168
|
-
}
|
|
169
|
-
function Ae() {
|
|
170
|
-
if (typeof window > "u") return !0;
|
|
171
|
-
try {
|
|
172
|
-
return window.self === window.top;
|
|
173
|
-
} catch {
|
|
174
|
-
return !1;
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
function Re() {
|
|
178
|
-
const t = typeof window < "u", e = Ae(), r = t ? window.location.search : "", n = (typeof document < "u" ? document.referrer : "") ?? "", a = t && e ? window.location.href : "";
|
|
179
|
-
return {
|
|
180
|
-
utm: Ne(new URLSearchParams(r)),
|
|
181
|
-
referrer: n || "",
|
|
182
|
-
pageUrl: a || ""
|
|
183
|
-
};
|
|
184
|
-
}
|
|
185
|
-
let Ue = !1;
|
|
186
|
-
function xe() {
|
|
187
|
-
return typeof window < "u" && typeof window.__tcfapi == "function";
|
|
188
|
-
}
|
|
189
|
-
function De() {
|
|
190
|
-
return xe();
|
|
191
|
-
}
|
|
192
|
-
function Oe() {
|
|
193
|
-
return De() ? Ue : !0;
|
|
194
|
-
}
|
|
195
|
-
const z = "micdrop_session_id", B = "micdrop_visitor_id", Fe = /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
|
|
196
|
-
function Ve(t) {
|
|
197
|
-
return typeof t == "string" && Fe.test(t);
|
|
198
|
-
}
|
|
199
|
-
function se() {
|
|
200
|
-
const t = typeof crypto < "u" ? crypto : void 0;
|
|
201
|
-
if (t?.randomUUID) return t.randomUUID();
|
|
202
|
-
const e = new Uint8Array(16);
|
|
203
|
-
if (t?.getRandomValues)
|
|
204
|
-
t.getRandomValues(e);
|
|
205
|
-
else
|
|
206
|
-
for (let n = 0; n < 16; n++) e[n] = Math.floor(Math.random() * 256);
|
|
207
|
-
e[6] = e[6] & 15 | 64, e[8] = e[8] & 63 | 128;
|
|
208
|
-
const r = [];
|
|
209
|
-
for (let n = 0; n < 16; n++) r.push(e[n].toString(16).padStart(2, "0"));
|
|
210
|
-
return `${r[0]}${r[1]}${r[2]}${r[3]}-${r[4]}${r[5]}-${r[6]}${r[7]}-${r[8]}${r[9]}-${r[10]}${r[11]}${r[12]}${r[13]}${r[14]}${r[15]}`;
|
|
211
|
-
}
|
|
212
|
-
function qe() {
|
|
213
|
-
let t = X(z);
|
|
214
|
-
return t || (t = se(), pe(z, t)), t;
|
|
215
|
-
}
|
|
216
|
-
function Le() {
|
|
217
|
-
if (!Oe()) return null;
|
|
218
|
-
const t = fe(B);
|
|
219
|
-
if (Ve(t)) return t;
|
|
220
|
-
const e = se();
|
|
221
|
-
return me(B, e), e;
|
|
222
|
-
}
|
|
223
|
-
const Me = "micdrop_attribution";
|
|
224
|
-
function Ge() {
|
|
225
|
-
const t = X(Me);
|
|
226
|
-
return !t || !t.utm || typeof t.utm.utmSource != "string" ? null : t;
|
|
227
|
-
}
|
|
228
|
-
function x() {
|
|
229
|
-
const e = Ge() ?? Re();
|
|
230
|
-
return {
|
|
231
|
-
sessionId: qe(),
|
|
232
|
-
visitorId: Le(),
|
|
233
|
-
utmSource: e.utm.utmSource,
|
|
234
|
-
utmMedium: e.utm.utmMedium,
|
|
235
|
-
utmCampaign: e.utm.utmCampaign,
|
|
236
|
-
utmContent: e.utm.utmContent,
|
|
237
|
-
utmTerm: e.utm.utmTerm,
|
|
238
|
-
referrer: e.referrer || ""
|
|
239
|
-
};
|
|
240
|
-
}
|
|
241
|
-
ye("tracking");
|
|
242
|
-
const d = T("VC");
|
|
243
|
-
async function kt(t, e, r) {
|
|
244
|
-
try {
|
|
245
|
-
const n = await f(
|
|
246
|
-
`${_()}/cart/${t}/payment-intent`,
|
|
247
|
-
{
|
|
248
|
-
productQuantities: e,
|
|
249
|
-
...r && Object.keys(r).length > 0 ? { donationAmounts: r } : {},
|
|
250
|
-
// Order attribution (MISSION-TRUTH C2) — additive; ignored by a backend
|
|
251
|
-
// that hasn't shipped MIC-1255 yet. Free orders finalize via this
|
|
252
|
-
// payment-intent pre-submit, so this covers the free-order path too.
|
|
253
|
-
attribution: x()
|
|
254
|
-
}
|
|
255
|
-
);
|
|
256
|
-
if (!n.success)
|
|
257
|
-
throw d.error("Payment intent creation failed:", n.error), new Q(
|
|
258
|
-
n.error || "Failed to create payment intent",
|
|
259
|
-
n.statusCode ?? 0,
|
|
260
|
-
{
|
|
261
|
-
endpoint: `${_()}/cart/${t}/payment-intent`,
|
|
262
|
-
method: "POST"
|
|
263
|
-
}
|
|
264
|
-
);
|
|
265
|
-
return d.debug("Payment intent created:", n.data), n.data;
|
|
266
|
-
} catch (n) {
|
|
267
|
-
return d.error("createPaymentIntent error:", n), null;
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
async function bt(t, e) {
|
|
271
|
-
if (!t) return null;
|
|
272
|
-
try {
|
|
273
|
-
const r = await S(
|
|
274
|
-
`${_()}/cart/${t}`
|
|
275
|
-
);
|
|
276
|
-
if (!r.success)
|
|
277
|
-
return null;
|
|
278
|
-
const { uuid: n, eventID: a, status: s, expiresAt: o, reservations: i } = Ie(
|
|
279
|
-
r.data
|
|
280
|
-
);
|
|
281
|
-
return s !== "reserved" && s !== "active" || e !== void 0 && a !== Number(e) ? null : { uuid: n, eventID: a, status: s, expiresAt: o, reservations: i };
|
|
282
|
-
} catch (r) {
|
|
283
|
-
return d.error("getCartByUUID error:", r), null;
|
|
284
|
-
}
|
|
285
|
-
}
|
|
286
|
-
async function $t(t, e, r) {
|
|
287
|
-
try {
|
|
288
|
-
const n = {};
|
|
289
|
-
for (const [o, i] of Object.entries(e)) {
|
|
290
|
-
const u = typeof o == "number" ? o : parseInt(o, 10);
|
|
291
|
-
!Number.isNaN(u) && i > 0 && (n[u] = i);
|
|
292
|
-
}
|
|
293
|
-
const a = {};
|
|
294
|
-
if (r)
|
|
295
|
-
for (const [o, i] of Object.entries(r)) {
|
|
296
|
-
const u = typeof o == "number" ? o : parseInt(o, 10);
|
|
297
|
-
!Number.isNaN(u) && i > 0 && (a[u] = i);
|
|
298
|
-
}
|
|
299
|
-
const s = await fetch(`${_()}/cart/${t}`, {
|
|
300
|
-
method: "PUT",
|
|
301
|
-
headers: { "Content-Type": "application/json" },
|
|
302
|
-
credentials: "include",
|
|
303
|
-
body: JSON.stringify({
|
|
304
|
-
quantities: n,
|
|
305
|
-
...Object.keys(a).length > 0 ? { donationAmounts: a } : {}
|
|
306
|
-
})
|
|
307
|
-
});
|
|
308
|
-
if (!s.ok) {
|
|
309
|
-
const o = await s.json().catch(() => ({}));
|
|
310
|
-
return d.error("Cart update failed:", o), !1;
|
|
311
|
-
}
|
|
312
|
-
return !0;
|
|
313
|
-
} catch (n) {
|
|
314
|
-
return d.error("updateCartQuantities error:", n), !1;
|
|
315
|
-
}
|
|
316
|
-
}
|
|
317
|
-
async function Ct(t) {
|
|
318
|
-
try {
|
|
319
|
-
const e = await f(
|
|
320
|
-
`${c()}/orders/complete/${t}`
|
|
321
|
-
);
|
|
322
|
-
return e.success ? {
|
|
323
|
-
success: !0,
|
|
324
|
-
message: e.data?.message
|
|
325
|
-
} : {
|
|
326
|
-
success: !1,
|
|
327
|
-
error: e.error || "Failed to complete reservation"
|
|
328
|
-
};
|
|
329
|
-
} catch (e) {
|
|
330
|
-
return d.error("Error completing reservation:", e), { success: !1, error: "Network error completing reservation" };
|
|
331
|
-
}
|
|
332
|
-
}
|
|
333
|
-
async function Tt(t) {
|
|
334
|
-
try {
|
|
335
|
-
const e = await f(
|
|
336
|
-
`${c()}/orders/cancel/${t}`
|
|
337
|
-
);
|
|
338
|
-
return e.success ? {
|
|
339
|
-
success: !0,
|
|
340
|
-
message: e.data?.message
|
|
341
|
-
} : {
|
|
342
|
-
success: !1,
|
|
343
|
-
error: e.error || "Failed to cancel reservation"
|
|
344
|
-
};
|
|
345
|
-
} catch (e) {
|
|
346
|
-
return d.error("Error cancelling reservation:", e), { success: !1, error: "Network error cancelling reservation" };
|
|
347
|
-
}
|
|
348
|
-
}
|
|
349
|
-
async function St(t, e) {
|
|
350
|
-
try {
|
|
351
|
-
const r = await f(
|
|
352
|
-
`${c()}/orders/create`,
|
|
353
|
-
// attribution (MISSION-TRUTH C2) rides on cart-create additively.
|
|
354
|
-
{ eventID: t, promoCode: e, attribution: x() }
|
|
355
|
-
);
|
|
356
|
-
return r.success ? r.data : (d.error("Create order failed:", r.error), null);
|
|
357
|
-
} catch (r) {
|
|
358
|
-
return d.error("createOrder error:", r), null;
|
|
359
|
-
}
|
|
360
|
-
}
|
|
361
|
-
async function It(t) {
|
|
362
|
-
return A(`${c()}/orders/${t}`);
|
|
363
|
-
}
|
|
364
|
-
async function Pt(t, e) {
|
|
365
|
-
try {
|
|
366
|
-
const r = await f(`${_()}/validatePaymentIntent/${t}`, {
|
|
367
|
-
...e,
|
|
368
|
-
attribution: x()
|
|
369
|
-
});
|
|
370
|
-
if (!r.success)
|
|
371
|
-
return d.error("Payment validation failed:", r.error), {
|
|
372
|
-
success: !1,
|
|
373
|
-
status: "failed",
|
|
374
|
-
error: r.error || "Payment validation failed"
|
|
375
|
-
};
|
|
376
|
-
const n = r.data;
|
|
377
|
-
return n.eventCanceled || n.eventPostponed ? {
|
|
378
|
-
success: !1,
|
|
379
|
-
status: "failed",
|
|
380
|
-
eventCanceled: n.eventCanceled,
|
|
381
|
-
eventPostponed: n.eventPostponed
|
|
382
|
-
} : {
|
|
383
|
-
success: !0,
|
|
384
|
-
status: n.status || "Payment succeeded",
|
|
385
|
-
orderUUID: n.orderUUID || n.uuid
|
|
386
|
-
};
|
|
387
|
-
} catch (r) {
|
|
388
|
-
return d.error("validatePaymentIntent error:", r), null;
|
|
389
|
-
}
|
|
390
|
-
}
|
|
391
|
-
async function Et(t) {
|
|
392
|
-
try {
|
|
393
|
-
const e = await f(`${c()}/orders/extend-session`, { orderUuid: t });
|
|
394
|
-
if (!e.success)
|
|
395
|
-
return {
|
|
396
|
-
success: !1,
|
|
397
|
-
error: e.error || "Failed to extend session",
|
|
398
|
-
statusCode: e.statusCode
|
|
399
|
-
};
|
|
400
|
-
const r = e.data;
|
|
401
|
-
return {
|
|
402
|
-
success: !0,
|
|
403
|
-
newExpiryTime: r.newExpiryTime,
|
|
404
|
-
remainingExtensions: r.remainingExtensions
|
|
405
|
-
};
|
|
406
|
-
} catch (e) {
|
|
407
|
-
return d.error("Error extending checkout session:", e), { success: !1, error: "Network error extending session" };
|
|
408
|
-
}
|
|
409
|
-
}
|
|
410
|
-
async function Nt(t) {
|
|
411
|
-
try {
|
|
412
|
-
const e = await S(
|
|
413
|
-
`${c()}/orders/session/${t}`
|
|
414
|
-
);
|
|
415
|
-
if (!e.success)
|
|
416
|
-
return {
|
|
417
|
-
error: e.error || "No active session found",
|
|
418
|
-
notFound: e.statusCode === 404
|
|
419
|
-
};
|
|
420
|
-
const r = e.data;
|
|
421
|
-
return {
|
|
422
|
-
expiresAt: r.expiresAt,
|
|
423
|
-
extensionCount: r.extensionCount,
|
|
424
|
-
remainingExtensions: r.remainingExtensions,
|
|
425
|
-
canExtend: r.canExtend,
|
|
426
|
-
reservationCount: r.reservationCount,
|
|
427
|
-
eventStatus: r.eventStatus
|
|
428
|
-
};
|
|
429
|
-
} catch (e) {
|
|
430
|
-
return d.error("Error getting session status:", e), { error: "Network error getting session status" };
|
|
431
|
-
}
|
|
432
|
-
}
|
|
433
|
-
async function At(t = { eventID: "" }) {
|
|
434
|
-
try {
|
|
435
|
-
const e = await f(
|
|
436
|
-
`${c()}/orders/create`,
|
|
437
|
-
// attribution (MISSION-TRUTH C2) rides on cart-create additively.
|
|
438
|
-
{ ...t, attribution: x() }
|
|
439
|
-
);
|
|
440
|
-
return e.success ? e.data?.uuid ?? null : (d.error("Order initiation failed:", e.error), null);
|
|
441
|
-
} catch (e) {
|
|
442
|
-
return d.error("initiateOrder error:", e), null;
|
|
443
|
-
}
|
|
444
|
-
}
|
|
445
|
-
async function Rt(t) {
|
|
446
|
-
if (typeof window > "u") return;
|
|
447
|
-
const e = new URLSearchParams(window.location.search), r = ae(e.get("utm_source")) || ne;
|
|
448
|
-
try {
|
|
449
|
-
await fetch(
|
|
450
|
-
`${c()}/utm/${t}/${encodeURIComponent(r)}`
|
|
451
|
-
);
|
|
452
|
-
} catch (n) {
|
|
453
|
-
d.error("UTM tracking failed:", n);
|
|
454
|
-
}
|
|
455
|
-
}
|
|
456
|
-
const L = T("VC");
|
|
457
|
-
async function Ut(t, e) {
|
|
458
|
-
try {
|
|
459
|
-
if (!e || !e.trim())
|
|
460
|
-
return { valid: !1, error: "Promo code is required" };
|
|
461
|
-
const r = encodeURIComponent(e.trim()), n = await S(
|
|
462
|
-
`/promo-codes/validate/${t}/${r}`
|
|
463
|
-
);
|
|
464
|
-
if (!n.success)
|
|
465
|
-
return n.statusCode === 404 ? { valid: !1, error: "Invalid promo code" } : { valid: !1, error: "Failed to validate code" };
|
|
466
|
-
const a = n.data;
|
|
467
|
-
return {
|
|
468
|
-
valid: a.valid ?? !0,
|
|
469
|
-
revealHiddenTickets: a.revealHiddenTickets,
|
|
470
|
-
revealTicketIds: a.revealTicketIds,
|
|
471
|
-
provideDiscount: a.provideDiscount,
|
|
472
|
-
discountType: a.discountType,
|
|
473
|
-
// The live endpoint sends the magnitude as `discount` and the code as
|
|
474
|
-
// `name`; older/mocked payloads used `amount`/`code`. Read the real field
|
|
475
|
-
// first, keep the legacy fallback. Reading only `amount`/`code` mapped
|
|
476
|
-
// every real promo to discount 0 — "applied" on screen, full price charged.
|
|
477
|
-
amount: a.discount ?? a.amount,
|
|
478
|
-
code: a.name || a.code || e
|
|
479
|
-
};
|
|
480
|
-
} catch (r) {
|
|
481
|
-
return L.error("Error validating promo code:", r), { valid: !1, error: "Network error validating code" };
|
|
482
|
-
}
|
|
483
|
-
}
|
|
484
|
-
async function xt(t) {
|
|
485
|
-
try {
|
|
486
|
-
const e = await S(
|
|
487
|
-
`/promo-codes/check/${t}`
|
|
488
|
-
);
|
|
489
|
-
return e.success ? e.data.hasPromoCodes === !0 : !0;
|
|
490
|
-
} catch (e) {
|
|
491
|
-
return L.error("Error checking promo codes availability:", e), !0;
|
|
492
|
-
}
|
|
493
|
-
}
|
|
494
|
-
async function Dt(t, e) {
|
|
495
|
-
try {
|
|
496
|
-
const r = await f(
|
|
497
|
-
`${_()}/cart/${t}/apply-promo`,
|
|
498
|
-
{ promoCode: e }
|
|
499
|
-
);
|
|
500
|
-
return r.success ? { success: !0 } : {
|
|
501
|
-
success: !1,
|
|
502
|
-
error: r.error || "Failed to apply promo code"
|
|
503
|
-
};
|
|
504
|
-
} catch (r) {
|
|
505
|
-
return L.error("Error applying promo code:", r), { success: !1, error: "Network error applying code" };
|
|
506
|
-
}
|
|
507
|
-
}
|
|
508
|
-
async function Ot(t) {
|
|
509
|
-
try {
|
|
510
|
-
const e = await f(`/orders/${t}/remove-promo`);
|
|
511
|
-
return e.success ? { success: !0 } : {
|
|
512
|
-
success: !1,
|
|
513
|
-
error: e.error || "Failed to remove promo code"
|
|
514
|
-
};
|
|
515
|
-
} catch (e) {
|
|
516
|
-
return L.error("Error removing promo code:", e), { success: !1, error: "Network error removing code" };
|
|
517
|
-
}
|
|
518
|
-
}
|
|
519
|
-
function je(t) {
|
|
520
|
-
const e = t ?? {};
|
|
521
|
-
return {
|
|
522
|
-
performers: Array.isArray(e.performers) ? e.performers : [],
|
|
523
|
-
showPerformers: e.showPerformers === !0
|
|
524
|
-
};
|
|
525
|
-
}
|
|
526
|
-
function oe(t) {
|
|
527
|
-
return { ok: !0, data: t };
|
|
528
|
-
}
|
|
529
|
-
function C(t) {
|
|
530
|
-
return { ok: !1, error: t };
|
|
531
|
-
}
|
|
532
|
-
function H(t) {
|
|
533
|
-
return { ok: !1, error: t, notFound: !0 };
|
|
534
|
-
}
|
|
535
|
-
function Ft(t) {
|
|
536
|
-
return t.ok;
|
|
537
|
-
}
|
|
538
|
-
function Vt(t) {
|
|
539
|
-
return !t.ok;
|
|
540
|
-
}
|
|
541
|
-
function R(t, e) {
|
|
542
|
-
return t.ok ? t.data : e;
|
|
543
|
-
}
|
|
544
|
-
const We = "00000000-0000-0000-0000-000000000000", m = T("VC"), O = /* @__PURE__ */ new Map();
|
|
545
|
-
async function ze(t, e = fetch, r) {
|
|
546
|
-
const n = r ? `${t}:pw` : String(t);
|
|
547
|
-
if (e === fetch) {
|
|
548
|
-
const s = O.get(n);
|
|
549
|
-
if (s) return s;
|
|
550
|
-
}
|
|
551
|
-
const a = (async () => {
|
|
552
|
-
try {
|
|
553
|
-
const s = r ? `${c()}/events/${t}?password=${encodeURIComponent(r)}` : `${c()}/events/${t}`, o = await e(s);
|
|
554
|
-
if (!o.ok)
|
|
555
|
-
return o.status === 404 ? H("event_not_found") : (m.error(`Failed to fetch event details: ${o.status}`), C("event_fetch_failed"));
|
|
556
|
-
const i = await o.json();
|
|
557
|
-
return i ? oe(i) : H("event_not_found");
|
|
558
|
-
} catch (s) {
|
|
559
|
-
return m.error("Error fetching event details:", s), C("event_fetch_failed");
|
|
560
|
-
}
|
|
561
|
-
})();
|
|
562
|
-
return e === fetch && (O.set(n, a), a.finally(() => {
|
|
563
|
-
O.get(n) === a && O.delete(n);
|
|
564
|
-
})), a;
|
|
565
|
-
}
|
|
566
|
-
async function qt(t, e = fetch, r) {
|
|
567
|
-
const n = await ze(t, e, r);
|
|
568
|
-
return n.ok ? n.data : null;
|
|
569
|
-
}
|
|
570
|
-
async function k(t, e, r = (n) => n) {
|
|
571
|
-
try {
|
|
572
|
-
const n = await A(t);
|
|
573
|
-
return n ? oe(r(n)) : (m.error(`Failed to load (${e}): network or server error`), C(e));
|
|
574
|
-
} catch (n) {
|
|
575
|
-
return m.error(`Error loading (${e}):`, n), C(e);
|
|
576
|
-
}
|
|
577
|
-
}
|
|
578
|
-
function j(t) {
|
|
579
|
-
return Array.isArray(t) ? t : [];
|
|
580
|
-
}
|
|
581
|
-
async function Be(t) {
|
|
582
|
-
return k(
|
|
583
|
-
`${c()}/tickets/event/${t}`,
|
|
584
|
-
"tickets_fetch_failed",
|
|
585
|
-
j
|
|
586
|
-
);
|
|
587
|
-
}
|
|
588
|
-
async function Lt(t) {
|
|
589
|
-
return R(await Be(t), []);
|
|
590
|
-
}
|
|
591
|
-
async function He(t) {
|
|
592
|
-
return t ? k(
|
|
593
|
-
`${c()}/events/${t}/performers`,
|
|
594
|
-
"performers_fetch_failed",
|
|
595
|
-
(e) => je(e)
|
|
596
|
-
) : (m.warn("fetchEventPerformers called without eventId"), C("performers_missing_event_id"));
|
|
597
|
-
}
|
|
598
|
-
async function Mt(t) {
|
|
599
|
-
return R(await He(t), {
|
|
600
|
-
performers: [],
|
|
601
|
-
showPerformers: !1
|
|
602
|
-
});
|
|
603
|
-
}
|
|
604
|
-
async function Ke(t) {
|
|
605
|
-
return t ? k(
|
|
606
|
-
`${c()}/venues/organization/${t}`,
|
|
607
|
-
"venues_fetch_failed",
|
|
608
|
-
j
|
|
609
|
-
) : (m.warn("fetchAllVenues called without orgId"), C("venues_missing_org_id"));
|
|
610
|
-
}
|
|
611
|
-
async function Gt(t) {
|
|
612
|
-
return R(await Ke(t), []);
|
|
613
|
-
}
|
|
614
|
-
async function Je(t) {
|
|
615
|
-
return t ? k(
|
|
616
|
-
`${c()}/events/venue/${t}`,
|
|
617
|
-
"venue_events_fetch_failed",
|
|
618
|
-
j
|
|
619
|
-
) : (m.warn("fetchVenueEvents called without venueId"), C("venue_events_missing_venue_id"));
|
|
620
|
-
}
|
|
621
|
-
async function jt(t) {
|
|
622
|
-
return R(await Je(t), []);
|
|
623
|
-
}
|
|
624
|
-
function ie(t) {
|
|
625
|
-
return Array.isArray(t) ? t : Array.isArray(t.events) ? t.events : [];
|
|
626
|
-
}
|
|
627
|
-
async function Qe(t, e, r) {
|
|
628
|
-
return k(
|
|
629
|
-
`${c()}/events/venue/${t}/month/${e}/${r}`,
|
|
630
|
-
"month_events_fetch_failed",
|
|
631
|
-
(n) => ie(n)
|
|
632
|
-
);
|
|
633
|
-
}
|
|
634
|
-
async function Wt(t, e, r) {
|
|
635
|
-
return R(await Qe(t, e, r), []);
|
|
636
|
-
}
|
|
637
|
-
async function Ye(t, e, r) {
|
|
638
|
-
return k(
|
|
639
|
-
`${c()}/events/organization/${t}/month/${e}/${r}`,
|
|
640
|
-
"org_month_events_fetch_failed",
|
|
641
|
-
(n) => ie(n)
|
|
642
|
-
);
|
|
643
|
-
}
|
|
644
|
-
async function zt(t, e, r) {
|
|
645
|
-
return R(await Ye(t, e, r), []);
|
|
646
|
-
}
|
|
647
|
-
async function Xe(t) {
|
|
648
|
-
return k(
|
|
649
|
-
`${c()}/series/${t}/occurrences`,
|
|
650
|
-
"series_occurrences_fetch_failed"
|
|
651
|
-
);
|
|
652
|
-
}
|
|
653
|
-
async function Bt(t) {
|
|
654
|
-
const e = await Xe(t);
|
|
655
|
-
return e.ok ? e.data : null;
|
|
656
|
-
}
|
|
657
|
-
async function Ze(t, e) {
|
|
658
|
-
return k(
|
|
659
|
-
`${c()}/series/${t}/occurrences?venueId=${e}`,
|
|
660
|
-
"series_cta_fetch_failed"
|
|
661
|
-
);
|
|
662
|
-
}
|
|
663
|
-
async function Ht(t, e) {
|
|
664
|
-
const r = await Ze(t, e);
|
|
665
|
-
return r.ok ? r.data : null;
|
|
666
|
-
}
|
|
667
|
-
async function Kt(t, e) {
|
|
668
|
-
try {
|
|
669
|
-
const r = e ? `?slug=${encodeURIComponent(e)}` : "", n = await A(
|
|
670
|
-
`${c()}/resolve/${encodeURIComponent(String(t))}${r}`
|
|
671
|
-
);
|
|
672
|
-
if (!n || !n.type)
|
|
673
|
-
throw new Y("entity", String(t));
|
|
674
|
-
return n;
|
|
675
|
-
} catch (r) {
|
|
676
|
-
return m.error("Error resolving public entity:", r), null;
|
|
677
|
-
}
|
|
678
|
-
}
|
|
679
|
-
async function Jt(t, e) {
|
|
680
|
-
try {
|
|
681
|
-
const r = e ? `${c()}/collections/${t}?password=${encodeURIComponent(e)}` : `${c()}/collections/${t}`, n = await A(r);
|
|
682
|
-
if (!n)
|
|
683
|
-
throw new Y("collection", String(t));
|
|
684
|
-
return n;
|
|
685
|
-
} catch (r) {
|
|
686
|
-
return m.error("Error fetching collection:", r), null;
|
|
687
|
-
}
|
|
688
|
-
}
|
|
689
|
-
async function Qt(t, e) {
|
|
690
|
-
try {
|
|
691
|
-
return (await A(
|
|
692
|
-
`${c()}/collections/${t}/check-password`,
|
|
693
|
-
{
|
|
694
|
-
method: "POST",
|
|
695
|
-
headers: { "Content-Type": "application/json" },
|
|
696
|
-
body: JSON.stringify({ password: e })
|
|
697
|
-
}
|
|
698
|
-
))?.valid === !0;
|
|
699
|
-
} catch (r) {
|
|
700
|
-
return m.error("Error checking collection password:", r), !1;
|
|
701
|
-
}
|
|
702
|
-
}
|
|
703
|
-
async function Yt(t, e) {
|
|
704
|
-
try {
|
|
705
|
-
const r = await A(
|
|
706
|
-
`${c()}/events/${t}/check-password`,
|
|
707
|
-
{
|
|
708
|
-
method: "POST",
|
|
709
|
-
headers: { "Content-Type": "application/json" },
|
|
710
|
-
body: JSON.stringify({ password: e })
|
|
711
|
-
}
|
|
712
|
-
);
|
|
713
|
-
return typeof r == "boolean" ? { valid: r } : { valid: r?.valid === !0 };
|
|
714
|
-
} catch (r) {
|
|
715
|
-
return m.error("Error checking event password:", r), { valid: !1 };
|
|
716
|
-
}
|
|
717
|
-
}
|
|
718
|
-
async function Xt(t, e) {
|
|
719
|
-
try {
|
|
720
|
-
const r = e ? `${c()}/events/venue/${e}` : t ? `${c()}/venues/organization/${t}` : `${c()}/venues/${We}`;
|
|
721
|
-
return (await fetch(r, {
|
|
722
|
-
method: "HEAD"
|
|
723
|
-
})).status < 500;
|
|
724
|
-
} catch (r) {
|
|
725
|
-
return m.error("Network connection test failed:", r), !1;
|
|
726
|
-
}
|
|
727
|
-
}
|
|
728
|
-
const N = T("VC");
|
|
729
|
-
async function et(t) {
|
|
730
|
-
try {
|
|
731
|
-
if (!t)
|
|
732
|
-
return N.warn("getVenue called without venueId"), null;
|
|
733
|
-
const e = await S(`/venues/${t}`);
|
|
734
|
-
return e.success ? e.data ?? null : (N.error(`Failed to fetch venue: ${e.statusCode}`), null);
|
|
735
|
-
} catch (e) {
|
|
736
|
-
return N.error("Error fetching venue:", e), null;
|
|
737
|
-
}
|
|
738
|
-
}
|
|
739
|
-
async function Zt(t) {
|
|
740
|
-
const e = await et(t);
|
|
741
|
-
return e ? {
|
|
742
|
-
serviceFeePercentage: e.serviceFeePercentage ?? 0,
|
|
743
|
-
serviceFeeCents: e.serviceFeeCents ?? 0,
|
|
744
|
-
taxPercentage: e.taxPercentage ?? 0
|
|
745
|
-
} : null;
|
|
746
|
-
}
|
|
747
|
-
async function er(t) {
|
|
748
|
-
try {
|
|
749
|
-
if (!t)
|
|
750
|
-
return N.warn("getVenueBySlug called without slug"), null;
|
|
751
|
-
const e = encodeURIComponent(t), r = await S(`/venues/slug/${e}`);
|
|
752
|
-
return r.success ? r.data ?? null : (N.error(`Failed to fetch venue by slug: ${r.statusCode}`), null);
|
|
753
|
-
} catch (e) {
|
|
754
|
-
return N.error("Error fetching venue by slug:", e), null;
|
|
755
|
-
}
|
|
756
|
-
}
|
|
757
|
-
function tt(t) {
|
|
758
|
-
const e = t ?? {}, r = (e.appliedAmount ?? 0) / 100, n = e.remainingTotal ?? 0, a = e.fullyCoveredByCard ?? n <= 0, s = !a;
|
|
759
|
-
return {
|
|
760
|
-
valid: !0,
|
|
761
|
-
giftCardCode: e.giftCardCode,
|
|
762
|
-
giftCardAmount: r,
|
|
763
|
-
giftCardBalance: e.giftCardBalance,
|
|
764
|
-
paymentType: a ? "gift_card_only" : "split",
|
|
765
|
-
stripeAmount: n,
|
|
766
|
-
orderTotal: r + n,
|
|
767
|
-
requiresStripe: s
|
|
768
|
-
};
|
|
769
|
-
}
|
|
770
|
-
const h = T("VC"), rt = "https://get-micdrop.com", K = `${rt}/api/orders/v2`;
|
|
771
|
-
async function tr(t) {
|
|
772
|
-
try {
|
|
773
|
-
const e = await f(
|
|
774
|
-
`${K}/gift-cards`,
|
|
775
|
-
t
|
|
776
|
-
);
|
|
777
|
-
if (!e.success)
|
|
778
|
-
throw h.error("Gift card purchase creation failed:", e.error), new Q(
|
|
779
|
-
e.error || "Failed to create gift card purchase",
|
|
780
|
-
e.statusCode ?? 0,
|
|
781
|
-
{ endpoint: `${K}/gift-cards`, method: "POST" }
|
|
782
|
-
);
|
|
783
|
-
return h.debug("Gift card purchase created:", e.data), e.data;
|
|
784
|
-
} catch (e) {
|
|
785
|
-
return h.error("Gift card purchase creation error:", e), null;
|
|
786
|
-
}
|
|
787
|
-
}
|
|
788
|
-
async function rr(t, e) {
|
|
789
|
-
try {
|
|
790
|
-
const r = await f(
|
|
791
|
-
`${_()}/cart/${t}/apply-gift-card`,
|
|
792
|
-
{ giftCardCode: e }
|
|
793
|
-
);
|
|
794
|
-
return r.success ? tt(r.data) : r.statusCode === 429 ? {
|
|
795
|
-
valid: !1,
|
|
796
|
-
error: "Too many attempts. Please wait a moment and try again."
|
|
797
|
-
} : (h.error("Apply gift card failed:", r.error), {
|
|
798
|
-
valid: !1,
|
|
799
|
-
error: r.error || "Invalid gift card code"
|
|
800
|
-
});
|
|
801
|
-
} catch (r) {
|
|
802
|
-
return h.error("applyGiftCard error:", r), {
|
|
803
|
-
valid: !1,
|
|
804
|
-
error: "Network error. Please check your connection and try again."
|
|
805
|
-
};
|
|
806
|
-
}
|
|
807
|
-
}
|
|
808
|
-
async function nr(t, e) {
|
|
809
|
-
try {
|
|
810
|
-
const r = await Te(
|
|
811
|
-
`${_()}/cart/${t}/gift-card`,
|
|
812
|
-
e ? { body: JSON.stringify({ giftCardCode: e }) } : void 0
|
|
813
|
-
);
|
|
814
|
-
return r.success ? { success: !0 } : (h.error("Remove gift card failed:", r.error), {
|
|
815
|
-
success: !1,
|
|
816
|
-
error: r.error || "Failed to remove gift card"
|
|
817
|
-
});
|
|
818
|
-
} catch (r) {
|
|
819
|
-
return h.error("removeGiftCard error:", r), {
|
|
820
|
-
success: !1,
|
|
821
|
-
error: "Network error. Please check your connection and try again."
|
|
822
|
-
};
|
|
823
|
-
}
|
|
824
|
-
}
|
|
825
|
-
async function ar(t, e) {
|
|
826
|
-
try {
|
|
827
|
-
const r = await f(`${_()}/cart/${t}/complete-gift-card-payment`, {
|
|
828
|
-
customerName: ge(
|
|
829
|
-
e.firstName,
|
|
830
|
-
e.lastName
|
|
831
|
-
),
|
|
832
|
-
customerEmail: e.email,
|
|
833
|
-
firstName: e.firstName,
|
|
834
|
-
lastName: e.lastName,
|
|
835
|
-
email: e.email,
|
|
836
|
-
phoneNumber: e.phoneNumber || null,
|
|
837
|
-
mailingList: e.mailingList || !1,
|
|
838
|
-
// Order attribution (MISSION-TRUTH C2) — gift-card-only orders take this
|
|
839
|
-
// finalize endpoint, so attribution must ride here too; additive.
|
|
840
|
-
attribution: x()
|
|
841
|
-
});
|
|
842
|
-
return r.success ? {
|
|
843
|
-
success: !0,
|
|
844
|
-
orderId: r.data?.orderId,
|
|
845
|
-
confirmationNumber: r.data?.confirmationNumber
|
|
846
|
-
} : (h.error("Complete gift card payment failed:", r.error), {
|
|
847
|
-
success: !1,
|
|
848
|
-
error: r.error || "Failed to complete payment"
|
|
849
|
-
});
|
|
850
|
-
} catch (r) {
|
|
851
|
-
return h.error("completeGiftCardPayment error:", r), {
|
|
852
|
-
success: !1,
|
|
853
|
-
error: "Network error. Please check your connection and try again."
|
|
854
|
-
};
|
|
855
|
-
}
|
|
856
|
-
}
|
|
857
|
-
const V = T("VC"), nt = {
|
|
858
|
-
waitlist_not_enabled: "Waitlist is not available for this event",
|
|
859
|
-
event_not_found: "Event not found",
|
|
860
|
-
invalid_phone: "Please enter a valid phone number",
|
|
861
|
-
already_purchased: "You have already purchased tickets for this event",
|
|
862
|
-
phone_already_registered: "This phone number is already on the waitlist"
|
|
863
|
-
};
|
|
864
|
-
async function sr(t, e, r = null, n = !1) {
|
|
865
|
-
try {
|
|
866
|
-
const a = { email: e };
|
|
867
|
-
r && n && (a.phone = r, a.smsOptIn = !0);
|
|
868
|
-
const s = await f(
|
|
869
|
-
`/events/${t}/waitlist`,
|
|
870
|
-
a
|
|
871
|
-
);
|
|
872
|
-
return s.success ? {
|
|
873
|
-
success: !0,
|
|
874
|
-
updated: s.data?.updated
|
|
875
|
-
} : (V.error("Join waitlist failed:", s.error), {
|
|
876
|
-
success: !1,
|
|
877
|
-
error: nt[s.error ?? ""] || "Failed to join waitlist. Please try again."
|
|
878
|
-
});
|
|
879
|
-
} catch (a) {
|
|
880
|
-
return V.error("joinWaitlist error:", a), {
|
|
881
|
-
success: !1,
|
|
882
|
-
error: "Network error. Please check your connection and try again."
|
|
883
|
-
};
|
|
884
|
-
}
|
|
885
|
-
}
|
|
886
|
-
async function or(t, e) {
|
|
887
|
-
try {
|
|
888
|
-
const r = await f(
|
|
889
|
-
`/checkout/validate-token/${t}`,
|
|
890
|
-
{ email: e }
|
|
891
|
-
);
|
|
892
|
-
return r.success ? {
|
|
893
|
-
valid: !0,
|
|
894
|
-
eventId: r.data?.eventId ?? 0
|
|
895
|
-
} : {
|
|
896
|
-
valid: !1,
|
|
897
|
-
eventId: 0,
|
|
898
|
-
errorCode: r.error
|
|
899
|
-
};
|
|
900
|
-
} catch (r) {
|
|
901
|
-
return V.error("validateWaitlistToken error:", r), { valid: !1, eventId: 0, errorCode: "invalid_token" };
|
|
902
|
-
}
|
|
903
|
-
}
|
|
904
|
-
async function ir(t) {
|
|
905
|
-
const e = {
|
|
906
|
-
waitlistEnabled: !1,
|
|
907
|
-
soldOut: !1,
|
|
908
|
-
gated: !1
|
|
909
|
-
};
|
|
910
|
-
try {
|
|
911
|
-
const r = await S(
|
|
912
|
-
`/events/${t}/waitlist/status`
|
|
913
|
-
);
|
|
914
|
-
return r.success ? {
|
|
915
|
-
waitlistEnabled: !!r.data?.waitlistEnabled,
|
|
916
|
-
soldOut: !!r.data?.soldOut,
|
|
917
|
-
gated: !!r.data?.gated
|
|
918
|
-
} : e;
|
|
919
|
-
} catch (r) {
|
|
920
|
-
return V.error("getWaitlistStatus error:", r), e;
|
|
921
|
-
}
|
|
922
|
-
}
|
|
923
|
-
function cr(t, e, r = {}) {
|
|
924
|
-
const {
|
|
925
|
-
cancelled: n = !1,
|
|
926
|
-
isRegistration: a = !1,
|
|
927
|
-
waitlistEnabled: s = !1
|
|
928
|
-
} = r, o = _e();
|
|
929
|
-
if (n)
|
|
930
|
-
return { text: "Cancelled", disabled: !0, reason: "cancelled" };
|
|
931
|
-
const i = F(t.endDateTime || t.startDateTime);
|
|
932
|
-
if (i && U(i, o) < 0)
|
|
933
|
-
return { text: "Sales ended", disabled: !0, reason: "event_past" };
|
|
934
|
-
const u = t?.hasPurchasableHiddenTickets === !0 || Array.isArray(e) && e.some(we), I = (e || []).filter(
|
|
935
|
-
(l) => l.salesChannel !== 2 && !l.isHidden && !(typeof l.visibility == "number" && l.visibility >= 2)
|
|
936
|
-
);
|
|
937
|
-
if (I.length === 0)
|
|
938
|
-
return u ? {
|
|
939
|
-
text: a ? "Reserve a spot" : "Get tickets",
|
|
940
|
-
disabled: !1,
|
|
941
|
-
reason: "hidden_only"
|
|
942
|
-
} : {
|
|
943
|
-
text: "No tickets available",
|
|
944
|
-
disabled: !0,
|
|
945
|
-
reason: "no_tickets"
|
|
946
|
-
};
|
|
947
|
-
let y = !1, b = !0, g = !0, v = null;
|
|
948
|
-
for (const l of I) {
|
|
949
|
-
const $ = F(
|
|
950
|
-
l.salesBegin || l.salesStart || l.saleBegin || l.onSaleStart
|
|
951
|
-
), D = F(
|
|
952
|
-
l.salesEnd || l.saleEnd || l.onSaleEnd
|
|
953
|
-
), P = l.remainingCapacity ?? l.quantityRemaining ?? l.quantity, w = l.soldOut || P != null && P <= 0, E = $ ? U($, o) > 0 : !1, W = D ? U(D, o) < 0 : !1;
|
|
954
|
-
!w && !E && !W && (y = !0), w || (b = !1), E || (g = !1), E && $ && !w && !W && (!v || U($, v) < 0) && (v = $);
|
|
955
|
-
}
|
|
956
|
-
if (y)
|
|
957
|
-
return {
|
|
958
|
-
text: a ? "Reserve a spot" : "Get tickets",
|
|
959
|
-
disabled: !1,
|
|
960
|
-
reason: "available"
|
|
961
|
-
};
|
|
962
|
-
if (g && v) {
|
|
963
|
-
if (u)
|
|
964
|
-
return {
|
|
965
|
-
text: a ? "Reserve a spot" : "Get tickets",
|
|
966
|
-
disabled: !1,
|
|
967
|
-
reason: "hidden_only"
|
|
968
|
-
};
|
|
969
|
-
const l = U(v, o), $ = l / (1e3 * 60 * 60), D = l / (1e3 * 60 * 60 * 24), P = (E) => M(
|
|
970
|
-
E,
|
|
971
|
-
{ hour: "numeric", minute: "2-digit", hour12: !0 },
|
|
972
|
-
"en-US"
|
|
973
|
-
);
|
|
974
|
-
let w;
|
|
975
|
-
return $ < 24 ? w = P(v) : D <= 7 ? w = M(
|
|
976
|
-
v,
|
|
977
|
-
{ weekday: "short", hour: "numeric", minute: "2-digit", hour12: !0 },
|
|
978
|
-
"en-US"
|
|
979
|
-
) : w = `${M(
|
|
980
|
-
v,
|
|
981
|
-
{ month: "short", day: "numeric" },
|
|
982
|
-
"en-US"
|
|
983
|
-
)} ${P(v)}`, {
|
|
984
|
-
text: `On sale ${w}`,
|
|
985
|
-
disabled: !0,
|
|
986
|
-
reason: "coming_soon"
|
|
987
|
-
};
|
|
988
|
-
}
|
|
989
|
-
return b ? u ? {
|
|
990
|
-
text: a ? "Reserve a spot" : "Get tickets",
|
|
991
|
-
disabled: !1,
|
|
992
|
-
reason: "hidden_only"
|
|
993
|
-
} : s ? {
|
|
994
|
-
text: "Join Waitlist",
|
|
995
|
-
disabled: !1,
|
|
996
|
-
reason: "sold_out_waitlist"
|
|
997
|
-
} : { text: "Sold out", disabled: !0, reason: "sold_out" } : u ? {
|
|
998
|
-
text: a ? "Reserve a spot" : "Get tickets",
|
|
999
|
-
disabled: !1,
|
|
1000
|
-
reason: "hidden_only"
|
|
1001
|
-
} : { text: "Sales ended", disabled: !0, reason: "sales_ended" };
|
|
1002
|
-
}
|
|
1003
|
-
function ce(t) {
|
|
1004
|
-
const e = t;
|
|
1005
|
-
return {
|
|
1006
|
-
uuid: e.uuid || String(e.id || e.ID || ""),
|
|
1007
|
-
id: e.id || e.ID,
|
|
1008
|
-
ticketNumber: e.ticketNumber || e.ticket_number,
|
|
1009
|
-
orderId: e.orderId || e.order_id,
|
|
1010
|
-
attendeeFirstName: e.attendeeFirstName || e.attendee_first_name || e.firstName,
|
|
1011
|
-
attendeeLastName: e.attendeeLastName || e.attendee_last_name || e.lastName,
|
|
1012
|
-
attendeeEmail: e.attendeeEmail || e.attendee_email || e.email,
|
|
1013
|
-
ticketName: e.ticketName || e.ticket_name || e.name || "",
|
|
1014
|
-
ticketTypeId: e.ticketTypeId || e.ticket_type_id,
|
|
1015
|
-
purchasePrice: e.purchasePrice || e.purchase_price || e.price || 0,
|
|
1016
|
-
status: e.status,
|
|
1017
|
-
checkedIn: e.checkedIn || e.checked_in,
|
|
1018
|
-
checkedInAt: e.checkedInAt || e.checked_in_at
|
|
1019
|
-
};
|
|
1020
|
-
}
|
|
1021
|
-
function ue(t) {
|
|
1022
|
-
const e = t, r = e.purchasedTickets || e.tickets || e.purchased_tickets || [];
|
|
1023
|
-
return {
|
|
1024
|
-
uuid: e.uuid || String(e.id || e.ID || ""),
|
|
1025
|
-
id: e.id || e.ID,
|
|
1026
|
-
customerEmail: e.customerEmail || e.email || e.customer_email || "",
|
|
1027
|
-
customerFirstName: e.customerFirstName || e.firstName || e.first_name,
|
|
1028
|
-
customerLastName: e.customerLastName || e.lastName || e.last_name,
|
|
1029
|
-
status: e.status || "unknown",
|
|
1030
|
-
totalAmount: e.totalAmount || e.total || e.total_amount || 0,
|
|
1031
|
-
subtotal: e.subtotal,
|
|
1032
|
-
serviceFeesAmount: e.serviceFeesAmount || e.serviceFee || e.service_fee || e.service_fees_amount || 0,
|
|
1033
|
-
taxAmount: e.taxAmount || e.tax || e.tax_amount || 0,
|
|
1034
|
-
discount: e.discount || 0,
|
|
1035
|
-
paymentIntentId: e.paymentIntentId || e.payment_intent_id,
|
|
1036
|
-
paymentMethod: e.paymentMethod || e.payment_method,
|
|
1037
|
-
purchasedTickets: r.map(ce),
|
|
1038
|
-
createdAt: e.createdAt || e.created_at,
|
|
1039
|
-
updatedAt: e.updatedAt || e.updated_at
|
|
1040
|
-
};
|
|
1041
|
-
}
|
|
1042
|
-
const ur = ce, lr = ue;
|
|
1043
|
-
function dr(t) {
|
|
1044
|
-
const e = ue(t), r = e.uuid.split("-")[0] || e.uuid, n = Number(e.totalAmount);
|
|
1045
|
-
return {
|
|
1046
|
-
orderId: e.uuid,
|
|
1047
|
-
displayOrderId: r,
|
|
1048
|
-
email: e.customerEmail,
|
|
1049
|
-
customerName: [e.customerFirstName, e.customerLastName].filter(Boolean).join(" "),
|
|
1050
|
-
total: e.totalAmount,
|
|
1051
|
-
formattedTotal: `${ve(he(Number.isFinite(n) ? n / 100 : 0))}`,
|
|
1052
|
-
ticketCount: e.purchasedTickets.length,
|
|
1053
|
-
status: e.status
|
|
1054
|
-
};
|
|
1055
|
-
}
|
|
1056
|
-
function at(t) {
|
|
1057
|
-
return Z(t, { cdn: !0 });
|
|
1058
|
-
}
|
|
1059
|
-
function J(t) {
|
|
1060
|
-
const e = t.imageUrl || t.imageURL || t.image_url || t.image || "";
|
|
1061
|
-
return at(e);
|
|
1062
|
-
}
|
|
1063
|
-
function st(t) {
|
|
1064
|
-
switch (t) {
|
|
1065
|
-
case "available":
|
|
1066
|
-
case "sold_out":
|
|
1067
|
-
case "coming_soon":
|
|
1068
|
-
case "ended":
|
|
1069
|
-
return t;
|
|
1070
|
-
default:
|
|
1071
|
-
return null;
|
|
1072
|
-
}
|
|
1073
|
-
}
|
|
1074
|
-
function ot(t) {
|
|
1075
|
-
const e = t.ctaState || t.cta_state;
|
|
1076
|
-
if (e) {
|
|
1077
|
-
const o = st(e);
|
|
1078
|
-
if (o)
|
|
1079
|
-
return o;
|
|
1080
|
-
}
|
|
1081
|
-
if (t.isCancelled || t.is_cancelled)
|
|
1082
|
-
return "ended";
|
|
1083
|
-
const r = F(
|
|
1084
|
-
t.startDateTime || t.start_date_time || t.date
|
|
1085
|
-
);
|
|
1086
|
-
if (r) {
|
|
1087
|
-
const o = Date.now();
|
|
1088
|
-
if (r.getTime() < o)
|
|
1089
|
-
return "ended";
|
|
1090
|
-
}
|
|
1091
|
-
const n = t.ticketsAvailable ?? t.tickets_available;
|
|
1092
|
-
if (n !== void 0)
|
|
1093
|
-
return n <= 0 ? "sold_out" : "available";
|
|
1094
|
-
const a = t.availableTickets || t.available_tickets || t.tickets || [];
|
|
1095
|
-
return a.length === 0 ? "coming_soon" : a.reduce((o, i) => {
|
|
1096
|
-
const u = i.quantityAvailable ?? i.quantity_available ?? i.quantity ?? 0, I = i.quantitySold ?? i.quantity_sold ?? 0;
|
|
1097
|
-
return o + Math.max(0, u - I);
|
|
1098
|
-
}, 0) <= 0 ? "sold_out" : "available";
|
|
1099
|
-
}
|
|
1100
|
-
function le(t) {
|
|
1101
|
-
const e = t;
|
|
1102
|
-
return {
|
|
1103
|
-
id: e.id || e.ID,
|
|
1104
|
-
name: e.name || e.ticketName || "",
|
|
1105
|
-
description: e.description,
|
|
1106
|
-
price: e.price || 0,
|
|
1107
|
-
quantity: e.quantity || e.totalQuantity || 0,
|
|
1108
|
-
quantitySold: e.quantitySold || e.quantity_sold || 0,
|
|
1109
|
-
quantityAvailable: e.quantityAvailable || e.quantity_available || (e.quantity || 0) - (e.quantitySold || 0),
|
|
1110
|
-
minPerOrder: e.minPerOrder || e.min_per_order || 1,
|
|
1111
|
-
maxPerOrder: e.maxPerOrder || e.max_per_order || 10,
|
|
1112
|
-
saleStartDate: e.saleStartDate || e.sale_start_date,
|
|
1113
|
-
saleEndDate: e.saleEndDate || e.sale_end_date,
|
|
1114
|
-
isHidden: e.isHidden || e.is_hidden || !1,
|
|
1115
|
-
revealWithPromoCode: e.revealWithPromoCode || e.reveal_with_promo_code,
|
|
1116
|
-
ticketType: e.ticketType || e.ticket_type || 0,
|
|
1117
|
-
sectionId: e.sectionId || e.section_id,
|
|
1118
|
-
sortOrder: e.sortOrder || e.sort_order || 0
|
|
1119
|
-
};
|
|
1120
|
-
}
|
|
1121
|
-
function de(t) {
|
|
1122
|
-
const e = t, n = (e.availableTickets || e.available_tickets || e.tickets || []).map(le), a = n.map((i) => i.price).filter((i) => i > 0), s = a.length > 0 ? Math.min(...a) : void 0, o = a.length > 0 ? Math.max(...a) : void 0;
|
|
1123
|
-
return {
|
|
1124
|
-
eventID: e.eventID || e.id || e.ID || 0,
|
|
1125
|
-
id: e.id || e.ID,
|
|
1126
|
-
name: e.name || e.title || "",
|
|
1127
|
-
title: e.title || e.name,
|
|
1128
|
-
slug: e.slug,
|
|
1129
|
-
description: e.description,
|
|
1130
|
-
date: e.date || e.startDateTime || e.start_date_time || "",
|
|
1131
|
-
startDateTime: e.startDateTime || e.start_date_time,
|
|
1132
|
-
endDateTime: e.endDateTime || e.end_date_time,
|
|
1133
|
-
doorsOpenTime: e.doorsOpenTime || e.doors_open_time,
|
|
1134
|
-
timezone: e.timezone || e.time_zone,
|
|
1135
|
-
venueId: e.venueId || e.venue_id,
|
|
1136
|
-
venueName: e.venueName || e.venue_name,
|
|
1137
|
-
venueAddress: e.venueAddress || e.venue_address,
|
|
1138
|
-
location: e.location || e.venueAddress || e.venue_address,
|
|
1139
|
-
imageUrl: J(e),
|
|
1140
|
-
imageURL: J(e),
|
|
1141
|
-
status: e.status,
|
|
1142
|
-
isPublished: e.isPublished ?? e.is_published,
|
|
1143
|
-
isCancelled: e.isCancelled ?? e.is_cancelled,
|
|
1144
|
-
availableTickets: n,
|
|
1145
|
-
ticketsAvailable: e.ticketsAvailable ?? e.tickets_available ?? n.reduce((i, u) => i + (u.quantityAvailable || 0), 0),
|
|
1146
|
-
ticketsSold: e.ticketsSold ?? e.tickets_sold,
|
|
1147
|
-
minPrice: e.minPrice ?? e.min_price ?? s,
|
|
1148
|
-
maxPrice: e.maxPrice ?? e.max_price ?? o,
|
|
1149
|
-
ctaText: e.ctaText || e.cta_text,
|
|
1150
|
-
ctaState: ot(e),
|
|
1151
|
-
showPerformers: e.showPerformers ?? e.show_performers,
|
|
1152
|
-
eventSeriesId: e.eventSeriesId || e.event_series_id,
|
|
1153
|
-
seriesInstanceNumber: e.seriesInstanceNumber || e.series_instance_number,
|
|
1154
|
-
// ── Passthrough seams (see composition note above) — verbatim wire ──
|
|
1155
|
-
timeZone: e.timeZone,
|
|
1156
|
-
eventSummary: e.eventSummary,
|
|
1157
|
-
password: e.password,
|
|
1158
|
-
hasPassword: e.hasPassword,
|
|
1159
|
-
disclaimer: e.disclaimer,
|
|
1160
|
-
ticketType: e.ticketType,
|
|
1161
|
-
eventTicketingType: e.eventTicketingType,
|
|
1162
|
-
ageRestriction: e.ageRestriction,
|
|
1163
|
-
displayAgeRestriction: e.displayAgeRestriction,
|
|
1164
|
-
displayStartTime: e.displayStartTime,
|
|
1165
|
-
displayEndTime: e.displayEndTime,
|
|
1166
|
-
displayDoorsTime: e.displayDoorsTime,
|
|
1167
|
-
collectionId: e.collectionId || e.collection_id,
|
|
1168
|
-
ticketsRemaining: e.ticketsRemaining,
|
|
1169
|
-
ticketsTotal: e.ticketsTotal,
|
|
1170
|
-
hasHiddenTickets: e.hasHiddenTickets,
|
|
1171
|
-
stage: e.stage,
|
|
1172
|
-
stageName: e.stageName,
|
|
1173
|
-
stageId: e.stageId,
|
|
1174
|
-
eventCategoryTypes: e.eventCategoryTypes,
|
|
1175
|
-
publicPerformers: e.publicPerformers,
|
|
1176
|
-
collectionIds: e.collectionIds,
|
|
1177
|
-
venue: e.venue,
|
|
1178
|
-
performers: e.performers,
|
|
1179
|
-
faqs: e.faqs,
|
|
1180
|
-
showtimes: e.showtimes,
|
|
1181
|
-
purchasedTickets: e.purchasedTickets
|
|
1182
|
-
};
|
|
1183
|
-
}
|
|
1184
|
-
const fr = le, mr = de, pr = de;
|
|
1185
|
-
function it(t) {
|
|
1186
|
-
return Z(t, { cdn: !0 });
|
|
1187
|
-
}
|
|
1188
|
-
function ct(t) {
|
|
1189
|
-
const e = t, r = e.logoUrl || e.logo_url || e.logo;
|
|
1190
|
-
return {
|
|
1191
|
-
id: e.id || e.ID || 0,
|
|
1192
|
-
name: e.name || "",
|
|
1193
|
-
slug: e.slug,
|
|
1194
|
-
address: e.address,
|
|
1195
|
-
googleLocationNameCache: e.googleLocationNameCache || e.google_location_name_cache,
|
|
1196
|
-
city: e.city,
|
|
1197
|
-
state: e.state,
|
|
1198
|
-
zipCode: e.zipCode || e.zip_code,
|
|
1199
|
-
country: e.country,
|
|
1200
|
-
timezone: e.timezone || e.time_zone,
|
|
1201
|
-
logoUrl: it(r),
|
|
1202
|
-
serviceFeePercentage: e.serviceFeePercentage ?? e.service_fee_percentage ?? 0,
|
|
1203
|
-
serviceFeeCents: e.serviceFeeCents ?? e.service_fee_cents ?? 0,
|
|
1204
|
-
taxPercentage: e.taxPercentage ?? e.tax_percentage ?? 0,
|
|
1205
|
-
organizationId: e.organizationId || e.organization_id
|
|
1206
|
-
};
|
|
1207
|
-
}
|
|
1208
|
-
const yr = ct;
|
|
1209
|
-
function gr(t) {
|
|
1210
|
-
const e = t;
|
|
1211
|
-
return {
|
|
1212
|
-
serviceFeePercentage: e.serviceFeePercentage ?? e.service_fee_percentage ?? 0,
|
|
1213
|
-
serviceFeeCents: e.serviceFeeCents ?? e.service_fee_cents ?? 0,
|
|
1214
|
-
taxPercentage: e.taxPercentage ?? e.tax_percentage ?? 0
|
|
1215
|
-
};
|
|
1216
|
-
}
|
|
1217
|
-
function vr(t) {
|
|
1218
|
-
return [t.address, t.city, t.state, t.zipCode].filter(
|
|
1219
|
-
Boolean
|
|
1220
|
-
).join(", ");
|
|
1221
|
-
}
|
|
1222
|
-
export {
|
|
1223
|
-
Te as apiDelete,
|
|
1224
|
-
S as apiGet,
|
|
1225
|
-
f as apiPost,
|
|
1226
|
-
wt as apiPut,
|
|
1227
|
-
rr as applyGiftCard,
|
|
1228
|
-
Dt as applyPromoCode,
|
|
1229
|
-
ot as calculateCtaState,
|
|
1230
|
-
Tt as cancelReservation,
|
|
1231
|
-
Qt as checkCollectionPassword,
|
|
1232
|
-
Yt as checkEventPassword,
|
|
1233
|
-
ar as completeGiftCardPayment,
|
|
1234
|
-
Ct as completeReservation,
|
|
1235
|
-
cr as computeCtaState,
|
|
1236
|
-
gt as configureApi,
|
|
1237
|
-
tr as createGiftCardPurchase,
|
|
1238
|
-
St as createOrder,
|
|
1239
|
-
kt as createPaymentIntent,
|
|
1240
|
-
C as err,
|
|
1241
|
-
H as errNotFound,
|
|
1242
|
-
Et as extendCheckoutSession,
|
|
1243
|
-
gr as extractVenueFees,
|
|
1244
|
-
Gt as fetchAllVenues,
|
|
1245
|
-
Ke as fetchAllVenuesResult,
|
|
1246
|
-
qt as fetchEventDetails,
|
|
1247
|
-
ze as fetchEventDetailsResult,
|
|
1248
|
-
Mt as fetchEventPerformers,
|
|
1249
|
-
He as fetchEventPerformersResult,
|
|
1250
|
-
Lt as fetchEventTickets,
|
|
1251
|
-
Be as fetchEventTicketsResult,
|
|
1252
|
-
Jt as fetchPublicCollection,
|
|
1253
|
-
Ht as fetchSeriesOccurrences,
|
|
1254
|
-
Ze as fetchSeriesOccurrencesResult,
|
|
1255
|
-
jt as fetchVenueEvents,
|
|
1256
|
-
Je as fetchVenueEventsResult,
|
|
1257
|
-
vr as formatVenueAddress,
|
|
1258
|
-
vt as getApiConfig,
|
|
1259
|
-
at as getCDNImageUrl,
|
|
1260
|
-
bt as getCartByUUID,
|
|
1261
|
-
_t as getClientIP,
|
|
1262
|
-
J as getEventImageUrl,
|
|
1263
|
-
ht as getLegacyPublicUrl,
|
|
1264
|
-
Wt as getMonthEvents,
|
|
1265
|
-
Qe as getMonthEventsResult,
|
|
1266
|
-
It as getOrder,
|
|
1267
|
-
_ as getOrdersV2Url,
|
|
1268
|
-
zt as getOrgMonthEvents,
|
|
1269
|
-
Ye as getOrgMonthEventsResult,
|
|
1270
|
-
c as getPublicBaseUrl,
|
|
1271
|
-
Bt as getSeriesOccurrences,
|
|
1272
|
-
Xe as getSeriesOccurrencesResult,
|
|
1273
|
-
Nt as getSessionStatus,
|
|
1274
|
-
et as getVenue,
|
|
1275
|
-
er as getVenueBySlug,
|
|
1276
|
-
Zt as getVenueFees,
|
|
1277
|
-
ir as getWaitlistStatus,
|
|
1278
|
-
xt as hasPromoCodes,
|
|
1279
|
-
At as initiateOrder,
|
|
1280
|
-
Vt as isErr,
|
|
1281
|
-
Ft as isOk,
|
|
1282
|
-
sr as joinWaitlist,
|
|
1283
|
-
oe as ok,
|
|
1284
|
-
nr as removeGiftCard,
|
|
1285
|
-
Ot as removePromoCode,
|
|
1286
|
-
Kt as resolvePublicEntity,
|
|
1287
|
-
Xt as testNetworkConnection,
|
|
1288
|
-
Rt as trackUTMSource,
|
|
1289
|
-
fr as transformAvailableTicket,
|
|
1290
|
-
mr as transformEvent,
|
|
1291
|
-
pr as transformEventData,
|
|
1292
|
-
lr as transformOrder,
|
|
1293
|
-
dr as transformOrderForDisplay,
|
|
1294
|
-
ur as transformTicket,
|
|
1295
|
-
yr as transformVenue,
|
|
1296
|
-
R as unwrapOr,
|
|
1297
|
-
$t as updateCartQuantities,
|
|
1298
|
-
Pt as validatePaymentIntent,
|
|
1299
|
-
Ut as validatePromoCode,
|
|
1300
|
-
or as validateWaitlistToken
|
|
1301
|
-
};
|
|
1302
|
-
//# sourceMappingURL=api.mjs.map
|