1import{u as S,_ as y}from"./TOuYLcaW.js";import{e as w,u as I,_}from"./DG16kNbC.js";import{f as x}from"./P5jpH95B.js";import{m as V,ae as z,w as D,C as H,Q as u,I as c,W as n,R as N,O as f,u as $,Y as l,X as i,aa as C,p as o}from"./DJGVO6Jq.js";const M=["id"],E={class:"overlay-content"},L=["innerHTML"],P={key:1,style:{color:"yellow","font-size":"1.5rem",background:"rgba(0,0,0,0.7)",padding:"10px","z-index":"10"}},U=V({inheritAttrs:!1,__name:"common-banner",props:{baseurl:String,baseparameter:String,complete_baseurl:String,componentId:Number,preview:Boolean,IsSmallerBanner:Boolean,Background:Object,Title:String,title:String,pageTitle:String},setup(B){const t=B,g=z(),{getImageData:h,getFullImageUrl:d}=w(),a=o(()=>{if(t.Background){const r=h(t.Background,t.Title?.replace(/\n/g,"")||"","");if(r&&r.url)return r}return null}),k=o(()=>{const r=t.IsSmallerBanner,e=g.IsSmallerBanner;return!!(r??e??!1)}),v=o(()=>{if(!k.value)return{};const r=t.Background?.width,e=t.Background?.height,s=r&&e?`${r} / ${e}`:"1920 / 680",T=e?`${e}px`:"400px";return{"--banner-aspect-ratio":s,"--banner-min-height":T}}),p=o(()=>t?.Background?.url?d(t?.Background?.url):t?.Background?.formats?.large?.url?d(t?.Background?.formats?.large?.url):a.value?.url?a.value.url:null),m=o(()=>{const r=t.Title||t.title||g.Title||g.title;return r!=null&&r!==""?r:t.pageTitle||""});D(()=>{const r=a.value?.url;if(!r)return;const s=S()(r,{quality:80,format:"webp"});I({link:[{rel:"preload",as:"image",href:s,fetchpriority:"high"}]})});const b=o(()=>!1);return H(()=>{}),(r,e)=>{const s=y;return u(),c("section",{id:r.$attrs.id,class:"common-banner",style:C(v.value)},[e[6]||(e[6]=n("div",{class:"banner-bg"},null,-1)),p.value?(u(),N(s,{key:0,src:p.value,width:a.value?.width||t.Background?.width,height:a.value?.height||t.Background?.height,alt:a.value?.alt||t.Title||"Banner image",loading:"eager",fetchpriority:"high",sizes:"100vw"},null,8,["src","width","height","alt"])):f("",!0),n("div",E,[m.value?(u(),c("h1",{key:0,innerHTML:$(x)(m.value)},null,8,L)):b.value?(u(),c("h1",P,[e[0]||(e[0]=l(" DEBUG: Title missing",-1)),e[1]||(e[1]=n("br",null,null,-1)),l(' Props.Title: "'+i(t.Title)+'"',1),e[2]||(e[2]=n("br",null,null,-1)),l(' Props.title: "'+i(t.title)+'"',1),e[3]||(e[3]=n("br",null,null,-1)),l(' Props.pageTitle: "'+i(t.pageTitle)+'"',1),e[4]||(e[4]=n("br",null,null,-1)),l(' Computed title: "'+i(m.value)+'"',1),e[5]||(e[5]=n("br",null,null,-1)),l(" Has Background: "+i(!!t.Background),1)])):f("",!0)])],12,M)}}}),q=_(U,[["__scopeId","data-v-3e608820"]]);export{q 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.