import{r as g,b as N,R as e,B as E,F as c,T as b,c as T,A as W,S as I,H as M,u as A,d as L,e as $}from"./index-7FhfNRPD.js";import{L as P}from"./loading-BKx1G5Wu.js";import D from"./subPage-D9zOw-sK.js";import{M as G}from"./index-Cr85L7t7.js";import{A as O}from"./index-B3SAaQLl.js";import{L as K}from"./index-CPPD8R2z.js";import{A as U,I as q,C as J,N as Q}from"./NewsContent-BsAYvTWr.js";import{u as V,a as F,R as X,B as w,b as Y,c as Z,C}from"./index-B_0gWLOk.js";import{C as ee}from"./index-BZeZEiaL.js";import{C as te}from"./index-Boa7Wo3s.js";import"./index-jsIXdPjR.js";import"./index-B_n3aO36.js";import"./Helmet-DipkOvWI.js";import"./index.esm-C0AHCyb7.js";function ne({lgCards:r,mdCards:n,smCards:t}){const[l,o]=V({slideChanged(){return i(o.current.track.details.rel)}},[]),[a,i]=g.useState(0),[f,m]=F(),p=a!==0,s=a<(r==null?void 0:r.length)-1,y=a<(n==null?void 0:n.length)-1,k=a<(t==null?void 0:t.length)-1;g.useEffect(()=>{m()},[]),window.addEventListener("resize",m);const u=N();if(f==="lg")return e.createElement(E,{pt:"24px"},e.createElement(c,{align:"center",p:"25px",border:" solid 1px",borderColor:(r==null?void 0:r.length)>1?"theme.colors.Grey2":"transparent",pl:(r==null?void 0:r.length)>1?"25px":"initial",borderRadius:"20px",gap:"24px"},p&&e.createElement(B,{current:a,setCurrent:i,instanceRef:o}),e.createElement(E,{ref:l,className:"keen-slider"},r==null?void 0:r.map((h,x)=>e.createElement(c,{className:"keen-slider__slide",key:x,gap:"24px"},h.map((_,d)=>e.createElement(c,{key:d,direction:"column",flex:1,pr:"28px",pl:d===0?"0":"28px",borderLeft:d===0?"none":`solid 2px ${u.colors.Grey2}`},e.createElement(b,{fontWeight:"600",letterSpacing:".03em",fontSize:"1.375rem",lineHeight:"1.875rem"},_.name),e.createElement(b,{fontWeight:"400",fontSize:"1rem",letterSpacing:".03em",lineHeight:"1.362rem",color:u.colors.Grey1},_.designations.join(", "))))))),s&&e.createElement(v,{current:a,setCurrent:i,instanceRef:o})),(r==null?void 0:r.length)>1&&e.createElement(c,{justify:"center",py:"24px",gap:".5rem"},r==null?void 0:r.map((h,x)=>e.createElement(E,{key:x,borderRadius:"full",minW:"10px",minH:"10px",border:`${u.colors.Black} solid 2px`,bgColor:a===x?u.colors.White:u.colors.Black}))));if(f==="md")return e.createElement(E,{pt:"24px"},e.createElement(c,{align:"center",p:"25px",border:" solid 1px",borderColor:(n==null?void 0:n.length)>1?u.colors.Grey2:"transparent",pl:(n==null?void 0:n.length)>1?"25px":"initial",borderRadius:"20px",gap:"24px"},p&&e.createElement(B,{current:a,setCurrent:i,instanceRef:o}),e.createElement(E,{ref:l,className:"keen-slider"},n==null?void 0:n.map((h,x)=>e.createElement(c,{className:"keen-slider__slide",key:x,gap:"24px"},h.map((_,d)=>e.createElement(c,{key:d,direction:"column",flex:1,pr:"28px",pl:d===0?"0":"28px",borderLeft:d===0?"none":`${u.colors.Grey3} solid 2px`},e.createElement(b,{fontWeight:"600",letterSpacing:".03em",fontSize:"1.125rem",lineHeight:"1.5rem"},_.name),e.createElement(b,{fontWeight:"400",fontSize:".875rem",letterSpacing:".03em",lineHeight:"1.25rem",color:u.colors.Grey2},_.designations.join(", "))))))),y&&e.createElement(v,{current:a,setCurrent:i,instanceRef:o})),(n==null?void 0:n.length)>1&&e.createElement(c,{justify:"center",py:"24px",gap:".5rem"},n==null?void 0:n.map((h,x)=>e.createElement(E,{key:x,borderRadius:"full",minW:"10px",minH:"10px",border:`${u.colors.Black} solid 2px`,bgColor:a===x?u.colors.White:u.colors.Black}))));if(f==="sm")return e.createElement(E,{py:"12px"},e.createElement(c,{align:"center",p:"25px",pl:(t==null?void 0:t.length)>1?"25px":"initial",border:" solid 1px",borderColor:(t==null?void 0:t.length)>1?u.colors.Grey2:"transparent",borderRadius:"20px",gap:"24px"},p&&e.createElement(B,{current:a,setCurrent:i,instanceRef:o}),e.createElement(E,{ref:l,className:"keen-slider"},t==null?void 0:t.map((h,x)=>e.createElement(c,{className:"keen-slider__slide",key:x,direction:"column",flex:1},e.createElement(b,{fontWeight:"600",letterSpacing:".03em",fontSize:"1rem",lineHeight:"1.25rem"},h.name),e.createElement(b,{fontWeight:"400",letterSpacing:".03em",fontSize:".75rem",lineHeight:"1rem",color:u.colors.Grey2},h.certifications)))),k&&e.createElement(v,{current:a,setCurrent:i,instanceRef:o})),(t==null?void 0:t.length)>1&&e.createElement(c,{justify:"center",py:"24px",gap:".5rem"},t.map((h,x)=>e.createElement(E,{key:x,borderRadius:"full",minW:"10px",minH:"10px",border:`${u.colors.Black} solid 2px`,bgColor:a===x?u.colors.White:u.colors.Black}))))}const v=({instanceRef:r})=>e.createElement(T,{onClick:()=>{var n;return(n=r.current)==null?void 0:n.next()},bg:"inherit"},e.createElement(te,null)),B=({instanceRef:r})=>e.createElement(T,{onClick:()=>{var n;return(n=r.current)==null?void 0:n.prev()},bg:"inherit"},e.createElement(ee,null));function z(){return z=Object.assign?Object.assign.bind():function(r){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var l in t)({}).hasOwnProperty.call(t,l)&&(r[l]=t[l])}return r},z.apply(null,arguments)}function re(r){const{data:n}=r,t=g.memo(ne),l=n,o=l.reduce((i,f,m)=>{const s=Math.floor(m/3);return i[s]||(i[s]=[]),i[s].push(f),i},[]),a=l.reduce((i,f,m)=>{const s=Math.floor(m/4);return i[s]||(i[s]=[]),i[s].push(f),i},[]);return e.createElement(e.Fragment,null," ",e.createElement(t,z({},r,{lgCards:a,mdCards:o,smCards:n})))}function ae({coPub:r,ctaGroup:n}){var t,l,o;return e.createElement(c,{justify:"space-between",direction:{base:"column",md:"row"},gap:{base:"20px",md:"0"},py:{base:"22px",md:"50px"}},r&&r!=="<p><span></span></p>"&&e.createElement(c,{justify:"start"},e.createElement(X,{data:r,px:"inital",w:"100%"})),(n.cta_button_1||n.cta_button_2||n.cta_button_3)&&e.createElement(c,{gap:{base:"11px",md:"13px"},direction:{base:"column",md:"row"},flexWrap:"wrap",justify:r?{base:"initial",md:"end"}:"initial"},(t=n.cta_button_1)==null?void 0:t.map((a,i)=>e.createElement(w,{refData:a,key:i,mx:{lg:"12px"}})),(l=n.cta_button_2)==null?void 0:l.map((a,i)=>e.createElement(w,{refData:a,key:i,mx:{lg:"12px"}})),(o=n.cta_button_3)==null?void 0:o.map((a,i)=>e.createElement(w,{refData:a,key:i,mx:{lg:"12px"}}))))}function ie(r){var k,u,h,x,_,d,H;const{ct:n}=r,[t,l]=g.useState(),[o]=Z(),[a,i]=g.useState(),[f,m]=g.useState(),p=window.location.pathname,s=N();g.useEffect(()=>{y()},[n]);async function y(){var j;const R=await W.getArticle(n,p,"en-us","article_details.author,related_resources.resource_entry");l(R[0]),i(()=>{var S;return o(new Date((S=R[0].article_details)==null?void 0:S.date).getTime(),"month_year")}),((j=R[0].article_details)==null?void 0:j.date_updated)!=null?m(()=>{var S;return o(new Date((S=R[0].article_details)==null?void 0:S.date_updated).getTime(),"month_year")}):m(null)}return e.createElement("main",{id:"main"},e.createElement(I,null),t?e.createElement(E,{h:"100%"},t.seo&&e.createElement(G,{data:t.seo,override:t}),e.createElement(O,null),e.createElement(K,{data:{title:"All Resources",href:"/resources"}}),e.createElement(E,{maxW:"1220px",mx:"auto",h:"100%"},e.createElement(U,{data:t,ct:n}),((k=t.article_details)==null?void 0:k.headline)&&e.createElement(c,{ml:{base:"35px",md:"50px",lg:"62px"},mr:{base:"35px",md:"50px",lg:"76px"},mb:{base:"12px",md:"28px",lg:"35px"},h:{base:"128px",md:"225px",lg:"347px"},bgImage:(h=(u=t.headline_banner)==null?void 0:u.image)==null?void 0:h.url,bgPos:"center",bgSize:"cover",bgRepeat:"no-repeat",borderRadius:"15px",textOverflow:"ellipsis"},e.createElement(c,{align:"center",justify:"center",borderRadius:"inherit",h:"100%",w:"100%",bgGradient:(x=t.headline_banner)==null?void 0:x.image_gradient},e.createElement(b,{as:"h1",fontFamily:"Lato",fontWeight:"800",fontSize:{base:"1.5rem",md:"2.5rem"},lineHeight:"3rem",textAlign:"center",color:(_=t.headline_banner)!=null&&_.white_text?s.colors.White:s.colors.Black},(d=t.article_details)==null?void 0:d.headline))),t.entry_summary&&e.createElement(b,{ml:{base:"35px",md:"50px",lg:"62px"},mr:{base:"35px",md:"50px",lg:"76px"},fontFamily:"Lato",fontSize:{base:".75rem",md:"1.563rem"},lineHeight:"1.875rem",letterSpacing:".015em",fontWeight:"800"},t.entry_summary),e.createElement(c,{gap:{base:"5%",lg:"6%"},h:"100%",ml:{base:"35px",md:"50px",lg:"62px"},mr:{base:"35px",md:"50px",lg:"76px"},direction:{base:"column-reverse",md:"row"},mt:!t.main_image&&{base:"12px",md:"28px",lg:"69px"}},e.createElement(c,{h:"100%",maxW:"100%",flex:1,direction:"column"},e.createElement(c,{borderBottom:`solid ${s.colors.Black} 1px`,pb:{base:"29px",md:"17px",lg:"24px"}},e.createElement(c,{flex:1},e.createElement(c,{direction:"column",gap:"11px",letterSpacing:".03%"},e.createElement(c,{gap:"1rem"},e.createElement(b,{fontSize:{base:".75rem",md:"1.563rem"},lineHeight:"2.125rem",fontWeight:"600"},"Published:"),e.createElement(b,{fontSize:{base:".75rem",md:"1.563rem"},lineHeight:"2.125rem",letterSpacing:".03%"},a)),e.createElement(c,{gap:"1rem"},f&&e.createElement(b,{fontSize:{base:".75rem",md:"1.563rem"},lineHeight:"2.125rem",fontWeight:"600"},"Last updated:"),e.createElement(b,{fontSize:{base:".75rem",md:"1.563rem"},lineHeight:"2.125rem"},f)))),e.createElement(c,{flex:1,justify:"end"},e.createElement(q,null))),e.createElement(re,{data:(H=t.article_details)==null?void 0:H.author}),(t.co_published_field||t.resource_entry_cta_buttons_)&&e.createElement(ae,{coPub:t.co_published_field,ctaGroup:t.resource_entry_cta_buttons_}),e.createElement(E,{id:"article",className:"Article-Body",mt:"29px"},e.createElement(Y,{data:t.article_body,rtecontainerpx:"initial",px:"initial",contained:"true"})),t.cpe_eligible&&e.createElement(J,{data:t,ct:n}))),t.related_resources.length===3&&e.createElement(le,{array:t.related_resources}))):e.createElement(P,{minH:"100vh"}))}const le=({array:r,index:n})=>{const[t,l]=F();g.useEffect(()=>{l()},[]);let o=r.slice(0,2);return t==="lg"&&(o=r),window.addEventListener("resize",l),e.createElement(c,{key:n,direction:"column",ml:{base:"35px",md:"50px",lg:"62px"},mr:{base:"35px",md:"50px",lg:"76px"},my:{lg:"65px"},gap:{sm:"28px",md:"41px",lg:"48px"}},e.createElement(M,{fontWeight:"700",fontSize:{base:"1.5rem",md:"2.5rem"}},"Related Resources"),e.createElement(c,{gap:"4%",justify:"space-between",direction:{base:"column",md:"row"}},o==null?void 0:o.map(a=>{var i;return(i=a==null?void 0:a.resource_entry)==null?void 0:i.map((f,m)=>{var p,s;return e.createElement(C,{key:m,data:f,titleProp:(p=f.tags_group)==null?void 0:p.type,overrideAlt:a.override_image_alt,override:(s=a.override_image)==null?void 0:s.url,my:"8px"})})})))};function ce({ct:r}){const n=A(),[t,l]=g.useState();async function o(a=0){const i=await W.checkResource(r[a],n.pathname);if(!Array.isArray(i)||i.length===0)return o(a+1);l(r[a])}return g.useEffect(()=>{o()},[]),t===L.newsArticle||t===L.newsBlurb?e.createElement(Q,{contentType:t}):t===$?e.createElement(ie,{ct:t}):t?e.createElement(D,{ct:t}):null}function Se(){const[r,n]=g.useState(),[t,l]=g.useState(),o=A();function a(){const m=o.pathname.split("/");let p;if(m.length>1)switch(m[1]){case"certify":l("certification_overview");break;case"train":l("training_overview");break;case"enterprise-services":l("enterprise_overview");break;case"c":l("corporate_landing_page");break;case"l":l("marketing_landing_page");break;case"lang":l("foreign_landing_page");break;default:l(`${m[1]}_overview`)}return m.length>2?(m.splice(m.length-1,1,":title"),p=m.join("/")):p=m,i(p)}async function i(m){const p=await W.getUID(m);p.length===1?n(p[0].uid):p.length>1?n(()=>{const s=[];return p.map(y=>{s.push(y.uid)}),[...s]}):n()}g.useEffect(()=>{a()},[]);const f=typeof r;return e.createElement(e.Fragment,null,f==="string"&&e.createElement(D,{ct:r,parent:t}),f==="object"&&e.createElement(ce,{ct:r}),f!=="string"&&f!=="object"&&e.createElement(P,{minH:"100vh"}))}export{Se as default};