PageSourceSearch

https://www.skycargo.com/static/js/media-library.50360.chunk.js

js skycargo.com collected 2026-09-24 21:27:50 UTC 26,529 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunkemirates_sc_frontend=self.webpackChunkemirates_sc_frontend||[]).push([[1165],{5740:function(e,t,l){l.d(t,{Z:function(){return s}});var n=l(1413),i=l(2791),a=l(184),r=(0,i.lazy)((function(){return l.e(7225).then(l.bind(l,9133))}));function s(e){return(0,a.jsx)(i.Suspense,{fallback:"",children:(0,a.jsx)(r,(0,n.Z)({},e))})}},3245:function(e,t,l){l.r(t),l.d(t,{default:function(){return w}});var n=l(885),i=l(2791),a=l(272),r=l(5161),s=l(5740),c=l(8638),o=l(3590),d=l(4238),u=l(184),p=function(e){var t=e.data,l=e.filterHeading,n=e.viewAllText,i=e.clearFilterText,a=e.applyFilterText,r=e.handleFilters,s=e.viewAllFilters,p=e.clearAllFilters,x=e.toggleFilter,g=e.viewAllDefault,h=e.setViewAllDefault,m=null!==sessionStorage.getItem("searchedProduct")?sessionStorage.getItem("searchedProduct").split(","):[],f=t&&t.length&&t.map((function(e){return e.isActive}));return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("div",{className:"py-5 px-4 lg:hidden relative",children:[(0,u.jsx)("div",{className:"text-[21px] font-semibold text-ek-grey-700 leading-[27px] tracking-[.42px]",children:l}),(0,u.jsx)("span",{className:"absolute right-0 top-0 z-10 p-4 mt-1 mr-1",onClick:function(){x(!1)},children:(0,u.jsx)(c.Z,{icon:"menu-close",className:"w-[16px] h-[16px] text-ek-grey-500"})})]}),(0,u.jsxs)("div",{className:"lg:pr-5",children:[(0,u.jsxs)("ul",{className:"text-sm font-normal text-black leading-[21px] tracking-[0.56px] overflow-y-auto lg:overflow-hidden list-none h-[calc(100vh-246px)] lg:h-full px-4 lg:px-0",children:[g&&!f.some(d.oN)?(0,u.jsxs)("li",{className:"cursor-pointer mb-5 flex items-center text-sm font-normal text-black leading-[21px] tracking-[0.56px] ".concat(m.length?"pointer-events-none opacity-30":""),onClick:function(){h(!1)},children:[(0,u.jsx)("span",{children:(0,u.jsx)(c.Z,{icon:"checkbox-checked",className:"mr-2 text-ek-red"})}),(0,u.jsx)("span",{children:n})]}):(0,u.jsxs)("li",{className:"cursor-pointer mb-5 flex items-center text-sm font-normal text-black leading-[21px] tracking-[0.56px] ".concat(m.length?"pointer-events-none opacity-30":""),onClick:function(){s(!f.every(d.oN))},children:[(0,u.jsx)("span",{children:(0,u.jsx)(c.Z,{icon:f.every(d.oN)?"checkbox-checked":"checkbox",className:"mr-2 text-ek-red"})}),(0,u.jsx)("span",{children:n})]}),t&&t.map((function(e,t){var l=e.isActive?"CLEAR":"APPLY";return(0,u.jsxs)("li",{className:"cursor-pointer mb-5 flex items-center ".concat(!m.length||m.includes(e.title)||e.isActive?"":"pointer-events-none opacity-30"),onClick:function(){r(l,e.title,!e.isActive,t)},children:[(0,u.jsx)("span",{children:(0,u.jsx)(c.Z,{icon:e.isActive?"checkbox-checked":"checkbox",className:"mr-2 text-ek-red"})}),(0,u.jsx)("span",{children:e.heading})]},"filter-item-".concat(t))}))]}),(0,u.jsxs)("div",{className:"rounded-t-lg flex justify-center flex-col p-4 lg:p-0 lg:mb-5 shadow-[0px_-3px_10px_0px_rgba(0,0,0,0.10)] lg:shadow-none",children:[(0,u.jsx)(o.Z,{title:a,type:"primary",size:"large",className:"w-full lg:hidden",btnClick:function(){x(!1)}}),(0,u.jsx)("div",{className:"text-base font-bold text-ek-red leading-6 tracking-[1.6px] text-center lg:text-left mt-[18px] lg:mt-0 ".concat(f.some(d.oN)||null!==sessionStorage.getItem("searchedProduct")&&""===sessionStorage.getItem("searchedProduct")?"opacity-100 cursor-pointer":"opacity-50 cursor-default pointer-events-none"),onClick:function(){p()},children:(0,u.jsx)("span",{children:i})})]})]})]})},x=function(e){var t=e.data,l=e.filtersListData,n=e.searchHeading,a=e.searchPlaceholder,r=e.userInput,s=e.setUserInput,o=e.setAllMedia,d=e.setSelectedDropdown,p=e.optionsDesktop,x=e.setNext,g=e.defaultCount,h=e.category,m=(0,i.useRef)(null),f=(0,i.useRef)(null),w=function(){s("");var e,n=[];l.filter((function(e,t){return l[t].isActive&&n.push(e.title.toLowerCase())})),e=t&&t.length&&t.filter((function(e){return 0===n.length?t:n.includes(e.category.toLowerCase())})),o(n.length===h.length?t:e),d(p[0]),x(g)};return(0,u.jsx)(u.Fragment,{children:(0,u.jsxs)("div",{ref:f,children:[n&&(0,u.jsx)("div",{className:"text-lg font-bold text-black mb-4 leading-[27px] tracking-[.36px]",children:n}),(0,u.jsxs)("div",{className:"relative w-full flex items-center lg:max-w-[614px]",children:[(0,u.jsx)("span",{className:"absolute left-4",children:(0,u.jsx)(c.Z,{icon:"search-outlined",className:"text-ek-red"})}),(0,u.jsx)("input",{ref:m,value:r,onChange:function(e){!function(e){var n=e.currentTarget.value;n=""!==n.trim()?e.currentTarget.value:"";var i,a=[],r=[];l.filter((function(e,t){return l[t].isActive&&r.push(e.title.toLowerCase())})),a=(i=n).length>
1=3&&""!==i?r.length===h.length?t&&t.length&&t.filter((function(e){return e.description.toLowerCase().includes(n.toLowerCase())})):t&&t.length&&t.filter((function(e){return(0===r.length||r.includes(e.category.toLowerCase()))&&e.description.toLowerCase().includes(n.toLowerCase())})):t&&t.length&&t.filter((function(e){return 0===r.length?t:r.includes(e.category.toLowerCase())&&e.description.toLowerCase().includes(n.toLowerCase())})),s(n),o(a),d(p[0]),x(g)}(e)},type:"text",name:"media-library-input",autoComplete:"off",placeholder:a,className:"border border-ek-grey-300 px-5 py-5 lg:py-[13px] pl-11 lg:pl-12 pr-12 rounded-lg focus:outline-none appearance-none tracking-[0.64px] w-full h-[47px] lg:h-[50px] text-ek-grey-500 placeholder:text-ek-grey-500 placeholder:lg:text-ek-grey-400 "}),""!==r&&(0,u.jsx)("span",{onClick:w,className:"absolute right-0 h-full items-center flex px-4 cursor-pointer",children:(0,u.jsx)(c.Z,{icon:"close",className:"text-ek-grey-400"})})]})]})})},g=l(9720),h=l(6674),m=function(e){var t=e.selectedDropdown,l=e.optionsDesktop,n=e.optionsMobile,i=e.changeMediaByDropdown,a=e.desktopShowAll;return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("div",{className:"hidden lg:block",children:[(0,u.jsx)("div",{className:"text-lg font-bold text-black mb-4 leading-[27px] tracking-[.36px] invisible",children:a}),(0,u.jsxs)("div",{className:"flex items-center",children:[(0,u.jsx)("label",{children:a}),(0,u.jsx)(h.ZP,{value:t,isSearchable:!1,className:"react-select-container md:ml-2.5 md:w-36 ".concat(g.Z.dropdown),classNamePrefix:"react-select",defaultValue:t,onChange:function(e){return i(e.value)},options:l})]})]}),(0,u.jsx)("div",{className:"lg:hidden",children:(0,u.jsx)("ul",{className:"flex gap-6 -mx-4 lg:mx-0 px-4 list-none overflow-auto whitespace-nowrap hide-scroll-appearance tabs_tabs__SOJP9}",children:n.map((function(e,l){return(0,u.jsx)("li",{onClick:function(t){i(e.value)},className:"text-base lg:text-lg relative tracking-[0.31px] lg:tracking-[0.36px] pb-2.5 border-b-2 ".concat(t.value===e.value?"font-bold border-ek-red cursor-default":"border-black/[0] cursor-pointer"),children:e.label},l)}))})})]})},f=l(2714),w=function(e){var t=e.data,l=e.arrowLeft,o=e.arrowRight,g=t.showMore,h=t.media,w=t.socialLinks,v=t.category,y=t.shareText,j=t.filterHeading,b=t.viewAllText,k=t.clearFilterText,N=t.applyFilterText,C=t.searchHeading,L=t.searchPlaceholder,A=t.desktopFilterTypes,Z=t.mobileFilterTypes,S=t.desktopShowAll,I=t.mobileShowAll,_=t.noResults,z=t.noResultsDescription,M=(0,i.useState)(9),T=(0,n.Z)(M,2),P=T[0],R=T[1],E=(0,i.useState)(0),F=(0,n.Z)(E,2),D=F[0],V=F[1],U=(0,i.useState)(!1),H=(0,n.Z)(U,2),Y=H[0],O=H[1],B=(0,i.useState)(!1),W=(0,n.Z)(B,2),q=W[0],J=W[1],G=(0,i.useState)(!0),K=(0,n.Z)(G,2),Q=K[0],X=K[1],$=(0,i.useState)(""),ee=(0,n.Z)($,2),te=ee[0],le=ee[1],ne=(0,i.useState)(h),ie=(0,n.Z)(ne,2),ae=ie[0],re=ie[1],se=v&&v.length&&v.map((function(e,t){return{title:e.innerhHeading,heading:e.heading,isActive:!1}})),ce=(0,i.useState)(se),oe=(0,n.Z)(ce,2),de=oe[0],ue=oe[1];(0,i.useEffect)((function(){}),[de]);var pe=de.filter((function(e,t){return e.isActive})),xe=(0,i.useCallback)((function(e,t){null!==e&&e.preventDefault(),O((function(e){return!e})),V(t);var l=window.location.href;!Y&&l.includes("?mediaId")&&window.history.replaceState(null,"",l.split("?mediaId")[0])}),[Y,O,V]);(0,i.useEffect)((function(){var e=h.map((function(e){return e.mediaId})),t=new URLSearchParams(window.location.search).get("mediaId");if(e.includes(t)){var l=h.findIndex((function(e){return e.mediaId===t}));xe(null,l)}else{var n=window.location.href;n.includes("?mediaId")&&window.history.replaceState(null,"",n.split("?mediaId")[0])}}),[xe,h]);var ge=(0,i.useState)(A[0]),he=(0,n.Z)(ge,2),me=he[0],fe=he[1],we=function(e,t,l,n){switch(e){case"APPLY":case"CLEAR":ve(e,t,l,n)}},ve=function(e,t,l,n){var i,a;i=l,a=n,de&&de.length&&de.map((function(e,t){return t===a&&(e.isActive=i),e})),ue(de);var r=[];de.filter((function(e,t){return de[t].isActive&&r.push(e.title)}));var s=r.map((function(e,t){return h.filter((function(t){return t.category.toLowerCase()===e.toLowerCase()}))})).flat(),c=de.map((function(e){return e.isActive}));s.length?re(s):c.some(d.oN)?re([]):re(h),le(""),fe(A[0]),R(9)},ye=function(e){J(e)},je=function(e){var t=e.card,l=e.index,n="video"===t.type.toLowerCase();return(0,u.jsxs)("div",{className:"relative",onClick:function(e){xe(e,l)},children:[(0,u.jsxs)("div",{className:"relative cursor-pointer",children:[(0,u.jsx)("img",{src:n?null===t||void 0===t?void 0:t.videoBackgroun
1dImageUrl:null===t||void 0===t?void 0:t.smallImageUrl,alt:"",className:"rounded-lg object-cover object-center w-full h-[193px] lg:h-[173px] bg-ek-grey-300",loading:"lazy"}),n&&(0,u.jsx)("button",{className:"absolute w-full h-full flex justify-center items-center top-0 left-0",children:(0,u.jsx)("img",{src:"/images/icons/circle-play.svg",alt:"play",loading:"lazy",width:64,height:64,className:"w-[54px] h-[54px] lg:w-16 lg:h-16"})})]}),(0,u.jsx)("div",{className:"py-5 text-sm lg:text-base text-ek-grey-700 leading-[21px] lg:leading-6",dangerouslySetInnerHTML:{__html:t.description}})]},l)};return(0,u.jsxs)("div",{children:[(0,u.jsxs)(a.Z,{className:"mt-[40px] lg:mt-[80px] mb-[40px] lg:mb-[80px]",children:[(0,u.jsxs)("div",{className:"lg:hidden pb-4 text-sm text-333 leading-[21px] tracking-[.56px]",children:[(0,u.jsx)("div",{className:"font-bold mb-1",children:j}),(0,u.jsxs)("div",{className:"bg-white flex items-center justify-between py-[10px] px-[15px] rounded-[7px] border border-ek-grey-200 min-h-[42px] cursor-pointer",onClick:function(){ye(!0)},children:[(0,u.jsx)("div",{className:"flex flex-wrap gap-2",children:pe.every(d.oN)?b:function(){if(de&&de.length)return de.map((function(e,t){return(0,u.jsxs)("span",{onClick:function(l){l.stopPropagation(),we("CLEAR",e.title,!e.isActive,t)},className:"relative inline-flex items-center text-white text-xs leading-[18px] tracking-[.24px] h-[30px] pr-9 pl-2 py-2 rounded-lg bg-ek-grey-500 ".concat(e.isActive?"":"hidden"),children:[e.title,(0,u.jsx)("span",{className:"px-2 h-full absolute right-0 top-0 flex items-center",children:(0,u.jsx)(c.Z,{icon:"close-circle",className:"text-ek-grey-300"})})]},"selected-filter-".concat(t))}))}()}),(0,u.jsx)("div",{className:"w-5 h-5 flex items-center justify-center",children:(0,u.jsx)(c.Z,{icon:"chevron-slim",className:"chevron-slim relative text-ek-red rotate-90"})})]})]}),(0,u.jsxs)("div",{className:"flex justify-between",children:[(0,u.jsxs)("div",{className:"".concat(q?"":"hidden"," lg:block w-full lg:w-[25%] xl:w-[calc(100%-786px)] 2xl:w-[calc(100%-806px)]"),children:[(0,u.jsx)("div",{className:"fixed rounded-t-lg w-full left-0 bottom-0 lg:bottom-auto bg-white lg:bg-transparent z-50\tlg:z-0 lg:relative",children:(0,u.jsx)(p,{data:de,filterHeading:j,viewAllText:b,clearFilterText:k,applyFilterText:N,handleFilters:we,viewAllFilters:function(e){X(!1);var t=de&&de.length&&de.map((function(t){return{title:t.title,heading:t.heading,isActive:!!e}}));ue(t),re(h),le(""),fe(A[0]),R(9)},clearAllFilters:function(){X(!1);var e=de&&de.length&&de.map((function(e){return{title:e.title,heading:e.heading,isActive:!1}}));ue(e),re(h),le(""),fe(A[0]),R(9)}
1,toggleFilter:ye,viewAllDefault:Q,setViewAllDefault:X})}),(0,u.jsx)("div",{className:"fixed inset-x-0 z-40 top-0 left-0 w-full h-full bg-black/50 backdrop-blur-[5px] lg:hidden"})]}),(0,u.jsxs)("div",{className:"w-full lg:w-[901px]",children:[(0,u.jsxs)("div",{className:"flex justify-between gap-4 lg:gap-5 flex-col lg:flex-row pb-[32px] lg:pb-[41px]",children:[(0,u.jsx)("div",{className:"lg:flex-1",children:(0,u.jsx)(x,{data:h,filtersListData:de,searchHeading:C,searchPlaceholder:L,userInput:te,setUserInput:le,setAllMedia:re,setSelectedDropdown:fe,optionsDesktop:A,setNext:R,defaultCount:9,category:v})}),(0,u.jsx)(m,{selectedDropdown:me,optionsDesktop:A,optionsMobile:Z,changeMediaByDropdown:function(e){var t=A&&A.length&&A.filter((function(t){return t.value===e}));fe(t[0]);var l=[];de.filter((function(e,t){return de[t].isActive&&l.push(e.title.toLowerCase())}));var n=h&&h.length&&h.filter((function(e,t){return(l.length===v.length||0===l.length||l.includes(e.category.toLowerCase()))&&e.description.toLowerCase().includes(te)})),i=h&&h.length&&h.filter((function(e,t){return l.length===v.length||0===l.length?"image"===e.type&&e.description.toLowerCase().includes(te):l.includes(e.category.toLowerCase())&&"image"===e.type&&e.description.toLowerCase().includes(te)})),a=h&&h.length&&h.filter((function(e,t){return l.length===v.length||0===l.length?"video"===e.type&&e.description.toLowerCase().includes(te):l.includes(e.category.toLowerCase())&&"video"===e.type&&e.description.toLowerCase().includes(te)}));"all"===e&&re(n),"image"===e&&re(i),"video"===e&&re(a),R(9)},desktopShowAll:S,mobileShowAll:I})]}),!ae.length&&(0,u.jsx)(f.Z,{title:_,description:z}),(0,u.jsx)(s.Z,{type:"LOADMORE",Cards:ae,nextValue:P,handleMoreCard:function(){R(P+9)},showMoreText:g,children:(0,u.jsx)(je,{card:t.card,index:t.index})})]})]})]}),(0,u.jsx)(r.Z,{shareText:y,socialLinks:w,media:ae,mediaIndex:D,isViewModalOpen:Y,handleViewModal:xe,arrowLeft:l,arrowRight:o,isYoutubeVideo:!1})]})}},5161:function(e,t,l){l.d(t,{Z:function(){return h}});var n=l(885),i=l(2791),a=l(3042),r=l(5986),s=l(272),c=l(2972),o=l(9720),d=l(5219),u=l(184),p=function(e){var t=e.isYoutubeVideo,l=e.media;return l.type&&"video"===l.type.toLowerCase()?t?(0,u.jsx)("iframe",{title:l.description,src:"https://www.youtube.com/embed/".concat(l.youtubeVideoEmbedID,"?enablejsapi=1"),width:"100%",height:"100%",allow:"autoplay",allowFullScreen:"allowfullscreen",className:"rounded-lg aspect-video w-full"}):(0,u.jsx)("iframe",{title:l.description,src:l.videoUrl,width:"100%",height:"100%",allow:"autoplay",allowFullScreen:"allowfullscreen",className:"lg:rounded-lg aspect-video w-full",scrolling:"no"}):(0,u.jsx)("div",{className:"swiper-slide group w-full items-center justify-center",children:(0,u.jsx)("img",{src:null===l||void 0===l?void 0:l.smallImageUrl,alt:"",className:"lg:rounded-lg max-h-full max-w-full mx-auto",loading:"lazy"})})},x=l(3039),g={primary:null,secondary:null},h=function(e){var t=e.shareText,l=e.socialLinks,h=e.media,m=void 0===h?[]:h,f=e.mediaIndex,w=e.isViewModalOpen,v=e.handleViewModal,y=e.arrowLeft,j=e.arrowRight,b=e.isYoutubeVideo,k=(0,i.useState)(0),N=(0,n.Z)(k,2),C=N[0],L=N[1],A=(0,i.useRef)(null),Z=(0,i.useRef)(null),S=(0,i.useRef)(null),I=(0,i.useRef)(null);(0,i.useEffect)((function(){A.current&&S.current&&Z.current&&(g.primary=new a.Z(A.current,{modules:[r.o3,r.W_],speed:800,effect:"fade",slidesPerView:"auto",spaceBetween:0,on:{slideChange:function(){L(this.realIndex),document.querySelectorAll("iframe").forEach((function(e){e.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*")}))}},navigation:{nextEl:S.current,prevEl:Z.current},thumbs:{swiper:g.secondary}}),g.primary.slideTo(f,0))}),[m.length,w,f]),(0,i.useEffect)((function(){w?d.Z.enable():d.Z.disable()}),[w]);var _=function(e){var t="next"===e;return(0,u.jsx)("button",{className:"absolute group top-4 lg:top-[50%] lg:-mt-[32px] z-10 ".concat(t?"right-4 lg:right-[50%] lg:-mr-[450px] 2xl:-mr-[550px]":"left-4 lg:left-[50%] lg:-ml-[450px] 2xl:-ml-[550px]"),ref:t?S:Z,children:(0,u.jsx)("span",{className:"flex justify-center group-[.swiper-button-disabled]:opacity-50 ".concat(t&&"flex-row-reverse"),children:(0,u.jsx)("span",{className:"rounded-md flex bg-ek-grey-600 w-6 h-6 lg:w-16 lg:h-16 items-center justify-center",children:(0,u.jsx)("img",{src:t?j:y,width:"",height:"",alt:"",loading:"lazy",className:"w-[24px] h-[24px] lg:w-[48px] lg:h-[48px] scale-50 lg:scale-100 group-[.swiper-button-disabled]:opacity-30"})})})})};return(0,u.jsx)(u.Fragment,{children:(0,u.jsx)(c.Z,{nodeRef:I,in:w,timeout:500,
1classNames:"modal",unmountOnExit:!0,children:(0,u.jsx)("div",{ref:I,className:"group",children:(0,u.jsxs)("div",{className:"fixed inset-0 w-full h-full z-50 flex justify-center",children:[(0,u.jsx)("div",{className:"w-full relative text-white\r transition duration-500 opacity-0\r translate-y-full group-[.modal-enter-active]:translate-y-0 group-[.modal-enter-done]:translate-y-0\r group-[.modal-exit]:translate-y-full\r group-[.modal-enter-active]:opacity-100 group-[.modal-enter-done]:opacity-100\r group-[.modal-exit]:opacity-0\r ",children:(0,u.jsxs)("div",{className:"h-full overflow-y-auto",children:[m&&m.length&&m.map((function(e,t){return C===t&&(0,u.jsxs)("div",{className:"w-full mx-auto h-auto relative px-5 py-10",children:[(0,u.jsx)("div",{className:"text-[21px] lg:text-2xl leading-[27.3px] lg:leading-8 text-left break-words pr-[60px] lg:pr-[100px]",children:C===t&&(0,u.jsx)("div",{className:"h-[82px] lg:h-[64px] ".concat(o.Z.desc),dangerouslySetInnerHTML:{__html:e.description}})}),(0,u.jsx)("button",{className:"absolute right-5 top-10 w-8 h-8 text-white text-4xl flex justify-center items-center",onClick:v,children:(0,u.jsx)("img",{src:"/images/icons/close.svg",width:28,height:28,loading:"lazy",alt:""})})]},t)})),(0,u.jsxs)(s.Z,{children:[m&&m.length>0&&(0,u.jsxs)("div",{className:"relative -mx-4 lg:mx-0",children:[(0,u.jsx)("div",{className:"swiper px-0 w-full lg:w-[700px] 2xl:w-[900px] h-[260px] lg:h-[342px] 2xl:h-[442px]",ref:A,children:(0,u.jsx)("div",{className:"swiper-wrapper flex lg:items-center w-full",children:m.map((function(e,t){return(0,u.jsx)("div",{className:"swiper-slide group w-full items-center justify-center",children:(0,u.jsx)(p,{isYoutubeVideo:b,media:e})},t)}))})}),(0,u.jsxs)("div",{className:"relative lg:static h-[50px] lg:h-auto",children:[_("prev"),_("next")]})]}),m&&m.length&&m.map((function(e,n){return C===n&&(0,u.jsx)(x.Z,{shareText:t,socialLinks:l,media:e,isNewsDetail:!1})}))]})]})}),(0,u.jsx)("div",{className:"absolute left-0 top-0 w-full h-full bg-black backdrop-blur-sm \n             transition duration-500 grid items-center justify-center -z-10\n             opacity-0 group-[.modal-enter-active]:opacity-100 group-[.modal-enter-done]:opacity-100\n             group-[.modal-exit]:opacity-0\n          ",onClick:v})]})})})})}},3039:function(e,t,l){var n=l(885),i=l(2791),a=l(3590),r=l(184);t.Z=function(e){var t=e.shareText,l=e.socialLinks,s=e.media,c=e.isNewsDetail
1s,o=(0,i.useState)(0),d=(0,n.Z)(o,2),u=d[0],p=d[1],x=function(e){var t="";switch(e){case"share":t=s.copyLinkURL;break;case"linkedin":t=s.linkedInURL;break;case"facebook":t=s.facebookURL;break;case"twitter":t=s.twitterURL;break;case"pinterest":t=s.pinterestURL;break;case"instagram":t=s.instagramURL}return t},g=function(e){return(0,r.jsxs)("span",{className:"transition-opacity ease-in duration-500 opacity-".concat(u," py-1 absolute -top-[40px] ").concat(c?"left-[30px]":"-left-[30px]"," bg-ek-red rounded rounded-lg w-[90px] text-white text-center text-xs"),children:[e,(0,r.jsx)("svg",{width:"16px",height:"16px",viewBox:"0 0 5140 4830",className:"absolute rotate-180 left-[50%] -ml-[6px] -mt-[2px]",children:(0,r.jsx)("g",{id:"layer1",fill:"#D71921",stroke:"none",children:(0,r.jsx)("path",{d:"M235 4540 c-7 -12 -156 277 1152 -2237 619 -1190 1131 -2163 1138 -2163 13 0 2286 4358 2289 4388 1 16 -124 17 -2286 20 -1474 1 -2289 -1 -2293 -8z"})})})]})},h=function(e,t){e.stopPropagation(),navigator.clipboard.writeText(x(t)),p(1),setTimeout((function(){p(0)}),1e3)};return function(){if(l&&l.length)return(0,r.jsxs)("div",{className:"".concat(c?"":"py-4"),children:[c&&(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)("span",{onClick:function(e){h(e,l[0].type)},children:(0,r.jsx)(a.Z,{type:"secondary",classes:"font-bold w-full lg:w-auto uppercase mb-8 lg:mb-4 px-[20px] pt-[11px] pb-[10px]",iconClassName:"",title:l[0].title,href:l[0].href,target:"_blank"})}),g(l[0].text)]}),(0,r.jsx)("div",{className:"pb-4 text-sm leading-[21px] font-normal ".concat(c?"text-black text-left":"text-white text-center"),children:t}),(0,r.jsx)("ul",{className:"flex gap-8 lg:gap-4 items-center !pl-0  ".concat(c?"justify-center lg:justify-start":"justify-center"),children:l.map((function(e,t){return(0,r.jsx)(r.Fragment,{children:(0,r.jsx)("li",{className:"relative cursor-pointer ".concat("share"===e.type&&c?"hidden":""," ").concat(e.isActive?"":"hidden"),children:"share"===e.type?(0,r.jsxs)(r.Fragment,{children:[!c&&(0,r.jsx)("a",{href:function(){return!1},title:e.title,onClick:function(t){t.stopPropagation(),h(t,e.type)},children:(0,r.jsx)("img",{src:e.icon,alt:e.title,loading:"lazy",width:24,height:24})}),!c&&g(e.text)]}):(0,r.jsx)(r.Fragment,{children:(0,r.jsx)("a",{href:function(){return!1},title:e.title,onClick:function(t){t.stopPropagation(),window.open(x(e.type),"","width=600,height=450, top=100, left=300")},target:"_blank",rel:"noreferrer",children:(0,r.jsx)("img",{className:"".concat(c?"w-[42px] lg:w-[24px] h-[42px] lg:h-[24px] m-[7px] lg:m-[0px]":""),src:e.icon,alt:e.title,loading:"lazy",width:24,height:24})})})},t)})}))})]})}()}},2839:function(e,t,l){l.r(t),l.d(t,{default:function(){return d}});var n=l(885),i=l(2791),a=l(5161),r="news-media-library_marqueebox__+xUE1",s=l(3590),c=l(9194),o=l(184),d=function(e){var t=e.data,l=e.arrowLeft,d=e.arrowRight,u=t.viewAllMedia,p=t.media,x=t.socialLinks,g=t.shareText,h=t.heading,m=t.description,f=(0,i.useState)(0),w=(0,n.Z)(f,2),v=w[0],y=w[1],j=(0,i.useState)(!1),b=(0,n.Z)(j,2),k=b[0],N=b[1],C=(0,i.useState)(p),L=(0,n.Z)(C,1)[0],A=(0,i.useState)(window.innerWidth),Z=(0,n.Z)(A,2),S=Z[0],I=Z[1],_=(0,i.useCallback)((function(e,t){null!==e&&e.preventDefault(),N(!k),y(t);var l=window.location.href;k&&l.includes("?mediaId")&&(window.location.href=l.split("?mediaId")[0])}),[k]);(0,i.useEffect)((function(){var e=document.documentElement;S>991?(e.style.setProperty("--w","300px"),e.style.setProperty("--margin","20p
1x")):(e.style.setProperty("--w","161px"),e.style.setProperty("--margin","10px"))}),[S]),(0,i.useEffect)((function(){var e=function(){I(window.innerWidth)};return window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}),[]),(0,i.useEffect)((function(){var e=[];p&&p.length&&p.map((function(t){return e.push(t.mediaId)}));var t=new URLSearchParams(window.location.search);if(e.includes(t.get("mediaId"))){var l=p&&p.length&&p.findIndex((function(e){return e.mediaId===t.get("mediaId")}));_(null,l)}document.documentElement.style.setProperty("--slides",Math.round(Math.ceil(L.length/2)))}),[L,_,p]);var z=function(e){var t=e.card,l=e.index;if(!t)return(0,o.jsx)("div",{className:"relative w-full p-[5px] lg:p-[10px]",onClick:function(e){_(e,l)},children:(0,o.jsxs)("div",{className:"rounded-lg w-[161px] h-[161px] lg:h-[300px] lg:w-[300px] bg-ek-grey-300 relative cursor-pointer",children:[(0,o.jsx)("img",{src:"",alt:"",onError:function(e){return e.target.style.display="none"},className:"rounded-lg object-cover object-center w-[161px] h-[161px] lg:h-[300px] lg:w-[300px]",loading:"lazy"}),(0,o.jsx)(s.Z,{title:"",type:"tertiary",size:"small",className:"absolute top-[10px] right-[10px] capitalize text-white !text-xs font-medium leading-5 tracking-wide whitespace-nowrap justify-center items-stretch rounded bg-black bg-opacity-60 !p-1",icon:"image",iconClassName:"w-5 h-5 -mt-0.5 ml-0 mr-1",iconleft:!0})]})},l);var n=!(!t.type||"video"!==t.type.toLowerCase());return(0,o.jsx)("div",{className:"relative w-full p-[5px] lg:p-[10px]",onClick:function(e){_(e,l)},children:(0,o.jsxs)("div",{className:"rounded-lg w-[161px] h-[161px] lg:h-[300px] lg:w-[300px] bg-ek-grey-300 relative cursor-pointer",children:[(0,o.jsx)("img",{src:n?null===t||void 0===t?void 0:t.videoBackgroundImageUrl:null===t||void 0===t?void 0:t.smallImageUrl,alt:"",onError:function(e){return e.target.style.display="none"},className:"rounded-lg object-cover object-center w-[161px] h-[161px] lg:h-[300px] lg:w-[300px]",loading:"lazy"}),n&&(0,o.jsx)("button",{className:"absolute w-full h-full flex justify-center items-center top-0 left-0",children:(0,o.jsx)("img",{src:"/images/icons/circle-play.svg",alt:"play",loading:"lazy",width:64,height:64,className:"w-[54px] h-[54px] lg:w-16 lg:h-16"})}),(0,o.jsx)(s.Z,{title:S>991&&t.type||"",type:"tertiary",size:"small",className:"absolute top-[10px] right-[10px] capitalize text-white hover:text-white !text-xs font-medium leading-5 tracking-wide whitespace-nowrap justify-center items-stretch rounded bg-black bg-opacity-60 !p-1 lg:mr[-8px]",icon:n?"video":"image",iconClassName:"w-5 h-5 -mt-0.5 ml-0 lg:mr-1 -mr-2",iconleft:!0})]})},l)},M=function(e,t){return e?t%2===0:t%2!==0},T=function(e){var t=e.cards,l=e.classNames,n=e.pos;return(0,o.jsx)("div",{className:"inline-block ".concat(l||""),children:Array.apply(0,Array(2)).map((function(e,l){return(0,o.jsx)(z,{card:t[n+l],index:n+l},l)}))})},P=function(e){var t=e.cards,l=e.offsetEven;return Array.apply(0,Array(Math.round(Math.ceil(t.length/2)))).map((function(e,n){return(0,o.jsx)(T,{cards:t,pos:2*n,count:2,classNames:"".concat(M(l,n)?"top-[75px] lg:top-[150px] relative":"")},n)}))};return(0,o.jsxs)("div",{className:"pt-[40px] lg:pt-[80px] pb-[40px] lg:pb-[80px] overflow-hidden w-full bg-white",children:[h&&(0,o.jsx)(c.Z,{className:"text-center",children:h}),m&&(0,o.jsx)("div",{className:"text-ek-grey-500 text-center tracking-[0.64px] mt-4 pb-6 lg:pb-10",dangerouslySetInnerHTML:{__html:m}}),L&&L.length&&(0,o.jsx)("div",{className:"block whitespace-nowrap",children:(0,o.jsx)("div",{className:"marqueebox inline-block w-full whitespace-nowrap h-[420px] lg:h-[800px] ".concat(r),children:(0,o.jsx)(P,{cards:L})})}),(0,o.jsx)(a.Z,{shareText:g,socialLinks:x,media:L,mediaIndex:v,isViewModalOpen:k,handleViewModal:_,arrowLeft:l,arrowRight:d,isYoutubeVideo:!1}),(0,o.jsx)("div",{className:"text-center px-4",children:(0,o.jsx)(s.Z,{type:"secondary",classes:"font-bold mt-6 w-full lg:w-auto lg:h-[50px]",title:u.title,href:u.href})})]})}},9720:function(e,t){t.Z={desc:"media-library_desc__5yM0E",dropdown:"media-library_dropdown__x+YzA"}}}]);
2//# sourceMappingURL=media-library.50360.chunk.js.map

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.