@getmicdrop/venue-calendar 4.2.4 → 4.2.6

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 (73) hide show
  1. package/dist/{ArrowLeftIcon-BGd-X_Qm.js → ArrowLeftIcon-CNxF9YFb.js} +1 -1
  2. package/dist/{BlockPlaceholder-Wl39H9Z7.js → BlockPlaceholder-CnvIm7eh.js} +1 -1
  3. package/dist/{Calendar-DafPX3k_.js → Calendar-CYkpiAtv.js} +4 -4
  4. package/dist/{CalendarFoundryView-COkX5oQx.js → CalendarFoundryView-ShEdyNl6.js} +21 -21
  5. package/dist/{CalendarIcon-CeQ1_FWq.js → CalendarIcon-BBTaRYp7.js} +1 -1
  6. package/dist/{CartView-nvVA8vWk.js → CartView-Bka7Ouuf.js} +13 -13
  7. package/dist/{Checkout-Ow2x8cNL.js → Checkout-B_H3O8m4.js} +19 -18
  8. package/dist/Checkout-C9QQ74zn.js +1811 -0
  9. package/dist/{CheckoutTimer-DJlt5M2b.js → CheckoutTimer-C4SBpf38.js} +2 -2
  10. package/dist/{ChevronDownIcon-y7oNyepp.js → ChevronDownIcon-Ba1RZBsy.js} +1 -1
  11. package/dist/{ClockIcon-BGTz8dak.js → ClockIcon-DNJWLc1C.js} +1 -1
  12. package/dist/{CloseIcon-C9SHeORJ.js → CloseIcon-BpvJsO5u.js} +1 -1
  13. package/dist/{CollectionView-BAIlcuqO.js → CollectionView-Buv-8pjk.js} +6 -6
  14. package/dist/{Event-CTaXLze_.js → Event-CwTHb9JT.js} +16 -16
  15. package/dist/{EventPage-LuA-aEYZ.js → EventPage-yskGEenX.js} +11 -11
  16. package/dist/{Input-iXqece97.js → Input-VmGIkIrm.js} +1 -1
  17. package/dist/{MailIcon-xtNog-7h.js → MailIcon-r5G2Lccc.js} +1 -1
  18. package/dist/{Modal-CqzRblrN.js → Modal-CjMTStvm.js} +2 -2
  19. package/dist/{ModalFooter-DHhBLDbO.js → ModalFooter-BndOSwTE.js} +1 -1
  20. package/dist/{PasswordInput-Czm5Pe_p.js → PasswordInput-CzRzjBIa.js} +1 -1
  21. package/dist/{ScarcityBadge-CdgQmt1D.js → ScarcityBadge-hVqsuotm.js} +2 -2
  22. package/dist/{SeriesPage-DfCyV1ka.js → SeriesPage-tnoYKEbW.js} +3 -3
  23. package/dist/{Success-CsYxRkLE.js → Success-CgLRsVYC.js} +12 -12
  24. package/dist/{TagIcon-DJSTnymB.js → TagIcon-_OxEQnM3.js} +1 -1
  25. package/dist/{WarningCircleIcon-BKSQbu7p.js → WarningCircleIcon-D1Kt1Sw1.js} +1 -1
  26. package/dist/{WarningTriIcon-DgwTwlxe.js → WarningTriIcon-DjcnvD51.js} +1 -1
  27. package/dist/api/api.cjs +1 -1
  28. package/dist/api/api.mjs +123 -112
  29. package/dist/api/events.d.ts +21 -2
  30. package/dist/api/types.d.ts +17 -0
  31. package/dist/{colors-DeJAzg_q.js → colors-fhDq0k7I.js} +104 -93
  32. package/dist/{copyToClipboard-CRDdh3r8.js → copyToClipboard-BTVrJgtZ.js} +1 -1
  33. package/dist/{event-transform-BaJ7M1DL.js → event-transform-eNiddvbF.js} +2 -2
  34. package/dist/{href-DJeJpcO9.js → href-D7yXIGzE.js} +1 -1
  35. package/dist/{i18n-GzfxX0Ad.js → i18n-Bk8x-2nR.js} +3 -3
  36. package/dist/{labels-CqodQmuY.js → labels-Djxn2Lvi.js} +1 -1
  37. package/dist/{modalManager.svelte-OSPs3dSW.js → modalManager.svelte-DHSGjxWd.js} +1 -1
  38. package/dist/{order-totals-BAKL9cOB.js → order-totals-DptlFbmv.js} +1 -1
  39. package/dist/{phoneUtils-BJeAIGYo.js → phoneUtils-PJqYw0dJ.js} +1 -1
  40. package/dist/{shareCopyFeedback.svelte-BRInK1hH.js → shareCopyFeedback.svelte-DZMLGA3y.js} +2 -2
  41. package/dist/{to-event-card-props-CO3aPBdH.js → to-event-card-props-BaPEUAZW.js} +1 -1
  42. package/dist/{utils-C8GgxJMv.js → utils-CAxbM_uh.js} +1 -1
  43. package/dist/venue-calendar.css +1 -1
  44. package/dist/venue-calendar.es.js +38 -33
  45. package/dist/venue-calendar.iife.js +60 -60
  46. package/dist/venue-calendar.umd.js +47 -47
  47. package/package.json +3 -3
  48. package/dist/Checkout-BphC7gak.js +0 -1807
  49. package/dist/{constants-OTS1wmXZ.js → constants-BWfNecCz.js} +1 -1
  50. /package/dist/locales/{4.2.4 → 4.2.6}/flow/de.js +0 -0
  51. /package/dist/locales/{4.2.4 → 4.2.6}/flow/es.js +0 -0
  52. /package/dist/locales/{4.2.4 → 4.2.6}/flow/fr.js +0 -0
  53. /package/dist/locales/{4.2.4 → 4.2.6}/flow/id.js +0 -0
  54. /package/dist/locales/{4.2.4 → 4.2.6}/flow/it.js +0 -0
  55. /package/dist/locales/{4.2.4 → 4.2.6}/flow/ja.js +0 -0
  56. /package/dist/locales/{4.2.4 → 4.2.6}/flow/ko.js +0 -0
  57. /package/dist/locales/{4.2.4 → 4.2.6}/flow/nl.js +0 -0
  58. /package/dist/locales/{4.2.4 → 4.2.6}/flow/pl.js +0 -0
  59. /package/dist/locales/{4.2.4 → 4.2.6}/flow/pt-br.js +0 -0
  60. /package/dist/locales/{4.2.4 → 4.2.6}/flow/tr.js +0 -0
  61. /package/dist/locales/{4.2.4 → 4.2.6}/flow/zh.js +0 -0
  62. /package/dist/locales/{4.2.4 → 4.2.6}/main/de.js +0 -0
  63. /package/dist/locales/{4.2.4 → 4.2.6}/main/es.js +0 -0
  64. /package/dist/locales/{4.2.4 → 4.2.6}/main/fr.js +0 -0
  65. /package/dist/locales/{4.2.4 → 4.2.6}/main/id.js +0 -0
  66. /package/dist/locales/{4.2.4 → 4.2.6}/main/it.js +0 -0
  67. /package/dist/locales/{4.2.4 → 4.2.6}/main/ja.js +0 -0
  68. /package/dist/locales/{4.2.4 → 4.2.6}/main/ko.js +0 -0
  69. /package/dist/locales/{4.2.4 → 4.2.6}/main/nl.js +0 -0
  70. /package/dist/locales/{4.2.4 → 4.2.6}/main/pl.js +0 -0
  71. /package/dist/locales/{4.2.4 → 4.2.6}/main/pt-br.js +0 -0
  72. /package/dist/locales/{4.2.4 → 4.2.6}/main/tr.js +0 -0
  73. /package/dist/locales/{4.2.4 → 4.2.6}/main/zh.js +0 -0
