@museumwnf/viewer-layout 3.61.0 → 3.63.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.
Files changed (32) hide show
  1. package/dist/FeaturedRecord-Fe19w6_G.js +213 -0
  2. package/dist/LegacyItemSheet-Bmg8etGz.js +532 -0
  3. package/dist/{OnDisplayIn-DW4iC5BB.js → OnDisplayIn-BH3Bqope.js} +16 -9
  4. package/dist/{PageShell-CPtgzcxv.js → PageShell-CIGVv7sK.js} +144 -111
  5. package/dist/{PartnerMap-U-Hi2FBi.js → PartnerMap-DdyMLtgH.js} +5 -1
  6. package/dist/RecordView-Bgd5mm_e.js +384 -0
  7. package/dist/{SiteShell-qvsZO4Iz.js → SiteShell-UsZ_cpe9.js} +3 -2
  8. package/dist/Theme-Daezwp0p.js +391 -0
  9. package/dist/{TimelineEventList-1feZA5t7.js → TimelineEventList-CIkKxyQu.js} +122 -238
  10. package/dist/TimelineResultsView-BF3VoCs_.js +686 -0
  11. package/dist/components.js +1 -1
  12. package/dist/{content-BNS5U0Xv.js → content-hV5uyd-b.js} +2 -2
  13. package/dist/content.js +6 -6
  14. package/dist/data-CsMfGCkv.js +77 -0
  15. package/dist/data-DzrH9ikw.js +45 -0
  16. package/dist/dxa.js +2046 -1008
  17. package/dist/index.js +7 -7
  18. package/dist/standalone.js +3 -3
  19. package/dist/{themeSpecs-CsDpl4rR.js → themeSpecs-DIdmAEc3.js} +1 -1
  20. package/dist/viewer-layout.css +1 -1
  21. package/dist/views.js +755 -37
  22. package/package.json +1 -1
  23. package/src/dxa/testing.js +176 -120
  24. package/src/styles/dxa-exhibition.css +2289 -32
  25. package/src/styles/dxa-gallery.css +17 -2
  26. package/dist/FeaturedRecord-DaGLHyhD.js +0 -87
  27. package/dist/ItemDetailView-D7m2C1Mg.js +0 -310
  28. package/dist/RecordView-BE4mbj6G.js +0 -363
  29. package/dist/Theme-4RmyRY0x.js +0 -318
  30. package/dist/TimelineResultsView-CkH3NDqL.js +0 -1401
  31. package/dist/data-EKYeMQcC.js +0 -45
  32. package/dist/data-kqAkoQvf.js +0 -37
