!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"substack@538433c"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="3ea2fed1-ada2-4fe9-9278-2bc6077eab4b",e._sentryDebugIdIdentifier="sentry-dbid-3ea2fed1-ada2-4fe9-9278-2bc6077eab4b")}catch(e){}}();"use strict";(self.webpackChunksubstack=self.webpackChunksubstack||[]).push([["15208"],{93038:function(e,n,t){t.d(n,{Ay:()=>b,_F:()=>f});var a=t(69277),r=t(70408),i=t(4006),l=t(32485),o=t.n(l),c=t(15734),u=t.n(c),s=t(27437),d=t(84777),m=t(95899),p=t(49807),h=t(3223);let b=e=>{let{id:n,type:t,name:a,url:r,photo_url:l,uuid:c,mentionText:u,isStatic:b=!1,isEditorContext:g=!1}=e;return b?(0,i.Y)("span",{className:o()(h.A.mention,h.A.mentionStatic),"data-component-name":"MentionStatic",children:(0,i.Y)("a",{href:(0,p.bzS)(t,n,a,r),children:a||"Substack user"})}):"user"===t?(0,i.Y)(m.HW,{children:(0,i.Y)(s.ProfileHoverCard,{subject:{id:n,name:a||"Substack user",photo_url:l},utmSource:"mention",trigger:(0,i.Y)("a",{className:h.A.mention,href:g?void 0:(0,p.bzS)(t,n,a,r),target:"_blank",rel:"noopener","data-attrs":JSON.stringify({name:a,id:n,type:t,url:r,photo_url:l,uuid:c}),onClick:e=>e.stopPropagation(),"data-component-name":"MentionUser",children:null!=u?u:a})})}):"pub"===t?(0,i.Y)(d.m,{pubId:n,utmSource:"mention",trigger:(0,i.Y)("a",{className:h.A.mention,href:r,target:"_blank",rel:"noopener","data-attrs":JSON.stringify({name:a,id:n,type:t,url:g?void 0:(0,p.bzS)(t,n,a,r),uuid:c}),onClick:e=>e.stopPropagation(),"data-component-name":"MentionPub",children:null!=u?u:a})}):(0,i.Y)("a",{className:h.A.mention,target:"_blank",rel:"noopener",href:(0,p.bzS)(t,n,a,r),"data-attrs":JSON.stringify({name:a,id:n,type:t,url:r,photo_url:l,uuid:c}),"data-component-name":"Mention",children:null!=u?u:a})},g={},f=async function(e){let{pathname:n="/api/v1/posts/mention"}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(g[e])return g[e];let{profiles:t,publications:i}=(await u().get(n).query({query:e})).body,l=new Map;return t&&t.length&&l.set("Writers",t.map(e=>(0,r._)((0,a._)({},e),{type:"user"}))),i&&i.length&&l.set("Publications",null==i?void 0:i.map(e=>(0,r._)((0,a._)({},e),{type:"pub",url:(0,p.Bte)({subdomain:e.subdomain}),photo_url:e.logo_url}))),g[e]=l,l}},10398:function(e,n,t){t.d(n,{Hr:()=>A});var a=t(69277),r=t(70408),i=t(79785),l=t(4006),o=t(78649),c=t(84605),u=t(42686),s=t(89607),d=t(95282),m=t(81992),p=t(27332),h=t(25859),b=t(60897),g=t(99662),f=t(24078),y=t(76977),v=t(63136),k=t(83629),_=t(83357),Y=t(49095),S=t(49807),D=t(57324),I=t(44307);function w(){let e=(0,i._)(["This content is only visible to paid subscribers of ",""]);return w=function(){return e},e}function A(e){let{parent:n,comment:t,publication:a,readOnly:r,onAttachmentClick:i,utm_content:c,isDm:u,isPermalink:s,commentId:d}=e,m=(0,_.g)({onClick:()=>null==i?void 0:i({commentId:String(t.id)}),href:r?void 0:(0,S.Zgx)(t,{noBase:k.Z}),state:{showBack:!0}});return(0,l.Y)(o.Q,{children:(0,l.Y)(C,{readOnly:r,linkProps:m,isEmbed:g.y,children:(0,l.Y)(F,{parent:n,comment:t,publication:a,readOnly:r,onAttachmentClick:i,utm_content:c,isDm:u,isPermalink:s,commentId:d})})})}function C(e){let{children:n,readOnly:t,linkProps:i,isEmbed:o}=e;return(0,l.Y)(y.I1,(0,r._)((0,a._)({as:t?"div":"a",bg:"primary",border:"detail",radius:"md",padding:12,gap:8,target:o()?"_blank":void 0,draggable:!1},i),{showFocus:!0,animate:!0,className:I.A.commentContainer,children:n}))}function F(e){var n,t,a,r;let{parent:i,comment:o,publication:c,readOnly:u,onAttachmentClick:s,utm_content:d,isDm:m,isPermalink:p,commentId:h}=e,{truncatedBodyJson:g}=(0,b.A)(o,{truncationProfile:"small"}),f=null!=(r=o.user)?r:o.user_id?{id:o.user_id,name:null!=(n=o.name)?n:"",photo_url:o.photo_url,bestseller_tier:null!=(t=o.user_bestseller_tier)?t:void 0,status:null!=(a=o.userStatus)?a:null}:null;return(0,l.FD)(l.FK,{children:[f&&(0,l.Y)(T,{commentUser:f,comment:o,readOnly:u,utm_content:d}),(0,l.Y)(N,{parent:i,comment:o,publication:c,truncatedBodyJson:g,isDm:m,onAttachmentClick:s,utm_content:d,readOnly:u,isPermalink:p,commentId:h})]})}function T(e){let{commentUser:n,comment:t,readOnly:a,utm_content:r}=e;return n?(0,l.FD)(y.pT,{gap:8,alignItems:"center",justifyContent:"start",children:[(0,l.Y)(_.N,{href:(0,S.gYq)(n,{noBase:k.Z,utm_content:D.fL.substackFeedItem,utm_source:null!=r?r:void 0}),target:(0,g.y)()?"_blank":void 0,showBack:!0,radius:"full",showFocus:!0,animate:!0,children:(0,l.Y)(f.eu,{size:20,user:n})}),(0,l.Y)(v.EY.B4,{weight:"medium",color:"primary",children:a?n.name:(0,l.FD)(y.pT,{gap:8,direction:"row",justifyContent:"space-between",children:[(0,l.Y)(h.yp,{user:n,utm_source:D.VU.substackFeedItem,utm_content:r,children:n.name}),(null==n?void 0:n.bestseller_tier)!=null&&(0,l.Y)(Y.UserStatusSymbols,{tier:n.bestseller_tier,userId:n.id,size:"xs"})]})}),(0,l.Y)(v.EY.B4,{as:"span",color:"secondary",children:(0,l.Y)(p.Iz,{timestamp:t.date,comment:t})})]}):null}function N(e){var n,t,a,r,i,o;let{parent:u,comment:s,publication:d,truncatedBodyJson:m,isDm:p,isPermalink:h,readOnly:b,onAttachmentClick:g,utm_content:f,commentId:y}=e,{iString:v,iTemplate:k}=(0,c.GO)(),_=null!=(o=null==d?void 0:d.name)?o:v("this publication"),Y=k(w(),_),S=null==u||null==(n=u.attachments)?void 0:n.some(e=>"image"===e.type||"video"===e.type),D=null==(t=s.attachments)?void 0:t.some(e=>"image"===e.type||"video"===e.type),I=null==(a=s.attachments)?void 0:a.some(e=>"image"!==e.type&&"video"!==e.type&&"live_stream"!==e.type),A=null==(r=s.attachments)?void 0:r.some(e=>"post"===e.type&&(e.postSelection||e.postImageSelection)),C=null==(i=s.attachments)?void 0:i.some(e=>"poll"===e.type);return S||D&&I||I&&!A&&!C?(0,l.Y)(M,{comment:s,truncatedBodyJson:m,hiddenText:Y,onAttachmentClick:g,utm_content:f}):(0,l.Y)(O,{comment:s,truncatedBodyJson:m,hiddenText:Y,onAttachmentClick:g,utm_content:f,readOnly:b,isDm:p,isPermalink:h,commentId:y})}function M(e){var n,t;let{comment:a,truncatedBodyJson:r,hiddenText:i,onAttachmentClick:o,utm_content:c}=e;return(0,l.Y)(l.FK,{children:(0,l.FD)(y.pT,{gap:8,direction:"row",flex:"grow",justifyContent:"space-between",children:[(0,l.FD)(y.I1,{gap:4,children:[(0,l.Y)(s.T,{content:r,isHidden:a.hidden,hiddenText:i,attachedLinks:(0,d.MT)(a)}),(0,l.Y)(m.ot,{attachments:null!=(n=a.attachments)?n:[],onAttachmentClick:o,utm_content:c})]}),(0,l.Y)(u.Yw,{attachments:null!=(t=a.attachments)?t:[]})]})})}function O(e){var n;let{comment:t,truncatedBodyJson:a,hiddenText:r,onAttachmentClick:i,utm_content:o,readOnly:c,isDm:m,isPermalink:p,commentId:h}=e;return(0,l.FD)(l.FK,{children:[(0,l.Y)(s.T,{content:a,isHidden:t.hidden,hiddenText:r,attachedLinks:(0,d.MT)(t)}),(0,l.Y)(u.ti,{attachments:null!=(n=t.attachments)?n:[],onAttachmentClick:i,utm_content:o,isRestack:!0,readOnly:c,isDm:m,isPermalink:p,commentId:h})]})}},53594:function(e,n,t){function a(e,n){return e&&"rgba(".concat(e.join(","),",").concat(n,")")}t.d(n,{Vu:()=>i,iL:()=>a,p4:()=>r});let r=e=>{var n,t;let{palette:r,colorKey:i="DarkMuted",defaultColor:l="var(--color-dark-bg-secondary)",bgColor:o="var(--color-dark-bg-secondary)"}=e;if(!r&&!l)return null;let c=null!=(t=a(null==r||null==(n=r[i])?void 0:n.rgb,.75))?t:l;return{background:"linear-gradient(180deg, ".concat(c,", ").concat(c,"), ").concat(o)}},i=e=>{var n,t,r,i,l,o;let{palette:c,defaultColor:u="var(--color-dark-bg-primary)",bgColor:s="var(--color-dark-bg-primary)"}=e;if(!c&&!u)return null;let d=null!=(i=a(null==c||null==(n=c.Muted)?void 0:n.rgb,.75))?i:u,m=null!=(l=a(null==c||null==(t=c.DarkMuted)?void 0:t.rgb,.75))?l:u,p=null!=(o=a(null==c||null==(r=c.DarkVibrant)?void 0:r.rgb,.75))?o:u;return{background:"linear-gradient(135deg, ".concat(d,", ").concat(m,", ").concat(p,"), ").concat(s),backgroundSize:"400% 400%"}}},52145:function(e,n,t){t.d(n,{DE:()=>u,MI:()=>s});var a=t(4006),r=t(38376),i=t(49436),l=t(84605);t(94729),t(35369);var o=t(45859);t(36372),t(36319),t(70486),t(16291);var c=t(35407);function u(e){let{onMute:n,customLabel:t}=e,{iString:i}=(0,l.GO)();return(0,a.Y)(o.Dr,{leading:(0,a.Y)(r.A,{className:c.A.muteIcon}),onClick:e=>{e.preventDefault(),e.stopPropagation(),n("indefinitely")},children:t||i("Mute")})}function s(e){let{onClick:n,customLabel:t}=e,{iString:r}=(0,l.GO)();return(0,a.Y)(o.Dr,{leading:(0,a.Y)(i.A,{className:c.A.muteIcon}),onClick:e=>{e.preventDefault(),n()},children:t||r("Unmute")})}},87782:function(e,n,t){t(4006),t(76977),t(63136),t(35407)},69089:function(e,n,t){t.d(n,{e:()=>u});var a=t(69277),r=t(32641),i=t(4006),l=t(26683),o=t(17028),c=t(3898);function u(e){var{children:n,setReactions:t=!0,alignSelf:o}=e,c=(0,r._)(e,["children","setReactions","alignSelf"]);return t?(0,i.FD)(s,{position:"relative",alignSelf:o,children:[n,(0,i.Y)(l.LI,(0,a._)({},c))]}):(0,i.Y)(i.FK,{children:n})}let s=(0,o.yw)({display:"flex",className:c.A.reactionsHoverZone})},80351:function(e,n,t){t(94729)},53457:function(e,n,t){t(76528)}}]);