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