/*! For license information please see 7394.e27cfbf2.chunk.js.LICENSE.txt */ "use strict";(self.webpackChunklite=self.webpackChunklite||[]).push([[7394],{27507:(e,t,n)=>{n.d(t,{A:()=>i});var r,o=n(96540);function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t{n.d(t,{h:()=>L,s:()=>A});var r=n(50014),o=n.n(r),a=n(6638),i=n.n(a),l=n(96540),c=n(29977),s=n(7580),u=n(22841),d=n(52290),m=n(86975),p=n(41299),f=n(5600),h=n(44402),v=n(42600),g=n(21202),V=n(18599),E=n(60213),y=n(64122),b=function(e){var t=e.diameter,n=e.zIndex,r=e.showBorder,o=e.borderColor;return function(e){return{display:"block",width:"".concat(r?t+4:t,"px"),height:"".concat(r?t+4:t,"px"),borderRadius:"50%",border:r?"".concat(2,"px solid ").concat(null!=o?o:e.backgroundColor):"none",zIndex:n}}},x=function(e){return{background:e.colorTokens.background.neutral.secondary.base,border:"2px solid white",borderRadius:"50%",width:"36px",height:"36px"}},w=function(e,t){return{display:"grid",alignItems:"end",gridTemplateColumns:"repeat(".concat(t,", ").concat(e.toPrecision(3),"%)")}},k=function(e){var t=e.numUsers,n=e.diameter,r=e.withAnimation,o=e.children,a=(0,h.l)(),i=(0,g.L)(),c=n*t,s=100/(t+1),u=t>1?(t>1?(n+4)*t:n)*(1-s/100):n,m=r?[w(s,t),function(){return i}]:w(s,t);return l.createElement(d.a,{width:"".concat(u,"px")},l.createElement(d.a,{width:"".concat(c,"px")},l.createElement("div",{className:a(m)},o)))},A=function(e){var t=e.maxNumEntities,n=void 0===t?12:t,r=e.entities,a=e.error,i=e.loading,c=e.entityElementKey,s=e.showNextAvatarOnTop,u=void 0!==s&&s,d=e.diameter,m=void 0===d?36:d,p=e.noBackgroundShadow,f=Math.min(r.length,n),h=l.useMemo((function(){return o()(r,(function(e){return e.id})).slice(0,f)}),[r,f]);return(f=h.length)?a?null:i?l.createElement(S,{numUsers:f,diamereter:m,entityElementKey:c,withAnimation:!0}):l.createElement(k,{numUsers:f,diameter:m},h.map((function(e,t){var n,o,a=u?t:r.length-t;if("Collection"===e.__typename)n=null===(o=e.avatar)||void 0===o?void 0:o.id;else if("User"===e.__typename)n=e.imageId;else if("NewsletterV3"===e.__typename){var i,s,d;n=e.collection?e.avatarImageId||(null===(i=e.collection)||void 0===i||null===(s=i.avatar)||void 0===s?void 0:s.id):null===(d=e.user)||void 0===d?void 0:d.imageId}return l.createElement(I,{key:"".concat(c,"-").concat(e.id),diameter:m,zIndex:a,showBorder:h.length>1,miroId:n,entityName:e.name,noBackgroundShadow:p})}))):null},I=function(e){var t=e.diameter,n=e.zIndex,r=e.showBorder,o=e.miroId,a=e.entityName,i=e.noBackgroundShadow,c=void 0===i||i,u=e.showAvatarBorder,d=void 0!==u&&u,m=e.showHoverState,p=void 0!==m&&m,f=e.borderColor,g=e.testId,V=(0,h.l)();return l.createElement("div",{className:V(b({diameter:t,zIndex:n,showBorder:r,borderColor:f}))},l.createElement(s.r,{miroId:o||v._3,alt:a||"",diameter:t,freezeGifs:!0,noBackgroundShadow:c,showBorder:d,showHoverState:p,testId:g}))},S=function(e){var t=e.numUsers,n=e.diamereter,r=e.withAnimation,o=e.entityElementKey,a=(0,h.l)();return l.createElement(k,{numUsers:t,diameter:n,withAnimation:r},i()(t,(function(e){return l.createElement(d.a,{key:"".concat(o,"-placeholder-").concat(e),zIndex:t-e},l.createElement("div",{className:a(x)}))})))},L=function(e){var t,n=e.author,r=e.collection,o=e.authorSize,a=e.collectionImageSize,i=e.collectionOffset,s=e.borderColor,h=e.withAuthorTooltip,v=e.authorTestId,g=e.collectionTestId,b=null!=o?o:44,x=null!=a?a:24,w=(0,E.u)(),k=(0,y.W)();if(!n)return null;var A=l.createElement(m.D,{href:k(n)},l.createElement(I,{diameter:b,zIndex:0,showBorder:!0,miroId:n.imageId,entityName:n.name,noBackgroundShadow:!0,showAvatarBorder:!0,showHoverState:!0,borderColor:s,testId:v})),S=r&&l.createElement(m.D,{href:w(r)},l.createElement(I,{diameter:x,zIndex:1,showBorder:!0,miroId:null===(t=r.avatar)||void 0===t?void 0:t.id,entityName:r.name,noBackgroundShadow:!0,showAvatarBorder:!0,showHoverState:!0,borderColor:s,testId:g}));return l.createElement(d.a,{display:"flex",alignItems:"baseline"},h?l.createElement(p.R,{placement:"bottom",targetDistance:c.f,mouseLeaveDelay:100,mouseEnterDelay:f.A,noArrow:!0,popoverRenderFn:function(){return function(e){return l.createElement(u.J,{user:e,trackingV2:!0})}(n)},role:"tooltip"},A):A,r&&l.createElement(d.a,{display:"flex",marginLeft:null!=i?i:"-12px",position:"relative"},l.createElement(p.R,{placement:"bottom",targetDistance:V.r,mouseLeaveDelay:100,mouseEnterDelay:f.A,noArrow:!0,popoverRenderFn:function(){return function(e){return l.createElement(V.a,{collection:e,trackingV2:!0})}(r)},role:"tooltip"},S)))}},40340:(e,t,n)=>{n.d(t,{J:()=>c});var r=n(96540),o=n(52290),a=n(36557),i=n(44402),l=function(e){return function(t){return{position:"absolute",clip:"rect(0px 14px 14px -3px)",":after":{content:"''",display:"block",width:"11px",height:"11px",background:null!=e?e:t.colorTokens.background.neutral.secondary.base,borderBottomRightRadius:"1px",transform:"rotate(45deg) translate(-4px, -4px)"}}}},c=function(e){var t=e.children,n=e.padding,c=void 0===n?{xs:"16px",sm:"16px",md:"16px",lg:"16px 24px",xl:"16px 24px"}:n,s=e.borderRadius,u=void 0===s?"8px":s,d=e.backgroundColor,m=e.shouldShowArrowDown,p=void 0!==m&&m,f=(0,i.l)();return r.createElement(r.Fragment,null,r.createElement("div",{className:f((function(e){return{position:"relative",padding:c,borderRadius:u,background:null!=d?d:e.colorTokens.background.neutral.secondary.base}}))},r.createElement(a.kZ,{scale:"M",color:"DARKER"},t)),p&&r.createElement(o.a,{marginLeft:{xs:"18px",sm:"18px",md:"26px",lg:"26px",xl:"26px"}},r.createElement("div",{className:f(l(d))})))}},27394:(e,t,n)=>{n.d(t,{D:()=>Ke});var r,o=n(96540),a=n(70370),i=n(27721),l=n(79197),c=n(72130),s=n(44402),u=n(50684),d=n(64122),m=n(86527),p=n(51260),f=n(42976),h=n(46879),v=n(94644),g=n(40340),V=function(e){var t=e.children;return o.createElement(g.J,{padding:{xs:"16px",sm:"16px",md:"16px",lg:"16px 24px",xl:"16px 24px"},shouldShowArrowDown:!0},t)},E=n(43634),y=n(30572),b=n(49287),x=n(71836),w=function(e){switch(e){case 0:return"metered_view_3";case 1:return"metered_view_2";default:return"smart_meter"}},k=function(e){var t=e.children,n=e.isLoggedIn,r=e.post,a=e.numFreeStoriesRemaining,i=void 0===a?0:a,l=e.susiEntry,c=e.dimension,s=void 0===c?"post_counter":c,u=e.inline,d=e.linkStyle,m=e.tag,f=e.source,h=void 0===f?"upgrade_membership":f,v=e.href,g=(0,p.au)(),V=r.id;return n?o.createElement(x.C,{source:h,dimension:s,sourceProviderData:{postId:V},eventData:{postId:V},tag:m},o.createElement(y.a,{post:r,redirectUrl:null!=v?v:g("ShowPay",{}),inline:u,linkStyle:d},t)):o.createElement(b.Ne,{source:{postId:r.id}},o.createElement(E.r,{operation:"register",susiEntry:l||w(i),inline:u,linkStyle:d},t))},A=function(e){var t=e.user,n=(0,d.f)(t);return o.createElement(o.Fragment,null,o.createElement(m.N,{href:n,linkStyle:"OBVIOUS",inline:!0},(0,v.PK)(t.name))," ","Friend Link.")},I=function(){var e=(0,h.ZZI)();return o.createElement(m.N,{href:e,linkStyle:"OBVIOUS",inline:!0},"Learn more")},S=function(e){var t,n,r,a=e.post,i=e.viewer,l=null!==(t=a.content.shareKeyCreator)&&void 0!==t?t:a.creator,c=null==i?void 0:i.id,s=(0,p.au)();return a.content.validatedShareKey?(null===(n=a.creator)||void 0===n?void 0:n.id)===c||(null==l?void 0:l.id)===c?o.createElement(o.Fragment,null,"You're reading via your own Friend Link. ",o.createElement(I,null)):o.createElement(o.Fragment,null,"You're reading ",null!=i&&i.membership?null:"for free"," via"," ",l&&l.name?o.createElement(A,{user:l}):"a Friend Link."," ",(null==i||null===(r=i.membership)||void 0===r?void 0:r.tier)===f.T3.FRIEND?o.createElement(I,null):o.createElement(o.Fragment,null,o.createElement(k,{post:a,isLoggedIn:!!i,source:"friend_link",susiEntry:"post_friend_link_meter",dimension:"post_friend_link_meter",tag:"span",linkStyle:"OBVIOUS",href:s("ShowManageMembershipPage",{}),inline:!0},i?"Upgrade":"Become a member")," ","to access the best of Medium.")):o.createElement(o.Fragment,null,"You're unable to read via this Friend Link since it's expired. ",o.createElement(I,null))},L=function(e){return o.createElement(V,null,o.createElement(S,e))},T=function(e){return{fontWeight:e.newFonts.detail.boldWeight}},C=function(e){var t=e.post,n=(0,s.l)();return o.createElement(k,{isLoggedIn:!0,post:t,numFreeStoriesRemaining:0},o.createElement(V,null,o.createElement("strong",{className:n(T)},"This member-only story is on us.")," ",o.createElement(o.Fragment,null,o.createElement("span",{className:n({textDecoration:"underline"})},"Upgrade")," to access all of Medium.")))},O=function(e){var t=e.post,n=(0,c.$L)(),r=(0,u.WZ)(),a=(0,i.R)(),s=a.loading,d=a.error,m=a.value,p=!!m;return(0,o.useEffect)((function(){s||d||n.event("meter.viewed",{uiType:p?l.H.LIHighlightCTA:l.H.LOHighlightCTA,postId:t.id,meterCount:0})}),[s,d,p]),s||d?null:r?o.createElement(L,{post:t,viewer:m}):p?o.createElement(C,{post:t}):null},N=n(69733),P=n(42126),R=n(39204),B=n(15088),_=n(79480),F=n(28072),D=n(52290),j=n(36557),M=n(92679),H=n(27715),z=n(49728),K=n(28160),U=n(46696),W=n(57975),G=n(80296),Z=n(53259),Y=n.n(Z),Q=n(2680),q=n(75636),J=n(31905),X=n(61221),$=n(79959),ee=function(e){var t=e.postId,n=(0,i.R)().value,r="post_audio_button",a=(0,$.ST)((0,p.Nw)("ShowPay",{}),{dimension:r,postId:t});return n?o.createElement(x.C,{source:"upgrade_membership",dimension:r},o.createElement(y.a,{redirectUrl:a},o.createElement(X.H,null))):o.createElement(E.r,{operation:"register",susiEntry:r,actionUrl:a},o.createElement(X.H,null))},te=Y()({loader:function(){return n.e(285).then(n.bind(n,41778))},modules:["src/components/post/text-to-speech/SpeechifyWidget"],webpack:function(){return[41778]},loading:function(e){var t=e.children;return o.createElement(o.Fragment,null,t)},render:(0,J.X)("SpeechifyWidget")}),ne=o.forwardRef((function(e,t){var n=e.postId,r=e.postBodyRef,a=e.isLockedPreviewOnly,l=(0,c.$L)(),s=(0,i.R)().value,u=(0,q.z)({name:"enable_members_only_audio",placeholder:!1}),d=!(null==s||!s.membership),m=(0,Q.u5)().paragraphRefsMappers.paragraphTitlesRefsByStyleMap,p=(0,o.useState)(!0),f=(0,G.A)(p,2),h=f[0],v=f[1];o.useEffect((function(){return l.event("experiment.eligible",{experimentId:"ec7b685b3f40"}),v(!0)}),[m]);var g=!d&&(a||u);return o.createElement(D.a,{display:"inline-flex",alignItems:"flex-start",boxSizing:"border-box"},o.createElement(D.a,{flexGrow:"1"},o.createElement(F.P,{size:"full"},o.createElement(D.a,{ref:t,display:"flex"},g?u?o.createElement(ee,{postId:n}):null:h?o.createElement(X.m,{onClick:function(){if(h){var e=new Audio;e.autoplay=!0,e.src="data:audio/mpeg;base64,SUQzBAAAAAABEVRYWFgAAAAtAAADY29tbWVudABCaWdTb3VuZEJhbmsuY29tIC8gTGFTb25vdGhlcXVlLm9yZwBURU5DAAAAHQAAA1N3aXRjaCBQbHVzIMKpIE5DSCBTb2Z0d2FyZQBUSVQyAAAABgAAAzIyMzUAVFNTRQAAAA8AAANMYXZmNTcuODMuMTAwAAAAAAAAAAAAAAD/80DEAAAAA0gAAAAATEFNRTMuMTAwVVVVVVVVVVVVVUxBTUUzLjEwMFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVf/zQsRbAAADSAAAAABVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVf/zQMSkAAADSAAAAABVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV",v(!1)}}}):o.createElement(te,{postId:n,postBodyRef:r},o.createElement(X.H,{isPlaying:!0}))))))})),re=function(e){var t,n,r=e.post,a=e.isLockedPreviewOnly,i=e.postBodyRef,l=null!==(t=r.wordCount)&&void 0!==t?t:0,c=null!==(n=r.detectedLanguage)&&void 0!==n?n:"",s=r.isPublished;return!s||s&&"en"===c&&l>20?o.createElement(ne,{postId:r.id,postBodyRef:i,isLockedPreviewOnly:a}):null},oe=n(26311),ae=n(87039),ie=n(85050),le=n(36469),ce=n(88474),se=n(29977),ue=n(5562),de=n(54654),me=n(22841),pe=n(41299),fe=n(5600),he=n(27049),ve=n(46963),ge=function(e){var t=e.author,n=(0,ve.U)(),r=(0,d.f)(t),a=(0,ce.E)(t),l=n===he.i.xs,c=(0,i.R)().value,s=c&&c.id===t.id;return null!=t&&t.name?o.createElement(D.a,{display:"flex",alignItems:"center",marginBottom:"2px"},o.createElement(D.a,{display:"flex",flexWrap:"nowrap",alignItems:"center"},o.createElement(D.a,{display:"flex",alignItems:"center"},l?o.createElement(j.kZ,{color:"DARKER",scale:"L"},o.createElement(m.N,{linkStyle:"SUBTLE",inline:!0,href:r,"data-testid":"authorName"},t.name)):o.createElement(pe.R,{placement:"bottom",targetDistance:se.f,mouseLeaveDelay:100,mouseEnterDelay:fe.A,noArrow:!0,popoverRenderFn:function(){return o.createElement(me.J,{user:t,trackingV2:!0})}},o.createElement(j.kZ,{color:"DARKER",scale:"L"},o.createElement(m.N,{linkStyle:"SUBTLE",inline:!0,href:r,"data-testid":"authorName"},t.name)))),a&&o.createElement(D.a,{marginLeft:"2px",marginTop:"1px"},o.createElement(le.b,{size:"S"})),!s&&o.createElement(o.Fragment,null,o.createElement(ue.d,{display:"inline",margin:"0 8px"}),o.createElement(j.kZ,{scale:"L"},o.createElement(de.P,{user:t,susiEntry:"post_header",isLinkStyle:!0,trackingV2:!0}))))):null},Ve=n(43002),Ee=n(66356),ye=function(e){var t;return{fontWeight:null!==(t=e.newFonts.detail.boldWeight)&&void 0!==t?t:"bold"}},be=function(e){var t=e.collection,n=e.marginLeft,r=(0,s.l)();return t?o.createElement(D.a,{marginLeft:n,display:"inline-block"},o.createElement("strong",{className:r(ye)},t.name)):null},xe=n(86329);!function(e){e.CollectionPendingAsEditorAndAuthor="CollectionPendingAsEditorAndAuthor",e.CollectionPendingKnown="CollectionPendingKnown",e.CollectionPending="CollectionPending",e.CollectionUnsubmitted="CollectionUnsubmitted",e.Normal="Normal"}(r||(r={}));var we=function(e){var t=e.post,n=ke(t);if(!t||!n)return null;var a=t.pendingCollection,i=o.createElement(be,{collection:a,marginLeft:"4px"});switch(n){case r.CollectionPendingAsEditorAndAuthor:return o.createElement(o.Fragment,null,"Draft in",i);case r.CollectionPendingKnown:return o.createElement(o.Fragment,null,"Draft submitted to",i);case r.CollectionPending:return o.createElement(o.Fragment,null,"Submitted draft");case r.CollectionUnsubmitted:return o.createElement(o.Fragment,null,"Unsubmitted draft");case r.Normal:return o.createElement(o.Fragment,null,"Draft")}},ke=function(e){var t,n=(0,i.R)().value,o=null==e?void 0:e.pendingCollection,a=null==e||null===(t=e.creator)||void 0===t?void 0:t.id,l=!!n&&!(null==o||!o.creator)&&o.creator.id===n.id,c=(0,xe.J)(o).viewerEdge,s=null==c?void 0:c.isEditor,u=l||s,d=u||!!n&&n.id===a,m=d&&o;return!e||e.isPublished?null:d&&"PENDING"===e.statusForCollection?m?u&&n&&n.id===a?r.CollectionPendingAsEditorAndAuthor:r.CollectionPendingKnown:r.CollectionPending:"NOT_YET_SUBMITTED"===e.statusForCollection?r.CollectionUnsubmitted:r.Normal},Ae=n(39),Ie=function(e){var t=e.post,n=e.label,r=e.linkToCollection,a=function(e){return"APPROVED"===e.statusForCollection&&e.isPublished}(t),i=(0,Ae.Z)({name:"detail",scale:"M",color:"LIGHTER"}),l=(0,s.l)();return a?o.createElement("div",{className:l([i,{display:"flex",whiteSpace:"pre-wrap"}])},o.createElement(D.a,{flexShrink:"0",tag:"span",marginRight:"4px"},n),r):null},Se=function(e){var t=e.post,n=e.label,r=e.linkToCollection;return o.createElement(D.a,{display:"flex",marginBottom:{xs:"2px",sm:"2px",md:void 0,lg:void 0,xl:void 0}},o.createElement(Ie,{post:t,label:n,linkToCollection:r}),o.createElement(ie.V,{md:!0,lg:!0,xl:!0},o.createElement(ue.d,{display:"inline",margin:"0 8px"})))},Le=n(42136),Te=function(e){var t=e.publishedAt,n=e.timeToRead,r=e.post,a=(0,p.au)(),i=r.collection;return o.createElement(D.a,{display:"flex",alignItems:"flex-start",flexWrap:"wrap",flexDirection:{xs:"column",sm:"column",md:void 0,lg:void 0,xl:void 0}},!!i&&o.createElement(Se,{post:r,label:"Published in",linkToCollection:o.createElement(Ve.w,{collection:i,clamp:1,testId:"publicationName",trackingV2:!0})}),!!i&&r.isNewsletter&&o.createElement(Se,{post:r,label:"Sent as a",linkToCollection:o.createElement(m.N,{inline:!0,href:a("ShowCollectionNewsletterLandingPage",{collectionSlug:i.slug||""}),linkStyle:"SUBTLE"},o.createElement(j.kZ,{scale:"M",color:"DARKER"},"Newsletter"))}),o.createElement(j.kZ,{color:"LIGHTER",scale:"M",tag:"span"},o.createElement(Le.z,{middotPadding:"8px",flexGrow:"1",display:"flex"},n?o.createElement("span",{"data-testid":"storyReadTime"},n):null,t?o.createElement(Ee.c,{timestamp:t,testId:"storyPublishDate"}):o.createElement(we,{post:r}))))},Ce=n(96783),Oe=n(23406),Ne=n(68120),Pe=function(e){var t,n=e.avatars,r=void 0===n?null:n,a=e.publishedAt,i=e.timeToRead,l=e.post,c=e.publisher,s=e.postBodyRef,u=e.isLockedPreviewOnly,d=(0,o.useContext)(Oe.u).openSidebar;return o.createElement(D.a,{width:"100%",speechifyIgnore:!0},o.createElement(b.Ne,{source:{dimension:"byline"},extendSource:!0},o.createElement(ae.K,{avatar:r,title:o.createElement(ge,{author:c}),description:o.createElement(Te,{publishedAt:a,timeToRead:i,post:l}),leftMargin:"12px",alignItems:{xs:"flex-start",sm:"flex-start",md:"center",lg:"center",xl:"center"}})),o.createElement(b.Ne,{source:{dimension:"header_actions"},extendSource:!0},o.createElement(Ne.Q,{leftButtons:o.createElement(o.Fragment,null,o.createElement(D.a,{width:"74px"},o.createElement(W.W,{post:l,buttonStyle:"SUBTLE_MARGIN",hasDialog:!0,shouldShowResponsiveLabelText:!0,shouldHideClapsText:!0,susiEntry:"clap_footer",buttonColor:"LIGHTER",countScale:"S",testId:"headerClapButton"})),o.createElement(oe._,{trackingData:{postId:l.id},responsesCount:null===(t=l.postResponses)||void 0===t?void 0:t.count,allowResponses:l.allowResponses,isLimitedState:l.isLimitedState,isPublished:l.isPublished,handleClick:d,iconStylesOverride:{marginTop:"0px"},countStylesOverride:{marginLeft:"4px",marginTop:"0px"},responsesCountScale:"S",testId:"headerResponseButton"})),rightButtons:o.createElement(o.Fragment,null,o.createElement(ie.V,{md:!0,lg:!0,xl:!0},o.createElement(Ce.T,{post:l,susiEntry:"bookmark_footer",testId:"headerBookmarkButton"})),o.createElement(re,{postBodyRef:s,isLockedPreviewOnly:u,post:l}),o.createElement(U.b,{post:l,source:"post_actions_header",isResponsive:!0,testId:"headerSocialShareButton"}),o.createElement(K.G,{post:l,isResponsive:!0,testId:"headerStoryOptionsButton",trackingV2:!0}))})))},Re=function(e){var t=e.post,n=e.hasBannerImage,r=function(e){var t,n=e.post,r=e.postViewerEdgeLoading,a=(0,N.wA)(),l=(0,u.WZ)();(0,o.useEffect)((function(){a((0,P.QT)(!1))}),[]);var c=(0,i.R)(),s=c.loading,d=c.error,m=c.value;if(d||s)return!1;if(l)return!(!n.isLocked||r||null!=m&&m.membership&&!n.content.validatedShareKey&&l.startsWith("v2/"));var p=!(null==m||!m.id||null===(t=n.creator)||void 0===t||!t.id||m.id!==n.creator.id);return!(null!=m&&m.membership)&&!p&&!n.content.validatedShareKey&&n.isLocked&&!n.content.isLockedPreviewOnly}({post:t,postViewerEdgeLoading:e.postViewerEdgeLoading});return o.createElement(o.Fragment,null,o.createElement(D.a,{marginTop:r&&!n?{xs:"8px",sm:"8px",md:"24px",lg:"24px",xl:"24px"}:{xs:"32px",sm:"32px",md:"40px",lg:"40px",xl:"40px"}}),r&&o.createElement(D.a,{display:"flex",justifyContent:"center"},o.createElement(D.a,{width:"100%",minWidth:"0",maxWidth:"728px",marginBottom:"24px",marginRight:n?void 0:"8px",marginLeft:n?void 0:"8px"},o.createElement(O,{post:t}))))},Be=function(e){var t=e.post,n=e.postBodyRef,r=null==t?void 0:t.creator,i=null==t?void 0:t.collection;return r?o.createElement(a.B,{name:"byline",type:"byline",offset:{left:-600}},o.createElement(D.a,{display:"flex",justifyContent:"space-between",speechifyIgnore:!0},o.createElement(Pe,{avatars:o.createElement(B.h,{author:r,collection:i,withAuthorTooltip:!0,authorTestId:"authorPhoto",collectionTestId:"publicationPhoto"}),publishedAt:t.firstPublishedAt,publisher:r,timeToRead:!t.isShortform&&t.readingTime?"".concat((0,H.M8)(t.readingTime)," min read"):void 0,post:t,postBodyRef:n,isLockedPreviewOnly:!!t.content.isLockedPreviewOnly}))):null};function _e(e,t){return"".concat(t,"_").concat(e[t]?e[t].length:0)}function Fe(e,t,n,r,o){e[t]||(e[t]=[]),e[t].push({order:n,component:r,insertType:o})}var De=function(e){var t=e.children,n=e.paddingRight,r=void 0===n?"12px":n;return o.createElement(D.a,{padding:"6px ".concat(r," 6px 10px"),border:"neutral.primary",borderRadius:"8px",display:"flex",alignItems:"center",gap:"6px"},t)};function je(e){var t=e.post,n=e.hasTitle,r=e.firstBoostedAt,a=(0,q.z)({name:"enable_prototype_boost_labeling",placeholder:!1});return o.createElement(D.a,{marginBottom:n?"16px":"0px",display:"flex",gap:"12px"},t.isLocked&&(a?o.createElement(De,null,o.createElement(R.F,{post:t,label:"Member-only story",showLabelMobile:!0})):o.createElement(R.F,{post:t,label:"Member-only story",showLabelMobile:!0})),!!r&&o.createElement(j.kZ,{scale:"M",color:"LIGHTER"},o.createElement(De,{paddingRight:"12px"},o.createElement(M.A,null),o.createElement("span",null,"Boosted"))))}function Me(e){var t=e.children;return e.includeMaxWidth?o.createElement(F.P,{size:"app"},t):o.createElement(o.Fragment,null,t)}function He(e,t,n,r,a){return function(i){var l,c,s,u=n.kickerIndex||n.titleIndex,d=n.bannerImageIndex,m="number"==typeof n.titleIndex,p="number"==typeof d&&m&&u&&d{n.d(t,{b:()=>H});var r,o=n(96540),a=n(67459),i=n(5419),l=n(19724),c=n(79647),s=n(80296),u=n(27721),d=n(1722),m=n(43634),p=n(30572),f=n(52290),h=n(86527),v=n(36557),g=n(44402),V=n(71836),E=n(51260),y=n(42976);function b(){return b=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0;--a){var i=this.tryEntries[a],l=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(c&&s){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),C(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;C(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:N(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}var B=function(e){return{height:"16px",width:"16px",transform:e?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s ease-in-out"}},_={display:"flex",alignItems:"center",width:"100%",":disabled":{cursor:"progress"},":disabled >:not(svg)":{opacity:.3}},F=function(e){return{maxHeight:e?"184px":"0px",overflow:"hidden",transition:"max-height 0.2s ease-in-out"}},D=function(e){var t=e.children,n=e.paddingBottom;return o.createElement(f.a,{paddingTop:"12px",paddingLeft:"36px",paddingBottom:n},o.createElement(v.kZ,{scale:"S",color:"LIGHTER"},t))},j=function(e){var t,n=e.post,r=e.hidePopover,i=(0,g.l)(),l=(0,E.au)(),c=(0,u.R)().value,v=(0,d.h)(n).viewerEdge,b=null==v?void 0:v.shareKey,I=function(e){var t=e.post,n=e.legacyShareKey,r=e.onComplete,i=(0,C.d4)((function(e){return e.client.isFirefox})),l=(0,o.useState)(!1),c=(0,s.A)(l,2),u=c[0],d=c[1],m=(0,O.L)().timer,p=(0,T.zF)(),f=(0,a.J)(t),h=(0,L.n)(P.a,{variables:{postId:t.id}}),v=(0,s.A)(h,1)[0],g=(0,o.useCallback)((function(){p({message:"Friend Link copied",duration:2e3})}),[p]),V=(0,o.useCallback)((function(){if(n){var e=(0,N.ST)(f,{sk:n});navigator.clipboard.writeText(e),g(),r()}}),[n,g,f,r]),E=(0,o.useCallback)((0,S.A)(R().mark((function e(){var t,n;return R().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,v();case 2:if(t=e.sent,"PostShareKey"!==(null==(n=t.data)?void 0:n.createPostShareKey.__typename)){e.next=8;break}return e.abrupt("return",(0,N.ST)(f,{sk:n.createPostShareKey.key}));case 8:throw new Error(null==n?void 0:n.createPostShareKey.__typename);case 9:case"end":return e.stop()}}),e)}))),[f,v]),y=(0,o.useCallback)((0,S.A)(R().mark((function e(){var t,n,o;return R().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(d(!0),e.prev=1,t=Date.now(),!i){e.next=10;break}return e.next=6,E();case 6:n=e.sent,navigator.clipboard.writeText(n),e.next=12;break;case 10:return e.next=12,navigator.clipboard.write([new ClipboardItem({"text/plain":E().then((function(e){return new Blob([e],{type:"text/plain"})}))})]);case 12:if(!((o=Date.now()-t)<1e3)){e.next=16;break}return e.next=16,new Promise((function(e){return m(e,1e3-o)}));case 16:g(),e.next=22;break;case 19:e.prev=19,e.t0=e.catch(1),p({message:"There was an error creating this Friend Link. Please try again later.",duration:3e3});case 22:return e.prev=22,d(!1),r(),e.finish(22);case 26:case"end":return e.stop()}}),e,null,[[1,19,22,26]])}))),[E,g,r,i]);return{copy:(0,o.useCallback)((function(){u||(n?V():y())}),[u,n,V,y]),isCopying:u}}({post:n,legacyShareKey:b,onComplete:r}),j=I.copy,M=I.isCopying,H=M?"Copying Friend Link...":"Copy Friend Link",z=l("ShowManageMembershipPage",{}),K=!!b||(null==c||null===(t=c.membership)||void 0===t?void 0:t.tier)===y.T3.FRIEND,U=(0,k.e)(K),W=(0,s.A)(U,4),G=W[0],Z=W[3];return o.createElement(o.Fragment,null,o.createElement(h.N,{rules:_,onClick:K?j:Z,disabled:M},o.createElement(w.A,null),o.createElement(f.a,{marginLeft:"12px",flexGrow:"1",textAlign:"left"},K?H:"Friend Link"),!K&&o.createElement(x,{className:i(B(G))})),o.createElement("div",{className:i(F(K||G))},o.createElement(D,null,b?"Friend Links shared from an author or publication editor are not eligible to earn in the Partner Program.":"Share free access to this member-only story with a friend.","  ",o.createElement(h.N,{linkStyle:"OBVIOUS",inline:!0,href:(0,A.ZZI)()},"Learn more")),!K&&o.createElement(o.Fragment,null,o.createElement(D,null,"Available to members with a Friend membership and story authors."),o.createElement(D,{paddingBottom:"12px"},c?o.createElement(V.C,{source:"friend_link",dimension:"post_friend_link",sourceProviderData:{postId:n.id},eventData:{postId:n.id},tag:"span"},o.createElement(p.a,{post:n,redirectUrl:z,linkStyle:"OBVIOUS",inline:!0},"Upgrade membership")):o.createElement(m.r,{redirectTo:z,operation:"register",susiEntry:"post_friend_link",post:n,linkStyle:"OBVIOUS",inline:!0},"Become a member")))))},M=n(14782),H=function(e){var t=e.post,n=e.source,r=e.isResponsive,s=e.testId,u=t.title,d=t.id,m=t.isPublished,p=(0,a.g)()(t);return o.createElement(l.d,{ariaId:"postFooterSocialMenu",source:{name:n},url:p,title:u,ariaLabel:"Share Post",postId:d,isResponsive:r,testId:s,width:"240px"},(function(e){return o.createElement(o.Fragment,null,o.createElement(M.q3,{paddingTopBottom:"6px"},o.createElement(i.X,{url:p,onClick:e,reportData:{postId:t.id},source:n,copyStyle:"INLINE"})),t.isLocked&&o.createElement(o.Fragment,null,o.createElement(M.eS,{paddingTopBottom:"6px"}),o.createElement(M.q3,{paddingTopBottom:"6px"},o.createElement(j,{post:t,hidePopover:e}))),m&&o.createElement(o.Fragment,null,o.createElement(M.eS,{paddingTopBottom:"6px"}),o.createElement(M.q3,{paddingTopBottom:"6px"},o.createElement(c._,{socialPlatform:"TWITTER",buttonStyle:"LINK_INLINE_SHORT_LABEL",postId:t.id})),o.createElement(M.q3,{paddingTopBottom:"6px"},o.createElement(c._,{socialPlatform:"FACEBOOK",buttonStyle:"LINK_INLINE_SHORT_LABEL",postId:t.id})),o.createElement(M.q3,{paddingTopBottom:"6px"},o.createElement(c._,{socialPlatform:"LINKEDIN",buttonStyle:"LINK_INLINE_SHORT_LABEL",postId:t.id}))))}))}},61221:(e,t,n)=>{n.d(t,{m:()=>g,H:()=>v});var r,o=n(80296),a=n(96540),i=n(32996),l=n(20036),c=n(49287),s=n(50684);function u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;t{n.d(t,{Q:()=>d});var r=n(96540),o=function(){return{overflowX:"scroll","::-webkit-scrollbar":{display:"none"},scrollbarWidth:"none",msOverflowStyle:"none"}},a=n(85050),i=n(44402),l={display:"flex",alignItems:"center","> *":{marginRight:{xs:"8px",sm:"8px",md:"24px",lg:"24px",xl:"24px"},flexShrink:0},"> :last-child":{marginRight:{xs:"24px",sm:"8px",md:0,lg:0,xl:0}}},c=function(e){return"solid 1px ".concat(e.colorTokens.background.neutral.secondary.base)},s=function(e){return{xs:void 0,sm:void 0,md:c(e),lg:c(e),xl:c(e)}},u=function(e){return function(t){return{display:"flex",justifyContent:"space-between",borderTop:s(t),borderBottom:s(t),margin:{xs:"".concat(null!=e?e:"24px"," -24px 0"),sm:"".concat(null!=e?e:"24px"," 0 0"),md:"".concat(null!=e?e:"32px"," 0 0"),lg:"".concat(null!=e?e:"32px"," 0 0"),xl:"".concat(null!=e?e:"32px"," 0 0")},padding:{xs:"0",sm:"0",md:"3px 8px",lg:"3px 8px",xl:"3px 8px"}}}},d=function(e){var t=e.leftButtons,n=e.rightButtons,c=e.marginTop,s=(0,i.l)();return r.createElement("div",{className:s(u(c))},r.createElement(a.V,{md:!0,lg:!0,xl:!0,displayValue:"flex",alignItems:"center"},t),r.createElement("div",{className:s([l,o])},r.createElement(a.V,{xs:!0,width:"16px"}),n))}},62427:(e,t,n)=>{n.d(t,{L:()=>k});var r,o=n(64467),a=n(96540),i=n(86527),l=n(5600),c=n(36557),s=n(72130),u=n(49287),d=n(44402);function m(){return m=Object.assign?Object.assign.bind():function(e){for(var t=1;t{n.d(t,{_:()=>i});var r=n(58168),o=n(96540),a=n(62427),i=function(e){var t=!e.allowResponses||e.isLimitedState||!e.isPublished,n=(0,o.useMemo)((function(){return e.isPublished?e.allowResponses?e.isLimitedState?"This feature is temporarily disabled":void 0:"Responses hidden":"You cannot respond to a draft"}),[e.isPublished,e.allowResponses,e.isLimitedState]);return o.createElement(a.L,(0,r.A)({},e,{disabled:t,disabledTooltipText:n}))}},23406:(e,t,n)=>{n.d(t,{u:()=>r});var r=n(96540).createContext({addContinueThisThreadSidebar:function(){return null},openSidebar:function(){return null},closeSidebar:function(){return null}})},1567:(e,t,n)=>{n.d(t,{w:()=>S});var r,o=n(58168),a=n(96540),i=n(44402);function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t path":{fill:e.colorTokens.foreground.neutral.secondary.base}}},b=function(e){var t=e.buttonStyle,n=e.socialPlatform,r=(0,i.l)();switch(t){case"LINK_INLINE_SHORT_LABEL":switch(n){case"FACEBOOK":return a.createElement(c,{className:r(y)});case"TWITTER":return a.createElement(g.A,{className:r(y)});case"LINKEDIN":return a.createElement(v,{className:r(y)});default:return null}case"BUTTON_BRANDED":switch(n){case"FACEBOOK":return a.createElement(d.A,null);case"TWITTER":return a.createElement(g.A,null);case"LINKEDIN":return a.createElement(p,{className:r([E,V])});default:return null}default:return null}},x=n(86527),w=n(52290),k=n(99731),A=function(e){return{display:"inline-flex",alignItems:"center",":hover path":{fill:e.colorTokens.foreground.neutral.primary.base}}},I={FACEBOOK:"Facebook",TWITTER:"X",LINKEDIN:"LinkedIn"};function S(e){var t=e.buttonStyle,n=e.socialPlatform,r=e.baseOnClick,i=e.href,l=e.testId,c=(0,a.useMemo)((function(){return{"aria-label":"Share on ".concat(n.toLowerCase()),onClick:function(){r();var e=Math.max((window.outerHeight||200)/2-560,100),t=(window.outerWidth||200)/2-250;window.open(i,"Social Share Window","resizable,scrollbars,status,top=".concat(e,",left=").concat(t,",height=").concat(650,",width=").concat(650))}}}),[r,i,n]),s=I[n];if(!s)return null;switch(t){case"LINK_INLINE_SHORT_LABEL":return a.createElement(x.N,(0,o.A)({},c,{rules:A,"data-testid":l}),a.createElement(b,{buttonStyle:t,socialPlatform:n}),a.createElement(w.a,{display:"inline",marginLeft:"12px"},"Share on ",s));case"BUTTON_BRANDED":return a.createElement(k.$n,(0,o.A)({},c,{buttonStyle:"SOCIAL",size:"LARGE",width:k.Gk,padding:k.Rc,"data-testid":l}),a.createElement(w.a,{display:"flex",alignItems:"center",justifyContent:"space-between"},a.createElement(b,{buttonStyle:t,socialPlatform:n}),"Share on ",s,a.createElement(w.a,{height:"24px",width:"24px"})));default:return null}}},19724:(e,t,n)=>{n.d(t,{d:()=>v});var r,o=n(80296),a=n(96540),i=n(14782),l=n(24960),c=n(20036),s=n(72130),u=n(49287),d=n(20239);function m(){return m=Object.assign?Object.assign.bind():function(e){for(var t=1;t{n.d(t,{_:()=>c});var r=n(96540),o=n(1567),a=n(72130),i=n(49287),l=n(51260),c=function(e){var t,n=e.postId,c=e.socialPlatform,s=e.buttonStyle,u=e.testId,d=(0,a.$L)(),m=(0,i.W9)(),p=(0,l.au)(),f=r.useCallback((function(){m&&d.event("post.shareOpen",{postId:n,source:m,dest:c.toLowerCase(),dialogType:"native"})}),[m,d,n,c]);if("FACEBOOK"===c)t=p("RedirectShowPostShare",{postId:n,channel:"facebook"});else if("TWITTER"===c)t=p("RedirectShowPostShare",{postId:n,channel:"twitter"});else{if("LINKEDIN"!==c)return null;t=p("RedirectShowPostShare",{postId:n,channel:"linkedIn"})}return r.createElement(o.w,{baseOnClick:f,href:t,socialPlatform:c,buttonStyle:s,testId:u})}},3714:(e,t,n)=>{n.d(t,{Y:()=>a,a:()=>i});var r=n(45458),o=n(25703),a={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"useCopyFriendLink_post"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Post"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"usePostUrl_post"}}]}}].concat((0,r.A)(o.c.definitions))},i={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreatePostShareKeyMutation"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"postId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createPostShareKey"},arguments:[{kind:"Argument",name:{kind:"Name",value:"postId"},value:{kind:"Variable",name:{kind:"Name",value:"postId"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"PostShareKey"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"key"}}]}}]}}]}}]}},79197:(e,t,n)=>{var r;n.d(t,{H:()=>r}),function(e){e.LOHighlightCTA="lo_highlight_cta",e.LIHighlightCTA="li_highlight_cta",e.RegWall="regwall",e.SyndicatedRegwall="syndicated_regwall"}(r||(r={}))},71836:(e,t,n)=>{n.d(t,{C:()=>u});var r=n(64467),o=n(96540),a=n(72130),i=n(49287),l=n(79429);function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t