@museumwnf/viewer-layout 3.54.0 → 3.55.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.
@@ -1,8 +1,8 @@
1
1
  import { t as e } from "./chrome-DNsZQXrL.js";
2
2
  import { r as t } from "./PartnerMap-BIKd-AGP.js";
3
3
  import { n } from "./TimelineEventList-CTJJOWGh.js";
4
- import { i as r, n as i, o as a, r as o, t as s } from "./OnDisplayIn-DPRwCoYO.js";
5
- import { t as c } from "./RecordView-kkpYLtL_.js";
4
+ import { i as r, n as i, o as a, r as o, t as s } from "./OnDisplayIn-DZHRKjL0.js";
5
+ import { t as c } from "./RecordView-DEKHp1A3.js";
6
6
  import { Fragment as l, computed as u, createBlock as d, createCommentVNode as f, createElementBlock as p, createElementVNode as m, createSlots as ee, createTextVNode as h, createVNode as g, guardReactiveProps as _, normalizeClass as v, normalizeProps as y, normalizeStyle as te, openBlock as b, renderList as x, renderSlot as S, toDisplayString as C, unref as w, useSlots as ne, withCtx as T } from "vue";
7
7
  import { NotFoundView as re, byId as E, loadEntities as ie, mdInline as D, mdStrip as ae, mwnfLinks as O, partnerView as oe, useDataPackage as se, useI18n as ce, useProjects as le, useSiteConfig as ue } from "@museumwnf/viewer-core";
8
8
  //#region src/dxa/ItemDetailView.vue
@@ -1,16 +1,16 @@
1
1
  import { d as e, o as t } from "./PartnerMap-BIKd-AGP.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
- import { md as E, mdInline as D, searchGlossary as ee } from "@museumwnf/viewer-core";
5
- import { useRouter as O } from "vue-router";
4
+ import { md as E, mdInline as D, renderInline as O, searchGlossary as ee } from "@museumwnf/viewer-core";
5
+ import { useRouter as k } from "vue-router";
6
6
  //#region src/content/BackLink.vue
