@getmicdrop/venue-calendar 4.0.105 → 4.0.107

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