import{A as W}from"./Anchor-marHyV97.js";import{_ as B,I as it,u as nt}from"./ImageViewer-ChivyoqU.js";import{cd as w,aX as y,aK as n,u as c,s as d,F as $,H as j,b9 as h,t as u,bH as s,I as o,ci as l,v as I,ch as g,aW as V,co as R,aV as T,av as J,cl as Q,at as st,au as rt,a4 as ot,ar as _t,cg as U,aS as q,af as Y,aC as z,bC as G,bi as Z,cm as ct,cn as lt,cp as dt,cj as ut,cs as mt,aQ as ht,q as ft}from"./index-DhjTmrEH.js";import{P as pt,F as K}from"./PlaceHolderImage-C01akGGw.js";import{L as bt}from"./LoadingSpinner-CcBTGWGa.js";import{a as E,c as v}from"./triplestore-sdYc2Txr.js";import{r as yt}from"./relationship_base-DFa1AHeT.js";import{V as gt}from"./ChildTreeSearchButton-DcejRHJf.js";const Pt={name:"FormatedLink",components:{Anchor:W},props:{data:{type:Object,default:()=>{}},textAsLink:{type:Boolean,default:!1},anchorText:{type:String,default:""}},data:function(){return{sources:["descr_link","state_link"]}},computed:{intended:function(){return"px-"+(2+this.intend)},anchor_label:function(){return this.anchorText?this.anchorText:this.data.alt?this.data.alt:this.data.name?this.data.name:this.host(this.data.uri)},has_plain_text:function(){return this.anchorText||this.data.descr},plain_text:function(){return this.anchorText?this.anchorText:this.data.descr?this.data.descr:""},has_something_to_show:function(){return this.data&&this.data.uri||this.anchorText||this.data.descr}},methods:{host:function(t){return new URL(t).hostname}}},It={key:0,class:"not_formated_link"};function jt(t,e,a,r,i,_){const m=y("Anchor");return _.has_something_to_show?(n(),c("span",It,[a.data&&a.data.uri?(n(),d(m,{key:0,text:_.anchor_label,url:a.data.uri,"text-as-link":a.textAsLink},null,8,["text","url","text-as-link"])):_.has_plain_text?(n(),c($,{key:1},[j(h(_.plain_text),1)],64)):u("",!0)])):u("",!0)}const M=w(Pt,[["render",jt]]),kt={components:{FormatedLink:M,Dating:B},props:{data:{type:Object,default:()=>{}},headline:{type:String,default:"legal_status.record"},cols:{type:Array,default:()=>[]},isEditor:{type:Boolean,default:!1},useDefaultLicense:{type:Boolean,default:!1},noLicense:{type:Boolean,default:!1},isCreation:{type:Boolean,default:!1}},data(){return{default_license:{name:"CC BY-NC-SA 4.0",uri:"http://creativecommons.org/licenses/by-nc-sa/4.0"}}},computed:{label_person(){return this.isEditor?"legal_status.editor":"legal_status.rightholder"},label_dating(){return this.isCreation?"legal_status.created":"legal_status.dating"},license_link(){if(this.data&&this.data.license){if(this.data.license.uri)return this.data.license;if(typeof this.data.license=="string")return{name:this.data.license,uri:""}}return{name:"",uri:""}}}},Et={key:0,class:"legal-status"};function Ot(t,e,a,r,i,_){const m=y("FormatedLink"),p=y("Dating");return a.data?(n(),c("div",Et,[a.headline?(n(),d(g,{key:0,dense:"",align:"center"},{default:s(()=>[o(l,null,{default:s(()=>[I("h5",null,h(t.$t(a.headline)),1)]),_:1})]),_:1})):u("",!0),a.data.rightholder?(n(),d(g,{key:1,dense:"",align:"center"},{default:s(()=>[o(l,{cols:a.cols[0]},{default:s(()=>[I("h5",null,h(t.$t(_.label_person))+":",1)]),_:1},8,["cols"]),o(l,{cols:a.cols[1]},{default:s(()=>[j(h(a.data.rightholder),1)]),_:1},8,["cols"])]),_:1})):u("",!0),a.data.credit_line?(n(),d(g,{key:2,dense:"",align:"center"},{default:s(()=>[o(l,{cols:a.cols[0]},{default:s(()=>[I("h5",null,h(t.$t("legal_status.credits"))+":",1)]),_:1},8,["cols"]),o(l,{cols:a.cols[1]},{default:s(()=>[j(h(a.data.credit_line),1)]),_:1},8,["cols"])]),_:1})):u("",!0),a.data.link?(n(),d(g,{key:3,dense:"",align:"center"},{default:s(()=>[o(l,{cols:a.cols[0]},{default:s(()=>[I("h5",null,h(t.$t("legal_status.link"))+":",1)]),_:1},8,["cols"]),o(l,{cols:a.cols[1]},{default:s(()=>[o(m,{data:a.data.link,"text-as-link":""},null,8,["data"])]),_:1},8,["cols"])]),_:1})):u("",!0),a.data.dating?(n(),d(g,{key:4,dense:"",align:"center"},{default:s(()=>[o(l,{cols:a.cols[0]},{default:s(()=>[I("h5",null,h(t.$t(_.label_dating))+":",1)]),_:1},8,["cols"]),o(l,{cols:a.cols[1]},{default:s(()=>[o(p,{data:a.data.dating},null,8,["data"])]),_:1},8,["cols"])]),_:1})):u("",!0),a.data.note?(n(),d(g,{key:5,dense:"",align:"center"},{default:s(()=>[o(l,{cols:a.cols[0]},{default:s(()=>[I("h5",null,h(t.$t("legal_status.changes"))+":",1)]),_:1},8,["cols"]),o(l,{cols:a.cols[1]},{default:s(()=>[j(h(a.data.note),1)]),_:1},8,["cols"])]),_:1})):u("",!0),a.data.license&&!a.noLicense?(n(),d(g,{key:6,dense:"",align:"center"},{default:s(()=>[o(l,{cols:a.cols[0]},{default:s(()=>[I("h5",null,h(t.$t("legal_status.license"))+":",1)]),_:1},8,["cols"]),a.useDefaultLicense?a.useDefaultLicense?(n(),d(l,{key:1,cols:a.cols[1]},{default:s(()=>[o(m,{data:i.default_license,"anchor-text":i.default_license.name},null,8,["data","anchor-text"])]),_:1},8,["cols"])):u("",!0):(n(),d(l,{key:0,cols:a.cols[1]},{default:s(()=>[o(m,{data:_.license_link,"anchor-text":_.license_link.name},null,8,["data","anchor-text"])]),_:1},8,["cols"]))]),_:1})):u("",!0)])):u("",!0)}const tt=w(kt,[["render",Ot],["__scopeId","data-v-229957c7"]]),O=` BASE <https://db.antiquitatum-thesaurus.eu> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX crm: <http://www.cidoc-crm.org/cidoc-crm/> PREFIX owl: <http://www.w3.org/2002/07/owl#> PREFIX at: <https://db.antiquitatum-thesaurus.eu/ontology/> PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> `,A={async object_exists(t){let e=` ${O} ASK { <object/${t}> a crm:E24_Physical_Human-Made_Thing } `;return{exists:(await E(e)).boolean||!1}},async has_bibliography(t){let e=` ${O} ASK { <object/${t}> crm:P01i_is_domain_of / crm:P67.1_has_type <type/bibliographic_reference> . } `;return{exists:(await E(e)).boolean||!1}},async has_external_references(t){let e=` ${O} ASK { <object/${t}> crm:P01i_is_domain_of / crm:P67.1_has_type <type/external_reference> . } `;return{exists:(await E(e)).boolean||!1}},async has_base_facts(t){let e=` ${O} ASK { VALUES ?o { <object/${t}> } { ?o crm:P2_has_type ?x } UNION { ?o crm:P128_carries ?x } UNION { ?o crm:P67i_is_referred_to_by ?x . ?o crm:P2_has_type <type/description> . } UNION { ?o crm:P45_consists_of ?x . } UNION { ?o crm:P44_has_condition ?x .} UNION { ?o crm:P39i_was_measured_by ?x .} } `;return{exists:(await E(e)).boolean||!1}},async is_deleted(t){let e=` ${O} ASK { <object/${t}> crm:P67i_is_referred_to_by / crm:P93i_was_taken_out_of_existence_by / crm:P2_has_type <type/deleting> } `;return{is_deleted:(await E(e)).boolean||!1}},async load_forward_id_if_exists(t,e){let a=` ${O} PREFIX dcterms: <http://purl.org/dc/terms/> SELECT ?fwd_id WHERE { <object/${t}> crm:P67i_is_referred_to_by / crm:P93i_was_taken_out_of_existence_by / dcterms:isReplacedBy ?fwd_id . } `;try{let r=await E(a,e);return v(r,{forward_iri:"fwd_id"})}catch(r){if(r.name=="AbortError")return null;throw r}},async get_title(t,e,a){let r=` ${O} SELECT DISTINCT * WHERE { BIND (${t} as ?id) # title <object/${t}> crm:P1_is_identified_by ?title . ?title a crm:E41_Appellation . ?title crm:P190_has_symbolic_content ?title_text . ?title crm:P2_has_type ?title_type . ?title_type rdfs:label ?title_type_label . FILTER (lang(?title_type_label) = "${e}") OPTIONAL { ?title crm:P141i_was_assigned_by / crm:P16_used_specific_object / crm:P1_is_identified_by / crm:P190_has_symbolic_content ?source . } }`;try{let i=await E(r,{signal:a});return v(i,{id:"id",title:[{value:"title_text",type:"title_type",type_label:"title_type_label",sources:[{name:"source"}]}]})}catch(i){if(i.name=="AbortError")return null;throw i}},async get_preferred_title(t,e,a){var i;let r=` ${O} SELECT DISTINCT ?title_text WHERE { <object/${t}> crm:P1_is_identified_by ?title . ?title crm:P2_has_type <type/preferred_title> . ?title crm:P190_has_symbolic_content ?title_text . FILTER (lang(?title_text) = "${e}") }`;try{return(i=(await E(r,{signal:a})).results.bindings[0])==null?void 0:i.title_text.value}catch(_){if(_.name=="AbortError")return null;throw _}},async get_custody(t,e,a){let r=` ${O} SELECT DISTINCT ?id ?acqui_type ?location_name ?acqui_custody_gnd ?acqui_custody ?acqui_dating_begin ?acqui_dating_end ?acqui_date_note ?acqui_context ?inv_no_id ?inv_no WHERE { BIND (${t} as ?id) # acquisition <object/${t}> crm:P30i_custody_transferred_through ?custody_transfer . ?custody_transfer crm:P2_has_type <type/acquisition> . ?custody_transfer crm:P29_custody_received_by ?acqui_custody . ?acqui_custody crm:P1_is_identified_by / crm:P190_has_symbolic_content ?location_name . OPTIONAL { ?acqui_custody owl:sameAs ?acqui_custody_gnd . } OPTIONAL { ?custody_transfer crm:P2_has_type ?t . ?t rdfs:label ?acqui_type . FILTER NOT EXISTS {?t owl:sameAs ?x} FILTER (lang(?acqui_type) = "${e}") } OPTIONAL { ?custody_transfer crm:P4_has_time-span ?time_span . ?time_span crm:P82a_begin_of_the_beginning ?acqui_dating_begin . ?time_span crm:P82b_end_of_the_end ?acqui_dating_end . } OPTIONAL { ?custody_transfer crm:P4_has_time-span / crm:P3_has_note ?acqui_date_note . } OPTIONAL{ ?custody_transfer crm:P3_has_note ?acqui_context . } }`;try{let i=await E(r,{signal:a});return v(i,{id:"id",custody:{type:"acqui_type",location:{name:"location_name",iri:"acqui_custody",gnd:"acqui_custody_gnd"},dating:{from_date:"acqui_dating_begin",to_date:"acqui_dating_end",text:"acqui_date_note"},note:"acqui_context"}})}catch(i){if(i.name=="AbortError")return null;throw i}},async get_provenances(t,e){let a=` ${O} SELECT ?id ?prov ?prov_note ?place ?place_name ?place_gnd ?custodian_name ?custodian ?custodian_type ?custodian_gnd ?dating WHERE { BIND (${t} as ?id) <object/${t}> crm:P30i_custody_transferred_through ?prov . ?prov crm:P2_has_type <type/provenance> . OPTIONAL { ?prov crm:P3_has_note ?prov_note . } OPTIONAL { ?prov crm:P9_consists_of ?move . ?move crm:P26_moved_to|crm:P27_moved_from ?place . ?place crm:P1_is_identified_by / crm:P190_has_symbolic_content ?place_name . OPTIONAL { ?place owl:sameAs ?place_gnd . } } OPTIONAL { ?prov crm:P29_custody_received_by|crm:P28_custody_surrendered_by ?custodian . ?custodian a ?crm_type . BIND( if( ?crm_type = crm:E21_Person, "person", "actor") as ?custodian_type ) . ?custodian crm:P1_is_identified_by / crm:P190_has_symbolic_content ?custodian_name . OPTIONAL { ?custodian owl:sameAs ?custodian_gnd . } } OPTIONAL { ?prov crm:P175_starts_before_or_with_the_start_of|crm:P175i_starts_after_or_with_the_start_of ?prov_date . ?prov_date crm:P4_has_time-span / crm:P82a_begin_of_the_beginning ?dating } } ORDER BY ?dating `;try{let r=await E(a,{signal:e});return v(r,{id:"id",provenances:[{iri:"prov",note:"prov_note",place:{iri:"place",name:"place_name",gnd:"place_gnd"},custodian:{name:"custodian_name",type:"custodian_type",iri:"custodian",gnd:"custodian_gnd"},dating:{from_date:"dating",to_date:"dating"}}]})}catch(r){if(r.name=="AbortError")return null;throw r}},async get_inventory_no(t,e){let a=` ${O} SELECT ?pref_inv_no ?inv_no_id ?inv_no WHERE { <object/${t}> crm:P48_has_preferred_identifier ?pref_inv_no_id . ?pref_inv_no_id a crm:E42_Identifier . ?pref_inv_no_id crm:P190_has_symbolic_content ?pref_inv_no . OPTIONAL { <object/${t}> crm:P1_is_identified_by ?inv_no_id . ?inv_no_id a crm:E42_Identifier . ?inv_no_id crm:P190_has_symbolic_content ?inv_no . } }`;try{let r=await E(a,{signal:e});return v(r,{cur_inv_no:"pref_inv_no",old_inv_nos:[{inv_id:"inv_no_id",inv_no:"inv_no"}]})}catch(r){if(r.name=="AbortError")return null;throw r}},async get_location(t,e){let a=` ${O} SELECT DISTINCT ?id ?location ?location_name ?location_gnd WHERE { BIND (${t} as ?id) # location <object/${t}> crm:P55_has_current_location ?location . ?location crm:P1_is_identified_by / crm:P190_has_symbolic_content ?location_name . OPTIONAL { ?location owl:sameAs ?location_gnd . } }`;try{let r=await E(a,{signal:e});return v(r,{id:"id",location:{iri:"location",name:"location_name",gnd:"location_gnd"}})}catch(r){if(r.name=="AbortError")return null;throw r}},async get_production(t,e,a){let r=` ${O} SELECT DISTINCT ?id ?prod_note ?date_from ?date_to ?date_note ?artist ?artist_name ?artist_attribution_label ?artist_role ?artist_gnd ?place ?place_name ?place_gnd ?prod_technique_name ?prod_technique_gnd ?commission_date_from ?commission_date_to ?commission_date_note ?commissioner ?commissioner_name ?commissioner_gnd ?commission_note ?technic WHERE { BIND (${t} as ?id) # production <object/${t}> crm:P108i_was_produced_by ?production . OPTIONAL { ?production crm:P3_has_note ?prod_note . } OPTIONAL { ?production crm:P4_has_time-span / crm:P82a_begin_of_the_beginning ?date_from . ?production crm:P4_has_time-span / crm:P82b_end_of_the_end ?date_to . } OPTIONAL { ?production crm:P4_has_time-span / crm:P3_has_note ?date_note . } OPTIONAL { ?production crm:P01i_is_domain_of ?artist_in_role . ?artist_in_role crm:P02_has_range ?artist . ?artist crm:P1_is_identified_by / crm:P190_has_symbolic_content ?artist_name . ?artist_in_role crm:P14.1_in_the_role_of / rdfs:label ?artist_role . FILTER (lang(?artist_role) = "${e}") OPTIONAL { ?artist owl:sameAs ?artist_gnd . } OPTIONAL { ?artist crm:P141i_was_assigned_by ?assessment . ?assessment crm:P140_assigned_attribute_to ?production ; crm:P2_has_type / rdfs:label ?artist_attribution_label . FILTER (lang(?artist_attribution_label) = "${e}") } } OPTIONAL { ?production crm:P7_took_place_at ?place . ?place crm:P1_is_identified_by / crm:P190_has_symbolic_content ?place_name . OPTIONAL { ?place owl:sameAs ?place_gnd . } } OPTIONAL { ?production crm:P32_used_general_technique ?technic . ?technic rdfs:label ?prod_technique_name . OPTIONAL { ?technic owl:sameAs ?prod_technique_gnd . } FILTER (lang(?prod_technique_name) = "${e}") } OPTIONAL { ?production crm:P17_was_motivated_by ?motivation . OPTIONAL { ?motivation crm:P3_has_note ?commission_note . } OPTIONAL { ?motivation crm:P01i_is_domain_of / crm:P02_has_range ?commissioner . ?commissioner crm:P1_is_identified_by / crm:P190_has_symbolic_content ?commissioner_name . ?commissioner owl:sameAs ?commissioner_gnd . } OPTIONAL { ?motivation crm:P4_has_time-span / crm:P82a_begin_of_the_beginning ?commission_date_from . ?motivation crm:P4_has_time-span / crm:P82b_end_of_the_end ?commission_date_to . } OPTIONAL { ?motivation crm:P4_has_time-span / crm:P3_has_note ?commission_date_note . } } }`;try{let i=await E(r,{signal:a});return v(i,{id:"id",production:{prod_note:"prod_note",dating:{from_date:"date_from",to_date:"date_to",text:"date_note"},artists:[{iri:"artist",name:"artist_name",role:"artist_role",attribution:"artist_attribution_label",gnd:"artist_gnd"}],locations:[{iri:"place",name:"place_name",gnd:"place_gnd"}],technics:[{iri:"technic",name:"prod_technique_name",gnd:"prod_technique_gnd"}],commission:{dating:{from_date:"commission_date_from",to_date:"commission_date_to",text:"commission_date_note"},commissioner:[{iri:"commissioner",name:"commissioner_name",gnd:"commissioner_gnd"}],note:"commission_note"}}})}catch(i){if(i.name=="AbortError")return null;throw i}},async get_depiction_method(t,e,a){let r=` ${O} SELECT DISTINCT ?mode ?mode_label WHERE { <object/${t}> crm:P01i_is_domain_of ?depicts . ?depicts a crm:PC62_depicts . ?depicts crm:P62.1_mode_of_depiction ?mode . ?mode rdfs:label ?mode_label . FILTER (lang(?mode_label) = "${e}") } ORDER BY ?mode_label`;try{let i=await E(r,{signal:a});const _=v(i,{modes:[{iri:"mode",name:"mode_label"}]});return _.id=t,_}catch(i){if(i.name=="AbortError")return null;throw i}},async get_depiction_content(t,e,a){let r=` ${O} SELECT DISTINCT * WHERE { <object/${t}> crm:P62_depicts ?depiction . ?depiction a ?type_of_depicted_object . ?depiction crm:P1_is_identified_by / crm:P190_has_symbolic_content ?depicted_object_name . OPTIONAL { ?depiction owl:sameAs ?gnd } }`;try{let i=await E(r,{signal:a});const _=v(i,{depictions:[{iri:"depiction",gnd:"gnd",type:"type_of_depicted_object",name:"depicted_object_name"}]});return _.id=t,_}catch(i){if(i.name=="AbortError")return null;throw i}},async get_materials(t,e,a){let r=` ${O} SELECT DISTINCT ?id ?mat_label ?mat_gnd ?material WHERE { BIND (${t} as ?id) # material <object/${t}> crm:P45_consists_of ?material . ?material rdfs:label ?mat_label . FILTER (lang(?mat_label) = "${e}") OPTIONAL { ?material owl:sameAs ?mat_gnd } }`;try{let i=await E(r,{signal:a});return v(i,{id:"id",materials:[{iri:"material",name:"mat_label",gnd:"mat_gnd"}]})}catch(i){if(i.name=="AbortError")return null;throw i}},async get_descriptions(t,e,a="description",r){let i=` ${O} SELECT ?id ?type_label ?comment ?comment_lang ?name_label ?url WHERE { BIND (${t} as ?id) <object/${t}/${a}> crm:P2_has_type / rdfs:label ?type_label . FILTER (lang(?type_label) = "${e}") <object/${t}/${a}> crm:P190_has_symbolic_content ?comment . BIND(lang(?comment) AS ?comment_lang) OPTIONAL { <object/${t}/${a}> crm:P141i_was_assigned_by / crm:P16_used_specific_object ?source_base . BIND(IRI(CONCAT(STR(?source_base), '/name')) AS ?name_iri) BIND(IRI(CONCAT(STR(?source_base), '/url')) AS ?url_iri) OPTIONAL { ?name_iri crm:P190_has_symbolic_content ?name_label . } OPTIONAL { ?url_iri crm:P190_has_symbolic_content ?url . } } }`;try{let _=await E(i,{signal:r});return v(_,{id:"id",descriptions:[{type:"type_label",note:"comment",language:"comment_lang",assignments:[{name:"name_label",link:{uri:"url"}}]}]})}catch(_){if(_.name=="AbortError")return null;throw _}},async get_condition(t,e,a){let r=` ${O} SELECT DISTINCT ?id ?condition ?condition_source ?web_link_text ?web_link_url WHERE { BIND (${t} as ?id) # condition <object/${t}/condition> crm:P3_has_note ?condition . FILTER (lang(?condition) = "${e}") OPTIONAL { <object/${t}/condition/assessment> crm:P3_has_note ?condition_source . } OPTIONAL { <object/${t}/condition/assessment/reference/name> crm:P190_has_symbolic_content ?web_link_text . <object/${t}/condition/assessment/reference/url> crm:P190_has_symbolic_content ?web_link_url . } }`;try{let i=await E(r,{signal:a});return v(i,{id:"id",condition:{note:"condition",source_note:"condition_source",source:{name:"web_link_text",uri:"web_link_url"}}})}catch(i){if(i.name=="AbortError")return null;throw i}},async get_measurements(t,e,a){let r=` ${O} SELECT ?id ?meas_id ?val ?unit_name ?symbol ?type_label ?dim_descr (GROUP_CONCAT(?note;SEPARATOR=",") AS ?notes) WHERE { BIND (${t} as ?id) <object/${t}> crm:P39i_was_measured_by ?meas . BIND (STRAFTER(STR(?meas), 'measurements/') as ?meas_id) ?meas crm:P40_observed_dimension ?dim . OPTIONAL { ?meas crm:P3_has_note ?note . } OPTIONAL { ?dim rdfs:label ?dim_descr . } OPTIONAL { ?dim crm:P90_has_value ?val . ?dim crm:P2_has_type / rdfs:label ?type_label . ?dim crm:P91_has_unit ?dim_unit . ?dim_unit rdfs:label ?unit_name . OPTIONAL { ?dim_unit crm:P48_has_preferred_identifier / crm:P190_has_symbolic_content ?symbol . } FILTER (lang(?unit_name) = "${e}") FILTER (lang(?type_label) = "${e}") } } GROUP BY ?meas_id ?type_label ?val ?unit_name ?symbol ?dim_descr ?id ORDER BY ?type_label`;try{let i=await E(r,{signal:a}),_=v(i,{id:"id",measurements:[{id:"meas_id",type:"type_label",value:"val",unit:"unit_name",unit_symbol:"symbol",descr:"dim_descr",notes:"notes"}]});if(!_.measurements)return _;let m=[];for(let p of _.measurements){let b=m.find(f=>f.id==p.id);b||(b={id:p.id,measures:[],notes:p.notes},m.push(b)),delete p.id,delete p.notes,b.measures.push({...p})}return _.measurements=m,_}catch(i){if(i.name=="AbortError")return null;throw i}},async get_inscriptions(t,e){let a=` ${O} SELECT ?id ?insc_text ?descr_note_text ?pos_note_text WHERE { BIND (${t} as ?id) # inscriptions <object/${t}> crm:P128_carries ?insc . ?insc crm:P190_has_symbolic_content ?insc_text . BIND(IRI(CONCAT(STR(?insc), '/description')) AS ?descr_note) BIND(IRI(CONCAT(STR(?insc), '/position')) AS ?pos_note) OPTIONAL{ ?descr_note crm:P190_has_symbolic_content ?descr_note_text . } OPTIONAL { ?pos_note crm:P190_has_symbolic_content ?pos_note_text . } }`;try{let r=await E(a,{signal:e});return v(r,{id:"id",inscriptions:[{text:"insc_text",descr_text:"descr_note_text",pos_text:"pos_note_text"}]})}catch(r){if(r.name=="AbortError")return null;throw r}},async get_types(t,e,a){let r=` ${O} SELECT DISTINCT ?id ?type ?type_label ?type_gnd ?type_type ?type_type_label WHERE { BIND (${t} as ?id) # types <object/${t}> crm:P2_has_type ?type . ?type rdfs:label ?type_label . ?type crm:P2_has_type ?type_type . OPTIONAL { ?type owl:sameAs ?type_gnd . } ?type_type rdfs:label ?type_type_label . FILTER (lang(?type_label) = "${e}") FILTER (lang(?type_type_label) = "${e}") FILTER(?type_type in (<type/classification>, <type/object_type>)) } ORDER BY ?type_type ?type_label`;try{let i=await E(r,{signal:a});return v(i,{id:"id",types:[{iri:"type",name:"type_label",gnd:"type_gnd",type_of_type_iri:"type_type",type_of_type:"type_type_label"}]})}catch(i){if(i.name=="AbortError")return null;throw i}},async get_modifications(t,e,a){let r=` ${O} SELECT DISTINCT ?id ?mod ?note ?date_from ?date_to ?date_note ?artist ?artist_name ?artist_role ?artist_gnd ?artist_attribution_label ?technique ?technique_name ?technique_gnd ?mat_label ?mat_gnd WHERE { BIND (${t} as ?id) # inscriptions <object/${t}> crm:P31i_was_modified_by ?mod . ?mod a crm:E11_Modification . OPTIONAL { ?mod crm:P4_has_time-span ?dating OPTIONAL { ?dating crm:P82a_begin_of_the_beginning ?date_from . ?dating crm:P82b_end_of_the_end ?date_to . } OPTIONAL { ?dating crm:P3_has_note ?date_note . } } OPTIONAL { ?mod crm:P3_has_note ?note FILTER (lang(?note) = "${e}") } OPTIONAL { ?mod crm:P01i_is_domain_of ?artist_in_role . ?artist_in_role crm:P02_has_range ?artist . ?artist crm:P1_is_identified_by / crm:P190_has_symbolic_content ?artist_name . ?artist_in_role crm:P14.1_in_the_role_of / rdfs:label ?artist_role . FILTER (lang(?artist_role) = "${e}") OPTIONAL { ?artist owl:sameAs ?artist_gnd } OPTIONAL { ?artist crm:P141i_was_assigned_by ?assessment . ?assessment crm:P140_assigned_attribute_to ?mod ; crm:P2_has_type / rdfs:label ?artist_attribution_label . FILTER (lang(?artist_attribution_label) = "${e}") } } OPTIONAL { ?mod crm:P32_used_general_technique ?technique . ?technique rdfs:label ?technique_name . FILTER (lang(?technique_name) = "${e}") OPTIONAL { ?technique owl:sameAs ?technique_gnd . } } OPTIONAL { ?mod crm:P126_employed ?material . ?material rdfs:label ?mat_label . FILTER (lang(?mat_label) = "${e}") OPTIONAL { ?material owl:sameAs ?mat_gnd } } }`;try{let i=await E(r,{signal:a});return v(i,{id:"id",modifications:[{id:"mod",note:"note",dating:{from_date:"date_from",to_date:"date_to",text:"date_note"},artists:[{iri:"artist",name:"artist_name",role:"artist_role",attribution:"artist_attribution_label",gnd:"artist_gnd"}],technics:[{iri:"technique",name:"technique_name",gnd:"technique_gnd"}],materials:[{iri:"material",name:"mat_label",gnd:"mat_gnd"}]}]})}catch(i){if(i.name=="AbortError")return null;throw i}},async get_find(t,e,a){let r=` ${O} SELECT DISTINCT ?id ?note ?date_from ?date_to ?date_note ?artist ?artist_name ?artist_role ?artist_gnd ?place ?place_name ?place_gnd WHERE { BIND (${t} as ?id) <object/${t}/find> a crm:S19_Encounter_Event . OPTIONAL { <object/${t}/find> crm:P3_has_note ?note . } OPTIONAL { <object/${t}/find> crm:P7_took_place_at ?place . ?place crm:P1_is_identified_by / crm:P190_has_symbolic_content ?place_name . OPTIONAL { ?place owl:sameAs ?place_gnd . } } OPTIONAL { <object/${t}/find/dating> crm:P82a_begin_of_the_beginning ?date_from . <object/${t}/find/dating> crm:P82b_end_of_the_end ?date_to . } OPTIONAL { <object/${t}/find/dating> crm:P3_has_note ?date_note . } OPTIONAL { <object/${t}/find> crm:P01i_is_domain_of ?artist_in_role . ?artist_in_role crm:P02_has_range ?artist . ?artist crm:P1_is_identified_by / crm:P190_has_symbolic_content ?artist_name . ?artist_in_role crm:P14.1_in_the_role_of / rdfs:label ?artist_role . FILTER (lang(?artist_role) = "${e}") OPTIONAL { ?artist owl:sameAs ?artist_gnd . } } }`;try{let i=await E(r,{signal:a});return v(i,{id:"id",find:{note:"note",dating:{from_date:"date_from",to_date:"date_to",text:"date_note"},artists:[{iri:"artist",name:"artist_name",role:"artist_role",gnd:"artist_gnd"}],location:{iri:"place",name:"place_name",gnd:"place_gnd"}}})}catch(i){if(i.name=="AbortError")return null;throw i}},async get_external_reference(t,e,a){let r=` ${O} SELECT DISTINCT ?id ?type_label ?link ?note WHERE { BIND (${t} as ?id) <object/${t}> crm:P01i_is_domain_of ?domain . ?domain crm:P67.1_has_type <type/external_reference> . ?domain crm:P02_has_range ?external_ref . ?external_ref crm:P190_has_symbolic_content ?link . ?external_ref crm:P3_has_note ?note . ?external_ref crm:P2_has_type / rdfs:label ?type_label . FILTER (lang(?type_label) = "${e}") }`;try{let i=await E(r,{signal:a});return v(i,{id:"id",references:[{ref_type:"type_label",ref_source:"note",ref_link:"link"}]})}catch(i){if(i.name=="AbortError")return null;throw i}},async get_bibliographic_reference(t,e){let a=` ${O} SELECT DISTINCT ?id ?link ?bib_citation ?bib_note ?access_date WHERE { BIND (${t} as ?id) <object/${t}> crm:P01i_is_domain_of ?domain . ?domain crm:P67.1_has_type <type/bibliographic_reference> . ?domain crm:P02_has_range ?bib_ref . OPTIONAL { ?bib_ref crm:P48_has_preferred_identifier ?pref_id . ?pref_id crm:P190_has_symbolic_content ?link . OPTIONAL { ?pref_id crm:P3_has_note ?bib_citation . } } OPTIONAL { ?bib_ref crm:P3_has_note ?bib_note . } OPTIONAL { ?bib_ref crm:P94i_was_created_by / crm:P4_has_time_span / crm:P82_at_some_time_within ?access_date .} } ORDER BY ?bib_ref ?bib_citation ?bib_note`;try{let r=await E(a,{signal:e});return v(r,{id:"id",bib_refs:[{bib_ref_note:"bib_note",access_date:{from:"access_date"},citation:"bib_citation",link:{uri:"link"}}]})}catch(r){if(r.name=="AbortError")return null;throw r}},async get_dating_for_object(t,e){const a=` ${O} SELECT ?obj ?date_from ?date_to (count(?mid) as ?distance) { VALUES ?obj {<${t}>} { ?obj crm:P108i_was_produced_by / crm:P4_has_time-span ?time . ?time crm:P82a_begin_of_the_beginning ?date_from ; crm:P82b_end_of_the_end ?date_to . } UNION { ?obj crm:P46i_forms_part_of* ?mid . ?mid crm:P46i_forms_part_of+ ?final . ?final crm:P108i_was_produced_by / crm:P4_has_time-span ?time . ?time crm:P82a_begin_of_the_beginning ?date_from; crm:P82b_end_of_the_end ?date_to . } } GROUP BY ?time ?date_from ?date_to ?obj ORDER BY ?distance LIMIT 1 `;try{let r=await E(a,{signal:e});const i=v(r,{dating:{from:"date_from",to:"date_to"}});return i.obj=t,i}catch(r){if(r.name=="AbortError")return null;throw r}},async _get_internal_relations_base(t,e,a,r="?title"){let i=` ${O} SELECT ?id ?obj WHERE { VALUES (?id ?root) { (${t} <object/${t}> )} ${a} ?obj crm:P1_is_identified_by ?title_iri . ?title_iri crm:P2_has_type <type/preferred_title> ; crm:P190_has_symbolic_content ?title . } ORDER BY ${r} `;try{let _=await E(i,{signal:e});return v(_,{id:"id",relations:[{obj:"obj"}]})}catch(_){if(_.name=="AbortError")return null;throw _}},get_relationship_query(t){return yt.get_relation(t,"?root","?obj")},_get_relations_core(t,e,a){const r=this.get_relationship_query(a);return this._get_internal_relations_base(t,e,r)},async get_depicted_relations(t,e){const a=this.get_relationship_query("is_depicted_in");return this._get_internal_relations_base(t,e,`{ ${a} OPTIONAL { ?obj at:is_part_of_source_work / crm:P1_is_identified_by ?source_title_iri . ?source_title_iri crm:P2_has_type <type/preferred_title> ; crm:P190_has_symbolic_content ?source_title . } }`,"?source_title ?title")},async get_depicts_relations(t,e){return this._get_relations_core(t,e,"depicts")},async get_duplicate_relations(t,e){return this._get_relations_core(t,e,"is_duplicate_of")},async get_has_version_relations(t,e){return this._get_relations_core(t,e,"has_version")},async get_is_version_of_relations(t,e){return this._get_relations_core(t,e,"is_version_of")},async get_has_copy_relations(t,e){return this._get_relations_core(t,e,"has_copy")},async get_was_precursor_relations(t,e){return this._get_relations_core(t,e,"is_precursor_for")},async get_is_copy_after_relations(t,e){return this._get_relations_core(t,e,"is_copy_after")},async get_has_precursor_relations(t,e){return this._get_relations_core(t,e,"is_precursor_for")},async get_related_to_relations(t,e){return this._get_relations_core(t,e,"is_related_to")},async has_children(t,e){let a=` ${O} ASK { <object/${t}> crm:P46_is_composed_of ?part . } `;try{let r=await E(a,{signal:e});return{id:t,children:r.boolean||!1}}catch(r){if(r.name=="AbortError")return null;throw r}},async get_thumbnails(t,e){let a=` ${O} SELECT ?thumbnail_urls WHERE { <object/${t}> crm:P138i_has_representation / crm:P165i_is_incorporated_in ?image . ?image crm:P2_has_type <type/thumbnail> . ?image crm:P1_is_identified_by / crm:P190_has_symbolic_content ?thumbnail_urls . } `;try{let r=await E(a,{signal:e});return v(r,{thumbnails:[{url:"thumbnail_urls"}]})}catch(r){if(r.name=="AbortError")return null;throw r}},async get_siblings(t,e){let a=` ${O} SELECT ?id ?children_of_father ?title ?sort_title_num WHERE { VALUES ?object { <object/${t}> } ?object crm:P46i_forms_part_of ?father . ?father crm:P46_is_composed_of ?children_of_father . ?children_of_father crm:P1_is_identified_by ?title_iri . ?title_iri crm:P2_has_type <type/preferred_title> . ?title_iri crm:P190_has_symbolic_content ?title . BIND(REPLACE(?title, "[^\\\\d+*]", "") AS ?sort_title_num) BIND(STRAFTER(STR(?children_of_father), "object/") as ?id) OPTIONAL { ?children_of_father crm:P46_is_composed_of+ ?sub_part . ?sub_part crm:P1_is_identified_by ?sub_title_iri . ?sub_title_iri crm:P2_has_type <type/preferred_title> . ?sub_title_iri crm:P190_has_symbolic_content ?sub_title . } } GROUP BY ?id ?children_of_father ?title ?sort_title_num ORDER BY ?sort_title_num ?title ?sub_title `;try{let r=await E(a,{signal:e});return v(r,{siblings:[{id:"id",iri:"children_of_father",title:"title"}]})}catch(r){if(r.name=="AbortError")return null;throw r}},async get_children(t,e){let a=` ${O} SELECT ?id ?part ?title ?sort_title_num (SAMPLE(?thumbnail_urls) as ?thumbnail) (isIRI(SAMPLE(?sub_part)) AS ?has_child) WHERE { BIND (${t} as ?id) <object/${t}> crm:P46_is_composed_of ?part . ?part crm:P1_is_identified_by ?title_iri . ?title_iri crm:P2_has_type <type/preferred_title> . ?title_iri crm:P190_has_symbolic_content ?title . BIND(REPLACE(?title, "[^\\\\d+*]", "") AS ?sort_title_num) OPTIONAL { ?part crm:P46_is_composed_of+ ?sub_part . ?sub_part crm:P1_is_identified_by ?sub_title_iri . ?sub_title_iri crm:P2_has_type <type/preferred_title> . ?sub_title_iri crm:P190_has_symbolic_content ?sub_title . } OPTIONAL { ?part crm:P138i_has_representation ?vi . ?vi at:has_sorting_index "1"^^xsd:int ; crm:P165i_is_incorporated_in ?image . ?image crm:P2_has_type <type/thumbnail> . ?image crm:P1_is_identified_by / crm:P190_has_symbolic_content ?thumbnail_urls . } } GROUP BY ?part ?title ?sort_title_num ?id ORDER BY ?sort_title_num ?title ?sub_title `;try{let r=await E(a,{signal:e});return v(r,{id:"id",children:[{iri:"part",title:"title",has_child:"has_child",images:[{url:"thumbnail"}]}]})}catch(r){if(r.name=="AbortError")return null;throw r}},async get_related_artefacts(t,e){let a=` ${O} SELECT DISTINCT ?id ?artefact WHERE { BIND (${t} as ?id) <object/${t}> crm:P46_is_composed_of+ ?part . ?part crm:P01i_is_domain_of ?depicts . ?depicts a crm:PC62_depicts . ?depicts crm:P02_has_range ?artefact . ?artefact a crm:E24_Physical_Human-Made_Thing . } `;try{let r=await E(a,{signal:e});return v(r,{id:"id",artefacts:["artefact"]})}catch(r){if(r.name=="AbortError")return null;throw r}},async get_cataloging_data(t,e){let a=` ${O} PREFIX dcterms: <http://purl.org/dc/terms/> SELECT ?id ?editor_name ?note ?dating ?license_name ?license_iri ?type WHERE { BIND (${t} as ?id) { <object/${t}/cataloging> crm:P94i_was_created_by ?cat . ?cat crm:P2_has_type <type/cataloging> . BIND('creation' as ?type) } UNION { <object/${t}/cataloging> crm:P140i_was_attributed_by ?cat . ?cat crm:P2_has_type <type/cataloging> . BIND('editing' as ?type) } UNION { <object/${t}/cataloging> crm:P93i_was_taken_out_of_existence_by ?cat . ?cat crm:P2_has_type <type/deleting> . BIND('deleted' as ?type) } ?cat crm:P01i_is_domain_of / crm:P02_has_range ?editors . ?editors crm:P1_is_identified_by / crm:P190_has_symbolic_content ?editor_name . OPTIONAL { ?cat crm:P3_has_note ?note . } OPTIONAL { ?cat crm:P4_has_time-span / crm:P82a_begin_of_the_beginning ?dating . } OPTIONAL { <object/${t}/cataloging/right> crm:P2_has_type / rdfs:label ?license_name . <object/${t}/cataloging/right> dcterms:license ?license_iri. } } ORDER BY ?dating `;try{let r=await E(a,{signal:e});return v(r,{id:"id",cataloging:[{rightholder:"editor_name",note:"note",dating:{from_date:"dating",to_date:"dating"},license:{name:"license_name",uri:"license_iri"}}]})}catch(r){if(r.name=="AbortError")return null;throw r}},async get_fallback_image(t,e){let a=` ${O} SELECT ?id ?fallback_image_url WHERE { VALUES (?id ?object ?digital_image_type) {(${t} <object/${t}> <type/digital_image>)} ?object crm:P138i_has_representation / crm:P165i_is_incorporated_in ?fallback . ?fallback crm:P2_has_type ?digital_image_type . ?fallback crm:P1_is_identified_by / crm:P190_has_symbolic_content ?fallback_image_url . } `;try{let r=await E(a,{signal:e});return v(r,{id:"id",fallback_url:"fallback_image_url"})}catch(r){if(r.name=="AbortError")return null;throw r}},async get_image_data(t,e){let a=` ${O} SELECT ?id ?image_url ?iiif_url ?rotation_value ?representation_id ?representation ?area_iri ?area_width_value ?area_height_value ?area_horizontal_offset_value ?area_vertical_offset_value ?area_rotation_value WHERE { VALUES (?id ?object ?digital_image_type) {(${t} <object/${t}> <type/digital_image>)} ?object crm:P138i_has_representation | crm:P138i_has_representation / crm:P106i_forms_part_of ?representation . OPTIONAL { ?object crm:P138i_has_representation / crm:P106i_forms_part_of ?base_representation . } FILTER (BOUND(?base_representation) = False || (?representation IN (?base_representation))) ?representation ^crm:P138i_has_representation ?representation_id . ?representation crm:P165i_is_incorporated_in ?digital_image . ?digital_image crm:P2_has_type ?digital_image_type . ?digital_image crm:P1_is_identified_by / crm:P190_has_symbolic_content ?image_url . OPTIONAL { ?representation crm:P165i_is_incorporated_in ?iiif_image . ?iiif_image crm:P2_has_type <type/iiif_image> . ?iiif_image crm:P1_is_identified_by / crm:P190_has_symbolic_content ?iiif_url . ?iiif_image crm:P43_has_dimension ?rotation . ?rotation crm:P2_has_type <type/rotation> . ?rotation crm:P90_has_value ?rotation_value . OPTIONAL { ?iiif_image crm:L50i_has_propagated_area ?area . ?area ^crm:P165i_is_incorporated_in / ^crm:P138i_has_representation ?area_iri . # area height ?area crm:P43_has_dimension ?area_height . ?area_height crm:P2_has_type <type/height> . ?area_height crm:P90_has_value ?area_height_value . # area width ?area crm:P43_has_dimension ?area_width . ?area_width crm:P2_has_type <type/width> . ?area_width crm:P90_has_value ?area_width_value . # area horizontal offset ?area crm:P43_has_dimension ?area_horizontal_offset . ?area_horizontal_offset crm:P2_has_type <type/horizontal_offset> . ?area_horizontal_offset crm:P90_has_value ?area_horizontal_offset_value . # area vertical offset ?area crm:P43_has_dimension ?area_vertical_offset . ?area_vertical_offset crm:P2_has_type <type/vertical_offset> . ?area_vertical_offset crm:P90_has_value ?area_vertical_offset_value . # area rotation ?area crm:P43_has_dimension ?area_rotation . ?area_rotation crm:P2_has_type <type/rotation> . ?area_rotation crm:P90_has_value ?area_rotation_value . } } } `;try{let r=await E(a,{signal:e}),i=v(r,{id:"id",images:[{image_url:"image_url",iiif_url:"iiif_url",rotation:"rotation_value",object_iri:"representation_id",image_iri:"representation",areas:[{area_iri:"area_iri",width:"area_width_value",height:"area_height_value",h_offset:"area_horizontal_offset_value",v_offset:"area_vertical_offset_value",rotation:"area_rotation_value"}]}]});if("images"in i){let _={};for(let m of i.images)m.image_url in _?_[m.image_url].areas.push(m.areas[0]):_[m.image_url]=m;return{id:i.id,images:Object.values(_)}}else return null}catch(r){if(r.name=="AbortError")return null;throw r}},async get_image_meta(t,e,a,r=null){let i=` ${O} SELECT ?id ?credit_line ?right_name ?artist_name ?artist_role ?artist_gnd_url ?perspective ?dating ?rightholder ?ref_name ?ref_url WHERE { BIND (${t} as ?id) OPTIONAL { <${e}> crm:P104_is_subject_to ?right . OPTIONAL { ?right crm:P3_has_note ?credit_line. } ?right crm:P2_has_type / rdfs:label ?right_name . OPTIONAL { ?right crm:P75i_is_possessed_by / crm:P1_is_identified_by / crm:P190_has_symbolic_content ?rightholder . } } OPTIONAL { <${e}> crm:P94i_was_created_by ?creation . ?creation crm:P01i_is_domain_of ?artist_in_role . ?artist_in_role crm:P02_has_range ?artist . OPTIONAL { ?artist owl:sameAs ?artist_gnd_url . } ?artist crm:P1_is_identified_by / crm:P190_has_symbolic_content ?artist_name . ?artist_in_role crm:P14.1_in_the_role_of / rdfs:label ?artist_role . FILTER (lang(?artist_role) = "${a}") OPTIONAL { ?creation crm:P4_has_time-span / crm:P82_at_some_time_within ?dating . } OPTIONAL { ?creation crm:P67i_is_referred_to_by ?reference . BIND( IRI(CONCAT(str(?reference), '/name' )) AS ?ref_name_iri ) BIND( IRI(CONCAT(str(?reference), '/url' )) AS ?ref_url_iri ) ?ref_name_iri crm:P190_has_symbolic_content ?ref_name . ?ref_url_iri crm:P190_has_symbolic_content ?ref_url . } } OPTIONAL { <${e}/perspective> crm:P190_has_symbolic_content ?perspective . } }`;try{let _=await E(i,{signal:r}),m=v(_,{id:"id",meta:{legal_status:{credit_line:"credit_line",license:"right_name",rightholder:"rightholder",dating:{from_date:"dating",to_date:"dating"},link:{name:"ref_name",uri:"ref_url"}},perspective:"perspective",artists:[{name:"artist_name",role:"artist_role",gnd:"artist_gnd_url"}]}});return JSON.stringify(m.meta)==JSON.stringify({artists:[]})?null:m}catch(_){if(_.name=="AbortError")return null;throw _}},async get_parents_path(t,e=null){let a=` ${O} SELECT ?id ?path_title ?parent_id (COUNT(?mid) as ?distance) WHERE { BIND (${t} as ?id) <object/${t}> crm:P46i_forms_part_of* ?mid . ?mid a crm:E24_Physical_Human-Made_Thing . ?mid crm:P46i_forms_part_of+ ?final . ?final a crm:E24_Physical_Human-Made_Thing . ?final crm:P1_is_identified_by ?title_path_iri . ?title_path_iri crm:P2_has_type <type/preferred_title> . ?title_path_iri crm:P190_has_symbolic_content ?path_title . BIND(STRAFTER( STR(?final), "object/" ) as ?parent_id) . } GROUP BY ?path_title ?parent_id ?id ORDER BY DESC(?distance)`;try{let r=await E(a,{signal:e});return v(r,{id:"id",path:[{title:"path_title",objectId:"parent_id"}]})}catch(r){if(r.name=="AbortError")return null;throw r}}},$t={components:{Anchor:W,Dating:B},props:{data:{type:Object,default:()=>{}},link:{type:Boolean,default:!0}},computed:{has_living_dates:function(){return"details"in this.data&&this.data.details&&("dateOfBirth"in this.data.details||"dateOfDeath"in this.data.details)}}},vt={key:0},Tt={key:0},wt={key:0},Lt={key:1},At={key:2};function Nt(t,e,a,r,i,_){const m=y("Dating"),p=y("Anchor");return a.data?(n(),c("span",vt,[V(t.$slots,"default"),_.has_living_dates?(n(),c("span",Tt,[e[0]||(e[0]=j(" ( ")),"dateOfBirth"in a.data.details?(n(),c("span",wt,[o(m,{data:{from_date:a.data.details.dateOfBirth},year_only:!0},null,8,["data"])])):u("",!0),"dateOfBirth"in a.data.details&&"dateOfDeath"in a.data.details?(n(),c("span",Lt,"–")):u("",!0),"dateOfDeath"in a.data.details?(n(),c("span",At,[o(m,{data:{from_date:a.data.details.dateOfDeath},year_only:!0},null,8,["data"])])):u("",!0),e[1]||(e[1]=j(" ) "))])):u("",!0),a.link&&a.data.uri?(n(),d(p,{key:1,url:a.data.uri,sup:""},{default:s(()=>e[2]||(e[2]=[j("GND")])),_:1},8,["url"])):u("",!0)])):u("",!0)}const Rt=w($t,[["render",Nt]]),xt={components:{LegalStatus:tt,ExternalResource:Rt},props:{iri:{type:String,default:""},objectId:{type:Number,default:0}},data(){return{meta_data:null}},watch:{iri(){this.reset_data(),this.load_from_ts()}},created(){this.load_from_ts()},methods:{load_from_ts(){this.iri&&A.get_image_meta(this.objectId,this.iri,this.$i18n.locale).then(t=>{t&&t.meta&&t.id==this.objectId&&(this.meta_data=t.meta)})},reset_data(){this.meta_data=null},artist_row_padding(t){return t+1<this.meta_data.artists.length||this.meta_data.legal_status?"":"pb-4"}}},St={key:0,class:"pa-3 pt-0 image-meta"};function Ct(t,e,a,r,i,_){const m=y("ExternalResource"),p=y("legal-status");return i.meta_data?(n(),c("div",St,[i.meta_data.perspective||i.meta_data.authors&&i.meta_data.authors.length||i.meta_data.legal_status?(n(),d(R,{key:0,class:"py-2"})):u("",!0),i.meta_data.perspective?(n(),d(g,{key:1,dense:""},{default:s(()=>[o(l,{cols:"12"},{default:s(()=>[j(h(i.meta_data.perspective),1)]),_:1})]),_:1})):u("",!0),i.meta_data.artists&&i.meta_data.artists.length?(n(!0),c($,{key:2},T(i.meta_data.artists,(b,f)=>(n(),d(g,{key:"artist"+f,dense:"",align:"center"},{default:s(()=>[o(l,{cols:"3"},{default:s(()=>[I("h5",null,h(b.role)+":",1)]),_:2},1024),o(l,{cols:"9",class:""},{default:s(()=>[o(m,{data:b},{default:s(()=>[j(h(b.name),1)]),_:2},1032,["data"])]),_:2},1024)]),_:2},1024))),128)):u("",!0),i.meta_data.legal_status?(n(),d(p,{key:3,data:i.meta_data.legal_status,headline:"","is-creation":"",cols:[3,9]},null,8,["data"])):u("",!0)])):u("",!0)}const qt=w(xt,[["render",Ct],["__scopeId","data-v-5488552d"]]),Dt={name:"ImageSection",components:{ImageMeta:qt,ImageViewer:it,PlaceHolderImage:pt,LoadingSpinner:bt},inject:["parent_ac"],props:{objectId:{type:Number,required:!0,default:0},maxWidth:{type:Number,default:null},imageHeight:{type:String,default:"430"},hideMetadata:{type:Boolean,default:!1},comparisonPage:{type:Boolean,default:!1,required:!1}},data(){return{image_data:[],fb_img:null,loading:!0,image_index:0,viewerKey:0}},computed:{all_object_ids(){let t=[];if(this.image_data)for(let e of this.image_data){t.push(e.objectId);for(let a of e.areas)t.push(a.objectId)}return t},image_meta_iri(){return this.image_data&&this.image_data.length&&this.image_data[this.image_index]?this.image_data[this.image_index].image_iri:null},computedImageHeight(){return this.imageHeight.includes("calc")?this.imageHeight:`${this.imageHeight}px`}},watch:{async objectId(t){this.fb_img=await A.get_fallback_image(this.objectId,this.parent_ac.signal),this.all_object_ids.includes(t)||(this.loading=!0,await this.load_image_data(),this.image_index=0,this.loading=!1)}},async created(){this.fb_img=await A.get_fallback_image(this.objectId,this.parent_ac.signal),await this.load_image_data(),this.loading=!1},methods:{forceRerender(){this.viewerKey+=1},async load_image_data(){this.image_data=[];let t=await A.get_image_data(this.objectId,this.parent_ac.signal);t&&t.id==this.objectId&&(this.image_data=t.images),this.image_data&&(this.image_data.forEach(e=>e.rotation=parseInt(e.rotation)||0),this.image_data.forEach(e=>e.objectId=this.iri_to_id(e.object_iri)),this.image_data.forEach(e=>e.areas.forEach(a=>a.objectId=this.iri_to_id(a.area_iri))),this.image_data.forEach(e=>e.areas=this.calculate_z_index(e.areas)))},iri_to_id(t){return+t.split("/").slice(-1)[0]},calculate_z_index(t){return t.forEach(e=>e.area=e.width*e.height),t.sort((e,a)=>a.area-e.area),t.forEach((e,a)=>e.z_index=a),t}}},Bt={key:1};function Ft(t,e,a,r,i,_){const m=y("LoadingSpinner"),p=y("ImageViewer"),b=y("ImageMeta"),f=y("PlaceHolderImage");return n(),d(Q,{variant:"outlined",rounded:"","min-height":_.computedImageHeight},{default:s(()=>[i.loading?(n(),d(m,{key:0,style:J(`height:${_.computedImageHeight} !important`)},null,8,["style"])):i.image_data.length?(n(),c("div",Bt,[(n(),d(p,{key:i.viewerKey,objectid:a.objectId,"image-data":i.image_data,"fallback-image":i.fb_img,height:_.computedImageHeight,"comparison-page":a.comparisonPage,onImageIndexChange:e[0]||(e[0]=P=>i.image_index=P),onFallbackForceRerender:_.forceRerender},null,8,["objectid","image-data","fallback-image","height","comparison-page","onFallbackForceRerender"])),a.hideMetadata?u("",!0):(n(),d(b,{key:0,"object-id":a.objectId,iri:_.image_meta_iri},null,8,["object-id","iri"]))])):(n(),d(f,{key:2,style:J(`height:${_.computedImageHeight} !important`)},null,8,["style"]))]),_:1},8,["min-height"])}const wi=w(Dt,[["render",Ft]]),Ht={props:{data:{type:Object,default:()=>{}},withLabel:{type:Boolean,default:!1}},computed:{is_inline_flex(){return this.withLabel?"d-inline-flex":""}}},Wt={class:"d-flex align-baseline"},Mt={key:0},Vt={key:0};function Ut(t,e,a,r,i,_){return a.data?(n(),c("span",{key:0,class:st(_.is_inline_flex)},[I("div",Wt,[a.withLabel?(n(),c("h5",Mt,h(t.$t("label.source"))+": ",1)):u("",!0),V(t.$slots,"default",{},()=>[a.data&&a.data.name?(n(),c("div",Vt,h(a.data.name),1)):u("",!0)])])],2)):u("",!0)}const Yt=w(Ht,[["render",Ut]]),zt={name:"Citation",components:{FormatedLink:M,FormatText:K,CitationStaticSource:Yt},props:{data:{type:Object,validator(t){let e=Object.keys(t).includes("value")&&t.value;return Array.isArray(t.sources)&&t.sources.length||t.source&&console.warn("possible typo or male format in citation"),e},default(){return{value:""}}},sourceStyle:{type:String,default:""}},computed:{quote(){return this.data.quote?this.data.quote:this.data.value?this.data.value:this.data.text?this.data.text:""},sources(){return this.data.sources?this.data.sources:[]}},methods:{semicolon(t){return t+1<this.sources.length?";":""}}},Gt={key:0},Kt={class:"quote"},Xt={key:0},Jt={key:0},Qt={key:1};function Zt(t,e,a,r,i,_){const m=y("FormatText"),p=y("FormatedLink"),b=y("CitationStaticSource");return Object.keys(a.data).length?(n(),c("span",Gt,[I("div",Kt,[o(m,{data:a.data.value},null,8,["data"]),e[0]||(e[0]=j(" "))]),(n(!0),c($,null,T(_.sources,(f,P)=>(n(),c("span",{key:"srcs"+P},[f.name||f.link?(n(),c("span",Xt,[o(b,{data:f,"with-label":P==0},{default:s(()=>[f.link&&f.name?(n(),c("span",Jt,[e[1]||(e[1]=j(" ")),o(p,{"anchor-text":f.name,data:f.link,"text-as-link":""},null,8,["anchor-text","data"])])):f.link?(n(),c("span",Qt,[e[2]||(e[2]=j(" ")),o(p,{data:f.link,"text-as-link":""},null,8,["data"])])):u("",!0)]),_:2},1032,["data","with-label"])])):u("",!0),j(h(_.semicolon(P)),1)]))),128))])):u("",!0)}const X=w(zt,[["render",Zt]]),te="/type/preferred_title",ee={name:"ObjectTitle",components:{Citation:X},inject:["parent_ac"],props:{objectId:{type:Number,default:0}},data(){return{titles:[],sorted_titles:{main_title:{},alt_titles:{}}}},watch:{objectId(){this.objectId&&this.load_data_from_ts()},titles(){if(this.titles&&this.titles.length){for(let t of this.titles)t.type.endsWith(te)?this.sorted_titles.main_title=t:(t.type in this.sorted_titles.alt_titles||(this.sorted_titles.alt_titles[t.type]=[]),this.sorted_titles.alt_titles[t.type].push(t));this.sorted_titles.alt_titles=Object.keys(this.sorted_titles.alt_titles).sort().reduce((t,e)=>(t[e]=this.sorted_titles.alt_titles[e],t),{})}}},created(){this.load_data_from_ts()},methods:{load_data_from_ts(){this.titles=[],this.has_children=!1,this.sorted_titles={main_title:{},alt_titles:{}},A.get_title(this.objectId,this.$i18n.locale,this.parent_ac.signal).then(t=>{t&&t.title&&t.id==this.objectId&&(this.titles=t.title)})}}},ae={key:0},ie={class:"d-inline"};function ne(t,e,a,r,i,_){const m=y("Citation");return a.objectId?(n(),c("span",ae,[Object.keys(i.sorted_titles.alt_titles).length?(n(),d(R,{key:0,class:"mt-4 mb-2"})):u("",!0),i.sorted_titles.alt_titles?(n(!0),c($,{key:1},T(i.sorted_titles.alt_titles,(p,b)=>(n(),c("span",{key:b,class:"text-body-2"},[(n(!0),c($,null,T(p,(f,P)=>(n(),d(g,{key:P,dense:""},{default:s(()=>[P==0?(n(),d(l,{key:0,cols:"4"},{default:s(()=>[I("h5",ie,h(p[0].type_label)+":",1)]),_:2},1024)):(n(),d(l,{key:1,cols:"4"},{default:s(()=>e[0]||(e[0]=[j(" ")])),_:1})),o(l,{cols:"8"},{default:s(()=>[o(m,{data:f},null,8,["data"])]),_:2},1024)]),_:2},1024))),128))]))),128)):u("",!0)])):u("",!0)}const se=w(ee,[["render",ne]]),re={components:{Anchor:W},props:{data:{type:Object,default:()=>{}},path:{type:String,default:""}}};function oe(t,e,a,r,i,_){const m=y("router-link"),p=y("Anchor");return n(),c("span",null,["iri"in a.data&&a.data.iri?(n(),d(m,{key:0,class:"internal-resource-link",to:{name:a.path,params:{id:a.data.iri.split("/").slice(-1)[0]}}},{default:s(()=>[j(h(a.data.name),1)]),_:1},8,["to"])):u("",!0),a.data.gnd?(n(),d(p,{key:1,url:a.data.gnd,sup:""},{default:s(()=>e[0]||(e[0]=[j("GND")])),_:1},8,["url"])):u("",!0)])}const D=w(re,[["render",oe],["__scopeId","data-v-a46c7b92"]]),_e={components:{Anchor:W},props:{data:{type:Object,default:()=>{}},category:{type:String,default:""}},methods:{filter_string:function(){return this.category+"-IS_OR-"+this.data.iri.split("/").slice(-1)[0]}}};function ce(t,e,a,r,i,_){const m=y("router-link"),p=y("Anchor");return n(),c("span",null,[o(gt,{location:"bottom","open-delay":"600"},{activator:s(({props:b})=>[I("span",rt(ot(b)),[o(m,_t(b,{class:"filter_link",to:{name:"Search",query:{qfilter:_.filter_string()}}}),{default:s(()=>[j(h(a.data.name),1)]),_:2},1040,["to"])],16)]),default:s(()=>[I("span",null,h(t.$t("descr.filtered_search")),1)]),_:1}),a.data.gnd?(n(),d(p,{key:0,url:a.data.gnd,sup:""},{default:s(()=>e[0]||(e[0]=[j("GND")])),_:1},8,["url"])):u("",!0)])}const x=w(_e,[["render",ce],["__scopeId","data-v-009345da"]]),le={name:"Production",components:{Dating:B,FilterResourceLink:x,ResourceLink:D},inject:["parent_ac"],props:{objectId:{type:Number,default:0}},data(){return{production:null,artists_sorted:{}}},computed:{production_note(){return this.production.prod_note||""},production_locations(){return this.production&&this.production.locations?[...new Map(this.production.locations.map(t=>[t.iri,t])).values()]:!1},production_technics(){return this.production.technics&&this.production.technics.length?this.production.technics.filter((t,e,a)=>e===a.findIndex(r=>r.gnd===t.gnd&&r.name===t.name)):!1}},watch:{objectId(){this.objectId&&(this.reset_data(),this.load_from_ts())},production(){this.production&&this.sort_artist_by_id()}},created(){this.reset_data(),this.load_from_ts()},methods:{load_from_ts(){A.get_production(this.objectId,this.$i18n.locale,this.parent_ac.signal).then(t=>{t&&t.production&&t.id==this.objectId&&(this.production=t.production)})},reset_data(){this.production=null,this.artists_sorted={}},sort_artist_by_id(){if(this.production.artists&&this.production.artists.length)for(let t of this.production.artists)t.role in this.artists_sorted||(this.artists_sorted[t.role]={}),this.artists_sorted[t.role][t.iri]=t}}},de={key:0,class:"text-body-2"},ue={key:0},me={key:1},he={key:0},fe={key:1},pe={key:2},be={key:0},ye={key:1};function ge(t,e,a,r,i,_){const m=y("ResourceLink"),p=y("Dating"),b=y("FilterResourceLink");return a.objectId&&i.production?(n(),c("span",de,[o(R,{class:"mt-4"}),o(g,{class:"py-5"},{default:s(()=>[o(l,{cols:"12"},{default:s(()=>[I("h4",null,h(t.$t("label.production")),1)]),_:1})]),_:1}),i.artists_sorted?(n(!0),c($,{key:0},T(i.artists_sorted,(f,P)=>(n(),c("span",{key:"artists"+P},[(n(!0),c($,null,T(f,(L,N,k)=>(n(),d(g,{key:"art"+k,dense:""},{default:s(()=>[o(l,{cols:"4"},{default:s(()=>[k==0?(n(),c("h5",ue,h(L.role)+":",1)):(n(),c("span",me," "))]),_:2},1024),o(l,{cols:"8"},{default:s(()=>[o(m,{data:L,path:"Person"},null,8,["data"]),L.attribution?(n(),c("span",he," ("+h(L.attribution)+")",1)):u("",!0)]),_:2},1024)]),_:2},1024))),128))]))),128)):u("",!0),i.production.dating?(n(),c("span",fe,[o(g,{dense:""},{default:s(()=>[o(l,{cols:"4"},{default:s(()=>[I("h5",null,h(t.$t("label.dating"))+":",1)]),_:1}),o(l,{cols:"8"},{default:s(()=>[o(p,{data:i.production.dating},null,8,["data"])]),_:1})]),_:1})])):u("",!0),_.production_locations?(n(),c("span",pe,[(n(!0),c($,null,T(_.production_locations,(f,P)=>(n(),d(g,{key:"place"+P,dense:""},{default:s(()=>[o(l,{cols:"4"},{default:s(()=>[P==0?(n(),c("h5",be,h(t.$t("label.place"))+":",1)):(n(),c("span",ye," "))]),_:2},1024),o(l,{cols:"8"},{default:s(()=>[o(m,{data:f,path:"Place"},null,8,["data"])]),_:2},1024)]),_:2},1024))),128))])):u("",!0),_.production_note?(n(),d(g,{key:3,dense:""},{default:s(()=>[o(l,{cols:"4"},{default:s(()=>[I("h5",null,h(t.$t("label.note"))+":",1)]),_:1}),o(l,{cols:"8"},{default:s(()=>[I("div",null,h(_.production_note),1)]),_:1})]),_:1})):u("",!0),_.production_technics?(n(!0),c($,{key:4},T(_.production_technics,(f,P)=>(n(),d(g,{key:"tec"+P,dense:""},{default:s(()=>[P==0?(n(),d(l,{key:0,cols:"4"},{default:s(()=>[I("h5",null,h(t.$t("label.technic"))+":",1)]),_:1})):(n(),d(l,{key:1,cols:"4"},{default:s(()=>e[0]||(e[0]=[j(" ")])),_:1})),o(l,{cols:"8"},{default:s(()=>[o(b,{data:f,category:"technic"},null,8,["data"])]),_:2},1024)]),_:2},1024))),128)):u("",!0),i.production.commission?(n(),c($,{key:5},[(n(!0),c($,null,T(i.production.commission.commissioner,(f,P)=>(n(),d(g,{key:"comi"+P,dense:""},{default:s(()=>[P==0?(n(),d(l,{key:0,cols:"4"},{default:s(()=>[I("h5",null,h(t.$t("label.commissioners"))+":",1)]),_:1})):(n(),d(l,{key:1,cols:"4"},{default:s(()=>e[1]||(e[1]=[j(" ")])),_:1})),o(l,{cols:"8"},{default:s(()=>[o(m,{data:f,path:"Person"},null,8,["data"])]),_:2},1024)]),_:2},1024))),128)),i.production.commission.note?(n(),d(g,{key:0,dense:""},{default:s(()=>[o(l,{cols:"4"},{default:s(()=>[I("h5",null,h(t.$t("label.note"))+":",1)]),_:1}),o(l,{cols:"8"},{default:s(()=>[I("div",null,h(i.production.commission.note),1)]),_:1})]),_:1})):u("",!0)],64)):u("",!0)])):u("",!0)}const Pe=w(le,[["render",ge]]),Ie={name:"Modification",components:{Dating:B,FilterResourceLink:x,ResourceLink:D},inject:["parent_ac"],props:{objectId:{type:Number,default:0}},data(){return{modifications:[]}},watch:{objectId(){this.objectId&&(this.modifications=[],this.load_from_ts())},production(){this.production&&this.sort_artist_by_id()}},created(){this.modifications=[],this.load_from_ts()},methods:{load_from_ts(){A.get_modifications(this.objectId,this.$i18n.locale,this.parent_ac.signal).then(t=>{t&&t.modifications&&t.id==this.objectId&&(this.modifications=t.modifications)})},sort_artist_by_id(t){let e={};if(t&&t.length)for(let a of t)e[a.id]=a;return e}}},je={key:0,class:"text-body-2"},ke={class:"d-inline"},Ee={key:0},Oe={class:"d-inline"};function $e(t,e,a,r,i,_){const m=y("Dating"),p=y("ResourceLink"),b=y("FilterResourceLink");return a.objectId&&i.modifications&&i.modifications.length?(n(),c("span",je,[o(R,{class:"mt-4"}),o(g,{class:"py-5"},{default:s(()=>[o(l,{cols:"12"},{default:s(()=>[I("h4",null,h(t.$t("label.modifications")),1)]),_:1})]),_:1}),(n(!0),c($,null,T(i.modifications,(f,P)=>(n(),d(g,{key:"mod"+P,dense:""},{default:s(()=>[o(l,{cols:"12"},{default:s(()=>[f.dating?(n(),d(g,{key:0,dense:""},{default:s(()=>[o(l,{cols:"4"},{default:s(()=>[I("h5",null,h(t.$t("label.modification_dating"))+":",1)]),_:1}),o(l,{cols:"8"},{default:s(()=>[o(m,{data:f.dating},null,8,["data"])]),_:2},1024)]),_:2},1024)):u("",!0),f.note?(n(),d(g,{key:1,dense:""},{default:s(()=>[o(l,{cols:"4"},{default:s(()=>[I("h5",null,h(t.$t("label.note"))+":",1)]),_:1}),o(l,{cols:"8"},{default:s(()=>[j(h(f.note),1)]),_:2},1024)]),_:2},1024)):u("",!0),f.artists?(n(!0),c($,{key:2},T(_.sort_artist_by_id(f.artists),(L,N)=>(n(),d(g,{key:"art"+N,dense:""},{default:s(()=>[o(l,{cols:"4"},{default:s(()=>[I("h5",ke,h(L.role)+":",1)]),_:2},1024),o(l,{cols:"8"},{default:s(()=>[o(p,{data:L,path:"Person"},null,8,["data"]),L.attribution?(n(),c("span",Ee," ("+h(L.attribution)+")",1)):u("",!0)]),_:2},1024)]),_:2},1024))),128)):u("",!0),f.technics&&f.technics.length?(n(!0),c($,{key:3},T(f.technics,(L,N)=>(n(),d(g,{key:"tec"+N},{default:s(()=>[N==0?(n(),d(l,{key:0,cols:"4"},{default:s(()=>[I("h5",Oe,h(t.$t("label.technic")),1)]),_:1})):(n(),d(l,{key:1,cols:"4"},{default:s(()=>e[0]||(e[0]=[j(" ")])),_:1})),o(l,{cols:"8"},{default:s(()=>[o(b,{data:L,category:"technic"},null,8,["data"])]),_:2},1024)]),_:2},1024))),128)):u("",!0),P+1<i.modifications.length?(n(),d(R,{key:4,class:"mt-4 mb-2",inset:""})):u("",!0)]),_:2},1024)]),_:2},1024))),128))])):u("",!0)}const ve=w(Ie,[["render",$e]]),Te={name:"Find",components:{Dating:B,ResourceLink:D},inject:["parent_ac"],props:{objectId:{type:Number,default:0}},data(){return{find:null}},watch:{objectId(){this.objectId&&(this.reset_data(),this.load_from_ts())}},created(){this.load_from_ts()},methods:{load_from_ts(){A.get_find(this.objectId,this.$i18n.locale,this.parent_ac.signal).then(t=>{t&&t.find&&t.id==this.objectId&&(this.find=t.find)})},reset_data(){this.find=null}}},we={key:0,class:"text-body-2"},Le={key:0},Ae={key:1};function Ne(t,e,a,r,i,_){const m=y("ResourceLink"),p=y("Dating");return i.find?(n(),c("span",we,[o(R,{class:"mt-4"}),o(g,{class:"py-5"},{default:s(()=>[o(l,{cols:"12"},{default:s(()=>[I("h4",null,h(t.$t("label.find")),1)]),_:1})]),_:1}),i.find?(n(),c($,{key:0},[i.find.location?(n(),d(g,{key:0,dense:""},{default:s(()=>[o(l,{cols:"4"},{default:s(()=>[I("h5",null,h(t.$t("label.find_place"))+":",1)]),_:1}),o(l,{cols:"8"},{default:s(()=>[o(m,{data:i.find.location,path:"Place"},null,8,["data"])]),_:1})]),_:1})):u("",!0),i.find.dating?(n(),d(g,{key:1,dense:""},{default:s(()=>[o(l,{cols:"4"},{default:s(()=>[I("h5",null,h(t.$t("label.dating"))+":",1)]),_:1}),o(l,{cols:"8"},{default:s(()=>[o(p,{data:i.find.dating},null,8,["data"])]),_:1})]),_:1})):u("",!0),(n(!0),c($,null,T(i.find.artists,(b,f)=>(n(),d(g,{key:"art"+f,dense:""},{default:s(()=>[o(l,{cols:"4"},{default:s(()=>[f==0?(n(),c("h5",Le,h(b.role)+":",1)):(n(),c("span",Ae," "))]),_:2},1024),o(l,{cols:"8"},{default:s(()=>[o(m,{data:b,path:"Person"},null,8,["data"])]),_:2},1024)]),_:2},1024))),128)),i.find.note?(n(),d(g,{key:2,dense:""},{default:s(()=>[o(l,{cols:"4"},{default:s(()=>[I("h5",null,h(t.$t("label.note"))+":",1)]),_:1}),o(l,{cols:"8"},{default:s(()=>[j(h(i.find.note),1)]),_:1})]),_:1})):u("",!0)],64)):u("",!0)])):u("",!0)}const Re=w(Te,[["render",Ne]]),xe="object_type",Se="classification",Ce="https://db.antiquitatum-thesaurus.eu".replace(/\/$/,""),qe=`${Ce}/type/object_type`,De={name:"Types",components:{FilterResourceLink:x},inject:["parent_ac"],props:{objectId:{type:Number,default:0}},data(){return{types:[],category:{"/type/classification":Se,"/type/object_type":xe},object_type:null,classifications:[]}},watch:{objectId(){this.objectId&&(this.reset_data(),this.load_from_ts())},types(){this.types&&this.types.length&&this.sort_types()}},created(){this.load_from_ts()},methods:{load_from_ts(){A.get_types(this.objectId,this.$i18n.locale,this.parent_ac.signal).then(t=>{t&&t.types&&t.id==this.objectId&&(this.types=t.types)})},reset_data(){this.types=[],this.classifications=[],this.object_type=null},get_path(t){return new URL(t).pathname},sort_types(){if(this.types&&this.types.length)for(let t of this.types)t.type_of_type_iri==qe?this.object_type=t:this.classifications.push(t)}}},Be={key:0,class:"text-body-2 mb-1"},Fe={key:0},He={key:1};function We(t,e,a,r,i,_){const m=y("FilterResourceLink");return a.objectId&&i.types?(n(),c("div",Be,[i.object_type?(n(),d(g,{key:0,dense:""},{default:s(()=>[o(l,{cols:"4"},{default:s(()=>[I("h5",null,h(i.object_type.type_of_type)+":",1)]),_:1}),o(l,{cols:"8"},{default:s(()=>[o(m,{data:i.object_type,category:i.category[_.get_path(i.object_type.type_of_type_iri)]},null,8,["data","category"])]),_:1})]),_:1})):u("",!0),i.classifications.length?(n(!0),c($,{key:1},T(i.classifications,(p,b)=>(n(),d(g,{key:"t"+b,dense:""},{default:s(()=>[o(l,{cols:"4"},{default:s(()=>[b==0?(n(),c("h5",Fe,h(p.type_of_type)+":",1)):(n(),c("span",He," "))]),_:2},1024),o(l,{cols:"8"},{default:s(()=>[o(m,{data:p,category:i.category[_.get_path(p.type_of_type_iri)]},null,8,["data","category"])]),_:2},1024)]),_:2},1024))),128)):u("",!0)])):u("",!0)}const Me=w(De,[["render",We]]),Ve={name:"Inscriptions",components:{FormatText:K},inject:["parent_ac"],props:{objectId:{type:Number,default:0}},data(){return{inscriptions:[]}},watch:{objectId(){this.objectId&&(this.reset_data(),this.load_from_ts())}},created(){this.load_from_ts()},methods:{load_from_ts(){A.get_inscriptions(this.objectId,this.parent_ac.signal).then(t=>{t&&t.inscriptions&&t.id==this.objectId&&(this.inscriptions=t.inscriptions)})},reset_data(){this.inscriptions=[]}}},Ue={key:0,class:"text-body-2 mb-1"},Ye={key:0},ze={class:"d-inline"},Ge={key:1},Ke={class:"d-inline"};function Xe(t,e,a,r,i,_){const m=y("FormatText");return a.objectId&&i.inscriptions&&i.inscriptions.length?(n(),c("div",Ue,[(n(!0),c($,null,T(i.inscriptions,(p,b)=>(n(),d(g,{key:"insc"+b,dense:""},{default:s(()=>[b>0?(n(),d(l,{key:0,cols:"12"},{default:s(()=>[o(R,{inset:""})]),_:1})):u("",!0),b==0?(n(),d(l,{key:1,cols:"4"},{default:s(()=>[I("h5",null,h(t.$t("label.inscriptions"))+":",1)]),_:1})):(n(),d(l,{key:2,cols:"4"},{default:s(()=>e[0]||(e[0]=[j(" ")])),_:1})),o(l,{cols:"8"},{default:s(()=>[o(m,{data:p.text},null,8,["data"]),p.descr_text||p.pos_text?(n(),d(g,{key:0,dense:""},{default:s(()=>[o(l,{cols:"12"},{default:s(()=>[p.pos_text?(n(),c("div",Ye,[I("h5",ze,h(t.$t("label.inscription_placement"))+":",1),j(" "+h(p.pos_text),1)])):u("",!0),p.descr_text?(n(),c("div",Ge,[I("h5",Ke,h(t.$t("label.note"))+":",1),j(" "+h(p.descr_text),1)])):u("",!0)]),_:2},1024)]),_:2},1024)):u("",!0)]),_:2},1024)]),_:2},1024))),128))])):u("",!0)}const Je=w(Ve,[["render",Xe]]),Qe={name:"Description",components:{Citation:X},inject:["parent_ac"],props:{objectId:{type:Number,default:0},type:{type:String,default:"description"},withHeader:{type:Boolean,default:!1}},data(){return{descriptions:[]}},watch:{objectId(){this.objectId&&(this.reset_data(),this.load_from_ts())}},created(){this.load_from_ts()},methods:{load_from_ts(){A.get_descriptions(this.objectId,this.$i18n.locale,this.type,this.parent_ac.signal).then(t=>{t&&t.descriptions&&t.id==this.objectId&&(this.descriptions=this.filterLanguages(t.descriptions))})},filterLanguages(t){let e=[];for(let a of t)["de","it"].includes(a.language)&&e.push(a);return e},reset_data(){this.descriptions=[]},formatData(t){let e={value:t.note};return t.assignments.length&&(e.sources=t.assignments),e}}},Ze={key:0,class:"text-body-2 mb-1"},ta={key:0},ea={key:0,class:"d-inline"},aa={key:1,class:"d-inline"};function ia(t,e,a,r,i,_){const m=y("Citation");return a.objectId&&i.descriptions&&i.descriptions.length>0?(n(),c("div",Ze,[a.withHeader?(n(),c("div",ta,[o(R,{class:"mt-4"}),o(g,{class:"py-5"},{default:s(()=>[o(l,{cols:"12"},{default:s(()=>[I("h4",null,h(t.$t("label."+a.type)),1)]),_:1})]),_:1})])):u("",!0),(n(!0),c($,null,T(i.descriptions,(p,b)=>(n(),c("div",{key:b},[o(g,{dense:""},{default:s(()=>[o(l,{cols:"4"},{default:s(()=>[i.descriptions.length>1|(i.descriptions.length==1&&i.descriptions[0].language!="de")?(n(),c("h5",ea,h(p.type)+" ("+h(p.language)+"): ",1)):(n(),c("h5",aa,h(p.type)+":",1))]),_:2},1024),o(l,{cols:"8"},{default:s(()=>[o(m,{data:_.formatData(p)},null,8,["data"])]),_:2},1024)]),_:2},1024)]))),128))])):u("",!0)}const et=w(Qe,[["render",ia]]),na={class:"text-body-2 mb-1"},sa={class:"d-inline"},ra={key:0,class:"depicts"},oa={class:"depicts"},_a={key:0,class:"comma"},ca={key:1},la={__name:"DepictionMethod",props:{objectId:{type:Number,default:0}},setup(t){const{t:e,locale:a}=U(),r=q([]),i=t,_=Y("parent_ac");function m(f){return f.some(P=>P.iri.endsWith("oblique_view"))}function p(f){const P=[],L=[];return f.forEach(N=>{N.iri.endsWith("oblique_view")?(N.views=P,L.push(N)):N.iri.endsWith("view")?P.push(N):L.push(N)}),L}function b(){A.get_depiction_method(i.objectId,a.value,_.signal).then(f=>{f&&f.modes&&f.id==i.objectId?m(f.modes)?r.value=p(f.modes):r.value=f.modes:r.value=[]})}return z(()=>{b()}),G(()=>i.objectId,()=>{b()}),(f,P)=>(n(),c("div",na,[(n(!0),c($,null,T(r.value,(L,N)=>(n(),d(g,{key:"mode"+N,dense:""},{default:s(()=>[N==0?(n(),d(l,{key:0,cols:"4"},{default:s(()=>[I("h5",sa,h(Z(e)("label.mode_of_depiction"))+":",1)]),_:1})):(n(),d(l,{key:1,cols:"4"},{default:s(()=>P[0]||(P[0]=[j(" ")])),_:1})),o(l,{cols:"8"},{default:s(()=>["views"in L?(n(),c("span",ra,[o(x,{data:L,category:"mode_of_depiction"},null,8,["data"]),P[1]||(P[1]=j(" ")),P[2]||(P[2]=I("span",{class:"no-padding-text"},"(",-1)),(n(!0),c($,null,T(L.views,(k,S)=>(n(),c("span",{key:"submode"+S},[I("span",oa,[o(x,{data:k,category:"mode_of_depiction"},null,8,["data"])]),S>=0&&S<L.views.length-1?(n(),c("span",_a,",")):u("",!0)]))),128)),P[3]||(P[3]=I("span",{class:"no-padding-text"},")",-1))])):(n(),c("span",ca,[o(x,{data:L,category:"mode_of_depiction"},null,8,["data"])]))]),_:2},1024)]),_:2},1024))),128))]))}},da=w(la,[["__scopeId","data-v-1fc0c464"]]),ua={class:"text-body-2 mb-1"},ma={class:"d-inline"},ha={key:0},fa={key:1},pa={__name:"DepictionContent",props:{objectId:{type:Number,default:0}},setup(t){const{t:e,locale:a}=U(),r=q([]),i=t,_=Y("parent_ac");function m(){A.get_depiction_content(i.objectId,a.value,_.signal).then(p=>{p&&p.id==i.objectId?r.value=p.depictions:r.value=[]})}return z(()=>{m()}),G(()=>i.objectId,()=>{m()}),(p,b)=>(n(),c("div",ua,[(n(!0),c($,null,T(r.value,(f,P)=>(n(),d(g,{key:"depictionContent"+P,dense:""},{default:s(()=>[P==0?(n(),d(l,{key:0,cols:"4"},{default:s(()=>[I("h5",ma,h(Z(e)("label.depiction_content"))+":",1)]),_:1})):(n(),d(l,{key:1,cols:"4"},{default:s(()=>b[0]||(b[0]=[j(" ")])),_:1})),o(l,{cols:"8"},{default:s(()=>[f.type.endsWith("E21_Person")?(n(),c("span",ha,[o(x,{data:f,category:"depicted_person"},null,8,["data"])])):(n(),c("span",fa,[o(x,{data:f,category:"depicted_place"},null,8,["data"])]))]),_:2},1024)]),_:2},1024))),128))]))}},ba={name:"Materials",components:{FilterResourceLink:x},inject:["parent_ac"],props:{objectId:{type:Number,default:0}},data(){return{materials:[]}},watch:{objectId(){this.objectId&&(this.reset_data(),this.load_from_ts())}},created(){this.load_from_ts()},methods:{load_from_ts(){A.get_materials(this.objectId,this.$i18n.locale,this.parent_ac.signal).then(t=>{t&&t.materials&&t.id==this.objectId&&(this.materials=t.materials)})},reset_data(){this.materials=[]}}},ya={class:"text-body-2 mb-1"},ga={key:0,class:"d-inline"};function Pa(t,e,a,r,i,_){const m=y("FilterResourceLink");return n(),c("div",ya,[(n(!0),c($,null,T(i.materials,(p,b)=>(n(),d(g,{key:"mat"+b,dense:""},{default:s(()=>[b==0?(n(),d(l,{key:0,cols:"4"},{default:s(()=>[b==0?(n(),c("h5",ga,h(t.$t("label.material"))+":",1)):u("",!0)]),_:2},1024)):(n(),d(l,{key:1,cols:"4"},{default:s(()=>e[0]||(e[0]=[j(" ")])),_:1})),o(l,{cols:"8"},{default:s(()=>[o(m,{data:p,category:"material"},null,8,["data"])]),_:2},1024)]),_:2},1024))),128))])}const Ia=w(ba,[["render",Pa]]),ja={name:"Condition",components:{Citation:X},inject:["parent_ac"],props:{objectId:{type:Number,default:0}},data(){return{condition:{}}},computed:{has_condition(){return!this.is_obj_empty(this.condition)},computed_condition(){let t={value:this.condition.note,sources:[]},e={name:""};return this.condition.source_note&&(e.name=this.condition.source_note),this.condition.source&&(e.link={uri:this.condition.source.uri},this.condition.source.name&&(e.name=this.condition.source.name)),t.sources.push(e),t}},watch:{objectId(){this.objectId&&(this.reset_data(),this.load_from_ts())}},created(){this.reset_data(),this.load_from_ts()},methods:{is_obj_empty(t){return typeof t<"u"&&Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype},load_from_ts(){A.get_condition(this.objectId,this.$i18n.locale,this.parent_ac.signal).then(t=>{t&&t.condition&&t.id==this.objectId&&(this.condition=t.condition)})},reset_data(){this.condition={}}}},ka={key:0,class:"text-body-2 mb-1"},Ea={class:"d-inline"};function Oa(t,e,a,r,i,_){const m=y("Citation");return i.condition&&_.has_condition?(n(),c("div",ka,[o(g,{dense:""},{default:s(()=>[o(l,{cols:"4"},{default:s(()=>[I("h5",Ea,h(t.$t("label.condition"))+":",1)]),_:1}),o(l,{cols:"8"},{default:s(()=>[o(m,{data:_.computed_condition},null,8,["data"])]),_:1})]),_:1})])):u("",!0)}const $a=w(ja,[["render",Oa]]),va={name:"Measurement",components:{},inject:["parent_ac"],props:{objectId:{type:Number,default:0}},data(){return{measurements:[]}},computed:{has_measurements(){return this.measurements.length}},watch:{objectId(){this.objectId&&(this.reset_data(),this.load_from_ts())}},created(){this.reset_data(),this.load_from_ts()},methods:{is_obj_empty(t){return typeof t<"u"&&Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype},load_from_ts(){A.get_measurements(this.objectId,this.$i18n.locale,this.parent_ac.signal).then(t=>{t&&t.measurements&&t.id==this.objectId&&(this.measurements=t.measurements)})},reset_data(){this.measurements={}}}},Ta={key:0,class:"text-body-2 mb-1"},wa={key:0},La={key:0},Aa={key:1},Na={key:0};function Ra(t,e,a,r,i,_){return _.has_measurements?(n(),c("div",Ta,[(n(!0),c($,null,T(i.measurements,(m,p)=>(n(),d(g,{key:"mid"+p,dense:""},{default:s(()=>[p==0?(n(),d(l,{key:0,cols:"4"},{default:s(()=>[I("h5",null,h(t.$t("label.measurements"))+":",1)]),_:1})):(n(),d(l,{key:1,cols:"4"},{default:s(()=>e[0]||(e[0]=[j(" ")])),_:1})),o(l,{cols:"8"},{default:s(()=>[(n(!0),c($,null,T(m.measures,(b,f)=>(n(),c("span",{key:"meas"+f},[b.type&&b.value&&b.unit_symbol?(n(),c("span",wa,[j(h(b.type.charAt(0))+": "+h(parseFloat(b.value).toFixed(2).replace(".",","))+"  "+h(b.unit_symbol),1),f+1<m.measures.length?(n(),c("span",La,", ")):u("",!0)])):b.descr?(n(),c("span",Aa,h(b.descr),1)):u("",!0)]))),128)),m.notes?(n(),c("span",Na,"; "+h(m.notes),1)):u("",!0)]),_:2},1024)]),_:2},1024))),128))])):u("",!0)}const xa=w(va,[["render",Ra]]),Sa={name:"BaseFacts",components:{Types:Me,Inscriptions:Je,Description:et,Materials:Ia,Condition:$a,Measurement:xa,DepictionMethod:da,DepictionContent:pa},inject:["parent_ac"],props:{objectId:{type:Number,default:0}},data(){return{is_deleted:!1,forward_iri:null}},watch:{objectId(){this.load_from_ts()}},created(){this.load_from_ts()},methods:{load_from_ts(){A.is_deleted(this.objectId).then(t=>{this.is_deleted=t.is_deleted,this.is_deleted&&A.load_forward_id_if_exists(this.objectId,this.parent_ac.signal).then(e=>{this.forward_iri=e.forward_iri})})}}},Ca={key:0,class:"text-body-2"},qa={key:1};function Da(t,e,a,r,i,_){const m=y("Types"),p=y("Inscriptions"),b=y("Description"),f=y("DepictionContent"),P=y("DepictionMethod"),L=y("Materials"),N=y("Condition"),k=y("Measurement");return a.objectId&&!i.is_deleted?(n(),c("div",Ca,[o(R,{class:"mt-4"}),o(g,{class:"py-5"},{default:s(()=>[o(l,{cols:"12"},{default:s(()=>[I("h4",null,h(t.$t("label.descriptive_data")),1)]),_:1})]),_:1}),o(m,{"object-id":a.objectId},null,8,["object-id"]),o(p,{"object-id":a.objectId},null,8,["object-id"]),o(b,{"object-id":a.objectId},null,8,["object-id"]),o(f,{"object-id":a.objectId},null,8,["object-id"]),o(P,{"object-id":a.objectId},null,8,["object-id"]),o(L,{"object-id":a.objectId},null,8,["object-id"]),o(N,{"object-id":a.objectId},null,8,["object-id"]),o(k,{"object-id":a.objectId},null,8,["object-id"])])):i.is_deleted?(n(),c("div",qa,[o(Q,{variant:"outlined",rounded:"0","max-width":"500",class:"mx-auto my-10"},{default:s(()=>[o(ct,null,{default:s(()=>[j(h(t.$t("error.object_deleted")),1)]),_:1}),o(lt,null,{default:s(()=>[j(h(t.$t("error.object_replaced_by")),1)]),_:1}),i.forward_iri?(n(),d(dt,{key:0},{default:s(()=>[o(ut,{variant:"text",color:"#C60C30",to:{name:"Object",params:{objectid:i.forward_iri.split("/").slice(-1)[0]}},class:"forward_iri"},{default:s(()=>[j(h(i.forward_iri),1)]),_:1},8,["to"])]),_:1})):u("",!0)]),_:1})])):u("",!0)}const Ba=w(Sa,[["render",Da],["__scopeId","data-v-76945a7b"]]),Fa={name:"Comment",components:{Description:et},props:{objectId:{type:Number,default:0}}},Ha={class:"text-body-2"};function Wa(t,e,a,r,i,_){const m=y("Description");return n(),c("div",Ha,[o(m,{"object-id":a.objectId,type:"comment","with-header":""},null,8,["object-id"])])}const Ma=w(Fa,[["render",Wa]]),Va={name:"Provenance",components:{FormatText:K,Dating:B,ResourceLink:D},inject:["parent_ac"],props:{objectId:{type:Number,default:0}},data(){return{provs:[]}},watch:{objectId(){this.provs=[],this.load_from_ts()}},created(){this.load_from_ts()},methods:{not_last_row:function(t){return this.provs.length>t+1},sort_provenances(t){let e=new Map;return t.forEach(a=>{let r=a.iri.replace("/receiving_custody","").replace("/surrendering_custody","").split("/").slice(-1)[0];if(!e.has(r))e.set(r,a);else{let i=e.get(r);a.dating&&a.dating.to_date&&(typeof i.dating>"u"&&(i.dating={to_date:null}),i.dating.to_date=a.dating.to_date),e.set(r,i)}}),e=new Map([...e].sort()),Array.from(e.values())},load_from_ts(){A.get_provenances(this.objectId,this.parent_ac.signal).then(t=>{t&&t.provenances&&t.id==this.objectId&&(this.provs=this.sort_provenances(t.provenances))})}}},Ua={key:0,class:"text-body-2"},Ya={key:0},za={key:1},Ga={class:"d-inline"},Ka={class:"d-inline"};function Xa(t,e,a,r,i,_){const m=y("ResourceLink"),p=y("Dating"),b=y("FormatText");return i.provs.length?(n(),c("span",Ua,[o(R,{class:"mt-4"}),o(g,{class:"py-5"},{default:s(()=>[o(l,{cols:"12"},{default:s(()=>[I("h4",null,h(t.$t("label.provenance")),1)]),_:1})]),_:1}),(n(!0),c($,null,T(i.provs,(f,P)=>(n(),c("span",{key:P},[P>0?(n(),d(g,{key:0,class:"my-1",dense:""},{default:s(()=>[o(l,{cols:"12"},{default:s(()=>[o(R,{inset:""})]),_:1})]),_:1})):u("",!0),f.custodian?(n(),d(g,{key:1,dense:""},{default:s(()=>[o(l,{cols:"4"},{default:s(()=>[f.custodian.type=="person"?(n(),c("h5",Ya,h(t.$t("label.custodian"))+":",1)):(n(),c("h5",za,h(t.$t("label.institution"))+":",1))]),_:2},1024),o(l,{cols:"8"},{default:s(()=>[f.custodian.type=="person"?(n(),d(m,{key:0,data:f.custodian,path:"Person"},null,8,["data"])):(n(),d(m,{key:1,data:f.custodian,path:"Institution"},null,8,["data"]))]),_:2},1024)]),_:2},1024)):u("",!0),f.place?(n(),d(g,{key:2,dense:""},{default:s(()=>[o(l,{cols:"4"},{default:s(()=>[I("h5",null,h(t.$t("label.place"))+":",1)]),_:1}),o(l,{cols:"8"},{default:s(()=>[o(m,{data:f.place,path:"Place"},null,8,["data"])]),_:2},1024)]),_:2},1024)):u("",!0),"dating"in f&&f.dating?(n(),d(g,{key:3,dense:""},{default:s(()=>[o(l,{cols:"4"},{default:s(()=>[I("h5",Ga,h(t.$t("label.dating"))+": ",1)]),_:1}),o(l,{cols:"8"},{default:s(()=>[o(p,{data:f.dating},null,8,["data"])]),_:2},1024)]),_:2},1024)):u("",!0),"note"in f&&f.note?(n(),d(g,{key:4,dense:""},{default:s(()=>[o(l,{cols:"4"},{default:s(()=>[I("h5",Ka,h(t.$t("label.note"))+": ",1)]),_:1}),o(l,{cols:"8"},{default:s(()=>[o(b,{data:f.note},null,8,["data"])]),_:2},1024)]),_:2},1024)):u("",!0)]))),128))])):u("",!0)}const Ja=w(Va,[["render",Xa]]),Qa={name:"Cataloging",components:{LegalStatus:tt},inject:["parent_ac"],props:{objectId:{type:Number,required:!0}},data(){return{catalogings:[],default_license:{name:"CC BY-NC-SA 4.0",uri:"http://creativecommons.org/licenses/by-nc-sa/4.0"}}},watch:{objectId(){this.catalogings=[],this.load_from_ts()}},created(){this.load_from_ts()},methods:{load_from_ts(){A.get_cataloging_data(this.objectId,this.parent_ac.signal).then(t=>{if(t&&t.cataloging&&t.id==this.objectId){let e=t.cataloging;e=e.reduce((r,i,_)=>{let m=i.dating.from_date;return _==0?(r[m]=i,r):(m in r?r[m].rightholder=r[m].rightholder.concat(", ",i.rightholder):r[m]=i,r)},{});let a=[];for(let r in e)a.push(e[r]);this.catalogings=a}})}}},Za={if:"catalogings"};function ti(t,e,a,r,i,_){const m=y("LegalStatus");return n(),c("div",Za,[o(R,{class:"mt-4"}),o(mt,{class:"mt-10 text-body-2"},{default:s(()=>[(n(!0),c($,null,T(i.catalogings,(p,b)=>(n(),c("div",{key:b},[b>0?(n(),d(g,{key:0,class:"my-1"},{default:s(()=>[o(l,null,{default:s(()=>[o(R,{inset:""})]),_:1})]),_:1})):u("",!0),o(m,{data:p,cols:[4,8],headline:b==0?"legal_status.record":"","is-editor":"",no_license:b!=i.catalogings.length-1,"is-creation":b==0},null,8,["data","headline","no_license","is-creation"])]))),128))]),_:1})])}const ei=w(Qa,[["render",ti]]),ai={name:"Literture",components:{FormatedLink:M},inject:["parent_ac"],props:{objectId:{type:Number,default:0}},data(){return{bib_refs:[]}},watch:{objectId(){this.objectId&&(this.reset_data(),this.load_from_ts())}},created(){this.load_from_ts()},methods:{load_from_ts(){A.get_bibliographic_reference(this.objectId,this.parent_ac.signal).then(t=>{t&&t.bib_refs&&t.id==this.objectId&&(this.bib_refs=t.bib_refs)})},reset_data(){this.bib_refs=[]}}},ii={class:"text-body-2"};function ni(t,e,a,r,i,_){const m=y("FormatedLink");return n(),c("span",ii,[(n(!0),c($,null,T(i.bib_refs,(p,b)=>(n(),d(g,{key:b,dense:""},{default:s(()=>[b==0?(n(),d(l,{key:0,cols:"4"},{default:s(()=>[I("h5",null,h(t.$t("label.literatures_citations"))+":",1)]),_:1})):(n(),d(l,{key:1,cols:"4"},{default:s(()=>e[0]||(e[0]=[j(" ")])),_:1})),p.citation?(n(),d(l,{key:2,cols:"8"},{default:s(()=>[o(m,{"anchor-text":p.citation,data:p.link},null,8,["anchor-text","data"])]),_:2},1024)):p.bib_ref_note?(n(),d(l,{key:3,cols:"8"},{default:s(()=>[j(h(p.bib_ref_note),1)]),_:2},1024)):u("",!0)]),_:2},1024))),128))])}const si=w(ai,[["render",ni]]),ri={name:"ExternalReferences",components:{FormatedLink:M},inject:["parent_ac"],props:{objectId:{type:Number,default:0}},data(){return{external_refs:null,censusId:null}},watch:{objectId(){this.objectId&&(this.reset_data(),this.load_from_ts())}},created(){this.load_from_ts()},methods:{load_from_ts(){A.get_external_reference(this.objectId,this.$i18n.locale,this.parent_ac.signal).then(t=>{t&&t.references&&t.id==this.objectId&&(this.external_refs={},t.references.forEach(e=>{this.external_refs[e.ref_type]||(this.external_refs[e.ref_type]=[]),this.external_refs[e.ref_type].push({text:e.ref_source,uri:e.ref_link})}))})},reset_data(){this.external_refs=null},hasExternalDocuments(t){return t.text=="Census"?(this.censusId=t.uri.substring(t.uri.indexOf("censusID=")+9),!0):!1}}},oi={key:0,class:"text-body-2 mb-1"};function _i(t,e,a,r,i,_){const m=y("FormatedLink");return a.objectId&&i.external_refs?(n(),c("div",oi,[(n(!0),c($,null,T(i.external_refs,(p,b)=>(n(),c("span",{key:"ref"+b},[(n(!0),c($,null,T(p,(f,P)=>(n(),d(g,{key:"refs"+P,dense:""},{default:s(()=>[P==0?(n(),d(l,{key:0,cols:"4"},{default:s(()=>[I("h5",null,h(b)+":",1)]),_:2},1024)):(n(),d(l,{key:1,cols:"4"},{default:s(()=>e[0]||(e[0]=[j(" ")])),_:1})),o(l,{cols:"8"},{default:s(()=>[o(m,{data:f,"anchor-text":f.text,"text-as-link":""},null,8,["data","anchor-text"])]),_:2},1024)]),_:2},1024))),128))]))),128))])):u("",!0)}const ci=w(ri,[["render",_i]]),li={name:"References",components:{Literature:si,ExternalReferences:ci},props:{objectId:{type:Number,required:!0}},data(){return{has_bibliography:!1,has_external_references:!1}},watch:{objectId(){this.load_from_ts()}},created(){this.load_from_ts()},methods:{load_from_ts(){A.has_bibliography(this.objectId).then(t=>{this.has_bibliography=t.exists}),A.has_external_references(this.objectId).then(t=>{this.has_external_references=t.exists})}}},di={key:0};function ui(t,e,a,r,i,_){const m=y("Literature"),p=y("ExternalReferences");return i.has_bibliography||i.has_external_references?(n(),c("div",di,[o(R,{class:"mt-4"}),o(g,{class:"py-5 text-body-2"},{default:s(()=>[o(l,{cols:"12"},{default:s(()=>[I("h4",null,h(t.$t("label.references")),1)]),_:1})]),_:1}),i.has_bibliography?(n(),d(m,{key:0,"object-id":a.objectId},null,8,["object-id"])):u("",!0),i.has_bibliography&&i.has_external_references?(n(),d(g,{key:1,class:"my-1"},{default:s(()=>[o(l,{cols:"12"},{default:s(()=>[o(R,{inset:""})]),_:1})]),_:1})):u("",!0),i.has_external_references?(n(),d(p,{key:2,"object-id":a.objectId},null,8,["object-id"])):u("",!0)])):u("",!0)}const mi=w(li,[["render",ui]]),hi={key:0},fi={key:1},C={__name:"MetaDataRow",props:{headlineLabel:{type:String,default:""}},setup(t){return(e,a)=>(n(),d(g,{dense:""},{default:s(()=>[o(l,{cols:"4"},{default:s(()=>[t.headlineLabel?(n(),c("h5",hi,h(t.headlineLabel)+":",1)):(n(),c("span",fi," "))]),_:1}),o(l,{cols:"8"},{default:s(()=>[V(e.$slots,"default")]),_:3})]),_:3}))}},pi={key:0,class:"text-body-2"},bi={__name:"Repository",props:{objectId:{type:Number,required:!0}},setup(t){const{t:e,locale:a}=U(),r=t,i=Y("parent_ac"),_=ht({type:"",location:{name:"",iri:"",gnd:""},dating:{from:"",to:""},note:""}),m=q({}),p=q({}),b=q(""),f=q(!1);function P(){A.get_custody(r.objectId,a.value,i.signal).then(k=>{k&&k.custody&&k.id==r.objectId?(f.value=!0,_.type=k.custody.type||"",_.location=k.custody.location||{name:"",iri:"",gnd:""},_.dating=k.custody.dating||{from:"",to:""},_.note=k.custody.note||""):(_.type="",_.location={name:"",iri:"",gnd:""},_.dating={from:"",to:""},_.note="")}),A.get_location(r.objectId,i.signal).then(k=>{k&&k.location&&k.id==r.objectId?(f.value=!0,m.value=k.location):m.value={}}),A.get_inventory_no(r.objectId,i.signal).then(k=>{Object.keys(k).length&&(f.value=!0,k.old_inv_nos.length==0&&k.cur_inv_no.length>25?(b.value=k.cur_inv_no,p.value={}):(b.value="",p.value=k))})}function L(){if(_){const k=_.type,S=nt(_.dating,!1,e,a),F=_.note,H=[k,S,F].filter(at=>at);return console.log(H),H.join("; ")}return""}const N=ft(L);return z(()=>{f.value=!1,P()}),G(()=>r.objectId,()=>{f.value=!1,P()}),(k,S)=>f.value?(n(),c("span",pi,[o(R,{class:"mt-4"}),o(g,{class:"py-5"},{default:s(()=>[o(l,{cols:"12"},{default:s(()=>[I("h4",null,h(k.$t("label.repository")),1)]),_:1})]),_:1}),I("span",null,[_.location.name?(n(),d(C,{key:0,"headline-label":k.$t("label.collection")},{default:s(()=>[o(D,{data:_.location,path:"Institution"},null,8,["data"])]),_:1},8,["headline-label"])):u("",!0),Object.keys(m.value).length?(n(),d(C,{key:1,"headline-label":k.$t("label.location_places")},{default:s(()=>[o(D,{data:m.value,path:"Place"},null,8,["data"])]),_:1},8,["headline-label"])):u("",!0),p.value.cur_inv_no?(n(),d(C,{key:2,"headline-label":k.$t("label.location_inventory_no")},{default:s(()=>[j(h(p.value.cur_inv_no),1)]),_:1},8,["headline-label"])):u("",!0),(n(!0),c($,null,T(p.value.old_inv_nos,(F,H)=>(n(),d(C,{key:"inv"+H,"headline-label":H==0?k.$t("label.historic_inventory_no"):""},{default:s(()=>[j(h(F.inv_no),1)]),_:2},1032,["headline-label"]))),128)),N.value?(n(),d(C,{key:3,"headline-label":k.$t("label.acquisition")},{default:s(()=>[j(h(N.value),1)]),_:1},8,["headline-label"])):u("",!0),b.value?(n(),d(C,{key:4,"headline-label":k.$t("label.note")},{default:s(()=>[j(h(b.value),1)]),_:1},8,["headline-label"])):u("",!0)])])):u("",!0)}},yi={name:"MainPartTS",components:{AlternativeTitles:se,Production:Pe,Modification:ve,Find:Re,BaseFacts:Ba,Comment:Ma,Provenance:Ja,Cataloging:ei,References:mi,Repository:bi},props:{objectId:{type:Number,default:0}}},gi={key:0};function Pi(t,e,a,r,i,_){const m=y("AlternativeTitles"),p=y("Repository"),b=y("Production"),f=y("BaseFacts"),P=y("Find"),L=y("Provenance"),N=y("Modification"),k=y("Comment"),S=y("References"),F=y("Cataloging");return a.objectId?(n(),c("div",gi,[o(m,{"object-id":a.objectId},null,8,["object-id"]),o(p,{"object-id":a.objectId},null,8,["object-id"]),o(b,{"object-id":a.objectId},null,8,["object-id"]),o(f,{"object-id":a.objectId},null,8,["object-id"]),o(P,{"object-id":a.objectId},null,8,["object-id"]),o(L,{"object-id":a.objectId},null,8,["object-id"]),o(N,{"object-id":a.objectId},null,8,["object-id"]),o(k,{"object-id":a.objectId},null,8,["object-id"]),o(S,{"object-id":a.objectId},null,8,["object-id"]),o(F,{"object-id":a.objectId},null,8,["object-id"])])):u("",!0)}const Li=w(yi,[["render",Pi]]);export{wi as I,Li as O,A as d};