(window.ansFrontendRelayWebpackJsonpFunction=window.ansFrontendRelayWebpackJsonpFunction||[]).push([["page-QEmailOptOutPageLoadable"],{"9Zug":function(e,t,n){"use strict";var a;!function(e){e[e.HOME_PAGE=1]="HOME_PAGE",e[e.WRITE_PAGE=2]="WRITE_PAGE",e[e.PINNED_TOPIC=3]="PINNED_TOPIC",e[e.QUESTIONS_TO_FOLLOW_PAGE=4]="QUESTIONS_TO_FOLLOW_PAGE",e[e.BOOKMARKS_PAGE=5]="BOOKMARKS_PAGE",e[e.CONTENT_PAGE=6]="CONTENT_PAGE",e[e.DIGEST_PAGE=7]="DIGEST_PAGE",e[e.HYPERLINK=12]="HYPERLINK",e[e.TOPIC=13]="TOPIC",e[e.ANSWERS_IN_TOPIC=14]="ANSWERS_IN_TOPIC",e[e.TOP_QUESTIONS_IN_TOPIC=15]="TOP_QUESTIONS_IN_TOPIC",e[e.HYPERLINK_TOPIC=17]="HYPERLINK_TOPIC",e[e.TOP_QUESTIONS=18]="TOP_QUESTIONS",e[e.COMMON_KNOWLEDGE_TOPIC=20]="COMMON_KNOWLEDGE_TOPIC",e[e.QUESTION_PAGES=21]="QUESTION_PAGES",e[e.RELATED_QUESTIONS=23]="RELATED_QUESTIONS",e[e.TRANSLATE_ANSWERS=24]="TRANSLATE_ANSWERS",e[e.USER_PROFILE_RECENT_ANSWERS=25]="USER_PROFILE_RECENT_ANSWERS",e[e.SOCIAL_UPVOTE_NOTIF=26]="SOCIAL_UPVOTE_NOTIF",e[e.TRIBE_PAGE=27]="TRIBE_PAGE",e[e.APP_DIGEST=28]="APP_DIGEST",e[e.FOLLOWING=29]="FOLLOWING",e[e.RECENT_FOLLOW_CONTENT=30]="RECENT_FOLLOW_CONTENT",e[e.ALL_TRIBES=31]="ALL_TRIBES",e[e.APP_DIGEST_FEED=32]="APP_DIGEST_FEED",e[e.STORY_SCORING=33]="STORY_SCORING",e[e.ADS_BUSINESS=34]="ADS_BUSINESS",e[e.WRITE_DIGEST=35]="WRITE_DIGEST",e[e.TRENDING=36]="TRENDING",e[e.TRIBE_TOP_ITEMS=37]="TRIBE_TOP_ITEMS",e[e.TRIBE_SUGGESTIONS=38]="TRIBE_SUGGESTIONS",e[e.EXPLORE_PAGE=39]="EXPLORE_PAGE",e[e.QUESTIONS_IN_TRIBE=40]="QUESTIONS_IN_TRIBE",e[e.TRIBE_ANSWER_SUGGESTIONS=41]="TRIBE_ANSWER_SUGGESTIONS",e[e.TRIBE_HYPERLINK_SUGGESTIONS=42]="TRIBE_HYPERLINK_SUGGESTIONS",e[e.TRIBE_QUESTION_SUGGESTIONS=43]="TRIBE_QUESTION_SUGGESTIONS",e[e.TRIBE_QUESTIONS=44]="TRIBE_QUESTIONS",e[e.ADMIN_TRIBE_SUBMISSIONS_PENDING=45]="ADMIN_TRIBE_SUBMISSIONS_PENDING",e[e.ADMIN_TRIBE_SUBMISSIONS_FILTERED=46]="ADMIN_TRIBE_SUBMISSIONS_FILTERED",e[e.ADMIN_TRIBE_SUBMISSIONS_ALL=47]="ADMIN_TRIBE_SUBMISSIONS_ALL",e[e.VIEWER_TRIBE_SUBMISSIONS=48]="VIEWER_TRIBE_SUBMISSIONS",e[e.ADMIN_TRIBE_SUBMISSIONS_RANKED=49]="ADMIN_TRIBE_SUBMISSIONS_RANKED",e[e.USER_PROFILE_ACTIVITY=50]="USER_PROFILE_ACTIVITY",e[e.UNANSWERED_QUESTIONS_IN_TRIBE=51]="UNANSWERED_QUESTIONS_IN_TRIBE",e[e.TRIBE_CONTENT_QUEUE_ITEMS=52]="TRIBE_CONTENT_QUEUE_ITEMS"}(a||(a={})),t.a=a},BXNm:function(e,t,n){"use strict";var a={};n.r(a),n.d(a,"default",function(){return R});var i={};n.r(i),n.d(i,"default",function(){return g});var r=n("8ZkK"),l=n.n(r),o=n("tQZz"),E=n.n(o),u=n("7eVb"),s=n.n(u),S=n("n3k3"),I=n.n(S),d=n("10u2"),_=n.n(d),T=n("8meh"),c=n.n(T),N=function(){var e=[{kind:"LocalArgument",name:"tribeId",type:"BigInt!",defaultValue:null},{kind:"LocalArgument",name:"notifSetting",type:"BigInt!",defaultValue:null}],t=[{kind:"LinkedField",alias:null,name:"tribeNotifUpdate",storageKey:null,args:[{kind:"Variable",name:"notifSetting",variableName:"notifSetting"},{kind:"Variable",name:"tribeId",variableName:"tribeId"}],concreteType:"TribeNotifUpdate",plural:!1,selections:[{kind:"LinkedField",alias:null,name:"tribe",storageKey:null,args:null,concreteType:"Tribe",plural:!1,selections:[{kind:"ScalarField",alias:null,name:"id",args:null,storageKey:null},{kind:"ScalarField",alias:null,name:"__typename",args:null,storageKey:null},{kind:"ScalarField",alias:null,name:"notifStatus",args:null,storageKey:null}]}]}];return{kind:"Request",fragment:{kind:"Fragment",name:"TribeNotifs_tribeNotifUpdate_Mutation",type:"MutationRoot",metadata:null,argumentDefinitions:e,selections:t},operation:{kind:"Operation",name:"TribeNotifs_tribeNotifUpdate_Mutation",argumentDefinitions:e,selections:t},params:{operationKind:"mutation",name:"TribeNotifs_tribeNotifUpdate_Mutation",id:"fce4cef02d9d3cbff0ec099387e9b193e52ac1ebb3c06c12ea39ac27b5fd5486",text:null,metadata:{}}}}();N.hash="653dd4ade288aacdd9b4e1cede41c4b5";var m,O,R=N,b={kind:"Fragment",name:"TribeNotifs_tribe",type:"Tribe",metadata:null,argumentDefinitions:[],selections:[{kind:"ScalarField",alias:null,name:"id",args:null,storageKey:null},{kind:"ScalarField",alias:null,name:"__typename",args:null,storageKey:null},{kind:"ScalarField",alias:null,name:"tribeId",args:null,storageKey:null},{kind:"ScalarField",alias:null,name:"notifStatus",args:null,storageKey:null}],hash:"2e88724a8e79d276893bca7df9549c5b"},g=b,f=n("q1tI"),A=n("VyO/"),p=n("AgQU"),L=n("zLpq"),B=n("jufJ"),U=n("4oNN"),G=n("nwxp"),P=n("oJdr"),D=n("/bbo"),k=n("Os/N"),y=n("59Xv");n.d(t,"b",function(){return C}),n.d(t,"a",function(){return M});var F=void 0!==m?m:m=i,v=void 0!==O?O:O=a;function h(e){var t,n=e.setting,a=e.isShort,i=void 0!==a&&a;return f.createElement(B.x,null,f.createElement(B.a,{value:n},(t={},c()(t,k.a.ALL_NOTIFS,i?"All Notifs":"All Notifications"),c()(t,k.a.HIGHLIGHTS,"Highlights"),c()(t,k.a.NONE,i?"Notifs Off":"Notifications Off"),t)))}function C(e){var t,n=e.setting;return f.createElement(B.a,{value:n},(t={},c()(t,k.a.ALL_NOTIFS,"You'll receive all notifs from this space."),c()(t,k.a.HIGHLIGHTS,"You'll be notified of highlights from this space."),c()(t,k.a.NONE,"You won't receive notifs from this space."),t))}var M=[k.a.ALL_NOTIFS,k.a.HIGHLIGHTS,k.a.NONE],K=function(e){function t(){return l()(this,t),s()(this,I()(t).apply(this,arguments))}return _()(t,e),E()(t,[{key:"renderPopOverItems",value:function(){var e=this,t=this.props.tribe,n=t.id,a=t.tribeId,i=t.notifStatus;return M.map(function(t){return{label:Object(B.H)(f.createElement(h,{setting:t})),onSelected:function(e){Object(P.a)({message:Object(B.H)(f.createElement(C,{setting:t}))}),e.mutate(function(e,t,n){return{mutation:v,variables:{tribeId:t,notifSetting:n},optimisticResponse:{tribeNotifUpdate:{tribe:{id:e,__typename:"Tribe",notifStatus:n}}}}}(n,a,t))},isOn:t===i,isCheckable:!e.props.disabled,closeOnClick:!0}})}},{key:"renderButtonText",value:function(){var e=this.props.tribe.notifStatus;return Object(B.H)(f.createElement(h,{setting:e>0?e:k.a.NONE,isShort:G.f}))}},{key:"render",value:function(){var e=this,t=this.props,n=t.tribe.notifStatus,a=t.size,i=void 0===a?"regular":a,r=t.disabled,l=void 0!==r&&r,o=t.useButtonFlatStyle,E=void 0===o?!G.f:o,u={variant:"blue",size:i,disabled:l},s=Object.assign({},u,{followType:"topic",icon:f.createElement(p.a,null),text:this.renderButtonText(),pressed:n!==k.a.NONE,useHaptics:!0}),S=this.renderPopOverItems(),I=E?L.a:y.a;return f.createElement(U.a,{alignment:"bottom",menuItems:S,title:Object(B.H)("")},function(t){return e.props.useButtonPillStyle?f.createElement(D.a,Object.assign({},s,{variant:"blue_outline",pressed:!1,chevronSuffix:"down",onClick:t})):f.createElement(I,Object.assign({},s,{onClick:t}))})}}]),t}(f.Component);K.displayName="TribeNotifs",K.defaultProps={useButtonPillStyle:!1},K.fragments={tribe:F},K.mutations={tribeNotifUpdateMutation:v};t.c=Object(A.b)(K)},FfZq:function(e,t,n){"use strict";n.d(t,"p",function(){return T}),n.d(t,"m",function(){return c}),n.d(t,"i",function(){return N}),n.d(t,"j",function(){return m}),n.d(t,"k",function(){return O}),n.d(t,"e",function(){return R}),n.d(t,"n",function(){return b}),n.d(t,"a",function(){return g}),n.d(t,"h",function(){return r}),n.d(t,"o",function(){return l}),n.d(t,"l",function(){return o}),n.d(t,"d",function(){return E}),n.d(t,"f",function(){return u}),n.d(t,"g",function(){return L}),n.d(t,"s",function(){return B}),n.d(t,"r",function(){return U}),n.d(t,"q",function(){return G}),n.d(t,"b",function(){return P}),n.d(t,"c",function(){return D});var a,i,r,l,o,E,u,s=n("8meh"),S=n.n(s),I=n("9Zug"),d=n("HFCs"),_=n("amAD"),T={PARAM:"sort",OPTIONS:{RECENT:"recent",TOP:"top"}},c={DESKTOP:{IMAGE_HEIGHT:"".concat(parseInt("658px")/4,"px"),COLOR_HEIGHT:"".concat(parseInt("658px")/5,"px")},MOBILE:{IMAGE_HEIGHT:"25vw",COLOR_HEIGHT:"20vw"}},N=(a={},S()(a,_.a.ADMIN,"admin"),S()(a,_.a.MODERATOR,"moderator"),S()(a,_.a.CONTRIBUTOR,"contributor"),S()(a,_.a.FOLLOWER,"follower"),a),m={admin:_.a.ADMIN,moderator:_.a.MODERATOR,contributor:_.a.CONTRIBUTOR,follower:_.a.FOLLOWER},O=[_.a.FOLLOWER,_.a.CONTRIBUTOR,_.a.MODERATOR,_.a.ADMIN],R=[_.a.FOLLOWER,_.a.CONTRIBUTOR],b={SUGGESTIONS:"/suggestions",PEOPLE:"/people",DASHBOARD:"/dashboard",EARNINGS:"/earnings"},g={AnswerComment:2,PostComment:3,ShareComment:9};!function(e){e.UpvoterListBundle="UpvoterListBundle",e.TribeSubmissionListBundle="TribeSubmissionListBundle"}(r||(r={})),function(e){e.AnswerTribeItem="AnswerTribeItem",e.QuestionTribeItem="QuestionTribeItem",e.PostTribeItem="PostTribeItem",e.ShareTribeItem="ShareTribeItem"}(l||(l={})),function(e){e.main="main",e.questions="questions",e.submissions="submissions",e.suggestions="suggestions",e.queue="queue",e.people="people",e.stats="stats",e.settings="settings",e.adminLog="admin_log",e.requestsToContribute="requests_to_contribute",e.dashboard="dashboard",e.earnings="earnings"}(o||(o={})),function(e){e[e.AddContent=0]="AddContent",e[e.AddTopics=1]="AddTopics",e[e.InviteFollowers=2]="InviteFollowers",e[e.CustomIcon=3]="CustomIcon",e[e.ShareFeed=4]="ShareFeed"}(E||(E={})),function(e){e[e.ALL=1]="ALL",e[e.ANSWER=2]="ANSWER",e[e.POST=3]="POST",e[e.QUESTION=4]="QUESTION",e[e.NON_LINK_SHARE=5]="NON_LINK_SHARE",e[e.LINK_SHARE=6]="LINK_SHARE"}(u||(u={}));var f=[I.a.TRIBE_ANSWER_SUGGESTIONS,I.a.TRIBE_HYPERLINK_SUGGESTIONS,I.a.TRIBE_QUESTION_SUGGESTIONS],A=[I.a.TRIBE_PAGE,I.a.TRIBE_TOP_ITEMS],p=[I.a.QUESTIONS_IN_TRIBE,I.a.UNANSWERED_QUESTIONS_IN_TRIBE,I.a.TRIBE_QUESTIONS],L=(i={},S()(i,I.a.ADMIN_TRIBE_SUBMISSIONS_PENDING,d.a.ADMIN_TRIBE_SUBMISSIONS_PENDING),S()(i,I.a.ADMIN_TRIBE_SUBMISSIONS_RANKED,d.a.ADMIN_TRIBE_SUBMISSIONS_RANKED),S()(i,I.a.ADMIN_TRIBE_SUBMISSIONS_FILTERED,d.a.ADMIN_TRIBE_SUBMISSIONS_FILTERED),S()(i,I.a.ADMIN_TRIBE_SUBMISSIONS_ALL,d.a.ADMIN_TRIBE_SUBMISSIONS_ALL),S()(i,I.a.VIEWER_TRIBE_SUBMISSIONS,d.a.VIEWER_TRIBE_SUBMISSIONS),S()(i,I.a.TRIBE_ANSWER_SUGGESTIONS,d.a.TRIBE_ANSWER_SUGGESTIONS),S()(i,I.a.TRIBE_HYPERLINK_SUGGESTIONS,d.a.TRIBE_HYPERLINK_SUGGESTIONS),S()(i,I.a.TRIBE_QUESTION_SUGGESTIONS,d.a.TRIBE_QUESTION_SUGGESTIONS),S()(i,I.a.QUESTIONS_IN_TRIBE,d.a.QUESTIONS_IN_TRIBE),S()(i,I.a.UNANSWERED_QUESTIONS_IN_TRIBE,d.a.UNANSWERED_QUESTIONS_IN_TRIBE),S()(i,I.a.TRIBE_CONTENT_QUEUE_ITEMS,d.a.TRIBE_CONTENT_QUEUE_ITEMS),i);function B(e){return-1!==f.indexOf(e)}function U(e){return-1!==p.indexOf(e)}function G(e){return-1!==A.indexOf(e)}var P=1587006,D="/q/coronavirus"},HFCs:function(e,t,n){"use strict";var a;!function(e){e[e.HOME=1]="HOME",e[e.TOPIC=2]="TOPIC",e[e.DIGEST=3]="DIGEST",e[e.TOPIC_SUGGESTION=4]="TOPIC_SUGGESTION",e[e.USER_SUGGESTION=5]="USER_SUGGESTION",e[e.USER_PROFILE=6]="USER_PROFILE",e[e.PINNED_TOPIC=7]="PINNED_TOPIC",e[e.BOARD=8]="BOARD",e[e.INDEX_FEED=9]="INDEX_FEED",e[e.WRITE=10]="WRITE",e[e.ASKED_BY_FOLLOWING=11]="ASKED_BY_FOLLOWING",e[e.ORG_PROFILE=12]="ORG_PROFILE",e[e.HYPERLINK=15]="HYPERLINK",e[e.HYPERLINK_TOPIC=17]="HYPERLINK_TOPIC",e[e.QUESTION_PAGES=19]="QUESTION_PAGES",e[e.RELATED_QUESTIONS=21]="RELATED_QUESTIONS",e[e.SOCIAL_UPVOTE_NOTIF=22]="SOCIAL_UPVOTE_NOTIF",e[e.TRIBE_PAGE=23]="TRIBE_PAGE",e[e.APP_DIGEST=24]="APP_DIGEST",e[e.FOLLOWING=25]="FOLLOWING",e[e.RECENT_FOLLOW_CONTENT=26]="RECENT_FOLLOW_CONTENT",e[e.ALL_TRIBES=27]="ALL_TRIBES",e[e.TRIBE_SUGGESTION=28]="TRIBE_SUGGESTION",e[e.APP_DIGEST_FEED=29]="APP_DIGEST_FEED",e[e.STORY_SCORING=30]="STORY_SCORING",e[e.ADS_BUSINESS=31]="ADS_BUSINESS",e[e.WRITE_DIGEST=32]="WRITE_DIGEST",e[e.TRENDING=33]="TRENDING",e[e.TRIBE_TOP_ITEMS=34]="TRIBE_TOP_ITEMS",e[e.TRIBE_SUGGESTIONS=35]="TRIBE_SUGGESTIONS",e[e.QUESTIONS_IN_TRIBE=36]="QUESTIONS_IN_TRIBE",e[e.TRIBE_ANSWER_SUGGESTIONS=37]="TRIBE_ANSWER_SUGGESTIONS",e[e.TRIBE_HYPERLINK_SUGGESTIONS=38]="TRIBE_HYPERLINK_SUGGESTIONS",e[e.TRIBE_QUESTION_SUGGESTIONS=39]="TRIBE_QUESTION_SUGGESTIONS",e[e.TRIBE_QUESTIONS=40]="TRIBE_QUESTIONS",e[e.EXPLORE_PAGE=41]="EXPLORE_PAGE",e[e.ADMIN_TRIBE_SUBMISSIONS_PENDING=42]="ADMIN_TRIBE_SUBMISSIONS_PENDING",e[e.ADMIN_TRIBE_SUBMISSIONS_FILTERED=43]="ADMIN_TRIBE_SUBMISSIONS_FILTERED",e[e.ADMIN_TRIBE_SUBMISSIONS_ALL=44]="ADMIN_TRIBE_SUBMISSIONS_ALL",e[e.VIEWER_TRIBE_SUBMISSIONS=45]="VIEWER_TRIBE_SUBMISSIONS",e[e.ADMIN_TRIBE_SUBMISSIONS_RANKED=46]="ADMIN_TRIBE_SUBMISSIONS_RANKED",e[e.USER_PROFILE_ACTIVITY=47]="USER_PROFILE_ACTIVITY",e[e.UNANSWERED_QUESTIONS_IN_TRIBE=48]="UNANSWERED_QUESTIONS_IN_TRIBE",e[e.TRIBE_CONTENT_QUEUE_ITEMS=49]="TRIBE_CONTENT_QUEUE_ITEMS"}(a||(a={})),t.a=a},"aW/A":function(e,t,n){"use strict";var a={};n.r(a),n.d(a,"default",function(){return c});var i,r=n("8ZkK"),l=n.n(r),o=n("tQZz"),E=n.n(o),u=n("7eVb"),s=n.n(u),S=n("n3k3"),I=n.n(S),d=n("10u2"),_=n.n(d),T={kind:"Fragment",name:"TribeCover_tribe",type:"Tribe",metadata:null,argumentDefinitions:[],selections:[{kind:"ScalarField",alias:null,name:"id",args:null,storageKey:null},{kind:"ScalarField",alias:null,name:"__typename",args:null,storageKey:null},{kind:"ScalarField",alias:null,name:"colorHex",args:null,storageKey:null},{kind:"ScalarField",alias:null,name:"coverPhotoUrl",args:[{kind:"Literal",name:"size",value:"RECTANGLE_LARGE"}],storageKey:'coverPhotoUrl(size:"RECTANGLE_LARGE")'},{kind:"ScalarField",alias:"coverPhotoRetinaUrl",name:"coverPhotoUrl",args:[{kind:"Literal",name:"size",value:"RECTANGLE_LARGE_RETINA"}],storageKey:'coverPhotoUrl(size:"RECTANGLE_LARGE_RETINA")'},{kind:"ScalarField",alias:null,name:"url",args:null,storageKey:null}],hash:"466ccf6820540c3fe986ec815af77e63"},c=T,N=n("q1tI"),m=n("RA+f"),O=n("nwxp"),R=n("FfZq"),b=n("T5JH"),g=n("VyO/"),f=n("VwdU"),A=function(e){function t(){return l()(this,t),s()(this,I()(t).apply(this,arguments))}return _()(t,e),E()(t,[{key:"getHeight",value:function(e){var t=O.f?R.m.MOBILE:R.m.DESKTOP,n=t.IMAGE_HEIGHT,a=t.COLOR_HEIGHT;return e?n:a}},{key:"render",value:function(){var e=this.props,t=e.linked,n=e.height,a=this.props.tribe,i=a.colorHex,r=void 0===i?"gray_dark":i,l=a.coverPhotoUrl,o=a.coverPhotoRetinaUrl,E=a.url,u=l||r,s=!!l,S={height:n||this.getHeight(s)};return N.createElement(f.a,{condition:t,wrapper:function(e){return N.createElement(m.p,{href:E,navStyle:"present"},e)}},N.createElement(m.d,null,s?N.createElement(b.a,Object.assign({src:u,retinaSrc:o,imageBorder:!1},S)):N.createElement(m.d,Object.assign({bg:u},S))))}}]),t}(N.Component);A.displayName="TribeCover",A.fragments={tribe:void 0!==i?i:i=a};t.a=Object(g.b)(A)},bIpX:function(e,t,n){"use strict";n.r(t);var a={};n.r(a),n.d(a,"default",function(){return N});var i={};n.r(i),n.d(i,"default",function(){return b});var r={};n.r(r),n.d(r,"default",function(){return f});var l=n("8ZkK"),o=n.n(l),E=n("tQZz"),u=n.n(E),s=n("7eVb"),S=n.n(s),I=n("n3k3"),d=n.n(I),_=n("10u2"),T=n.n(_),c=function(){var e=[{kind:"LocalArgument",name:"tribeId",type:"BigInt!",defaultValue:null}],t=[{kind:"Variable",name:"tribeId",variableName:"tribeId"}],n={kind:"ScalarField",alias:null,name:"id",args:null,storageKey:null},a={kind:"ScalarField",alias:null,name:"__typename",args:null,storageKey:null};return{kind:"Request",fragment:{kind:"Fragment",name:"QEmailOptOutPageLoadableQuery",type:"QueryRoot",metadata:null,argumentDefinitions:e,selections:[{kind:"LinkedField",alias:null,name:"tribe",storageKey:null,args:t,concreteType:"Tribe",plural:!1,selections:[{kind:"FragmentSpread",name:"TribeEmailUnsubscribeMain_tribe",args:null}]}]},operation:{kind:"Operation",name:"QEmailOptOutPageLoadableQuery",argumentDefinitions:e,selections:[{kind:"LinkedField",alias:null,name:"tribe",storageKey:null,args:t,concreteType:"Tribe",plural:!1,selections:[n,a,{kind:"ScalarField",alias:null,name:"name",args:null,storageKey:null},{kind:"ScalarField",alias:null,name:"tribeId",args:null,storageKey:null},{kind:"ScalarField",alias:null,name:"isFollowing",args:null,storageKey:null},{kind:"ScalarField",alias:null,name:"emailNotifSetting",args:null,storageKey:null},{kind:"ScalarField",alias:null,name:"colorHex",args:null,storageKey:null},{kind:"ScalarField",alias:null,name:"coverPhotoUrl",args:[{kind:"Literal",name:"size",value:"RECTANGLE_LARGE"}],storageKey:'coverPhotoUrl(size:"RECTANGLE_LARGE")'},{kind:"ScalarField",alias:"coverPhotoRetinaUrl",name:"coverPhotoUrl",args:[{kind:"Literal",name:"size",value:"RECTANGLE_LARGE_RETINA"}],storageKey:'coverPhotoUrl(size:"RECTANGLE_LARGE_RETINA")'},{kind:"ScalarField",alias:null,name:"url",args:null,storageKey:null},{kind:"ScalarField",alias:null,name:"followerCount",args:null,storageKey:null},{kind:"ScalarField",alias:null,name:"viewerCanContribute",args:null,storageKey:null},{kind:"ScalarField",alias:null,name:"viewerCanAdmin",args:null,storageKey:null},{kind:"ScalarField",alias:null,name:"notifStatus",args:null,storageKey:null},{kind:"ScalarField",alias:null,name:"isMuted",args:null,storageKey:null},{kind:"ScalarField",alias:null,name:"viewerIsOnlyAdmin",args:null,storageKey:null},{kind:"LinkedField",alias:null,name:"owner",storageKey:null,args:null,concreteType:"TribeUser",plural:!1,selections:[{kind:"LinkedField",alias:null,name:"user",storageKey:null,args:null,concreteType:"User",plural:!1,selections:[n,a,{kind:"ScalarField",alias:null,name:"uid",args:null,storageKey:null}]},n]}]}]},params:{operationKind:"query",name:"QEmailOptOutPageLoadableQuery",id:"7494deb7de47bc4f59bf9ad3da39c35b26d9e01f0b642117df7ce9ba3adf604b",text:null,metadata:{}}}}();c.hash="e468c8ec952a640407706591d3c1da73";var N=c,m=n("q1tI"),O=function(){var e=[{kind:"LocalArgument",name:"tribeId",type:"BigInt!",defaultValue:null},{kind:"LocalArgument",name:"value",type:"Int!",defaultValue:null}],t=[{kind:"LinkedField",alias:null,name:"tribeSetEmailNotifSetting",storageKey:null,args:[{kind:"Variable",name:"tribeId",variableName:"tribeId"},{kind:"Variable",name:"value",variableName:"value"}],concreteType:"TribeSetEmailNotifSetting",plural:!1,selections:[{kind:"LinkedField",alias:null,name:"tribe",storageKey:null,args:null,concreteType:"Tribe",plural:!1,selections:[{kind:"ScalarField",alias:null,name:"id",args:null,storageKey:null},{kind:"ScalarField",alias:null,name:"__typename",args:null,storageKey:null},{kind:"ScalarField",alias:null,name:"tribeId",args:null,storageKey:null},{kind:"ScalarField",alias:null,name:"emailNotifSetting",args:null,storageKey:null}]}]}];return{kind:"Request",fragment:{kind:"Fragment",name:"TribeEmailUnsubscribeMain_tribeSetEmailNotifSetting_Mutation",type:"MutationRoot",metadata:null,argumentDefinitions:e,selections:t},operation:{kind:"Operation",name:"TribeEmailUnsubscribeMain_tribeSetEmailNotifSetting_Mutation",argumentDefinitions:e,selections:t},params:{operationKind:"mutation",name:"TribeEmailUnsubscribeMain_tribeSetEmailNotifSetting_Mutation",id:"f971464f00eeef7c51662b07bba31fb91723a74ee61c45c6ddc9b601e6322569",text:null,metadata:{}}}}();O.hash="7bfa831095d58a9448df04eb3d7507ab";var R,b=O,g={kind:"Fragment",name:"TribeEmailUnsubscribeMain_tribe",type:"Tribe",metadata:null,argumentDefinitions:[],selections:[{kind:"ScalarField",alias:null,name:"id",args:null,storageKey:null},{kind:"ScalarField",alias:null,name:"__typename",args:null,storageKey:null},{kind:"ScalarField",alias:null,name:"name",args:null,storageKey:null},{kind:"ScalarField",alias:null,name:"tribeId",args:null,storageKey:null},{kind:"ScalarField",alias:null,name:"isFollowing",args:null,storageKey:null},{kind:"ScalarField",alias:null,name:"emailNotifSetting",args:null,storageKey:null},{kind:"FragmentSpread",name:"TribeCover_tribe",args:null},{kind:"FragmentSpread",name:"TribeFollow_tribe",args:null},{kind:"FragmentSpread",name:"TribeLink_tribe",args:null},{kind:"FragmentSpread",name:"TribeNotifs_tribe",args:null}],hash:"e91b7c6760be4dc55760afe110ef9625"},f=g,A=n("VyO/"),p=n("FuLD"),L=n("nwxp"),B=n("6aqD"),U=n("VwvB"),G=n("6lcX"),P=n("/WJJ"),D=n("AFGi"),k=n("HuEa"),y=n("RA+f"),F=n("jufJ");!function(e){e[e.ENABLED=1]="ENABLED",e[e.DISABLED=2]="DISABLED"}(R||(R={}));var v,h,C=R,M=n("LW3J"),K=n("/bbo"),H=n("aW/A"),Q=n("JYZc"),W=n("BXNm"),w=n("Khkn"),j=function(e){function t(){var e,n;o()(this,t);for(var a=arguments.length,i=new Array(a),r=0;r<a;r++)i[r]=arguments[r];return(n=S()(this,(e=d()(t)).call.apply(e,[this].concat(i)))).getMutationOptions=function(){var e=n.props.tribe,a=e.tribeId,i=null;i=e.emailNotifSetting===C.ENABLED?C.DISABLED:C.ENABLED;var r={tribeSetEmailNotifSetting:{tribe:{id:e.id,__typename:e.__typename,tribeId:a,emailNotifSetting:i}}};return{mutation:t.mutations.tribeSetEmailNotifSettingMutation,variables:{tribeId:a,value:i},optimisticResponse:r}},n}return T()(t,e),u()(t,[{key:"getSettingsButton",value:function(){var e=this.props.tribe,t=e.emailNotifSetting,n=e.isFollowing,a=t===C.ENABLED;return Object(p.a)()&&!n&&(a=!1),L.b?m.createElement(A.a,this.getMutationOptions(),function(e){return m.createElement(P.a,{checked:a,onChange:function(){return e()}})}):m.createElement(A.a,this.getMutationOptions(),function(e){return m.createElement(k.a,{enabled:a,onChange:function(){return e()}})})}},{key:"renderHeaderDetails",value:function(){return m.createElement(y.d,{mb:"medium",pb:"medium",borderBottom:!0},m.createElement(y.s,{fontSize:"large",textAlign:"center",py:"medium"},m.createElement(F.x,null,"Your notification settings for"," ",m.createElement(y.s,{display:"inline",bold:!0},m.createElement(w.a,{tribe:this.props.tribe})))))}},{key:"renderEmailSection",value:function(){return m.createElement(y.j,{mb:"medium",pb:"medium",borderBottom:!0,alignItems:"center",justifyContent:"space-between"},m.createElement(y.d,{mr:"medium"},m.createElement(F.x,null,"Receive emails with trending content")),this.getSettingsButton())}},{key:"renderNotificationSection",value:function(){var e=this.props.tribe;return Object(p.a)()?m.createElement(y.j,{mb:"medium",pb:"medium",borderBottom:!0,alignItems:"center",justifyContent:"space-between"},m.createElement(y.d,{mr:"medium"},m.createElement(F.x,null,"Change whether or not you are notified about new content")),m.createElement(W.c,{useButtonPillStyle:!0,tribe:e,disabled:!Object(p.a)()})):null}},{key:"renderFollowSection",value:function(){return m.createElement(y.j,{mb:"medium",pb:"medium",borderBottom:!0,alignItems:"center",justifyContent:"space-between"},m.createElement(y.d,{mr:"medium"},m.createElement(F.x,null,"Follow"," ",m.createElement(y.s,{display:"inline",bold:!0},m.createElement(w.a,{tribe:this.props.tribe}))," ","to see content in your feed")),m.createElement(Q.a,{tribe:this.props.tribe,followSource:"tribes_tab"}))}},{key:"render",value:function(){var e=this.props,t=e.tribe,n=e.variant;return"react_attached_unsub_link"===n?m.createElement(G.b,{desktopColumnCount:1},m.createElement(y.d,{mt:L.b&&"large"},m.createElement(U.e,null,m.createElement(H.a,{tribe:t,linked:!0}),m.createElement(y.d,{p:L.b?"large":"medium"},this.renderHeaderDetails(),this.renderEmailSection(),this.renderNotificationSection(),this.renderFollowSection(),m.createElement(y.s,{color:"gray_light",passColorToLinks:!0,fontSize:"small"},m.createElement(y.j,null,m.createElement(M.a,null,m.createElement(K.a,{onClick:function(){return Object(y.u)("https://help.quora.com")},text:Object(F.H)("Help Center"),variant:"gray"}),m.createElement(y.p,{href:"/settings/notifications"},m.createElement(F.x,null,"Settings"))))))))):"react_detached_unsub_link"===n?m.createElement(G.b,{desktopColumnCount:1},m.createElement(y.d,{mt:L.b&&"large"},m.createElement(U.e,null,m.createElement(H.a,{tribe:t,linked:!0}),m.createElement(y.d,{p:L.b?"large":"medium"},this.renderHeaderDetails(),this.renderEmailSection(),this.renderNotificationSection(),this.renderFollowSection())),m.createElement(y.s,{color:"gray_light",mt:"small",passColorToLinks:!0,fontSize:"small"},m.createElement(F.x,null,"To manage other settings, visit"," ",m.createElement(y.p,{href:"/settings/notifications"},m.createElement(y.s,{as:"span",textDecoration:"underline"},"Settings")))))):m.createElement(G.b,{desktopColumnCount:1},m.createElement(y.d,{mt:L.b&&"large"},m.createElement(U.e,null,m.createElement(H.a,{tribe:t,linked:!0}),m.createElement(y.d,{p:L.b?"large":"medium"},this.renderHeaderDetails(),this.renderEmailSection(),this.renderNotificationSection(),this.renderFollowSection()))))}}]),t}(Object(B.q)(m.Component));j.fragments={tribe:void 0!==v?v:v=r},j.mutations={tribeSetEmailNotifSettingMutation:void 0!==h?h:h=i},j.renderPlaintext=function(e){return Object(D.m)(e.tribe.name)};var x,V=Object(A.b)(j);n.d(t,"default",function(){return Y});var Y=function(e){function t(){return o()(this,t),S()(this,d()(t).apply(this,arguments))}return T()(t,e),u()(t,[{key:"render",value:function(){var e=this.props.data.tribe,t=this.props.variant;return m.createElement(V,{tribe:e,variant:t})}}]),t}(m.Component);Y.displayName="QEmailOptOutPageLoadable",Y.getInitialQuery=function(){return void 0!==x?x:x=a}},oJdr:function(e,t,n){"use strict";n.d(t,"a",function(){return r});var a=n("0xW3"),i=n("yju1"),r=function(e){var t=e.message,n=e.error,r=void 0!==n&&n,l=e.action,o=void 0===l?null:l;if(Object(a.isWebnodeLoaded)())Object(a.showWebnodePmsg)(t,r);else{var E="success";r&&(E="error"),Object(i.a)("showPMsg",{message:t,action:o,style:E})}}}}]);