@getmicdrop/venue-calendar 4.3.111 → 4.3.113

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/dist/{AddOnCard-DpOBDI9b.js → AddOnCard-D_d9UHNs.js} +64 -64
  2. package/dist/{ArrowLeftIcon-C_zVqV6t.js → ArrowLeftIcon-Bs7mUb9F.js} +1 -1
  3. package/dist/{BlockPlaceholder-DzMU967I.js → BlockPlaceholder-BgUO-Q5N.js} +1 -1
  4. package/dist/{Calendar-BoaDTy3W.js → Calendar-BMGUJww4.js} +23 -23
  5. package/dist/{CalendarFoundryView-BjOBcBxO.js → CalendarFoundryView-BTmew1Os.js} +615 -615
  6. package/dist/{CalendarIcon-BVyCicqG.js → CalendarIcon-29_IwvHT.js} +1 -1
  7. package/dist/{CartView-BRigpJWl.js → CartView-IpUUucvW.js} +252 -252
  8. package/dist/{Checkout-CBB_BrkW.js → Checkout-BhqL-kmQ.js} +11 -11
  9. package/dist/{Checkout-BWRhw-cI.js → Checkout-JGthqqs-.js} +17 -17
  10. package/dist/{CheckoutTimer-B_bbKzpt.js → CheckoutTimer-BYmPa5AI.js} +1 -1
  11. package/dist/{ChevronDownIcon-CqKYBZhG.js → ChevronDownIcon-Denff3IQ.js} +1 -1
  12. package/dist/{CloseIcon-BhTQvxHn.js → CloseIcon-BnwP0Nx3.js} +1 -1
  13. package/dist/{CollectionView-BBP2uTOg.js → CollectionView-DlkRy1E6.js} +4 -4
  14. package/dist/{Event-BSw_iPJ0.js → Event-BlER5lob.js} +194 -194
  15. package/dist/{EventPage-BTSrJvp0.js → EventPage-DSkb5f6a.js} +18 -18
  16. package/dist/{Input-xj8FOiHB.js → Input-CvK81EKX.js} +1 -1
  17. package/dist/{MailIcon-BaaO5yAE.js → MailIcon-DdNZD4Cv.js} +1 -1
  18. package/dist/{PasswordInput-B_473cLh.js → PasswordInput-CJ7o73tQ.js} +1 -1
  19. package/dist/{PhoneInput-mQkaGqwZ.js → PhoneInput-9qgnvS-F.js} +2 -2
  20. package/dist/{RecommendationsRail-S1I8syg9.js → RecommendationsRail-DDbHjhC_.js} +4 -4
  21. package/dist/{ScarcityBadge-C-VEn2fs.js → ScarcityBadge-BiseR8MX.js} +3 -3
  22. package/dist/{SeriesPage-cOjGzgq0.js → SeriesPage-qLLiHJSN.js} +2 -2
  23. package/dist/{Success-BJmyj-C9.js → Success-TfcsaUGL.js} +20 -20
  24. package/dist/{TagIcon-78loB6Ff.js → TagIcon-DtX06EKe.js} +1 -1
  25. package/dist/{WarningCircleIcon-BlA4oF-K.js → WarningCircleIcon-BEbthCpd.js} +1 -1
  26. package/dist/{WarningTriIcon-B9M_X71V.js → WarningTriIcon-Ba68mCD0.js} +1 -1
  27. package/dist/api/api.cjs +1 -1
  28. package/dist/api/api.mjs +1 -0
  29. package/dist/{api-CoAKej3S.js → api-OjCXecbx.js} +206 -152
  30. package/dist/{copyToClipboard-GCd8x6uN.js → copyToClipboard-pMnstOiv.js} +1 -1
  31. package/dist/{createErrorGate.svelte-D6SJK51n.js → createErrorGate.svelte-DgREjCbj.js} +1 -1
  32. package/dist/{datetime-DWmAPk9U.js → datetime-vgtbUysw.js} +61 -42
  33. package/dist/{event-transform-C5c5HKWF.js → event-transform-Dgb8zlg2.js} +15 -15
  34. package/dist/{href-CZPFcjzy.js → href-Dv7vLRDA.js} +1 -1
  35. package/dist/{i18n-dZGBYr5W.js → i18n-B-mcjNXL.js} +95 -95
  36. package/dist/to-event-card-props-BquqSDuB.js +383 -0
  37. package/dist/{utils-XAD2Mb21.js → utils-Baq55Xy_.js} +1 -1
  38. package/dist/venue-calendar.es.js +498 -546
  39. package/dist/venue-calendar.iife.js +28 -28
  40. package/dist/venue-calendar.umd.js +50 -50
  41. package/package.json +2 -2
  42. package/dist/to-event-card-props-DfSOYeKe.js +0 -402
  43. /package/dist/locales/{4.3.111 → 4.3.113}/flow/de.js +0 -0
  44. /package/dist/locales/{4.3.111 → 4.3.113}/flow/es.js +0 -0
  45. /package/dist/locales/{4.3.111 → 4.3.113}/flow/fr.js +0 -0
  46. /package/dist/locales/{4.3.111 → 4.3.113}/flow/id.js +0 -0
  47. /package/dist/locales/{4.3.111 → 4.3.113}/flow/it.js +0 -0
  48. /package/dist/locales/{4.3.111 → 4.3.113}/flow/ja.js +0 -0
  49. /package/dist/locales/{4.3.111 → 4.3.113}/flow/ko.js +0 -0
  50. /package/dist/locales/{4.3.111 → 4.3.113}/flow/nl.js +0 -0
  51. /package/dist/locales/{4.3.111 → 4.3.113}/flow/pl.js +0 -0
  52. /package/dist/locales/{4.3.111 → 4.3.113}/flow/pt-br.js +0 -0
  53. /package/dist/locales/{4.3.111 → 4.3.113}/flow/tr.js +0 -0
  54. /package/dist/locales/{4.3.111 → 4.3.113}/flow/zh.js +0 -0
  55. /package/dist/locales/{4.3.111 → 4.3.113}/main/de.js +0 -0
  56. /package/dist/locales/{4.3.111 → 4.3.113}/main/es.js +0 -0
  57. /package/dist/locales/{4.3.111 → 4.3.113}/main/fr.js +0 -0
  58. /package/dist/locales/{4.3.111 → 4.3.113}/main/id.js +0 -0
  59. /package/dist/locales/{4.3.111 → 4.3.113}/main/it.js +0 -0
  60. /package/dist/locales/{4.3.111 → 4.3.113}/main/ja.js +0 -0
  61. /package/dist/locales/{4.3.111 → 4.3.113}/main/ko.js +0 -0
  62. /package/dist/locales/{4.3.111 → 4.3.113}/main/nl.js +0 -0
  63. /package/dist/locales/{4.3.111 → 4.3.113}/main/pl.js +0 -0
  64. /package/dist/locales/{4.3.111 → 4.3.113}/main/pt-br.js +0 -0
  65. /package/dist/locales/{4.3.111 → 4.3.113}/main/tr.js +0 -0
  66. /package/dist/locales/{4.3.111 → 4.3.113}/main/zh.js +0 -0
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@getmicdrop/venue-calendar",
3
3
  "_version_comment": "4.1.55 was the last PUBLISHED version, and the tree carried 36 commits npm's 4.1.55 does not have — including the gate-password security fix and four money fixes. A filename must never reuse a version npm has taken (jsDelivr/unpkg cache the FIRST bytes they see under `@4.1.55` forever, so republishing that number ships the old widget to every venue that pinned it). Bumped to 4.2.0 here, BEFORE anything is built for publish. `npm run release:preflight` refuses to proceed when this number already exists in the registry.",