@@ -64,7 +64,26 @@ export declare function fetchAllVenues(orgId: string | number): Promise<any[]>;
64
64
  */
65
65
  export declare function fetchVenueEventsResult(venueId: string | number): Promise<Result<Event[]>>;
66
66
  export declare function fetchVenueEvents(venueId: string | number): Promise<Event[]>;
67
- export declare function getMonthEventsResult(venueId: string | number, year: number, month: number): Promise<Result<Event[]>>;
67
+ /**
68
+ * Options for a month read.
69
+ *
70
+ * `fresh` means "this caller must not be handed an answer that was already on
71
+ * the wire". It exists for the live status stream: when the backend says a show
72
+ * was canceled or postponed, CalendarContainer force-refreshes that month, and
73
+ * an in-flight response may have been snapshotted by the server BEFORE the
74
+ * change that triggered the refresh. Joining it would leave a canceled show
75
+ * drawn as on-sale until the next envelope — the exact staleness
76
+ * CalendarContainer's own force path exists to prevent.
77
+ *
78
+ * A fresh read also REPLACES the shared entry, so anyone joining afterwards
79
+ * waits on the post-change request rather than the one it superseded. Two
80
+ * instances that both force on the same envelope still share, because both of
81
+ * their requests are post-change.
82
+ */
83
+ export interface MonthReadOptions {
84
+ fresh?: boolean;
85
+ }
86
+ export declare function getMonthEventsResult(venueId: string | number, year: number, month: number, options?: MonthReadOptions): Promise<Result<Event[]>>;
68
87
  export declare function getMonthEvents(venueId: string | number, year: number, month: number): Promise<Event[]>;
69
88
  /**
70
89
  * Get events for an organization for a specific month
@@ -74,7 +93,7 @@ export declare function getMonthEvents(venueId: string | number, year: number, m
74
93
  * @param month - The month (1-12)
75
94
  * @returns Array of events for the month
76
95
  */
77
- export declare function getOrgMonthEventsResult(orgId: string | number, year: number, month: number): Promise<Result<Event[]>>;
96
+ export declare function getOrgMonthEventsResult(orgId: string | number, year: number, month: number, options?: MonthReadOptions): Promise<Result<Event[]>>;
78
97
  export declare function getOrgMonthEvents(orgId: string | number, year: number, month: number): Promise<Event[]>;
