@getmicdrop/venue-calendar 3.4.0 → 3.4.3
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/CarouselView.legacy-DdcBQB8k.js +65 -0
- package/dist/CarouselView.legacy-DdcBQB8k.js.map +1 -0
- package/dist/Checkout.legacy-ColJbEgW.js +1147 -0
- package/dist/Checkout.legacy-ColJbEgW.js.map +1 -0
- package/dist/FeaturedView.legacy-CtZabSNQ.js +128 -0
- package/dist/FeaturedView.legacy-CtZabSNQ.js.map +1 -0
- package/dist/GalleryCard-Ch072lif.js +84 -0
- package/dist/GalleryCard-Ch072lif.js.map +1 -0
- package/dist/GalleryView.legacy-CQOF_kYd.js +52 -0
- package/dist/GalleryView.legacy-CQOF_kYd.js.map +1 -0
- package/dist/GroupedListView.legacy-BWqs_hha.js +148 -0
- package/dist/GroupedListView.legacy-BWqs_hha.js.map +1 -0
- package/dist/Success.legacy-BcuRT_6P.js +191 -0
- package/dist/Success.legacy-BcuRT_6P.js.map +1 -0
- package/dist/VenueCalendar-DXZ34Hv2.js +26492 -0
- package/dist/VenueCalendar-DXZ34Hv2.js.map +1 -0
- package/dist/api/api.cjs +1 -1
- package/dist/api/api.cjs.map +1 -1
- package/dist/api/api.mjs +171 -136
- package/dist/api/api.mjs.map +1 -1
- package/dist/api/client.d.ts +2 -2
- package/dist/api/events.d.ts +31 -1
- package/dist/api/index.d.ts +3 -3
- package/dist/api/types.d.ts +61 -0
- package/dist/colors-BZoMuXdh.js +62 -0
- package/dist/colors-BZoMuXdh.js.map +1 -0
- package/dist/index-DKIxsGNJ.js +499 -0
- package/dist/index-DKIxsGNJ.js.map +1 -0
- package/dist/types/index.d.ts +24 -32
- package/dist/venue-calendar.css +1 -1
- package/dist/venue-calendar.es.js +21 -25375
- package/dist/venue-calendar.es.js.map +1 -1
- package/dist/venue-calendar.iife.js +50 -27
- package/dist/venue-calendar.iife.js.map +1 -1
- package/dist/venue-calendar.umd.js +50 -27
- package/dist/venue-calendar.umd.js.map +1 -1
- package/package.json +12 -6
- package/src/lib/theme.js +18 -10
- package/dist/index-GqsPc-C2.js +0 -479
- package/dist/index-GqsPc-C2.js.map +0 -1
package/dist/api/api.mjs
CHANGED
|
@@ -33,22 +33,22 @@ const n = {
|
|
|
33
33
|
onError: (e) => n.error("API Error:", e)
|
|
34
34
|
};
|
|
35
35
|
let u = { ...w };
|
|
36
|
-
function
|
|
36
|
+
function x(e) {
|
|
37
37
|
u = { ...u, ...e };
|
|
38
38
|
}
|
|
39
39
|
function F() {
|
|
40
40
|
return { ...u };
|
|
41
41
|
}
|
|
42
|
-
function
|
|
42
|
+
function a() {
|
|
43
43
|
return `${u.baseUrl}/api/v2/public`;
|
|
44
44
|
}
|
|
45
|
-
function
|
|
45
|
+
function N() {
|
|
46
46
|
return `${u.baseUrl}/api/public`;
|
|
47
47
|
}
|
|
48
|
-
function
|
|
49
|
-
return `${u.baseUrl}/api/orders/public`;
|
|
48
|
+
function y() {
|
|
49
|
+
return `${u.baseUrl}/api/orders/v2/public`;
|
|
50
50
|
}
|
|
51
|
-
async function
|
|
51
|
+
async function S() {
|
|
52
52
|
try {
|
|
53
53
|
return (await (await fetch("https://api.ipify.org?format=json")).json()).ip || "";
|
|
54
54
|
} catch (e) {
|
|
@@ -56,21 +56,21 @@ async function k() {
|
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
async function U(e, r) {
|
|
59
|
-
return
|
|
59
|
+
return m("GET", e, void 0, r);
|
|
60
60
|
}
|
|
61
61
|
async function q(e, r, t) {
|
|
62
|
-
return
|
|
62
|
+
return m("POST", e, r, t);
|
|
63
63
|
}
|
|
64
64
|
async function z(e, r, t) {
|
|
65
|
-
return
|
|
65
|
+
return m("PUT", e, r, t);
|
|
66
66
|
}
|
|
67
67
|
async function L(e, r) {
|
|
68
|
-
return
|
|
68
|
+
return m("DELETE", e, void 0, r);
|
|
69
69
|
}
|
|
70
|
-
async function
|
|
71
|
-
const s = r.startsWith("http") ? r : `${
|
|
70
|
+
async function m(e, r, t, o) {
|
|
71
|
+
const s = r.startsWith("http") ? r : `${a()}${r}`, l = new AbortController(), i = setTimeout(() => l.abort(), u.timeout);
|
|
72
72
|
try {
|
|
73
|
-
const
|
|
73
|
+
const c = await fetch(s, {
|
|
74
74
|
method: e,
|
|
75
75
|
headers: {
|
|
76
76
|
"Content-Type": "application/json",
|
|
@@ -78,34 +78,34 @@ async function h(e, r, t, o) {
|
|
|
78
78
|
},
|
|
79
79
|
body: t ? JSON.stringify(t) : void 0,
|
|
80
80
|
credentials: "include",
|
|
81
|
-
signal:
|
|
81
|
+
signal: l.signal,
|
|
82
82
|
...o
|
|
83
83
|
});
|
|
84
|
-
if (clearTimeout(i), !
|
|
85
|
-
const
|
|
86
|
-
|
|
84
|
+
if (clearTimeout(i), !c.ok) {
|
|
85
|
+
const d = await c.json().catch(() => ({})), g = new Error(
|
|
86
|
+
d.error || d.message || `HTTP ${c.status}`
|
|
87
87
|
);
|
|
88
88
|
return u.onError(g), {
|
|
89
89
|
success: !1,
|
|
90
|
-
error:
|
|
91
|
-
statusCode:
|
|
90
|
+
error: d.error || d.message || `HTTP ${c.status}`,
|
|
91
|
+
statusCode: c.status
|
|
92
92
|
};
|
|
93
93
|
}
|
|
94
94
|
return {
|
|
95
95
|
success: !0,
|
|
96
|
-
data: await
|
|
97
|
-
statusCode:
|
|
96
|
+
data: await c.json(),
|
|
97
|
+
statusCode: c.status
|
|
98
98
|
};
|
|
99
|
-
} catch (
|
|
99
|
+
} catch (c) {
|
|
100
100
|
clearTimeout(i);
|
|
101
|
-
const f =
|
|
102
|
-
return u.onError(
|
|
101
|
+
const f = c instanceof Error ? c.name === "AbortError" ? "Request timed out" : c.message : "Unknown error";
|
|
102
|
+
return u.onError(c instanceof Error ? c : new Error(f)), {
|
|
103
103
|
success: !1,
|
|
104
104
|
error: f
|
|
105
105
|
};
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
|
-
async function
|
|
108
|
+
async function _(e, r) {
|
|
109
109
|
try {
|
|
110
110
|
const t = await fetch(e, {
|
|
111
111
|
credentials: "include",
|
|
@@ -120,10 +120,10 @@ async function $(e, r) {
|
|
|
120
120
|
return n.error("API request error:", t), null;
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
|
-
async function
|
|
123
|
+
async function R(e, r) {
|
|
124
124
|
try {
|
|
125
125
|
const t = await fetch(
|
|
126
|
-
`${
|
|
126
|
+
`${y()}/cart/${e}/payment-intent`,
|
|
127
127
|
{
|
|
128
128
|
method: "POST",
|
|
129
129
|
headers: {
|
|
@@ -145,10 +145,10 @@ async function T(e, r) {
|
|
|
145
145
|
return n.error("createPaymentIntent error:", t), null;
|
|
146
146
|
}
|
|
147
147
|
}
|
|
148
|
-
async function
|
|
148
|
+
async function T(e) {
|
|
149
149
|
try {
|
|
150
150
|
const r = await fetch(
|
|
151
|
-
`${
|
|
151
|
+
`${a()}/orders/complete/${e}`,
|
|
152
152
|
{
|
|
153
153
|
method: "POST",
|
|
154
154
|
headers: {
|
|
@@ -167,10 +167,10 @@ async function R(e) {
|
|
|
167
167
|
return n.error("Error completing reservation:", r), { success: !1, error: "Network error completing reservation" };
|
|
168
168
|
}
|
|
169
169
|
}
|
|
170
|
-
async function
|
|
170
|
+
async function p(e) {
|
|
171
171
|
try {
|
|
172
172
|
const r = await fetch(
|
|
173
|
-
`${
|
|
173
|
+
`${a()}/orders/cancel/${e}`,
|
|
174
174
|
{
|
|
175
175
|
method: "POST",
|
|
176
176
|
headers: {
|
|
@@ -189,9 +189,9 @@ async function M(e) {
|
|
|
189
189
|
return n.error("Error cancelling reservation:", r), { success: !1, error: "Network error cancelling reservation" };
|
|
190
190
|
}
|
|
191
191
|
}
|
|
192
|
-
async function
|
|
192
|
+
async function M(e, r) {
|
|
193
193
|
try {
|
|
194
|
-
const t = await fetch(`${
|
|
194
|
+
const t = await fetch(`${a()}/orders/create`, {
|
|
195
195
|
method: "POST",
|
|
196
196
|
headers: {
|
|
197
197
|
"Content-Type": "application/json"
|
|
@@ -210,13 +210,13 @@ async function B(e, r) {
|
|
|
210
210
|
return n.error("createOrder error:", t), null;
|
|
211
211
|
}
|
|
212
212
|
}
|
|
213
|
-
async function
|
|
214
|
-
return
|
|
213
|
+
async function B(e) {
|
|
214
|
+
return _(`${a()}/orders/${e}`);
|
|
215
215
|
}
|
|
216
|
-
async function
|
|
216
|
+
async function H(e, r) {
|
|
217
217
|
try {
|
|
218
218
|
const t = await fetch(
|
|
219
|
-
`${
|
|
219
|
+
`${y()}/validatePaymentIntent/${e}`,
|
|
220
220
|
{
|
|
221
221
|
method: "POST",
|
|
222
222
|
headers: {
|
|
@@ -243,9 +243,9 @@ async function J(e, r) {
|
|
|
243
243
|
return n.error("validatePaymentIntent error:", t), null;
|
|
244
244
|
}
|
|
245
245
|
}
|
|
246
|
-
async function
|
|
246
|
+
async function J(e) {
|
|
247
247
|
try {
|
|
248
|
-
const r = await fetch(`${
|
|
248
|
+
const r = await fetch(`${a()}/orders/extend-session`, {
|
|
249
249
|
method: "POST",
|
|
250
250
|
headers: {
|
|
251
251
|
"Content-Type": "application/json"
|
|
@@ -270,7 +270,7 @@ async function O(e) {
|
|
|
270
270
|
async function W(e) {
|
|
271
271
|
try {
|
|
272
272
|
const r = await fetch(
|
|
273
|
-
`${
|
|
273
|
+
`${a()}/orders/session/${e}`
|
|
274
274
|
);
|
|
275
275
|
if (!r.ok)
|
|
276
276
|
return { error: (await r.json().catch(() => ({}))).error || "No active session found" };
|
|
@@ -288,7 +288,7 @@ async function W(e) {
|
|
|
288
288
|
}
|
|
289
289
|
async function G(e = {}) {
|
|
290
290
|
try {
|
|
291
|
-
const r = await fetch(`${
|
|
291
|
+
const r = await fetch(`${a()}/orders/create`, {
|
|
292
292
|
method: "POST",
|
|
293
293
|
headers: {
|
|
294
294
|
"Content-Type": "application/json"
|
|
@@ -304,23 +304,23 @@ async function G(e = {}) {
|
|
|
304
304
|
return n.error("initiateOrder error:", r), null;
|
|
305
305
|
}
|
|
306
306
|
}
|
|
307
|
-
async function
|
|
307
|
+
async function O(e) {
|
|
308
308
|
if (typeof window > "u") return;
|
|
309
309
|
const t = new URLSearchParams(window.location.search).get("utm_source") || "Direct";
|
|
310
310
|
try {
|
|
311
311
|
await fetch(
|
|
312
|
-
`${
|
|
312
|
+
`${a()}/utm/${e}/${encodeURIComponent(t)}`
|
|
313
313
|
);
|
|
314
314
|
} catch (o) {
|
|
315
315
|
n.error("UTM tracking failed:", o);
|
|
316
316
|
}
|
|
317
317
|
}
|
|
318
|
-
async function
|
|
318
|
+
async function Q(e, r) {
|
|
319
319
|
try {
|
|
320
320
|
if (!r || !r.trim())
|
|
321
321
|
return { valid: !1, error: "Promo code is required" };
|
|
322
322
|
const t = encodeURIComponent(r.trim()), o = await fetch(
|
|
323
|
-
`${
|
|
323
|
+
`${a()}/promo-codes/validate/${e}/${t}`
|
|
324
324
|
);
|
|
325
325
|
if (!o.ok)
|
|
326
326
|
return o.status === 404 ? { valid: !1, error: "Invalid promo code" } : { valid: !1, error: (await o.json().catch(() => ({}))).error || "Failed to validate code" };
|
|
@@ -338,20 +338,20 @@ async function K(e, r) {
|
|
|
338
338
|
return n.error("Error validating promo code:", t), { valid: !1, error: "Network error validating code" };
|
|
339
339
|
}
|
|
340
340
|
}
|
|
341
|
-
async function
|
|
341
|
+
async function E(e) {
|
|
342
342
|
try {
|
|
343
343
|
const r = await fetch(
|
|
344
|
-
`${
|
|
344
|
+
`${a()}/promo-codes/check/${e}`
|
|
345
345
|
);
|
|
346
346
|
return r.ok ? (await r.json()).hasPromoCodes === !0 : !0;
|
|
347
347
|
} catch (r) {
|
|
348
348
|
return n.error("Error checking promo codes availability:", r), !0;
|
|
349
349
|
}
|
|
350
350
|
}
|
|
351
|
-
async function
|
|
351
|
+
async function K(e, r) {
|
|
352
352
|
try {
|
|
353
353
|
const t = await fetch(
|
|
354
|
-
`${
|
|
354
|
+
`${a()}/orders/${e}/apply-promo`,
|
|
355
355
|
{
|
|
356
356
|
method: "POST",
|
|
357
357
|
headers: {
|
|
@@ -368,10 +368,10 @@ async function Y(e, r) {
|
|
|
368
368
|
return n.error("Error applying promo code:", t), { success: !1, error: "Network error applying code" };
|
|
369
369
|
}
|
|
370
370
|
}
|
|
371
|
-
async function
|
|
371
|
+
async function X(e) {
|
|
372
372
|
try {
|
|
373
373
|
const r = await fetch(
|
|
374
|
-
`${
|
|
374
|
+
`${a()}/orders/${e}/remove-promo`,
|
|
375
375
|
{
|
|
376
376
|
method: "POST",
|
|
377
377
|
headers: {
|
|
@@ -387,9 +387,9 @@ async function Z(e) {
|
|
|
387
387
|
return n.error("Error removing promo code:", r), { success: !1, error: "Network error removing code" };
|
|
388
388
|
}
|
|
389
389
|
}
|
|
390
|
-
async function
|
|
390
|
+
async function Y(e, r = fetch) {
|
|
391
391
|
try {
|
|
392
|
-
const t = await r(`${
|
|
392
|
+
const t = await r(`${a()}/events/${e}`);
|
|
393
393
|
if (!t.ok)
|
|
394
394
|
throw new Error(`Failed to fetch event details: ${t.status}`);
|
|
395
395
|
return t.json();
|
|
@@ -397,10 +397,10 @@ async function p(e, r = fetch) {
|
|
|
397
397
|
return n.error("Error fetching event details:", t), null;
|
|
398
398
|
}
|
|
399
399
|
}
|
|
400
|
-
async function
|
|
400
|
+
async function Z(e) {
|
|
401
401
|
try {
|
|
402
402
|
const r = await fetch(
|
|
403
|
-
`${
|
|
403
|
+
`${a()}/tickets/event/${e}`
|
|
404
404
|
);
|
|
405
405
|
if (!r.ok)
|
|
406
406
|
throw new Error(`Failed to fetch tickets: ${r.status}`);
|
|
@@ -415,7 +415,7 @@ async function V(e) {
|
|
|
415
415
|
if (!e)
|
|
416
416
|
return n.warn("fetchEventPerformers called without eventId"), { performers: [], showPerformers: !1 };
|
|
417
417
|
const r = await fetch(
|
|
418
|
-
`${
|
|
418
|
+
`${a()}/events/${e}/performers`
|
|
419
419
|
);
|
|
420
420
|
if (!r.ok)
|
|
421
421
|
return n.error(
|
|
@@ -435,7 +435,7 @@ async function ee(e) {
|
|
|
435
435
|
if (!e)
|
|
436
436
|
return n.warn("fetchAllVenues called without orgId"), [];
|
|
437
437
|
const r = await fetch(
|
|
438
|
-
`${
|
|
438
|
+
`${a()}/venues/organization/${e}`
|
|
439
439
|
);
|
|
440
440
|
if (!r.ok)
|
|
441
441
|
return n.error(
|
|
@@ -452,7 +452,7 @@ async function re(e) {
|
|
|
452
452
|
if (!e)
|
|
453
453
|
return n.warn("fetchVenueEvents called without venueId"), [];
|
|
454
454
|
const r = await fetch(
|
|
455
|
-
`${
|
|
455
|
+
`${a()}/events/venue/${e}`
|
|
456
456
|
);
|
|
457
457
|
if (!r.ok)
|
|
458
458
|
return n.error(
|
|
@@ -467,7 +467,7 @@ async function re(e) {
|
|
|
467
467
|
async function te(e, r, t) {
|
|
468
468
|
try {
|
|
469
469
|
const o = await fetch(
|
|
470
|
-
`${
|
|
470
|
+
`${a()}/events/venue/${e}/month/${r}/${t}`
|
|
471
471
|
);
|
|
472
472
|
if (!o.ok)
|
|
473
473
|
return n.error(`Failed to fetch month events: ${o.status}`), [];
|
|
@@ -480,7 +480,7 @@ async function te(e, r, t) {
|
|
|
480
480
|
async function oe(e, r, t) {
|
|
481
481
|
try {
|
|
482
482
|
const o = await fetch(
|
|
483
|
-
`${
|
|
483
|
+
`${a()}/events/organization/${e}/month/${r}/${t}`
|
|
484
484
|
);
|
|
485
485
|
if (!o.ok)
|
|
486
486
|
return n.error(`Failed to fetch org month events: ${o.status}`), [];
|
|
@@ -493,7 +493,7 @@ async function oe(e, r, t) {
|
|
|
493
493
|
async function ne(e) {
|
|
494
494
|
try {
|
|
495
495
|
const r = await fetch(
|
|
496
|
-
`${
|
|
496
|
+
`${a()}/series/${e}/occurrences`
|
|
497
497
|
);
|
|
498
498
|
return r.ok ? r.json() : (n.error(`Failed to fetch series occurrences: ${r.status}`), null);
|
|
499
499
|
} catch (r) {
|
|
@@ -503,26 +503,58 @@ async function ne(e) {
|
|
|
503
503
|
async function se(e, r) {
|
|
504
504
|
try {
|
|
505
505
|
const t = await fetch(
|
|
506
|
-
`${
|
|
506
|
+
`${a()}/series/${e}/occurrences?venueId=${r}`
|
|
507
507
|
);
|
|
508
508
|
return t.ok ? t.json() : (n.error(`Failed to fetch series with CTA: ${t.status}`), null);
|
|
509
509
|
} catch (t) {
|
|
510
510
|
return n.error("Error fetching series occurrences:", t), null;
|
|
511
511
|
}
|
|
512
512
|
}
|
|
513
|
-
async function ae(e
|
|
513
|
+
async function ae(e) {
|
|
514
|
+
try {
|
|
515
|
+
const r = await fetch(
|
|
516
|
+
`${a()}/series/${e}/page`
|
|
517
|
+
);
|
|
518
|
+
if (!r.ok)
|
|
519
|
+
throw new Error(`Failed to fetch series page: ${r.status}`);
|
|
520
|
+
return r.json();
|
|
521
|
+
} catch (r) {
|
|
522
|
+
return n.error("Error fetching series page:", r), null;
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
async function ce(e, r) {
|
|
526
|
+
try {
|
|
527
|
+
const t = r ? `${a()}/collections/${e}/public?password=${encodeURIComponent(r)}` : `${a()}/collections/${e}/public`, o = await fetch(t);
|
|
528
|
+
if (!o.ok)
|
|
529
|
+
throw new Error(`Failed to fetch collection: ${o.status}`);
|
|
530
|
+
return o.json();
|
|
531
|
+
} catch (t) {
|
|
532
|
+
return n.error("Error fetching collection:", t), null;
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
async function ie(e, r) {
|
|
536
|
+
try {
|
|
537
|
+
const t = encodeURIComponent(r), o = await fetch(
|
|
538
|
+
`${a()}/collections/${e}/check-password/${t}`
|
|
539
|
+
);
|
|
540
|
+
return o.ok ? (await o.json()).valid === !0 : !1;
|
|
541
|
+
} catch (t) {
|
|
542
|
+
return n.error("Error checking collection password:", t), !1;
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
async function ue(e, r) {
|
|
514
546
|
try {
|
|
515
547
|
const t = encodeURIComponent(r), o = await fetch(
|
|
516
|
-
`${
|
|
548
|
+
`${a()}/events/${e}/check-password/${t}`
|
|
517
549
|
);
|
|
518
550
|
return o.ok ? (await o.json()).valid === !0 : !1;
|
|
519
551
|
} catch (t) {
|
|
520
552
|
return n.error("Error checking event password:", t), !1;
|
|
521
553
|
}
|
|
522
554
|
}
|
|
523
|
-
async function
|
|
555
|
+
async function le(e, r) {
|
|
524
556
|
try {
|
|
525
|
-
const t = r ? `${
|
|
557
|
+
const t = r ? `${a()}/events/venue/${r}` : e ? `${a()}/venues/organization/${e}` : `${a()}/health`;
|
|
526
558
|
return (await fetch(t, {
|
|
527
559
|
method: "HEAD"
|
|
528
560
|
})).ok;
|
|
@@ -530,35 +562,35 @@ async function ce(e, r) {
|
|
|
530
562
|
return n.error("Network connection test failed:", t), !1;
|
|
531
563
|
}
|
|
532
564
|
}
|
|
533
|
-
async function
|
|
565
|
+
async function $(e) {
|
|
534
566
|
try {
|
|
535
567
|
if (!e)
|
|
536
568
|
return n.warn("getVenue called without venueId"), null;
|
|
537
|
-
const r = await fetch(`${
|
|
569
|
+
const r = await fetch(`${a()}/venues/${e}`);
|
|
538
570
|
return r.ok ? r.json() : (n.error(`Failed to fetch venue: ${r.status}`), null);
|
|
539
571
|
} catch (r) {
|
|
540
572
|
return n.error("Error fetching venue:", r), null;
|
|
541
573
|
}
|
|
542
574
|
}
|
|
543
|
-
async function
|
|
544
|
-
const r = await
|
|
575
|
+
async function de(e) {
|
|
576
|
+
const r = await $(e);
|
|
545
577
|
return r ? {
|
|
546
578
|
serviceFeePercentage: r.serviceFeePercentage ?? 0,
|
|
547
579
|
serviceFeeCents: r.serviceFeeCents ?? 0,
|
|
548
580
|
taxPercentage: r.taxPercentage ?? 0
|
|
549
581
|
} : null;
|
|
550
582
|
}
|
|
551
|
-
async function
|
|
583
|
+
async function fe(e) {
|
|
552
584
|
try {
|
|
553
585
|
if (!e)
|
|
554
586
|
return n.warn("getVenueBySlug called without slug"), null;
|
|
555
|
-
const r = encodeURIComponent(e), t = await fetch(`${
|
|
587
|
+
const r = encodeURIComponent(e), t = await fetch(`${a()}/venues/slug/${r}`);
|
|
556
588
|
return t.ok ? t.json() : (n.error(`Failed to fetch venue by slug: ${t.status}`), null);
|
|
557
589
|
} catch (r) {
|
|
558
590
|
return n.error("Error fetching venue by slug:", r), null;
|
|
559
591
|
}
|
|
560
592
|
}
|
|
561
|
-
function
|
|
593
|
+
function v(e) {
|
|
562
594
|
return {
|
|
563
595
|
uuid: e.uuid || String(e.id || e.ID || ""),
|
|
564
596
|
id: e.id || e.ID,
|
|
@@ -575,7 +607,7 @@ function P(e) {
|
|
|
575
607
|
checkedInAt: e.checkedInAt || e.checked_in_at
|
|
576
608
|
};
|
|
577
609
|
}
|
|
578
|
-
function
|
|
610
|
+
function P(e) {
|
|
579
611
|
const r = e.purchasedTickets || e.tickets || e.purchased_tickets || [];
|
|
580
612
|
return {
|
|
581
613
|
uuid: e.uuid || String(e.id || e.ID || ""),
|
|
@@ -591,13 +623,13 @@ function A(e) {
|
|
|
591
623
|
discount: e.discount || 0,
|
|
592
624
|
paymentIntentId: e.paymentIntentId || e.payment_intent_id,
|
|
593
625
|
paymentMethod: e.paymentMethod || e.payment_method,
|
|
594
|
-
purchasedTickets: r.map(
|
|
626
|
+
purchasedTickets: r.map(v),
|
|
595
627
|
createdAt: e.createdAt || e.created_at,
|
|
596
628
|
updatedAt: e.updatedAt || e.updated_at
|
|
597
629
|
};
|
|
598
630
|
}
|
|
599
|
-
function
|
|
600
|
-
const r =
|
|
631
|
+
function me(e) {
|
|
632
|
+
const r = P(e), t = r.uuid.split("-")[0] || r.uuid;
|
|
601
633
|
return {
|
|
602
634
|
orderId: r.uuid,
|
|
603
635
|
displayOrderId: t,
|
|
@@ -609,15 +641,15 @@ function le(e) {
|
|
|
609
641
|
status: r.status
|
|
610
642
|
};
|
|
611
643
|
}
|
|
612
|
-
const
|
|
644
|
+
const C = "https://micdrop-images.sfo3.digitaloceanspaces.com";
|
|
613
645
|
function b(e) {
|
|
614
|
-
return e ? e.startsWith("http") ? e : `${
|
|
646
|
+
return e ? e.startsWith("http") ? e : `${C}/${e.replace(/^\//, "")}` : "";
|
|
615
647
|
}
|
|
616
|
-
function
|
|
648
|
+
function h(e) {
|
|
617
649
|
const r = e.imageUrl || e.imageURL || e.image_url || e.image || "";
|
|
618
650
|
return b(r);
|
|
619
651
|
}
|
|
620
|
-
function
|
|
652
|
+
function A(e) {
|
|
621
653
|
const r = e.ctaState || e.cta_state;
|
|
622
654
|
if (r)
|
|
623
655
|
return r;
|
|
@@ -625,20 +657,20 @@ function C(e) {
|
|
|
625
657
|
return "ended";
|
|
626
658
|
const t = e.startDateTime || e.start_date_time || e.date;
|
|
627
659
|
if (t) {
|
|
628
|
-
const i = new Date(t).getTime(),
|
|
629
|
-
if (i <
|
|
660
|
+
const i = new Date(t).getTime(), c = Date.now();
|
|
661
|
+
if (i < c)
|
|
630
662
|
return "ended";
|
|
631
663
|
}
|
|
632
664
|
const o = e.ticketsAvailable ?? e.tickets_available;
|
|
633
665
|
if (o !== void 0)
|
|
634
666
|
return o <= 0 ? "sold_out" : "available";
|
|
635
667
|
const s = e.availableTickets || e.available_tickets || e.tickets || [];
|
|
636
|
-
return s.length === 0 ? "coming_soon" : s.reduce((i,
|
|
637
|
-
const f =
|
|
638
|
-
return i + Math.max(0, f -
|
|
668
|
+
return s.length === 0 ? "coming_soon" : s.reduce((i, c) => {
|
|
669
|
+
const f = c.quantityAvailable ?? c.quantity_available ?? c.quantity ?? 0, d = c.quantitySold ?? c.quantity_sold ?? 0;
|
|
670
|
+
return i + Math.max(0, f - d);
|
|
639
671
|
}, 0) <= 0 ? "sold_out" : "available";
|
|
640
672
|
}
|
|
641
|
-
function
|
|
673
|
+
function D(e) {
|
|
642
674
|
return {
|
|
643
675
|
id: e.id || e.ID,
|
|
644
676
|
name: e.name || e.ticketName || "",
|
|
@@ -658,8 +690,8 @@ function I(e) {
|
|
|
658
690
|
sortOrder: e.sortOrder || e.sort_order || 0
|
|
659
691
|
};
|
|
660
692
|
}
|
|
661
|
-
function
|
|
662
|
-
const t = (e.availableTickets || e.available_tickets || e.tickets || []).map(
|
|
693
|
+
function I(e) {
|
|
694
|
+
const t = (e.availableTickets || e.available_tickets || e.tickets || []).map(D), o = t.map((i) => i.price).filter((i) => i > 0), s = o.length > 0 ? Math.min(...o) : void 0, l = o.length > 0 ? Math.max(...o) : void 0;
|
|
663
695
|
return {
|
|
664
696
|
eventID: e.eventID || e.id || e.ID || 0,
|
|
665
697
|
id: e.id || e.ID,
|
|
@@ -676,28 +708,28 @@ function j(e) {
|
|
|
676
708
|
venueName: e.venueName || e.venue_name,
|
|
677
709
|
venueAddress: e.venueAddress || e.venue_address,
|
|
678
710
|
location: e.location || e.venueAddress || e.venue_address,
|
|
679
|
-
imageUrl:
|
|
680
|
-
imageURL:
|
|
711
|
+
imageUrl: h(e),
|
|
712
|
+
imageURL: h(e),
|
|
681
713
|
status: e.status,
|
|
682
714
|
isPublished: e.isPublished ?? e.is_published,
|
|
683
715
|
isCancelled: e.isCancelled ?? e.is_cancelled,
|
|
684
716
|
availableTickets: t,
|
|
685
|
-
ticketsAvailable: e.ticketsAvailable ?? e.tickets_available ?? t.reduce((i,
|
|
717
|
+
ticketsAvailable: e.ticketsAvailable ?? e.tickets_available ?? t.reduce((i, c) => i + (c.quantityAvailable || 0), 0),
|
|
686
718
|
ticketsSold: e.ticketsSold ?? e.tickets_sold,
|
|
687
719
|
minPrice: e.minPrice ?? e.min_price ?? s,
|
|
688
|
-
maxPrice: e.maxPrice ?? e.max_price ??
|
|
720
|
+
maxPrice: e.maxPrice ?? e.max_price ?? l,
|
|
689
721
|
ctaText: e.ctaText || e.cta_text,
|
|
690
|
-
ctaState:
|
|
722
|
+
ctaState: A(e),
|
|
691
723
|
showPerformers: e.showPerformers ?? e.show_performers,
|
|
692
724
|
eventSeriesId: e.eventSeriesId || e.event_series_id,
|
|
693
725
|
seriesInstanceNumber: e.seriesInstanceNumber || e.series_instance_number
|
|
694
726
|
};
|
|
695
727
|
}
|
|
696
|
-
const
|
|
697
|
-
function
|
|
698
|
-
return e ? e.startsWith("http") ? e : `${
|
|
728
|
+
const he = I, j = "https://micdrop-images.sfo3.digitaloceanspaces.com";
|
|
729
|
+
function k(e) {
|
|
730
|
+
return e ? e.startsWith("http") ? e : `${j}/${e.replace(/^\//, "")}` : "";
|
|
699
731
|
}
|
|
700
|
-
function
|
|
732
|
+
function ye(e) {
|
|
701
733
|
const r = e.logoUrl || e.logo_url || e.logo;
|
|
702
734
|
return {
|
|
703
735
|
id: e.id || e.ID || 0,
|
|
@@ -710,21 +742,21 @@ function me(e) {
|
|
|
710
742
|
zipCode: e.zipCode || e.zip_code,
|
|
711
743
|
country: e.country,
|
|
712
744
|
timezone: e.timezone || e.time_zone,
|
|
713
|
-
logoUrl:
|
|
745
|
+
logoUrl: k(r),
|
|
714
746
|
serviceFeePercentage: e.serviceFeePercentage ?? e.service_fee_percentage ?? 0,
|
|
715
747
|
serviceFeeCents: e.serviceFeeCents ?? e.service_fee_cents ?? 0,
|
|
716
748
|
taxPercentage: e.taxPercentage ?? e.tax_percentage ?? 0,
|
|
717
749
|
organizationId: e.organizationId || e.organization_id
|
|
718
750
|
};
|
|
719
751
|
}
|
|
720
|
-
function
|
|
752
|
+
function ge(e) {
|
|
721
753
|
return {
|
|
722
754
|
serviceFeePercentage: e.serviceFeePercentage ?? e.service_fee_percentage ?? 0,
|
|
723
755
|
serviceFeeCents: e.serviceFeeCents ?? e.service_fee_cents ?? 0,
|
|
724
756
|
taxPercentage: e.taxPercentage ?? e.tax_percentage ?? 0
|
|
725
757
|
};
|
|
726
758
|
}
|
|
727
|
-
function
|
|
759
|
+
function we(e) {
|
|
728
760
|
return [
|
|
729
761
|
e.address,
|
|
730
762
|
e.city,
|
|
@@ -737,51 +769,54 @@ export {
|
|
|
737
769
|
U as apiGet,
|
|
738
770
|
q as apiPost,
|
|
739
771
|
z as apiPut,
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
772
|
+
K as applyPromoCode,
|
|
773
|
+
A as calculateCtaState,
|
|
774
|
+
p as cancelReservation,
|
|
775
|
+
ie as checkCollectionPassword,
|
|
776
|
+
ue as checkEventPassword,
|
|
777
|
+
T as completeReservation,
|
|
778
|
+
x as configureApi,
|
|
779
|
+
M as createOrder,
|
|
780
|
+
R as createPaymentIntent,
|
|
781
|
+
J as extendCheckoutSession,
|
|
782
|
+
ge as extractVenueFees,
|
|
750
783
|
ee as fetchAllVenues,
|
|
751
|
-
|
|
784
|
+
Y as fetchEventDetails,
|
|
752
785
|
V as fetchEventPerformers,
|
|
753
|
-
|
|
786
|
+
Z as fetchEventTickets,
|
|
787
|
+
ce as fetchPublicCollection,
|
|
754
788
|
se as fetchSeriesOccurrences,
|
|
789
|
+
ae as fetchSeriesPage,
|
|
755
790
|
re as fetchVenueEvents,
|
|
756
|
-
|
|
791
|
+
we as formatVenueAddress,
|
|
757
792
|
F as getApiConfig,
|
|
758
793
|
b as getCDNImageUrl,
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
794
|
+
S as getClientIP,
|
|
795
|
+
h as getEventImageUrl,
|
|
796
|
+
N as getLegacyPublicUrl,
|
|
762
797
|
te as getMonthEvents,
|
|
763
|
-
|
|
764
|
-
|
|
798
|
+
B as getOrder,
|
|
799
|
+
y as getOrdersV2Url,
|
|
765
800
|
oe as getOrgMonthEvents,
|
|
766
|
-
|
|
801
|
+
a as getPublicBaseUrl,
|
|
767
802
|
ne as getSeriesOccurrences,
|
|
768
803
|
W as getSessionStatus,
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
804
|
+
$ as getVenue,
|
|
805
|
+
fe as getVenueBySlug,
|
|
806
|
+
de as getVenueFees,
|
|
807
|
+
E as hasPromoCodes,
|
|
773
808
|
G as initiateOrder,
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
809
|
+
X as removePromoCode,
|
|
810
|
+
le as testNetworkConnection,
|
|
811
|
+
O as trackUTMSource,
|
|
812
|
+
D as transformAvailableTicket,
|
|
813
|
+
I as transformEvent,
|
|
814
|
+
he as transformEventData,
|
|
815
|
+
P as transformOrder,
|
|
816
|
+
me as transformOrderForDisplay,
|
|
817
|
+
v as transformTicket,
|
|
818
|
+
ye as transformVenue,
|
|
819
|
+
H as validatePaymentIntent,
|
|
820
|
+
Q as validatePromoCode
|
|
786
821
|
};
|
|
787
822
|
//# sourceMappingURL=api.mjs.map
|