import{r as u,u as k,R as e,F as o,T as d,B as y,L as S,c as F,H as O,a as M,j as C,I as X,d as B,S as Y,k as G,e as I,l as $,m as J,i as K}from"./index-BQYJIRjX.js";import{a as Q}from"./index.esm-CEGcLAwy.js";import{M as Z}from"./Metadata-CedWJCsy.js";import{A as ee}from"./AllAlert-DJIxeies.js";import{A as te,L as re}from"./AdBanner-Bk2VwjpJ.js";import{F as L,f as P,c as ne,p as le,R as T,I as oe,b as se}from"./BlockContainer-BoJQhidL.js";function ae(t){const[r,n]=u.useState([]);return[r,()=>{var a,m,p,i,b,E,x,h,w;n([]);const s=[];((m=(a=t==null?void 0:t.tags_group)==null?void 0:a.industry)==null?void 0:m.length)>0&&s.push((p=t==null?void 0:t.tags_group)==null?void 0:p.industry),((b=(i=t==null?void 0:t.tags_group)==null?void 0:i.region)==null?void 0:b.length)>0&&s.push((E=t==null?void 0:t.tags_group)==null?void 0:E.region),((h=(x=t==null?void 0:t.tags_group)==null?void 0:x.subject)==null?void 0:h.length)>0&&s.push((w=t==null?void 0:t.tags_group)==null?void 0:w.subject),n(()=>[...s.flat(1)])}]}function ie({data:t,ct:r,ArticleTitle:n=null}){var E,x,h,w;const[l,s]=ae(t),[a,m]=u.useState(),[p]=ne(),i=k();u.useEffect(()=>{s(t),m(()=>{var c;return p((c=t==null?void 0:t.article_details)==null?void 0:c.date,"ap")})},[]);const b=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 j="tags",v="n_16_n",N=`${A}=${c}`,U={size:encodeURIComponent(v),"filters[0][field]":encodeURIComponent(j),"filters[0][values][0]":encodeURIComponent(N),"filters[0][type]":encodeURIComponent("all")},D=Object.entries(U).map(([q,V])=>`${q}=${V}`).join("&");f=`${_}?${D}`;return}}),window.location.href=f};return e.createElement(o,{direction:"column",align:"center",mr:"72px",ml:"62px",mt:"48px",mb:"27px"},e.createElement(o,{w:"100%",direction:{base:"column",md:"row"}},e.createElement(o,{flex:1}),e.createElement(o,{flex:1,justify:"center",align:"end"},e.createElement(o,{direction:"column",gap:r==="news_article"?"4px":r==="news_blurb"?"10px":"initial",mt:"4px",mb:{base:"5px",md:"initial"}},e.createElement(o,{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(o,{flex:1,justify:"center",align:"center"},e.createElement(d,{fontWeight:"700",fontSize:"1rem",lineHeight:"1.362rem",letterSpacing:".045em",color:i.colors.Grey130},(h=(x=t==null?void 0:t.tags_group)==null?void 0:x.sections)==null?void 0:h.map((c,g)=>e.createElement(d,{key:g,textAlign:"center"},c.toUpperCase(),e.createElement("br",null))))))),e.createElement(o,{flex:1,justify:{base:"center",md:"end"},align:"start"},e.createElement(o,{direction:"column",gap:{md:"6px"}},e.createElement(o,{flex:1,justify:"end",align:"center"},r!=="resource_entry"&&e.createElement(o,{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(L,{icon:P.faArrowRightLong}))),e.createElement(o,{flex:1,justify:"end",align:"center"},r!=="resource_entry"&&e.createElement(o,{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(L,{icon:P.faArrowRightLong})))))),e.createElement(o,{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:()=>b(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(o,{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(),n=`https://iapp.org${M().pathname}`,l=`https://www.linkedin.com/shareArticle?mini=true&url=${n}`,s=`https://www.facebook.com/sharer/sharer.php?u=${n}`,a=`https://twitter.com/intent/tweet?text=${n}`;return e.createElement(o,{direction:{base:"column",md:"row"},gap:{base:"5px",lg:"17px"}},e.createElement(o,{gap:{base:"5px",lg:"17px"},align:{base:"start",lg:"center"},mt:{md:"1rem",lg:"initial"}},e.createElement(S,{href:l,target:"_blank",title:"LinkedIn",isExternal:!0},e.createElement(o,{color:t.colors.White,bg:t.colors.Green130,borderRadius:"50%",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:a,target:"_blank",title:"Twitter",isExternal:!0},e.createElement(o,{color:t.colors.White,bg:t.colors.Green130,borderRadius:"50%",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(o,{gap:{base:"5px",lg:"17px"},align:{base:"start",lg:"center"},mt:{md:"1rem",lg:"initial"}},e.createElement(S,{href:s,target:"_blank",title:"Facebook",isExternal:!0},e.createElement(o,{color:t.colors.White,bg:t.colors.Green130,borderRadius:"50%",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(o,{as:"button",onClick:()=>window.print(),color:t.colors.White,bg:t.colors.Green130,borderRadius:"50%",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(o,{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(o,{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(o,{align:"center",w:{base:"100%",lg:"auto"},mb:{base:"16px",lg:"0"}},e.createElement(y,{w:"64px",h:"64px",flexShrink:0},e.createElement(X,{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(o,{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 be(t){const{data:r,time:n}=t,l=k();return e.createElement(o,{direction:"column"},e.createElement(o,{direction:"column",gap:"16px"},r==null?void 0:r.map((s,a)=>e.createElement(o,{key:a,direction:"column"},s.name&&e.createElement(d,{fontWeight:"700",letterSpacing:"0px",fontSize:{base:"1rem",md:"1.25rem"},lineHeight:{base:"1.531rem",md:"1.875rem"}},s.name),s.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"}},s.contributor_type),s.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"}},s.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 xe(t){const[r,n]=u.useState([]),{data:l}=t;u.useEffect(()=>{l.length<5?a():n(l.slice(0,5))},[l]);const s=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"):[],b=p.concat(i);b.sort((x,h)=>new Date(h.article_details.date)-new Date(x.article_details.date));const E=b.slice(0,m);n([...l,...E])}return e.createElement(o,{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(o,{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(o,{borderLeft:"solid 3px",borderLeftColor:s.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,s]=u.useState(),[a,m]=u.useState(),[p,i]=u.useState(),[b,E]=u.useState(),x=k(),h=[l&&g(l),a&&g(a),p&&g(p),b&&g(b)];u.useEffect(()=>{w()},[r]);function w(){c(r==null?void 0:r.slot_1,s),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(j=>{var v;return((v=j.publish_details)==null?void 0:v.time)&&A.push(j)}),_(A)}function g(f){var _;return(_=f[0])==null?void 0:_.ad[Math.floor(Math.random()*f[0].ad.length)]}return e.createElement(o,{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(o,{direction:"column"},e.createElement(o,{bg:x.colors.Grey30,h:"19px",flex:1,align:"center"},e.createElement(d,{mx:"auto",textAlign:"center",color:x.colors.Grey130,fontWeight:"600",fontSize:".875rem",lineHeight:"1.192rem",letterSpacing:".22em"},"ADVERTISEMENT")," "),e.createElement(o,{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 R(t){var m,p;const{type:r,numOfSlots:n}=t,[l,s]=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");s(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,s,a,m,p,i;return((s=(l=n.rte)==null?void 0:l.custom_styles)==null?void 0:s.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 s=0;return Array.isArray(t)?t.forEach(a=>{s<3?n.push(a):l.push(a),a.type==="p"&&s++}):n.push(t),{contentBeforeAd:n,contentAfterAd:l}}const _e=t=>{const r=Ee(t),n=le(r,{trim:!0}),{contentBeforeAd:l,contentAfterAd:s}=he(n);return[l,s]};function ye({data:t,ct:r}){var i,b,E,x,h,w;const[n,l]=u.useState([]),[s,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(Y,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(ie,{data:t,ct:r,ArticleTitle:(i=t.article_details)==null?void 0:i.headline}),r==="news_article"&&t.main_image&&e.createElement(o,{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(o,{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(o,{direction:"column",minW:"200px",maxW:"286",flex:1},e.createElement(xe,{data:(b=t.related_stories)==null?void 0:b.article}),r==="news_article"&&e.createElement(G,{below:"md"},e.createElement(R,{numOfSlots:4,type:"group"})),r==="news_blurb"&&e.createElement(G,{below:"md"},e.createElement(R,{numOfSlots:1,type:"group"}))),e.createElement(o,{h:"100%",maxW:"100%",flex:1,direction:"column"},e.createElement(o,{borderBottom:`solid 1px ${m.colors.Black}`,pb:{base:"29px",md:"17px",lg:"24px"}},e.createElement(o,{flex:1},r==="news_article"&&e.createElement(be,{time:s,data:(E=t.article_details)==null?void 0:E.author})),e.createElement(o,{flex:1,justify:"end"},e.createElement(pe,null))),e.createElement(y,{id:"article",className:"Article-Body",mt:"29px"},n&&e.createElement(e.Fragment,null,(x=n[0])==null?void 0:x.map((c,g)=>e.createElement(T,{key:g,data:c,px:"initial"}))),r===I.newsArticle&&e.createElement(y,{my:"30px"},e.createElement($,{above:"md"},e.createElement(R,{type:"banner"}))),n&&e.createElement(e.Fragment,null,(h=n[1])==null?void 0:h.map((c,g)=>{if(c!=="")return e.createElement(T,{key:g,data:c,px:"initial"})}))),t.cpe_eligible&&e.createElement(fe,{data:t,ct:r}),r===I.newsBlurb&&e.createElement(o,{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(oe,{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($,{above:"md"},e.createElement(R,{type:"banner"}))))))),t.components&&e.createElement(se,{data:t.components})))}function we({contentType:t}){const r=M(),{isLoading:n,data:l,isError:s,failureReason:a}=J(t,r.pathname,"en-us","article_details.author,related_stories.article");if(n)return e.createElement(K,null);if(s)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{ie as A,fe as C,pe as I,we as N,Be as a};