1import{r as e,j as s}from"./react-vendor.B75MsAI9.js";import{t,p as a,h7 as r,U as i,a2 as n,a3 as l,o,a as d,w as c,a4 as p,h8 as m,O as u,D as g,s as h}from"./AuthModalContainer.D3JsQqnf.js";import{E as v,T as j,j as f}from"./main.DrmgIV4z.js";import{S as x}from"./SpSubFooter.Dy7Eq2hH.js";import{C as _}from"./CardTypeC.B5AVIvXJ.js";import{S as w}from"./SpCredits.De6hv2Ah.js";import{S as N}from"./SpSupportUs.DztLvq9x.js";import"./RTLProvider.Bmr48mpV.js";import"./LazyFontLoader.5DGfhuFK.js";import"./format.BkS4g1vO.js";import"./en-US.BYLOiXxf.js";import"./index.D9zZHK2i.js";const C=({viewport:p})=>{const m=t(),u=a(e=>e.viewport),g=a(e=>e.stem),h=a(e=>e.user),v=p||u,j=g.isFetchingAllPressReleaseData,f=g.allPressReleaseData,x=g.pressPagination,N=h.profile.id,C=h.profile.profile_type,b=h.profile,$="sp-press-container",[E,y]=e.useState(9);if(e.useEffect(()=>{m(r({limit:E}))},[m,E]),j&&9===E)return s.jsx(i,{});const S=e=>{const{gtmEvent:s}=e;window.dataLayer.push({category:c.pressNews,label:d.clickedPress,event:s,item_type:null,item_id:null,item_value:null,user_profile:C,user_id:N})};return s.jsxs("div",{className:$,children:[s.jsxs("div",{className:`${$}__header`,children:[s.jsx("p",{className:`${$}__header--text1`,children:"The Latest"}),s.jsx("h2",{className:`${$}__header--text2`,children:"Press Releases"})]}),s.jsxs("div",{className:`${$}__card-container`,children:[s.jsxs(n,{variant:"3up",children:[f.length>0&&f.map((e,t)=>{const a=e.pressReleaseCard;return s.jsx(_,{id:a.id,title:a.title,titleWordCount:35,date:a.startDate,description:a.description,img:a.cardImage&&a.cardImage.url,href:a.url,asset:a.assetImage&&a.assetImage.url,viewport:v,fullDate:!0,triggerEvents:()=>S({gtmEvent:"clicked_read"}),profile:b,shouldOpenNewPage:!0,directUrl:!0},a.id||t)}),x.total<E&&s.jsx(_,{id:"All Press Releases",title:"Previous Press Releases",date:"2015 - 2020",description:"Browse through our Press Release section to know more about the launch of our reading programmes on early years education, STEM learning and other such initiatives to promote a culture of reading for every child.",img:l.campaigns.prevCampaign,href:"/press",asset:l.specialAssets.asset4,viewport:v,isPreviousCampaign:!0,triggerEvents:()=>S({gtmEvent:"clicked_read"}),profile:b,shouldOpenNewPage:!0})]}),s.jsxs("div",{className:`${$}__btn-wrapper`,children:[x.total+1>E&&s.jsx(o,{variant:"primary-complement",parentClassName:`${$}__btn`,rounded:!0,size:"xxl",label:"Load More",onClick:()=>{E<x.total+1&&y(E+9)},loading:j}),s.jsx("p",{className:`${$}__pagination`,children:`Showing ${x.total+1>E?E:x.total+1} of ${x.total+1} Articles`})]})]}),s.jsxs(w,{children:[s.jsx("p",{children:"Illustrations by"}),s.jsx("br",{}),s.jsx("p",{className:`${$}__credit`,children:s.jsx("span",{children:f&&f.filter(e=>null!==e.pressReleaseCard.attribution).map(e=>e.pressReleaseCard.attribution).join(" | ")})})]})]})};C.propTypes={viewport:p.object};const b=()=>{const r="sp-news-container",p=t(),g=a(e=>e.viewport),h=a(e=>e.stem.isFetchingAllNewsData),v=a(e=>e.stem.allNewsData),j=a(e=>e.stem.newsPagination),f=a(e=>{var s;return null==(s=e.user.profile)?void 0:s.id}),x=a(e=>{var s;return null==(s=e.user.profile)?void 0:s.profile_type}),w=a(e=>e.user.profile),[C,b]=e.useState(9);if(e.useEffect(()=>{p(m({limit:C}))},[C,p]),h&&9===C)return s.jsx(i,{});const $=e=>{const{gtmEvent:s}=e;window.dataLayer.push({category:c.pressNews,label:d.clickedNews,event:s,item_type:null,item_id:null,item_value:null,user_profile:x,user_id:f})};return s.jsxs("div",{className:r,children:[s.jsx("div",{className:`${r}__header`,children:s.jsx("img",{className:`${r}__news-banner`,src:l.news.bannerImgD,alt:"nb"})}),s.jsxs("div",{className:`${r}__card-container`,children:[s.jsxs(n,{variant:"3up",children:[v.length>0&&v.map((e,t)=>{const a=e.newsSubCard[0],r=e.indvNewsPage;return s.jsx(_,{id:a.id,title:a.title,date:r.startDate,titleWordCount:40,description:a.description,img:a.cardImage&&a.cardImage.url,href:u.newsPage(r.url),viewport:g,fullDate:!0,triggerEvents:()=>$({gtmEvent:"clicked_read"}),profile:w,noAsset:!0,variant:"news"},t)}),j.total<C&&s.jsx(_,{id:"All News",title:"Previous News",date:"2015 - 2020",description:" Browse through our In the News section to know more about the launch of our reading programmes on early years education, STEM learning and other such initiatives to promote a culture of reading for every child.",img:l.campaigns.prevCampaign,href:"/in-the-news",viewport:g,isPreviousCampaign:!0,triggerEvents:()=>$({gtmEvent:"clicked_read"}),profile:w,noAsset:!0,variant:"news"})]}),s.jsxs("div",{className:`${r}__btn-wrapper`,children:[j.total+1>C&&s.jsx(o,{variant:"primary-complement",parentClassName:`${r}__btn`,rounded:!0,size:"xxl",label:"Load More",onClick:()=>{C<j.total+1&&b(C+9)},loading:h}),s.jsxs("p",{className:`${r}__pagination`,children:[`Showing ${j.total+1>C?C:j.total+1} of ${j.total+1}
1 Articles`," "]})]})]}),s.jsx("div",{className:`${r}__support-us`,children:s.jsx(N,{page:"news",userId:f,userType:x})})]})},$=["in-the-news","press-releases"],E=()=>{const{slug:t}=g(),r=h(),i=a(e=>e.viewport),n="sp-media-container",[l,o]=e.useState(0);if(e.useEffect(()=>{if(t){const e=$.indexOf(t);-1!==e&&o(e)}},[t]),t&&!$.includes(t))return s.jsx(v,{errorCode:404});const d=["In the News","Press Releases"],c=t||$[0],p=$.indexOf(c);return s.jsxs("div",{className:`${n}`,children:[s.jsxs(j,{align:"center",onTabChange:e=>{r(`/latest/${$[e]}`,{replace:!0}),o(e)},variant:"static-pages",setIndex:p,activeTabIndex:p,children:[s.jsx(f,{shouldUnloadContent:!1,parentClassName:`${n}__tab`,title:"IN THE NEWS",children:s.jsx(b,{viewport:i})}),s.jsx(f,{shouldUnloadContent:!1,parentClassName:`${n}__tab`,title:"PRESS RELEASE",children:s.jsx(C,{viewport:i})})]}),s.jsx(x,{nextLink:l<$.length-1?d[l+1]:d[0],nextLinkHref:`/latest/${$[l<$.length-1?l+1:0]}`,page:$[l]})]})};export{E 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.