@getmicdrop/venue-calendar 3.5.5 → 3.7.0

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 (46) hide show
  1. package/dist/api/api.cjs +1 -1
  2. package/dist/api/api.cjs.map +1 -1
  3. package/dist/api/api.mjs +275 -260
  4. package/dist/api/api.mjs.map +1 -1
  5. package/dist/api/client.d.ts +0 -1
  6. package/dist/api/orders.d.ts +1 -2
  7. package/dist/venue-calendar.css +1 -1
  8. package/dist/venue-calendar.es.js +33632 -37
  9. package/dist/venue-calendar.es.js.map +1 -1
  10. package/dist/venue-calendar.iife.js +30 -46
  11. package/dist/venue-calendar.iife.js.map +1 -1
  12. package/dist/venue-calendar.umd.js +30 -46
  13. package/dist/venue-calendar.umd.js.map +1 -1
  14. package/package.json +15 -16
  15. package/src/lib/theme.js +46 -38
  16. package/dist/CarouselView.legacy-C9QYS3av.js +0 -64
  17. package/dist/CarouselView.legacy-C9QYS3av.js.map +0 -1
  18. package/dist/Checkout.legacy-CyiqW4Im.js +0 -1217
  19. package/dist/Checkout.legacy-CyiqW4Im.js.map +0 -1
  20. package/dist/CollectionView.legacy-CQeXXMOU.js +0 -374
  21. package/dist/CollectionView.legacy-CQeXXMOU.js.map +0 -1
  22. package/dist/FeaturedView.legacy-C3td2GLq.js +0 -128
  23. package/dist/FeaturedView.legacy-C3td2GLq.js.map +0 -1
  24. package/dist/GalleryView.legacy-BJwdUDNJ.js +0 -51
  25. package/dist/GalleryView.legacy-BJwdUDNJ.js.map +0 -1
  26. package/dist/GroupedListView.legacy-DWU0K8XY.js +0 -144
  27. package/dist/GroupedListView.legacy-DWU0K8XY.js.map +0 -1
  28. package/dist/SeriesPage.legacy-D-ZoVrPE.js +0 -187
  29. package/dist/SeriesPage.legacy-D-ZoVrPE.js.map +0 -1
  30. package/dist/Success.legacy-D9zlNOn7.js +0 -191
  31. package/dist/Success.legacy-D9zlNOn7.js.map +0 -1
  32. package/dist/VenueCalendar-DX2HF1GE.js +0 -37103
  33. package/dist/VenueCalendar-DX2HF1GE.js.map +0 -1
  34. package/dist/colors-BZoMuXdh.js +0 -62
  35. package/dist/colors-BZoMuXdh.js.map +0 -1
  36. package/dist/seo/HostSeoController.d.ts +0 -59
  37. package/dist/seo/buildCollectionJsonLd.d.ts +0 -7
  38. package/dist/seo/buildEventJsonLd.d.ts +0 -9
  39. package/dist/seo/buildSeriesJsonLd.d.ts +0 -6
  40. package/dist/seo/helpers.d.ts +0 -40
  41. package/dist/seo/index.d.ts +0 -9
  42. package/dist/seo/seo.cjs +0 -2
  43. package/dist/seo/seo.cjs.map +0 -1
  44. package/dist/seo/seo.mjs +0 -460
  45. package/dist/seo/seo.mjs.map +0 -1
  46. package/dist/seo/types.d.ts +0 -135