7
- var k = ["href"], A = {
7
+ var A = ["href"], te = {
8
8
  class: "mwnf-back-bar__arrow",
9
9
  "aria-hidden": "true"
10
- }, te = {
10
+ }, ne = {
11
11
  key: 1,
12
12
  class: "mwnf-back-link"
13
- }, ne = {
13
+ }, j = {
14
14
  __name: "BackLink",
15
15
  props: {
16
16
  label: {
@@ -36,7 +36,7 @@ var k = ["href"], A = {
36
36
  }
37
37
  },
38
38
  setup(t) {
39
- let n = O(), a = t, l = r(() => !!(a.to || a.href));
39
+ let n = k(), a = t, l = r(() => !!(a.to || a.href));
40
40
  function u() {
41
41
  return window.history.state?.back != null || !l.value && window.history.length > 1;
42
42
  }
@@ -53,10 +53,10 @@ var k = ["href"], A = {
53
53
  class: "mwnf-back-bar mwnf-back-bar--link",
54
54
  onClick: m
55
55
  }, [
56
- s("span", A, _(t.arrow), 1),
56
+ s("span", te, _(t.arrow), 1),
57
57
  r[0] ||= c(),
58
58
  h(n.$slots, "default", {}, () => [c(_(n.$t(t.label)), 1)])
59
- ], 8, k)) : (f(), o("div", te, [l.value && !u() ? (f(), i(e, {
59
+ ], 8, A)) : (f(), o("div", ne, [l.value && !u() ? (f(), i(e, {
60
60
  key: 0,
61
61
  to: t.to,
62
62
  href: t.href,
@@ -70,21 +70,21 @@ var k = ["href"], A = {
70
70
  onClick: d
71
71
  }, " ↩ " + _(n.$t(t.label)), 1))]));
72
72
  }
73
- }, j = ["dir"], M = { class: "mwnf-glossary-tool__toggle" }, N = { class: "mwnf-glossary-tool__panel" }, P = { class: "mwnf-glossary-tool__heading" }, F = { class: "mwnf-glossary-tool__instructions" }, I = ["aria-expanded", "aria-label"], L = {
73
+ }, M = ["dir"], N = { class: "mwnf-glossary-tool__toggle" }, P = { class: "mwnf-glossary-tool__panel" }, F = { class: "mwnf-glossary-tool__heading" }, I = { class: "mwnf-glossary-tool__instructions" }, L = ["aria-expanded", "aria-label"], R = {
74
74
  key: 0,
75
75
  class: "mwnf-glossary-tool__hits",
76
76
  role: "listbox"
77
- }, R = [
77
+ }, z = [
78
78
  "aria-selected",
79
79
  "onClick",
80
80
  "onKeydown"
81
- ], z = {
81
+ ], B = {
82
82
  key: 1,
83
83
  class: "mwnf-glossary-tool__no-results"
84
- }, B = {
84
+ }, V = {
85
85
  key: 2,
86
86
  class: "mwnf-glossary-tool__definition"
87
- }, V = { class: "mwnf-glossary-tool__definition-label" }, H = ["innerHTML"], U = {
87
+ }, H = { class: "mwnf-glossary-tool__definition-label" }, U = ["innerHTML"], W = {
88
88
  __name: "GlossaryTool",
89
89
  props: {
90
90
  language: {
@@ -125,9 +125,9 @@ var k = ["href"], A = {
125
125
  return (t, r) => (f(), o("details", {
126
126
  class: "mwnf-glossary-tool",
127
127
  dir: e.dir || void 0
128
- }, [s("summary", M, _(v(c)(i.tool)), 1), s("div", N, [
129
- s("p", P, _(v(c)(i.heading)), 1),
130
- s("p", F, _(v(c)(i.instructions)), 1),
128
+ }, [s("summary", N, _(v(c)(i.tool)), 1), s("div", P, [
129
+ s("p", F, _(v(c)(i.heading)), 1),
130
+ s("p", I, _(v(c)(i.instructions)), 1),
131
131
  C(s("input", {
132
132
  "onUpdate:modelValue": r[0] ||= (e) => l.value = e,
133
133
  type: "text",
@@ -138,8 +138,8 @@ var k = ["href"], A = {
138
138
  "aria-label": v(c)(i.heading),
139
139
  onInput: O,
140
140
  onKeydown: A
141
- }, null, 40, I), [[b, l.value]]),
142
- y.value ? (f(), o("ul", L, [(f(!0), o(n, null, m(g.value, (e, t) => (f(), o("li", {
141
+ }, null, 40, L), [[b, l.value]]),
142
+ y.value ? (f(), o("ul", R, [(f(!0), o(n, null, m(g.value, (e, t) => (f(), o("li", {
143
143
  key: e.id,
144
144
  role: "option",
145
145
  "aria-selected": t === h.value,
@@ -147,26 +147,26 @@ var k = ["href"], A = {
147
147
  class: d(["mwnf-glossary-tool__hit", { "mwnf-glossary-tool__hit--active": t === h.value }]),
148
148
  onClick: (t) => k(e),
149
149
  onKeydown: w((t) => k(e), ["enter"])
150
- }, _(e.spelling), 43, R))), 128))])) : D.value ? (f(), o("p", z, _(S.value), 1)) : a("", !0),
151
- u.value ? (f(), o("div", B, [s("p", V, _(v(c)(i.definition)), 1), s("div", {
150
+ }, _(e.spelling), 43, z))), 128))])) : D.value ? (f(), o("p", B, _(S.value), 1)) : a("", !0),
151
+ u.value ? (f(), o("div", V, [s("p", H, _(v(c)(i.definition)), 1), s("div", {
152
152
  class: "mwnf-sheet__block",
153
153
  innerHTML: x.value
154
- }, null, 8, H)])) : a("", !0)
155
- ])], 8, j));
154
+ }, null, 8, U)])) : a("", !0)
155
+ ])], 8, M));
156
156
  }
157
- }, W = ["dir"], G = ["innerHTML"], K = { class: "mwnf-dynasty__body" }, q = { class: "mwnf-dynasty__eyebrow" }, J = {
157
+ }, G = ["dir"], K = ["innerHTML"], q = { class: "mwnf-dynasty__body" }, J = { class: "mwnf-dynasty__eyebrow" }, Y = {
158
158
  key: 0,
159
159
  class: "mwnf-dynasty__field"
160
- }, Y = { class: "mwnf-dynasty__label" }, X = {
160
+ }, X = { class: "mwnf-dynasty__label" }, Z = {
161
161
  key: 1,
162
162
  class: "mwnf-dynasty__field"
163
- }, Z = { class: "mwnf-dynasty__label" }, re = {
163
+ }, re = { class: "mwnf-dynasty__label" }, ie = {
164
164
  key: 2,
165
165
  class: "mwnf-dynasty__dates"
166
- }, ie = {
166
+ }, ae = {
167
167
  key: 3,
168
168
  class: "mwnf-dynasty__history"
169
- }, ae = { class: "mwnf-dynasty__label" }, oe = ["innerHTML"], Q = {
169
+ }, oe = { class: "mwnf-dynasty__label" }, se = ["innerHTML"], Q = {
170
170
  __name: "DynastyPopout",
171
171
  props: {
172
172
  dynasty: {
@@ -193,21 +193,21 @@ var k = ["href"], A = {
193
193
  }, [s("summary", {
194
194
  class: "mwnf-dynasty__summary",
195
195
  innerHTML: v(D)(e.text.name || e.dynasty.id)
196
- }, null, 8, G), s("div", K, [
197
- s("p", q, _(v(n)("record.dynasty.heading")), 1),
198
- e.text.also_known_as ? (f(), o("p", J, [s("span", Y, _(v(n)("sheet.field.alsoKnownAs")) + ":", 1), c(" " + _(e.text.also_known_as), 1)])) : a("", !0),
199
- e.text.area ? (f(), o("p", X, [s("span", Z, _(v(n)("sheet.field.area")) + ":", 1), c(" " + _(e.text.area), 1)])) : a("", !0),
200
- i.value ? (f(), o("p", re, _(i.value), 1)) : a("", !0),
201
- e.text.history ? (f(), o("div", ie, [s("p", ae, _(v(n)("sheet.field.history")), 1), s("div", {
196
+ }, null, 8, K), s("div", q, [
197
+ s("p", J, _(v(n)("record.dynasty.heading")), 1),
198
+ e.text.also_known_as ? (f(), o("p", Y, [s("span", X, _(v(n)("sheet.field.alsoKnownAs")) + ":", 1), c(" " + _(e.text.also_known_as), 1)])) : a("", !0),
199
+ e.text.area ? (f(), o("p", Z, [s("span", re, _(v(n)("sheet.field.area")) + ":", 1), c(" " + _(e.text.area), 1)])) : a("", !0),
200
+ i.value ? (f(), o("p", ie, _(i.value), 1)) : a("", !0),
201
+ e.text.history ? (f(), o("div", ae, [s("p", oe, _(v(n)("sheet.field.history")), 1), s("div", {
202
202
  class: "mwnf-sheet__block",
203
203
  innerHTML: v(E)(e.text.history)
204
- }, null, 8, oe)])) : a("", !0)
205
- ])], 8, W));
204
+ }, null, 8, se)])) : a("", !0)
205
+ ])], 8, G));
206
206
  }
