(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5877],{86274:function(l,e,i){"use strict";var n=i(85893);i(67294);var o=i(71449),d=i.n(o);e.Z=l=>(0,n.jsx)("div",{className:"".concat(d()["loading-spinner-container"]),children:(0,n.jsx)("div",{className:"".concat(d()["open-graph"]),children:(0,n.jsx)("div",{className:"".concat(d()["loading-spinner"]),style:{width:(null==l?void 0:l.loadertype)==="button"?"20px":"50px",height:(null==l?void 0:l.loadertype)==="button"?"20px":"50px"}})})})},55877:function(l,e,i){"use strict";i.d(e,{Z:function(){return S}});var n=i(85893),o=i(80822),d=i(43953),a=i(69417),t=i(15861),s=i(86886),r=i(67294),v=i(22135),c=i(41664),u=i.n(c),m=i(54048),h=i(69308),f=i(69956),p=i(54364),x=i(26613),g=i(11163),w=i(86274),j=i(87066),N=i(12963),b=i(23795),Z=i(98456),y=i(79388),k=i(25675),I=i.n(k),C=i(25512),T=i(76638),_=l=>{let{setLoading:e,...i}=l,[v,c]=(0,r.useState)([]),[u,m]=(0,r.useState)("15UCbu-rrNApew8OYorWtiiu78yUXo8tc"),[h,f]=(0,r.useState)([]),[p,x]=(0,r.useState)([]),[g,w]=(0,r.useState)(!1),[k,_]=(0,r.useState)(null),[S,L]=(0,r.useState)(!1),[D,P]=(0,r.useState)();(0,r.useEffect)(()=>{F(u)},[u]);let F=async l=>{let i="https://www.googleapis.com/drive/v3/files?q='".concat(l,"'+in+parents&fields=nextPageToken,files(name%2CthumbnailLink%2CwebContentLink%2CmimeType%2Cid%2CwebViewLink)&key=").concat("AIzaSyDT8YXCrcgm6urHih0_FkGT0u8hHejzde4");try{var n,o;let d=await j.Z.get(i);e(200===d.status?1:0);let a=d.data.files.filter(l=>"application/vnd.google-apps.folder"===l.mimeType);if(a.length>0){let l=a.map(async l=>{let e=await V(l.id);return e[0]}),e=await Promise.all(l);f(e)}P(null==d?void 0:null===(n=d.data)||void 0===n?void 0:n.nextPageToken),c(null==d?void 0:null===(o=d.data)||void 0===o?void 0:o.files),z(l)}catch(l){console.error("Failed to fetch data",l),c([])}},H=async()=>{let l="https://www.googleapis.com/drive/v3/files?q='".concat(u,"'+in+parents&fields=nextPageToken,files(name%2CthumbnailLink%2CwebContentLink%2CmimeType%2Cid%2CwebViewLink)&pageToken=").concat(D,"&key=").concat("AIzaSyDT8YXCrcgm6urHih0_FkGT0u8hHejzde4");try{var i,n;let o=await j.Z.get(l);e(200===o.status?1:0);let d=o.data.files.filter(l=>"application/vnd.google-apps.folder"===l.mimeType);if(d.length>0){let l=d.map(async l=>{let e=await V(l.id);return e[0]}),e=await Promise.all(l);f([...h,...e])}P(null==o?void 0:null===(i=o.data)||void 0===i?void 0:i.nextPageToken),c([...v,...null==o?void 0:null===(n=o.data)||void 0===n?void 0:n.files])}catch(l){console.error("Failed to fetch data",l)}},V=async l=>{let e="https://www.googleapis.com/drive/v3/files?q='".concat(l,"'+in+parents&fields=files(name%2CthumbnailLink%2CwebContentLink%2CmimeType%2CwebViewLink)&key=").concat("AIzaSyDT8YXCrcgm6urHih0_FkGT0u8hHejzde4","&pageSize=1");try{var i;let l=await j.Z.get(e);return null==l?void 0:null===(i=l.data)||void 0===i?void 0:i.files}catch(l){return console.error("Failed to fetch subfolder images",l),[]}},z=async l=>{let e=l;if(""===e){let l=await A(e);[].unshift(l),e=l.parentId}},A=async l=>{let e="https://www.googleapis.com/drive/v3/files/".concat(l,"?fields=id,name,parents&key=").concat("AIzaSyDT8YXCrcgm6urHih0_FkGT0u8hHejzde4");try{let l=await j.Z.get(e);return{id:l.data.id,name:l.data.name}}catch(l){return console.error("Failed to fetch folder info",l),{}}};(0,r.useEffect)(()=>{let l=setTimeout(()=>{w(!1)},1e3);return()=>clearTimeout(l)});let E=async()=>{m("15UCbu-rrNApew8OYorWtiiu78yUXo8tc"),x([]),w(!0)},M=async l=>{if("application/vnd.google-apps.folder"===l.mimeType){m(l.id);let e=[{name:l.name,id:l.id}];x(e)}w(!0)},X=l=>{window.open(l.webViewLink)};return(0,n.jsx)(o.Z,{component:"section",className:"drive-image-section ".concat((null==i?void 0:i.Class)?null==i?void 0:i.Class:""),children:(0,n.jsxs)(d.Z,{children:[(0,n.jsxs)(N.Z,{"aria-label":"breadcrumb",className:"bredcrum-list",children:[(0,n.jsx)(b.Z,{color:"inherit",className:"homeicon",onClick:E,children:(0,n.jsx)(T.Z,{})}),(0,n.jsx)(b.Z,{color:"inherit",className:"folder-name",onClick:E,children:"Start"}),p.map(l=>(0,n.jsx)(b.Z,{color:"inherit",className:"folder-name",children:null==l?void 0:l.name},null==l?void 0:l.id))]}),g?(0,n.jsx)(o.Z,{component:"div",className:"drive-loader",children:(0,n.jsx)(Z.Z,{})}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.ZP,{container:!0,rowSpacing:2,columnSpacing:2,children:null==v?void 0:v.map((l,e)=>{var i;let d=null==h?void 0:h.map(l=>l);return(0,n.jsx)(s.ZP,{item:!0,xs:12,sm:6,md:4,lg:3,children:(0,n.jsxs)(o.Z,{component:"div",className:"drive-box",children:[(0,n.jsx)(I(),{src:(null==l?void 0:l.thumbnailLink)?null==l?void 0:l.thumbnailLink:null===(i=d[e])||void 0===i?void 0:i.thumbnailLink,alt:null==l?void 0:l.name,width:220,height:147,className:"".concat((null==l?void 0:l.thumbnailLink)?"drive-inner":"drive-image "),onClick:()=>{(null==l?void 0:l.thumbnailLink)?X(l):M(l)}}),(null==l?void 0:l.thumbnailLink)?"":(0,n.jsxs)(t.Z,{children:[(0,n.jsx)(C.Z,{}),null==l?void 0:l.name]})]})},e)})}),D&&(0,n.jsx)(o.Z,{sx:{textAlign:"center",mt:5},className:"showmore-btn-main",children:(0,n.jsx)(a.Z,{onClick:()=>H(),className:"showmore-btn",children:"Show More"})})]}),(0,n.jsx)(y.Z,{open:S,onClose:()=>{L(!1),_(null)},className:"model-drive-image",children:(0,n.jsx)(o.Z,{className:"model-box",children:k&&(0,n.jsx)(I(),{src:null==k?void 0:k.webContentLink,alt:null==k?void 0:k.name,width:500,height:500,loading:"lazy",className:"popup-image"})})})]})})};function S(l){var e,i,c,j,N;let b=(0,g.useRouter)(),[Z,y]=(0,r.useState)((null==l?void 0:l.newsPage)===!0?0:(null==l?void 0:l.opinionsPage)===!0?1:(null==l?void 0:l.videoInterviewsPage)===!0?2:(null==l?void 0:l.PhotosPage)===!0?3:0),[k,I]=(0,r.useState)(0),C="Asia/Kolkata",[T,S]=(0,r.useState)(1),L=null==l?void 0:null===(e=l.data)||void 0===e?void 0:e.some(l=>{var e,i,n;let o=new Date(null==l?void 0:null===(e=l.fields)||void 0===e?void 0:e.date),d=new Date,a=null==l?void 0:null===(n=l.fields)||void 0===n?void 0:null===(i=n.newsTabCategory)||void 0===i?void 0:i.filter(l=>"News"===l&&0===Z||"Opinion"===l&&1===Z||"Video & Interviews"===l&&2===Z);return(null==a?void 0:a.length)>0&&o>=d}),[D,P]=(0,r.useState)(!0===L?7:6),F=()=>{S(parseInt(T+1)),P(D+6)},H=()=>{let l=document.getElementById("#targetindex");l?l.scrollIntoView({behavior:"smooth"}):console.warn("not found.")},V=()=>{S(T>1?parseInt(T-1):1),P(D-6);let l=setTimeout(()=>{H(),clearTimeout(l)},200)},z=()=>{let l=document.getElementById("#News");l?l.scrollIntoView({behavior:"smooth"}):console.warn("not found.")},A=l=>{I(0),z(),y(l)},E=null==l?void 0:null===(i=l.data)||void 0===i?void 0:i.filter(l=>{var e,i;let n=null==l?void 0:null===(i=l.fields)||void 0===i?void 0:null===(e=i.newsTabCategory)||void 0===e?void 0:e.filter(l=>"News"===l&&0===Z||"Opinion"===l&&1===Z||"Video & Interviews"===l&&2===Z);return(null==n?void 0:n.length)>0}).sort((l,e)=>{var i,n;return new Date(null==e?void 0:null===(i=e.fields)||void 0===i?void 0:i.date)-new Date(null==l?void 0:null===(n=l.fields)||void 0===n?void 0:n.date)}).slice(0,D),M=null==E?void 0:E.length,X=()=>{I(1)};return(0,r.useEffect)(()=>{if((null==l?void 0:l.newsPage)!=!0){let l;(l=document.getElementById("#News"))?l.scrollIntoView({behavior:"smooth"}):console.warn("not found.")}X()},[]),(0,n.jsx)(o.Z,{component:"section",className:"Media-filter-Section",id:"#News",children:(0,n.jsxs)(d.Z,{maxWidth:"xl",className:"media-filter-contain",children:[(0,n.jsx)(o.Z,{className:"tab-button-main",children:(null==l?void 0:null===(c=l.tabdata)||void 0===c?void 0:c.tabItem)&&(null==l?void 0:null===(N=l.tabdata)||void 0===N?void 0:null===(j=N.tabItem)||void 0===j?void 0:j.map((l,e)=>{var i;return(0,n.jsx)(o.Z,{className:"tab-btn-box",children:(0,n.jsx)(a.Z,{disableTouchRipple:!0,className:"tab-button ".concat(Z===e?"active":""),onClick:()=>{var i,n,o,d;A(e),(null==l?void 0:null===(i=l.fields)||void 0===i?void 0:i.tabName)==="Newsroom"&&b.push("/news"),(null==l?void 0:null===(n=l.fields)||void 0===n?void 0:n.tabName)==="Opinion"&&b.push("/media/opinion"),(null==l?void 0:null===(o=l.fields)||void 0===o?void 0:o.tabName)==="Videos"&&b.push("/media/videos"),(null==l?void 0:null===(d=l.fields)||void 0===d?void 0:d.tabName)==="Photos"&&b.push("/media/photos")},children:null==l?void 0:null===(i=l.fields)||void 0===i?void 0:i.tabName})},e)}))}),0==k?(0,n.jsx)(o.Z,{sx:{height:500,display:"flex",justifyContent:"center",alignItems:"center"},children:(0,n.jsx)(w.Z,{})}):(0,n.jsxs)(r.Fragment,{children:[0==Z&&(0,n.jsx)(o.Z,{component:"div",className:"newsroom-title-main",children:(0,n.jsx)(t.Z,{variant:"h6",className:"title",children:"Newsroom"})}),!0===L&&(0,n.jsx)(o.Z,{component:"div",className:"upcoming-latest-events",children:null==E?void 0:E.filter(l=>{var e;let i=new Date(null==l?void 0:null===(e=l.fields)||void 0===e?void 0:e.date),n=new Date;return i>=n}).slice(0,1).map((l,e,i)=>{var d,a,r,c,p,x,g,w,j,N,b,Z,y,k,I,T,_,S,L,D,P,F,H,V,z,A,E,M,X,O,Y,G,R,U;let q=(null==l?void 0:null===(d=l.fields)||void 0===d?void 0:d.excerpt)?(0,v.S)(null==l?void 0:null===(a=l.fields)||void 0===a?void 0:a.excerpt):"";return(0,n.jsxs)(s.ZP,{container:!0,className:"inner-content-box",children:[(0,n.jsx)(s.ZP,{item:!0,lg:7,md:7,sm:12,xs:12,children:(0,n.jsx)(o.Z,{component:"div",sx:{overflow:"hidden"},children:(0,n.jsx)(u(),{href:/^http/.test(null==l?void 0:null===(r=l.fields)||void 0===r?void 0:r.slug)?null==l?void 0:null===(c=l.fields)||void 0===c?void 0:c.slug:"/media/".concat(null==l?void 0:null===(p=l.fields)||void 0===p?void 0:p.slug),target:/^http/.test(null==l?void 0:null===(x=l.fields)||void 0===x?void 0:x.slug)?"_blank":"_self","aria-label":"layer-img",passHref:!0,children:(0,n.jsx)(o.Z,{component:"div",className:"image-main",sx:{backgroundImage:(null==l?void 0:null===(g=l.fields)||void 0===g?void 0:g.featuredImage)?"url(".concat(null==l?void 0:null===(b=l.fields)||void 0===b?void 0:null===(N=b.featuredImage)||void 0===N?void 0:null===(j=N.fields)||void 0===j?void 0:null===(w=j.file)||void 0===w?void 0:w.url,")"):"url(".concat(null==l?void 0:null===(I=l.fields)||void 0===I?void 0:null===(k=I.thumbnailImage)||void 0===k?void 0:null===(y=k.fields)||void 0===y?void 0:null===(Z=y.file)||void 0===Z?void 0:Z.url,")")},children:(0,n.jsx)(o.Z,{component:"div",className:"layer-img"})})})})}),(0,n.jsx)(s.ZP,{item:!0,lg:5,md:5,sm:12,xs:12,children:(0,n.jsxs)(o.Z,{component:"div",className:"content-boxes",children:[(0,n.jsxs)(o.Z,{component:"div",className:"content-flex-box",children:[(0,n.jsxs)(o.Z,{component:"div",children:[(null==l?void 0:null===(T=l.fields)||void 0===T?void 0:T.title)&&(0,n.jsx)(u(),{href:/^http/.test(null==l?void 0:null===(_=l.fields)||void 0===_?void 0:_.slug)?null==l?void 0:null===(S=l.fields)||void 0===S?void 0:S.slug:"/media/".concat(null==l?void 0:null===(L=l.fields)||void 0===L?void 0:L.slug),target:/^http/.test(null==l?void 0:null===(D=l.fields)||void 0===D?void 0:D.slug)?"_blank":"_self","aria-label":null==l?void 0:null===(P=l.fields)||void 0===P?void 0:P.title,passHref:!0,children:(0,n.jsx)(t.Z,{variant:"h5",className:"title",children:null==l?void 0:null===(F=l.fields)||void 0===F?void 0:F.title})}),(0,n.jsxs)(o.Z,{component:"div",className:"location",children:[(null==l?void 0:null===(H=l.fields)||void 0===H?void 0:H.locationicon)==="Location"&&(0,n.jsx)(h.Z,{}),(null==l?void 0:null===(V=l.fields)||void 0===V?void 0:V.locationicon)==="Virtual"&&(0,n.jsx)(f.Z,{}),(null==l?void 0:null===(z=l.fields)||void 0===z?void 0:z.location)&&(0,n.jsx)(t.Z,{variant:"p",children:null==l?void 0:null===(A=l.fields)||void 0===A?void 0:A.location})]}),q&&(0,n.jsx)(o.Z,{className:"description",dangerouslySetInnerHTML:{__html:q}})]}),(0,n.jsx)(o.Z,{component:"div",children:(null==l?void 0:null===(E=l.fields)||void 0===E?void 0:E.buttonLink)&&(0,n.jsx)(u(),{href:"/media/".concat((null==l?void 0:null===(M=l.fields)||void 0===M?void 0:M.buttonLink)?null==l?void 0:null===(X=l.fields)||void 0===X?void 0:X.buttonLink:"#"),"aria-label":"Learn More",passHref:!0,children:(0,n.jsxs)(t.Z,{className:"learn-more",children:["Learn More",(0,n.jsx)(m.Z,{className:"arrow-icon"})]})})})]}),(0,n.jsx)(o.Z,{component:"div",className:"date-boxes",children:(null==l?void 0:null===(O=l.fields)||void 0===O?void 0:O.date)&&(0,n.jsxs)(t.Z,{className:"post-date",children:[(0,n.jsx)("span",{className:"month",children:new Intl.DateTimeFormat("en-IN",{month:"short"}).format(new Date(null==l?void 0:null===(Y=l.fields)||void 0===Y?void 0:Y.date))}),(0,n.jsx)("span",{className:"day",children:new Intl.DateTimeFormat("en-IN",{day:"2-digit",timeZone:C}).format(new Date(null==l?void 0:null===(G=l.fields)||void 0===G?void 0:G.date))}),(0,n.jsx)("span",{className:"year",children:new Intl.DateTimeFormat("en-IN",{year:"numeric"}).format(new Date(null==l?void 0:null===(R=l.fields)||void 0===R?void 0:R.date))}),(0,n.jsx)("span",{className:"day-of-week",children:new Intl.DateTimeFormat("en-IN",{weekday:"short"}).format(new Date(null==l?void 0:null===(U=l.fields)||void 0===U?void 0:U.date))})]})})]})})]},e)})}),E&&(0,n.jsxs)(o.Z,{component:"div",className:"media-content ".concat(3===Z?"no-paddings":""),children:[(0,n.jsx)(s.ZP,{container:!0,rowSpacing:5,columnSpacing:3,children:null==E?void 0:E.map((l,e,i)=>{var d,a,r,c,p,x,g,w,j,N,b,Z,y,k,I,T,_,S,L,D,P,F,H,V,z,A,E,M,X,O,Y,G,R,U;let q=new Date(null==l?void 0:null===(d=l.fields)||void 0===d?void 0:d.date),B=new Date;if(q>=B&&0===e)return null;let W=(null==l?void 0:null===(a=l.fields)||void 0===a?void 0:a.excerpt)?(0,v.S)(null==l?void 0:null===(r=l.fields)||void 0===r?void 0:r.excerpt):"";return(0,n.jsx)(s.ZP,{item:!0,lg:4,md:6,sm:6,xs:12,id:e===(null==i?void 0:i.length)-1?"#targetindex":"",children:(0,n.jsxs)(o.Z,{component:"div",className:"inner-content-box",children:[(0,n.jsx)(o.Z,{component:"div",sx:{overflow:"hidden"},children:(0,n.jsx)(u(),{href:/^http/.test(null==l?void 0:null===(c=l.fields)||void 0===c?void 0:c.slug)?null==l?void 0:null===(p=l.fields)||void 0===p?void 0:p.slug:"/media/".concat(null==l?void 0:null===(x=l.fields)||void 0===x?void 0:x.slug),target:/^http/.test(null==l?void 0:null===(g=l.fields)||void 0===g?void 0:g.slug)?"_blank":"_self",passHref:!0,children:(0,n.jsx)(o.Z,{component:"div",className:"image-main",sx:{backgroundImage:(null==l?void 0:null===(w=l.fields)||void 0===w?void 0:w.featuredImage)?"url(".concat(null==l?void 0:null===(Z=l.fields)||void 0===Z?void 0:null===(b=Z.featuredImage)||void 0===b?void 0:null===(N=b.fields)||void 0===N?void 0:null===(j=N.file)||void 0===j?void 0:j.url,")"):"url(".concat(null==l?void 0:null===(T=l.fields)||void 0===T?void 0:null===(I=T.thumbnailImage)||void 0===I?void 0:null===(k=I.fields)||void 0===k?void 0:null===(y=k.file)||void 0===y?void 0:y.url,")"),transition:"transform 0.6s","&:hover":{transform:"scale(1.05)"}},children:(0,n.jsx)(o.Z,{component:"div",className:"layer-img"})})})}),(0,n.jsxs)(o.Z,{component:"div",className:"content-boxes",children:[(0,n.jsx)(o.Z,{component:"div",children:(null==l?void 0:null===(_=l.fields)||void 0===_?void 0:_.date)&&(0,n.jsxs)(t.Z,{className:"post-date",children:[(0,n.jsx)("span",{className:"month",children:new Intl.DateTimeFormat("en-IN",{month:"short"}).format(new Date(null==l?void 0:null===(S=l.fields)||void 0===S?void 0:S.date))}),(0,n.jsx)("span",{className:"day",children:new Intl.DateTimeFormat("en-IN",{day:"2-digit",timeZone:C}).format(new Date(null==l?void 0:null===(L=l.fields)||void 0===L?void 0:L.date))}),(0,n.jsx)("span",{className:"year",children:new Intl.DateTimeFormat("en-IN",{year:"numeric"}).format(new Date(null==l?void 0:null===(D=l.fields)||void 0===D?void 0:D.date))})]})}),(0,n.jsxs)(o.Z,{component:"div",className:"content-flex-box",children:[(0,n.jsxs)(o.Z,{component:"div",children:[(0,n.jsx)(u(),{href:/^http/.test(null==l?void 0:null===(P=l.fields)||void 0===P?void 0:P.slug)?null==l?void 0:null===(F=l.fields)||void 0===F?void 0:F.slug:"/media/".concat(null==l?void 0:null===(H=l.fields)||void 0===H?void 0:H.slug),target:/^http/.test(null==l?void 0:null===(V=l.fields)||void 0===V?void 0:V.slug)?"_blank":"_self",passHref:!0,children:(null==l?void 0:null===(z=l.fields)||void 0===z?void 0:z.title)&&(0,n.jsx)(t.Z,{variant:"h5",className:"title",children:null==l?void 0:null===(A=l.fields)||void 0===A?void 0:A.title})}),(0,n.jsxs)(o.Z,{component:"div",className:"location",children:[(null==l?void 0:null===(E=l.fields)||void 0===E?void 0:E.locationicon)==="Location"&&(0,n.jsx)(h.Z,{}),(null==l?void 0:null===(M=l.fields)||void 0===M?void 0:M.locationicon)==="Virtual"&&(0,n.jsx)(f.Z,{}),(null==l?void 0:null===(X=l.fields)||void 0===X?void 0:X.location)&&(0,n.jsx)(t.Z,{variant:"p",children:null==l?void 0:null===(O=l.fields)||void 0===O?void 0:O.location})]}),W&&(0,n.jsx)(o.Z,{className:"description",dangerouslySetInnerHTML:{__html:W}})]}),(0,n.jsx)(o.Z,{component:"div",children:(0,n.jsx)(u(),{href:/^http/.test(null==l?void 0:null===(Y=l.fields)||void 0===Y?void 0:Y.slug)?null==l?void 0:null===(G=l.fields)||void 0===G?void 0:G.slug:"/media/".concat(null==l?void 0:null===(R=l.fields)||void 0===R?void 0:R.slug),target:/^http/.test(null==l?void 0:null===(U=l.fields)||void 0===U?void 0:U.slug)?"_blank":"_self",passHref:!0,children:(0,n.jsxs)(t.Z,{className:"learn-more",children:["Learn More",(0,n.jsx)(m.Z,{className:"arrow-icon"})]})})})]})]})]})},e)})}),(0,n.jsxs)(o.Z,{component:"div",className:"showmore-btn-main",children:[M>7&&(0,n.jsxs)(a.Z,{onClick:()=>V(),className:"showmore-btn",disableTouchRipple:!0,children:["Show less ",(0,n.jsx)(p.Z,{className:"arrow-icon"})]}),M===D&&(0,n.jsxs)(a.Z,{onClick:()=>F(),className:"showmore-btn",disableTouchRipple:!0,children:["Show more ",(0,n.jsx)(x.Z,{className:"arrow-icon"})]})]})]}),3===Z&&(0,n.jsx)(_,{setLoading:I})]})]})})}},71449:function(l){l.exports={"loading-spinner-container":"style_loading-spinner-container__7Qv22","loading-spinner":"style_loading-spinner__IXAHa",spin:"style_spin__8uiO3","open-graph":"style_open-graph___5LlF"}}}]);