79
98
  /**
80
99
  * Get series occurrences for date selector
@@ -41,6 +41,23 @@ export interface PaymentIntentResponse {
41
41
  stripe_publishable_key?: string;
42
42
  // ISO-4217 currency (Stripe returns it lowercase). Feeds the checkout totals.
43
43
  currency?: string;
44
+ // The three fields the $0 path answers with. orders-service finalizes a free
45
+ // order in-band on this same endpoint — it generates the tickets, marks the
46
+ // cart completed and sends the confirmation — and reports that back here
47
+ // instead of on a client secret. Views/Checkout.svelte reads all three to
48
+ // decide whether the cart really is still free and really did finalize, so a
49
+ // cart that gained a chargeable amount between selection and submit is caught
50
+ // rather than waved through.
51
+ //
52
+ // They were undeclared, which is not a cosmetic gap: this interface has no
53
+ // index signature, so every one of those three reads was a hard svelte-check
54
+ // error against the shape the server actually sends.
55
+ /** False when the cart still needs a Stripe charge — i.e. it is NOT free. */
56
+ requires_stripe?: boolean;
57
+ /** 'free' on the in-band $0 finalize path. */
58
+ payment_type?: string;
59
+ /** False when the backend declined to finalize the free order. */
60
+ order_finalized?: boolean;
44
61
  }
45
62
 
