1import{a as h,M as x,O as g,a4 as w,a7 as A,a9 as D}from"./DzmMXjjF.js";import{i as b}from"./D-_E0le2.js";import{u as F,t as M}from"./BZPLvFJg.js";import{g as y}from"./DzoEpPy7.js";const a=t=>({from:()=>t.publishFrom?.date??t.dateFrom?.date??null,to:()=>t.publishTo?.date??t.dateTo?.date??null}),L=async t=>{const{includeDateTo:s=!0,linkLabel:l,previewId:f,sortBy:p,teaserReferences:r=[]}=t;if(!r.length)return[];const{runWithContext:v}=h(),o=x(`teasers-manual-${f}`,()=>null);if(o.value)return o.value;const n=await g({references:r}),I=n.map(e=>e.teaserImage).filter(b),i=await v(()=>F(I,"TEASER")),m=await Promise.allSettled(n.filter(e=>!!e.showInThisLanguage&&w(a(e).from(),a(e).to())).map(async e=>{const c=[e?.tagsRemote??[],e.tags??[]].flat(),T=c?(await g({references:c}))?.map(R=>R.name):[],d=e.teaserImage&&i.value[e.teaserImage.referenceId]?M(i.value[e.teaserImage.referenceId]):void 0;return{headline:e.headline,description:e.description,aspectRatio:"16:9",image:d?{...d,altText:e.teaserImageAltText,title:e.teaserImageAltText,decorative:e.teaserImageDecorative}:void 0,dateFrom:a(e).from()??void 0,dateTo:s&&a(e).to()||void 0,altText:e.teaserImageAltText,link:{to:y(e),label:l.value},tags:T}}));A(m);const u=D(m).sort(p);return o.value=u,u};export{L as u};
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.