@getmicdrop/venue-calendar 4.2.4 → 4.2.5
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/{ArrowLeftIcon-BGd-X_Qm.js → ArrowLeftIcon-BxKUPFOE.js} +1 -1
- package/dist/{Badge-Bv_MT-Vt.js → Badge-M6qZyfTF.js} +9 -10
- package/dist/BlockPlaceholder-CLdS2Y-c.js +62 -0
- package/dist/{Calendar-DafPX3k_.js → Calendar-DwNhbEQY.js} +290 -292
- package/dist/CalendarFoundryView-BX5mT6NY.js +23561 -0
- package/dist/{CalendarIcon-CeQ1_FWq.js → CalendarIcon-jLckZ_4N.js} +1 -1
- package/dist/{CartView-nvVA8vWk.js → CartView-B61KRyFq.js} +644 -651
- package/dist/Checkout-CoExiUba.js +1809 -0
- package/dist/{Checkout-Ow2x8cNL.js → Checkout-DlQ2x3L6.js} +97 -97
- package/dist/{CheckoutTimer-DJlt5M2b.js → CheckoutTimer-Cv9iQj2d.js} +5 -5
- package/dist/{ChevronDownIcon-y7oNyepp.js → ChevronDownIcon-DiZxxS3e.js} +1 -1
- package/dist/{ClockIcon-BGTz8dak.js → ClockIcon-BrWavNGl.js} +1 -1
- package/dist/{CloseIcon-C9SHeORJ.js → CloseIcon-Cmddp2PA.js} +1 -1
- package/dist/{CollectionView-BAIlcuqO.js → CollectionView-DpkF55yD.js} +12 -13
- package/dist/Event-CzNN2jRR.js +3040 -0
- package/dist/{EventPage-LuA-aEYZ.js → EventPage-DnKNNWk8.js} +167 -168
- package/dist/{Heading-Dfo3bjyn.js → Heading-B7VYbbfJ.js} +3 -4
- package/dist/Image-DBJAfLYe.js +81 -0
- package/dist/{phoneUtils-BJeAIGYo.js → Input-DsWjpYtc.js} +1132 -694
- package/dist/{MailIcon-xtNog-7h.js → MailIcon-gpZMGdBK.js} +1 -1
- package/dist/{Modal-CqzRblrN.js → Modal-D4AUdrz8.js} +2 -2
- package/dist/{ModalFooter-DHhBLDbO.js → ModalFooter-8Di4-qKC.js} +57 -59
- package/dist/{PasswordInput-Czm5Pe_p.js → PasswordInput-Buk60yEf.js} +4 -4
- package/dist/{ScarcityBadge-CdgQmt1D.js → ScarcityBadge-DgrS89hq.js} +4 -4
- package/dist/{SeriesPage-DfCyV1ka.js → SeriesPage-BCovOJ6a.js} +5 -5
- package/dist/{Spinner-BwiDys7C.js → Spinner-ChTN7t75.js} +3 -3
- package/dist/{Success-CsYxRkLE.js → Success-BRufJqwQ.js} +76 -77
- package/dist/{TagIcon-DJSTnymB.js → TagIcon-C0uTQgU8.js} +1 -1
- package/dist/{ViewTicketsEmbed-CKucKt-W.js → ViewTicketsEmbed-CfagtvVL.js} +59 -60
- package/dist/{WarningCircleIcon-BKSQbu7p.js → WarningCircleIcon-B2hkUrvV.js} +1 -1
- package/dist/{WarningTriIcon-DgwTwlxe.js → WarningTriIcon-Boy4IW6-.js} +1 -1
- package/dist/{__SKIP_PATHS__-BTbGfN80.js → __SKIP_PATHS__-DPK-YB-V.js} +1 -1
- package/dist/{href-DJeJpcO9.js → allowlist-Cu2kP6jt.js} +4 -21
- package/dist/api/api.cjs +1 -1
- package/dist/api/api.mjs +123 -112
- package/dist/api/events.d.ts +21 -2
- package/dist/api/types.d.ts +17 -0
- package/dist/{browser-Um8Y6K99.js → browser-25hnscei.js} +7 -7
- package/dist/cancel-gqtaw6SK.js +59 -0
- package/dist/{colors-DeJAzg_q.js → colors-B9hMXv8l.js} +123 -113
- package/dist/{constants-OTS1wmXZ.js → constants-DBwdjnEU.js} +74 -74
- package/dist/{copyToClipboard-CRDdh3r8.js → copyToClipboard-BDa2_uNf.js} +1 -1
- package/dist/{createI18n-DBUVdZra.js → createI18n-08XGDh1_.js} +1 -1
- package/dist/{event-BrptLro8.js → event-Cp5D4ctZ.js} +1 -1
- package/dist/{event-transform-BaJ7M1DL.js → event-transform-BFJTgtU9.js} +4 -4
- package/dist/{eventStatusStream-sq6uPnMe.js → eventStatusStream-SyvhRCtk.js} +2 -2
- package/dist/{i18n-GzfxX0Ad.js → i18n-4ZGOM8hY.js} +11 -11
- package/dist/{labels-CqodQmuY.js → labels-99RC9gAv.js} +1 -1
- package/dist/{modalManager.svelte-OSPs3dSW.js → modalManager.svelte-BdNsCq6n.js} +2 -2
- package/dist/{order-totals-BAKL9cOB.js → order-totals-CQ0V7Fdc.js} +13 -15
- package/dist/{orders-NZP81zYT.js → orders-oRqSQXSf.js} +19 -20
- package/dist/{pixels-BBruZizp.js → pixels-DycN_8bu.js} +7 -8
- package/dist/{promo-DtLZRskK.js → promo-BrMcoTYh.js} +3 -3
- package/dist/{serverTotals-BO126TTd.js → serverTotals-CpRaEe9K.js} +1 -1
- package/dist/{shareCopyFeedback.svelte-BRInK1hH.js → shareCopyFeedback.svelte-D314p5oA.js} +25 -25
- package/dist/{showcase-state-options-BoJxiEsg.js → showcase-state-options-B2XfybZq.js} +1 -1
- package/dist/timezones-Cq1mLtfM.js +4170 -0
- package/dist/{to-event-card-props-CO3aPBdH.js → to-event-card-props-BNBWYYPo.js} +23 -24
- package/dist/{utils-C8GgxJMv.js → utils-CrlClQxc.js} +3 -3
- package/dist/venue-calendar.css +1 -1
- package/dist/venue-calendar.es.js +209 -210
- package/dist/venue-calendar.iife.js +63 -64
- package/dist/venue-calendar.umd.js +59 -60
- package/package.json +220 -220
- package/dist/BlockPlaceholder-Wl39H9Z7.js +0 -52
- package/dist/Button-C4uFgl7L.js +0 -2141
- package/dist/CalendarFoundryView-COkX5oQx.js +0 -22292
- package/dist/Checkout-BphC7gak.js +0 -1807
- package/dist/CloseOutline-qpVa62mu.js +0 -13
- package/dist/CropImage-B0tj2_uN.js +0 -404
- package/dist/Event-CTaXLze_.js +0 -3034
- package/dist/Image-B3cEndLZ.js +0 -87
- package/dist/Input-iXqece97.js +0 -487
- package/dist/imageOptimizer-CB3wKJU8.js +0 -47
- package/dist/sortable.esm--ZtTTTPp.js +0 -1451
- package/dist/timezones-C5l0SSHK.js +0 -2030
- package/dist/z-index-B0Vk_Mp1.js +0 -27
- /package/dist/locales/{4.2.4 → 4.2.5}/flow/de.js +0 -0
- /package/dist/locales/{4.2.4 → 4.2.5}/flow/es.js +0 -0
- /package/dist/locales/{4.2.4 → 4.2.5}/flow/fr.js +0 -0
- /package/dist/locales/{4.2.4 → 4.2.5}/flow/id.js +0 -0
- /package/dist/locales/{4.2.4 → 4.2.5}/flow/it.js +0 -0
- /package/dist/locales/{4.2.4 → 4.2.5}/flow/ja.js +0 -0
- /package/dist/locales/{4.2.4 → 4.2.5}/flow/ko.js +0 -0
- /package/dist/locales/{4.2.4 → 4.2.5}/flow/nl.js +0 -0
- /package/dist/locales/{4.2.4 → 4.2.5}/flow/pl.js +0 -0
- /package/dist/locales/{4.2.4 → 4.2.5}/flow/pt-br.js +0 -0
- /package/dist/locales/{4.2.4 → 4.2.5}/flow/tr.js +0 -0
- /package/dist/locales/{4.2.4 → 4.2.5}/flow/zh.js +0 -0
- /package/dist/locales/{4.2.4 → 4.2.5}/main/de.js +0 -0
- /package/dist/locales/{4.2.4 → 4.2.5}/main/es.js +0 -0
- /package/dist/locales/{4.2.4 → 4.2.5}/main/fr.js +0 -0
- /package/dist/locales/{4.2.4 → 4.2.5}/main/id.js +0 -0
- /package/dist/locales/{4.2.4 → 4.2.5}/main/it.js +0 -0
- /package/dist/locales/{4.2.4 → 4.2.5}/main/ja.js +0 -0
- /package/dist/locales/{4.2.4 → 4.2.5}/main/ko.js +0 -0
- /package/dist/locales/{4.2.4 → 4.2.5}/main/nl.js +0 -0
- /package/dist/locales/{4.2.4 → 4.2.5}/main/pl.js +0 -0
- /package/dist/locales/{4.2.4 → 4.2.5}/main/pt-br.js +0 -0
- /package/dist/locales/{4.2.4 → 4.2.5}/main/tr.js +0 -0
- /package/dist/locales/{4.2.4 → 4.2.5}/main/zh.js +0 -0
|
@@ -1,39 +1,38 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { D as f, E as ee, M as p, O as m, P as h, h as te, j as g } from "./orders-NZP81zYT.js";
|
|
1
|
+
import { E as e, G as t, I as n, P as r, R as i, T as a, _ as o, k as s, tt as c, v as l, w as u } from "./timezones-Cq1mLtfM.js";
|
|
2
|
+
import { T as d } from "./constants-DBwdjnEU.js";
|
|
3
|
+
import { D as f, E as p, M as m, O as h, P as g, h as ee, j as _ } from "./orders-oRqSQXSf.js";
|
|
5
4
|
//#region node_modules/@getmicdrop/svelte-components/dist/transforms/ticket.js
|
|
6
|
-
var
|
|
5
|
+
var v = {
|
|
7
6
|
EVERYWHERE: 0,
|
|
8
7
|
ONLINE_ONLY: 1,
|
|
9
8
|
BOX_OFFICE_ONLY: 2
|
|
10
|
-
},
|
|
9
|
+
}, y = {
|
|
11
10
|
VISIBLE: 0,
|
|
12
11
|
HIDDEN: 1,
|
|
13
12
|
PROMO_ONLY: 2
|
|
14
13
|
};
|
|
15
|
-
function
|
|
14
|
+
function b(e) {
|
|
16
15
|
return e.soldOut === !0 ? 0 : e.remainingCapacity == null ? e.quantityRemaining == null ? e.quantity == null ? e.sold != null && e.totalCapacity != null ? Math.max(0, e.totalCapacity - e.sold) : 0 : e.quantity : e.quantityRemaining : e.remainingCapacity;
|
|
17
16
|
}
|
|
18
|
-
function
|
|
17
|
+
function x(e, t) {
|
|
19
18
|
return e.totalCapacity ?? e.quantity ?? t;
|
|
20
19
|
}
|
|
21
|
-
function
|
|
22
|
-
let
|
|
23
|
-
if (!
|
|
24
|
-
if (!
|
|
25
|
-
if (c &&
|
|
26
|
-
if (l &&
|
|
27
|
-
if (
|
|
28
|
-
let d =
|
|
20
|
+
function te(t) {
|
|
21
|
+
let r = n(), i = a(t.effectiveSalesBegin, t.salesBegin, t.saleStartDate) ?? null, o = a(t.effectiveSalesEnd, t.salesEnd, t.saleEndDate) ?? null, c = s(i), l = s(o);
|
|
22
|
+
if (!e(i) && !c) return "scheduled";
|
|
23
|
+
if (!e(o) && !l) return "sales_ended";
|
|
24
|
+
if (c && u(r, c) < 0) return "scheduled";
|
|
25
|
+
if (l && u(r, l) > 0) return "sales_ended";
|
|
26
|
+
if (t.soldOut === !0) return "sold_out";
|
|
27
|
+
let d = b(t), f = x(t, d);
|
|
29
28
|
return d === 0 ? "sold_out" : f > 0 && d / f < .1 ? "low" : "on_sale";
|
|
30
29
|
}
|
|
31
|
-
function
|
|
30
|
+
function ne(e, t = {}) {
|
|
32
31
|
if (!Array.isArray(e)) return [];
|
|
33
32
|
let n = e;
|
|
34
|
-
return t.excludeDoorOnly && (n = n.filter((e) => e.salesChannel !==
|
|
33
|
+
return t.excludeDoorOnly && (n = n.filter((e) => e.salesChannel !== v.BOX_OFFICE_ONLY)), t.publicOnly && (n = n.filter((e) => e.visibility === y.VISIBLE)), n;
|
|
35
34
|
}
|
|
36
|
-
function
|
|
35
|
+
function S(e) {
|
|
37
36
|
if (!Array.isArray(e) || e.length === 0) return {
|
|
38
37
|
totalRemaining: 0,
|
|
39
38
|
totalCapacity: 0,
|
|
@@ -41,8 +40,8 @@ function x(e) {
|
|
|
41
40
|
};
|
|
42
41
|
let t = 0, n = 0;
|
|
43
42
|
for (let r of e) {
|
|
44
|
-
let e =
|
|
45
|
-
t += e, n +=
|
|
43
|
+
let e = b(r);
|
|
44
|
+
t += e, n += x(r, e);
|
|
46
45
|
}
|
|
47
46
|
return {
|
|
48
47
|
totalRemaining: t,
|
|
@@ -50,29 +49,29 @@ function x(e) {
|
|
|
50
49
|
isSoldOut: t === 0
|
|
51
50
|
};
|
|
52
51
|
}
|
|
53
|
-
function
|
|
52
|
+
function re(e) {
|
|
54
53
|
if (!Array.isArray(e) || e.length === 0) return 0;
|
|
55
54
|
let t = e.map((e) => Number(e.price ?? e.ticketPrice)).filter((e) => Number.isFinite(e) && e > 0);
|
|
56
55
|
return t.length > 0 ? Math.min(...t) : 0;
|
|
57
56
|
}
|
|
58
57
|
//#endregion
|
|
59
58
|
//#region node_modules/@getmicdrop/svelte-components/dist/transforms/event.js
|
|
60
|
-
function
|
|
59
|
+
function ie(e) {
|
|
61
60
|
return e.availableTickets || e.available_tickets || e.tickets || [];
|
|
62
61
|
}
|
|
63
|
-
function
|
|
64
|
-
if (!
|
|
65
|
-
let
|
|
66
|
-
if (!
|
|
67
|
-
let d =
|
|
68
|
-
return !(
|
|
62
|
+
function C(t) {
|
|
63
|
+
if (!t || !(t.isHidden === !0 || typeof t.visibility == "number" && t.visibility >= y.PROMO_ONLY) || t.salesChannel === v.BOX_OFFICE_ONLY) return !1;
|
|
64
|
+
let r = n(), i = a(t.effectiveSalesBegin, t.salesBegin, t.salesStart, t.saleBegin, t.onSaleStart, t.saleStartDate), o = a(t.effectiveSalesEnd, t.salesEnd, t.saleEnd, t.onSaleEnd, t.saleEndDate), c = s(i), l = s(o);
|
|
65
|
+
if (!e(i) && !c || !e(o) && !l || c && u(c, r) > 0 || l && u(l, r) < 0) return !1;
|
|
66
|
+
let d = t.remainingCapacity ?? t.quantityRemaining ?? t.quantity;
|
|
67
|
+
return !(t.soldOut || d != null && d <= 0);
|
|
69
68
|
}
|
|
70
|
-
function
|
|
71
|
-
return e ? e.hasHiddenTickets === !0 ||
|
|
69
|
+
function w(e) {
|
|
70
|
+
return e ? e.hasHiddenTickets === !0 || ie(e).some(C) : !1;
|
|
72
71
|
}
|
|
73
72
|
//#endregion
|
|
74
73
|
//#region node_modules/@getmicdrop/svelte-components/dist/errors/classes/NotFoundError.js
|
|
75
|
-
var
|
|
74
|
+
var T = class extends r {
|
|
76
75
|
constructor(e, t) {
|
|
77
76
|
let n = t ? `${e} with ID ${t} not found` : `${e} not found`;
|
|
78
77
|
super(n, "NOT_FOUND", {
|
|
@@ -85,10 +84,10 @@ var C = class extends l {
|
|
|
85
84
|
}), this.name = "NotFoundError", this.resourceType = e, this.resourceId = t;
|
|
86
85
|
}
|
|
87
86
|
getUserMessage(e) {
|
|
88
|
-
return
|
|
87
|
+
return l(e)?.fromCode?.(this.code) || o(this.resourceType.toLowerCase());
|
|
89
88
|
}
|
|
90
|
-
},
|
|
91
|
-
async function
|
|
89
|
+
}, E = c("VC");
|
|
90
|
+
async function ae(e, t) {
|
|
92
91
|
try {
|
|
93
92
|
if (!t || !t.trim()) return {
|
|
94
93
|
valid: !1,
|
|
@@ -115,31 +114,31 @@ async function se(e, t) {
|
|
|
115
114
|
applyToTicketIds: i.applyToTicketIds
|
|
116
115
|
};
|
|
117
116
|
} catch (e) {
|
|
118
|
-
return
|
|
117
|
+
return E.error("Error validating promo code:", e), {
|
|
119
118
|
valid: !1,
|
|
120
119
|
error: "Network error validating code"
|
|
121
120
|
};
|
|
122
121
|
}
|
|
123
122
|
}
|
|
124
|
-
async function
|
|
123
|
+
async function oe(e) {
|
|
125
124
|
try {
|
|
126
125
|
let t = await f(`/promo-codes/check/${e}`);
|
|
127
126
|
return !t.success || t.data.hasPromoCodes === !0;
|
|
128
127
|
} catch (e) {
|
|
129
|
-
return
|
|
128
|
+
return E.error("Error checking promo codes availability:", e), !0;
|
|
130
129
|
}
|
|
131
130
|
}
|
|
132
|
-
async function
|
|
131
|
+
async function se(e, t, n) {
|
|
133
132
|
try {
|
|
134
133
|
let r = { promoCode: t };
|
|
135
134
|
n && Object.keys(n).length > 0 && (r.productQuantities = n);
|
|
136
|
-
let i = await
|
|
135
|
+
let i = await h(`${_()}/cart/${e}/apply-promo`, r);
|
|
137
136
|
return i.success ? { success: !0 } : {
|
|
138
137
|
success: !1,
|
|
139
138
|
error: i.error || "Failed to apply promo code"
|
|
140
139
|
};
|
|
141
140
|
} catch (e) {
|
|
142
|
-
return
|
|
141
|
+
return E.error("Error applying promo code:", e), {
|
|
143
142
|
success: !1,
|
|
144
143
|
error: "Network error applying code"
|
|
145
144
|
};
|
|
@@ -147,65 +146,65 @@ async function T(e, t, n) {
|
|
|
147
146
|
}
|
|
148
147
|
//#endregion
|
|
149
148
|
//#region src/lib/api/result.ts
|
|
150
|
-
function
|
|
149
|
+
function D(e) {
|
|
151
150
|
return {
|
|
152
151
|
ok: !0,
|
|
153
152
|
data: e
|
|
154
153
|
};
|
|
155
154
|
}
|
|
156
|
-
function
|
|
155
|
+
function O(e) {
|
|
157
156
|
return {
|
|
158
157
|
ok: !1,
|
|
159
158
|
error: e
|
|
160
159
|
};
|
|
161
160
|
}
|
|
162
|
-
function
|
|
161
|
+
function k(e) {
|
|
163
162
|
return {
|
|
164
163
|
ok: !1,
|
|
165
164
|
error: e,
|
|
166
165
|
notFound: !0
|
|
167
166
|
};
|
|
168
167
|
}
|
|
169
|
-
function
|
|
168
|
+
function A(e, t) {
|
|
170
169
|
return e.ok ? e.data : t;
|
|
171
170
|
}
|
|
172
171
|
//#endregion
|
|
173
172
|
//#region src/lib/api/route-manifest.ts
|
|
174
|
-
var
|
|
175
|
-
`${
|
|
173
|
+
var j = "/api/v2/public", M = "/api/orders/v2/public", N = "/api/orders/v2", P = "00000000-0000-0000-0000-000000000000";
|
|
174
|
+
`${j}`, `${j}${P}`, `${j}`, `${j}${P}`, `${j}`, `${j}${P}`, `${j}`, `${j}${P}`, `${j}`, `${j}${P}`, `${j}`, `${j}${P}`, `${j}`, `${j}${P}`, `${j}`, `${j}${P}`, `${j}`, `${j}`, `${j}`, `${j}${P}`, `${j}`, `${j}${P}`, `${j}`, `${j}${P}`, `${j}`, `${j}${P}`, `${j}`, `${j}${P}`, `${j}`, `${j}${P}`, `${j}`, `${j}${P}`, `${j}`, `${j}${P}`, `${j}`, `${j}${P}`, `${j}`, `${j}${P}`, `${j}`, `${j}`, `${j}`, `${j}${P}`, `${j}`, `${j}${P}`, `${j}`, `${j}${P}`, `${j}`, `${j}${P}`, `${j}`, `${j}${P}`, `${j}`, `${j}${P}`, `${j}`, `${j}${P}`, `${j}`, `${j}`, `${j}`, `${j}${P}`, `${j}`, `${j}${P}`, `${j}`, `${j}${P}`, `${j}`, `${j}${P}`, `${j}`, `${j}${P}`, `${j}`, `${j}${P}`, `${j}`, `${j}`, `${j}`, `${j}`, `${j}`, `${j}`, `${j}`, `${j}${P}`, `${M}`, `${M}`, `${M}`, `${M}${P}`, `${M}`, `${M}${P}`, `${M}`, `${M}${P}`, `${M}`, `${M}${P}`, `${M}`, `${M}${P}`, `${M}`, `${M}${P}`, `${M}`, `${M}${P}`, `${M}`, `${M}${P}`, `${N}`, `${N}`, `${M}`, `${M}`, `${M}`, `${M}`, `${j}`, `${j}${P}`, `${j}`, `${j}`;
|
|
176
175
|
//#endregion
|
|
177
176
|
//#region src/lib/api/events.ts
|
|
178
|
-
var
|
|
179
|
-
async function
|
|
177
|
+
var F = c("VC"), I = /* @__PURE__ */ new Map();
|
|
178
|
+
async function ce(e, t = fetch, n) {
|
|
180
179
|
let r = n ? `${e}:pw` : String(e);
|
|
181
180
|
if (t === fetch) {
|
|
182
|
-
let e =
|
|
181
|
+
let e = I.get(r);
|
|
183
182
|
if (e) return e;
|
|
184
183
|
}
|
|
185
184
|
let i = (async () => {
|
|
186
185
|
try {
|
|
187
|
-
let r = await t(n ? `${
|
|
188
|
-
if (!r.ok) return r.status === 404 ?
|
|
186
|
+
let r = await t(n ? `${m()}/events/${e}?password=${encodeURIComponent(n)}` : `${m()}/events/${e}`);
|
|
187
|
+
if (!r.ok) return r.status === 404 ? k("event_not_found") : (F.error(`Failed to fetch event details: ${r.status}`), O("event_fetch_failed"));
|
|
189
188
|
let i = await r.json();
|
|
190
|
-
return i ?
|
|
189
|
+
return i ? D(i) : k("event_not_found");
|
|
191
190
|
} catch (e) {
|
|
192
|
-
return
|
|
191
|
+
return F.error("Error fetching event details:", e), O("event_fetch_failed");
|
|
193
192
|
}
|
|
194
193
|
})();
|
|
195
|
-
return t === fetch && (
|
|
196
|
-
|
|
194
|
+
return t === fetch && (I.set(r, i), i.finally(() => {
|
|
195
|
+
I.get(r) === i && I.delete(r);
|
|
197
196
|
})), i;
|
|
198
197
|
}
|
|
199
198
|
async function L(e, t = fetch, n) {
|
|
200
|
-
let r = await
|
|
199
|
+
let r = await ce(e, t, n);
|
|
201
200
|
return r.ok ? r.data : null;
|
|
202
201
|
}
|
|
203
202
|
async function R(e, t, n = (e) => e) {
|
|
204
203
|
try {
|
|
205
|
-
let r = await
|
|
206
|
-
return r ?
|
|
204
|
+
let r = await g(e);
|
|
205
|
+
return r ? D(n(r)) : (F.error(`Failed to load (${t}): network or server error`), O(t));
|
|
207
206
|
} catch (e) {
|
|
208
|
-
return
|
|
207
|
+
return F.error(`Error loading (${t}):`, e), O(t);
|
|
209
208
|
}
|
|
210
209
|
}
|
|
211
210
|
function z(e) {
|
|
@@ -213,61 +212,72 @@ function z(e) {
|
|
|
213
212
|
}
|
|
214
213
|
async function B(e, t) {
|
|
215
214
|
let n = t?.trim(), r = n ? `?promoCode=${encodeURIComponent(n)}` : "";
|
|
216
|
-
return R(`${
|
|
215
|
+
return R(`${m()}/tickets/event/${e}${r}`, "tickets_fetch_failed", z);
|
|
217
216
|
}
|
|
218
217
|
async function V(e, t) {
|
|
219
|
-
return
|
|
218
|
+
return A(await B(e, t), []);
|
|
220
219
|
}
|
|
221
220
|
function H(e) {
|
|
222
221
|
return Array.isArray(e) ? e : Array.isArray(e.events) ? e.events : [];
|
|
223
222
|
}
|
|
224
|
-
|
|
225
|
-
|
|
223
|
+
var U = /* @__PURE__ */ new Map();
|
|
224
|
+
function W(e, t, n) {
|
|
225
|
+
if (!n?.fresh) {
|
|
226
|
+
let t = U.get(e);
|
|
227
|
+
if (t) return t;
|
|
228
|
+
}
|
|
229
|
+
let r = R(e, t, (e) => H(e));
|
|
230
|
+
return U.set(e, r), r.finally(() => {
|
|
231
|
+
U.get(e) === r && U.delete(e);
|
|
232
|
+
}), r;
|
|
233
|
+
}
|
|
234
|
+
async function G(e, t, n, r) {
|
|
235
|
+
return W(`${m()}/events/venue/${e}/month/${t}/${n}`, "month_events_fetch_failed", r);
|
|
226
236
|
}
|
|
227
|
-
async function
|
|
228
|
-
return
|
|
237
|
+
async function le(e, t, n, r) {
|
|
238
|
+
return W(`${m()}/events/organization/${e}/month/${t}/${n}`, "org_month_events_fetch_failed", r);
|
|
229
239
|
}
|
|
230
|
-
async function
|
|
231
|
-
return R(`${
|
|
240
|
+
async function ue(e, t) {
|
|
241
|
+
return R(`${m()}/series/${e}/occurrences?venueId=${t}`, "series_cta_fetch_failed");
|
|
232
242
|
}
|
|
233
|
-
async function
|
|
234
|
-
let n = await
|
|
243
|
+
async function de(e, t) {
|
|
244
|
+
let n = await ue(e, t);
|
|
235
245
|
return n.ok ? n.data : null;
|
|
236
246
|
}
|
|
237
|
-
async function
|
|
247
|
+
async function fe(e, t) {
|
|
238
248
|
try {
|
|
239
|
-
let n = t ? `?slug=${encodeURIComponent(t)}` : "", r = await
|
|
240
|
-
if (!r || !r.type) throw new
|
|
249
|
+
let n = t ? `?slug=${encodeURIComponent(t)}` : "", r = await g(`${m()}/resolve/${encodeURIComponent(String(e))}${n}`);
|
|
250
|
+
if (!r || !r.type) throw new T("entity", String(e));
|
|
241
251
|
return r;
|
|
242
252
|
} catch (e) {
|
|
243
|
-
return
|
|
253
|
+
return F.error("Error resolving public entity:", e), null;
|
|
244
254
|
}
|
|
245
255
|
}
|
|
246
|
-
async function
|
|
256
|
+
async function pe(e, t) {
|
|
247
257
|
try {
|
|
248
|
-
let n = t ? `${
|
|
249
|
-
if (!r) throw new
|
|
258
|
+
let n = t ? `${m()}/collections/${e}?password=${encodeURIComponent(t)}` : `${m()}/collections/${e}`, r = await g(n);
|
|
259
|
+
if (!r) throw new T("collection", String(e));
|
|
250
260
|
return r;
|
|
251
261
|
} catch (e) {
|
|
252
|
-
return
|
|
262
|
+
return F.error("Error fetching collection:", e), null;
|
|
253
263
|
}
|
|
254
264
|
}
|
|
255
|
-
async function
|
|
265
|
+
async function me(e, t) {
|
|
256
266
|
try {
|
|
257
|
-
let n = await
|
|
267
|
+
let n = await g(`${m()}/events/${e}/check-password`, {
|
|
258
268
|
method: "POST",
|
|
259
269
|
headers: { "Content-Type": "application/json" },
|
|
260
270
|
body: JSON.stringify({ password: t })
|
|
261
271
|
});
|
|
262
272
|
return typeof n == "boolean" ? { valid: n } : { valid: n?.valid === !0 };
|
|
263
273
|
} catch (e) {
|
|
264
|
-
return
|
|
274
|
+
return F.error("Error checking event password:", e), { valid: !1 };
|
|
265
275
|
}
|
|
266
276
|
}
|
|
267
277
|
//#endregion
|
|
268
278
|
//#region src/lib/api/venues.ts
|
|
269
|
-
var K =
|
|
270
|
-
async function
|
|
279
|
+
var K = c("VC");
|
|
280
|
+
async function he(e) {
|
|
271
281
|
try {
|
|
272
282
|
if (!e) return K.warn("getVenue called without venueId"), null;
|
|
273
283
|
let t = await f(`/venues/${e}`);
|
|
@@ -281,35 +291,35 @@ async function pe(e) {
|
|
|
281
291
|
function q(e, t) {
|
|
282
292
|
return e == null || t(e);
|
|
283
293
|
}
|
|
284
|
-
function
|
|
294
|
+
function ge(e) {
|
|
285
295
|
if (typeof e != "object" || !e) return !1;
|
|
286
296
|
let t = e;
|
|
287
297
|
return t.valid === !0 && Number.isInteger(t.appliedAmount) && typeof t.remainingTotal == "number" && Number.isFinite(t.remainingTotal) && q(t.giftCardCode, (e) => typeof e == "string") && q(t.giftCardBalance, (e) => typeof e == "number" && Number.isFinite(e)) && q(t.fullyCoveredByCard, (e) => typeof e == "boolean");
|
|
288
298
|
}
|
|
289
|
-
var
|
|
290
|
-
function
|
|
291
|
-
if (!
|
|
299
|
+
var _e = "We couldn't apply that gift card. Please try again.";
|
|
300
|
+
function ve(e) {
|
|
301
|
+
if (!ge(e)) return {
|
|
292
302
|
valid: !1,
|
|
293
|
-
error:
|
|
303
|
+
error: _e
|
|
294
304
|
};
|
|
295
|
-
let
|
|
305
|
+
let n = e, r = i(t(n.appliedAmount)), a = n.remainingTotal, o = n.fullyCoveredByCard ?? a <= 0, s = !o;
|
|
296
306
|
return {
|
|
297
307
|
valid: !0,
|
|
298
|
-
giftCardCode:
|
|
299
|
-
giftCardAmount:
|
|
300
|
-
giftCardBalance:
|
|
308
|
+
giftCardCode: n.giftCardCode ?? void 0,
|
|
309
|
+
giftCardAmount: r,
|
|
310
|
+
giftCardBalance: n.giftCardBalance ?? void 0,
|
|
301
311
|
paymentType: o ? "gift_card_only" : "split",
|
|
302
312
|
stripeAmount: a,
|
|
303
|
-
orderTotal:
|
|
313
|
+
orderTotal: r + a,
|
|
304
314
|
requiresStripe: s
|
|
305
315
|
};
|
|
306
316
|
}
|
|
307
317
|
//#endregion
|
|
308
318
|
//#region src/lib/api/gift-cards.ts
|
|
309
|
-
var J =
|
|
310
|
-
async function
|
|
319
|
+
var J = c("VC");
|
|
320
|
+
async function ye(e, t) {
|
|
311
321
|
try {
|
|
312
|
-
let n = await
|
|
322
|
+
let n = await h(`${_()}/cart/${e}/apply-gift-card`, { giftCardCode: t });
|
|
313
323
|
if (!n.success) return n.statusCode === 429 ? {
|
|
314
324
|
valid: !1,
|
|
315
325
|
error: "Too many attempts. Please wait a moment and try again."
|
|
@@ -317,7 +327,7 @@ async function _e(e, t) {
|
|
|
317
327
|
valid: !1,
|
|
318
328
|
error: n.error || "Invalid gift card code"
|
|
319
329
|
});
|
|
320
|
-
let r =
|
|
330
|
+
let r = ve(n.data);
|
|
321
331
|
return r.valid || J.error("Apply gift card returned an unusable payload:", n.data), r;
|
|
322
332
|
} catch (e) {
|
|
323
333
|
return J.error("applyGiftCard error:", e), {
|
|
@@ -326,9 +336,9 @@ async function _e(e, t) {
|
|
|
326
336
|
};
|
|
327
337
|
}
|
|
328
338
|
}
|
|
329
|
-
async function
|
|
339
|
+
async function be(e, t) {
|
|
330
340
|
try {
|
|
331
|
-
let n = await
|
|
341
|
+
let n = await p(`${_()}/cart/${e}/gift-card`, t ? { body: JSON.stringify({ giftCardCode: t }) } : void 0);
|
|
332
342
|
return n.success ? { success: !0 } : (J.error("Remove gift card failed:", n.error), {
|
|
333
343
|
success: !1,
|
|
334
344
|
error: n.error || "Failed to remove gift card"
|
|
@@ -340,9 +350,9 @@ async function ve(e, t) {
|
|
|
340
350
|
};
|
|
341
351
|
}
|
|
342
352
|
}
|
|
343
|
-
async function
|
|
353
|
+
async function xe(e, t) {
|
|
344
354
|
try {
|
|
345
|
-
let n = await
|
|
355
|
+
let n = await h(`${_()}/cart/${e}/complete-gift-card-payment`, {
|
|
346
356
|
customerName: d(t.firstName, t.lastName),
|
|
347
357
|
customerEmail: t.email,
|
|
348
358
|
firstName: t.firstName,
|
|
@@ -350,7 +360,7 @@ async function ye(e, t) {
|
|
|
350
360
|
email: t.email,
|
|
351
361
|
phoneNumber: t.phoneNumber || null,
|
|
352
362
|
mailingList: t.mailingList || !1,
|
|
353
|
-
attribution:
|
|
363
|
+
attribution: ee()
|
|
354
364
|
});
|
|
355
365
|
return n.success ? {
|
|
356
366
|
success: !0,
|
|
@@ -369,24 +379,24 @@ async function ye(e, t) {
|
|
|
369
379
|
}
|
|
370
380
|
//#endregion
|
|
371
381
|
//#region src/lib/api/waitlist.ts
|
|
372
|
-
var Y =
|
|
382
|
+
var Y = c("VC"), Se = {
|
|
373
383
|
waitlist_not_enabled: "Waitlist is not available for this event",
|
|
374
384
|
event_not_found: "Event not found",
|
|
375
385
|
invalid_phone: "Please enter a valid phone number",
|
|
376
386
|
already_purchased: "You have already purchased tickets for this event",
|
|
377
387
|
phone_already_registered: "This phone number is already on the waitlist"
|
|
378
388
|
};
|
|
379
|
-
async function
|
|
389
|
+
async function Ce(e, t, n = null, r = !1) {
|
|
380
390
|
try {
|
|
381
391
|
let i = { email: t };
|
|
382
392
|
n && r && (i.phone = n, i.smsOptIn = !0);
|
|
383
|
-
let a = await
|
|
393
|
+
let a = await h(`/events/${e}/waitlist`, i);
|
|
384
394
|
return a.success ? {
|
|
385
395
|
success: !0,
|
|
386
396
|
updated: a.data?.updated
|
|
387
397
|
} : (Y.error("Join waitlist failed:", a.error), {
|
|
388
398
|
success: !1,
|
|
389
|
-
error:
|
|
399
|
+
error: Se[a.error ?? ""] || "Failed to join waitlist. Please try again."
|
|
390
400
|
});
|
|
391
401
|
} catch (e) {
|
|
392
402
|
return Y.error("joinWaitlist error:", e), {
|
|
@@ -395,9 +405,9 @@ async function xe(e, t, n = null, r = !1) {
|
|
|
395
405
|
};
|
|
396
406
|
}
|
|
397
407
|
}
|
|
398
|
-
async function
|
|
408
|
+
async function we(e, t) {
|
|
399
409
|
try {
|
|
400
|
-
let n = await
|
|
410
|
+
let n = await h(`/checkout/validate-token/${e}`, { email: t });
|
|
401
411
|
return n.success ? {
|
|
402
412
|
valid: !0,
|
|
403
413
|
eventId: n.data?.eventId ?? 0
|
|
@@ -414,7 +424,7 @@ async function Se(e, t) {
|
|
|
414
424
|
};
|
|
415
425
|
}
|
|
416
426
|
}
|
|
417
|
-
async function
|
|
427
|
+
async function X(e) {
|
|
418
428
|
let t = {
|
|
419
429
|
waitlistEnabled: !1,
|
|
420
430
|
soldOut: !1,
|
|
@@ -433,7 +443,7 @@ async function Ce(e) {
|
|
|
433
443
|
}
|
|
434
444
|
//#endregion
|
|
435
445
|
//#region src/lib/constants/colors.ts
|
|
436
|
-
var
|
|
446
|
+
var Te = {
|
|
437
447
|
primary: "#0284fe",
|
|
438
448
|
secondary: "#1d4ed8",
|
|
439
449
|
tertiary: "#2563eb"
|
|
@@ -523,8 +533,8 @@ var X = {
|
|
|
523
533
|
300: "#ffeaa7"
|
|
524
534
|
},
|
|
525
535
|
coral: "#ff6b6b"
|
|
526
|
-
},
|
|
527
|
-
blue:
|
|
536
|
+
}, Ee = { defaultThemePrimary: "#7c3aed" }, De = {
|
|
537
|
+
blue: Te.tertiary,
|
|
528
538
|
black: "#000000",
|
|
529
539
|
darkGray: Z[700],
|
|
530
540
|
gray: "#666666",
|
|
@@ -538,4 +548,4 @@ var X = {
|
|
|
538
548
|
green: $.green[500]
|
|
539
549
|
};
|
|
540
550
|
//#endregion
|
|
541
|
-
export {
|
|
551
|
+
export { re as A, oe as C, S as D, C as E, te as O, se as S, w as T, pe as _, De as a, le as b, we as c, be as d, he as f, B as g, V as h, Q as i, ne as k, ye as l, L as m, Ee as n, X as o, me as p, Z as r, Ce as s, $ as t, xe as u, de as v, ae as w, fe as x, G as y };
|