import{_ as v,o as s,c as a,a as n,n as d,d as w,b as h,i,l as x,k as _,t as p,f as T,w as g,v as b,aB as S,F as k,r as C,aZ as H}from"./entry.DPwc-EV0.js";import I from"./WebHTML-UohjwGfe.mjs";import{_ as L}from"./WebImage-BBQZzdK6.mjs";const B={props:{headingBackgroundColor:{type:String,required:!0},headingText:{type:[Object,String]},headingTextColor:{type:String,required:!0},subText:{type:String}},computed:{}},O={class:"leading-companies-heading-wrapper"},V={class:"leading-companies-heading"},M=["innerHTML"];function N(e,o,t,c,y,r){const u=x,m=I;return s(),a("div",O,[n("div",V,[n("div",{class:"logo-bar",style:d({backgroundColor:t.headingBackgroundColor,color:t.headingTextColor})},[w(u,{src:e.$ss.leaders.logo,alt:"Leaders Logo",class:"logo"},null,8,["src"]),t.headingText.text??t.headingText?(s(),h(m,{key:0,html:t.headingText.text??t.headingText,class:"heading-text"},null,8,["html"])):i("",!0)],4),t.subText?(s(),a("div",{key:0,class:"sub-text",innerHTML:t.subText},null,8,M)):i("",!0)])])}const ne=v(B,[["render",N]]),q={props:{company:{type:Object,required:!0},hoverBackgroundColor:{type:String,required:!0},hoverTextColor:{type:String,required:!0},isFlyoutHovered:{type:Boolean,default:!1},flyoutDirection:{type:String,default:"right"},numColumns:{type:Number}},emits:["hoverChange"],data(){return{hoverStatus:"off"}},computed:{isActive(){return this.hoverStatus==="on"||this.isFlyoutHovered}},methods:{handleHoverOn(){this.timeoutHoverOff&&clearTimeout(this.timeoutHoverOff),this.hoverStatus="on";const{left:e,right:o,top:t,height:c}=this.$el.getBoundingClientRect(),y=this.flyoutDirection,r=window.pageYOffset??0,u={x:y==="right"?o+8:e-450-8,y:r+t+c/2};this.$emit("hoverChange",{pos:u,company:this.company,direction:y,hoverStatus:this.hoverStatus})},handleHoverOff(){this.timeoutHoverOff=setTimeout(()=>{this.hoverStatus="off",this.$emit("hoverChange",{company:this.company,hoverStatus:this.hoverStatus,direction:this.flyoutDirection},this.timeoutHoverOff)},100)}}},R=["href"];function A(e,o,t,c,y,r){var m;const u=T;return s(),a("div",{class:"ebm-leading-companies-company",style:d({backgroundColor:r.isActive?t.hoverBackgroundColor:"transparent"}),onMouseover:o[0]||(o[0]=(...f)=>r.handleHoverOn&&r.handleHoverOn(...f)),onMouseleave:o[1]||(o[1]=(...f)=>r.handleHoverOff&&r.handleHoverOff(...f))},[n("a",{href:`/${t.company.id}`,style:d({color:r.isActive?t.hoverTextColor:""})},[_(p(t.company.name)+" ",1),(m=t.company.youtubeVideos)!=null&&m.edges.length?(s(),h(u,{key:0,icon:"mdi:video",class:"video-icon","icon-color":r.isActive?t.hoverTextColor:e.$ss.baseStyles.primaryColor},null,8,["icon-color"])):i("",!0)],12,R)],36)}const le=v(q,[["render",A],["__scopeId","data-v-9094ef02"]]),F={props:{company:{type:Object,required:!0},posX:{type:Number,required:!0},posY:{type:Number,required:!0},show:{type:Boolean,default:!1},direction:{type:String}},data(){return{height:0}},computed:{displayRightInfo(){return this.teaser||this.productSummary||this.contact},contentTransform(){this.updateHeight();let e=this.posY-this.height/2;const o=(window==null?void 0:window.pageYOffset)??0,t=(window==null?void 0:window.innerHeight)??null;return t&&e+this.height>o+t&&(e=o+t-this.height),e c))??[]},videos(){var e,o,t;return((t=(o=(e=this.company)==null?void 0:e.youtubeVideos)==null?void 0:o.edges)==null?void 0:t.map(({node:c})=>c))??[]},website(){var e;return(e=this.company)==null?void 0:e.website},profile(){var e,o;return(o=(e=this.company)==null?void 0:e.siteContext)==null?void 0:o.path}},async mounted(){await this.updateHeight()},methods:{async updateHeight(){var o,t,c;await this.$nextTick();const e=(c=(t=(o=this.$refs)==null?void 0:o.content)==null?void 0:t.getBoundingClientRect())==null?void 0:c.height;this.height!==e&&(this.height=e)}}},z={class:"info"},W={class:"info__left"},D={class:"logo"},Y={key:0,class:"info__right"},j=["innerHTML"],E=["innerHTML"],P={key:1,class:"about-person"},U={key:1,class:"featured-wrapper"},X={class:"heading"},Z=["href"],G={class:"featured"},J=["href"],K={key:2,class:"featured-wrapper"},Q={class:"heading"},$=["href"],ee={class:"featured"},te=["href"],re=["src","alt"];function oe(e,o,t,c,y,r){const u=x,m=H,f=L;return s(),h(S,{appear:"",name:"show"},{default:g(()=>[t.show?(s(),a("div",{key:0,class:b(["ebm-leader-popup",t.direction])},[n("div",{ref:"wrapper",class:"wrapper",style:d({transform:r.contentTransform})},[w(S,{name:"crossfade",mode:"out-in"},{default:g(()=>[n("div",{ref:"content",class:"ebm-leader-popup__content",style:d({borderLeft:t.direction==="right"?`8px solid ${e.$ss.baseStyles.primaryColor}`:"0",borderRight:t.direction==="left"?`8px solid ${e.$ss.baseStyles.primaryColor}`:"0"})},[t.direction==="right"?(s(),a("div",{key:0,class:"arrow",style:d({borderRight:t.direction==="right"?`8px solid ${e.$ss.baseStyles.primaryColor}`:0,borderLeft:t.direction==="left"?`8px solid ${e.$ss.baseStyles.primaryColor}`:0})},null,4)):i("",!0),n("div",z,[n("div",W,[n("div",D,[r.logoImgSrc?(s(),h(u,{key:0,src:r.logoImgSrc},null,8,["src"])):i("",!0)]),r.website?(s(),h(m,{key:0,link:r.website,class:"visit-site button",type:"link",color:e.$ss.baseStyles.primaryColor},{default:g(()=>[_(" Visit Site ")]),_:1},8,["link","color"])):i("",!0),r.profile?(s(),h(m,{key:1,link:r.profile,type:"link",class:"view-profile button",color:e.$ss.baseStyles.primaryColor,mode:"hollow"},{default:g(()=>[_(" View Profile ")]),_:1},8,["link","color"])):i("",!0)]),r.displayRightInfo?(s(),a("div",Y,[r.productSummary||r.teaser?(s(),a("div",{key:0,class:b(["company-info",r.contact?"company-info-border-bottom":""])},[r.productSummary?(s(),a("div",{key:0,class:"product-summary",innerHTML:r.productSummary},null,8,j)):i("",!0),r.teaser?(s(),a("div",{key:1,class:"about-company",innerHTML:r.teaser},null,8,E)):i("",!0)],2)):i("",!0),r.contact?(s(),a("div",P,[r.contactImgSrc?(s(),h(u,{key:0,class:"avatar",src:r.contactImgSrc},null,8,["src"])):i("",!0),_(" "+p(r.contactNameAndTitle),1)])):i("",!0)])):i("",!0)]),r.promotions.length?(s(),a("div",U,[n("div",X,[n("h4",{style:d({color:e.$ss.baseStyles.primaryColor,marginBottom:"8px"})}," Featured Products ",4),r.website?(s(),a("a",{key:0,href:r.website},"View more products >>",8,Z)):i("",!0)]),n("div",G,[(s(!0),a(k,null,C(r.promotions,l=>(s(),a("div",{key:l.id,class:"promotion"},[n("a",{href:l.linkUrl},[l.primaryImage&&l.primaryImage.src?(s(),h(f,{key:0,image:`${l.primaryImage.src.split("?")[0]}?auto=format,compress&fit=crop`,"aspect-ratio":"full-teaser",credit:l.primaryImage.credit,alt:l.primaryImage.alt,style:d({border:"1px solid "+e.$ss.baseStyles.primaryColor})},null,8,["image","credit","alt","style"])):i("",!0),n("h4",null,p(l.linkText),1)],8,J)]))),128))])])):i("",!0),r.videos.length?(s(),a("div",K,[n("div",Q,[n("h4",{style:d({color:e.$ss.baseStyles.primaryColor,marginBottom:"8px"})}," Featured videos ",4),n("a",{href:t.company.youtubeUrl},"View more videos >>",8,$)]),n("div",ee,[(s(!0),a(k,null,C(r.videos,l=>(s(),a("div",{key:l.id,class:"promotion"},[n("a",{href:l.url},[l.thumbnail?(s(),a("img",{key:0,src:l.thumbnail,alt:l.title,style:d({border:"1px solid "+e.$ss.baseStyles.primaryColor}),loading:"lazy"},null,12,re)):i("",!0),n("h4",null,p(l.title),1)],8,te)]))),128))])])):i("",!0),t.direction==="left"?(s(),a("div",{key:3,class:"arrow",style:d({borderRight:t.direction==="right"?`8px solid ${e.$ss.baseStyles.primaryColor}`:0,borderLeft:t.direction==="left"?`8px solid ${e.$ss.baseStyles.primaryColor}`:0})},null,4)):i("",!0)],4)]),_:1})],4)],2)):i("",!0)]),_:1})}const ce=v(F,[["render",oe]]);export{ne as _,le as a,ce as b};