@getmicdrop/venue-calendar 4.0.91 → 4.0.93
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/CartView-R5Z2q4Hy.js +2380 -0
- package/dist/CartView-R5Z2q4Hy.js.map +1 -0
- package/dist/Checkout-BUwdMMjA.js +1040 -0
- package/dist/Checkout-BUwdMMjA.js.map +1 -0
- package/dist/Checkout-avoTg_Zw.js +1742 -0
- package/dist/Checkout-avoTg_Zw.js.map +1 -0
- package/dist/{CheckoutTimer-seT9skG1.js → CheckoutTimer-C_ax1Uo2.js} +35 -35
- package/dist/CheckoutTimer-C_ax1Uo2.js.map +1 -0
- package/dist/ClockIcon-C5muTIYL.js +32 -0
- package/dist/ClockIcon-C5muTIYL.js.map +1 -0
- package/dist/CollectionView-3MHrh5Zm.js +299 -0
- package/dist/CollectionView-3MHrh5Zm.js.map +1 -0
- package/dist/{Event-wKLQzQod.js → Event-vR1aE543.js} +1593 -1509
- package/dist/Event-vR1aE543.js.map +1 -0
- package/dist/EventPage-Bhg-8-5x.js +566 -0
- package/dist/EventPage-Bhg-8-5x.js.map +1 -0
- package/dist/{Heading-C1g2tMwa.js → Heading-ZcvybCi8.js} +34 -34
- package/dist/Heading-ZcvybCi8.js.map +1 -0
- package/dist/ScarcityBadge-CjTFAhat.js +167 -0
- package/dist/ScarcityBadge-CjTFAhat.js.map +1 -0
- package/dist/{SeriesPage-DBtQarUf.js → SeriesPage-DTEY83yR.js} +7 -7
- package/dist/{SeriesPage-DBtQarUf.js.map → SeriesPage-DTEY83yR.js.map} +1 -1
- package/dist/{Spinner-Cg931di6.js → Spinner--YBVljiP.js} +10 -10
- package/dist/Spinner--YBVljiP.js.map +1 -0
- package/dist/Success-ClCvTxTH.js +848 -0
- package/dist/Success-ClCvTxTH.js.map +1 -0
- package/dist/Text-SlV9H-GU.js +171 -0
- package/dist/Text-SlV9H-GU.js.map +1 -0
- package/dist/VenueCalendar-Bth_j-Wp.js +15657 -0
- package/dist/VenueCalendar-Bth_j-Wp.js.map +1 -0
- package/dist/{ViewTicketsEmbed-C53Noeou.js → ViewTicketsEmbed-D7g7RYZI.js} +391 -380
- package/dist/{ViewTicketsEmbed-C53Noeou.js.map → ViewTicketsEmbed-D7g7RYZI.js.map} +1 -1
- package/dist/api/{events.d.ts → api/events.d.ts} +9 -10
- package/dist/api/{index.d.ts → api/index.d.ts} +2 -1
- package/dist/api/api/result.d.ts +48 -0
- package/dist/api/{transformers → api/transformers}/event.d.ts +19 -10
- package/dist/api/api.cjs +1 -1
- package/dist/api/api.cjs.map +1 -1
- package/dist/api/api.mjs +688 -594
- package/dist/api/api.mjs.map +1 -1
- package/dist/api/types.d.ts +447 -438
- package/dist/{data-toggle-store.svelte-LbtOs016.js → data-toggle-store.svelte-CFAVM8I0.js} +2 -2
- package/dist/{data-toggle-store.svelte-LbtOs016.js.map → data-toggle-store.svelte-CFAVM8I0.js.map} +1 -1
- package/dist/labels-CnpAWtkz.js +640 -0
- package/dist/labels-CnpAWtkz.js.map +1 -0
- package/dist/{modalManager.svelte-DH07yk5J.js → modalManager.svelte-T2RGHhZH.js} +2 -2
- package/dist/{modalManager.svelte-DH07yk5J.js.map → modalManager.svelte-T2RGHhZH.js.map} +1 -1
- package/dist/seo/seo.cjs +1 -1
- package/dist/seo/seo.cjs.map +1 -1
- package/dist/seo/seo.mjs +78 -74
- package/dist/seo/seo.mjs.map +1 -1
- package/dist/transform-C3TwZSH6.js +349 -0
- package/dist/transform-C3TwZSH6.js.map +1 -0
- package/dist/types/index.d.ts +22 -10
- package/dist/venue-calendar.css +1 -1
- package/dist/venue-calendar.es.js +16 -16
- package/dist/venue-calendar.iife.js +46 -32
- package/dist/venue-calendar.iife.js.map +1 -1
- package/dist/venue-calendar.umd.js +45 -31
- package/dist/venue-calendar.umd.js.map +1 -1
- package/package.json +7 -5
- package/dist/CartView-gasx8QHt.js +0 -2366
- package/dist/CartView-gasx8QHt.js.map +0 -1
- package/dist/Checkout-Bm5un0yn.js +0 -1763
- package/dist/Checkout-Bm5un0yn.js.map +0 -1
- package/dist/Checkout-DU8QW51B.js +0 -916
- package/dist/Checkout-DU8QW51B.js.map +0 -1
- package/dist/CheckoutTimer-seT9skG1.js.map +0 -1
- package/dist/CollectionView-Dy1PWTZg.js +0 -299
- package/dist/CollectionView-Dy1PWTZg.js.map +0 -1
- package/dist/Event-wKLQzQod.js.map +0 -1
- package/dist/EventPage-GprihVCY.js +0 -532
- package/dist/EventPage-GprihVCY.js.map +0 -1
- package/dist/Heading-C1g2tMwa.js.map +0 -1
- package/dist/ScarcityBadge-BCJIS4dt.js +0 -90
- package/dist/ScarcityBadge-BCJIS4dt.js.map +0 -1
- package/dist/Spinner-Cg931di6.js.map +0 -1
- package/dist/Success-B-X7iUhg.js +0 -729
- package/dist/Success-B-X7iUhg.js.map +0 -1
- package/dist/Text-DkbT1W8b.js +0 -167
- package/dist/Text-DkbT1W8b.js.map +0 -1
- package/dist/VenueCalendar-DpXlpxlW.js +0 -18307
- package/dist/VenueCalendar-DpXlpxlW.js.map +0 -1
- package/dist/labels-BWRJZD5n.js +0 -965
- package/dist/labels-BWRJZD5n.js.map +0 -1
- package/dist/transform-0JpmvWCo.js +0 -274
- package/dist/transform-0JpmvWCo.js.map +0 -1
- /package/dist/api/{client.d.ts → api/client.d.ts} +0 -0
- /package/dist/api/{cta.d.ts → api/cta.d.ts} +0 -0
- /package/dist/api/{gift-cards.d.ts → api/gift-cards.d.ts} +0 -0
- /package/dist/api/{orders.d.ts → api/orders.d.ts} +0 -0
- /package/dist/api/{promo.d.ts → api/promo.d.ts} +0 -0
- /package/dist/api/{transformers → api/transformers}/address.d.ts +0 -0
- /package/dist/api/{transformers → api/transformers}/cart.d.ts +0 -0
- /package/dist/api/{transformers → api/transformers}/collection.d.ts +0 -0
- /package/dist/api/{transformers → api/transformers}/giftCard.d.ts +0 -0
- /package/dist/api/{transformers → api/transformers}/index.d.ts +0 -0
- /package/dist/api/{transformers → api/transformers}/order.d.ts +0 -0
- /package/dist/api/{transformers → api/transformers}/performer.d.ts +0 -0
- /package/dist/api/{transformers → api/transformers}/series.d.ts +0 -0
- /package/dist/api/{transformers → api/transformers}/venue.d.ts +0 -0
- /package/dist/api/{venues.d.ts → api/venues.d.ts} +0 -0
- /package/dist/api/{waitlist.d.ts → api/waitlist.d.ts} +0 -0
|
@@ -0,0 +1,349 @@
|
|
|
1
|
+
import "svelte/internal/disclose-version";
|
|
2
|
+
import * as i from "svelte/internal/client";
|
|
3
|
+
import { u as _, aG as w, aH as y, ak as D, aI as S } from "./VenueCalendar-Bth_j-Wp.js";
|
|
4
|
+
var P = i.from_svg('<path d="M216,112v96a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V112A16,16,0,0,1,56,96h64v48a8,8,0,0,0,16,0V96h64A16,16,0,0,1,216,112ZM136,43.31l26.34,26.35a8,8,0,0,0,11.32-11.32l-40-40a8,8,0,0,0-11.32,0l-40,40A8,8,0,0,0,93.66,69.66L120,43.31V96h16Z"></path>'), b = i.from_svg('<path d="M176,104h24a8,8,0,0,1,8,8v96a8,8,0,0,1-8,8H56a8,8,0,0,1-8-8V112a8,8,0,0,1,8-8H80" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></path><polyline points="88 64 128 24 168 64" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></polyline><line x1="128" y1="24" x2="128" y2="136" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></line>', 1), I = i.from_svg('<svg aria-hidden="true" viewBox="0 0 256 256" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><!></svg>');
|
|
5
|
+
function F(a, e) {
|
|
6
|
+
i.push(e, !0);
|
|
7
|
+
let n = i.prop(e, "size", 3, "24"), r = i.prop(e, "color", 3, "currentColor"), s = i.prop(e, "class", 3, "");
|
|
8
|
+
const o = _();
|
|
9
|
+
let m = i.derived(() => e.weight ?? o?.weight ?? "regular");
|
|
10
|
+
var l = I();
|
|
11
|
+
let u;
|
|
12
|
+
var f = i.child(l);
|
|
13
|
+
{
|
|
14
|
+
var g = (d) => {
|
|
15
|
+
var p = P();
|
|
16
|
+
i.append(d, p);
|
|
17
|
+
}, c = (d) => {
|
|
18
|
+
var p = b();
|
|
19
|
+
i.next(2), i.append(d, p);
|
|
20
|
+
};
|
|
21
|
+
i.if(f, (d) => {
|
|
22
|
+
i.get(m) === "fill" ? d(g) : d(c, -1);
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
i.reset(l), i.template_effect(() => {
|
|
26
|
+
i.set_class(l, 0, i.clsx(s())), i.set_attribute(l, "width", n()), i.set_attribute(l, "height", n()), u = i.set_style(l, "", u, { color: r() });
|
|
27
|
+
}), i.append(a, l), i.pop();
|
|
28
|
+
}
|
|
29
|
+
var q = i.from_svg('<path d="M128,16a88.1,88.1,0,0,0-88,88c0,75.3,80,132.17,83.41,134.55a8,8,0,0,0,9.18,0C136,236.17,216,179.3,216,104A88.1,88.1,0,0,0,128,16Zm0,56a32,32,0,1,1-32,32A32,32,0,0,1,128,72Z"></path>'), R = i.from_svg('<circle cx="128" cy="104" r="32" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></circle><path d="M208,104c0,72-80,128-80,128S48,176,48,104a80,80,0,0,1,160,0Z" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></path>', 1), E = i.from_svg('<svg aria-hidden="true" viewBox="0 0 256 256" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><!></svg>');
|
|
30
|
+
function M(a, e) {
|
|
31
|
+
i.push(e, !0);
|
|
32
|
+
let n = i.prop(e, "size", 3, "24"), r = i.prop(e, "color", 3, "currentColor"), s = i.prop(e, "class", 3, "");
|
|
33
|
+
const o = _();
|
|
34
|
+
let m = i.derived(() => e.weight ?? o?.weight ?? "regular");
|
|
35
|
+
var l = E();
|
|
36
|
+
let u;
|
|
37
|
+
var f = i.child(l);
|
|
38
|
+
{
|
|
39
|
+
var g = (d) => {
|
|
40
|
+
var p = q();
|
|
41
|
+
i.append(d, p);
|
|
42
|
+
}, c = (d) => {
|
|
43
|
+
var p = R();
|
|
44
|
+
i.next(), i.append(d, p);
|
|
45
|
+
};
|
|
46
|
+
i.if(f, (d) => {
|
|
47
|
+
i.get(m) === "fill" ? d(g) : d(c, -1);
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
i.reset(l), i.template_effect(() => {
|
|
51
|
+
i.set_class(l, 0, i.clsx(s())), i.set_attribute(l, "width", n()), i.set_attribute(l, "height", n()), u = i.set_style(l, "", u, { color: r() });
|
|
52
|
+
}), i.append(a, l), i.pop();
|
|
53
|
+
}
|
|
54
|
+
async function B(a) {
|
|
55
|
+
if (typeof navigator < "u" && navigator.clipboard && typeof navigator.clipboard.writeText == "function")
|
|
56
|
+
try {
|
|
57
|
+
return await navigator.clipboard.writeText(a), !0;
|
|
58
|
+
} catch {
|
|
59
|
+
}
|
|
60
|
+
return N(a);
|
|
61
|
+
}
|
|
62
|
+
function N(a) {
|
|
63
|
+
if (typeof document > "u" || typeof document.execCommand != "function")
|
|
64
|
+
return !1;
|
|
65
|
+
const e = document.activeElement, n = document.getSelection(), r = n ? Array.from({ length: n.rangeCount }, (o, m) => n.getRangeAt(m).cloneRange()) : [], s = document.createElement("textarea");
|
|
66
|
+
try {
|
|
67
|
+
return s.value = a, s.setAttribute("readonly", ""), s.style.position = "fixed", s.style.top = "-9999px", s.style.left = "-9999px", s.style.opacity = "0", document.body.appendChild(s), s.select(), s.setSelectionRange(0, a.length), document.execCommand("copy");
|
|
68
|
+
} catch {
|
|
69
|
+
return !1;
|
|
70
|
+
} finally {
|
|
71
|
+
if (s.remove(), n) {
|
|
72
|
+
n.removeAllRanges();
|
|
73
|
+
for (const o of r)
|
|
74
|
+
n.addRange(o);
|
|
75
|
+
}
|
|
76
|
+
e?.focus?.();
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
function C(a) {
|
|
80
|
+
if (!a) return [];
|
|
81
|
+
const e = a.split(",").map((s) => s.trim());
|
|
82
|
+
if (e.length < 2) return [a];
|
|
83
|
+
const r = e[e.length - 1].match(/^([A-Z]{2})\s+(\d{5}(-\d{4})?)$/);
|
|
84
|
+
if (r && e.length >= 3) {
|
|
85
|
+
const s = r[1], o = r[2], m = e[e.length - 2], l = e.slice(0, -2);
|
|
86
|
+
return l.push(`${m}, ${s} ${o}`), l;
|
|
87
|
+
}
|
|
88
|
+
return [e[0], e.slice(1).join(", ")];
|
|
89
|
+
}
|
|
90
|
+
function k(a) {
|
|
91
|
+
return a ? `https://www.google.com/maps/search/?api=1&query=${encodeURIComponent(a)}` : "";
|
|
92
|
+
}
|
|
93
|
+
function z(a) {
|
|
94
|
+
const e = a, n = w(
|
|
95
|
+
a.timeZone || e.timezone || e.time_zone || "UTC"
|
|
96
|
+
), r = y(a.image || "", { cdn: !0 }), s = (a.occurrences || []).map(
|
|
97
|
+
(c) => ({
|
|
98
|
+
id: c.id,
|
|
99
|
+
slug: c.slug || "",
|
|
100
|
+
startDateTime: c.startDateTime,
|
|
101
|
+
endDateTime: c.endDateTime || "",
|
|
102
|
+
status: c.ctaState?.reason === "sold_out" ? "sold_out" : "on_sale",
|
|
103
|
+
ctaText: c.ctaState?.text || "Get Tickets",
|
|
104
|
+
ctaDisabled: c.ctaState?.disabled || !1
|
|
105
|
+
})
|
|
106
|
+
), o = a.occurrences?.[0];
|
|
107
|
+
let m = "";
|
|
108
|
+
if (o?.startDateTime) {
|
|
109
|
+
const c = new Date(o.startDateTime);
|
|
110
|
+
m = D(
|
|
111
|
+
c,
|
|
112
|
+
{ timeZone: n, year: "numeric", month: "2-digit", day: "2-digit" },
|
|
113
|
+
"en-CA"
|
|
114
|
+
);
|
|
115
|
+
}
|
|
116
|
+
const l = a.venue?.faq;
|
|
117
|
+
let u = [];
|
|
118
|
+
Array.isArray(l) ? u = l.map((c) => ({
|
|
119
|
+
question: c.question || "",
|
|
120
|
+
answer: c.answer || ""
|
|
121
|
+
})) : typeof l == "string" && l && (u = [{ question: "FAQ", answer: l }]);
|
|
122
|
+
const f = (a.performers || []).map(
|
|
123
|
+
(c, d) => ({
|
|
124
|
+
id: d + 1,
|
|
125
|
+
displayName: c.displayName || [c.firstName, c.lastName].filter(Boolean).join(" "),
|
|
126
|
+
profileImage: c.profileImage || void 0
|
|
127
|
+
})
|
|
128
|
+
), g = a.venue?.location || a.venue?.googleLocationNameCache || "";
|
|
129
|
+
return {
|
|
130
|
+
id: a.id,
|
|
131
|
+
title: a.title || "",
|
|
132
|
+
slug: "",
|
|
133
|
+
description: a.description || a.eventSummary || "",
|
|
134
|
+
date: m,
|
|
135
|
+
startDateTime: o?.startDateTime || "",
|
|
136
|
+
endDateTime: o?.endDateTime || "",
|
|
137
|
+
doorsOpenTime: "",
|
|
138
|
+
timezone: n,
|
|
139
|
+
imageUrl: r,
|
|
140
|
+
venue: {
|
|
141
|
+
id: a.venue?.id || 0,
|
|
142
|
+
name: a.venue?.name || "",
|
|
143
|
+
address: g,
|
|
144
|
+
timezone: n,
|
|
145
|
+
serviceFeePercentage: 0,
|
|
146
|
+
serviceFeeCents: 0,
|
|
147
|
+
taxPercentage: 0
|
|
148
|
+
},
|
|
149
|
+
performers: f,
|
|
150
|
+
tickets: [],
|
|
151
|
+
faqs: u,
|
|
152
|
+
disclaimer: a.venue?.disclaimer || void 0,
|
|
153
|
+
status: "on_sale",
|
|
154
|
+
eventSeriesId: a.id,
|
|
155
|
+
seriesOccurrences: s,
|
|
156
|
+
isPasswordProtected: !1,
|
|
157
|
+
isRegistrationEvent: !1,
|
|
158
|
+
totalTicketsRemaining: 0,
|
|
159
|
+
totalTicketsCapacity: 0,
|
|
160
|
+
venueAddressLines: C(g),
|
|
161
|
+
googleMapsUrl: k(g)
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
function U(a) {
|
|
165
|
+
const e = (a.events || []).map(
|
|
166
|
+
(r) => ({
|
|
167
|
+
id: r.id,
|
|
168
|
+
name: r.title || "",
|
|
169
|
+
slug: r.slug || "",
|
|
170
|
+
// SC's resolveImageUrl passes absolute http(s)/data/blob URLs through
|
|
171
|
+
// untouched, so no local startsWith('http') guard is needed.
|
|
172
|
+
image: y(r.image || "", { cdn: !0 }),
|
|
173
|
+
startDateTime: r.startDateTime || "",
|
|
174
|
+
status: r.status || "on_sale"
|
|
175
|
+
})
|
|
176
|
+
), n = y(a.coverImage || "", { cdn: !0 });
|
|
177
|
+
return {
|
|
178
|
+
id: a.id,
|
|
179
|
+
title: a.collectionTitle || "",
|
|
180
|
+
slug: "",
|
|
181
|
+
description: a.description || a.summary || "",
|
|
182
|
+
date: "",
|
|
183
|
+
startDateTime: "",
|
|
184
|
+
endDateTime: "",
|
|
185
|
+
doorsOpenTime: "",
|
|
186
|
+
timezone: "UTC",
|
|
187
|
+
imageUrl: n,
|
|
188
|
+
venue: {
|
|
189
|
+
id: 0,
|
|
190
|
+
name: "",
|
|
191
|
+
address: "",
|
|
192
|
+
timezone: "UTC",
|
|
193
|
+
serviceFeePercentage: 0,
|
|
194
|
+
serviceFeeCents: 0,
|
|
195
|
+
taxPercentage: 0
|
|
196
|
+
},
|
|
197
|
+
performers: [],
|
|
198
|
+
tickets: [],
|
|
199
|
+
faqs: [],
|
|
200
|
+
status: "on_sale",
|
|
201
|
+
collectionId: a.id,
|
|
202
|
+
collectionEvents: e,
|
|
203
|
+
isPasswordProtected: !1,
|
|
204
|
+
isRegistrationEvent: !1,
|
|
205
|
+
totalTicketsRemaining: 0,
|
|
206
|
+
totalTicketsCapacity: 0
|
|
207
|
+
};
|
|
208
|
+
}
|
|
209
|
+
function O(a) {
|
|
210
|
+
const e = /* @__PURE__ */ new Date(), n = a.remainingCapacity ?? a.quantityRemaining ?? a.quantity ?? 0, r = a.salesBegin || a.salesStart || a.saleBegin || a.onSaleStart, s = a.salesEnd || a.saleEnd || a.onSaleEnd;
|
|
211
|
+
return n <= 0 ? "sold_out" : s && new Date(s) < e ? "sales_ended" : r && new Date(r) > e ? "coming_soon" : "on_sale";
|
|
212
|
+
}
|
|
213
|
+
function Z(a, e) {
|
|
214
|
+
const n = (a || "").toLowerCase().replace(/\s+/g, "_");
|
|
215
|
+
if (n === "cancelled" || n === "canceled") return "cancelled";
|
|
216
|
+
if (n === "past" || n === "ended") return "past";
|
|
217
|
+
if (e.some(
|
|
218
|
+
(o) => o.isHidden && o.status === "on_sale"
|
|
219
|
+
)) return "on_sale";
|
|
220
|
+
const s = e.filter((o) => !o.isHidden);
|
|
221
|
+
if (s.length > 0) {
|
|
222
|
+
if (s.every((o) => o.status === "sold_out")) return "sold_out";
|
|
223
|
+
if (s.every((o) => o.status === "coming_soon"))
|
|
224
|
+
return "coming_soon";
|
|
225
|
+
if (s.every(
|
|
226
|
+
(o) => o.status === "sales_ended" || o.status === "sold_out"
|
|
227
|
+
))
|
|
228
|
+
return "sales_ended";
|
|
229
|
+
}
|
|
230
|
+
return n === "sold_out" || n === "soldout" ? "sold_out" : n === "coming_soon" || n === "comingsoon" ? "coming_soon" : n === "sales_ended" || n === "salesended" ? "sales_ended" : "on_sale";
|
|
231
|
+
}
|
|
232
|
+
function j(a) {
|
|
233
|
+
const e = S(a), n = e.venue || {}, r = w(
|
|
234
|
+
e.timeZone || e.timezone || n.timeZone || n.timezone || "UTC"
|
|
235
|
+
), o = (a.availableTickets || []).map((t) => ({
|
|
236
|
+
id: t.id || t.ID,
|
|
237
|
+
name: t.name || t.title || "",
|
|
238
|
+
description: t.description || void 0,
|
|
239
|
+
price: t.price ?? 0,
|
|
240
|
+
fee: t.fee ?? 0,
|
|
241
|
+
quantityAvailable: t.remainingCapacity ?? t.quantityRemaining ?? t.quantity ?? 0,
|
|
242
|
+
quantityTotal: t.totalCapacity ?? t.quantity ?? 0,
|
|
243
|
+
minPerOrder: t.minPerOrder ?? t.minQuantity ?? 1,
|
|
244
|
+
maxPerOrder: t.maxPerOrder ?? t.maxQuantity ?? 10,
|
|
245
|
+
status: O(t),
|
|
246
|
+
salesStartDate: t.salesBegin || t.salesStart || t.saleBegin || t.onSaleStart || void 0,
|
|
247
|
+
salesEndDate: t.salesEnd || t.saleEnd || t.onSaleEnd || void 0,
|
|
248
|
+
isDonation: t.type === 2 || t.ticketType === 2 || t.isDonation === !0,
|
|
249
|
+
isHidden: t.visibility === 2 || t.isHidden === !0,
|
|
250
|
+
ticketType: t.type || t.ticketType || void 0,
|
|
251
|
+
sectionName: t.sectionName || t.section || void 0
|
|
252
|
+
})), m = o.filter((t) => !t.isHidden && !t.isDonation), l = m.reduce(
|
|
253
|
+
(t, v) => t + v.quantityAvailable,
|
|
254
|
+
0
|
|
255
|
+
), u = m.reduce(
|
|
256
|
+
(t, v) => t + v.quantityTotal,
|
|
257
|
+
0
|
|
258
|
+
), f = Z(e.status, o), g = a.image || a.imageUrl || a.image_url || "", c = g.startsWith("http") ? g : y(g, { cdn: !0 }), d = {
|
|
259
|
+
id: n.id || n.ID || 0,
|
|
260
|
+
name: n.name || n.googleLocationNameCache || "",
|
|
261
|
+
address: n.address || n.googleLocationNameCache || "",
|
|
262
|
+
timezone: r,
|
|
263
|
+
serviceFeePercentage: n.serviceFeePercentage ?? n.fee ?? 0,
|
|
264
|
+
serviceFeeCents: n.serviceFeeCents ?? 0,
|
|
265
|
+
taxPercentage: n.taxPercentage ?? n.tax ?? 0,
|
|
266
|
+
contactEmail: n.contactEmail || n.email || void 0
|
|
267
|
+
}, x = (e.performers || []).map((t) => ({
|
|
268
|
+
id: t.id || t.ID,
|
|
269
|
+
displayName: t.displayName || t.name || "",
|
|
270
|
+
profileImage: t.avatar || t.profileImage || void 0,
|
|
271
|
+
role: t.role || void 0
|
|
272
|
+
})), A = (e.faqs || []).map((t) => ({
|
|
273
|
+
question: t.question || "",
|
|
274
|
+
answer: t.answer || ""
|
|
275
|
+
})), h = (e.showtimes || []).filter((t) => t.published !== !1).map((t, v) => ({
|
|
276
|
+
id: t.id ?? t.eventId ?? v + 1,
|
|
277
|
+
slug: t.slug || "",
|
|
278
|
+
startDateTime: t.startDateTime || t.startTime || "",
|
|
279
|
+
endDateTime: t.endDateTime || t.endTime || "",
|
|
280
|
+
status: t.ctaState?.reason === "sold_out" ? "sold_out" : "on_sale",
|
|
281
|
+
ctaText: t.ctaState?.text || "Get tickets",
|
|
282
|
+
ctaDisabled: t.ctaState?.disabled || !1
|
|
283
|
+
}));
|
|
284
|
+
let T = "";
|
|
285
|
+
if (e.startDateTime) {
|
|
286
|
+
const t = new Date(e.startDateTime);
|
|
287
|
+
T = D(
|
|
288
|
+
t,
|
|
289
|
+
{ timeZone: r, year: "numeric", month: "2-digit", day: "2-digit" },
|
|
290
|
+
"en-CA"
|
|
291
|
+
);
|
|
292
|
+
}
|
|
293
|
+
return {
|
|
294
|
+
id: e.id,
|
|
295
|
+
title: e.title || "",
|
|
296
|
+
slug: e.slug || "",
|
|
297
|
+
description: e.description || e.eventSummary || "",
|
|
298
|
+
date: T,
|
|
299
|
+
startDateTime: e.startDateTime || "",
|
|
300
|
+
endDateTime: e.endDateTime || "",
|
|
301
|
+
doorsOpenTime: e.doorsOpenTime || "",
|
|
302
|
+
timezone: r,
|
|
303
|
+
imageUrl: c,
|
|
304
|
+
venue: d,
|
|
305
|
+
performers: x,
|
|
306
|
+
tickets: o,
|
|
307
|
+
faqs: A,
|
|
308
|
+
disclaimer: e.disclaimer || void 0,
|
|
309
|
+
status: f,
|
|
310
|
+
eventSeriesId: e.eventSeriesId || void 0,
|
|
311
|
+
seriesOccurrences: h.length ? h : void 0,
|
|
312
|
+
// Public API hides the actual password (json:"-") and exposes a boolean
|
|
313
|
+
// `hasPassword` flag instead; fall back to a populated `password` for
|
|
314
|
+
// admin-shaped payloads.
|
|
315
|
+
isPasswordProtected: e.hasPassword === !0 || !!e.password,
|
|
316
|
+
isRegistrationEvent: e.ticketType === 1 || e.eventTicketingType === 1,
|
|
317
|
+
totalTicketsRemaining: l,
|
|
318
|
+
totalTicketsCapacity: u,
|
|
319
|
+
stageName: e.stage?.name || e.stageName || void 0,
|
|
320
|
+
ageRestriction: e.ageRestriction || void 0,
|
|
321
|
+
displayAgeRestriction: e.displayAgeRestriction ?? !1,
|
|
322
|
+
displayStartTime: e.displayStartTime ?? !0,
|
|
323
|
+
displayEndTime: e.displayEndTime ?? !0,
|
|
324
|
+
displayDoorsTime: e.displayDoorsTime ?? !0,
|
|
325
|
+
collectionId: e.collectionId || void 0,
|
|
326
|
+
// domain folds collection_id
|
|
327
|
+
venueAddressLines: C(
|
|
328
|
+
n.address || n.googleLocationNameCache || ""
|
|
329
|
+
),
|
|
330
|
+
googleMapsUrl: k(
|
|
331
|
+
n.address || n.googleLocationNameCache || ""
|
|
332
|
+
)
|
|
333
|
+
};
|
|
334
|
+
}
|
|
335
|
+
function V(a) {
|
|
336
|
+
return z(a);
|
|
337
|
+
}
|
|
338
|
+
function G(a) {
|
|
339
|
+
return U(a);
|
|
340
|
+
}
|
|
341
|
+
export {
|
|
342
|
+
F as E,
|
|
343
|
+
M as L,
|
|
344
|
+
V as a,
|
|
345
|
+
G as b,
|
|
346
|
+
B as c,
|
|
347
|
+
j as t
|
|
348
|
+
};
|
|
349
|
+
//# sourceMappingURL=transform-C3TwZSH6.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transform-C3TwZSH6.js","sources":["../node_modules/@getmicdrop/svelte-components/dist/primitives/Icons/phosphor/ExportIcon.svelte","../node_modules/@getmicdrop/svelte-components/dist/primitives/Icons/phosphor/LocationIcon.svelte","../node_modules/@getmicdrop/svelte-components/dist/utils/copyToClipboard.js","../src/lib/api/transformers/address.ts","../src/lib/api/transformers/series.ts","../src/lib/api/transformers/collection.ts","../src/lib/public-calendar-flow/transform.ts"],"sourcesContent":["<script lang=\"ts\">\r\n /**\r\n * Export — Phosphor icon (canonical Micdrop icon family).\r\n * Outline by default; pass `weight=\"fill\"` for solid, or let a stateful parent\r\n * (NavItem / Tabs / BottomNav / status badge) drive it via icon-weight context.\r\n */\r\n import { useIconWeight, type IconWeight } from './iconWeight.js';\r\n\r\n interface Props {\r\n /** Pixel size (width + height). */\r\n size?: string;\r\n /** Icon color; defaults to `currentColor` (inherits text color). */\r\n color?: string;\r\n /** Extra classes. */\r\n class?: string;\r\n /** `regular` (outline) or `fill` (solid). Overrides ambient state weight. */\r\n weight?: IconWeight;\r\n }\r\n\r\n let { size = '24', color = 'currentColor', class: className = '', weight }: Props = $props();\r\n\r\n const ctx = useIconWeight();\r\n let resolved: IconWeight = $derived(weight ?? ctx?.weight ?? 'regular');\r\n</script>\r\n\r\n<svg\r\n class={className}\r\n aria-hidden=\"true\"\r\n width={size}\r\n height={size}\r\n viewBox=\"0 0 256 256\"\r\n fill=\"currentColor\"\r\n style:color={color}\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n>\r\n {#if resolved === 'fill'}<path d=\"M216,112v96a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V112A16,16,0,0,1,56,96h64v48a8,8,0,0,0,16,0V96h64A16,16,0,0,1,216,112ZM136,43.31l26.34,26.35a8,8,0,0,0,11.32-11.32l-40-40a8,8,0,0,0-11.32,0l-40,40A8,8,0,0,0,93.66,69.66L120,43.31V96h16Z\"/>{:else}<path d=\"M176,104h24a8,8,0,0,1,8,8v96a8,8,0,0,1-8,8H56a8,8,0,0,1-8-8V112a8,8,0,0,1,8-8H80\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"16\"/><polyline points=\"88 64 128 24 168 64\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"16\"/><line x1=\"128\" y1=\"24\" x2=\"128\" y2=\"136\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"16\"/>{/if}\r\n</svg>\r\n","<script lang=\"ts\">\r\n /**\r\n * Location — Phosphor icon (canonical Micdrop icon family).\r\n * Outline by default; pass `weight=\"fill\"` for solid, or let a stateful parent\r\n * (NavItem / Tabs / BottomNav / status badge) drive it via icon-weight context.\r\n */\r\n import { useIconWeight, type IconWeight } from './iconWeight.js';\r\n\r\n interface Props {\r\n /** Pixel size (width + height). */\r\n size?: string;\r\n /** Icon color; defaults to `currentColor` (inherits text color). */\r\n color?: string;\r\n /** Extra classes. */\r\n class?: string;\r\n /** `regular` (outline) or `fill` (solid). Overrides ambient state weight. */\r\n weight?: IconWeight;\r\n }\r\n\r\n let { size = '24', color = 'currentColor', class: className = '', weight }: Props = $props();\r\n\r\n const ctx = useIconWeight();\r\n let resolved: IconWeight = $derived(weight ?? ctx?.weight ?? 'regular');\r\n</script>\r\n\r\n<svg\r\n class={className}\r\n aria-hidden=\"true\"\r\n width={size}\r\n height={size}\r\n viewBox=\"0 0 256 256\"\r\n fill=\"currentColor\"\r\n style:color={color}\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n>\r\n {#if resolved === 'fill'}<path d=\"M128,16a88.1,88.1,0,0,0-88,88c0,75.3,80,132.17,83.41,134.55a8,8,0,0,0,9.18,0C136,236.17,216,179.3,216,104A88.1,88.1,0,0,0,128,16Zm0,56a32,32,0,1,1-32,32A32,32,0,0,1,128,72Z\"/>{:else}<circle cx=\"128\" cy=\"104\" r=\"32\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"16\"/><path d=\"M208,104c0,72-80,128-80,128S48,176,48,104a80,80,0,0,1,160,0Z\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"16\"/>{/if}\r\n</svg>\r\n","/**\n * Copy-to-clipboard utility — resolves `true` ONLY on a real successful write.\n *\n * The whole point of this canonical: callers fire their own \"Copied!\" toast\n * ONLY when this resolves `true`. It NEVER resolves `true` unless the text\n * actually landed on the clipboard, so a permission-denied / insecure-context /\n * no-API failure can no longer masquerade as success — killing the \"lying\n * toast\" bug where a button claimed it copied when nothing was copied.\n *\n * Strategy (best → fallback, never throws):\n * 1. Async Clipboard API (`navigator.clipboard.writeText`) when available\n * (secure context, granted permission) — AWAITED; resolves `true` only\n * when that promise resolves. On rejection it falls through (2) rather\n * than reporting success.\n * 2. Legacy `document.execCommand('copy')` for older / insecure (non-HTTPS)\n * contexts — returns its REAL success boolean.\n * 3. `false` on any failure (rejected write, no clipboard API, no DOM,\n * thrown exception).\n *\n * @param text - The text to place on the clipboard.\n * @returns Promise resolving `true` iff the write actually succeeded, else `false`.\n *\n * @example\n * if (await copyToClipboard(shareUrl)) toast.success('Link copied');\n * else toast.error(\"Couldn't copy — try selecting and copying manually\");\n */\nexport async function copyToClipboard(text) {\n // 1. Async Clipboard API — preferred; only present in secure contexts.\n if (typeof navigator !== 'undefined' &&\n navigator.clipboard &&\n typeof navigator.clipboard.writeText === 'function') {\n try {\n await navigator.clipboard.writeText(text);\n return true;\n }\n catch {\n // Permission denied / insecure context / transient failure — do NOT\n // report success. Fall through to the legacy path and let it decide.\n }\n }\n // 2. Legacy execCommand fallback — older browsers / insecure (non-HTTPS).\n return copyViaExecCommand(text);\n}\n/**\n * Legacy `document.execCommand('copy')` path. Returns its real success boolean\n * and never throws. Used when the async Clipboard API is unavailable or its\n * write rejected.\n *\n * @param text - The text to copy.\n * @returns `true` iff `execCommand('copy')` reported success.\n */\nfunction copyViaExecCommand(text) {\n if (typeof document === 'undefined' ||\n typeof document.execCommand !== 'function') {\n return false;\n }\n // Preserve what the user had selected/focused — selecting our textarea would\n // otherwise blow away their current selection (e.g. text they were copying by hand).\n const prevActive = document.activeElement;\n const selection = document.getSelection();\n const savedRanges = selection\n ? Array.from({ length: selection.rangeCount }, (_, i) => selection.getRangeAt(i).cloneRange())\n : [];\n const textarea = document.createElement('textarea');\n try {\n textarea.value = text;\n // Read-only + off-screen so it never flashes, scrolls, or steals focus.\n textarea.setAttribute('readonly', '');\n textarea.style.position = 'fixed';\n textarea.style.top = '-9999px';\n textarea.style.left = '-9999px';\n textarea.style.opacity = '0';\n document.body.appendChild(textarea);\n textarea.select();\n textarea.setSelectionRange(0, text.length);\n return document.execCommand('copy');\n }\n catch {\n return false;\n }\n finally {\n textarea.remove();\n // Restore the user's prior selection + focus, on success AND failure.\n if (selection) {\n selection.removeAllRanges();\n for (const range of savedRanges)\n selection.addRange(range);\n }\n prevActive?.focus?.();\n }\n}\n","/**\r\n * Address helpers — shared between the event, series and collection page\r\n * transformers.\r\n *\r\n * Lifted verbatim from public-calendar-flow/transform.ts so the series and\r\n * collection canonicals (and the in-place transformApiEvent) read a single\r\n * source instead of each carrying a private copy. Behavior is byte-identical\r\n * to the previous module-private versions.\r\n */\r\n\r\n/**\r\n * Parse a single-line address string into display lines.\r\n * E.g. \"123 Main St, Los Angeles, CA 90012\" -> [\"123 Main St\", \"Los Angeles, CA 90012\"]\r\n */\r\nexport function parseAddress(addressStr: string): string[] {\r\n if (!addressStr) return [];\r\n const parts = addressStr.split(',').map(p => p.trim());\r\n if (parts.length < 2) return [addressStr];\r\n const lastPart = parts[parts.length - 1];\r\n const stateZipMatch = lastPart.match(/^([A-Z]{2})\\s+(\\d{5}(-\\d{4})?)$/);\r\n if (stateZipMatch && parts.length >= 3) {\r\n const state = stateZipMatch[1];\r\n const zip = stateZipMatch[2];\r\n const city = parts[parts.length - 2];\r\n const lines = parts.slice(0, -2);\r\n lines.push(`${city}, ${state} ${zip}`);\r\n return lines;\r\n }\r\n return [parts[0], parts.slice(1).join(', ')];\r\n}\r\n\r\n/**\r\n * Build a Google Maps search URL from an address string.\r\n */\r\nexport function buildGoogleMapsUrl(address: string): string {\r\n if (!address) return '';\r\n return `https://www.google.com/maps/search/?api=1&query=${encodeURIComponent(address)}`;\r\n}\r\n","/**\r\n * Series Page Transformer\r\n *\r\n * Wire->domain boundary for the public series page. Maps a SeriesPageData\r\n * payload (from the series API) into the clean EventData shape consumed by\r\n * SeriesPage.svelte / EventExperience (full-width series mode, set via\r\n * eventSeriesId).\r\n *\r\n * Lifted byte-identically from public-calendar-flow/transform.ts's\r\n * transformSeriesPageData. Every ||/?? fallthrough is preserved exactly;\r\n * characterization tests pin the output. transformSeriesPageData now delegates\r\n * here.\r\n *\r\n * COMPOSITION NOTE — why this does NOT reuse parseVenue:\r\n * The api `parseVenue` returns the api-domain `Venue` (raw timezone string,\r\n * fee fields read from the payload). The series page needs the pcf `VenueData`\r\n * shape: timezone is the IANA-RESOLVED zone (getIANATimezone) and the fee\r\n * fields are hard-zeroed (the series payload carries no venue fees). Those\r\n * shapes are not byte-compatible, so the venue sub-shape stays local.\r\n */\r\n\r\nimport { formatDateRaw, getIANATimezone } from '@getmicdrop/svelte-components';\r\nimport { resolveImageUrl } from '@getmicdrop/svelte-components';\r\nimport { parseAddress, buildGoogleMapsUrl } from './address.js';\r\nimport type { SeriesPageData } from '../types.js';\r\nimport type {\r\n EventData,\r\n EventStatus,\r\n PerformerData,\r\n FAQItem,\r\n SeriesOccurrence,\r\n} from '$lib/public-calendar-flow/types';\r\n\r\n/**\r\n * Transform SeriesPageData (from the series API) into our clean EventData interface.\r\n * Sets eventSeriesId so EventExperience renders in full-width series mode.\r\n */\r\nexport function parseSeries(series: SeriesPageData): EventData {\r\n // Mirror the event transform: raw series carry lowercase `timezone`\r\n // (some PascalCase `timeZone` / snake `time_zone`). Read all casings so a\r\n // non-UTC series doesn't silently fall back to UTC.\r\n const seriesAny = series as SeriesPageData & {\r\n timezone?: string;\r\n time_zone?: string;\r\n };\r\n const timezone = getIANATimezone(\r\n series.timeZone || seriesAny.timezone || seriesAny.time_zone || 'UTC'\r\n );\r\n\r\n // Build image URL — SC resolveImageUrl already passes absolute URLs through,\r\n // so no local startsWith('http') guard is needed.\r\n const imageUrl = resolveImageUrl(series.image || '', { cdn: true });\r\n\r\n // Map occurrences to SeriesOccurrence[]\r\n const seriesOccurrences: SeriesOccurrence[] = (series.occurrences || []).map(\r\n occ => ({\r\n id: occ.id,\r\n slug: occ.slug || '',\r\n startDateTime: occ.startDateTime,\r\n endDateTime: occ.endDateTime || '',\r\n status: (occ.ctaState?.reason === 'sold_out'\r\n ? 'sold_out'\r\n : 'on_sale') as EventStatus,\r\n ctaText: occ.ctaState?.text || 'Get Tickets',\r\n ctaDisabled: occ.ctaState?.disabled || false,\r\n })\r\n );\r\n\r\n // Use first occurrence for date fields\r\n const firstOcc = series.occurrences?.[0];\r\n let date = '';\r\n if (firstOcc?.startDateTime) {\r\n const dt = new Date(firstOcc.startDateTime);\r\n date = formatDateRaw(\r\n dt,\r\n { timeZone: timezone, year: 'numeric', month: '2-digit', day: '2-digit' },\r\n 'en-CA'\r\n );\r\n }\r\n\r\n // Map FAQs\r\n const rawFaq = series.venue?.faq;\r\n let faqs: FAQItem[] = [];\r\n if (Array.isArray(rawFaq)) {\r\n faqs = rawFaq.map(f => ({\r\n question: f.question || '',\r\n answer: f.answer || '',\r\n }));\r\n } else if (typeof rawFaq === 'string' && rawFaq) {\r\n faqs = [{ question: 'FAQ', answer: rawFaq }];\r\n }\r\n\r\n // Map performers\r\n const performers: PerformerData[] = (series.performers || []).map(\r\n (p, index) => ({\r\n id: index + 1,\r\n displayName:\r\n p.displayName || [p.firstName, p.lastName].filter(Boolean).join(' '),\r\n profileImage: p.profileImage || undefined,\r\n })\r\n );\r\n\r\n // Venue address\r\n const venueAddress =\r\n series.venue?.location || series.venue?.googleLocationNameCache || '';\r\n\r\n return {\r\n id: series.id,\r\n title: series.title || '',\r\n slug: '',\r\n description: series.description || series.eventSummary || '',\r\n date,\r\n startDateTime: firstOcc?.startDateTime || '',\r\n endDateTime: firstOcc?.endDateTime || '',\r\n doorsOpenTime: '',\r\n timezone,\r\n imageUrl,\r\n venue: {\r\n id: series.venue?.id || 0,\r\n name: series.venue?.name || '',\r\n address: venueAddress,\r\n timezone,\r\n serviceFeePercentage: 0,\r\n serviceFeeCents: 0,\r\n taxPercentage: 0,\r\n },\r\n performers,\r\n tickets: [],\r\n faqs,\r\n disclaimer: series.venue?.disclaimer || undefined,\r\n status: 'on_sale',\r\n eventSeriesId: series.id,\r\n seriesOccurrences,\r\n isPasswordProtected: false,\r\n isRegistrationEvent: false,\r\n totalTicketsRemaining: 0,\r\n totalTicketsCapacity: 0,\r\n venueAddressLines: parseAddress(venueAddress),\r\n googleMapsUrl: buildGoogleMapsUrl(venueAddress),\r\n };\r\n}\r\n\r\n/**\r\n * Back-compat alias — the public-calendar-flow shaper name. Existing call\r\n * sites importing transformSeriesPageData continue to work unchanged.\r\n */\r\nexport const transformSeriesPageData = parseSeries;\r\n","/**\r\n * Collection Page Transformer\r\n *\r\n * Wire->domain boundary for the public collection page. Maps a\r\n * PublicCollectionData payload (from the collection API) into the clean\r\n * EventData shape consumed by CollectionView.svelte / EventExperience\r\n * (full-width collection mode, set via collectionId).\r\n *\r\n * Lifted byte-identically from public-calendar-flow/transform.ts's\r\n * transformCollectionData. Every ||/?? fallthrough is preserved exactly;\r\n * characterization tests pin the output. transformCollectionData now delegates\r\n * here.\r\n *\r\n * COMPOSITION NOTE — why this does NOT reuse parseVenue/parseEvent:\r\n * The collection payload has no venue and no timezone; the EventData it\r\n * produces hard-codes an empty venue and 'UTC'. The per-event mapping is a\r\n * tiny CollectionEvent card shape (id/name/slug/image/startDateTime/status),\r\n * not the full Event domain — reusing parseEvent would change the output.\r\n * Both stay local.\r\n */\r\n\r\nimport { resolveImageUrl } from '@getmicdrop/svelte-components';\r\nimport type { PublicCollectionData } from '../types.js';\r\nimport type {\r\n EventData,\r\n EventStatus,\r\n CollectionEvent,\r\n} from '$lib/public-calendar-flow/types';\r\n\r\n/**\r\n * Transform PublicCollectionData (from the collection API) into our clean EventData interface.\r\n * Sets collectionId so EventExperience renders in full-width collection mode.\r\n */\r\nexport function parseCollection(collection: PublicCollectionData): EventData {\r\n // Map collection events to CollectionEvent[]\r\n const collectionEvents: CollectionEvent[] = (collection.events || []).map(\r\n ev => {\r\n return {\r\n id: ev.id,\r\n name: ev.title || '',\r\n slug: ev.slug || '',\r\n // SC's resolveImageUrl passes absolute http(s)/data/blob URLs through\r\n // untouched, so no local startsWith('http') guard is needed.\r\n image: resolveImageUrl(ev.image || '', { cdn: true }),\r\n startDateTime: ev.startDateTime || '',\r\n status: (ev.status || 'on_sale') as EventStatus,\r\n };\r\n }\r\n );\r\n\r\n // Cover image — SC resolveImageUrl already passes absolute URLs through.\r\n const imageUrl = resolveImageUrl(collection.coverImage || '', { cdn: true });\r\n\r\n return {\r\n id: collection.id,\r\n title: collection.collectionTitle || '',\r\n slug: '',\r\n description: collection.description || collection.summary || '',\r\n date: '',\r\n startDateTime: '',\r\n endDateTime: '',\r\n doorsOpenTime: '',\r\n timezone: 'UTC',\r\n imageUrl,\r\n venue: {\r\n id: 0,\r\n name: '',\r\n address: '',\r\n timezone: 'UTC',\r\n serviceFeePercentage: 0,\r\n serviceFeeCents: 0,\r\n taxPercentage: 0,\r\n },\r\n performers: [],\r\n tickets: [],\r\n faqs: [],\r\n status: 'on_sale',\r\n collectionId: collection.id,\r\n collectionEvents,\r\n isPasswordProtected: false,\r\n isRegistrationEvent: false,\r\n totalTicketsRemaining: 0,\r\n totalTicketsCapacity: 0,\r\n };\r\n}\r\n\r\n/**\r\n * Back-compat alias — the public-calendar-flow shaper name. Existing call\r\n * sites importing transformCollectionData continue to work unchanged.\r\n */\r\nexport const transformCollectionData = parseCollection;\r\n","import { formatDateRaw, getIANATimezone } from '@getmicdrop/svelte-components';\r\n// Premium Ticket Experience — API → EventData Transformer\r\n// Maps raw API event responses to our clean EventData interface.\r\n// Used when plugging in real API data. The showcase continues using mock-data.ts directly.\r\n\r\nimport { resolveImageUrl } from '@getmicdrop/svelte-components';\r\nimport {\r\n parseAddress,\r\n buildGoogleMapsUrl,\r\n} from '$lib/api/transformers/address';\r\n// Canonical wire→domain boundary — all event-level scalar reads go through it.\r\nimport { parseEvent } from '$lib/api/transformers/event';\r\nimport { parseSeries } from '$lib/api/transformers/series';\r\nimport { parseCollection } from '$lib/api/transformers/collection';\r\nimport type {\r\n EventData,\r\n EventStatus,\r\n TicketTypeData,\r\n TicketStatus,\r\n VenueData,\r\n PerformerData,\r\n FAQItem,\r\n SeriesOccurrence,\r\n} from './types';\r\nimport type { SeriesPageData, PublicCollectionData } from '$lib/api/types';\r\n\r\n/**\r\n * Map a raw API ticket status/state to our TicketStatus union.\r\n */\r\nfunction mapTicketStatus(ticket: any): TicketStatus {\r\n const now = new Date();\r\n const remaining =\r\n ticket.remainingCapacity ??\r\n ticket.quantityRemaining ??\r\n ticket.quantity ??\r\n 0;\r\n const salesBegin =\r\n ticket.salesBegin ||\r\n ticket.salesStart ||\r\n ticket.saleBegin ||\r\n ticket.onSaleStart;\r\n const salesEnd = ticket.salesEnd || ticket.saleEnd || ticket.onSaleEnd;\r\n\r\n if (remaining <= 0) return 'sold_out';\r\n if (salesEnd && new Date(salesEnd) < now) return 'sales_ended';\r\n if (salesBegin && new Date(salesBegin) > now) return 'coming_soon';\r\n return 'on_sale';\r\n}\r\n\r\n/**\r\n * Map a raw API event status string to our EventStatus union.\r\n */\r\nfunction mapEventStatus(\r\n rawStatus: string,\r\n tickets: TicketTypeData[]\r\n): EventStatus {\r\n const s = (rawStatus || '').toLowerCase().replace(/\\s+/g, '_');\r\n\r\n if (s === 'cancelled' || s === 'canceled') return 'cancelled';\r\n\r\n // Check if event is past based on end time (handled by caller if needed)\r\n if (s === 'past' || s === 'ended') return 'past';\r\n\r\n // MIC-1039: if any hidden ticket is still on sale, the event is \"on_sale\"\r\n // regardless of visible-ticket states — the user just needs a promo code.\r\n // NOTE: this operates on the pcf DOMAIN ticket shape (post-transform, with a\r\n // computed `status` string), NOT the wire shape SC's\r\n // `isHiddenTicketPurchasable` reads (raw visibility/salesChannel/sale-window\r\n // fields). The sale-window math already happened in `mapTicketStatus`, so the\r\n // SC predicate can't honestly serve this site — kept deliberately local.\r\n const hasPurchasableHiddenTickets = tickets.some(\r\n t => t.isHidden && t.status === 'on_sale'\r\n );\r\n if (hasPurchasableHiddenTickets) return 'on_sale';\r\n\r\n // Derive from ticket states\r\n const publicTickets = tickets.filter(t => !t.isHidden);\r\n if (publicTickets.length > 0) {\r\n if (publicTickets.every(t => t.status === 'sold_out')) return 'sold_out';\r\n if (publicTickets.every(t => t.status === 'coming_soon'))\r\n return 'coming_soon';\r\n if (\r\n publicTickets.every(\r\n t => t.status === 'sales_ended' || t.status === 'sold_out'\r\n )\r\n )\r\n return 'sales_ended';\r\n }\r\n\r\n if (s === 'sold_out' || s === 'soldout') return 'sold_out';\r\n if (s === 'coming_soon' || s === 'comingsoon') return 'coming_soon';\r\n if (s === 'sales_ended' || s === 'salesended') return 'sales_ended';\r\n\r\n return 'on_sale';\r\n}\r\n\r\n/**\r\n * Transform a raw API event response into our clean EventData interface.\r\n * This is the bridge between the API and our premium ticket experience components.\r\n *\r\n * COMPOSITION NOTE (events convergence): the wire is parsed ONCE through the\r\n * canonical parseEvent ($lib/api/transformers/event); every event-level\r\n * scalar below projects off the domain Event. Three deliberate wire seams\r\n * remain, characterization-pinned in\r\n * utils/event-shapers.characterization.test.js:\r\n * 1. TICKETS — the TicketTypeData map uses `??` (nullish) semantics over\r\n * raw ticket fields (remainingCapacity/visibility/fee/…) that\r\n * parseTicket's `||`-folding AvailableTicket neither carries nor\r\n * preserves; routing through parseTicket would change rendered output.\r\n * 2. IMAGE — image→imageUrl→image_url precedence intentionally differs\r\n * from the canonical resolver's (imageUrl-first); see the note in\r\n * api/transformers/event.ts.\r\n * 3. VENUE/PERFORMERS — mapped from the raw passthrough objects\r\n * (domain.venue / domain.performers) with B-specific `??` fee/tax\r\n * semantics; the performer canonical lands in PR #260 and should\r\n * absorb the performer map then.\r\n */\r\nexport function transformApiEvent(rawEvent: any): EventData {\r\n // Wire→domain ONCE (see composition note).\r\n const domain = parseEvent(rawEvent);\r\n const rawVenue = domain.venue || {};\r\n // Event-level timeZone is an OPTIONAL per-event override; when absent/blank it\r\n // must inherit the venue timezone. Falling straight to 'UTC' here rendered\r\n // venue-local times (e.g. a Fri 10pm Central show) in UTC (\"Sat 3:00 AM\"),\r\n // which made already-ended events look like future ones.\r\n // (domain.timeZone is the verbatim PascalCase passthrough; domain.timezone\r\n // folds lowercase + snake_case — same chain as before.)\r\n const timezone = getIANATimezone(\r\n domain.timeZone ||\r\n domain.timezone ||\r\n rawVenue.timeZone ||\r\n rawVenue.timezone ||\r\n 'UTC'\r\n );\r\n\r\n // Transform tickets — TICKET SEAM: raw wire tickets by contract (see note).\r\n const rawTickets = rawEvent.availableTickets || [];\r\n const tickets: TicketTypeData[] = rawTickets.map((t: any) => ({\r\n id: t.id || t.ID,\r\n name: t.name || t.title || '',\r\n description: t.description || undefined,\r\n price: t.price ?? 0,\r\n fee: t.fee ?? 0,\r\n quantityAvailable:\r\n t.remainingCapacity ?? t.quantityRemaining ?? t.quantity ?? 0,\r\n quantityTotal: t.totalCapacity ?? t.quantity ?? 0,\r\n minPerOrder: t.minPerOrder ?? t.minQuantity ?? 1,\r\n maxPerOrder: t.maxPerOrder ?? t.maxQuantity ?? 10,\r\n status: mapTicketStatus(t),\r\n salesStartDate:\r\n t.salesBegin || t.salesStart || t.saleBegin || t.onSaleStart || undefined,\r\n salesEndDate: t.salesEnd || t.saleEnd || t.onSaleEnd || undefined,\r\n isDonation: t.type === 2 || t.ticketType === 2 || t.isDonation === true,\r\n isHidden: t.visibility === 2 || t.isHidden === true,\r\n ticketType: t.type || t.ticketType || undefined,\r\n sectionName: t.sectionName || t.section || undefined,\r\n }));\r\n\r\n // Calculate totals from public tickets\r\n const publicTickets = tickets.filter(t => !t.isHidden && !t.isDonation);\r\n const totalRemaining = publicTickets.reduce(\r\n (sum, t) => sum + t.quantityAvailable,\r\n 0\r\n );\r\n const totalCapacity = publicTickets.reduce(\r\n (sum, t) => sum + t.quantityTotal,\r\n 0\r\n );\r\n\r\n // Determine event status\r\n const status = mapEventStatus(domain.status as string, tickets);\r\n\r\n // Build image URL — IMAGE SEAM: image-first precedence (see note).\r\n const rawImage =\r\n rawEvent.image || rawEvent.imageUrl || rawEvent.image_url || '';\r\n const imageUrl = rawImage.startsWith('http')\r\n ? rawImage\r\n : resolveImageUrl(rawImage, { cdn: true });\r\n\r\n // Venue\r\n const venue: VenueData = {\r\n id: rawVenue.id || rawVenue.ID || 0,\r\n name: rawVenue.name || rawVenue.googleLocationNameCache || '',\r\n address: rawVenue.address || rawVenue.googleLocationNameCache || '',\r\n timezone,\r\n serviceFeePercentage: rawVenue.serviceFeePercentage ?? rawVenue.fee ?? 0,\r\n serviceFeeCents: rawVenue.serviceFeeCents ?? 0,\r\n taxPercentage: rawVenue.taxPercentage ?? rawVenue.tax ?? 0,\r\n contactEmail: rawVenue.contactEmail || rawVenue.email || undefined,\r\n };\r\n\r\n // Performers — VENUE/PERFORMERS SEAM: raw passthrough map (see note).\r\n const rawPerformers = domain.performers || [];\r\n const performers: PerformerData[] = rawPerformers.map((p: any) => ({\r\n id: p.id || p.ID,\r\n displayName: p.displayName || p.name || '',\r\n profileImage: p.avatar || p.profileImage || undefined,\r\n role: p.role || undefined,\r\n }));\r\n\r\n // FAQs (may not be in API response)\r\n const faqs: FAQItem[] = (domain.faqs || []).map((f: any) => ({\r\n question: f.question || '',\r\n answer: f.answer || '',\r\n }));\r\n\r\n // Series showtimes → occurrences. A single series-event detail carries a\r\n // `showtimes` array; the v2 <ShowtimeDesigns> renders event.seriesOccurrences\r\n // under \"Upcoming Shows\". Without this map the section is always empty.\r\n const seriesOccurrences: SeriesOccurrence[] = (domain.showtimes || [])\r\n .filter((s: any) => s.published !== false)\r\n .map((s: any, i: number) => ({\r\n id: s.id ?? s.eventId ?? i + 1,\r\n slug: s.slug || '',\r\n startDateTime: s.startDateTime || s.startTime || '',\r\n endDateTime: s.endDateTime || s.endTime || '',\r\n status: (s.ctaState?.reason === 'sold_out'\r\n ? 'sold_out'\r\n : 'on_sale') as EventStatus,\r\n ctaText: s.ctaState?.text || 'Get tickets',\r\n ctaDisabled: s.ctaState?.disabled || false,\r\n }));\r\n\r\n // Date in venue timezone\r\n let date = '';\r\n if (domain.startDateTime) {\r\n const dt = new Date(domain.startDateTime);\r\n date = formatDateRaw(\r\n dt,\r\n { timeZone: timezone, year: 'numeric', month: '2-digit', day: '2-digit' },\r\n 'en-CA'\r\n );\r\n }\r\n\r\n return {\r\n id: domain.id,\r\n title: domain.title || '',\r\n slug: domain.slug || '',\r\n description: domain.description || domain.eventSummary || '',\r\n date,\r\n startDateTime: domain.startDateTime || '',\r\n endDateTime: domain.endDateTime || '',\r\n doorsOpenTime: domain.doorsOpenTime || '',\r\n timezone,\r\n imageUrl,\r\n venue,\r\n performers,\r\n tickets,\r\n faqs,\r\n disclaimer: domain.disclaimer || undefined,\r\n status,\r\n eventSeriesId: domain.eventSeriesId || undefined,\r\n seriesOccurrences: seriesOccurrences.length ? seriesOccurrences : undefined,\r\n // Public API hides the actual password (json:\"-\") and exposes a boolean\r\n // `hasPassword` flag instead; fall back to a populated `password` for\r\n // admin-shaped payloads.\r\n isPasswordProtected: domain.hasPassword === true || !!domain.password,\r\n isRegistrationEvent:\r\n domain.ticketType === 1 || domain.eventTicketingType === 1,\r\n totalTicketsRemaining: totalRemaining,\r\n totalTicketsCapacity: totalCapacity,\r\n stageName: domain.stage?.name || domain.stageName || undefined,\r\n ageRestriction: domain.ageRestriction || undefined,\r\n displayAgeRestriction: domain.displayAgeRestriction ?? false,\r\n displayStartTime: domain.displayStartTime ?? true,\r\n displayEndTime: domain.displayEndTime ?? true,\r\n displayDoorsTime: domain.displayDoorsTime ?? true,\r\n collectionId: domain.collectionId || undefined, // domain folds collection_id\r\n venueAddressLines: parseAddress(\r\n rawVenue.address || rawVenue.googleLocationNameCache || ''\r\n ),\r\n googleMapsUrl: buildGoogleMapsUrl(\r\n rawVenue.address || rawVenue.googleLocationNameCache || ''\r\n ),\r\n };\r\n}\r\n\r\n/**\r\n * Transform SeriesPageData (from the series API) into our clean EventData interface.\r\n * Sets eventSeriesId so EventExperience renders in full-width series mode.\r\n */\r\nexport function transformSeriesPageData(series: SeriesPageData): EventData {\r\n // Implementation moved to the canonical transformer home\r\n // (`$lib/api/transformers/series.ts`). This export stays as a thin delegate\r\n // so SeriesPage.svelte and other consumers don't churn.\r\n return parseSeries(series);\r\n}\r\n\r\n/**\r\n * Transform PublicCollectionData (from the collection API) into our clean EventData interface.\r\n * Sets collectionId so EventExperience renders in full-width collection mode.\r\n */\r\nexport function transformCollectionData(\r\n collection: PublicCollectionData\r\n): EventData {\r\n // Implementation moved to the canonical transformer home\r\n // (`$lib/api/transformers/collection.ts`). This export stays as a thin\r\n // delegate so CollectionView.svelte and other consumers don't churn.\r\n return parseCollection(collection);\r\n}\r\n"],"names":["size","$","$$props","color","className","ctx","useIconWeight","resolved","svg","root_2","path","root","$$render","consequent","alternate","styles","copyToClipboard","text","copyViaExecCommand","prevActive","selection","savedRanges","_","i","textarea","range","parseAddress","addressStr","parts","p","stateZipMatch","state","zip","city","lines","buildGoogleMapsUrl","address","parseSeries","series","seriesAny","timezone","getIANATimezone","imageUrl","resolveImageUrl","seriesOccurrences","occ","firstOcc","date","dt","formatDateRaw","rawFaq","faqs","f","performers","index","venueAddress","parseCollection","collection","collectionEvents","ev","mapTicketStatus","ticket","now","remaining","salesBegin","salesEnd","mapEventStatus","rawStatus","tickets","s","t","publicTickets","transformApiEvent","rawEvent","domain","parseEvent","rawVenue","totalRemaining","sum","totalCapacity","status","rawImage","venue","transformSeriesPageData","transformCollectionData"],"mappings":";;;;iBAAA;;AAmBE,MAAMA,IAAIC,EAAA,KAAAC,GAAA,QAAA,GAAG,IAAI,GAAEC,0BAAQ,cAAc,GAASC,0BAAY,EAAE;AAEhE,QAAMC,IAAMC,EAAa;AACzB,MAAIC,IAAoBN,EAAA,QAAA,MAAAC,EAAA,UAAsBG,GAAK,UAAU,SAAS;MAGvEG,IAAGC,EAAA;;kBAAHD,CAAG;;;UAUwBE,IAAIC,EAAA;kBAAJD,CAAI;AAAA;;;;;AAAzB,MAAAT,EAAA,IAAAM,CAAQ,MAAK,SAAMK,EAAAC,CAAA,IAAAD,EAAAE,GAAA,EAAA;AAAA;;UAVzBN,CAA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D,MAAA3B;AAAA,IACA,eAAe2B,EAAO,iBAAiB;AAAA,IACvC,aAAaA,EAAO,eAAe;AAAA,IACnC,eAAeA,EAAO,iBAAiB;AAAA,IACvC,UAAAlC;AAAA,IACA,UAAAE;AAAA,IACA,OAAAwC;AAAA,IACA,YAAA7B;AAAA,IACA,SAAAe;AAAA,IACA,MAAAjB;AAAA,IACA,YAAYuB,EAAO,cAAc;AAAA,IACjC,QAAAM;AAAA,IACA,eAAeN,EAAO,iBAAiB;AAAA,IACvC,mBAAmB9B,EAAkB,SAASA,IAAoB;AAAA;AAAA;AAAA;AAAA,IAIlE,qBAAqB8B,EAAO,gBAAgB,MAAQ,CAAC,CAACA,EAAO;AAAA,IAC7D,qBACEA,EAAO,eAAe,KAAKA,EAAO,uBAAuB;AAAA,IAC3D,uBAAuBG;AAAA,IACvB,sBAAsBE;AAAA,IACtB,WAAWL,EAAO,OAAO,QAAQA,EAAO,aAAa;AAAA,IACrD,gBAAgBA,EAAO,kBAAkB;AAAA,IACzC,uBAAuBA,EAAO,yBAAyB;AAAA,IACvD,kBAAkBA,EAAO,oBAAoB;AAAA,IAC7C,gBAAgBA,EAAO,kBAAkB;AAAA,IACzC,kBAAkBA,EAAO,oBAAoB;AAAA,IAC7C,cAAcA,EAAO,gBAAgB;AAAA;AAAA,IACrC,mBAAmBhD;AAAA,MACjBkD,EAAS,WAAWA,EAAS,2BAA2B;AAAA,IAAA;AAAA,IAE1D,eAAezC;AAAA,MACbyC,EAAS,WAAWA,EAAS,2BAA2B;AAAA,IAAA;AAAA,EAC1D;AAEJ;AAMO,SAASO,EAAwB7C,GAAmC;AAIzE,SAAOD,EAAYC,CAAM;AAC3B;AAMO,SAAS8C,EACd3B,GACW;AAIX,SAAOD,EAAgBC,CAAU;AACnC;","x_google_ignoreList":[0,1,2]}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -243,21 +243,27 @@ export interface SvelteComponentInstance {
|
|
|
243
243
|
* @param options - Configuration options
|
|
244
244
|
* @returns The Svelte component instance, or null if target not found
|
|
245
245
|
*/
|
|
246
|
-
export function initVenueCalendar(
|
|
246
|
+
export function initVenueCalendar(
|
|
247
|
+
options: CalendarProps
|
|
248
|
+
): SvelteComponentInstance | null;
|
|
247
249
|
|
|
248
250
|
/**
|
|
249
251
|
* Initialize the (inline) Event Page.
|
|
250
252
|
* @param options - Configuration options
|
|
251
253
|
* @returns The Svelte component instance, or null if target not found / no event
|
|
252
254
|
*/
|
|
253
|
-
export function initEventPage(
|
|
255
|
+
export function initEventPage(
|
|
256
|
+
options: EventPageOptions
|
|
257
|
+
): SvelteComponentInstance | null;
|
|
254
258
|
|
|
255
259
|
/**
|
|
256
260
|
* Initialize the Checkout View
|
|
257
261
|
* @param options - Configuration options
|
|
258
262
|
* @returns The Svelte component instance, or null if target not found or eventId missing
|
|
259
263
|
*/
|
|
260
|
-
export function initCheckoutView(
|
|
264
|
+
export function initCheckoutView(
|
|
265
|
+
options: CheckoutOptions
|
|
266
|
+
): SvelteComponentInstance | null;
|
|
261
267
|
|
|
262
268
|
/**
|
|
263
269
|
* Alias for initCheckoutView
|
|
@@ -269,7 +275,9 @@ export const initCheckout: typeof initCheckoutView;
|
|
|
269
275
|
* @param options - Configuration options
|
|
270
276
|
* @returns The Svelte component instance, or null if target not found
|
|
271
277
|
*/
|
|
272
|
-
export function initSuccessView(
|
|
278
|
+
export function initSuccessView(
|
|
279
|
+
options: SuccessViewOptions
|
|
280
|
+
): SvelteComponentInstance | null;
|
|
273
281
|
|
|
274
282
|
/**
|
|
275
283
|
* Alias for initSuccessView
|
|
@@ -290,13 +298,13 @@ export function autoMount(): void;
|
|
|
290
298
|
*/
|
|
291
299
|
export interface EmbedConfig {
|
|
292
300
|
/**
|
|
293
|
-
* Emit a
|
|
301
|
+
* Emit a MICDROP_CHECKOUT_COMPLETE postMessage when an order completes. The
|
|
294
302
|
* payload is non-PII: `{ orderId, eventId }`. Default: false.
|
|
295
303
|
*/
|
|
296
304
|
postMessageOnSuccess?: boolean;
|
|
297
305
|
/**
|
|
298
306
|
* REQUIRED concrete origin (e.g. 'https://venue.example') for the
|
|
299
|
-
*
|
|
307
|
+
* MICDROP_CHECKOUT_COMPLETE message. The message is never posted to '*'; without a
|
|
300
308
|
* concrete absolute origin nothing is sent and a warning is logged.
|
|
301
309
|
*/
|
|
302
310
|
postMessageTargetOrigin?: string | null;
|
|
@@ -321,10 +329,12 @@ export interface ConfigureVenueCalendarOptions {
|
|
|
321
329
|
|
|
322
330
|
/**
|
|
323
331
|
* Configure the calendar widget at runtime: error reporting, API overrides,
|
|
324
|
-
* and the opt-in embed integration (e.g. the
|
|
332
|
+
* and the opt-in embed integration (e.g. the MICDROP_CHECKOUT_COMPLETE postMessage).
|
|
325
333
|
* @param options - Configuration options
|
|
326
334
|
*/
|
|
327
|
-
export function configureVenueCalendar(
|
|
335
|
+
export function configureVenueCalendar(
|
|
336
|
+
options?: ConfigureVenueCalendarOptions
|
|
337
|
+
): void;
|
|
328
338
|
|
|
329
339
|
// ============================================================================
|
|
330
340
|
// Theme Exports
|
|
@@ -355,7 +365,10 @@ export const highContrastTheme: ThemeColors;
|
|
|
355
365
|
* @param theme - Theme object with HSL color values
|
|
356
366
|
* @param container - Optional container element (defaults to document.documentElement)
|
|
357
367
|
*/
|
|
358
|
-
export function applyTheme(
|
|
368
|
+
export function applyTheme(
|
|
369
|
+
theme: Partial<ThemeColors>,
|
|
370
|
+
container?: HTMLElement
|
|
371
|
+
): void;
|
|
359
372
|
|
|
360
373
|
/**
|
|
361
374
|
* Generate CSS string for embedding themes
|
|
@@ -373,7 +386,6 @@ export function generateThemeCSS(theme: Partial<ThemeColors>): string;
|
|
|
373
386
|
*/
|
|
374
387
|
export const VenueCalendar: any;
|
|
375
388
|
|
|
376
|
-
|
|
377
389
|
/**
|
|
378
390
|
* Checkout Svelte component
|
|
379
391
|
*/
|