207
- }, se = ["dir"], ce = {
207
+ }, ce = ["dir"], le = {
208
208
  key: 0,
209
209
  class: "mwnf-dynasty-list__heading"
210
- }, le = {
210
+ }, ue = {
211
211
  __name: "DynastyList",
212
212
  props: {
213
213
  heading: {
@@ -232,7 +232,7 @@ var k = ["href"], A = {
232
232
  key: 0,
233
233
  class: "mwnf-dynasty-list",
234
234
  dir: e.dir || void 0
235
- }, [e.heading ? (f(), o("h2", ce, _(e.heading), 1)) : a("", !0), (f(!0), o(n, null, m(e.dynasties, (t) => (f(), i(Q, {
235
+ }, [e.heading ? (f(), o("h2", le, _(e.heading), 1)) : a("", !0), (f(!0), o(n, null, m(e.dynasties, (t) => (f(), i(Q, {
236
236
  key: t.id,
237
237
  dynasty: t,
238
238
  text: e.tr ? e.tr(t) : t,
@@ -241,16 +241,16 @@ var k = ["href"], A = {
241
241
  "dynasty",
242
242
  "text",
243
243
  "dir"
244
- ]))), 128))], 8, se)) : a("", !0);
244
+ ]))), 128))], 8, ce)) : a("", !0);
245
245
  }