package/dist/api/api.mjs CHANGED
@@ -1,70 +1,82 @@
1
- const s = {
2
- /**
3
- * Log debug message
4
- * @param {string} message
5
- * @param {...unknown} args
6
- */
7
- debug: (e, ...r) => {
8
- },
9
- /**
10
- * Log info message
11
- * @param {string} message
12
- * @param {...unknown} args
13
- */
14
- info: (e, ...r) => {
15
- },
16
- /**
17
- * Log warning message
18
- * @param {string} message
19
- * @param {...unknown} args
20
- */
21
- warn: (e, ...r) => {
22
- },
23
- /**
24
- * Log error message
25
- * @param {string} message
26
- * @param {...unknown} args
27
- */
28
- error: (e, ...r) => {
29
- }
30
- }, w = {
1
+ const _ = {
2
+ debug: 0,
3
+ info: 1,
4
+ warn: 2,
5
+ error: 3
6
+ }, P = () => typeof window < "u" && (typeof process > "u" || process.env?.NODE_ENV !== "production");
7
+ function y(e, r = {}) {
8
+ let t = {
9
+ enabled: r.enabled ?? P(),
10
+ level: r.level ?? "debug",
11
+ prefix: e.startsWith("[") ? e : `[${e}]`
12
+ };
13
+ function o(u) {
14
+ return t.enabled && _[u] >= _[t.level];
15
+ }
16
+ function n(u, i) {
17
+ return `${t.prefix} [${u.toUpperCase()}] ${i}`;
18
+ }
19
+ return {
20
+ debug(u, ...i) {
21
+ o("debug") && console.log(n("debug", u), ...i);
22
+ },
23
+ info(u, ...i) {
24
+ o("info") && console.info(n("info", u), ...i);
25
+ },
26
+ warn(u, ...i) {
27
+ o("warn") && console.warn(n("warn", u), ...i);
28
+ },
29
+ error(u, ...i) {
30
+ o("error") && console.error(n("error", u), ...i);
31
+ },
32
+ configure(u) {
33
+ t = { ...t, ...u };
34
+ }
35
+ };
36
+ }
37
+ P();
38
+ const g = y("VC"), A = {
31
39
  baseUrl: "https://get-micdrop.com",
32
40
  timeout: 3e4,
33
- onError: (e) => s.error("API Error:", e)
41
+ onError: (e) => g.error("API Error:", e)
34
42
  };
35
- let l = { ...w };
36
- function x(e) {
37
- l = { ...l, ...e };
43
+ let d = { ...A };
44
+ function p(e) {
45
+ d = { ...d, ...e };
38
46
  }
39
- function F() {
40
- return { ...l };
47
+ function z() {
48
+ return { ...d };
41
49
  }
42
- function a() {
43
- return `${l.baseUrl}/api/v2/public`;
50
+ function s() {
51
+ return `${d.baseUrl}/api/v2/public`;
44
52
  }
45
- function N() {
46
- return `${l.baseUrl}/api/public`;
53
+ function R() {
54
+ return `${d.baseUrl}/api/public`;
47
55
  }
48
- function y() {
49
- return `${l.baseUrl}/api/orders/v2/public`;
56
+ function b() {
57
+ return `${d.baseUrl}/api/orders/v2/public`;
50
58
  }
51
- async function S() {
52
- return "";
59
+ async function T() {
60
+ try {
61
+ return (await (await fetch("https://api.ipify.org?format=json")).json()).ip || "";
62
+ } catch (e) {
63
+ return g.warn("Could not fetch client IP:", e), "";
64
+ }
53
65
  }
54
- async function U(e, r) {
55
- return m("GET", e, void 0, r);
66
+ async function M(e, r) {
67
+ return w("GET", e, void 0, r);
56
68
  }
57
- async function q(e, r, t) {
58
- return m("POST", e, r, t);
69
+ async function B(e, r, t) {
70
+ return w("POST", e, r, t);
59
71
  }
60
- async function z(e, r, t) {
61
- return m("PUT", e, r, t);
72
+ async function H(e, r, t) {
73
+ return w("PUT", e, r, t);
62
74
  }
63
- async function L(e, r) {
64
- return m("DELETE", e, void 0, r);
75
+ async function J(e, r) {
76
+ return w("DELETE", e, void 0, r);
65
77
  }
66
- async function m(e, r, t, o) {
67
- const n = r.startsWith("http") ? r : `${a()}${r}`, u = new AbortController(), i = setTimeout(() => u.abort(), l.timeout);
78
+ async function w(e, r, t, o) {
79
+ const n = r.startsWith("http") ? r : `${s()}${r}`, u = new AbortController(), i = setTimeout(() => u.abort(), d.timeout);
68
80
  try {
69
81
  const c = await fetch(n, {
70
82
  method: e,
@@ -78,12 +90,12 @@ async function m(e, r, t, o) {
78
90
  ...o
79
91
  });
80
92
  if (clearTimeout(i), !c.ok) {
81
- const d = await c.json().catch(() => ({})), g = new Error(
82
- d.error || d.message || `HTTP ${c.status}`
93
+ const f = await c.json().catch(() => ({})), C = new Error(
94
+ f.error || f.message || `HTTP ${c.status}`
83
95
  );
84
- return l.onError(g), {
96
+ return d.onError(C), {
85
97
  success: !1,
86
- error: d.error || d.message || `HTTP ${c.status}`,
98
+ error: f.error || f.message || `HTTP ${c.status}`,
87
99
  statusCode: c.status
88
100
  };
89
101
  }
@@ -94,14 +106,14 @@ async function m(e, r, t, o) {
94
106
  };
95
107
  } catch (c) {
96
108
  clearTimeout(i);
97
- const f = c instanceof Error ? c.name === "AbortError" ? "Request timed out" : c.message : "Unknown error";
98
- return l.onError(c instanceof Error ? c : new Error(f)), {
109
+ const h = c instanceof Error ? c.name === "AbortError" ? "Request timed out" : c.message : "Unknown error";
110
+ return d.onError(c instanceof Error ? c : new Error(h)), {
99
111
  success: !1,
100
- error: f
112
+ error: h
101
113
  };
102
114
  }
103
115
  }
104
- async function _(e, r) {
116
+ async function D(e, r) {
105
117
  try {
106
118
  const t = await fetch(e, {
107
119
  credentials: "include",
@@ -109,17 +121,18 @@ async function _(e, r) {
109
121
  });
110
122
  if (!t.ok) {
111
123
  const o = await t.json().catch(() => ({}));
112
- return s.error(`API request failed: ${t.status}`, o), null;
124
+ return g.error(`API request failed: ${t.status}`, o), null;
113
125
  }
114
126
  return t.json();
115
127
  } catch (t) {
116
- return s.error("API request error:", t), null;
128
+ return g.error("API request error:", t), null;
117
129
  }
118
130
  }
119
- async function R(e, r, t) {
131
+ const l = y("VC");
132
+ async function E(e, r) {
120
133
  try {
121
- const o = await fetch(
122
- `${y()}/cart/${e}/payment-intent`,
134
+ const t = await fetch(
135
+ `${b()}/cart/${e}/payment-intent`,
123
136
  {
124
137
  method: "POST",
125
138
  headers: {
@@ -127,25 +140,24 @@ async function R(e, r, t) {
127
140
  },
128
141
  credentials: "include",
129
142
  body: JSON.stringify({
130
- productQuantities: r,
131
- ...t && Object.keys(t).length > 0 ? { donationAmounts: t } : {}
143
+ productQuantities: r
132
144
  })
133
145
  }
134
146
  );
135
- if (!o.ok) {
136
- const u = await o.json().catch(() => ({}));
137
- throw s.error("Payment intent creation failed:", u), new Error(u.error || "Failed to create payment intent");
147
+ if (!t.ok) {
148
+ const n = await t.json().catch(() => ({}));
149
+ throw l.error("Payment intent creation failed:", n), new Error(n.error || "Failed to create payment intent");
138
150
  }
139
- const n = await o.json();
140
- return s.debug("Payment intent created:", n), n;
141
- } catch (o) {
142
- return s.error("createPaymentIntent error:", o), null;
151
+ const o = await t.json();
152
+ return l.debug("Payment intent created:", o), o;
153
+ } catch (t) {
154
+ return l.error("createPaymentIntent error:", t), null;
143
155
  }
144
156
  }
145
- async function T(e) {
157
+ async function W(e) {
146
158
  try {
147
159
  const r = await fetch(
148
- `${a()}/orders/complete/${e}`,
160
+ `${s()}/orders/complete/${e}`,
149
161
  {
150
162
  method: "POST",
151
163
  headers: {
@@ -161,13 +173,13 @@ async function T(e) {
161
173
  error: (await r.json().catch(() => ({}))).error || "Failed to complete reservation"
162
174
  };
163
175
  } catch (r) {
164
- return s.error("Error completing reservation:", r), { success: !1, error: "Network error completing reservation" };
176
+ return l.error("Error completing reservation:", r), { success: !1, error: "Network error completing reservation" };
165
177
  }
166
178
  }
167
- async function M(e) {
179
+ async function G(e) {
168
180
  try {
169
181
  const r = await fetch(
170
- `${a()}/orders/cancel/${e}`,
182
+ `${s()}/orders/cancel/${e}`,
171
183
  {
172
184
  method: "POST",
173
185
  headers: {
@@ -183,12 +195,12 @@ async function M(e) {
183
195
  error: (await r.json().catch(() => ({}))).error || "Failed to cancel reservation"
184
196
  };
185
197
  } catch (r) {
186
- return s.error("Error cancelling reservation:", r), { success: !1, error: "Network error cancelling reservation" };
198
+ return l.error("Error cancelling reservation:", r), { success: !1, error: "Network error cancelling reservation" };
187
199
  }
188
200
  }
189
- async function B(e, r) {
201
+ async function O(e, r) {
190
202
  try {
191
- const t = await fetch(`${a()}/orders/create`, {
203
+ const t = await fetch(`${s()}/orders/create`, {
192
204
  method: "POST",
193
205
  headers: {
194
206
  "Content-Type": "application/json"
@@ -200,20 +212,20 @@ async function B(e, r) {
200
212
  });
201
213
  if (!t.ok) {
202
214
  const o = await t.json().catch(() => ({}));
203
- return s.error("Create order failed:", o), null;
215
+ return l.error("Create order failed:", o), null;
204
216
  }
205
217
  return t.json();
206
218
  } catch (t) {
207
- return s.error("createOrder error:", t), null;
219
+ return l.error("createOrder error:", t), null;
208
220
  }
209
221
  }
210
- async function H(e) {
211
- return _(`${a()}/orders/${e}`);
222
+ async function Q(e) {
223
+ return D(`${s()}/orders/${e}`);
212
224
  }
213
- async function J(e, r) {
225
+ async function K(e, r) {
214
226
  try {
215
227
  const t = await fetch(
216
- `${y()}/validatePaymentIntent/${e}`,
228
+ `${b()}/validatePaymentIntent/${e}`,
217
229
  {
218
230
  method: "POST",
219
231
  headers: {
@@ -224,7 +236,7 @@ async function J(e, r) {
224
236
  );
225
237
  if (!t.ok) {
226
238
  const n = await t.json().catch(() => ({}));
227
- return s.error("Payment validation failed:", n), {
239
+ return l.error("Payment validation failed:", n), {
228
240
  success: !1,
229
241
  status: "failed",
230
242
  error: n.error || "Payment validation failed"
@@ -237,12 +249,12 @@ async function J(e, r) {
237
249
  orderUUID: o.orderUUID || o.uuid
238
250
  };
239
251
  } catch (t) {
240
- return s.error("validatePaymentIntent error:", t), null;
252
+ return l.error("validatePaymentIntent error:", t), null;
241
253
  }
242
254
  }
243
- async function W(e) {
255
+ async function X(e) {
244
256
  try {
245
- const r = await fetch(`${a()}/orders/extend-session`, {
257
+ const r = await fetch(`${s()}/orders/extend-session`, {
246
258
  method: "POST",
247
259
  headers: {
248
260
  "Content-Type": "application/json"
@@ -261,13 +273,13 @@ async function W(e) {
261
273
  remainingExtensions: t.remainingExtensions
262
274
  };
263
275
  } catch (r) {
264
- return s.error("Error extending checkout session:", r), { success: !1, error: "Network error extending session" };
276
+ return l.error("Error extending checkout session:", r), { success: !1, error: "Network error extending session" };
265
277
  }
266
278
  }
267
- async function p(e) {
279
+ async function Y(e) {
268
280
  try {
269
281
  const r = await fetch(
270
- `${a()}/orders/session/${e}`
282
+ `${s()}/orders/session/${e}`
271
283
  );
272
284
  if (!r.ok)
273
285
  return { error: (await r.json().catch(() => ({}))).error || "No active session found" };
@@ -280,12 +292,12 @@ async function p(e) {
280
292
  reservationCount: t.reservationCount
281
293
  };
282
294
  } catch (r) {
283
- return s.error("Error getting session status:", r), { error: "Network error getting session status" };
295
+ return l.error("Error getting session status:", r), { error: "Network error getting session status" };
284
296
  }
285
297
  }
286
- async function G(e = {}) {
298
+ async function Z(e = {}) {
287
299
  try {
288
- const r = await fetch(`${a()}/orders/create`, {
300
+ const r = await fetch(`${s()}/orders/create`, {
289
301
  method: "POST",
290
302
  headers: {
291
303
  "Content-Type": "application/json"
@@ -294,30 +306,31 @@ async function G(e = {}) {
294
306
  });
295
307
  if (!r.ok) {
296
308
  const o = await r.json().catch(() => ({}));
297
- return s.error("Order initiation failed:", o), null;
309
+ return l.error("Order initiation failed:", o), null;
298
310
  }
299
311
  return (await r.json()).uuid;
300
312
  } catch (r) {
301
- return s.error("initiateOrder error:", r), null;
313
+ return l.error("initiateOrder error:", r), null;
302
314
  }
303
315
  }
304
- async function O(e) {
316
+ async function V(e) {
305
317
  if (typeof window > "u") return;
306
318
  const t = new URLSearchParams(window.location.search).get("utm_source") || "Direct";
307
319
  try {
308
320
  await fetch(
309
- `${a()}/utm/${e}/${encodeURIComponent(t)}`
321
+ `${s()}/utm/${e}/${encodeURIComponent(t)}`
310
322
  );
311
323
  } catch (o) {
312
- s.error("UTM tracking failed:", o);
324
+ l.error("UTM tracking failed:", o);
313
325
  }
314
326
  }
315
- async function Q(e, r) {
327
+ const $ = y("VC");
328
+ async function ee(e, r) {
316
329
  try {
317
330
  if (!r || !r.trim())
318
331
  return { valid: !1, error: "Promo code is required" };
319
332
  const t = encodeURIComponent(r.trim()), o = await fetch(
320
- `${a()}/promo-codes/validate/${e}/${t}`
333
+ `${s()}/promo-codes/validate/${e}/${t}`
321
334
  );
322
335
  if (!o.ok)
323
336
  return o.status === 404 ? { valid: !1, error: "Invalid promo code" } : { valid: !1, error: (await o.json().catch(() => ({}))).error || "Failed to validate code" };
@@ -332,23 +345,23 @@ async function Q(e, r) {
332
345
  code: n.code || r
333
346
  };
334
347
  } catch (t) {
335
- return s.error("Error validating promo code:", t), { valid: !1, error: "Network error validating code" };
348
+ return $.error("Error validating promo code:", t), { valid: !1, error: "Network error validating code" };
336
349
  }
337
350
  }
338
- async function E(e) {
351
+ async function re(e) {
339
352
  try {
340
353
  const r = await fetch(
341
- `${a()}/promo-codes/check/${e}`
354
+ `${s()}/promo-codes/check/${e}`
342
355
  );
343
356
  return r.ok ? (await r.json()).hasPromoCodes === !0 : !0;
344
357
  } catch (r) {
345
- return s.error("Error checking promo codes availability:", r), !0;
358
+ return $.error("Error checking promo codes availability:", r), !0;
346
359
  }
347
360
  }
348
- async function K(e, r) {
361
+ async function te(e, r) {
349
362
  try {
350
363
  const t = await fetch(
351
- `${a()}/orders/${e}/apply-promo`,
364
+ `${s()}/orders/${e}/apply-promo`,
352
365
  {
353
366
  method: "POST",
354
367
  headers: {
@@ -362,13 +375,13 @@ async function K(e, r) {
362
375
  error: (await t.json().catch(() => ({}))).error || "Failed to apply promo code"
363
376
  };
364
377
  } catch (t) {
365
- return s.error("Error applying promo code:", t), { success: !1, error: "Network error applying code" };
378
+ return $.error("Error applying promo code:", t), { success: !1, error: "Network error applying code" };
366
379
  }
367
380
  }
368
- async function X(e) {
381
+ async function oe(e) {
369
382
  try {
370
383
  const r = await fetch(
371
- `${a()}/orders/${e}/remove-promo`,
384
+ `${s()}/orders/${e}/remove-promo`,
372
385
  {
373
386
  method: "POST",
374
387
  headers: {
@@ -381,41 +394,42 @@ async function X(e) {
381
394
  error: (await r.json().catch(() => ({}))).error || "Failed to remove promo code"
382
395
  };
383
396
  } catch (r) {
384
- return s.error("Error removing promo code:", r), { success: !1, error: "Network error removing code" };
397
+ return $.error("Error removing promo code:", r), { success: !1, error: "Network error removing code" };
385
398
  }
386
399
  }
387
- async function Y(e, r = fetch) {
400
+ const a = y("VC");
401
+ async function ne(e, r = fetch) {
388
402
  try {
389
- const t = await r(`${a()}/events/${e}`);
403
+ const t = await r(`${s()}/events/${e}`);
390
404
  if (!t.ok)
391
405
  throw new Error(`Failed to fetch event details: ${t.status}`);
392
406
  return t.json();
393
407
  } catch (t) {
394
- return s.error("Error fetching event details:", t), null;
408
+ return a.error("Error fetching event details:", t), null;
395
409
  }
396
410
  }
397
- async function Z(e) {
411
+ async function se(e) {
398
412
  try {
399
413
  const r = await fetch(
400
- `${a()}/tickets/event/${e}`
414
+ `${s()}/tickets/event/${e}`
401
415
  );
402
416
  if (!r.ok)
403
417
  throw new Error(`Failed to fetch tickets: ${r.status}`);
404
418
  const t = await r.json();
405
419
  return Array.isArray(t) ? t : [];
406
420
  } catch (r) {
407
- return s.error("Error fetching tickets:", r), [];
421
+ return a.error("Error fetching tickets:", r), [];
408
422
  }
409
423
  }
410
- async function V(e) {
424
+ async function ae(e) {
411
425
  try {
412
426
  if (!e)
413
- return s.warn("fetchEventPerformers called without eventId"), { performers: [], showPerformers: !1 };
427
+ return a.warn("fetchEventPerformers called without eventId"), { performers: [], showPerformers: !1 };
414
428
  const r = await fetch(
415
- `${a()}/events/${e}/performers`
429
+ `${s()}/events/${e}/performers`
416
430
  );
417
431
  if (!r.ok)
418
- return s.error(
432
+ return a.error(
419
433
  `Failed to fetch performers: ${r.status} ${r.statusText}`
420
434
  ), { performers: [], showPerformers: !1 };
421
435
  const t = await r.json();
@@ -424,170 +438,171 @@ async function V(e) {
424
438
  showPerformers: t.showPerformers === !0
425
439
  };
426
440
  } catch (r) {
427
- return s.error("Error fetching event performers:", r), { performers: [], showPerformers: !1 };
441
+ return a.error("Error fetching event performers:", r), { performers: [], showPerformers: !1 };
428
442
  }
429
443
  }
430
- async function ee(e) {
444
+ async function ce(e) {
431
445
  try {
432
446
  if (!e)
433
- return s.warn("fetchAllVenues called without orgId"), [];
447
+ return a.warn("fetchAllVenues called without orgId"), [];
434
448
  const r = await fetch(
435
- `${a()}/venues/organization/${e}`
449
+ `${s()}/venues/organization/${e}`
436
450
  );
437
451
  if (!r.ok)
438
- return s.error(
452
+ return a.error(
439
453
  `Failed to fetch venues: ${r.status} ${r.statusText}`
440
454
  ), [];
441
455
  const t = await r.json();
442
456
  return Array.isArray(t) ? t : [];
443
457
  } catch (r) {
444
- return s.error("Error fetching venues:", r), [];
458
+ return a.error("Error fetching venues:", r), [];
445
459
  }
446
460
  }
447
- async function re(e) {
461
+ async function ie(e) {
448
462
  try {
449
463
  if (!e)
450
- return s.warn("fetchVenueEvents called without venueId"), [];
464
+ return a.warn("fetchVenueEvents called without venueId"), [];
451
465
  const r = await fetch(
452
- `${a()}/events/venue/${e}`
466
+ `${s()}/events/venue/${e}`
453
467
  );
454
468
  if (!r.ok)
455
- return s.error(
469
+ return a.error(
456
470
  `Failed to fetch venue events: ${r.status} ${r.statusText}`
457
471
  ), [];
458
472
  const t = await r.json();
459
473
  return Array.isArray(t) ? t : [];
460
474
  } catch (r) {
461
- return s.error("Error fetching venue events:", r), [];
475
+ return a.error("Error fetching venue events:", r), [];
462
476
  }
463
477
  }
464
- async function te(e, r, t) {
478
+ async function ue(e, r, t) {
465
479
  try {
466
480
  const o = await fetch(
467
- `${a()}/events/venue/${e}/month/${r}/${t}`
481
+ `${s()}/events/venue/${e}/month/${r}/${t}`
468
482
  );
469
483
  if (!o.ok)
470
- return s.error(`Failed to fetch month events: ${o.status}`), [];
484
+ return a.error(`Failed to fetch month events: ${o.status}`), [];
471
485
  const n = await o.json();
472
486
  return Array.isArray(n.events) ? n.events : Array.isArray(n) ? n : [];
473
487
  } catch (o) {
474
- return s.error("Error fetching month events:", o), [];
488
+ return a.error("Error fetching month events:", o), [];
475
489
  }
476
490
  }
477
- async function oe(e, r, t) {
491
+ async function le(e, r, t) {
478
492
  try {
479
493
  const o = await fetch(
480
- `${a()}/events/organization/${e}/month/${r}/${t}`
494
+ `${s()}/events/organization/${e}/month/${r}/${t}`
481
495
  );
482
496
  if (!o.ok)
483
- return s.error(`Failed to fetch org month events: ${o.status}`), [];
497
+ return a.error(`Failed to fetch org month events: ${o.status}`), [];
484
498
  const n = await o.json();
485
499
  return Array.isArray(n.events) ? n.events : Array.isArray(n) ? n : [];
486
500
  } catch (o) {
487
- return s.error("Error fetching org month events:", o), [];
501
+ return a.error("Error fetching org month events:", o), [];
488
502
  }
489
503
  }
490
- async function se(e) {
504
+ async function de(e) {
491
505
  try {
492
506
  const r = await fetch(
493
- `${a()}/series/${e}/occurrences`
507
+ `${s()}/series/${e}/occurrences`
494
508
  );
495
- return r.ok ? r.json() : (s.error(`Failed to fetch series occurrences: ${r.status}`), null);
509
+ return r.ok ? r.json() : (a.error(`Failed to fetch series occurrences: ${r.status}`), null);
496
510
  } catch (r) {
497
- return s.error("Error fetching series occurrences:", r), null;
511
+ return a.error("Error fetching series occurrences:", r), null;
498
512
  }
499
513
  }
500
- async function ne(e, r) {
514
+ async function fe(e, r) {
501
515
  try {
502
516
  const t = await fetch(
503
- `${a()}/series/${e}/occurrences?venueId=${r}`
517
+ `${s()}/series/${e}/occurrences?venueId=${r}`
504
518
  );
505
- return t.ok ? t.json() : (s.error(`Failed to fetch series with CTA: ${t.status}`), null);
519
+ return t.ok ? t.json() : (a.error(`Failed to fetch series with CTA: ${t.status}`), null);
506
520
  } catch (t) {
507
- return s.error("Error fetching series occurrences:", t), null;
521
+ return a.error("Error fetching series occurrences:", t), null;
508
522
  }
509
523
  }
510
- async function ae(e) {
524
+ async function me(e) {
511
525
  try {
512
526
  const r = await fetch(
513
- `${a()}/series/${e}/page`
527
+ `${s()}/series/${e}/page`
514
528
  );
515
529
  if (!r.ok)
516
530
  throw new Error(`Failed to fetch series page: ${r.status}`);
517
531
  return r.json();
518
532
  } catch (r) {
519
- return s.error("Error fetching series page:", r), null;
533
+ return a.error("Error fetching series page:", r), null;
520
534
  }
521
535
  }
522
- async function ce(e, r) {
536
+ async function he(e, r) {
523
537
  try {
524
- const t = r ? `${a()}/collections/${e}/public?password=${encodeURIComponent(r)}` : `${a()}/collections/${e}/public`, o = await fetch(t);
538
+ const t = r ? `${s()}/collections/${e}/public?password=${encodeURIComponent(r)}` : `${s()}/collections/${e}/public`, o = await fetch(t);
525
539
  if (!o.ok)
526
540
  throw new Error(`Failed to fetch collection: ${o.status}`);
527
541
  return o.json();
528
542
  } catch (t) {
529
- return s.error("Error fetching collection:", t), null;
543
+ return a.error("Error fetching collection:", t), null;
530
544
  }
531
545
  }
532
- async function ie(e, r) {
546
+ async function ye(e, r) {
533
547
  try {
534
548
  const t = encodeURIComponent(r), o = await fetch(
535
- `${a()}/collections/${e}/check-password/${t}`
549
+ `${s()}/collections/${e}/check-password/${t}`
536
550
  );
537
551
  return o.ok ? (await o.json()).valid === !0 : !1;
538
552
  } catch (t) {
539
- return s.error("Error checking collection password:", t), !1;
553
+ return a.error("Error checking collection password:", t), !1;
540
554
  }
541
555
  }
542
- async function ue(e, r) {
556
+ async function ge(e, r) {
543
557
  try {
544
558
  const t = encodeURIComponent(r), o = await fetch(
545
- `${a()}/events/${e}/check-password/${t}`
559
+ `${s()}/events/${e}/check-password/${t}`
546
560
  );
547
561
  return o.ok ? (await o.json()).valid === !0 : !1;
548
562
  } catch (t) {
549
- return s.error("Error checking event password:", t), !1;
563
+ return a.error("Error checking event password:", t), !1;
550
564
  }
551
565
  }
552
- async function le(e, r) {
566
+ async function we(e, r) {
553
567
  try {
554
- const t = r ? `${a()}/events/venue/${r}` : e ? `${a()}/venues/organization/${e}` : `${a()}/health`;
568
+ const t = r ? `${s()}/events/venue/${r}` : e ? `${s()}/venues/organization/${e}` : `${s()}/health`;
555
569
  return (await fetch(t, {
556
570
  method: "HEAD"
557
571
  })).ok;
558
572
  } catch (t) {
559
- return s.error("Network connection test failed:", t), !1;
573
+ return a.error("Network connection test failed:", t), !1;
560
574
  }
561
575
  }
562
- async function $(e) {
576
+ const m = y("VC");
577
+ async function I(e) {
563
578
  try {
564
579
  if (!e)
565
- return s.warn("getVenue called without venueId"), null;
566
- const r = await fetch(`${a()}/venues/${e}`);
567
- return r.ok ? r.json() : (s.error(`Failed to fetch venue: ${r.status}`), null);
580
+ return m.warn("getVenue called without venueId"), null;
581
+ const r = await fetch(`${s()}/venues/${e}`);
582
+ return r.ok ? r.json() : (m.error(`Failed to fetch venue: ${r.status}`), null);
568
583
  } catch (r) {
569
- return s.error("Error fetching venue:", r), null;
584
+ return m.error("Error fetching venue:", r), null;
570
585
  }
571
586
  }
572
- async function de(e) {
573
- const r = await $(e);
587
+ async function $e(e) {
588
+ const r = await I(e);
574
589
  return r ? {
575
590
  serviceFeePercentage: r.serviceFeePercentage ?? 0,
576
591
  serviceFeeCents: r.serviceFeeCents ?? 0,
577
592
  taxPercentage: r.taxPercentage ?? 0
578
593
  } : null;
579
594
  }
580
- async function fe(e) {
595
+ async function _e(e) {
581
596
  try {
582
597
  if (!e)
583
- return s.warn("getVenueBySlug called without slug"), null;
584
- const r = encodeURIComponent(e), t = await fetch(`${a()}/venues/slug/${r}`);
585
- return t.ok ? t.json() : (s.error(`Failed to fetch venue by slug: ${t.status}`), null);
598
+ return m.warn("getVenueBySlug called without slug"), null;
599
+ const r = encodeURIComponent(e), t = await fetch(`${s()}/venues/slug/${r}`);
600
+ return t.ok ? t.json() : (m.error(`Failed to fetch venue by slug: ${t.status}`), null);
586
601
  } catch (r) {
587
- return s.error("Error fetching venue by slug:", r), null;
602
+ return m.error("Error fetching venue by slug:", r), null;
588
603
  }
589
604
  }
590
- function v(e) {
605
+ function j(e) {
591
606
  return {
592
607
  uuid: e.uuid || String(e.id || e.ID || ""),
593
608
  id: e.id || e.ID,
@@ -604,7 +619,7 @@ function v(e) {
604
619
  checkedInAt: e.checkedInAt || e.checked_in_at
605
620
  };
606
621
  }
607
- function P(e) {
622
+ function k(e) {
608
623
  const r = e.purchasedTickets || e.tickets || e.purchased_tickets || [];
609
624
  return {
610
625
  uuid: e.uuid || String(e.id || e.ID || ""),
@@ -620,13 +635,13 @@ function P(e) {
620
635
  discount: e.discount || 0,
621
636
  paymentIntentId: e.paymentIntentId || e.payment_intent_id,
622
637
  paymentMethod: e.paymentMethod || e.payment_method,
623
- purchasedTickets: r.map(v),
638
+ purchasedTickets: r.map(j),
624
639
  createdAt: e.createdAt || e.created_at,
625
640
  updatedAt: e.updatedAt || e.updated_at
626
641
  };
627
642
  }
628
- function me(e) {
629
- const r = P(e), t = r.uuid.split("-")[0] || r.uuid;
643
+ function ve(e) {
644
+ const r = k(e), t = r.uuid.split("-")[0] || r.uuid;
630
645
  return {
631
646
  orderId: r.uuid,
632
647
  displayOrderId: t,
@@ -638,15 +653,15 @@ function me(e) {
638
653
  status: r.status
639
654
  };
640
655
  }
641
- const b = "https://micdrop-images.sfo3.digitaloceanspaces.com";
642
- function C(e) {
643
- return e ? e.startsWith("http") ? e : `${b}/${e.replace(/^\//, "")}` : "";
656
+ const N = "https://micdrop-images.sfo3.digitaloceanspaces.com";
657
+ function x(e) {
658
+ return e ? e.startsWith("http") ? e : `${N}/${e.replace(/^\//, "")}` : "";
644
659
  }
645
- function h(e) {
660
+ function v(e) {
646
661
  const r = e.imageUrl || e.imageURL || e.image_url || e.image || "";
647
- return C(r);
662
+ return x(r);
648
663
  }
649
- function D(e) {
664
+ function S(e) {
650
665
  const r = e.ctaState || e.cta_state;
651
666
  if (r)
652
667
  return r;
@@ -663,11 +678,11 @@ function D(e) {
663
678
  return o <= 0 ? "sold_out" : "available";
664
679
  const n = e.availableTickets || e.available_tickets || e.tickets || [];
665
680
  return n.length === 0 ? "coming_soon" : n.reduce((i, c) => {
666
- const f = c.quantityAvailable ?? c.quantity_available ?? c.quantity ?? 0, d = c.quantitySold ?? c.quantity_sold ?? 0;
667
- return i + Math.max(0, f - d);
681
+ const h = c.quantityAvailable ?? c.quantity_available ?? c.quantity ?? 0, f = c.quantitySold ?? c.quantity_sold ?? 0;
682
+ return i + Math.max(0, h - f);
668
683
  }, 0) <= 0 ? "sold_out" : "available";
669
684
  }
670
- function A(e) {
685
+ function F(e) {
671
686
  return {
672
687
  id: e.id || e.ID,
673
688
  name: e.name || e.ticketName || "",
@@ -687,8 +702,8 @@ function A(e) {
687
702
  sortOrder: e.sortOrder || e.sort_order || 0
688
703
  };
689
704
  }
690
- function I(e) {
691
- const t = (e.availableTickets || e.available_tickets || e.tickets || []).map(A), o = t.map((i) => i.price).filter((i) => i > 0), n = o.length > 0 ? Math.min(...o) : void 0, u = o.length > 0 ? Math.max(...o) : void 0;
705
+ function U(e) {
706
+ const t = (e.availableTickets || e.available_tickets || e.tickets || []).map(F), o = t.map((i) => i.price).filter((i) => i > 0), n = o.length > 0 ? Math.min(...o) : void 0, u = o.length > 0 ? Math.max(...o) : void 0;
692
707
  return {
693
708
  eventID: e.eventID || e.id || e.ID || 0,
694
709
  id: e.id || e.ID,
@@ -705,8 +720,8 @@ function I(e) {
705
720
  venueName: e.venueName || e.venue_name,
706
721
  venueAddress: e.venueAddress || e.venue_address,
707
722
  location: e.location || e.venueAddress || e.venue_address,
708
- imageUrl: h(e),
709
- imageURL: h(e),
723
+ imageUrl: v(e),
724
+ imageURL: v(e),
710
725
  status: e.status,
711
726
  isPublished: e.isPublished ?? e.is_published,
712
727
  isCancelled: e.isCancelled ?? e.is_cancelled,
@@ -716,17 +731,17 @@ function I(e) {
716
731
  minPrice: e.minPrice ?? e.min_price ?? n,
717
732
  maxPrice: e.maxPrice ?? e.max_price ?? u,
718
733
  ctaText: e.ctaText || e.cta_text,
719
- ctaState: D(e),
734
+ ctaState: S(e),
720
735
  showPerformers: e.showPerformers ?? e.show_performers,
721
736
  eventSeriesId: e.eventSeriesId || e.event_series_id,
722
737
  seriesInstanceNumber: e.seriesInstanceNumber || e.series_instance_number
723
738
  };
724
739
  }
725
- const he = I, j = "https://micdrop-images.sfo3.digitaloceanspaces.com";
726
- function k(e) {
727
- return e ? e.startsWith("http") ? e : `${j}/${e.replace(/^\//, "")}` : "";
740
+ const Pe = U, q = "https://micdrop-images.sfo3.digitaloceanspaces.com";
741
+ function L(e) {
742
+ return e ? e.startsWith("http") ? e : `${q}/${e.replace(/^\//, "")}` : "";
728
743
  }
729
- function ye(e) {
744
+ function be(e) {
730
745
  const r = e.logoUrl || e.logo_url || e.logo;
731
746
  return {
732
747
  id: e.id || e.ID || 0,
@@ -739,21 +754,21 @@ function ye(e) {
739
754
  zipCode: e.zipCode || e.zip_code,
740
755
  country: e.country,
741
756
  timezone: e.timezone || e.time_zone,
742
- logoUrl: k(r),
757
+ logoUrl: L(r),
743
758
  serviceFeePercentage: e.serviceFeePercentage ?? e.service_fee_percentage ?? 0,
744
759
  serviceFeeCents: e.serviceFeeCents ?? e.service_fee_cents ?? 0,
745
760
  taxPercentage: e.taxPercentage ?? e.tax_percentage ?? 0,
746
761
  organizationId: e.organizationId || e.organization_id
747
762
  };
748
763
  }
749
- function ge(e) {
764
+ function Ce(e) {
750
765
  return {
751
766
  serviceFeePercentage: e.serviceFeePercentage ?? e.service_fee_percentage ?? 0,
752
767
  serviceFeeCents: e.serviceFeeCents ?? e.service_fee_cents ?? 0,
753
768
  taxPercentage: e.taxPercentage ?? e.tax_percentage ?? 0
754
769
  };
755
770
  }
756
- function we(e) {
771
+ function Ae(e) {
757
772
  return [
758
773
  e.address,
759
774
  e.city,
@@ -762,58 +777,58 @@ function we(e) {
762
777
  ].filter(Boolean).join(", ");
763
778
  }
764
779
  export {
765
- L as apiDelete,
766
- U as apiGet,
767
- q as apiPost,
768
- z as apiPut,
769
- K as applyPromoCode,
770
- D as calculateCtaState,
771
- M as cancelReservation,
772
- ie as checkCollectionPassword,
773
- ue as checkEventPassword,
774
- T as completeReservation,
775
- x as configureApi,
776
- B as createOrder,
777
- R as createPaymentIntent,
778
- W as extendCheckoutSession,
779
- ge as extractVenueFees,
780
- ee as fetchAllVenues,
781
- Y as fetchEventDetails,
782
- V as fetchEventPerformers,
783
- Z as fetchEventTickets,
784
- ce as fetchPublicCollection,
785
- ne as fetchSeriesOccurrences,
786
- ae as fetchSeriesPage,
787
- re as fetchVenueEvents,
788
- we as formatVenueAddress,
789
- F as getApiConfig,
790
- C as getCDNImageUrl,
791
- S as getClientIP,
792
- h as getEventImageUrl,
793
- N as getLegacyPublicUrl,
794
- te as getMonthEvents,
795
- H as getOrder,
796
- y as getOrdersV2Url,
797
- oe as getOrgMonthEvents,
798
- a as getPublicBaseUrl,
799
- se as getSeriesOccurrences,
800
- p as getSessionStatus,
801
- $ as getVenue,
802
- fe as getVenueBySlug,
803
- de as getVenueFees,
804
- E as hasPromoCodes,
805
- G as initiateOrder,
806
- X as removePromoCode,
807
- le as testNetworkConnection,
808
- O as trackUTMSource,
809
- A as transformAvailableTicket,
810
- I as transformEvent,
811
- he as transformEventData,
812
- P as transformOrder,
813
- me as transformOrderForDisplay,
814
- v as transformTicket,
815
- ye as transformVenue,
816
- J as validatePaymentIntent,
817
- Q as validatePromoCode
780
+ J as apiDelete,
781
+ M as apiGet,
782
+ B as apiPost,
783
+ H as apiPut,
784
+ te as applyPromoCode,
785
+ S as calculateCtaState,
786
+ G as cancelReservation,
787
+ ye as checkCollectionPassword,
788
+ ge as checkEventPassword,
789
+ W as completeReservation,
790
+ p as configureApi,
791
+ O as createOrder,
792
+ E as createPaymentIntent,
793
+ X as extendCheckoutSession,
794
+ Ce as extractVenueFees,
795
+ ce as fetchAllVenues,
796
+ ne as fetchEventDetails,
797
+ ae as fetchEventPerformers,
798
+ se as fetchEventTickets,
799
+ he as fetchPublicCollection,
800
+ fe as fetchSeriesOccurrences,
801
+ me as fetchSeriesPage,
802
+ ie as fetchVenueEvents,
803
+ Ae as formatVenueAddress,
804
+ z as getApiConfig,
805
+ x as getCDNImageUrl,
806
+ T as getClientIP,
807
+ v as getEventImageUrl,
808
+ R as getLegacyPublicUrl,
809
+ ue as getMonthEvents,
810
+ Q as getOrder,
811
+ b as getOrdersV2Url,
812
+ le as getOrgMonthEvents,
813
+ s as getPublicBaseUrl,
814
+ de as getSeriesOccurrences,
815
+ Y as getSessionStatus,
816
+ I as getVenue,
817
+ _e as getVenueBySlug,
818
+ $e as getVenueFees,
819
+ re as hasPromoCodes,
820
+ Z as initiateOrder,
821
+ oe as removePromoCode,
822
+ we as testNetworkConnection,
823
+ V as trackUTMSource,
824
+ F as transformAvailableTicket,
825
+ U as transformEvent,
826
+ Pe as transformEventData,
827
+ k as transformOrder,
828
+ ve as transformOrderForDisplay,
829
+ j as transformTicket,
830
+ be as transformVenue,
831
+ K as validatePaymentIntent,
832
+ ee as validatePromoCode
818
833
  };
819
834
  //# sourceMappingURL=api.mjs.map