(self.webpackChunklite=self.webpackChunklite||[]).push([[8916],{42130:(e,n,i)=>{"use strict";i.d(n,{Z:()=>l});var t=i(67294);function a(){return a=Object.assign?Object.assign.bind():function(e){for(var n=1;n{"use strict";i.r(n),i.d(n,{RightColumnContent:()=>s,useLoader:()=>m});var t=i(64718),a=i(67294),o=i(87329),l=i(71711),r={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"UserProfileRightColQuery"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"username"}},type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"userResult"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"Argument",name:{kind:"Name",value:"username"},value:{kind:"Variable",name:{kind:"Name",value:"username"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"User"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"UserProfileRightColumn_user"}}]}}]}}]}}].concat((0,o.Z)(l.P.definitions))},d=i(81243),c=i(8458),u=i(81390),m=function(e){var n=(0,c.t)(e),i=n.id,a=n.username,o=(0,t.a)(r,{variables:{id:i,username:a},skip:!i&&!a});return{loading:o.loading,userProfileRightColQueryResult:o}},s=function(e){var n=e.userProfileRightColQueryResult,i=n.error,t=n.data,o=(t=void 0===t?{}:t).userResult;return n.loading||i||(0,u.b)(o)?null:a.createElement(d.v,{user:o})}},98598:(e,n,i)=>{"use strict";i.d(n,{g:()=>l});var t=i(87329),a=i(84683),o=i(19308),l={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"CollectionTooltip_collection"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Collection"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"subscriberCount"}},{kind:"FragmentSpread",name:{kind:"Name",value:"CollectionAvatar_collection"}},{kind:"FragmentSpread",name:{kind:"Name",value:"CollectionFollowButton_collection"}}]}}].concat((0,t.Z)(a.d.definitions),(0,t.Z)(o.I.definitions))}},18978:(e,n,i)=>{"use strict";i.d(n,{L:()=>u});var t=i(67294),a=i(71652),o=i(82405),l=i(77355),r=i(20113),d=i(87691),c=i(21372),u=function(e){var n=e.collection,i=e.buttonSize,u=e.buttonStyleFn,m=n.name,s=n.description;return t.createElement(l.x,{padding:"15px",display:"flex",flexDirection:"column",width:"300px"},t.createElement(l.x,{display:"flex",flexDirection:"row",justifyContent:"space-between",whiteSpace:"normal",borderBottom:"neutral.primary",paddingBottom:"10px",marginBottom:"10px"},t.createElement(l.x,{display:"flex",flexDirection:"column",paddingRight:"5px"},t.createElement(r.X6,{scale:"S"},m),t.createElement(d.F,{scale:"S"},s)),t.createElement(l.x,null,t.createElement(a.v,{collection:n,link:!0}))),t.createElement(l.x,{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between"},t.createElement(d.F,{scale:"M"},"Followed by ",(0,c.pY)(n.subscriberCount||0)," people"),t.createElement(o.F,{collection:n,buttonSize:i,buttonStyleFn:u,susiEntry:"follow_card"})))}},32064:(e,n,i)=>{"use strict";i.d(n,{y:()=>o});var t=i(67294),a=i(77355),o=function(e){var n=e.children,i=e.marginTop,o=void 0===i?"40px":i,l=e.paddingBottom,r=void 0===l?"0px":l,d=e.showBorderBottom,c=void 0!==d&&d;return t.createElement(a.x,{marginTop:o,paddingBottom:r,borderBottom:c?"neutral.primary":"NONE"},n)}},68427:(e,n,i)=>{"use strict";i.d(n,{B:()=>r,R:()=>d});var t=i(8575),a=i(67294),o=i(43487),l=i(78870),r=function(){var e=(0,o.v9)((function(e){return e.navigation.currentLocation})),n=(0,o.v9)((function(e){return e.config.authDomain})),i=(0,l.rp)();return(0,a.useCallback)((function(a){var o=a.id,l=a.domain,r=function(e){var n=e.id,i=e.slug;return i?"/".concat(i):"/c/".concat(n)}({id:o,domain:l,slug:a.slug});if(i)return"https://".concat(n).concat(r);var d=(0,t.parse)(e).port;return l?"https://".concat(l).concat(d?":".concat(d):""):"https://".concat(n).concat(r)}),[i])},d=function(e){return r()(e)}},78757:(e,n,i)=>{"use strict";i.d(n,{P:()=>o});var t=i(68427),a=i(84739),o=function(e){var n=(0,t.B)(),i=(0,a.I)();return"Collection"===e.__typename?n(e):"User"===e.__typename?i(e):""}},986:(e,n,i)=>{"use strict";i.d(n,{c:()=>u});var t=i(22122),a=i(67294),o=i(52439),l=i(89636),r=i(64959),d=i(77355),c=i(35010),u=function(e){var n=e.children,i=e.innerPadding,u=void 0===i?{}:i,m=e.footerPadding,s=e.display,k=void 0===s?"block":s,v=(0,a.useRef)(0),p=(0,a.useRef)(null),f=(0,a.useRef)("stickyToTop"),g=(0,a.useRef)(null),S=(0,l.v)(),y=S.fullNavbarHeight,N=S.topNavUpsellHeight,C=S.addHeightChangeHandler,F=S.removeHeightChangeHandler;return(0,c.L)((function(){var e=function(e){var n=e.currentHeight;p.current&&g.current&&("notSticky"!==f.current&&(p.current.style.top="".concat(n,"px")),g.current.style.minHeight="calc(100vh - ".concat(n,"px)"))};return C(e),function(){F(e)}}),[]),(0,c.L)((function(){var e=function(){if(p.current){var e=window.scrollY>v.current;v.current=window.scrollY;var n=window.innerHeight,i=p.current.offsetHeight-n,t=r.fp;i<=20||(e?("notSticky"===f.current&&window.scrollY>=p.current.offsetTop+i+t+N&&(f.current="stickyToBottom",p.current.style.position="sticky",p.current.style.top="".concat(-i,"px")),"stickyToTop"===f.current&&(f.current="notSticky",p.current.style.position="relative",p.current.style.top="0px",p.current.style.marginTop="0px",p.current.style.marginTop="".concat(Math.max(v.current-p.current.offsetTop,0),"px"))):("notSticky"===f.current&&window.scrollY<=p.current.offsetTop&&(f.current="stickyToTop",p.current.style.position="sticky",p.current.style.top="".concat(t+N,"px"),p.current.style.marginTop="0px"),"stickyToBottom"===f.current&&(f.current="notSticky",p.current.style.position="relative",p.current.style.top="0px",p.current.style.marginTop="0px",p.current.style.marginTop="".concat(v.current-i-p.current.offsetTop-t-N,"px"))))}};return window.addEventListener("scroll",e),function(){window.removeEventListener("scroll",e)}}),[N]),a.createElement(d.x,{position:"sticky",top:"".concat(y,"px"),ref:p,display:k},a.createElement(d.x,(0,t.Z)({display:"flex",flexDirection:"column",minHeight:"calc(100vh - ".concat(y,"px)"),ref:g},u),a.createElement(d.x,{flexGrow:"1"},n),a.createElement(o.q,{detailScale:"XS",spacing:"XS",padding:m})))}},1109:(e,n,i)=>{"use strict";i.d(n,{KB:()=>c,fg:()=>u,Fd:()=>m,SZ:()=>s,gs:()=>k,C2:()=>v,lp:()=>p,B0:()=>f,z6:()=>g,G6:()=>S});var t=i(23450),a=i.n(t),o=i(67294),l=i(25550),r=i(75221),d=i(46696),c=function(){var e=(0,l.r)().viewerId;return(0,o.useCallback)((function(n){return e===n}),[e])},u=function(e){return c()(e)},m=function(e){return(0,d.W6)({miroId:e.thumbnailImage})},s=function(e){var n=e.postItemsCount;return n>0?"".concat(e.postItemsCount," ").concat(a()("story",n)):""},k=function(){return"This story is no longer available"},v=function(e){var n;return"Post"===(null===(n=e.entity)||void 0===n?void 0:n.__typename)&&e.entity.visibility===r.Wn.UNLISTED},p=60,f=280;function g(e){return!!e&&e.length>f}function S(e){return e.length>p}},84683:(e,n,i)=>{"use strict";i.d(n,{d:()=>o});var t=i(87329),a=i(68216),o={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"CollectionAvatar_collection"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Collection"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"avatar"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"FragmentSpread",name:{kind:"Name",value:"collectionUrl_collection"}}]}}].concat((0,t.Z)(a.nf.definitions))}},71652:(e,n,i)=>{"use strict";i.d(n,{v:()=>m});var t=i(67294),a=i(68427),o=i(14818),l=i(4381),r=i(27323),d=i(29746),c=i(46696),u=function(e){return function(n){return{borderRadius:(0,d.a)(n.borderRadius.regular),width:(0,d.a)(e),height:(0,d.a)(e)}}},m=function(e){var n=e.circular,i=e.collection,d=e.size,m=void 0===d?60:d,s=e.link,k=e.showHoverState,v=(0,a.R)(i);if(!i||!i.avatar||!i.avatar.id)return null;var p=i.avatar.id,f=i.name||"Publication avatar",g=n?t.createElement(o.z,{miroId:p,alt:f,diameter:m,freezeGifs:!1,showHoverState:k}):t.createElement(l.UV,{rules:[u(m)],miroId:p,alt:f,width:m,height:m,strategy:c._S.Crop});return s?t.createElement(r.P,{href:v},g):g}},19308:(e,n,i)=>{"use strict";i.d(n,{b:()=>l,I:()=>r});var t=i(87329),a=i(68216),o=i(98007),l={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"CollectionFollowButton_post"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Post"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"id"}}]}}]},r={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"CollectionFollowButton_collection"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Collection"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"slug"}},{kind:"FragmentSpread",name:{kind:"Name",value:"collectionUrl_collection"}},{kind:"FragmentSpread",name:{kind:"Name",value:"SusiClickable_collection"}}]}}].concat((0,t.Z)(a.nf.definitions),(0,t.Z)(o.Os.definitions))}},82405:(e,n,i)=>{"use strict";i.d(n,{F:()=>F});var t=i(34699),a=i(21919),o=i(67294),l=i(51615),r=i(77520),d=i(20297),c=i(25550),u=i(25267),m=i(39727),s=i(26350),k=i(50563),v=i(93310),p=i(77355),f=i(47230),g=i(18627),S=i(66411),y=i(92661),N=i(43487),C=i(50458),F=function(e){var n,i=e.buttonSize,C=e.buttonStyleFn,F=e.collection,b=e.post,h=e.simpleLink,x=e.susiEntry,E=void 0===x?"follow_card":x,T=e.preventParentClick,_=e.width,D=(0,N.v9)((function(e){return e.config.authDomain})),I=(0,c.r)().viewerId,B=(0,g.A)(),R=(0,S.pK)(),Z=(0,l.TH)(),U=(0,y.$B)(Z.pathname),L=null==U||null===(n=U.route)||void 0===n?void 0:n.name,P=(0,m.g)(F),V=P.viewerEdge,H=P.loading,z=function(e,n){var i=(0,a.D)(d.e),l=(0,t.Z)(i,1)[0];return o.useCallback((function(){return l({variables:{id:e.id},optimisticResponse:{followCollection:{__typename:"Collection",id:e.id,name:e.name,viewerEdge:{__typename:"CollectionViewerEdge",id:"collectionId:".concat(e.id,"-viewerId:").concat(n),isFollowing:!0}}},update:function(i){i.modify({id:"User:".concat(n),fields:{missionControl:(0,k.im)("followedCollections",!0),followingCollectionConnection:(0,k.Hc)(e.id)}})}})}),[e.id])}(F,I),O=function(e,n){var i=(0,a.D)(d.X),l=(0,t.Z)(i,1)[0];return o.useCallback((function(){return l({variables:{id:e.id},optimisticResponse:{unfollowCollection:{__typename:"Collection",id:e.id,name:e.name,viewerEdge:{__typename:"CollectionViewerEdge",id:"collectionId:".concat(e.id,"-viewerId:").concat(n),isFollowing:!1}}},update:function(e){e.modify({id:"User:".concat(n),fields:{missionControl:(0,k.im)("followedCollections",!1)}})}})}),[e.id])}(F,I),A=o.useCallback((function(e){T&&e.preventDefault(),B.event("collection.followed",{collectionId:F.id,followSource:R}),z()}),[F,T,R,B]),M=o.useCallback((function(e){T&&e.preventDefault(),B.event("collection.unfollowed",{collectionId:F.id,followSource:R}),O()}),[T,R,B]),q=!(null==V||!V.isFollowing),j=C?C(!!q):q?"OBVIOUS":"STRONG";return h?o.createElement(v.r,{onClick:q?M:A},o.createElement(p.x,{display:"flex",flexDirection:"row"},q?"Unfollow publication":"Follow publication")):o.createElement(u.I,null,(function(e){return e?o.createElement(f.zx,{size:i,onClick:q?M:A,buttonStyle:j,loading:H,width:_},q?"Following":"Follow"):o.createElement(s.R,{collection:F,buttonStyle:j,isButton:!0,buttonSize:i,operation:"register",actionUrl:w(D,F,b)||"",susiEntry:E,pageSource:(0,r.x)(L,"register"),buttonWidth:_},q?"Following":"Follow")}))},w=function(e,n,i){return n.slug&&(i&&i.id?(0,C.TA)(e,n.slug,i.id):(0,C.Ll)(e,n.slug))}},14337:(e,n,i)=>{"use strict";i.d(n,{v:()=>l});var t=i(87329),a=i(84683),o=i(27048),l={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"PublisherAvatar_publisher"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Publisher"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Collection"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"FragmentSpread",name:{kind:"Name",value:"CollectionAvatar_collection"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"User"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"FragmentSpread",name:{kind:"Name",value:"UserAvatar_user"}}]}}]}}].concat((0,t.Z)(a.d.definitions),(0,t.Z)(o.W.definitions))}},39727:(e,n,i)=>{"use strict";i.d(n,{g:()=>l});var t=i(64718),a=i(87329),o={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"CollectionViewerEdge"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"collectionId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"collectionId"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Collection"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"viewerEdge"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"Collection_viewerEdge"}}]}}]}}]}}]}}].concat((0,a.Z)([{kind:"FragmentDefinition",name:{kind:"Name",value:"Collection_viewerEdge"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CollectionViewerEdge"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"canEditOwnPosts"}},{kind:"Field",name:{kind:"Name",value:"canEditPosts"}},{kind:"Field",name:{kind:"Name",value:"isEditor"}},{kind:"Field",name:{kind:"Name",value:"isFollowing"}},{kind:"Field",name:{kind:"Name",value:"isMuting"}},{kind:"Field",name:{kind:"Name",value:"isSubscribedToLetters"}},{kind:"Field",name:{kind:"Name",value:"isSubscribedToMediumNewsletter"}},{kind:"Field",name:{kind:"Name",value:"isSubscribedToEmails"}},{kind:"Field",name:{kind:"Name",value:"isWriter"}}]}}]))},l=function(e){var n,i,a=(0,t.a)(o,{variables:{collectionId:null!==(n=null==e?void 0:e.id)&&void 0!==n?n:""},ssr:!1,skip:!(null!=e&&e.id)}),l=a.loading,r=a.error,d=a.data;return l?{loading:l}:r?{error:r}:{viewerEdge:null==d||null===(i=d.collection)||void 0===i?void 0:i.viewerEdge}}},25267:(e,n,i)=>{"use strict";i.d(n,{I:()=>a});var t=i(6443),a=function(e){var n=e.children,i=e.nonBlocking,a=(0,t.H)(),o=a.error,l=a.loading,r=a.value;return i&&(o||l)?n(null):l?null:n(r)}},98007:(e,n,i)=>{"use strict";i.d(n,{Os:()=>o,qU:()=>l,Vm:()=>r,GB:()=>d});var t=i(87329),a=i(20121),o={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"SusiClickable_collection"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Collection"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"SusiContainer_collection"}}]}}].concat((0,t.Z)(a.Hr.definitions))},l={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"SusiClickable_post"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Post"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"mediumUrl"}},{kind:"FragmentSpread",name:{kind:"Name",value:"SusiContainer_post"}}]}}].concat((0,t.Z)(a.qt.definitions))},r=([{kind:"FragmentDefinition",name:{kind:"Name",value:"SusiClickable_topic"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Topic"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"SusiContainer_topic"}}]}}].concat((0,t.Z)(a.Uh.definitions)),{kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"SusiClickable_user"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"User"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"SusiContainer_user"}}]}}].concat((0,t.Z)(a.Zd.definitions))}),d={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"SusiClickable_newsletterV3"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"NewsletterV3"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"SusiContainer_newsletterV3"}}]}}].concat((0,t.Z)(a.gs.definitions))};[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"SusiClickableAccountTokenQuery"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"SusiContainer_query"}}]}}].concat((0,t.Z)(a.Zz.definitions))},1383:(e,n,i)=>{"use strict";i.d(n,{Q:()=>m});var t=i(22122),a=i(81253),o=i(67294),l=i(77355),r=i(20113),d=i(87691),c=i(13791),u=["children","titleText"],m=function(e){var n=e.children,i=e.titleText,m=(0,a.Z)(e,u),s="confirmDialogTitle";return o.createElement(c.v,(0,t.Z)({},m,{ariaLabelledBy:s}),o.createElement(r.X6,{ariaLabelledById:s,scale:{xs:"M",sm:"M",md:"L",lg:"L",xl:"L"}},i),o.createElement(l.x,{paddingTop:"6px",paddingBottom:"36px"},o.createElement(d.F,{scale:{xs:"M",sm:"M",md:"L",lg:"L",xl:"L"},tag:"div"},n)))}}}]); //# sourceMappingURL=https://stats.medium.build/lite/sourcemaps/UserProfilePage.RightColumnContent.d379bc91.chunk.js.map