@getmicdrop/venue-calendar 3.7.2 → 3.7.4
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-BlEK9ibf.js +64 -0
- package/dist/CarouselView.legacy-BlEK9ibf.js.map +1 -0
- package/dist/Checkout.legacy-JgPexoEK.js +1221 -0
- package/dist/Checkout.legacy-JgPexoEK.js.map +1 -0
- package/dist/CollectionView.legacy-DjkJR8wk.js +375 -0
- package/dist/CollectionView.legacy-DjkJR8wk.js.map +1 -0
- package/dist/FeaturedView.legacy-DGMa1Vyw.js +128 -0
- package/dist/FeaturedView.legacy-DGMa1Vyw.js.map +1 -0
- package/dist/GalleryView.legacy-CkQf1VnC.js +51 -0
- package/dist/GalleryView.legacy-CkQf1VnC.js.map +1 -0
- package/dist/GroupedListView.legacy-B4Z6bJko.js +144 -0
- package/dist/GroupedListView.legacy-B4Z6bJko.js.map +1 -0
- package/dist/SeriesPage.legacy-BaM8SV_6.js +190 -0
- package/dist/SeriesPage.legacy-BaM8SV_6.js.map +1 -0
- package/dist/Success.legacy-C2GzVE67.js +194 -0
- package/dist/Success.legacy-C2GzVE67.js.map +1 -0
- package/dist/VenueCalendar-B1uxQvwR.js +37404 -0
- package/dist/VenueCalendar-B1uxQvwR.js.map +1 -0
- package/dist/api/api.cjs +1 -1
- package/dist/api/api.cjs.map +1 -1
- package/dist/api/api.mjs +81 -84
- package/dist/api/api.mjs.map +1 -1
- package/dist/api/client.d.ts +1 -0
- package/dist/api/orders.d.ts +2 -1
- package/dist/colors-BZoMuXdh.js +62 -0
- package/dist/colors-BZoMuXdh.js.map +1 -0
- package/dist/seo/seo.cjs +1 -1
- package/dist/seo/seo.cjs.map +1 -1
- package/dist/seo/seo.mjs +52 -40
- package/dist/seo/seo.mjs.map +1 -1
- package/dist/seo/types.d.ts +1 -0
- package/dist/venue-calendar.css +1 -1
- package/dist/venue-calendar.es.js +37 -33633
- package/dist/venue-calendar.es.js.map +1 -1
- package/dist/venue-calendar.iife.js +52 -34
- package/dist/venue-calendar.iife.js.map +1 -1
- package/dist/venue-calendar.umd.js +52 -34
- package/dist/venue-calendar.umd.js.map +1 -1
- package/package.json +125 -118
- package/src/lib/theme.js +209 -217
package/dist/api/api.mjs
CHANGED
|
@@ -10,75 +10,71 @@ function y(e, r = {}) {
|
|
|
10
10
|
level: r.level ?? "debug",
|
|
11
11
|
prefix: e.startsWith("[") ? e : `[${e}]`
|
|
12
12
|
};
|
|
13
|
-
function o(
|
|
14
|
-
return t.enabled && _[
|
|
13
|
+
function o(c) {
|
|
14
|
+
return t.enabled && _[c] >= _[t.level];
|
|
15
15
|
}
|
|
16
|
-
function n(
|
|
17
|
-
return `${t.prefix} [${
|
|
16
|
+
function n(c, u) {
|
|
17
|
+
return `${t.prefix} [${c.toUpperCase()}] ${u}`;
|
|
18
18
|
}
|
|
19
19
|
return {
|
|
20
|
-
debug(
|
|
21
|
-
o("debug") && console.log(n("debug",
|
|
20
|
+
debug(c, ...u) {
|
|
21
|
+
o("debug") && console.log(n("debug", c), ...u);
|
|
22
22
|
},
|
|
23
|
-
info(
|
|
24
|
-
o("info") && console.info(n("info",
|
|
23
|
+
info(c, ...u) {
|
|
24
|
+
o("info") && console.info(n("info", c), ...u);
|
|
25
25
|
},
|
|
26
|
-
warn(
|
|
27
|
-
o("warn") && console.warn(n("warn",
|
|
26
|
+
warn(c, ...u) {
|
|
27
|
+
o("warn") && console.warn(n("warn", c), ...u);
|
|
28
28
|
},
|
|
29
|
-
error(
|
|
30
|
-
o("error") && console.error(n("error",
|
|
29
|
+
error(c, ...u) {
|
|
30
|
+
o("error") && console.error(n("error", c), ...u);
|
|
31
31
|
},
|
|
32
|
-
configure(
|
|
33
|
-
t = { ...t, ...
|
|
32
|
+
configure(c) {
|
|
33
|
+
t = { ...t, ...c };
|
|
34
34
|
}
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
37
|
P();
|
|
38
|
-
const
|
|
38
|
+
const $ = y("VC"), D = {
|
|
39
39
|
baseUrl: "https://get-micdrop.com",
|
|
40
40
|
timeout: 3e4,
|
|
41
|
-
onError: (e) =>
|
|
41
|
+
onError: (e) => $.error("API Error:", e)
|
|
42
42
|
};
|
|
43
|
-
let d = { ...
|
|
44
|
-
function
|
|
43
|
+
let d = { ...D };
|
|
44
|
+
function z(e) {
|
|
45
45
|
d = { ...d, ...e };
|
|
46
46
|
}
|
|
47
|
-
function
|
|
47
|
+
function R() {
|
|
48
48
|
return { ...d };
|
|
49
49
|
}
|
|
50
50
|
function s() {
|
|
51
51
|
return `${d.baseUrl}/api/v2/public`;
|
|
52
52
|
}
|
|
53
|
-
function
|
|
53
|
+
function T() {
|
|
54
54
|
return `${d.baseUrl}/api/public`;
|
|
55
55
|
}
|
|
56
56
|
function b() {
|
|
57
57
|
return `${d.baseUrl}/api/orders/v2/public`;
|
|
58
58
|
}
|
|
59
|
-
async function
|
|
60
|
-
|
|
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
|
-
}
|
|
59
|
+
async function M() {
|
|
60
|
+
return "";
|
|
65
61
|
}
|
|
66
|
-
async function
|
|
67
|
-
return
|
|
62
|
+
async function p(e, r) {
|
|
63
|
+
return g("GET", e, void 0, r);
|
|
68
64
|
}
|
|
69
65
|
async function B(e, r, t) {
|
|
70
|
-
return
|
|
66
|
+
return g("POST", e, r, t);
|
|
71
67
|
}
|
|
72
68
|
async function H(e, r, t) {
|
|
73
|
-
return
|
|
69
|
+
return g("PUT", e, r, t);
|
|
74
70
|
}
|
|
75
71
|
async function J(e, r) {
|
|
76
|
-
return
|
|
72
|
+
return g("DELETE", e, void 0, r);
|
|
77
73
|
}
|
|
78
|
-
async function
|
|
79
|
-
const n = r.startsWith("http") ? r : `${s()}${r}`,
|
|
74
|
+
async function g(e, r, t, o) {
|
|
75
|
+
const n = r.startsWith("http") ? r : `${s()}${r}`, c = new AbortController(), u = setTimeout(() => c.abort(), d.timeout);
|
|
80
76
|
try {
|
|
81
|
-
const
|
|
77
|
+
const i = await fetch(n, {
|
|
82
78
|
method: e,
|
|
83
79
|
headers: {
|
|
84
80
|
"Content-Type": "application/json",
|
|
@@ -86,34 +82,34 @@ async function w(e, r, t, o) {
|
|
|
86
82
|
},
|
|
87
83
|
body: t ? JSON.stringify(t) : void 0,
|
|
88
84
|
credentials: "include",
|
|
89
|
-
signal:
|
|
85
|
+
signal: c.signal,
|
|
90
86
|
...o
|
|
91
87
|
});
|
|
92
|
-
if (clearTimeout(
|
|
93
|
-
const f = await
|
|
94
|
-
f.error || f.message || `HTTP ${
|
|
88
|
+
if (clearTimeout(u), !i.ok) {
|
|
89
|
+
const f = await i.json().catch(() => ({})), C = new Error(
|
|
90
|
+
f.error || f.message || `HTTP ${i.status}`
|
|
95
91
|
);
|
|
96
92
|
return d.onError(C), {
|
|
97
93
|
success: !1,
|
|
98
|
-
error: f.error || f.message || `HTTP ${
|
|
99
|
-
statusCode:
|
|
94
|
+
error: f.error || f.message || `HTTP ${i.status}`,
|
|
95
|
+
statusCode: i.status
|
|
100
96
|
};
|
|
101
97
|
}
|
|
102
98
|
return {
|
|
103
99
|
success: !0,
|
|
104
|
-
data: await
|
|
105
|
-
statusCode:
|
|
100
|
+
data: await i.json(),
|
|
101
|
+
statusCode: i.status
|
|
106
102
|
};
|
|
107
|
-
} catch (
|
|
108
|
-
clearTimeout(
|
|
109
|
-
const h =
|
|
110
|
-
return d.onError(
|
|
103
|
+
} catch (i) {
|
|
104
|
+
clearTimeout(u);
|
|
105
|
+
const h = i instanceof Error ? i.name === "AbortError" ? "Request timed out" : i.message : "Unknown error";
|
|
106
|
+
return d.onError(i instanceof Error ? i : new Error(h)), {
|
|
111
107
|
success: !1,
|
|
112
108
|
error: h
|
|
113
109
|
};
|
|
114
110
|
}
|
|
115
111
|
}
|
|
116
|
-
async function
|
|
112
|
+
async function A(e, r) {
|
|
117
113
|
try {
|
|
118
114
|
const t = await fetch(e, {
|
|
119
115
|
credentials: "include",
|
|
@@ -121,17 +117,17 @@ async function D(e, r) {
|
|
|
121
117
|
});
|
|
122
118
|
if (!t.ok) {
|
|
123
119
|
const o = await t.json().catch(() => ({}));
|
|
124
|
-
return
|
|
120
|
+
return $.error(`API request failed: ${t.status}`, o), null;
|
|
125
121
|
}
|
|
126
122
|
return t.json();
|
|
127
123
|
} catch (t) {
|
|
128
|
-
return
|
|
124
|
+
return $.error("API request error:", t), null;
|
|
129
125
|
}
|
|
130
126
|
}
|
|
131
127
|
const l = y("VC");
|
|
132
|
-
async function E(e, r) {
|
|
128
|
+
async function E(e, r, t) {
|
|
133
129
|
try {
|
|
134
|
-
const
|
|
130
|
+
const o = await fetch(
|
|
135
131
|
`${b()}/cart/${e}/payment-intent`,
|
|
136
132
|
{
|
|
137
133
|
method: "POST",
|
|
@@ -140,18 +136,19 @@ async function E(e, r) {
|
|
|
140
136
|
},
|
|
141
137
|
credentials: "include",
|
|
142
138
|
body: JSON.stringify({
|
|
143
|
-
productQuantities: r
|
|
139
|
+
productQuantities: r,
|
|
140
|
+
...t && Object.keys(t).length > 0 ? { donationAmounts: t } : {}
|
|
144
141
|
})
|
|
145
142
|
}
|
|
146
143
|
);
|
|
147
|
-
if (!
|
|
148
|
-
const
|
|
149
|
-
throw l.error("Payment intent creation failed:",
|
|
144
|
+
if (!o.ok) {
|
|
145
|
+
const c = await o.json().catch(() => ({}));
|
|
146
|
+
throw l.error("Payment intent creation failed:", c), new Error(c.error || "Failed to create payment intent");
|
|
150
147
|
}
|
|
151
|
-
const
|
|
152
|
-
return l.debug("Payment intent created:",
|
|
153
|
-
} catch (
|
|
154
|
-
return l.error("createPaymentIntent error:",
|
|
148
|
+
const n = await o.json();
|
|
149
|
+
return l.debug("Payment intent created:", n), n;
|
|
150
|
+
} catch (o) {
|
|
151
|
+
return l.error("createPaymentIntent error:", o), null;
|
|
155
152
|
}
|
|
156
153
|
}
|
|
157
154
|
async function W(e) {
|
|
@@ -176,7 +173,7 @@ async function W(e) {
|
|
|
176
173
|
return l.error("Error completing reservation:", r), { success: !1, error: "Network error completing reservation" };
|
|
177
174
|
}
|
|
178
175
|
}
|
|
179
|
-
async function
|
|
176
|
+
async function O(e) {
|
|
180
177
|
try {
|
|
181
178
|
const r = await fetch(
|
|
182
179
|
`${s()}/orders/cancel/${e}`,
|
|
@@ -198,7 +195,7 @@ async function G(e) {
|
|
|
198
195
|
return l.error("Error cancelling reservation:", r), { success: !1, error: "Network error cancelling reservation" };
|
|
199
196
|
}
|
|
200
197
|
}
|
|
201
|
-
async function
|
|
198
|
+
async function G(e, r) {
|
|
202
199
|
try {
|
|
203
200
|
const t = await fetch(`${s()}/orders/create`, {
|
|
204
201
|
method: "POST",
|
|
@@ -220,7 +217,7 @@ async function O(e, r) {
|
|
|
220
217
|
}
|
|
221
218
|
}
|
|
222
219
|
async function Q(e) {
|
|
223
|
-
return
|
|
220
|
+
return A(`${s()}/orders/${e}`);
|
|
224
221
|
}
|
|
225
222
|
async function K(e, r) {
|
|
226
223
|
try {
|
|
@@ -324,7 +321,7 @@ async function V(e) {
|
|
|
324
321
|
l.error("UTM tracking failed:", o);
|
|
325
322
|
}
|
|
326
323
|
}
|
|
327
|
-
const
|
|
324
|
+
const w = y("VC");
|
|
328
325
|
async function ee(e, r) {
|
|
329
326
|
try {
|
|
330
327
|
if (!r || !r.trim())
|
|
@@ -345,7 +342,7 @@ async function ee(e, r) {
|
|
|
345
342
|
code: n.code || r
|
|
346
343
|
};
|
|
347
344
|
} catch (t) {
|
|
348
|
-
return
|
|
345
|
+
return w.error("Error validating promo code:", t), { valid: !1, error: "Network error validating code" };
|
|
349
346
|
}
|
|
350
347
|
}
|
|
351
348
|
async function re(e) {
|
|
@@ -355,7 +352,7 @@ async function re(e) {
|
|
|
355
352
|
);
|
|
356
353
|
return r.ok ? (await r.json()).hasPromoCodes === !0 : !0;
|
|
357
354
|
} catch (r) {
|
|
358
|
-
return
|
|
355
|
+
return w.error("Error checking promo codes availability:", r), !0;
|
|
359
356
|
}
|
|
360
357
|
}
|
|
361
358
|
async function te(e, r) {
|
|
@@ -375,7 +372,7 @@ async function te(e, r) {
|
|
|
375
372
|
error: (await t.json().catch(() => ({}))).error || "Failed to apply promo code"
|
|
376
373
|
};
|
|
377
374
|
} catch (t) {
|
|
378
|
-
return
|
|
375
|
+
return w.error("Error applying promo code:", t), { success: !1, error: "Network error applying code" };
|
|
379
376
|
}
|
|
380
377
|
}
|
|
381
378
|
async function oe(e) {
|
|
@@ -394,7 +391,7 @@ async function oe(e) {
|
|
|
394
391
|
error: (await r.json().catch(() => ({}))).error || "Failed to remove promo code"
|
|
395
392
|
};
|
|
396
393
|
} catch (r) {
|
|
397
|
-
return
|
|
394
|
+
return w.error("Error removing promo code:", r), { success: !1, error: "Network error removing code" };
|
|
398
395
|
}
|
|
399
396
|
}
|
|
400
397
|
const a = y("VC");
|
|
@@ -669,17 +666,17 @@ function S(e) {
|
|
|
669
666
|
return "ended";
|
|
670
667
|
const t = e.startDateTime || e.start_date_time || e.date;
|
|
671
668
|
if (t) {
|
|
672
|
-
const
|
|
673
|
-
if (
|
|
669
|
+
const u = new Date(t).getTime(), i = Date.now();
|
|
670
|
+
if (u < i)
|
|
674
671
|
return "ended";
|
|
675
672
|
}
|
|
676
673
|
const o = e.ticketsAvailable ?? e.tickets_available;
|
|
677
674
|
if (o !== void 0)
|
|
678
675
|
return o <= 0 ? "sold_out" : "available";
|
|
679
676
|
const n = e.availableTickets || e.available_tickets || e.tickets || [];
|
|
680
|
-
return n.length === 0 ? "coming_soon" : n.reduce((
|
|
681
|
-
const h =
|
|
682
|
-
return
|
|
677
|
+
return n.length === 0 ? "coming_soon" : n.reduce((u, i) => {
|
|
678
|
+
const h = i.quantityAvailable ?? i.quantity_available ?? i.quantity ?? 0, f = i.quantitySold ?? i.quantity_sold ?? 0;
|
|
679
|
+
return u + Math.max(0, h - f);
|
|
683
680
|
}, 0) <= 0 ? "sold_out" : "available";
|
|
684
681
|
}
|
|
685
682
|
function F(e) {
|
|
@@ -703,7 +700,7 @@ function F(e) {
|
|
|
703
700
|
};
|
|
704
701
|
}
|
|
705
702
|
function U(e) {
|
|
706
|
-
const t = (e.availableTickets || e.available_tickets || e.tickets || []).map(F), o = t.map((
|
|
703
|
+
const t = (e.availableTickets || e.available_tickets || e.tickets || []).map(F), o = t.map((u) => u.price).filter((u) => u > 0), n = o.length > 0 ? Math.min(...o) : void 0, c = o.length > 0 ? Math.max(...o) : void 0;
|
|
707
704
|
return {
|
|
708
705
|
eventID: e.eventID || e.id || e.ID || 0,
|
|
709
706
|
id: e.id || e.ID,
|
|
@@ -726,10 +723,10 @@ function U(e) {
|
|
|
726
723
|
isPublished: e.isPublished ?? e.is_published,
|
|
727
724
|
isCancelled: e.isCancelled ?? e.is_cancelled,
|
|
728
725
|
availableTickets: t,
|
|
729
|
-
ticketsAvailable: e.ticketsAvailable ?? e.tickets_available ?? t.reduce((
|
|
726
|
+
ticketsAvailable: e.ticketsAvailable ?? e.tickets_available ?? t.reduce((u, i) => u + (i.quantityAvailable || 0), 0),
|
|
730
727
|
ticketsSold: e.ticketsSold ?? e.tickets_sold,
|
|
731
728
|
minPrice: e.minPrice ?? e.min_price ?? n,
|
|
732
|
-
maxPrice: e.maxPrice ?? e.max_price ??
|
|
729
|
+
maxPrice: e.maxPrice ?? e.max_price ?? c,
|
|
733
730
|
ctaText: e.ctaText || e.cta_text,
|
|
734
731
|
ctaState: S(e),
|
|
735
732
|
showPerformers: e.showPerformers ?? e.show_performers,
|
|
@@ -768,7 +765,7 @@ function Ce(e) {
|
|
|
768
765
|
taxPercentage: e.taxPercentage ?? e.tax_percentage ?? 0
|
|
769
766
|
};
|
|
770
767
|
}
|
|
771
|
-
function
|
|
768
|
+
function De(e) {
|
|
772
769
|
return [
|
|
773
770
|
e.address,
|
|
774
771
|
e.city,
|
|
@@ -778,17 +775,17 @@ function Ae(e) {
|
|
|
778
775
|
}
|
|
779
776
|
export {
|
|
780
777
|
J as apiDelete,
|
|
781
|
-
|
|
778
|
+
p as apiGet,
|
|
782
779
|
B as apiPost,
|
|
783
780
|
H as apiPut,
|
|
784
781
|
te as applyPromoCode,
|
|
785
782
|
S as calculateCtaState,
|
|
786
|
-
|
|
783
|
+
O as cancelReservation,
|
|
787
784
|
ye as checkCollectionPassword,
|
|
788
785
|
ge as checkEventPassword,
|
|
789
786
|
W as completeReservation,
|
|
790
|
-
|
|
791
|
-
|
|
787
|
+
z as configureApi,
|
|
788
|
+
G as createOrder,
|
|
792
789
|
E as createPaymentIntent,
|
|
793
790
|
X as extendCheckoutSession,
|
|
794
791
|
Ce as extractVenueFees,
|
|
@@ -800,12 +797,12 @@ export {
|
|
|
800
797
|
fe as fetchSeriesOccurrences,
|
|
801
798
|
me as fetchSeriesPage,
|
|
802
799
|
ie as fetchVenueEvents,
|
|
803
|
-
|
|
804
|
-
|
|
800
|
+
De as formatVenueAddress,
|
|
801
|
+
R as getApiConfig,
|
|
805
802
|
x as getCDNImageUrl,
|
|
806
|
-
|
|
803
|
+
M as getClientIP,
|
|
807
804
|
v as getEventImageUrl,
|
|
808
|
-
|
|
805
|
+
T as getLegacyPublicUrl,
|
|
809
806
|
ue as getMonthEvents,
|
|
810
807
|
Q as getOrder,
|
|
811
808
|
b as getOrdersV2Url,
|