1import{g as gt}from"./chunk-MYXUK5FB.js";import{a as $,b as tt}from"./chunk-APVZTDGF.js";import{a as lt,b as ct,c as dt,h as pt}from"./chunk-WBRYU4Q3.js";import{a as st}from"./chunk-VULJES4V.js";import{a as rt}from"./chunk-Q6VLLJZL.js";import{d as mt}from"./chunk-BOFCOMAB.js";import"./chunk-6XCJXX76.js";import{J as Z,g as H,h as W,i as Y,l as c,o as K,s as Q,v as X}from"./chunk-HEWYM2BV.js";import"./chunk-DRFV27XN.js";import{h as at}from"./chunk-6UAV3LWH.js";import"./chunk-T52XRCMA.js";import"./chunk-OG552DVI.js";import"./chunk-PVDLPPXZ.js";import"./chunk-JZGL3MPO.js";import"./chunk-A4IKLA77.js";import"./chunk-D7NNFQ5S.js";import{a as q,b as L}from"./chunk-BQNXIC4V.js";import{d as j,e as V}from"./chunk-ELGZLNOE.js";import"./chunk-PUS4KT7E.js";import"./chunk-7CD2UVCS.js";import{a as B,f as R}from"./chunk-7LFE6CSV.js";import{e as nt}from"./chunk-HCSZOK6A.js";import{b as J}from"./chunk-7VTO4BUQ.js";import{v as A}from"./chunk-HFRZY4XY.js";import"./chunk-2TPHSDKA.js";import{Ac as G,Bb as E,Db as f,Dc as D,Ma as s,Na as g,Ob as a,Pb as T,Qb as U,Sc as z,_ as S,_a as v,ac as F,ga as k,ha as w,hb as l,kd as et,md as it,oa as b,pa as P,sb as n,sd as ot,tb as o,ub as O,yb as I}from"./chunk-YSZEO4OX.js";import{b as N}from"./chunk-XIA4NYXV.js";import"./chunk-IJYXSRJ2.js";var ut=(i,t)=>({"fx-row":i,"fx-column":t});function ht(i,t){i&1&&(n(0,"div",6)(1,"p"),a(2,"We were unable to authenticate your access to this page. Please make sure you are using the link provided in your email and try again."),o()())}function _t(i,t){i&1&&(n(0,"mat-slide-toggle",26),a(1,"Comments on your stories "),o())}function Ct(i,t){i&1&&(n(0,"mat-slide-toggle",27),a(1,"Comments on your posts "),o())}function vt(i,t){i&1&&(n(0,"mat-slide-toggle",28),a(1,"Joins your membership "),o())}function Mt(i,t){i&1&&(n(0,"mat-slide-toggle",29),a(1,"Upgrades to one of your memberships "),o())}function xt(i,t){i&1&&(n(0,"mat-slide-toggle",30),a(1,"Leaves your membership "),o())}function bt(i,t){if(i&1){let e=I();n(0,"form",9),E("submit",function(){b(e);let m=f(2);return P(m.submitSettingsUpdate())}),n(1,"div",10)(2,"mat-card-title",11),a(3,"Email Delivery Settings"),o(),n(4,"mat-card-content",12)(5,"div",13)(6,"div",13)(7,"strong")(8,"div"),a(9,"Receive emails when one of the authors you follow..."),o()(),n(10,"mat-slide-toggle",14),a(11,"Updates a story "),o(),n(12,"mat-slide-toggle",15),a(13,"Posts to their board "),o()(),n(14,"div",13)(15,"strong")(16,"div"),a(17,"Receive emails when you..."),o()(),n(18,"mat-slide-toggle",16),a(19,"Join a membership "),o(),n(20,"mat-slide-toggle",17),a(21,"Are charged "),o()()(),n(22,"div",13)(23,"div",13)(24,"strong")(25,"div"),a(26,"Receive emails when someone..."),o()(),n(27,"mat-slide-toggle",18),a(28,"Replies to your comments "),o(),v(29,_t,2,0,"mat-slide-toggle",19)(30,Ct,2,0,"mat-slide-toggle",20)(31,vt,2,0,"mat-slide-toggle",21)(32,Mt,2,0,"mat-slide-toggle",22)(33,xt,2,0,"mat-slide-toggle",23),o(),n(34,"div",13)(35,"strong")(36,"div"),a(37),o()(),n(38,"mat-slide-toggle",24),a(39,"Has announcements "),o()()()(),n(40,"button",25),E("click",function(){b(e);let m=f(2);return P(m.submitSettingsUpdate())}),a(41,"Submit"),o()()()}if(i&2){let e=f(2);l("formGroup",e.formGroup),s(4),l("ngClass",F(9,ut,!e.bpService.ltmd,e.bpService.ltmd)),s(25),l("ngIf",e.isAuthor),s(),l("ngIf",e.isAuthor),s(),l("ngIf",e.isAuthor),s(),l("ngIf",e.isAuthor),s(),l("ngIf",e.isAuthor),s(4),U("Receive emails when the ",e.brand.appName," Team..."),s(3),l("disabled",!e.emailNotificationsData)}}function Pt(i,t){if(i&1&&(n(0,"mat-card",7),v(1,bt,42,12,"form",8),o()),i&2){let e=f();s(),l("ngIf",e.formGroup)}}function Et(i,t){if(i&1&&(n(0,"div",31)(1,"mat-card",32)(2,"mat-card-title"),a(3,"Unable to Load Email Settings"),o(),n(4,"mat-card-content")(5,"p"),a(6),o()()()()),i&2){let e=f();s(6),T(e.errorMessage)}}function yt(i,t){i&1&&O(0,"mat-progress-spinner",33)}var p,M=(p=class{constructor(t,e,r,m,d){this.activatedRoute=t,this.router=e,this.userApiService=r,this.snackBar=m,this.bpService=d,this.brand=nt,this.token=null,this.missingToken=!1,this.isAuthor=!1,this.loading=!0,this.errorMessage="Unable to retrieve email settings."}
1ngOnInit(){var d;let t=window.location.search,e=t||((d=window.location.hash)==null?void 0:d.replace("#/email-verify?","")),m=new URLSearchParams(e).get("token");if(this.token=m||"",!m){this.missingToken=!0,this.loading=!1,this.snackBar.open("Unable to authenticate access.","close",{duration:6e3,horizontalPosition:"center",verticalPosition:"top"});return}this.getNotificationSettings()}getNotificationSettings(){this.token&&this.userApiService.getEmailSettingsFromToken({Token:this.token}).subscribe({next:t=>{this.emailNotificationsData=t,this.setupFormGroup(),this.loading=!1},error:t=>{var e;this.loading=!1,this.errorMessage=((e=t==null?void 0:t.error)==null?void 0:e.Message)||"Unable to retrieve email settings.",this.snackBar.open(this.errorMessage,"close",{duration:6e3,horizontalPosition:"center",verticalPosition:"top"})}})}setupFormGroup(){var t,e,r,m,d,u,h,_,C,x,y;this.formGroup=new Y({emailReam:new c((t=this.emailNotificationsData)==null?void 0:t.EmailFromReam),emailAuthorUpdates:new c((e=this.emailNotificationsData)==null?void 0:e.EmailSubUpdates),emailAuthorPost:new c((r=this.emailNotificationsData)==null?void 0:r.EmailSubPosts),emailComments:new c((m=this.emailNotificationsData)==null?void 0:m.EmailFromComments),emailFromJoinControl:new c((d=this.emailNotificationsData)==null?void 0:d.EmailFromJoin),emailChargedControl:new c((u=this.emailNotificationsData)==null?void 0:u.EmailFromCharged),emailPostComments:new c((h=this.emailNotificationsData)==null?void 0:h.EmailPostComments),emailBookComments:new c((_=this.emailNotificationsData)==null?void 0:_.EmailBookComments),emailMembershipJoin:new c((C=this.emailNotificationsData)==null?void 0:C.EmailMembershipJoin),emailMembershipUpgrade:new c((x=this.emailNotificationsData)==null?void 0:x.EmailMembershipUpgrade),emailMembershipCancel:new c((y=this.emailNotificationsData)==null?void 0:y.EmailMembershipCancel)})}submitSettingsUpdate(){var t,e,r,m,d,u,h,_,C;if(!this.formGroup.valid){this.snackBar.open("Please fill in all required fields.","close",{duration:6e3,horizontalPosition:"center",verticalPosition:"top"});return}this.token?(this.loading=!0,this.userApiService.setEmailSettingsFromToken({Token:this.token,EmailFromReam:(t=this.formGroup.get("emailReam"))==null?void 0:t.value,EmailSubUpdates:(e=this.formGroup.get("emailAuthorUpdates"))==null?void 0:e.value,EmailSubPosts:(r=this.formGroup.get("emailAuthorPost"))==null?void 0:r.value,EmailFromComments:(m=this.formGroup.get("emailComments"))==null?void 0:m.value,EmailBookComments:(d=this.formGroup.get("emailBookComments"))==null?void 0:d.value,EmailPostComments:(u=this.formGroup.get("emailPostComments"))==null?void 0:u.value,EmailMembershipJoin:(h=this.formGroup.get("emailMembershipJoin"))==null?void 0:h.value,EmailMembershipUpgrade:(_=this.formGroup.get("emailMembershipUpgrade"))==null?void 0:_.value,EmailMembershipCancel:(C=this.formGroup.get("emailMembershipCancel"))==null?void 0:C.value}).subscribe({next:x=>{this.loading=!1,this.snackBar.open("Email settings updated.","close",{duration:6e3,horizontalPosition:"center",verticalPosition:"top"})},error:()=>{this.loading=!1,this.snackBar.open("Failed to update email settings.","close",{duration:6e3,horizontalPosition:"center",verticalPosition:"top"})}})):this.snackBar.open("Missing required token.","close",{duration:6e3,horizontalPosition:"center",verticalPosition:"top"})}},p.\u0275fac=function(e){return new(e||p)(g(et),g(it),g(at),g(j),g(rt))},p.\u0275cmp=k({type:p,selectors:[["app-email-notifications"]],decls:8,vars:4,consts:[[1,"container"],["class","missing-token",4,"ngIf"],["class","basic-elevation notifications-card fx-flex",4,"ngIf"],["class","load-error",4,"ngIf"],[1,"spinner"],["mode","indeterminate",4,"ngIf"],[1,"missing-token"],[1,"basic-elevation","notifications-card","fx-flex"],[3,"formGroup","submit",4,"ngIf"],[3,"submit","formGroup"],[1,"fx-flex","fx-column","fx-row-gap-sm"],[1,"small-title"],[1,"fx-flex","fx-row-gap-sm","fx-column-gap-sm",3,"ngClass"],[1,"fx-column","fx-row-gap-xs"],["color","primary","formControlName","emailAuthorUpdates"],["color","primary","formControlName","emailAuthorPost"],["color","primary","formControlName","emailFromJoinControl"],["color","primary","formControlName","emailChargedControl"],["color","primary","formControlName","emailComments"],["color","primary","formControlName","emailBookComments",4,"ngIf"],["color","primary","formControlName","emailPostComments",4,"ngIf"],["color","primary","formControlName","emailMembershipJoin",4,"ngIf"],["color","primary","formControlName","emailMembershipUpgrade",4,"ngIf"],["color","primary","formControlName","emailMembershipCancel",4,"ngIf"],["color","primary","formControlName","emailReam"],["type","submit","mat-raised-button","","color","primary",3,"click","disabled"],["color","primary","formControlName","emailBookComments"],["color","primary","formControlName","emailPostComments"],["color","primary","formControlName","emailMembershipJoin"],["color","primary","formControlName","emailMembershipUpgrade"],["color","primary","formControlName","emailMembershipCancel"],[1,"load-error"],[1,"basic-elevation"],["mode","indeterminate"]],template:function(e,r){e&1&&(n(0,"div",0)(1,"h1"),a(2,"Email Notifications"),o(),v(3,ht,3,0,"div",1)(4,Pt,2,1,"mat-card",2)(5,Et,7,1,"div",3),o(),n(6,"div",4),v(7,yt,1,0,"mat-progress-spinner",5),o()),e&2&&(s(3),l("ngIf",r.missingToken),s(),l("ngIf",!r.loading&&!r.missingToken&&r.emailNotificationsData),s(),l("ngIf",!r.loading&&!r.missingToken&&!r.emailNotificationsData),s(2),l("ngIf",r.loading))}
1,dependencies:[G,D,lt,dt,ct,K,H,W,Q,X,B,$,q],styles:["mat-progress-spinner[_ngcontent-%COMP%]{position:absolute;left:calc(50% - 50px);top:calc(50% - 50px)}h1[_ngcontent-%COMP%]{padding:0;margin:0 0 1rem;font-size:2rem}.container[_ngcontent-%COMP%]{background:var(--ream-page);padding:2rem;min-height:100%}@media only screen and (max-width: 959.98px){.container[_ngcontent-%COMP%]{padding:2rem 1rem}}.expand[_ngcontent-%COMP%]{height:100%}.card-set[_ngcontent-%COMP%]{margin:1rem 0 0}code[_ngcontent-%COMP%]{padding:.5rem;background-color:var(--ream-border);border-radius:10px 0 0 5px;max-width:calc(100% - 5rem);display:inline-flex;overflow:hidden}.mat-card-footer[_ngcontent-%COMP%]{display:block;margin:0!important;position:absolute;bottom:0;left:0;right:0}.mat-card-title.small-title[_ngcontent-%COMP%]{font-size:1.25rem}.mat-card-title.small-title-with-sub[_ngcontent-%COMP%]{margin:0 0 .35rem;padding:0;font-size:1.25rem}.mat-card-title.small-title-subs[_ngcontent-%COMP%]{font-size:1.25rem;margin:0 0 .5rem}.mat-card-title[_ngcontent-%COMP%]{font-size:2rem;margin:0 0 1rem}.mat-card-subtitle[_ngcontent-%COMP%]{font-size:1rem;color:var(--ream-text-secondary)}mat-icon.info[_ngcontent-%COMP%]{font-size:1rem;transform:translateY(.15rem);color:var(--ream-text-muted)}mat-slide-toggle[_ngcontent-%COMP%]{margin:.5rem 0 0}mat-form-field[_ngcontent-%COMP%]{width:100%}.fill[_ngcontent-%COMP%]{height:100%}.logo-container[_ngcontent-%COMP%]{width:6rem;height:6rem}.logo-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:var(--ream-text);opacity:.9;position:absolute;z-index:2;filter:brightness(0%);transition:all .2s;opacity:.5}.author-logo[_ngcontent-%COMP%]{border-radius:50%;border:solid #aaaaaa 4px;background-repeat:round;background-color:var(--ream-surface-soft);z-index:1;position:absolute;transition:all .2s}.logo-container-edit[_ngcontent-%COMP%]:hover .author-logo[_ngcontent-%COMP%]{cursor:pointer;border:solid #202020 4px}.logo-container-edit[_ngcontent-%COMP%]:hover mat-icon[_ngcontent-%COMP%]{font-size:3rem;transform:translate(-.75rem,-.75rem);cursor:pointer}.author-logo-large[_ngcontent-%COMP%]{width:6rem;height:6rem}.author-logo-small[_ngcontent-%COMP%]{width:5rem;height:5rem}.affiliate-card[_ngcontent-%COMP%]{max-width:800px}.affiliate-card[_ngcontent-%COMP%] mat-card-content[_ngcontent-%COMP%]{font-size:1rem}strong[_ngcontent-%COMP%]{margin:.5rem 0 0;font-size:1rem;font-weight:600}.social-card[_ngcontent-%COMP%]{min-width:10rem}.url-name-set[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{height:56px}.url-name-set[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{width:21rem}"]}),p);M=N([st()],M);var ee=(()=>{let t=class t{};t.\u0275fac=function(m){return new(m||t)},t.\u0275mod=w({type:t}),t.\u0275inj=S({imports:[z,A,pt,Z,gt,mt,J,R,V,tt,L,ot.forChild([{path:"",component:M}])]});let i=t;return i})();export{ee as EmailNotificationsModule};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.