@getmicdrop/venue-calendar 4.0.64 → 4.0.66
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/{CarouselView.legacy-CHlVZ-nC.js → CarouselView.legacy-DwyJJIav.js} +3 -3
- package/dist/{CarouselView.legacy-CHlVZ-nC.js.map → CarouselView.legacy-DwyJJIav.js.map} +1 -1
- package/dist/{CartView-BAeAbkEa.js → CartView-C9EUV8-X.js} +3 -3
- package/dist/{CartView-BAeAbkEa.js.map → CartView-C9EUV8-X.js.map} +1 -1
- package/dist/{Checkout-BbAroeeC.js → Checkout-BpqHdIxi.js} +62 -62
- package/dist/Checkout-BpqHdIxi.js.map +1 -0
- package/dist/{Checkout-2oWblXIZ.js → Checkout-Q0ZAQ-H5.js} +5 -5
- package/dist/{Checkout-2oWblXIZ.js.map → Checkout-Q0ZAQ-H5.js.map} +1 -1
- package/dist/{Checkout.legacy-Caboro1G.js → Checkout.legacy-CKEzImRg.js} +5 -5
- package/dist/{Checkout.legacy-Caboro1G.js.map → Checkout.legacy-CKEzImRg.js.map} +1 -1
- package/dist/{CheckoutTimer-Cz5G7vxK.js → CheckoutTimer-OaGZBWkq.js} +2 -2
- package/dist/{CheckoutTimer-Cz5G7vxK.js.map → CheckoutTimer-OaGZBWkq.js.map} +1 -1
- package/dist/{CollectionView-DEKutvzz.js → CollectionView-Cu1tSX98.js} +5 -5
- package/dist/{CollectionView-DEKutvzz.js.map → CollectionView-Cu1tSX98.js.map} +1 -1
- package/dist/{CollectionView.legacy-BTwbPnx9.js → CollectionView.legacy-CfXW9Hs2.js} +3 -3
- package/dist/{CollectionView.legacy-BTwbPnx9.js.map → CollectionView.legacy-CfXW9Hs2.js.map} +1 -1
- package/dist/{Event-CjaJ5o3v.js → Event-gWjWmwBL.js} +4 -4
- package/dist/{Event-CjaJ5o3v.js.map → Event-gWjWmwBL.js.map} +1 -1
- package/dist/{EventDetailsView-DXnhlk3-.js → EventDetailsView-z8iE9m25.js} +6 -6
- package/dist/{EventDetailsView-DXnhlk3-.js.map → EventDetailsView-z8iE9m25.js.map} +1 -1
- package/dist/{EventPage-C0lONi_3.js → EventPage-BuM5a5jv.js} +5 -5
- package/dist/{EventPage-C0lONi_3.js.map → EventPage-BuM5a5jv.js.map} +1 -1
- package/dist/{EventPage.legacy-BEKcjbI4.js → EventPage.legacy-BFMUEm7m.js} +5 -5
- package/dist/{EventPage.legacy-BEKcjbI4.js.map → EventPage.legacy-BFMUEm7m.js.map} +1 -1
- package/dist/{FeaturedView.legacy-BkepqGg3.js → FeaturedView.legacy-BsGMp211.js} +2 -2
- package/dist/{FeaturedView.legacy-BkepqGg3.js.map → FeaturedView.legacy-BsGMp211.js.map} +1 -1
- package/dist/{GalleryCard-DceWAls1.js → GalleryCard-D4kI6OPh.js} +2 -2
- package/dist/{GalleryCard-DceWAls1.js.map → GalleryCard-D4kI6OPh.js.map} +1 -1
- package/dist/{GalleryView.legacy-CA95oQGJ.js → GalleryView.legacy-BxueLwgD.js} +3 -3
- package/dist/{GalleryView.legacy-CA95oQGJ.js.map → GalleryView.legacy-BxueLwgD.js.map} +1 -1
- package/dist/{GroupedListView.legacy-oOoTwXPq.js → GroupedListView.legacy-DLRzoXJO.js} +2 -2
- package/dist/{GroupedListView.legacy-oOoTwXPq.js.map → GroupedListView.legacy-DLRzoXJO.js.map} +1 -1
- package/dist/{OrderSummary-DRXcg2M_.js → OrderSummary-OMzQwWpd.js} +2 -2
- package/dist/{OrderSummary-DRXcg2M_.js.map → OrderSummary-OMzQwWpd.js.map} +1 -1
- package/dist/{PromoCodeInput-wPJjGt_v.js → PromoCodeInput-DqZLWySx.js} +3 -3
- package/dist/{PromoCodeInput-wPJjGt_v.js.map → PromoCodeInput-DqZLWySx.js.map} +1 -1
- package/dist/{SeriesPage-BRrpv4-3.js → SeriesPage-Df8RQrHs.js} +5 -5
- package/dist/{SeriesPage-BRrpv4-3.js.map → SeriesPage-Df8RQrHs.js.map} +1 -1
- package/dist/{SeriesPage.legacy-BIKd6SYo.js → SeriesPage.legacy-B1YH-fxL.js} +2 -2
- package/dist/{SeriesPage.legacy-BIKd6SYo.js.map → SeriesPage.legacy-B1YH-fxL.js.map} +1 -1
- package/dist/{Success-fMTg0QHe.js → Success-C5qdC9Br.js} +7 -7
- package/dist/Success-C5qdC9Br.js.map +1 -0
- package/dist/{Success.legacy-DwLdwq_g.js → Success.legacy-DxyhNRyc.js} +2 -2
- package/dist/{Success.legacy-DwLdwq_g.js.map → Success.legacy-DxyhNRyc.js.map} +1 -1
- package/dist/{VenueCalendar-ySqncMTn.js → VenueCalendar-B5CwsNGf.js} +272 -253
- package/dist/{VenueCalendar-ySqncMTn.js.map → VenueCalendar-B5CwsNGf.js.map} +1 -1
- package/dist/{ViewTicketsEmbed-1X1K2UGI.js → ViewTicketsEmbed-CT8a3M7e.js} +3 -3
- package/dist/{ViewTicketsEmbed-1X1K2UGI.js.map → ViewTicketsEmbed-CT8a3M7e.js.map} +1 -1
- package/dist/{WaitlistModal-DqPbCdOl.js → WaitlistModal-BO61UvHP.js} +107 -107
- package/dist/WaitlistModal-BO61UvHP.js.map +1 -0
- package/dist/{api-ohGBZw0r.js → api-DgNDXvfr.js} +2 -2
- package/dist/{api-ohGBZw0r.js.map → api-DgNDXvfr.js.map} +1 -1
- package/dist/{data-toggle-store.svelte-CxjHrCmm.js → data-toggle-store.svelte-CG8qrFd9.js} +2 -2
- package/dist/{data-toggle-store.svelte-CxjHrCmm.js.map → data-toggle-store.svelte-CG8qrFd9.js.map} +1 -1
- package/dist/seo/helpers.d.ts +23 -0
- package/dist/seo/index.d.ts +2 -1
- package/dist/seo/seo.cjs +1 -1
- package/dist/seo/seo.cjs.map +1 -1
- package/dist/seo/seo.mjs +197 -177
- package/dist/seo/seo.mjs.map +1 -1
- package/dist/seo/types.d.ts +150 -137
- package/dist/{transform-CmXbkRWL.js → transform-BBzZumfP.js} +78 -78
- package/dist/transform-BBzZumfP.js.map +1 -0
- package/dist/venue-calendar.css +1 -1
- package/dist/venue-calendar.es.js +2 -2
- package/dist/venue-calendar.iife.js +43 -43
- package/dist/venue-calendar.iife.js.map +1 -1
- package/dist/venue-calendar.umd.js +27 -27
- package/dist/venue-calendar.umd.js.map +1 -1
- package/package.json +1 -1
- package/dist/Checkout-BbAroeeC.js.map +0 -1
- package/dist/Success-fMTg0QHe.js.map +0 -1
- package/dist/WaitlistModal-DqPbCdOl.js.map +0 -1
- package/dist/transform-CmXbkRWL.js.map +0 -1
package/dist/seo/seo.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
function
|
|
1
|
+
function A() {
|
|
2
2
|
return "America/Los_Angeles";
|
|
3
3
|
}
|
|
4
|
-
function
|
|
4
|
+
function v(i, t) {
|
|
5
5
|
if (!i) return null;
|
|
6
|
-
const
|
|
7
|
-
if (isNaN(
|
|
6
|
+
const e = new Date(i);
|
|
7
|
+
if (isNaN(e.getTime())) return null;
|
|
8
8
|
const s = new Intl.DateTimeFormat("en-US", {
|
|
9
|
-
timeZone:
|
|
9
|
+
timeZone: t,
|
|
10
10
|
year: "numeric",
|
|
11
11
|
month: "2-digit",
|
|
12
12
|
day: "2-digit",
|
|
@@ -15,60 +15,67 @@ function _(i, e) {
|
|
|
15
15
|
second: "2-digit",
|
|
16
16
|
hour12: !1,
|
|
17
17
|
timeZoneName: "shortOffset"
|
|
18
|
-
}).formatToParts(
|
|
18
|
+
}).formatToParts(e), r = (u) => s.find((p) => p.type === u)?.value || "", o = r("year"), l = r("month"), c = r("day"), a = r("hour"), d = r("minute"), m = r("second"), h = r("timeZoneName");
|
|
19
19
|
let g = "+00:00";
|
|
20
20
|
if (h) {
|
|
21
|
-
const
|
|
22
|
-
if (
|
|
23
|
-
const p =
|
|
24
|
-
g = `${p}${
|
|
21
|
+
const u = h.match(/GMT([+-])(\d+)(?::(\d+))?/);
|
|
22
|
+
if (u) {
|
|
23
|
+
const p = u[1], E = u[2].padStart(2, "0"), P = u[3] || "00";
|
|
24
|
+
g = `${p}${E}:${P}`;
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
|
-
return `${o}-${
|
|
27
|
+
return `${o}-${l}-${c}T${a}:${d}:${m}${g}`;
|
|
28
28
|
}
|
|
29
|
-
function
|
|
29
|
+
function I(i) {
|
|
30
30
|
if (!i) return null;
|
|
31
|
-
const
|
|
32
|
-
if (
|
|
31
|
+
const t = i.split(",").map((s) => s.trim());
|
|
32
|
+
if (t.length < 2)
|
|
33
33
|
return {
|
|
34
34
|
"@type": "PostalAddress",
|
|
35
35
|
streetAddress: i,
|
|
36
36
|
addressCountry: "US"
|
|
37
37
|
};
|
|
38
|
-
const n =
|
|
39
|
-
return n &&
|
|
38
|
+
const n = t[t.length - 1].match(/^([A-Z]{2})\s+(\d{5}(?:-\d{4})?)$/);
|
|
39
|
+
return n && t.length >= 3 ? {
|
|
40
40
|
"@type": "PostalAddress",
|
|
41
|
-
streetAddress:
|
|
42
|
-
addressLocality:
|
|
41
|
+
streetAddress: t.slice(0, -2).join(", "),
|
|
42
|
+
addressLocality: t[t.length - 2],
|
|
43
43
|
addressRegion: n[1],
|
|
44
44
|
postalCode: n[2],
|
|
45
45
|
addressCountry: "US"
|
|
46
46
|
} : {
|
|
47
47
|
"@type": "PostalAddress",
|
|
48
|
-
streetAddress:
|
|
49
|
-
addressLocality:
|
|
48
|
+
streetAddress: t[0],
|
|
49
|
+
addressLocality: t.slice(1).join(", "),
|
|
50
50
|
addressCountry: "US"
|
|
51
51
|
};
|
|
52
52
|
}
|
|
53
|
-
function
|
|
53
|
+
function N(i, t) {
|
|
54
|
+
if (i && (i.city || i.state || i.postalCode)) {
|
|
55
|
+
const e = { "@type": "PostalAddress" };
|
|
56
|
+
return i.address && (e.streetAddress = i.address), i.city && (e.addressLocality = i.city), i.state && (e.addressRegion = i.state), i.postalCode && (e.postalCode = i.postalCode), e.addressCountry = i.country || "US", e;
|
|
57
|
+
}
|
|
58
|
+
return I(i && i.address || t || null);
|
|
59
|
+
}
|
|
60
|
+
function T(i) {
|
|
54
61
|
if (!i) return "https://schema.org/EventScheduled";
|
|
55
|
-
const
|
|
56
|
-
return
|
|
62
|
+
const t = i.toLowerCase();
|
|
63
|
+
return t === "cancelled" || t === "canceled" ? "https://schema.org/EventCancelled" : t === "postponed" ? "https://schema.org/EventPostponed" : t === "rescheduled" ? "https://schema.org/EventRescheduled" : "https://schema.org/EventScheduled";
|
|
57
64
|
}
|
|
58
|
-
function
|
|
65
|
+
function _(i) {
|
|
59
66
|
if ((i.remainingCapacity ?? i.quantityRemaining ?? i.quantity) === 0 || i.soldOut)
|
|
60
67
|
return "https://schema.org/SoldOut";
|
|
61
|
-
const
|
|
62
|
-
return n && new Date(n) >
|
|
68
|
+
const e = /* @__PURE__ */ new Date(), n = i.salesBegin || i.salesStart || i.saleBegin || i.onSaleStart, s = i.salesEnd || i.saleEnd || i.onSaleEnd;
|
|
69
|
+
return n && new Date(n) > e ? "https://schema.org/PreOrder" : s && new Date(s) < e ? "https://schema.org/SoldOut" : "https://schema.org/InStock";
|
|
63
70
|
}
|
|
64
|
-
function
|
|
71
|
+
function L(i, t) {
|
|
65
72
|
if (!i || i.length === 0) return null;
|
|
66
|
-
const
|
|
67
|
-
const c =
|
|
68
|
-
return
|
|
73
|
+
const e = i.filter((l) => {
|
|
74
|
+
const c = l.visibility ?? 0, a = c === 0 || c === 1, d = l.salesChannel !== 2;
|
|
75
|
+
return a && d;
|
|
69
76
|
});
|
|
70
|
-
if (
|
|
71
|
-
const n =
|
|
77
|
+
if (e.length === 0) return null;
|
|
78
|
+
const n = e.map((l) => parseFloat(String(l.price ?? 0))).filter((l) => !isNaN(l));
|
|
72
79
|
if (n.length === 0) return null;
|
|
73
80
|
const s = Math.min(...n), r = Math.max(...n);
|
|
74
81
|
if (s !== r)
|
|
@@ -77,78 +84,84 @@ function P(i, e) {
|
|
|
77
84
|
lowPrice: s,
|
|
78
85
|
highPrice: r,
|
|
79
86
|
priceCurrency: "USD",
|
|
80
|
-
availability:
|
|
81
|
-
url:
|
|
82
|
-
validFrom:
|
|
87
|
+
availability: _(e[0]),
|
|
88
|
+
url: t || void 0,
|
|
89
|
+
validFrom: e[0]?.salesBegin || e[0]?.salesStart || void 0
|
|
83
90
|
};
|
|
84
|
-
const o =
|
|
91
|
+
const o = e[0];
|
|
85
92
|
return {
|
|
86
93
|
"@type": "Offer",
|
|
87
94
|
price: s,
|
|
88
95
|
priceCurrency: "USD",
|
|
89
|
-
availability:
|
|
90
|
-
url:
|
|
96
|
+
availability: _(o),
|
|
97
|
+
url: t || void 0,
|
|
91
98
|
validFrom: o?.salesBegin || o?.salesStart || void 0
|
|
92
99
|
};
|
|
93
100
|
}
|
|
94
101
|
function $(i) {
|
|
95
102
|
if (!i || i.length === 0) return null;
|
|
96
|
-
const
|
|
97
|
-
const n =
|
|
103
|
+
const t = i.filter((e) => {
|
|
104
|
+
const n = e.acceptedState === 2, s = !e.shouldBeHidden, r = e.RosterPerformer?.User?.performerProfile, o = r?.firstName || r?.lastName || r?.displayName;
|
|
98
105
|
return n && s && o;
|
|
99
106
|
});
|
|
100
|
-
return
|
|
101
|
-
const n =
|
|
107
|
+
return t.length === 0 ? null : t.map((e) => {
|
|
108
|
+
const n = e.RosterPerformer?.User?.performerProfile;
|
|
102
109
|
return {
|
|
103
110
|
"@type": "PerformingGroup",
|
|
104
111
|
name: n?.displayName || [n?.firstName, n?.lastName].filter(Boolean).join(" ")
|
|
105
112
|
};
|
|
106
113
|
});
|
|
107
114
|
}
|
|
108
|
-
function
|
|
115
|
+
function O(i) {
|
|
109
116
|
const {
|
|
110
|
-
event:
|
|
111
|
-
venue:
|
|
112
|
-
venueTimeZone: n =
|
|
117
|
+
event: t,
|
|
118
|
+
venue: e,
|
|
119
|
+
venueTimeZone: n = A(),
|
|
113
120
|
eventUrl: s,
|
|
114
121
|
organizer: r
|
|
115
122
|
} = i;
|
|
116
|
-
if (!
|
|
117
|
-
const o =
|
|
118
|
-
|
|
123
|
+
if (!t) return null;
|
|
124
|
+
const o = v(
|
|
125
|
+
t.startDateTime,
|
|
126
|
+
n
|
|
127
|
+
);
|
|
128
|
+
if (!t.name || !o || !e?.name)
|
|
119
129
|
return null;
|
|
120
|
-
const
|
|
130
|
+
const l = N(
|
|
131
|
+
e,
|
|
132
|
+
e?.googleLocationNameCache
|
|
133
|
+
), c = {
|
|
121
134
|
"@type": "Place",
|
|
122
|
-
name:
|
|
135
|
+
name: e.name
|
|
123
136
|
};
|
|
124
|
-
|
|
125
|
-
const
|
|
137
|
+
l && (c.address = l);
|
|
138
|
+
const a = {
|
|
126
139
|
"@context": "https://schema.org",
|
|
127
140
|
"@type": "Event",
|
|
128
|
-
name:
|
|
129
|
-
startDate:
|
|
130
|
-
eventStatus:
|
|
141
|
+
name: t.name,
|
|
142
|
+
startDate: o,
|
|
143
|
+
eventStatus: T(t.status),
|
|
131
144
|
eventAttendanceMode: "https://schema.org/OfflineEventAttendanceMode",
|
|
132
|
-
location:
|
|
133
|
-
},
|
|
134
|
-
|
|
135
|
-
const
|
|
136
|
-
|
|
137
|
-
const
|
|
138
|
-
|
|
139
|
-
const
|
|
140
|
-
|
|
141
|
-
const
|
|
142
|
-
if (
|
|
143
|
-
const
|
|
145
|
+
location: c
|
|
146
|
+
}, d = v(t.endDateTime, n);
|
|
147
|
+
d && (a.endDate = d);
|
|
148
|
+
const m = t.description || t.eventSummary;
|
|
149
|
+
m && (a.description = m);
|
|
150
|
+
const h = t.image || t.coverImage || t.ShowImage;
|
|
151
|
+
h && (a.image = [h]);
|
|
152
|
+
const g = L(t.availableTickets, s);
|
|
153
|
+
g && (a.offers = g);
|
|
154
|
+
const u = $(t.performers);
|
|
155
|
+
if (u && u.length > 0 && (a.performer = u), r?.name) {
|
|
156
|
+
const p = {
|
|
144
157
|
"@type": "Organization",
|
|
145
158
|
name: r.name
|
|
146
159
|
};
|
|
147
|
-
r.url && (
|
|
160
|
+
r.url && (p.url = r.url), a.organizer = p;
|
|
148
161
|
}
|
|
149
|
-
return s && (
|
|
162
|
+
return s && (a.url = s), a;
|
|
150
163
|
}
|
|
151
|
-
function
|
|
164
|
+
function b(i) {
|
|
152
165
|
switch (i) {
|
|
153
166
|
case "available":
|
|
154
167
|
return "https://schema.org/InStock";
|
|
@@ -162,29 +175,29 @@ function S(i) {
|
|
|
162
175
|
return "https://schema.org/InStock";
|
|
163
176
|
}
|
|
164
177
|
}
|
|
165
|
-
function
|
|
178
|
+
function U(i, t) {
|
|
166
179
|
if (!i || i.length === 0) return null;
|
|
167
|
-
const
|
|
180
|
+
const e = i.filter(
|
|
168
181
|
(o) => o.status !== "sold_out" && o.status !== "ended"
|
|
169
182
|
);
|
|
170
|
-
if (
|
|
171
|
-
const o = i.map((
|
|
183
|
+
if (e.length === 0) {
|
|
184
|
+
const o = i.map((a) => a.price).filter((a) => !isNaN(a));
|
|
172
185
|
if (o.length === 0) return null;
|
|
173
|
-
const
|
|
174
|
-
return
|
|
186
|
+
const l = Math.min(...o), c = Math.max(...o);
|
|
187
|
+
return l !== c ? {
|
|
175
188
|
"@type": "AggregateOffer",
|
|
176
|
-
lowPrice:
|
|
189
|
+
lowPrice: l,
|
|
177
190
|
highPrice: c,
|
|
178
191
|
priceCurrency: "USD",
|
|
179
192
|
availability: "https://schema.org/SoldOut"
|
|
180
193
|
} : {
|
|
181
194
|
"@type": "Offer",
|
|
182
|
-
price:
|
|
195
|
+
price: l,
|
|
183
196
|
priceCurrency: "USD",
|
|
184
197
|
availability: "https://schema.org/SoldOut"
|
|
185
198
|
};
|
|
186
199
|
}
|
|
187
|
-
const n =
|
|
200
|
+
const n = e.map((o) => o.price).filter((o) => !isNaN(o));
|
|
188
201
|
if (n.length === 0) return null;
|
|
189
202
|
const s = Math.min(...n), r = Math.max(...n);
|
|
190
203
|
return s !== r ? {
|
|
@@ -192,160 +205,166 @@ function O(i, e) {
|
|
|
192
205
|
lowPrice: s,
|
|
193
206
|
highPrice: r,
|
|
194
207
|
priceCurrency: "USD",
|
|
195
|
-
availability:
|
|
208
|
+
availability: b(e[0].status)
|
|
196
209
|
} : {
|
|
197
210
|
"@type": "Offer",
|
|
198
211
|
price: s,
|
|
199
212
|
priceCurrency: "USD",
|
|
200
|
-
availability:
|
|
213
|
+
availability: b(e[0].status)
|
|
201
214
|
};
|
|
202
215
|
}
|
|
203
216
|
function D(i) {
|
|
204
|
-
const { series:
|
|
205
|
-
if (!
|
|
206
|
-
const n =
|
|
217
|
+
const { series: t, baseEventUrl: e } = i;
|
|
218
|
+
if (!t.title || !t.occurrences || t.occurrences.length === 0 || !t.venue?.name) return null;
|
|
219
|
+
const n = N(
|
|
220
|
+
t.venue,
|
|
221
|
+
t.venue.googleLocationNameCache
|
|
222
|
+
), s = {
|
|
207
223
|
"@type": "Place",
|
|
208
|
-
name:
|
|
224
|
+
name: t.venue.name
|
|
209
225
|
};
|
|
210
226
|
n && (s.address = n);
|
|
211
227
|
const r = {
|
|
212
228
|
"@context": "https://schema.org",
|
|
213
229
|
"@type": "EventSeries",
|
|
214
|
-
name:
|
|
230
|
+
name: t.title,
|
|
215
231
|
location: s
|
|
216
|
-
}, o =
|
|
217
|
-
o && (r.description = o),
|
|
218
|
-
const
|
|
219
|
-
|
|
232
|
+
}, o = t.description || t.eventSummary;
|
|
233
|
+
o && (r.description = o), t.image && (r.image = [t.image]);
|
|
234
|
+
const l = t.performers?.filter((a) => a.displayName);
|
|
235
|
+
l && l.length > 0 && (r.performer = l.map((a) => ({
|
|
220
236
|
"@type": "PerformingGroup",
|
|
221
|
-
name:
|
|
237
|
+
name: a.displayName
|
|
222
238
|
})));
|
|
223
239
|
const c = [];
|
|
224
|
-
for (const
|
|
225
|
-
const
|
|
226
|
-
|
|
240
|
+
for (const a of t.occurrences) {
|
|
241
|
+
const d = v(
|
|
242
|
+
a.startDateTime,
|
|
243
|
+
t.timeZone
|
|
244
|
+
);
|
|
245
|
+
if (!d) continue;
|
|
227
246
|
const m = {
|
|
228
247
|
"@type": "Event",
|
|
229
|
-
name:
|
|
230
|
-
startDate:
|
|
231
|
-
eventStatus:
|
|
248
|
+
name: a.title,
|
|
249
|
+
startDate: d,
|
|
250
|
+
eventStatus: T(a.status),
|
|
232
251
|
location: s
|
|
233
252
|
};
|
|
234
|
-
|
|
235
|
-
const h =
|
|
253
|
+
e && (m["@id"] = `${e}/${a.id}-${a.slug}`);
|
|
254
|
+
const h = v(a.endDateTime, t.timeZone);
|
|
236
255
|
h && (m.endDate = h);
|
|
237
|
-
const g =
|
|
256
|
+
const g = U(a.tickets, a.status);
|
|
238
257
|
g && (m.offers = g), c.push(m);
|
|
239
258
|
}
|
|
240
259
|
return c.length === 0 ? null : (r.subEvent = c, r);
|
|
241
260
|
}
|
|
242
|
-
function
|
|
243
|
-
const { collection:
|
|
244
|
-
if (!
|
|
261
|
+
function C(i) {
|
|
262
|
+
const { collection: t, baseEventUrl: e } = i;
|
|
263
|
+
if (!t.collectionTitle || !t.events || t.events.length === 0) return null;
|
|
245
264
|
const n = [];
|
|
246
|
-
for (const o of
|
|
265
|
+
for (const o of t.events) {
|
|
247
266
|
if (!o.title) continue;
|
|
248
|
-
const
|
|
267
|
+
const l = {
|
|
249
268
|
"@type": "ListItem",
|
|
250
269
|
position: n.length + 1,
|
|
251
270
|
name: o.title
|
|
252
271
|
};
|
|
253
|
-
|
|
272
|
+
e && (l.url = o.slug ? `${e}/${o.id}-${o.slug}` : `${e}/${o.id}`), n.push(l);
|
|
254
273
|
}
|
|
255
274
|
if (n.length === 0) return null;
|
|
256
275
|
const s = {
|
|
257
276
|
"@context": "https://schema.org",
|
|
258
277
|
"@type": "CollectionPage",
|
|
259
|
-
name:
|
|
260
|
-
}, r =
|
|
261
|
-
return r && (s.description = r),
|
|
278
|
+
name: t.collectionTitle
|
|
279
|
+
}, r = t.description || t.summary;
|
|
280
|
+
return r && (s.description = r), t.coverImage && (s.image = [t.coverImage]), s.mainEntity = {
|
|
262
281
|
"@type": "ItemList",
|
|
263
282
|
numberOfItems: n.length,
|
|
264
283
|
itemListElement: n
|
|
265
284
|
}, s;
|
|
266
285
|
}
|
|
267
|
-
function
|
|
286
|
+
function y(i) {
|
|
268
287
|
return i ? i.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/\s+/g, "-").replace(/--+/g, "-").replace(/^-+|-+$/g, "") : "";
|
|
269
288
|
}
|
|
270
289
|
const f = class f {
|
|
271
|
-
constructor(
|
|
272
|
-
this._state = "idle", this._originals = null, this._originalsSaved = !1, this._events = [], !(typeof document > "u") && (f._activeInstance && f._activeInstance !== this && f._activeInstance.destroy(), this._venueName =
|
|
290
|
+
constructor(t) {
|
|
291
|
+
this._state = "idle", this._originals = null, this._originalsSaved = !1, this._events = [], !(typeof document > "u") && (f._activeInstance && f._activeInstance !== this && f._activeInstance.destroy(), this._venueName = t.venueName, this._venueAddress = t.venueAddress, this._venueTimeZone = t.venueTimeZone || A(), this._baseUrl = t.baseUrl || window.location.origin + window.location.pathname, this._saveOriginals(), f._activeInstance = this);
|
|
273
292
|
}
|
|
274
293
|
// ---------------------------------------------------------------------------
|
|
275
294
|
// Private helpers
|
|
276
295
|
// ---------------------------------------------------------------------------
|
|
277
296
|
_saveOriginals() {
|
|
278
297
|
if (this._originalsSaved) return;
|
|
279
|
-
const
|
|
298
|
+
const t = document.querySelector('link[rel="canonical"]'), e = document.querySelector('meta[property="og:title"]'), n = document.querySelector('meta[property="og:description"]'), s = document.querySelector('meta[property="og:image"]'), r = document.querySelector('meta[property="og:url"]'), o = document.querySelector('meta[property="og:type"]'), l = document.querySelector('meta[name="description"]');
|
|
280
299
|
this._originals = {
|
|
281
300
|
title: document.title,
|
|
282
|
-
canonicalHref:
|
|
283
|
-
ogTitle:
|
|
301
|
+
canonicalHref: t?.getAttribute("href") ?? null,
|
|
302
|
+
ogTitle: e?.getAttribute("content") ?? null,
|
|
284
303
|
ogDescription: n?.getAttribute("content") ?? null,
|
|
285
304
|
ogImage: s?.getAttribute("content") ?? null,
|
|
286
305
|
ogUrl: r?.getAttribute("content") ?? null,
|
|
287
306
|
ogType: o?.getAttribute("content") ?? null,
|
|
288
|
-
metaDescription:
|
|
307
|
+
metaDescription: l?.getAttribute("content") ?? null
|
|
289
308
|
}, this._originalsSaved = !0;
|
|
290
309
|
}
|
|
291
|
-
_injectJsonLd(
|
|
310
|
+
_injectJsonLd(t) {
|
|
292
311
|
if (typeof document > "u") return;
|
|
293
312
|
document.querySelectorAll('script[data-micdrop="jsonld"]').forEach((n) => n.remove());
|
|
294
|
-
const
|
|
295
|
-
|
|
313
|
+
const e = document.createElement("script");
|
|
314
|
+
e.setAttribute("type", "application/ld+json"), e.setAttribute("data-micdrop", "jsonld"), e.textContent = JSON.stringify(t), document.head.appendChild(e);
|
|
296
315
|
}
|
|
297
|
-
_setMeta(
|
|
316
|
+
_setMeta(t, e) {
|
|
298
317
|
if (!(typeof document > "u"))
|
|
299
|
-
if (
|
|
300
|
-
let n = document.querySelector(`meta[property="${
|
|
301
|
-
n ? n.setAttribute("content",
|
|
318
|
+
if (t.startsWith("og:")) {
|
|
319
|
+
let n = document.querySelector(`meta[property="${t}"]`);
|
|
320
|
+
n ? n.setAttribute("content", e) : (n = document.createElement("meta"), n.setAttribute("property", t), n.setAttribute("content", e), n.setAttribute("data-micdrop", "og"), document.head.appendChild(n));
|
|
302
321
|
} else {
|
|
303
|
-
let n = document.querySelector(`meta[name="${
|
|
304
|
-
n ? n.setAttribute("content",
|
|
322
|
+
let n = document.querySelector(`meta[name="${t}"]`);
|
|
323
|
+
n ? n.setAttribute("content", e) : (n = document.createElement("meta"), n.setAttribute("name", t), n.setAttribute("content", e), n.setAttribute("data-micdrop", "meta"), document.head.appendChild(n));
|
|
305
324
|
}
|
|
306
325
|
}
|
|
307
|
-
_setCanonical(
|
|
326
|
+
_setCanonical(t) {
|
|
308
327
|
if (typeof document > "u") return;
|
|
309
|
-
let
|
|
310
|
-
|
|
328
|
+
let e = document.querySelector('link[rel="canonical"]');
|
|
329
|
+
e ? e.setAttribute("href", t) : (e = document.createElement("link"), e.setAttribute("rel", "canonical"), e.setAttribute("href", t), e.setAttribute("data-micdrop", "canonical"), document.head.appendChild(e));
|
|
311
330
|
}
|
|
312
331
|
_removeAllInjected() {
|
|
313
|
-
typeof document > "u" || document.querySelectorAll("[data-micdrop]").forEach((
|
|
332
|
+
typeof document > "u" || document.querySelectorAll("[data-micdrop]").forEach((t) => t.remove());
|
|
314
333
|
}
|
|
315
334
|
_restoreOriginals() {
|
|
316
335
|
if (!(typeof document > "u" || !this._originals)) {
|
|
317
336
|
if (document.title = this._originals.title, this._originals.canonicalHref !== null) {
|
|
318
|
-
const
|
|
319
|
-
|
|
337
|
+
const t = document.querySelector('link[rel="canonical"]');
|
|
338
|
+
t && t.setAttribute("href", this._originals.canonicalHref);
|
|
320
339
|
}
|
|
321
340
|
this._restoreMetaProperty("og:title", this._originals.ogTitle), this._restoreMetaProperty("og:description", this._originals.ogDescription), this._restoreMetaProperty("og:image", this._originals.ogImage), this._restoreMetaProperty("og:url", this._originals.ogUrl), this._restoreMetaProperty("og:type", this._originals.ogType), this._restoreMetaName("description", this._originals.metaDescription), this._originalsSaved = !1;
|
|
322
341
|
}
|
|
323
342
|
}
|
|
324
|
-
_restoreMetaProperty(
|
|
325
|
-
const n = document.querySelector(`meta[property="${
|
|
326
|
-
|
|
343
|
+
_restoreMetaProperty(t, e) {
|
|
344
|
+
const n = document.querySelector(`meta[property="${t}"]`);
|
|
345
|
+
e !== null && n ? n.setAttribute("content", e) : e === null && n?.hasAttribute("data-micdrop") && n.remove();
|
|
327
346
|
}
|
|
328
|
-
_restoreMetaName(
|
|
329
|
-
const n = document.querySelector(`meta[name="${
|
|
330
|
-
|
|
347
|
+
_restoreMetaName(t, e) {
|
|
348
|
+
const n = document.querySelector(`meta[name="${t}"]`);
|
|
349
|
+
e !== null && n ? n.setAttribute("content", e) : e === null && n?.hasAttribute("data-micdrop") && n.remove();
|
|
331
350
|
}
|
|
332
|
-
_buildItemList(
|
|
351
|
+
_buildItemList(t) {
|
|
333
352
|
return {
|
|
334
353
|
"@context": "https://schema.org",
|
|
335
354
|
"@type": "ItemList",
|
|
336
|
-
itemListElement:
|
|
337
|
-
const s =
|
|
355
|
+
itemListElement: t.map((e, n) => {
|
|
356
|
+
const s = e.slug || y(e.name);
|
|
338
357
|
return {
|
|
339
358
|
"@type": "ListItem",
|
|
340
359
|
position: n + 1,
|
|
341
|
-
url: `${this._baseUrl}?e=${
|
|
360
|
+
url: `${this._baseUrl}?e=${e.id}-${s}`
|
|
342
361
|
};
|
|
343
362
|
})
|
|
344
363
|
};
|
|
345
364
|
}
|
|
346
|
-
_buildEntityUrl(
|
|
347
|
-
const s =
|
|
348
|
-
return `${this._baseUrl}?${s}=${
|
|
365
|
+
_buildEntityUrl(t, e, n) {
|
|
366
|
+
const s = t === "event" ? "e" : t === "series" ? "s" : "c";
|
|
367
|
+
return `${this._baseUrl}?${s}=${e}-${n}`;
|
|
349
368
|
}
|
|
350
369
|
// ---------------------------------------------------------------------------
|
|
351
370
|
// Public API
|
|
@@ -354,10 +373,10 @@ const f = class f {
|
|
|
354
373
|
* Called when events finish loading from the API.
|
|
355
374
|
* Injects an ItemList JSON-LD for the listing. Does not modify OG/canonical/title.
|
|
356
375
|
*/
|
|
357
|
-
onEventsLoaded(
|
|
376
|
+
onEventsLoaded(t, e) {
|
|
358
377
|
if (typeof document > "u" || this._state === "destroyed") return;
|
|
359
|
-
|
|
360
|
-
const n = this._buildItemList(
|
|
378
|
+
e && (this._venueName = e.name || this._venueName, this._venueAddress = e.address || e.googleLocationNameCache || this._venueAddress, e.timeZone && (this._venueTimeZone = e.timeZone)), this._events = t;
|
|
379
|
+
const n = this._buildItemList(t);
|
|
361
380
|
this._injectJsonLd(n), this._state = "listing";
|
|
362
381
|
}
|
|
363
382
|
/**
|
|
@@ -365,26 +384,26 @@ const f = class f {
|
|
|
365
384
|
* Replaces ItemList JSON-LD with entity-specific JSON-LD and updates
|
|
366
385
|
* all head tags (canonical, OG, meta description, title).
|
|
367
386
|
*/
|
|
368
|
-
onEntitySelected(
|
|
387
|
+
onEntitySelected(t, e, n) {
|
|
369
388
|
if (typeof document > "u" || this._state === "destroyed") return;
|
|
370
389
|
this._saveOriginals(), n && (this._venueName = n.name || this._venueName, this._venueAddress = n.address || n.googleLocationNameCache || this._venueAddress, n.timeZone && (this._venueTimeZone = n.timeZone));
|
|
371
|
-
let s = null, r = "", o = "",
|
|
372
|
-
if (
|
|
373
|
-
const
|
|
374
|
-
c = this._buildEntityUrl("event",
|
|
375
|
-
event:
|
|
390
|
+
let s = null, r = "", o = "", l = "", c = "";
|
|
391
|
+
if (t === "event") {
|
|
392
|
+
const a = e.slug || y(e.name || "");
|
|
393
|
+
c = this._buildEntityUrl("event", e.id || e.eventID || "", a), s = O({
|
|
394
|
+
event: e,
|
|
376
395
|
venue: {
|
|
377
396
|
name: this._venueName,
|
|
378
397
|
googleLocationNameCache: this._venueAddress
|
|
379
398
|
},
|
|
380
399
|
venueTimeZone: this._venueTimeZone,
|
|
381
400
|
eventUrl: c
|
|
382
|
-
}), r =
|
|
383
|
-
} else if (
|
|
384
|
-
const
|
|
385
|
-
c = this._buildEntityUrl("series",
|
|
401
|
+
}), r = e.name || "", o = e.description || e.eventSummary || "", l = e.image || e.coverImage || e.ShowImage || "";
|
|
402
|
+
} else if (t === "series") {
|
|
403
|
+
const a = e.slug || y(e.title || "");
|
|
404
|
+
c = this._buildEntityUrl("series", e.id || "", a), s = D({
|
|
386
405
|
series: {
|
|
387
|
-
...
|
|
406
|
+
...e,
|
|
388
407
|
venue: {
|
|
389
408
|
name: this._venueName,
|
|
390
409
|
googleLocationNameCache: this._venueAddress
|
|
@@ -392,16 +411,16 @@ const f = class f {
|
|
|
392
411
|
timeZone: this._venueTimeZone
|
|
393
412
|
},
|
|
394
413
|
baseEventUrl: c
|
|
395
|
-
}), r =
|
|
396
|
-
} else if (
|
|
397
|
-
const
|
|
398
|
-
c = this._buildEntityUrl("collection",
|
|
399
|
-
collection:
|
|
414
|
+
}), r = e.title || "", o = e.description || e.eventSummary || "", l = e.image || "";
|
|
415
|
+
} else if (t === "collection") {
|
|
416
|
+
const a = e.slug || y(e.collectionTitle || "");
|
|
417
|
+
c = this._buildEntityUrl("collection", e.id || "", a), s = C({
|
|
418
|
+
collection: e,
|
|
400
419
|
baseEventUrl: c,
|
|
401
420
|
defaultTimeZone: this._venueTimeZone
|
|
402
|
-
}), r =
|
|
421
|
+
}), r = e.collectionTitle || "", o = e.description || e.summary || "", l = e.coverImage || "";
|
|
403
422
|
}
|
|
404
|
-
s && this._injectJsonLd(s), c && this._setCanonical(c), r && this._setMeta("og:title", r), o && this._setMeta("og:description", o),
|
|
423
|
+
s && this._injectJsonLd(s), c && this._setCanonical(c), r && this._setMeta("og:title", r), o && this._setMeta("og:description", o), l && this._setMeta("og:image", l), c && this._setMeta("og:url", c), this._setMeta("og:type", "website"), this._setMeta("twitter:card", "summary_large_image"), o && this._setMeta("description", o), r && (document.title = `${r} | ${this._venueName}`), this._state = "entity";
|
|
405
424
|
}
|
|
406
425
|
/**
|
|
407
426
|
* Called when the user navigates back to the event listing.
|
|
@@ -410,8 +429,8 @@ const f = class f {
|
|
|
410
429
|
onBackToListing() {
|
|
411
430
|
if (!(typeof document > "u") && this._state !== "destroyed") {
|
|
412
431
|
if (this._restoreOriginals(), this._removeAllInjected(), this._events.length > 0) {
|
|
413
|
-
const
|
|
414
|
-
this._injectJsonLd(
|
|
432
|
+
const t = this._buildItemList(this._events);
|
|
433
|
+
this._injectJsonLd(t);
|
|
415
434
|
}
|
|
416
435
|
this._saveOriginals(), this._state = "listing";
|
|
417
436
|
}
|
|
@@ -425,17 +444,18 @@ const f = class f {
|
|
|
425
444
|
}
|
|
426
445
|
};
|
|
427
446
|
f._activeInstance = null;
|
|
428
|
-
let
|
|
447
|
+
let S = f;
|
|
429
448
|
export {
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
449
|
+
S as HostSeoController,
|
|
450
|
+
C as buildCollectionJsonLd,
|
|
451
|
+
O as buildEventJsonLd,
|
|
452
|
+
L as buildOffers,
|
|
434
453
|
$ as buildPerformers,
|
|
454
|
+
N as buildPostalAddress,
|
|
435
455
|
D as buildSeriesJsonLd,
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
456
|
+
v as formatDateTimeWithOffset,
|
|
457
|
+
T as getEventStatus,
|
|
458
|
+
_ as getTicketAvailability,
|
|
459
|
+
I as parseAddressToPostal
|
|
440
460
|
};
|
|
441
461
|
//# sourceMappingURL=seo.mjs.map
|