@getmicdrop/venue-calendar 4.3.121 → 4.3.122
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -0
- package/dist/{AddOnCard-jj59e855.js → AddOnCard-BkEFPzAX.js} +2 -2
- package/dist/{CartView-CF2y1JDa.js → CartView-CQZw_kwm.js} +5 -5
- package/dist/{Checkout-2h2K3-bE.js → Checkout-Bsx9d4qD.js} +7 -7
- package/dist/{Checkout-BFu5dTw_.js → Checkout-CN1o3v9L.js} +5 -5
- package/dist/{CollectionView-XdNMvMtn.js → CollectionView-DXkBRGeQ.js} +4 -4
- package/dist/{Event-B_9T21du.js → Event-CmD84Ni8.js} +6 -6
- package/dist/{EventPage-BMnKpciU.js → EventPage-4ToDFEaL.js} +8 -8
- package/dist/{RecommendationsRail-DrzM8h2r.js → RecommendationsRail-CrBSsbBD.js} +2 -2
- package/dist/{ScarcityBadge-DjzrzvId.js → ScarcityBadge-BL4shc2w.js} +1 -1
- package/dist/{SeriesPage-Ds_FEEZW.js → SeriesPage-Dt-T6mco.js} +2 -2
- package/dist/{Success-Dkak0iM9.js → Success-BTm0jRAO.js} +8 -8
- package/dist/{ViewTicketsEmbed-B_fqalQh.js → ViewTicketsEmbed-BjqniKb9.js} +3 -3
- package/dist/{api-BEYkGabB.js → api-0hNBT78w.js} +1 -1
- package/dist/{defaults-CgsFJvJ2.js → defaults-CcPpWiyw.js} +1 -1
- package/dist/{event-transform-Bk1IoYh5.js → event-transform-DJYPMj8I.js} +1 -1
- package/dist/{eventStatusStream-CE0PwO0c.js → eventStatusStream-DXyc5Eng.js} +1 -1
- package/dist/{i18n-B705OXZp.js → i18n-CIpUYDU6.js} +1 -1
- package/dist/{i18n-BoMUWcCq.js → i18n-DyjdmQSR.js} +2 -2
- package/dist/{pixels-Bu5-BISs.js → pixels-CFwOgA2N.js} +1 -1
- package/dist/{utils-NMx3aPDk.js → utils-BzgFQSTg.js} +2 -2
- package/dist/venue-calendar.es.js +18 -18
- package/dist/venue-calendar.iife.js +22 -22
- package/dist/venue-calendar.umd.js +27 -27
- package/dist/{widget-key-context-D2zj4sp5.js → widget-key-context-CmI7Qdtf.js} +238 -235
- package/package.json +1 -1
- /package/dist/locales/{4.3.121 → 4.3.122}/flow/de.js +0 -0
- /package/dist/locales/{4.3.121 → 4.3.122}/flow/es.js +0 -0
- /package/dist/locales/{4.3.121 → 4.3.122}/flow/fr.js +0 -0
- /package/dist/locales/{4.3.121 → 4.3.122}/flow/id.js +0 -0
- /package/dist/locales/{4.3.121 → 4.3.122}/flow/it.js +0 -0
- /package/dist/locales/{4.3.121 → 4.3.122}/flow/ja.js +0 -0
- /package/dist/locales/{4.3.121 → 4.3.122}/flow/ko.js +0 -0
- /package/dist/locales/{4.3.121 → 4.3.122}/flow/nl.js +0 -0
- /package/dist/locales/{4.3.121 → 4.3.122}/flow/pl.js +0 -0
- /package/dist/locales/{4.3.121 → 4.3.122}/flow/pt-br.js +0 -0
- /package/dist/locales/{4.3.121 → 4.3.122}/flow/tr.js +0 -0
- /package/dist/locales/{4.3.121 → 4.3.122}/flow/zh.js +0 -0
- /package/dist/locales/{4.3.121 → 4.3.122}/main/de.js +0 -0
- /package/dist/locales/{4.3.121 → 4.3.122}/main/es.js +0 -0
- /package/dist/locales/{4.3.121 → 4.3.122}/main/fr.js +0 -0
- /package/dist/locales/{4.3.121 → 4.3.122}/main/id.js +0 -0
- /package/dist/locales/{4.3.121 → 4.3.122}/main/it.js +0 -0
- /package/dist/locales/{4.3.121 → 4.3.122}/main/ja.js +0 -0
- /package/dist/locales/{4.3.121 → 4.3.122}/main/ko.js +0 -0
- /package/dist/locales/{4.3.121 → 4.3.122}/main/nl.js +0 -0
- /package/dist/locales/{4.3.121 → 4.3.122}/main/pl.js +0 -0
- /package/dist/locales/{4.3.121 → 4.3.122}/main/pt-br.js +0 -0
- /package/dist/locales/{4.3.121 → 4.3.122}/main/tr.js +0 -0
- /package/dist/locales/{4.3.121 → 4.3.122}/main/zh.js +0 -0
|
@@ -43,7 +43,7 @@ function d(e) {
|
|
|
43
43
|
return null;
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
|
-
function
|
|
46
|
+
function f(e, t) {
|
|
47
47
|
if (e == null || e === "") return t;
|
|
48
48
|
try {
|
|
49
49
|
return JSON.parse(e);
|
|
@@ -51,7 +51,7 @@ function ee(e, t) {
|
|
|
51
51
|
return t;
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
-
function
|
|
54
|
+
function ee(e, t, n) {
|
|
55
55
|
if (!e) return n;
|
|
56
56
|
let r;
|
|
57
57
|
try {
|
|
@@ -59,9 +59,9 @@ function te(e, t, n) {
|
|
|
59
59
|
} catch {
|
|
60
60
|
return n;
|
|
61
61
|
}
|
|
62
|
-
return
|
|
62
|
+
return f(r, n);
|
|
63
63
|
}
|
|
64
|
-
function
|
|
64
|
+
function te(t, n, r) {
|
|
65
65
|
if (!t) return !1;
|
|
66
66
|
try {
|
|
67
67
|
return t.setItem(n, JSON.stringify(r)), !0;
|
|
@@ -69,37 +69,37 @@ function ne(t, n, r) {
|
|
|
69
69
|
return e.warn(`storage: failed to write "${n}"`, t), !1;
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
|
-
function
|
|
72
|
+
function ne(e, t) {
|
|
73
73
|
if (e) try {
|
|
74
74
|
e.removeItem(t);
|
|
75
75
|
} catch {}
|
|
76
76
|
}
|
|
77
|
-
function f(e, t, n) {
|
|
78
|
-
return te(d(e), t, n);
|
|
79
|
-
}
|
|
80
77
|
function p(e, t, n) {
|
|
81
|
-
return
|
|
78
|
+
return ee(d(e), t, n);
|
|
82
79
|
}
|
|
83
|
-
function
|
|
84
|
-
|
|
80
|
+
function re(e, t, n) {
|
|
81
|
+
return te(d(e), t, n);
|
|
85
82
|
}
|
|
86
|
-
function m(e, t
|
|
87
|
-
|
|
83
|
+
function m(e, t) {
|
|
84
|
+
ne(d(e), t);
|
|
88
85
|
}
|
|
89
|
-
function
|
|
86
|
+
function ie(e, t = null) {
|
|
90
87
|
return p("local", e, t);
|
|
91
88
|
}
|
|
89
|
+
function h(e, t) {
|
|
90
|
+
return re("local", e, t);
|
|
91
|
+
}
|
|
92
92
|
function ae(e) {
|
|
93
|
-
|
|
93
|
+
m("local", e);
|
|
94
94
|
}
|
|
95
95
|
function g(e, t = null) {
|
|
96
|
-
return
|
|
96
|
+
return p("session", e, t);
|
|
97
97
|
}
|
|
98
98
|
function _(e, t) {
|
|
99
|
-
return
|
|
99
|
+
return re("session", e, t);
|
|
100
100
|
}
|
|
101
101
|
function oe(e) {
|
|
102
|
-
|
|
102
|
+
m("session", e);
|
|
103
103
|
}
|
|
104
104
|
//#endregion
|
|
105
105
|
//#region src/lib/config.js
|
|
@@ -108,52 +108,52 @@ function ce(e) {
|
|
|
108
108
|
let t = e || null;
|
|
109
109
|
v && t && t !== v && se.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;
|
|
110
110
|
}
|
|
111
|
-
function
|
|
111
|
+
function y() {
|
|
112
112
|
if (v) return v;
|
|
113
113
|
}
|
|
114
|
-
var
|
|
115
|
-
function
|
|
116
|
-
|
|
114
|
+
var b = null;
|
|
115
|
+
function le(e) {
|
|
116
|
+
b = typeof e == "string" && e.trim() ? e.trim() : null;
|
|
117
117
|
}
|
|
118
|
-
function
|
|
119
|
-
return (
|
|
118
|
+
function ue() {
|
|
119
|
+
return (b || be().baseUrl || (typeof window > "u" ? "" : window.location.origin) || "").replace(/\/+$/, "");
|
|
120
120
|
}
|
|
121
|
-
function
|
|
122
|
-
var
|
|
121
|
+
function de(e) {}
|
|
122
|
+
var x = {
|
|
123
123
|
postMessageOnSuccess: !1,
|
|
124
124
|
postMessageTargetOrigin: null
|
|
125
125
|
};
|
|
126
|
-
function
|
|
127
|
-
|
|
128
|
-
...
|
|
126
|
+
function fe(e = {}) {
|
|
127
|
+
x = {
|
|
128
|
+
...x,
|
|
129
129
|
...e
|
|
130
130
|
};
|
|
131
131
|
}
|
|
132
|
-
function
|
|
133
|
-
return { ...
|
|
132
|
+
function pe() {
|
|
133
|
+
return { ...x };
|
|
134
134
|
}
|
|
135
135
|
//#endregion
|
|
136
136
|
//#region src/lib/api/client.ts
|
|
137
|
-
var
|
|
138
|
-
function
|
|
139
|
-
return
|
|
140
|
-
|
|
137
|
+
var S = t("VC"), C = /* @__PURE__ */ new Set();
|
|
138
|
+
function me(e) {
|
|
139
|
+
return C.add(e), () => {
|
|
140
|
+
C.delete(e);
|
|
141
141
|
};
|
|
142
142
|
}
|
|
143
|
-
function
|
|
144
|
-
if (e) for (let t of
|
|
143
|
+
function he(e) {
|
|
144
|
+
if (e) for (let t of C) try {
|
|
145
145
|
t(e);
|
|
146
146
|
} catch {}
|
|
147
147
|
}
|
|
148
|
-
var
|
|
149
|
-
function
|
|
150
|
-
let n = t ||
|
|
148
|
+
var ge = "ABORTED";
|
|
149
|
+
function w(e, t) {
|
|
150
|
+
let n = t || y();
|
|
151
151
|
return n ? {
|
|
152
152
|
...e,
|
|
153
153
|
"X-Widget-Key": n
|
|
154
154
|
} : e;
|
|
155
155
|
}
|
|
156
|
-
function
|
|
156
|
+
function _e(e, t) {
|
|
157
157
|
let n = `HTTP ${t}`;
|
|
158
158
|
if (!e || typeof e != "object") return { message: n };
|
|
159
159
|
let r = e, i = r.error && typeof r.error == "object" ? r.error : null, a = typeof r.code == "string" ? r.code : typeof i?.code == "string" ? i.code : void 0;
|
|
@@ -162,36 +162,36 @@ function ye(e, t) {
|
|
|
162
162
|
code: a
|
|
163
163
|
};
|
|
164
164
|
}
|
|
165
|
-
var
|
|
165
|
+
var ve = class extends Error {
|
|
166
166
|
code;
|
|
167
167
|
statusCode;
|
|
168
168
|
constructor(e, t, n) {
|
|
169
169
|
super(e), this.name = "ApiRequestError", this.code = t, this.statusCode = n;
|
|
170
170
|
}
|
|
171
|
-
},
|
|
171
|
+
}, T = {
|
|
172
172
|
baseUrl: "https://get-micdrop.com",
|
|
173
173
|
timeout: 3e4,
|
|
174
174
|
retries: 2,
|
|
175
175
|
retryDelay: 500,
|
|
176
|
-
onError: (e) =>
|
|
176
|
+
onError: (e) => S.error("API Error:", e)
|
|
177
177
|
};
|
|
178
|
-
function
|
|
179
|
-
|
|
180
|
-
...
|
|
178
|
+
function ye(e) {
|
|
179
|
+
T = {
|
|
180
|
+
...T,
|
|
181
181
|
...e
|
|
182
182
|
};
|
|
183
183
|
}
|
|
184
|
-
function
|
|
185
|
-
return { ...
|
|
186
|
-
}
|
|
187
|
-
function T() {
|
|
188
|
-
return `${C.baseUrl}/api/v2/public`;
|
|
184
|
+
function be() {
|
|
185
|
+
return { ...T };
|
|
189
186
|
}
|
|
190
187
|
function E() {
|
|
191
|
-
return `${
|
|
188
|
+
return `${T.baseUrl}/api/v2/public`;
|
|
189
|
+
}
|
|
190
|
+
function D() {
|
|
191
|
+
return `${T.baseUrl}/api/orders/v2/public`;
|
|
192
192
|
}
|
|
193
|
-
var
|
|
194
|
-
async function
|
|
193
|
+
var xe = (e) => new Promise((t) => setTimeout(t, e));
|
|
194
|
+
async function O(e, t, n) {
|
|
195
195
|
let r = (t.method || "GET").toUpperCase(), i = r === "GET" || r === "HEAD" ? n.retries + 1 : 1, a;
|
|
196
196
|
for (let r = 1; r <= i; r++) {
|
|
197
197
|
let o = new AbortController(), s = setTimeout(() => o.abort(), n.timeout), c = t.signal, l;
|
|
@@ -208,36 +208,36 @@ async function D(e, t, n) {
|
|
|
208
208
|
} finally {
|
|
209
209
|
clearTimeout(s), c && l && c.removeEventListener("abort", l);
|
|
210
210
|
}
|
|
211
|
-
r < i && await
|
|
211
|
+
r < i && await xe(n.retryDelay * 2 ** (r - 1));
|
|
212
212
|
}
|
|
213
213
|
throw a;
|
|
214
214
|
}
|
|
215
|
-
async function
|
|
216
|
-
return
|
|
215
|
+
async function k(e, t) {
|
|
216
|
+
return j("GET", e, void 0, t);
|
|
217
217
|
}
|
|
218
|
-
async function
|
|
219
|
-
return
|
|
218
|
+
async function A(e, t, n) {
|
|
219
|
+
return j("POST", e, t, n);
|
|
220
220
|
}
|
|
221
|
-
async function
|
|
222
|
-
return
|
|
221
|
+
async function Se(e, t) {
|
|
222
|
+
return j("DELETE", e, void 0, t);
|
|
223
223
|
}
|
|
224
|
-
async function
|
|
225
|
-
let i = t.startsWith("http") || t.startsWith("/api/") ? t : `${
|
|
226
|
-
o ||
|
|
224
|
+
async function j(e, t, n, r) {
|
|
225
|
+
let i = t.startsWith("http") || t.startsWith("/api/") ? t : `${E()}${t}`, { widgetKey: a, suppressOnError: o, headers: s, ...c } = r ?? {}, l = (e) => {
|
|
226
|
+
o || T.onError(e);
|
|
227
227
|
};
|
|
228
228
|
try {
|
|
229
|
-
let t = await
|
|
229
|
+
let t = await O(i, {
|
|
230
230
|
method: e,
|
|
231
|
-
headers:
|
|
231
|
+
headers: w({
|
|
232
232
|
"Content-Type": "application/json",
|
|
233
233
|
...s
|
|
234
234
|
}, a),
|
|
235
235
|
body: n === void 0 ? void 0 : JSON.stringify(n),
|
|
236
236
|
...c
|
|
237
|
-
},
|
|
237
|
+
}, T);
|
|
238
238
|
if (!t.ok) {
|
|
239
|
-
let { message: e, code: n } =
|
|
240
|
-
return l(new
|
|
239
|
+
let { message: e, code: n } = _e(await t.json().catch(() => ({})), t.status);
|
|
240
|
+
return l(new ve(e, n, t.status)), he(n), {
|
|
241
241
|
success: !1,
|
|
242
242
|
error: e,
|
|
243
243
|
errorCode: n,
|
|
@@ -253,7 +253,7 @@ async function A(e, t, n, r) {
|
|
|
253
253
|
if (r?.signal?.aborted) return {
|
|
254
254
|
success: !1,
|
|
255
255
|
error: "Request aborted",
|
|
256
|
-
errorCode:
|
|
256
|
+
errorCode: ge,
|
|
257
257
|
aborted: !0
|
|
258
258
|
};
|
|
259
259
|
let t = e instanceof Error ? e.name === "AbortError" ? "Request timed out" : e.message : "Unknown error";
|
|
@@ -263,31 +263,31 @@ async function A(e, t, n, r) {
|
|
|
263
263
|
};
|
|
264
264
|
}
|
|
265
265
|
}
|
|
266
|
-
async function
|
|
267
|
-
return
|
|
266
|
+
async function Ce(e, t) {
|
|
267
|
+
return A(`${E()}/tax-preview`, e, {
|
|
268
268
|
signal: t?.signal,
|
|
269
269
|
suppressOnError: t?.suppressOnError ?? !0,
|
|
270
270
|
widgetKey: t?.widgetKey
|
|
271
271
|
});
|
|
272
272
|
}
|
|
273
|
-
async function
|
|
273
|
+
async function we(e, t) {
|
|
274
274
|
try {
|
|
275
|
-
let n = e.startsWith(
|
|
275
|
+
let n = e.startsWith(T.baseUrl), { widgetKey: r, ...i } = t ?? {}, a = await O(e, {
|
|
276
276
|
...i,
|
|
277
|
-
...n ? { headers:
|
|
278
|
-
},
|
|
277
|
+
...n ? { headers: w(i.headers, r) } : {}
|
|
278
|
+
}, T);
|
|
279
279
|
if (!a.ok) {
|
|
280
280
|
let e = await a.json().catch(() => ({}));
|
|
281
|
-
return
|
|
281
|
+
return S.error(`API request failed: ${a.status}`, e), null;
|
|
282
282
|
}
|
|
283
283
|
return a.json();
|
|
284
284
|
} catch (e) {
|
|
285
|
-
return
|
|
285
|
+
return S.error("API request error:", e), null;
|
|
286
286
|
}
|
|
287
287
|
}
|
|
288
288
|
//#endregion
|
|
289
289
|
//#region src/lib/tracking/normalize.ts
|
|
290
|
-
var
|
|
290
|
+
var Te = [
|
|
291
291
|
"utmSource",
|
|
292
292
|
"utmMedium",
|
|
293
293
|
"utmCampaign",
|
|
@@ -299,43 +299,43 @@ var j = [
|
|
|
299
299
|
utmCampaign: "utm_campaign",
|
|
300
300
|
utmContent: "utm_content",
|
|
301
301
|
utmTerm: "utm_term"
|
|
302
|
-
},
|
|
303
|
-
function De(e) {
|
|
304
|
-
return e ? e.trim().toLowerCase().replace(/\s+/g, "_") : "";
|
|
305
|
-
}
|
|
302
|
+
}, De = "direct";
|
|
306
303
|
function Oe(e) {
|
|
307
|
-
|
|
308
|
-
for (let n of j) t[n] = De(e[n]);
|
|
309
|
-
return t.utmSource ||= M, t;
|
|
304
|
+
return e ? e.trim().toLowerCase().replace(/\s+/g, "_") : "";
|
|
310
305
|
}
|
|
311
306
|
function ke(e) {
|
|
312
307
|
let t = {};
|
|
313
|
-
for (let n of
|
|
314
|
-
return
|
|
308
|
+
for (let n of Te) t[n] = Oe(e[n]);
|
|
309
|
+
return t.utmSource ||= De, t;
|
|
315
310
|
}
|
|
316
311
|
function Ae(e) {
|
|
312
|
+
let t = {};
|
|
313
|
+
for (let n of Te) t[n] = e.get(Ee[n]);
|
|
314
|
+
return ke(t);
|
|
315
|
+
}
|
|
316
|
+
function je(e) {
|
|
317
317
|
return !!e.utmSource && e.utmSource !== "direct";
|
|
318
318
|
}
|
|
319
319
|
//#endregion
|
|
320
320
|
//#region src/lib/tracking/context.ts
|
|
321
|
-
var
|
|
321
|
+
var Me = null, Ne = null, M = {
|
|
322
322
|
search: null,
|
|
323
323
|
referrer: null,
|
|
324
324
|
pageUrl: null
|
|
325
325
|
};
|
|
326
|
-
function Ne(e) {
|
|
327
|
-
e.widgetId !== void 0 && (je = e.widgetId || null), e.venueId !== void 0 && (Me = e.venueId ?? null);
|
|
328
|
-
}
|
|
329
326
|
function Pe(e) {
|
|
330
|
-
e.
|
|
327
|
+
e.widgetId !== void 0 && (Me = e.widgetId || null), e.venueId !== void 0 && (Ne = e.venueId ?? null);
|
|
331
328
|
}
|
|
332
|
-
function Fe() {
|
|
333
|
-
|
|
329
|
+
function Fe(e) {
|
|
330
|
+
e.search !== void 0 && (M.search = e.search === null ? null : e.search instanceof URLSearchParams ? e.search.toString() : e.search), e.referrer !== void 0 && (M.referrer = e.referrer), e.pageUrl !== void 0 && (M.pageUrl = e.pageUrl);
|
|
334
331
|
}
|
|
335
332
|
function Ie() {
|
|
336
333
|
return Me;
|
|
337
334
|
}
|
|
338
335
|
function Le() {
|
|
336
|
+
return Ne;
|
|
337
|
+
}
|
|
338
|
+
function Re() {
|
|
339
339
|
if (typeof window > "u") return !0;
|
|
340
340
|
try {
|
|
341
341
|
return window.self === window.top;
|
|
@@ -343,60 +343,63 @@ function Le() {
|
|
|
343
343
|
return !1;
|
|
344
344
|
}
|
|
345
345
|
}
|
|
346
|
-
function
|
|
347
|
-
let e = typeof window < "u", t =
|
|
346
|
+
function N() {
|
|
347
|
+
let e = typeof window < "u", t = Re(), n = M.search ?? (e ? window.location.search : ""), r = M.referrer ?? (typeof document < "u" ? document.referrer : "") ?? "", i = M.pageUrl ?? (e && t ? window.location.href : "");
|
|
348
348
|
return {
|
|
349
|
-
utm:
|
|
349
|
+
utm: Ae(new URLSearchParams(n)),
|
|
350
350
|
referrer: r || "",
|
|
351
351
|
pageUrl: i || ""
|
|
352
352
|
};
|
|
353
353
|
}
|
|
354
|
-
function
|
|
354
|
+
function ze() {
|
|
355
355
|
if (typeof navigator > "u") return "desktop";
|
|
356
356
|
let e = navigator.userAgent.toLowerCase();
|
|
357
357
|
return /ipad|tablet|playbook|silk/.test(e) ? "tablet" : /mobile|iphone|ipod|android.*mobile|windows phone|blackberry/.test(e) ? "mobile" : /android/.test(e) ? "tablet" : "desktop";
|
|
358
358
|
}
|
|
359
359
|
//#endregion
|
|
360
360
|
//#region src/lib/tracking/consent.ts
|
|
361
|
-
var
|
|
362
|
-
function ze(e) {
|
|
363
|
-
F = e;
|
|
364
|
-
}
|
|
361
|
+
var P = null, F = !1, I = !1, L = !1;
|
|
365
362
|
function Be(e) {
|
|
366
|
-
|
|
363
|
+
P = e;
|
|
367
364
|
}
|
|
368
365
|
function Ve(e) {
|
|
369
|
-
|
|
366
|
+
F = e;
|
|
370
367
|
}
|
|
371
|
-
function
|
|
372
|
-
|
|
368
|
+
function He(e) {
|
|
369
|
+
L = e;
|
|
373
370
|
}
|
|
374
|
-
function
|
|
371
|
+
function R() {
|
|
372
|
+
return L;
|
|
373
|
+
}
|
|
374
|
+
function z() {
|
|
375
375
|
return typeof window < "u" && typeof window.__tcfapi == "function";
|
|
376
376
|
}
|
|
377
|
-
function
|
|
377
|
+
function B() {
|
|
378
378
|
return typeof navigator < "u" && navigator.globalPrivacyControl === !0;
|
|
379
379
|
}
|
|
380
|
-
function
|
|
381
|
-
return
|
|
380
|
+
function Ue() {
|
|
381
|
+
return L ? !0 : P === null ? z() || B() : P;
|
|
382
382
|
}
|
|
383
|
-
function
|
|
384
|
-
return
|
|
383
|
+
function V() {
|
|
384
|
+
return L ? !1 : !Ue() || F;
|
|
385
385
|
}
|
|
386
|
-
function
|
|
387
|
-
|
|
388
|
-
|
|
386
|
+
function We() {
|
|
387
|
+
return L ? !1 : F ? !0 : P === !1 && !B();
|
|
388
|
+
}
|
|
389
|
+
function Ge() {
|
|
390
|
+
if (I || !z()) return;
|
|
391
|
+
I = !0;
|
|
389
392
|
let e = window.__tcfapi;
|
|
390
393
|
try {
|
|
391
394
|
e("addEventListener", 2, (e, t) => {
|
|
392
395
|
if (!(!t || !e)) {
|
|
393
396
|
if (e.gdprApplies === !1) {
|
|
394
|
-
|
|
397
|
+
B() || (F = !0);
|
|
395
398
|
return;
|
|
396
399
|
}
|
|
397
400
|
if (e.eventStatus === "tcloaded" || e.eventStatus === "useractioncomplete") {
|
|
398
401
|
let t = e.purpose?.consents;
|
|
399
|
-
|
|
402
|
+
F = !!t && Object.values(t).some(Boolean);
|
|
400
403
|
}
|
|
401
404
|
}
|
|
402
405
|
});
|
|
@@ -404,11 +407,11 @@ function Ue() {
|
|
|
404
407
|
}
|
|
405
408
|
//#endregion
|
|
406
409
|
//#region src/lib/tracking/identity.ts
|
|
407
|
-
var
|
|
408
|
-
function
|
|
409
|
-
return typeof e == "string" &&
|
|
410
|
+
var H = "micdrop_session_id", U = "micdrop_visitor_id", Ke = /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
|
|
411
|
+
function W(e) {
|
|
412
|
+
return typeof e == "string" && Ke.test(e);
|
|
410
413
|
}
|
|
411
|
-
function
|
|
414
|
+
function G() {
|
|
412
415
|
let e = typeof crypto < "u" ? crypto : void 0;
|
|
413
416
|
if (e?.randomUUID) return e.randomUUID();
|
|
414
417
|
let t = /* @__PURE__ */ new Uint8Array(16);
|
|
@@ -419,20 +422,20 @@ function K() {
|
|
|
419
422
|
for (let e = 0; e < 16; e++) n.push(t[e].toString(16).padStart(2, "0"));
|
|
420
423
|
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]}`;
|
|
421
424
|
}
|
|
422
|
-
function
|
|
423
|
-
let e = g(
|
|
424
|
-
return e || (e =
|
|
425
|
+
function qe() {
|
|
426
|
+
let e = g(H);
|
|
427
|
+
return e || (e = G(), _(H, e)), e;
|
|
425
428
|
}
|
|
426
|
-
function
|
|
427
|
-
let t =
|
|
428
|
-
if (
|
|
429
|
+
function Je(e) {
|
|
430
|
+
let t = ie(U);
|
|
431
|
+
if (W(t)) return {
|
|
429
432
|
id: t,
|
|
430
433
|
createdAt: e,
|
|
431
434
|
migrated: !0
|
|
432
435
|
};
|
|
433
436
|
if (t && typeof t == "object") {
|
|
434
437
|
let { id: n, createdAt: r } = t;
|
|
435
|
-
if (!
|
|
438
|
+
if (!W(n)) return null;
|
|
436
439
|
let i = typeof r == "number" && Number.isFinite(r), a = i ? Math.min(r, e) : e;
|
|
437
440
|
return {
|
|
438
441
|
id: n,
|
|
@@ -442,23 +445,23 @@ function Ke(e) {
|
|
|
442
445
|
}
|
|
443
446
|
return null;
|
|
444
447
|
}
|
|
445
|
-
function
|
|
446
|
-
if (!
|
|
447
|
-
let e = Date.now(), t =
|
|
448
|
-
if (t && e - t.createdAt < 34128e6) return t.migrated && h(
|
|
448
|
+
function K() {
|
|
449
|
+
if (!V()) return null;
|
|
450
|
+
let e = Date.now(), t = Je(e);
|
|
451
|
+
if (t && e - t.createdAt < 34128e6) return t.migrated && h(U, {
|
|
449
452
|
id: t.id,
|
|
450
453
|
createdAt: t.createdAt
|
|
451
454
|
}), t.id;
|
|
452
|
-
let n =
|
|
453
|
-
return h(
|
|
455
|
+
let n = G();
|
|
456
|
+
return h(U, {
|
|
454
457
|
id: n,
|
|
455
458
|
createdAt: e
|
|
456
459
|
}), n;
|
|
457
460
|
}
|
|
458
461
|
//#endregion
|
|
459
462
|
//#region src/lib/tracking/attribution-store.ts
|
|
460
|
-
var
|
|
461
|
-
function
|
|
463
|
+
var Ye = "micdrop_attribution";
|
|
464
|
+
function Xe(e, t) {
|
|
462
465
|
if (!e || !t) return !1;
|
|
463
466
|
try {
|
|
464
467
|
let n = new URL(e).host, r = new URL(t).host;
|
|
@@ -467,26 +470,26 @@ function Je(e, t) {
|
|
|
467
470
|
return !1;
|
|
468
471
|
}
|
|
469
472
|
}
|
|
470
|
-
function
|
|
471
|
-
return
|
|
473
|
+
function Ze(e) {
|
|
474
|
+
return je(e.utm) || Xe(e.referrer, e.pageUrl);
|
|
472
475
|
}
|
|
473
|
-
function
|
|
474
|
-
let e = g(
|
|
476
|
+
function Qe() {
|
|
477
|
+
let e = g(Ye);
|
|
475
478
|
return !e || !e.utm || typeof e.utm.utmSource != "string" ? null : e;
|
|
476
479
|
}
|
|
477
|
-
function
|
|
478
|
-
let t =
|
|
479
|
-
!t && n || _(
|
|
480
|
+
function $e(e = N()) {
|
|
481
|
+
let t = Ze(e), n = Qe();
|
|
482
|
+
!t && n || _(Ye, {
|
|
480
483
|
utm: e.utm,
|
|
481
484
|
referrer: e.referrer,
|
|
482
485
|
marketing: t
|
|
483
486
|
});
|
|
484
487
|
}
|
|
485
|
-
function
|
|
486
|
-
let e =
|
|
488
|
+
function q() {
|
|
489
|
+
let e = Qe() ?? N();
|
|
487
490
|
return {
|
|
488
|
-
sessionId:
|
|
489
|
-
visitorId:
|
|
491
|
+
sessionId: qe(),
|
|
492
|
+
visitorId: K(),
|
|
490
493
|
utmSource: e.utm.utmSource,
|
|
491
494
|
utmMedium: e.utm.utmMedium,
|
|
492
495
|
utmCampaign: e.utm.utmCampaign,
|
|
@@ -497,7 +500,7 @@ function J() {
|
|
|
497
500
|
}
|
|
498
501
|
//#endregion
|
|
499
502
|
//#region src/lib/tracking/beacon.ts
|
|
500
|
-
var
|
|
503
|
+
var et = t("tracking"), tt = /* @__PURE__ */ new Set([
|
|
501
504
|
"chunk_load_error",
|
|
502
505
|
"type_error",
|
|
503
506
|
"reference_error",
|
|
@@ -508,19 +511,19 @@ var Qe = t("tracking"), $e = /* @__PURE__ */ new Set([
|
|
|
508
511
|
"abort_error",
|
|
509
512
|
"not_supported_error",
|
|
510
513
|
"error"
|
|
511
|
-
]),
|
|
512
|
-
function
|
|
514
|
+
]), nt = "other";
|
|
515
|
+
function rt(e) {
|
|
513
516
|
try {
|
|
514
517
|
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 ?? "") : "";
|
|
515
518
|
if (t === "ChunkLoadError" || /dynamically imported module/i.test(n)) return "chunk_load_error";
|
|
516
519
|
let r = t.replace(/([a-z0-9])([A-Z])/g, "$1_$2").toLowerCase().replace(/[^a-z0-9_]/g, "");
|
|
517
|
-
return
|
|
520
|
+
return tt.has(r) ? r : nt;
|
|
518
521
|
} catch {
|
|
519
|
-
return
|
|
522
|
+
return nt;
|
|
520
523
|
}
|
|
521
524
|
}
|
|
522
|
-
var
|
|
523
|
-
function
|
|
525
|
+
var it = /* @__PURE__ */ new Set(["add_to_cart", "purchase"]), at = "micdrop_tracked_beacons", ot = 300;
|
|
526
|
+
function st(e, t, n, r, i, a, o, s = "") {
|
|
524
527
|
let c = n || `url:${o}`, l = [
|
|
525
528
|
e,
|
|
526
529
|
t ?? "",
|
|
@@ -531,27 +534,27 @@ function at(e, t, n, r, i, a, o, s = "") {
|
|
|
531
534
|
];
|
|
532
535
|
return s && l.push(s), l.join(":");
|
|
533
536
|
}
|
|
534
|
-
function
|
|
537
|
+
function ct(e) {
|
|
535
538
|
if (e == null || e === "") return null;
|
|
536
539
|
let t = Number(e);
|
|
537
540
|
return Number.isFinite(t) ? t : null;
|
|
538
541
|
}
|
|
539
|
-
function
|
|
540
|
-
let t = g(
|
|
542
|
+
function lt(e) {
|
|
543
|
+
let t = g(at, []) ?? [];
|
|
541
544
|
if (t.includes(e)) return !0;
|
|
542
545
|
let n = [...t, e];
|
|
543
|
-
return _(
|
|
544
|
-
}
|
|
545
|
-
async function
|
|
546
|
-
if (typeof window > "u" ||
|
|
547
|
-
let o =
|
|
548
|
-
if (
|
|
549
|
-
let s =
|
|
550
|
-
if (!(
|
|
551
|
-
let l = r === void 0 ?
|
|
546
|
+
return _(at, n.length > ot ? n.slice(-300) : n), !1;
|
|
547
|
+
}
|
|
548
|
+
async function J(e, { eventId: t = null, widgetId: n, venueId: r, error: i, cartId: a } = {}) {
|
|
549
|
+
if (typeof window > "u" || R()) return;
|
|
550
|
+
let o = N();
|
|
551
|
+
if ($e(o), e === "link_click" && !je(o.utm)) return;
|
|
552
|
+
let s = qe(), c = n === void 0 ? Ie() : n;
|
|
553
|
+
if (!(it.has(e) || e === "checkout_started" && !a) && lt(st(e, t, c, o.utm.utmSource, o.utm.utmCampaign, s, o.pageUrl, i ? `${i.stage}:${i.errName}` : a ? `cart:${a}` : ""))) return;
|
|
554
|
+
let l = r === void 0 ? Le() : r, u = V(), d = {
|
|
552
555
|
eventType: e,
|
|
553
|
-
eventId:
|
|
554
|
-
venueId:
|
|
556
|
+
eventId: ct(t),
|
|
557
|
+
venueId: ct(l),
|
|
555
558
|
widgetId: c,
|
|
556
559
|
utmSource: o.utm.utmSource,
|
|
557
560
|
utmMedium: o.utm.utmMedium,
|
|
@@ -559,8 +562,8 @@ async function Y(e, { eventId: t = null, widgetId: n, venueId: r, error: i, cart
|
|
|
559
562
|
utmContent: o.utm.utmContent,
|
|
560
563
|
utmTerm: o.utm.utmTerm,
|
|
561
564
|
sessionId: s,
|
|
562
|
-
visitorId:
|
|
563
|
-
deviceType:
|
|
565
|
+
visitorId: K(),
|
|
566
|
+
deviceType: ze(),
|
|
564
567
|
referrer: u ? o.referrer : "",
|
|
565
568
|
pageUrl: u ? o.pageUrl : "",
|
|
566
569
|
...i ? {
|
|
@@ -569,54 +572,54 @@ async function Y(e, { eventId: t = null, widgetId: n, venueId: r, error: i, cart
|
|
|
569
572
|
} : {}
|
|
570
573
|
};
|
|
571
574
|
try {
|
|
572
|
-
await fetch(`${
|
|
575
|
+
await fetch(`${E()}/track/pageview`, {
|
|
573
576
|
method: "POST",
|
|
574
577
|
headers: { "Content-Type": "application/json" },
|
|
575
578
|
body: JSON.stringify(d),
|
|
576
579
|
keepalive: !0
|
|
577
580
|
});
|
|
578
581
|
} catch (t) {
|
|
579
|
-
|
|
582
|
+
et.error(`Beacon '${e}' failed:`, t);
|
|
580
583
|
}
|
|
581
584
|
}
|
|
582
|
-
var
|
|
585
|
+
var ut = (e, t) => J("link_click", {
|
|
583
586
|
widgetId: e,
|
|
584
587
|
venueId: t
|
|
585
|
-
}),
|
|
588
|
+
}), dt = (e, t) => J("widget_load", {
|
|
586
589
|
widgetId: e,
|
|
587
590
|
venueId: t
|
|
588
|
-
}),
|
|
591
|
+
}), ft = (e, t) => J("list_view", {
|
|
589
592
|
widgetId: e,
|
|
590
593
|
venueId: t
|
|
591
|
-
}),
|
|
594
|
+
}), pt = (e, t, n) => J("event_view", {
|
|
592
595
|
eventId: e,
|
|
593
596
|
widgetId: t,
|
|
594
597
|
venueId: n
|
|
595
|
-
}),
|
|
598
|
+
}), mt = (e, t, n) => J("add_to_cart", {
|
|
596
599
|
eventId: e,
|
|
597
600
|
widgetId: t,
|
|
598
601
|
venueId: n
|
|
599
|
-
}),
|
|
602
|
+
}), ht = (e, t, n, r) => J("checkout_started", {
|
|
600
603
|
eventId: e,
|
|
601
604
|
widgetId: t,
|
|
602
605
|
venueId: n,
|
|
603
606
|
cartId: r
|
|
604
|
-
}),
|
|
607
|
+
}), gt = (e, t, n) => J("price_unavailable", {
|
|
605
608
|
eventId: e,
|
|
606
609
|
widgetId: t,
|
|
607
610
|
venueId: n
|
|
608
|
-
}),
|
|
611
|
+
}), _t = (e, t, n) => J("purchase", {
|
|
609
612
|
eventId: e,
|
|
610
613
|
widgetId: t,
|
|
611
614
|
venueId: n
|
|
612
615
|
});
|
|
613
|
-
function
|
|
616
|
+
function vt(e, t, n, r) {
|
|
614
617
|
try {
|
|
615
|
-
|
|
618
|
+
J("widget_error", {
|
|
616
619
|
widgetId: n,
|
|
617
620
|
venueId: r,
|
|
618
621
|
error: {
|
|
619
|
-
errName:
|
|
622
|
+
errName: rt(e),
|
|
620
623
|
stage: t
|
|
621
624
|
}
|
|
622
625
|
}).catch(() => {});
|
|
@@ -624,7 +627,7 @@ function gt(e, t, n, r) {
|
|
|
624
627
|
}
|
|
625
628
|
//#endregion
|
|
626
629
|
//#region src/lib/api/transformers/cart.ts
|
|
627
|
-
function
|
|
630
|
+
function yt(e) {
|
|
628
631
|
let t = e ?? {};
|
|
629
632
|
return {
|
|
630
633
|
ticketID: Number(t.TicketID ?? t.ticketID ?? 0),
|
|
@@ -633,7 +636,7 @@ function _t(e) {
|
|
|
633
636
|
status: String(t.Status ?? t.status ?? "")
|
|
634
637
|
};
|
|
635
638
|
}
|
|
636
|
-
function
|
|
639
|
+
function bt(e) {
|
|
637
640
|
let t = e ?? {}, n = t.Amount ?? t.amount, a = Number(n);
|
|
638
641
|
return {
|
|
639
642
|
giftCardId: Number(t.GiftCardID ?? t.giftCardId ?? 0),
|
|
@@ -641,32 +644,32 @@ function vt(e) {
|
|
|
641
644
|
amount: n == null || !Number.isFinite(a) ? null : r(i(a))
|
|
642
645
|
};
|
|
643
646
|
}
|
|
644
|
-
function
|
|
647
|
+
function xt(e) {
|
|
645
648
|
let t = e ?? {};
|
|
646
649
|
return {
|
|
647
650
|
uuid: t.UUID ?? t.uuid ?? "",
|
|
648
651
|
eventID: Number(t.EventID ?? t.eventID ?? 0),
|
|
649
652
|
status: t.Status ?? t.status ?? "",
|
|
650
653
|
expiresAt: t.ExpiresAt ?? t.expiresAt ?? "",
|
|
651
|
-
reservations: (t.Reservations ?? t.reservations ?? []).map(
|
|
652
|
-
giftCards: (t.GiftCards ?? t.giftCards ?? []).map(
|
|
654
|
+
reservations: (t.Reservations ?? t.reservations ?? []).map(yt),
|
|
655
|
+
giftCards: (t.GiftCards ?? t.giftCards ?? []).map(bt)
|
|
653
656
|
};
|
|
654
657
|
}
|
|
655
658
|
//#endregion
|
|
656
659
|
//#region src/lib/i18n/localeLoader.svelte.js
|
|
657
|
-
var
|
|
658
|
-
function
|
|
659
|
-
return c.get(
|
|
660
|
+
var Y = c.state(0);
|
|
661
|
+
function St() {
|
|
662
|
+
return c.get(Y);
|
|
660
663
|
}
|
|
661
|
-
function
|
|
662
|
-
c.set(
|
|
664
|
+
function Ct() {
|
|
665
|
+
c.set(Y, c.get(Y) + 1);
|
|
663
666
|
}
|
|
664
667
|
//#endregion
|
|
665
668
|
//#region src/lib/i18n/createI18n.js
|
|
666
|
-
function
|
|
669
|
+
function X() {
|
|
667
670
|
return typeof navigator > "u" ? null : navigator.language || navigator.userLanguage || null;
|
|
668
671
|
}
|
|
669
|
-
function
|
|
672
|
+
function wt({ defaults: e, locales: t = {}, loaders: r = {} }) {
|
|
670
673
|
let i = t.en ?? e, a = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map();
|
|
671
674
|
function s(e) {
|
|
672
675
|
return t[e] ? t[e] : a.has(e) ? a.get(e) : null;
|
|
@@ -677,11 +680,11 @@ function St({ defaults: e, locales: t = {}, loaders: r = {} }) {
|
|
|
677
680
|
if (o.has(e)) return o.get(e);
|
|
678
681
|
let n = r[e];
|
|
679
682
|
if (!n) return Promise.resolve(null);
|
|
680
|
-
let i = Promise.resolve().then(n).then((t) => (a.set(e, t),
|
|
683
|
+
let i = Promise.resolve().then(n).then((t) => (a.set(e, t), Ct(), t));
|
|
681
684
|
return i.catch(() => o.delete(e)), o.set(e, i), i;
|
|
682
685
|
}
|
|
683
686
|
function l(e) {
|
|
684
|
-
if (
|
|
687
|
+
if (St(), !e || typeof e != "string") return {
|
|
685
688
|
labels: i,
|
|
686
689
|
locale: "en"
|
|
687
690
|
};
|
|
@@ -704,7 +707,7 @@ function St({ defaults: e, locales: t = {}, loaders: r = {} }) {
|
|
|
704
707
|
});
|
|
705
708
|
}
|
|
706
709
|
function u(t = void 0, r = {}) {
|
|
707
|
-
let { labels: i } = l(t ||
|
|
710
|
+
let { labels: i } = l(t || X() || "en");
|
|
708
711
|
return n(n(e, i), r);
|
|
709
712
|
}
|
|
710
713
|
function d(e) {
|
|
@@ -714,19 +717,19 @@ function St({ defaults: e, locales: t = {}, loaders: r = {} }) {
|
|
|
714
717
|
let n = t.split("-")[0];
|
|
715
718
|
return s(n) || r[n] ? c(n) : Promise.resolve(null);
|
|
716
719
|
}
|
|
717
|
-
function
|
|
720
|
+
function f() {
|
|
718
721
|
return Array.from(/* @__PURE__ */ new Set([...Object.keys(t), ...Object.keys(r)]));
|
|
719
722
|
}
|
|
720
723
|
return {
|
|
721
724
|
resolveLocale: l,
|
|
722
725
|
getLabelsForLocale: u,
|
|
723
|
-
listLocales:
|
|
726
|
+
listLocales: f,
|
|
724
727
|
loadLocale: d
|
|
725
728
|
};
|
|
726
729
|
}
|
|
727
730
|
//#endregion
|
|
728
731
|
//#region src/lib/i18n/localeSpec.js
|
|
729
|
-
var
|
|
732
|
+
var Z = [
|
|
730
733
|
[
|
|
731
734
|
"es",
|
|
732
735
|
"es",
|
|
@@ -793,22 +796,22 @@ var Ct = [
|
|
|
793
796
|
"pl"
|
|
794
797
|
]
|
|
795
798
|
];
|
|
796
|
-
Array.from(new Set(
|
|
799
|
+
Array.from(new Set(Z.map(([, e]) => e)));
|
|
797
800
|
//#endregion
|
|
798
801
|
//#region src/lib/i18n/buyerLocale.ts
|
|
799
|
-
var
|
|
802
|
+
var Tt = new Map([["en", "en"], ...Z.map(([e]) => [e, e === "pt" || e === "pt-br" ? "pt-BR" : e])]);
|
|
800
803
|
function Q(e) {
|
|
801
|
-
let t = e ||
|
|
804
|
+
let t = e || X();
|
|
802
805
|
if (!t || typeof t != "string") return;
|
|
803
806
|
let n = t.toLowerCase();
|
|
804
|
-
return
|
|
807
|
+
return Tt.get(n) ?? Tt.get(n.split("-")[0]);
|
|
805
808
|
}
|
|
806
809
|
//#endregion
|
|
807
810
|
//#region src/lib/api/orders.ts
|
|
808
811
|
var $ = t("VC");
|
|
809
|
-
async function
|
|
812
|
+
async function Et(e, t, n, r, i, a) {
|
|
810
813
|
let o = Q(i);
|
|
811
|
-
return
|
|
814
|
+
return A(`${D()}/cart/${e}/payment-intent`, {
|
|
812
815
|
productQuantities: t,
|
|
813
816
|
...n && Object.keys(n).length > 0 ? { donationAmounts: n } : {},
|
|
814
817
|
...r ? {
|
|
@@ -819,15 +822,15 @@ async function Tt(e, t, n, r, i, a) {
|
|
|
819
822
|
questionAnswer: r.questionAnswer ?? "",
|
|
820
823
|
mailingList: r.mailingList ?? !1
|
|
821
824
|
} : {},
|
|
822
|
-
attribution:
|
|
825
|
+
attribution: q(),
|
|
823
826
|
...o ? { locale: o } : {}
|
|
824
827
|
}, { widgetKey: a?.widgetKey });
|
|
825
828
|
}
|
|
826
|
-
async function
|
|
829
|
+
async function Dt(e, t, n, r, i, a) {
|
|
827
830
|
try {
|
|
828
|
-
let o = await
|
|
831
|
+
let o = await Et(e, t, n, r, i, a);
|
|
829
832
|
if (!o.success) throw $.error("Payment intent creation failed:", o.error), new u(o.error || "Failed to create payment intent", o.statusCode ?? 0, {
|
|
830
|
-
endpoint: `${
|
|
833
|
+
endpoint: `${D()}/cart/${e}/payment-intent`,
|
|
831
834
|
method: "POST"
|
|
832
835
|
});
|
|
833
836
|
return $.debug("Payment intent created:", o.data), o.data;
|
|
@@ -835,25 +838,25 @@ async function Et(e, t, n, r, i, a) {
|
|
|
835
838
|
return $.error("createPaymentIntent error:", e), null;
|
|
836
839
|
}
|
|
837
840
|
}
|
|
838
|
-
var
|
|
839
|
-
async function
|
|
841
|
+
var Ot = "VALIDATION_FAILED";
|
|
842
|
+
async function kt(e, t, n, r, i, a) {
|
|
840
843
|
let o;
|
|
841
844
|
try {
|
|
842
|
-
o = await
|
|
845
|
+
o = await Et(e, t, n, r, i, a);
|
|
843
846
|
} catch (e) {
|
|
844
847
|
return $.error("submitCheckoutAnswers error:", e), { refusal: null };
|
|
845
848
|
}
|
|
846
849
|
return o.success ? {
|
|
847
850
|
refusal: null,
|
|
848
851
|
clientSecret: o.data?.client_secret
|
|
849
|
-
} : o.errorCode ===
|
|
852
|
+
} : o.errorCode === Ot && o.error ? ($.debug("Checkout answers refused:", o.error), { refusal: o.error }) : ($.error("Checkout answers call failed:", o.error), { refusal: null });
|
|
850
853
|
}
|
|
851
|
-
async function
|
|
854
|
+
async function At(e, t, n) {
|
|
852
855
|
if (!e) return null;
|
|
853
856
|
try {
|
|
854
|
-
let r = await
|
|
857
|
+
let r = await k(`${D()}/cart/${e}`, { widgetKey: n?.widgetKey });
|
|
855
858
|
if (!r.success) return null;
|
|
856
|
-
let { uuid: i, eventID: a, status: o, expiresAt: s, reservations: c, giftCards: l } =
|
|
859
|
+
let { uuid: i, eventID: a, status: o, expiresAt: s, reservations: c, giftCards: l } = xt(r.data);
|
|
857
860
|
return o !== "reserved" && o !== "active" || t !== void 0 && a !== Number(t) ? null : {
|
|
858
861
|
uuid: i,
|
|
859
862
|
eventID: a,
|
|
@@ -866,7 +869,7 @@ async function kt(e, t, n) {
|
|
|
866
869
|
return $.error("getCartByUUID error:", e), null;
|
|
867
870
|
}
|
|
868
871
|
}
|
|
869
|
-
async function
|
|
872
|
+
async function jt(e, t, n) {
|
|
870
873
|
try {
|
|
871
874
|
let r = {};
|
|
872
875
|
for (let [e, n] of Object.entries(t)) {
|
|
@@ -878,7 +881,7 @@ async function At(e, t, n) {
|
|
|
878
881
|
let n = typeof e == "number" ? e : parseInt(e, 10);
|
|
879
882
|
!Number.isNaN(n) && t > 0 && (i[n] = t);
|
|
880
883
|
}
|
|
881
|
-
let a = await fetch(`${
|
|
884
|
+
let a = await fetch(`${D()}/cart/${e}`, {
|
|
882
885
|
method: "PUT",
|
|
883
886
|
headers: { "Content-Type": "application/json" },
|
|
884
887
|
body: JSON.stringify({
|
|
@@ -895,9 +898,9 @@ async function At(e, t, n) {
|
|
|
895
898
|
return $.error("updateCartQuantities error:", e), !1;
|
|
896
899
|
}
|
|
897
900
|
}
|
|
898
|
-
async function
|
|
901
|
+
async function Mt(e, t = "", n) {
|
|
899
902
|
try {
|
|
900
|
-
let r = await
|
|
903
|
+
let r = await A(`${E()}/orders/${e}/refund`, { message: t }, { widgetKey: n?.widgetKey });
|
|
901
904
|
return r.success ? { success: !0 } : ($.error("Refund request failed:", r.error), {
|
|
902
905
|
success: !1,
|
|
903
906
|
error: r.error || "Failed to submit refund request"
|
|
@@ -909,12 +912,12 @@ async function jt(e, t = "", n) {
|
|
|
909
912
|
};
|
|
910
913
|
}
|
|
911
914
|
}
|
|
912
|
-
async function
|
|
915
|
+
async function Nt(e, t, n, r) {
|
|
913
916
|
let i = Q(n);
|
|
914
917
|
try {
|
|
915
|
-
let n = await
|
|
918
|
+
let n = await A(`${D()}/validatePaymentIntent/${e}`, {
|
|
916
919
|
...t,
|
|
917
|
-
attribution:
|
|
920
|
+
attribution: q(),
|
|
918
921
|
...i ? { locale: i } : {}
|
|
919
922
|
}, { widgetKey: r?.widgetKey });
|
|
920
923
|
if (!n.success) return $.error("Payment validation failed:", n.error), {
|
|
@@ -937,9 +940,9 @@ async function Mt(e, t, n, r) {
|
|
|
937
940
|
return $.error("validatePaymentIntent error:", e), null;
|
|
938
941
|
}
|
|
939
942
|
}
|
|
940
|
-
async function
|
|
943
|
+
async function Pt(e, t) {
|
|
941
944
|
try {
|
|
942
|
-
let n = await
|
|
945
|
+
let n = await A(`${E()}/orders/extend-session`, { orderUuid: e }, { widgetKey: t?.widgetKey });
|
|
943
946
|
if (!n.success) return {
|
|
944
947
|
success: !1,
|
|
945
948
|
error: n.error || "Failed to extend session",
|
|
@@ -958,9 +961,9 @@ async function Nt(e, t) {
|
|
|
958
961
|
};
|
|
959
962
|
}
|
|
960
963
|
}
|
|
961
|
-
async function
|
|
964
|
+
async function Ft(e, t) {
|
|
962
965
|
try {
|
|
963
|
-
let n = await
|
|
966
|
+
let n = await k(`${E()}/orders/session/${e}`, { widgetKey: t?.widgetKey });
|
|
964
967
|
if (!n.success) return {
|
|
965
968
|
error: n.error || "No active session found",
|
|
966
969
|
notFound: n.statusCode === 404
|
|
@@ -980,9 +983,9 @@ async function Pt(e, t) {
|
|
|
980
983
|
}
|
|
981
984
|
//#endregion
|
|
982
985
|
//#region src/lib/widget-key-context.ts
|
|
983
|
-
var
|
|
984
|
-
function
|
|
985
|
-
return l(
|
|
986
|
+
var It = Symbol("micdrop-widget-key");
|
|
987
|
+
function Lt() {
|
|
988
|
+
return l(It) || void 0;
|
|
986
989
|
}
|
|
987
990
|
//#endregion
|
|
988
|
-
export {
|
|
991
|
+
export { ie as $, Ge as A, D as B, q as C, Ve as D, R as E, Se as F, w as G, me as H, k as I, y as J, pe as K, A as L, Pe as M, De as N, Be as O, Oe as P, ce as Q, ye as R, dt as S, We as T, we as U, E as V, Ce as W, le as X, fe as Y, de as Z, ut as _, At as a, u as at, _t as b, kt as c, Q as d, g as et, wt as f, pt as g, ht as h, Pt as i, _ as it, Fe as j, He as k, jt as l, mt as m, Lt as n, oe as nt, Ft as o, X as p, ue as q, Dt as r, h as rt, Mt as s, It as t, ae as tt, Nt as u, ft as v, K as w, vt as x, gt as y, be as z };
|