1import{E as e,e as t,g as l,a as o,j as a,b as n,c as s,d as i}from"./index-DvtYNCk9.js";import{e as r,r as d,C as c}from"./vendor-D8DBuDFK.js";import{c as m,A as u}from"./main-JXwh71rI.js";import{u as h,D as _}from"./embla-carousel-pagination-button-wlGxm2Jc.js";import{H as b,a as p}from"./arrow-right-2-CZ2MpXFb.js";const x=x=>{var g;const{id:v,component_content:j}=x,{isShowPagination:y,paginationPosition:w,isShowSubTitle:N,isShowTitle:C,titleTextPosition:f,headingSize:T,headingTag:D,titleTextColor:S,subTitleTextColor:k,buttonColor:I,buttonTextColor:E,buttonHoverColor:$,buttonTextHoverColor:H,showSliderArrows:L,preLoadImage:P,loadImageLazy:M}=JSON.parse(void 0===j?"{}":j),{componentDataDispatcher:R,contentModel:F,selectedIndex:V,scrollSnaps:A,DotButton:B,emblaRef:K,onDotButtonClick:z,scrollNext:G,scrollPrev:U}=(a=>{const{isAutoPlay:n,autoPlayTime:s,id:i,contentModel:c,modelInternalName:b}=r.propsParser(a),{WIDGET_CHECK_TRUE:p}=o,x={playOnInit:n===p,delay:parseInt(s)||1e3},[g,v]=m({active:!0,loop:!0,slidesToScroll:1},[u(x)]),j="hero-ssr";let y;const{setComponentDataDispatcher:w,componentDataDispatcher:N,isComponentLoaded:C}=e({id:i,modelInternalName:b,modelKeyForSSR:j});(null==c?void 0:c.trim().length)&&(y=JSON.parse(c)),d.useEffect((()=>{var e;C&&(w({type:t.fetchingData}),(null==(e=null==c?void 0:c.trim())?void 0:e.length)&&(async()=>{w({type:t.dataFetched,data:await l(y,b,j,i)})})())}),[c]);const f=d.useCallback((()=>{v&&v.scrollPrev()}),[v]),T=d.useCallback((()=>{v&&v.scrollNext()}),[v]),{selectedIndex:D,scrollSnaps:S,onDotButtonClick:k}=h(v);return{componentDataDispatcher:N,contentModel:c,selectedIndex:D,scrollSnaps:S,DotButton:_,emblaRef:g,onDotButtonClick:k,scrollNext:T,scrollPrev:f}})(x),{WIDGET_CHECK_TRUE:W}=o,{componentData:O}=R,J=[{width:1920},{width:1024},{width:768,aspect_ratio:"16:10",crop_gravity:"west"},{width:568,aspect_ratio:"16:13",crop_gravity:"west"},{width:450,aspect_ratio:"16:16",crop_gravity:"west"}],q=`${D}`;return a.jsxs(a.Fragment,{children:[a.jsx(n,{loaderClassName:"hero-carousel-section",contentModel:F,isLoading:null==R?void 0:R.isLoading,componentData:O}),(null==O?void 0:O.id)&&!(null==R?void 0:R.isLoading)&&a.jsxs(a.Fragment,{children:[a.jsx("style",{children:`#${v} .button-style:hover {\n background-color: ${$} !important;\n color: ${H} !important;\n }\n #${v} .button-style {\n background-color: ${I} !important;\n color: ${E} !important;\n }`}),a.jsx("section",{className:"mb-28 hero-carousal-main",children:a.jsxs("div",{className:"relative embla overflow-hidden",ref:K,children:[a.jsx("div",{className:"embla__container flex",children:null==(g=null==O?void 0:O.hero_carousel_com)?void 0:g.map(((e,t)=>a.jsxs("div",{className:"embla__slide hero-carousal-wrap relative basis-full shrink-0 min-w-0",children:[a.jsx("div",{className:"min-h-96 max-h-min-h-96 lg:min-h-[600px] lg:max-h-[600px] [&>picture]:min-h-[inherit] [&>picture]:max-h-[inherit] image-block",children:a.jsx(s,{src:(null==e?void 0:e.slide_image_emd)?null==e?void 0:e.slide_image_emd[0]:"",height:"600",width:"840",alt:(null==e?void 0:e.slide_heading_et)?null==e?void 0:e.slide_heading_et:"",name:`Hero_carousel${v}_${t}`,title:(null==e?void 0:e.slide_heading_et)?null==e?void 0:e.slide_heading_et:"",retina:!0,preLoad:P===o.WIDGET_CHECK_TRUE,lazyLoad:M===o.WIDGET_CHECK_TRUE,options:J,className:"w-full object-cover"})}),a.jsx("div",{className:"container absolute top-2/4 left-2/4 -translate-x-[50%] -translate-y-[50%] z-10 text-center content-block",children:a.jsxs("div",{className:`content-block-wrap ${f}`,children:[C===W&&(null==e?void 0:e.slide_heading_et)&&a.jsx(a.Fragment,{children:a.jsx(q,{className:`text-3xl lg:${T} font-secondary mb-4 heading`,style:{color:S},dangerouslySetInnerHTML:{__html:c.parseVariableValue(null==e?void 0:e.slide_heading_et)}})}),N===W&&(null==e?void 0:e.slide_sub_heading_et)&&a.jsx("p",{className:"text-sm mb-8 description last:mb-0",style:{color:k},dangerouslySetInnerHTML:{__html:c.parseVariableValue(null==e?void 0:e.slide_sub_heading_et)}}),(null==e?void 0:e.button_com)&&e.button_com[0].button_text_et&&a.jsx(i,{name:null==O?void 0:O.title,className:"button-primary button-large button-style",to:null==e?void 0:e.slide_button_link_et,dangerouslySetInnerHTML:{__html:c.parseVariableValue(null==e?void 0:e.button_com[0].button_text_et)}})]})})]},t.toString())))}),a.jsxs("div",{className:"embla__controls",children:[a.jsx("div",{className:"hidden lg:block embla__buttons embla-controls-buttons",children:L===W&&a.jsxs(a.Fragment,{children:[a.jsx("button",{"aria-label":"Arrow Prev",className:"absolute left-4 xl:left-[13.75rem] top-2/4 -translate-y-[50%] leading-[0] embla__prev embla-controls-embla-prev",onClick:U,children:a.jsx("i",{className:"icon w-8 h-8 lg:w-12 lg:h-12 [&>svg]:stroke-secondary",children:a.jsx(b,{})})}),a.jsx("button",{"aria-label":"Arrow Next",className:"absolute right-4 xl:right-[13.75rem] top-2/4 -translate-y-[50%] leading-[0] embla__next embla-controls-embla-next",onClick:G,children:a.jsx("i",{className:"icon w-8 h-8 lg:w-12 lg:h-12 [&>svg]:stroke-secondary",children:a.jsx(p,{})})})]})}),y===W&&a.jsx("div",{className:`container flex justify-center gap-x-3 absolute left-2/4 -translate-x-[50%] top-auto bottom-8 leading-[0] embla__dots embla-dots ${w}`,children:A.map(((e,t)=>a.jsx(B,{onClick:()=>z(t),className:"w-2 h-2 border border-secondary embla__dot".concat(t===V?" bg-secondary embla__dot--selected embla-dot--selected":"")},t)))})]})]})})]})]})};export{x 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.