@@ -0,0 +1,532 @@
1
+ import { i as e, n as t, o as n, r, s as i, t as a } from "./OnDisplayIn-BH3Bqope.js";
2
+ import { c as o, r as s } from "./PartnerMap-DdyMLtgH.js";
3
+ import { n as c } from "./TimelineEventList-CIkKxyQu.js";
4
+ import { t as l } from "./RecordView-Bgd5mm_e.js";
5
+ import { t as u } from "./chrome-Bv_mLlHM.js";
6
+ import { Fragment as d, computed as f, createBlock as p, createCommentVNode as m, createElementBlock as h, createElementVNode as g, createSlots as _, createTextVNode as v, createVNode as y, guardReactiveProps as b, normalizeClass as x, normalizeProps as S, normalizeStyle as C, openBlock as w, renderList as T, renderSlot as E, toDisplayString as D, unref as O, useSlots as ee, withCtx as k } from "vue";
7
+ import { NotFoundView as te, byId as A, loadEntities as ne, mdInline as j, mdStrip as re, mwnfLinks as M, partnerView as ie, renderInline as N, siblingSiteUrl as P, sourceUrl as F, useDataPackage as ae, useI18n as oe, useProjects as I, useSiteConfig as L } from "@museumwnf/viewer-core";
8
+ import { RouterLink as R, useRoute as z } from "vue-router";
9
+ // src/dxa/ItemDetailView.vue
10
+ var se = {
11
+ key: 0,
12
+ class: "mwnf-sheet-source"
13
+ }, ce = {
14
+ key: 0,
15
+ class: "mwnf-sheet-source__line"
16
+ }, le = {
17
+ key: 1,
18
+ class: "mwnf-sheet-source__collection"
19
+ }, ue = ["href"], de = {
20
+ key: 1,
21
+ class: "mwnf-sheet-notice"
22
+ }, fe = {
23
+ key: "museum",
24
+ class: "mwnf-sheet-museum"
25
+ }, pe = ["innerHTML"], me = {
26
+ key: 0,
27
+ class: "mwnf-sheet-related"
28
+ }, he = {
29
+ key: 0,
30
+ class: "mwnf-sheet-related__heading mwnf-sheet-related__heading--caps"
31
+ }, ge = {
32
+ key: 1,
33
+ class: "mwnf-sheet-related__description"
34
+ }, _e = {
35
+ key: 0,
36
+ class: "mwnf-sheet-related__references"
37
+ }, ve = {
38
+ key: 2,
39
+ class: "mwnf-sheet-related__unresolved"
40
+ }, ye = {
41
+ key: 3,
42
+ class: "mwnf-sheet-related__line"
43
+ }, be = ["href"], xe = { key: 7 }, Se = { class: "mwnf-sheet-related__heading" }, Ce = { key: 8 }, we = { class: "mwnf-sheet-related__heading" }, Te = { class: "mwnf-sheet-related__line" }, Ee = ["href"], De = { key: 9 }, Oe = { class: "mwnf-sheet-related__heading" }, ke = { class: "mwnf-sheet-related__line" }, Ae = ["href"], je = { key: 10 }, Me = { class: "mwnf-sheet-related__heading" }, Ne = "sheet.field.", B = {
44
+ __name: "ItemDetailView",
45
+ props: {
46
+ spec: {
47
+ type: Object,
48
+ required: !0
49
+ },
50
+ id: {
51
+ type: String,
52
+ required: !0
53
+ },
54
+ entity: {
55
+ type: String,
56
+ default: ""
57
+ },
58
+ dataGetter: {
59
+ type: Function,
60
+ default: null
61
+ }
62
+ },
63
+ setup(i) {
64
+ let o = i, N = ee(), P = /* @__PURE__ */ new Set([
65
+ "before-sheet",
66
+ "museum",
67
+ "related",
68
+ "aside"
69
+ ]), F = f(() => Object.keys(N).filter((e) => !P.has(e))), R = f(() => !o.dataGetter || o.dataGetter(o.id) != null), { t: z } = oe();
70
+ function B(e) {
71
+ if (typeof e != "string" || !e.startsWith(Ne)) return e;
72
+ let t = `sheet.dxa.${e.slice(12)}`;
73
+ return z(t) === t ? e : t;
74
+ }
75
+ let V = f(() => Array.isArray(o.spec.fields) ? {
76
+ ...o.spec,
77
+ fields: o.spec.fields.map((e) => ({
78
+ ...e,
79
+ label: B(e.label)
80
+ }))
81
+ } : o.spec), H = I(), U = (e, t) => (e.name ?? "").localeCompare(t.name ?? ""), W = (e) => (e.gallery_references ?? []).filter((e) => e.kind === "gallery").sort(U), G = (e) => (e.gallery_references ?? []).filter((e) => e.kind === "exhibition").sort(U), K = (e) => H.links(e.project_id)?.artisticIntroductionUrl ?? null, q = (e) => H.links(e.project_id)?.relatedDatabaseUrl ?? null, J = {
82
+ "islamicart.museumwnf.org": "core.project.islamicArt",
83
+ "baroqueart.museumwnf.org": "core.project.baroqueArt",
84
+ "sharinghistory.museumwnf.org": "core.project.sharingHistory"
85
+ };
86
+ function Y(e) {
87
+ try {
88
+ let t = J[new URL(q(e)).host];
89
+ if (t) return z(t);
90
+ } catch {}
91
+ return H.label(e.project_id);
92
+ }
93
+ function X(e, t) {
94
+ if (!e) return null;
95
+ let n = V.value.sourceDatabase === !1 ? null : V.value.sourceDatabase ?? null, r = null;
96
+ if (n) {
97
+ let i = n.chipClass ? n.chipClass(e, t) : null, a = H.label(e.project_id);
98
+ (i || a) && (r = {
99
+ chipClass: i,
100
+ name: a,
101
+ label: z(n.label ?? "record.sheet.sourceDatabase")
102
+ });
103
+ }
104
+ let i = n && n.addToCollection !== !1 ? z(n.addToCollection?.label ?? "record.action.addToCollection") : null, a = V.value.notice === !1 ? null : V.value.notice ?? null, o = a && a.show(e, t) ? z(a.label) : null;
105
+ return {
106
+ source: r,
107
+ addToCollectionLabel: i,
108
+ notice: o
109
+ };
110
+ }
111
+ let Z = ae(), Q = A("partners"), Pe = A("countries");
112
+ ne(["partners", "countries"]), Z.loadTranslations("countries", "en");
113
+ function $(e, t) {
114
+ let n = Z.tr("countries", e, t, "en");
115
+ return re(n.name ?? Pe.value?.get(e)?.internal_name ?? "");
116
+ }
117
+ function Fe(e) {
118
+ let t = e.text?.holder ? j(String(e.text.holder)) : "", n = V.value.museum === !1 ? null : V.value.museum ?? null, r = n ? Q.value?.get(e.record?.partner_id) : null;
119
+ return {
120
+ holder: t,
121
+ view: r ? ie(r, Z.tr("partners", r.id, e.language, "en"), {
122
+ countryLabel: (t) => $(t, e.language),
123
+ route: (t) => n.route ? n.route(t.id, e) : null
124
+ }) : null
125
+ };
126
+ }
127
+ function Ie(e, t) {
128
+ if (!e) return null;
129
+ let n = V.value.related ?? {}, r = t.records ?? [], i = t.outside ?? [], a = o.dataGetter ? r.filter((e) => o.dataGetter(e.id) != null) : r, s = o.dataGetter ? r.filter((e) => o.dataGetter(e.id) == null).map((t) => (e.related_items ?? []).find((e) => e.id === t.id)).filter(Boolean) : [], c = [...i, ...s].map((e) => ({
130
+ ...e,
131
+ name: e.project_id ? H.label(e.project_id) : null,
132
+ chipClass: n.outsideChip ? n.outsideChip(e, t) : null
133
+ })), l = (t) => (n.onDisplayIn?.href ? n.onDisplayIn.href(t, e) : t.legacy_host) || "", u = (e) => ({
134
+ id: e.id,
135
+ label: j(e.name ?? ""),
136
+ href: l(e),
137
+ external: !!l(e)
138
+ }), d = n.onDisplayIn && n.onDisplayIn !== !1 ? {
139
+ pendingLabel: n.onDisplayIn.linkPendingLabel ?? "",
140
+ groups: [n.onDisplayIn.exhibitions ? {
141
+ heading: n.onDisplayIn.exhibitionsHeading ?? "record.related.exhibitions",
142
+ sections: n.onDisplayIn.exhibitions(e, t)
143
+ } : {
144
+ heading: n.onDisplayIn.exhibitionsHeading ?? "record.related.exhibitions",
145
+ links: G(e).map(u)
146
+ }, {
147
+ heading: n.onDisplayIn.galleriesHeading ?? "record.related.galleries",
148
+ links: W(e).map(u)
149
+ }].filter((e) => (e.sections ?? [e]).some((e) => e.links?.length))
150
+ } : null, f = n.databaseLabel && q(e) ? {
151
+ url: q(e),
152
+ label: z(n.databaseLabel),
153
+ name: Y(e)
154
+ } : null, p = n.overallDatabase && n.overallDatabase !== !1 ? {
155
+ label: z(n.overallDatabase.label),
156
+ linkLabel: z(n.overallDatabase.linkLabel)
157
+ } : null;
158
+ return {
159
+ title: n.title ? z(n.title) : "",
160
+ description: n.description ? z(n.description) : "",
161
+ heading: z(n.heading ?? "record.related.items"),
162
+ variant: n.variant ?? "grid",
163
+ actionLabel: n.actionLabel ? z(n.actionLabel) : "",
164
+ inPackage: a,
165
+ references: c,
166
+ notInPackageLabel: n.notInPackageLabel ? z(n.notInPackageLabel) : "",
167
+ artisticIntroduction: n.artisticIntroductionLabel && K(e) ? {
168
+ url: K(e),
169
+ label: z(n.artisticIntroductionLabel)
170
+ } : null,
171
+ timeline: n.timeline ? n.timeline(e, t) : null,
172
+ glossary: n.glossary !== !1,
173
+ glossaryLabels: n.glossaryLabels ?? {},
174
+ dynasties: n.dynasties ? n.dynasties(e, t.language, t) : null,
175
+ dynastiesHeading: z(n.dynastiesHeading ?? "record.dynasty.list"),
176
+ media: n.media === !1 ? [] : e.media ?? [],
177
+ onDisplayIn: d,
178
+ database: f,
179
+ overallDatabase: p,
180
+ download: n.download === !1 ? null : {
181
+ label: z("record.action.download"),
182
+ pdfLabel: z("record.action.downloadPdf")
183
+ }
184
+ };
185
+ }
186
+ let Le = L(), Re = f(() => {
187
+ let e = u(Le.chrome, "world.png");
188
+ return e ? { "--mwnf-dxa-glossary-image": `url("${e}")` } : null;
189
+ });
190
+ function ze() {
191
+ window.print();
192
+ }
193
+ return (o, u) => R.value ? (w(), p(l, {
194
+ key: 0,
195
+ spec: V.value,
196
+ id: i.id,
197
+ entity: i.entity,
198
+ style: C(Re.value)
199
+ }, _({
200
+ "before-sheet": k((e) => [E(o.$slots, "before-sheet", S(b(e)), () => [(w(!0), h(d, null, T([X(e.record, e)], (t) => (w(), h(d, { key: "before-sheet" }, [t?.source || t?.addToCollectionLabel ? (w(), h("div", se, [t.source ? (w(), h("p", ce, [t.source.chipClass ? (w(), h("span", {
201
+ key: 0,
202
+ class: x(["mwnf-chip", t.source.chipClass]),
203
+ "aria-hidden": "true"
204
+ }, null, 2)) : m("", !0), t.source.name ? (w(), h(d, { key: 1 }, [v(D(t.source.label) + ": " + D(t.source.name), 1)], 64)) : m("", !0)])) : m("", !0), t.addToCollectionLabel ? (w(), h("p", le, [g("a", {
205
+ href: O(M).myCollection,
206
+ target: "_blank",
207
+ rel: "noopener"
208
+ }, "↗ " + D(t.addToCollectionLabel), 9, ue)])) : m("", !0)])) : m("", !0), t?.notice ? (w(), h("div", de, [v(D(t.notice) + " ", 1), g("strong", null, [g("em", null, D(e.languages.map((e) => e.label).join(", ")), 1)])])) : m("", !0)], 64))), 128))])]),
209
+ museum: k((e) => [E(o.$slots, "museum", S(b(e)), () => [(w(!0), h(d, null, T([Fe(e)], (t) => (w(), h("div", fe, [t.holder ? (w(), h("p", {
210
+ key: 0,
211
+ class: "mwnf-sheet-museum__holder",
212
+ innerHTML: t.holder
213
+ }, null, 8, pe)) : m("", !0), t.view ? (w(), p(c, {
214
+ key: 1,
215
+ variant: "summary",
216
+ partner: t.view,
217
+ label: "partner.info.about",
218
+ dir: e.dir
219
+ }, null, 8, ["partner", "dir"])) : m("", !0)]))), 128))])]),
220
+ related: k(() => []),
221
+ aside: k((i) => [E(o.$slots, "related", S(b(i)), () => [(w(!0), h(d, null, T([Ie(i.record, i)], (o) => (w(), h(d, { key: i.record?.id ?? "related" }, [o ? (w(), h("div", me, [
222
+ o.title ? (w(), h("p", he, D(o.title), 1)) : m("", !0),
223
+ o.description ? (w(), h("p", ge, D(o.description), 1)) : m("", !0),
224
+ o.inPackage.length || o.references.length ? (w(), p(s, {
225
+ key: 2,
226
+ heading: o.heading,
227
+ records: o.inPackage,
228
+ variant: o.variant,
229
+ "action-label": o.actionLabel
230
+ }, {
231
+ default: k(() => [o.references.length ? (w(), h("ul", _e, [(w(!0), h(d, null, T(o.references, (e) => (w(), h("li", { key: e.id }, [
232
+ e.chipClass ? (w(), h("span", {
233
+ key: 0,
234
+ class: x(["mwnf-chip", e.chipClass]),
235
+ "aria-hidden": "true"
236
+ }, null, 2)) : m("", !0),
237
+ e.name ? (w(), h(d, { key: 1 }, [v(D(e.name), 1)], 64)) : m("", !0),
238
+ o.notInPackageLabel ? (w(), h("span", ve, D(o.notInPackageLabel), 1)) : m("", !0)
239
+ ]))), 128))])) : m("", !0)]),
240
+ _: 2
241
+ }, 1032, [
242
+ "heading",
243
+ "records",
244
+ "variant",
245
+ "action-label"
246
+ ])) : m("", !0),
247
+ o.artisticIntroduction ? (w(), h("p", ye, [g("a", {
248
+ href: o.artisticIntroduction.url,
249
+ target: "_blank",
250
+ rel: "noopener"
251
+ }, "↗ " + D(o.artisticIntroduction.label), 9, be)])) : m("", !0),
252
+ o.timeline ? (w(), p(r, {
253
+ key: i.record.id,
254
+ info: o.timeline
255
+ }, null, 8, ["info"])) : m("", !0),
256
+ o.glossary ? (w(), p(n, {
257
+ key: 5,
258
+ language: i.language,
259
+ labels: o.glossaryLabels,
260
+ dir: i.dir
261
+ }, null, 8, [
262
+ "language",
263
+ "labels",
264
+ "dir"
265
+ ])) : m("", !0),
266
+ o.dynasties?.records?.length ? (w(), p(e, {
267
+ key: 6,
268
+ heading: o.dynastiesHeading,
269
+ dynasties: o.dynasties.records,
270
+ tr: o.dynasties.tr,
271
+ dir: i.dir
272
+ }, null, 8, [
273
+ "heading",
274
+ "dynasties",
275
+ "tr",
276
+ "dir"
277
+ ])) : m("", !0),
278
+ y(t, {
279
+ media: o.media,
280
+ language: i.language,
281
+ descriptions: !1,
282
+ dir: i.dir
283
+ }, null, 8, [
284
+ "media",
285
+ "language",
286
+ "dir"
287
+ ]),
288
+ o.onDisplayIn?.groups.length ? (w(), h("div", xe, [g("p", Se, D(O(z)("record.related.onDisplayIn")), 1), y(a, {
289
+ heading: "",
290
+ groups: o.onDisplayIn.groups,
291
+ "pending-label": o.onDisplayIn.pendingLabel,
292
+ dir: i.dir
293
+ }, null, 8, [
294
+ "groups",
295
+ "pending-label",
296
+ "dir"
297
+ ])])) : m("", !0),
298
+ o.database ? (w(), h("div", Ce, [g("p", we, D(o.database.label), 1), g("p", Te, [g("a", {
299
+ href: o.database.url,
300
+ target: "_blank",
301
+ rel: "noopener"
302
+ }, "↗ " + D(o.database.name), 9, Ee)])])) : m("", !0),
303
+ o.overallDatabase ? (w(), h("div", De, [g("p", Oe, D(o.overallDatabase.label), 1), g("p", ke, [g("a", {
304
+ href: O(M).overallDatabase,
305
+ target: "_blank",
306
+ rel: "noopener"
307
+ }, "↗ " + D(o.overallDatabase.linkLabel), 9, Ae)])])) : m("", !0),
308
+ o.download ? (w(), h("div", je, [g("p", Me, D(o.download.label), 1), g("p", {
309
+ class: "mwnf-sheet-related__line mwnf-sheet-related__line--action",
310
+ onClick: ze
311
+ }, "➤ " + D(o.download.pdfLabel), 1)])) : m("", !0)
312
+ ])) : m("", !0)], 64))), 128))])]),
313
+ _: 2
314
+ }, [T(F.value, (e) => ({
315
+ name: e,
316
+ fn: k((t) => [E(o.$slots, e, S(b(t)))])
317
+ }))]), 1032, [
318
+ "spec",
319
+ "id",
320
+ "entity",
321
+ "style"
322
+ ])) : (w(), p(O(te), { key: 1 }));
323
+ }
324
+ }, V = "mwnf-on-display__theme", H = (e) => N(e ?? ""), U = (e) => e?.titles?.en ?? Object.values(e?.titles ?? {})[0] ?? "", W = (e) => `<span class="${V}">${e}</span>`;
325
+ function G(e, t, n) {
326
+ return n && e.site === n ? {
327
+ id: e.path,
328
+ label: t,
329
+ to: e.path
330
+ } : {
331
+ id: `${e.site}${e.path}`,
332
+ label: t,
333
+ href: P(e.site, e.path),
334
+ external: !0
335
+ };
336
+ }
337
+ function K(e) {
338
+ return e.toLowerCase().split(" ").filter((e) => ![
339
+ "a",
340
+ "an",
341
+ "the"
342
+ ].includes(e)).join(" ");
343
+ }
344
+ function q(e, t, n = null) {
345
+ let r = e?.exhibition_references ?? [], i = [], a = r.filter((e) => e.list === "virtual" || e.list === "sharing_history");
346
+ a.length && i.push({
347
+ caption: a[0].project ? H(a[0].project.name) : "",
348
+ links: a.map((e) => G(e, [
349
+ H(U(e.exhibition)),
350
+ W(H(U(e.theme))),
351
+ ...e.subtheme ? [W(H(U(e.subtheme)))] : []
352
+ ].join(" | "), n))
353
+ });
354
+ let o = r.filter((e) => e.list === "exhibition"), s = o.filter((e) => e.exhibition?.titles?.[t]), c = s.length ? {
355
+ refs: s,
356
+ lang: t
357
+ } : {
358
+ refs: o.filter((e) => e.exhibition?.titles?.en),
359
+ lang: "en"
360
+ }, l = (e) => e?.titles?.[c.lang] ?? e?.titles?.en ?? "", u = [...c.refs].sort((e, t) => K(l(e.exhibition)).localeCompare(K(l(t.exhibition)), "en", { sensitivity: "base" }) || (e.legacy_order?.[0] ?? 0) - (t.legacy_order?.[0] ?? 0));
361
+ for (let e of u) {
362
+ let t = H(l(e.exhibition)), r = G(e, `${H(l(e.theme))} | ${W(H(l(e.subtheme)))}`, n), a = i[i.length - 1];
363
+ a?.exhibition === e.exhibition.id ? a.links.push(r) : i.push({
364
+ exhibition: e.exhibition.id,
365
+ caption: t,
366
+ links: [r]
367
+ });
368
+ }
369
+ return i;
370
+ }
371
+ // src/dxa/LegacyItemSheet.vue
372
+ var J = { class: "mwnf-dxa-item__languages" }, Y = ["dir"], X = ["href"], Z = ["href"], Q = ["innerHTML"], Pe = ["innerHTML"], $ = ["dir"], Fe = { class: "mwnf-dxa-gallery-item__label" }, Ie = {
373
+ key: "citation",
374
+ class: "mwnf-dxa-gallery-item__citation"
375
+ }, Le = { class: "mwnf-dxa-gallery-item__project" }, Re = { class: "mwnf-dxa-gallery-item__address" }, ze = { class: "mwnf-dxa-gallery-item__credit-label" }, Be = {
376
+ key: 1,
377
+ class: "mwnf-dxa-gallery-item__number"
378
+ }, Ve = { class: "mwnf-dxa-gallery-item__number-label" }, He = ["href"], Ue = {
379
+ __name: "LegacyItemSheet",
380
+ props: {
381
+ id: {
382
+ type: String,
383
+ required: !0
384
+ },
385
+ itemDetail: {
386
+ type: Object,
387
+ required: !0
388
+ },
389
+ dataGetter: {
390
+ type: Function,
391
+ default: null
392
+ },
393
+ words: {
394
+ type: Object,
395
+ required: !0
396
+ }
397
+ },
398
+ setup(e) {
399
+ let t = e, { t: n } = oe(), r = z(), a = I(), s = ae(), c = L(), l = f(() => ({
400
+ ...t.itemDetail,
401
+ sourceDatabase: !1,
402
+ sourceCredit: !1,
403
+ mediaThumbsFrom: 1,
404
+ mediaCreditCaption: !1,
405
+ shortDescriptionLabels: {
406
+ view: t.words.viewShortDescription,
407
+ hide: t.words.hideShortDescription
408
+ },
409
+ related: {
410
+ ...t.itemDetail.related,
411
+ glossaryLabels: { tool: t.words.glossary },
412
+ dynastiesHeading: t.words.dynasties,
413
+ onDisplayIn: {
414
+ ...t.itemDetail.related?.onDisplayIn,
415
+ exhibitionsHeading: t.words.exhibitions,
416
+ galleriesHeading: "core.project.galleries",
417
+ href: (e, t) => e.site ? P(e.site, `/item/${t.id}`) : e.legacy_host,
418
+ exhibitions: (e, t) => q(e, t.language, s.manifest?.site?.key)
419
+ }
420
+ }
421
+ }));
422
+ function u(e) {
423
+ let t = a.links(e?.project_id)?.homeSite;
424
+ return (t && t !== s.manifest?.site?.key ? P(t, `/item/${e.id}`) : null) ?? F(r);
425
+ }
426
+ function _(e) {
427
+ try {
428
+ let { host: t, pathname: n } = new URL(e), r = n.split("/").find(Boolean);
429
+ return r ? `${t}/${r}` : t;
430
+ } catch {
431
+ return e;
432
+ }
433
+ }
434
+ let b = (e) => c.projectColors?.[e?.project_id] ?? "";
435
+ function S(e, t) {
436
+ let n = a.label(t?.project_id) ?? "", r = n ? e.indexOf(` ${n},`) : -1;
437
+ return r < 0 ? {
438
+ before: e,
439
+ project: "",
440
+ after: ""
441
+ } : {
442
+ before: e.slice(0, r + 1),
443
+ project: n,
444
+ after: e.slice(r + 1 + n.length)
445
+ };
446
+ }
447
+ function C(e) {
448
+ return {
449
+ to: t.itemDetail.museum?.route?.(e.record?.partner_id) ?? null,
450
+ holder: e.text?.holder ? j(String(e.text.holder)) : ""
451
+ };
452
+ }
453
+ return (t, r) => (w(), p(B, {
454
+ spec: l.value,
455
+ id: e.id,
456
+ "data-getter": e.dataGetter,
457
+ class: "mwnf-dxa-item mwnf-dxa-gallery-item"
458
+ }, {
459
+ header: k(({ languages: e, language: t, select: n }) => [g("div", J, [y(o, {
460
+ languages: e,
461
+ language: t,
462
+ from: 1,
463
+ onSelect: n
464
+ }, null, 8, [
465
+ "languages",
466
+ "language",
467
+ "onSelect"
468
+ ])]), y(i)]),
469
+ "after-media": k(({ record: e, dir: t }) => [e ? (w(), h("div", {
470
+ key: 0,
471
+ class: "mwnf-dxa-gallery-item__links",
472
+ dir: t || void 0
473
+ }, [g("p", null, [g("a", {
474
+ href: u(e),
475
+ target: "_blank",
476
+ rel: "noopener"
477
+ }, [r[0] ||= g("span", {
478
+ class: "mwnf-dxa-gallery-item__icon",
479
+ "aria-hidden": "true"
480
+ }, "↗", -1), g("bdi", null, [v(D(O(n)("record.source.label")) + " ", 1), g("span", null, "(" + D(_(u(e))) + ")", 1)])], 8, X)]), g("p", null, [g("a", {
481
+ href: O(M).myCollection,
482
+ target: "_blank",
483
+ rel: "noopener"
484
+ }, [r[1] ||= g("span", {
485
+ class: "mwnf-dxa-gallery-item__icon",
486
+ "aria-hidden": "true"
487
+ }, "↗", -1), v(D(O(n)("record.action.addToCollection")), 1)], 8, Z)])], 8, Y)) : m("", !0)]),
488
+ museum: k((e) => [(w(!0), h(d, null, T([C(e)], (e) => (w(), h(d, { key: "museum" }, [e.to && e.holder ? (w(), p(O(R), {
489
+ key: 0,
490
+ to: e.to,
491
+ class: "mwnf-dxa-gallery-item__museum"
492
+ }, {
493
+ default: k(() => [r[2] ||= g("span", {
494
+ class: "mwnf-dxa-gallery-item__icon",
495
+ "aria-hidden": "true"
496
+ }, "↗", -1), g("span", { innerHTML: e.holder }, null, 8, Q)]),
497
+ _: 2
498
+ }, 1032, ["to"])) : e.holder ? (w(), h("span", {
499
+ key: 1,
500
+ innerHTML: e.holder
501
+ }, null, 8, Pe)) : m("", !0)], 64))), 128))]),
502
+ credits: k(({ record: t, credits: r, workingNumber: i, citation: a, dir: o }) => [t ? (w(), h("div", {
503
+ key: 0,
504
+ class: "mwnf-dxa-gallery-item__credits",
505
+ dir: o || void 0
506
+ }, [
507
+ a ? (w(), h(d, { key: 0 }, [g("p", Fe, D(O(n)("record.citation.ofThisPage")), 1), (w(!0), h(d, null, T([S(a, t)], (e) => (w(), h("p", Ie, [
508
+ v(D(e.before), 1),
509
+ g("span", Le, D(e.project), 1),
510
+ v(D(e.after) + " ", 1),
511
+ g("span", Re, D(u(t)), 1)
512
+ ]))), 128))], 64)) : m("", !0),
513
+ (w(!0), h(d, null, T(r, (e) => (w(), h("p", {
514
+ key: e.label,
515
+ class: "mwnf-dxa-gallery-item__credit"
516
+ }, [g("span", ze, D(e.label), 1), g("span", null, D(e.value), 1)]))), 128)),
517
+ i ? (w(), h("p", Be, [g("span", Ve, D(O(n)(e.words.workingNumber)), 1), v(D(" ") + D(i), 1)])) : m("", !0),
518
+ g("div", { class: x(["mwnf-dxa-gallery-item__source", b(t)]) }, [g("p", null, D(O(n)("record.source.label")), 1), g("p", null, [g("a", {
519
+ href: u(t),
520
+ target: "_blank",
521
+ rel: "noopener"
522
+ }, D(u(t)), 9, He)])], 2)
523
+ ], 8, $)) : m("", !0)]),
524
+ _: 1
525
+ }, 8, [
526
+ "spec",
527
+ "id",
528
+ "data-getter"
529
+ ]));
530
+ }
531
+ };
532
+ export { B as n, Ue as t };
@@ -1,4 +1,4 @@
1
- import { d as e, o as t } from "./PartnerMap-U-Hi2FBi.js";
1
+ import { d as e, o as t } from "./PartnerMap-DdyMLtgH.js";
2
2
  import { Fragment as n, computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createTextVNode as c, createVNode as l, mergeProps as u, normalizeClass as d, openBlock as f, ref as p, renderList as m, renderSlot as h, resolveDynamicComponent as g, toDisplayString as _, unref as v, vModelSelect as y, vModelText as b, watch as x, withCtx as S, withDirectives as C, withKeys as w } from "vue";
