!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 t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="6877c346-824c-4f3e-88b9-c4517861a6a1",e._sentryDebugIdIdentifier="sentry-dbid-6877c346-824c-4f3e-88b9-c4517861a6a1")}catch(e){}}();"use strict";(self.webpackChunksubstack=self.webpackChunksubstack||[]).push([["78598"],{45464:function(e,t,n){n.d(t,{A:()=>i});let i={bubbleStack:"bubbleStack-umAMnU",bubble:"bubble-LfInju",linkBubble:"linkBubble-t8SyEH",paywallBubble:"paywallBubble-HIFC1C",imageGroup:"imageGroup-hmX9Za",hasFooter:"hasFooter-knDZrK",body:"body-SxXE9l",authorName:"authorName-RUTp3m",facepileAvatar:"facepileAvatar-F_BcFw",outgoing:"outgoing-zRoPvi",facepile:"facepile-_l_hyN",readMore:"readMore-OS5vSy",pixels:"pixels-dEQTfm",textLink:"textLink-TnmBfo",linkImg:"linkImg-kNOnWu",linkUrl:"linkUrl-LW11wp",linkTitle:"linkTitle-oVSOfX",reactionsWrapper:"reactionsWrapper-ls9Csz",actions:"actions-QkU3dI",avatarContainer:"avatarContainer-QgIACu",highlight:"highlight-pSh3e7","highlight-animation":"highlight-animation-kGdFb4",highlightAnimation:"highlight-animation-kGdFb4",isLast:"isLast-UDCLfj",quoteBox:"quoteBox-Dcal5K",quote:"quote-IkMApN",incoming:"incoming-yrKQPL",notFirst:"notFirst-MmF7_s",author:"author-naTBRq",hasUnread:"hasUnread-p_1CFW",noUnread:"noUnread-aWF1i8",paywallReplyTag:"paywallReplyTag-AnU7qK",media:"media-H8ykdm",center:"center-F91XRK",right:"right-dRUlyN",iconOnly:"iconOnly-pLEdW7",paywallFade:"paywallFade-jjuRAC",paywallBlur:"paywallBlur-yZ2js3",paywallText:"paywallText-s4FRye"}},3898:function(e,t,n){n.d(t,{A:()=>i});let i={reactionsHoverZone:"reactionsHoverZone-nHxYxG",reactionsContainer:"reactionsContainer-uNTS8E",outgoing:"outgoing-xjlZZA",emojiGrid:"emojiGrid-yGGf1S",reaction:"reaction-BmRJjL",selected:"selected-T0p6AZ",emojiBox:"emojiBox-hGb2ir",addReactButton:"addReactButton-j8HliB",emojiPopover:"emojiPopover-UcQl9N",show:"show-rCpI7T"}},82130:function(e,t,n){n.d(t,{A:()=>i});let i={avatar:"avatar-teNpyz",sticker:"sticker-ah1HJX",like:"like-S98SvO",comment:"comment-CQ18HM",restack:"restack-_lATOS",stickerContainer:"stickerContainer-TXCu7q"}},36083:function(e,t,n){n.d(t,{A:()=>i});let i={messageBubbleGroup:"messageBubbleGroup-R4lEWb",bubble:"bubble-JnQPTp",isFirst:"isFirst-cID827",isLast:"isLast-YVpa0l",quote:"quote-NJ4bEy",paywallReplyTag:"paywallReplyTag-_3sIGO",outgoing:"outgoing-hqKZeu",forceIncomingTheme:"forceIncomingTheme-fBbXPp",body:"body-obaIpu",author:"author-M_vI8F","reactions-1":"reactions-1-O8o884",reactions1:"reactions-1-O8o884","reactions-2":"reactions-2-NrnldS",reactions2:"reactions-2-NrnldS","reactions-3":"reactions-3-iPVLb0",reactions3:"reactions-3-iPVLb0",youtubeIframe:"youtubeIframe-rlkjkW",highlight:"highlight-u2yyKp","highlight-animation":"highlight-animation-rBjpTz",highlightAnimation:"highlight-animation-rBjpTz",imageGroup:"imageGroup-KAnMHU bubble-JnQPTp",incoming:"incoming-jCFnDy",postImage:"postImage-eO7gd7",b4:"b4-xXB4IY",bubbs:"bubbs-qLKn32",bubb:"bubb-yci1Gp",isLink:"isLink-NGEdg6",linkImage:"linkImage-FDEYzZ",small:"small-PzwGAf",actions:"actions-utvBvN",actionsWrapper:"actionsWrapper-CEt9E2",dots:"dots-_BmXB7",dot:"dot-XjG0Z6",typing:"typing-vNx1zN",flip:"flip-OUTl4B"}},73040:function(e,t,n){n.d(t,{A:()=>s});var i=n(69277),r=n(70408),o=n(4006),l=n(822),a=n(97731);let s=e=>(0,o.Y)(a.A,(0,r._)((0,i._)({},e),{name:"LucideCornerDownRight",svgParams:{height:24,width:24,fill:"#000000",strokeWidth:0},children:(0,o.Y)(l.A,{height:24,stroke:e.stroke,fill:e.fill,strokeWidth:e.strokeWidth})}))},86404:function(e,t,n){n.d(t,{A:()=>s});var i=n(69277),r=n(70408),o=n(32641),l=n(4006),a=n(97731);let s=e=>{var{size:t=24,color:n="var(--color-fg-primary)",className:s}=e,c=(0,o._)(e,["size","color","className"]);return(0,l.Y)(a.A,(0,r._)((0,i._)({},c),{name:"SkinnyUnlockIcon",svgParams:{viewBox:"0 0 24 24"},stroke:"none",width:t,height:t,fill:n,className:s,children:(0,l.Y)("path",{d:"M2.5862 23.8914H13.1034C14.793 23.8914 15.6896 22.9366 15.6896 21.051V12.8282C15.6896 10.9545 14.793 9.99975 13.1034 9.99975H2.5862C0.896549 9.99975 0 10.9545 0 12.8282V21.051C0 22.9366 0.896549 23.8914 2.5862 23.8914ZM11.9885 10.9306H13.8046V6.90875C13.8046 3.88935 15.6667 2.30209 17.8161 2.30209C19.9655 2.30209 21.8275 3.88935 21.8275 6.90875V9.55818C21.8275 10.2623 22.2299 10.6203 22.7471 10.6203C23.2413 10.6203 23.6551 10.2981 23.6551 9.55818V7.15937C23.6551 2.67205 20.8161 0.5 17.8161 0.5C14.8046 0.5 11.9885 2.67205 11.9885 7.15937V10.9306Z"})}))}},76438:function(e,t,n){n.d(t,{A:()=>s});var i=n(69277),r=n(70408),o=n(32641),l=n(4006),a=n(97731);let s=e=>{var{size:t=24,fill:n="var(--color-fg-primary)"}=e,s=(0,o._)(e,["size","fill"]);return(0,l.Y)(a.A,(0,r._)((0,i._)({},s),{name:"CommentBadgePinIcon",svgParams:{viewBox:"0 0 20 20"},width:t,height:t,fill:n,children:(0,l.Y)("path",{stroke:"none",d:"M4.62891 12.2131C4.62891 11.7253 4.75199 11.2486 4.99817 10.7831C5.24434 10.3131 5.5957 9.88566 6.05225 9.50073C6.51326 9.11133 7.05933 8.79801 7.69043 8.56079L7.91199 5.4187C7.57182 5.22624 7.26074 5.03153 6.97876 4.83459C6.69678 4.63765 6.45284 4.44967 6.24695 4.27063C6.04106 4.08712 5.87992 3.92151 5.76355 3.7738C5.57556 3.5321 5.48157 3.29041 5.48157 3.04871C5.48157 2.81596 5.56213 2.62349 5.72327 2.47131C5.88888 2.31466 6.10372 2.23633 6.3678 2.23633H13.6322C13.8963 2.23633 14.1089 2.31466 14.27 2.47131C14.4356 2.62349 14.5184 2.81596 14.5184 3.04871C14.5184 3.29041 14.4244 3.5321 14.2365 3.7738C14.1201 3.92151 13.9567 4.08712 13.7463 4.27063C13.5404 4.44967 13.2965 4.63765 13.0145 4.83459C12.737 5.02706 12.4282 5.22176 12.088 5.4187L12.3029 8.56079C12.9384 8.79801 13.4845 9.11133 13.941 9.50073C14.3976 9.88566 14.7489 10.3131 14.9951 10.7831C15.2413 11.2486 15.3644 11.7253 15.3644 12.2131C15.3644 12.5309 15.2659 12.7883 15.069 12.9852C14.872 13.1777 14.608 13.2739 14.2767 13.2739H10.7117V16.4697C10.7117 16.689 10.6848 16.9128 10.6311 17.1411C10.5774 17.3694 10.5103 17.5753 10.4297 17.7588C10.3491 17.9468 10.2686 18.0967 10.188 18.2086C10.1119 18.325 10.0492 18.3832 10 18.3832C9.95076 18.3832 9.88586 18.325 9.8053 18.2086C9.72473 18.0967 9.64417 17.9468 9.5636 17.7588C9.48303 17.5753 9.41589 17.3694 9.36218 17.1411C9.30847 16.9128 9.28162 16.689 9.28162 16.4697V13.2739H5.72327C5.39205 13.2739 5.12573 13.1777 4.92432 12.9852C4.72738 12.7883 4.62891 12.5309 4.62891 12.2131Z"})}))}},71900:function(e,t,n){n.d(t,{A:()=>o});var i=n(4006),r=n(97731);let o=e=>{let{size:t=24,fill:n="var(--color-fg-primary)",stroke:o="none",className:l}=e;return(0,i.Y)(r.A,{name:"FilledCommentIcon",svgParams:{viewBox:"0 0 29 27"},width:t,height:t,fill:n,stroke:o,className:l,children:(0,i.Y)("path",{d:"M4.93227 26.078C3.97467 26.078 3.68608 25.3041 4.19767 24.6613C4.66991 24.0448 5.90298 22.6674 6.59822 21.5131C6.70316 21.3163 6.65069 21.1327 6.4408 21.0146C2.4399 18.8633 0 15.3609 0 11.3731C0 5.07656 6.30963 0 14.1803 0C22.0378 0 28.3474 5.07656 28.3474 11.3731C28.3474 17.7089 22.2739 22.733 13.3276 22.733C13.1702 22.733 13.0128 22.733 12.8554 22.7199C12.6717 22.7068 12.4881 22.7724 12.2651 22.9298C10.1138 24.4646 6.4408 26.078 4.93227 26.078Z"})})}},9599:function(e,t,n){n.d(t,{A:()=>o});var i=n(4006),r=n(97731);let o=e=>{let{size:t=24,fill:n="var(--color-fg-primary)",stroke:o="none",className:l}=e;return(0,i.Y)(r.A,{name:"FilledHeartIcon",svgParams:{viewBox:"0 0 26 24"},width:t,height:t,fill:n,stroke:o,className:l,children:(0,i.Y)("path",{d:"M13 24C12.8221 24 12.6061 23.9367 12.3519 23.8101C12.0978 23.692 11.8563 23.557 11.6276 23.4051C9.2724 21.8861 7.22222 20.2911 5.47703 18.6203C3.74031 16.9409 2.39329 15.2152 1.43597 13.443C0.478658 11.6624 0 9.8692 0 8.06329C0 6.86498 0.190616 5.77215 0.571847 4.78481C0.961551 3.79747 1.49528 2.94515 2.17302 2.22785C2.85924 1.51055 3.64712 0.962025 4.53666 0.582278C5.43467 0.194093 6.40046 0 7.43402 0C8.71326 0 9.81883 0.320675 10.7507 0.962025C11.6911 1.60338 12.4409 2.43882 13 3.46835C13.5676 2.43038 14.3174 1.59494 15.2493 0.962025C16.1896 0.320675 17.2994 0 18.5787 0C19.5953 0 20.5526 0.194093 21.4506 0.582278C22.3571 0.962025 23.1492 1.51055 23.827 2.22785C24.5047 2.94515 25.0342 3.79747 25.4154 4.78481C25.8051 5.77215 26 6.86498 26 8.06329C26 9.8692 25.5213 11.6624 24.564 13.443C23.6067 15.2152 22.2555 16.9409 20.5103 18.6203C18.7735 20.2911 16.7318 21.8861 14.3851 23.4051C14.1479 23.557 13.9022 23.692 13.6481 23.8101C13.4024 23.9367 13.1864 24 13 24Z"})})}},2538:function(e,t,n){n.d(t,{A:()=>o});var i=n(4006),r=n(97731);let o=e=>{let{size:t=24,fill:n="var(--color-fg-primary)",stroke:o="none",className:l}=e;return(0,i.Y)(r.A,{name:"FilledRestackIcon",svgParams:{viewBox:"0 0 31 26"},width:t,height:t,fill:n,stroke:o,className:l,children:(0,i.Y)("path",{d:"M25.8333 3.2C28.2333 5.2 29.8 7.63333 30.5333 10.5H31.0333C31.9667 10.5 32.6 10.9 32.9333 11.7C33.2 12.4333 33.0667 13.1333 32.5333 13.8L29.3333 17.8C28.9333 18.3333 28.4333 18.6 27.8333 18.6C27.1667 18.6 26.6333 18.3333 26.2333 17.8L23.0333 13.7C22.5 13.0333 22.3667 12.3667 22.6333 11.7C22.9667 10.9 23.6 10.5 24.5333 10.5V10.5C23.2 7.23333 20.5333 5.6 16.5333 5.6C14.4667 5.6 12.7 6.2 11.2333 7.4C11.1333 7.4 11.1333 7.5 11.1333 7.5C9.6 8.5 8.26667 8.36667 7.13333 7.1C6.66667 6.5 6.46667 5.83333 6.53333 5.1C6.6 4.23333 7 3.53333 7.73333 3C10.2667 1 13.2 0 16.5333 0C20 0 23.1 1.06667 25.8333 3.2ZM2.03333 17.5H2.53333C3.26667 20.3667 4.83333 22.8 7.23333 24.8C9.96667 26.9333 13.0667 28 16.5333 28C19.8667 28 22.8 27 25.3333 25C26.0667 24.4667 26.4667 23.7667 26.5333 22.9C26.6 22.1667 26.4 21.5 25.9333 20.9C24.8 19.6333 23.4667 19.5 21.9333 20.5C21.9333 20.5 21.9333 20.6 21.8333 20.6C20.3 21.8 18.5333 22.4 16.5333 22.4C12.5333 22.4 9.86667 20.7667 8.53333 17.5V17.5C9.46667 17.5 10.1 17.1 10.4333 16.3C10.7 15.5667 10.5667 14.8667 10.0333 14.2L6.83333 10.2C6.43333 9.66667 5.93333 9.4 5.33333 9.4C4.66667 9.4 4.13333 9.66667 3.73333 10.2L0.533333 14.2C0 14.8667 -0.133333 15.5667 0.133333 16.3C0.466667 17.1 1.1 17.5 2.03333 17.5Z"})})}},59027:function(e,t,n){n.d(t,{Cv:()=>O});var i=n(69277),r=n(79785),o=n(4006),l=n(12215),a=n(17402),s=n(58398),c=n(84605),d=n(85478),u=n(86500),m=n(1459),h=n(68349),p=n(35369),g=n(76977),f=n(28911),b=n(84843),y=n(70408),C=n(32641),v=n(43131),Y=n(32485),_=n.n(Y);let w={group:"group-x0Das8",orientation_vertical:"orientation_vertical-Z50kfy",orientationVertical:"orientation_vertical-Z50kfy",orientation_horizontal:"orientation_horizontal-V11lLr",orientationHorizontal:"orientation_horizontal-V11lLr",item:"item-eswwkH",theme_error:"theme_error-sXQvJ6",themeError:"theme_error-sXQvJ6",indicator:"indicator-gThLiW",theme_accent:"theme_accent-DWv6EU",themeAccent:"theme_accent-DWv6EU",theme_success:"theme_success-WRt8Ny",themeSuccess:"theme_success-WRt8Ny",theme_select:"theme_select-sTAh2J",themeSelect:"theme_select-sTAh2J",theme_highlight:"theme_highlight-ThTkpK",themeHighlight:"theme_highlight-ThTkpK"};function k(e){var{name:t,value:n,defaultValue:r,onValueChange:l,disabled:a,orientation:s="vertical",className:c,children:d,gap:u=12}=e,m=(0,C._)(e,["name","value","defaultValue","onValueChange","disabled","orientation","className","children","gap"]);return(0,o.Y)(v.bL,{name:t,value:n,defaultValue:r,onValueChange:l,disabled:a,orientation:s,asChild:!0,children:(0,o.Y)(g.pT,(0,y._)((0,i._)({className:_()("pencraft",w.group,w["orientation_".concat(s)],c),gap:u},m),{children:d}))})}function S(e){var{theme:t="accent"}=e,n=(0,C._)(e,["theme"]);return(0,o.Y)(v.q7,(0,y._)((0,i._)({className:_()(w.item,w["theme_".concat(t)])},n),{children:(0,o.Y)(v.C1,{className:w.indicator,forceMount:!0})}))}var A=n(63136),I=n(16291),N=n(28194),x=n(91392),D=n(49807),F=n(82776),T=n(57324);function E(){let e=(0,r._)(["Support ",""]);return E=function(){return e},e}function R(){let e=(0,r._)(["Since you liked this post, why not support "," with a subscription?"]);return R=function(){return e},e}let B=x.FI.LIKE_UPSELL_LAST_SHOWN_AT;function L(e){var t,n;let{isOpen:r,onClose:l,pub:s}=e,{iString:m,iTemplate:y}=(0,c.GO)(),C=(0,d.mJ)(),[v,Y]=(0,a.useState)(null==s||null==(t=s.plans)?void 0:t[0]),_=C.getConfigFor("disable_monthly_subscriptions"),w=C.getConfigFor("disable_annual_subscriptions");return(0,o.FD)(f.aF,{isOpen:r,onClose:l,children:[(0,o.Y)(b.rQ,{title:y(E(),s.name),description:y(R(),s.name),onClose:l}),(0,o.Y)(f.cw,{children:(0,o.Y)(k,{name:"plan",value:v?String(v.id):void 0,onValueChange:e=>{var t;let n=null==s||null==(t=s.plans)?void 0:t.find(t=>String(t.id)===e);n&&Y(n)},children:null==s||null==(n=s.plans)?void 0:n.map(e=>{if("month"===e.interval&&_||"year"===e.interval&&w)return null;let t=v&&v.id===e.id;return(0,o.FD)(g.fI,{as:"label",alignItems:"center",gap:12,cursor:"pointer",userSelect:"none",children:[(0,o.Y)(S,{value:String(e.id)}),(0,o.Y)(A.EY.B4,{as:"span",weight:"semibold",color:t?"primary":"secondary",children:(0,F.getPlanTitle)(e,s.language)}),(0,o.Y)(A.EY.B4,{as:"span",color:"secondary",children:(0,N.xB)(e)})]},e.id)})})}),(0,o.Y)(f.jl,{direction:"column",primaryButton:(0,o.Y)(p.$n,{onClick:()=>{(0,u.u4)(u.qY.LIKE_UPSELL_PLAN_SELECTED),(0,h.V2)((0,D.eV6)(s,{params:(0,i._)({utm_source:T.VU.likeButtonUpsell},v&&{selectedPlanId:v.id})}),{local_navigation:!1})},children:m("Select")})})]})}function P(e){let{isOpen:t,onClose:n,onShareClick:i}=e,{iString:r}=(0,c.GO)();return(0,o.FD)(f.aF,{isOpen:t,onClose:n,children:[(0,o.Y)(b.rQ,{title:r("Share this post with a friend"),description:r("Since you liked this post, why not share it to help spread the word?"),onClose:n}),(0,o.Y)(f.q1,{}),(0,o.Y)(f.jl,{direction:"column",primaryButton:(0,o.Y)(p.$n,{onClick:()=>{(0,u.u4)(u.qY.LIKE_UPSELL_SHARE_CLICKED),i(),n()},children:r("Share")})})]})}function O(e){let{user:t,pub:n,post:r}=e,[c,d]=(0,a.useState)(!1),p=(()=>{let e=l.get(B);if(e){let t=(0,I.A)(e),n=(0,I.A)().subtract(30,"days");if(t.isAfter(n))return!1}return!0})(),[g,f]=(0,a.useState)(p);(0,a.useEffect)(()=>{(!p||(null==t?void 0:t.is_contributor)||(null==t?void 0:t.is_admin))&&(0,h.qm)("show_reaction_upsell")},[p,t]),(0,a.useEffect)(()=>{p&&g&&t&&((0,u.u4)(u.qY.LIKE_UPSELL_MODAL_SEEN,{source:"email",type:(0,m.e)(t,n)?"share":"paid"}),l.set(B,(0,I.A)().format(),(0,i._)({expires:3650},!n.custom_domain&&{domain:".".concat(new URL((0,D.$_T)()).hostname)})))},[p,g,n,t]);let b=()=>{f(!1),(0,h.qm)("show_reaction_upsell")};return t&&!t.is_contributor&&!t.is_admin&&(p||c)?(0,o.FD)(o.FK,{children:[(0,m.e)(t,n)?(0,o.Y)(P,{isOpen:g,onClose:b,onShareClick:()=>d(!0)}):(0,o.Y)(L,{isOpen:g,onClose:b,pub:n}),(0,o.Y)(s.Z,{isOpen:c,medium:"web",pub:n,user:t,post:r,onClose:()=>d(!1)})]}):null}},61193:function(e,t,n){n.d(t,{W:()=>c});var i=n(4006),r=n(13950),o=n(15894),l=n(84605),a=n(47570),s=n(17028);let c=e=>{let{comments:t,post:n,commentId:a,notAllowedToFetchComments:c,handleSort:u,publication:m,sort:h,disableMobileBottomSheet:p}=e,{iString:g}=(0,l.GO)();return(0,i.FD)(r.DH,{children:[(0,i.FD)(s.Ye,{alignItems:"baseline",flex:"grow",gap:8,position:"relative",children:[(0,i.Y)(o.T,{preset:"st4",children:g("Comments")}),(0,i.Y)("div",{className:"mediumRule-B78a2B"}),(null==t?void 0:t.length)&&(null==t?void 0:t.length)>0?(0,i.Y)(o.T,{color:"accent",preset:"st4",children:n.comment_count}):null]}),(0,i.FD)(s.az,{className:"sortOptionsContainer-bIIUcJ",children:[!c&&(0,i.Y)(o.T,{align:"left",as:"a",color:"tertiary",href:"/p/community-guidelines",preset:"detail-small",style:{textDecoration:"underline"},children:g("Community Guidelines")}),t&&(null==t?void 0:t.length)>1&&!c&&!a&&(0,i.Y)(d,{comments:t,disableMobileBottomSheet:p,handleSort:u,publication:m,sort:h})]})]})},d=e=>{let{publication:t,handleSort:n,sort:r,comments:o,disableMobileBottomSheet:l}=e;return t&&n&&r?(0,i.Y)(a.D,{currentSort:r,disableMobileBottomSheet:l,handleSort:n,isLoading:!o,pub:t}):null}},77481:function(e,t,n){n.d(t,{n:()=>h});var i=n(4006),r=n(34746),o=n(63446),l=n(61193),a=n(15894),s=n(84605),c=n(89490),d=n(76977),u=n(39318),m=n(57324);let h=e=>{let{post:t,publication:n,user:h,freeSignupEmail:p=null,showHeader:g=!1}=e,{iString:f}=(0,s.GO)(),b=h&&h.email||p||null,y=(0,u.my9)(n,{simple:!0,next:document.location.href,utm_source:m.VU.paywall,utm_medium:m.Jn.web,utm_content:t?t.id:null,just_signed_up:!1}),C=async()=>{window.location.href=y};return(0,i.FD)(d.I1,{className:"container-u0f9W_",children:[g&&(0,i.Y)(l.W,{notAllowedToFetchComments:!0,post:t,publication:n}),(0,i.Y)(c.az,{className:"commentsPaywall-ASd8iy",children:(0,i.FD)(d.I1,{alignItems:"center",gap:24,paddingX:24,paddingY:40,children:[(0,i.Y)(a.T,{color:"white",preset:"h4-sans-condensed",children:f("Join the conversation")}),(0,i.Y)(a.T,{color:"white",preset:"d3-serif",children:f("Share your thoughts and connect with other readers by becoming a paid subscriber!")}),(0,i.Y)(o.v,{variant:"inverse",onClick:C,children:f("Upgrade today")}),(0,i.FD)(a.T,{as:"a",color:"white","data-native":!0,href:(0,u.eV6)(n,{isSignInAttempt:!0,next:(0,u.wu9)(n,t)}),preset:"caption",children:[(0,r.Qy)({post:t,publication:n})," ",(0,i.Y)("u",{children:f(b?"Switch accounts":"Sign in")})]})]})})]})}},44728:function(e,t,n){n.d(t,{X:()=>D,D:()=>F});var i=n(99851),r=n(79785),o=n(4006),l=n(17402),a=n(15734),s=n.n(a),c=n(6212),d=n(41935),u=n(37494),m=n(90847),h=n(63446),p=n(84605),g=n(76977);let f=e=>{let{post:t,ctaUrl:n,ctaText:i,hidden:r}=e,{iString:l}=(0,p.GO)(),a=i;return r||"podcast"!==t.type?r||"newsletter"!==t.type||(a=l("Back to article")):a=l("Back to episode"),(0,o.Y)(g.I1,{alignItems:"start",paddingY:8,children:(0,o.Y)(h.v,{href:n,leadingIcon:"chevron-left",native:!0,size:"md",variant:"tertiary",children:a})})};var b=n(56778),y=n(8609),C=n(6049),v=n(86500),Y=n(68349),_=n(98111),w=n(4016),k=n(56262),S=n(39318),A=n(82776),I=n(57324);function N(){let e=(0,r._)(["This thread is only visible to "," subscribers of ",""]);return N=function(){return e},e}class x extends l.Component{onTopReached(){this.state.topReached||(this.setState({topReached:!0}),(0,v.u4)(v.qY.POST_SEEN,{post_id:this.props.post.id,post_audience:this.props.post.audience,post_type:this.props.post.type}))}onBottomReached(){this.state.bottomReached||(this.setState({bottomReached:!0}),(0,v.u4)(v.qY.POST_BOTTOM_SEEN,{post_id:this.props.post.id,post_audience:this.props.post.audience,post_type:this.props.post.type}))}async enableEmailNotifications(){try{await s().post("/api/v1/post/".concat(this.props.post.id,"/subscribe")),window.location.reload()}catch(e){console.error("Failed to subscribe to email notifications:",e),alert((0,Y.uX)(e))}}render(){let e,t,{className:n,pub:i,post:r,user:a,freeSignup:s,freeSignupEmail:h,isStatic:p,truncated:g,invisible:y,post_reaction_token:v,onChange:Y,showCta:x=g,showUnsubscribeNotice:D,dataForEmailRender:F={},showReactions:T=!0,gap:E=16,iString:R,iTemplate:B,iPlural:L,language:P,showShare:O}=this.props,{hidden:G}=this.props;"boolean"!=typeof G&&(G=r.hidden),G?(e=R("Subscribe to view"),t=(0,S.yRP)("/subscribe",{simple:!0,next:document.location.href,utm_source:I.VU.thread,utm_medium:I.Jn.web,utm_content:r.id})):(t=(0,S.wu9)(i,r,{noBase:!0}),e="thread"!==r.type||g?(0,A.getPostCtaText)(r,P):r.comment_count?L("View 1 comment","View %1 comments",r.comment_count):R("Reply"));let U=p&&!this.context.isAmp,H=(0,w.lu)({pub:i}),M=H?m.Z:l.Fragment;return(0,o.Y)(C.h2,{className:"thread-head typography ".concat(n||""),children:(0,o.Y)("tr",{children:(0,o.Y)("td",{children:(0,o.FD)(C.jJ,{width:"100%",children:[!y&&!G&&(0,o.Y)(b.A,{onVisible:()=>this.onTopReached()}),(0,o.FD)(C.jJ,{gap:E,width:"100%",children:[x&&H&&(0,o.Y)(f,{post:r,ctaUrl:t,ctaText:e,hidden:G}),(0,o.Y)(c.I0,{pub:i,post:r,user:a,isStatic:p,reaction_token:v,allowEdit:!0,allowTruncate:g,showReactions:!!x||T,showShare:O,showComments:!!r.comment_count,inThreadHead:!0,onChange:Y,showLabel:!0}),(0,o.Y)(M,{inThreadHead:!0,children:(0,o.Y)(u.A,{user:a,freeSignup:s,freeSignupEmail:h,pub:i,post:r,html:G||g||!r.body_html?null:r.body_html,isStatic:p,dataForEmailRender:F,children:G?(0,o.Y)("p",{children:(0,o.Y)("i",{children:B(N(),(0,k.isFoundingAudience)(r.audience)?"founding":"paid",i.name)})}):g?(0,o.Y)("p",{children:r.description}):null})}),x?!H&&(0,o.FD)("a",{className:"thread-head-cta",href:t,"data-native":!0,children:[e," →"]}):G&&(0,o.FD)("p",{className:"thread-head-cta",children:[(0,o.Y)("a",{href:(0,S.eV6)(i,{simple:!0,next:document.location.href,utm_source:I.VU.thread,utm_medium:I.Jn.web,utm_content:r.id}),className:"button primary subscribe-btn","data-native":p?void 0:"",children:(0,A.getSubscribeText)(i)}),(0,o.Y)("a",{href:(0,S.a7q)({for_pub:i.subdomain}),className:"button","data-native":!0,children:R("Sign in")})]})]}),U&&(0,o.FD)(C.jJ,{gap:E,style:{width:"100%"},children:[(0,o.Y)(C.jJ,{style:{width:"100%",textAlign:"center"},children:(0,o.Y)("a",{role:"button",className:"button primary",style:{margin:"0 auto"},href:_.T.HALF_MAGIC_COMMENTS_URL,children:R("See the discussion")})}),(0,o.Y)(d.fz,{isFooter:!0,customization:{showShare:!0,showComments:!0,showReactions:{showReactions:T},showRestack:!1,showLabels:!0,showCommentRestack:!i.hide_post_restacks}})]}),D&&r.unsubscribed&&(0,o.FD)("div",{className:"notifications-alert",children:[R("Email notifications are disabled for this thread.")," ",(0,o.Y)("a",{href:"javascript:void(0)",onClick:()=>this.enableEmailNotifications(),children:R("Re-enable")})]}),!y&&!G&&(0,o.Y)(b.A,{onVisible:()=>this.onBottomReached()})]})})})})}}(0,i._)(x,"contextType",y.a);let D=(0,p.wr)(x);class F extends l.Component{render(){return(0,o.FD)("div",{className:"thread-head-silhouette",children:[(0,o.Y)("div",{className:"thread-head-silhouette-head"}),(0,o.FD)("div",{className:"thread-head-silhouette-content",children:[(0,o.Y)("div",{className:"thread-head-silhouette-title"}),(0,o.Y)("div",{className:"thread-head-silhouette-meta"}),(0,o.FD)("div",{className:"thread-head-silhouette-body",children:[(0,o.Y)("div",{className:"thread-head-silhouette-body-line"}),(0,o.Y)("div",{className:"thread-head-silhouette-body-line"}),(0,o.Y)("div",{className:"thread-head-silhouette-body-line"})]})]})]})}}},77441:function(e,t,n){n(4006),n(17402),n(15734),n(82519),n(84605),n(86500),n(35369),n(76977),n(45859),n(50874)},73684:function(e,t,n){n.d(t,{j:()=>p});var i=n(4006),r=n(17159),o=n.n(r),l=n(79909),a=n(45947),s=n(73957),c=n(51683),d=n(39318),u=n(70189),m=n(49807),h=n(82776);function p(e){var t,n,r,o;let a,p,f,b,{comment:y,post:C,publication:v}=e,Y="Substack | Notes";v&&y.name?Y="".concat(y.name," on ").concat(v.name):y.name&&y.handle?Y="".concat(y.name," (@").concat(y.handle,")"):y.name?Y=y.name:v&&(Y="".concat(v.name));let _=C&&v?(0,s.getPageTitleAndMeta)(C,v,{isCommentPage:!0}).title:"".concat(Y,': "').concat((0,h.truncateText)(y.body,280),'"'),w=(null!=(t=y.attachments)?t:[]).flatMap(e=>"image"===e.type?[e.imageUrl]:"post"===e.type&&e.postImageSelection?[e.postImageSelection.img_src]:[]),k=1===w.length?w[0]:null;k?(a=(0,m.dJ9)(k),b=!0):(0,c.lp)(y)?(p=680,f=680,a=(0,m.dJ9)((0,u.Hr)(y.id,{isSmall:!0,attachmentsOnly:!0}),f,{height:p}),b=!0):y.photo_url?(a=(0,m.dJ9)(y.photo_url,40),p=40,f=40):y.user_id&&(a=(0,m.dJ9)((0,d.Ji1)(y.user_id),40),p=40,f=40);let S=null!=(n=y.body)?n:"";return(0,i.FD)(i.FK,{children:[(0,i.Y)(l.Metadata,{title:_,socialTitle:Y,description:S,image:a,isLargeImage:b,imageHeight:p,imageWidth:f,siteName:v?v.name:"Substack",publishedTime:y.date.toString(),meta:[{name:"twitter:label1",content:"Likes"},{name:"twitter:data1",content:String(null!=(r=y.reaction_count)?r:0)},{name:"twitter:label2",content:"Replies"},{name:"twitter:data2",content:String(null!=(o=y.children_count)?o:0)}]}),(0,i.Y)(g,{comment:y,includeBody:!0})]})}function g(e){let{comment:t,includeBody:n}=e;return t?(0,i.Y)("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:o()((0,a.Q)(t,{includeViews:!1,includeBody:n}),{json:!0,isScriptContext:!0})}}):null}},27332:function(e,t,n){n.d(t,{GZ:()=>W,Iz:()=>U,LY:()=>T,M6:()=>G,X6:()=>V,j6:()=>D,jS:()=>E,l8:()=>R,qv:()=>j,wF:()=>B});var i=n(69277),r=n(70408),o=n(4006),l=n(75107);n(58050);var a=n(84605),s=n(85478),c=n(46271);n(95282);var d=n(27749),u=n(51498),m=n(80520),h=n(72945),p=n(25859),g=n(58292),f=n(89490),b=n(35369),y=n(76977),C=n(45859),v=n(63136),Y=n(504),_=n(83629),w=n(85050),k=n(16884),S=n(49095),A=n(16291),I=n(75914),N=n(49807),x=n(57324);let D=["post_like","post_restack","comment_like"],F=["search","note-related","profile","publication","permalink"];function T(e){let{author:t,post:n,comment:i,onClick:r,utm_content:l,publication:a,item:p,allowHide:g=!1,timestamp:f,hideSubscribeCta:b,onDismiss:C}=e,v=(0,d.PK)(),Y=f||(null==i?void 0:i.date)||(null==n?void 0:n.post_date),_=(0,c.Jd)(),w=_&&C&&t.id!==_.id&&((null==p?void 0:p.type)==="post"||(null==p?void 0:p.type)==="comment"),k=F.includes(v),S=!!(0,s.mJ)().getConfigFor("feed_item_source_debug_mode"),A=S&&p&&"trackingParameters"in p,N=!b&&t&&p&&!k;return(0,o.FD)(V,{children:[(0,o.FD)(j,{children:[(0,o.Y)(B,{user:t,onClick:r,utm_content:l}),Y&&(0,o.Y)(U,{timestamp:Y,comment:i}),S&&p&&(0,o.Y)(H,{item:p,showEntityKey:!0,showDebugDot:null!=A&&A})]}),N&&(0,o.Y)(L,{author:t,item:p,comment:null!=i?i:void 0,post:null!=n?n:void 0,publication:null!=a?a:void 0}),p&&(0,I.tL)(p,i)&&"post"===p.type&&n&&a&&(0,o.Y)(m.N,{item:p,pub:a,post:n}),(0,o.FD)(y.pT,{maxHeight:20,gap:6,alignItems:"center",children:[(0,o.Y)(h.s,{publication:a,post:n,comment:i,item:p,allowHide:g}),w&&(0,o.Y)(u.R,{onDismiss:C,item:p})]})]})}function E(e){let{user:t,setTargetUser:n,eligibleTargetUsers:i,targetUser:r}=e;return(0,o.Y)(V,{children:(0,o.Y)(j,{children:(0,o.Y)(C.W1,{trigger:(0,o.Y)(b.$n,{priority:"quaternary",size:"sm",color:"primary",trailing:(0,o.Y)(l.A,{size:16}),children:(0,o.Y)(R,{user:null!=r?r:t})}),children:i.map(e=>(0,o.Y)(C.Dr,{onClick:()=>{e.id===t.id?n(null):n(e)},children:e.name},e.id))})})})}function R(e){let{user:t}=e;return(0,o.Y)(V,{children:(0,o.FD)(j,{children:[(0,o.Y)(v.EY,{as:"span",weight:"medium",children:t.name}),(0,o.Y)(S.UserStatusSymbols,{status:t.status,userId:t.id,size:"xs"})]})})}function B(e){let{user:t,onClick:n,utm_content:i}=e;return(0,o.Y)(o.FK,{children:(0,o.FD)(v.EY.B3,{as:"span",weight:"medium",children:[(0,o.Y)(p.yp,{user:t,onClick:n,utm_source:x.VU.substackFeedItem,utm_content:i,children:t.name})," ",(0,o.Y)(S.UserStatusSymbols,{tier:t.bestseller_tier,status:t.status,userId:t.id,inline:!0,size:"xs"})]})})}function L(e){let{author:t,comment:n,post:i,item:r,permalink:l,publication:a}=e,{finalPublication:s,isSubscribed:c,showCta:d,handleClick:u,currentUser:m}=W({targetUser:t,item:r,comment:n,post:i,publication:a});return(!m||m.id!==t.id)&&s&&d?(0,o.Y)(l?O:P,{isSubscribed:c,onClick:u}):null}function P(e){let{isSubscribed:t,onClick:n}=e,{iString:i}=(0,a.GO)();return(0,o.Y)(b.$n,{priority:t?"quaternary":"tertiary-accent",size:"xs",onClick:n,children:i(t?"Subscribed":"Subscribe")})}function O(e){let{isSubscribed:t,onClick:n}=e,{iString:i}=(0,a.GO)();return(0,o.Y)(b.$n,{priority:t?"quaternary":"primary",size:"sm",onClick:n,children:i(t?"Subscribed":"Subscribe")})}let G=new Intl.DateTimeFormat(void 0,{dateStyle:"medium",timeStyle:"short"});function U(e){let{timestamp:t,comment:n,post:i,publication:r}=e;return(0,o.Y)(p.Yq,{href:n?(0,N.Zgx)(n,{noBase:_.Z}):i?(0,N.q$n)(r,i):void 0,color:"secondary",title:G.format((0,A.A)(t).toDate()),children:(0,o.Y)(g.iE,{timestamp:t})})}function H(e){let{item:t,showEntityKey:n,showDebugDot:i}=e;return(0,o.FD)(y.pT,{flex:"grow",gap:4,alignItems:"center",justifyContent:"end",children:[n&&(0,o.Y)(M,{item:t}),i&&(0,o.Y)(z,{item:t})]})}function M(e){let{item:t}=e;return"entity_key"in t?(0,o.Y)(v.EY.B4,{as:"span",color:"secondary",children:t.entity_key}):null}function z(e){var t;let n,i,{item:r}=e,{iString:l}=(0,a.GO)(),s=null==(t=r.trackingParameters)?void 0:t.item_source;return s?"model"===s?(n="accent-green",i="Model"):s.includes("db")?(n="accent-blue",i="DB"):s.includes("new-user")?(n="accent-purple",i="New user"):s.includes("trending")?(n="accent-red",i="Trending"):(n="tertiary",i="Other"):(n="accent-yellow",i="No source info"),(0,o.Y)("span",{children:(0,o.Y)(f.az,{height:8,width:8,radius:"full",bg:n,color:"secondary",title:l(i)})})}let V=(0,f.I4)((0,r._)((0,i._)({},v.nS),{display:"flex",minWidth:0,gap:8,alignItems:"center",height:20}));(0,f.I4)((0,r._)((0,i._)({},v.nS),{display:"flex",minWidth:0,gap:12,alignItems:"center"}));let j=(0,f.I4)({display:"flex",flex:"grow",minWidth:0,gap:8,alignItems:"center"});function W(e){var t,n;let{targetUser:i,item:r,comment:o,post:l,publication:a}=e,s=(0,c.Jd)(),u=(0,d.PK)(),m=o?"comment":l?"post":void 0,h=null!=(n=null!=(t=null==o?void 0:o.id)?t:null==l?void 0:l.id)?n:0,p=m?(0,N.Vvu)(h,m):void 0,g=null!=a?a:null==i?void 0:i.primary_publication,f=(0,w.s)({surface:"substack-feed-item"})(g),b=(0,k.Zm)({user:i,publicationId:null==g?void 0:g.id,publicationName:null==g?void 0:g.name,subscriptionSource:"substack-feed-item",sourceNoteId:p});return{finalPublication:g,isSubscribed:b.isSubscribed,showCta:b.showCta,handleClick:e=>{r&&(0,Y.Qb)(r,u,"subscribe"),!s&&g?f(e):b.isSubscribed?b.unsubscribe(e):b.subscribe(e)},currentUser:s}}},25714:function(e,t,n){n.d(t,{P:()=>u});var i=n(4006),r=n(32485),o=n.n(r),l=n(27437),a=n(84777),s=n(46271),c=n(28700),d=n(8895);function u(e){let{id:t,label:n,type:r,url:o,unstyled:l}=e;return(0,i.Y)("span",{className:"node-substack_mention",children:"pub"===r?(0,i.Y)(h,{id:t,url:o,label:n,unstyled:l}):(0,i.Y)(m,{id:t,label:n,unstyled:l})})}function m(e){let{id:t,label:n,unstyled:r}=e,a=(0,s.Jd)(),u=a&&a.id===t;return(0,i.Y)(l.ProfileHoverCard,{subject:{id:t,name:n},trigger:(0,i.Y)("a",{className:o()(d.A.mention,u&&d.A.self,r&&d.A.unstyled),href:(0,c.rf)(t,n),children:n})})}function h(e){let{id:t,url:n,label:r,unstyled:l}=e,c=(0,s.Jd)(),u=c&&c.id===t;return(0,i.Y)(a.m,{pubId:t,trigger:(0,i.Y)("a",{className:o()(d.A.mention,u&&d.A.self,l&&d.A.unstyled),href:n,children:r})})}},48531:function(e,t,n){n.d(t,{C:()=>s,N:()=>c});var i=n(4006),r=n(17402),o=n(68349),l=n(36372),a=n(56007);function s(){let{toastText:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(0,l.d)(),{justCopied:n,markCopied:a}=c();return{copy:(0,r.useCallback)(n=>{n&&((0,o.lW)(n),e&&t.popToast(()=>(0,i.Y)(l.y,{text:e})),a())},[e,t,a]),justCopied:n}}function c(){let[e,t]=(0,r.useState)(!1),n=(0,r.useRef)(null);return(0,r.useEffect)(()=>()=>{n.current&&clearTimeout(n.current)},[]),{justCopied:e,markCopied:(0,r.useCallback)(()=>{t(!0),n.current&&clearTimeout(n.current),n.current=setTimeout(()=>t(!1),a.bn)},[])}}},1124:function(e,t,n){n.d(t,{f:()=>B});var i=n(69277),r=n(70408),o=n(4006),l=n(54718),a=n(99084),s=n(29665),c=n(82853),d=n(84934),u=n(27786),m=n(21767),h=n(68397),p=n(1839),g=n(50180),f=n(37946),b=n(16079),y=n(15977),C=n(32641),v=n(97731);let Y=e=>{var{size:t=24,color:n="var(--color-fg-primary)",className:l}=e,a=(0,C._)(e,["size","color","className"]);return(0,o.Y)(v.A,(0,r._)((0,i._)({},a),{name:"LinearIcon",svgParams:{viewBox:"0 0 20 20"},width:t,height:t,fill:n,stroke:"none",className:l,children:(0,o.Y)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.1645 4.135C4.00898 3.15069 5.05652 2.36084 6.23515 1.81968C7.41378 1.27853 8.69557 0.998899 9.9925 1C14.968 1 19 5.032 19 10.0068C19 12.7368 17.785 15.184 15.865 16.8355L3.16525 4.135H3.1645ZM2.36275 5.2195L14.7797 17.6365C14.3867 17.884 13.9735 18.1015 13.5422 18.286L1.71325 6.45775C1.8985 6.0265 2.116 5.6125 2.36275 5.2195ZM1.2415 7.87225L12.1277 18.7585C11.5952 18.8875 11.0455 18.97 10.4815 19L1 9.5185C1.02949 8.96347 1.11034 8.41237 1.2415 7.87225ZM1.114 11.5188L8.48125 18.8868C6.6415 18.5724 4.94467 17.6948 3.62492 16.3751C2.30517 15.0553 1.42758 13.3585 1.11325 11.5188H1.114Z"})}))};var _=n(84605),w=n(66729),k=n(7684),S=n(87087),A=n(35369),I=n(76977),N=n(45859),x=n(78526),D=n(2481),F=n(58278),T=n(39318),E=n(82776),R=n(70515);function B(e){let{comment:t,pub:n,post:i,user:r,onChange:a,startEdit:s,startReport:c,openBan:d,isCollapsed:u,toggleCollapse:m}=e;return!function(e){let{menuEnabled:t}=J(e);return t}({comment:t,user:r})?null:(0,o.Y)(I.fI,{className:"triggerContainer-eX588u",children:(0,o.Y)(N.W1,{trigger:(0,o.Y)(A.K0,{priority:"quaternary",size:"sm",className:"trigger-j08Uop",children:(0,o.Y)(l.A,{size:16})}),children:(0,o.Y)(P,{comment:t,pub:n,post:i,user:r,onChange:a,startEdit:s,startReport:c,openBan:d,isCollapsed:u,toggleCollapse:m})})})}function L(e){let{sections:t}=e,n=t.map(e=>(0,r._)((0,i._)({},e),{items:e.items.filter(e=>{var t;return null!==e&&(null==e||null==(t=e.props)?void 0:t.enabled)!==!1})})).filter(e=>e.items.length>0);return(0,o.Y)(o.FK,{children:n.map((e,t)=>(0,o.Y)(N.H9,{isFirst:0===t,children:e.items},e.key))})}function P(e){var t;let{comment:n,pub:i,post:r,user:l,onChange:a,startEdit:s,startReport:c,openBan:d,isCollapsed:u,toggleCollapse:m}=e,h=J({comment:n,user:l}),p=[{key:"editing",items:[(0,o.Y)(U,{enabled:h.editCommentEnabled,onClick:s})]},{key:"sharing",items:[(0,o.Y)(G,{enabled:!0}),(0,o.Y)(X,{enabled:h.restackCommentEnabled})]},{key:"actions",items:[(0,o.Y)(H,{enabled:h.pinCommentEnabled}),(0,o.Y)(O,{enabled:!0,isCollapsed:u,toggleCollapse:m}),(0,o.Y)(M,{enabled:h.giftSubscriptionEnabled}),(0,o.Y)(Z,{enabled:null!=(t=null==l?void 0:l.is_global_admin)&&t}),(0,o.Y)(z,{enabled:h.subscriberDetailsEnabled})]},{key:"admin",items:[(0,o.Y)(V,{enabled:h.deleteCommentEnabled}),(0,o.Y)(j,{enabled:h.removeCommentEnabled}),(0,o.Y)(W,{enabled:h.reportCommentEnabled,onClick:c}),(0,o.Y)(q,{enabled:h.banUserEnabled,onClick:d})]}];return(0,o.Y)(w.g,{value:{comment:n,pub:i,post:r,onChange:a,toggleCollapse:m},children:(0,o.Y)(L,{sections:p})})}function O(e){let{enabled:t,isCollapsed:n,toggleCollapse:i}=e,{iString:r}=(0,_.GO)();return t?(0,o.Y)(N.Dr,{leading:n?(0,o.Y)(a.A,{}):(0,o.Y)(s.A,{}),onClick:i,children:r(n?"Expand":"Collapse")}):null}function G(e){let{enabled:t}=e,{iString:n}=(0,_.GO)(),{comment:i,post:r,pub:l}=(0,k.c4)(),a=(0,x.L)();return t?(0,o.Y)(N.Dr,{leading:(0,o.Y)(c.A,{}),onClick:()=>{a((0,S.XB)(r,i,l))},children:n("Copy link")}):null}function U(e){let{enabled:t,onClick:n}=e,{iString:i}=(0,_.GO)();return t?(0,o.Y)(N.Dr,{leading:(0,o.Y)(d.A,{}),onClick:n,children:i("Edit")}):null}function H(e){let{enabled:t}=e,{iString:n}=(0,_.GO)(),{comment:i,onChange:r}=(0,k.c4)(),{pinned:l,togglingPin:a,togglePinned:s}=(0,k.Mr)({comment:i,onChange:r});return t?(0,o.Y)(N.Dr,{leading:(0,o.Y)(u.A,{}),onClick:s,children:n(a?l?"Unpinning...":"Pinning...":l?"Unpin":"Pin")}):null}function M(e){let{enabled:t}=e,{iString:n}=(0,_.GO)(),{comment:i,pub:r}=(0,k.c4)();if(!t)return null;let l="".concat(r.base_url,"/subscribe?gift=true&recipient=").concat(i.user_id,"-").concat((0,F.JG)(i.name,{hashIfEmpty:!0}),"&comment_id=").concat(i.id,"}");return(0,o.Y)(N.Dr,{leading:(0,o.Y)(m.A,{}),href:l,children:n("Gift a subscription")})}function z(e){let{enabled:t}=e,{iString:n}=(0,_.GO)(),{comment:i,pub:r}=(0,k.c4)();return t?(0,o.Y)(N.Dr,{leading:(0,o.Y)(h.A,{}),onClick:()=>{if(i.email)return window.open((0,T.w8b)(r,i.email),"_blank")},children:n("Subscriber details")}):null}function V(e){let{enabled:t}=e,{iString:n}=(0,_.GO)(),{comment:i,onChange:r}=(0,k.c4)(),{isDeleting:l,deleteComment:a}=(0,k.yy)({comment:i,onChange:r});return t?(0,o.Y)(N.Dr,{leading:(0,o.Y)(p.A,{}),onClick:a,priority:"destructive",children:n(l?"Deleting...":"Delete")}):null}function j(e){let{enabled:t}=e,{iString:n}=(0,_.GO)(),{comment:i,onChange:r}=(0,k.c4)(),{isRemoving:l,removeComment:a}=(0,k.d4)({comment:i,onChange:r});return t?(0,o.Y)(N.Dr,{leading:(0,o.Y)(g.A,{}),onClick:a,priority:"destructive",children:n(l?"Removing...":"Remove")}):null}function W(e){let{enabled:t,onClick:n}=e,{iString:i}=(0,_.GO)();return t?(0,o.Y)(N.Dr,{leading:(0,o.Y)(f.A,{}),onClick:n,priority:"destructive",children:i("Report")}):null}function q(e){let{enabled:t,onClick:n}=e,{iString:i}=(0,_.GO)();return t?(0,o.Y)(N.Dr,{leading:(0,o.Y)(b.A,{}),onClick:n,priority:"destructive",children:i("Ban or suspend user")}):null}function X(e){let{enabled:t}=e,n=(0,D.NP)(),{comment:i,pub:r,post:l}=(0,k.c4)(),{iString:a}=(0,_.GO)();return t?(0,o.Y)(N.Dr,{leading:(0,o.Y)(y.A,{}),onClick:()=>{n.open({restackUrl:(0,S.XB)(l,i,r)})},children:a("Restack")}):null}function Z(e){let{enabled:t}=e,{iString:n}=(0,_.GO)(),{comment:i,post:r,pub:l}=(0,k.c4)(),{addCommentToLinear:a}=(0,k.eu)({comment:i,post:r,pub:l});return t?(0,o.Y)(N.Dr,{leading:(0,o.Y)(Y,{}),onClick:a,children:n("Add to Linear")}):null}function J(e){let{comment:t,user:n}=e,i=!!(n&&n.id===t.user_id),r=!!(null==n?void 0:n.is_contributor)&&(0,R.Pp)(t)||!!(null==n?void 0:n.is_community_moderator)&&(0,R.Pp)(t),o=(0,E.canEditComment)(n,t),l=!!(null==n?void 0:n.is_contributor)&&(0,R.Pp)(t)&&""===t.ancestor_path,a=!i&&!!t.metadata.eligibleForGift&&!t.metadata.is_author,s=!i&&!t.reported_by_user&&!t.hidden&&!t.suppressed,c=r&&!i,d=r&&!t.user_banned&&!i,u=!!r&&!!t.email&&!i,m=(0,R.Pp)(t)&&!(null==n?void 0:n.is_oauth),h=o||l||a||s||c||d||u||m;return{editCommentEnabled:o,pinCommentEnabled:l,giftSubscriptionEnabled:a,reportCommentEnabled:s,deleteCommentEnabled:i,removeCommentEnabled:c,banUserEnabled:d,subscriberDetailsEnabled:u,restackCommentEnabled:m,menuEnabled:h}}},66729:function(e,t,n){n.d(t,{I:()=>r,g:()=>o});var i=n(4006);let r=(0,n(17402).createContext)(null);function o(e){let{children:t,value:n}=e;return(0,i.Y)(r.Provider,{value:n,children:t})}},47570:function(e,t,n){n.d(t,{D:()=>u});var i=n(4006),r=n(98645),o=n(45773),l=n(84605),a=n(13022),s=n(35369),c=n(45859),d=n(70515);let u=e=>{let{currentSort:t,isLoading:n,pub:o,handleSort:a,disableMobileBottomSheet:u}=e,{iString:h}=(0,l.GO)();return(0,i.Y)(c.W1,{trigger:(0,i.Y)(s.$n,{size:"sm",priority:"secondary",disabled:n,leading:(0,i.Y)(r.A,{size:18}),children:(0,d.rX)(t,o.language)}),"aria-label":h("Sort comments"),disableMobileBottomSheet:u,children:(0,i.Y)(m,{currentSort:t,pub:o,handleSort:a})})},m=e=>{let{currentSort:t,pub:n,handleSort:r}=e,l=!!(0,a.Ay)("like_comments_enabled");return(0,i.Y)(i.FK,{children:(0,d.Qz)({likesEnabled:l,language:n.language}).map(e=>{let{key:n,text:l}=e;return(0,i.Y)(c.Dr,{onClick:()=>r(n),trailing:n===t?(0,i.Y)(o.A,{}):void 0,children:l},n)})})}},42774:function(e,t,n){n.d(t,{Ud:()=>v,GL:()=>S,FS:()=>A,Q0:()=>k});var i=n(69277),r=n(79785),o=n(4006),l=n(48635),a=n(70408),s=n(32641),c=n(97731);let d=e=>{var{size:t=24,fill:n="var(--color-fg-primary)"}=e,r=(0,s._)(e,["size","fill"]);return(0,o.Y)(c.A,(0,a._)((0,i._)({},r),{name:"CommentBadgeHeartIcon",svgParams:{viewBox:"0 0 20 20"},width:t,height:t,fill:n,children:(0,o.Y)("path",{stroke:"none",d:"M9.99915 16.7256C9.90515 16.7256 9.79102 16.692 9.65674 16.6249C9.52246 16.5622 9.3949 16.4906 9.27405 16.41C8.02974 15.6044 6.94657 14.7584 6.02454 13.8722C5.10697 12.9815 4.3953 12.0662 3.88953 11.1262C3.38375 10.1818 3.13086 9.23067 3.13086 8.27283C3.13086 7.63725 3.23157 7.05762 3.43298 6.53394C3.63888 6.01025 3.92086 5.55819 4.27893 5.17773C4.64148 4.79728 5.05774 4.50635 5.52771 4.30493C6.00216 4.09904 6.51241 3.99609 7.05847 3.99609C7.73433 3.99609 8.31844 4.16618 8.81079 4.50635C9.30762 4.84652 9.70374 5.28963 9.99915 5.83569C10.299 5.28516 10.6951 4.84204 11.1875 4.50635C11.6843 4.16618 12.2707 3.99609 12.9465 3.99609C13.4836 3.99609 13.9894 4.09904 14.4639 4.30493C14.9428 4.50635 15.3613 4.79728 15.7194 5.17773C16.0774 5.55819 16.3572 6.01025 16.5586 6.53394C16.7645 7.05762 16.8674 7.63725 16.8674 8.27283C16.8674 9.23067 16.6145 10.1818 16.1088 11.1262C15.603 12.0662 14.8891 12.9815 13.967 13.8722C13.0495 14.7584 11.9708 15.6044 10.731 16.41C10.6056 16.4906 10.4758 16.5622 10.3416 16.6249C10.2118 16.692 10.0976 16.7256 9.99915 16.7256Z"})}))};var u=n(76438),m=n(84605),h=n(7684),p=n(76977),g=n(75303),f=n(81929),b=n(66511);function y(){let e=(0,r._)(["Pinned by ",""]);return y=function(){return e},e}function C(){let e=(0,r._)(["Liked by ",""]);return C=function(){return e},e}let v=e=>{let{comment:t}=e;return t.pinned_by_user_id?(0,o.Y)(Y,{name:t.pinned_by_name}):t.metadata.is_author?(0,o.Y)(_,{}):t.reactor_names.length>0?(0,o.Y)(w,{names:t.reactor_names}):null},Y=e=>{let{name:t}=e,{iString:n,iTemplate:r}=(0,m.GO)();return t?(0,o.Y)(b.m_,{text:r(y(),t),children:(0,o.Y)(f.vw,{priority:"secondary",cursor:"pointer",fillIcon:!0,leading:(0,o.Y)(u.A,(0,i._)({},f.Oi)),children:n("Pinned")})}):(0,o.Y)(f.vw,{priority:"secondary-outline",fillIcon:!0,leading:(0,o.Y)(u.A,(0,i._)({},f.Oi)),children:n("Pinned")})},_=()=>{let{iString:e}=(0,m.GO)();return(0,o.Y)(f.vw,{priority:"secondary-outline",theme:"accent",children:e("Author")})},w=e=>{let{names:t}=e,{iTemplate:n}=(0,m.GO)();return(0,o.Y)(f.vw,{theme:"accent",priority:"secondary-outline",fillIcon:!0,leading:(0,o.Y)(d,(0,i._)({},f.Oi)),children:n(C(),t.join(", "))})},k=e=>{let{comment:t,userBanned:n}=e,{banText:i,shouldShowBanText:r}=(0,h.d3)(t);return!r||n?null:(0,o.Y)(f.vw,{priority:"secondary",children:i})},S=e=>{let{comment:t,userPendingApproval:n}=e,{iString:r}=(0,m.GO)();return n?(0,o.Y)(g.AE,{href:"/publish/moderation/new-commenters?user=".concat(t.user_id),target:"_blank",rel:"noopener",children:(0,o.Y)(f.vw,{priority:"secondary",cursor:"pointer",trailing:(0,o.Y)(l.A,(0,i._)({},f.Oi)),children:r("Awaiting approval")})}):null},A=e=>{let{children:t}=e;return(0,o.Y)(p.fI,{gap:4,children:t})}},17096:function(e,t,n){n.d(t,{Wh:()=>ek,ko:()=>ef,WR:()=>ey,cQ:()=>eg,yQ:()=>eb,Gs:()=>eC});var i=n(99851),r=n(69277),o=n(70408),l=n(79785),a=n(4006),s=n(32485),c=n.n(s),d=n(78659),u=n.n(d),m=n(69843),h=n.n(m),p=n(6498),g=n.n(p),f=n(17402),b=n(15734),y=n.n(b),C=n(94090),v=n(58398),Y=n(52820),_=n(84605),w=n(70145),k=n(45611),S=n(86500),A=n(55376),I=n(54687),N=n(72170),x=n(60145),D=n(55136),F=n(25859),T=n(13022),E=n(76977),R=n(45859),B=n(63136),L=n(28916);let P="link-_X6et2";function O(e){let{pub:t,post:n,comment:i,onChange:r}=e,{iString:o}=(0,_.GO)(),{canRestack:l,isRestacked:s,restacks:d,menuItems:u,nuxModal:m}=(0,L.I)({pub:t,post:n,comment:i,onRestack:e=>{r({restacked:e,restacks:d+(e?1:-1)})}});return l?(0,a.FD)("span",{children:[m,(0,a.Y)(R.W1,{trigger:(0,a.FD)("a",{className:c()("restack-button",s&&"restacked"),href:"javascript:void(0)",children:[(0,a.Y)(x.A,{}),o("Restack"),d>0&&" (".concat(d,")")]}),children:u})]}):null}let G=e=>{var t;let{comment:n,pub:i,user:r,post:o,reaction_token:l,commentsEnabledForPost:s,noRestack:d,onChange:u,startReply:m,shareComment:h,updateCommentReacted:p,hideShare:g,commentActionsOverride:f}=e,{iString:b}=(0,_.GO)(),y=(0,T.Ay)("like_comments_enabled");return(0,a.Y)(E.pT,{gap:16,alignItems:"center",justifyContent:"start",paddingTop:8,className:c()("comment-actions",{"withShareButton-hQzuEn":!!h}),children:!n.deleted&&[y&&(0,a.Y)(D.cy,{user:r,pub:i,post:o,comment:n,height:16,countInParenthesesStyle:!0,token:l,onChange:e=>{let{comment:t}=e;return u(t)},onReactedChange:e=>{p&&p(n.id,e)},noSelfUpdate:!!p,commentActionsOverride:f}),s&&(0,a.Y)(F.Yq,{onClick:f||(()=>m()),className:P,children:(0,a.FD)(E.pT,{gap:6,alignItems:"center",children:[(0,a.Y)(I.A,{stroke:"var(--color-fg-secondary-themed)",size:16}),(0,a.FD)(B.EY.Meta,{color:"pub-secondary-text",children:[b("Reply"),(null==(t=n.children)?void 0:t.length)>0&&" (".concat(n.children.length,")")]})]})}),!g&&!!h&&(0,a.Y)(F.Yq,{onClick:f||(()=>h(n.id)),className:P,children:(0,a.FD)(E.pT,{gap:6,alignItems:"center",children:[(0,a.Y)(N.A,{stroke:"var(--color-fg-secondary-themed)",size:16}),(0,a.Y)(B.EY.Meta,{color:"pub-secondary-text",children:b("Share")})]})}),!d&&(0,a.Y)(O,{pub:i,post:o,comment:n,onChange:u})]})};var U=n(43262),H=n(87087),M=n(35369),z=n(16291),V=n(83873),j=n(39318),W=n(82776),q=n(57324),X=n(70515);let Z=e=>{var t;let{comment:n,showHiddenComment:i,setShowHiddenComment:r}=e,{iString:o}=(0,_.GO)(),l=null==(t=n.bans)?void 0:t.find(e=>e.publication_id===n.publication_id),s=l&&(0,z.A)(l.expiry).diff((0,z.A)(),"years")>=1,c=(0,X.Pp)(n)&&(n.user_banned_for_comment||n.reported_by_user),d=o(s?"User was indefinitely suspended for this comment. ":"User was temporarily suspended for this comment. "),u=n.user_banned_for_comment?d:o("You reported this comment. ");return c&&(0,a.Y)("div",{className:"comment_notice",children:(0,a.FD)("i",{children:[u,(0,a.Y)("a",{href:"javascript:void(0)",onClick:()=>r(!i),children:i?"Hide":"Show"})]})})},J=e=>{let{comment:t}=e,{iString:n}=(0,_.GO)(),{title:i,truncated_body_text:r,date:o,bylines:l,like_count:s,comment_count:c,url:d}=t.reply;return(0,a.FD)("a",{className:"reply-comment",href:(0,j.yRP)(d,{utm_source:q.VU.substack,utm_campaign:q._9.postReplyComment,utm_medium:q.Jn.web}),"data-native":!0,children:[(0,a.Y)("div",{className:"reply-comment-title",children:i}),r&&(0,a.Y)("div",{className:"reply-comment-body",children:(0,W.formatEllipsis)(r)}),(0,a.Y)(B.EY.B4,{weight:"semibold",as:"div",className:"reply-comment-read-more",role:"button",children:n("Read more")}),(0,a.Y)("div",{className:"reply-comment-meta",children:(0,W.getPostEmbedMeta)({date:o,bylines:l,like_count:s,comment_count:c})})]})},K=e=>{let{comment:t,bodyRef:n,expandToggleClicked:i,isLong:r,isExpanded:o}=e;o=o||!r;let[l,s]=(0,f.useState)(!1),d=(t.user_banned_for_comment||t.reported_by_user)&&!l,{iString:u}=(0,_.GO)(),m=t.age_verification&&t.age_verification.status!==V.Y.CompletedAdult;return(0,a.FD)(a.FK,{children:[(0,a.FD)("div",{className:c()("comment-body",{long:r,expanded:o}),ref:n,children:[(0,a.Y)(Z,{comment:t,showHiddenComment:l,setShowHiddenComment:s}),m?(0,a.Y)(U.T,{content:t,description:t.body,source:"comment"}):t.hidden?(0,a.Y)("i",{children:u("Comment hidden")}):t.deleted?(0,a.Y)("i",{children:u("Comment deleted")}):d?(0,a.Y)("i",{}):t.suppressed&&!l?(0,a.Y)("i",{children:u("Comment removed")}):"reply"===t.type?(0,a.Y)(J,{comment:t}):(0,H.yY)(t.body)]}),r&&!o&&(0,a.Y)(M.$n,{size:"sm",priority:"secondary-outline",onClick:()=>i(),children:u("See more")})]})};var Q=n(56878),$=n(57023),ee=n(40972),et=n(24078),en=n(75303),ei=n(49807);function er(e){let{comment:t,onClick:n,utm_content:i,noHover:r}=e,o=(0,H.DH)(t),l=(0,ei.gYq)(o,{utm_source:"comment",utm_content:i}),s=null!=n?n:()=>{};return t.user_banned?(0,a.Y)(en.AE,{href:l,onClick:s,children:(0,a.Y)(et.V0,{size:32,icon:(0,a.Y)(ee.A,{stroke:"var(--color-fg-tertiary)"})})}):eo(o,r,l,s)}let eo=(e,t,n,i)=>t?(0,a.Y)(et.dm,{user:e,size:32,linkProps:{href:n,onClick:i}}):(0,a.Y)(et.tp,{user:e,size:32,linkProps:{href:n,onClick:i}});var el=n(89490);function ea(e){let{onCollapse:t}=e;return(0,a.Y)(E.VP,{className:"collapser-Xs0O6C",onClick:t,children:(0,a.Y)(el.az,{className:"threadLine-BvF1wF",animate:!0})})}var es=n(8149),ec=n(50129);function ed(){let e=(0,l._)(["Comment by ",""]);return ed=function(){return e},e}let eu=Math.min(Math.ceil((u()(document.body.clientWidth,400,728)-140)/50),10);class em extends f.Component{componentDidMount(){this.setSelectedHighlight(),this.setReplyStateFromHash(),this.updateIsLong()}componentDidUpdate(e){var t,n;(null==(t=e.comment)?void 0:t.id)!==(null==(n=this.props.comment)?void 0:n.id)&&this.setSelectedHighlight(),e.replying!==this.props.replying&&this.props.replying&&this.startReply()}setReplyStateFromHash(){if(this.props.comment.deleted||"undefined"==typeof window||!window.location.hash)return;let e=/^#comment-(\d+)-reply$/.exec(window.location.hash);e&&Number(e[1])===this.props.comment.id&&(window.location.hash=window.location.hash.replace(/-reply$/,""),this.startReply())}async startReply(){this.props.onStartReply?this.props.onStartReply(this.props.comment):await new Promise(e=>this.setState({replying:!0},e))}onDateClick(e){var t;let[n,i]=e.target.href.split("?")[0].split("#");n===(null==(t=window.location.href.split("?")[0])?void 0:t.split("#")[0])&&i&&(e.preventDefault(),this.setState({hideAnchors:!0},()=>{window.location.hash="#".concat(i),this.setState({hideAnchors:!1})}))}render(){var e,t,n,i,l;let{user:s,comment:d,freeSignup:u,freeSignupEmail:m,pub:p,post:g,reaction_token:f,depth:b,collapseAtDepth:y,onChange:C,scrollRef:v,retainUserCollapseState:Y,onStartReply:_,noHoverProfile:w,onProfileClick:k,onShareComment:S,hideContextMenu:A,noRestack:I,updateCommentReacted:N,iString:x,iTemplate:D,hideShare:F,commentActionsOverride:T}=this.props,{isSelected:R,replying:B,editing:L,hideAnchors:P,isCollapsed:O}=null!=(i=this.state)?i:{},U=p.community_enabled&&g&&"none"!==g.write_comment_permissions,{user_banned:z}=d;if(L&&s)return(0,a.Y)(Q.g,{autoFocus:!0,user:s,freeSignup:u,freeSignupEmail:m,pub:p,post:g,commentBeingEdited:d,saveEdit:this.saveEdit,token:f,onCancel:()=>this.setState({editing:!1}),onSuccess:C?this.onSaveEditSuccess:null});let V=null==(e=(0,H.DH)(d))?void 0:e.name,j=V?D(ed(),V):x("Comment"),W=this.state.isLong&&!this.state.isExpanded;return(0,a.FD)("div",{className:c()("comment",{selected:R,"post-reply":"reply"===d.type,collapsed:O}),children:[!P&&[(0,a.Y)("div",{id:"comment-".concat(d.id),className:"comment-anchor"}),(0,a.Y)("div",{id:"comment-".concat(d.id,"-reply"),className:"comment-anchor"})],(0,a.FD)(E.fI,{gap:12,paddingBottom:12,className:"comment-content",role:"article","aria-label":j,children:[(0,a.Y)(E.VP,{ref:this.headContainerRef,children:(0,a.Y)(er,{comment:d,noHover:w,onClick:k?()=>k(d):void 0})}),(0,a.FD)(E.VP,{flex:"grow",children:[(0,a.Y)($.P,{post:g,pub:p,comment:d,isCollapsed:O,toggleCollapse:()=>this.setCollapsed(!this.state.isCollapsed),onProfileClick:k,userBanned:null!=z&&z,userPendingApproval:d.status===ec.nJ.new_commenter_approval_required&&!!(null==s?void 0:s.is_admin),onChange:this.onChange,startEdit:()=>this.startEdit(),startReport:this.showReportModal,openBan:this.openBan,hideContextMenu:A}),(0,a.Y)(K,{comment:d,bodyRef:this.bodyRef,expandToggleClicked:this.expandToggleClicked,isLong:W,isExpanded:this.state.isExpanded}),(0,a.Y)(G,{comment:d,pub:p,user:s,post:g,reaction_token:f,commentsEnabledForPost:U,noRestack:I,onChange:this.onChange,startReply:()=>this.startReply(),updateCommentReacted:N,shareComment:S,hideShare:F,commentActionsOverride:T}),(0,a.Y)(es.N,{open:B&&U,children:(0,a.Y)(eh,{children:(0,a.Y)(Q.g,{autoFocus:!0,user:s,freeSignup:u,freeSignupEmail:m,pub:p,post:g,parent:d,token:f,onCancel:()=>this.setState({replying:!1}),onSuccess:C?e=>{this.setState({replying:!1}),C((0,o._)((0,r._)({},d),{children:[e].concat(d.children)}))}:null,alwaysShowButtons:!0})})})]})]}),d.childrenSummary&&(0,a.Y)("div",{className:"more-replies-container",children:(0,a.Y)("a",{className:"more-replies",href:(0,H.XB)(g,d,p),children:d.childrenSummary})}),!d.childrenSummary&&!h()(b)&&b>=eu&&!!(null==(t=d.children)?void 0:t.length)&&(0,a.Y)(E.fI,{className:"more-replies-container",children:(0,a.Y)(M.vx,{size:"sm",priority:"secondary-outline",href:(0,H.XB)(g,d,p),children:x("Continue thread →")})}),!d.childrenSummary&&!h()(b)&&b0&&(0,a.Y)(ea,{onCollapse:()=>this.setCollapsed(!0)})]},d.id)}constructor(e,t){super(e,t),(0,i._)(this,"bodyRef",(0,f.createRef)()),(0,i._)(this,"headContainerRef",(0,f.createRef)()),(0,i._)(this,"openBan",()=>{this.props.commentActions.openBanDialog({comment:this.props.comment,onReply:()=>{this.startReply()}})}),(0,i._)(this,"updateIsLong",()=>{let e=this.bodyRef.current;if(!e)return;let t=e.scrollHeight>e.clientHeight+200;t!==this.state.isLong&&this.setState({isLong:t})}),(0,i._)(this,"setSelectedHighlight",()=>{let e=(0,H.jv)()===this.props.comment.id;this.setState({isSelected:e})}),(0,i._)(this,"startEdit",()=>{this.setState({editing:!0})}),(0,i._)(this,"saveEdit",async e=>{if(this.state.editing)return{res:await this.props.maybeOAuthRequest.patch("/api/v1/comment/".concat(this.props.comment.id)).send({body:e})}}),(0,i._)(this,"onSaveEditSuccess",e=>{var t,n;let{edited:i}=e;this.setState({editing:!1}),null==(t=(n=this.props).onChange)||t.call(n,(0,r._)({},this.props.comment,i))}),(0,i._)(this,"showReportModal",()=>{var e;let{pub:t,comment:n}=this.props;this.props.onReport({pub:t,canReportToAdmins:!!(null==t?void 0:t.moderation_enabled)&&!(null==(e=n.metadata)?void 0:e.is_author),onSubmit:async e=>{var i,l;let{reportCategory:a,reportedToSubstack:s,details:c}=e;await y().post("/api/v1/comment/".concat(n.id,"/report")).send({publication_id:null==t?void 0:t.id,details:c,reportCategory:a,reportedToSubstack:s}),null==(i=(l=this.props).onChange)||i.call(l,(0,o._)((0,r._)({},this.props.comment),{reported_by_user:!0}))}})}),(0,i._)(this,"expandToggleClicked",()=>{let e=this.bodyRef.current;if(!e)return;let t=e.scrollHeight-e.clientHeight;(0,S.u4)(S.qY.COMMENT_EXPAND_TOGGLE_CLICKED,{hiddenHeight:t>0?t.toString():null}),this.setState({isExpanded:!0})}),(0,i._)(this,"onChange",e=>{this.props.onChange?this.props.onChange((0,r._)({},this.props.comment,e)):document.location.href=(0,H.PG)(this.props.post,this.props.pub)}),(0,i._)(this,"setComment",e=>{this.setState({comment:e})}),(0,i._)(this,"setCollapsed",e=>{var t,n;if(this.setState({isCollapsed:e}),e&&(null==(n=this.headContainerRef)||null==(t=n.current)?void 0:t.scrollIntoView)){let e=this.headContainerRef.current.getBoundingClientRect();e.top<0&&(document.documentElement.scrollTop+=e.top-80)}this.props.retainUserCollapseState&&(0,H.Pm)(this.props.comment.id,e)}),this.state={editing:!1,replying:!1,hideAnchors:!1,isSelected:!1,isCollapsed:this.props.retainUserCollapseState&&(0,H.pz)(this.props.comment.id),isExpanded:!1,isLong:!1}}}(0,i._)(em,"contextType",Y.qL);let eh=(0,el.I4)({display:"flex",flex:"grow",paddingTop:16}),ep=(0,f.memo)((0,_.wr)(function(e){let t=(0,f.useContext)(eS),n=(0,C.uc)(),i=(0,w.jN)();return(0,a.Y)(em,(0,o._)((0,r._)({},e),{commentActions:t,onReport:n,maybeOAuthRequest:i}))}));em.displayName="Comment_Internal";let eg=5,ef=1,eb=16,ey=50,eC=200;function ev(e){return e.reduce((e,t)=>e+1+ev(t.children||[]),0)}let eY=e=>{let{user:t,freeSignup:n,freeSignupEmail:i,pub:r,post:o,comments:l,reaction_token:s,depth:d,collapseAtDepth:u,onChange:m,pageSize:h,retainUserCollapseState:p,updateCommentReacted:b,parent:y,scrollRef:C,className:Y,onStartReply:w,noHoverProfile:S,onProfileClick:A,hideContextMenu:I,noRestack:N,hideShare:x,commentActionsOverride:D}=e,F=h||eb,[T,E]=(0,f.useState)(!1),[R,B]=(0,f.useState)(!1),[L,P]=(0,f.useState)(F),[O,G]=(0,f.useState)(-1),[U,H]=(0,f.useState)(new Set(l.map(e=>{let{id:t}=e;return t}))),[z,V]=(0,f.useState)(!1),[j,W]=(0,f.useState)(void 0),{iString:X,iPlural:Z}=(0,_.GO)();(0,f.useEffect)(()=>{O>=0&&window.scrollTo(window.scrollX,O)},[O]);let J=(0,k._)(e=>{W(e),V(!0)});if(0===(l||[]).length)return null;let[K,Q]=g()(null!=l?l:[],e=>{let{id:n,user_id:i}=e;return U.has(n)||i===(null==t?void 0:t.id)}),$=K.slice(0,L);return(0,a.FD)(a.FK,{children:[(0,a.FD)("div",{className:c()("comment-list",Y,{"has-new-comments":Q.length>0}),children:[Q.length>0&&(0,a.Y)(M.$n,{size:"sm",priority:"secondary-outline",onClick:()=>{setTimeout(()=>{H(new Set(l.map(e=>{let{id:t}=e;return t}))),B(!1)},0),B(!0)},children:R?Z("loading 1 new reply","loading %1 new replies",ev(Q)):Z("1 new reply","%1 new replies",ev(Q))}),(0,a.Y)("div",{className:"comment-list-items",children:$.map(e=>(0,a.Y)(ep,{user:t,freeSignup:n,freeSignupEmail:i,pub:r,post:o,comment:e,parent:y,reaction_token:s,collapseAtDepth:u,depth:d||0,onChange:m,scrollRef:C,retainUserCollapseState:p,onStartReply:w,noHoverProfile:S,onShareComment:J,onProfileClick:A,hideContextMenu:I,noRestack:N,updateCommentReacted:b,hideShare:x,commentActionsOverride:D},e.id))}),K.length>$.length&&(0,a.Y)(M.$n,{size:"sm",priority:"secondary-outline",loading:T,onClick:()=>{G(window.scrollY),setTimeout(()=>{P(L+F),E(!1)},0),E(!0)},children:X("Load More")})]}),(0,a.Y)(v.Z,{isOpen:z,onClose:()=>V(!1),pub:r,post:o,commentId:j,comments:l,user:null!=t?t:void 0,utm_campaign:q._9.commentListShareCta,medium:"web"})]})};eY.displayName="CommentList";let e_=(0,f.memo)(eY);e_.displayName="CommentList";let ew=e_;function ek(e){let[t,n]=(0,f.useState)(null),i=(0,f.useMemo)(()=>({openBanDialog:n}),[]);return(0,a.FD)(eS.Provider,{value:i,children:[(0,a.Y)(ew,(0,r._)({},e)),(0,a.Y)(A.wI,(0,o._)((0,r._)({},t),{onClose:()=>n(null),onBan:(t,n)=>{let{onChange:i}=e;i?i((0,o._)((0,r._)({},t),{user_banned:!0,bans:n.concat(t.bans)})):document.location.href=(0,H.PG)(e.post,e.pub)}}))]})}let eS=(0,f.createContext)({openBanDialog:()=>void 0})},12010:function(e,t,n){n.d(t,{U:()=>r});var i=n(4006);let r=()=>(0,i.FD)("div",{className:"comment-silhouette",children:[(0,i.Y)("div",{className:"comment-silhouette-head"}),(0,i.FD)("div",{className:"comment-silhouette-content",children:[(0,i.Y)("div",{className:"comment-silhouette-meta"}),(0,i.Y)("div",{className:"comment-silhouette-body"}),(0,i.Y)("div",{className:"comment-silhouette-actions"})]})]})},7684:function(e,t,n){n.d(t,{Mr:()=>y,c4:()=>f,d3:()=>b,d4:()=>C,eu:()=>Y,yy:()=>v});var i=n(79785),r=n(17402),o=n(15734),l=n.n(o),a=n(84605),s=n(70145),c=n(68349),d=n(66729),u=n(87087),m=n(16291),h=n(50129);function p(){let e=(0,i._)(["Are you sure you want to unpin this comment?"]);return p=function(){return e},e}function g(){let e=(0,i._)(["Are you sure you want to pin this comment?"]);return g=function(){return e},e}function f(){let e=(0,r.useContext)(d.I);if(!e)throw Error("useCommentMenu must be used within a CommentMenuProvider");return e}let b=e=>{var t;let{iString:n}=(0,a.GO)(),i=null==(t=e.bans)?void 0:t.find(t=>t.publication_id===e.publication_id),r=i&&(0,m.A)(i.expiry).diff((0,m.A)(),"years")>=1,o=["moderator_removed","deleted"].includes(e.status),l=e.user_banned_for_comment;return{banText:r?n("Banned"):o?"":n("Suspended"),shouldShowBanText:l}};function y(e){let{comment:t,onChange:n}=e,{iTemplate:i}=(0,a.GO)(),[o,s]=(0,r.useState)(!1),d=!!t.pinned_by_user_id,u=async()=>{if(!o&&window.confirm(d?i(p()):i(g()))&&!o){s(!0);try{await l().patch("/api/v1/comment/".concat(t.id,"/pin")).send({pinned:!d}),n({pinned:!d}),document.location.reload()}catch(e){alert((0,c.uX)(e)),s(!1)}}};return{pinned:d,togglingPin:o,togglePinned:u}}function C(e){let{comment:t,onChange:n}=e,[i,o]=(0,r.useState)(!1),a=_("remove"),s=async()=>{if(!i&&a()){o(!0);try{await l().patch("/api/v1/comment/".concat(t.id,"/status")).send({status:h.nJ.moderator_removed}),n({suppressed:!0,status:h.nJ.moderator_removed,body:null})}catch(e){alert((0,c.uX)(e))}o(!1)}};return{isRemoving:i,removeComment:s}}function v(e){let{comment:t,onChange:n}=e,[i,o]=(0,r.useState)(!1),l=_("delete"),a=(0,s.jN)(),d=async()=>{if(!i&&l()){o(!0);try{await a.delete("/api/v1/comment/".concat(t.id)).send(),n({status:h.nJ.deleted,deleted:!0,user_id:null,name:null,body:null})}catch(e){alert((0,c.uX)(e))}o(!1)}};return{isDeleting:i,deleteComment:d}}function Y(e){let{comment:t,post:n,pub:i}=e;return{addCommentToLinear:()=>{let e,r;window.open((e=(0,u.XB)(n,t,i),r=encodeURIComponent("".concat(t.body,"\n\nComment author: [").concat(t.name,"](https://admin.substack.com/users/").concat(t.user_id,")\n\nLink: ").concat(e)),"https://linear.app/substackinc/team/TPT/new?description=".concat(r,"&status=Triage")),"_blank")}}}function _(e){let{iString:t}=(0,a.GO)(),{isOAuthProvider:n}=(0,s.ey)();return()=>!!n||window.confirm("".concat(t("Are you sure you want to ".concat(e," this comment? This action cannot be reversed."))))}},93354:function(e,t,n){n.d(t,{t:()=>function e(t,n){let o=[],l=!1,a=new Map(t.map(e=>[e.id,e]));for(let t of n){let n=a.get(t.id);if(n){var s,c;(n.children&&t.children?e(n.children,t.children):t.children)!==n.children||r.some(e=>n[e]!==t[e])||!(0,i.bN)(null!=(s=n.reactions)?s:{},null!=(c=t.reactions)?c:{})?(o.push(t),l=!0):o.push(n)}else o.push(t),l=!0}return l?o:t}});var i=n(38123);let r=["edited_at","deleted","status"]},36757:function(e,t,n){n.d(t,{f:()=>o});var i=n(69277),r=n(70408);function o(e,t){var n,o;return function e(t,n,o){let l=n[0];if(!l){let e=t.findIndex(e=>e.id===o.id);return e>=0?t.with(e,o):[...t,o]}let a=t.findIndex(e=>e.id===l);if(a>=0){let l=t[a];if(l.id===o.id)return t.with(a,o);if(l.children)return t.with(a,(0,r._)((0,i._)({},l),{children:e(l.children,n.slice(1),o)}))}return t}(e,null!=(o=null==(n=t.ancestor_path)?void 0:n.split(".").map(Number))?o:[],t)}},87087:function(e,t,n){n.d(t,{DH:()=>C,EQ:()=>b,PG:()=>f,Pm:()=>v,Wn:()=>g,XB:()=>d.XB,cx:()=>function e(t,n){for(let[o,l]of t.entries())if(l.id===n.id)return t.with(o,n);else if(l.children){let a=e(l.children,n);if(a!==l.children)return t.with(o,(0,r._)((0,i._)({},l),{children:a}))}return t},jv:()=>p,pU:()=>function e(t,n){if(!t||!n||!n.length)return null;for(let i of n)if(i.id===t)return i;else if(i.children&&i.children.length){let n=e(t,i.children);if(n)return n}return null},pz:()=>Y,yY:()=>y});var i=n(69277),r=n(70408),o=n(4006),l=n(95201),a=n.n(l),s=n(17186),c=n(39318),d=n(18947),u=n(82776);let m="comment-collapse-state",h=function(){try{return(0,s.xm)(m,[])}catch(e){return console.error("Failed to load comment collapse state:",e),[]}}(),p=()=>{if("undefined"!=typeof window&&window.location.hash){let e=/^#comment-(\d+)/.exec(window.location.hash);if(e)return Number(e[1])}return null},g=()=>"undefined"!=typeof window&&"#input"===window.location.hash;function f(e,t,n){return(0,c.yRP)((0,c.wu9)(t,e,{comments:!(0,u.shouldUseInlineComments)(t,e)}),n)}function b(e,t,n){return(0,c.yRP)("".concat((0,c.$_T)(t),"/embed/comments/").concat(e.id),{access_token:n})}function y(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"p";return(e||"").split("\n").filter(e=>e.trim()).map(e=>(0,o.Y)(t,{children:(0,o.Y)(a(),{options:{validate:{url:e=>!!e&&!e.startsWith("/")},attributes:{rel:"nofollow ugc noopener"}},children:e})}))}let C=e=>{var t,n,i,r,o,l;return{id:e.user_id,slug:"user_slug"in e?e.user_slug:void 0,photo_url:e.photo_url,name:null!=(o=e.name)?o:null,bestseller_tier:e.user_bestseller_tier,status:e.userStatus,primary_publication:e.user_primary_publication,is_free_subscribed:["free_signup, subscribed"].includes(null!=(l=null==(t=e.metadata)?void 0:t.membership_state)?l:""),is_subscribed:(null==(n=e.metadata)?void 0:n.membership_state)==="subscribed",is_founding:null==(i=e.metadata)?void 0:i.founding,is_author:null==(r=e.metadata)?void 0:r.is_author}};function v(e,t){let n=!1;if(t)!h.includes(e)&&(n=!0,h.push(e),h.length>250&&h.splice(0,h.length-250));else{let t=h.indexOf(e);t>=0&&(n=!0,h.splice(t,1))}if(n)try{(0,s.X3)(m,h)}catch(e){console.error("Failed to store comment collapse state:",e)}}function Y(e){return h.includes(e)}},82286:function(e,t,n){n.d(t,{Xn:()=>l});var i=n(4006);n(32485),n(84605),n(35369),n(33727),n(97515);var r=n(76977);n(57820);var o=n(75303);function l(e){let{children:t,flex:n}=e;return(0,i.Y)(r.fI,{gap:8,alignItems:"center",flex:n,children:t})}n(63136),n(65259),(0,o.I4)({display:"flex",direction:"column",gap:16}),(0,o.I4)({display:"flex",direction:{desktop:"row",mobile:"column"},gap:12,alignItems:{desktop:"center",mobile:"stretch"},justifyContent:{desktop:"space-between",mobile:void 0}}),(0,o.I4)({display:"flex",direction:"column",minHeight:280}),(0,o.I4)({display:"flex",direction:"column",gap:32}),(0,o.I4)({display:"flex",direction:"row",gap:12,alignItems:"center",justifyContent:"space-between",wrap:"wrap"}),(0,o.I4)({display:"flex",wrap:"wrap",direction:"row",gap:12,alignItems:"center"})},62870:function(e,t,n){n.d(t,{BB:()=>C,Cs:()=>Y,OK:()=>w,f3:()=>k,lh:()=>_,wj:()=>S});var i=n(69277),r=n(70408),o=n(4006),l=n(32485),a=n.n(l),s=n(48309),c=n(17402),d=n(84605),u=n(86500),m=n(35369),h=n(76977),p=n(57820),g=n(75303),f=n(39318),b=n(49807),y=n(84759);let C=(0,c.forwardRef)((e,t)=>{let{img:n}=e,[i,r]=(0,c.useState)(!1);return n?(0,o.FD)(o.FK,{children:[!i&&(0,o.Y)(v,{}),(0,o.Y)("img",{src:n,className:a()(y.A.image,i&&y.A.loaded),ref:t,onLoad:()=>r(!0),style:{display:i?"block":"none"}})]}):(0,o.Y)(v,{})});function v(){return(0,o.Y)(h.VP,{alignItems:"center",justifyContent:"center",bg:"secondary",className:a()(y.A.image,y.A.loading),children:(0,o.Y)(p.y$,{})})}function Y(e){let{children:t,onClick:n,href:i}=e,{iString:r}=(0,d.GO)();return(0,o.Y)(g.AE,{onClick:n,href:i,"aria-label":r("Download image"),download:!0,className:a()(y.A.link),target:"_blank",rel:"noreferrer",children:t})}function _(e){let{onClick:t,width:n,className:i}=e,{iString:r}=(0,d.GO)();return(0,o.Y)(h.VP,{style:{width:n},className:a()(y.A.overlay,i),animate:!0,position:"absolute",inset:0,alignItems:"center",justifyContent:"end",paddingBottom:12,children:(0,o.Y)(m.$n,{className:y.A.downloadButton,priority:"primary-mono",size:"sm",leading:(0,o.Y)(s.A,{size:20}),onClick:e=>{e.stopPropagation(),t()},children:r("Download")})})}function w(e){let{children:t,size:n=300,aspectRatio:i=1}=e;return(0,o.Y)(h.VP,{className:y.A.imageContainer,flex:"auto",position:"relative",cursor:"grab",style:{"--image-max-size":"".concat(n,"px"),"--aspect-ratio":i},children:t})}async function k(e){let{post_id:t,type:n,aspect_ratio:o,selection_id:l,source:a,auto_selected:s,shareData:c,eventName:d,additionalTrackingData:m={}}=e;if((0,u.u4)(u.qY[d],(0,r._)((0,i._)({post_id:t,type:n},o&&{aspect_ratio:o},l&&{selection_id:l},a&&{source:a},s&&{auto_selected:s},m),{interaction:"click"})),c)try{await navigator.share(c)}catch(e){}}function S(e){let{pub:t,post:n,selectionId:i,style:r}=e;return i?{shareTitle:"Share this post",shareText:n.title,shareUrl:(0,b.wu9)(t,n),imageDownloadUrl:(0,f.SAZ)(t,n,i,r),imageUrl:(0,f.SAZ)(t,n,i,r),imageUrlSameOrigin:(0,f.LJG)(t,n,i,r)}:{shareTitle:"Share this post",shareText:n.title,shareUrl:(0,b.wu9)(t,n),imageDownloadUrl:(0,f.fsB)(t,n,r),imageUrl:(0,f.fsB)(t,n,r),imageUrlSameOrigin:(0,f.OKG)(t,n,r)}}},3046:function(e,t,n){n.d(t,{Ac:()=>x,Nf:()=>k,T_:()=>E,XK:()=>P,Xx:()=>A,YX:()=>L,ZT:()=>N,Zh:()=>I,b5:()=>D,dU:()=>S});var i=n(69277),r=n(70408),o=n(32641),l=n(4006),a=n(32485),s=n.n(a),c=n(14792),d=n.n(c);n(83673);var u=n(82853);n(18993);var m=n(8853),h=n(38685);n(66443),n(94090);var p=n(33764);n(82936),n(84605);var g=n(46275);n(10398),n(94729),n(24078),n(15040);var f=n(17028),b=n(97515);n(45859);var y=n(22602),C=n(45974),v=n(75303);n(92028),n(36372),n(89955),n(46647),n(87782),n(80351),n(69089),n(70486),n(42831),n(20437),n(16291),n(39318);var Y=n(49807);n(82776);var _=n(69706),w=n(36083);function k(e){var t;let{user:n}=e,i=(0,g.BR)().isOnDestination;return(0,l.Y)(f.az,{paddingX:12,children:(0,l.Y)(f.EY.B4,{as:"a",color:"secondary",decoration:"hover-underline",href:(0,Y.gYq)(n,{noBase:i}),target:"_blank",children:null!=(t=n.name)?t:"Substack user"})})}let S=(0,f.I4)({className:w.A.messageBubbleGroup,position:"relative",gap:2},v.VP);function A(e){let{direction:t,isLink:n,backgroundColor:i,isAuthorContributor:r}=e,o="incoming"===t&&r,a="".concat(i,"1A");return(0,l.FD)("svg",{viewBox:"0 0 16 13",className:s()(w.A.bubbs,w.A[t],n&&w.A.isLink,r&&w.A.author),style:o?{fill:a}:{},children:[(0,l.Y)("circle",{cx:"5",cy:"5",r:"5",className:w.A.bubb}),(0,l.Y)("circle",{cx:"13.5",cy:"10.5",r:"2.5",className:w.A.bubb}),o&&(0,l.FD)(l.FK,{children:[(0,l.Y)("circle",{cx:"5",cy:"5",r:"5",fill:a}),(0,l.Y)("circle",{cx:"13.5",cy:"10.5",r:"2.5",fill:a})]})]})}function I(e){var{messageDirection:t,isFirst:n=!1,isLast:a=!1,forceTheme:c,pubThemeAccentColor:u,isAuthorContributor:m,className:h}=e,p=(0,o._)(e,["messageDirection","isFirst","isLast","forceTheme","pubThemeAccentColor","isAuthorContributor","className"]);let g="incoming"===t&&m,b=g&&u;return(0,l.Y)(f.fI,(0,r._)((0,i._)({},p),{className:s()(w.A.bubble,w.A[t],n&&w.A.isFirst,a&&w.A.isLast,c&&w.A["force".concat(d()(c),"Theme")],g&&w.A.author,h),style:{"--color-chat-author-bg-overlay":b?"".concat(u,"1A"):"oklch(from var(--color-bg-accent-themed) l c h / 0.1)"}}))}function N(e){let{metadata:t,publication:n,direction:i,isFirst:r,isLast:o}=e,a=x(t.url);return a?(0,l.Y)(I,{messageDirection:i,isFirst:r,isLast:o,maxWidth:400,forceTheme:"incoming",outline:"detail",children:(0,l.Y)(F,{videoId:a})}):(0,l.Y)(I,{as:"a",href:t.url,target:"_blank",rel:"nofollow noopener ugc",messageDirection:i,isFirst:r,isLast:o,maxWidth:400,forceTheme:"incoming",outline:"detail",children:!function(e){let{metadata:t}=e;if(!t.image)return!1;let n=(0,Y.d4Y)(t.image);return!!n&&(n.width<401||n.height<401)}({metadata:t})?(0,l.Y)(R,{publication:n,metadata:t}):(0,l.Y)(E,{metadata:t})})}function x(e){try{let n=new URL(e);if("youtube.com"===n.hostname||"www.youtube.com"===n.hostname){let e=n.searchParams.get("v");if("/watch"===n.pathname&&e)return e;let i=n.pathname.match(/\/(?:embed|v|shorts|live)\/([^\s\/]+)/);if(i){var t;return null!=(t=i[1])?t:null}}else if("youtu.be"===n.hostname){let e=n.pathname.slice(1);if(e)return e}}catch(e){console.error("Error parsing URL:",e)}return null}function D(e){try{var t,n;let i=new URL(e);if(i.pathname.startsWith("/player/v1/"))return null!=(t=i.pathname.split("/").pop())?t:null;if(i.pathname.includes("/video/")){let e=i.pathname.split("/"),t=e.indexOf("video")+1;if(ti});function i(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new Promise(t=>{setTimeout(t,e)})}},54542:function(e,t,n){n.d(t,{y1:()=>i});function*i(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;for(let i=e;i