@getmicdrop/venue-calendar 4.2.33 → 4.2.35
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-B92-MN6-.js → ArrowLeftIcon-DS-NEije.js} +1 -1
- package/dist/{Badge-Bv_MT-Vt.js → Badge-DIHnRZlw.js} +1 -1
- package/dist/{BlockPlaceholder-DuE4xLS_.js → BlockPlaceholder-Dy9fStDr.js} +1 -1
- package/dist/{Calendar-CX3S7j_2.js → Calendar-CXwhGAmC.js} +19 -19
- package/dist/{CalendarFoundryView-CE5VMPRl.js → CalendarFoundryView-BRurhscw.js} +950 -950
- package/dist/{CalendarIcon-pJ01x71c.js → CalendarIcon-CvZ-GUH_.js} +1 -1
- package/dist/{CartView-BZALykSb.js → CartView-DT8DlMqQ.js} +532 -532
- package/dist/{Checkout-c6ExwNzk.js → Checkout-D3VqG09o.js} +173 -173
- package/dist/{Checkout-B6BHEAwF.js → Checkout-UU9C7CXV.js} +129 -129
- package/dist/{CheckoutTimer-Bz-HJhV2.js → CheckoutTimer-2WEgppW1.js} +5 -5
- package/dist/{ChevronDownIcon-k93EaHQh.js → ChevronDownIcon-DXbr-7H6.js} +1 -1
- package/dist/{ClockIcon-hnrV9bwg.js → ClockIcon-Dyx1LMo7.js} +1 -1
- package/dist/{CloseIcon-CdZ5mNTK.js → CloseIcon-NMHzwT75.js} +1 -1
- package/dist/{CollectionView-BMDKM-lg.js → CollectionView-DyMB_bPY.js} +9 -10
- package/dist/{Event-DvRnmTdU.js → Event-CXCOnkmi.js} +85 -85
- package/dist/EventPage-HlhaVqRG.js +981 -0
- package/dist/{Heading-Dfo3bjyn.js → Heading-DcZtRBSB.js} +1 -1
- package/dist/{Image-B3cEndLZ.js → Image-BZGbFJLw.js} +1 -1
- package/dist/{Input-BntIoPeV.js → Input-Cgdxdj6y.js} +1 -1
- package/dist/{MailIcon-CMyjGJ4_.js → MailIcon-D34sBBQX.js} +1 -1
- package/dist/{Modal-CpMs0l2W.js → Modal-BvT64ak1.js} +2 -2
- package/dist/{ModalFooter-Kdyt5XyP.js → ModalFooter-DM1dyl4S.js} +2 -2
- package/dist/{PasswordInput-C91gXtFY.js → PasswordInput-BNKrzXNm.js} +1 -1
- package/dist/{ScarcityBadge-C0YeWGkd.js → ScarcityBadge-DmbmsFlY.js} +23 -22
- package/dist/{SeriesPage-DNyhMA_k.js → SeriesPage-BXKz7PJV.js} +4 -4
- package/dist/{Spinner-BwiDys7C.js → Spinner-gpYLD9h6.js} +1 -1
- package/dist/{Success-BxvH6W_x.js → Success-DieJd6sx.js} +52 -52
- package/dist/{TagIcon-BkPcpKdu.js → TagIcon-Q7BC2QeQ.js} +1 -1
- package/dist/ViewTicketsEmbed-DqwHARj0.js +727 -0
- package/dist/{WarningCircleIcon-D78IFaPY.js → WarningCircleIcon-Dxi6_NlN.js} +1 -1
- package/dist/{WarningTriIcon-6WbGCso4.js → WarningTriIcon-BVNO82pk.js} +1 -1
- package/dist/{__SKIP_PATHS__-tAxwP7_6.js → __SKIP_PATHS__-BZ2V4IU4.js} +1 -1
- package/dist/api/api.cjs +1 -1
- package/dist/api/api.mjs +300 -216
- package/dist/api/gift-cards.d.ts +1 -1
- package/dist/api/orders.d.ts +2 -2
- package/dist/api/waitlist.d.ts +6 -1
- package/dist/{colors-DbQNhbC_.js → colors-B3NG0RHG.js} +113 -117
- package/dist/constants-DqKf8bUn.js +356 -0
- package/dist/{copyToClipboard-DAGJHhtn.js → copyToClipboard-CLo_2bfp.js} +1 -1
- package/dist/{de-BG-86m10.js → de-8N03rEoe.js} +4 -1
- package/dist/{de-BZpzzwT9.js → de-tOW1Ez0s.js} +63 -1
- package/dist/{timezones-C5l0SSHK.js → defaultLabels-D_9CneL4.js} +507 -1
- package/dist/{es-9jwSoUSD.js → es-DrYewQpd.js} +51 -1
- package/dist/{es-B1RPM3H_.js → es-tRMGbtbB.js} +4 -1
- package/dist/{event-v8d4wRpB.js → event-CFDG8adb.js} +1 -1
- package/dist/{event-transform-lC22EDSL.js → event-transform-jJPAKgYX.js} +4 -4
- package/dist/{eventStatusStream-CopqZ2oa.js → eventStatusStream-wmEyQSgV.js} +5 -5
- package/dist/{fr-fYY2O8Ab.js → fr-Bs9xnPu6.js} +63 -1
- package/dist/{fr-B6FgrH9s.js → fr-DDnljtQz.js} +4 -1
- package/dist/{href-BH6l_kZx.js → href-BfMcUXhM.js} +2 -2
- package/dist/{i18n-CIVh_urJ.js → i18n-BgkKrB4o.js} +126 -126
- package/dist/i18n-DK3npqzN.js +28 -0
- package/dist/{id-But8qcA2.js → id-BLwvLobz.js} +63 -1
- package/dist/{id-CK7hal8E.js → id-BZshacSm.js} +4 -1
- package/dist/{it-BdV8d4GZ.js → it-B6Rbpjec.js} +4 -1
- package/dist/{it-Cr9Quauw.js → it-CQ_Y8YK3.js} +63 -1
- package/dist/{ja-DKVQltc4.js → ja-Bmj-bPuM.js} +4 -1
- package/dist/{ja-CNXwg0_H.js → ja-CeudRJqE.js} +63 -1
- package/dist/{ko-DtoIJliT.js → ko-DFwVxd-1.js} +63 -1
- package/dist/{ko-DpIk-4pN.js → ko-r-ecuHZ5.js} +4 -1
- package/dist/{labels-BUH8ouCu.js → labels-BHqxbbw9.js} +1 -1
- package/dist/locales/{4.2.32 → 4.2.35}/flow/de.js +1 -1
- package/dist/locales/{4.2.32 → 4.2.35}/flow/es.js +1 -1
- package/dist/locales/{4.2.32 → 4.2.35}/flow/fr.js +1 -1
- package/dist/locales/{4.2.32 → 4.2.35}/flow/id.js +1 -1
- package/dist/locales/{4.2.32 → 4.2.35}/flow/it.js +1 -1
- package/dist/locales/{4.2.32 → 4.2.35}/flow/ja.js +1 -1
- package/dist/locales/{4.2.32 → 4.2.35}/flow/ko.js +1 -1
- package/dist/locales/{4.2.32 → 4.2.35}/flow/nl.js +1 -1
- package/dist/locales/{4.2.32 → 4.2.35}/flow/pl.js +1 -1
- package/dist/locales/{4.2.32 → 4.2.35}/flow/pt-br.js +1 -1
- package/dist/locales/{4.2.32 → 4.2.35}/flow/tr.js +1 -1
- package/dist/locales/{4.2.32 → 4.2.35}/flow/zh.js +1 -1
- package/dist/locales/{4.2.32 → 4.2.35}/main/de.js +1 -1
- package/dist/locales/{4.2.32 → 4.2.35}/main/es.js +1 -1
- package/dist/locales/{4.2.32 → 4.2.35}/main/fr.js +1 -1
- package/dist/locales/{4.2.32 → 4.2.35}/main/id.js +1 -1
- package/dist/locales/{4.2.32 → 4.2.35}/main/it.js +1 -1
- package/dist/locales/{4.2.32 → 4.2.35}/main/ja.js +1 -1
- package/dist/locales/{4.2.32 → 4.2.35}/main/ko.js +1 -1
- package/dist/locales/{4.2.32 → 4.2.35}/main/nl.js +1 -1
- package/dist/locales/{4.2.32 → 4.2.35}/main/pl.js +1 -1
- package/dist/locales/{4.2.32 → 4.2.35}/main/pt-br.js +1 -1
- package/dist/locales/{4.2.32 → 4.2.35}/main/tr.js +1 -1
- package/dist/locales/{4.2.32 → 4.2.35}/main/zh.js +1 -1
- package/dist/{modalManager.svelte-C4dWVCst.js → modalManager.svelte-CrrDshW7.js} +2 -2
- package/dist/{nl-C-dVfidI.js → nl-CS1da1Bc.js} +4 -1
- package/dist/{nl-Dbs4YQMw.js → nl-CYc0p85Y.js} +63 -1
- package/dist/{order-totals-CeeD6GjZ.js → order-totals-D0JKhd70.js} +31 -31
- package/dist/{orders-BuGy4vpJ.js → orders-CCWPQsWb.js} +365 -209
- package/dist/{phoneUtils-BDV9Eggn.js → phoneUtils-aQHGh8C_.js} +1 -1
- package/dist/{pixels-D6vqcuy2.js → pixels-M2q8HRk_.js} +11 -11
- package/dist/{pl-Da6lsZXQ.js → pl-BSqAasUa.js} +63 -1
- package/dist/{pl-CnFcI33y.js → pl-C2bkE2WA.js} +4 -1
- package/dist/{promo-DtLZRskK.js → promo-CKvS9lia.js} +3 -3
- package/dist/{pt-br-6QYijxa0.js → pt-br--DIxBDjz.js} +4 -1
- package/dist/{pt-br-D1wHabRR.js → pt-br-CZs8_gFN.js} +63 -1
- package/dist/{serverTotals-t2UmKkhC.js → serverTotals-DGd3p1s5.js} +1 -1
- package/dist/{shareCopyFeedback.svelte-B-M53Wj2.js → shareCopyFeedback.svelte-DTOJruVM.js} +55 -55
- package/dist/{showcase-state-options-VZcqIjpF.js → showcase-state-options-Da3jPUQb.js} +1 -1
- package/dist/{to-event-card-props-CpXtfoKx.js → to-event-card-props-B5bsYKP4.js} +31 -31
- package/dist/{tr-Pv_m8usO.js → tr-Bk7x5MW7.js} +4 -1
- package/dist/{tr-CpN50zWw.js → tr-O80C2r5C.js} +63 -1
- package/dist/{utils-CtqaTDLB.js → utils-RE2aEa_D.js} +49 -49
- package/dist/venue-calendar.es.js +710 -734
- package/dist/venue-calendar.iife.js +56 -57
- package/dist/venue-calendar.umd.js +54 -55
- package/dist/{zh-CAAnH4T4.js → zh-C8kyVh24.js} +4 -1
- package/dist/{zh-CwlRq_aG.js → zh-ydknixkJ.js} +63 -1
- package/package.json +220 -220
- package/dist/EventPage-CTo8ynx6.js +0 -971
- package/dist/ViewTicketsEmbed-DVurn8FG.js +0 -690
- package/dist/constants-ENlpIS8i.js +0 -822
- package/dist/createI18n-DBUVdZra.js +0 -75
package/dist/api/api.mjs
CHANGED
|
@@ -239,26 +239,26 @@ function Te() {
|
|
|
239
239
|
}
|
|
240
240
|
//#endregion
|
|
241
241
|
//#region src/lib/tracking/consent.ts
|
|
242
|
-
var
|
|
243
|
-
function
|
|
242
|
+
var D = null, Ee = !1;
|
|
243
|
+
function De() {
|
|
244
244
|
return typeof window < "u" && typeof window.__tcfapi == "function";
|
|
245
245
|
}
|
|
246
|
-
function
|
|
246
|
+
function Oe() {
|
|
247
247
|
return typeof navigator < "u" && navigator.globalPrivacyControl === !0;
|
|
248
248
|
}
|
|
249
|
-
function
|
|
250
|
-
return
|
|
249
|
+
function ke() {
|
|
250
|
+
return D === null ? De() || Oe() : D;
|
|
251
251
|
}
|
|
252
|
-
function
|
|
253
|
-
return !
|
|
252
|
+
function Ae() {
|
|
253
|
+
return !ke() || Ee;
|
|
254
254
|
}
|
|
255
255
|
//#endregion
|
|
256
256
|
//#region src/lib/tracking/identity.ts
|
|
257
|
-
var
|
|
258
|
-
function
|
|
259
|
-
return typeof e == "string" &&
|
|
257
|
+
var O = "micdrop_session_id", k = "micdrop_visitor_id", je = /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
|
|
258
|
+
function A(e) {
|
|
259
|
+
return typeof e == "string" && je.test(e);
|
|
260
260
|
}
|
|
261
|
-
function
|
|
261
|
+
function Me() {
|
|
262
262
|
let e = typeof crypto < "u" ? crypto : void 0;
|
|
263
263
|
if (e?.randomUUID) return e.randomUUID();
|
|
264
264
|
let t = /* @__PURE__ */ new Uint8Array(16);
|
|
@@ -270,19 +270,19 @@ function A() {
|
|
|
270
270
|
return `${n[0]}${n[1]}${n[2]}${n[3]}-${n[4]}${n[5]}-${n[6]}${n[7]}-${n[8]}${n[9]}-${n[10]}${n[11]}${n[12]}${n[13]}${n[14]}${n[15]}`;
|
|
271
271
|
}
|
|
272
272
|
function Ne() {
|
|
273
|
-
let e = l(
|
|
274
|
-
return e || (e =
|
|
273
|
+
let e = l(O);
|
|
274
|
+
return e || (e = Me(), f(O, e)), e;
|
|
275
275
|
}
|
|
276
276
|
function Pe(e) {
|
|
277
|
-
let t = c(
|
|
278
|
-
if (
|
|
277
|
+
let t = c(k);
|
|
278
|
+
if (A(t)) return {
|
|
279
279
|
id: t,
|
|
280
280
|
createdAt: e,
|
|
281
281
|
migrated: !0
|
|
282
282
|
};
|
|
283
283
|
if (t && typeof t == "object") {
|
|
284
284
|
let { id: n, createdAt: r } = t;
|
|
285
|
-
if (!
|
|
285
|
+
if (!A(n)) return null;
|
|
286
286
|
let i = typeof r == "number" && Number.isFinite(r), a = i ? Math.min(r, e) : e;
|
|
287
287
|
return {
|
|
288
288
|
id: n,
|
|
@@ -293,7 +293,7 @@ function Pe(e) {
|
|
|
293
293
|
return null;
|
|
294
294
|
}
|
|
295
295
|
function Fe() {
|
|
296
|
-
if (!
|
|
296
|
+
if (!Ae()) return null;
|
|
297
297
|
let e = Date.now(), t = Pe(e);
|
|
298
298
|
if (t && e - t.createdAt < 34128e6) {
|
|
299
299
|
if (t.migrated) {
|
|
@@ -301,12 +301,12 @@ function Fe() {
|
|
|
301
301
|
id: t.id,
|
|
302
302
|
createdAt: t.createdAt
|
|
303
303
|
};
|
|
304
|
-
d(
|
|
304
|
+
d(k, e);
|
|
305
305
|
}
|
|
306
306
|
return t.id;
|
|
307
307
|
}
|
|
308
|
-
let n =
|
|
309
|
-
return d(
|
|
308
|
+
let n = Me();
|
|
309
|
+
return d(k, {
|
|
310
310
|
id: n,
|
|
311
311
|
createdAt: e
|
|
312
312
|
}), n;
|
|
@@ -331,11 +331,96 @@ function j() {
|
|
|
331
331
|
referrer: e.referrer || ""
|
|
332
332
|
};
|
|
333
333
|
}
|
|
334
|
-
a("tracking");
|
|
334
|
+
a("tracking"), $state(0);
|
|
335
|
+
//#endregion
|
|
336
|
+
//#region src/lib/i18n/createI18n.js
|
|
337
|
+
function Re() {
|
|
338
|
+
return typeof navigator > "u" ? null : navigator.language || navigator.userLanguage || null;
|
|
339
|
+
}
|
|
340
|
+
//#endregion
|
|
341
|
+
//#region src/lib/i18n/localeSpec.js
|
|
342
|
+
var ze = [
|
|
343
|
+
[
|
|
344
|
+
"es",
|
|
345
|
+
"es",
|
|
346
|
+
"es"
|
|
347
|
+
],
|
|
348
|
+
[
|
|
349
|
+
"fr",
|
|
350
|
+
"fr",
|
|
351
|
+
"fr"
|
|
352
|
+
],
|
|
353
|
+
[
|
|
354
|
+
"pt-br",
|
|
355
|
+
"pt-br",
|
|
356
|
+
"pt_br"
|
|
357
|
+
],
|
|
358
|
+
[
|
|
359
|
+
"pt",
|
|
360
|
+
"pt-br",
|
|
361
|
+
"pt_br"
|
|
362
|
+
],
|
|
363
|
+
[
|
|
364
|
+
"de",
|
|
365
|
+
"de",
|
|
366
|
+
"de"
|
|
367
|
+
],
|
|
368
|
+
[
|
|
369
|
+
"ja",
|
|
370
|
+
"ja",
|
|
371
|
+
"ja"
|
|
372
|
+
],
|
|
373
|
+
[
|
|
374
|
+
"zh",
|
|
375
|
+
"zh",
|
|
376
|
+
"zh"
|
|
377
|
+
],
|
|
378
|
+
[
|
|
379
|
+
"ko",
|
|
380
|
+
"ko",
|
|
381
|
+
"ko"
|
|
382
|
+
],
|
|
383
|
+
[
|
|
384
|
+
"it",
|
|
385
|
+
"it",
|
|
386
|
+
"it"
|
|
387
|
+
],
|
|
388
|
+
[
|
|
389
|
+
"nl",
|
|
390
|
+
"nl",
|
|
391
|
+
"nl"
|
|
392
|
+
],
|
|
393
|
+
[
|
|
394
|
+
"tr",
|
|
395
|
+
"tr",
|
|
396
|
+
"tr"
|
|
397
|
+
],
|
|
398
|
+
[
|
|
399
|
+
"id",
|
|
400
|
+
"id",
|
|
401
|
+
"id"
|
|
402
|
+
],
|
|
403
|
+
[
|
|
404
|
+
"pl",
|
|
405
|
+
"pl",
|
|
406
|
+
"pl"
|
|
407
|
+
]
|
|
408
|
+
];
|
|
409
|
+
Array.from(new Set(ze.map(([, e]) => e)));
|
|
410
|
+
//#endregion
|
|
411
|
+
//#region src/lib/i18n/buyerLocale.ts
|
|
412
|
+
var Be = new Map([["en", "en"], ...ze.map(([e]) => [e, e === "pt" || e === "pt-br" ? "pt-BR" : e])]);
|
|
413
|
+
function M(e) {
|
|
414
|
+
let t = e || Re();
|
|
415
|
+
if (!t || typeof t != "string") return;
|
|
416
|
+
let n = t.toLowerCase();
|
|
417
|
+
return Be.get(n) ?? Be.get(n.split("-")[0]);
|
|
418
|
+
}
|
|
335
419
|
//#endregion
|
|
336
420
|
//#region src/lib/api/orders.ts
|
|
337
|
-
var
|
|
338
|
-
async function
|
|
421
|
+
var N = e("VC");
|
|
422
|
+
async function Ve(e, n, r, i, a) {
|
|
423
|
+
let o = M(a);
|
|
339
424
|
try {
|
|
340
425
|
let a = await C(`${x()}/cart/${e}/payment-intent`, {
|
|
341
426
|
productQuantities: n,
|
|
@@ -348,18 +433,19 @@ async function Re(e, n, r, i) {
|
|
|
348
433
|
questionAnswer: i.questionAnswer ?? "",
|
|
349
434
|
mailingList: i.mailingList ?? !1
|
|
350
435
|
} : {},
|
|
351
|
-
attribution: j()
|
|
436
|
+
attribution: j(),
|
|
437
|
+
...o ? { locale: o } : {}
|
|
352
438
|
});
|
|
353
|
-
if (!a.success) throw
|
|
439
|
+
if (!a.success) throw N.error("Payment intent creation failed:", a.error), new t(a.error || "Failed to create payment intent", a.statusCode ?? 0, {
|
|
354
440
|
endpoint: `${x()}/cart/${e}/payment-intent`,
|
|
355
441
|
method: "POST"
|
|
356
442
|
});
|
|
357
|
-
return
|
|
443
|
+
return N.debug("Payment intent created:", a.data), a.data;
|
|
358
444
|
} catch (e) {
|
|
359
|
-
return
|
|
445
|
+
return N.error("createPaymentIntent error:", e), null;
|
|
360
446
|
}
|
|
361
447
|
}
|
|
362
|
-
async function
|
|
448
|
+
async function He(e, t) {
|
|
363
449
|
if (!e) return null;
|
|
364
450
|
try {
|
|
365
451
|
let n = await S(`${x()}/cart/${e}`);
|
|
@@ -374,10 +460,10 @@ async function ze(e, t) {
|
|
|
374
460
|
giftCards: c
|
|
375
461
|
};
|
|
376
462
|
} catch (e) {
|
|
377
|
-
return
|
|
463
|
+
return N.error("getCartByUUID error:", e), null;
|
|
378
464
|
}
|
|
379
465
|
}
|
|
380
|
-
async function
|
|
466
|
+
async function Ue(e, t, n) {
|
|
381
467
|
try {
|
|
382
468
|
let r = {};
|
|
383
469
|
for (let [e, n] of Object.entries(t)) {
|
|
@@ -399,14 +485,14 @@ async function Be(e, t, n) {
|
|
|
399
485
|
});
|
|
400
486
|
if (!a.ok) {
|
|
401
487
|
let e = await a.json().catch(() => ({}));
|
|
402
|
-
return
|
|
488
|
+
return N.error("Cart update failed:", e), !1;
|
|
403
489
|
}
|
|
404
490
|
return !0;
|
|
405
491
|
} catch (e) {
|
|
406
|
-
return
|
|
492
|
+
return N.error("updateCartQuantities error:", e), !1;
|
|
407
493
|
}
|
|
408
494
|
}
|
|
409
|
-
async function
|
|
495
|
+
async function We(e) {
|
|
410
496
|
try {
|
|
411
497
|
let t = await C(`${b()}/orders/complete/${e}`);
|
|
412
498
|
return t.success ? {
|
|
@@ -417,13 +503,13 @@ async function Ve(e) {
|
|
|
417
503
|
error: t.error || "Failed to complete reservation"
|
|
418
504
|
};
|
|
419
505
|
} catch (e) {
|
|
420
|
-
return
|
|
506
|
+
return N.error("Error completing reservation:", e), {
|
|
421
507
|
success: !1,
|
|
422
508
|
error: "Network error completing reservation"
|
|
423
509
|
};
|
|
424
510
|
}
|
|
425
511
|
}
|
|
426
|
-
async function
|
|
512
|
+
async function Ge(e) {
|
|
427
513
|
try {
|
|
428
514
|
let t = await C(`${b()}/orders/cancel/${e}`);
|
|
429
515
|
return t.success ? {
|
|
@@ -434,54 +520,56 @@ async function He(e) {
|
|
|
434
520
|
error: t.error || "Failed to cancel reservation"
|
|
435
521
|
};
|
|
436
522
|
} catch (e) {
|
|
437
|
-
return
|
|
523
|
+
return N.error("Error cancelling reservation:", e), {
|
|
438
524
|
success: !1,
|
|
439
525
|
error: "Network error cancelling reservation"
|
|
440
526
|
};
|
|
441
527
|
}
|
|
442
528
|
}
|
|
443
|
-
async function
|
|
529
|
+
async function Ke(e, t) {
|
|
444
530
|
try {
|
|
445
531
|
let n = await C(`${b()}/orders/create`, {
|
|
446
532
|
eventID: e,
|
|
447
533
|
promoCode: t,
|
|
448
534
|
attribution: j()
|
|
449
535
|
});
|
|
450
|
-
return n.success ? n.data : (
|
|
536
|
+
return n.success ? n.data : (N.error("Create order failed:", n.error), null);
|
|
451
537
|
} catch (e) {
|
|
452
|
-
return
|
|
538
|
+
return N.error("createOrder error:", e), null;
|
|
453
539
|
}
|
|
454
540
|
}
|
|
455
|
-
async function
|
|
541
|
+
async function qe(e) {
|
|
456
542
|
return T(`${b()}/orders/${e}`);
|
|
457
543
|
}
|
|
458
|
-
async function
|
|
544
|
+
async function Je(e, t, n) {
|
|
545
|
+
let r = M(n);
|
|
459
546
|
try {
|
|
460
547
|
let n = await C(`${x()}/validatePaymentIntent/${e}`, {
|
|
461
548
|
...t,
|
|
462
|
-
attribution: j()
|
|
549
|
+
attribution: j(),
|
|
550
|
+
...r ? { locale: r } : {}
|
|
463
551
|
});
|
|
464
|
-
if (!n.success) return
|
|
552
|
+
if (!n.success) return N.error("Payment validation failed:", n.error), {
|
|
465
553
|
success: !1,
|
|
466
554
|
status: "failed",
|
|
467
555
|
error: n.error || "Payment validation failed"
|
|
468
556
|
};
|
|
469
|
-
let
|
|
470
|
-
return
|
|
557
|
+
let i = n.data;
|
|
558
|
+
return i.eventCanceled || i.eventPostponed ? {
|
|
471
559
|
success: !1,
|
|
472
560
|
status: "failed",
|
|
473
|
-
eventCanceled:
|
|
474
|
-
eventPostponed:
|
|
561
|
+
eventCanceled: i.eventCanceled,
|
|
562
|
+
eventPostponed: i.eventPostponed
|
|
475
563
|
} : {
|
|
476
564
|
success: !0,
|
|
477
|
-
status:
|
|
478
|
-
orderUUID:
|
|
565
|
+
status: i.status || "Payment succeeded",
|
|
566
|
+
orderUUID: i.orderUUID || i.uuid
|
|
479
567
|
};
|
|
480
568
|
} catch (e) {
|
|
481
|
-
return
|
|
569
|
+
return N.error("validatePaymentIntent error:", e), null;
|
|
482
570
|
}
|
|
483
571
|
}
|
|
484
|
-
async function
|
|
572
|
+
async function Ye(e) {
|
|
485
573
|
try {
|
|
486
574
|
let t = await C(`${b()}/orders/extend-session`, { orderUuid: e });
|
|
487
575
|
if (!t.success) return {
|
|
@@ -496,13 +584,13 @@ async function Ke(e) {
|
|
|
496
584
|
remainingExtensions: n.remainingExtensions
|
|
497
585
|
};
|
|
498
586
|
} catch (e) {
|
|
499
|
-
return
|
|
587
|
+
return N.error("Error extending checkout session:", e), {
|
|
500
588
|
success: !1,
|
|
501
589
|
error: "Network error extending session"
|
|
502
590
|
};
|
|
503
591
|
}
|
|
504
592
|
}
|
|
505
|
-
async function
|
|
593
|
+
async function Xe(e) {
|
|
506
594
|
try {
|
|
507
595
|
let t = await S(`${b()}/orders/session/${e}`);
|
|
508
596
|
if (!t.success) return {
|
|
@@ -519,33 +607,33 @@ async function qe(e) {
|
|
|
519
607
|
eventStatus: n.eventStatus
|
|
520
608
|
};
|
|
521
609
|
} catch (e) {
|
|
522
|
-
return
|
|
610
|
+
return N.error("Error getting session status:", e), { error: "Network error getting session status" };
|
|
523
611
|
}
|
|
524
612
|
}
|
|
525
|
-
async function
|
|
613
|
+
async function Ze(e = { eventID: "" }) {
|
|
526
614
|
try {
|
|
527
615
|
let t = await C(`${b()}/orders/create`, {
|
|
528
616
|
...e,
|
|
529
617
|
attribution: j()
|
|
530
618
|
});
|
|
531
|
-
return t.success ? t.data?.uuid ?? null : (
|
|
619
|
+
return t.success ? t.data?.uuid ?? null : (N.error("Order initiation failed:", t.error), null);
|
|
532
620
|
} catch (e) {
|
|
533
|
-
return
|
|
621
|
+
return N.error("initiateOrder error:", e), null;
|
|
534
622
|
}
|
|
535
623
|
}
|
|
536
|
-
async function
|
|
624
|
+
async function Qe(e) {
|
|
537
625
|
if (typeof window > "u") return;
|
|
538
626
|
let t = xe(new URLSearchParams(window.location.search).get("utm_source")) || "direct";
|
|
539
627
|
try {
|
|
540
628
|
await fetch(`${b()}/utm/${e}/${encodeURIComponent(t)}`);
|
|
541
629
|
} catch (e) {
|
|
542
|
-
|
|
630
|
+
N.error("UTM tracking failed:", e);
|
|
543
631
|
}
|
|
544
632
|
}
|
|
545
633
|
//#endregion
|
|
546
634
|
//#region src/lib/api/promo.ts
|
|
547
|
-
var
|
|
548
|
-
async function
|
|
635
|
+
var P = e("VC");
|
|
636
|
+
async function $e(e, t) {
|
|
549
637
|
try {
|
|
550
638
|
if (!t || !t.trim()) return {
|
|
551
639
|
valid: !1,
|
|
@@ -572,21 +660,21 @@ async function Xe(e, t) {
|
|
|
572
660
|
applyToTicketIds: r.applyToTicketIds
|
|
573
661
|
};
|
|
574
662
|
} catch (e) {
|
|
575
|
-
return
|
|
663
|
+
return P.error("Error validating promo code:", e), {
|
|
576
664
|
valid: !1,
|
|
577
665
|
error: "Network error validating code"
|
|
578
666
|
};
|
|
579
667
|
}
|
|
580
668
|
}
|
|
581
|
-
async function
|
|
669
|
+
async function et(e) {
|
|
582
670
|
try {
|
|
583
671
|
let t = await S(`/promo-codes/check/${e}`);
|
|
584
672
|
return !t.success || t.data.hasPromoCodes === !0;
|
|
585
673
|
} catch (e) {
|
|
586
|
-
return
|
|
674
|
+
return P.error("Error checking promo codes availability:", e), !0;
|
|
587
675
|
}
|
|
588
676
|
}
|
|
589
|
-
async function
|
|
677
|
+
async function tt(e, t, n) {
|
|
590
678
|
try {
|
|
591
679
|
let r = { promoCode: t };
|
|
592
680
|
n && Object.keys(n).length > 0 && (r.productQuantities = n);
|
|
@@ -596,13 +684,13 @@ async function Qe(e, t, n) {
|
|
|
596
684
|
error: i.error || "Failed to apply promo code"
|
|
597
685
|
};
|
|
598
686
|
} catch (e) {
|
|
599
|
-
return
|
|
687
|
+
return P.error("Error applying promo code:", e), {
|
|
600
688
|
success: !1,
|
|
601
689
|
error: "Network error applying code"
|
|
602
690
|
};
|
|
603
691
|
}
|
|
604
692
|
}
|
|
605
|
-
async function
|
|
693
|
+
async function nt(e) {
|
|
606
694
|
try {
|
|
607
695
|
let t = await C(`/orders/${e}/remove-promo`);
|
|
608
696
|
return t.success ? { success: !0 } : {
|
|
@@ -610,7 +698,7 @@ async function $e(e) {
|
|
|
610
698
|
error: t.error || "Failed to remove promo code"
|
|
611
699
|
};
|
|
612
700
|
} catch (e) {
|
|
613
|
-
return
|
|
701
|
+
return P.error("Error removing promo code:", e), {
|
|
614
702
|
success: !1,
|
|
615
703
|
error: "Network error removing code"
|
|
616
704
|
};
|
|
@@ -618,7 +706,7 @@ async function $e(e) {
|
|
|
618
706
|
}
|
|
619
707
|
//#endregion
|
|
620
708
|
//#region src/lib/api/transformers/performer.ts
|
|
621
|
-
function
|
|
709
|
+
function rt(e) {
|
|
622
710
|
let t = e ?? {};
|
|
623
711
|
return {
|
|
624
712
|
performers: Array.isArray(t.performers) ? t.performers : [],
|
|
@@ -627,163 +715,163 @@ function et(e) {
|
|
|
627
715
|
}
|
|
628
716
|
//#endregion
|
|
629
717
|
//#region src/lib/api/result.ts
|
|
630
|
-
function
|
|
718
|
+
function F(e) {
|
|
631
719
|
return {
|
|
632
720
|
ok: !0,
|
|
633
721
|
data: e
|
|
634
722
|
};
|
|
635
723
|
}
|
|
636
|
-
function
|
|
724
|
+
function I(e) {
|
|
637
725
|
return {
|
|
638
726
|
ok: !1,
|
|
639
727
|
error: e
|
|
640
728
|
};
|
|
641
729
|
}
|
|
642
|
-
function
|
|
730
|
+
function L(e) {
|
|
643
731
|
return {
|
|
644
732
|
ok: !1,
|
|
645
733
|
error: e,
|
|
646
734
|
notFound: !0
|
|
647
735
|
};
|
|
648
736
|
}
|
|
649
|
-
function
|
|
737
|
+
function it(e) {
|
|
650
738
|
return e.ok;
|
|
651
739
|
}
|
|
652
|
-
function
|
|
740
|
+
function at(e) {
|
|
653
741
|
return !e.ok;
|
|
654
742
|
}
|
|
655
|
-
function
|
|
743
|
+
function R(e, t) {
|
|
656
744
|
return e.ok ? e.data : t;
|
|
657
745
|
}
|
|
658
746
|
//#endregion
|
|
659
747
|
//#region src/lib/api/route-manifest.ts
|
|
660
|
-
var
|
|
661
|
-
`${
|
|
748
|
+
var z = "/api/v2/public", B = "/api/orders/v2/public", ot = "/api/orders/v2", st = "00000000-0000-0000-0000-000000000000", V = st;
|
|
749
|
+
`${z}`, `${z}${V}`, `${z}`, `${z}${V}`, `${z}`, `${z}${V}`, `${z}`, `${z}${V}`, `${z}`, `${z}${V}`, `${z}`, `${z}${V}`, `${z}`, `${z}${V}`, `${z}`, `${z}${V}`, `${z}`, `${z}`, `${z}`, `${z}${V}`, `${z}`, `${z}${V}`, `${z}`, `${z}${V}`, `${z}`, `${z}${V}`, `${z}`, `${z}${V}`, `${z}`, `${z}${V}`, `${z}`, `${z}${V}`, `${z}`, `${z}${V}`, `${z}`, `${z}${V}`, `${z}`, `${z}${V}`, `${z}`, `${z}`, `${z}`, `${z}${V}`, `${z}`, `${z}${V}`, `${z}`, `${z}${V}`, `${z}`, `${z}${V}`, `${z}`, `${z}${V}`, `${z}`, `${z}${V}`, `${z}`, `${z}${V}`, `${z}`, `${z}`, `${z}`, `${z}${V}`, `${z}`, `${z}${V}`, `${z}`, `${z}${V}`, `${z}`, `${z}${V}`, `${z}`, `${z}${V}`, `${z}`, `${z}${V}`, `${z}`, `${z}`, `${z}`, `${z}`, `${z}`, `${z}`, `${z}`, `${z}`, `${z}`, `${z}${V}`, `${B}`, `${B}`, `${B}`, `${B}${V}`, `${B}`, `${B}${V}`, `${B}`, `${B}${V}`, `${B}`, `${B}${V}`, `${B}`, `${B}${V}`, `${B}`, `${B}${V}`, `${B}`, `${B}${V}`, `${B}`, `${B}${V}`, `${ot}`, `${ot}`, `${B}`, `${B}`, `${B}`, `${B}`, `${z}`, `${z}${V}`, `${z}`, `${z}`;
|
|
662
750
|
//#endregion
|
|
663
751
|
//#region src/lib/api/events.ts
|
|
664
|
-
var
|
|
665
|
-
async function
|
|
752
|
+
var H = e("VC"), U = /* @__PURE__ */ new Map();
|
|
753
|
+
async function ct(e, t = fetch, n) {
|
|
666
754
|
let r = n ? `${e}:pw` : String(e);
|
|
667
755
|
if (t === fetch) {
|
|
668
|
-
let e =
|
|
756
|
+
let e = U.get(r);
|
|
669
757
|
if (e) return e;
|
|
670
758
|
}
|
|
671
759
|
let i = (async () => {
|
|
672
760
|
try {
|
|
673
761
|
let r = await t(n ? `${b()}/events/${e}?password=${encodeURIComponent(n)}` : `${b()}/events/${e}`);
|
|
674
|
-
if (!r.ok) return r.status === 404 ?
|
|
762
|
+
if (!r.ok) return r.status === 404 ? L("event_not_found") : (H.error(`Failed to fetch event details: ${r.status}`), I("event_fetch_failed"));
|
|
675
763
|
let i = await r.json();
|
|
676
|
-
return i ?
|
|
764
|
+
return i ? F(i) : L("event_not_found");
|
|
677
765
|
} catch (e) {
|
|
678
|
-
return
|
|
766
|
+
return H.error("Error fetching event details:", e), I("event_fetch_failed");
|
|
679
767
|
}
|
|
680
768
|
})();
|
|
681
|
-
return t === fetch && (
|
|
682
|
-
|
|
769
|
+
return t === fetch && (U.set(r, i), i.finally(() => {
|
|
770
|
+
U.get(r) === i && U.delete(r);
|
|
683
771
|
})), i;
|
|
684
772
|
}
|
|
685
|
-
async function
|
|
686
|
-
let r = await
|
|
773
|
+
async function lt(e, t = fetch, n) {
|
|
774
|
+
let r = await ct(e, t, n);
|
|
687
775
|
return r.ok ? r.data : null;
|
|
688
776
|
}
|
|
689
777
|
async function W(e, t, n = (e) => e) {
|
|
690
778
|
try {
|
|
691
779
|
let r = await T(e);
|
|
692
|
-
return r ?
|
|
780
|
+
return r ? F(n(r)) : (H.error(`Failed to load (${t}): network or server error`), I(t));
|
|
693
781
|
} catch (e) {
|
|
694
|
-
return
|
|
782
|
+
return H.error(`Error loading (${t}):`, e), I(t);
|
|
695
783
|
}
|
|
696
784
|
}
|
|
697
785
|
function G(e) {
|
|
698
786
|
return Array.isArray(e) ? e : [];
|
|
699
787
|
}
|
|
700
|
-
async function
|
|
788
|
+
async function ut(e, t) {
|
|
701
789
|
let n = t?.trim(), r = n ? `?promoCode=${encodeURIComponent(n)}` : "";
|
|
702
790
|
return W(`${b()}/tickets/event/${e}${r}`, "tickets_fetch_failed", G);
|
|
703
791
|
}
|
|
704
|
-
async function
|
|
705
|
-
return
|
|
792
|
+
async function dt(e, t) {
|
|
793
|
+
return R(await ut(e, t), []);
|
|
706
794
|
}
|
|
707
|
-
async function
|
|
708
|
-
return e ? W(`${b()}/events/${e}/performers`, "performers_fetch_failed", (e) =>
|
|
795
|
+
async function ft(e) {
|
|
796
|
+
return e ? W(`${b()}/events/${e}/performers`, "performers_fetch_failed", (e) => rt(e)) : (H.warn("fetchEventPerformers called without eventId"), I("performers_missing_event_id"));
|
|
709
797
|
}
|
|
710
|
-
async function
|
|
711
|
-
return
|
|
798
|
+
async function pt(e) {
|
|
799
|
+
return R(await ft(e), {
|
|
712
800
|
performers: [],
|
|
713
801
|
showPerformers: !1
|
|
714
802
|
});
|
|
715
803
|
}
|
|
716
|
-
async function
|
|
717
|
-
return e ? W(`${b()}/venues/organization/${e}`, "venues_fetch_failed", G) : (
|
|
804
|
+
async function mt(e) {
|
|
805
|
+
return e ? W(`${b()}/venues/organization/${e}`, "venues_fetch_failed", G) : (H.warn("fetchAllVenues called without orgId"), I("venues_missing_org_id"));
|
|
718
806
|
}
|
|
719
|
-
async function
|
|
720
|
-
return
|
|
807
|
+
async function ht(e) {
|
|
808
|
+
return R(await mt(e), []);
|
|
721
809
|
}
|
|
722
|
-
async function
|
|
723
|
-
return e ? W(`${b()}/events/venue/${e}`, "venue_events_fetch_failed", G) : (
|
|
810
|
+
async function gt(e) {
|
|
811
|
+
return e ? W(`${b()}/events/venue/${e}`, "venue_events_fetch_failed", G) : (H.warn("fetchVenueEvents called without venueId"), I("venue_events_missing_venue_id"));
|
|
724
812
|
}
|
|
725
|
-
async function
|
|
726
|
-
return
|
|
813
|
+
async function _t(e) {
|
|
814
|
+
return R(await gt(e), []);
|
|
727
815
|
}
|
|
728
|
-
function
|
|
816
|
+
function vt(e) {
|
|
729
817
|
return Array.isArray(e) ? e : Array.isArray(e.events) ? e.events : [];
|
|
730
818
|
}
|
|
731
|
-
var
|
|
732
|
-
function
|
|
819
|
+
var K = /* @__PURE__ */ new Map();
|
|
820
|
+
function yt(e, t, n) {
|
|
733
821
|
if (!n?.fresh) {
|
|
734
|
-
let t =
|
|
822
|
+
let t = K.get(e);
|
|
735
823
|
if (t) return t;
|
|
736
824
|
}
|
|
737
|
-
let r = W(e, t, (e) =>
|
|
738
|
-
return
|
|
739
|
-
|
|
825
|
+
let r = W(e, t, (e) => vt(e));
|
|
826
|
+
return K.set(e, r), r.finally(() => {
|
|
827
|
+
K.get(e) === r && K.delete(e);
|
|
740
828
|
}), r;
|
|
741
829
|
}
|
|
742
|
-
async function
|
|
743
|
-
return
|
|
830
|
+
async function bt(e, t, n, r) {
|
|
831
|
+
return yt(`${b()}/events/venue/${e}/month/${t}/${n}`, "month_events_fetch_failed", r);
|
|
744
832
|
}
|
|
745
|
-
async function
|
|
746
|
-
return
|
|
833
|
+
async function xt(e, t, n) {
|
|
834
|
+
return R(await bt(e, t, n), []);
|
|
747
835
|
}
|
|
748
|
-
async function
|
|
749
|
-
return
|
|
836
|
+
async function St(e, t, n, r) {
|
|
837
|
+
return yt(`${b()}/events/organization/${e}/month/${t}/${n}`, "org_month_events_fetch_failed", r);
|
|
750
838
|
}
|
|
751
|
-
async function
|
|
752
|
-
return
|
|
839
|
+
async function Ct(e, t, n) {
|
|
840
|
+
return R(await St(e, t, n), []);
|
|
753
841
|
}
|
|
754
|
-
async function
|
|
842
|
+
async function wt(e) {
|
|
755
843
|
return W(`${b()}/series/${e}/occurrences`, "series_occurrences_fetch_failed");
|
|
756
844
|
}
|
|
757
|
-
async function
|
|
758
|
-
let t = await
|
|
845
|
+
async function Tt(e) {
|
|
846
|
+
let t = await wt(e);
|
|
759
847
|
return t.ok ? t.data : null;
|
|
760
848
|
}
|
|
761
|
-
async function
|
|
849
|
+
async function Et(e, t) {
|
|
762
850
|
return W(`${b()}/series/${e}/occurrences?venueId=${t}`, "series_cta_fetch_failed");
|
|
763
851
|
}
|
|
764
|
-
async function
|
|
765
|
-
let n = await
|
|
852
|
+
async function Dt(e, t) {
|
|
853
|
+
let n = await Et(e, t);
|
|
766
854
|
return n.ok ? n.data : null;
|
|
767
855
|
}
|
|
768
|
-
async function
|
|
856
|
+
async function Ot(e, t) {
|
|
769
857
|
try {
|
|
770
858
|
let r = t ? `?slug=${encodeURIComponent(t)}` : "", i = await T(`${b()}/resolve/${encodeURIComponent(String(e))}${r}`);
|
|
771
859
|
if (!i || !i.type) throw new n("entity", String(e));
|
|
772
860
|
return i;
|
|
773
861
|
} catch (e) {
|
|
774
|
-
return
|
|
862
|
+
return H.error("Error resolving public entity:", e), null;
|
|
775
863
|
}
|
|
776
864
|
}
|
|
777
|
-
async function
|
|
865
|
+
async function kt(e, t) {
|
|
778
866
|
try {
|
|
779
867
|
let r = await T(t ? `${b()}/collections/${e}?password=${encodeURIComponent(t)}` : `${b()}/collections/${e}`);
|
|
780
868
|
if (!r) throw new n("collection", String(e));
|
|
781
869
|
return r;
|
|
782
870
|
} catch (e) {
|
|
783
|
-
return
|
|
871
|
+
return H.error("Error fetching collection:", e), null;
|
|
784
872
|
}
|
|
785
873
|
}
|
|
786
|
-
async function
|
|
874
|
+
async function At(e, t) {
|
|
787
875
|
try {
|
|
788
876
|
return (await T(`${b()}/collections/${e}/check-password`, {
|
|
789
877
|
method: "POST",
|
|
@@ -791,10 +879,10 @@ async function wt(e, t) {
|
|
|
791
879
|
body: JSON.stringify({ password: t })
|
|
792
880
|
}))?.valid === !0;
|
|
793
881
|
} catch (e) {
|
|
794
|
-
return
|
|
882
|
+
return H.error("Error checking collection password:", e), !1;
|
|
795
883
|
}
|
|
796
884
|
}
|
|
797
|
-
async function
|
|
885
|
+
async function jt(e, t) {
|
|
798
886
|
try {
|
|
799
887
|
let n = await T(`${b()}/events/${e}/check-password`, {
|
|
800
888
|
method: "POST",
|
|
@@ -803,61 +891,61 @@ async function Tt(e, t) {
|
|
|
803
891
|
});
|
|
804
892
|
return typeof n == "boolean" ? { valid: n } : { valid: n?.valid === !0 };
|
|
805
893
|
} catch (e) {
|
|
806
|
-
return
|
|
894
|
+
return H.error("Error checking event password:", e), { valid: !1 };
|
|
807
895
|
}
|
|
808
896
|
}
|
|
809
|
-
async function
|
|
897
|
+
async function Mt(e, t) {
|
|
810
898
|
try {
|
|
811
|
-
let n = t ? `${b()}/events/venue/${t}` : e ? `${b()}/venues/organization/${e}` : `${b()}/venues/${
|
|
899
|
+
let n = t ? `${b()}/events/venue/${t}` : e ? `${b()}/venues/organization/${e}` : `${b()}/venues/${st}`;
|
|
812
900
|
return (await fetch(n, { method: "HEAD" })).status < 500;
|
|
813
901
|
} catch (e) {
|
|
814
|
-
return
|
|
902
|
+
return H.error("Network connection test failed:", e), !1;
|
|
815
903
|
}
|
|
816
904
|
}
|
|
817
905
|
//#endregion
|
|
818
906
|
//#region src/lib/api/venues.ts
|
|
819
|
-
var
|
|
820
|
-
async function
|
|
907
|
+
var q = e("VC");
|
|
908
|
+
async function Nt(e) {
|
|
821
909
|
try {
|
|
822
|
-
if (!e) return
|
|
910
|
+
if (!e) return q.warn("getVenue called without venueId"), null;
|
|
823
911
|
let t = await S(`/venues/${e}`);
|
|
824
|
-
return t.success ? t.data ?? null : (
|
|
912
|
+
return t.success ? t.data ?? null : (q.error(`Failed to fetch venue: ${t.statusCode}`), null);
|
|
825
913
|
} catch (e) {
|
|
826
|
-
return
|
|
914
|
+
return q.error("Error fetching venue:", e), null;
|
|
827
915
|
}
|
|
828
916
|
}
|
|
829
|
-
async function
|
|
830
|
-
let t = await
|
|
917
|
+
async function Pt(e) {
|
|
918
|
+
let t = await Nt(e);
|
|
831
919
|
return t ? {
|
|
832
920
|
serviceFeePercentage: t.serviceFeePercentage ?? 0,
|
|
833
921
|
serviceFeeCents: t.serviceFeeCents == null ? 0 : t.serviceFeeCents,
|
|
834
922
|
taxPercentage: t.taxPercentage ?? 0
|
|
835
923
|
} : null;
|
|
836
924
|
}
|
|
837
|
-
async function
|
|
925
|
+
async function Ft(e) {
|
|
838
926
|
try {
|
|
839
|
-
if (!e) return
|
|
927
|
+
if (!e) return q.warn("getVenueBySlug called without slug"), null;
|
|
840
928
|
let t = await S(`/venues/slug/${encodeURIComponent(e)}`);
|
|
841
|
-
return t.success ? t.data ?? null : (
|
|
929
|
+
return t.success ? t.data ?? null : (q.error(`Failed to fetch venue by slug: ${t.statusCode}`), null);
|
|
842
930
|
} catch (e) {
|
|
843
|
-
return
|
|
931
|
+
return q.error("Error fetching venue by slug:", e), null;
|
|
844
932
|
}
|
|
845
933
|
}
|
|
846
934
|
//#endregion
|
|
847
935
|
//#region src/lib/api/transformers/giftCard.ts
|
|
848
|
-
function
|
|
936
|
+
function J(e, t) {
|
|
849
937
|
return e == null || t(e);
|
|
850
938
|
}
|
|
851
|
-
function
|
|
939
|
+
function It(e) {
|
|
852
940
|
if (typeof e != "object" || !e) return !1;
|
|
853
941
|
let t = e;
|
|
854
|
-
return t.valid === !0 && Number.isInteger(t.appliedAmount) && typeof t.remainingTotal == "number" && Number.isFinite(t.remainingTotal) &&
|
|
942
|
+
return t.valid === !0 && Number.isInteger(t.appliedAmount) && typeof t.remainingTotal == "number" && Number.isFinite(t.remainingTotal) && J(t.giftCardCode, (e) => typeof e == "string") && J(t.giftCardBalance, (e) => typeof e == "number" && Number.isFinite(e)) && J(t.fullyCoveredByCard, (e) => typeof e == "boolean");
|
|
855
943
|
}
|
|
856
|
-
var
|
|
857
|
-
function
|
|
858
|
-
if (!
|
|
944
|
+
var Lt = "We couldn't apply that gift card. Please try again.";
|
|
945
|
+
function Rt(e) {
|
|
946
|
+
if (!It(e)) return {
|
|
859
947
|
valid: !1,
|
|
860
|
-
error:
|
|
948
|
+
error: Lt
|
|
861
949
|
};
|
|
862
950
|
let t = e, n = i(p(t.appliedAmount)), r = t.remainingTotal, a = t.fullyCoveredByCard ?? r <= 0, o = !a;
|
|
863
951
|
return {
|
|
@@ -873,42 +961,42 @@ function Mt(e) {
|
|
|
873
961
|
}
|
|
874
962
|
//#endregion
|
|
875
963
|
//#region src/lib/api/gift-cards.ts
|
|
876
|
-
var
|
|
877
|
-
async function
|
|
964
|
+
var Y = e("VC");
|
|
965
|
+
async function zt(e) {
|
|
878
966
|
try {
|
|
879
967
|
let n = await C(`${x()}/gift-cards/purchase/create`, e);
|
|
880
|
-
if (!n.success) throw
|
|
968
|
+
if (!n.success) throw Y.error("Gift card purchase creation failed:", n.error), new t(n.error || "Failed to create gift card purchase", n.statusCode ?? 0, {
|
|
881
969
|
endpoint: `${x()}/gift-cards/purchase/create`,
|
|
882
970
|
method: "POST"
|
|
883
971
|
});
|
|
884
|
-
return
|
|
972
|
+
return Y.debug("Gift card purchase created:", n.data), n.data;
|
|
885
973
|
} catch (e) {
|
|
886
|
-
return
|
|
974
|
+
return Y.error("Gift card purchase creation error:", e), null;
|
|
887
975
|
}
|
|
888
976
|
}
|
|
889
|
-
async function
|
|
977
|
+
async function Bt(e, t) {
|
|
890
978
|
try {
|
|
891
979
|
let n = await C(`${x()}/cart/${e}/apply-gift-card`, { giftCardCode: t });
|
|
892
980
|
if (!n.success) return n.statusCode === 429 ? {
|
|
893
981
|
valid: !1,
|
|
894
982
|
error: "Too many attempts. Please wait a moment and try again."
|
|
895
|
-
} : (
|
|
983
|
+
} : (Y.error("Apply gift card failed:", n.error), {
|
|
896
984
|
valid: !1,
|
|
897
985
|
error: n.error || "Invalid gift card code"
|
|
898
986
|
});
|
|
899
|
-
let r =
|
|
900
|
-
return r.valid ||
|
|
987
|
+
let r = Rt(n.data);
|
|
988
|
+
return r.valid || Y.error("Apply gift card returned an unusable payload:", n.data), r;
|
|
901
989
|
} catch (e) {
|
|
902
|
-
return
|
|
990
|
+
return Y.error("applyGiftCard error:", e), {
|
|
903
991
|
valid: !1,
|
|
904
992
|
error: "Network error. Please check your connection and try again."
|
|
905
993
|
};
|
|
906
994
|
}
|
|
907
995
|
}
|
|
908
|
-
async function
|
|
996
|
+
async function Vt(e, t) {
|
|
909
997
|
try {
|
|
910
998
|
let n = t?.giftCardId ? { giftCardId: t.giftCardId } : t?.code ? { giftCardCode: t.code } : null, r = await me(`${x()}/cart/${e}/gift-card`, n ? { body: JSON.stringify(n) } : void 0);
|
|
911
|
-
if (!r.success) return
|
|
999
|
+
if (!r.success) return Y.error("Remove gift card failed:", r.error), {
|
|
912
1000
|
success: !1,
|
|
913
1001
|
error: r.error || "Failed to remove gift card"
|
|
914
1002
|
};
|
|
@@ -918,13 +1006,14 @@ async function Ft(e, t) {
|
|
|
918
1006
|
...typeof a == "number" ? { remainingTotal: a } : {}
|
|
919
1007
|
};
|
|
920
1008
|
} catch (e) {
|
|
921
|
-
return
|
|
1009
|
+
return Y.error("removeGiftCard error:", e), {
|
|
922
1010
|
success: !1,
|
|
923
1011
|
error: "Network error. Please check your connection and try again."
|
|
924
1012
|
};
|
|
925
1013
|
}
|
|
926
1014
|
}
|
|
927
|
-
async function
|
|
1015
|
+
async function Ht(e, t, n) {
|
|
1016
|
+
let r = M(n);
|
|
928
1017
|
try {
|
|
929
1018
|
let n = await C(`${x()}/cart/${e}/complete-gift-card-payment`, {
|
|
930
1019
|
customerName: s(t.firstName, t.lastName),
|
|
@@ -935,18 +1024,19 @@ async function It(e, t) {
|
|
|
935
1024
|
phoneNumber: t.phoneNumber || null,
|
|
936
1025
|
questionAnswer: t.questionAnswer || "",
|
|
937
1026
|
mailingList: t.mailingList || !1,
|
|
938
|
-
attribution: j()
|
|
1027
|
+
attribution: j(),
|
|
1028
|
+
...r ? { locale: r } : {}
|
|
939
1029
|
});
|
|
940
1030
|
return n.success ? {
|
|
941
1031
|
success: !0,
|
|
942
1032
|
orderId: n.data?.orderId,
|
|
943
1033
|
confirmationNumber: n.data?.confirmationNumber
|
|
944
|
-
} : (
|
|
1034
|
+
} : (Y.error("Complete gift card payment failed:", n.error), {
|
|
945
1035
|
success: !1,
|
|
946
1036
|
error: n.error || "Failed to complete payment"
|
|
947
1037
|
});
|
|
948
1038
|
} catch (e) {
|
|
949
|
-
return
|
|
1039
|
+
return Y.error("completeGiftCardPayment error:", e), {
|
|
950
1040
|
success: !1,
|
|
951
1041
|
error: "Network error. Please check your connection and try again."
|
|
952
1042
|
};
|
|
@@ -954,14 +1044,8 @@ async function It(e, t) {
|
|
|
954
1044
|
}
|
|
955
1045
|
//#endregion
|
|
956
1046
|
//#region src/lib/api/waitlist.ts
|
|
957
|
-
var
|
|
958
|
-
|
|
959
|
-
event_not_found: "Event not found",
|
|
960
|
-
invalid_phone: "Please enter a valid phone number",
|
|
961
|
-
already_purchased: "You have already purchased tickets for this event",
|
|
962
|
-
phone_already_registered: "This phone number is already on the waitlist"
|
|
963
|
-
};
|
|
964
|
-
async function Rt(e, t, n = null, r = !1) {
|
|
1047
|
+
var X = e("VC");
|
|
1048
|
+
async function Ut(e, t, n = null, r = !1) {
|
|
965
1049
|
try {
|
|
966
1050
|
let i = { email: t };
|
|
967
1051
|
n && r && (i.phone = n, i.smsOptIn = !0);
|
|
@@ -970,18 +1054,18 @@ async function Rt(e, t, n = null, r = !1) {
|
|
|
970
1054
|
success: !0,
|
|
971
1055
|
updated: a.data?.updated,
|
|
972
1056
|
position: a.data?.position
|
|
973
|
-
} : (
|
|
1057
|
+
} : (X.error("Join waitlist failed:", a.error), {
|
|
974
1058
|
success: !1,
|
|
975
|
-
|
|
1059
|
+
errorCode: a.error || "join_failed"
|
|
976
1060
|
});
|
|
977
1061
|
} catch (e) {
|
|
978
|
-
return
|
|
1062
|
+
return X.error("joinWaitlist error:", e), {
|
|
979
1063
|
success: !1,
|
|
980
|
-
|
|
1064
|
+
errorCode: "network_error"
|
|
981
1065
|
};
|
|
982
1066
|
}
|
|
983
1067
|
}
|
|
984
|
-
async function
|
|
1068
|
+
async function Wt(e, t) {
|
|
985
1069
|
try {
|
|
986
1070
|
let n = await C(`/checkout/validate-token/${e}`, { email: t });
|
|
987
1071
|
return n.success ? {
|
|
@@ -994,14 +1078,14 @@ async function zt(e, t) {
|
|
|
994
1078
|
errorCode: n.error
|
|
995
1079
|
};
|
|
996
1080
|
} catch (e) {
|
|
997
|
-
return
|
|
1081
|
+
return X.error("validateWaitlistToken error:", e), {
|
|
998
1082
|
valid: !1,
|
|
999
1083
|
eventId: 0,
|
|
1000
1084
|
errorCode: "invalid_token"
|
|
1001
1085
|
};
|
|
1002
1086
|
}
|
|
1003
1087
|
}
|
|
1004
|
-
async function
|
|
1088
|
+
async function Gt(e, t) {
|
|
1005
1089
|
try {
|
|
1006
1090
|
let n = await C(`/waitlist/requeue/${e}`, { email: t });
|
|
1007
1091
|
return n.success ? { success: !0 } : {
|
|
@@ -1009,13 +1093,13 @@ async function Bt(e, t) {
|
|
|
1009
1093
|
errorCode: n.error
|
|
1010
1094
|
};
|
|
1011
1095
|
} catch (e) {
|
|
1012
|
-
return
|
|
1096
|
+
return X.error("requeueWaitlistToFront error:", e), {
|
|
1013
1097
|
success: !1,
|
|
1014
1098
|
errorCode: "internal_error"
|
|
1015
1099
|
};
|
|
1016
1100
|
}
|
|
1017
1101
|
}
|
|
1018
|
-
async function
|
|
1102
|
+
async function Kt(e) {
|
|
1019
1103
|
let t = {
|
|
1020
1104
|
waitlistEnabled: !1,
|
|
1021
1105
|
soldOut: !1,
|
|
@@ -1029,12 +1113,12 @@ async function Vt(e) {
|
|
|
1029
1113
|
gated: !!n.data?.gated
|
|
1030
1114
|
} : t;
|
|
1031
1115
|
} catch (e) {
|
|
1032
|
-
return
|
|
1116
|
+
return X.error("getWaitlistStatus error:", e), t;
|
|
1033
1117
|
}
|
|
1034
1118
|
}
|
|
1035
1119
|
//#endregion
|
|
1036
1120
|
//#region src/lib/api/cta.ts
|
|
1037
|
-
function
|
|
1121
|
+
function qt(e, t, n = {}) {
|
|
1038
1122
|
let { cancelled: r = !1, isRegistration: i = !1, waitlistEnabled: a = !1 } = n, o = ee();
|
|
1039
1123
|
if (r) return {
|
|
1040
1124
|
text: "Cancelled",
|
|
@@ -1134,7 +1218,7 @@ function Ht(e, t, n = {}) {
|
|
|
1134
1218
|
}
|
|
1135
1219
|
//#endregion
|
|
1136
1220
|
//#region src/lib/api/transformers/order.ts
|
|
1137
|
-
function
|
|
1221
|
+
function Jt(e) {
|
|
1138
1222
|
let t = e;
|
|
1139
1223
|
return {
|
|
1140
1224
|
uuid: t.uuid || String(t.id || t.ID || ""),
|
|
@@ -1152,7 +1236,7 @@ function Ut(e) {
|
|
|
1152
1236
|
checkedInAt: t.checkedInAt || t.checked_in_at
|
|
1153
1237
|
};
|
|
1154
1238
|
}
|
|
1155
|
-
function
|
|
1239
|
+
function Yt(e) {
|
|
1156
1240
|
let t = e, n = t.purchasedTickets || t.tickets || t.purchased_tickets || [];
|
|
1157
1241
|
return {
|
|
1158
1242
|
uuid: t.uuid || String(t.id || t.ID || ""),
|
|
@@ -1168,14 +1252,14 @@ function Wt(e) {
|
|
|
1168
1252
|
discount: t.discount == null ? 0 : t.discount,
|
|
1169
1253
|
paymentIntentId: t.paymentIntentId || t.payment_intent_id,
|
|
1170
1254
|
paymentMethod: t.paymentMethod || t.payment_method,
|
|
1171
|
-
purchasedTickets: n.map(
|
|
1255
|
+
purchasedTickets: n.map(Jt),
|
|
1172
1256
|
createdAt: t.createdAt || t.created_at,
|
|
1173
1257
|
updatedAt: t.updatedAt || t.updated_at
|
|
1174
1258
|
};
|
|
1175
1259
|
}
|
|
1176
|
-
var
|
|
1177
|
-
function
|
|
1178
|
-
let t =
|
|
1260
|
+
var Xt = Jt, Zt = Yt;
|
|
1261
|
+
function Qt(e) {
|
|
1262
|
+
let t = Yt(e), n = t.uuid.split("-")[0] || t.uuid, i = Number(t.totalAmount);
|
|
1179
1263
|
return {
|
|
1180
1264
|
orderId: t.uuid,
|
|
1181
1265
|
displayOrderId: n,
|
|
@@ -1189,13 +1273,13 @@ function qt(e) {
|
|
|
1189
1273
|
}
|
|
1190
1274
|
//#endregion
|
|
1191
1275
|
//#region src/lib/api/transformers/event.ts
|
|
1192
|
-
function
|
|
1276
|
+
function $t(e) {
|
|
1193
1277
|
return u(e, { cdn: !0 });
|
|
1194
1278
|
}
|
|
1195
|
-
function
|
|
1196
|
-
return
|
|
1279
|
+
function Z(e) {
|
|
1280
|
+
return $t(e.imageUrl || e.imageURL || e.image_url || e.image || "");
|
|
1197
1281
|
}
|
|
1198
|
-
function
|
|
1282
|
+
function en(e) {
|
|
1199
1283
|
switch (e) {
|
|
1200
1284
|
case "available":
|
|
1201
1285
|
case "sold_out":
|
|
@@ -1204,10 +1288,10 @@ function Yt(e) {
|
|
|
1204
1288
|
default: return null;
|
|
1205
1289
|
}
|
|
1206
1290
|
}
|
|
1207
|
-
function
|
|
1291
|
+
function Q(e) {
|
|
1208
1292
|
let t = e.ctaState || e.cta_state;
|
|
1209
1293
|
if (t) {
|
|
1210
|
-
let e =
|
|
1294
|
+
let e = en(t);
|
|
1211
1295
|
if (e) return e;
|
|
1212
1296
|
}
|
|
1213
1297
|
if (e.isCancelled || e.is_cancelled) return "ended";
|
|
@@ -1224,7 +1308,7 @@ function Xt(e) {
|
|
|
1224
1308
|
return e + Math.max(0, n - r);
|
|
1225
1309
|
}, 0) <= 0 ? "sold_out" : "available";
|
|
1226
1310
|
}
|
|
1227
|
-
function
|
|
1311
|
+
function tn(e) {
|
|
1228
1312
|
let t = e;
|
|
1229
1313
|
return {
|
|
1230
1314
|
id: t.id || t.ID,
|
|
@@ -1245,8 +1329,8 @@ function Zt(e) {
|
|
|
1245
1329
|
sortOrder: t.sortOrder || t.sort_order || 0
|
|
1246
1330
|
};
|
|
1247
1331
|
}
|
|
1248
|
-
function
|
|
1249
|
-
let t = e, n = (t.availableTickets || t.available_tickets || t.tickets || []).map(
|
|
1332
|
+
function $(e) {
|
|
1333
|
+
let t = e, n = (t.availableTickets || t.available_tickets || t.tickets || []).map(tn), r = n.map((e) => e.price).filter((e) => e > 0), i = r.length > 0 ? Math.min(...r) : void 0, a = r.length > 0 ? Math.max(...r) : void 0;
|
|
1250
1334
|
return {
|
|
1251
1335
|
eventID: t.eventID || t.id || t.ID || 0,
|
|
1252
1336
|
id: t.id || t.ID,
|
|
@@ -1263,8 +1347,8 @@ function Qt(e) {
|
|
|
1263
1347
|
venueName: t.venueName || t.venue_name,
|
|
1264
1348
|
venueAddress: t.venueAddress || t.venue_address,
|
|
1265
1349
|
location: t.location || t.venueAddress || t.venue_address,
|
|
1266
|
-
imageUrl:
|
|
1267
|
-
imageURL:
|
|
1350
|
+
imageUrl: Z(t),
|
|
1351
|
+
imageURL: Z(t),
|
|
1268
1352
|
status: t.status,
|
|
1269
1353
|
isPublished: t.isPublished ?? t.is_published,
|
|
1270
1354
|
isCancelled: t.isCancelled ?? t.is_cancelled,
|
|
@@ -1274,7 +1358,7 @@ function Qt(e) {
|
|
|
1274
1358
|
minPrice: t.minPrice ?? t.min_price ?? i,
|
|
1275
1359
|
maxPrice: t.maxPrice ?? t.max_price ?? a,
|
|
1276
1360
|
ctaText: t.ctaText || t.cta_text,
|
|
1277
|
-
ctaState:
|
|
1361
|
+
ctaState: Q(t),
|
|
1278
1362
|
showPerformers: t.showPerformers ?? t.show_performers,
|
|
1279
1363
|
eventSeriesId: t.eventSeriesId || t.event_series_id,
|
|
1280
1364
|
seriesInstanceNumber: t.seriesInstanceNumber || t.series_instance_number,
|
|
@@ -1310,13 +1394,13 @@ function Qt(e) {
|
|
|
1310
1394
|
purchasedTickets: t.purchasedTickets
|
|
1311
1395
|
};
|
|
1312
1396
|
}
|
|
1313
|
-
var
|
|
1397
|
+
var nn = tn, rn = $, an = $;
|
|
1314
1398
|
//#endregion
|
|
1315
1399
|
//#region src/lib/api/transformers/venue.ts
|
|
1316
|
-
function
|
|
1400
|
+
function on(e) {
|
|
1317
1401
|
return u(e, { cdn: !0 });
|
|
1318
1402
|
}
|
|
1319
|
-
function
|
|
1403
|
+
function sn(e) {
|
|
1320
1404
|
let t = e, n = t.logoUrl || t.logo_url || t.logo;
|
|
1321
1405
|
return {
|
|
1322
1406
|
id: t.id || t.ID || 0,
|
|
@@ -1329,7 +1413,7 @@ function rn(e) {
|
|
|
1329
1413
|
zipCode: t.zipCode || t.zip_code,
|
|
1330
1414
|
country: t.country,
|
|
1331
1415
|
timezone: t.timezone || t.time_zone,
|
|
1332
|
-
logoUrl:
|
|
1416
|
+
logoUrl: on(n),
|
|
1333
1417
|
serviceFeePercentage: t.serviceFeePercentage ?? t.service_fee_percentage ?? 0,
|
|
1334
1418
|
serviceFeeCents: t.serviceFeeCents ?? t.service_fee_cents ?? 0,
|
|
1335
1419
|
absorbServiceFee: (t.absorbServiceFee ?? t.absorb_service_fee) === !0,
|
|
@@ -1337,8 +1421,8 @@ function rn(e) {
|
|
|
1337
1421
|
organizationId: t.organizationId || t.organization_id
|
|
1338
1422
|
};
|
|
1339
1423
|
}
|
|
1340
|
-
var
|
|
1341
|
-
function
|
|
1424
|
+
var cn = sn;
|
|
1425
|
+
function ln(e) {
|
|
1342
1426
|
let t = e;
|
|
1343
1427
|
return {
|
|
1344
1428
|
serviceFeePercentage: t.serviceFeePercentage ?? t.service_fee_percentage ?? 0,
|
|
@@ -1346,7 +1430,7 @@ function on(e) {
|
|
|
1346
1430
|
taxPercentage: t.taxPercentage ?? t.tax_percentage ?? 0
|
|
1347
1431
|
};
|
|
1348
1432
|
}
|
|
1349
|
-
function
|
|
1433
|
+
function un(e) {
|
|
1350
1434
|
return [
|
|
1351
1435
|
e.address,
|
|
1352
1436
|
e.city,
|
|
@@ -1355,4 +1439,4 @@ function sn(e) {
|
|
|
1355
1439
|
].filter(Boolean).join(", ");
|
|
1356
1440
|
}
|
|
1357
1441
|
//#endregion
|
|
1358
|
-
export { me as apiDelete, S as apiGet, C as apiPost, pe as apiPut,
|
|
1442
|
+
export { me as apiDelete, S as apiGet, C as apiPost, pe as apiPut, Bt as applyGiftCard, tt as applyPromoCode, Q as calculateCtaState, Ge as cancelReservation, At as checkCollectionPassword, jt as checkEventPassword, Ht as completeGiftCardPayment, We as completeReservation, qt as computeCtaState, se as configureApi, zt as createGiftCardPurchase, Ke as createOrder, Ve as createPaymentIntent, I as err, L as errNotFound, Ye as extendCheckoutSession, ln as extractVenueFees, ht as fetchAllVenues, mt as fetchAllVenuesResult, lt as fetchEventDetails, ct as fetchEventDetailsResult, pt as fetchEventPerformers, ft as fetchEventPerformersResult, dt as fetchEventTickets, ut as fetchEventTicketsResult, kt as fetchPublicCollection, Dt as fetchSeriesOccurrences, Et as fetchSeriesOccurrencesResult, _t as fetchVenueEvents, gt as fetchVenueEventsResult, un as formatVenueAddress, ce as getApiConfig, $t as getCDNImageUrl, He as getCartByUUID, ue as getClientIP, Z as getEventImageUrl, le as getLegacyPublicUrl, xt as getMonthEvents, bt as getMonthEventsResult, qe as getOrder, x as getOrdersV2Url, Ct as getOrgMonthEvents, St as getOrgMonthEventsResult, b as getPublicBaseUrl, Tt as getSeriesOccurrences, wt as getSeriesOccurrencesResult, Xe as getSessionStatus, Nt as getVenue, Ft as getVenueBySlug, Pt as getVenueFees, Kt as getWaitlistStatus, et as hasPromoCodes, Ze as initiateOrder, at as isErr, it as isOk, Ut as joinWaitlist, F as ok, Vt as removeGiftCard, nt as removePromoCode, Gt as requeueWaitlistToFront, Ot as resolvePublicEntity, Mt as testNetworkConnection, Qe as trackUTMSource, nn as transformAvailableTicket, rn as transformEvent, an as transformEventData, Zt as transformOrder, Qt as transformOrderForDisplay, Xt as transformTicket, cn as transformVenue, R as unwrapOr, Ue as updateCartQuantities, Je as validatePaymentIntent, $e as validatePromoCode, Wt as validateWaitlistToken };
|