46
63
  export interface CompleteReservationResponse {
@@ -1,39 +1,39 @@
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
- import { T as d } from "./constants-OTS1wmXZ.js";
4
- import { D as f, E as ee, M as p, O as m, P as h, h as te, j as g } from "./orders-NZP81zYT.js";
3
+ import { T as d } from "./constants-BWfNecCz.js";
4
+ import { D as f, E as p, M as m, O as h, P as g, h as ee, j as _ } from "./orders-NZP81zYT.js";
5
5
  //#region node_modules/@getmicdrop/svelte-components/dist/transforms/ticket.js
6
- var _ = {
6
+ var v = {
7
7
  EVERYWHERE: 0,
8
8
  ONLINE_ONLY: 1,
9
9
  BOX_OFFICE_ONLY: 2
10
- }, v = {
10
+ }, y = {
11
11
  VISIBLE: 0,
12
12
  HIDDEN: 1,
13
13
  PROMO_ONLY: 2
14
14
  };
15
- function y(e) {
15
+ function b(e) {
16
16
  return e.soldOut === !0 ? 0 : e.remainingCapacity == null ? e.quantityRemaining == null ? e.quantity == null ? e.sold != null && e.totalCapacity != null ? Math.max(0, e.totalCapacity - e.sold) : 0 : e.quantity : e.quantityRemaining : e.remainingCapacity;
17
17
  }
18
- function b(e, t) {
18
+ function x(e, t) {
19
19
  return e.totalCapacity ?? e.quantity ?? t;
20
20
  }
21
- function ne(e) {
21
+ function te(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";
25
25
  if (c && s(n, c) < 0) return "scheduled";
26
26
  if (l && s(n, l) > 0) return "sales_ended";
27
27
  if (e.soldOut === !0) return "sold_out";
28
- let d = y(e), f = b(e, d);
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 re(e, t = {}) {
31
+ function ne(e, t = {}) {
32
32
  if (!Array.isArray(e)) return [];
33
33
  let n = e;
34
- return t.excludeDoorOnly && (n = n.filter((e) => e.salesChannel !== _.BOX_OFFICE_ONLY)), t.publicOnly && (n = n.filter((e) => e.visibility === v.VISIBLE)), n;
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 x(e) {
36
+ function S(e) {
37
37
  if (!Array.isArray(e) || e.length === 0) return {
38
38
  totalRemaining: 0,
39
39
  totalCapacity: 0,
@@ -41,8 +41,8 @@ function x(e) {
41
41
  };
42
42
  let t = 0, n = 0;
43
43
  for (let r of e) {
44
- let e = y(r);
45
- t += e, n += b(r, e);
44
+ let e = b(r);
45
+ t += e, n += x(r, e);
46
46
  }
47
47
  return {
48
48
  totalRemaining: t,
@@ -50,29 +50,29 @@ function x(e) {
50
50
  isSoldOut: t === 0
51
51
  };
52
52
  }
53
- function ie(e) {
53
+ function re(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 ae(e) {
60
+ function ie(e) {
61
61
  return e.availableTickets || e.available_tickets || e.tickets || [];
62
62
  }
63
- function S(e) {
64
- if (!e || !(e.isHidden === !0 || typeof e.visibility == "number" && e.visibility >= v.PROMO_ONLY) || e.salesChannel === _.BOX_OFFICE_ONLY) return !1;
63
+ function C(e) {
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 oe(e) {
71
- return e ? e.hasHiddenTickets === !0 || ae(e).some(S) : !1;
70
+ function w(e) {
71
+ return e ? e.hasHiddenTickets === !0 || ie(e).some(C) : !1;
72
72
  }
73
73
  //#endregion
74
74
  //#region node_modules/@getmicdrop/svelte-components/dist/errors/classes/NotFoundError.js
75
- var C = class extends l {
75
+ var T = 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,8 +87,8 @@ var C = class extends l {
87
87
  getUserMessage(e) {
88
88
  return i(e)?.fromCode?.(this.code) || c(this.resourceType.toLowerCase());
89
89
  }
90
- }, w = e("VC");
91
- async function se(e, t) {
90
+ }, E = e("VC");
91
+ async function ae(e, t) {
92
92
  try {
93
93
  if (!t || !t.trim()) return {
94
94
  valid: !1,
@@ -115,31 +115,31 @@ async function se(e, t) {
115
115
  applyToTicketIds: i.applyToTicketIds
116
116
  };
117
117
  } catch (e) {
118
- return w.error("Error validating promo code:", e), {
118
+ return E.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 ce(e) {
124
+ async function oe(e) {
125
125
  try {
126
126
  let t = await f(`/promo-codes/check/${e}`);
127
127
  return !t.success || t.data.hasPromoCodes === !0;
128
128
  } catch (e) {
129
- return w.error("Error checking promo codes availability:", e), !0;
129
+ return E.error("Error checking promo codes availability:", e), !0;
130
130
  }
131
131
  }
132
- async function T(e, t, n) {
132
+ async function se(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 m(`${g()}/cart/${e}/apply-promo`, r);
136
+ let i = await h(`${_()}/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 w.error("Error applying promo code:", e), {
142
+ return E.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 T(e, t, n) {
147
147
  }
148
148
  //#endregion
149
149
  //#region src/lib/api/result.ts
150
- function E(e) {
150
+ function D(e) {
151
151
  return {
152
152
  ok: !0,
153
153
  data: e
154
154
  };
155
155
  }
156
- function D(e) {
156
+ function O(e) {
157
157
  return {
158
158
  ok: !1,
159
159
  error: e
160
160
  };
161
161
  }
162
- function O(e) {
162
+ function k(e) {
163
163
  return {
164
164
  ok: !1,
165
165
  error: e,
166
166
  notFound: !0
167
167
  };
168
168
  }
169
- function k(e, t) {
169
+ function A(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 A = "/api/v2/public", j = "/api/orders/v2/public", M = "/api/orders/v2", N = "00000000-0000-0000-0000-000000000000";
175
- `${A}`, `${A}${N}`, `${A}`, `${A}${N}`, `${A}`, `${A}${N}`, `${A}`, `${A}${N}`, `${A}`, `${A}${N}`, `${A}`, `${A}${N}`, `${A}`, `${A}${N}`, `${A}`, `${A}${N}`, `${A}`, `${A}`, `${A}`, `${A}${N}`, `${A}`, `${A}${N}`, `${A}`, `${A}${N}`, `${A}`, `${A}${N}`, `${A}`, `${A}${N}`, `${A}`, `${A}${N}`, `${A}`, `${A}${N}`, `${A}`, `${A}${N}`, `${A}`, `${A}${N}`, `${A}`, `${A}${N}`, `${A}`, `${A}`, `${A}`, `${A}${N}`, `${A}`, `${A}${N}`, `${A}`, `${A}${N}`, `${A}`, `${A}${N}`, `${A}`, `${A}${N}`, `${A}`, `${A}${N}`, `${A}`, `${A}${N}`, `${A}`, `${A}`, `${A}`, `${A}${N}`, `${A}`, `${A}${N}`, `${A}`, `${A}${N}`, `${A}`, `${A}${N}`, `${A}`, `${A}${N}`, `${A}`, `${A}${N}`, `${A}`, `${A}`, `${A}`, `${A}`, `${A}`, `${A}`, `${A}`, `${A}${N}`, `${j}`, `${j}`, `${j}`, `${j}${N}`, `${j}`, `${j}${N}`, `${j}`, `${j}${N}`, `${j}`, `${j}${N}`, `${j}`, `${j}${N}`, `${j}`, `${j}${N}`, `${j}`, `${j}${N}`, `${j}`, `${j}${N}`, `${M}`, `${M}`, `${j}`, `${j}`, `${j}`, `${j}`, `${A}`, `${A}${N}`, `${A}`, `${A}`;
174
+ var j = "/api/v2/public", M = "/api/orders/v2/public", N = "/api/orders/v2", P = "00000000-0000-0000-0000-000000000000";
175
+ `${j}`, `${j}${P}`, `${j}`, `${j}${P}`, `${j}`, `${j}${P}`, `${j}`, `${j}${P}`, `${j}`, `${j}${P}`, `${j}`, `${j}${P}`, `${j}`, `${j}${P}`, `${j}`, `${j}${P}`, `${j}`, `${j}`, `${j}`, `${j}${P}`, `${j}`, `${j}${P}`, `${j}`, `${j}${P}`, `${j}`, `${j}${P}`, `${j}`, `${j}${P}`, `${j}`, `${j}${P}`, `${j}`, `${j}${P}`, `${j}`, `${j}${P}`, `${j}`, `${j}${P}`, `${j}`, `${j}${P}`, `${j}`, `${j}`, `${j}`, `${j}${P}`, `${j}`, `${j}${P}`, `${j}`, `${j}${P}`, `${j}`, `${j}${P}`, `${j}`, `${j}${P}`, `${j}`, `${j}${P}`, `${j}`, `${j}${P}`, `${j}`, `${j}`, `${j}`, `${j}${P}`, `${j}`, `${j}${P}`, `${j}`, `${j}${P}`, `${j}`, `${j}${P}`, `${j}`, `${j}${P}`, `${j}`, `${j}${P}`, `${j}`, `${j}`, `${j}`, `${j}`, `${j}`, `${j}`, `${j}`, `${j}${P}`, `${M}`, `${M}`, `${M}`, `${M}${P}`, `${M}`, `${M}${P}`, `${M}`, `${M}${P}`, `${M}`, `${M}${P}`, `${M}`, `${M}${P}`, `${M}`, `${M}${P}`, `${M}`, `${M}${P}`, `${M}`, `${M}${P}`, `${N}`, `${N}`, `${M}`, `${M}`, `${M}`, `${M}`, `${j}`, `${j}${P}`, `${j}`, `${j}`;
176
176
  //#endregion
177
177
  //#region src/lib/api/events.ts
178
- var P = e("VC"), F = /* @__PURE__ */ new Map();
179
- async function I(e, t = fetch, n) {
178
+ var F = e("VC"), I = /* @__PURE__ */ new Map();
179
+ async function ce(e, t = fetch, n) {
180
180
  let r = n ? `${e}:pw` : String(e);
181
181
  if (t === fetch) {
182
- let e = F.get(r);
182
+ let e = I.get(r);
183
183
  if (e) return e;
184
184
  }
185
185
  let i = (async () => {
186
186
  try {
187
- let r = await t(n ? `${p()}/events/${e}?password=${encodeURIComponent(n)}` : `${p()}/events/${e}`);
188
- if (!r.ok) return r.status === 404 ? O("event_not_found") : (P.error(`Failed to fetch event details: ${r.status}`), D("event_fetch_failed"));
187
+ let r = await t(n ? `${m()}/events/${e}?password=${encodeURIComponent(n)}` : `${m()}/events/${e}`);
188
+ if (!r.ok) return r.status === 404 ? k("event_not_found") : (F.error(`Failed to fetch event details: ${r.status}`), O("event_fetch_failed"));
189
189
  let i = await r.json();
190
- return i ? E(i) : O("event_not_found");
190
+ return i ? D(i) : k("event_not_found");
191
191
  } catch (e) {
192
- return P.error("Error fetching event details:", e), D("event_fetch_failed");
192
+ return F.error("Error fetching event details:", e), O("event_fetch_failed");
193
193
  }
194
194
  })();
195
- return t === fetch && (F.set(r, i), i.finally(() => {
196
- F.get(r) === i && F.delete(r);
195
+ return t === fetch && (I.set(r, i), i.finally(() => {
196
+ I.get(r) === i && I.delete(r);
197
197
  })), i;
198
198
  }
199
199
  async function L(e, t = fetch, n) {
200
- let r = await I(e, t, n);
200
+ let r = await ce(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 h(e);
206
- return r ? E(n(r)) : (P.error(`Failed to load (${t}): network or server error`), D(t));
205
+ let r = await g(e);
206
+ return r ? D(n(r)) : (F.error(`Failed to load (${t}): network or server error`), O(t));
207
207
  } catch (e) {
208
- return P.error(`Error loading (${t}):`, e), D(t);
208
+ return F.error(`Error loading (${t}):`, e), O(t);
209
209
  }
210
210
  }
211
211
  function z(e) {
@@ -213,61 +213,72 @@ 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(`${p()}/tickets/event/${e}${r}`, "tickets_fetch_failed", z);
216
+ return R(`${m()}/tickets/event/${e}${r}`, "tickets_fetch_failed", z);
217
217
  }
218
218
  async function V(e, t) {
219
- return k(await B(e, t), []);
219
+ return A(await B(e, t), []);
220
220
  }
221
221
  function H(e) {
222
222
  return Array.isArray(e) ? e : Array.isArray(e.events) ? e.events : [];
223
223
  }
224
- async function U(e, t, n) {
225
- return R(`${p()}/events/venue/${e}/month/${t}/${n}`, "month_events_fetch_failed", (e) => H(e));
224
+ var U = /* @__PURE__ */ new Map();
225
+ function W(e, t, n) {
226
+ if (!n?.fresh) {
227
+ let t = U.get(e);
228
+ if (t) return t;
229
+ }
230
+ let r = R(e, t, (e) => H(e));
231
+ return U.set(e, r), r.finally(() => {
232
+ U.get(e) === r && U.delete(e);
233
+ }), r;
234
+ }
235
+ async function G(e, t, n, r) {
236
+ return W(`${m()}/events/venue/${e}/month/${t}/${n}`, "month_events_fetch_failed", r);
226
237
  }
227
- async function W(e, t, n) {
228
- return R(`${p()}/events/organization/${e}/month/${t}/${n}`, "org_month_events_fetch_failed", (e) => H(e));
238
+ async function le(e, t, n, r) {
239
+ return W(`${m()}/events/organization/${e}/month/${t}/${n}`, "org_month_events_fetch_failed", r);
229
240
  }
230
- async function G(e, t) {
231
- return R(`${p()}/series/${e}/occurrences?venueId=${t}`, "series_cta_fetch_failed");
241
+ async function ue(e, t) {
242
+ return R(`${m()}/series/${e}/occurrences?venueId=${t}`, "series_cta_fetch_failed");
232
243
  }
233
- async function le(e, t) {
234
- let n = await G(e, t);
244
+ async function de(e, t) {
245
+ let n = await ue(e, t);
235
246
  return n.ok ? n.data : null;
236
247
  }
237
- async function ue(e, t) {
248
+ async function fe(e, t) {
238
249
  try {
239
- let n = t ? `?slug=${encodeURIComponent(t)}` : "", r = await h(`${p()}/resolve/${encodeURIComponent(String(e))}${n}`);
240
- if (!r || !r.type) throw new C("entity", String(e));
250
+ let n = t ? `?slug=${encodeURIComponent(t)}` : "", r = await g(`${m()}/resolve/${encodeURIComponent(String(e))}${n}`);
251
+ if (!r || !r.type) throw new T("entity", String(e));
241
252
  return r;
242
253
  } catch (e) {
243
- return P.error("Error resolving public entity:", e), null;
254
+ return F.error("Error resolving public entity:", e), null;
244
255
  }
245
256
  }
246
- async function de(e, t) {
257
+ async function pe(e, t) {
247
258
  try {
248
- let n = t ? `${p()}/collections/${e}?password=${encodeURIComponent(t)}` : `${p()}/collections/${e}`, r = await h(n);
249
- if (!r) throw new C("collection", String(e));
259
+ let n = t ? `${m()}/collections/${e}?password=${encodeURIComponent(t)}` : `${m()}/collections/${e}`, r = await g(n);
260
+ if (!r) throw new T("collection", String(e));
250
261
  return r;
251
262
  } catch (e) {
252
- return P.error("Error fetching collection:", e), null;
263
+ return F.error("Error fetching collection:", e), null;
253
264
  }
254
265
  }
255
- async function fe(e, t) {
266
+ async function me(e, t) {
256
267
  try {
257
- let n = await h(`${p()}/events/${e}/check-password`, {
268
+ let n = await g(`${m()}/events/${e}/check-password`, {
258
269
  method: "POST",
259
270
  headers: { "Content-Type": "application/json" },
260
271
  body: JSON.stringify({ password: t })
261
272
  });
262
273
  return typeof n == "boolean" ? { valid: n } : { valid: n?.valid === !0 };
263
274
  } catch (e) {
264
- return P.error("Error checking event password:", e), { valid: !1 };
275
+ return F.error("Error checking event password:", e), { valid: !1 };
265
276
  }
266
277
  }
267
278
  //#endregion
268
279
  //#region src/lib/api/venues.ts
269
280
  var K = e("VC");
270
- async function pe(e) {
281
+ async function he(e) {
271
282
  try {
272
283
  if (!e) return K.warn("getVenue called without venueId"), null;
273
284
  let t = await f(`/venues/${e}`);
@@ -281,16 +292,16 @@ async function pe(e) {
281
292
  function q(e, t) {
282
293
  return e == null || t(e);
283
294
  }
284
- function me(e) {
295
+ function ge(e) {
285
296
  if (typeof e != "object" || !e) return !1;
286
297
  let t = e;
287
298
  return t.valid === !0 && Number.isInteger(t.appliedAmount) && typeof t.remainingTotal == "number" && Number.isFinite(t.remainingTotal) && q(t.giftCardCode, (e) => typeof e == "string") && q(t.giftCardBalance, (e) => typeof e == "number" && Number.isFinite(e)) && q(t.fullyCoveredByCard, (e) => typeof e == "boolean");
288
299
  }
289
- var he = "We couldn't apply that gift card. Please try again.";
290
- function ge(e) {
291
- if (!me(e)) return {
300
+ var _e = "We couldn't apply that gift card. Please try again.";
301
+ function ve(e) {
302
+ if (!ge(e)) return {
292
303
  valid: !1,
293
- error: he
304
+ error: _e
294
305
  };
295
306
  let t = e, i = r(n(t.appliedAmount)), a = t.remainingTotal, o = t.fullyCoveredByCard ?? a <= 0, s = !o;
296
307
  return {
@@ -307,9 +318,9 @@ function ge(e) {
307
318
  //#endregion
308
319
  //#region src/lib/api/gift-cards.ts
309
320
  var J = e("VC");
310
- async function _e(e, t) {
321
+ async function ye(e, t) {
311
322
  try {
312
- let n = await m(`${g()}/cart/${e}/apply-gift-card`, { giftCardCode: t });
323
+ let n = await h(`${_()}/cart/${e}/apply-gift-card`, { giftCardCode: t });
313
324
  if (!n.success) return n.statusCode === 429 ? {
314
325
  valid: !1,
315
326
  error: "Too many attempts. Please wait a moment and try again."
@@ -317,7 +328,7 @@ async function _e(e, t) {
317
328
  valid: !1,
318
329
  error: n.error || "Invalid gift card code"
319
330
  });
320
- let r = ge(n.data);
331
+ let r = ve(n.data);
321
332
  return r.valid || J.error("Apply gift card returned an unusable payload:", n.data), r;
322
333
  } catch (e) {
323
334
  return J.error("applyGiftCard error:", e), {
@@ -326,9 +337,9 @@ async function _e(e, t) {
326
337
  };
327
338
  }
328
339
  }
329
- async function ve(e, t) {
340
+ async function be(e, t) {
330
341
  try {
331
- let n = await ee(`${g()}/cart/${e}/gift-card`, t ? { body: JSON.stringify({ giftCardCode: t }) } : void 0);
342
+ let n = await p(`${_()}/cart/${e}/gift-card`, t ? { body: JSON.stringify({ giftCardCode: t }) } : void 0);
332
343
  return n.success ? { success: !0 } : (J.error("Remove gift card failed:", n.error), {
333
344
  success: !1,
334
345
  error: n.error || "Failed to remove gift card"
@@ -340,9 +351,9 @@ async function ve(e, t) {
340
351
  };
341
352
  }
342
353
  }
343
- async function ye(e, t) {
354
+ async function xe(e, t) {
344
355
  try {
345
- let n = await m(`${g()}/cart/${e}/complete-gift-card-payment`, {
356
+ let n = await h(`${_()}/cart/${e}/complete-gift-card-payment`, {
346
357
  customerName: d(t.firstName, t.lastName),
347
358
  customerEmail: t.email,
348
359
  firstName: t.firstName,
@@ -350,7 +361,7 @@ async function ye(e, t) {
350
361
  email: t.email,
351
362
  phoneNumber: t.phoneNumber || null,
352
363
  mailingList: t.mailingList || !1,
353
- attribution: te()
364
+ attribution: ee()
354
365
  });
355
366
  return n.success ? {
356
367
  success: !0,
@@ -369,24 +380,24 @@ async function ye(e, t) {
369
380
  }
370
381
  //#endregion
371
382
  //#region src/lib/api/waitlist.ts
372
- var Y = e("VC"), be = {
383
+ var Y = e("VC"), Se = {
373
384
  waitlist_not_enabled: "Waitlist is not available for this event",
374
385
  event_not_found: "Event not found",
375
386
  invalid_phone: "Please enter a valid phone number",
376
387
  already_purchased: "You have already purchased tickets for this event",
377
388
  phone_already_registered: "This phone number is already on the waitlist"
378
389
  };
379
- async function xe(e, t, n = null, r = !1) {
390
+ async function Ce(e, t, n = null, r = !1) {
380
391
  try {
381
392
  let i = { email: t };
382
393
  n && r && (i.phone = n, i.smsOptIn = !0);
383
- let a = await m(`/events/${e}/waitlist`, i);
394
+ let a = await h(`/events/${e}/waitlist`, i);
384
395
  return a.success ? {
385
396
  success: !0,
386
397
  updated: a.data?.updated
387
398
  } : (Y.error("Join waitlist failed:", a.error), {
388
399
  success: !1,
389
- error: be[a.error ?? ""] || "Failed to join waitlist. Please try again."
400
+ error: Se[a.error ?? ""] || "Failed to join waitlist. Please try again."
390
401
  });
391
402
  } catch (e) {
392
403
  return Y.error("joinWaitlist error:", e), {
@@ -395,9 +406,9 @@ async function xe(e, t, n = null, r = !1) {
395
406
  };
396
407
  }
397
408
  }
398
- async function Se(e, t) {
409
+ async function we(e, t) {
399
410
  try {
400
- let n = await m(`/checkout/validate-token/${e}`, { email: t });
411
+ let n = await h(`/checkout/validate-token/${e}`, { email: t });
401
412
  return n.success ? {
402
413
  valid: !0,
403
414
  eventId: n.data?.eventId ?? 0
@@ -414,7 +425,7 @@ async function Se(e, t) {
414
425
  };
415
426
  }
416
427
  }
417
- async function Ce(e) {
428
+ async function X(e) {
418
429
  let t = {
419
430
  waitlistEnabled: !1,
420
431
  soldOut: !1,
@@ -433,7 +444,7 @@ async function Ce(e) {
433
444
  }
434
445
  //#endregion
435
446
  //#region src/lib/constants/colors.ts
436
- var X = {
447
+ var Te = {
437
448
  primary: "#0284fe",
438
449
  secondary: "#1d4ed8",
439
450
  tertiary: "#2563eb"
@@ -523,8 +534,8 @@ var X = {
523
534
  300: "#ffeaa7"
524
535
  },
525
536
  coral: "#ff6b6b"
526
- }, we = { defaultThemePrimary: "#7c3aed" }, Te = {
527
- blue: X.tertiary,
537
+ }, Ee = { defaultThemePrimary: "#7c3aed" }, De = {
538
+ blue: Te.tertiary,
528
539
  black: "#000000",
529
540
  darkGray: Z[700],
530
541
  gray: "#666666",
@@ -538,4 +549,4 @@ var X = {
538
549
  green: $.green[500]
539
550
  };
540
551
  //#endregion
541
- export { ie as A, ce as C, x as D, S as E, ne as O, T as S, oe as T, de as _, Te as a, W as b, Se as c, ve as d, pe as f, B as g, V as h, Q as i, re as k, _e as l, L as m, we as n, Ce as o, fe as p, Z as r, xe as s, $ as t, ye as u, le as v, se as w, ue as x, U as y };
552
+ export { re as A, oe as C, S as D, C as E, te as O, se as S, w as T, pe as _, De as a, le as b, we as c, be as d, he as f, B as g, V as h, Q as i, ne as k, ye as l, L as m, Ee as n, X as o, me as p, Z as r, Ce as s, $ as t, xe as u, de as v, ae as w, fe as x, G as y };
@@ -1,4 +1,4 @@
1
- import { J as e } from "./constants-OTS1wmXZ.js";
1
+ import { J as e } from "./constants-BWfNecCz.js";
2
2
  import "svelte/internal/disclose-version";
3
3
  import * as t from "svelte/internal/client";
4
4
  //#region node_modules/@getmicdrop/svelte-components/dist/primitives/Icons/phosphor/LocationIcon.svelte
@@ -1,7 +1,7 @@
1
1
  import { b as e } from "./timezones-C5l0SSHK.js";
2
- import { a as t, c as n, f as r, p as i, u as a } from "./constants-OTS1wmXZ.js";
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-DeJAzg_q.js";
4
+ import { A as c, D as l, O as u, T as d, k as f, r as p } from "./colors-fhDq0k7I.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 { _ as e } from "./Button-C4uFgl7L.js";
2
- import { J as t } from "./constants-OTS1wmXZ.js";
2
+ import { J as t } from "./constants-BWfNecCz.js";
3
3
  import { t as n } from "./Image-B3cEndLZ.js";
4
4
  import "svelte/internal/disclose-version";
5
5
  import * as r from "svelte/internal/client";
@@ -1,9 +1,9 @@
1
1
  import { E as e, R as t, m as n, y as r } from "./timezones-C5l0SSHK.js";
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-OTS1wmXZ.js";
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-DeJAzg_q.js";
4
+ import { E as p } from "./colors-fhDq0k7I.js";
5
5
  import { t as m } from "./createI18n-DBUVdZra.js";
6
- import { t as h } from "./labels-CqodQmuY.js";
6
+ import { t as h } from "./labels-Djxn2Lvi.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,4 +1,4 @@
1
- import { i as e, n as t, r as n, t as r } from "./colors-DeJAzg_q.js";
1
+ import { i as e, n as t, r as n, t as r } from "./colors-fhDq0k7I.js";
2
2
  //#region src/lib/core/theme-engine.js
3
3
  var i = {
4
4
  primary: t.defaultThemePrimary,
@@ -1,5 +1,5 @@
1
1
  import { B as e } from "./timezones-C5l0SSHK.js";
2
- import { o as t } from "./ModalFooter-DHhBLDbO.js";
2
+ import { o as t } from "./ModalFooter-BndOSwTE.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
@@ -1,5 +1,5 @@
1
1
  import { L as e } from "./timezones-C5l0SSHK.js";
2
- import { D as t, O as n } from "./constants-OTS1wmXZ.js";
2
+ import { D as t, O as n } from "./constants-BWfNecCz.js";
3
3
  import { n as r } from "./promo-DtLZRskK.js";
4
4
  var i = .029, a = .3;
5
5
  function o(e) {
@@ -1,4 +1,4 @@
1
- import { J as e } from "./constants-OTS1wmXZ.js";
1
+ import { J as e } from "./constants-BWfNecCz.js";
2
2
  import "svelte/internal/disclose-version";
3
3
  import * as t from "svelte/internal/client";
4
4
  //#region node_modules/@getmicdrop/svelte-components/dist/primitives/Icons/ExclamationTriangleOutline.svelte
@@ -1,6 +1,6 @@
1
1
  import { E as e, b as t, m as n, y as r } from "./timezones-C5l0SSHK.js";
2
- import { J as i, a, m as o } from "./constants-OTS1wmXZ.js";
3
- import { t as s } from "./copyToClipboard-CRDdh3r8.js";
2
+ import { J as i, a, m as o } from "./constants-BWfNecCz.js";
3
+ import { t as s } from "./copyToClipboard-BTVrJgtZ.js";
4
4
  import { r as c, t as l } from "./event-BrptLro8.js";
5
5
  import "svelte/internal/disclose-version";
6
6
  import * as u from "svelte/internal/client";
@@ -1,6 +1,6 @@
1
1
  import { _ as e } from "./Button-C4uFgl7L.js";
2
2
  import { E as t, _ as n, m as r, r as i, y as a } from "./timezones-C5l0SSHK.js";
3
- import { a as o, i as s, r as c, u as l, y as u } from "./constants-OTS1wmXZ.js";
3
+ import { a as o, i as s, r as c, u as l, y as u } from "./constants-BWfNecCz.js";
4
4
  import { t as d } from "./Badge-Bv_MT-Vt.js";
5
5
  import "svelte/internal/disclose-version";
6
6
  import * as f from "svelte/internal/client";
@@ -1,6 +1,6 @@
1
1
  import { x as e } from "./Button-C4uFgl7L.js";
2
2
  import { D as t, G as n, M as r, O as i, T as a, U as o, Y as s, q as c } from "./orders-NZP81zYT.js";
3
- import "./event-transform-BaJ7M1DL.js";
3
+ import "./event-transform-eNiddvbF.js";
4
4
  //#region node_modules/js-cookie/dist/js.cookie.mjs
5
5
  function l(e) {
6
6
  for (var t = 1; t < arguments.length; t++) {