@museumwnf/viewer-layout 3.4.0 → 3.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +70 -2
- package/dist/{FeaturedRecord-BJ8LaWGP.js → FeaturedRecord-DJfyvfqt.js} +1 -1
- package/dist/GlossaryPopover-DcptyNWI.js +654 -0
- package/dist/{ItemDetailView-I__hm63H.js → ItemDetailView-BdGFnbLG.js} +15 -14
- package/dist/{OnDisplayIn-Dv8i7uvH.js → OnDisplayIn-BfJoPonn.js} +38 -38
- package/dist/RecordView-DovgfTMz.js +263 -0
- package/dist/{Theme-B5J0XRe1.js → Theme-CZ-OVXao.js} +24 -24
- package/dist/TimelineEventList-gsoc-SBx.js +841 -0
- package/dist/TimelineResultsView-C2-TnM71.js +1386 -0
- package/dist/{content-p0tqKkcD.js → content-CtwBcSjU.js} +2 -2
- package/dist/content.js +6 -5
- package/dist/dxa.js +351 -349
- package/dist/index.js +6 -5
- package/dist/standalone.js +761 -0
- package/dist/viewer-layout.css +1 -1
- package/dist/views.js +5 -4
- package/package.json +4 -3
- package/src/tokens.reference.css +66 -0
- package/dist/TimelineEventList-COjkXEzS.js +0 -1487
- package/dist/TimelineResultsView-ChkBn27W.js +0 -1640
|
@@ -0,0 +1,761 @@
|
|
|
1
|
+
import { r as e } from "./chrome-DPuPeWzV.js";
|
|
2
|
+
import { c as t, d as n, n as r } from "./GlossaryPopover-DcptyNWI.js";
|
|
3
|
+
import { t as i } from "./RecordView-DovgfTMz.js";
|
|
4
|
+
import { t as a } from "./SiteShell-4vV2jIzf.js";
|
|
5
|
+
import { Fragment as o, computed as s, createBlock as c, createCommentVNode as l, createElementBlock as u, createElementVNode as d, createSlots as f, createTextVNode as p, createVNode as m, guardReactiveProps as h, normalizeClass as g, normalizeProps as _, normalizeStyle as v, openBlock as y, ref as b, renderList as x, renderSlot as S, toDisplayString as C, unref as w, useSlots as T, watch as E, withCtx as D } from "vue";
|
|
6
|
+
import { byId as O, loadEntities as k, pictureCredits as A, removeEndingPoint as j, renderBlock as M, renderInline as N, renderPlain as P, useDataPackage as F, useI18n as I, useSection as ee, useSiteConfig as L } from "@museumwnf/viewer-core";
|
|
7
|
+
//#region src/standalone/Banner.vue
|
|
8
|
+
var te = {
|
|
9
|
+
key: 0,
|
|
10
|
+
class: "mwnf-standalone-banner__title"
|
|
11
|
+
}, R = {
|
|
12
|
+
__name: "Banner",
|
|
13
|
+
props: {
|
|
14
|
+
image: {
|
|
15
|
+
type: String,
|
|
16
|
+
default: ""
|
|
17
|
+
},
|
|
18
|
+
title: {
|
|
19
|
+
type: String,
|
|
20
|
+
default: ""
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
setup(e) {
|
|
24
|
+
return (t, n) => (y(), u("div", {
|
|
25
|
+
class: "mwnf-standalone-banner",
|
|
26
|
+
style: v(e.image ? { backgroundImage: `url(${JSON.stringify(e.image)})` } : void 0)
|
|
27
|
+
}, [e.title ? (y(), u("h1", te, [d("span", null, C(e.title), 1)])) : l("", !0)], 4));
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
//#endregion
|
|
31
|
+
//#region src/standalone/chrome.js
|
|
32
|
+
function z() {
|
|
33
|
+
let t = L();
|
|
34
|
+
return (n) => e(t.chrome, n);
|
|
35
|
+
}
|
|
36
|
+
function B(e, t) {
|
|
37
|
+
return !e || typeof e == "string" ? e ?? "" : e[t] ?? e.en ?? Object.values(e)[0] ?? "";
|
|
38
|
+
}
|
|
39
|
+
function V(e = /* @__PURE__ */ new Date()) {
|
|
40
|
+
let t = new Date(e.getFullYear(), 0, 1);
|
|
41
|
+
return Math.round((new Date(e.getFullYear(), e.getMonth(), e.getDate()) - t) / 864e5);
|
|
42
|
+
}
|
|
43
|
+
function H(e, t = /* @__PURE__ */ new Date()) {
|
|
44
|
+
return e?.length ? e[V(t) % e.length] : null;
|
|
45
|
+
}
|
|
46
|
+
function U(e) {
|
|
47
|
+
let [t, ...n] = String(e ?? "").split("*")[0].trim().split(";");
|
|
48
|
+
return !t || n.length < 5 ? "" : [
|
|
49
|
+
"mwnf3",
|
|
50
|
+
`${t}s`,
|
|
51
|
+
...n.slice(0, n.length - 1)
|
|
52
|
+
].join(":");
|
|
53
|
+
}
|
|
54
|
+
//#endregion
|
|
55
|
+
//#region src/standalone/Sponsors.vue
|
|
56
|
+
var ne = { class: "mwnf-standalone-sponsors" }, re = {
|
|
57
|
+
key: 0,
|
|
58
|
+
class: "mwnf-standalone-sponsors__text"
|
|
59
|
+
}, ie = ["innerHTML"], ae = { key: 1 }, W = ["innerHTML"], G = {
|
|
60
|
+
key: 1,
|
|
61
|
+
class: "mwnf-standalone-sponsors__title"
|
|
62
|
+
}, K = {
|
|
63
|
+
key: 2,
|
|
64
|
+
class: "mwnf-standalone-sponsors__logos"
|
|
65
|
+
}, q = {
|
|
66
|
+
key: 0,
|
|
67
|
+
class: "mwnf-standalone-sponsors__note"
|
|
68
|
+
}, J = ["src", "alt"], oe = ["innerHTML"], se = ["href"], ce = ["src", "alt"], le = ["src", "alt"], ue = {
|
|
69
|
+
key: 3,
|
|
70
|
+
class: "mwnf-standalone-sponsors__links"
|
|
71
|
+
}, Y = {
|
|
72
|
+
__name: "Sponsors",
|
|
73
|
+
props: { columns: {
|
|
74
|
+
type: Array,
|
|
75
|
+
default: () => []
|
|
76
|
+
} },
|
|
77
|
+
setup(e) {
|
|
78
|
+
let t = e, { t: r } = I(), i = z(), a = s(() => t.columns.map((e, t) => ({
|
|
79
|
+
key: t,
|
|
80
|
+
width: e.width ?? null,
|
|
81
|
+
lead: e.lead ? N(r(e.lead)) : "",
|
|
82
|
+
text: e.text ? N(r(e.text)) : "",
|
|
83
|
+
break: !!e.break,
|
|
84
|
+
title: e.title ? r(e.title) : "",
|
|
85
|
+
logos: (e.logos ?? []).map((e) => ({
|
|
86
|
+
src: i(e.src) ?? "",
|
|
87
|
+
alt: e.alt ? r(e.alt) : "",
|
|
88
|
+
href: e.href ?? "",
|
|
89
|
+
note: e.note ? M(r(e.note)) : ""
|
|
90
|
+
})),
|
|
91
|
+
links: (e.links ?? []).map((e) => ({
|
|
92
|
+
...e,
|
|
93
|
+
label: r(e.label)
|
|
94
|
+
}))
|
|
95
|
+
})));
|
|
96
|
+
return (e, t) => (y(), u("div", ne, [(y(!0), u(o, null, x(a.value, (e) => (y(), u("div", {
|
|
97
|
+
key: e.key,
|
|
98
|
+
class: "mwnf-standalone-sponsors__column",
|
|
99
|
+
style: v(e.width ? { flexGrow: e.width } : void 0)
|
|
100
|
+
}, [
|
|
101
|
+
e.lead || e.text ? (y(), u("p", re, [
|
|
102
|
+
e.lead ? (y(), u("i", {
|
|
103
|
+
key: 0,
|
|
104
|
+
innerHTML: e.lead
|
|
105
|
+
}, null, 8, ie)) : l("", !0),
|
|
106
|
+
e.lead && e.break ? (y(), u("br", ae)) : e.lead && e.text ? (y(), u(o, { key: 2 }, [p(C(" "))], 64)) : l("", !0),
|
|
107
|
+
e.text ? (y(), u("span", {
|
|
108
|
+
key: 3,
|
|
109
|
+
innerHTML: e.text
|
|
110
|
+
}, null, 8, W)) : l("", !0)
|
|
111
|
+
])) : l("", !0),
|
|
112
|
+
e.title ? (y(), u("p", G, C(e.title), 1)) : l("", !0),
|
|
113
|
+
e.logos.length ? (y(), u("ul", K, [(y(!0), u(o, null, x(e.logos, (e) => (y(), u("li", { key: e.src }, [e.note ? (y(), u("details", q, [d("summary", null, [d("img", {
|
|
114
|
+
src: e.src,
|
|
115
|
+
alt: e.alt
|
|
116
|
+
}, null, 8, J)]), d("div", {
|
|
117
|
+
class: "mwnf-standalone-sponsors__note-body",
|
|
118
|
+
innerHTML: e.note
|
|
119
|
+
}, null, 8, oe)])) : e.href ? (y(), u("a", {
|
|
120
|
+
key: 1,
|
|
121
|
+
href: e.href,
|
|
122
|
+
target: "_blank",
|
|
123
|
+
rel: "noopener"
|
|
124
|
+
}, [d("img", {
|
|
125
|
+
src: e.src,
|
|
126
|
+
alt: e.alt
|
|
127
|
+
}, null, 8, ce)], 8, se)) : (y(), u("img", {
|
|
128
|
+
key: 2,
|
|
129
|
+
src: e.src,
|
|
130
|
+
alt: e.alt
|
|
131
|
+
}, null, 8, le))]))), 128))])) : l("", !0),
|
|
132
|
+
e.links.length ? (y(), u("ul", ue, [(y(!0), u(o, null, x(e.links, (e) => (y(), u("li", { key: e.label }, [m(n, {
|
|
133
|
+
to: e.to,
|
|
134
|
+
href: e.href,
|
|
135
|
+
external: !!e.external
|
|
136
|
+
}, {
|
|
137
|
+
default: D(() => [p(C(e.label), 1)]),
|
|
138
|
+
_: 2
|
|
139
|
+
}, 1032, [
|
|
140
|
+
"to",
|
|
141
|
+
"href",
|
|
142
|
+
"external"
|
|
143
|
+
])]))), 128))])) : l("", !0)
|
|
144
|
+
], 4))), 128))]));
|
|
145
|
+
}
|
|
146
|
+
}, de = ["src"], fe = {
|
|
147
|
+
__name: "Shell",
|
|
148
|
+
props: {
|
|
149
|
+
language: {
|
|
150
|
+
type: String,
|
|
151
|
+
default: "en"
|
|
152
|
+
},
|
|
153
|
+
languages: {
|
|
154
|
+
type: Array,
|
|
155
|
+
default: () => []
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
emits: ["update:language"],
|
|
159
|
+
setup(t, { emit: n }) {
|
|
160
|
+
let r = t, i = n, { t: o, locale: l } = I(), u = L(), p = ee(), h = s(() => u.standalone ?? {}), _ = s(() => u.navigation ?? {}), v = s(() => p.value === "home"), b = s(() => h.value.areas?.[p.value] ?? null), x = (t) => e(u.chrome, B(t, l.value)), C = s(() => {
|
|
161
|
+
let e = h.value.logo ?? {}, t = x(b.value?.logo ?? e.src);
|
|
162
|
+
return t ? {
|
|
163
|
+
logo: t,
|
|
164
|
+
alt: e.alt ?? ""
|
|
165
|
+
} : null;
|
|
166
|
+
}), T = s(() => x(h.value.logo?.print)), E = s(() => (h.value.headerLinks ?? []).filter((e) => !e.on || e.on === "all" || e.on === (v.value ? "home" : "inner"))), O = s(() => {
|
|
167
|
+
let e = {
|
|
168
|
+
...h.value.banner ?? {},
|
|
169
|
+
...b.value?.banner ?? {}
|
|
170
|
+
};
|
|
171
|
+
return x(v.value ? e.home : e.inner) ?? "";
|
|
172
|
+
}), k = s(() => {
|
|
173
|
+
let e = _.value.sectionTitles?.[p.value];
|
|
174
|
+
return e ? o(e) : "";
|
|
175
|
+
}), A = s(() => !v.value && !!(O.value || k.value)), j = s(() => {
|
|
176
|
+
let e = h.value.sponsors;
|
|
177
|
+
return e?.columns?.length && (e.on === "all" || v.value) ? e : null;
|
|
178
|
+
}), M = s(() => ({
|
|
179
|
+
navigation: {
|
|
180
|
+
..._.value,
|
|
181
|
+
headerLinks: E.value,
|
|
182
|
+
sectionTitles: {},
|
|
183
|
+
...h.value.languages === !1 ? { languages: [] } : {}
|
|
184
|
+
},
|
|
185
|
+
banner: null,
|
|
186
|
+
...C.value ? { brand: C.value } : {}
|
|
187
|
+
})), N = (/* @__PURE__ */ new Date()).getFullYear(), P = s(() => h.value.copyright ? `${o(h.value.copyright)} ${N}` : ""), F = s(() => [
|
|
188
|
+
"mwnf-standalone",
|
|
189
|
+
v.value ? "mwnf-standalone--home" : "mwnf-standalone--inner",
|
|
190
|
+
b.value?.class ?? ""
|
|
191
|
+
]);
|
|
192
|
+
return (e, t) => (y(), c(a, {
|
|
193
|
+
class: g(F.value),
|
|
194
|
+
config: M.value,
|
|
195
|
+
languages: h.value.languages === !1 ? [] : r.languages,
|
|
196
|
+
language: r.language,
|
|
197
|
+
"language-placement": "header",
|
|
198
|
+
"language-style": "select",
|
|
199
|
+
"header-home": h.value.logo?.href ?? "",
|
|
200
|
+
"header-title": v.value ? "" : h.value.heading ? w(o)(h.value.heading) : "",
|
|
201
|
+
"header-title-href": "#/",
|
|
202
|
+
"banner-image": v.value ? O.value : "",
|
|
203
|
+
"footer-text": P.value || void 0,
|
|
204
|
+
"onUpdate:language": t[0] ||= (e) => i("update:language", e)
|
|
205
|
+
}, f({
|
|
206
|
+
default: D(() => [S(e.$slots, "default")]),
|
|
207
|
+
_: 2
|
|
208
|
+
}, [
|
|
209
|
+
A.value ? {
|
|
210
|
+
name: "banner",
|
|
211
|
+
fn: D(() => [m(R, {
|
|
212
|
+
image: O.value,
|
|
213
|
+
title: k.value
|
|
214
|
+
}, null, 8, ["image", "title"])]),
|
|
215
|
+
key: "0"
|
|
216
|
+
} : void 0,
|
|
217
|
+
T.value ? {
|
|
218
|
+
name: "notice",
|
|
219
|
+
fn: D(() => [d("img", {
|
|
220
|
+
class: "mwnf-standalone__print-logo",
|
|
221
|
+
src: T.value,
|
|
222
|
+
alt: ""
|
|
223
|
+
}, null, 8, de)]),
|
|
224
|
+
key: "1"
|
|
225
|
+
} : void 0,
|
|
226
|
+
j.value ? {
|
|
227
|
+
name: "sponsors",
|
|
228
|
+
fn: D(() => [m(Y, { columns: j.value.columns }, null, 8, ["columns"])]),
|
|
229
|
+
key: "2"
|
|
230
|
+
} : void 0
|
|
231
|
+
]), 1032, [
|
|
232
|
+
"class",
|
|
233
|
+
"config",
|
|
234
|
+
"languages",
|
|
235
|
+
"language",
|
|
236
|
+
"header-home",
|
|
237
|
+
"header-title",
|
|
238
|
+
"banner-image",
|
|
239
|
+
"footer-text"
|
|
240
|
+
]));
|
|
241
|
+
}
|
|
242
|
+
}, pe = {
|
|
243
|
+
key: 0,
|
|
244
|
+
class: "mwnf-standalone-highlight"
|
|
245
|
+
}, me = ["src", "alt"], he = {
|
|
246
|
+
key: 1,
|
|
247
|
+
class: "mwnf-standalone-highlight__heading"
|
|
248
|
+
}, ge = { class: "mwnf-standalone-highlight__lines" }, _e = ["innerHTML"], ve = {
|
|
249
|
+
key: 2,
|
|
250
|
+
class: "mwnf-standalone-highlight__place"
|
|
251
|
+
}, ye = {
|
|
252
|
+
key: 3,
|
|
253
|
+
class: "mwnf-standalone-highlight__action"
|
|
254
|
+
}, X = {
|
|
255
|
+
__name: "TodayHighlight",
|
|
256
|
+
props: {
|
|
257
|
+
record: {
|
|
258
|
+
type: Object,
|
|
259
|
+
default: null
|
|
260
|
+
},
|
|
261
|
+
text: {
|
|
262
|
+
type: Object,
|
|
263
|
+
default: () => ({})
|
|
264
|
+
},
|
|
265
|
+
country: {
|
|
266
|
+
type: String,
|
|
267
|
+
default: ""
|
|
268
|
+
},
|
|
269
|
+
to: {
|
|
270
|
+
type: [String, Object],
|
|
271
|
+
default: null
|
|
272
|
+
},
|
|
273
|
+
heading: {
|
|
274
|
+
type: String,
|
|
275
|
+
default: ""
|
|
276
|
+
},
|
|
277
|
+
alsoKnownAs: {
|
|
278
|
+
type: String,
|
|
279
|
+
default: ""
|
|
280
|
+
},
|
|
281
|
+
action: {
|
|
282
|
+
type: String,
|
|
283
|
+
default: ""
|
|
284
|
+
}
|
|
285
|
+
},
|
|
286
|
+
setup(e) {
|
|
287
|
+
let t = e, { t: r } = I(), i = (e) => j(Array.isArray(e) ? e.join("; ") : e), a = s(() => {
|
|
288
|
+
let e = t.text ?? {}, n = [], a = i(e.name ?? t.record?.internal_name ?? "");
|
|
289
|
+
a && n.push(N(a));
|
|
290
|
+
let o = i(e.alternate_name);
|
|
291
|
+
o && n.push(`${t.alsoKnownAs ? `${r(t.alsoKnownAs)} ` : ""}${N(o)}`);
|
|
292
|
+
let s = [i(e.dates), i(e.dynasty)].filter(Boolean).join(", ");
|
|
293
|
+
s && n.push(N(s));
|
|
294
|
+
for (let t of ["materials", "holder"]) {
|
|
295
|
+
let r = i(e[t]);
|
|
296
|
+
r && n.push(N(r));
|
|
297
|
+
}
|
|
298
|
+
return n;
|
|
299
|
+
}), f = s(() => [i(t.text?.location), t.country].filter(Boolean).join(", ")), h = s(() => t.record?.images?.[0]?.url ?? ""), g = s(() => P(String(t.text?.name ?? t.record?.internal_name ?? "")));
|
|
300
|
+
return (t, i) => e.record ? (y(), u("div", pe, [
|
|
301
|
+
h.value ? (y(), c(n, {
|
|
302
|
+
key: 0,
|
|
303
|
+
class: "mwnf-standalone-highlight__media",
|
|
304
|
+
to: e.to
|
|
305
|
+
}, {
|
|
306
|
+
default: D(() => [d("img", {
|
|
307
|
+
class: "mwnf-standalone-highlight__image",
|
|
308
|
+
src: h.value,
|
|
309
|
+
alt: g.value
|
|
310
|
+
}, null, 8, me)]),
|
|
311
|
+
_: 1
|
|
312
|
+
}, 8, ["to"])) : l("", !0),
|
|
313
|
+
e.heading ? (y(), u("p", he, [d("strong", null, C(w(r)(e.heading)), 1)])) : l("", !0),
|
|
314
|
+
d("p", ge, [(y(!0), u(o, null, x(a.value, (e, t) => (y(), u(o, { key: t }, [d("span", { innerHTML: e }, null, 8, _e), i[0] ||= d("br", null, null, -1)], 64))), 128))]),
|
|
315
|
+
f.value ? (y(), u("p", ve, C(w(P)(f.value)), 1)) : l("", !0),
|
|
316
|
+
e.action ? (y(), u("p", ye, [m(n, { to: e.to }, {
|
|
317
|
+
default: D(() => [p(C(w(r)(e.action)), 1)]),
|
|
318
|
+
_: 1
|
|
319
|
+
}, 8, ["to"])])) : l("", !0)
|
|
320
|
+
])) : l("", !0);
|
|
321
|
+
}
|
|
322
|
+
}, be = {
|
|
323
|
+
key: 0,
|
|
324
|
+
class: "mwnf-standalone-tiles"
|
|
325
|
+
}, xe = {
|
|
326
|
+
key: 0,
|
|
327
|
+
class: "mwnf-standalone-tiles__caption"
|
|
328
|
+
}, Se = { class: "mwnf-standalone-tiles__grid" }, Ce = ["src", "alt"], we = {
|
|
329
|
+
key: 0,
|
|
330
|
+
class: "mwnf-standalone-tiles__label"
|
|
331
|
+
}, Z = {
|
|
332
|
+
__name: "TileGrid",
|
|
333
|
+
props: {
|
|
334
|
+
caption: {
|
|
335
|
+
type: String,
|
|
336
|
+
default: ""
|
|
337
|
+
},
|
|
338
|
+
items: {
|
|
339
|
+
type: Array,
|
|
340
|
+
default: () => []
|
|
341
|
+
}
|
|
342
|
+
},
|
|
343
|
+
setup(e) {
|
|
344
|
+
let t = e, { t: r } = I(), i = z(), a = s(() => t.items.map((e) => ({
|
|
345
|
+
...e,
|
|
346
|
+
image: i(e.image) ?? "",
|
|
347
|
+
label: e.label ? r(e.label) : ""
|
|
348
|
+
})));
|
|
349
|
+
return (t, i) => a.value.length ? (y(), u("section", be, [e.caption ? (y(), u("p", xe, C(w(r)(e.caption)), 1)) : l("", !0), d("ul", Se, [(y(!0), u(o, null, x(a.value, (e) => (y(), u("li", {
|
|
350
|
+
key: e.image,
|
|
351
|
+
class: "mwnf-standalone-tiles__tile"
|
|
352
|
+
}, [m(n, {
|
|
353
|
+
to: e.to,
|
|
354
|
+
href: e.href,
|
|
355
|
+
class: "mwnf-standalone-tiles__link"
|
|
356
|
+
}, {
|
|
357
|
+
default: D(() => [d("img", {
|
|
358
|
+
class: "mwnf-standalone-tiles__image",
|
|
359
|
+
src: e.image,
|
|
360
|
+
alt: e.label
|
|
361
|
+
}, null, 8, Ce), e.label ? (y(), u("span", we, C(e.label), 1)) : l("", !0)]),
|
|
362
|
+
_: 2
|
|
363
|
+
}, 1032, ["to", "href"])]))), 128))])])) : l("", !0);
|
|
364
|
+
}
|
|
365
|
+
}, Te = { class: "mwnf-standalone-home" }, Ee = {
|
|
366
|
+
key: 0,
|
|
367
|
+
class: "mwnf-standalone-home__links"
|
|
368
|
+
}, De = { key: 1 }, Oe = {
|
|
369
|
+
__name: "Home",
|
|
370
|
+
props: { home: {
|
|
371
|
+
type: Object,
|
|
372
|
+
default: null
|
|
373
|
+
} },
|
|
374
|
+
setup(e) {
|
|
375
|
+
let t = e, { t: r, locale: i } = I(), a = L(), d = s(() => t.home ?? a.standalone?.home ?? {}), f = s(() => (d.value.links ?? []).map((e) => ({
|
|
376
|
+
...e,
|
|
377
|
+
label: r(e.label),
|
|
378
|
+
prefix: e.prefix ? r(e.prefix) : "",
|
|
379
|
+
title: e.title ? r(e.title) : void 0
|
|
380
|
+
}))), h = s(() => d.value.highlight ?? null), _ = F();
|
|
381
|
+
h.value?.list?.length && (k(["items", "countries"]), E(i, (e) => {
|
|
382
|
+
_.loadTranslations("items", e), _.loadTranslations("countries", e);
|
|
383
|
+
}, { immediate: !0 }));
|
|
384
|
+
let v = O("items", "backward_compatibility"), b = s(() => {
|
|
385
|
+
let e = h.value?.list ?? [], t = e.indexOf(H(e));
|
|
386
|
+
for (let n = 0; t >= 0 && n < e.length; n++) {
|
|
387
|
+
let r = v.value.get(U(e[(t + n) % e.length]));
|
|
388
|
+
if (r) return r;
|
|
389
|
+
}
|
|
390
|
+
return null;
|
|
391
|
+
}), w = s(() => b.value ? _.tr("items", b.value.id, i.value, "en") : {}), T = s(() => {
|
|
392
|
+
let e = b.value?.country_id;
|
|
393
|
+
return e ? _.tr("countries", e, i.value, "en").name ?? "" : "";
|
|
394
|
+
}), A = s(() => b.value ? {
|
|
395
|
+
name: h.value.route ?? "item",
|
|
396
|
+
params: { id: b.value.id }
|
|
397
|
+
} : null);
|
|
398
|
+
return (e, t) => (y(), u("div", Te, [
|
|
399
|
+
f.value.length ? (y(), u("ul", Ee, [(y(!0), u(o, null, x(f.value, (e) => (y(), u("li", {
|
|
400
|
+
key: e.label,
|
|
401
|
+
class: g({ "mwnf-standalone-home__link--gap": e.gap })
|
|
402
|
+
}, [m(n, {
|
|
403
|
+
to: e.to,
|
|
404
|
+
href: e.href,
|
|
405
|
+
external: !!e.external,
|
|
406
|
+
title: e.title
|
|
407
|
+
}, {
|
|
408
|
+
default: D(() => [e.prefix ? (y(), u(o, { key: 0 }, [p(C(`${e.prefix} `), 1)], 64)) : l("", !0), e.italic ? (y(), u("i", De, C(e.label), 1)) : (y(), u(o, { key: 2 }, [p(C(e.label), 1)], 64))]),
|
|
409
|
+
_: 2
|
|
410
|
+
}, 1032, [
|
|
411
|
+
"to",
|
|
412
|
+
"href",
|
|
413
|
+
"external",
|
|
414
|
+
"title"
|
|
415
|
+
])], 2))), 128))])) : l("", !0),
|
|
416
|
+
h.value ? (y(), c(X, {
|
|
417
|
+
key: 1,
|
|
418
|
+
record: b.value,
|
|
419
|
+
text: w.value,
|
|
420
|
+
country: T.value,
|
|
421
|
+
to: A.value,
|
|
422
|
+
heading: h.value.heading ?? "",
|
|
423
|
+
"also-known-as": h.value.alsoKnownAs ?? "",
|
|
424
|
+
action: h.value.action ?? ""
|
|
425
|
+
}, null, 8, [
|
|
426
|
+
"record",
|
|
427
|
+
"text",
|
|
428
|
+
"country",
|
|
429
|
+
"to",
|
|
430
|
+
"heading",
|
|
431
|
+
"also-known-as",
|
|
432
|
+
"action"
|
|
433
|
+
])) : l("", !0),
|
|
434
|
+
d.value.tiles ? (y(), c(Z, {
|
|
435
|
+
key: 2,
|
|
436
|
+
caption: d.value.tiles.caption ?? "",
|
|
437
|
+
items: d.value.tiles.items ?? []
|
|
438
|
+
}, null, 8, ["caption", "items"])) : l("", !0),
|
|
439
|
+
S(e.$slots, "default")
|
|
440
|
+
]));
|
|
441
|
+
}
|
|
442
|
+
}, ke = { class: "mwnf-standalone-related" }, Ae = { class: "mwnf-standalone-related__heading" }, je = { class: "mwnf-standalone-related__group-heading" }, Me = { class: "mwnf-standalone-related__thumbs" }, Ne = ["src", "alt"], Pe = ["innerHTML"], Fe = {
|
|
443
|
+
key: 0,
|
|
444
|
+
class: "mwnf-standalone-related__download"
|
|
445
|
+
}, Ie = { class: "mwnf-standalone-related__download-heading" }, Q = {
|
|
446
|
+
__name: "RelatedContent",
|
|
447
|
+
props: {
|
|
448
|
+
heading: {
|
|
449
|
+
type: String,
|
|
450
|
+
default: "record.related.title"
|
|
451
|
+
},
|
|
452
|
+
records: {
|
|
453
|
+
type: Array,
|
|
454
|
+
default: () => []
|
|
455
|
+
},
|
|
456
|
+
groups: {
|
|
457
|
+
type: Array,
|
|
458
|
+
default: () => []
|
|
459
|
+
},
|
|
460
|
+
download: {
|
|
461
|
+
type: Object,
|
|
462
|
+
default: null
|
|
463
|
+
}
|
|
464
|
+
},
|
|
465
|
+
setup(e) {
|
|
466
|
+
let t = e, { t: r } = I(), i = s(() => t.groups.map((e) => ({
|
|
467
|
+
heading: r(e.heading),
|
|
468
|
+
rows: t.records.filter((t) => !e.type || t.badge === e.type)
|
|
469
|
+
})).filter((e) => e.rows.length));
|
|
470
|
+
function a() {
|
|
471
|
+
window.print();
|
|
472
|
+
}
|
|
473
|
+
return (t, s) => (y(), u("aside", ke, [
|
|
474
|
+
d("p", Ae, [d("strong", null, C(w(r)(e.heading)), 1)]),
|
|
475
|
+
(y(!0), u(o, null, x(i.value, (e) => (y(), u("div", {
|
|
476
|
+
key: e.heading,
|
|
477
|
+
class: "mwnf-standalone-related__group"
|
|
478
|
+
}, [d("p", je, C(e.heading), 1), d("ul", Me, [(y(!0), u(o, null, x(e.rows, (e) => (y(), u("li", { key: e.id }, [m(n, {
|
|
479
|
+
to: e.to,
|
|
480
|
+
title: e.imageAlt
|
|
481
|
+
}, {
|
|
482
|
+
default: D(() => [e.image ? (y(), u("img", {
|
|
483
|
+
key: 0,
|
|
484
|
+
src: e.image,
|
|
485
|
+
alt: e.imageAlt
|
|
486
|
+
}, null, 8, Ne)) : (y(), u("span", {
|
|
487
|
+
key: 1,
|
|
488
|
+
innerHTML: e.name
|
|
489
|
+
}, null, 8, Pe))]),
|
|
490
|
+
_: 2
|
|
491
|
+
}, 1032, ["to", "title"])]))), 128))])]))), 128)),
|
|
492
|
+
S(t.$slots, "default"),
|
|
493
|
+
e.download ? (y(), u("div", Fe, [d("p", Ie, C(w(r)(e.download.heading)), 1), d("button", {
|
|
494
|
+
type: "button",
|
|
495
|
+
class: "mwnf-standalone-related__print",
|
|
496
|
+
onClick: a
|
|
497
|
+
}, C(w(r)(e.download.print)), 1)])) : l("", !0)
|
|
498
|
+
]));
|
|
499
|
+
}
|
|
500
|
+
}, Le = { class: "mwnf-standalone-item__top" }, Re = { class: "mwnf-standalone-item__left" }, ze = {
|
|
501
|
+
key: 0,
|
|
502
|
+
class: "mwnf-standalone-item__back"
|
|
503
|
+
}, Be = {
|
|
504
|
+
__name: "ItemSheet",
|
|
505
|
+
props: {
|
|
506
|
+
spec: {
|
|
507
|
+
type: Object,
|
|
508
|
+
required: !0
|
|
509
|
+
},
|
|
510
|
+
id: {
|
|
511
|
+
type: String,
|
|
512
|
+
required: !0
|
|
513
|
+
},
|
|
514
|
+
back: {
|
|
515
|
+
type: Array,
|
|
516
|
+
default: () => []
|
|
517
|
+
},
|
|
518
|
+
related: {
|
|
519
|
+
type: Object,
|
|
520
|
+
default: () => ({})
|
|
521
|
+
}
|
|
522
|
+
},
|
|
523
|
+
setup(e) {
|
|
524
|
+
let a = e, { t: g } = I(), v = T(), b = s(() => ({
|
|
525
|
+
...a.spec,
|
|
526
|
+
media: () => []
|
|
527
|
+
}));
|
|
528
|
+
function w({ record: e, text: t, language: n }) {
|
|
529
|
+
if (a.spec.media) return a.spec.media(e, {
|
|
530
|
+
record: e,
|
|
531
|
+
text: t,
|
|
532
|
+
language: n
|
|
533
|
+
});
|
|
534
|
+
let r = P(String(t?.name ?? e?.internal_name ?? ""));
|
|
535
|
+
return (e?.images ?? []).map((e) => ({
|
|
536
|
+
url: e.url,
|
|
537
|
+
alt: e.captions?.[n] ?? r,
|
|
538
|
+
caption: e.captions?.[n] ?? "",
|
|
539
|
+
...A(e, n)
|
|
540
|
+
}));
|
|
541
|
+
}
|
|
542
|
+
let E = s(() => a.back.map((e) => ({
|
|
543
|
+
...e,
|
|
544
|
+
label: g(e.label)
|
|
545
|
+
}))), O = /* @__PURE__ */ new Set([
|
|
546
|
+
"header",
|
|
547
|
+
"before-sheet",
|
|
548
|
+
"related",
|
|
549
|
+
"sidebar",
|
|
550
|
+
"aside"
|
|
551
|
+
]), k = s(() => Object.keys(v).filter((e) => !O.has(e)));
|
|
552
|
+
function j() {
|
|
553
|
+
window.history.back();
|
|
554
|
+
}
|
|
555
|
+
return (a, s) => (y(), c(i, {
|
|
556
|
+
spec: b.value,
|
|
557
|
+
id: e.id,
|
|
558
|
+
class: "mwnf-standalone-item"
|
|
559
|
+
}, f({
|
|
560
|
+
header: D(({ languages: e, language: n, select: r }) => [d("div", Le, [m(t, {
|
|
561
|
+
languages: e,
|
|
562
|
+
language: n,
|
|
563
|
+
onSelect: r
|
|
564
|
+
}, null, 8, [
|
|
565
|
+
"languages",
|
|
566
|
+
"language",
|
|
567
|
+
"onSelect"
|
|
568
|
+
])])]),
|
|
569
|
+
"before-sheet": D((e) => [d("div", Re, [E.value.length ? (y(), u("p", ze, [(y(!0), u(o, null, x(E.value, (e) => (y(), u(o, { key: e.label }, [e.history ? (y(), u("button", {
|
|
570
|
+
key: 0,
|
|
571
|
+
type: "button",
|
|
572
|
+
class: "mwnf-standalone-item__back-link",
|
|
573
|
+
onClick: j
|
|
574
|
+
}, C(e.label), 1)) : (y(), c(n, {
|
|
575
|
+
key: 1,
|
|
576
|
+
class: "mwnf-standalone-item__back-link",
|
|
577
|
+
to: e.to,
|
|
578
|
+
href: e.href
|
|
579
|
+
}, {
|
|
580
|
+
default: D(() => [p(C(e.label), 1)]),
|
|
581
|
+
_: 2
|
|
582
|
+
}, 1032, ["to", "href"]))], 64))), 128))])) : l("", !0), m(r, { images: w(e) }, null, 8, ["images"])]), S(a.$slots, "before-sheet", _(h(e)))]),
|
|
583
|
+
related: D((t) => [m(Q, {
|
|
584
|
+
heading: e.related.heading ?? "record.related.title",
|
|
585
|
+
records: t.records,
|
|
586
|
+
groups: e.related.groups ?? [],
|
|
587
|
+
download: e.related.download ?? null
|
|
588
|
+
}, {
|
|
589
|
+
default: D(() => [S(a.$slots, "sidebar", _(h(t)))]),
|
|
590
|
+
_: 2
|
|
591
|
+
}, 1032, [
|
|
592
|
+
"heading",
|
|
593
|
+
"records",
|
|
594
|
+
"groups",
|
|
595
|
+
"download"
|
|
596
|
+
])]),
|
|
597
|
+
_: 2
|
|
598
|
+
}, [x(k.value, (e) => ({
|
|
599
|
+
name: e,
|
|
600
|
+
fn: D((t) => [S(a.$slots, e, _(h(t)))])
|
|
601
|
+
}))]), 1032, ["spec", "id"]));
|
|
602
|
+
}
|
|
603
|
+
}, Ve = ["innerHTML"], $ = {
|
|
604
|
+
key: 0,
|
|
605
|
+
class: "mwnf-standalone-page__link"
|
|
606
|
+
}, He = {
|
|
607
|
+
key: 1,
|
|
608
|
+
class: "mwnf-standalone-page__print"
|
|
609
|
+
}, Ue = {
|
|
610
|
+
__name: "TextPage",
|
|
611
|
+
props: {
|
|
612
|
+
body: {
|
|
613
|
+
type: String,
|
|
614
|
+
required: !0
|
|
615
|
+
},
|
|
616
|
+
link: {
|
|
617
|
+
type: Object,
|
|
618
|
+
default: null
|
|
619
|
+
},
|
|
620
|
+
print: {
|
|
621
|
+
type: String,
|
|
622
|
+
default: ""
|
|
623
|
+
},
|
|
624
|
+
dropCap: {
|
|
625
|
+
type: Boolean,
|
|
626
|
+
default: !1
|
|
627
|
+
}
|
|
628
|
+
},
|
|
629
|
+
setup(e) {
|
|
630
|
+
let t = e, { t: r } = I(), i = s(() => M(r(t.body)));
|
|
631
|
+
function a() {
|
|
632
|
+
window.print();
|
|
633
|
+
}
|
|
634
|
+
return (t, o) => (y(), u("article", { class: g(["mwnf-standalone-page", { "mwnf-standalone-page--drop-cap": e.dropCap }]) }, [
|
|
635
|
+
d("div", {
|
|
636
|
+
class: "mwnf-standalone-page__body",
|
|
637
|
+
innerHTML: i.value
|
|
638
|
+
}, null, 8, Ve),
|
|
639
|
+
e.link ? (y(), u("p", $, [m(n, {
|
|
640
|
+
to: e.link.to,
|
|
641
|
+
href: e.link.href
|
|
642
|
+
}, {
|
|
643
|
+
default: D(() => [d("strong", null, C(e.link.text ?? w(r)(e.link.label)), 1)]),
|
|
644
|
+
_: 1
|
|
645
|
+
}, 8, ["to", "href"])])) : l("", !0),
|
|
646
|
+
e.print ? (y(), u("p", He, [d("button", {
|
|
647
|
+
type: "button",
|
|
648
|
+
class: "mwnf-standalone-page__print-button",
|
|
649
|
+
onClick: a
|
|
650
|
+
}, C(w(r)(e.print)), 1)])) : l("", !0)
|
|
651
|
+
], 2));
|
|
652
|
+
}
|
|
653
|
+
}, We = {
|
|
654
|
+
key: 0,
|
|
655
|
+
class: "mwnf-standalone-subnav"
|
|
656
|
+
}, Ge = { class: "mwnf-standalone-subnav__tabs" }, Ke = {
|
|
657
|
+
__name: "SubNav",
|
|
658
|
+
props: {
|
|
659
|
+
tabs: {
|
|
660
|
+
type: Array,
|
|
661
|
+
default: () => []
|
|
662
|
+
},
|
|
663
|
+
aside: {
|
|
664
|
+
type: Object,
|
|
665
|
+
default: null
|
|
666
|
+
}
|
|
667
|
+
},
|
|
668
|
+
setup(e) {
|
|
669
|
+
let t = e, { t: r } = I(), i = s(() => t.tabs.map((e) => ({
|
|
670
|
+
...e,
|
|
671
|
+
label: r(e.label)
|
|
672
|
+
})));
|
|
673
|
+
return (t, a) => i.value.length || e.aside ? (y(), u("nav", We, [d("ul", Ge, [(y(!0), u(o, null, x(i.value, (e) => (y(), u("li", { key: e.label }, [m(n, {
|
|
674
|
+
to: e.to,
|
|
675
|
+
href: e.href,
|
|
676
|
+
class: g(["mwnf-standalone-subnav__tab", { "mwnf-standalone-subnav__tab--active": e.active }]),
|
|
677
|
+
"aria-current": e.active ? "page" : void 0
|
|
678
|
+
}, {
|
|
679
|
+
default: D(() => [p(C(e.label), 1)]),
|
|
680
|
+
_: 2
|
|
681
|
+
}, 1032, [
|
|
682
|
+
"to",
|
|
683
|
+
"href",
|
|
684
|
+
"class",
|
|
685
|
+
"aria-current"
|
|
686
|
+
])]))), 128))]), e.aside ? (y(), c(n, {
|
|
687
|
+
key: 0,
|
|
688
|
+
to: e.aside.to,
|
|
689
|
+
href: e.aside.href,
|
|
690
|
+
class: "mwnf-standalone-subnav__aside"
|
|
691
|
+
}, {
|
|
692
|
+
default: D(() => [p(C(w(r)(e.aside.label)), 1)]),
|
|
693
|
+
_: 1
|
|
694
|
+
}, 8, ["to", "href"])) : l("", !0)])) : l("", !0);
|
|
695
|
+
}
|
|
696
|
+
}, qe = ["disabled", "aria-label"], Je = { class: "mwnf-standalone-slider__track" }, Ye = ["src", "alt"], Xe = {
|
|
697
|
+
key: 0,
|
|
698
|
+
class: "mwnf-standalone-slider__label"
|
|
699
|
+
}, Ze = ["disabled", "aria-label"], Qe = {
|
|
700
|
+
__name: "Slider",
|
|
701
|
+
props: {
|
|
702
|
+
slides: {
|
|
703
|
+
type: Array,
|
|
704
|
+
default: () => []
|
|
705
|
+
},
|
|
706
|
+
visible: {
|
|
707
|
+
type: Number,
|
|
708
|
+
default: 5
|
|
709
|
+
},
|
|
710
|
+
previousLabel: {
|
|
711
|
+
type: String,
|
|
712
|
+
default: "core.pagination.previous"
|
|
713
|
+
},
|
|
714
|
+
nextLabel: {
|
|
715
|
+
type: String,
|
|
716
|
+
default: "core.pagination.next"
|
|
717
|
+
}
|
|
718
|
+
},
|
|
719
|
+
setup(e) {
|
|
720
|
+
let t = e, { t: r } = I(), i = z(), a = b(0), c = s(() => Math.max(0, t.slides.length - t.visible)), f = s(() => t.slides.slice(a.value, a.value + t.visible).map((e) => ({
|
|
721
|
+
...e,
|
|
722
|
+
image: i(e.image) ?? "",
|
|
723
|
+
label: e.label ? r(e.label) : ""
|
|
724
|
+
})));
|
|
725
|
+
return (t, i) => e.slides.length ? (y(), u("div", {
|
|
726
|
+
key: 0,
|
|
727
|
+
class: "mwnf-standalone-slider",
|
|
728
|
+
style: v({ "--mwnf-standalone-slider-count": e.visible })
|
|
729
|
+
}, [
|
|
730
|
+
d("button", {
|
|
731
|
+
type: "button",
|
|
732
|
+
class: "mwnf-standalone-slider__button",
|
|
733
|
+
disabled: a.value === 0,
|
|
734
|
+
"aria-label": w(r)(e.previousLabel),
|
|
735
|
+
onClick: i[0] ||= (e) => a.value = Math.max(0, a.value - 1)
|
|
736
|
+
}, "‹", 8, qe),
|
|
737
|
+
d("ul", Je, [(y(!0), u(o, null, x(f.value, (e) => (y(), u("li", {
|
|
738
|
+
key: e.image,
|
|
739
|
+
class: "mwnf-standalone-slider__slide"
|
|
740
|
+
}, [m(n, {
|
|
741
|
+
to: e.to,
|
|
742
|
+
href: e.href
|
|
743
|
+
}, {
|
|
744
|
+
default: D(() => [d("img", {
|
|
745
|
+
src: e.image,
|
|
746
|
+
alt: e.label
|
|
747
|
+
}, null, 8, Ye), e.label ? (y(), u("span", Xe, C(e.label), 1)) : l("", !0)]),
|
|
748
|
+
_: 2
|
|
749
|
+
}, 1032, ["to", "href"])]))), 128))]),
|
|
750
|
+
d("button", {
|
|
751
|
+
type: "button",
|
|
752
|
+
class: "mwnf-standalone-slider__button",
|
|
753
|
+
disabled: a.value >= c.value,
|
|
754
|
+
"aria-label": w(r)(e.nextLabel),
|
|
755
|
+
onClick: i[1] ||= (e) => a.value = Math.min(c.value, a.value + 1)
|
|
756
|
+
}, "›", 8, Ze)
|
|
757
|
+
], 4)) : l("", !0);
|
|
758
|
+
}
|
|
759
|
+
};
|
|
760
|
+
//#endregion
|
|
761
|
+
export { Q as RelatedContent, R as StandaloneBanner, Oe as StandaloneHome, Be as StandaloneItemSheet, fe as StandaloneShell, Qe as StandaloneSlider, Y as StandaloneSponsors, Ke as StandaloneSubNav, Ue as StandaloneTextPage, Z as StandaloneTileGrid, X as TodayHighlight, B as byLanguage, V as dayOfYear, U as legacyHomeItemKey, H as pickForDay };
|