"use strict";(self.webpackChunksubstack=self.webpackChunksubstack||[]).push([["9517"],{20392:function(t,e,i){i.d(e,{Z:()=>n});let n={container:"container-AejwGn",tab:"tab-FhVbMD",highlight:"highlight-rZ7aQJ"}},72708:function(t,e,i){i.d(e,{Z:()=>r});var n=i(7409),a=i(99282),o=i(16584),s=i(64515);let r=t=>(0,o.BX)(s.l,(0,a._)((0,n._)({},t),{name:"VoiceoverIcon",svgParams:{height:24,width:24,viewBox:"0 0 24 24"},fill:"none",children:[(0,o.tZ)("path",{d:"M11.8518 3.31518C12.2459 4.26329 13.551 7.10985 14.4542 8.3467C15.3764 9.60967 12.8285 9.95184 12 10.5","stroke-width":"1.5","stroke-linecap":"round"}),(0,o.tZ)("path",{d:"M12 10.5C12 10.5 12.4662 11.2332 12.7627 11.7326C13.0592 12.232 13 12.5 11.5 13C10.7772 13.2409 9.5 13.5 9.5 13.5C10.3447 13.9272 12.2664 14.1393 12.4041 14.3167C12.763 14.779 12.3241 15.4618 11.8617 15.8208C11.3994 16.1797 12.0724 18.7353 10.5 19.5C8.9276 20.2647 5.70772 19.432 3 18","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),(0,o.tZ)("path",{d:"M18.5 6.5L20.3544 4.8526","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),(0,o.tZ)("path",{d:"M18.5 15.5L20.3544 17.2545","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),(0,o.tZ)("path",{d:"M19.5 11.0326L22 11.0326","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})]}))},90311:function(t,e,i){i.d(e,{SP:()=>V,fB:()=>J,hp:()=>Q});var n=i(27412),a=i(7409),o=i(99282),s=i(16584),r=i(6400),c=i(30396),l=i(94184),d=i.n(l),h=i(39693),p=i.n(h),m=i(26224),u=i(60826),Z=i(33112),g=i(39432),v=i(64579),_=i(21286),b=i(25265),k=i(21206),f=i(39929),w=i(54688),C=i(48917),N=i(94922),S=i(94442),y=i(85685),x=i(30329),M=i(95441),B=i(40647),P=i(90099),A=i(68833),L=i(7882),X=i(94874),F=i(13229),I=i(19081),U=i(58175),z=i(2009),R=i(98012),D=i(24791),O=i(31377),T=i(60308),W=i(33884),E=i(63651),K=i(84864),j=i(47929);class H extends r.Component{componentWillUnmount(){this.unmounted=!0}render(t){let{pub:e,post:i,showAuthor:n,showPhoto:r,fromPostPage:c}=t;return(0,S.F6)({pub:e,post:i,showAuthor:n,showPhoto:r})||(0,S.Cz)({pub:e,post:i,showAuthor:n})||(0,S.z5)({pub:e,post:i,showAuthor:n})?this.withAuthorLine(this.props,this.state):(0,s.tZ)(q,(0,o._)((0,a._)({},this.props),{editOnRightSide:this.props.showUpdatedIcons,className:this.props.showUpdatedIcons?"alternative-meta":this.props.className,isMobileWidth:this.state.isMobileWidth,actionBarStyle:c?"post-header-compact":"post-preview"}))}constructor(t,e){var i;if(super(t,e),(0,n._)(this,"unmounted",void 0),(0,n._)(this,"withAuthorLine",(t,e)=>{let{pub:i,post:n,showAuthor:a,showPhoto:o,getConfigFor:r,isAppMode:c}=t,l="adhoc_email"===n.type,h=(0,K.getBylineUsers)(n).length,p=1===h&&(0,K.getBylineUsers)(n)[0],u=p&&p.is_guest&&!r("dont_show_guest_byline")&&!l,Z=t.showDate||t.showDatetime,g=!n.is_published&&!t.inThreadHead&&Z&&!l,v=t.isFreePreview&&t.showAudience&&Z&&!l,_=(0,O.isFoundingAudience)(n.audience)&&t.showAudience&&!v&&Z&&!l&&!(0,D.sv)({post:n}),b=(0,O.isPaidAudience)(n.audience)&&t.showAudience&&!_&&!v&&Z&&!l&&!(0,D.sv)({post:n}),k=(0,S.F6)({pub:i,post:n,showAuthor:a,showPhoto:o});return(0,s.tZ)(P.YF,{width:"100%",className:d()("post-meta"),children:(0,s.BX)("tr",{children:[(0,s.tZ)("td",{children:(0,s.BX)(P.i$,{children:[(0,s.tZ)(P.zK,{gap:4,children:(0,s.tZ)(U.xv.Meta,{color:"primary",className:m.A.postAuthor,children:h>0?(0,K.oxfordComma)((0,K.getBylineUsers)(n).map(t=>(0,s.tZ)(U.xv.Meta,{as:"a",href:c?(0,E.FA)({user_id:t.id,user_name:t.name,redirect:"app-store-no-desktop"}):(0,T.LwU)(t,i),color:"primary",style:"text-decoration: none",children:t.name}))):(0,K.getPrintedByline)(i,n)})}),(0,s.BX)(P.zK,{gap:4,children:[(0,s.tZ)(U.xv.Meta,{children:(t.showDate||t.showDatetime)&&n.post_date&&(0,s.tZ)("time",{dateTime:(0,R.Z)(n.post_date).toISOString(),children:(0,R.Z)(n.post_date).locale(this.context.language).standardDate()})}),b&&(0,s.BX)(P.zK,{gap:4,children:[(0,s.tZ)(U.xv.Meta,{children:"∙"}),(0,s.tZ)(U.xv.Meta,{color:"accent-purple",translated:!0,children:"Paid"})]}),_&&(0,s.BX)(P.zK,{gap:4,children:[(0,s.tZ)(U.xv.Meta,{children:"∙"}),(0,s.tZ)(U.xv.Meta,{color:"accent-purple",children:this.context.iString((0,D.a_)(i,n))})]}),v&&(0,s.BX)(P.zK,{gap:4,children:[(0,s.tZ)(U.xv.Meta,{children:"∙"}),(0,s.tZ)(U.xv.Meta,{color:"accent-purple",translated:!0,children:"Preview"})]}),u&&(0,s.BX)(P.zK,{gap:4,children:[(0,s.tZ)(U.xv.Meta,{children:"∙"}),(0,s.tZ)(U.xv.Meta,{translated:!0,children:"Guest post"})]}),g&&(0,s.BX)(P.zK,{gap:4,children:[(0,s.tZ)(U.xv.Meta,{children:"∙"}),(0,s.tZ)(U.xv.Meta,{translated:!0,children:"Draft"})]})]})]})}),k&&(0,s.tZ)("td",{align:"right",children:(0,s.tZ)(P.zK,{gap:4,children:h>0&&(0,K.getBylineUsers)(n).map((t,e)=>{var n;return e<4&&(0,s.tZ)("a",{href:c?(0,E.FA)({user_id:t.id,user_name:t.name,redirect:"app-store-no-desktop"}):(0,T.LwU)(t,i),children:(0,s.tZ)(P.NS,{src:null!==(n=t.photo_url)&&void 0!==n?n:"",size:h>1?32:40})})})})})]})})}),"undefined"!=typeof window&&(null===(i=window)||void 0===i?void 0:i.matchMedia)){let t=window.matchMedia("screen and (max-width: 650px)");this.state={isMobileWidth:t.matches};let e=t=>{this.unmounted||this.setState({isMobileWidth:t.matches})};t.addEventListener?t.addEventListener("change",e):t.addListener&&t.addListener(e)}}}(0,n._)(H,"contextType",M.wj);let V=(0,B.xY)(H);function J(t){var e,i;let{pub:n,post:o,user:l,reactors:d,secondaryFaces:h}=t,[p,m]=(0,c.eJ)(null),[u,g]=(0,c.eJ)(!1),v=(0,L.ib)({pathname:"primary"===p?"/api/v1/post/".concat(o.id,"/reactors"):"/api/v1/post/".concat(o.id,"/restackers"),auto:!!p,deps:[o.id,p]}),_=$(d,l,!!o.reaction,n),b=$(h,l,!!o.restacked,n),k=_.concat(b.filter(t=>!!t.photo_url&&!_.find(e=>e.id===t.id))),f=Math.max(null!==(e=o.reactions["❤"])&&void 0!==e?e:0,(null!=_?_:[]).length),w=n.hide_post_restacks?0:null!==(i=o.restacks)&&void 0!==i?i:0,C=f>0?(0,K.pluralize)(f,"Like"):"",N="";return w>0&&(N="".concat((0,K.pluralize)(w,"Restack"))),(0,s.BX)(s.HY,{children:[(0,s.BX)(I.X2,{gap:16,alignItems:"center",color:"secondary",children:[(0,s.tZ)(F.H,{users:k,renderAvatar:t=>(0,s.tZ)(X.xV,(0,a._)({},t)),direction:"rtl",renderCount:()=>(0,s.tZ)(r.Fragment,{})}),(0,s.tZ)(U.xv.B4,{color:"secondary",children:(0,s.BX)(I.X2,{gap:4,alignItems:"center",children:[(0,s.tZ)(G,{label:C,onClick:()=>{f&&((0,A.j)(A.FP.POST_REACTIONS_MODAL_VIEWED,{post_id:o.id}),m("primary"),g(!0))}}),C&&N&&"∙",(0,s.tZ)(Y,{post:o,label:N})]})})]}),v.result&&(0,s.tZ)(Z.F,{isOpen:u,modalLabel:C,faces:v.result,totalCount:f,onClose:()=>{g(!1),m(null)},utmSource:"post-reactions-modal"})]})}let G=t=>{let{label:e,onClick:i}=t;return(0,s.tZ)(U.hh,{onClick:i,color:"secondary",cursor:"pointer",children:e})},Y=t=>{let{label:e,post:i}=t;return(0,s.tZ)(U.xv.B4,{color:"secondary",children:(0,s.tZ)(U.hh,{href:(0,W.Oi)(i.id,{noBase:z.L,urlParams:{utm_source:j.b3.substack,utm_content:j.fZ.facepileRestacks}}),color:"secondary",children:e})})};function Q(t){var e,i;let{post:n,user:o,pub:r}=t,c=(0,L.ib)({pathname:"/api/v1/post/".concat(n.id,"/facepile"),auto:!0,deps:[n.id]});return(0,s.tZ)(J,(0,a._)({reactors:$(null===(e=c.result)||void 0===e?void 0:e.reactors,o,!!n.reaction,r),secondaryFaces:$(null===(i=c.result)||void 0===i?void 0:i.restackers,o,!!n.restacked,r)},t))}function $(t,e,i,n){if(!t)return[];if(e){let a=t.findIndex(t=>t.id===e.id);i&&("private"!==e.subscription_visibility||46438===n.id)&&e.activity_likes_enabled&&a<0?t.splice(0,0,{id:e.id,name:e.name,photo_url:e.photo_url}):!i&&a>=0&&t.splice(a,1)}return t}function q(t){var e;let i,{additionalCommentCount:n=0,className:a,user:o,pub:r,post:c,showAudience:l=!1,showDate:h=!1,showEmailSent:m=!1,showDatetime:Z=!1,showReactions:_=!0,showComments:M=!0,showShare:B=!1,showRestack:P=!1,showPublicationName:A=!1,hidePinning:L=!1,reaction_token:X,onClick:F,onChange:I,isStatic:z=!1,isFreePreview:D=!1,allowSendEmail:W=!1,allowEdit:E=!1,shareTooltipText:H,showPins:V,sharedShareDialog:J,showUpdatedIcons:G,editOnRightSide:Y=!1,onClickCommentButton:Q,showAuthor:$,showPhoto:q,fromPostPage:te,isMobileWidth:ti,actionBarStyle:tn="post-header-compact"}=t,ta=r.id===c.publication_id?r:void 0,to="post-footer"===tn,ts=to?20:"post-preview"===tn?14:18,tr="post-header-large"===tn?20:"post-preview"===tn?16:"thread-head"===tn||to?14:18;i=c.comment_url_override?c.comment_url_override:z?"".concat(u.W.HALF_MAGIC_COMMENTS_URL,"&utm_source=").concat(j.b3.substack,"&utm_medium=").concat(j.lP.email):(0,T.uRy)(r,c,{comments:!0});let tc=n+(null!==(e=c.comment_count)&&void 0!==e?e:0),tl=M&&!D&&(0,K.showCommentsOnPost)({publication:r,post:c})&&"restack"!==c.type,td=_&&!D&&!["adhoc_email","restack"].includes(c.type),th=(h||Z)&&c.post_date&&!c.is_draft,tp=m?!!c.email_sent_at:null,tm=p()([m&&tp&&{className:"email-sent",title:"This post was sent as an email",content:(0,s.tZ)(g.Z,{className:"post-meta-icon",height:ts,isStatic:z})},V&&c.is_section_pinned&&{className:"icon pinned",content:(0,s.tZ)(f.Z,{className:"post-meta-icon",isStatic:z})},"adhoc_email"===c.type?{className:"audience-adhoc",content:(0,s.tZ)(w.Z,{className:"post-meta-icon",isStatic:z})}:l&&(0,O.isPaidAudience)(c.audience)&&{className:"audience-lock",content:(0,s.tZ)(v.Z,{color:"#666666",height:ts,isStatic:z})},(0,S.Er)({pub:r,post:c,showAuthor:$,showPhoto:q,isMobileWidth:ti})&&{className:"author",content:(0,K.getBylineUsers)(c).length>0?(0,K.oxfordComma)((0,K.getBylineUsers)(c).map(t=>(0,s.tZ)(y.ProfileHoverCard,{disabled:z,subject:t,utmSource:"byline",children:(0,s.tZ)("a",{href:(0,T.LwU)(t,r),onClick:t=>t.stopPropagation(),children:t.name})}))):(0,K.getPrintedByline)(r,c)},A&&{className:"post-publication-name",content:r.name},G&&!Y&&E&&!z&&o&&o.is_contributor&&{className:"post-meta-item icon edit-icon",onClick:t=>t.stopPropagation(),content:(0,s.tZ)(C.l,{pub:r,post:c,iconHeight:ts,hidePinning:L,user:o,emailSent:tp,allowSendEmail:W,showUpdatedIcons:G})},th&&{className:"post-date",title:(0,R.Z)(c.post_date).toISOString(),content:(0,s.tZ)(U.xv.Meta,{children:(0,s.tZ)("time",{dateTime:(0,R.Z)(c.post_date).toISOString(),children:(0,S.fh)({post:c,showDatetime:Z,isStatic:z,fromPostPage:te,showReactions:td})})})},(null==ta?void 0:ta.community_enabled)&&c.slug&&td&&!c.is_draft&&{className:"icon",onClick:t=>t.stopPropagation(),content:(0,s.tZ)(x.dJ,{user:o,pub:r,post:c,token:X,onChange:t=>{null==I||I(t)},height:tr,isStatic:z,buttonStyle:to,className:"post-meta-icon like-reaction-button",hideReactionCount:to&&!z})},o&&{className:"icon",onClick:t=>t.stopPropagation(),content:(0,s.tZ)(tt,{post:c,isPostFooter:to,isStatic:z,lucideIconHeight:tr,onChange:I})},(null==ta?void 0:ta.community_enabled)&&c.slug&&tl&&!c.is_draft&&{className:"icon",onClick:t=>t.stopPropagation(),content:(0,s.BX)("a",{className:to?"post-meta-button button":"",href:i,native:ta&&(0,T.Fdd)(document.location.pathname),onClick:Q,children:[(0,s.tZ)(b.Z,{className:"comment-icon post-meta-icon",isStatic:z,height:tr,alt:"Comment",stroke:"#757575",fill:"transparent",strokeWidth:z?1:1.5,ampProps:{layout:"fixed"}}),!tc&&to&&(0,s.tZ)("span",{className:"meta-button-label",children:"Comment"}),tc>0&&(0,s.tZ)("span",{className:"comment-count",children:(0,K.numberToString)(tc)})]})},P&&!to&&{className:"icon",onClick:t=>t.stopPropagation(),content:(0,s.BX)("a",{href:u.W.RESTACK_URL,className:to?"button post-meta-button":void 0,children:[(0,s.tZ)(k.Z,{className:"recommend-icon post-meta-icon",isStatic:z,height:tr,alt:"Recommend",stroke:"#757575",fill:"transparent",strokeWidth:z?1:1.5,ampProps:{layout:"fixed"}}),to&&(0,s.tZ)("span",{className:"meta-button-label",children:"Recommend"})]})},B&&"only_free"!==c.audience&&!c.is_draft&&!D&&{className:"icon",onClick:t=>t.stopPropagation(),content:(0,s.BX)(N.v,{user:o,pub:ta,post:c,reaction_token:X,height:tr,onChange:I,isStatic:z,sharedShareDialog:J,position:"post-footer"===tn?"post-footer":"post-header",linkClassName:to?"button post-meta-button":void 0,children:[to&&(0,s.tZ)("span",{className:"meta-button-label",children:"Share"}),H&&(0,s.tZ)("div",{className:"share-tooltip-wrap",children:(0,s.tZ)("div",{className:"share-tooltip",children:H})})]})},(!G||Y)&&E&&!z&&o&&o.is_contributor&&{className:"icon edit-icon",onClick:t=>t.stopPropagation(),content:(0,s.tZ)(C.l,{pub:r,post:c,iconHeight:ts,hidePinning:L,user:o,emailSent:tp,allowSendEmail:W,showUpdatedIcons:G})}]);return z?(0,s.tZ)("table",{className:d()("post-meta custom",{big:to},a),cellpadding:"0",cellspacing:"0",onClick:F,children:(0,s.tZ)("tr",{children:tm.map(t=>{let{className:e,title:i,onClick:n,content:a}=t;return(0,s.tZ)("td",{className:d()("post-meta-item",e),title:i,onClick:n,children:a})})})}):(0,s.tZ)("div",{className:d()("post-meta post-meta-actions-web custom",{big:to},a),onClick:F,children:tm.map(t=>{let{className:e,title:i,onClick:n,content:a}=t;return(0,s.tZ)("div",{className:d()("post-meta-item",e),title:i,onClick:n,children:a})})})}function tt(t){let{post:e,isPostFooter:i,isStatic:n,lucideIconHeight:r,onChange:c}=t,{onSave:l,isSaved:h}=(0,S.vk)({post:e,isSaved:e.is_saved});return(0,s.BX)("a",{className:d()("post-meta-save-button",i?"post-meta-button button":"",{isSaved:h}),href:n&&u.W.SAVE_POST_URL||void 0,onClick:()=>{let t=l();null==c||c({post:(0,o._)((0,a._)({},e),{is_saved:t})})},children:[(0,s.tZ)(_.Z,{isStatic:n,height:r,stroke:"#757575",strokeWidth:n?1:1.5}),i&&(0,s.tZ)("span",{className:"meta-button-label",children:"Save"})]})}},6246:function(t,e,i){i.d(e,{T:()=>s,u:()=>a});let n=Intl.NumberFormat(void 0,{maximumSignificantDigits:4});function a(t){return n.format(t)}let o=new Intl.NumberFormat(void 0,{maximumSignificantDigits:3,notation:"compact"});function s(t){return o.format(t)}}}]);