3
3
  import { useI18n as T } from "@museumwnf/viewer-core/i18n";
4
4
  import { md as E, mdInline as D, renderInline as O, searchGlossary as ee } from "@museumwnf/viewer-core";
@@ -355,7 +355,7 @@ var A = ["href"], te = {
355
355
  _: 1
356
356
  }, 8, ["heading", "dir"])) : a("", !0);
357
357
  }
358
- }, Te = ["innerHTML"], Ee = { class: "mwnf-on-display__list" }, De = ["innerHTML"], Oe = ["innerHTML"], ke = { class: "mwnf-on-display__pending" }, Ae = {
358
+ }, Te = ["innerHTML"], Ee = ["innerHTML"], De = { class: "mwnf-on-display__list" }, Oe = ["innerHTML"], ke = ["innerHTML"], Ae = { class: "mwnf-on-display__pending" }, je = {
359
359
  __name: "OnDisplayIn",
360
360
  props: {
361
361
  groups: {
@@ -376,19 +376,26 @@ var A = ["href"], te = {
376
376
  }
377
377
  },
378
378
  setup(l) {
379
- let d = l, { t: p } = T(), h = r(() => d.groups.filter((e) => e.links?.length));
380
- return (r, d) => h.value.length ? (f(), i(g(l.heading ? t : "div"), u({ key: 0 }, l.heading ? { heading: v(p)(l.heading) } : {}, {
379
+ let d = l, { t: p } = T(), h = (e) => (e.sections ?? [{ links: e.links ?? [] }]).filter((e) => e.links?.length), y = r(() => d.groups.map((e) => ({
380
+ ...e,
381
+ parts: h(e)
382
+ })).filter((e) => e.parts.length));
383
+ return (r, d) => y.value.length ? (f(), i(g(l.heading ? t : "div"), u({ key: 0 }, l.heading ? { heading: v(p)(l.heading) } : {}, {
381
384
  dir: l.dir || void 0,
382
385
  class: "mwnf-on-display"
383
386
  }), {
384
- default: S(() => [(f(!0), o(n, null, m(h.value, (t, r) => (f(), o("div", {
387
+ default: S(() => [(f(!0), o(n, null, m(y.value, (t, r) => (f(), o("div", {
385
388
  key: t.heading ?? r,
386
389
  class: "mwnf-on-display__group"
387
390
  }, [t.heading ? (f(), o("p", {
388
391
  key: 0,
389
392
  class: "mwnf-on-display__subheading",
390
393
  innerHTML: v(O)(v(p)(t.heading))
391
- }, null, 8, Te)) : a("", !0), s("ul", Ee, [(f(!0), o(n, null, m(t.links, (t, r) => (f(), o("li", {
394
+ }, null, 8, Te)) : a("", !0), (f(!0), o(n, null, m(t.parts, (t, r) => (f(), o(n, { key: r }, [t.caption ? (f(), o("p", {
395
+ key: 0,
396
+ class: "mwnf-on-display__caption",
397
+ innerHTML: t.caption
398
+ }, null, 8, Ee)) : a("", !0), s("ul", De, [(f(!0), o(n, null, m(t.links, (t, r) => (f(), o("li", {
392
399
  key: t.id ?? r,
393
400
  class: "mwnf-on-display__item"
394
401
  }, [t.to || t.href ? (f(), i(e, {
@@ -397,15 +404,15 @@ var A = ["href"], te = {
397
404
  href: t.href,
398
405
  external: !!t.external
399
406
  }, {
400
- default: S(() => [t.external ? (f(), o(n, { key: 0 }, [c("↗ ")], 64)) : a("", !0), s("span", { innerHTML: t.label }, null, 8, De)]),
407
+ default: S(() => [t.external ? (f(), o(n, { key: 0 }, [c("↗ ")], 64)) : a("", !0), s("span", { innerHTML: t.label }, null, 8, Oe)]),
401
408
  _: 2
402
409
  }, 1032, [
403
410
  "to",
404
411
  "href",
405
412
  "external"
406
- ])) : (f(), o(n, { key: 1 }, [s("span", { innerHTML: t.label }, null, 8, Oe), l.pendingLabel ? (f(), o(n, { key: 0 }, [d[0] ||= c(_(" "), -1), s("span", ke, _(v(p)(l.pendingLabel)), 1)], 64)) : a("", !0)], 64))]))), 128))])]))), 128))]),
413
+ ])) : (f(), o(n, { key: 1 }, [s("span", { innerHTML: t.label }, null, 8, ke), l.pendingLabel ? (f(), o(n, { key: 0 }, [d[0] ||= c(_(" "), -1), s("span", Ae, _(v(p)(l.pendingLabel)), 1)], 64)) : a("", !0)], 64))]))), 128))])], 64))), 128))]))), 128))]),
407
414
  _: 1
408
415
  }, 16, ["dir"])) : a("", !0);
409
416
  }
410
417
  };
411
- export { Q as a, ue as i, we as n, W as o, xe as r, j as s, Ae as t };
418
+ export { Q as a, ue as i, we as n, W as o, xe as r, j as s, je as t };