"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9951],{84326:function(e,a,t){var l;t.d(a,{Dj:function(){return n}});let n=((l={}).acfDisabled="acfDisabled",l.archived="archived",l.autoDraft="autoDraft",l.dpRewriteRepublish="dpRewriteRepublish",l.draft="draft",l.future="future",l.inherit="inherit",l.pending="pending",l.private="private",l.publish="publish",l.requestCompleted="requestCompleted",l.requestConfirmed="requestConfirmed",l.requestFailed="requestFailed",l.requestPending="requestPending",l.trash="trash",l)},87629:function(e,a,t){var l,n,i,r,s,o;t.r(a);let u=(i={alias:null,args:null,kind:"ScalarField",name:"title",storageKey:null},r=[{alias:null,args:null,kind:"ScalarField",name:"headline",storageKey:null}],s=[l={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},n={alias:null,args:null,kind:"ScalarField",name:"chorusId",storageKey:null}],{argumentDefinitions:[],kind:"Fragment",metadata:null,name:"ContentResourceAnalyticsContainer_contentResource",selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},l,{alias:null,args:null,kind:"ScalarField",name:"wpId",storageKey:null},n,{alias:null,args:null,kind:"ScalarField",name:"status",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"resourceType",storageKey:null},i,{alias:null,args:null,kind:"ScalarField",name:"permalink",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"originalPublishedAt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"publishedAt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"hasAffiliateLinks",storageKey:null},{alias:null,args:null,concreteType:"CampaignResourceType",kind:"LinkedField",name:"primaryCampaign",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"advertiserName",storageKey:null},i],storageKey:null},{alias:null,args:null,concreteType:"ShareableDataType",kind:"LinkedField",name:"seo",plural:!1,selections:r,storageKey:null},{alias:null,args:null,concreteType:"ShareableDataType",kind:"LinkedField",name:"social",plural:!1,selections:r,storageKey:null},{alias:null,args:null,concreteType:"PromoDataType",kind:"LinkedField",name:"promo",plural:!1,selections:r,storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"wordCount",storageKey:null},{kind:"InlineFragment",selections:[{alias:null,args:null,concreteType:"PackageResourceType",kind:"LinkedField",name:"package",plural:!1,selections:s,storageKey:null},{alias:null,args:[{kind:"Literal",name:"first",value:100}],concreteType:"FeedContentStreamsConnection",kind:"LinkedField",name:"streams",plural:!1,selections:[{alias:null,args:null,concreteType:"StreamResourceType",kind:"LinkedField",name:"nodes",plural:!0,selections:s,storageKey:null}],storageKey:"streams(first:100)"},{alias:null,args:null,concreteType:"FeedContentResourceInterfaceVideoGamesConnection",kind:"LinkedField",name:"games",plural:!1,selections:[{alias:null,args:null,concreteType:"VideoGameResourceType",kind:"LinkedField",name:"nodes",plural:!0,selections:[i,{alias:null,args:null,kind:"ScalarField",name:"path",storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"AuthorProfileResourceType",kind:"LinkedField",name:"authors",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"InternalCategoryResourceType",kind:"LinkedField",name:"internalCategories",plural:!0,selections:o=[{alias:null,args:null,kind:"ScalarField",name:"slug",storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"CategoryResourceType",kind:"LinkedField",name:"categories",plural:!0,selections:o,storageKey:null},{alias:null,args:null,concreteType:"CategoryResourceType",kind:"LinkedField",name:"primaryCategory",plural:!1,selections:o,storageKey:null},{alias:null,args:null,concreteType:"LiveStatusType",kind:"LinkedField",name:"liveStatus",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"startAt",storageKey:null}],storageKey:null}],type:"FeedContentResourceInterface",abstractKey:"__isFeedContentResourceInterface"},{kind:"InlineFragment",selections:[{alias:null,args:null,kind:"ScalarField",name:"template",storageKey:null}],type:"PostResourceType",abstractKey:null}],type:"ContentResourceInterface",abstractKey:"__isContentResourceInterface"});u.hash="2e35dabaefbc2d2d2725b5fb6d5cde01",a.default=u},37762:function(e,a,t){var l,n=t(82201),i=t(86273),r=t(84326),s=t(92783),o=t(98411),u=t(88321),d=t(47382),c=t(45293),g=t(31218),m=t(92501),p=t(19738);a.Z=(0,g.n)(e=>{let a=(0,i.useFragment)((void 0!==l||(l=t(87629)).hash&&"2e35dabaefbc2d2d2725b5fb6d5cde01"!==l.hash&&console.error("The definition of 'ContentResourceAnalyticsContainer_contentResource' appears to have changed. Run `relay-compiler` to update the generated files to receive the expected data."),l),e.contentResource),g=(0,u.z$)(),y=(0,d.aC)(),h=(0,n.useRef)(!1),{communityConfig:{communityName:k},networkConfig:{networkName:f}}=(0,c.q)();return(0,n.useEffect)(()=>{if(!g||y.userLoading||a.status!==r.Dj.publish||h.current)return;let{id:e,wpId:t,resourceType:l,promo:n,social:i,seo:u,streams:d,authors:c,title:S,liveStatus:b,chorusId:C,hasAffiliateLinks:F,primaryCampaign:T,wordCount:L,package:v,template:K}=a,w=a.primaryCategory?.slug,R=(a.categories||[]).map(e=>e.slug);"package"===a.resourceType&&R.push(`package-${a.chorusId||a.id}`),v&&R.push(`package-${v.chorusId||v.id}`);let P=(a.internalCategories||[]).map(e=>{let{slug:a}=e;return a}).join(","),A="stream"!==l&&d?.nodes.length?d.nodes.map(e=>{let{id:a,chorusId:t}=e;return t?`${t}`:a}):[],I=a.games?.nodes?a.games.nodes.map(e=>`game:${e.title}`):[],D=[k.toLowerCase(),f.toLowerCase(),R.join(","),P,...A,...I],x=a.originalPublishedAt?new Date(a.originalPublishedAt).toISOString():null,_=a.publishedAt?new Date(a.publishedAt).toISOString():null,j=y.user?.uid||y.viewer?.id||null,q={"All Categories":[...new Set(D.filter(Boolean))].join(","),Author:c?.map(e=>e.name).join(",")||"",Community:k.toLowerCase(),event:"dataLayer-initalized",Headline:S,"Inclusion of Commerce Disclosure":F,"Live Blog":!!b?.startAt,"Modified Date":_,Network:f.toLowerCase(),"Original Publish Time":x,"Page ID":C?`${C}`:e,"Page Type Category":"storytelling","Page Type":(0,m.C2)(l,!!K),"Post ID":t,"Promo Headline":n.headline,"SEO Headline":u.headline,"Social Headline":i.headline,"Story Streams":A.length?A.join(","):null,"Unique Pageload ID":(0,s.m3)(),"User ID":j?String(j):"Logged Out","Word Count":L,...o.HW},O=[...R,...I];O.length>0&&(q.Categories=O.join(",")),P.length>0&&(q["Internal Categories"]=P),w&&(q["Primary Category"]=w);let B=T?.advertiserName;B&&(q["Sponsored Post Advertiser"]=B,q={...q,...o.Hm});let M=(0,p.ej)("sailthru_hid");M&&(q["Sailthru User ID"]=M),q["Scroll Subscription"]=!!(0,p.ej)("scroll0"),h.current=!0,g.emit(q)},[g,y,a,k,f]),null},{context:"ContentResourceAnalyticsContainerErrorBoundary"})},34112:function(e,a,t){t.d(a,{Dp:function(){return k},Rz:function(){return c},TY:function(){return m},Xn:function(){return p},_1:function(){return b},an:function(){return g},lA:function(){return h},lc:function(){return r},tf:function(){return y},yw:function(){return f}});var l=t(27025),n=t.n(l),i=t(72964);let r=(e,a)=>({"@type":"Organization",name:e,logo:{"@type":"ImageObject",url:a?.url||"",width:a?.width?.toString()||"250",height:a?.height?.toString()||"250"}}),s=(e,a)=>{let{height:t,width:l}=(0,i.P_)(e,a);return{"@type":"ImageObject",url:a.url,height:t.toString(),width:l.toString()}},o=(e,a)=>{let t={headline:e.title,description:e.seo.description,datePublished:e.originalPublishedAt||"",dateModified:e.publishedAt||"",url:e.permalink,mainEntityOfPage:e.permalink,publisher:a,articleSection:e.primaryCategory.title,keywords:e.categories.map(e=>e.title),author:e.authors.map(e=>({"@type":"Person",name:e.name||"",url:e.permalink}))};return!1===e.isAccessibleForFree&&(t.isAccessibleForFree=!1),e.ledeMedia?.__typename==="LedeMediaImageType"&&(t.image=[s(e.ledeMedia.image,e.ledeMedia.image.thumbnails.social),s(e.ledeMedia.image,e.ledeMedia.image.thumbnails.horizontal),s(e.ledeMedia.image,e.ledeMedia.image.thumbnails.square)]),t},u=(e,a)=>({...o(e,a),speakable:{"@type":"SpeakableSpecification",xpath:["/html/head/title","/html/head/meta[@name='description']/@content"]},articleBody:e.seoArticleBody}),d=(e,a)=>{let t={"@type":"BlogPosting",...o(e,a)};return e.excerpt&&(t.articleBody=e.excerpt.map(e=>e.contents.plaintext).join("\n")),t},c=(e,a)=>{let t={"@context":"https://schema.org","@type":"LiveBlogPosting",...u(e,a),coverageStartTime:e.liveStatus.startAt||""};if(e.liveStatus.endAt&&(t.coverageEndTime=e.liveStatus.endAt),e.streamPosts){let l=e.streamPosts.nodes;t.liveBlogUpdate=n()(l).map(e=>d(e,a))}return t},g=(e,a)=>({"@context":"https://schema.org","@type":"NewsArticle",...u(e,a)}),m=(e,a)=>({"@context":"https://schema.org","@type":"AdvertiserContentArticle",...u(e,a)}),p=e=>({"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:e.map((e,a)=>({"@type":"ListItem",position:a+1,name:e.category,item:e.url}))}),y=e=>({"@context":"https://schema.org","@type":"Person",name:e.name,jobTitle:e.title,image:e.profileImage?.thumbnails.square.url}),h=(e,a)=>({"@context":"https://schema.org","@type":"VideoObject",name:e.video?.title,description:e.caption.plaintext,thumbnailUrl:e.video?.poster?.thumbnails.horizontal.url,uploadDate:e.video?.publishedAt||"",contentUrl:a}),k=e=>{let a={"@context":"https://schema.org","@type":"Product",name:e.title};return e.retailLinks&&e.retailLinks.length>0&&(a.offers=e.retailLinks.map(e=>({"@type":"Offer",priceCurrency:"USD",price:e.salePrice||e.price,url:e.url,seller:{"@type":"Organization",name:e.retailer}}))),e.brand&&(a.brand={"@type":"Brand",name:e.brand.title}),e.showScores&&(a.review={"@type":"Review",reviewRating:{"@type":"Rating",ratingValue:e.score,bestRating:10,worstRating:1}}),a},f=e=>({"@context":"https://schema.org","@type":"ItemList",itemListElement:e.map((e,a)=>({"@type":"ListItem",position:a+1,item:k(e)}))}),S=e=>{switch(e){case"imageGif":return"image/gif";case"imageJpg":return"image/jpeg";case"imagePng":return"image/png";case"imageSvgXml":return"image/svg+xml";case"imageWebp":return"image/webp"}},b=e=>{let{image:a,imageThumbnail:t,placeholderImageUrl:l}=e;if(!a||!t)return{url:l};{let{width:e,height:l}=(0,i.P_)(a,t),{normalizedRatio:n}=t,r=e,s=l,o=t.url;if(e>i.Hx){r=i.Hx,s=Math.floor(i.Hx/n);let e=new URL(o),a=new URLSearchParams(e.search);a.has("w")||(a.set("w",`${i.Hx}`),e.search=a.toString(),o=e.toString())}return{url:o,height:s,width:r,alt:a.alt.length>0?a.alt:a.title,type:S(t.mimeType)}}}}}]);