246
- }, ue = { class: "mwnf-sheet-timeline" }, de = {
246
+ }, de = { class: "mwnf-sheet-timeline" }, fe = {
247
247
  key: 0,
248
248
  class: "mwnf-sheet-timeline__popout",
249
249
  dir: "ltr"
250
- }, fe = ["aria-label"], pe = { class: "mwnf-sheet-timeline__title" }, me = { class: "mwnf-sheet-timeline__option" }, he = ["value"], ge = { class: "mwnf-sheet-timeline__scroll" }, _e = { class: "mwnf-sheet-timeline__subheader" }, ve = {
250
+ }, pe = ["aria-label"], me = { class: "mwnf-sheet-timeline__title" }, he = { class: "mwnf-sheet-timeline__option" }, ge = ["value"], _e = { class: "mwnf-sheet-timeline__scroll" }, ve = { class: "mwnf-sheet-timeline__subheader" }, ye = {
251
251
  key: 0,
252
252
  class: "mwnf-sheet-timeline__empty"
253
- }, ye = { class: "mwnf-sheet-timeline__date" }, be = ["innerHTML"], $ = {
253
+ }, be = { class: "mwnf-sheet-timeline__date" }, $ = ["innerHTML"], xe = {
254
254
  __name: "TimelineLookup",
255
255
  props: { info: {
256
256
  type: Object,
@@ -262,47 +262,47 @@ var k = ["href"], A = {
262
262
  h.value = e.defaultCountry ? e.defaultCountry() : "all";
263
263
  });
264
264
  let g = r(() => i.info.range ?? [null, null]), b = r(() => i.info.events(h.value)), w = r(() => i.info.countries.find((e) => e.value === h.value)?.label ?? ""), D = (e) => i.info.era ? i.info.era(e) : String(e ?? "");
265
- return (r, i) => (f(), o("div", ue, [s("p", {
265
+ return (r, i) => (f(), o("div", de, [s("p", {
266
266
  class: "mwnf-sheet-timeline__trigger",
267
267
  onClick: i[0] ||= (e) => d.value = !d.value
268
- }, "➤ " + _(v(u)(t.info.trigger ?? "record.related.timelineForItem")), 1), d.value ? (f(), o("div", de, [
268
+ }, "➤ " + _(v(u)(t.info.trigger ?? "record.related.timelineForItem")), 1), d.value ? (f(), o("div", fe, [
269
269
  s("button", {
270
270
  type: "button",
271
271
  class: "mwnf-sheet-timeline__close",
272
272
  "aria-label": v(u)("core.action.close"),
273
273
  onClick: i[1] ||= (e) => d.value = !1
274
- }, "✕", 8, fe),
275
- s("p", pe, _(v(u)(t.info.heading)), 1),
276
- s("div", me, [C(s("select", {
274
+ }, "✕", 8, pe),
275
+ s("p", me, _(v(u)(t.info.heading)), 1),
276
+ s("div", he, [C(s("select", {
277
277
  "onUpdate:modelValue": i[2] ||= (e) => h.value = e,
278
278
  class: "mwnf-sheet-timeline__select"
279
279
  }, [(f(!0), o(n, null, m(t.info.countries, (e) => (f(), o("option", {
280
280
  key: e.value,
281
281
  value: e.value
282
- }, _(e.label), 9, he))), 128))], 512), [[y, h.value]]), l(e, {
282
+ }, _(e.label), 9, ge))), 128))], 512), [[y, h.value]]), l(e, {
283
283
  class: "mwnf-sheet-timeline__link",
284
284
  to: t.info.searchTo(h.value, g.value)
285
285
  }, {
286
286
  default: S(() => [c("➤ " + _(v(u)("timeline.action.beginFullSearch")), 1)]),
287
287
  _: 1
288
288
  }, 8, ["to"])]),
289
- s("div", ge, [
290
- s("p", _e, _(w.value) + ", " + _(D(g.value[0])) + " – " + _(D(g.value[1])), 1),
291
- b.value.length ? a("", !0) : (f(), o("p", ve, _(v(u)("timeline.results.noEvents")), 1)),
289
+ s("div", _e, [
290
+ s("p", ve, _(w.value) + ", " + _(D(g.value[0])) + " – " + _(D(g.value[1])), 1),
291
+ b.value.length ? a("", !0) : (f(), o("p", ye, _(v(u)("timeline.results.noEvents")), 1)),
292
292
  (f(!0), o(n, null, m(b.value, (e, t) => (f(), o("div", {
293
293
  key: e.id ?? t,
294
294
  class: "mwnf-sheet-timeline__event"
295
- }, [s("div", ye, _(D(e.year_from)), 1), s("div", {
295
+ }, [s("div", be, _(D(e.year_from)), 1), s("div", {
296
296
  class: "mwnf-sheet-timeline__description",
297
297
  innerHTML: v(E)(e.text.description)
298
- }, null, 8, be)]))), 128))
298
+ }, null, 8, $)]))), 128))
299
299
  ])
300
300
  ])) : a("", !0)]));
301
301
  }
302
- }, xe = ["href"], Se = {
302
+ }, Se = ["href"], Ce = {
303
303
  key: 0,
304
304
  class: "mwnf-related-media__description"
305
- }, Ce = {
305
+ }, we = {
306
306
  __name: "RelatedMedia",
307
307
  props: {
308
308
  media: {
@@ -345,14 +345,11 @@ var k = ["href"], A = {
345
345
  target: "_blank",
346
346
  rel: "noopener",
347
347
  class: "mwnf-related-media__link"
348
- }, "↗ " + _(t.title || t.url), 9, xe), e.descriptions && t.description ? (f(), o("p", Se, _(t.description), 1)) : a("", !0)]))), 128))]),
348
+ }, "↗ " + _(t.title || t.url), 9, Se), e.descriptions && t.description ? (f(), o("p", Ce, _(t.description), 1)) : a("", !0)]))), 128))]),
349
349
  _: 1
350
350
  }, 8, ["heading", "dir"])) : a("", !0);
351
351
  }