4
- "version": "4.3.111",
4
+ "version": "4.3.113",
5
5
  "description": "A customizable Svelte calendar component for displaying comedy events",
6
6
  "type": "module",
7
7
  "types": "./dist/types/index.d.ts",
@@ -155,7 +155,7 @@
155
155
  "_devDependencies_pin_comment": "Three EXACT pins in here are load-bearing and must not be re-caretted by a dependency bot. (1) `@getmicdrop/svelte-components` — the ES/UMD/IIFE builds do NOT externalize SC, so it is COMPILED INTO every shipped artifact. RESTORED TO AN EXACT PIN 2026-08-23, having drifted back to a caret at some point between 6.24.311 and 6.24.316 — exactly the re-caretting this note warns about, which is worth knowing recurs. Under a caretted range like `^6.24.311` the SC version a venue's browser executes is whatever the range floats to on the publish machine at publish time, which is not recorded anywhere and is not reproducible after the fact; the `overrides` block below cannot help (it only ever covered esbuild, and consumers ignore a dependency's overrides entirely). Pinned exact so the artifact and the manifest agree, and vite.config.lib.js stamps the resolved version into the bundle as __VC_SC_VERSION__ so a venue's devtools can answer 'which SC is this?'. (2) `svelte` — the compiler whose private internal/client calls the pre-compiled dist binds to. `^5.56.9` let the compiler move under a peer range that stayed still; see _peerDependencies_comment. (3) `@stripe/stripe-js` in dependencies — see its own note there.",
