@getmicdrop/venue-calendar 4.2.3 → 4.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (102) hide show
  1. package/dist/{ArrowLeftIcon-CxZXP_IT.js → ArrowLeftIcon-BxKUPFOE.js} +1 -1
  2. package/dist/{Badge-Bv_MT-Vt.js → Badge-M6qZyfTF.js} +9 -10
  3. package/dist/BlockPlaceholder-CLdS2Y-c.js +62 -0
  4. package/dist/{Calendar-BKefLfIt.js → Calendar-DwNhbEQY.js} +290 -292
  5. package/dist/CalendarFoundryView-BX5mT6NY.js +23561 -0
  6. package/dist/{CalendarIcon-CLGR_zlO.js → CalendarIcon-jLckZ_4N.js} +1 -1
  7. package/dist/{CartView-CHFlfWS9.js → CartView-B61KRyFq.js} +644 -651
  8. package/dist/Checkout-CoExiUba.js +1809 -0
  9. package/dist/{Checkout-C-A4t1eE.js → Checkout-DlQ2x3L6.js} +97 -97
  10. package/dist/{CheckoutTimer-d3KUbevy.js → CheckoutTimer-Cv9iQj2d.js} +5 -5
  11. package/dist/{ChevronDownIcon-YtBeSqjf.js → ChevronDownIcon-DiZxxS3e.js} +1 -1
  12. package/dist/{ClockIcon-a9tJQ5El.js → ClockIcon-BrWavNGl.js} +1 -1
  13. package/dist/{CloseIcon-DSURK5co.js → CloseIcon-Cmddp2PA.js} +1 -1
  14. package/dist/{CollectionView-BiBMllyw.js → CollectionView-DpkF55yD.js} +12 -13
  15. package/dist/Event-CzNN2jRR.js +3040 -0
  16. package/dist/{EventPage-C7K2yA4v.js → EventPage-DnKNNWk8.js} +167 -168
  17. package/dist/{Heading-Dfo3bjyn.js → Heading-B7VYbbfJ.js} +3 -4
  18. package/dist/Image-DBJAfLYe.js +81 -0
  19. package/dist/{phoneUtils-FnBDCqO0.js → Input-DsWjpYtc.js} +1132 -694
  20. package/dist/{MailIcon-DIrQpcGo.js → MailIcon-gpZMGdBK.js} +1 -1
  21. package/dist/{Modal-DrA1swbF.js → Modal-D4AUdrz8.js} +2 -2
  22. package/dist/{ModalFooter-r1NQNG9P.js → ModalFooter-8Di4-qKC.js} +57 -59
  23. package/dist/{PasswordInput-DB4qa7kS.js → PasswordInput-Buk60yEf.js} +4 -4
  24. package/dist/{ScarcityBadge-BJOm7_Ho.js → ScarcityBadge-DgrS89hq.js} +4 -4
  25. package/dist/{SeriesPage-JVmqUSax.js → SeriesPage-BCovOJ6a.js} +5 -5
  26. package/dist/{Spinner-BwiDys7C.js → Spinner-ChTN7t75.js} +3 -3
  27. package/dist/{Success-DAE6gPZM.js → Success-BRufJqwQ.js} +80 -81
  28. package/dist/{TagIcon-CrTNd8qE.js → TagIcon-C0uTQgU8.js} +1 -1
  29. package/dist/{ViewTicketsEmbed-Zx-mvP2p.js → ViewTicketsEmbed-CfagtvVL.js} +66 -67
  30. package/dist/{WarningCircleIcon-C5-op3Cy.js → WarningCircleIcon-B2hkUrvV.js} +1 -1
  31. package/dist/{WarningTriIcon-BxIQn7c2.js → WarningTriIcon-Boy4IW6-.js} +1 -1
  32. package/dist/{__SKIP_PATHS__-DyyiXBgB.js → __SKIP_PATHS__-DPK-YB-V.js} +1 -1
  33. package/dist/{href-C8WGnROy.js → allowlist-Cu2kP6jt.js} +4 -21
  34. package/dist/api/api.cjs +1 -1
  35. package/dist/api/api.mjs +182 -165
  36. package/dist/api/client.d.ts +16 -0
  37. package/dist/api/events.d.ts +21 -2
  38. package/dist/api/types.d.ts +17 -0
  39. package/dist/{browser-Um8Y6K99.js → browser-25hnscei.js} +7 -7
  40. package/dist/cancel-gqtaw6SK.js +59 -0
  41. package/dist/{colors-MuuDk6KF.js → colors-B9hMXv8l.js} +118 -108
  42. package/dist/{constants-CqrJv6nM.js → constants-DBwdjnEU.js} +77 -74
  43. package/dist/{copyToClipboard-CTS9Wtmo.js → copyToClipboard-BDa2_uNf.js} +1 -1
  44. package/dist/{createI18n-DBUVdZra.js → createI18n-08XGDh1_.js} +1 -1
  45. package/dist/{event-BrptLro8.js → event-Cp5D4ctZ.js} +1 -1
  46. package/dist/{event-transform-jFmHl0Qp.js → event-transform-BFJTgtU9.js} +4 -4
  47. package/dist/{eventStatusStream-D04pcbuu.js → eventStatusStream-SyvhRCtk.js} +6 -6
  48. package/dist/{i18n-CcJmTGJP.js → i18n-4ZGOM8hY.js} +11 -11
  49. package/dist/{labels-Q4CaHsVM.js → labels-99RC9gAv.js} +1 -1
  50. package/dist/{modalManager.svelte-qcVxl7C5.js → modalManager.svelte-BdNsCq6n.js} +2 -2
  51. package/dist/{order-totals-BImtvmoh.js → order-totals-CQ0V7Fdc.js} +13 -15
  52. package/dist/{orders-C8kt6c-E.js → orders-oRqSQXSf.js} +209 -199
  53. package/dist/{pixels-MEc7WYiV.js → pixels-DycN_8bu.js} +7 -8
  54. package/dist/{promo-DtLZRskK.js → promo-BrMcoTYh.js} +3 -3
  55. package/dist/{serverTotals-BO126TTd.js → serverTotals-CpRaEe9K.js} +1 -1
  56. package/dist/{shareCopyFeedback.svelte-Dko8NIbm.js → shareCopyFeedback.svelte-D314p5oA.js} +25 -25
  57. package/dist/{showcase-state-options-BoJxiEsg.js → showcase-state-options-B2XfybZq.js} +1 -1
  58. package/dist/timezones-Cq1mLtfM.js +4170 -0
  59. package/dist/{to-event-card-props-BAHzloEA.js → to-event-card-props-BNBWYYPo.js} +23 -24
  60. package/dist/{utils-Ts4-U13Y.js → utils-CrlClQxc.js} +30 -30
  61. package/dist/venue-calendar.css +1 -1
  62. package/dist/venue-calendar.es.js +1292 -1154
  63. package/dist/venue-calendar.iife.js +63 -64
  64. package/dist/venue-calendar.umd.js +59 -60
  65. package/package.json +220 -220
  66. package/dist/BlockPlaceholder-HZ6Coko5.js +0 -52
  67. package/dist/Button-C4uFgl7L.js +0 -2141
  68. package/dist/CalendarFoundryView-tDmFCrJ3.js +0 -22292
  69. package/dist/Checkout-CRX7dcRr.js +0 -1807
  70. package/dist/CloseOutline-qpVa62mu.js +0 -13
  71. package/dist/CropImage-B0tj2_uN.js +0 -404
  72. package/dist/Event-1ZJVzqFN.js +0 -3034
  73. package/dist/Image-B3cEndLZ.js +0 -87
  74. package/dist/Input-DkYIFK4J.js +0 -487
  75. package/dist/imageOptimizer-CB3wKJU8.js +0 -47
  76. package/dist/sortable.esm--ZtTTTPp.js +0 -1451
  77. package/dist/timezones-C5l0SSHK.js +0 -2030
  78. package/dist/z-index-B0Vk_Mp1.js +0 -27
  79. /package/dist/locales/{4.2.3 → 4.2.5}/flow/de.js +0 -0
  80. /package/dist/locales/{4.2.3 → 4.2.5}/flow/es.js +0 -0
  81. /package/dist/locales/{4.2.3 → 4.2.5}/flow/fr.js +0 -0
  82. /package/dist/locales/{4.2.3 → 4.2.5}/flow/id.js +0 -0
  83. /package/dist/locales/{4.2.3 → 4.2.5}/flow/it.js +0 -0
  84. /package/dist/locales/{4.2.3 → 4.2.5}/flow/ja.js +0 -0
  85. /package/dist/locales/{4.2.3 → 4.2.5}/flow/ko.js +0 -0
  86. /package/dist/locales/{4.2.3 → 4.2.5}/flow/nl.js +0 -0
  87. /package/dist/locales/{4.2.3 → 4.2.5}/flow/pl.js +0 -0
  88. /package/dist/locales/{4.2.3 → 4.2.5}/flow/pt-br.js +0 -0
  89. /package/dist/locales/{4.2.3 → 4.2.5}/flow/tr.js +0 -0
  90. /package/dist/locales/{4.2.3 → 4.2.5}/flow/zh.js +0 -0
  91. /package/dist/locales/{4.2.3 → 4.2.5}/main/de.js +0 -0
  92. /package/dist/locales/{4.2.3 → 4.2.5}/main/es.js +0 -0
  93. /package/dist/locales/{4.2.3 → 4.2.5}/main/fr.js +0 -0
  94. /package/dist/locales/{4.2.3 → 4.2.5}/main/id.js +0 -0
  95. /package/dist/locales/{4.2.3 → 4.2.5}/main/it.js +0 -0
  96. /package/dist/locales/{4.2.3 → 4.2.5}/main/ja.js +0 -0
  97. /package/dist/locales/{4.2.3 → 4.2.5}/main/ko.js +0 -0
  98. /package/dist/locales/{4.2.3 → 4.2.5}/main/nl.js +0 -0
  99. /package/dist/locales/{4.2.3 → 4.2.5}/main/pl.js +0 -0
  100. /package/dist/locales/{4.2.3 → 4.2.5}/main/pt-br.js +0 -0
  101. /package/dist/locales/{4.2.3 → 4.2.5}/main/tr.js +0 -0
  102. /package/dist/locales/{4.2.3 → 4.2.5}/main/zh.js +0 -0
