@getmicdrop/venue-calendar 4.2.10 → 4.2.12
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/{Calendar-CYkpiAtv.js → Calendar-D7s5gLk_.js} +2 -2
- package/dist/{CalendarFoundryView-DPXG2vcr.js → CalendarFoundryView-BrsToTIb.js} +6 -6
- package/dist/{CartView-Bka7Ouuf.js → CartView-DP5TuBgM.js} +14 -14
- package/dist/{Checkout-DH268Kso.js → Checkout-CYTsIOBV.js} +15 -15
- package/dist/{Checkout-LkiR2I6U.js → Checkout-DpcKVoV0.js} +265 -244
- package/dist/{CheckoutTimer-C4SBpf38.js → CheckoutTimer-C9tJJZC8.js} +1 -1
- package/dist/{CollectionView-CQ6BKmpp.js → CollectionView-DIWLyNiY.js} +5 -5
- package/dist/{Event-Dt-7Pau8.js → Event-78cbicQy.js} +161 -157
- package/dist/{EventPage-CkziHztQ.js → EventPage-ChQ04taO.js} +13 -13
- package/dist/{Input-VmGIkIrm.js → Input-BvutquC_.js} +5 -3
- package/dist/{Modal-CjMTStvm.js → Modal-kJYg2hMo.js} +2 -2
- package/dist/{ModalFooter-BndOSwTE.js → ModalFooter-DMxM0E8Y.js} +1 -1
- package/dist/{PasswordInput-CzRzjBIa.js → PasswordInput-D5_BuRnw.js} +1 -1
- package/dist/{ScarcityBadge-hVqsuotm.js → ScarcityBadge-R32tzjFi.js} +1 -1
- package/dist/{SeriesPage-CtVo7ltY.js → SeriesPage-B42dakZY.js} +3 -3
- package/dist/{Success-CgLRsVYC.js → Success-CvoORmAN.js} +15 -15
- package/dist/{ViewTicketsEmbed-CKucKt-W.js → ViewTicketsEmbed-C0QPIbpw.js} +6 -6
- package/dist/{__SKIP_PATHS__-BTbGfN80.js → __SKIP_PATHS__-DmdRxELE.js} +1 -1
- package/dist/api/api.cjs +1 -1
- package/dist/api/api.mjs +267 -252
- package/dist/api/gift-cards.d.ts +13 -3
- package/dist/api/orders.d.ts +12 -0
- package/dist/api/transformers/cart.d.ts +16 -1
- package/dist/{colors-fhDq0k7I.js → colors-Dk53YuNz.js} +80 -75
- package/dist/{event-transform-eNiddvbF.js → event-transform-DUqXNcXz.js} +1 -1
- package/dist/{eventStatusStream-sq6uPnMe.js → eventStatusStream-C5KadkMh.js} +1 -1
- package/dist/{i18n-Bk8x-2nR.js → i18n-nPKgIP_8.js} +2 -2
- package/dist/{labels-Djxn2Lvi.js → labels-YAwDbsF8.js} +1 -1
- package/dist/{modalManager.svelte-DHSGjxWd.js → modalManager.svelte-DDWCrGed.js} +1 -1
- package/dist/{orders-NZP81zYT.js → orders-xGH8-IQn.js} +264 -216
- package/dist/{pixels-BBruZizp.js → pixels-Hb-kLRzV.js} +8 -8
- package/dist/{utils-CAxbM_uh.js → utils-CcxQIxOO.js} +49 -49
- package/dist/venue-calendar.es.js +743 -743
- package/dist/venue-calendar.iife.js +52 -52
- package/dist/venue-calendar.umd.js +49 -49
- package/package.json +220 -220
- /package/dist/locales/{4.2.10 → 4.2.12}/flow/de.js +0 -0
- /package/dist/locales/{4.2.10 → 4.2.12}/flow/es.js +0 -0
- /package/dist/locales/{4.2.10 → 4.2.12}/flow/fr.js +0 -0
- /package/dist/locales/{4.2.10 → 4.2.12}/flow/id.js +0 -0
- /package/dist/locales/{4.2.10 → 4.2.12}/flow/it.js +0 -0
- /package/dist/locales/{4.2.10 → 4.2.12}/flow/ja.js +0 -0
- /package/dist/locales/{4.2.10 → 4.2.12}/flow/ko.js +0 -0
- /package/dist/locales/{4.2.10 → 4.2.12}/flow/nl.js +0 -0
- /package/dist/locales/{4.2.10 → 4.2.12}/flow/pl.js +0 -0
- /package/dist/locales/{4.2.10 → 4.2.12}/flow/pt-br.js +0 -0
- /package/dist/locales/{4.2.10 → 4.2.12}/flow/tr.js +0 -0
- /package/dist/locales/{4.2.10 → 4.2.12}/flow/zh.js +0 -0
- /package/dist/locales/{4.2.10 → 4.2.12}/main/de.js +0 -0
- /package/dist/locales/{4.2.10 → 4.2.12}/main/es.js +0 -0
- /package/dist/locales/{4.2.10 → 4.2.12}/main/fr.js +0 -0
- /package/dist/locales/{4.2.10 → 4.2.12}/main/id.js +0 -0
- /package/dist/locales/{4.2.10 → 4.2.12}/main/it.js +0 -0
- /package/dist/locales/{4.2.10 → 4.2.12}/main/ja.js +0 -0
- /package/dist/locales/{4.2.10 → 4.2.12}/main/ko.js +0 -0
- /package/dist/locales/{4.2.10 → 4.2.12}/main/nl.js +0 -0
- /package/dist/locales/{4.2.10 → 4.2.12}/main/pl.js +0 -0
- /package/dist/locales/{4.2.10 → 4.2.12}/main/pt-br.js +0 -0
- /package/dist/locales/{4.2.10 → 4.2.12}/main/tr.js +0 -0
- /package/dist/locales/{4.2.10 → 4.2.12}/main/zh.js +0 -0
package/dist/api/gift-cards.d.ts
CHANGED
|
@@ -59,12 +59,22 @@ export declare function applyGiftCard(cartId: string, code: string): Promise<App
|
|
|
59
59
|
export interface RemoveGiftCardResult {
|
|
60
60
|
success: boolean;
|
|
61
61
|
error?: string;
|
|
62
|
+
/**
|
|
63
|
+
* Amount still owed after the removal, in DOLLARS, as the server computed it.
|
|
64
|
+
* `undefined` when the cart is not yet priced (the server sends null) — the
|
|
65
|
+
* caller must then leave its own total alone rather than infer a zero.
|
|
66
|
+
*/
|
|
67
|
+
remainingTotal?: number;
|
|
62
68
|
}
|
|
63
69
|
/**
|
|
64
|
-
* Remove a gift card from a cart.
|
|
65
|
-
*
|
|
70
|
+
* Remove a gift card from a cart. Identify a single stacked card by `giftCardId`
|
|
71
|
+
* (what the cart response gives — codes come back masked) or by `code` for one
|
|
72
|
+
* applied in this same session. Pass neither to remove ALL applied cards.
|
|
66
73
|
*/
|
|
67
|
-
export declare function removeGiftCard(cartId: string,
|
|
74
|
+
export declare function removeGiftCard(cartId: string, target?: {
|
|
75
|
+
giftCardId?: number;
|
|
76
|
+
code?: string;
|
|
77
|
+
}): Promise<RemoveGiftCardResult>;
|
|
68
78
|
export interface CompleteGiftCardPaymentInput {
|
|
69
79
|
firstName: string;
|
|
70
80
|
lastName: string;
|
package/dist/api/orders.d.ts
CHANGED
|
@@ -41,12 +41,24 @@ export interface CartReservationView {
|
|
|
41
41
|
priceAtReservation: number;
|
|
42
42
|
status: string;
|
|
43
43
|
}
|
|
44
|
+
/** One gift card already applied to the cart, as the server will describe it. */
|
|
45
|
+
export interface CartGiftCardView {
|
|
46
|
+
giftCardId: number;
|
|
47
|
+
/** Last four only — the server never returns the code. Display, not identity. */
|
|
48
|
+
maskedCode: string;
|
|
49
|
+
/**
|
|
50
|
+
* Allocated amount in DOLLARS (the wire carries cents), or null when the
|
|
51
|
+
* server sent nothing usable — never 0, which would understate coverage.
|
|
52
|
+
*/
|
|
53
|
+
amount: number | null;
|
|
54
|
+
}
|
|
44
55
|
export interface CartView {
|
|
45
56
|
uuid: string;
|
|
46
57
|
eventID: number;
|
|
47
58
|
status: string;
|
|
48
59
|
expiresAt: string;
|
|
49
60
|
reservations: CartReservationView[];
|
|
61
|
+
giftCards: CartGiftCardView[];
|
|
50
62
|
}
|
|
51
63
|
export declare function getCartByUUID(cartUUID: string, expectedEventID?: string | number): Promise<CartView | null>;
|
|
52
64
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CartView, CartReservationView } from '../orders.js';
|
|
1
|
+
import { CartView, CartReservationView, CartGiftCardView } from '../orders.js';
|
|
2
2
|
/**
|
|
3
3
|
* Parse a single raw reservation row into the normalized CartReservationView.
|
|
4
4
|
*
|
|
@@ -8,6 +8,21 @@ import { CartView, CartReservationView } from '../orders.js';
|
|
|
8
8
|
* getCartByUUID.
|
|
9
9
|
*/
|
|
10
10
|
export declare function parseCartReservation(raw: unknown): CartReservationView;
|
|
11
|
+
/**
|
|
12
|
+
* Parse one applied gift card.
|
|
13
|
+
*
|
|
14
|
+
* `maskedCode` is all the server will say — the code itself is a bearer
|
|
15
|
+
* instrument and this cart endpoint is public, keyed only by the cart UUID — so
|
|
16
|
+
* removal is keyed by `giftCardId`. `amount` arrives in CENTS (the orders-service
|
|
17
|
+
* column) and is converted to DOLLARS here, because every gift-card figure the
|
|
18
|
+
* checkout UI handles downstream is in dollars.
|
|
19
|
+
*
|
|
20
|
+
* A missing or malformed amount parses to `null`, never 0. This value is what
|
|
21
|
+
* the panel says a card COVERS; a fabricated $0 would understate coverage and
|
|
22
|
+
* feed a wrong order ceiling back into the checkout. The consumer drops such an
|
|
23
|
+
* entry instead of drawing it (mf#2383).
|
|
24
|
+
*/
|
|
25
|
+
export declare function parseCartGiftCard(raw: unknown): CartGiftCardView;
|
|
11
26
|
/**
|
|
12
27
|
* Parse a raw cart payload into the normalized CartView domain shape.
|
|
13
28
|
*
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { x as e } from "./Button-C4uFgl7L.js";
|
|
2
2
|
import { E as t, F as n, O as r, c as i, g as a, h as o, m as s, s as c, w as l, y as u } from "./timezones-C5l0SSHK.js";
|
|
3
3
|
import { T as d } from "./constants-BWfNecCz.js";
|
|
4
|
-
import { D as f,
|
|
4
|
+
import { D as f, F as p, M as m, N as h, O as g, g as ee, k as _ } from "./orders-xGH8-IQn.js";
|
|
5
5
|
//#region node_modules/@getmicdrop/svelte-components/dist/transforms/ticket.js
|
|
6
6
|
var v = {
|
|
7
7
|
EVERYWHERE: 0,
|
|
@@ -18,7 +18,7 @@ function b(e) {
|
|
|
18
18
|
function x(e, t) {
|
|
19
19
|
return e.totalCapacity ?? e.quantity ?? t;
|
|
20
20
|
}
|
|
21
|
-
function
|
|
21
|
+
function S(e) {
|
|
22
22
|
let n = t(), r = o(e.effectiveSalesBegin, e.salesBegin, e.saleStartDate) ?? null, i = o(e.effectiveSalesEnd, e.salesEnd, e.saleEndDate) ?? null, c = u(r), l = u(i);
|
|
23
23
|
if (!a(r) && !c) return "scheduled";
|
|
24
24
|
if (!a(i) && !l) return "sales_ended";
|
|
@@ -28,12 +28,12 @@ function te(e) {
|
|
|
28
28
|
let d = b(e), f = x(e, d);
|
|
29
29
|
return d === 0 ? "sold_out" : f > 0 && d / f < .1 ? "low" : "on_sale";
|
|
30
30
|
}
|
|
31
|
-
function
|
|
31
|
+
function te(e, t = {}) {
|
|
32
32
|
if (!Array.isArray(e)) return [];
|
|
33
33
|
let n = e;
|
|
34
34
|
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
35
|
}
|
|
36
|
-
function
|
|
36
|
+
function ne(e) {
|
|
37
37
|
if (!Array.isArray(e) || e.length === 0) return {
|
|
38
38
|
totalRemaining: 0,
|
|
39
39
|
totalCapacity: 0,
|
|
@@ -50,29 +50,29 @@ function S(e) {
|
|
|
50
50
|
isSoldOut: t === 0
|
|
51
51
|
};
|
|
52
52
|
}
|
|
53
|
-
function
|
|
53
|
+
function C(e) {
|
|
54
54
|
if (!Array.isArray(e) || e.length === 0) return 0;
|
|
55
55
|
let t = e.map((e) => Number(e.price ?? e.ticketPrice)).filter((e) => Number.isFinite(e) && e > 0);
|
|
56
56
|
return t.length > 0 ? Math.min(...t) : 0;
|
|
57
57
|
}
|
|
58
58
|
//#endregion
|
|
59
59
|
//#region node_modules/@getmicdrop/svelte-components/dist/transforms/event.js
|
|
60
|
-
function
|
|
60
|
+
function w(e) {
|
|
61
61
|
return e.availableTickets || e.available_tickets || e.tickets || [];
|
|
62
62
|
}
|
|
63
|
-
function
|
|
63
|
+
function T(e) {
|
|
64
64
|
if (!e || !(e.isHidden === !0 || typeof e.visibility == "number" && e.visibility >= y.PROMO_ONLY) || e.salesChannel === v.BOX_OFFICE_ONLY) return !1;
|
|
65
65
|
let n = t(), r = o(e.effectiveSalesBegin, e.salesBegin, e.salesStart, e.saleBegin, e.onSaleStart, e.saleStartDate), i = o(e.effectiveSalesEnd, e.salesEnd, e.saleEnd, e.onSaleEnd, e.saleEndDate), c = u(r), l = u(i);
|
|
66
66
|
if (!a(r) && !c || !a(i) && !l || c && s(c, n) > 0 || l && s(l, n) < 0) return !1;
|
|
67
67
|
let d = e.remainingCapacity ?? e.quantityRemaining ?? e.quantity;
|
|
68
68
|
return !(e.soldOut || d != null && d <= 0);
|
|
69
69
|
}
|
|
70
|
-
function
|
|
71
|
-
return e ? e.hasHiddenTickets === !0 ||
|
|
70
|
+
function re(e) {
|
|
71
|
+
return e ? e.hasHiddenTickets === !0 || w(e).some(T) : !1;
|
|
72
72
|
}
|
|
73
73
|
//#endregion
|
|
74
74
|
//#region node_modules/@getmicdrop/svelte-components/dist/errors/classes/NotFoundError.js
|
|
75
|
-
var
|
|
75
|
+
var E = class extends l {
|
|
76
76
|
constructor(e, t) {
|
|
77
77
|
let n = t ? `${e} with ID ${t} not found` : `${e} not found`;
|
|
78
78
|
super(n, "NOT_FOUND", {
|
|
@@ -87,14 +87,14 @@ var T = class extends l {
|
|
|
87
87
|
getUserMessage(e) {
|
|
88
88
|
return i(e)?.fromCode?.(this.code) || c(this.resourceType.toLowerCase());
|
|
89
89
|
}
|
|
90
|
-
},
|
|
91
|
-
async function
|
|
90
|
+
}, D = e("VC");
|
|
91
|
+
async function ie(e, t) {
|
|
92
92
|
try {
|
|
93
93
|
if (!t || !t.trim()) return {
|
|
94
94
|
valid: !1,
|
|
95
95
|
error: "Promo code is required"
|
|
96
96
|
};
|
|
97
|
-
let n = encodeURIComponent(t.trim()), r = await
|
|
97
|
+
let n = encodeURIComponent(t.trim()), r = await g(`/promo-codes/validate/${e}/${n}`);
|
|
98
98
|
if (!r.success) return r.statusCode === 404 ? {
|
|
99
99
|
valid: !1,
|
|
100
100
|
error: "Invalid promo code"
|
|
@@ -115,31 +115,31 @@ async function ae(e, t) {
|
|
|
115
115
|
applyToTicketIds: i.applyToTicketIds
|
|
116
116
|
};
|
|
117
117
|
} catch (e) {
|
|
118
|
-
return
|
|
118
|
+
return D.error("Error validating promo code:", e), {
|
|
119
119
|
valid: !1,
|
|
120
120
|
error: "Network error validating code"
|
|
121
121
|
};
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
|
-
async function
|
|
124
|
+
async function ae(e) {
|
|
125
125
|
try {
|
|
126
|
-
let t = await
|
|
126
|
+
let t = await g(`/promo-codes/check/${e}`);
|
|
127
127
|
return !t.success || t.data.hasPromoCodes === !0;
|
|
128
128
|
} catch (e) {
|
|
129
|
-
return
|
|
129
|
+
return D.error("Error checking promo codes availability:", e), !0;
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
|
-
async function
|
|
132
|
+
async function O(e, t, n) {
|
|
133
133
|
try {
|
|
134
134
|
let r = { promoCode: t };
|
|
135
135
|
n && Object.keys(n).length > 0 && (r.productQuantities = n);
|
|
136
|
-
let i = await
|
|
136
|
+
let i = await _(`${m()}/cart/${e}/apply-promo`, r);
|
|
137
137
|
return i.success ? { success: !0 } : {
|
|
138
138
|
success: !1,
|
|
139
139
|
error: i.error || "Failed to apply promo code"
|
|
140
140
|
};
|
|
141
141
|
} catch (e) {
|
|
142
|
-
return
|
|
142
|
+
return D.error("Error applying promo code:", e), {
|
|
143
143
|
success: !1,
|
|
144
144
|
error: "Network error applying code"
|
|
145
145
|
};
|
|
@@ -147,65 +147,65 @@ async function se(e, t, n) {
|
|
|
147
147
|
}
|
|
148
148
|
//#endregion
|
|
149
149
|
//#region src/lib/api/result.ts
|
|
150
|
-
function
|
|
150
|
+
function k(e) {
|
|
151
151
|
return {
|
|
152
152
|
ok: !0,
|
|
153
153
|
data: e
|
|
154
154
|
};
|
|
155
155
|
}
|
|
156
|
-
function
|
|
156
|
+
function A(e) {
|
|
157
157
|
return {
|
|
158
158
|
ok: !1,
|
|
159
159
|
error: e
|
|
160
160
|
};
|
|
161
161
|
}
|
|
162
|
-
function
|
|
162
|
+
function j(e) {
|
|
163
163
|
return {
|
|
164
164
|
ok: !1,
|
|
165
165
|
error: e,
|
|
166
166
|
notFound: !0
|
|
167
167
|
};
|
|
168
168
|
}
|
|
169
|
-
function
|
|
169
|
+
function oe(e, t) {
|
|
170
170
|
return e.ok ? e.data : t;
|
|
171
171
|
}
|
|
172
172
|
//#endregion
|
|
173
173
|
//#region src/lib/api/route-manifest.ts
|
|
174
|
-
var
|
|
175
|
-
`${
|
|
174
|
+
var M = "/api/v2/public", N = "/api/orders/v2/public", P = "/api/orders/v2", F = "00000000-0000-0000-0000-000000000000";
|
|
175
|
+
`${M}`, `${M}${F}`, `${M}`, `${M}${F}`, `${M}`, `${M}${F}`, `${M}`, `${M}${F}`, `${M}`, `${M}${F}`, `${M}`, `${M}${F}`, `${M}`, `${M}${F}`, `${M}`, `${M}${F}`, `${M}`, `${M}`, `${M}`, `${M}${F}`, `${M}`, `${M}${F}`, `${M}`, `${M}${F}`, `${M}`, `${M}${F}`, `${M}`, `${M}${F}`, `${M}`, `${M}${F}`, `${M}`, `${M}${F}`, `${M}`, `${M}${F}`, `${M}`, `${M}${F}`, `${M}`, `${M}${F}`, `${M}`, `${M}`, `${M}`, `${M}${F}`, `${M}`, `${M}${F}`, `${M}`, `${M}${F}`, `${M}`, `${M}${F}`, `${M}`, `${M}${F}`, `${M}`, `${M}${F}`, `${M}`, `${M}${F}`, `${M}`, `${M}`, `${M}`, `${M}${F}`, `${M}`, `${M}${F}`, `${M}`, `${M}${F}`, `${M}`, `${M}${F}`, `${M}`, `${M}${F}`, `${M}`, `${M}${F}`, `${M}`, `${M}`, `${M}`, `${M}`, `${M}`, `${M}`, `${M}`, `${M}${F}`, `${N}`, `${N}`, `${N}`, `${N}${F}`, `${N}`, `${N}${F}`, `${N}`, `${N}${F}`, `${N}`, `${N}${F}`, `${N}`, `${N}${F}`, `${N}`, `${N}${F}`, `${N}`, `${N}${F}`, `${N}`, `${N}${F}`, `${P}`, `${P}`, `${N}`, `${N}`, `${N}`, `${N}`, `${M}`, `${M}${F}`, `${M}`, `${M}`;
|
|
176
176
|
//#endregion
|
|
177
177
|
//#region src/lib/api/events.ts
|
|
178
|
-
var
|
|
179
|
-
async function
|
|
178
|
+
var I = e("VC"), L = /* @__PURE__ */ new Map();
|
|
179
|
+
async function se(e, t = fetch, n) {
|
|
180
180
|
let r = n ? `${e}:pw` : String(e);
|
|
181
181
|
if (t === fetch) {
|
|
182
|
-
let e =
|
|
182
|
+
let e = L.get(r);
|
|
183
183
|
if (e) return e;
|
|
184
184
|
}
|
|
185
185
|
let i = (async () => {
|
|
186
186
|
try {
|
|
187
|
-
let r = await t(n ? `${
|
|
188
|
-
if (!r.ok) return r.status === 404 ?
|
|
187
|
+
let r = await t(n ? `${h()}/events/${e}?password=${encodeURIComponent(n)}` : `${h()}/events/${e}`);
|
|
188
|
+
if (!r.ok) return r.status === 404 ? j("event_not_found") : (I.error(`Failed to fetch event details: ${r.status}`), A("event_fetch_failed"));
|
|
189
189
|
let i = await r.json();
|
|
190
|
-
return i ?
|
|
190
|
+
return i ? k(i) : j("event_not_found");
|
|
191
191
|
} catch (e) {
|
|
192
|
-
return
|
|
192
|
+
return I.error("Error fetching event details:", e), A("event_fetch_failed");
|
|
193
193
|
}
|
|
194
194
|
})();
|
|
195
|
-
return t === fetch && (
|
|
196
|
-
|
|
195
|
+
return t === fetch && (L.set(r, i), i.finally(() => {
|
|
196
|
+
L.get(r) === i && L.delete(r);
|
|
197
197
|
})), i;
|
|
198
198
|
}
|
|
199
|
-
async function
|
|
200
|
-
let r = await
|
|
199
|
+
async function ce(e, t = fetch, n) {
|
|
200
|
+
let r = await se(e, t, n);
|
|
201
201
|
return r.ok ? r.data : null;
|
|
202
202
|
}
|
|
203
203
|
async function R(e, t, n = (e) => e) {
|
|
204
204
|
try {
|
|
205
|
-
let r = await
|
|
206
|
-
return r ?
|
|
205
|
+
let r = await p(e);
|
|
206
|
+
return r ? k(n(r)) : (I.error(`Failed to load (${t}): network or server error`), A(t));
|
|
207
207
|
} catch (e) {
|
|
208
|
-
return
|
|
208
|
+
return I.error(`Error loading (${t}):`, e), A(t);
|
|
209
209
|
}
|
|
210
210
|
}
|
|
211
211
|
function z(e) {
|
|
@@ -213,10 +213,10 @@ function z(e) {
|
|
|
213
213
|
}
|
|
214
214
|
async function B(e, t) {
|
|
215
215
|
let n = t?.trim(), r = n ? `?promoCode=${encodeURIComponent(n)}` : "";
|
|
216
|
-
return R(`${
|
|
216
|
+
return R(`${h()}/tickets/event/${e}${r}`, "tickets_fetch_failed", z);
|
|
217
217
|
}
|
|
218
218
|
async function V(e, t) {
|
|
219
|
-
return
|
|
219
|
+
return oe(await B(e, t), []);
|
|
220
220
|
}
|
|
221
221
|
function H(e) {
|
|
222
222
|
return Array.isArray(e) ? e : Array.isArray(e.events) ? e.events : [];
|
|
@@ -233,13 +233,13 @@ function W(e, t, n) {
|
|
|
233
233
|
}), r;
|
|
234
234
|
}
|
|
235
235
|
async function G(e, t, n, r) {
|
|
236
|
-
return W(`${
|
|
236
|
+
return W(`${h()}/events/venue/${e}/month/${t}/${n}`, "month_events_fetch_failed", r);
|
|
237
237
|
}
|
|
238
238
|
async function le(e, t, n, r) {
|
|
239
|
-
return W(`${
|
|
239
|
+
return W(`${h()}/events/organization/${e}/month/${t}/${n}`, "org_month_events_fetch_failed", r);
|
|
240
240
|
}
|
|
241
241
|
async function ue(e, t) {
|
|
242
|
-
return R(`${
|
|
242
|
+
return R(`${h()}/series/${e}/occurrences?venueId=${t}`, "series_cta_fetch_failed");
|
|
243
243
|
}
|
|
244
244
|
async function de(e, t) {
|
|
245
245
|
let n = await ue(e, t);
|
|
@@ -247,32 +247,32 @@ async function de(e, t) {
|
|
|
247
247
|
}
|
|
248
248
|
async function fe(e, t) {
|
|
249
249
|
try {
|
|
250
|
-
let n = t ? `?slug=${encodeURIComponent(t)}` : "", r = await
|
|
251
|
-
if (!r || !r.type) throw new
|
|
250
|
+
let n = t ? `?slug=${encodeURIComponent(t)}` : "", r = await p(`${h()}/resolve/${encodeURIComponent(String(e))}${n}`);
|
|
251
|
+
if (!r || !r.type) throw new E("entity", String(e));
|
|
252
252
|
return r;
|
|
253
253
|
} catch (e) {
|
|
254
|
-
return
|
|
254
|
+
return I.error("Error resolving public entity:", e), null;
|
|
255
255
|
}
|
|
256
256
|
}
|
|
257
257
|
async function pe(e, t) {
|
|
258
258
|
try {
|
|
259
|
-
let n = t ? `${
|
|
260
|
-
if (!r) throw new
|
|
259
|
+
let n = t ? `${h()}/collections/${e}?password=${encodeURIComponent(t)}` : `${h()}/collections/${e}`, r = await p(n);
|
|
260
|
+
if (!r) throw new E("collection", String(e));
|
|
261
261
|
return r;
|
|
262
262
|
} catch (e) {
|
|
263
|
-
return
|
|
263
|
+
return I.error("Error fetching collection:", e), null;
|
|
264
264
|
}
|
|
265
265
|
}
|
|
266
266
|
async function me(e, t) {
|
|
267
267
|
try {
|
|
268
|
-
let n = await
|
|
268
|
+
let n = await p(`${h()}/events/${e}/check-password`, {
|
|
269
269
|
method: "POST",
|
|
270
270
|
headers: { "Content-Type": "application/json" },
|
|
271
271
|
body: JSON.stringify({ password: t })
|
|
272
272
|
});
|
|
273
273
|
return typeof n == "boolean" ? { valid: n } : { valid: n?.valid === !0 };
|
|
274
274
|
} catch (e) {
|
|
275
|
-
return
|
|
275
|
+
return I.error("Error checking event password:", e), { valid: !1 };
|
|
276
276
|
}
|
|
277
277
|
}
|
|
278
278
|
//#endregion
|
|
@@ -281,7 +281,7 @@ var K = e("VC");
|
|
|
281
281
|
async function he(e) {
|
|
282
282
|
try {
|
|
283
283
|
if (!e) return K.warn("getVenue called without venueId"), null;
|
|
284
|
-
let t = await
|
|
284
|
+
let t = await g(`/venues/${e}`);
|
|
285
285
|
return t.success ? t.data ?? null : (K.error(`Failed to fetch venue: ${t.statusCode}`), null);
|
|
286
286
|
} catch (e) {
|
|
287
287
|
return K.error("Error fetching venue:", e), null;
|
|
@@ -320,7 +320,7 @@ function ve(e) {
|
|
|
320
320
|
var J = e("VC");
|
|
321
321
|
async function ye(e, t) {
|
|
322
322
|
try {
|
|
323
|
-
let n = await
|
|
323
|
+
let n = await _(`${m()}/cart/${e}/apply-gift-card`, { giftCardCode: t });
|
|
324
324
|
if (!n.success) return n.statusCode === 429 ? {
|
|
325
325
|
valid: !1,
|
|
326
326
|
error: "Too many attempts. Please wait a moment and try again."
|
|
@@ -337,13 +337,18 @@ async function ye(e, t) {
|
|
|
337
337
|
};
|
|
338
338
|
}
|
|
339
339
|
}
|
|
340
|
-
async function
|
|
340
|
+
async function Y(e, t) {
|
|
341
341
|
try {
|
|
342
|
-
let n = await
|
|
343
|
-
|
|
342
|
+
let n = t?.giftCardId ? { giftCardId: t.giftCardId } : t?.code ? { giftCardCode: t.code } : null, r = await f(`${m()}/cart/${e}/gift-card`, n ? { body: JSON.stringify(n) } : void 0);
|
|
343
|
+
if (!r.success) return J.error("Remove gift card failed:", r.error), {
|
|
344
344
|
success: !1,
|
|
345
|
-
error:
|
|
346
|
-
}
|
|
345
|
+
error: r.error || "Failed to remove gift card"
|
|
346
|
+
};
|
|
347
|
+
let i = r.data ?? {}, a = i.newTotal ?? i.NewTotal;
|
|
348
|
+
return {
|
|
349
|
+
success: !0,
|
|
350
|
+
...typeof a == "number" ? { remainingTotal: a } : {}
|
|
351
|
+
};
|
|
347
352
|
} catch (e) {
|
|
348
353
|
return J.error("removeGiftCard error:", e), {
|
|
349
354
|
success: !1,
|
|
@@ -351,9 +356,9 @@ async function be(e, t) {
|
|
|
351
356
|
};
|
|
352
357
|
}
|
|
353
358
|
}
|
|
354
|
-
async function
|
|
359
|
+
async function be(e, t) {
|
|
355
360
|
try {
|
|
356
|
-
let n = await
|
|
361
|
+
let n = await _(`${m()}/cart/${e}/complete-gift-card-payment`, {
|
|
357
362
|
customerName: d(t.firstName, t.lastName),
|
|
358
363
|
customerEmail: t.email,
|
|
359
364
|
firstName: t.firstName,
|
|
@@ -380,35 +385,35 @@ async function xe(e, t) {
|
|
|
380
385
|
}
|
|
381
386
|
//#endregion
|
|
382
387
|
//#region src/lib/api/waitlist.ts
|
|
383
|
-
var
|
|
388
|
+
var X = e("VC"), xe = {
|
|
384
389
|
waitlist_not_enabled: "Waitlist is not available for this event",
|
|
385
390
|
event_not_found: "Event not found",
|
|
386
391
|
invalid_phone: "Please enter a valid phone number",
|
|
387
392
|
already_purchased: "You have already purchased tickets for this event",
|
|
388
393
|
phone_already_registered: "This phone number is already on the waitlist"
|
|
389
394
|
};
|
|
390
|
-
async function
|
|
395
|
+
async function Se(e, t, n = null, r = !1) {
|
|
391
396
|
try {
|
|
392
397
|
let i = { email: t };
|
|
393
398
|
n && r && (i.phone = n, i.smsOptIn = !0);
|
|
394
|
-
let a = await
|
|
399
|
+
let a = await _(`/events/${e}/waitlist`, i);
|
|
395
400
|
return a.success ? {
|
|
396
401
|
success: !0,
|
|
397
402
|
updated: a.data?.updated
|
|
398
|
-
} : (
|
|
403
|
+
} : (X.error("Join waitlist failed:", a.error), {
|
|
399
404
|
success: !1,
|
|
400
|
-
error:
|
|
405
|
+
error: xe[a.error ?? ""] || "Failed to join waitlist. Please try again."
|
|
401
406
|
});
|
|
402
407
|
} catch (e) {
|
|
403
|
-
return
|
|
408
|
+
return X.error("joinWaitlist error:", e), {
|
|
404
409
|
success: !1,
|
|
405
410
|
error: "Network error. Please check your connection and try again."
|
|
406
411
|
};
|
|
407
412
|
}
|
|
408
413
|
}
|
|
409
|
-
async function
|
|
414
|
+
async function Ce(e, t) {
|
|
410
415
|
try {
|
|
411
|
-
let n = await
|
|
416
|
+
let n = await _(`/checkout/validate-token/${e}`, { email: t });
|
|
412
417
|
return n.success ? {
|
|
413
418
|
valid: !0,
|
|
414
419
|
eventId: n.data?.eventId ?? 0
|
|
@@ -418,28 +423,28 @@ async function we(e, t) {
|
|
|
418
423
|
errorCode: n.error
|
|
419
424
|
};
|
|
420
425
|
} catch (e) {
|
|
421
|
-
return
|
|
426
|
+
return X.error("validateWaitlistToken error:", e), {
|
|
422
427
|
valid: !1,
|
|
423
428
|
eventId: 0,
|
|
424
429
|
errorCode: "invalid_token"
|
|
425
430
|
};
|
|
426
431
|
}
|
|
427
432
|
}
|
|
428
|
-
async function
|
|
433
|
+
async function we(e) {
|
|
429
434
|
let t = {
|
|
430
435
|
waitlistEnabled: !1,
|
|
431
436
|
soldOut: !1,
|
|
432
437
|
gated: !1
|
|
433
438
|
};
|
|
434
439
|
try {
|
|
435
|
-
let n = await
|
|
440
|
+
let n = await g(`/events/${e}/waitlist/status`);
|
|
436
441
|
return n.success ? {
|
|
437
442
|
waitlistEnabled: !!n.data?.waitlistEnabled,
|
|
438
443
|
soldOut: !!n.data?.soldOut,
|
|
439
444
|
gated: !!n.data?.gated
|
|
440
445
|
} : t;
|
|
441
446
|
} catch (e) {
|
|
442
|
-
return
|
|
447
|
+
return X.error("getWaitlistStatus error:", e), t;
|
|
443
448
|
}
|
|
444
449
|
}
|
|
445
450
|
//#endregion
|
|
@@ -549,4 +554,4 @@ var Te = {
|
|
|
549
554
|
green: $.green[500]
|
|
550
555
|
};
|
|
551
556
|
//#endregion
|
|
552
|
-
export {
|
|
557
|
+
export { C as A, ae as C, ne as D, T as E, S as O, O as S, re as T, pe as _, De as a, le as b, Ce as c, Y as d, he as f, B as g, V as h, Q as i, te as k, ye as l, ce as m, Ee as n, we as o, me as p, Z as r, Se as s, $ as t, be as u, de as v, ie as w, fe as x, G as y };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { b as e } from "./timezones-C5l0SSHK.js";
|
|
2
2
|
import { a as t, c as n, f as r, p as i, u as a } from "./constants-BWfNecCz.js";
|
|
3
3
|
import { n as o, t as s } from "./event-BrptLro8.js";
|
|
4
|
-
import { A as c, D as l, O as u, T as d, k as f, r as p } from "./colors-
|
|
4
|
+
import { A as c, D as l, O as u, T as d, k as f, r as p } from "./colors-Dk53YuNz.js";
|
|
5
5
|
//#region src/lib/utils/event-transform.js
|
|
6
6
|
var m = "data:image/svg+xml," + encodeURIComponent(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 300" fill="none">
|
|
7
7
|
<rect width="200" height="300" fill="${p[200]}"/>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { x as e } from "./Button-C4uFgl7L.js";
|
|
2
|
-
import {
|
|
2
|
+
import { N as t, z as n } from "./orders-xGH8-IQn.js";
|
|
3
3
|
//#region src/lib/public-calendar-flow/eventStatusStream.ts
|
|
4
4
|
var r = e("VC"), i = /* @__PURE__ */ new Set([
|
|
5
5
|
"canceled",
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { E as e, R as t, m as n, y as r } from "./timezones-C5l0SSHK.js";
|
|
2
2
|
import { C as i, K as a, O as o, g as s, h as c, n as l, r as u, v as d } from "./constants-BWfNecCz.js";
|
|
3
3
|
import { t as f } from "./Text-CqjLjIF8.js";
|
|
4
|
-
import { E as p } from "./colors-
|
|
4
|
+
import { E as p } from "./colors-Dk53YuNz.js";
|
|
5
5
|
import { t as m } from "./createI18n-DBUVdZra.js";
|
|
6
|
-
import { t as h } from "./labels-
|
|
6
|
+
import { t as h } from "./labels-YAwDbsF8.js";
|
|
7
7
|
import "svelte/internal/disclose-version";
|
|
8
8
|
import * as g from "svelte/internal/client";
|
|
9
9
|
//#region src/lib/api/cta.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { B as e } from "./timezones-C5l0SSHK.js";
|
|
2
|
-
import { o as t } from "./ModalFooter-
|
|
2
|
+
import { o as t } from "./ModalFooter-DMxM0E8Y.js";
|
|
3
3
|
import "svelte/internal/disclose-version";
|
|
4
4
|
import * as n from "svelte/internal/client";
|
|
5
5
|
//#region node_modules/@getmicdrop/svelte-components/dist/primitives/Modal/ModalHeader.svelte
|