@getmicdrop/venue-calendar 4.0.35 → 4.0.37

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.
Files changed (33) hide show
  1. package/dist/{CarouselView.legacy-CITL1LlQ.js → CarouselView.legacy-bEartcXz.js} +3 -3
  2. package/dist/{CarouselView.legacy-CITL1LlQ.js.map → CarouselView.legacy-bEartcXz.js.map} +1 -1
  3. package/dist/{Checkout.legacy-8r2Jg0rg.js → Checkout.legacy-CHWSVw8w.js} +312 -301
  4. package/dist/Checkout.legacy-CHWSVw8w.js.map +1 -0
  5. package/dist/{CollectionView.legacy-CZGob4Ji.js → CollectionView.legacy-BhHc3DGo.js} +84 -82
  6. package/dist/CollectionView.legacy-BhHc3DGo.js.map +1 -0
  7. package/dist/{FeaturedView.legacy-UyorATgO.js → FeaturedView.legacy-OOkvwfJx.js} +2 -2
  8. package/dist/{FeaturedView.legacy-UyorATgO.js.map → FeaturedView.legacy-OOkvwfJx.js.map} +1 -1
  9. package/dist/{GalleryCard-CeYXI-W8.js → GalleryCard-Bk0uvTjB.js} +7 -7
  10. package/dist/{GalleryCard-CeYXI-W8.js.map → GalleryCard-Bk0uvTjB.js.map} +1 -1
  11. package/dist/{GalleryView.legacy-s9IxdOYt.js → GalleryView.legacy-DZ_MhfR0.js} +3 -3
  12. package/dist/{GalleryView.legacy-s9IxdOYt.js.map → GalleryView.legacy-DZ_MhfR0.js.map} +1 -1
  13. package/dist/{GroupedListView.legacy-BE8M-bK-.js → GroupedListView.legacy-kqM7-hpc.js} +2 -2
  14. package/dist/{GroupedListView.legacy-BE8M-bK-.js.map → GroupedListView.legacy-kqM7-hpc.js.map} +1 -1
  15. package/dist/{SeriesPage.legacy-0Jl8FB9_.js → SeriesPage.legacy-kUDOSCxa.js} +11 -11
  16. package/dist/{SeriesPage.legacy-0Jl8FB9_.js.map → SeriesPage.legacy-kUDOSCxa.js.map} +1 -1
  17. package/dist/{Success.legacy-irymGbHD.js → Success.legacy-Bnp9ZJu4.js} +11 -11
  18. package/dist/{Success.legacy-irymGbHD.js.map → Success.legacy-Bnp9ZJu4.js.map} +1 -1
  19. package/dist/{VenueCalendar-DZI_AnEj.js → VenueCalendar-CVVUTWC2.js} +8895 -8830
  20. package/dist/VenueCalendar-CVVUTWC2.js.map +1 -0
  21. package/dist/api/api.cjs +1 -1
  22. package/dist/api/api.cjs.map +1 -1
  23. package/dist/api/api.mjs +150 -158
  24. package/dist/api/api.mjs.map +1 -1
  25. package/dist/venue-calendar.es.js +7 -7
  26. package/dist/venue-calendar.iife.js +31 -31
  27. package/dist/venue-calendar.iife.js.map +1 -1
  28. package/dist/venue-calendar.umd.js +31 -31
  29. package/dist/venue-calendar.umd.js.map +1 -1
  30. package/package.json +2 -2
  31. package/dist/Checkout.legacy-8r2Jg0rg.js.map +0 -1
  32. package/dist/CollectionView.legacy-CZGob4Ji.js.map +0 -1
  33. package/dist/VenueCalendar-DZI_AnEj.js.map +0 -1
package/dist/api/api.mjs CHANGED
@@ -1,33 +1,33 @@
1
1
  import { createLogger as p } from "@getmicdrop/svelte-components/utils/logger";