@@ -1,7 +1,6 @@
1
- import { S as e, x as t } from "./Button-C4uFgl7L.js";
2
- import { a as n, i as r, w as i } from "./timezones-C5l0SSHK.js";
1
+ import { P as e, h as t, m as n, nt as r, tt as i } from "./timezones-Cq1mLtfM.js";
3
2
  //#region node_modules/@getmicdrop/svelte-components/dist/errors/classes/ApiError.js
4
- var a = class e extends i {
3
+ var a = class r extends e {
5
4
  constructor(e, t, n = {}) {
6
5
  super(e, `API_${t}`, {
7
6
  status: t,
@@ -11,22 +10,22 @@ var a = class e extends i {
11
10
  }), this.name = "ApiError", this.endpoint = n.endpoint, this.method = n.method, this.requestId = n.requestId;
12
11
  }
13
12
  getUserMessage(e) {
14
- return n(this.status, this.message, e);
13
+ return t(this.status, this.message, e);
15
14
  }
16
15
  isRetryable() {
17
16
  return this.status >= 500 || this.status === 429;
18
17
  }
19
- static async fromResponse(t, n, i) {
20
- let a = `Request failed with status ${t.status}`, o;
18
+ static async fromResponse(e, t, i) {
19
+ let a = `Request failed with status ${e.status}`, o;
21
20
  try {
22
- let e = await t.json();
23
- a = r(e, a), o = e.details || e;
21
+ let t = await e.json();
22
+ a = n(t, a), o = t.details || t;
24
23
  } catch {}
25
- return new e(a, t.status, {
26
- endpoint: n,
24
+ return new r(a, e.status, {
25
+ endpoint: t,
27
26
  method: i,
28
27
  details: o,
29
- requestId: t.headers.get("x-request-id") || void 0
28
+ requestId: e.headers.get("x-request-id") || void 0
30
29
  });
31
30
  }
32
31
  };
@@ -58,12 +57,12 @@ function c(e, t, n) {
58
57
  }
59
58
  return s(r, n);
60
59
  }
61
- function l(t, n, r) {
62
- if (!t) return !1;
60
+ function l(e, t, n) {
61
+ if (!e) return !1;
63
62
  try {
64
- return t.setItem(n, JSON.stringify(r)), !0;
65
- } catch (t) {
66
- return e.warn(`storage: failed to write "${n}"`, t), !1;
63
+ return e.setItem(t, JSON.stringify(n)), !0;
64
+ } catch (e) {
65
+ return r.warn(`storage: failed to write "${t}"`, e), !1;
67
66
  }
68
67
  }
69
68
  function u(e, t) {
@@ -77,63 +76,74 @@ function d(e, t, n) {
77
76
  function f(e, t, n) {
78
77
  return l(o(e), t, n);
79
78
  }
80
- function ee(e, t) {
79
+ function p(e, t) {
81
80
  u(o(e), t);
82
81
  }
83
- function te(e, t = null) {
82
+ function m(e, t = null) {
84
83
  return d("local", e, t);
85
84
  }
86
- function p(e, t) {
85
+ function h(e, t) {
87
86
  return f("local", e, t);
88
87
  }
89
- function ne(e) {
90
- ee("local", e);
88
+ function ee(e) {
89
+ p("local", e);
91
90
  }
92
- function m(e, t = null) {
91
+ function g(e, t = null) {
93
92
  return d("session", e, t);
94
93
  }
95
- function h(e, t) {
94
+ function _(e, t) {
96
95
  return f("session", e, t);
97
96
  }
98
- function re(e) {
99
- ee("session", e);
97
+ function te(e) {
98
+ p("session", e);
100
99
  }
101
100
  //#endregion
102
101
  //#region src/lib/config.js
103
- var ie = t("VC:config", { enabled: !0 }), g = null;
104
- function ae(e) {
102
+ var ne = i("VC:config", { enabled: !0 }), v = null;
103
+ function re(e) {
105
104
  let t = e || null;
106
- g && t && t !== g && ie.warn("[VC] setWidgetKey called again with a DIFFERENT key. The widget key is module-global, so every calendar on this page will now use the last one set — any element configured with the previous key will get 403s on its public reads and render empty. Give each element its own widget-key attribute (threaded per-instance) rather than calling setWidgetKey() more than once."), g = t;
105
+ v && t && t !== v && ne.warn("[VC] setWidgetKey called again with a DIFFERENT key. The widget key is module-global, so every calendar on this page will now use the last one set — any element configured with the previous key will get 403s on its public reads and render empty. Give each element its own widget-key attribute (threaded per-instance) rather than calling setWidgetKey() more than once."), v = t;
107
106
  }
108
- function _() {
109
- if (g) return g;
107
+ function y() {
108
+ if (v) return v;
110
109
  }
111
- var v = null;
112
- function oe(e) {
113
- v = typeof e == "string" && e.trim() ? e.trim() : null;
110
+ var b = null;
111
+ function ie(e) {
112
+ b = typeof e == "string" && e.trim() ? e.trim() : null;
114
113
  }
115
- function se() {
116
- return (v || he().baseUrl || "").replace(/\/+$/, "");
114
+ function ae() {
115
+ return (b || E().baseUrl || "").replace(/\/+$/, "");
117
116
  }
118
- function ce(e) {}
119
- var y = {
117
+ function oe(e) {}
118
+ var x = {
120
119
  postMessageOnSuccess: !1,
121
120
  postMessageTargetOrigin: null
122
121
  };
123
- function le(e = {}) {
124
- y = {
125
- ...y,
122
+ function se(e = {}) {
123
+ x = {
124
+ ...x,
126
125
  ...e
127
126
  };
128
127
  }
129
- function ue() {
130
- return { ...y };
128
+ function ce() {
129
+ return { ...x };
131
130
  }
132
131
  //#endregion
133
132
  //#region src/lib/api/client.ts
134
- var b = t("VC"), de = "ABORTED";
135
- function x(e, t) {
136
- let n = t || _();
133
+ var S = i("VC"), C = /* @__PURE__ */ new Set();
134
+ function le(e) {
135
+ return C.add(e), () => {
136
+ C.delete(e);
137
+ };
138
+ }
139
+ function ue(e) {
140
+ if (e) for (let t of C) try {
141
+ t(e);
142
+ } catch {}
143
+ }
144
+ var de = "ABORTED";
145
+ function w(e, t) {
146
+ let n = t || y();
137
147
  return n ? {
138
148
  ...e,
139
149
  "X-Widget-Key": n
@@ -154,30 +164,30 @@ var pe = class extends Error {
154
164
  constructor(e, t, n) {
155
165
  super(e), this.name = "ApiRequestError", this.code = t, this.statusCode = n;
156
166
  }
157
- }, S = {
167
+ }, T = {
158
168
  baseUrl: "https://get-micdrop.com",
159
169
  timeout: 3e4,
160
170
  retries: 2,
161
171
  retryDelay: 500,
162
- onError: (e) => b.error("API Error:", e)
172
+ onError: (e) => S.error("API Error:", e)
163
173
  };
164
174
  function me(e) {
165
- S = {
166
- ...S,
175
+ T = {
176
+ ...T,
167
177
  ...e
168
178
  };
169
179
  }
170
- function he() {
171
- return { ...S };
180
+ function E() {
181
+ return { ...T };
172
182
  }
173
- function C() {
174
- return `${S.baseUrl}/api/v2/public`;
183
+ function D() {
184
+ return `${T.baseUrl}/api/v2/public`;
175
185
  }
176
- function w() {
177
- return `${S.baseUrl}/api/orders/v2/public`;
186
+ function O() {
187
+ return `${T.baseUrl}/api/orders/v2/public`;
178
188
  }
179
- var ge = (e) => new Promise((t) => setTimeout(t, e));
180
- async function T(e, t, n) {
189
+ var he = (e) => new Promise((t) => setTimeout(t, e));
190
+ async function k(e, t, n) {
181
191
  let r = (t.method || "GET").toUpperCase(), i = r === "GET" || r === "HEAD" ? n.retries + 1 : 1, a;
182
192
  for (let r = 1; r <= i; r++) {
183
193
  let o = new AbortController(), s = setTimeout(() => o.abort(), n.timeout), c = t.signal, l;
@@ -194,36 +204,36 @@ async function T(e, t, n) {
194
204
  } finally {
195
205
  clearTimeout(s), c && l && c.removeEventListener("abort", l);
196
206
  }
197
- r < i && await ge(n.retryDelay * 2 ** (r - 1));
207
+ r < i && await he(n.retryDelay * 2 ** (r - 1));
198
208
  }
199
209
  throw a;
200
210
  }
201
- async function E(e, t) {
202
- return O("GET", e, void 0, t);
211
+ async function A(e, t) {
212
+ return M("GET", e, void 0, t);
203
213
  }
204
- async function D(e, t, n) {
205
- return O("POST", e, t, n);
214
+ async function j(e, t, n) {
215
+ return M("POST", e, t, n);
206
216
  }
207
- async function _e(e, t) {
208
- return O("DELETE", e, void 0, t);
217
+ async function ge(e, t) {
218
+ return M("DELETE", e, void 0, t);
209
219
  }
210
- async function O(e, t, n, r) {
211
- let i = t.startsWith("http") || t.startsWith("/api/") ? t : `${C()}${t}`, { widgetKey: a, suppressOnError: o, headers: s, ...c } = r ?? {}, l = (e) => {
212
- o || S.onError(e);
220
+ async function M(e, t, n, r) {
221
+ let i = t.startsWith("http") || t.startsWith("/api/") ? t : `${D()}${t}`, { widgetKey: a, suppressOnError: o, headers: s, ...c } = r ?? {}, l = (e) => {
222
+ o || T.onError(e);
213
223
  };
214
224
  try {
215
- let t = await T(i, {
225
+ let t = await k(i, {
216
226
  method: e,
217
- headers: x({
227
+ headers: w({
218
228
  "Content-Type": "application/json",
219
229
  ...s
220
230
  }, a),
221
231
  body: n === void 0 ? void 0 : JSON.stringify(n),
222
232
  ...c
223
- }, S);
233
+ }, T);
224
234
  if (!t.ok) {
225
235
  let { message: e, code: n } = fe(await t.json().catch(() => ({})), t.status);
226
- return l(new pe(e, n, t.status)), {
236
+ return l(new pe(e, n, t.status)), ue(n), {
227
237
  success: !1,
228
238
  error: e,
229
239
  errorCode: n,
@@ -249,78 +259,78 @@ async function O(e, t, n, r) {
249
259
  };
250
260
  }
251
261
  }
252
- async function ve(e, t) {
253
- return D(`${C()}/tax-preview`, e, {
262
+ async function _e(e, t) {
263
+ return j(`${D()}/tax-preview`, e, {
254
264
  signal: t?.signal,
255
265
  suppressOnError: t?.suppressOnError ?? !0
256
266
  });
257
267
  }
258
- async function ye(e, t) {
268
+ async function ve(e, t) {
259
269
  try {
260
- let n = e.startsWith(S.baseUrl), { widgetKey: r, ...i } = t ?? {}, a = await T(e, {
270
+ let n = e.startsWith(T.baseUrl), { widgetKey: r, ...i } = t ?? {}, a = await k(e, {
261
271
  ...i,
262
- ...n ? { headers: x(i.headers, r) } : {}
263
- }, S);
272
+ ...n ? { headers: w(i.headers, r) } : {}
273
+ }, T);
264
274
  if (!a.ok) {
265
275
  let e = await a.json().catch(() => ({}));
266
- return b.error(`API request failed: ${a.status}`, e), null;
276
+ return S.error(`API request failed: ${a.status}`, e), null;
267
277
  }
268
278
  return a.json();
269
279
  } catch (e) {
270
- return b.error("API request error:", e), null;
280
+ return S.error("API request error:", e), null;
271
281
  }
272
282
  }
273
283
  //#endregion
274
284
  //#region src/lib/tracking/normalize.ts
275
- var k = [
285
+ var N = [
276
286
  "utmSource",
277
287
  "utmMedium",
278
288
  "utmCampaign",
279
289
  "utmContent",
280
290
  "utmTerm"
281
- ], be = {
291
+ ], ye = {
282
292
  utmSource: "utm_source",
283
293
  utmMedium: "utm_medium",
284
294
  utmCampaign: "utm_campaign",
285
295
  utmContent: "utm_content",
286
296
  utmTerm: "utm_term"
287
- }, xe = "direct";
288
- function A(e) {
297
+ }, P = "direct";
298
+ function F(e) {
289
299
  return e ? e.trim().toLowerCase().replace(/\s+/g, "_") : "";
290
300
  }
291
- function Se(e) {
301
+ function be(e) {
292
302
  let t = {};
293
- for (let n of k) t[n] = A(e[n]);
294
- return t.utmSource ||= xe, t;
303
+ for (let n of N) t[n] = F(e[n]);
304
+ return t.utmSource ||= P, t;
295
305
  }
296
- function Ce(e) {
306
+ function xe(e) {
297
307
  let t = {};
298
- for (let n of k) t[n] = e.get(be[n]);
299
- return Se(t);
308
+ for (let n of N) t[n] = e.get(ye[n]);
309
+ return be(t);
300
310
  }
301
- function j(e) {
311
+ function I(e) {
302
312
  return !!e.utmSource && e.utmSource !== "direct";
303
313
  }
304
314
  //#endregion
305
315
  //#region src/lib/tracking/context.ts
306
- var M = null, N = null, P = {
316
+ var L = null, R = null, z = {
307
317
  search: null,
308
318
  referrer: null,
309
319
  pageUrl: null
310
320
  };
311
- function we(e) {
312
- e.widgetId !== void 0 && (M = e.widgetId || null), e.venueId !== void 0 && (N = e.venueId ?? null);
321
+ function Se(e) {
322
+ e.widgetId !== void 0 && (L = e.widgetId || null), e.venueId !== void 0 && (R = e.venueId ?? null);
313
323
  }
314
- function Te(e) {
315
- e.search !== void 0 && (P.search = e.search === null ? null : e.search instanceof URLSearchParams ? e.search.toString() : e.search), e.referrer !== void 0 && (P.referrer = e.referrer), e.pageUrl !== void 0 && (P.pageUrl = e.pageUrl);
324
+ function Ce(e) {
325
+ e.search !== void 0 && (z.search = e.search === null ? null : e.search instanceof URLSearchParams ? e.search.toString() : e.search), e.referrer !== void 0 && (z.referrer = e.referrer), e.pageUrl !== void 0 && (z.pageUrl = e.pageUrl);
316
326
  }
317
- function Ee() {
318
- return M;
327
+ function we() {
328
+ return L;
319
329
  }
320
- function De() {
321
- return N;
330
+ function Te() {
331
+ return R;
322
332
  }
323
- function Oe() {
333
+ function Ee() {
324
334
  if (typeof window > "u") return !0;
325
335
  try {
326
336
  return window.self === window.top;
@@ -328,57 +338,57 @@ function Oe() {
328
338
  return !1;
329
339
  }
330
340
  }
331
- function F() {
332
- let e = typeof window < "u", t = Oe(), n = P.search ?? (e ? window.location.search : ""), r = P.referrer ?? (typeof document < "u" ? document.referrer : "") ?? "", i = P.pageUrl ?? (e && t ? window.location.href : "");
341
+ function B() {
342
+ let e = typeof window < "u", t = Ee(), n = z.search ?? (e ? window.location.search : ""), r = z.referrer ?? (typeof document < "u" ? document.referrer : "") ?? "", i = z.pageUrl ?? (e && t ? window.location.href : "");
333
343
  return {
334
- utm: Ce(new URLSearchParams(n)),
344
+ utm: xe(new URLSearchParams(n)),
335
345
  referrer: r || "",
336
346
  pageUrl: i || ""
337
347
  };
338
348
  }
339
- function ke() {
349
+ function De() {
340
350
  if (typeof navigator > "u") return "desktop";
341
351
  let e = navigator.userAgent.toLowerCase();
342
352
  return /ipad|tablet|playbook|silk/.test(e) ? "tablet" : /mobile|iphone|ipod|android.*mobile|windows phone|blackberry/.test(e) ? "mobile" : /android/.test(e) ? "tablet" : "desktop";
343
353
  }
344
354
  //#endregion
345
355
  //#region src/lib/tracking/consent.ts
346
- var I = null, L = !1, R = !1, Ae = !1;
347
- function je(e) {
348
- I = e;
356
+ var V = null, H = !1, U = !1, Oe = !1;
357
+ function ke(e) {
358
+ V = e;
349
359
  }
350
- function Me(e) {
351
- L = e;
360
+ function Ae(e) {
361
+ H = e;
352
362
  }
353
- function z() {
354
- return Ae;
363
+ function W() {
364
+ return Oe;
355
365
  }
356
- function B() {
366
+ function G() {
357
367
  return typeof window < "u" && typeof window.__tcfapi == "function";
358
368
  }
359
- function V() {
369
+ function K() {
360
370
  return typeof navigator < "u" && navigator.globalPrivacyControl === !0;
361
371
  }
362
- function Ne() {
363
- return I === null ? B() || V() : I;
372
+ function je() {
373
+ return V === null ? G() || K() : V;
364
374
  }
365
- function H() {
366
- return !Ne() || L;
375
+ function q() {
376
+ return !je() || H;
367
377
  }
368
- function Pe() {
369
- if (R || !B()) return;
370
- R = !0;
378
+ function Me() {
379
+ if (U || !G()) return;
380
+ U = !0;
371
381
  let e = window.__tcfapi;
372
382
  try {
373
383
  e("addEventListener", 2, (e, t) => {
374
384
  if (!(!t || !e)) {
375
385
  if (e.gdprApplies === !1) {
376
- V() || (L = !0);
386
+ K() || (H = !0);
377
387
  return;
378
388
  }
379
389
  if (e.eventStatus === "tcloaded" || e.eventStatus === "useractioncomplete") {
380
390
  let t = e.purpose?.consents;
381
- L = !!t && Object.values(t).some(Boolean);
391
+ H = !!t && Object.values(t).some(Boolean);
382
392
  }
383
393
  }
384
394
  });
@@ -386,11 +396,11 @@ function Pe() {
386
396
  }
387
397
  //#endregion
388
398
  //#region src/lib/tracking/identity.ts
389
- var U = "micdrop_session_id", W = "micdrop_visitor_id", Fe = /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
390
- function G(e) {
391
- return typeof e == "string" && Fe.test(e);
399
+ var J = "micdrop_session_id", Y = "micdrop_visitor_id", Ne = /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
400
+ function Pe(e) {
401
+ return typeof e == "string" && Ne.test(e);
392
402
  }
393
- function K() {
403
+ function Fe() {
394
404
  let e = typeof crypto < "u" ? crypto : void 0;
395
405
  if (e?.randomUUID) return e.randomUUID();
396
406
  let t = /* @__PURE__ */ new Uint8Array(16);
@@ -401,20 +411,20 @@ function K() {
401
411
  for (let e = 0; e < 16; e++) n.push(t[e].toString(16).padStart(2, "0"));
402
412
  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]}`;
403
413
  }
404
- function q() {
405
- let e = m(U);
406
- return e || (e = K(), h(U, e)), e;
414
+ function Ie() {
415
+ let e = g(J);
416
+ return e || (e = Fe(), _(J, e)), e;
407
417
  }
408
- function Ie(e) {
409
- let t = te(W);
410
- if (G(t)) return {
418
+ function Le(e) {
419
+ let t = m(Y);
420
+ if (Pe(t)) return {
411
421
  id: t,
412
422
  createdAt: e,
413
423
  migrated: !0
414
424
  };
415
425
  if (t && typeof t == "object") {
416
426
  let { id: n, createdAt: r } = t;
417
- if (!G(n)) return null;
427
+ if (!Pe(n)) return null;
418
428
  let i = typeof r == "number" && Number.isFinite(r), a = i ? Math.min(r, e) : e;
419
429
  return {
420
430
  id: n,
@@ -424,23 +434,23 @@ function Ie(e) {
424
434
  }
425
435
  return null;
426
436
  }
427
- function J() {
428
- if (!H()) return null;
429
- let e = Date.now(), t = Ie(e);
430
- if (t && e - t.createdAt < 34128e6) return t.migrated && p(W, {
437
+ function X() {
438
+ if (!q()) return null;
439
+ let e = Date.now(), t = Le(e);
440
+ if (t && e - t.createdAt < 34128e6) return t.migrated && h(Y, {
431
441
  id: t.id,
432
442
  createdAt: t.createdAt
433
443
  }), t.id;
434
- let n = K();
435
- return p(W, {
444
+ let n = Fe();
445
+ return h(Y, {
436
446
  id: n,
437
447
  createdAt: e
438
448
  }), n;
439
449
  }
440
450
  //#endregion
441
451
  //#region src/lib/tracking/attribution-store.ts
442
- var Y = "micdrop_attribution";
443
- function Le(e, t) {
452
+ var Re = "micdrop_attribution";
453
+ function ze(e, t) {
444
454
  if (!e || !t) return !1;
445
455
  try {
446
456
  let n = new URL(e).host, r = new URL(t).host;
@@ -449,26 +459,26 @@ function Le(e, t) {
449
459
  return !1;
450
460
  }
451
461
  }
452
- function Re(e) {
453
- return j(e.utm) || Le(e.referrer, e.pageUrl);
462
+ function Be(e) {
463
+ return I(e.utm) || ze(e.referrer, e.pageUrl);
454
464
  }
455
- function X() {
456
- let e = m(Y);
465
+ function Ve() {
466
+ let e = g(Re);
457
467
  return !e || !e.utm || typeof e.utm.utmSource != "string" ? null : e;
458
468
  }
459
- function ze(e = F()) {
460
- let t = Re(e), n = X();
461
- !t && n || h(Y, {
469
+ function He(e = B()) {
470
+ let t = Be(e), n = Ve();
471
+ !t && n || _(Re, {
462
472
  utm: e.utm,
463
473
  referrer: e.referrer,
464
474
  marketing: t
465
475
  });
466
476
  }
467
477
  function Z() {
468
- let e = X() ?? F();
478
+ let e = Ve() ?? B();
469
479
  return {
470
- sessionId: q(),
471
- visitorId: J(),
480
+ sessionId: Ie(),
481
+ visitorId: X(),
472
482
  utmSource: e.utm.utmSource,
473
483
  utmMedium: e.utm.utmMedium,
474
484
  utmCampaign: e.utm.utmCampaign,
@@ -479,7 +489,7 @@ function Z() {
479
489
  }
480
490
  //#endregion
481
491
  //#region src/lib/tracking/beacon.ts
482
- var Be = t("tracking"), Ve = /* @__PURE__ */ new Set([
492
+ var Ue = i("tracking"), We = /* @__PURE__ */ new Set([
483
493
  "chunk_load_error",
484
494
  "type_error",
485
495
  "reference_error",
@@ -490,23 +500,23 @@ var Be = t("tracking"), Ve = /* @__PURE__ */ new Set([
490
500
  "abort_error",
491
501
  "not_supported_error",
492
502
  "error"
493
- ]), He = "other";
494
- function Ue(e) {
503
+ ]), Ge = "other";
504
+ function Ke(e) {
495
505
  try {
496
506
  let t = e instanceof Error || e && typeof e == "object" && "name" in e ? String(e.name ?? "") : "", n = e && typeof e == "object" && "message" in e ? String(e.message ?? "") : "";
497
507
  if (t === "ChunkLoadError" || /dynamically imported module/i.test(n)) return "chunk_load_error";
498
508
  let r = t.replace(/([a-z0-9])([A-Z])/g, "$1_$2").toLowerCase().replace(/[^a-z0-9_]/g, "");
499
- return Ve.has(r) ? r : He;
509
+ return We.has(r) ? r : Ge;
500
510
  } catch {
501
- return He;
511
+ return Ge;
502
512
  }
503
513
  }
504
- var We = /* @__PURE__ */ new Set([
514
+ var qe = /* @__PURE__ */ new Set([
505
515
  "add_to_cart",
506
516
  "checkout_started",
507
517
  "purchase"
508
- ]), Ge = "micdrop_tracked_beacons", Ke = 300;
509
- function qe(e, t, n, r, i, a, o, s = "") {
518
+ ]), Je = "micdrop_tracked_beacons", Ye = 300;
519
+ function Xe(e, t, n, r, i, a, o, s = "") {
510
520
  let c = n || `url:${o}`, l = [
511
521
  e,
512
522
  t ?? "",
@@ -517,27 +527,27 @@ function qe(e, t, n, r, i, a, o, s = "") {
517
527
  ];
518
528
  return s && l.push(s), l.join(":");
519
529
  }
520
- function Je(e) {
530
+ function Ze(e) {
521
531
  if (e == null || e === "") return null;
522
532
  let t = Number(e);
523
533
  return Number.isFinite(t) ? t : null;
524
534
  }
525
- function Ye(e) {
526
- let t = m(Ge, []) ?? [];
535
+ function Qe(e) {
536
+ let t = g(Je, []) ?? [];
527
537
  if (t.includes(e)) return !0;
528
538
  let n = [...t, e];
529
- return h(Ge, n.length > Ke ? n.slice(-300) : n), !1;
539
+ return _(Je, n.length > Ye ? n.slice(-300) : n), !1;
530
540
  }
531
541
  async function Q(e, { eventId: t = null, widgetId: n, venueId: r, error: i } = {}) {
532
- if (typeof window > "u" || z()) return;
533
- let a = F();
534
- if (ze(a), e === "link_click" && !j(a.utm)) return;
535
- let o = q(), s = n === void 0 ? Ee() : n;
536
- if (!We.has(e) && Ye(qe(e, t, s, a.utm.utmSource, a.utm.utmCampaign, o, a.pageUrl, i ? `${i.stage}:${i.errName}` : ""))) return;
537
- let c = r === void 0 ? De() : r, l = H(), u = {
542
+ if (typeof window > "u" || W()) return;
543
+ let a = B();
544
+ if (He(a), e === "link_click" && !I(a.utm)) return;
545
+ let o = Ie(), s = n === void 0 ? we() : n;
546
+ if (!qe.has(e) && Qe(Xe(e, t, s, a.utm.utmSource, a.utm.utmCampaign, o, a.pageUrl, i ? `${i.stage}:${i.errName}` : ""))) return;
547
+ let c = r === void 0 ? Te() : r, l = q(), u = {
538
548
  eventType: e,
539
- eventId: Je(t),
540
- venueId: Je(c),
549
+ eventId: Ze(t),
550
+ venueId: Ze(c),
541
551
  widgetId: s,
542
552
  utmSource: a.utm.utmSource,
543
553
  utmMedium: a.utm.utmMedium,
@@ -545,8 +555,8 @@ async function Q(e, { eventId: t = null, widgetId: n, venueId: r, error: i } = {
545
555
  utmContent: a.utm.utmContent,
546
556
  utmTerm: a.utm.utmTerm,
547
557
  sessionId: o,
548
- visitorId: J(),
549
- deviceType: ke(),
558
+ visitorId: X(),
559
+ deviceType: De(),
550
560
  referrer: l ? a.referrer : "",
551
561
  pageUrl: l ? a.pageUrl : "",
552
562
  ...i ? {
@@ -555,49 +565,49 @@ async function Q(e, { eventId: t = null, widgetId: n, venueId: r, error: i } = {
555
565
  } : {}
556
566
  };
557
567
  try {
558
- await fetch(`${C()}/track/pageview`, {
568
+ await fetch(`${D()}/track/pageview`, {
559
569
  method: "POST",
560
570
  headers: { "Content-Type": "application/json" },
561
571
  body: JSON.stringify(u),
562
572
  keepalive: !0
563
573
  });
564
574
  } catch (t) {
565
- Be.error(`Beacon '${e}' failed:`, t);
575
+ Ue.error(`Beacon '${e}' failed:`, t);
566
576
  }
567
577
  }
568
- var Xe = (e, t) => Q("link_click", {
578
+ var $e = (e, t) => Q("link_click", {
569
579
  widgetId: e,
570
580
  venueId: t
571
- }), Ze = (e, t) => Q("widget_load", {
581
+ }), et = (e, t) => Q("widget_load", {
572
582
  widgetId: e,
573
583
  venueId: t
574
- }), Qe = (e, t) => Q("list_view", {
584
+ }), tt = (e, t) => Q("list_view", {
575
585
  widgetId: e,
576
586
  venueId: t
577
- }), $e = (e, t, n) => Q("event_view", {
587
+ }), nt = (e, t, n) => Q("event_view", {
578
588
  eventId: e,
579
589
  widgetId: t,
580
590
  venueId: n
581
- }), et = (e, t, n) => Q("add_to_cart", {
591
+ }), rt = (e, t, n) => Q("add_to_cart", {
582
592
  eventId: e,
583
593
  widgetId: t,
584
594
  venueId: n
585
- }), tt = (e, t, n) => Q("checkout_started", {
595
+ }), it = (e, t, n) => Q("checkout_started", {
586
596
  eventId: e,
587
597
  widgetId: t,
588
598
  venueId: n
589
- }), nt = (e, t, n) => Q("purchase", {
599
+ }), at = (e, t, n) => Q("purchase", {
590
600
  eventId: e,
591
601
  widgetId: t,
592
602
  venueId: n
593
603
  });
594
- function rt(e, t, n, r) {
604
+ function ot(e, t, n, r) {
595
605
  try {
596
606
  Q("widget_error", {
597
607
  widgetId: n,
598
608
  venueId: r,
599
609
  error: {
600
- errName: Ue(e),
610
+ errName: Ke(e),
601
611
  stage: t
602
612
  }
603
613
  }).catch(() => {});
@@ -605,10 +615,10 @@ function rt(e, t, n, r) {
605
615
  }
606
616
  //#endregion
607
617
  //#region src/lib/api/orders.ts
608
- var $ = t("VC");
609
- async function it(e, t, n, r) {
618
+ var $ = i("VC");
619
+ async function st(e, t, n, r) {
610
620
  try {
611
- let i = await D(`${w()}/cart/${e}/payment-intent`, {
621
+ let i = await j(`${O()}/cart/${e}/payment-intent`, {
612
622
  productQuantities: t,
613
623
  ...n && Object.keys(n).length > 0 ? { donationAmounts: n } : {},
614
624
  ...r ? {
@@ -620,7 +630,7 @@ async function it(e, t, n, r) {
620
630
  attribution: Z()
621
631
  });
622
632
  if (!i.success) throw $.error("Payment intent creation failed:", i.error), new a(i.error || "Failed to create payment intent", i.statusCode ?? 0, {
623
- endpoint: `${w()}/cart/${e}/payment-intent`,
633
+ endpoint: `${O()}/cart/${e}/payment-intent`,
624
634
  method: "POST"
625
635
  });
626
636
  return $.debug("Payment intent created:", i.data), i.data;
@@ -628,7 +638,7 @@ async function it(e, t, n, r) {
628
638
  return $.error("createPaymentIntent error:", e), null;
629
639
  }
630
640
  }
631
- async function at(e, t, n) {
641
+ async function ct(e, t, n) {
632
642
  try {
633
643
  let r = {};
634
644
  for (let [e, n] of Object.entries(t)) {
@@ -640,7 +650,7 @@ async function at(e, t, n) {
640
650
  let n = typeof e == "number" ? e : parseInt(e, 10);
641
651
  !Number.isNaN(n) && t > 0 && (i[n] = t);
642
652
  }
643
- let a = await fetch(`${w()}/cart/${e}`, {
653
+ let a = await fetch(`${O()}/cart/${e}`, {
644
654
  method: "PUT",
645
655
  headers: { "Content-Type": "application/json" },
646
656
  body: JSON.stringify({
@@ -657,9 +667,9 @@ async function at(e, t, n) {
657
667
  return $.error("updateCartQuantities error:", e), !1;
658
668
  }
659
669
  }
660
- async function ot(e, t = "") {
670
+ async function lt(e, t = "") {
661
671
  try {
662
- let n = await D(`${C()}/orders/${e}/refund`, { message: t });
672
+ let n = await j(`${D()}/orders/${e}/refund`, { message: t });
663
673
  return n.success ? { success: !0 } : ($.error("Refund request failed:", n.error), {
664
674
  success: !1,
665
675
  error: n.error || "Failed to submit refund request"
@@ -671,9 +681,9 @@ async function ot(e, t = "") {
671
681
  };
672
682
  }
673
683
  }
674
- async function st(e, t) {
684
+ async function ut(e, t) {
675
685
  try {
676
- let n = await D(`${w()}/validatePaymentIntent/${e}`, {
686
+ let n = await j(`${O()}/validatePaymentIntent/${e}`, {
677
687
  ...t,
678
688
  attribution: Z()
679
689
  });
@@ -697,9 +707,9 @@ async function st(e, t) {
697
707
  return $.error("validatePaymentIntent error:", e), null;
698
708
  }
699
709
  }
700
- async function ct(e) {
710
+ async function dt(e) {
701
711
  try {
702
- let t = await D(`${C()}/orders/extend-session`, { orderUuid: e });
712
+ let t = await j(`${D()}/orders/extend-session`, { orderUuid: e });
703
713
  if (!t.success) return {
704
714
  success: !1,
705
715
  error: t.error || "Failed to extend session",
@@ -718,9 +728,9 @@ async function ct(e) {
718
728
  };
719
729
  }
720
730
  }
721
- async function lt(e) {
731
+ async function ft(e) {
722
732
  try {
723
- let t = await E(`${C()}/orders/session/${e}`);
733
+ let t = await A(`${D()}/orders/session/${e}`);
724
734
  if (!t.success) return {
725
735
  error: t.error || "No active session found",
726
736
  notFound: t.statusCode === 404
@@ -739,4 +749,4 @@ async function lt(e) {
739
749
  }
740
750
  }
741
751
  //#endregion
742
- export { w as A, ae as B, we as C, E as D, _e as E, se as F, p as G, m as H, _ as I, h as K, le as L, ye as M, ve as N, D as O, ue as P, oe as R, Te as S, A as T, ne as U, te as V, re as W, H as _, at as a, je as b, tt as c, Qe as d, nt as f, J as g, Z as h, ot as i, C as j, me as k, $e as l, Ze as m, ct as n, st as o, rt as p, a as q, lt as r, et as s, it as t, Xe as u, z as v, xe as w, Pe as x, Me as y, ce as z };
752
+ export { E as A, ie as B, Se as C, A as D, ge as E, _e as F, ee as G, re as H, ce as I, _ as J, te as K, ae as L, D as M, le as N, j as O, ve as P, y as R, Ce as S, F as T, m as U, oe as V, g as W, a as Y, q as _, ct as a, ke as b, it as c, tt as d, at as f, X as g, Z as h, lt as i, O as j, me as k, nt as l, et as m, dt as n, ut as o, ot as p, h as q, ft as r, rt as s, st as t, $e as u, W as v, P as w, Me as x, Ae as y, se as z };