import{r as u,u as k,R as e,F as s,T as d,B as y,L as S,c as F,H as O,j as C,I as V,d as B,S as X,k as G,e as I,l as L,a as Y,m as J,i as K}from"./index-Kh0MIfaC.js";import{a as Q}from"./index.esm-AZNJAsoo.js";import{M as Z}from"./Metadata-Dw1paw3o.js";import{A as ee}from"./AllAlert-tfZW460m.js";import{A as te,L as re}from"./AdBanner-Cdy8ywXl.js";import{F as T,f as P,c as ne,p as le,R as $,I as se,b as oe}from"./BlockContainer-CsMf_J54.js";function ie(t){const[r,n]=u.useState([]);return[r,()=>{var a,m,p,i,x,E,b,h,w;n([]);const o=[];((m=(a=t==null?void 0:t.tags_group)==null?void 0:a.industry)==null?void 0:m.length)>0&&o.push((p=t==null?void 0:t.tags_group)==null?void 0:p.industry),((x=(i=t==null?void 0:t.tags_group)==null?void 0:i.region)==null?void 0:x.length)>0&&o.push((E=t==null?void 0:t.tags_group)==null?void 0:E.region),((h=(b=t==null?void 0:t.tags_group)==null?void 0:b.subject)==null?void 0:h.length)>0&&o.push((w=t==null?void 0:t.tags_group)==null?void 0:w.subject),n(()=>[...o.flat(1)])}]}function ae({data:t,ct:r,ArticleTitle:n=null}){var E,b,h,w;const[l,o]=ie(t),[a,m]=u.useState(),[p]=ne(),i=k();u.useEffect(()=>{o(t),m(()=>{var c;return p((c=t==null?void 0:t.article_details)==null?void 0:c.date,"ap")})},[]);const x=c=>{const g=t.tags_group;let f="";const _=r!=="resource_entry"?"/news":"/resources";Object.keys(g).forEach(A=>{if(g[A].includes(c)){const R="tags",j="n_16_n",M=`${A}=${c}`,N={size:encodeURIComponent(j),"filters[0][field]":encodeURIComponent(R),"filters[0][values][0]":encodeURIComponent(M),"filters[0][type]":encodeURIComponent("all")},U=Object.entries(N).map(([D,q])=>`${D}=${q}`).join("&");f=`${_}?${U}`;return}}),window.location.href=f};return e.createElement(s,{direction:"column",align:"center",mr:"72px",ml:"62px",mt:"48px",mb:"27px"},e.createElement(s,{w:"100%",direction:{base:"column",md:"row"}},e.createElement(s,{flex:1}),e.createElement(s,{flex:1,justify:"center",align:"end"},e.createElement(s,{direction:"column",gap:r==="news_article"?"4px":r==="news_blurb"?"10px":"initial",mt:"4px",mb:{base:"5px",md:"initial"}},e.createElement(s,{flex:1,justify:"center",align:"center"},r!=="resource_entry"&&e.createElement(d,{color:i.colors.Grey130,fontSize:"0.875rem",fontWeight:"600",letterSpacing:".08em",lineHeight:"1.192rem"},a)),t&&t.tags_group&&((E=t.tags_group.internal_class)==null?void 0:E.includes("analysis"))&&e.createElement(y,{color:`${i.colors.Blue130}`,w:"max-content",textAlign:"center",px:"12px",mt:"8px"},e.createElement(d,{letterSpacing:"3.5%",fontWeight:"600",fontSize:"14px",lineHeight:"1.188rem",fontFamily:"Open Sans, semi-bold"},"ANALYSIS")),e.createElement(s,{flex:1,justify:"center",align:"center"},e.createElement(d,{fontWeight:"700",fontSize:"1rem",lineHeight:"1.362rem",letterSpacing:".045em",color:i.colors.Grey130},(h=(b=t==null?void 0:t.tags_group)==null?void 0:b.sections)==null?void 0:h.map((c,g)=>e.createElement(d,{key:g,textAlign:"center"},c.toUpperCase(),e.createElement("br",null))))))),e.createElement(s,{flex:1,justify:{base:"center",md:"end"},align:"start"},e.createElement(s,{direction:"column",gap:{md:"6px"}},e.createElement(s,{flex:1,justify:"end",align:"center"},r!=="resource_entry"&&e.createElement(s,{gap:"13px",align:"center",color:i.colors.Green130,fontSize:".875rem",lineHeight:"1.25rem",fontWeight:"600"},e.createElement(S,{href:"/news/subscriptions"},"Subscribe to Newsletters"),e.createElement(T,{icon:P.faArrowRightLong}))),e.createElement(s,{flex:1,justify:"end",align:"center"},r!=="resource_entry"&&e.createElement(s,{gap:"16px",align:"center",color:i.colors.Green130,fontSize:".875rem",lineHeight:"1.25rem",fontWeight:"600"},e.createElement(S,{href:"https://iapp.org/l/connect/"},"Advertise with the IAPP"),e.createElement(T,{icon:P.faArrowRightLong})))))),e.createElement(s,{gap:"5px",my:r==="news_blurb"?"16px":"24px",color:i.colors.Grey130,flexWrap:"wrap",align:"center",justify:"center"},l==null?void 0:l.map((c,g)=>e.createElement(F,{onClick:()=>x(c),key:g,size:"md",border:`2px solid ${i.colors.Grey130}`,bg:i.colors.White,fontFamily:"Lato",color:i.colors.Black},c))),r!=="resource_entry"&&e.createElement(s,{maxW:"912px",textAlign:"center"},e.createElement(O,{as:"h1",fontSize:{base:"1.25rem",md:"1.875rem",lg:"2.5rem"},fontFamily:"Lato",fontWeight:"800",lineHeight:{base:"1.5rem",md:"2.25rem",lg:"3rem"},letterSpacing:".015em"},n??((w=t.seo)==null?void 0:w.meta_page_title))))}function H(){return H=Object.assign?Object.assign.bind():function(t){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var l in n)({}).hasOwnProperty.call(n,l)&&(t[l]=n[l])}return t},H.apply(null,arguments)}const ce=({variant:t,fasize:r,...n})=>e.createElement(y,H({className:`${t||"fa-brands"} fa-linkedin ${r}`},n));function W(){return W=Object.assign?Object.assign.bind():function(t){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var l in n)({}).hasOwnProperty.call(n,l)&&(t[l]=n[l])}return t},W.apply(null,arguments)}const me=({variant:t,fasize:r,...n})=>e.createElement(y,W({className:`${t||"fa-brands"} fa-twitter ${r}`},n));function pe(){const t=k();return e.createElement(s,{direction:{base:"column",md:"row"},gap:{base:"5px",lg:"17px"}},e.createElement(s,{gap:{base:"5px",lg:"17px"},align:{base:"start",lg:"center"},mt:{md:"1rem",lg:"initial"}},e.createElement(S,{href:"https://www.linkedin.com/shareArticle?mini=true&url=@linkedURL&title=@Model.Title&summary=@Model.Summary",target:"_blank",title:"LinkedIn",isExternal:!0},e.createElement(s,{color:t.colors.White,bg:t.colors.Green130,borderRadius:"4000px",h:{base:"25px",md:"30px",lg:"52px"},w:{base:"25px",md:"30px",lg:"52px"},align:"center",justify:"center"},e.createElement(ce,{fasize:"2xl",transform:{base:"scale(.75)",md:"scale(1)",lg:"scale(1.5)"}}))),e.createElement(S,{href:"https://twitter.com/intent/tweet?text=@twitterText",target:"_blank",title:"Twitter",isExternal:!0},e.createElement(s,{color:t.colors.White,bg:t.colors.Green130,borderRadius:"4000px",h:{base:"25px",md:"30px",lg:"52px"},w:{base:"25px",md:"30px",lg:"52px"},align:"center",justify:"center"},e.createElement(me,{fasize:"2xl",transform:{base:"scale(.75)",md:"scale(1)",lg:"scale(1.5)"}})))),e.createElement(s,{gap:{base:"5px",lg:"17px"},align:{base:"start",lg:"center"},mt:{md:"1rem",lg:"initial"}},e.createElement(S,{href:"https://www.facebook.com/sharer/sharer.php",target:"_blank",title:"Facebook",isExternal:!0},e.createElement(s,{color:t.colors.White,bg:t.colors.Green130,borderRadius:"4000px",h:{base:"25px",md:"30px",lg:"52px"},w:{base:"25px",md:"30px",lg:"52px"},align:"center",justify:"center"},e.createElement(C,{faIcon:"fa-square-facebook",variant:"fa-brands",fasize:"2xl",transform:{base:"scale(.75)",md:"scale(1)",lg:"scale(1.5)"}}))),e.createElement(s,{as:"button",onClick:()=>window.print(),color:t.colors.White,bg:t.colors.Green130,borderRadius:"4000px",h:{base:"25px",md:"30px",lg:"52px"},w:{base:"25px",md:"30px",lg:"52px"},align:"center",justify:"center","aria-label":"Print"},e.createElement(C,{faIcon:"fa-print",fasize:"2xl","aria-label":"Print",transform:{base:"scale(.75)",md:"scale(1)",lg:"scale(1.5)"}}))))}function ge(){return e.createElement(F,{ml:"19px",size:{base:"small",md:"medium"},variant:"secondarygreen",as:S,href:"https://iapp.org/certify/cpe-submit/",target:"_blank"},"Submit for CPEs")}const ue="/assets/CPE_eligible-Cq5MUkz4.png";function fe(t){const{ct:r}=t,n=k();return e.createElement(s,{direction:"column",gap:"16px",borderTop:r==="resource_entry"?"solid #ABABAB 1px":`solid ${n.colors.Black} 1px`,w:"100%",my:"20px",pt:"20px",pb:"4px",px:"4px",textAlign:"center",alignSelf:"center"},e.createElement(s,{direction:{base:"column",lg:"row"},align:{base:"stretch",lg:"center"},justify:{base:"center",lg:"space-between"},w:"100%",bg:n.colors.Grey10,p:"24px",mx:"auto"},e.createElement(s,{align:"center",w:{base:"100%",lg:"auto"},mb:{base:"16px",lg:"0"}},e.createElement(y,{w:"64px",h:"64px",flexShrink:0},e.createElement(V,{src:ue,alt:"CPE credit badge",w:"64px",h:"64px"})),e.createElement(d,{fontSize:{base:"12px",lg:"16px"},color:n.colors.Black,fontStyle:"italic",textAlign:{base:"left",lg:"left"},ml:{base:"16px",lg:"24px"},flex:{base:"1 1 auto",lg:"1 1 auto"}},"This article is eligible for Continuing Professional Education credits. Please self-submit according to CPE policy guidelines.")),e.createElement(y,{w:{base:"100%",lg:"auto"},textAlign:"center",mt:{base:"16px",lg:"0"}},e.createElement(ge,null))),r!=="resource_entry"&&e.createElement(s,{fontSize:".875rem",lineHeight:"1.25rem",fontWeight:"600",color:n.colors.Green130,align:"center",mt:"24px"},e.createElement(S,{href:"/news/write-for-us"},"Interested in writing for us? Visit our Contributor Guidelines"," ",e.createElement(d,{as:"span",whiteSpace:"nowrap"},"Page ",e.createElement(y,{className:"fa-solid fa-arrow-right-long",ml:"16px"})))))}function xe(t){const{data:r,time:n}=t,l=k();return e.createElement(s,{direction:"column"},e.createElement(s,{direction:"column",gap:"16px"},r==null?void 0:r.map((o,a)=>e.createElement(s,{key:a,direction:"column"},o.name&&e.createElement(d,{fontWeight:"700",letterSpacing:"0px",fontSize:{base:"1rem",md:"1.25rem"},lineHeight:{base:"1.531rem",md:"1.875rem"}},o.name),o.contributor_type&&e.createElement(d,{fontWeight:"400",letterSpacing:"0px",fontSize:{base:".875rem",md:"1rem"},lineHeight:{base:"1.188rem",md:"1.563rem"},mt:{base:"2px",md:"5px"},mb:{base:"5px",md:"initial"}},o.contributor_type),o.designations&&e.createElement(d,{color:l.colors.Grey130,fontWeight:"400",letterSpacing:{base:".03em"},fontSize:{base:".875remrem",md:"1rem"},lineHeight:{base:"1.188rem",md:"1.362rem"}},o.designations.join(", "))))),n&&e.createElement(d,{color:l.colors.Grey130,fontWeight:"400",letterSpacing:{base:".03em"},fontSize:{base:".875rem"},lineHeight:{base:"1.188rem"},mt:{base:"5px",md:"2px"}},`${n} Minute Read`))}function be(t){const[r,n]=u.useState([]),{data:l}=t;u.useEffect(()=>{l.length<5?a():n(l.slice(0,5))},[l]);const o=k();async function a(){const m=5-l.length,p=m>0?await B.getLimitedEntries("news_article",m,"article_details.date"):[],i=m>0?await B.getLimitedEntries("news_blurb",m,"article_details.date"):[],x=p.concat(i);x.sort((b,h)=>new Date(h.article_details.date)-new Date(b.article_details.date));const E=x.slice(0,m);n([...l,...E])}return e.createElement(s,{direction:"column",gap:"16px",mb:{base:"34px",md:"83px",lg:"48px "}},e.createElement(O,{fontSize:{base:"1rem",md:"1.25rem"},lineHeight:"1.2",letterSpacing:"0px",fontWeight:"700"},"Related stories"),e.createElement(s,{direction:"column",gap:{base:"43px",md:"8xp",lg:"45px"}},r.slice(0,5).map((m,p)=>{var i;return e.createElement(S,{key:p,href:m.url},e.createElement(s,{borderLeft:"solid 3px",borderLeftColor:o.colors.Green130,minH:{base:"63px",md:"53px",lg:"63px"}},e.createElement(d,{noOfLines:3,ml:"18px",fontFamily:"Lato",fontSize:{base:"0.875rem",md:"1rem"},fontWeight:"700",lineHeight:"1.2"},(i=m.article_details)==null?void 0:i.headline)))})))}function de(t){const{data:r,numOfSlots:n}=t,[l,o]=u.useState(),[a,m]=u.useState(),[p,i]=u.useState(),[x,E]=u.useState(),b=k(),h=[l&&g(l),a&&g(a),p&&g(p),x&&g(x)];u.useEffect(()=>{w()},[r]);function w(){c(r==null?void 0:r.slot_1,o),c(r==null?void 0:r.slot_2,m),c(r==null?void 0:r.slot_3,i),c(r==null?void 0:r.slot_4,E)}function c(f,_){var z;const A=[];(z=f==null?void 0:f.advertisement_blocks)==null||z.map(R=>{var j;return((j=R.publish_details)==null?void 0:j.time)&&A.push(R)}),_(A)}function g(f){var _;return(_=f[0])==null?void 0:_.ad[Math.floor(Math.random()*f[0].ad.length)]}return e.createElement(s,{direction:"column",w:"100%",gap:"34px",mb:"34px"},h.slice(0,n).map((f,_)=>{var A;if(f)return e.createElement(S,{key:_,href:f.link,target:"_blank"},e.createElement(s,{direction:"column"},e.createElement(s,{bg:b.colors.Grey30,h:"19px",flex:1,align:"center"},e.createElement(d,{mx:"auto",textAlign:"center",color:b.colors.Grey130,fontWeight:"600",fontSize:".875rem",lineHeight:"1.192rem",letterSpacing:".22em"},"ADVERTISEMENT")," "),e.createElement(s,{h:"250px",w:"100%",align:"start",justify:"start",bgImage:`${(A=f.ad_image)==null?void 0:A.url}?height=250`,bgSize:"contain",bgPos:"top center",bgRepeat:"no-repeat"})))}))}function v(t){var m,p;const{type:r,numOfSlots:n}=t,[l,o]=u.useState();u.useEffect(()=>{a()},[]);async function a(){const i=await B.getAllEntriesWithRef("advertisement_group","block_groups.advertisement_blocks,banners.advertisement_banner,block_groups.slot_1.advertisement_blocks,block_groups.slot_2.advertisement_blocks,block_groups.slot_3.advertisement_blocks,block_groups.slot_4.advertisement_blocks");o(i[0])}return r==="banner"?((m=l==null?void 0:l.banners)==null?void 0:m.advertisement_banner.length)>0&&e.createElement(te,{data:(p=l==null?void 0:l.banners)==null?void 0:p.advertisement_banner}):e.createElement(de,{numOfSlots:n,data:l==null?void 0:l.block_groups})}function Ee(t){return t.map(n=>{var l,o,a,m,p,i;return((o=(l=n.rte)==null?void 0:l.custom_styles)==null?void 0:o.length)>0?`<div class="${(m=(a=n.rte)==null?void 0:a.custom_styles)==null?void 0:m.join().replaceAll(" ","").replaceAll(","," ")}">${(p=n.rte)==null?void 0:p.rich_text_editor}</div>`:(i=n.rte)==null?void 0:i.rich_text_editor}).join("")}function he(t){const n=[],l=[];let o=0;return Array.isArray(t)?t.forEach(a=>{o<3?n.push(a):l.push(a),a.type==="p"&&o++}):n.push(t),{contentBeforeAd:n,contentAfterAd:l}}const _e=t=>{const r=Ee(t),n=le(r,{trim:!0}),{contentBeforeAd:l,contentAfterAd:o}=he(n);return[l,o]};function ye({data:t,ct:r}){var i,x,E,b,h,w;const[n,l]=u.useState([]),[o,a]=u.useState(),m=k();function p(){var _;const c=(_=document==null?void 0:document.getElementById("article"))==null?void 0:_.innerText,g=c==null?void 0:c.trim().split(" ").length;a(Math.ceil(g/225))}return u.useEffect(()=>p(),[n]),u.useEffect(()=>{if(t.article_body){const c=_e(t.article_body);l(c)}},[t]),e.createElement("main",{id:"main"},e.createElement(X,null),e.createElement(y,{h:"100%"},t.seo&&e.createElement(Z,{isArticle:!0,data:t.seo,override:t}),e.createElement(ee,null),e.createElement(re,{data:r==="resource_entry"?{title:"All Resources",href:"/resources"}:{title:"All News",href:"/news"}}),e.createElement(y,{maxW:"1440px",mx:"auto",h:"100%"},e.createElement(ae,{data:t,ct:r,ArticleTitle:(i=t.article_details)==null?void 0:i.headline}),r==="news_article"&&t.main_image&&e.createElement(s,{align:"center",justify:"center",ml:{base:"35px",md:"50px",lg:"62px"},mr:{base:"35px",md:"50px",lg:"76px"},mb:{base:"12px",md:"28px",lg:"35px"},h:{base:"124px",md:"384px",lg:"626px"},bgImage:t.main_image.url,bgPos:"center",bgSize:"cover",bgRepeat:"no-repeat",borderRadius:"15px"}),e.createElement(s,{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(s,{direction:"column",minW:"200px",maxW:"286",flex:1},e.createElement(be,{data:(x=t.related_stories)==null?void 0:x.article}),r==="news_article"&&e.createElement(G,{below:"md"},e.createElement(v,{numOfSlots:4,type:"group"})),r==="news_blurb"&&e.createElement(G,{below:"md"},e.createElement(v,{numOfSlots:1,type:"group"}))),e.createElement(s,{h:"100%",maxW:"100%",flex:1,direction:"column"},e.createElement(s,{borderBottom:`solid 1px ${m.colors.Black}`,pb:{base:"29px",md:"17px",lg:"24px"}},e.createElement(s,{flex:1},r==="news_article"&&e.createElement(xe,{time:o,data:(E=t.article_details)==null?void 0:E.author})),e.createElement(s,{flex:1,justify:"end"},e.createElement(pe,null))),e.createElement(y,{id:"article",className:"Article-Body",mt:"29px"},n&&e.createElement(e.Fragment,null,(b=n[0])==null?void 0:b.map((c,g)=>e.createElement($,{key:g,data:c,px:"initial"}))),r===I.newsArticle&&e.createElement(y,{my:"30px"},e.createElement(L,{above:"md"},e.createElement(v,{type:"banner"}))),n&&e.createElement(e.Fragment,null,(h=n[1])==null?void 0:h.map((c,g)=>{if(c!=="")return e.createElement($,{key:g,data:c,px:"initial"})}))),t.cpe_eligible&&e.createElement(fe,{data:t,ct:r}),r===I.newsBlurb&&e.createElement(s,{direction:"column",pt:{base:"25px",md:"32px"},pb:{base:"25px",md:"60px"},gap:"11px"},e.createElement(S,{href:(w=t.external_cta)==null?void 0:w.href,color:m.colors.Green130,fontSize:"1.25rem",lineHeight:"1.25rem",fontWeight:"600",target:"_blank"},"Full story"," ",e.createElement(se,{as:Q,ml:"14px"})),e.createElement(d,{color:m.colors.Grey130,fontSize:".875rem",fontWeight:"400",lineHeight:"1.188rem",letterSpacing:".03em"},"Source: ",t.source),e.createElement(y,{my:"30px"},e.createElement(L,{above:"md"},e.createElement(v,{type:"banner"}))))))),t.components&&e.createElement(oe,{data:t.components})))}function we({contentType:t}){const r=Y(),{isLoading:n,data:l,isError:o,failureReason:a}=J(t,r.pathname,"en-us","article_details.author,related_stories.article");if(n)return e.createElement(K,null);if(o)throw new Error("Error loading article: ",(a==null?void 0:a.message)||"unknown reason");return e.createElement(ye,{data:l[0],ct:t})}const Be=Object.freeze(Object.defineProperty({__proto__:null,default:we},Symbol.toStringTag,{value:"Module"}));export{ae as A,fe as C,pe as I,we as N,Be as a};