1import{d as ne,j as oe,E as ie,m as ue,v as le,l as ce,R as w,V as ve,B as de,c as z,o as p,f as $,a as x,e as n,w as me,b as I,u as a,G as r,A as he,n as G,q as u,t as D,g as E,F as pe,ad as fe,P as ge,ag as xe,r as ye,aP as _e,i as be}from"./BpBITFyr.js";import{a as Se,b as we,h as Ie,c as ke,_ as Ne}from"./hsvNumberFieldsToUseSeparator.CeTzgi3Z.js";import{_ as Pe,a as Te,b as He}from"./NavAndSections.Du4PKdvG.js";import{_ as Ce}from"./useLargeNumberFormatter.ZCLEE3Ks.js";import"./search.TxkIF3gr.js";const Re={key:0,class:"u-reg-width-column"},Ve={class:"u-reg-width-column hsv-detail-page-title"},Ae={class:"hsv-detail-page__eyebrow"},$e={"aria-hidden":"true",class:"hsv-detail-page__sticky-title txt-h1"},De=ne({__name:"Page",props:{content:{},id:{}},setup(i){const k=Se(),f={...i.content,...i.content.sharedHsvComponent.fields},K=we(f);xe(_e,K),Ie.value=i.content.sharedHsvComponent.fields.invalidImagePaths??[],ke.value=i.content.sharedHsvComponent.fields.numberFieldsToFormatAsNumbers??[];const X=ce(),v=oe(),L=ie(),{locale:Y}=ue(),y=Ce(Y.value),d=i.content.searchType==="names"?"pid":"lid",J=u(()=>{const t=v.query[d]??"";return t===""?"":/^\d{1,8}$/.test(t)?t:"invalid"});le({link:[{rel:"preconnect",href:`${X.public.hsv_api_base}search/names`}]});const _=i.content.searchType;let l=r(),M=r("idle"),N=r();w(J,t=>{if(!t)return;if(t==="invalid")throw ye({statusCode:404,statusMessage:"Page Not Found"});const{data:s,status:o,error:A}=k.item(t,l,_);l=s,M=o,N=A},{immediate:!0});const e=r(null),g=r(0),c=r(0),q=u(()=>e.value?.parentRoute.query),F=u(()=>q.value?.page??"1"),B=u(()=>({...q.value,page:g.value.toString()}));let m=r({data:null,error:null,status:"idle"});w(B,()=>{if(g.value===0)return;const t=r(),s=r("pending"),o=r(void 0);m=r({data:t,status:s,error:o}),k.search(i.content.searchType==="names"?"names":"sources",B,{data:t,status:s,error:o})}),w(m,()=>{if(!e.value)return;const t=m.value,s=t.data?.Results[c.value]?.id;e.value.items=t.data?.Results.map(o=>o.id),e.value.activeIndex=c.value,e.value.parentRoute.query.page=g.value.toString(),e.value.meta={total:t.data?.Summary.total??0,rows:t.data?.Summary.rows??0,page:t.data?.Summary.page??0,sortDir:t.data?.Summary.sort_order??"asc"},L.replace({query:{[d]:s}})});const P=u(()=>e.value?.parentRoute.fullPath),O=u(()=>e.value?.meta?e.value.meta.rows*(e.value.meta.page-1)+e.value.activeIndex+1:0),T=u(()=>f.detailsSearchSummary.replace("#NUMBER",y({digits:void 0,number:O.value})).replace("#TOTAL",y({digits:void 0,number:e?.value?.meta?.total??0}))),H=u(()=>f.detailsSearchSummaryShort.replace("#NUMBER",y({digits:void 0,number:O.value})).replace("#TOTAL",y({digits:void 0,number:e?.value?.meta?.total??0}))),C=u(()=>{const t=typeof v.params.path=="string"?[v.params.path]:v.params.path,s={previous:{disabled:null,href:"#"},next:{disabled:null,href:"#"}};return e.value?.activeIndex===void 0||!e.value?.items||!e.value?.meta||(e.value.activeIndex<e.value.items.length-1?s.next.href=`/${t?.join("/")??""}?${d}=${e.value.items[e.value.activeIndex+1]}`:Math.ceil(e.value.meta.total/e.value.meta.rows)===e.value.meta.page&&(s.next.disabled=!0),e.value.activeIndex>0?s.previous.href=`/${t?.join("/")??""}?${d}=${e.value.items[e.value.activeIndex-1]}`:e.value.meta.page===1&&(s.previous.disabled=!0)),s}),W=t=>{t.origin!==window.origin||t.data.type!=="hsvsearchinfo"||(e.value={parentRoute:t.data.parentRoute,activeIndex:t.data.activeIndex,items:t.data.items,meta:t.data.meta},e.value.activeIndex===void 0||!e.value.items?h.value=!1:h.value=!0)},b=t=>{if(e.value?.activeIndex===void 0||e.value?.items===void 0)return;const s=t==="prev"?e.value.activeIndex-1:e.value.activeIndex+1;if(s<0||s>=e.value.items.length)return;const o=e.value.items[s];o&&k.prefetchItem(o,i.content.searchType)},R=t=>{if(e.value?.activeIndex===void 0||e.value?.items===void 0)return;if(c.value=t==="prev"?e.value.activeIndex-1:e.value.activeIndex+1,c.value<0){m.value.status="pending",g.value=Number(F.value)-1,c.value=e.value.items.length-1;return}if(c.value>=e.value.items.length){m.value.status="pending",g.value=Number(F.value)+1,c.value=0;return}const s=e.value.items[c.value];L.replace({query:{[d]:s}}),e.value.activeIndex=c.value,b(t)},V=r(),j=r(!1),h=r(!1),S=u(()=>{if(l.value)return i.content.searchType==="names"?`${l.value.Person.first_name||""} ${l.value.Person.last_name}`.trim():l.value.Source.display_title}),U=fe("changePageTitle"),Z=()=>{U&&U(S.value??"")},ee=t=>{for(const s of t)j.value=!s.isIntersecting},te=()=>{if(!V.value)return;new IntersectionObserver(ee,{rootMargin:"-78px 0px 0px 0px",threshold:[1]}).observe(V.value)};return w(S,Z,{immediate:!0}),ve(()=>{if(!v.query[d]){const t=typeof v.params.path=="string"?[v.params.path]:v.params.path;de("/"+(t?.join("/")??""))}window.addEventListener("message",W),window.origin===window.opener?.origin&&window.opener.postMessage("hsvready"),te()}),(t,s)=>{const o=ge,A=he,ae=Ne,se=Te,re=Pe,Q=He;return p(),z(pe,null,[$(A,null,{default:me(()=>[a(M)==="pending"||a(m).status==="pending"?(p(),I(o,{key:0})):x("",!0)]),_:1}),a(N)?(p(),z("div",Re,[$(ae,{error:a(N)},null,8,["error"])])):x("",!0),n("div",{class:G(["hsv-detail-page",{isStuck:a(j)}])},[n("div",{class:G(["hsv-detail-page__mobile-nav-container u-bg-gray",{show:a(h)}])},[a(h)?(p(),I(se,{key:0,"summary-text":a(T),"summary-text-short":a(H),"next-prev-hrefs":a(C),"parent-path":a(P)||"",container:"mobile",onSearchNavClick:R,onSearchNavPrefetch:b},null,8,["summary-text","summary-text-short","next-prev-hrefs","parent-path"])):x("",!0)],2),n("div",Ve,[n("div",Ae,D(i.content.recordTypeText),1),n("h1",null,D(a(S)?.replaceAll("Â "," ")??" "),1),s[0]||(s[0]=n("p",{class:"hsv__description--beta"},[n("em",null,"See errors or have feedback on the new HSV?"),E("Â "),n("a",{href:"https://docs.google.com/forms/d/e/1FAIpQLScbVc97iX2Y-mtax5oxN97oE-lG33nR3H72o9xgyqASzOfoiA/viewform?usp=header"},"Use this form to submit feedback."),n("br"),E(" The data here will be updated every week. If you prefer it, "),n("a",{href:"https://www.ushmm.org/online/hsv/person_advance_search.php"},"the old interface"),E(" is still available. ")],-1))]),n("div",{ref_key:"stickyHeader",ref:V,class:"u-reg-width-column hsv-detail-page__sticky-header isPositionSticky"},[n("div",$e,D(a(S)??" "),1)],512),$(re,{"hsv-data":a(l),type:a(_)},null,8,["hsv-data","type"]),a(_)==="names"?(p(),I(Q,{key:0,"hsv-data":a(l),"search-nav-should-show":a(h),"summary-text":a(T),"summary-text-short":a(H),"next-prev-hrefs":a(C),"parent-path":a(P)||"",type:"names",content:f,onSearchNavClick:R,onSearchNavPrefetch:b},null,8,["hsv-data","search-nav-should-show","summary-text","summary-text-short","next-prev-hrefs","parent-path"])):x("",!0),a(_)==="sources"?(p(),I(Q,{key:1,"hsv-data":a(l),"search-nav-should-show":a(h),"summary-text":a(T),"summary-text-short":a(H),"next-prev-hrefs":a(C),"parent-path":a(P)||"",type:"sources",content:f,onSearchNavClick:R,onSearchNavPrefetch:b},null,8,["hsv-data","search-nav-should-show","summary-text","summary-text-short","next-prev-hrefs","parent-path"])):x("",!0)],2)],64)}}}),Be=Object.assign(be(De,[["__scopeId","data-v-2181d338"]]),{__name:"HSVDetailPage"});export{Be as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.