352
- }, we = {
353
- key: 0,
354
- class: "mwnf-on-display__subheading"
355
- }, Te = { class: "mwnf-on-display__list" }, Ee = ["innerHTML"], De = ["innerHTML"], Oe = { class: "mwnf-on-display__pending" }, ke = {
352
+ }, Te = ["innerHTML"], Ee = { class: "mwnf-on-display__list" }, De = ["innerHTML"], Oe = ["innerHTML"], ke = { class: "mwnf-on-display__pending" }, Ae = {
356
353
  __name: "OnDisplayIn",
357
354
  props: {
358
355
  groups: {
@@ -381,7 +378,11 @@ var k = ["href"], A = {
381
378
  default: S(() => [(f(!0), o(n, null, m(h.value, (t, r) => (f(), o("div", {
382
379
  key: t.heading ?? r,
383
380
  class: "mwnf-on-display__group"
384
- }, [t.heading ? (f(), o("p", we, _(v(p)(t.heading)), 1)) : a("", !0), s("ul", Te, [(f(!0), o(n, null, m(t.links, (t, r) => (f(), o("li", {
381
+ }, [t.heading ? (f(), o("p", {
382
+ key: 0,
383
+ class: "mwnf-on-display__subheading",
384
+ innerHTML: v(O)(v(p)(t.heading))
385
+ }, null, 8, Te)) : a("", !0), s("ul", Ee, [(f(!0), o(n, null, m(t.links, (t, r) => (f(), o("li", {
385
386
  key: t.id ?? r,
386
387
  class: "mwnf-on-display__item"
387
388
  }, [t.to || t.href ? (f(), i(e, {
@@ -390,16 +391,16 @@ var k = ["href"], A = {
390
391
  href: t.href,
391
392
  external: !!t.external
392
393
  }, {
393
- default: S(() => [t.external ? (f(), o(n, { key: 0 }, [c("↗ ")], 64)) : a("", !0), s("span", { innerHTML: t.label }, null, 8, Ee)]),
394
+ default: S(() => [t.external ? (f(), o(n, { key: 0 }, [c("↗ ")], 64)) : a("", !0), s("span", { innerHTML: t.label }, null, 8, De)]),
394
395
  _: 2
395
396
  }, 1032, [
396
397
  "to",
397
398
  "href",
398
399
  "external"
399
- ])) : (f(), o(n, { key: 1 }, [s("span", { innerHTML: t.label }, null, 8, De), l.pendingLabel ? (f(), o(n, { key: 0 }, [d[0] ||= c(_(" "), -1), s("span", Oe, _(v(p)(l.pendingLabel)), 1)], 64)) : a("", !0)], 64))]))), 128))])]))), 128))]),
400
+ ])) : (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))]),
400
401
  _: 1
401
402
  }, 16, ["dir"])) : a("", !0);
402
403
  }
403
404
  };
404
405
  //#endregion
405
- export { Q as a, le as i, Ce as n, U as o, $ as r, ne as s, ke as t };
406
+ export { Q as a, ue as i, we as n, W as o, xe as r, j as s, Ae as t };
@@ -0,0 +1,348 @@
1
+ import { a as e, c as t, d as n, i as r, n as i, o as ee, r as te, s as ne } from "./PartnerMap-BIKd-AGP.js";
2
+ import { t as re } from "./GlossaryPopover-B7E6BsjS.js";
3
+ import { Fragment as ie, computed as a, createBlock as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, createSlots as ae, createTextVNode as oe, createVNode as u, guardReactiveProps as d, mergeProps as se, normalizeClass as ce, normalizeProps as f, openBlock as p, ref as m, renderList as h, renderSlot as g, toDisplayString as _, unref as v, useSlots as le, watch as y, withCtx as ue } from "vue";
4
+ import { useI18n as b } from "@museumwnf/viewer-core/i18n";
5
+ import { NotFoundView as de, byId as x, citation as fe, creditLine as pe, entityRef as me, languageLabels as he, loadEntities as ge, pictureCredits as _e, picturesInLanguage as ve, renderBlock as S, renderInline as C, renderPlain as ye, sheetRows as be, sourceUrl as xe, useDataPackage as Se, useGlossaryPopup as Ce, useI18n as we, useProjects as Te, useRecordSheet as Ee, useRelatedRecords as De } from "@museumwnf/viewer-core";
6
+ import { useRoute as Oe } from "vue-router";
7
+ //#region src/content/ShortDescription.vue
8
+ var w = ["dir"], ke = ["aria-expanded"], T = ["innerHTML"], Ae = {
9
+ __name: "ShortDescription",
10
+ props: {
11
+ html: {
12
+ type: String,
13
+ required: !0
14
+ },
15
+ dir: {
16
+ type: String,
17
+ default: void 0
18
+ }
19
+ },
20
+ setup(e) {
21
+ let t = e, { t: n } = b(), r = m(!1);
22
+ return y(() => t.html, () => {
23
+ r.value = !1;
24
+ }), (t, i) => (p(), c("div", {
25
+ class: "mwnf-sheet__short",
26
+ dir: e.dir
27
+ }, [l("button", {
28
+ type: "button",
29
+ class: "mwnf-sheet__toggle",
30
+ "aria-expanded": r.value ? "true" : "false",
31
+ onClick: i[0] ||= (e) => r.value = !r.value
32
+ }, _(r.value ? v(n)("record.action.hideShortDescription") : v(n)("record.action.viewShortDescription")), 9, ke), r.value ? (p(), c("div", {
33
+ key: 0,
34
+ class: "mwnf-sheet__block",
35
+ innerHTML: e.html
36
+ }, null, 8, T)) : s("", !0)], 8, w));
37
+ }
38
+ };
39
+ //#endregion
40
+ //#region src/views/pictureLimit.js
41
+ function E(e, t, n) {
42
+ let r = typeof t == "function" ? t(n) : t;
43
+ return Number.isInteger(r) && r > 0 ? e.slice(0, r) : e;
44
+ }
45
+ //#endregion
46
+ //#region src/views/RecordView.vue
47
+ var je = ["dir", "innerHTML"], Me = { class: "mwnf-record__body" }, Ne = { class: "mwnf-record__main" }, Pe = {
48
+ key: 1,
49
+ class: "mwnf-record__status"
50
+ }, Fe = {
51
+ key: 0,
52
+ class: "mwnf-record__aside"
53
+ }, Ie = {
54
+ key: 2,
55
+ class: "mwnf-record__status"
56
+ }, D = {
57
+ __name: "RecordView",
58
+ props: {
59
+ spec: {
60
+ type: Object,
61
+ required: !0
62
+ },
63
+ id: {
64
+ type: String,
65
+ required: !0
66
+ },
67
+ entity: {
68
+ type: String,
69
+ default: ""
70
+ }
71
+ },
72
+ setup(m) {
73
+ let y = m, { t: b, tIn: w, locale: ke } = we(), T = Se(), D = Te(), Le = le(), Re = Oe(), O = y.spec.entity ?? y.entity, k = a(() => y.spec), ze = me(O), Be = x(O), A = a(() => Be.value.get(y.id) ?? null), Ve = a(() => ze.value !== null), j = y.spec.creditPeople ? y.spec.creditPeople.entity ?? "authors" : null;
74
+ j && ge([j]).catch(() => {});
75
+ let He = j ? x(j) : null, { language: M, languages: Ue, dir: N, select: P, text: F, ready: I, terms: We, glossary: L, attribution: R } = Ee(A, {
76
+ entity: O,
77
+ translations: [...y.spec.translations ?? [], ...j ? [j] : []],
78
+ attribution: y.spec.attribution ?? []
79
+ }), z = a(() => he(Ue.value)), { active: B, onClick: V, close: Ge } = Ce(We), Ke = a(() => B.value ? S(B.value.definition, { breaks: !0 }) : ""), H = (e, t) => T.tr(e, t, M.value, "en"), U = (e) => T.translations(e, M.value), W = a(() => ({
80
+ record: A.value,
81
+ text: F.value,
82
+ language: M.value,
83
+ languages: z.value,
84
+ select: P,
85
+ dir: N.value,
86
+ glossary: L.value,
87
+ ready: I.value,
88
+ attribution: R.value,
89
+ t: b,
90
+ tIn: (e) => w ? w(M.value, e) : b(e),
91
+ tr: H,
92
+ translations: U
93
+ })), G = (e) => k.value.labelsInRecordLanguage && w ? w(M.value, e) : b(e);
94
+ function K(e) {
95
+ return ((typeof e == "function" ? e(W.value) : e) ?? []).map((e) => ({
96
+ ...e,
97
+ label: e.label ? G(e.label) : ""
98
+ }));
99
+ }
100
+ let q = a(() => A.value ? be(K(k.value.fields), W.value) : []), J = a(() => A.value ? be(K(k.value.sections).map((e) => ({
101
+ render: "block",
102
+ ...e
103
+ })), W.value) : []), Y = a(() => k.value.shortDescriptionAfter ?? "description"), qe = a(() => !q.value.some((e) => e.key === Y.value) && J.value.some((e) => e.key === Y.value)), Je = a(() => k.value.shortDescription === !1 ? "" : k.value.shortDescription ?? "short_description"), X = a(() => {
104
+ let e = Je.value ? F.value[Je.value] : "";
105
+ return e ? { html: S(String(e), {
106
+ breaks: !0,
107
+ glossary: L.value
108
+ }) } : null;
109
+ }), Ye = a(() => {
110
+ if (!A.value) return "";
111
+ if (k.value.title) return k.value.title(W.value);
112
+ let e = F.value.name ?? A.value.internal_name ?? A.value.id;
113
+ return C(String(e), { glossary: L.value });
114
+ }), Xe = a(() => A.value ? E(Ze(), k.value.pictureLimit, W.value) : []);
115
+ function Ze() {
116
+ if (k.value.media) return k.value.media(A.value, W.value);
117
+ let e = ye(String(F.value.name ?? A.value.internal_name ?? ""));
118
+ return ve(A.value.images, M.value).map((t) => ({
119
+ url: t.url,
120
+ alt: t.captions?.[M.value] ?? e,
121
+ caption: t.captions?.[M.value] ?? "",
122
+ ..._e(t, M.value)
123
+ }));
124
+ }
125
+ let Qe = [
126
+ {
127
+ field: "author",
128
+ label: "sheet.field.preparedBy"
129
+ },
130
+ {
131
+ field: "copy_editor",
132
+ label: "sheet.field.copyeditedBy"
133
+ },
134
+ {
135
+ field: "translator",
136
+ label: "sheet.field.translationBy"
137
+ },
138
+ {
139
+ field: "translation_copy_editor",
140
+ label: "sheet.field.translationCopyeditedBy"
141
+ }
142
+ ];
143
+ function $e(e) {
144
+ let t = k.value.creditNames ? F.value.credit_names?.[e] : null;
145
+ return t?.length ? pe(t) : F.value[e] ?? R.value[e] ?? "";
146
+ }
147
+ function et(e) {
148
+ let t = He ? F.value.credit_ids?.[e] : null;
149
+ if (!t?.length) return null;
150
+ let n = U(j), r = t.map((e) => {
151
+ let t = He.value.get(e);
152
+ if (!t) return null;
153
+ let r = t.name ?? "";
154
+ return {
155
+ name: M.value === "ar" && t.originalname ? t.originalname : r,
156
+ heading: [t.firstname, t.lastname].filter(Boolean).join(" ") || r,
157
+ biography: n?.[e]?.curriculum ?? ""
158
+ };
159
+ });
160
+ return r.every(Boolean) ? r : null;
161
+ }
162
+ let tt = a(() => (k.value.credits ?? Qe).map(({ field: e, label: t }) => ({
163
+ label: G(t),
164
+ value: $e(e),
165
+ people: et(e)
166
+ })).filter((e) => e.value)), nt = a(() => String(A.value?.[k.value.workingNumber ?? "mwnf_reference"] ?? ""));
167
+ function rt(e) {
168
+ if (e?.permalink !== !1) return typeof e?.permalink == "string" ? e.permalink : xe(Re) ?? void 0;
169
+ }
170
+ let it = a(() => {
171
+ let e = k.value.citation;
172
+ return !A.value || typeof e?.format != "function" ? "" : e.format(W.value, {
173
+ permalink: rt(e),
174
+ year: (/* @__PURE__ */ new Date()).getFullYear()
175
+ });
176
+ }), at = a(() => {
177
+ let e = k.value.citation;
178
+ if (!A.value || e === !1 || typeof e?.format == "function") return "";
179
+ let t = typeof e?.project == "function" ? null : e?.project ?? A.value.project_id, n = typeof e?.project == "function" ? e.project(A.value, W.value) : D.label(t);
180
+ return fe({
181
+ author: $e("author") || void 0,
182
+ name: F.value.name ?? A.value.internal_name ?? "",
183
+ project: n,
184
+ permalink: rt(e),
185
+ inWord: b("record.citation.in")
186
+ });
187
+ }), Z = De(A, {
188
+ entity: O,
189
+ language: M
190
+ }), Q = a(() => k.value.related === !1 ? null : k.value.related ?? {}), $ = a(() => {
191
+ if (!Q.value) return [];
192
+ let e = Q.value.record ?? ot;
193
+ return Z.value.inPackage.map((t) => e(t, W.value));
194
+ });
195
+ function ot({ record: e, justification: t }) {
196
+ let n = H(O, e.id).name ?? e.internal_name ?? e.id;
197
+ return {
198
+ id: e.id,
199
+ image: e.images?.[0]?.url ?? "",
200
+ imageAlt: ye(String(n)),
201
+ name: C(String(n)),
202
+ meta: t ? [t] : [],
203
+ badge: e.type ?? "",
204
+ to: {
205
+ name: k.value.route ?? (y.entity ? `${y.entity}-detail` : "item"),
206
+ params: { id: e.id }
207
+ }
208
+ };
209
+ }
210
+ let st = /* @__PURE__ */ new Set([
211
+ "header",
212
+ "before-sheet",
213
+ "after-sheet",
214
+ "aside",
215
+ "source",
216
+ "related",
217
+ "after",
218
+ "default"
219
+ ]), ct = a(() => Object.keys(Le).filter((e) => !st.has(e)));
220
+ return (a, m) => Ve.value && !A.value ? (p(), o(v(de), { key: 0 })) : A.value ? (p(), c("article", {
221
+ key: 1,
222
+ class: ce(["mwnf-record", { "mwnf-record--spaced": k.value.spaced }]),
223
+ onClick: m[0] ||= (...e) => v(V) && v(V)(...e)
224
+ }, [
225
+ g(a.$slots, "header", f(d(W.value)), () => [
226
+ k.value.back ? (p(), o(n, {
227
+ key: 0,
228
+ class: "mwnf-record__back",
229
+ to: k.value.back.to,
230
+ href: k.value.back.href
231
+ }, {
232
+ default: ue(() => [oe("← " + _(v(b)(k.value.back.label)), 1)]),
233
+ _: 1
234
+ }, 8, ["to", "href"])) : s("", !0),
235
+ u(t, {
236
+ languages: z.value,
237
+ language: v(M),
238
+ onSelect: v(P)
239
+ }, null, 8, [
240
+ "languages",
241
+ "language",
242
+ "onSelect"
243
+ ]),
244
+ l("h1", {
245
+ class: "mwnf-record__title",
246
+ dir: v(N) || void 0,
247
+ innerHTML: Ye.value
248
+ }, null, 8, je)
249
+ ]),
250
+ l("div", Me, [l("div", Ne, [
251
+ Xe.value.length ? (p(), o(i, {
252
+ key: 0,
253
+ images: Xe.value,
254
+ variant: k.value.mediaVariant ?? ""
255
+ }, null, 8, ["images", "variant"])) : s("", !0),
256
+ v(I) ? s("", !0) : (p(), c("p", Pe, _(v(b)("core.status.loading")), 1)),
257
+ g(a.$slots, "before-sheet", f(d(W.value))),
258
+ u(ne, {
259
+ rows: q.value,
260
+ layout: k.value.layout ?? "table",
261
+ dir: v(N),
262
+ "short-description": X.value,
263
+ "short-description-after": Y.value
264
+ }, ae({ _: 2 }, [h(ct.value, (e) => ({
265
+ name: e,
266
+ fn: ue((t) => [g(a.$slots, e, f(d({
267
+ ...t,
268
+ ...W.value
269
+ })))])
270
+ }))]), 1032, [
271
+ "rows",
272
+ "layout",
273
+ "dir",
274
+ "short-description",
275
+ "short-description-after"
276
+ ]),
277
+ (p(!0), c(ie, null, h(J.value, (e) => (p(), c(ie, { key: e.key }, [
278
+ u(ee, {
279
+ heading: e.label,
280
+ html: e.html,
281
+ dir: v(N)
282
+ }, null, 8, [
283
+ "heading",
284
+ "html",
285
+ "dir"
286
+ ]),
287
+ X.value && qe.value && e.key === Y.value ? (p(), o(Ae, {
288
+ key: 0,
289
+ html: X.value.html,
290
+ dir: v(N)
291
+ }, null, 8, ["html", "dir"])) : s("", !0),
292
+ g(a.$slots, `after-${e.key}`, se({ ref_for: !0 }, W.value))
293
+ ], 64))), 128)),
294
+ g(a.$slots, "after-sheet", f(d(W.value))),
295
+ u(e, {
296
+ credits: tt.value,
297
+ "working-number": nt.value,
298
+ "working-number-label": G(k.value.workingNumberLabel ?? "sheet.field.workingNumber"),
299
+ citation: at.value,
300
+ "citation-html": it.value,
301
+ "citation-heading": k.value.citation?.heading ? G(k.value.citation.heading) : ""
302
+ }, null, 8, [
303
+ "credits",
304
+ "working-number",
305
+ "working-number-label",
306
+ "citation",
307
+ "citation-html",
308
+ "citation-heading"
309
+ ]),
310
+ g(a.$slots, "source", f(d(W.value)), () => [u(r)]),
311
+ g(a.$slots, "related", f(d({
312
+ ...W.value,
313
+ records: $.value,
314
+ outside: v(Z).outside
315
+ })), () => [Q.value ? (p(), o(te, {
316
+ key: 0,
317
+ heading: v(b)(Q.value.heading ?? "record.related.items"),
318
+ records: $.value,
319
+ variant: Q.value.variant ?? "list",
320
+ "action-label": Q.value.actionLabel ? v(b)(Q.value.actionLabel) : ""
321
+ }, null, 8, [
322
+ "heading",
323
+ "records",
324
+ "variant",
325
+ "action-label"
326
+ ])) : s("", !0)])
327
+ ]), a.$slots.aside ? (p(), c("aside", Fe, [g(a.$slots, "aside", f(d({
328
+ ...W.value,
329
+ records: $.value,
330
+ outside: v(Z).outside
331
+ })))])) : s("", !0)]),
332
+ g(a.$slots, "after", f(d(W.value))),
333
+ u(re, {
334
+ term: v(B),
335
+ html: Ke.value,
336
+ dir: v(N),
337
+ onClose: v(Ge)
338
+ }, null, 8, [
339
+ "term",
340
+ "html",
341
+ "dir",
342
+ "onClose"
343
+ ])
344
+ ], 2)) : (p(), c("p", Ie, _(v(b)("core.status.loading")), 1));
345
+ }
346
+ };
347
+ //#endregion
348
+ export { E as n, D as t };
package/dist/content.js CHANGED
@@ -2,6 +2,6 @@ import { t as e } from "./FeaturedRecord-CTqnQFox.js";
2
2
  import { a as t, c as n, i as r, l as i, n as a, o, r as s, s as c, t as l, u } from "./PartnerMap-BIKd-AGP.js";
3
3
  import { a as d, i as f, n as p, o as m, r as h, s as g, t as _ } from "./TimelineEventList-CTJJOWGh.js";
4
4
  import { t as v } from "./GlossaryPopover-B7E6BsjS.js";
5
- import { a as y, i as b, n as x, o as S, r as C, s as w, t as T } from "./OnDisplayIn-DPRwCoYO.js";
5
+ import { a as y, i as b, n as x, o as S, r as C, s as w, t as T } from "./OnDisplayIn-DZHRKjL0.js";
6
6
  import { t as E } from "./content-PQeMx8U5.js";
7
7
  export { w as BackLink, b as DynastyList, y as DynastyPopout, d as FacetSelect, e as FeaturedRecord, f as FilterPanel, v as GlossaryPopover, S as GlossaryTool, a as MediaGallery, T as OnDisplayIn, m as Pagination, l as PartnerMap, p as PartnerPanel, t as RecordCredits, i as RecordGrid, n as RecordLanguages, u as RecordList, c as RecordSheet, x as RelatedMedia, s as RelatedRecords, h as ResultsSummary, g as SectionCards, o as SheetSection, r as SourceCredit, E as SpecialFeatures, _ as TimelineEventList, C as TimelineLookup };