156
156
  "devDependencies": {
157
157
  "@eslint/js": "^10.0.1",
158
- "@getmicdrop/svelte-components": "6.24.426",
158
+ "@getmicdrop/svelte-components": "6.24.427",
159
159
  "@playwright/test": "^1.60.0",
160
160
  "@size-limit/file": "^13.0.3",
161
161
  "@sveltejs/adapter-auto": "^7.0.1",
@@ -1,402 +0,0 @@
1
- import { f as e, p as t } from "./sizing-B7ixYndz.js";
2
- import { g as n, n as r, o as i, r as a, t as o } from "./datetime-DWmAPk9U.js";
3
- import { V as s, g as c, i as l, t as u, x as d, y as f } from "./defaultLabels-CsRGNP7f.js";
4
- import { r as p, t as m } from "./Button-VUB2WJ88.js";
5
- import "svelte/internal/disclose-version";
6
- import * as h from "svelte/internal/client";
7
- //#region node_modules/@getmicdrop/svelte-components/dist/calendar/EventCard/tokens.js
8
- var g = {
9
- micro: {
10
- badgeSize: "xs",
11
- pillSize: "xs"
12
- },
13
- compact: {
14
- badgeSize: "sm",
15
- pillSize: "xs"
16
- },
17
- standard: {
18
- badgeSize: "sm",
19
- pillSize: "xs"
20
- },
21
- featured: {
22
- badgeSize: "sm",
23
- pillSize: "sm"
24
- }
25
- }, _ = 0;
26
- function ee() {
27
- return _ += 1;
28
- }
29
- var v = h.from_html("<div class=\"event-card__poster-fallback svelte-18ndok6\" aria-hidden=\"true\"><span> </span></div>"), y = h.from_html("<div><!></div>"), b = h.from_html("<span class=\"event-card__badge svelte-18ndok6\"><!></span>"), x = h.from_html("<span> </span>"), S = h.from_html("<span class=\"event-card__meta-sep svelte-18ndok6\" aria-hidden=\"true\">·</span>"), C = h.from_html("<!> <span class=\"event-card__meta-item svelte-18ndok6\"> </span>", 1), w = h.from_html("<p class=\"event-card__meta tone-secondary m-0 svelte-18ndok6\"></p>"), T = h.from_html("<div class=\"event-card__pills flex flex-wrap gap-2 relative svelte-18ndok6\"></div>"), E = h.from_html("<p class=\"event-card__description type-body tone-secondary m-0 svelte-18ndok6\"> </p>"), te = h.from_html("<article class=\"event-card relative rounded-lg border bg-card border-border overflow-hidden svelte-18ndok6\"><!> <div class=\"event-card__content flex flex-col flex-1 min-w-0 svelte-18ndok6\"><header class=\"event-card__header\"><h3><span class=\"event-card__title-text\"><!> <a class=\"event-card__title-link svelte-18ndok6\" rel=\"external\"> </a></span></h3></header> <!> <!> <!> <!></div></article>");
30
- function D(n, r) {
31
- h.push(r, !0);
32
- let i = h.prop(r, "layout", 3, "vertical"), a = h.prop(r, "density", 3, "standard"), o = h.prop(r, "imageUrl", 3, ""), c = h.prop(r, "placeholderImage", 3, ""), u = h.prop(r, "hidePoster", 3, !1), d = h.prop(r, "posterFit", 3, "fit"), f = h.prop(r, "posterBackdrop", 3, "blur"), p = h.prop(r, "dateLabel", 3, ""), _ = h.prop(r, "meta", 19, () => []), D = h.prop(r, "description", 3, ""), O = h.prop(r, "badge", 3, null), k = h.prop(r, "pills", 19, () => []), A = h.prop(r, "pillVariant", 3, "alternative"), j = h.prop(r, "showDescription", 3, !1), M = h.prop(r, "hideDate", 3, !1), N = h.derived(() => g[a()]), P = h.derived(() => d() === "fit" && f() === "color"), F = `event-card-title-${ee()}`, I = h.derived(() => j() && !!D() && (a() === "standard" || a() === "featured")), L = h.derived(() => !M() && a() !== "micro" && !!p()), R = h.derived(() => _().filter((e) => typeof e == "string" && e.trim() !== "")), z = h.derived(() => a() !== "micro" && h.get(R).length > 0), B = h.derived(() => !o() && !c());
33
- function V(e, t) {
34
- t.metaKey || t.ctrlKey || t.shiftKey || t.altKey || r.onpillclick && (t.preventDefault(), t.stopPropagation(), r.onpillclick(e));
35
- }
36
- function H(e) {
37
- e.metaKey || e.ctrlKey || e.shiftKey || e.altKey || r.onclick && (e.preventDefault(), r.onclick());
38
- }
39
- var U = te(), W = h.child(U), ne = (n) => {
40
- var i = y(), a = h.child(i), l = (n) => {
41
- var i = v(), a = h.child(i), o = h.child(a, !0);
42
- h.reset(a), h.reset(i), h.template_effect(() => {
43
- h.set_class(a, 1, `event-card__poster-fallback-text ${t.strong ?? ""} ${e.tight ?? ""}`, "svelte-18ndok6"), h.set_text(o, r.title);
44
- }), h.append(n, i);
45
- }, u = (e) => {
46
- s(e, {
47
- get src() {
48
- return o();
49
- },
50
- get fallback() {
51
- return c();
52
- },
53
- fit: "contain",
54
- branded: !1,
55
- class: "event-card__poster-fill"
56
- });
57
- }, f = (e) => {
58
- {
59
- let t = h.derived(() => d() === "fill" ? "cover" : "blur-backdrop");
60
- s(e, {
61
- get src() {
62
- return o();
63
- },
64
- get fallback() {
65
- return c();
66
- },
67
- get fit() {
68
- return h.get(t);
69
- },
70
- branded: !1,
71
- class: "event-card__poster-fill h-full"
72
- });
73
- }
74
- };
75
- h.if(a, (e) => {
76
- h.get(B) ? e(l) : h.get(P) ? e(u, 1) : e(f, -1);
77
- }), h.reset(i), h.template_effect(() => {
78
- h.set_class(i, 1, `event-card__poster aspect-video shrink-0 overflow-hidden ${h.get(P) ? "bg-bg-primary" : "bg-muted"}`, "svelte-18ndok6"), h.set_attribute(i, "data-poster-backdrop", h.get(P) ? "color" : void 0);
79
- }), h.append(n, i);
80
- };
81
- h.if(W, (e) => {
82
- u() || e(ne);
83
- });
84
- var G = h.sibling(W, 2), K = h.child(G), q = h.child(K), J = h.child(q), Y = h.child(J), re = (e) => {
85
- var t = b(), n = h.child(t);
86
- l(n, {
87
- get variant() {
88
- return O().variant;
89
- },
90
- get size() {
91
- return h.get(N).badgeSize;
92
- },
93
- children: (e, t) => {
94
- h.next();
95
- var n = h.text();
96
- h.template_effect(() => h.set_text(n, O().text)), h.append(e, n);
97
- },
98
- $$slots: { default: !0 }
99
- }), h.reset(t), h.append(e, t);
100
- };
101
- h.if(Y, (e) => {
102
- O() && e(re);
103
- });
104
- var X = h.sibling(Y, 2), ie = h.child(X, !0);
105
- h.reset(X), h.reset(J), h.reset(q), h.reset(K);
106
- var Z = h.sibling(K, 2), ae = (e) => {
107
- var n = x(), r = h.child(n, !0);
108
- h.reset(n), h.template_effect(() => {
109
- h.set_class(n, 1, `event-card__date tone-secondary ${t.emphasis ?? ""}`, "svelte-18ndok6"), h.set_text(r, p());
110
- }), h.append(e, n);
111
- };
112
- h.if(Z, (e) => {
113
- h.get(L) && e(ae);
114
- });
115
- var Q = h.sibling(Z, 2), oe = (e) => {
116
- var t = w();
117
- h.each(t, 21, () => h.get(R), h.index, (e, t, n) => {
118
- var r = C(), i = h.first_child(r), a = (e) => {
119
- var t = S();
120
- h.append(e, t);
121
- };
122
- h.if(i, (e) => {
123
- n > 0 && e(a);
124
- });
125
- var o = h.sibling(i, 2), s = h.child(o, !0);
126
- h.reset(o), h.template_effect(() => h.set_text(s, h.get(t))), h.append(e, r);
127
- }), h.reset(t), h.append(e, t);
128
- };
129
- h.if(Q, (e) => {
130
- h.get(z) && e(oe);
131
- });
132
- var $ = h.sibling(Q, 2), se = (e) => {
133
- var t = T();
134
- h.each(t, 21, k, h.index, (e, t, n) => {
135
- {
136
- let r = h.derived(() => A() === "primary" ? "default" : "alternative"), i = h.derived(() => h.get(t).ariaLabel ?? h.get(t).timeLabel);
137
- m(e, {
138
- get href() {
139
- return h.get(t).href;
140
- },
141
- get variant() {
142
- return h.get(r);
143
- },
144
- get size() {
145
- return h.get(N).pillSize;
146
- },
147
- onclick: (e) => V(n, e),
148
- get "aria-label"() {
149
- return h.get(i);
150
- },
151
- children: (e, n) => {
152
- h.next();
153
- var r = h.text();
154
- h.template_effect(() => h.set_text(r, h.get(t).timeLabel)), h.append(e, r);
155
- },
156
- $$slots: { default: !0 }
157
- });
158
- }
159
- }), h.reset(t), h.append(e, t);
160
- };
161
- h.if($, (e) => {
162
- k().length > 0 && e(se);
163
- });
164
- var ce = h.sibling($, 2), le = (e) => {
165
- var t = E(), n = h.child(t, !0);
166
- h.reset(t), h.template_effect(() => h.set_text(n, D())), h.append(e, t);
167
- };
168
- h.if(ce, (e) => {
169
- h.get(I) && e(le);
170
- }), h.reset(G), h.reset(U), h.template_effect(() => {
171
- h.set_attribute(U, "data-layout", i()), h.set_attribute(U, "data-density", a()), h.set_attribute(U, "data-hide-poster", u()), h.set_attribute(U, "aria-labelledby", F), h.set_class(q, 1, `event-card__title ${t.strong ?? ""} tone-primary m-0`, "svelte-18ndok6"), h.set_attribute(q, "id", F), h.set_attribute(X, "href", r.href), h.set_attribute(X, "aria-label", r.ariaLabel ?? r.title), h.set_text(ie, r.title);
172
- }), h.delegated("click", X, H), h.append(n, U), h.pop();
173
- }
174
- h.delegate(["click"]);
175
- //#endregion
176
- //#region node_modules/@getmicdrop/svelte-components/dist/routing/slug.js
177
- var O = 70;
178
- function k(e) {
179
- return e.normalize("NFKD").replace(/[\u0300-\u036f]/g, "").toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "").slice(0, O).replace(/-+$/g, "");
180
- }
181
- //#endregion
182
- //#region src/lib/url-manager/params.ts
183
- function A(e) {
184
- let t = e.indexOf("-"), n = t === -1 ? e : e.substring(0, t);
185
- return /^\d+$/.test(n) ? {
186
- id: n,
187
- slug: t === -1 ? "" : e.substring(t + 1)
188
- } : null;
189
- }
190
- function j(e) {
191
- let t = e.id || e.eventID || 0, n = e.slug || k(e.name || "");
192
- return `#${t}${n ? "-" + n : ""}`;
193
- }
194
- //#endregion
195
- //#region src/lib/browse-widgets/utils.ts
196
- function M(e) {
197
- let t = /* @__PURE__ */ new Map(), n = [];
198
- for (let r of e) {
199
- let e = r.eventSeriesId;
200
- if (e && e > 0) {
201
- let n = `${e}:${r.date}`, i = t.get(n) || [];
202
- i.push(r), t.set(n, i);
203
- } else n.push({
204
- event: r,
205
- instances: [r],
206
- isSeries: !1
207
- });
208
- }
209
- for (let e of t.values()) e.sort((e, t) => e.startDateTime.localeCompare(t.startDateTime)), n.push({
210
- event: e[0],
211
- instances: e,
212
- isSeries: e.length > 1
213
- });
214
- return n.sort((e, t) => e.instances[0].startDateTime.localeCompare(t.instances[0].startDateTime)), n;
215
- }
216
- //#endregion
217
- //#region src/lib/browse-widgets/defaults.ts
218
- var N = [
219
- "cancelled",
220
- "postponed",
221
- "past",
222
- "sold_out",
223
- "sales_ended",
224
- "coming_soon",
225
- "scarcity"
226
- ];
227
- //#endregion
228
- //#region src/lib/browse-widgets/status.ts
229
- function P(e) {
230
- return e.toLowerCase().replace(/[\s_-]+/g, "");
231
- }
232
- function F(e) {
233
- if (P(e.status ?? "") !== "onsale" || e.ticketsRemaining == null || e.ticketsTotal == null || e.ticketsTotal === 0 || e.ticketsRemaining <= 0) return !1;
234
- let t = n(e.ticketsRemaining, e.ticketsTotal);
235
- return t === "low" || t === "urgent";
236
- }
237
- function I(e, t) {
238
- if (!e) return null;
239
- let n = P(e.status ?? "");
240
- for (let r of N) switch (r) {
241
- case "cancelled":
242
- if (n === "cancelled" || n === "canceled") return {
243
- text: t?.statusCancelled || "Canceled",
244
- type: "cancelled"
245
- };
246
- break;
247
- case "postponed":
248
- if (n === "postponed") return {
249
- text: t?.statusPostponed || "Postponed",
250
- type: "postponed"
251
- };
252
- break;
253
- case "past":
254
- if (e.startDateTime) {
255
- let n = d(e.endDateTime || e.startDateTime);
256
- if (n && c(n, p()) < 0) return {
257
- text: t?.statusPastEvent || "Ended",
258
- type: "past"
259
- };
260
- }
261
- break;
262
- case "sold_out":
263
- if (n === "soldout" || e.ticketsRemaining != null && e.ticketsRemaining <= 0 && e.ticketsTotal != null && e.ticketsTotal > 0) return {
264
- text: t?.statusSoldOut || "Sold out",
265
- type: "sold_out"
266
- };
267
- break;
268
- case "sales_ended":
269
- if (n === "salesended") return {
270
- text: t?.statusSalesEnded || "Sales ended",
271
- type: "sales_ended"
272
- };
273
- break;
274
- case "coming_soon":
275
- if (n === "comingsoon") return {
276
- text: t?.statusComingSoon || "Coming soon",
277
- type: "coming_soon"
278
- };
279
- break;
280
- case "scarcity": if (F(e)) return {
281
- text: t?.statusSellingFast || "Selling fast",
282
- type: "scarcity"
283
- };
284
- }
285
- return null;
286
- }
287
- function L(e) {
288
- if (!e) return !1;
289
- let t = e.type;
290
- return t === "cancelled" || t === "postponed" || t === "past" || t === "sold_out" || t === "sales_ended";
291
- }
292
- function R(e, t) {
293
- if (e.length === 0) return null;
294
- if (e.length === 1) return I(e[0], t);
295
- let n = e.map((e) => I(e, t));
296
- if (n.every((e) => e?.type === "cancelled")) return {
297
- type: "cancelled",
298
- text: z("cancelled", t)
299
- };
300
- if (n.every((e) => e?.type === "postponed")) return {
301
- type: "postponed",
302
- text: z("postponed", t)
303
- };
304
- if (n.every((e) => e?.type === "sold_out")) return {
305
- type: "sold_out",
306
- text: z("sold_out", t)
307
- };
308
- let r = n.filter((e) => e?.type !== "sold_out" && e?.type !== "cancelled" && e?.type !== "postponed");
309
- return r.length > 0 && r.every((e) => e?.type === "scarcity") ? {
310
- type: "scarcity",
311
- text: z("scarcity", t)
312
- } : null;
313
- }
314
- function z(e, t) {
315
- switch (e) {
316
- case "cancelled": return t?.statusCancelled || "Canceled";
317
- case "postponed": return t?.statusPostponed || "Postponed";
318
- case "past": return t?.statusPastEvent || "Ended";
319
- case "sold_out": return t?.statusSoldOut || "Sold out";
320
- case "sales_ended": return t?.statusSalesEnded || "Sales ended";
321
- case "coming_soon": return t?.statusComingSoon || "Coming soon";
322
- case "scarcity": return t?.statusSellingFast || "Selling fast";
323
- }
324
- }
325
- function B(e) {
326
- switch (e) {
327
- case "cancelled": return "neutral";
328
- case "postponed": return "neutral";
329
- case "past": return "neutral";
330
- case "sold_out": return "neutral";
331
- case "sales_ended": return "neutral";
332
- case "coming_soon": return "brand";
333
- case "scarcity": return "warning";
334
- default: return "neutral";
335
- }
336
- }
337
- function V(e) {
338
- let t = f();
339
- return e.filter((e) => {
340
- if (P(e.status ?? "") === "postponed") return !0;
341
- let n = r(t, e.timeZone);
342
- return e.date >= n;
343
- }).sort((e, t) => e.date.localeCompare(t.date));
344
- }
345
- //#endregion
346
- //#region src/lib/browse-widgets/to-event-card-props.ts
347
- function H(e, t) {
348
- let r = e.ticketsRemaining ?? 0, i = e.ticketsTotal ?? 0, a = n(r, i);
349
- return a === "sold-out" ? {
350
- text: t.statusSoldOut || "Sold out",
351
- variant: "neutral"
352
- } : a === "low" || a === "urgent" ? {
353
- text: t.statusSellingFast || "Selling fast",
354
- variant: "warning"
355
- } : null;
356
- }
357
- function U(e, t, n, r) {
358
- let o = [];
359
- if (e.stageName && o.push(e.stageName), e.displayDoorsTime === !0 && e.doorsOpenTime) {
360
- let t = a(e.doorsOpenTime, e.timeZone, r);
361
- t && o.push((n.doorsAtTime || "Doors {time}").replace("{time}", t));
362
- }
363
- if (!t && e.displayStartTime !== !1 && e.startDateTime) {
364
- let t = i(e.startDateTime, e.timeZone, r);
365
- t && o.push((n.showAtTime || "Show {time}").replace("{time}", t));
366
- }
367
- return e.displayAgeRestriction && o.push(e.ageRestriction && e.ageRestriction > 0 ? (n.agesPlus || "Ages {age}+").replace("{age}", String(e.ageRestriction)) : n.allAges || "All ages"), o;
368
- }
369
- function W(e, t = u, n, r = null, a = {}) {
370
- let s = e.event, c = e.isSeries ? R(e.instances, t) : I(s, t), l = c && c.type !== "past" ? {
371
- text: c.text,
372
- variant: B(c.type)
373
- } : null;
374
- !l && !e.isSeries && (l = H(s, t));
375
- let d = j(s), f = s.startDateTime && r?.date !== !1 ? o(s.startDateTime, s.timeZone, n) : "", p = e.isSeries ? e.instances : s.startDateTime ? [s] : [], m = p.map((e) => {
376
- let r = i(e.startDateTime, e.timeZone, n), a = I(e, t)?.type === "sold_out";
377
- return {
378
- timeLabel: r,
379
- href: j(e),
380
- ariaLabel: `${s.name} at ${r}${a ? ", sold out" : ""}`
381
- };
382
- }), h = [s.name];
383
- s.startDateTime && h.push(`on ${o(s.startDateTime, s.timeZone, n)}`), e.isSeries ? h.push(`${e.instances.length} showtimes available`) : s.startDateTime && h.push(`at ${i(s.startDateTime, s.timeZone, n)}`), c && h.push(c.text);
384
- let g = U(s, e.isSeries, t, n);
385
- return h.push(...g), {
386
- title: s.name,
387
- href: d,
388
- imageUrl: s.imageUrl ?? "",
389
- dateLabel: f,
390
- description: r?.description === !1 ? "" : s.description ?? "",
391
- ariaLabel: h.join(", "),
392
- hidePoster: r?.poster === !1,
393
- posterFit: a.posterFit ?? "fit",
394
- posterBackdrop: a.posterBackdrop ?? "blur",
395
- badge: l,
396
- pills: m,
397
- pillEvents: p,
398
- meta: g
399
- };
400
- }
401
- //#endregion
402
- export { M as a, D as c, L as i, V as n, A as o, I as r, k as s, W as t };
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes