"use strict";(self.webpackChunksubstack=self.webpackChunksubstack||[]).push([["1021"],{35144:function(){},4291:function(e,t,n){n.d(t,{Z:()=>i});let i={pubTheme:"pubTheme-yiXxQA"}},33942:function(e,t,n){n.d(t,{Z:()=>i});let i={timeline:"timeline-WDyd1C",railContainer:"railContainer-W63jgB",rail:"rail-LM6nrG",draggable:"draggable-XUqwr1",draggableLeft:"draggableLeft-MDthpn",draggableRight:"draggableRight-LVVwsd",tooltip:"tooltip-ceWgga",visible:"visible-Y2jC2J",hidden:"hidden-G_OmGT",playback:"playback-UIgSL0",nonSelectable:"nonSelectable-SHHRwG",tick:"tick-RKB6b5",lgTick:"lgTick-iLU6yS",smTick:"smTick-ED2tnj",currentTick:"currentTick-xH7tpT",selection:"selection-m8n06y",selectionFadeLeft:"selectionFadeLeft-rID4fZ",selectionFadeRight:"selectionFadeRight-iIPOWk",handle:"handle-prO_Ky",storyboard:"storyboard-xsBzUl",ticks:"ticks-EA7bBQ",handles:"handles-waTdni",shadow:"shadow-wpFmkU",shadowContainer:"shadowContainer-JsGn6N"}},8525:function(e,t,n){n.d(t,{Z:()=>i});let i={modalTitle:"modalTitle-uFJ1Ep",qrCode:"qrCode-zZoQdZ",appBadge:"appBadge-Vbgl8S",phoneInput:"phoneInput-PdUisS",noGrow:"noGrow-lP58Da"}},46518:function(e,t,n){n.d(t,{Z:()=>i});let i={url:"url-r5gI4a",container:"container-KYismR",urlBox:"urlBox-r_0e0F"}},67312:function(e,t,n){n.d(t,{Z:()=>i});let i={buttonContainer:"buttonContainer-tH3LP9"}},24750:function(){},54888:function(e,t,n){n.d(t,{Z:()=>i});let i={ufiContainer:"ufiContainer-LU0_2M",buttonContainer:"buttonContainer-xv9qhQ",button:"button-RzzGHK",icon:"icon-Eo432M",count:"count-hQZHkH",hidden:"hidden-UUUxXN",like:"like-IrcdrZ",active:"active-R2L4nI",heart:"heart-CVM02Z",clickedOnce:"clickedOnce-OWrgAu",isLiked:"isLiked-wLecwK","heart-bounce":"heart-bounce-Lo7g_9",heartBounce:"heart-bounce-Lo7g_9",spark:"spark-Lg1gFb","spark-burst":"spark-burst-g6xVlj",sparkBurst:"spark-burst-g6xVlj",restack:"restack-bjXABC",isRestacked:"isRestacked-UViDCR",restackIcon:"restackIcon-BPrd9M","restack-spin":"restack-spin-XskJfD",restackSpin:"restack-spin-XskJfD",heartWrapper:"heartWrapper-xJzNVs",sparks:"sparks-p7Vzbk"}},22402:function(e,t,n){n.d(t,{Z:()=>i});let i={mention:"mention-LUD0tW",self:"self-ZrvJW0",unstyled:"unstyled-ydOSZ0"}},20063:function(e,t,n){n.d(t,{Z:()=>i});let i={livePill:"livePill-wNMCye"}},50475:function(e,t,n){n.d(t,{Z:()=>i});let i={input:"input-ZGrgg4"}},40484:function(e,t,n){n.d(t,{Z:()=>i});let i={modal:"modal-O8Dx6X",renderOverReactLaagPortal:"renderOverReactLaagPortal-suGnvT",modalBody:"modalBody-qocErY",header:"header-eb1Nyn",title:"title-JUq5uE",description:"description-bku4qR",buttonLeft:"buttonLeft-kZKPjW"}},68742:function(e,t,n){n.d(t,{Z:()=>i});let i={panel:"panel-ulWfet","position-full":"position-full-roTcOT",positionFull:"position-full-roTcOT","position-bottom":"position-bottom-iMkmCS",positionBottom:"position-bottom-iMkmCS","position-default":"position-default-ybuNjD",positionDefault:"position-default-ybuNjD",fullscreenMobile:"fullscreenMobile-uSmZ_w",fullscreenMobileHeight:"fullscreenMobileHeight-ugjrAs",maxFullscreenMobile:"maxFullscreenMobile-xWTeST",panelEnter:"panelEnter-yiVhfS",panelEnterFrom:"panelEnterFrom-zcc_zQ",panelEnterTo:"panelEnterTo-wmKOeP",panelLeave:"panelLeave-W7aUj9",panelLeaveFrom:"panelLeaveFrom-cGPG4g",panelLeaveTo:"panelLeaveTo-xVIwDl"}},36827:function(e,t,n){n.d(t,{Z:()=>i});let i={searchInput:"searchInput-fUS3Nw"}},63584:function(e,t,n){n.d(t,{Z:()=>i});let i={select:"select-nGc13j",focus:"focus-JiAubq",leading:"leading-o7jWpZ",trailing:"trailing-ezPcro",error:"error-L2xDMl",disabled:"disabled-Dbz4PM",wrapper:"wrapper-IwGljo"}},53501:function(e,t,n){n.d(t,{Z:()=>i});let i={input:"input-AalwWx",error:"error-Feisn0",textarea:"textarea-Y7xHxw","font-text":"font-text-O992pd",fontText:"font-text-O992pd","font-monospace":"font-monospace-lad5nM",fontMonospace:"font-monospace-lad5nM"}},93372:function(e,t,n){n.d(t,{h:()=>m});var i=n(58865),a=n(16584),r=n(63623),l=n(95441),o=n(94874),s=n(19081),c=n(10510),d=n(58175);let u={cardBlack:"cardBlack-dn8aTu",cardGreen:"cardGreen-BvacOd",secondaryText:"secondaryText-Kde6jh",valueSmall:"valueSmall-XtHNnD",valueBig:"valueBig-wmUc5E",sparkle1:"sparkle1-RUNGBp",sparkle2:"sparkle2-mQOtay",sparkle3:"sparkle3-We1mnM"};function h(){let e=(0,i._)(["","-Month Paid Pass"]);return h=function(){return e},e}function p(){let e=(0,i._)(["","-Day Paid Pass"]);return p=function(){return e},e}function m(e){let{pub:t,variant:n="avatar",isStatic:i=!1,days:m,gifter:f,value:v}=e,{iString:g,iTemplate:b}=(0,l.M1)();return(0,a.BX)(s.gq,{className:"avatar"===n?u.cardBlack:u.cardGreen,justifyContent:"center",radius:"lg",children:[(0,a.BX)(s.tu,{alignItems:"center",justifyContent:"center",gap:16,children:["cashappcore"===n?(0,a.tZ)(d.xv,{className:u.valueBig,color:"white",font:"display",children:v}):i?(0,a.tZ)(c.CN,{pub:t,size:100,format:"png"}):(null==f?void 0:f.photo_url)?(0,a.tZ)(o.qE,{user:f,size:100}):(0,a.tZ)(c.wk,{pub:t,size:100}),(0,a.BX)(s.tu,{alignItems:"center",gap:4,paddingX:8,children:[(0,a.tZ)(d.xv.H3,{color:"white",weight:"heavy",align:"center",children:t.name}),(0,a.tZ)(d.xv.B3,{className:u.secondaryText,children:m?m%30==0?b(h(),m/30):b(p(),m):g("Free Guest Pass")})]})]}),"avatar"===n&&v&&(0,a.tZ)(d.xv.H4,{className:u.valueSmall,weight:"medium",children:v}),(0,a.tZ)(r.Z,{className:u.sparkle1,size:33,strokeWidth:0}),(0,a.tZ)(r.Z,{className:u.sparkle2,size:27,strokeWidth:0}),(0,a.tZ)(r.Z,{className:u.sparkle3,size:20,strokeWidth:0})]})}},3880:function(e,t,n){n.d(t,{E:()=>m,i:()=>g});var i=n(16584),a=n(30396),r=n(94184),l=n.n(r),o=n(24202),s=n(20888),c=n(27625),d=n(19081),u=n(58175),h=n(91400),p=n(54796);function m(e){let{className:t,assets:n,readOnly:r,isRestack:s,isPreview:c,isDm:u,onClick:h,aspect:m,maxWidth:v,maxHeight:g,children:b,isContained:Z,outline:C,isPermalink:k}=e,y=(0,o.dz)(n),w=y;y.length>6&&(w=w.slice(0,6));let[_,x]=(0,a.eJ)(null),B=(e,t)=>{e.preventDefault(),x({index:t})};return(0,i.BX)(d.hs,{className:l()(p.Z.imageGrid,p.Z["size-".concat(Math.min(y.length,6))],u&&p.Z.dm,c&&p.Z.preview,Z&&p.Z.contained,k&&p.Z.permalink,s&&p.Z.restack,t),gap:4,radius:"md",overflow:"hidden",children:[w.map((e,t)=>{let{src:n,explicit:a,width:l,height:o,id:s}=e,c=y.length-(t+1);return(0,i.tZ)(f,{asset:n,explicit:a,total:y.length,readOnly:r,aspect:m,width:l,height:o,numRemaining:t+1===6&&c>0?c:void 0,maxWidth:v,maxHeight:g,outline:Z||1!==y.length?C:"detail",onClick:r?void 0:e=>{e.defaultPrevented||(e.preventDefault(),h&&h({attachmentId:s,attachmentType:"image"}),B(e,t))},children:b},n)}),!r&&(0,i.tZ)(o.$9,{assets:y,imageViewer:_,setImageViewer:x,readOnly:r})]})}function f(e){let t,n,a,r,{asset:l,explicit:s,onClick:c,total:d,numRemaining:u,readOnly:m,aspect:f,width:g,height:b,outline:Z="none",maxWidth:C=500,maxHeight:k=420,children:y}=e,w=(0,h.XA)();null!=g&&null!=b&&(g/=2,b/=2,t=Math.round(null!=C?Math.min(g,C):g),n=Math.round(b/g*t),1===d&&(t>C?(r=Math.round(n*C/t),a=C):(a=t,r=n),k&&r>k&&(a=Math.round(a*k/r),r=k),w&&(r="auto")));let _=(0,i.BX)(i.HY,{children:[y,u&&(0,i.tZ)(v,{count:u})]});return(0,i.tZ)(o.Z4,{asset:l,explicit:s,onClick:c,readOnly:m,width:a,height:r,maxWidth:a,className:p.Z.gridImage,imageProps:{aspect:f||(1===d?"":"1:1"),smartCrop:1!==d},outline:Z,flex:"grow",radius:"sm",style:{"--aspect-ratio":"".concat(t," / ").concat(n)},children:_})}function v(e){let{count:t}=e;return(0,i.tZ)(d.hs,{className:p.Z.imageCountOverlay,position:"absolute",justifyContent:"center",alignItems:"center",inset:0,children:(0,i.BX)(u.xv.B1,{color:"vibrance-primary",weight:"medium",children:["+",t]})})}function g(e){let{className:t,assets:n}=e,a=(0,o.dz)(n),r=a;a.length>4&&(r=r.slice(0,4));let s=(0,o.iv)(a),{onShow:u}=(0,c.Sl)(s);return(0,i.BX)(d.hs,{className:l()(p.Z.imageGridThumbnail,p.Z["size-".concat(Math.min(a.length,4))],t),gap:2,width:72,height:72,radius:"md",overflow:"hidden",sizing:"border-box",border:"detail",position:"relative",flex:"auto",children:[r.map(e=>{let{src:t}=e;return(0,i.tZ)(b,{asset:t,size:72},t)}),s&&(0,i.tZ)(c.HU,{onShow:u})]})}function b(e){let{asset:t,size:n=64}=e;return(0,i.tZ)(d.hs,{className:p.Z.thumbnailImage,bg:"secondary",overflow:"hidden",children:(0,i.tZ)(s.e,{src:t,maxWidth:n,useRetinaSizing:!0,imageIsFixedWidth:!0,imageProps:{aspect:"1:1",smartCrop:!0},width:n,height:n,loading:"lazy",ignorePicture:!0})})}},36671:function(e,t,n){n.d(t,{Z:()=>r});var i=n(16584),a=n(30396);let r=e=>{let{min:t,max:n,step:r,value:l,onChange:o}=e,s=(0,a.sO)(null),c=(0,a.sO)(null),d=(0,a.I4)(e=>{if(!s.current)return;let{left:i,width:a}=s.current.getBoundingClientRect();o(Math.round((t+Math.max(Math.min(e.clientX-i,a),0)/a*(n-t))/r)*r)},[t,n,r,o]),u=(0,a.I4)(()=>{document.removeEventListener("mousemove",d)},[d]),h=()=>{document.addEventListener("mousemove",d)},p=(l-t)/(n-t)*100;return(0,i.tZ)("div",{className:"range-slider-bhPvhQ",ref:s,onMouseDown:h,onMouseUp:u,onBlur:u,children:(0,i.BX)("div",{className:"range-slider__rail-P4vlSM",children:[(0,i.tZ)("div",{className:"range-slider__track-Q9dod1",style:{width:"".concat(p,"%")}}),(0,i.tZ)("div",{className:"range-slider__thumb-SArpZE",style:{left:"".concat(p,"%")},ref:c,onMouseDown:h})]})})}},72984:function(e,t,n){n.d(t,{k:()=>c});var i=n(7409),a=n(99282),r=n(98848),l=n(16584),o=n(98661),s=n(98914);let c=(0,o.forwardRef)((e,t)=>{var{onClick:n,href:o,localNavigation:c,newTab:d}=e,u=(0,r._)(e,["onClick","href","localNavigation","newTab"]);let h=o?e=>{(!n||(n.call(e.target,e),!e.defaultPrevented))&&(0,s.uX)(o,{event:e,local_navigation:c,newTab:d})}:n;return(0,l.tZ)("button",(0,a._)((0,i._)({tabIndex:0},u),{ref:t,onClick:h}))})},14068:function(e,t,n){n.d(t,{Z:()=>a});var i=n(30396);let a=function(e,t){(0,i.d4)(()=>{function n(n){let i=n.target;e.current&&!e.current.contains(i)&&t()}function i(e){("Escape"===e.key||27===e.keyCode)&&t()}return document.addEventListener("mousedown",n),document.addEventListener("keydown",i),()=>{document.removeEventListener("mousedown",n),document.removeEventListener("keydown",i)}},[e,t])}},81094:function(e,t,n){n.d(t,{Z:()=>o});var i=n(7409),a=n(99282),r=n(16584),l=n(64515);let o=e=>(0,r.BX)(l.l,(0,a._)((0,i._)({},e),{name:"AuthorBadgeIcon",svgParams:{height:15,width:12,viewBox:"0 0 12 15"},children:[(0,r.tZ)("path",{d:"M3.50002 2.58453C3.33335 3.58454 2.50001 5.58455 1 7.08456L6 14.5","stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round"}),(0,r.tZ)("circle",{cx:"6.00019",cy:"8.58503",r:"1.00001","stroke-width":"1"}),(0,r.tZ)("path",{d:"M3 0.5V2.58469H9.00004V0.5","stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round"}),(0,r.tZ)("path",{d:"M8.49998 2.58453C8.66665 3.58454 9.49999 5.58455 11 7.08456L6 14.5","stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round"}),(0,r.tZ)("path",{d:"M6.00012 9.58484L6.00012 14.5849","stroke-width":"1"})]}))},70149:function(e,t,n){n.d(t,{Z:()=>o});var i=n(7409),a=n(99282),r=n(16584),l=n(64515);let o=e=>(0,r.BX)(l.l,(0,a._)((0,i._)({},e),{name:"BannedIcon",svgParams:{height:100,width:100},additionalStaticParams:{preserveAspectRatio:"none"},children:[(0,r.tZ)("circle",{cx:"50",cy:"50",stroke:"#000000",r:46,strokeWidth:"8"}),(0,r.tZ)("line",{x1:"20",y1:"20",x2:"80",y2:"80",stroke:"#000000",strokeWidth:"8"})]}))},13304:function(e,t,n){n.d(t,{Z:()=>o});var i=n(7409),a=n(99282),r=n(16584),l=n(64515);let o=e=>(0,r.BX)(l.l,(0,a._)((0,i._)({},e),{name:"CloseIcon",svgParams:{height:20,width:20,stroke:"#666666"},children:[(0,r.tZ)("path",{d:"M15 5L5 15","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),(0,r.tZ)("path",{d:"M5 5L15 15","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})]}))},53804:function(e,t,n){n.d(t,{Z:()=>s});var i=n(7409),a=n(99282),r=n(98848),l=n(16584),o=n(64515);let s=e=>{var{size:t=20,stroke:n="var(--color-fg-primary)",strokeWidth:s=1.5,className:c}=e,d=(0,r._)(e,["size","stroke","strokeWidth","className"]);return(0,l.tZ)(o.l,(0,a._)((0,i._)({},d),{name:"NoteRestackIcon",svgParams:{viewBox:"0 0 20 20"},width:t,height:t,stroke:n,strokeWidth:s,strokeLinecap:"round",strokeLinejoin:"round",className:c,children:(0,l.tZ)("path",{d:"M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"})}))}},25226:function(e,t,n){n.d(t,{Z:()=>s});var i=n(7409),a=n(99282),r=n(98848),l=n(16584),o=n(64515);let s=e=>{var{size:t=20,stroke:n="var(--color-fg-primary)",strokeWidth:s=1.5}=e,c=(0,r._)(e,["size","stroke","strokeWidth"]);return(0,l.tZ)(o.l,(0,a._)((0,i._)({},c),{name:"NoteShareIcon",svgParams:{viewBox:"0 0 20 20"},width:t,height:t,stroke:n,strokeWidth:s,strokeLinecap:"round",strokeLinejoin:"round",children:(0,l.tZ)("path",{d:"M10.2171 2.2793L10.2171 12.9745M10.2171 2.2793L13.333 4.99984M10.2171 2.2793L7.08301 4.99984M2.49967 10.9925L2.49967 14.1592C2.49967 16.011 4.00084 17.5121 5.85261 17.5121L14.9801 17.5121C16.8318 17.5121 18.333 16.011 18.333 14.1592L18.333 10.9925"})}))}},36181:function(e,t,n){n.d(t,{Z:()=>s});var i=n(7409),a=n(99282),r=n(98848),l=n(16584),o=n(64515);let s=e=>{var{fill:t="white"}=e,n=(0,r._)(e,["fill"]);return(0,l.BX)(o.l,(0,a._)((0,i._)({},n),{name:"PodcastEmbedPauseIcon",svgParams:{width:13,height:16,viewBox:"0 0 13 16",stroke:"none",fill:t},children:[(0,l.tZ)("path",{d:"M4 0H1C0.447715 0 0 0.447715 0 1V15C0 15.5523 0.447715 16 1 16H4C4.55228 16 5 15.5523 5 15V1C5 0.447715 4.55228 0 4 0Z"}),(0,l.tZ)("path",{d:"M11.9998 0H8.99976C8.44747 0 7.99976 0.447715 7.99976 1V15C7.99976 15.5523 8.44747 16 8.99976 16H11.9998C12.552 16 12.9998 15.5523 12.9998 15V1C12.9998 0.447715 12.552 0 11.9998 0Z"})]}))}},18389:function(e,t,n){n.d(t,{Z:()=>s});var i=n(7409),a=n(99282),r=n(98848),l=n(16584),o=n(64515);let s=e=>{var{fill:t="white"}=e,n=(0,r._)(e,["fill"]);return(0,l.tZ)(o.l,(0,a._)((0,i._)({},n),{name:"PodcastEmbedPlayIcon",svgParams:{width:14,height:16,viewBox:"0 0 14 16",stroke:"none",fill:t},children:(0,l.tZ)("path",{d:"M12.8563 6.71384C13.8273 7.29645 13.8273 8.70372 12.8563 9.28632L2.27174 15.637C1.27196 16.2369 1.11076e-07 15.5167 1.62041e-07 14.3508L7.17238e-07 1.64937C7.68203e-07 0.483426 1.27196 -0.236744 2.27174 0.363129L12.8563 6.71384Z"})}))}},27027:function(e,t,n){n.d(t,{Z:()=>o});var i=n(7409),a=n(99282),r=n(16584),l=n(64515);let o=e=>(0,r.BX)(l.l,(0,a._)((0,i._)({},e),{name:"ShareFbIcon",svgParams:{height:24,width:24,stroke:"none"},children:[(0,r.BX)("g",{"clip-path":"url(#clip0_2063_103618)",children:[(0,r.tZ)("circle",{cx:"12",cy:"12",r:"12",fill:"white",stroke:"none"}),(0,r.tZ)("path",{d:"M9.101 23.647V15.667H6.627V12H9.101V10.42C9.101 6.335 10.949 4.442 14.959 4.442C15.36 4.442 15.914 4.484 16.427 4.545C16.8112 4.58454 17.1924 4.64968 17.568 4.74V8.065C17.3509 8.04475 17.133 8.03274 16.915 8.029C16.6707 8.02266 16.4264 8.01966 16.182 8.02C15.475 8.02 14.923 8.116 14.507 8.329C14.2273 8.46931 13.9922 8.68468 13.828 8.951C13.57 9.371 13.454 9.946 13.454 10.703V12H17.373L16.987 14.103L16.7 15.667H13.454V23.912C19.396 23.194 24 18.135 24 12C24 5.373 18.627 0 12 0C5.373 0 0 5.373 0 12C0 17.628 3.874 22.35 9.101 23.647Z",fill:"#0866FF",stroke:"none"})]}),(0,r.tZ)("defs",{children:(0,r.tZ)("clipPath",{id:"clip0_2063_103618",children:(0,r.tZ)("rect",{width:"24",height:"24",fill:"white",stroke:"none"})})})]}))},55232:function(e,t,n){n.d(t,{Z:()=>o});var i=n(7409),a=n(99282),r=n(16584),l=n(64515);let o=e=>(0,r.BX)(l.l,(0,a._)((0,i._)({},e),{name:"ShareLinkedinIcon",svgParams:{height:24,width:24,stroke:"none"},children:[(0,r.tZ)("g",{"clip-path":"url(#clip0_2099_103632)"}),(0,r.tZ)("rect",{x:"1",y:"1",width:"22",height:"22",fill:"white",stroke:"none"}),(0,r.tZ)("path",{d:"M20.447 20.452H16.893V14.883C16.893 13.555 16.866 11.846 15.041 11.846C13.188 11.846 12.905 13.291 12.905 14.785V20.452H9.351V9H12.765V10.561H12.811C13.288 9.661 14.448 8.711 16.181 8.711C19.782 8.711 20.448 11.081 20.448 14.166L20.447 20.452ZM5.337 7.433C4.193 7.433 3.274 6.507 3.274 5.368C3.274 4.23 4.194 3.305 5.337 3.305C6.477 3.305 7.401 4.23 7.401 5.368C7.401 6.507 6.476 7.433 5.337 7.433ZM7.119 20.452H3.555V9H7.119V20.452ZM22.225 0H1.771C0.792 0 0 0.774 0 1.729V22.271C0 23.227 0.792 24 1.771 24H22.222C23.2 24 24 23.227 24 22.271V1.729C24 0.774 23.2 0 22.222 0H22.225Z",fill:"#0A66C2",stroke:"none"}),(0,r.tZ)("defs",{children:(0,r.tZ)("clipPath",{id:"clip0_2099_103632",children:(0,r.tZ)("rect",{width:"24",height:"24",fill:"white",style:"fill:white;fill-opacity:1;"})})})]}))},90443:function(e,t,n){n.d(t,{Z:()=>s});var i=n(7409),a=n(99282),r=n(98848),l=n(16584),o=n(64515);let s=e=>{var{size:t=24,fill:n="var(--color-fg-primary)"}=e,s=(0,r._)(e,["size","fill"]);return(0,l.tZ)(o.l,(0,a._)((0,i._)({},s),{name:"HackerNewsIcon",svgParams:{viewBox:"0 0 20 20"},width:t,height:t,fill:n,stroke:"none",children:(0,l.tZ)("path",{stroke:"none","fill-rule":"evenodd","clip-rule":"evenodd",d:"M0 2C0 0.895431 0.895431 0 2 0H18C19.1046 0 20 0.895431 20 2V18C20 19.1046 19.1046 20 18 20H2C0.895431 20 0 19.1046 0 18V2ZM9.32607 11.3083L5.8932 4.87747H7.46207L9.4814 8.9472C9.51247 9.01969 9.54871 9.09477 9.59013 9.17243C9.63156 9.2501 9.6678 9.33036 9.69887 9.4132C9.71958 9.44427 9.73511 9.47274 9.74547 9.49863C9.75582 9.52452 9.76618 9.54782 9.77653 9.56853C9.82831 9.67209 9.87491 9.77305 9.91633 9.87143C9.95776 9.96981 9.994 10.0604 10.0251 10.1433C10.1079 9.96722 10.1985 9.77823 10.2969 9.5763C10.3953 9.37437 10.4962 9.16467 10.5998 8.9472L12.6502 4.87747H14.1103L10.6464 11.3859V15.5333H9.32607V11.3083Z"})}))}},82653:function(e,t,n){n.d(t,{Z:()=>s});var i=n(7409),a=n(99282),r=n(98848),l=n(16584),o=n(64515);let s=e=>{var{size:t=24,fill:n="var(--color-fg-primary)"}=e,s=(0,r._)(e,["size","fill"]);return(0,l.tZ)(o.l,(0,a._)((0,i._)({},s),{name:"MailIcon",svgParams:{viewBox:"0 0 20 20"},width:t,height:t,fill:n,children:(0,l.tZ)("path",{stroke:"none",d:"M9.9958 11.0646C10.2693 11.0646 10.5346 10.9569 10.7915 10.7248L19.0717 3.431C18.6241 3.13262 18.1102 3 17.3974 3H2.60257C1.88976 3 1.37587 3.13262 0.920011 3.431L9.20011 10.7248C9.46534 10.9569 9.73057 11.0646 9.9958 11.0646ZM0.215499 15.9465L6.34893 9.82137L0.198922 4.40075C0.107749 4.5748 0 4.99751 0 5.56941V14.7199C0 15.2503 0.0828842 15.6316 0.215499 15.9465ZM2.35391 17.2892H17.646C18.2511 17.2892 18.7235 17.14 19.0385 16.9245L12.731 10.6171L11.5209 11.6945C11.0402 12.1173 10.518 12.3328 9.9958 12.3328C9.48197 12.3328 8.95975 12.1173 8.47905 11.6945L7.26894 10.6171L0.961455 16.9245C1.27642 17.14 1.74057 17.2892 2.35391 17.2892ZM19.7844 15.9465C19.9088 15.6316 20 15.2503 20 14.7199V5.56941C20 4.99751 19.8922 4.5748 19.8011 4.40075L13.651 9.82137L19.7844 15.9465Z"})}))}},77559:function(e,t,n){n.d(t,{Z:()=>s});var i=n(7409),a=n(99282),r=n(98848),l=n(16584),o=n(64515);let s=e=>{var{size:t=24,fill:n="var(--color-fg-primary)"}=e,s=(0,r._)(e,["size","fill"]);return(0,l.tZ)(o.l,(0,a._)((0,i._)({},s),{name:"PinterestIcon",svgParams:{viewBox:"0 0 20 20"},width:t,height:t,fill:n,children:(0,l.tZ)("path",{stroke:"none",d:"M10 0C4.47656 0 0 4.47656 0 10C0 14.2383 2.63672 17.8555 6.35547 19.3125C6.26953 18.5195 6.1875 17.3086 6.39062 16.4453C6.57422 15.6641 7.5625 11.4766 7.5625 11.4766C7.5625 11.4766 7.26172 10.8789 7.26172 9.99219C7.26172 8.60156 8.06641 7.5625 9.07031 7.5625C9.92187 7.5625 10.3359 8.20312 10.3359 8.97266C10.3359 9.83203 9.78906 11.1133 9.50781 12.3008C9.27344 13.2969 10.0078 14.1094 10.9883 14.1094C12.7656 14.1094 14.1328 12.2344 14.1328 9.53125C14.1328 7.13672 12.4141 5.46094 9.95703 5.46094C7.11328 5.46094 5.44141 7.59375 5.44141 9.80078C5.44141 10.6602 5.77344 11.582 6.1875 12.082C6.26953 12.1797 6.28125 12.2695 6.25781 12.3672C6.18359 12.6836 6.01172 13.3633 5.98047 13.5C5.9375 13.6836 5.83594 13.7227 5.64453 13.6328C4.39453 13.0508 3.61328 11.2266 3.61328 9.75781C3.61328 6.60156 5.90625 3.70703 10.2188 3.70703C13.6875 3.70703 16.3828 6.17969 16.3828 9.48438C16.3828 12.9297 14.2109 15.7031 11.1953 15.7031C10.1836 15.7031 9.23047 15.1758 8.90234 14.5547C8.90234 14.5547 8.40234 16.4648 8.28125 16.9336C8.05469 17.8008 7.44531 18.8906 7.03906 19.5547C7.97656 19.8438 8.96875 20 10 20C15.5234 20 20 15.5234 20 10C20 4.47656 15.5234 0 10 0Z"})}))}},82695:function(e,t,n){n.d(t,{Z:()=>s});var i=n(7409),a=n(99282),r=n(98848),l=n(16584),o=n(64515);let s=e=>{var{size:t=24,fill:n="var(--color-fg-primary)"}=e,s=(0,r._)(e,["size","fill"]);return(0,l.tZ)(o.l,(0,a._)((0,i._)({},s),{name:"RedditIcon",svgParams:{viewBox:"0 0 20 20"},width:t,height:t,fill:n,children:(0,l.tZ)("path",{stroke:"none","fill-rule":"evenodd","clip-rule":"evenodd",d:"M20 10C20 15.5228 15.5228 20 10 20C4.47715 20 0 15.5228 0 10C0 4.47715 4.47715 0 10 0C15.5228 0 20 4.47715 20 10ZM15.2049 8.53825C16.0119 8.53825 16.6669 9.19322 16.6669 10.0002C16.6669 10.5967 16.3043 11.1113 15.8248 11.3453C15.8482 11.4856 15.8599 11.626 15.8599 11.778C15.8599 14.0236 13.2517 15.8365 10.0236 15.8365C6.79553 15.8365 4.18734 14.0236 4.18734 11.778C4.18734 11.626 4.19904 11.4739 4.22243 11.3336C3.70781 11.0997 3.35693 10.5967 3.35693 10.0002C3.35693 9.19322 4.0119 8.53825 4.81892 8.53825C5.20489 8.53825 5.56746 8.70199 5.82477 8.9476C6.83062 8.21076 8.22243 7.75462 9.77799 7.70784L10.5148 4.22246C10.5382 4.15228 10.5733 4.0938 10.6318 4.05871C10.6903 4.02363 10.7604 4.01193 10.8306 4.02363L13.2517 4.53825C13.4154 4.18737 13.7663 3.95345 14.1756 3.95345C14.7487 3.95345 15.2166 4.42129 15.2166 4.99439C15.2166 5.56749 14.7487 6.03532 14.1756 6.03532C13.6142 6.03532 13.1581 5.59088 13.1347 5.04117L10.971 4.58503L10.3043 7.70784C11.8248 7.76632 13.2049 8.23415 14.199 8.9476C14.4563 8.69029 14.8072 8.53825 15.2049 8.53825ZM7.70781 10.0002C7.13471 10.0002 6.66687 10.4681 6.66687 11.0412C6.66687 11.6143 7.13471 12.0821 7.70781 12.0821C8.28091 12.0821 8.74875 11.6143 8.74875 11.0412C8.74875 10.4681 8.28091 10.0002 7.70781 10.0002ZM10.0119 14.5499C10.4096 14.5499 11.7663 14.5032 12.4797 13.7897C12.585 13.6844 12.585 13.5207 12.5031 13.4037C12.3979 13.2985 12.2224 13.2985 12.1172 13.4037C11.661 13.8482 10.7137 14.0119 10.0236 14.0119C9.33354 14.0119 8.37448 13.8482 7.93003 13.4037C7.82477 13.2985 7.64933 13.2985 7.54407 13.4037C7.4388 13.509 7.4388 13.6844 7.54407 13.7897C8.24582 14.4915 9.61424 14.5499 10.0119 14.5499ZM11.2517 11.0412C11.2517 11.6143 11.7195 12.0821 12.2926 12.0821C12.8657 12.0821 13.3335 11.6143 13.3335 11.0412C13.3335 10.4681 12.8657 10.0002 12.2926 10.0002C11.7195 10.0002 11.2517 10.4681 11.2517 11.0412Z"})}))}},94499:function(e,t,n){n.d(t,{Z:()=>o});var i=n(7409),a=n(99282),r=n(98848),l=n(16584);let o=e=>{var{children:t,href:n,onClick:o,newTab:s}=e,c=(0,r._)(e,["children","href","onClick","newTab"]);return(0,l.tZ)("a",(0,a._)((0,i._)({role:"button",tabIndex:0,href:null!=n?n:"javascript:void(0)"},s&&{target:"_blank",rel:"noopener noreferrer"},o&&{onClick:e=>{e.stopPropagation(),o(e)}},c),{children:t}))}},86092:function(e,t,n){n.d(t,{FQ:()=>z,EB:()=>O,_0:()=>U});var i=n(27412),a=n(7409),r=n(99282),l=n(98848),o=n(58865),s=n(16584),c=n(6400),d=n(30396),u=n(94184),h=n.n(u),p=n(14293),m=n.n(p),f=n(50486),v=n(19237),g=n(98914),b=n(15771),Z=n(60308);let C=e=>{let{photoUrl:t,newPhotoUrl:n,newPhotoOrientation:i,updatePhoto:a}=e,r=(0,d.sO)(null),l=async()=>{var e;let t,n;if(!r.current)return;let i=null===(e=r.current.files)||void 0===e?void 0:e[0];if(r.current.value="",!i){a({newPhotoUrl:null,newPhotoOrientation:null});return}try{t=await (0,g.Zk)(i)}catch(e){console.error("Failed to get data URL from file:",e),alert(e.message);return}try{n=await (0,g.oA)(i)}catch(e){console.error("Failed to extract EXIF data from file:",e)}a({newPhotoUrl:t,newPhotoOrientation:n})};return(0,s.BX)("div",{className:"profile-photo-wrap",children:[t&&(0,s.tZ)("div",{className:"profile-photo-image",style:{backgroundImage:"url(".concat(n||(0,Z.zF4)(t,144),")"),transform:(0,g.P_)(null!=i?i:null)}}),!t&&(0,s.tZ)("div",{className:"profile-photo-image",style:{backgroundImage:"url(".concat((0,Z.zF4)(Z.zUJ,144),")"),transform:(0,g.P_)(null!=i?i:null)}}),(0,s.BX)(b.zx,{onClick:()=>{if((0,g.w1)()||(0,g.vU)()){var e;null===(e=r.current)||void 0===e||e.click()}},children:[(0,s.tZ)("input",{ref:r,type:"file",name:"photo",accept:"image/*",onChange:l}),(0,s.tZ)("div",{className:"add-photo-fab",onClick:e=>{var t;e.preventDefault(),null===(t=r.current)||void 0===t||t.click()},children:(0,s.tZ)(v.Z,{size:20,color:"var(--color-light-primary)"})})]})]})};var k=n(20253),y=n(93666),w=n(33804),_=n(57391),x=n(95441),B=n(68833),N=n(48980),L=n(71068),I=n(82402),P=n(19081),M=n(10510),S=n(17688),E=n(58175),X=n(57641),F=n(70408);let R={checkbox:"checkbox-jbvy_H",tosCheckboxContainer:"tosCheckboxContainer-vfMi_Y"};function T(){let e=(0,o._)([""," on Substack"]);return T=function(){return e},e}let H=e=>{let{sub:t,onSetVisibility:n}=e,i=t.publication;return(0,s.BX)("div",{className:"edit-sub-visibility-row",children:[(0,s.BX)("div",{className:"left",children:[(0,s.tZ)(M.wk,{pub:i}),(0,s.tZ)("span",{children:i.name})]}),(0,s.tZ)("div",{className:"right",children:(0,s.tZ)(f.p,{checked:"public"===t.visibility,onChange:()=>n("public"===t.visibility?"private":"public")})})]})},z=e=>{let{profile:t,onFinalizeVisibility:n,onSetVisibility:i,source:l}=e,{iString:o}=(0,x.M1)();if(!t)return null;let c=t.subscriptions.every(e=>{let{visibility:t}=e;return"public"===t}),d=e=>n=>{i(t.subscriptions.reduce((t,i)=>{let{visibility:l,publication:o}=i;return(0,r._)((0,a._)({},t),{[o.id]:o.id===e.id?n:l})},{})),(0,B.j)(B.FP.PROFILE_EDITED,{type:"read_visibility_toggled",visibility:n})},u=(0,s.tZ)("button",{className:"small",onClick:()=>{i(t.subscriptions.reduce((e,t)=>{let{publication:n}=t;return(0,r._)((0,a._)({},e),{[n.id]:c?"private":"public"})},{})),(0,B.j)(B.FP.PROFILE_EDITED,{type:"visibility_toggled_all",for:"reads",count:t.subscriptions.length})},children:o(c?"Hide all":"Show all")});return(0,s.BX)("div",{className:"edit-sub-visibility-form",children:[(0,s.tZ)("div",{className:"bulk-action-row",children:u}),(0,s.tZ)("div",{className:"edit-sub-visibility-frame",children:t.subscriptions.map(e=>(0,s.tZ)(H,{sub:e,onSetVisibility:d(e.publication),source:l}))}),(0,s.tZ)("div",{className:"modal-ctas",children:(0,s.tZ)(b.zx,{priority:"primary",onClick:n,children:o("Done")})})]})};class V extends c.Component{componentDidMount(){if(this.props.autoSubmit){var e,t,n;this.isComplete()?null===(e=this.formRef.current)||void 0===e||e.handleSubmit():null===(t=(n=this.props).onAutoSubmitFailed)||void 0===t||t.call(n)}}isComplete(){let{user:e,needsPhoto:t}=this.props;return e&&!e.is_magic&&e.name&&(!t||e.photo_url)}async onFileInputChanged(){var e,t;let n,i;let a=null===(t=this.fileInput)||void 0===t?void 0:null===(e=t.files)||void 0===e?void 0:e[0];if(this.fileInput&&(this.fileInput.value=""),!a){this.setState({newPhotoUrl:null,newPhotoOrientation:null});return}try{n=await (0,g.Zk)(a)}catch(e){console.error("Failed to get data URL from file:",e),alert(e.message);return}try{i=await (0,g.oA)(a)}catch(e){console.error("Failed to extract EXIF data from file:",e)}this.setState({newPhotoUrl:n,newPhotoOrientation:i})}onError(e){var t,n,i;this.props.autoSubmit&&!this.state.autoSubmitFailed&&(this.setState({autoSubmitFailed:!0}),null===(n=(i=this.props).onAutoSubmitFailed)||void 0===n||n.call(i)),this.setState({sentLoginEmail:!1}),(null===(t=e.response)||void 0===t?void 0:t.status)===401&&this.sendLoginEmail()}async createDefaultPublication(e,t){let{iTemplate:n}=this.props;try{let i=await (0,N.rd)("/api/v1/publication/suggestion"),a=t||n(T(),e);await (0,N.rd)("/api/v1/publication",{method:"post",json:{name:e,subdomain:i.subdomain,hero_text:a,tos:!0}})}catch(e){(0,B.j)(B.FP.DEFAULT_PUBLICATION_CREATION_FAILED),console.warn("couldn't set up a default publication",e)}}async sendLoginEmail(){let e=this.state.newEmail||this.props.freeSignupEmail;if(!this.state.loading&&e){this.setState({loading:!0});try{await (0,N.rd)("/api/v1/email-login",{method:"post",json:{email:e,redirect:document.location.href}}),this.setState({sentLoginEmail:!0})}catch(e){console.error("Failed send login email:",e)}this.setState({loading:!1})}}render(e,t){let{className:n,user:i,numVisibleSubscriptions:a,numSubscriptions:r,freeSignup:l,freeSignupEmail:o,initialPhotoUrl:c,needsPhoto:d,optionalPhoto:u,showHandle:p=!0,token:f,text:v,onSuccess:g,prepareData:Z,pageTitle:y,primaryEligiblePublications:_,isPostInvite:x,complete:B,profileExists:N,onSkip:T,onEditReadVisibility:H,barebones:z,onEditRecommendations:V,numRecommendationsToMake:U,noSubscribeCta:O,style:W,iString:j,iPlural:D,showSocialHandle:A,pub:G}=e,{newPhotoUrl:J,newPhotoOrientation:q,newName:Y,newHandle:K,newEmail:Q,loading:$,sentLoginEmail:ee,sentAccountConfirmationEmail:et,newBio:en,createPublication:ei,selectedSocial:ea,selectedSocialHandle:er,tosAccepted:el,subscribeToNewsletter:eo}=t,es=J||c||(0,F.ln)(i,{}),ec="string"==typeof y?y:j(this.isComplete()?"Update your profile":"Create your profile"),ed=Y||i&&i.name||"",eu=K||(null==i?void 0:i.handle)||"",eh="string"==typeof en?en:i&&i.bio||"",ep=async(e,t)=>{if(e.body.emailConfirmationRequired){this.setState({sentAccountConfirmationEmail:!0});return}ei&&await this.createDefaultPublication(ed,eh),g(e,t)};return(0,s.BX)("div",{className:h()("profile-updater",n),style:W,children:[(0,s.tZ)("h2",{className:"page-title profile-updater-title",children:ec}),(es||d||u)&&(0,s.tZ)(C,{photoUrl:es,newPhotoUrl:J,newPhotoOrientation:q,updatePhoto:e=>{let{newPhotoOrientation:t,newPhotoUrl:n}=e;return this.setState({newPhotoOrientation:t,newPhotoUrl:n})}}),(0,s.BX)(k.ZP,{ref:this.formRef,method:"put",action:"/api/v1/user/profile",prepareData:Z,onSuccess:ep,onError:e=>this.onError(e),noInlineErrors:!0,loading:$,autoLock:!0,children:[(0,s.tZ)("label",{htmlFor:"name",children:j("Name (Required)")}),G?(0,s.tZ)("input",{type:"hidden",name:"pub_id",value:G.id}):null,(0,s.tZ)("input",{autoFocus:!0,type:"text",className:"profile-name",placeholder:j("Type your name..."),name:"name",id:"name",value:ed,onInput:e=>{this.setState({newName:e.target.value})}}),p&&(0,s.BX)(s.HY,{children:[(0,s.tZ)("label",{htmlFor:"handle",children:j("Handle")}),(0,s.tZ)("input",{type:"text",className:"profile-name",placeholder:j("Type your handle..."),name:"handle",id:"handle",value:eu,onInput:e=>{this.setState({newHandle:e.target.value})}})]}),!z&&(0,s.tZ)("label",{htmlFor:"bio",children:"Bio"}),!z&&(0,s.tZ)("textarea",{className:"profile-bio",placeholder:j("Say something about yourself..."),name:"bio",id:"bio",value:eh,onInput:e=>{this.setState({newBio:e.target.value})}}),A&&(0,s.BX)(P.tu,{gap:8,children:[(0,s.tZ)("label",{htmlFor:"socialNetwork",children:j("Where else can you be found? (optional)")}),(0,s.BX)(P.gq,{gap:8,children:[(0,s.BX)(S.i,{name:"socialNetwork",value:ea,onChange:e=>{this.setState({selectedSocial:e.target.value})},children:[(0,s.tZ)(S.d,{children:j("Select a social network")}),(0,s.tZ)("option",{value:"twitter",children:j("Twitter")}),(0,s.tZ)("option",{value:"instagram",children:j("Instagram")}),(0,s.tZ)("option",{value:"tiktok",children:j("Tiktok")}),(0,s.tZ)("option",{value:"linkedin",children:j("LinkedIn")}),(0,s.tZ)("option",{value:"youtube",children:j("Youtube")})]}),(0,s.tZ)("input",{style:{height:46},type:"text",className:"profile-social",placeholder:j("@yourhandle"),name:"socialHandle",value:er,onInput:e=>{this.setState({selectedSocialHandle:e.target.value})}})]})]}),x&&(0,s.tZ)("input",{type:"hidden",name:"needs_bio",value:"true"}),x&&(0,s.tZ)("div",{className:"bio-guest-tip",children:j("Tip: this will be shown at the bottom of your guest post")}),x&&_&&(null==i?void 0:i.has_publication)&&_.length>1&&(0,s.BX)(s.HY,{children:[(0,s.tZ)("label",{children:j("Publication to display")}),(0,s.tZ)("div",{className:"primary-publication-selector",children:_.map((e,t)=>{var n,i;return(0,s.BX)("label",{className:"publication-selector-row",for:"primary-radio-".concat(e.id),children:[(0,s.tZ)("input",{id:"primary-radio-".concat(e.id),type:"radio",name:"primary_publication_user_id",value:e.id,checked:0===t}),(0,s.tZ)(M.wk,{pub:e.publication,size:28}),(0,s.tZ)("div",{className:"primary-publication-name",children:null!==(i=null===(n=e.publication)||void 0===n?void 0:n.name)&&void 0!==i?i:""})]})})})]}),(!i||i.is_magic)&&!o&&!x&&(0,s.BX)(s.HY,{children:[(0,s.tZ)("label",{htmlFor:"email",children:"Email (Required)"}),(0,s.tZ)("input",{type:"email",className:"profile-email",placeholder:"Your email…",name:"email",value:null!=Q?Q:void 0,onInput:e=>{this.setState({newEmail:e.target.value})}})]}),!O&&!(i&&(i.is_subscribed||i.is_free_subscribed)||l)&&(0,s.BX)(P.gq,{as:"label",className:R.checkbox,gap:8,children:[(0,s.tZ)(w.w,{children:(0,s.tZ)(I.X,{size:"sm",name:"free_signup",defaultChecked:!0,checked:eo,onChange:e=>this.setState({subscribeToNewsletter:e})})}),(0,s.tZ)(P.tu,{children:(0,s.tZ)(E.xv.B3,{as:"span",children:j("Subscribe to the newsletter")})})]}),x&&!(null==i?void 0:i.has_publication)&&(0,s.BX)("label",{className:"profile-signup-checkbox",children:[(0,s.tZ)("input",{type:"checkbox",name:"create_publication",id:"create-publication-checkbox",checked:ei,onChange:e=>{this.setState({createPublication:e.target.checked})}}),j("Create a Substack publication for me")]}),(0,s.tZ)("input",{type:"hidden",name:"confirmation_redirect_pathname",value:document.location.pathname}),(0,s.tZ)("input",{type:"hidden",name:"photo_url",value:null!=es?es:void 0}),(0,s.tZ)("input",{type:"hidden",name:"user_id",value:(null==i?void 0:i.id)||""}),(0,s.tZ)("input",{type:"hidden",name:"needs_photo",value:!!d}),(0,s.tZ)("input",{type:"hidden",name:"token",value:f}),B&&(0,s.tZ)("input",{type:"hidden",name:"complete",value:!0}),(0,s.BX)("div",{id:"error-container",children:[ee&&(0,s.BX)(E.xv,{as:"div",translated:!0,className:"error other-error",children:["If you have an account with us, we've sent an email to ",(0,s.tZ)("b",{children:I18N.p(null!=Q?Q:"")})," with a link that you can use to sign in."]}),et&&(0,s.tZ)("div",{className:"error other-error",children:j("We have sent you a confirmation email. Please check your inbox before continuing.")})]}),(0,s.BX)("p",{className:h()("left",{hidden:!("number"==typeof a&&!m()(r)&&r>0&&H)}),children:[N?D("1 subscription is displayed on your profile","%1 subscriptions are displayed on your profile",a):D("1 subscription will be displayed on your profile","%1 subscriptions will be displayed on your profile",a)," ","(",(0,s.tZ)("a",{onClick:H,children:j("edit")}),")"]}),!N&&!!V&&!m()(U)&&U>0&&(0,s.BX)("p",{className:"left second",children:[D("1 recommendation will be made on your publication","%1 recommendations will be made on your publication",U)," ","(",(0,s.tZ)("a",{onClick:V,children:"edit"}),")"]}),(0,s.BX)("div",{className:"modal-ctas",children:[(0,s.tZ)("p",{className:h()("skip",{hidden:!T}),children:(0,s.tZ)("a",{className:"small",onClick:T||(()=>{}),children:j("Skip for now")})}),!i&&(0,s.tZ)(w.w,{children:(0,s.tZ)(L.xu,{className:R.tosCheckboxContainer,children:(0,s.tZ)(X.O,{checked:el,onCheckboxChange:e=>this.setState({tosAccepted:e}),style:{display:"flex"}})})}),(0,s.tZ)(b.zx,{priority:"primary",disabled:!i&&!el,type:"submit",children:v||j("Save")})]})]})]})}constructor(e,t){var n;super(e,t),(0,i._)(this,"formRef",void 0),(0,i._)(this,"fileInput",void 0),this.formRef=(0,c.createRef)();let a=!!e.isPostInvite||!!e.profileExists;this.state={newName:null,newHandle:null,newBio:null,newEmail:e.user&&e.user.is_magic?e.user.email:null,selectedSocial:"instagram",createPublication:!!e.isPostInvite&&!(null===(n=e.user)||void 0===n?void 0:n.has_publication),tosAccepted:a,subscribeToNewsletter:!0}}}let U=(0,_.f9)((0,x.fz)(V));class O extends y.p{renderChildren(){let e=this.props,{ref:t,onBeforeClose:n,contributor:i}=e,o=(0,l._)(e,["ref","onBeforeClose","contributor"]);return(0,s.tZ)("div",{className:"profile-updater-modal",children:i?(0,s.tZ)(W,(0,r._)((0,a._)({},o),{user:o.user,pub:o.pub,profile:o.profile,onSuccess:()=>this.close(!0)})):(0,s.tZ)(U,(0,r._)((0,a._)({},o),{onSuccess:()=>this.close(!0)}))})}}let W=e=>{let{profile:t,user:n,pub:i,onSuccess:a,isOwnProfile:r}=e,l=(0,d.sO)(null),{iString:o}=(0,x.M1)(),[c,u]=(0,d.eJ)(null),[h,p]=(0,d.eJ)(null),m=c||t&&t.photo_url,[f,v]=(0,d.eJ)(t.name),[C,y]=(0,d.eJ)(t.bio),w=async()=>{var e;let t,n;let i=(null===(e=l.current)||void 0===e?void 0:e.files)?l.current.files[0]:null;if(l.current&&(l.current.value=""),!i){u(null),p(null);return}try{t=await (0,g.Zk)(i)}catch(e){console.error("Failed to get data URL from file:",e),alert(e.message);return}try{n=await (0,g.oA)(i)}catch(e){console.error("Failed to extract EXIF data from file:",e)}u(t),p(n)};return(0,s.BX)("div",{className:"profile-updater",children:[(0,s.tZ)("h2",{className:"page-title profile-updater-title",children:"Edit contributor profile"}),(0,s.BX)("div",{className:"profile-photo-wrap",children:[m&&(0,s.tZ)("div",{className:"profile-photo-image",style:{backgroundImage:"url(".concat(c||(0,Z.zF4)(t.photo_url,144),")"),transform:(0,g.P_)(h)}}),(0,s.BX)(b.zx,{priority:"secondary",onClick:()=>{if((0,g.w1)()||(0,g.vU)()){var e;null===(e=l.current)||void 0===e||e.click()}},children:[!m&&o("Set photo"),(0,s.tZ)("input",{ref:l,type:"file",name:"photo",accept:"image/*",onChange:()=>w()})]})]}),(0,s.BX)(k.ZP,{method:"patch",action:"/api/v1/publication/users/".concat(t.id),onSuccess:a,autoLock:!0,children:[(0,s.tZ)("input",{type:"text",className:"profile-name",placeholder:"Contributor's name…",name:"name",value:f,onInput:e=>{v(e.target.value)}}),(0,s.tZ)("textarea",{className:"profile-bio",placeholder:"Contributor's bio…",name:"bio",value:C,onInput:e=>{y(e.target.value)}}),(0,s.tZ)("input",{type:"hidden",name:"photo_url",value:m}),(0,s.BX)("span",{className:"notice",children:[(0,s.BX)(E.xv,{translated:!0,as:"p",children:[(0,s.tZ)("b",{children:"Note:"})," This is a contributor profile, viewable by ",I18N.p(i.name),"'s readers."]}),r&&(0,s.BX)(E.xv,{translated:!0,as:"p",children:["You may also edit your"," ",(0,s.tZ)("a",{native:!0,href:"".concat((0,Z.NNq)(n)),children:"personal profile"}),"."]})]}),(0,s.tZ)(b.zx,{priority:"primary",type:"submit",children:o("Update profile")})]})]})}},86603:function(e,t,n){n.d(t,{Z:()=>a});var i=n(30396);function a(){let{root:e=null,threshold:t=0,rootMargin:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if("undefined"==typeof window||"undefined"==typeof IntersectionObserver)return[null,null];let[a,r]=(0,i.eJ)(null),[l,o]=(0,i.eJ)(null),s=(0,i.sO)(new IntersectionObserver(e=>{let[t]=e;return r(t)},{root:e,threshold:t,rootMargin:n}));return(0,i.d4)(()=>{var e;let t=(null==l?void 0:null===(e=l.base)||void 0===e?void 0:e.addEventListener)?l.base:(null==l?void 0:l.addEventListener)?l:null,{current:n}=s;return n.disconnect(),t&&n.observe(t),()=>n.disconnect()},[l]),[o,a]}},75596:function(e,t,n){n.d(t,{B:()=>i});function i(e,t){var n;let i=[],a=null!==(n=null==t?void 0:t.max_line_width)&&void 0!==n?n:84,r=new Set(".!?,;:");return e.forEach(e=>{let t=!0,n=e.start,l=e.end,o=e.words,s=[],c=0;if(e.text.length<=1.25*a){i.push(e);return}let d=()=>{var e,a,r,l;let o=t?n:null!==(r=null===(e=s[0])||void 0===e?void 0:e.start)&&void 0!==r?r:n,c=null!==(l=null===(a=s[s.length-1])||void 0===a?void 0:a.end)&&void 0!==l?l:o+.1,d=s.map(e=>e.word.trim()).join(" ");i.push({start:o,end:c,text:d,words:s})};if(o.forEach(e=>{var n;let i=e.word,l=i.length;if((null!==(n=i[i.length-1])&&void 0!==n?n:"")in r){s.push(e),d(),t=!1,s=[],c=0;return}c+l>a?(s.length&&(d(),t=!1),s=[e],c=l):(s.push(e),c+=l)}),s.length){var u,h;i.push({start:null!==(h=null===(u=s[0])||void 0===u?void 0:u.start)&&void 0!==h?h:n,end:l,text:s.map(e=>e.word).join(" ").trim(),words:s})}}),i}},75081:function(e,t,n){var i=n(7409),a=n(98848),r=n(16584),l=n(30396),o=n(94184),s=n.n(o),c=n(60826),d=n(82621),u=n(95441),h=n(75905);n(90099),n(68833);var p=n(58175),m=n(60308),f=n(84864),v=n(47929);let g={footer:"footer-ZM59BM",footerSection:"footerSection-EHR0jG",divider:"divider-miZWsI",meta:"meta-B2bqa5"};function b(){let{iString:e,language:t}=(0,u.M1)(),n="".concat((0,m.ZJn)(),"/img/email/generic-app-button").concat("en"!==t?"-".concat(t):"",".png");return(0,r.tZ)("a",{href:(0,m.D4e)({utm_campaign:v.VX.appMarketing,utm_content:v.fZ.emailFooterButton}),children:(0,r.tZ)(C,{alt:e("Get the app"),src:n,pixelRatio:3,width:{en:131,es:135,it:135,fr:135,de:147,pt:135,"pt-br":135}[t],height:40})})}function Z(){let{iString:e,language:t}=(0,u.M1)(),n="".concat((0,m.ZJn)(),"/img/email/publish-button").concat("en"!==t?"-".concat(t):"",".png");return(0,r.tZ)("a",{href:c.W.START_WRITING_URL,children:(0,r.tZ)(C,{alt:e("Start writing"),src:n,pixelRatio:3,width:{en:135,es:182,it:164,fr:184,de:203,pt:184,"pt-br":184}[t],height:40})})}function C(e){let t;var{src:n,pixelRatio:o,width:s}=e,c=(0,a._)(e,["src","pixelRatio","width"]);let{isAmp:u}=(0,l.qp)(h.E);if("undefined"==typeof URL)t=null;else{let e;try{e=new URL(n)}catch(t){e=new URL((0,m.ZJn)()+n)}let i=Array(o).fill(0).map((t,i)=>{if(0===i)return(0,m.zF4)(n,s);let a=new URL(e),[r,l]=a.pathname.split("."),o=i+1;return a.pathname="".concat(r,"@").concat(o,"x.").concat(l),(0,m.zF4)(a.toString(),s*o)});u?n=i[i.length-1]:(n=i[1]||i[0],t=i.map((e,t)=>0===t?e:"".concat(e," ").concat(t+1,"x")).join(", "))}return(0,r.tZ)(d.Z,(0,i._)({src:n,srcset:t,width:s},c))}},66211:function(e,t,n){n(16584);var i=n(6400);n(98661),n(30396),n(94184),(0,i.createContext)(void 0).displayName="PostContextForEmail",n(14952),n(75905),n(15165),n(66436),n(6070),n(84864),n(24750),n(75081)},15165:function(e,t,n){n(16584),n(94184),n(98012)},66436:function(e,t,n){n(16584),n(94184),n(88216),n(41193),n(90099),n(98012),n(60308),n(63651)},37663:function(e,t,n){n.d(t,{T:()=>i});function i(e){var t;return null!==(t=({embed:"post","feed-sidebar":"feed","note-related":"feed",permalink:"feed","post-embed":"post","post-page-restacks-list":"post",suggestions:"feed"})[e])&&void 0!==t?t:e}},7271:function(e,t,n){n.d(t,{M:()=>a});var i=n(60807);function a(){return!!(0,i.Fl)().explicitContentEnabled}},91700:function(e,t,n){n(16584),n(20253),n(32351),n(15771)},99027:function(e,t,n){n(27412),n(7409),n(16584);var i=n(6400),a=n(14293),r=n(35937);n(96164),n(29493),n(20253),n(48980),n(98914),n(52513),n(15771),n(19081),n(58175),n(60308),n(26111),n(50475),i.Component},63124:function(e,t,n){n.d(t,{sc:()=>s,_n:()=>o,Uv:()=>l});var i=n(16584),a=n(19425);n(98661);var r=n(71068);let l=e=>{let{children:t}=e;return(0,i.tZ)(r.xu,{className:"backdropContainer-cOZ3hh",children:t})},o=()=>(0,i.tZ)(r.xu,{className:"backdrop-IqiELY","aria-hidden":!0}),s=e=>{let{children:t}=e;return(0,i.tZ)(a.u.Child,{enter:"backdropEnter-ZpaQIK",enterFrom:"backdropEnterFrom-CKaxGg",enterTo:"backdropEnterTo-QxRXXs",leave:"backdropLeave-IagLtt",leaveFrom:"backdropLeaveFrom-dCf923",leaveTo:"backdropLeaveTo-Zn8qab",children:t})}},17688:function(e,t,n){n.d(t,{d:()=>v,i:()=>p});var i=n(7409),a=n(99282),r=n(98848),l=n(16584),o=n(94184),s=n.n(o),c=n(98661),d=n(86374),u=n(19081),h=n(63584);let p=(0,c.forwardRef)((e,t)=>{var{className:n,error:o=!1,leading:c,trailing:p=(0,l.tZ)(d.Z,{}),children:v,flex:g="auto"}=e,b=(0,r._)(e,["className","error","leading","trailing","children","flex"]);return(0,l.BX)(u.hs,{position:"relative",flex:g,children:[(0,l.tZ)("select",(0,a._)((0,i._)({},b),{className:s()(n,h.Z.select,o&&h.Z.error,b.disabled&&h.Z.disabled,c?h.Z.leading:null,p?h.Z.trailing:null),ref:t,children:v})),c&&(0,l.tZ)(m,{className:s()(o&&h.Z.error,b.disabled&&h.Z.disabled),children:c}),p&&(0,l.tZ)(f,{className:s()(o&&h.Z.error,b.disabled&&h.Z.disabled),children:p})]})});p.displayName="SelectNative";let m=e=>{let{children:t,className:n}=e;return(0,l.tZ)(u.hs,{className:s()(h.Z.wrapper,h.Z.leading,n),children:t})},f=e=>{var{children:t,className:n}=e,o=(0,r._)(e,["children","className"]);return(0,l.tZ)(u.hs,(0,a._)((0,i._)({className:s()(h.Z.wrapper,h.Z.trailing,n)},o),{children:t}))},v=e=>{let{children:t}=e;return(0,l.tZ)("option",{value:"",disabled:!0,selected:!0,children:t},"placeholder")}},14518:function(e,t,n){n.d(t,{H:()=>m});var i=n(7409),a=n(99282),r=n(98848),l=n(16584),o=n(94184),s=n.n(o),c=n(98661),d=n(15771),u=n(19081),h=n(51776),p=n(68686);let m=(0,c.forwardRef)((e,t)=>{var{className:n,placement:o="end",priority:m="secondary-outline",button:f}=e,v=(0,r._)(e,["className","placement","priority","button"]);let g=c.default.isValidElement(f)&&null!=f&&f.type===d.zx?(0,c.cloneElement)(f,{priority:m,className:s()(f.props.className,p.Z.inputWithButtonButton,p.Z[o])}):null;return(0,l.BX)(u.hs,{direction:"start"===o?"row-reverse":"row",position:"relative",sizing:"border-box",className:s()(p.Z.inputWithButtonWrapper,p.Z[m]),children:[(0,l.tZ)(h.oi,(0,a._)((0,i._)({},v),{ref:t,flex:"grow",className:s()(n,p.Z.inputWithButtonInput,p.Z[m],g&&p.Z[o])})),g]})})},31065:function(e,t,n){n.d(t,{X:()=>s});var i=n(7409),a=n(99282),r=n(98848),l=n(16584),o=n(80026);function s(e){var{forwardRef:t,label:n,icon:s,href:c,size:d=56,radius:u="full",onClick:h}=e,p=(0,r._)(e,["forwardRef","label","icon","href","size","radius","onClick"]);return(0,l.BX)(o.sg,(0,a._)((0,i._)({as:"a",className:"button-zkMi7O",cursor:"pointer",gap:8,href:c,alignItems:"center",width:d,ref:t,onClick:h},p),{children:[(0,l.tZ)(o.sg,{alignItems:"center",justifyContent:"center",animate:!0,className:"icon-U2KWC6",bg:"secondary",width:d,height:d,radius:u,children:s}),(0,l.tZ)(o.xv.B5,{weight:"semibold",color:"primary",children:n})]}))}},2009:function(e,t,n){n.d(t,{L:()=>r});var i=n(93252),a=n(14773);let r=document.location.origin===a.tE&&!(0,i.P)()},57641:function(e,t,n){n.d(t,{O:()=>m});var i=n(7409),a=n(99282),r=n(16584),l=n(58319),o=n(68833),s=n(82402),c=n(19081),d=n(58175),u=n(37313),h=n(60308);let p={tosCheckbox:"tosCheckbox-XbLWCT",tosCheckboxBox:"tosCheckboxBox-KXqPaU"},m=e=>{let{includeCheckbox:t=!0,onCheckboxChange:n=()=>{},checked:m=!1,addSubscribePreamble:f=!1,addSignupPreamble:v=!1,fontWeight:g="regular",size:b="regular",color:Z="primary",textAlign:C="left",style:k}=e;return(0,r.BX)(r.HY,{children:[(0,r.tZ)(l.Z,{onVisible:()=>{(0,o.j)(u.F.TERMS_OF_SERVICE_SEEN,{withCheckbox:t,initialCheckboxValue:m})}}),(0,r.BX)(c.gq,{as:"label",alignItems:"center",justifyContent:"center",gap:8,style:k,className:p.tosCheckbox,children:[t&&(0,r.tZ)("div",{className:p.tosCheckboxBox,children:(0,r.tZ)(s.X,{checked:m,onChange:e=>{(0,o.j)(u.F.TERMS_OF_SERVICE_CHECKBOX_CLICKED,{checkboxValue:e}),n(e)},size:"sm"})}),(0,r.BX)(d.xv.B4,(0,a._)((0,i._)({color:Z,textAlign:C,fontWeight:g},"small"===b?{size:11,lineHeight:16}:{}),{children:[f?"By subscribing, ":v?"By creating an account, ":""," I agree to Substack's"," ",(0,r.tZ)(d.xv,{as:"a",href:(0,h._QN)(),target:"_blank",style:{textDecoration:"underline"},children:"Terms of Use"}),", and acknowledge its"," ",(0,r.tZ)(d.xv,{as:"a",href:(0,h.WFt)(),target:"_blank",style:{textDecoration:"underline"},children:"Information Collection Notice"})," ","and"," ",(0,r.tZ)(d.xv,{as:"a",href:(0,h.Zzu)(),target:"_blank",style:{textDecoration:"underline"},children:"Privacy Policy"}),"."]}))]})]})}},76820:function(e,t,n){n.d(t,{Jl:()=>b,PJ:()=>g,Qz:()=>f,YQ:()=>v});var i=n(7409),a=n(16584),r=n(30396),l=n(12281),o=n(60807),s=n(27625),c=n(98422),d=n(71068),u=n(19081),h=n(75822),p=n(18618),m=n(95738);function f(e,t){let[n,i]=(0,r.eJ)(null);return(0,r.d4)(()=>{let n=new ResizeObserver(e=>{if(!e||0===e.length)return;let n=e[0];if(n&&n.target){let{width:e}=n.contentRect;t?i(Math.min(e,t)):i(e)}}),a=e.current;return a&&n.observe(a),()=>{n.disconnect()}},[e]),n}let v=295,g=520;function b(e){let{mediaUpload:t,composing:n,maxWidth:b,videoPlayerProps:C,tag:k}=e,y=(0,o.Fl)().autoPlayVideo,{isMobile:w}=(0,c.v9)(),_=(0,r.sO)(null),x=(0,r.sO)(null),B=f(x,b);(0,h.KS)({videoPlayerRef:_,showPaywall:!1,disable:!1});let{isHidden:N,onShow:L}=(0,s.Sl)(!!t.explicit),I=null;null!==t.width&&null!==t.height&&(I=t.width/t.height);let P={};if(w){let e=null!=B?B:v;P=I?I>1?{width:"".concat(e,"px"),height:"".concat(e/I,"px")}:{height:"".concat(400,"px"),width:"".concat(400*I,"px")}:{}}else if(I){let e=null!=B?B:g;P=I?I>1?{width:"".concat(e,"px"),height:"".concat(e/I,"px")}:{height:"".concat(400,"px"),width:"".concat(400*I,"px")}:{}}return(0,a.tZ)(u.tu,{ref:x,children:(0,a.BX)(u.tu,{style:P,radius:"md",overflow:"hidden",position:"relative",className:m.Z.videoPlayerContainer,children:[(0,a.tZ)(l.Z,(0,i._)({ref:_,mediaUpload:t,startMuted:y,autoPlay:y&&n,renderPlayButton:()=>(0,a.tZ)(p.f,{isPlaying:!1,size:w?40:56}),pub:null,videoPlayerClassName:m.Z.videoPlayer,videoClassName:m.Z.video,omitBackgroundColor:!0,stopPropagation:!0,noKeyboardShortcuts:!0},C)),!n&&N&&(0,a.tZ)(s.cD,{radius:"md",onShow:L,itemName:"video"}),(0,a.tZ)(d.xu,{position:"absolute",inset:0,radius:"md",outline:"detail",pointerEvents:"none"}),k&&(0,a.tZ)(Z,{children:k})]})})}let Z=(0,d.zo)({display:"flex",padding:8,position:"absolute",alignItems:"start",justifyContent:"start"})},23398:function(e,t,n){n.d(t,{u:()=>a});var i=n(84864);function a(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:24;try{t=new URL(e)}catch(t){return console.error("Failed to parse URL",e,t),e}t.hostname=t.hostname.replace(/^www\./,""),t.pathname=t.pathname.replace(/\/+$/,""),t.hash="";let a=[];t.hostname.includes("youtube")&&a.push("v"),t.searchParams.forEach((e,n)=>{a.includes(n)||t.searchParams.delete(n)});let r=t.toString().replace(/^\w+:\/\//,"").replace(/\/+$/,"");return r?(0,i.truncateText)(r,n):e}},38927:function(e,t,n){n.d(t,{t:()=>i});let i=["listItem","codeBlock","heading","paragraph"]},23854:function(e,t,n){n.d(t,{bP:()=>r,sC:()=>a});var i,a=((i={}).Removed="removed",i.Unavailable="unavailable",i.BlockedYou="blocked-you",i.YouBlocked="you-blocked",i.YouMuted="you-muted",i);function r(e){return"missing"===e.type}},18925:function(){}}]);