2
- import { AppError as C, formatCurrency as O } from "@getmicdrop/svelte-components";
3
- import { formatDateRaw as q } from "@getmicdrop/svelte-components/utils/formatters";
4
- const x = p("VC"), G = {
2
+ import { AppError as C, formatCurrency as G } from "@getmicdrop/svelte-components";
3
+ import { formatTime as q, formatDateRaw as E } from "@getmicdrop/svelte-components/utils/formatters";
4
+ const x = p("VC"), B = {
5
5
  baseUrl: "https://get-micdrop.com",
6
6
  timeout: 3e4,
7
7
  retries: 2,
8
8
  retryDelay: 500,
9
9
  onError: (e) => x.error("API Error:", e)
10
10
  };
11
- let y = { ...G };
12
- function ie(e) {
11
+ let y = { ...B };
12
+ function ue(e) {
13
13
  y = { ...y, ...e };
14
14
  }
15
- function ue() {
15
+ function le() {
16
16
  return { ...y };
17
17
  }
18
18
  function c() {
19
19
  return `${y.baseUrl}/api/v2/public`;
20
20
  }
21
- function le() {
21
+ function de() {
22
22
  return `${y.baseUrl}/api/public`;
23
23
  }
24
24
  function A() {
25
25
  return `${y.baseUrl}/api/orders/v2/public`;
26
26
  }
27
- async function de() {
27
+ async function fe() {
28
28
  return "";
29
29
  }
30
- const B = (e) => new Promise((t) => setTimeout(t, e));
30
+ const z = (e) => new Promise((t) => setTimeout(t, e));
31
31
  async function L(e, t, r) {
32
32
  const n = (t.method || "GET").toUpperCase(), a = n === "GET" || n === "HEAD" ? r.retries + 1 : 1;
33
33
  let s;
@@ -46,20 +46,20 @@ async function L(e, t, r) {
46
46
  } finally {
47
47
  clearTimeout(_), h && m && h.removeEventListener("abort", m);
48
48
  }
49
- i < a && await B(r.retryDelay * Math.pow(2, i - 1));
49
+ i < a && await z(r.retryDelay * Math.pow(2, i - 1));
50
50
  }
51
51
  throw s;
52
52
  }
53
- async function fe(e, t) {
53
+ async function me(e, t) {
54
54
  return N("GET", e, void 0, t);
55
55
  }
56
- async function me(e, t, r) {
56
+ async function he(e, t, r) {
57
57
  return N("POST", e, t, r);
58
58
  }
59
- async function he(e, t, r) {
59
+ async function ye(e, t, r) {
60
60
  return N("PUT", e, t, r);
61
61
  }
62
- async function ye(e, t) {
62
+ async function ge(e, t) {
63
63
  return N("DELETE", e, void 0, t);
64
64
  }
65
65
  async function N(e, t, r, n) {
@@ -91,7 +91,7 @@ async function N(e, t, r, n) {
91
91
  ), { success: !1, error: s };
92
92
  }
93
93
  }
94
- async function z(e, t) {
94
+ async function H(e, t) {
95
95
  try {
96
96
  const r = await L(
97
97
  e,
@@ -108,7 +108,7 @@ async function z(e, t) {
108
108
  }
109
109
  }
110
110
  const f = p("VC");
111
- async function ge(e, t, r) {
111
+ async function we(e, t, r) {
112
112
  try {
113
113
  const n = await fetch(
114
114
  `${A()}/cart/${e}/payment-intent`,
@@ -134,7 +134,7 @@ async function ge(e, t, r) {
134
134
  return f.error("createPaymentIntent error:", n), null;
135
135
  }
136
136
  }
137
- async function we(e, t) {
137
+ async function ve(e, t) {
138
138
  if (!e) return null;
139
139
  try {
140
140
  const r = await fetch(`${A()}/cart/${e}`, {
@@ -160,7 +160,7 @@ async function we(e, t) {
160
160
  return f.error("getCartByUUID error:", r), null;
161
161
  }
162
162
  }
163
- async function ve(e, t, r) {
163
+ async function _e(e, t, r) {
164
164
  try {
165
165
  const n = {};
166
166
  for (const [s, i] of Object.entries(t)) {
@@ -191,7 +191,7 @@ async function ve(e, t, r) {
191
191
  return f.error("updateCartQuantities error:", n), !1;
192
192
  }
193
193
  }
194
- async function _e(e) {
194
+ async function be(e) {
195
195
  try {
196
196
  const t = await fetch(
197
197
  `${c()}/orders/complete/${e}`,
@@ -213,7 +213,7 @@ async function _e(e) {
213
213
  return f.error("Error completing reservation:", t), { success: !1, error: "Network error completing reservation" };
214
214
  }
215
215
  }
216
- async function be(e) {
216
+ async function pe(e) {
217
217
  try {
218
218
  const t = await fetch(
219
219
  `${c()}/orders/cancel/${e}`,
@@ -235,7 +235,7 @@ async function be(e) {
235
235
  return f.error("Error cancelling reservation:", t), { success: !1, error: "Network error cancelling reservation" };
236
236
  }
237
237
  }
238
- async function pe(e, t) {
238
+ async function $e(e, t) {
239
239
  try {
240
240
  const r = await fetch(`${c()}/orders/create`, {
241
241
  method: "POST",
@@ -256,10 +256,10 @@ async function pe(e, t) {
256
256
  return f.error("createOrder error:", r), null;
257
257
  }
258
258
  }
259
- async function $e(e) {
260
- return z(`${c()}/orders/${e}`);
259
+ async function Pe(e) {
260
+ return H(`${c()}/orders/${e}`);
261
261
  }
262
- async function Pe(e, t) {
262
+ async function Ce(e, t) {
263
263
  try {
264
264
  const r = await fetch(
265
265
  `${A()}/validatePaymentIntent/${e}`,
@@ -289,7 +289,7 @@ async function Pe(e, t) {
289
289
  return f.error("validatePaymentIntent error:", r), null;
290
290
  }
291
291
  }
292
- async function Ce(e) {
292
+ async function Se(e) {
293
293
  try {
294
294
  const t = await fetch(
295
295
  `${c()}/orders/extend-session`,
@@ -317,7 +317,7 @@ async function Ce(e) {
317
317
  return f.error("Error extending checkout session:", t), { success: !1, error: "Network error extending session" };
318
318
  }
319
319
  }
320
- async function Se(e) {
320
+ async function De(e) {
321
321
  try {
322
322
  const t = await fetch(
323
323
  `${c()}/orders/session/${e}`
@@ -339,7 +339,7 @@ async function Se(e) {
339
339
  return f.error("Error getting session status:", t), { error: "Network error getting session status" };
340
340
  }
341
341
  }
342
- async function De(e = {}) {
342
+ async function Ae(e = {}) {
343
343
  try {
344
344
  const t = await fetch(`${c()}/orders/create`, {
345
345
  method: "POST",
@@ -357,7 +357,7 @@ async function De(e = {}) {
357
357
  return f.error("initiateOrder error:", t), null;
358
358
  }
359
359
  }
360
- async function Ae(e) {
360
+ async function je(e) {
361
361
  if (typeof window > "u") return;
362
362
  const r = new URLSearchParams(window.location.search).get("utm_source") || "Direct";
363
363
  try {
@@ -369,7 +369,7 @@ async function Ae(e) {
369
369
  }
370
370
  }
371
371
  const k = p("VC");
372
- async function je(e, t) {
372
+ async function Ie(e, t) {
373
373
  try {
374
374
  if (!t || !t.trim())
375
375
  return { valid: !1, error: "Promo code is required" };
@@ -392,7 +392,7 @@ async function je(e, t) {
392
392
  return k.error("Error validating promo code:", r), { valid: !1, error: "Network error validating code" };
393
393
  }
394
394
  }
395
- async function Ie(e) {
395
+ async function Ne(e) {
396
396
  try {
397
397
  const t = await fetch(
398
398
  `${c()}/promo-codes/check/${e}`
@@ -402,7 +402,7 @@ async function Ie(e) {
402
402
  return k.error("Error checking promo codes availability:", t), !0;
403
403
  }
404
404
  }
405
- async function Ne(e, t) {
405
+ async function ke(e, t) {
406
406
  try {
407
407
  const r = await fetch(
408
408
  `${c()}/orders/${e}/apply-promo`,
@@ -422,7 +422,7 @@ async function Ne(e, t) {
422
422
  return k.error("Error applying promo code:", r), { success: !1, error: "Network error applying code" };
423
423
  }
424
424
  }
425
- async function ke(e) {
425
+ async function xe(e) {
426
426
  try {
427
427
  const t = await fetch(
428
428
  `${c()}/orders/${e}/remove-promo`,
@@ -442,7 +442,7 @@ async function ke(e) {
442
442
  }
443
443
  }
444
444
  const u = p("VC"), I = /* @__PURE__ */ new Map();
445
- async function xe(e, t = fetch) {
445
+ async function Te(e, t = fetch) {
446
446
  const r = String(e);
447
447
  if (t === fetch) {
448
448
  const o = I.get(r);
@@ -462,7 +462,7 @@ async function xe(e, t = fetch) {
462
462
  I.get(r) === n && I.delete(r);
463
463
  })), n;
464
464
  }
465
- async function Te(e) {
465
+ async function Fe(e) {
466
466
  try {
467
467
  const t = await fetch(
468
468
  `${c()}/tickets/event/${e}`
@@ -475,7 +475,7 @@ async function Te(e) {
475
475
  return u.error("Error fetching tickets:", t), [];
476
476
  }
477
477
  }
478
- async function Fe(e) {
478
+ async function Ue(e) {
479
479
  try {
480
480
  if (!e)
481
481
  return u.warn("fetchEventPerformers called without eventId"), { performers: [], showPerformers: !1 };
@@ -495,7 +495,7 @@ async function Fe(e) {
495
495
  return u.error("Error fetching event performers:", t), { performers: [], showPerformers: !1 };
496
496
  }
497
497
  }
498
- async function Ue(e) {
498
+ async function Re(e) {
499
499
  try {
500
500
  if (!e)
501
501
  return u.warn("fetchAllVenues called without orgId"), [];
@@ -512,7 +512,7 @@ async function Ue(e) {
512
512
  return u.error("Error fetching venues:", t), [];
513
513
  }
514
514
  }
515
- async function Re(e) {
515
+ async function qe(e) {
516
516
  try {
517
517
  if (!e)
518
518
  return u.warn("fetchVenueEvents called without venueId"), [];
@@ -529,7 +529,7 @@ async function Re(e) {
529
529
  return u.error("Error fetching venue events:", t), [];
530
530
  }
531
531
  }
532
- async function qe(e, t, r) {
532
+ async function Ee(e, t, r) {
533
533
  try {
534
534
  const n = await fetch(
535
535
  `${c()}/events/venue/${e}/month/${t}/${r}`
@@ -542,7 +542,7 @@ async function qe(e, t, r) {
542
542
  return u.error("Error fetching month events:", n), [];
543
543
  }
544
544
  }
545
- async function Ee(e, t, r) {
545
+ async function Oe(e, t, r) {
546
546
  try {
547
547
  const n = await fetch(
548
548
  `${c()}/events/organization/${e}/month/${t}/${r}`
@@ -565,7 +565,7 @@ async function Le(e) {
565
565
  return u.error("Error fetching series occurrences:", t), null;
566
566
  }
567
567
  }
568
- async function Oe(e, t) {
568
+ async function Ge(e, t) {
569
569
  try {
570
570
  const r = await fetch(
571
571
  `${c()}/series/${e}/occurrences?venueId=${t}`
@@ -575,7 +575,7 @@ async function Oe(e, t) {
575
575
  return u.error("Error fetching series occurrences:", r), null;
576
576
  }
577
577
  }
578
- async function Ge(e) {
578
+ async function Be(e) {
579
579
  try {
580
580
  const t = await fetch(
581
581
  `${c()}/series/${e}/page`
@@ -587,7 +587,7 @@ async function Ge(e) {
587
587
  return u.error("Error fetching series page:", t), null;
588
588
  }
589
589
  }
590
- async function Be(e, t) {
590
+ async function ze(e, t) {
591
591
  try {
592
592
  const r = t ? `${c()}/collections/${e}/public?password=${encodeURIComponent(t)}` : `${c()}/collections/${e}/public`, n = await fetch(r);
593
593
  if (!n.ok)
@@ -597,7 +597,7 @@ async function Be(e, t) {
597
597
  return u.error("Error fetching collection:", r), null;
598
598
  }
599
599
  }
600
- async function ze(e, t) {
600
+ async function He(e, t) {
601
601
  try {
602
602
  const r = encodeURIComponent(t), n = await fetch(
603
603
  `${c()}/collections/${e}/check-password/${r}`
@@ -607,7 +607,7 @@ async function ze(e, t) {
607
607
  return u.error("Error checking collection password:", r), !1;
608
608
  }
609
609
  }
610
- async function He(e, t) {
610
+ async function Je(e, t) {
611
611
  try {
612
612
  const r = await fetch(
613
613
  `${c()}/events/${e}/check-password`,
@@ -624,7 +624,7 @@ async function He(e, t) {
624
624
  return u.error("Error checking event password:", r), { valid: !1 };
625
625
  }
626
626
  }
627
- async function Je(e, t) {
627
+ async function Me(e, t) {
628
628
  try {
629
629
  const r = t ? `${c()}/events/venue/${t}` : e ? `${c()}/venues/organization/${e}` : `${c()}/health`;
630
630
  return (await fetch(r, {
@@ -635,7 +635,7 @@ async function Je(e, t) {
635
635
  }
636
636
  }
637
637
  const P = p("VC");
638
- async function H(e) {
638
+ async function J(e) {
639
639
  try {
640
640
  if (!e)
641
641
  return P.warn("getVenue called without venueId"), null;
@@ -645,15 +645,15 @@ async function H(e) {
645
645
  return P.error("Error fetching venue:", t), null;
646
646
  }
647
647
  }
648
- async function Me(e) {
649
- const t = await H(e);
648
+ async function We(e) {
649
+ const t = await J(e);
650
650
  return t ? {
651
651
  serviceFeePercentage: t.serviceFeePercentage ?? 0,
652
652
  serviceFeeCents: t.serviceFeeCents ?? 0,
653
653
  taxPercentage: t.taxPercentage ?? 0
654
654
  } : null;
655
655
  }
656
- async function We(e) {
656
+ async function Qe(e) {
657
657
  try {
658
658
  if (!e)
659
659
  return P.warn("getVenueBySlug called without slug"), null;
@@ -663,11 +663,11 @@ async function We(e) {
663
663
  return P.error("Error fetching venue by slug:", t), null;
664
664
  }
665
665
  }
666
- const v = p("VC"), J = "https://get-micdrop.com", M = `${J}/api/orders/v2`, F = () => A();
667
- async function Qe(e) {
666
+ const v = p("VC"), M = "https://get-micdrop.com", W = `${M}/api/orders/v2`, F = () => A();
667
+ async function Ye(e) {
668
668
  try {
669
669
  const t = await fetch(
670
- `${M}/gift-cards`,
670
+ `${W}/gift-cards`,
671
671
  {
672
672
  method: "POST",
673
673
  headers: { "Content-Type": "application/json" },
@@ -684,7 +684,7 @@ async function Qe(e) {
684
684
  return v.error("Gift card purchase creation error:", t), null;
685
685
  }
686
686
  }
687
- async function Ye(e, t) {
687
+ async function Ke(e, t) {
688
688
  try {
689
689
  const r = await fetch(`${F()}/cart/${e}/apply-gift-card`, {
690
690
  method: "POST",
@@ -718,7 +718,7 @@ async function Ye(e, t) {
718
718
  };
719
719
  }
720
720
  }
721
- async function Ke(e) {
721
+ async function Xe(e) {
722
722
  try {
723
723
  const t = await fetch(`${F()}/cart/${e}/gift-card`, {
724
724
  method: "DELETE",
@@ -736,7 +736,7 @@ async function Ke(e) {
736
736
  };
737
737
  }
738
738
  }
739
- async function Xe(e, t) {
739
+ async function Ze(e, t) {
740
740
  try {
741
741
  const r = await fetch(
742
742
  `${F()}/cart/${e}/complete-gift-card-payment`,
@@ -769,14 +769,14 @@ async function Xe(e, t) {
769
769
  };
770
770
  }
771
771
  }
772
- const T = p("VC"), W = {
772
+ const T = p("VC"), Q = {
773
773
  waitlist_not_enabled: "Waitlist is not available for this event",
774
774
  event_not_found: "Event not found",
775
775
  invalid_phone: "Please enter a valid phone number",
776
776
  already_purchased: "You have already purchased tickets for this event",
777
777
  phone_already_registered: "This phone number is already on the waitlist"
778
778
  };
779
- async function Ze(e, t, r = null, n = !1) {
779
+ async function Ve(e, t, r = null, n = !1) {
780
780
  try {
781
781
  const o = { email: t };
782
782
  r && n && (o.phone = r, o.smsOptIn = !0);
@@ -789,7 +789,7 @@ async function Ze(e, t, r = null, n = !1) {
789
789
  const i = await a.json().catch(() => ({}));
790
790
  return T.error("Join waitlist failed:", i), {
791
791
  success: !1,
792
- error: W[i.error] || "Failed to join waitlist. Please try again."
792
+ error: Q[i.error] || "Failed to join waitlist. Please try again."
793
793
  };
794
794
  }
795
795
  const s = await a.json();
@@ -805,7 +805,7 @@ async function Ze(e, t, r = null, n = !1) {
805
805
  };
806
806
  }
807
807
  }
808
- async function Ve(e, t) {
808
+ async function et(e, t) {
809
809
  try {
810
810
  const r = await fetch(
811
811
  `${c()}/events/${e}/waitlist/position?email=${encodeURIComponent(t)}`
@@ -815,14 +815,14 @@ async function Ve(e, t) {
815
815
  return T.error("getWaitlistPosition error:", r), { position: null, error: "Network error" };
816
816
  }
817
817
  }
818
- function Q(e) {
818
+ function Y(e) {
819
819
  if (!e || !(e.isHidden === !0 || typeof e.visibility == "number" && e.visibility >= 2) || e.salesChannel === 2) return !1;
820
820
  const r = /* @__PURE__ */ new Date(), n = e.salesBegin || e.salesStart || e.saleBegin || e.onSaleStart, o = e.salesEnd || e.saleEnd || e.onSaleEnd;
821
821
  if (n && new Date(n) > r || o && new Date(o) < r) return !1;
822
822
  const a = e.remainingCapacity ?? e.quantityRemaining ?? e.quantity;
823
823
  return !(e.soldOut || a != null && a <= 0);
824
824
  }
825
- function et(e, t, r = {}) {
825
+ function tt(e, t, r = {}) {
826
826
  const {
827
827
  cancelled: n = !1,
828
828
  isRegistration: o = !1,
@@ -833,7 +833,7 @@ function et(e, t, r = {}) {
833
833
  const i = e.endDateTime || e.startDateTime;
834
834
  if (i && new Date(i) < s)
835
835
  return { text: "Sales ended", disabled: !0, reason: "event_past" };
836
- const l = e?.hasPurchasableHiddenTickets === !0 || Array.isArray(t) && t.some(Q), _ = (t || []).filter(
836
+ const l = e?.hasPurchasableHiddenTickets === !0 || Array.isArray(t) && t.some(Y), _ = (t || []).filter(
837
837
  (d) => d.salesChannel !== 2 && !d.isHidden && !(typeof d.visibility == "number" && d.visibility >= 2)
838
838
  );
839
839
  if (_.length === 0)
@@ -870,27 +870,19 @@ function et(e, t, r = {}) {
870
870
  const d = w.getTime() - s.getTime(), $ = d / (1e3 * 60 * 60), j = d / (1e3 * 60 * 60 * 24);
871
871
  let b;
872
872
  if ($ < 24)
873
- b = w.toLocaleTimeString("en-US", {
874
- hour: "numeric",
875
- minute: "2-digit",
876
- hour12: !0
877
- });
873
+ b = q(w, { hour12: !0 }, "en-US");
878
874
  else if (j <= 7)
879
- b = q(
875
+ b = E(
880
876
  w,
881
877
  { weekday: "short", hour: "numeric", minute: "2-digit", hour12: !0 },
882
878
  "en-US"
883
879
  );
884
880
  else {
885
- const S = q(
881
+ const S = E(
886
882
  w,
887
883
  { month: "short", day: "numeric" },
888
884
  "en-US"
889
- ), D = w.toLocaleTimeString("en-US", {
890
- hour: "numeric",
891
- minute: "2-digit",
892
- hour12: !0
893
- });
885
+ ), D = q(w, { hour12: !0 }, "en-US");
894
886
  b = `${S} ${D}`;
895
887
  }
896
888
  return {
@@ -913,7 +905,7 @@ function et(e, t, r = {}) {
913
905
  reason: "hidden_only"
914
906
  } : { text: "Sales ended", disabled: !0, reason: "sales_ended" };
915
907
  }
916
- function Y(e) {
908
+ function K(e) {
917
909
  return {
918
910
  uuid: e.uuid || String(e.id || e.ID || ""),
919
911
  id: e.id || e.ID,
@@ -930,7 +922,7 @@ function Y(e) {
930
922
  checkedInAt: e.checkedInAt || e.checked_in_at
931
923
  };
932
924
  }
933
- function K(e) {
925
+ function X(e) {
934
926
  const t = e.purchasedTickets || e.tickets || e.purchased_tickets || [];
935
927
  return {
936
928
  uuid: e.uuid || String(e.id || e.ID || ""),
@@ -946,20 +938,20 @@ function K(e) {
946
938
  discount: e.discount || 0,
947
939
  paymentIntentId: e.paymentIntentId || e.payment_intent_id,
948
940
  paymentMethod: e.paymentMethod || e.payment_method,
949
- purchasedTickets: t.map(Y),
941
+ purchasedTickets: t.map(K),
950
942
  createdAt: e.createdAt || e.created_at,
951
943
  updatedAt: e.updatedAt || e.updated_at
952
944
  };
953
945
  }
954
- function tt(e) {
955
- const t = K(e), r = t.uuid.split("-")[0] || t.uuid;
946
+ function rt(e) {
947
+ const t = X(e), r = t.uuid.split("-")[0] || t.uuid;
956
948
  return {
957
949
  orderId: t.uuid,
958
950
  displayOrderId: r,
959
951
  email: t.customerEmail,
960
952
  customerName: [t.customerFirstName, t.customerLastName].filter(Boolean).join(" "),
961
953
  total: t.totalAmount,
962
- formattedTotal: `${O(
954
+ formattedTotal: `${G(
963
955
  t.totalAmount / 100
964
956
  /* FIXME(canonical-cleanup:toFixed): this cast bypasses the brand boundary; replace with toCents/toUSD at the API-response-transform layer. */
965
957
  )}`,
@@ -967,15 +959,15 @@ function tt(e) {
967
959
  status: t.status
968
960
  };
969
961
  }
970
- const X = "https://micdrop-images.sfo3.digitaloceanspaces.com";
971
- function Z(e) {
972
- return e ? e.startsWith("http") ? e : `${X}/${e.replace(/^\//, "")}` : "";
962
+ const Z = "https://micdrop-images.sfo3.digitaloceanspaces.com";
963
+ function V(e) {
964
+ return e ? e.startsWith("http") ? e : `${Z}/${e.replace(/^\//, "")}` : "";
973
965
  }
974
- function E(e) {
966
+ function O(e) {
975
967
  const t = e.imageUrl || e.imageURL || e.image_url || e.image || "";
976
- return Z(t);
968
+ return V(t);
977
969
  }
978
- function V(e) {
970
+ function ee(e) {
979
971
  const t = e.ctaState || e.cta_state;
980
972
  if (t)
981
973
  return t;
@@ -996,7 +988,7 @@ function V(e) {
996
988
  return s + Math.max(0, l - _);
997
989
  }, 0) <= 0 ? "sold_out" : "available";
998
990
  }
999
- function ee(e) {
991
+ function te(e) {
1000
992
  return {
1001
993
  id: e.id || e.ID,
1002
994
  name: e.name || e.ticketName || "",
@@ -1016,8 +1008,8 @@ function ee(e) {
1016
1008
  sortOrder: e.sortOrder || e.sort_order || 0
1017
1009
  };
1018
1010
  }
1019
- function te(e) {
1020
- const r = (e.availableTickets || e.available_tickets || e.tickets || []).map(ee), n = r.map((s) => s.price).filter((s) => s > 0), o = n.length > 0 ? Math.min(...n) : void 0, a = n.length > 0 ? Math.max(...n) : void 0;
1011
+ function re(e) {
1012
+ const r = (e.availableTickets || e.available_tickets || e.tickets || []).map(te), n = r.map((s) => s.price).filter((s) => s > 0), o = n.length > 0 ? Math.min(...n) : void 0, a = n.length > 0 ? Math.max(...n) : void 0;
1021
1013
  return {
1022
1014
  eventID: e.eventID || e.id || e.ID || 0,
1023
1015
  id: e.id || e.ID,
@@ -1034,8 +1026,8 @@ function te(e) {
1034
1026
  venueName: e.venueName || e.venue_name,
1035
1027
  venueAddress: e.venueAddress || e.venue_address,
1036
1028
  location: e.location || e.venueAddress || e.venue_address,
1037
- imageUrl: E(e),
1038
- imageURL: E(e),
1029
+ imageUrl: O(e),
1030
+ imageURL: O(e),
1039
1031
  status: e.status,
1040
1032
  isPublished: e.isPublished ?? e.is_published,
1041
1033
  isCancelled: e.isCancelled ?? e.is_cancelled,
@@ -1045,17 +1037,17 @@ function te(e) {
1045
1037
  minPrice: e.minPrice ?? e.min_price ?? o,
1046
1038
  maxPrice: e.maxPrice ?? e.max_price ?? a,
1047
1039
  ctaText: e.ctaText || e.cta_text,
1048
- ctaState: V(e),
1040
+ ctaState: ee(e),
1049
1041
  showPerformers: e.showPerformers ?? e.show_performers,
1050
1042
  eventSeriesId: e.eventSeriesId || e.event_series_id,
1051
1043
  seriesInstanceNumber: e.seriesInstanceNumber || e.series_instance_number
1052
1044
  };
1053
1045
  }
1054
- const rt = te, re = "https://micdrop-images.sfo3.digitaloceanspaces.com";
1055
- function ne(e) {
1056
- return e ? e.startsWith("http") ? e : `${re}/${e.replace(/^\//, "")}` : "";
1046
+ const nt = re, ne = "https://micdrop-images.sfo3.digitaloceanspaces.com";
1047
+ function oe(e) {
1048
+ return e ? e.startsWith("http") ? e : `${ne}/${e.replace(/^\//, "")}` : "";
1057
1049
  }
1058
- function nt(e) {
1050
+ function ot(e) {
1059
1051
  const t = e.logoUrl || e.logo_url || e.logo;
1060
1052
  return {
1061
1053
  id: e.id || e.ID || 0,
@@ -1068,21 +1060,21 @@ function nt(e) {
1068
1060
  zipCode: e.zipCode || e.zip_code,
1069
1061
  country: e.country,
1070
1062
  timezone: e.timezone || e.time_zone,
1071
- logoUrl: ne(t),
1063
+ logoUrl: oe(t),
1072
1064
  serviceFeePercentage: e.serviceFeePercentage ?? e.service_fee_percentage ?? 0,
1073
1065
  serviceFeeCents: e.serviceFeeCents ?? e.service_fee_cents ?? 0,
1074
1066
  taxPercentage: e.taxPercentage ?? e.tax_percentage ?? 0,
1075
1067
  organizationId: e.organizationId || e.organization_id
1076
1068
  };
1077
1069
  }
1078
- function ot(e) {
1070
+ function st(e) {
1079
1071
  return {
1080
1072
  serviceFeePercentage: e.serviceFeePercentage ?? e.service_fee_percentage ?? 0,
1081
1073
  serviceFeeCents: e.serviceFeeCents ?? e.service_fee_cents ?? 0,
1082
1074
  taxPercentage: e.taxPercentage ?? e.tax_percentage ?? 0
1083
1075
  };
1084
1076
  }
1085
- function st(e) {
1077
+ function at(e) {
1086
1078
  return [
1087
1079
  e.address,
1088
1080
  e.city,
@@ -1091,67 +1083,67 @@ function st(e) {
1091
1083
  ].filter(Boolean).join(", ");
1092
1084
  }
1093
1085
  export {
1094
- ye as apiDelete,
1095
- fe as apiGet,
1096
- me as apiPost,
1097
- he as apiPut,
1098
- Ye as applyGiftCard,
1099
- Ne as applyPromoCode,
1100
- V as calculateCtaState,
1101
- be as cancelReservation,
1102
- ze as checkCollectionPassword,
1103
- He as checkEventPassword,
1104
- Xe as completeGiftCardPayment,
1105
- _e as completeReservation,
1106
- et as computeCtaState,
1107
- ie as configureApi,
1108
- Qe as createGiftCardPurchase,
1109
- pe as createOrder,
1110
- ge as createPaymentIntent,
1111
- Ce as extendCheckoutSession,
1112
- ot as extractVenueFees,
1113
- Ue as fetchAllVenues,
1114
- xe as fetchEventDetails,
1115
- Fe as fetchEventPerformers,
1116
- Te as fetchEventTickets,
1117
- Be as fetchPublicCollection,
1118
- Oe as fetchSeriesOccurrences,
1119
- Ge as fetchSeriesPage,
1120
- Re as fetchVenueEvents,
1121
- st as formatVenueAddress,
1122
- ue as getApiConfig,
1123
- Z as getCDNImageUrl,
1124
- we as getCartByUUID,
1125
- de as getClientIP,
1126
- E as getEventImageUrl,
1127
- le as getLegacyPublicUrl,
1128
- qe as getMonthEvents,
1129
- $e as getOrder,
1086
+ ge as apiDelete,
1087
+ me as apiGet,
1088
+ he as apiPost,
1089
+ ye as apiPut,
1090
+ Ke as applyGiftCard,
1091
+ ke as applyPromoCode,
1092
+ ee as calculateCtaState,
1093
+ pe as cancelReservation,
1094
+ He as checkCollectionPassword,
1095
+ Je as checkEventPassword,
1096
+ Ze as completeGiftCardPayment,
1097
+ be as completeReservation,
1098
+ tt as computeCtaState,
1099
+ ue as configureApi,
1100
+ Ye as createGiftCardPurchase,
1101
+ $e as createOrder,
1102
+ we as createPaymentIntent,
1103
+ Se as extendCheckoutSession,
1104
+ st as extractVenueFees,
1105
+ Re as fetchAllVenues,
1106
+ Te as fetchEventDetails,
1107
+ Ue as fetchEventPerformers,
1108
+ Fe as fetchEventTickets,
1109
+ ze as fetchPublicCollection,
1110
+ Ge as fetchSeriesOccurrences,
1111
+ Be as fetchSeriesPage,
1112
+ qe as fetchVenueEvents,
1113
+ at as formatVenueAddress,
1114
+ le as getApiConfig,
1115
+ V as getCDNImageUrl,
1116
+ ve as getCartByUUID,
1117
+ fe as getClientIP,
1118
+ O as getEventImageUrl,
1119
+ de as getLegacyPublicUrl,
1120
+ Ee as getMonthEvents,
1121
+ Pe as getOrder,
1130
1122
  A as getOrdersV2Url,
1131
- Ee as getOrgMonthEvents,
1123
+ Oe as getOrgMonthEvents,
1132
1124
  c as getPublicBaseUrl,
1133
1125
  Le as getSeriesOccurrences,
1134
- Se as getSessionStatus,
1135
- H as getVenue,
1136
- We as getVenueBySlug,
1137
- Me as getVenueFees,
1138
- Ve as getWaitlistPosition,
1139
- Ie as hasPromoCodes,
1140
- De as initiateOrder,
1141
- Ze as joinWaitlist,
1142
- Ke as removeGiftCard,
1143
- ke as removePromoCode,
1144
- Je as testNetworkConnection,
1145
- Ae as trackUTMSource,
1146
- ee as transformAvailableTicket,
1147
- te as transformEvent,
1148
- rt as transformEventData,
1149
- K as transformOrder,
1150
- tt as transformOrderForDisplay,
1151
- Y as transformTicket,
1152
- nt as transformVenue,
1153
- ve as updateCartQuantities,
1154
- Pe as validatePaymentIntent,
1155
- je as validatePromoCode
1126
+ De as getSessionStatus,
1127
+ J as getVenue,
1128
+ Qe as getVenueBySlug,
1129
+ We as getVenueFees,
1130
+ et as getWaitlistPosition,
1131
+ Ne as hasPromoCodes,
1132
+ Ae as initiateOrder,
1133
+ Ve as joinWaitlist,
1134
+ Xe as removeGiftCard,
1135
+ xe as removePromoCode,
1136
+ Me as testNetworkConnection,
1137
+ je as trackUTMSource,
1138
+ te as transformAvailableTicket,
1139
+ re as transformEvent,
1140
+ nt as transformEventData,
1141
+ X as transformOrder,
1142
+ rt as transformOrderForDisplay,
1143
+ K as transformTicket,
1144
+ ot as transformVenue,
1145
+ _e as updateCartQuantities,
1146
+ Ce as validatePaymentIntent,
1147
+ Ie as validatePromoCode
1156
1148
  };
1157
1149
  //# sourceMappingURL=api.mjs.map