@getmicdrop/venue-calendar 4.0.61 → 4.0.63
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-CeF35JD5.js → CarouselView.legacy-B4dmOmg6.js} +3 -3
- package/dist/{CarouselView.legacy-CeF35JD5.js.map → CarouselView.legacy-B4dmOmg6.js.map} +1 -1
- package/dist/{CartView-DFikzyl0.js → CartView-kqUZBGpU.js} +3 -3
- package/dist/{CartView-DFikzyl0.js.map → CartView-kqUZBGpU.js.map} +1 -1
- package/dist/{Checkout-De-WQX6X.js → Checkout-C0x-bS6h.js} +112 -90
- package/dist/{Checkout-De-WQX6X.js.map → Checkout-C0x-bS6h.js.map} +1 -1
- package/dist/{Checkout-E6KkN6VD.js → Checkout-DConUsDx.js} +5 -5
- package/dist/{Checkout-E6KkN6VD.js.map → Checkout-DConUsDx.js.map} +1 -1
- package/dist/{Checkout.legacy-n_GNBUZa.js → Checkout.legacy-R-EhfHV-.js} +4 -4
- package/dist/{Checkout.legacy-n_GNBUZa.js.map → Checkout.legacy-R-EhfHV-.js.map} +1 -1
- package/dist/{CheckoutTimer-AoMKJYOB.js → CheckoutTimer-B7ilb5yz.js} +2 -2
- package/dist/{CheckoutTimer-AoMKJYOB.js.map → CheckoutTimer-B7ilb5yz.js.map} +1 -1
- package/dist/{CollectionView-D8oJEVNN.js → CollectionView-Chx2gZi9.js} +5 -5
- package/dist/{CollectionView-D8oJEVNN.js.map → CollectionView-Chx2gZi9.js.map} +1 -1
- package/dist/{CollectionView.legacy-CAN2aOFr.js → CollectionView.legacy-Bz7MZc_d.js} +3 -3
- package/dist/{CollectionView.legacy-CAN2aOFr.js.map → CollectionView.legacy-Bz7MZc_d.js.map} +1 -1
- package/dist/{Event-AXym3kXQ.js → Event-Rr8PlUUQ.js} +4 -4
- package/dist/{Event-AXym3kXQ.js.map → Event-Rr8PlUUQ.js.map} +1 -1
- package/dist/{EventDetailsView-D9Amh6se.js → EventDetailsView-V9ot4_05.js} +5 -5
- package/dist/{EventDetailsView-D9Amh6se.js.map → EventDetailsView-V9ot4_05.js.map} +1 -1
- package/dist/{FeaturedView.legacy-V0vZQajE.js → FeaturedView.legacy-sPdXFbtd.js} +2 -2
- package/dist/{FeaturedView.legacy-V0vZQajE.js.map → FeaturedView.legacy-sPdXFbtd.js.map} +1 -1
- package/dist/{GalleryCard-CgqrGk7u.js → GalleryCard-Cg746_4p.js} +2 -2
- package/dist/{GalleryCard-CgqrGk7u.js.map → GalleryCard-Cg746_4p.js.map} +1 -1
- package/dist/{GalleryView.legacy-kxopi60e.js → GalleryView.legacy-DwXpqJQk.js} +3 -3
- package/dist/{GalleryView.legacy-kxopi60e.js.map → GalleryView.legacy-DwXpqJQk.js.map} +1 -1
- package/dist/{GroupedListView.legacy-DFrZgftD.js → GroupedListView.legacy-Cvlohg0H.js} +2 -2
- package/dist/{GroupedListView.legacy-DFrZgftD.js.map → GroupedListView.legacy-Cvlohg0H.js.map} +1 -1
- package/dist/OrderSummary-DSFp-LYT.js +496 -0
- package/dist/{OrderSummary-Cl9lu9bR.js.map → OrderSummary-DSFp-LYT.js.map} +1 -1
- package/dist/{PromoCodeInput-DnAj8tsg.js → PromoCodeInput-Z96Jxbqq.js} +122 -122
- package/dist/PromoCodeInput-Z96Jxbqq.js.map +1 -0
- package/dist/{SeriesPage-DpYYp3Us.js → SeriesPage-OSFghrKu.js} +5 -5
- package/dist/{SeriesPage-DpYYp3Us.js.map → SeriesPage-OSFghrKu.js.map} +1 -1
- package/dist/{SeriesPage.legacy-C1Lv0A5H.js → SeriesPage.legacy-DmnH3x5t.js} +2 -2
- package/dist/{SeriesPage.legacy-C1Lv0A5H.js.map → SeriesPage.legacy-DmnH3x5t.js.map} +1 -1
- package/dist/{Success-DG12w5iQ.js → Success-CaCG95BV.js} +6 -6
- package/dist/{Success-DG12w5iQ.js.map → Success-CaCG95BV.js.map} +1 -1
- package/dist/{Success.legacy-DgtN2cHi.js → Success.legacy-DqyTto5K.js} +2 -2
- package/dist/{Success.legacy-DgtN2cHi.js.map → Success.legacy-DqyTto5K.js.map} +1 -1
- package/dist/{VenueCalendar-B4jzaQR8.js → VenueCalendar-D8NsQUaM.js} +14 -14
- package/dist/{VenueCalendar-B4jzaQR8.js.map → VenueCalendar-D8NsQUaM.js.map} +1 -1
- package/dist/{ViewTicketsEmbed-B5aglpCR.js → ViewTicketsEmbed-DUMSBTMV.js} +2 -2
- package/dist/{ViewTicketsEmbed-B5aglpCR.js.map → ViewTicketsEmbed-DUMSBTMV.js.map} +1 -1
- package/dist/{data-toggle-store.svelte-6-mhqMfU.js → data-toggle-store.svelte-CFExWcyA.js} +2 -2
- package/dist/{data-toggle-store.svelte-6-mhqMfU.js.map → data-toggle-store.svelte-CFExWcyA.js.map} +1 -1
- package/dist/{transform-D7SaOYFK.js → transform-XHY0K9GS.js} +2 -2
- package/dist/{transform-D7SaOYFK.js.map → transform-XHY0K9GS.js.map} +1 -1
- package/dist/venue-calendar.es.js +1 -1
- package/dist/venue-calendar.iife.js +32 -32
- package/dist/venue-calendar.iife.js.map +1 -1
- package/dist/venue-calendar.umd.js +29 -29
- package/dist/venue-calendar.umd.js.map +1 -1
- package/package.json +1 -1
- package/dist/OrderSummary-Cl9lu9bR.js +0 -466
- package/dist/PromoCodeInput-DnAj8tsg.js.map +0 -1
|
@@ -1,44 +1,44 @@
|
|
|
1
1
|
import "svelte/internal/disclose-version";
|
|
2
2
|
import * as e from "svelte/internal/client";
|
|
3
|
-
import {
|
|
3
|
+
import { f as Q, aJ as j, ad as ke, I as te, B as R, ab as ye, ac as be, e as G } from "./VenueCalendar-D8NsQUaM.js";
|
|
4
4
|
import { H as Pe } from "./Heading-AFd3o0xt.js";
|
|
5
5
|
import { T as $ } from "./Text-CXR2fhx6.js";
|
|
6
6
|
import "svelte/transition";
|
|
7
7
|
import "svelte/easing";
|
|
8
|
-
import { g as Se, b as
|
|
8
|
+
import { g as Se, b as qe, f as De, D as ae } from "./OrderSummary-DSFp-LYT.js";
|
|
9
9
|
function ee(w = "light") {
|
|
10
10
|
if (typeof window > "u" || typeof navigator > "u" || !navigator.vibrate) return;
|
|
11
11
|
const t = w === "light" ? 8 : w === "medium" ? 18 : 32;
|
|
12
12
|
navigator.vibrate(t);
|
|
13
13
|
}
|
|
14
|
-
var Ce = e.from_html('<div class="donation-input-wrapper svelte-1rkcli3"><!></div>'), Ae = e.from_html('<span class="price-fee"> </span>'), we = e.from_html('<span class="price-strikethrough"> </span> <span class="price-discounted svelte-1rkcli3"> </span> <!>', 1), Te = e.from_html('<span class="price-lg text-color-muted"> </span>'),
|
|
15
|
-
function
|
|
14
|
+
var Ce = e.from_html('<div class="donation-input-wrapper svelte-1rkcli3"><!></div>'), Ae = e.from_html('<span class="price-fee"> </span>'), we = e.from_html('<span class="price-strikethrough"> </span> <span class="price-discounted svelte-1rkcli3"> </span> <!>', 1), Te = e.from_html('<span class="price-lg text-color-muted"> </span>'), ze = e.from_html('<span class="price-fee"> </span>'), Ie = e.from_html('<span class="price-lg text-color-primary"> </span> <!>', 1), Be = e.from_html('<!> <span class="qty-display svelte-1rkcli3" aria-live="polite"> </span> <!>', 1), Ve = e.from_html('<article><div class="vc-flex-between-start gap-4"><div class="flex-1 min-w-0"><div class="flex-row-2 flex-wrap"><!> <!></div> <!> <div class="flex-row-2 mt-2"><!></div> <!></div> <div class="flex items-center quantity-selector svelte-1rkcli3"><!></div></div></article>');
|
|
15
|
+
function Ke(w, t) {
|
|
16
16
|
e.push(t, !0);
|
|
17
|
-
let n = e.prop(t, "donationAmount", 3, ""),
|
|
18
|
-
function
|
|
19
|
-
if (e.get(
|
|
17
|
+
let n = e.prop(t, "donationAmount", 3, ""), I = e.prop(t, "isRevealedByPromo", 3, !1), h = e.prop(t, "isDiscountedByPromo", 3, !1), T = e.prop(t, "discountedPrice", 3, null), u = e.prop(t, "labels", 19, () => ({})), k = e.derived(() => t.ticket.isDonation || t.ticket.ticketType === 2), B = e.derived(() => t.ticket.status === "sold_out" || t.ticket.quantityAvailable === 0), g = e.derived(() => t.ticket.status === "coming_soon"), V = e.derived(() => t.ticket.status === "sales_ended"), z = e.derived(() => e.get(B) || e.get(g) || e.get(V)), H = e.derived(() => Se(t.ticket.quantityAvailable, t.ticket.quantityTotal)), s = e.derived(() => qe(e.get(H), t.ticket.quantityAvailable, "ticket")), m = e.derived(() => parseFloat(n()) || 0), y = e.derived(() => e.get(k) && n() !== "" && e.get(m) < 1 ? "Minimum $1.00" : ""), b = e.derived(() => !e.get(k) || n() !== "" && e.get(m) >= 1), E = e.derived(() => t.quantity > 0), O = e.derived(() => !e.get(z) && t.quantity < t.ticket.maxPerOrder && t.quantity < t.ticket.quantityAvailable && e.get(b));
|
|
18
|
+
function F() {
|
|
19
|
+
if (e.get(E)) {
|
|
20
20
|
const a = t.quantity - 1;
|
|
21
|
-
t.onQuantityChange(
|
|
21
|
+
t.onQuantityChange(G(t.ticket.id), a < t.ticket.minPerOrder ? 0 : a), ee("light");
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
|
-
function
|
|
25
|
-
if (e.get(
|
|
24
|
+
function L() {
|
|
25
|
+
if (e.get(O)) {
|
|
26
26
|
const a = t.quantity === 0 ? t.ticket.minPerOrder : t.quantity + 1;
|
|
27
|
-
t.onQuantityChange(
|
|
27
|
+
t.onQuantityChange(G(t.ticket.id), a), ee("light");
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
let P = e.state(e.proxy(n()));
|
|
31
31
|
e.user_effect(() => {
|
|
32
32
|
e.set(P, n());
|
|
33
33
|
});
|
|
34
|
-
function
|
|
35
|
-
e.get(P) !== n() && t.onDonationChange?.(
|
|
34
|
+
function U() {
|
|
35
|
+
e.get(P) !== n() && t.onDonationChange?.(G(t.ticket.id), e.get(P));
|
|
36
36
|
}
|
|
37
|
-
let d = e.derived(() => e.get(
|
|
38
|
-
var v =
|
|
39
|
-
let
|
|
40
|
-
var
|
|
41
|
-
Pe(
|
|
37
|
+
let d = e.derived(() => e.get(k) ? 0 : t.ticket.price + (t.ticket.price === 0 ? 0 : t.ticket.fee)), o = e.derived(() => e.get(k) ? "" : t.ticket.price === 0 ? u().free || "Free" : Q(e.get(d))), c = e.derived(() => !e.get(k) && t.ticket.fee > 0 && t.ticket.price > 0 ? `incl. ${Q(t.ticket.fee)} ${u().fee || "fee"}` : ""), S = e.derived(() => e.get(g) && t.ticket.salesStartDate ? `Sales start ${De(t.ticket.salesStartDate)}` : e.get(g) ? "Coming soon" : "");
|
|
38
|
+
var v = Ve();
|
|
39
|
+
let q;
|
|
40
|
+
var W = e.child(v), J = e.child(W), K = e.child(J), X = e.child(K);
|
|
41
|
+
Pe(X, {
|
|
42
42
|
level: 4,
|
|
43
43
|
size: "sm",
|
|
44
44
|
weight: "semibold",
|
|
@@ -49,10 +49,10 @@ function Xe(w, t) {
|
|
|
49
49
|
},
|
|
50
50
|
$$slots: { default: !0 }
|
|
51
51
|
});
|
|
52
|
-
var ie = e.sibling(
|
|
52
|
+
var ie = e.sibling(X, 2);
|
|
53
53
|
{
|
|
54
54
|
var re = (a) => {
|
|
55
|
-
|
|
55
|
+
j(a, {
|
|
56
56
|
variant: "error",
|
|
57
57
|
children: (i, l) => {
|
|
58
58
|
e.next();
|
|
@@ -62,7 +62,7 @@ function Xe(w, t) {
|
|
|
62
62
|
$$slots: { default: !0 }
|
|
63
63
|
});
|
|
64
64
|
}, le = (a) => {
|
|
65
|
-
|
|
65
|
+
j(a, {
|
|
66
66
|
variant: "neutral",
|
|
67
67
|
children: (i, l) => {
|
|
68
68
|
e.next();
|
|
@@ -72,7 +72,7 @@ function Xe(w, t) {
|
|
|
72
72
|
$$slots: { default: !0 }
|
|
73
73
|
});
|
|
74
74
|
}, ne = (a) => {
|
|
75
|
-
|
|
75
|
+
j(a, {
|
|
76
76
|
variant: "success",
|
|
77
77
|
children: (i, l) => {
|
|
78
78
|
e.next();
|
|
@@ -81,8 +81,8 @@ function Xe(w, t) {
|
|
|
81
81
|
},
|
|
82
82
|
$$slots: { default: !0 }
|
|
83
83
|
});
|
|
84
|
-
},
|
|
85
|
-
|
|
84
|
+
}, de = (a) => {
|
|
85
|
+
j(a, {
|
|
86
86
|
variant: "green",
|
|
87
87
|
children: (i, l) => {
|
|
88
88
|
e.next();
|
|
@@ -91,8 +91,8 @@ function Xe(w, t) {
|
|
|
91
91
|
},
|
|
92
92
|
$$slots: { default: !0 }
|
|
93
93
|
});
|
|
94
|
-
},
|
|
95
|
-
|
|
94
|
+
}, se = (a) => {
|
|
95
|
+
ke(a, {
|
|
96
96
|
get remaining() {
|
|
97
97
|
return t.ticket.quantityAvailable;
|
|
98
98
|
},
|
|
@@ -103,11 +103,11 @@ function Xe(w, t) {
|
|
|
103
103
|
});
|
|
104
104
|
};
|
|
105
105
|
e.if(ie, (a) => {
|
|
106
|
-
e.get(B) ? a(re) : e.get(
|
|
106
|
+
e.get(B) ? a(re) : e.get(V) ? a(le, 1) : I() ? a(ne, 2) : h() ? a(de, 3) : e.get(s) && !e.get(g) && a(se, 4);
|
|
107
107
|
});
|
|
108
108
|
}
|
|
109
|
-
e.reset(
|
|
110
|
-
var
|
|
109
|
+
e.reset(K);
|
|
110
|
+
var Y = e.sibling(K, 2);
|
|
111
111
|
{
|
|
112
112
|
var oe = (a) => {
|
|
113
113
|
$(a, {
|
|
@@ -122,26 +122,26 @@ function Xe(w, t) {
|
|
|
122
122
|
$$slots: { default: !0 }
|
|
123
123
|
});
|
|
124
124
|
};
|
|
125
|
-
e.if(
|
|
125
|
+
e.if(Y, (a) => {
|
|
126
126
|
t.ticket.description && a(oe);
|
|
127
127
|
});
|
|
128
128
|
}
|
|
129
|
-
var
|
|
129
|
+
var M = e.sibling(Y, 2), ce = e.child(M);
|
|
130
130
|
{
|
|
131
131
|
var ve = (a) => {
|
|
132
132
|
var i = Ce(), l = e.child(i);
|
|
133
133
|
{
|
|
134
|
-
let r = e.derived(() => e.get(
|
|
134
|
+
let r = e.derived(() => e.get(y) ? "red" : "base");
|
|
135
135
|
te(l, {
|
|
136
136
|
label: "Donation amount",
|
|
137
137
|
size: "md",
|
|
138
138
|
type: "text",
|
|
139
139
|
placeholder: "0.00",
|
|
140
140
|
get disabled() {
|
|
141
|
-
return e.get(
|
|
141
|
+
return e.get(z);
|
|
142
142
|
},
|
|
143
143
|
get errorText() {
|
|
144
|
-
return e.get(
|
|
144
|
+
return e.get(y);
|
|
145
145
|
},
|
|
146
146
|
get color() {
|
|
147
147
|
return e.get(r);
|
|
@@ -149,61 +149,61 @@ function Xe(w, t) {
|
|
|
149
149
|
get value() {
|
|
150
150
|
return e.get(P);
|
|
151
151
|
},
|
|
152
|
-
set value(
|
|
153
|
-
e.set(P,
|
|
152
|
+
set value(D) {
|
|
153
|
+
e.set(P, D, !0);
|
|
154
154
|
}
|
|
155
155
|
});
|
|
156
156
|
}
|
|
157
|
-
e.reset(i), e.delegated("input", i,
|
|
157
|
+
e.reset(i), e.delegated("input", i, U), e.append(a, i);
|
|
158
158
|
}, ue = (a) => {
|
|
159
159
|
const i = e.derived(() => T() + (T() === 0 ? 0 : t.ticket.fee));
|
|
160
|
-
var l = we(), r = e.first_child(l),
|
|
160
|
+
var l = we(), r = e.first_child(l), D = e.child(r, !0);
|
|
161
161
|
e.reset(r);
|
|
162
|
-
var C = e.sibling(r, 2),
|
|
162
|
+
var C = e.sibling(r, 2), f = e.child(C, !0);
|
|
163
163
|
e.reset(C);
|
|
164
164
|
var _ = e.sibling(C, 2);
|
|
165
165
|
{
|
|
166
166
|
var A = (p) => {
|
|
167
|
-
var
|
|
168
|
-
e.reset(
|
|
167
|
+
var x = Ae(), N = e.child(x, !0);
|
|
168
|
+
e.reset(x), e.template_effect(() => e.set_text(N, e.get(c))), e.append(p, x);
|
|
169
169
|
};
|
|
170
170
|
e.if(_, (p) => {
|
|
171
171
|
e.get(c) && p(A);
|
|
172
172
|
});
|
|
173
173
|
}
|
|
174
174
|
e.template_effect(
|
|
175
|
-
(p,
|
|
176
|
-
e.set_text(
|
|
175
|
+
(p, x) => {
|
|
176
|
+
e.set_text(D, p), e.set_text(f, x);
|
|
177
177
|
},
|
|
178
178
|
[
|
|
179
|
-
() =>
|
|
180
|
-
() =>
|
|
179
|
+
() => Q(e.get(d)),
|
|
180
|
+
() => Q(e.get(i))
|
|
181
181
|
]
|
|
182
182
|
), e.append(a, l);
|
|
183
|
-
},
|
|
183
|
+
}, ge = (a) => {
|
|
184
184
|
var i = Te(), l = e.child(i, !0);
|
|
185
185
|
e.reset(i), e.template_effect(() => e.set_text(l, e.get(o))), e.append(a, i);
|
|
186
|
-
},
|
|
187
|
-
var i =
|
|
186
|
+
}, me = (a) => {
|
|
187
|
+
var i = Ie(), l = e.first_child(i), r = e.child(l, !0);
|
|
188
188
|
e.reset(l);
|
|
189
|
-
var
|
|
189
|
+
var D = e.sibling(l, 2);
|
|
190
190
|
{
|
|
191
|
-
var C = (
|
|
192
|
-
var _ =
|
|
193
|
-
e.reset(_), e.template_effect(() => e.set_text(A, e.get(c))), e.append(
|
|
191
|
+
var C = (f) => {
|
|
192
|
+
var _ = ze(), A = e.child(_, !0);
|
|
193
|
+
e.reset(_), e.template_effect(() => e.set_text(A, e.get(c))), e.append(f, _);
|
|
194
194
|
};
|
|
195
|
-
e.if(
|
|
196
|
-
e.get(c) &&
|
|
195
|
+
e.if(D, (f) => {
|
|
196
|
+
e.get(c) && f(C);
|
|
197
197
|
});
|
|
198
198
|
}
|
|
199
199
|
e.template_effect(() => e.set_text(r, e.get(o))), e.append(a, i);
|
|
200
200
|
};
|
|
201
201
|
e.if(ce, (a) => {
|
|
202
|
-
e.get(
|
|
202
|
+
e.get(k) ? a(ve) : h() && T() !== null ? a(ue, 1) : e.get(g) ? a(ge, 2) : a(me, !1);
|
|
203
203
|
});
|
|
204
204
|
}
|
|
205
|
-
e.reset(
|
|
206
|
-
var
|
|
205
|
+
e.reset(M);
|
|
206
|
+
var fe = e.sibling(M, 2);
|
|
207
207
|
{
|
|
208
208
|
var _e = (a) => {
|
|
209
209
|
$(a, {
|
|
@@ -218,104 +218,104 @@ function Xe(w, t) {
|
|
|
218
218
|
$$slots: { default: !0 }
|
|
219
219
|
});
|
|
220
220
|
};
|
|
221
|
-
e.if(
|
|
221
|
+
e.if(fe, (a) => {
|
|
222
222
|
e.get(S) && a(_e);
|
|
223
223
|
});
|
|
224
224
|
}
|
|
225
|
-
e.reset(
|
|
226
|
-
var
|
|
225
|
+
e.reset(J);
|
|
226
|
+
var Z = e.sibling(J, 2), pe = e.child(Z);
|
|
227
227
|
{
|
|
228
|
-
var
|
|
229
|
-
},
|
|
228
|
+
var xe = (a) => {
|
|
229
|
+
}, he = (a) => {
|
|
230
230
|
var i = Be(), l = e.first_child(i);
|
|
231
231
|
{
|
|
232
|
-
let
|
|
233
|
-
|
|
232
|
+
let f = e.derived(() => !e.get(E)), _ = e.derived(() => u().decrease || "Decrease"), A = e.derived(() => t.ticket.name), p = e.derived(() => u().quantity || "quantity");
|
|
233
|
+
R(l, {
|
|
234
234
|
variant: "alternative",
|
|
235
235
|
size: "icon-lg",
|
|
236
|
-
onclick:
|
|
236
|
+
onclick: F,
|
|
237
237
|
get disabled() {
|
|
238
|
-
return e.get(
|
|
238
|
+
return e.get(f);
|
|
239
239
|
},
|
|
240
240
|
get "aria-label"() {
|
|
241
241
|
return `${e.get(_) ?? ""} ${e.get(A) ?? ""} ${e.get(p) ?? ""}`;
|
|
242
242
|
},
|
|
243
|
-
children: (
|
|
244
|
-
|
|
243
|
+
children: (x, N) => {
|
|
244
|
+
ye(x, { size: 16 });
|
|
245
245
|
},
|
|
246
246
|
$$slots: { default: !0 }
|
|
247
247
|
});
|
|
248
248
|
}
|
|
249
|
-
var r = e.sibling(l, 2),
|
|
249
|
+
var r = e.sibling(l, 2), D = e.child(r, !0);
|
|
250
250
|
e.reset(r);
|
|
251
251
|
var C = e.sibling(r, 2);
|
|
252
252
|
{
|
|
253
|
-
let
|
|
254
|
-
|
|
253
|
+
let f = e.derived(() => !e.get(O)), _ = e.derived(() => u().increase || "Increase"), A = e.derived(() => t.ticket.name), p = e.derived(() => u().quantity || "quantity");
|
|
254
|
+
R(C, {
|
|
255
255
|
variant: "alternative",
|
|
256
256
|
size: "icon-lg",
|
|
257
|
-
onclick:
|
|
257
|
+
onclick: L,
|
|
258
258
|
get disabled() {
|
|
259
|
-
return e.get(
|
|
259
|
+
return e.get(f);
|
|
260
260
|
},
|
|
261
261
|
get "aria-label"() {
|
|
262
262
|
return `${e.get(_) ?? ""} ${e.get(A) ?? ""} ${e.get(p) ?? ""}`;
|
|
263
263
|
},
|
|
264
|
-
children: (
|
|
265
|
-
be(
|
|
264
|
+
children: (x, N) => {
|
|
265
|
+
be(x, { size: 16 });
|
|
266
266
|
},
|
|
267
267
|
$$slots: { default: !0 }
|
|
268
268
|
});
|
|
269
269
|
}
|
|
270
270
|
e.template_effect(() => {
|
|
271
|
-
e.set_attribute(r, "aria-label", `${t.ticket.name ?? ""} ${(u().quantity || "quantity") ?? ""}: ${t.quantity ?? ""}`), e.set_text(
|
|
271
|
+
e.set_attribute(r, "aria-label", `${t.ticket.name ?? ""} ${(u().quantity || "quantity") ?? ""}: ${t.quantity ?? ""}`), e.set_text(D, t.quantity);
|
|
272
272
|
}), e.append(a, i);
|
|
273
273
|
};
|
|
274
274
|
e.if(pe, (a) => {
|
|
275
|
-
e.get(B) || e.get(
|
|
275
|
+
e.get(B) || e.get(g) || e.get(V) ? a(xe) : a(he, !1);
|
|
276
276
|
});
|
|
277
277
|
}
|
|
278
|
-
e.reset(
|
|
279
|
-
|
|
280
|
-
"disabled-ticket": e.get(
|
|
281
|
-
revealed:
|
|
278
|
+
e.reset(Z), e.reset(W), e.reset(v), e.template_effect(() => {
|
|
279
|
+
q = e.set_class(v, 1, "ticket-card rounded-lg border p-4 transition-all svelte-1rkcli3", null, q, {
|
|
280
|
+
"disabled-ticket": e.get(z),
|
|
281
|
+
revealed: I() && !e.get(z)
|
|
282
282
|
}), e.set_style(v, `transition-duration: ${ae.normal}ms;`);
|
|
283
283
|
}), e.append(w, v), e.pop();
|
|
284
284
|
}
|
|
285
285
|
e.delegate(["input"]);
|
|
286
|
-
var
|
|
287
|
-
function
|
|
286
|
+
var Re = e.from_html('<p class="promo-message success body-sm svelte-1uooa2j" role="status" aria-live="polite"> </p>'), Ee = e.from_html('<div class="space-y-2"><div class="promo-input-wrapper svelte-1uooa2j"><div class="flex-1"><!></div> <!></div> <!></div>'), Oe = e.from_html('<div class="promo-section svelte-1uooa2j" role="group" aria-labelledby="promo-label"><span id="promo-label" class="sr-only">Promo code entry</span> <!></div>');
|
|
287
|
+
function Me(w, t) {
|
|
288
288
|
e.push(t, !0);
|
|
289
|
-
let n = e.prop(t, "labels", 19, () => ({})),
|
|
289
|
+
let n = e.prop(t, "labels", 19, () => ({})), I = e.state(!1), h = e.state("");
|
|
290
290
|
function T() {
|
|
291
|
-
const s = e.get(
|
|
291
|
+
const s = e.get(h).trim();
|
|
292
292
|
s && t.onApply(s);
|
|
293
293
|
}
|
|
294
294
|
function u() {
|
|
295
|
-
e.set(
|
|
295
|
+
e.set(h, ""), t.onRemove();
|
|
296
296
|
}
|
|
297
|
-
function
|
|
297
|
+
function k(s) {
|
|
298
298
|
s.key === "Enter" && (s.preventDefault(), T());
|
|
299
299
|
}
|
|
300
|
-
let B = e.derived(() => t.promoState.isApplied || e.get(
|
|
301
|
-
var
|
|
300
|
+
let B = e.derived(() => t.promoState.isApplied || e.get(I));
|
|
301
|
+
var g = Oe(), V = e.sibling(e.child(g), 2);
|
|
302
302
|
{
|
|
303
|
-
var
|
|
304
|
-
|
|
303
|
+
var z = (s) => {
|
|
304
|
+
R(s, {
|
|
305
305
|
variant: "link",
|
|
306
|
-
onclick: () => e.set(
|
|
307
|
-
children: (
|
|
306
|
+
onclick: () => e.set(I, !0),
|
|
307
|
+
children: (m, y) => {
|
|
308
308
|
e.next();
|
|
309
309
|
var b = e.text();
|
|
310
|
-
e.template_effect(() => e.set_text(b, n().havePromoCode || "Have a promo code?")), e.append(
|
|
310
|
+
e.template_effect(() => e.set_text(b, n().havePromoCode || "Have a promo code?")), e.append(m, b);
|
|
311
311
|
},
|
|
312
312
|
$$slots: { default: !0 }
|
|
313
313
|
});
|
|
314
|
-
},
|
|
315
|
-
var
|
|
314
|
+
}, H = (s) => {
|
|
315
|
+
var m = Ee(), y = e.child(m), b = e.child(y), E = e.child(b);
|
|
316
316
|
{
|
|
317
317
|
let d = e.derived(() => n().promoCode || "Promo code"), o = e.derived(() => n().enterCode || "Enter code"), c = e.derived(() => t.promoState.isApplied || t.promoState.isValidating), S = e.derived(() => t.promoState.error || ""), v = e.derived(() => t.promoState.error ? "red" : "base");
|
|
318
|
-
te(
|
|
318
|
+
te(E, {
|
|
319
319
|
get label() {
|
|
320
320
|
return e.get(d);
|
|
321
321
|
},
|
|
@@ -334,20 +334,20 @@ function Je(w, t) {
|
|
|
334
334
|
return e.get(v);
|
|
335
335
|
},
|
|
336
336
|
get value() {
|
|
337
|
-
return e.get(
|
|
337
|
+
return e.get(h);
|
|
338
338
|
},
|
|
339
|
-
set value(
|
|
340
|
-
e.set(
|
|
339
|
+
set value(q) {
|
|
340
|
+
e.set(h, q, !0);
|
|
341
341
|
}
|
|
342
342
|
});
|
|
343
343
|
}
|
|
344
344
|
e.reset(b);
|
|
345
|
-
var
|
|
345
|
+
var O = e.sibling(b, 2);
|
|
346
346
|
{
|
|
347
|
-
var
|
|
347
|
+
var F = (d) => {
|
|
348
348
|
{
|
|
349
349
|
let o = e.derived(() => n().removePromoCode || "Remove promo code");
|
|
350
|
-
|
|
350
|
+
R(d, {
|
|
351
351
|
variant: "outline",
|
|
352
352
|
onclick: u,
|
|
353
353
|
class: "h-10 self-start mt-5",
|
|
@@ -362,10 +362,10 @@ function Je(w, t) {
|
|
|
362
362
|
$$slots: { default: !0 }
|
|
363
363
|
});
|
|
364
364
|
}
|
|
365
|
-
},
|
|
365
|
+
}, L = (d) => {
|
|
366
366
|
{
|
|
367
|
-
let o = e.derived(() => t.promoState.isValidating || !e.get(
|
|
368
|
-
|
|
367
|
+
let o = e.derived(() => t.promoState.isValidating || !e.get(h).trim()), c = e.derived(() => t.promoState.isValidating ? n().checkingPromoCode || "Checking promo code" : n().applyPromoCode || "Apply promo code");
|
|
368
|
+
R(d, {
|
|
369
369
|
onclick: T,
|
|
370
370
|
get disabled() {
|
|
371
371
|
return e.get(o);
|
|
@@ -376,40 +376,40 @@ function Je(w, t) {
|
|
|
376
376
|
},
|
|
377
377
|
children: (S, v) => {
|
|
378
378
|
e.next();
|
|
379
|
-
var
|
|
380
|
-
e.template_effect(() => e.set_text(
|
|
379
|
+
var q = e.text();
|
|
380
|
+
e.template_effect(() => e.set_text(q, t.promoState.isValidating ? n().checking || "Checking..." : n().apply || "Apply")), e.append(S, q);
|
|
381
381
|
},
|
|
382
382
|
$$slots: { default: !0 }
|
|
383
383
|
});
|
|
384
384
|
}
|
|
385
385
|
};
|
|
386
|
-
e.if(
|
|
387
|
-
t.promoState.isApplied ? d(
|
|
386
|
+
e.if(O, (d) => {
|
|
387
|
+
t.promoState.isApplied ? d(F) : d(L, !1);
|
|
388
388
|
});
|
|
389
389
|
}
|
|
390
|
-
e.reset(
|
|
391
|
-
var P = e.sibling(
|
|
390
|
+
e.reset(y);
|
|
391
|
+
var P = e.sibling(y, 2);
|
|
392
392
|
{
|
|
393
|
-
var
|
|
394
|
-
var o =
|
|
393
|
+
var U = (d) => {
|
|
394
|
+
var o = Re(), c = e.child(o, !0);
|
|
395
395
|
e.reset(o), e.template_effect(() => e.set_text(c, t.promoState.hint)), e.append(d, o);
|
|
396
396
|
};
|
|
397
397
|
e.if(P, (d) => {
|
|
398
|
-
t.promoState.hint && d(
|
|
398
|
+
t.promoState.hint && d(U);
|
|
399
399
|
});
|
|
400
400
|
}
|
|
401
|
-
e.reset(
|
|
401
|
+
e.reset(m), e.template_effect(() => e.set_style(m, `animation: promoSlideIn ${ae.normal}ms ease-out;`)), e.delegated("keydown", y, k), e.append(s, m);
|
|
402
402
|
};
|
|
403
|
-
e.if(
|
|
404
|
-
e.get(B) ? s(
|
|
403
|
+
e.if(V, (s) => {
|
|
404
|
+
e.get(B) ? s(H, !1) : s(z);
|
|
405
405
|
});
|
|
406
406
|
}
|
|
407
|
-
e.reset(
|
|
407
|
+
e.reset(g), e.append(w, g), e.pop();
|
|
408
408
|
}
|
|
409
409
|
e.delegate(["keydown"]);
|
|
410
410
|
export {
|
|
411
|
-
|
|
412
|
-
|
|
411
|
+
Me as P,
|
|
412
|
+
Ke as T,
|
|
413
413
|
ee as t
|
|
414
414
|
};
|
|
415
|
-
//# sourceMappingURL=PromoCodeInput-
|
|
415
|
+
//# sourceMappingURL=PromoCodeInput-Z96Jxbqq.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PromoCodeInput-Z96Jxbqq.js","sources":["../src/lib/utils/haptic.ts","../src/lib/public-calendar-flow/TicketCard.svelte","../src/lib/public-calendar-flow/PromoCodeInput.svelte"],"sourcesContent":["/**\r\n * Haptic feedback helper.\r\n *\r\n * One call site for `navigator.vibrate` so consumers don't repeat the\r\n * SSR + capability check. Android browsers vibrate; iOS Safari silently\r\n * no-ops (Apple deliberate — they reserve haptics for native apps via\r\n * the Taptic Engine, no web API exposed). Future-proof: if Apple ever\r\n * ships a web haptic API, swap the impl here and every consumer gets it.\r\n *\r\n * Styles:\r\n * - 'light' (8ms) — UI tick on small interactions (ticket +/-, tap)\r\n * - 'medium' (18ms) — committed state change (drawer snap, month flip)\r\n * - 'heavy' (32ms) — destructive / important confirmations\r\n */\r\nexport function tick(style: 'light' | 'medium' | 'heavy' = 'light'): void {\r\n\tif (typeof window === 'undefined') return;\r\n\tif (typeof navigator === 'undefined' || !navigator.vibrate) return;\r\n\tconst ms = style === 'light' ? 8 : style === 'medium' ? 18 : 32;\r\n\tnavigator.vibrate(ms);\r\n}\r\n","<script lang=\"ts\">\r\n\timport { Add, Subtract } from 'carbon-icons-svelte';\r\n\timport { Badge, Button, Heading, Input, Text, asTicketId, formatCurrency } from '@getmicdrop/svelte-components';\r\n\timport type { TicketId, USD } from '@getmicdrop/svelte-components';\r\n\timport ScarcityBadge from '../../components/ScarcityBadge.svelte';\r\n\timport { tick } from '$lib/utils/haptic';\r\n\timport type { TicketTypeData, ScarcityLevel } from '$lib/public-calendar-flow/types';\r\n\timport {\r\n\t\tgetScarcityLevel,\r\n\t\tgetScarcityText,\r\n\t\tformatSmartSalesDate,\r\n\t\tDURATION\r\n\t} from '$lib/public-calendar-flow/defaults';\r\n\r\n\tinterface Props {\r\n\t\tticket: TicketTypeData;\r\n\t\tquantity: number;\r\n\t\tonQuantityChange: (ticketId: TicketId, quantity: number) => void;\r\n\t\tdonationAmount?: string;\r\n\t\tonDonationChange?: (ticketId: TicketId, amount: string) => void;\r\n\t\tisRevealedByPromo?: boolean;\r\n\t\tisDiscountedByPromo?: boolean;\r\n\t\tdiscountedPrice?: number | null;\r\n\t\t\tlabels?: Record<string, string>;\r\n\t}\r\n\r\n\tlet {\r\n\t\tticket,\r\n\t\tquantity,\r\n\t\tonQuantityChange,\r\n\t\tdonationAmount = '',\r\n\t\tonDonationChange,\r\n\t\tisRevealedByPromo = false,\r\n\t\tisDiscountedByPromo = false,\r\n\t\tdiscountedPrice = null,\r\n\t\tlabels = {},\r\n\t}: Props = $props();\r\n\r\n\t// --- State detection ---\r\n\tlet isDonation = $derived(ticket.isDonation || ticket.ticketType === 2);\r\n\tlet isSoldOut = $derived(ticket.status === 'sold_out' || ticket.quantityAvailable === 0);\r\n\tlet isComingSoon = $derived(ticket.status === 'coming_soon');\r\n\tlet isSalesEnded = $derived(ticket.status === 'sales_ended');\r\n\tlet isDisabled = $derived(isSoldOut || isComingSoon || isSalesEnded);\r\n\r\n\tlet scarcityLevel: ScarcityLevel = $derived(\r\n\t\tgetScarcityLevel(ticket.quantityAvailable, ticket.quantityTotal)\r\n\t);\r\n\tlet scarcityText = $derived(getScarcityText(scarcityLevel, ticket.quantityAvailable, 'ticket'));\r\n\r\n\t// Donation validation\r\n\tlet donationValue = $derived(parseFloat(donationAmount) || 0);\r\n\tlet donationError = $derived(\r\n\t\tisDonation && donationAmount !== '' && donationValue < 1 ? 'Minimum $1.00' : ''\r\n\t);\r\n\tlet isDonationValid = $derived(!isDonation || (donationAmount !== '' && donationValue >= 1));\r\n\r\n\tlet canDecrement = $derived(quantity > 0);\r\n\tlet canIncrement = $derived(\r\n\t\t!isDisabled &&\r\n\t\tquantity < ticket.maxPerOrder &&\r\n\t\tquantity < ticket.quantityAvailable &&\r\n\t\tisDonationValid\r\n\t);\r\n\r\n\tfunction decrement() {\r\n\t\tif (canDecrement) {\r\n\t\t\t// If decrementing would go below minimum, jump to 0 (remove from cart)\r\n\t\t\tconst newQty = quantity - 1;\r\n\t\t\tonQuantityChange(asTicketId(ticket.id), newQty < ticket.minPerOrder ? 0 : newQty);\r\n\t\t\ttick('light');\r\n\t\t}\r\n\t}\r\n\r\n\tfunction increment() {\r\n\t\tif (canIncrement) {\r\n\t\t\t// If at 0, jump to minimum purchase quantity\r\n\t\t\tconst newQty = quantity === 0 ? ticket.minPerOrder : quantity + 1;\r\n\t\t\tonQuantityChange(asTicketId(ticket.id), newQty);\r\n\t\t\ttick('light');\r\n\t\t}\r\n\t}\r\n\r\n\tlet donationInputValue = $state(donationAmount);\r\n\r\n\t// Sync external donationAmount prop to local state\r\n\t$effect(() => {\r\n\t\tdonationInputValue = donationAmount;\r\n\t});\r\n\r\n\t// Push local changes upstream\r\n\tfunction syncDonation() {\r\n\t\tif (donationInputValue !== donationAmount) {\r\n\t\t\t// eslint-disable-next-line micdrop/boundary-only-as-cast -- API response mapper: ticket.id arrives as raw number from server\r\n\t\tonDonationChange?.(asTicketId(ticket.id), donationInputValue);\r\n\t\t}\r\n\t}\r\n\r\n\t// Price display — show total inclusive of fees (matching production TicketBlock.svelte)\r\n\tlet totalPrice = $derived(isDonation ? 0 : ticket.price + (ticket.price === 0 ? 0 : ticket.fee));\r\n\tlet priceDisplay = $derived(\r\n\t\tisDonation ? '' : ticket.price === 0 ? (labels.free || 'Free') : formatCurrency(totalPrice as USD)\r\n\t);\r\n\tlet feeCaption = $derived(\r\n\t\t!isDonation && ticket.fee > 0 && ticket.price > 0 ? `incl. ${formatCurrency(ticket.fee as USD)} ${labels.fee || 'fee'}` : ''\r\n\t);\r\n\r\n\t// Sales start display for coming soon tickets\r\n\tlet salesStartDisplay = $derived(\r\n\t\tisComingSoon && ticket.salesStartDate\r\n\t\t\t? `Sales start ${formatSmartSalesDate(ticket.salesStartDate)}`\r\n\t\t\t: isComingSoon\r\n\t\t\t\t? 'Coming soon'\r\n\t\t\t\t: ''\r\n\t);\r\n</script>\r\n\r\n<article\r\n\tclass=\"ticket-card rounded-lg border p-4 transition-all\"\r\n\tclass:disabled-ticket={isDisabled}\r\n\tclass:revealed={isRevealedByPromo && !isDisabled}\r\n\tstyle=\"transition-duration: {DURATION.normal}ms;\"\r\n>\r\n\t<div class=\"vc-flex-between-start gap-4\">\r\n\t\t<!-- Ticket info -->\r\n\t\t<div class=\"flex-1 min-w-0\">\r\n\t\t\t<div class=\"flex-row-2 flex-wrap\">\r\n\t\t\t\t<Heading level={4} size=\"sm\" weight=\"semibold\">\r\n\t\t\t\t\t{ticket.name}\r\n\t\t\t\t</Heading>\r\n\t\t\t\t{#if isSoldOut}\r\n\t\t\t\t\t<Badge variant=\"error\">{labels.soldOut || 'Sold out'}</Badge>\r\n\t\t\t\t{:else if isSalesEnded}\r\n\t\t\t\t\t<Badge variant=\"neutral\">Sales ended</Badge>\r\n\t\t\t\t{:else if isRevealedByPromo}\r\n\t\t\t\t\t<Badge variant=\"success\">Unlocked</Badge>\r\n\t\t\t\t{:else if isDiscountedByPromo}\r\n\t\t\t\t\t<Badge variant=\"green\">Discount applied</Badge>\r\n\t\t\t\t{:else if scarcityText && !isComingSoon}\r\n\t\t\t\t\t<ScarcityBadge\r\n\t\t\t\t\t\tremaining={ticket.quantityAvailable}\r\n\t\t\t\t\t\ttotal={ticket.quantityTotal}\r\n\t\t\t\t\t\tcontext=\"ticket\"\r\n\t\t\t\t\t/>\r\n\t\t\t\t{/if}\r\n\t\t\t</div>\r\n\r\n\t\t\t{#if ticket.description}\r\n\t\t\t\t<Text size=\"xs\" color=\"muted\" class=\"block mt-1 line-clamp-2\">\r\n\t\t\t\t\t{ticket.description}\r\n\t\t\t\t</Text>\r\n\t\t\t{/if}\r\n\r\n\t\t\t<!-- Price row -->\r\n\t\t\t<div class=\"flex-row-2 mt-2\">\r\n\t\t\t\t{#if isDonation}\r\n\t\t\t\t\t<!-- Donation: $ input -->\r\n\t\t\t\t\t<!-- svelte-ignore a11y_no_static_element_interactions -->\r\n\t\t\t\t\t<div class=\"donation-input-wrapper\" oninput={syncDonation}>\r\n\t\t\t\t\t\t<Input\r\n\t\t\t\t\t\t\tlabel=\"Donation amount\"\r\n\t\t\t\t\t\t\tsize=\"md\"\r\n\t\t\t\t\t\t\ttype=\"text\"\r\n\t\t\t\t\t\t\tplaceholder=\"0.00\"\r\n\t\t\t\t\t\t\tbind:value={donationInputValue}\r\n\t\t\t\t\t\t\tdisabled={isDisabled}\r\n\t\t\t\t\t\t\terrorText={donationError}\r\n\t\t\t\t\t\t\tcolor={donationError ? 'red' : 'base'}\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t{:else if isDiscountedByPromo && discountedPrice !== null}\r\n\t\t\t\t\t<!-- Discounted: strikethrough original total + discounted total (both inclusive of fee) -->\r\n\t\t\t\t\t{@const discountedTotal = discountedPrice + (discountedPrice === 0 ? 0 : ticket.fee)}\r\n\t\t\t\t\t<span class=\"price-strikethrough\">{formatCurrency(totalPrice as USD /* FIXME(canonical-cleanup:toFixed): this cast bypasses the brand boundary; replace with toCents/toUSD at the API-response-transform layer. */)}</span>\r\n\t\t\t\t\t<span class=\"price-discounted\">{formatCurrency(discountedTotal as USD /* FIXME(canonical-cleanup:toFixed): this cast bypasses the brand boundary; replace with toCents/toUSD at the API-response-transform layer. */)}</span>\r\n\t\t\t\t\t{#if feeCaption}\r\n\t\t\t\t\t\t<span class=\"price-fee\">{feeCaption}</span>\r\n\t\t\t\t\t{/if}\r\n\t\t\t\t{:else if isComingSoon}\r\n\t\t\t\t\t<!-- Coming soon: show price dimmed -->\r\n\t\t\t\t\t<span class=\"price-lg text-color-muted\">{priceDisplay}</span>\r\n\t\t\t\t{:else}\r\n\t\t\t\t\t<!-- Standard price -->\r\n\t\t\t\t\t<span class=\"price-lg text-color-primary\">{priceDisplay}</span>\r\n\t\t\t\t\t{#if feeCaption}\r\n\t\t\t\t\t\t<span class=\"price-fee\">{feeCaption}</span>\r\n\t\t\t\t\t{/if}\r\n\t\t\t\t{/if}\r\n\t\t\t</div>\r\n\r\n\t\t\t<!-- Coming soon / sales ended message -->\r\n\t\t\t{#if salesStartDisplay}\r\n\t\t\t\t<Text size=\"xs\" color=\"muted\" class=\"block mt-1.5\">\r\n\t\t\t\t\t{salesStartDisplay}\r\n\t\t\t\t</Text>\r\n\t\t\t{/if}\r\n\t\t</div>\r\n\r\n\t\t<!-- Quantity controls -->\r\n\t\t<div class=\"flex items-center quantity-selector\">\r\n\t\t\t{#if isSoldOut || isComingSoon || isSalesEnded}\r\n\t\t\t\t<!-- No controls for coming soon / sales ended -->\r\n\t\t\t{:else}\r\n\t\t\t\t<Button\r\n\t\t\t\t\tvariant=\"alternative\"\r\n\t\t\t\t\tsize=\"icon-lg\"\r\n\t\t\t\t\tonclick={decrement}\r\n\t\t\t\t\tdisabled={!canDecrement}\r\n\t\t\t\t\taria-label=\"{labels.decrease || 'Decrease'} {ticket.name} {labels.quantity || 'quantity'}\"\r\n\t\t\t\t>\r\n\t\t\t\t\t<Subtract size={16} />\r\n\t\t\t\t</Button>\r\n\r\n\t\t\t\t<span\r\n\t\t\t\t\tclass=\"qty-display\"\r\n\t\t\t\t\taria-live=\"polite\"\r\n\t\t\t\t\taria-label=\"{ticket.name} {labels.quantity || 'quantity'}: {quantity}\"\r\n\t\t\t\t>\r\n\t\t\t\t\t{quantity}\r\n\t\t\t\t</span>\r\n\r\n\t\t\t\t<Button\r\n\t\t\t\t\tvariant=\"alternative\"\r\n\t\t\t\t\tsize=\"icon-lg\"\r\n\t\t\t\t\tonclick={increment}\r\n\t\t\t\t\tdisabled={!canIncrement}\r\n\t\t\t\t\taria-label=\"{labels.increase || 'Increase'} {ticket.name} {labels.quantity || 'quantity'}\"\r\n\t\t\t\t>\r\n\t\t\t\t\t<Add size={16} />\r\n\t\t\t\t</Button>\r\n\t\t\t{/if}\r\n\t\t</div>\r\n\t</div>\r\n</article>\r\n\r\n<style>\r\n\t/* Card states using HSL CSS variables (matching TicketBlock.svelte) */\r\n\t.ticket-card {\r\n\t\tborder-color: hsl(var(--stroke-secondary, 220 13% 91%));\r\n\t\tbackground-color: hsl(var(--ts-card-bg, var(--bg-primary, 0 0% 100%)));\r\n\t}\r\n\r\n\t.ticket-card.revealed {\r\n\t\tborder-color: hsl(var(--accent-success) / 50%);\r\n\t\tbackground-color: hsl(var(--accent-success) / 8%);\r\n\t}\r\n\r\n\t.ticket-card.disabled-ticket {\r\n\t\topacity: 0.5;\r\n\t}\r\n\r\n\t/* Quantity selector */\r\n\t.quantity-selector {\r\n\t\tgap: 0.5rem;\r\n\t\tuser-select: none;\r\n\t\tuser-select: none;\r\n\t}\r\n\r\n\t.qty-display {\r\n\t\tmin-width: 2rem;\r\n\t\tdisplay: flex;\r\n\t\talign-items: center;\r\n\t\tjustify-content: center;\r\n\t\tfont-size: 1.125rem;\r\n\t\tfont-weight: 600;\r\n\t\tcolor: hsl(var(--text-primary, 222 47% 11%));\r\n\t\tuser-select: none;\r\n\t\tuser-select: none;\r\n\t}\r\n\r\n\t/* Discounted price green text */\r\n\t.price-discounted {\r\n\t\tfont-size: 0.875rem;\r\n\t\tline-height: 1.25rem;\r\n\t\tfont-weight: 600;\r\n\t\tcolor: hsl(var(--accent-success)); /* green-600 */\r\n\t}\r\n\r\n\t/* Donation input wrapper */\r\n\t.donation-input-wrapper {\r\n\t\tmin-width: 10rem;\r\n\t}\r\n\r\n .ticket-card {\r\n &:is([data-theme=\"dark\"], [data-theme=\"dark\"] *) {\r\n\t\tborder-color: hsl(var(--stroke-secondary, 215 19% 35%));\r\n\t\tbackground-color: hsl(var(--ts-card-bg, var(--bg-primary, 222 47% 11%)));\r\n\t }\r\n }\r\n\r\n .ticket-card.revealed {\r\n &:is([data-theme=\"dark\"], [data-theme=\"dark\"] *) {\r\n\t\tborder-color: hsl(var(--accent-success)); /* green-700 */\r\n\t\tbackground-color: hsl(var(--accent-success));\r\n\t }\r\n }\r\n\r\n .qty-display {\r\n &:is([data-theme=\"dark\"], [data-theme=\"dark\"] *) {\r\n\t\tcolor: hsl(var(--text-primary, 0 0% 100%));\r\n\t }\r\n }\r\n</style>\r\n","<script lang=\"ts\">\r\n\timport { Input, Button } from '@getmicdrop/svelte-components';\r\n\timport type { PromoCodeState } from '$lib/public-calendar-flow/types';\r\n\timport { DURATION } from '$lib/public-calendar-flow/defaults';\r\n\r\n\tinterface Props {\r\n\t\tpromoState: PromoCodeState;\r\n\t\tonApply: (code: string) => void;\r\n\t\tonRemove: () => void;\r\n\t\t\tlabels?: Record<string, string>;\r\n\t}\r\n\r\n\tlet { promoState, onApply, onRemove, labels = {}, }: Props = $props();\r\n\r\n\tlet isExpanded = $state(false);\r\n\tlet inputValue = $state('');\r\n\r\n\tfunction handleApply() {\r\n\t\tconst trimmed = inputValue.trim();\r\n\t\tif (!trimmed) return;\r\n\t\tonApply(trimmed);\r\n\t}\r\n\r\n\tfunction handleRemove() {\r\n\t\tinputValue = '';\r\n\t\tonRemove();\r\n\t}\r\n\r\n\tfunction handleKeydown(e: KeyboardEvent) {\r\n\t\tif (e.key === 'Enter') {\r\n\t\t\te.preventDefault();\r\n\t\t\thandleApply();\r\n\t\t}\r\n\t}\r\n\r\n\t// Auto-expand when promo is applied (e.g. on restore)\r\n\tlet shouldExpand = $derived(promoState.isApplied || isExpanded);\r\n</script>\r\n\r\n<div class=\"promo-section\" role=\"group\" aria-labelledby=\"promo-label\">\r\n\t<span id=\"promo-label\" class=\"sr-only\">Promo code entry</span>\r\n\t{#if !shouldExpand}\r\n\t\t<Button variant=\"link\" onclick={() => (isExpanded = true)}>\r\n\t\t\t{labels.havePromoCode || 'Have a promo code?'}\r\n\t\t</Button>\r\n\t{:else}\r\n\t\t<div\r\n\t\t\tclass=\"space-y-2\"\r\n\t\t\tstyle=\"animation: promoSlideIn {DURATION.normal}ms ease-out;\"\r\n\t\t>\r\n\t\t\t<!-- svelte-ignore a11y_no_static_element_interactions -->\r\n\t\t\t<div class=\"promo-input-wrapper\" onkeydown={handleKeydown}>\r\n\t\t\t\t<div class=\"flex-1\">\r\n\t\t\t\t\t<Input\r\n\t\t\t\t\t\tlabel={labels.promoCode || 'Promo code'}\r\n\t\t\t\t\t\tplaceholder={labels.enterCode || 'Enter code'}\r\n\t\t\t\t\t\tsize=\"md\"\r\n\t\t\t\t\t\ttype=\"text\"\r\n\t\t\t\t\t\tbind:value={inputValue}\r\n\t\t\t\t\t\tdisabled={promoState.isApplied || promoState.isValidating}\r\n\t\t\t\t\t\terrorText={promoState.error || ''}\r\n\t\t\t\t\t\tcolor={promoState.error ? 'red' : 'base'}\r\n\t\t\t\t\t/>\r\n\t\t\t\t</div>\r\n\r\n\t\t\t\t{#if promoState.isApplied}\r\n\t\t\t\t\t<Button variant=\"outline\" onclick={handleRemove} class=\"h-10 self-start mt-5\" aria-label={labels.removePromoCode || 'Remove promo code'}>\r\n\t\t\t\t\t\t{labels.remove || 'Remove'}\r\n\t\t\t\t\t</Button>\r\n\t\t\t\t{:else}\r\n\t\t\t\t\t<Button\r\n\t\t\t\t\t\tonclick={handleApply}\r\n\t\t\t\t\t\tdisabled={promoState.isValidating || !inputValue.trim()}\r\n\t\t\t\t\t\tclass=\"h-10 self-start mt-5\"\r\n\t\t\t\t\t\taria-label={promoState.isValidating ? (labels.checkingPromoCode || 'Checking promo code') : (labels.applyPromoCode || 'Apply promo code')}\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\t{promoState.isValidating ? (labels.checking || 'Checking...') : (labels.apply || 'Apply')}\r\n\t\t\t\t\t</Button>\r\n\t\t\t\t{/if}\r\n\t\t\t</div>\r\n\r\n\t\t\t<!-- Success hint -->\r\n\t\t\t{#if promoState.hint}\r\n\t\t\t\t<p class=\"promo-message success body-sm\" role=\"status\" aria-live=\"polite\">\r\n\t\t\t\t\t{promoState.hint}\r\n\t\t\t\t</p>\r\n\t\t\t{/if}\r\n\t\t</div>\r\n\t{/if}\r\n</div>\r\n\r\n<style>\r\n\t.promo-section {\r\n\t\tmargin-top: 1rem;\r\n\t}\r\n\r\n\t.promo-input-wrapper {\r\n\t\tdisplay: flex;\r\n\t\tgap: 0.5rem;\r\n\t\talign-items: flex-start;\r\n\t}\r\n\r\n\t.promo-message {\r\n\t\tmargin-top: 0.5rem;\r\n\t}\r\n\r\n\t.promo-message.success {\r\n\t\tcolor: hsl(var(--accent-success)); /* green-600 */\r\n\t}\r\n\r\n\t@keyframes promoSlideIn {\r\n\t\tfrom {\r\n\t\t\topacity: 0;\r\n\t\t\ttransform: translateY(-4px);\r\n\t\t}\r\n\r\n\t\tto {\r\n\t\t\topacity: 1;\r\n\t\t\ttransform: translateY(0);\r\n\t\t}\r\n\t}\r\n</style>\r\n"],"names":["tick","style","ms","donationAmount","isRevealedByPromo","isDiscountedByPromo","discountedPrice","labels","$","$$props","isDonation","isSoldOut","isComingSoon","isSalesEnded","isDisabled","scarcityLevel","getScarcityLevel","scarcityText","getScarcityText","donationValue","donationError","isDonationValid","canDecrement","canIncrement","decrement","newQty","asTicketId","increment","donationInputValue","syncDonation","totalPrice","priceDisplay","formatCurrency","feeCaption","salesStartDisplay","formatSmartSalesDate","article","root","div","div_1","div_2","Heading","node","Badge","$$anchor","ScarcityBadge","$$render","consequent","consequent_1","consequent_3","consequent_4","Text","consequent_5","div_3","node_2","div_4","root_13","Input","node_4","$$value","discountedTotal","span","fragment_9","span_1","span_2","root_15","consequent_7","span_3","root_16","span_4","fragment_10","span_5","root_18","consequent_10","consequent_9","alternate","consequent_11","div_5","Button","node_9","Subtract","span_6","node_10","Add","consequent_12","alternate_1","classes","DURATION","isExpanded","inputValue","handleApply","trimmed","handleRemove","handleKeydown","e","shouldExpand","root_3","$2","$3","node_1","p","root_8","consequent_2"],"mappings":";;;;;;;;AAcO,SAASA,GAAKC,IAAsC,SAAe;AAEzE,MADI,OAAO,SAAW,OAClB,OAAO,YAAc,OAAe,CAAC,UAAU,QAAS;AAC5D,QAAMC,IAAKD,MAAU,UAAU,IAAIA,MAAU,WAAW,KAAK;AAC7D,YAAU,QAAQC,CAAE;AACrB;;kBCnBA;;AA8BE,MAAAC,mCAAiB,EAAE,GAEnBC,sCAAoB,EAAK,GACzBC,wCAAsB,EAAK,GAC3BC,oCAAkB,IAAI,GACtBC,IAAMC,EAAA,KAAAC,GAAA,UAAA,IAAA,OAAA,CAAA,EAAA,GAIHC,IAAUF,EAAA,QAAA,MAAAC,EAAA,OAAmB,cAAUA,EAAA,OAAW,eAAe,CAAC,GAClEE,6BAA4B,WAAW,cAAUF,EAAA,OAAW,sBAAsB,CAAC,GACnFG,IAAYJ,EAAA,QAAA,MAAAC,EAAA,OAAmB,WAAW,aAAa,GACvDI,IAAYL,EAAA,QAAA,MAAAC,EAAA,OAAmB,WAAW,aAAa,GACvDK,IAAUN,EAAA,QAAA,MAAAA,EAAA,IAAYG,CAAS,KAAAH,EAAA,IAAII,CAAY,WAAIC,CAAY,CAAA,GAE/DE,IAA4BP,EAAA,QAAA,MAC/BQ,GAAgBP,EAAA,OAAQ,4BAA0B,aAAa,CAAA,GAE5DQ,oBAAwBC,GAAeV,EAAA,IAACO,CAAa,GAAAN,EAAA,OAAS,mBAAmB,QAAQ,CAAA,GAGzFU,IAAaX,EAAA,QAAA,MAAY,WAAWL,EAAc,MAAK,CAAC,GACxDiB,IAAaZ,EAAA,QAAA,MAAAA,EAAA,IAChBE,CAAU,KAAIP,EAAc,MAAK,MAAEK,EAAA,I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GAAA;AAAA;uBAA4BgD;AAAA;;;;;;;sDACjCrF,EAAM,EAAC,UAAU,QAAQ,CAAA;;;;;;;iDAKL,gBAAY,CAAAC,EAAA,IAAKiF,CAAU,EAAC,KAAI,CAAA,oCAE9B,eAAgBlF,EAAM,EAAC,qBAAqB,wBAA0BA,EAAM,EAAC,kBAAkB,kBAAkB;AAJxI,YAAAuE,EAAMlC,GAAA;AAAA,uBACG8C;AAAA;;;;;;;;;;mEAKG,eAAgBnF,EAAM,EAAC,YAAY,gBAAkBA,EAAM,EAAC,SAAS,OAAO,CAAA;;;;;;;uBAX1E,YAASuC,EAAAE,CAAA,IAAAF,EAAA6B,GAAA,EAAA;AAAA;;cAdzBnC,CAAG;wBAAHA,GAAG,CAAA;;;cAgCF4D,IAACC,GAAA,eAADD,GAAC,EAAA;kBAADA,CAAC,sDACW,IAAI,CAAA,eADhBA,CAAC;AAAA;;uBADa,QAAItD,EAAAwD,CAAA;AAAA;;cApCpB/D,CAAG,uCAAHA,GAAG,2BAE6BgD,GAAS,MAAM,cAAA,CAAA,GAG9C/E,EAAA,UAAA,WAAAgC,GAA2CqD,CAAa,eALzDtD,CAAG;AAAA;;YALCwD,CAAY,IAAAjD,EAAAuC,GAAA,EAAA,IAAAvC,EAAAC,CAAA;AAAA;;UAFlBT,CAAG,eAAHA,CAAG;AAFI;;"}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import "svelte/internal/disclose-version";
|
|
2
2
|
import * as e from "svelte/internal/client";
|
|
3
3
|
import { g as E } from "./__SKIP_NAVIGATION__-CJ96TTPE.js";
|
|
4
|
-
import { E as w } from "./Event-
|
|
5
|
-
import { u as S } from "./VenueCalendar-
|
|
4
|
+
import { E as w } from "./Event-Rr8PlUUQ.js";
|
|
5
|
+
import { u as S } from "./VenueCalendar-D8NsQUaM.js";
|
|
6
6
|
import "svelte/transition";
|
|
7
7
|
import "svelte/easing";
|
|
8
|
-
import { a as C } from "./transform-
|
|
8
|
+
import { a as C } from "./transform-XHY0K9GS.js";
|
|
9
9
|
function R(f, a) {
|
|
10
10
|
e.push(a, !0);
|
|
11
11
|
const m = S("SeriesPage");
|
|
12
12
|
let r = e.state(!1), i = e.state(null);
|
|
13
13
|
typeof window < "u" && new URLSearchParams(window.location.search).get("legacy") === "1" && e.set(r, !0), e.user_effect(() => {
|
|
14
|
-
e.get(r) && !e.get(i) && (m.warn("[VC] DEPRECATED: ?legacy=1 fallback for SeriesPage retires on 2026-08-13. See docs/LEGACY_RETIREMENT.md."), import("./SeriesPage.legacy-
|
|
14
|
+
e.get(r) && !e.get(i) && (m.warn("[VC] DEPRECATED: ?legacy=1 fallback for SeriesPage retires on 2026-08-13. See docs/LEGACY_RETIREMENT.md."), import("./SeriesPage.legacy-DmnH3x5t.js").then((t) => {
|
|
15
15
|
e.set(i, t.default, !0);
|
|
16
16
|
}).catch(() => {
|
|
17
17
|
e.set(r, !1);
|
|
@@ -52,4 +52,4 @@ function R(f, a) {
|
|
|
52
52
|
export {
|
|
53
53
|
R as default
|
|
54
54
|
};
|
|
55
|
-
//# sourceMappingURL=SeriesPage-
|
|
55
|
+
//# sourceMappingURL=SeriesPage-OSFghrKu.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SeriesPage-
|
|
1
|
+
{"version":3,"file":"SeriesPage-OSFghrKu.js","sources":["../src/components/Views/SeriesPage.svelte"],"sourcesContent":["<script lang=\"ts\">\r\n\timport { goto } from '$app/navigation';\r\n\timport AirbnbSplitMain from '$lib/public-calendar-flow/Event.svelte';\r\n\timport { createLogger } from '@getmicdrop/svelte-components';\r\n\timport { transformSeriesPageData } from '$lib/public-calendar-flow/transform';\r\n\r\n\tconst logger = createLogger('SeriesPage');\r\n\r\n\t// --- Legacy fallback ---\r\n\t// RETIREMENT: 2026-08-13 — see docs/LEGACY_RETIREMENT.md.\r\n\tlet useLegacy = $state(false);\r\n\tlet LegacyComponent: any = $state(null);\r\n\r\n\tif (typeof window !== 'undefined') {\r\n\t\tconst params = new URLSearchParams(window.location.search);\r\n\t\tif (params.get('legacy') === '1') {\r\n\t\t\tuseLegacy = true;\r\n\t\t}\r\n\t}\r\n\r\n\t$effect(() => {\r\n\t\tif (useLegacy && !LegacyComponent) {\r\n\t\t\tlogger.warn(\r\n\t\t\t\t'[VC] DEPRECATED: ?legacy=1 fallback for SeriesPage retires on 2026-08-13. See docs/LEGACY_RETIREMENT.md.'\r\n\t\t\t);\r\n\t\t\timport('./SeriesPage.legacy.svelte').then((m) => {\r\n\t\t\t\tLegacyComponent = m.default;\r\n\t\t\t}).catch(() => {\r\n\t\t\t\tuseLegacy = false;\r\n\t\t\t});\r\n\t\t}\r\n\t});\r\n\r\n\t// --- Props (matches old SeriesPage external interface) ---\r\n\tinterface Props {\r\n\t\tseries: any;\r\n\t\tonNavigateToOccurrence?: (id: number, slug: string, name?: string) => void;\r\n\t}\r\n\r\n\tlet {\r\n\t\tseries,\r\n\t\tonNavigateToOccurrence = undefined,\r\n\t}: Props = $props();\r\n\r\n\t// Transform series data to EventData for AirbnbSplitMain\r\n\tlet eventData = $derived(series ? transformSeriesPageData(series) : null);\r\n\r\n\t// Handle occurrence click — delegate to callback or navigate directly\r\n\tfunction handleShowtimeClick(occurrence: { id: number; slug: string }): void {\r\n\t\tif (onNavigateToOccurrence) {\r\n\t\t\tonNavigateToOccurrence(occurrence.id, occurrence.slug);\r\n\t\t} else {\r\n\t\t\t// @url-builder-escape: widget-internal route; SC's url-builders cover /a admin paths, not embedded calendar navigation.\r\n\t\t\tgoto(`/${occurrence.id}/${occurrence.slug}`);\r\n\t\t}\r\n\t}\r\n</script>\r\n\r\n{#if useLegacy && LegacyComponent}\r\n\t<svelte:component this={LegacyComponent}\r\n\t\t{series}\r\n\t\t{onNavigateToOccurrence}\r\n\t/>\r\n{:else if eventData}\r\n\t<AirbnbSplitMain\r\n\t\tevent={eventData}\r\n\t\tonShowtimeClick={handleShowtimeClick}\r\n\t/>\r\n{/if}\r\n\r\n"],"names":["logger","createLogger","useLegacy","$","LegacyComponent","m","onNavigateToOccurrence","eventData","$$props","transformSeriesPageData","handleShowtimeClick","occurrence","goto","$$anchor","$$component","AirbnbSplitMain","$$render","consequent","consequent_1"],"mappings":";;;;;;;;iBAAA;;QAMOA,IAASC,EAAa,YAAY;MAIpCC,IAAYC,EAAA,MAAO,EAAK,GACxBC,IAAuBD,EAAA,MAAO,IAAI;SAE3B,SAAW,WACF,gBAAgB,OAAO,SAAS,MAAM,EAC9C,IAAI,QAAQ,MAAM,OAC5BA,EAAA,IAAAD,GAAY,EAAI,GAIlBC,EAAA,kBAAc;UACTD,CAAS,KAAA,CAAAC,EAAA,IAAKC,CAAe,MAChCJ,EAAO,KACN,0GAA0G,GAEpG,OAAA,iCAA4B,EAAE,KAAI,CAAEK,MAAM;YAChDD,GAAkBC,EAAE,SAAO,EAAA;AAAA,IAC5B,CAAC,EAAE,MAAK,MAAO;AACd,MAAAF,EAAA,IAAAD,GAAY,EAAK;AAAA,IAClB,CAAC;AAAA,EAEH,CAAC;AAUA,MAAAI,2CAAyB,MAAS,GAI/BC,IAASJ,EAAA,QAAA,MAAAK,EAAA,SAAqBC,EAAuBD,EAAA,MAAA,IAAW,IAAI;WAG/DE,EAAoBC,GAAgD;AACxE,IAAAL,EAAsB,IACzBA,EAAsB,EAACK,EAAW,IAAIA,EAAW,IAAI,IAGrDC,MAASD,EAAW,EAAE,IAAIA,EAAW,IAAI,EAAA;AAAA,EAE3C;;;;;iCAIwBP,CAAe,GAAA,CAAAS,GAAAC,MAAA;;;;;;mBAErCR,EAAsB;AAAA;;;;AAGvBS,MAAAA,EAAeF,GAAA;AAAA;uBACRN,CAAS;AAAA;yBACCG;AAAA;;;YARdR,CAAS,KAAAC,EAAA,IAAIC,CAAe,IAAAY,EAAAC,CAAA,IAAAd,EAAA,IAKvBI,CAAS,KAAAS,EAAAE,GAAA,CAAA;AAAA;;;AAPX;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "svelte/internal/disclose-version";
|
|
2
2
|
import * as e from "svelte/internal/client";
|
|
3
|
-
import { aT as ue, s as J, P as pe, b1 as K, b2 as be, ae as xe } from "./VenueCalendar-
|
|
3
|
+
import { aT as ue, s as J, P as pe, b1 as K, b2 as be, ae as xe } from "./VenueCalendar-D8NsQUaM.js";
|
|
4
4
|
import "svelte/transition";
|
|
5
5
|
import "svelte/easing";
|
|
6
6
|
var Ne = e.from_html('<span class="venue-separator svelte-4y42r2">·</span> <span class="venue-location svelte-4y42r2"> </span>', 1), qe = e.from_html('<p class="series-summary svelte-4y42r2"> </p>'), Te = e.from_html('<div class="series-description svelte-4y42r2"> </div>'), ke = e.from_html('<div class="empty-dates svelte-4y42r2"><p class="empty-text svelte-4y42r2">No upcoming dates scheduled at this time.</p> <p class="empty-subtext svelte-4y42r2">Check back soon for new announcements.</p></div>'), De = e.from_html('<div class="occurrence-card svelte-4y42r2"><div class="occurrence-info svelte-4y42r2"><div class="occurrence-date svelte-4y42r2"> </div> <div class="occurrence-time svelte-4y42r2"> </div></div> <div class="occurrence-action svelte-4y42r2"><button> </button></div></div>'), Se = e.from_html('<div class="dates-list svelte-4y42r2"></div>'), Ie = e.from_html('<img class="performer-image svelte-4y42r2"/>'), Ae = e.from_html('<div class="performer-placeholder svelte-4y42r2"><svg class="placeholder-icon svelte-4y42r2" fill="currentColor" viewBox="0 0 24 24"><path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z" class="svelte-4y42r2"></path></svg></div>'), Ce = e.from_html('<div class="performer-card svelte-4y42r2"><div class="performer-avatar svelte-4y42r2"><!></div> <h3 class="performer-name svelte-4y42r2"> </h3></div>'), Le = e.from_html('<section class="section svelte-4y42r2"><h2 class="section-heading svelte-4y42r2">Performers</h2> <div class="performers-grid svelte-4y42r2"></div></section>'), we = e.from_html('<div class="faq-item svelte-4y42r2"><p class="faq-question svelte-4y42r2"> </p> <p class="faq-answer svelte-4y42r2"> </p></div>'), ze = e.from_html('<p class="svelte-4y42r2"> </p>'), Ee = e.from_html('<div class="sidebar-section svelte-4y42r2"><h3 class="sidebar-heading svelte-4y42r2">FAQ</h3> <div class="faq-content svelte-4y42r2"><!></div></div>'), Oe = e.from_html('<div class="sidebar-section svelte-4y42r2"><h3 class="sidebar-heading svelte-4y42r2">Important Info</h3> <div class="disclaimer-text svelte-4y42r2"> </div></div>'), Pe = e.from_html('<div class="sidebar-card svelte-4y42r2"><!> <!></div>'), Ze = e.from_html('<div class="series-page svelte-4y42r2"><div class="hero svelte-4y42r2"><div></div> <img class="hero-image svelte-4y42r2"/> <div class="hero-overlay svelte-4y42r2"><div class="hero-content svelte-4y42r2"><span class="series-badge svelte-4y42r2">Recurring Event</span> <h1 class="series-title svelte-4y42r2"> </h1> <div class="series-venue svelte-4y42r2"><span class="svelte-4y42r2"> </span> <!></div></div></div></div> <div class="content-grid svelte-4y42r2"><div class="main-column svelte-4y42r2"><section class="section svelte-4y42r2"><h2 class="section-heading svelte-4y42r2">About this Series</h2> <!> <!></section> <section class="section svelte-4y42r2"><div class="dates-header svelte-4y42r2"><h2 class="section-heading svelte-4y42r2">Upcoming Dates</h2> <span class="dates-count svelte-4y42r2"> </span></div> <!></section> <!></div> <div class="sidebar svelte-4y42r2"><div class="sidebar-sticky svelte-4y42r2"><!></div></div></div></div>');
|
|
@@ -191,4 +191,4 @@ e.delegate(["click"]);
|
|
|
191
191
|
export {
|
|
192
192
|
Ue as default
|
|
193
193
|
};
|
|
194
|
-
//# sourceMappingURL=SeriesPage.legacy-
|
|
194
|
+
//# sourceMappingURL=SeriesPage.legacy-DmnH3x5t.js.map
|