PageSourceSearch

https://human.biodigital.com/664.40ee2031dbf4b420.js

js biodigital.com collected 2026-09-24 08:58:31 UTC 284,374 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkweb=self.webpackChunkweb||[]).push([[664],{18986:(ut,ie,c)=>{c.d(ie,{T:()=>V});var d=c(4020);const E=["*"];let V=(()=>{class oe{constructor(){}ngOnInit(){}static#e=this.\u0275fac=function(C){return new(C||oe)};static#t=this.\u0275cmp=d.VBU({type:oe,selectors:[["app-navigation-list-container"]],ngContentSelectors:E,decls:2,vars:0,consts:[[1,"navigation-list-container"]],template:function(C,R){1&C&&(d.NAR(),d.j41(0,"div",0),d.SdG(1),d.k0s())},styles:[".navigation-list-container[_ngcontent-%COMP%]{display:flex;flex-direction:column}"],changeDetection:0})}return oe})()},40238:(ut,ie,c)=>{c.r(ie),c.d(ie,{InternalDevGuard:()=>vt,InternalDevModule:()=>Ct});var d=c(60177),E=c(51188),V=c(45312),oe=c(95085),dt=c(96354),l=c(54843),C=c(35084),R=c(31082),_=c(1661),B=c(67376),ue=c(44017),J=c(21075),h=c(96438),Re=c(2578),g=c.n(Re),m=c(4020),de=c(21626),se=c(74369),e=c(21688),S=c(71902),W=c(49113);function ze(D,z){if(1&D&&(m.j41(0,"app-list-item")(1,"b",3),m.EFF(2,"AWS Voice ID:"),m.k0s(),m.EFF(3),m.k0s()),2&D){const I=z.$implicit;m.R7$(3),m.SpI(" ",null==I?null:I.voiceId," ")}}function N(D,z){if(1&D&&(m.j41(0,"app-list-item")(1,"b",3),m.EFF(2,"Alias Locale ID:"),m.k0s(),m.EFF(3),m.k0s()),2&D){const I=m.XpG().$implicit,x=m.XpG();m.R7$(3),m.SpI(" ",x.localeNormalizationMap[I.id]," ")}}function mt(D,z){if(1&D&&(m.j41(0,"app-list-item")(1,"b",3),m.EFF(2),m.k0s(),m.j41(3,"app-list",7)(4,"app-list-item")(5,"b",3),m.EFF(6,"ID:"),m.k0s(),m.EFF(7),m.k0s(),m.j41(8,"app-list-item")(9,"b",3),m.EFF(10,"URL Language:"),m.k0s(),m.EFF(11),m.k0s(),m.j41(12,"app-list-item")(13,"b",3),m.EFF(14,"Supported Applications:"),m.k0s(),m.EFF(15),m.k0s(),m.DNE(16,ze,4,1,"app-list-item",8)(17,N,4,1,"app-list-item",8),m.k0s()()),2&D){const I=z.$implicit,x=m.XpG();m.R7$(2),m.JRh(I.title),m.R7$(5),m.SpI(" ",I.id," "),m.R7$(4),m.SpI(" ",I.lang," "),m.R7$(4),m.SpI(" ",x.formatApplications(I.applications)," "),m.R7$(),m.Y8G("ngIf",x.localeIdVoices[I.id]),m.R7$(),m.Y8G("ngIf",x.localeNormalizationMap[I.id])}}let gt=(()=>{class D{constructor(I,x){this.http=I,this.changeRef=x,this.allLocales=R.N9,this.localeIds=R.N9.map(G=>G.id),this.localeNormalizationMap=R.WF,this.localeIdVoices=R.N9.reduce((G,w)=>(G[w.id]=(0,J.Pb)(w.id),G),{}),this.engineVersion=ue.A,this.apiVersion=ue.m}ngOnInit(){}exportTranslationsClick(){const I=(0,C.KS)(this.http,this.localeIds).pipe((0,dt.T)(x=>x.filter(G=>!(0,B.isNil)(G))));(0,l._)(I).then(x=>{this.exportTranslations(x),this.changeRef.markForCheck()})}exportTranslations(I){const x=function ht(D){const z={};return D.forEach(I=>{const{locale:x,translations:G}=I,w=R.WF[x]??x;Object.entries(G).forEach(([X,f])=>{z[X]=z[X]??{},z[X][w]=f})}),z}(I),G=R.N9.filter(f=>f.id!==R.q.id),w=[{label:R.q.id,field:R.q.id},...G.map(f=>{const q=R.WF[f.id]??f.id;return{label:q,field:q}})],X=Object.values(x).sort((f,q)=>{const p=f[R.q.id].trim(),me=q[R.q.id].trim();return p.localeCompare(me)});(0,_.H)(X,w).subscribe(f=>{const p=`human-translations-export-${(new Date).toISOString().split("T")[0]}.csv`,me=new Blob([f],{type:"text/csv;charset=utf-8"});g()(me,p)})}formatApplications(I){return I.map(x=>x===h.c.All?"All":x).join(", ")}static#e=this.\u0275fac=function(x){return new(x||D)(m.rXU(de.Qq),m.rXU(m.gRc))};static#t=this.\u0275cmp=m.VBU({type:D,selectors:[["app-internal-info-component"]],standalone:!1,decls:16,vars:3,consts:[[1,"info"],["label","Engine"],["listType","default",1,"text-base","my-1"],[1,"font-bold"],["label","Internationalization (Translations)"],[4,"ngFor","ngForOf"],["app-button","","buttonType","primary","buttonTheme","light","buttonSize","md",1,"my-2",3,"click"],["listType","default",1,"text-sm"],[4,"ngIf"]],template:function(x,G){1&x&&(m.j41(0,"div",0)(1,"app-panel",1)(2,"app-list",2)(3,"app-list-item")(4,"b",3),m.EFF(5,"Version: "),m.k0s(),m.EFF(6),m.k0s(),m.j41(7,"app-list-item")(8,"b",3),m.EFF(9,"API Version: "),m.k0s(),m.EFF(10),m.k0s()()(),m.j41(11,"app-panel",4)(12,"app-list",2),m.DNE(13,mt,18,6,"app-list-item",5),m.k0s(),m.j41(14,"button",6),m.bIt("click",function(){return G.exportTranslationsClick()}),m.EFF(15," Export Translations "),m.k0s()()()),2&x&&(m.R7$(6),m.SpI(" ",G.engineVersion,""),m.R7$(4),m.SpI(" ",G.apiVersion,""),m.R7$(3),m.Y8G("ngForOf",G.allLocales))},dependencies:[d.Sq,d.bT,se.Q,e.s,S.P,W.g],encapsulation:2,changeDetection:0})}return D})();var ft=c(90432),_t=c(74296);const bt=[{path:"",component:gt}];let vt=(()=>{class D{constructor(){}canLoad(I){return V.c.deploy!==oe.Z.Production}static#e=this.\u0275fac=function(x){return new(x||D)};static#t=this.\u0275prov=m.jDH({token:D,factory:D.\u0275fac,providedIn:"root"})}return D})(),Ct=(()=>{class D{static#e=this.\u0275fac=function(x){return new(x||D)};static#t=this.\u0275mod=m.$C({type:D});static#n=this.\u0275inj=m.G2t({imports:[E.iI.forChild(bt),d.MD,_t.G,ft.C]})}return D})()},42326:(ut,ie,c)=>{c.d(ie,{K:()=>E});const{isArray:d}=Array;function E(V){return 1===V.length&&d(V[0])?V[0]:V}},73575:(ut,ie,c)=>{c.r(ie),c.d(ie,{AccountModule:()=>Dp});var d=c(60177),E=c(51188),V=c(78444),oe=c(14427),dt=c(9340),l=c(66119),C=c(67376),R=c(21413),_=c(71985),B=c(5964),ue=c(96697),J=c(31397),h=c(56977),Re=c(89289),g=c(23036),m=c(39549),de=c(33205),se=c(89458),e=c(4020),S=c(57293),W=c(45312),ze=c(95085),N=c(46765),mt=c(18986);const ht=()=>["/account/profile"],gt=()=>["/account/team"],ft=()=>["/account/settings"],_t=()=>["/account/vr"],bt=()=>["/account/internal"];function vt(n,o){if(1&n&&(e.j41(0,"a",6,3),e.nrm(2,"app-icon",11),e.EFF(3," VR "),e.k0s()),2&n){const t=e.sdS(1);e.Y8G("routerLink",e.lJ4(2,_t)),e.BMQ("aria-current",t.isActive?"page":null)}}function Ct(n,o){if(1&n&&(e.j41(0,"a",6,4),e.nrm(2,"app-icon",12),e.EFF(3," Internal "),e.k0s()),2&n){const t=e.sdS(1);e.Y8G("routerLink",e.lJ4(2,bt)),e.BMQ("aria-current",t.isActive?"page":null)}}let D=(()=>{class n{constructor(){this.enableInternalRoute=W.c.deploy!==ze.Z.Production,this.isValidActiveSubscription=(0,l.Lt)(S.q.isValidActiveSubscription)}static#e=this.\u0275fac=function(i){return new(i||n)};static#t=this.\u0275cmp=e.VBU({type:n,selectors:[["app-account-nav"]],standalone:!1,decls:17,vars:11,consts:[["profileActive","routerLinkActive"],["teamActive","routerLinkActive"],["settingsActive","routerLinkActive"],["vrActive","routerLinkActive"],["internalActive","routerLinkActive"],[1,"nav"],["routerLinkActive","nav__link--active",1,"nav__link",3,"routerLink"],["icon","user-circle",1,"nav__link-icon"],["icon","user-friends",1,"nav__link-icon"],["icon","cog",1,"nav__link-icon"],["routerLinkActive","nav__link--active","class","nav__link",3,"routerLink",4,"ngIf"],["icon","vr-cardboard",1,"nav__link-icon"],["icon","screwdriver-wrench",1,"nav__link-icon"]],template:function(i,s){if(1&i&&(e.j41(0,"app-navigation-list-container")(1,"nav")(2,"div",5)(3,"a",6,0),e.nrm(5,"app-icon",7),e.EFF(6," Account "),e.k0s(),e.j41(7,"a",6,1),e.nrm(9,"app-icon",8),e.EFF(10," Team "),e.k0s(),e.DNE(11,vt,4,3,"a",6),e.j41(12,"a",6,2),e.nrm(14,"app-icon",9),e.EFF(15," Settings "),e.k0s(),e.DNE(16,Ct,4,3,"a",10),e.k0s()()()),2&i){const a=e.sdS(4),r=e.sdS(8),u=e.sdS(13);e.R7$(3),e.Y8G("routerLink",e.lJ4(8,ht)),e.BMQ("aria-current",a.isActive?"page":null),e.R7$(4),e.Y8G("routerLink",e.lJ4(9,gt)),e.BMQ("aria-current",r.isActive?"page":null),e.R7$(4),e.vxM(s.isValidActiveSubscription()?11:-1),e.R7$(),e.Y8G("routerLink",e.lJ4(10,ft)),e.BMQ("aria-current",u.isActive?"page":null),e.R7$(4),e.Y8G("ngIf",s.enableInternalRoute)}},dependencies:[d.bT,E.Wk,E.wQ,N.R,mt.T],styles:[".nav__link[_ngcontent-%COMP%]{font-size:.875rem;line-height:1.25rem;color:#142136;text-decoration:none;display:flex;flex-grow:1;flex-direction:row;align-items:center;padding:8px 20px;min-height:48px;position:relative;border-left:3px solid transparent;outline-offset:-1px}.nav__link[_ngcontent-%COMP%]:hover:not(.nav__link--active){background-color:#f8f9fa}.nav__link-icon[_ngcontent-%COMP%]{padding-right:20px;font-size:1rem;line-height:1.5rem}.nav__link--active[_ngcontent-%COMP%]{font-weight:600;background-color:#f2f5fb;border-left-color:#2472e9}"],changeDetection:0})}return n})();var z=function(n,o,t,i){var r,s=arguments.length,a=s<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,t):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(n,o,t,i);else for(var u=n.length-1;u>=0;u--)(r=n[u])&&(a=(s<3?r(a):s>3?r(o,t,a):r(o,t))||a);return s>3&&a&&Object.defineProperty(o,t,a),a},I=function(n,o){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(n,o)};class x{constructor(o,t,i,s){this.store=o,this.dialogService=t,this.authRoutingService=i,this.router=s,this.breakPoints=m.m,this.ngUnsubscribe=new R.B}ngOnInit(){this.initProfileCheck()}ngOnDestroy(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()}initProfileCheck(){this.userProfile$.pipe((0,B.p)(o=>!(0,C.isNil)(o)&&this.isVerificationRequired(o)),(0,ue.s)(1),(0,J.Z)(()=>this.openVerifyConfirmDialog()),(0,h.Q)(this.ngUnsubscribe)).subscribe(o=>{const t=this.store.selectSnapshot(g.k.getUserProfile),{email:i}=t,{verification_jwt:s}=t.account_verification;o?this.authRoutingService.navigateToVerifyAccount(i,s):this.router.navigate(["/"])})}isVerificationRequired(o){return!0===(0,C.get)(o,"account_verification.verification_required")}openVerifyConfirmDialog(){return this.dialogService.openConfirmDialog({maxWidth:"480px",data:{titleText:"Verify your email",bodyText:"Before you can make changes to your account, we need to verify your email address. Please log out and log back in to complete the verification process.",confirmText:"Log Out",confirmColor:"warn"}}).closed}static#e=this.\u0275fac=function(t){return new(t||x)(e.rXU(l.il),e.rXU(se.o),e.rXU(Re.y),e.rXU(E.Ix))};static#t=this.\u0275cmp=e.VBU({type:x,selectors:[["app-account-master"]],standalone:!1,decls:7,vars:4,consts:[[1,"account"],[1,"account__container"],[1,"account__col"],[1,"account__body"]],template:function(t,i){1&t&&(e.j41(0,"div",0),e.nI1(1,"async"),e.j41(2,"div",1)(3,"div",2),e.nrm(4,"app-account-nav"),e.k0s(),e.j41(5,"div",3),e.nrm(6,"router-outlet"),e.k0s()()()),2&t&&e.AVh("account--fullscreen",e.bMT(1,2,i.horizontalBreakpoint$)<i.breakPoints.Large)},dependencies:[E.n3,D,d.Jj],styles:[".account[_ngcontent-%COMP%]{background:#fff;display:flex;justify-content:center;padding-top:24px}.account__container[_ngcontent-%COMP%]{flex:0 1 900px;display:flex}.account__col[_ngcontent-%COMP%]{flex:0 0 160px;padding-right:20px}.account__body[_ngcontent-%COMP%]{border-left:1px solid #d4d9e3;padding-left:20px;flex:1 1 100%}.account--fullscreen[_ngcontent-%COMP%]   .account__container[_ngcontent-%COMP%]{flex:0 1 100%}.account--fullscreen[_ngcontent-%COMP%]   .account__col[_ngcontent-%COMP%]{display:none}.account--fullscreen[_ngcontent-%COMP%]   .account__body[_ngcontent-%COMP%]{padding:0 20px;border:none}"],changeDetection:0})}z([(0,l.l6)(g.k.getUserProfile),I("design:type",_.c)],x.prototype,"userProfile$",void 0),z([(0,l.l6)(de.V.getHorizontalBreakpoint),I("design:type",_.c)],x.prototype,"horizontalBreakpoint$",void 0);var G=c(57786),w=c(96354),X=c(37498),f=c(67787),q=c(71997),p=c(89417),me=c(84572),Ge=c(23294),Se=c(30102),he=function(n){return n.MedicalDevice="Medical Device",n.Pharma="Pharma",
1n.ConsumerHealth="Consumer Health",n.EdTraining="Education & Training",n.DigitalHealth="Digital Health",n.ProviderHospitalPractice="Provider (Hospital & Practice)",n}(he||{}),Kt=function(n){return n.K12="K12",n.MedicalSchool="Medical School",n.NursingSchool="Nursing School",n.UndergraduateSchool="Undergraduate School",n.GraduateSchool="Graduate School",n.HealthScienceAlliedHealth="Health Sciences or Allied Health Program",n}(Kt||{}),b=c(31422),k=function(n){return n.Student="Student",n.Faculty="Faculty",n.Administrator="Administrator",n.TeacherFaculty="Teacher / Faculty",n.PatientCaregiver="Patient / Caregiver",n.IndustryProfessional="Industry Professional",n.InstructionalDesigner="Instructional Designer",n.Marketing="Marketing",n.TrainingManager="Training Manager",n.ManagerOfMedicalEducation="Manager of Medical Education",n.Developer="Developer",n.BrandProductManager="Brand / Product Manager",n.ScientificCommunications="Scientific Communications",n.ProductManager="Product Manager",n.Editor="Editor",n.ContentManager="Content Manager",n.DesignUserExperience="Design / User Experience",n.Executive="Executive",n.TechnologyIT="Technology / IT",n.Clinician="Clinician",n.PatientEducation="Patient Education",n.Innovation="Innovation",n.PhysicalTherapist="Physical Therapist",n.OccupationalTherapist="Occupational Therapist",n.PersonalTrainer="Personal Trainer",n.Librarian="Librarian",n.SalesTraining="Sales Training",n.ProfessionalEducation="Professional Education",n}(k||{}),ge=function(n){return n.Individual="individual",n.Team="team",n}(ge||{});Object.values(b.j);const Zt=Object.values(Kt),en=Object.values(he),Qn=[k.Student,k.TeacherFaculty,k.PatientCaregiver,k.Clinician,k.IndustryProfessional],qn=[k.Student,k.Faculty,k.Administrator,k.Librarian],Jn={[b.j.PersonalUse]:[],[b.j.Education]:Zt,[b.j.Business]:en},Wn={[he.MedicalDevice]:[k.SalesTraining,k.ProfessionalEducation,k.InstructionalDesigner,k.ProductManager,k.Marketing],[he.Pharma]:[k.SalesTraining,k.ProfessionalEducation,k.ScientificCommunications,k.InstructionalDesigner,k.ProductManager,k.Marketing],[he.ConsumerHealth]:[k.ProductManager,k.Editor,k.ContentManager,k.DesignUserExperience,k.Developer,k.Executive],[he.EdTraining]:[k.ProductManager,k.Editor,k.ContentManager,k.DesignUserExperience,k.Developer,k.Executive],[he.DigitalHealth]:[k.ProductManager,k.DesignUserExperience,k.Developer,k.TechnologyIT,k.Executive],[he.ProviderHospitalPractice]:[k.Clinician,k.Administrator,k.TechnologyIT,k.PatientEducation,k.Innovation]},Hn={[b.j.PersonalUse]:[],[b.j.Education]:["<100","101-499","500+"],[b.j.Business]:["1-25","26-100","101-500","500+"]},Tt={[b.j.PersonalUse]:{title:"",content:[]},[b.j.Education]:{title:"",content:[]},[b.j.Business]:{title:"",content:[]}};function yt(n){return n.map(o=>({value:o}))}function kt(n,o,t){return{account_setting:"account_purpose",label:`${tn(n,o)}How are you planning to use the BioDigital Human?`,hint:o?"Help us personalize your experience.":"We'll set up your experience accordingly.",responses:[{value:b.j.PersonalUse,label:"For myself",tag:"",icon:"user",content:Tt[b.j.PersonalUse]},{value:b.j.Education,label:"With my students",tag:"",icon:"user-friends",content:Tt[b.j.Education]},{value:b.j.Business,label:"With my business team",tag:"",icon:"user-friends",content:Tt[b.j.Business]}].filter(v=>t===ge.Individual?v.value===b.j.PersonalUse:t!==ge.Team||v.value!==b.j.PersonalUse),other:!1}}function ot(n){const o=function Kn(n){return n===b.j.Education?Zt:n===b.j.Business?en:[]}(n);return n===b.j.Education?{account_setting:"account_field",label:"What level of education?",hint:"Help us personalize your experience.",responses:yt(o),other:!0}:n===b.j.Business?{account_setting:"account_field",label:"What field do you work in?",hint:"Help us personalize your experience.",responses:yt(o),other:!0}:void 0}function xe(n,o,t,i,s=!1){const r=`${s?tn(n,i):""}What role best describes you?`,u=function Zn(n,o){switch(n){case b.j.Education:return qn;case b.j.Business:return Wn[o]||[];default:return Qn}}(o,t);return{account_setting:"account_role",label:r,hint:"Help us personalize your experience.",responses:yt(u),other:!0}}function tn(n,o){const{first_name:t}=n;return o?`Welcome back, ${t}! `:""}const ei=[[["","content-panel-tags",""]],[["","content-panel-actions",""]],"*"],ti=["[content-panel-tags]","[content-panel-actions]","*"];let ni=(()=>{class n{constructor(){this.label=""}ngOnInit(){}static#e=this.\u0275fac=function(i){return new(i||n)};static#t=this.\u0275cmp=e.VBU({type:n,selectors:[["app-content-panel"]],inputs:{label:"label"},ngContentSelectors:ti,decls:11,vars:1,consts:[[1,"content-panel"],[1,"content-panel__header"],[1,"content-panel__label"],[1,"mr-2","text-lg","font-semibold"],[1,"content-panel__actions"],[1,"content-panel__body"]],template:function(i,s){1&i&&(e.NAR(ei),e.j41(0,"div",0)(1,"div",1)(2,"div",2)(3,"h2",3),e.EFF(4),e.k0s(),e.j41(5,"div"),e.SdG(6),e.k0s()(),e.j41(7,"div",4),e.SdG(8,1),e.k0s()(),e.j41(9,"div",5),e.SdG(10,2),e.k0s()()),2&i&&(e.R7$(4),e.JRh(s.label))},styles:[".content-panel__header[_ngcontent-%COMP%]{align-items:center;display:flex;flex-flow:wrap;margin-bottom:20px;min-height:36px}.content-panel__label[_ngcontent-%COMP%]{flex-grow:1;display:flex;flex-direction:row;align-items:center;flex-wrap:wrap}.content-panel__actions[_ngcontent-%COMP%]{flex-grow:0}"]})}return n})();const ii=[[["","panel-view-tags",""]],"*",[["","panel-view-actions",""]],[["","panel-edit-actions",""]],[["","panel-view",""]],[["","panel-edit",""]]],oi=["[panel-view-tags]","*","[panel-view-actions]","[panel-edit-actions]","[panel-view]","[panel-edit]"];function si(n,o){1&n&&e.SdG(0,2,["*ngIf","mode === 'view'"])}function ai(n,o){1&n&&e.SdG(0,3,["*ngIf","mode === 'edit'"])}function ri(n,o){1&n&&e.SdG(0,4,["*ngIf","mode === 'view'"])}function ci(n,o){1&n&&(e.qex(0),e.SdG(1,5),e.bVm())}let P=(()=>{class n{get mode(){return this._mode}set mode(t){t!==this.mode&&(this._mode=t,this.changeDetectorRef.markForCheck())}constructor(t){this.changeDetectorRef=t,this._mode="view"}ngOnInit(){}static#e=this.\u0275fac=function(i){return new(i||n)(e.rXU(e.gRc))};static#t=this.\u0275cmp=e.VBU({type:n,selectors:[["app-account-panel"]],inputs:{label:"label",mode:"mode"},standalone:!1,ngContentSelectors:oi,decls:9,vars:5,consts:[[3,"label"],["content-panel-tags",""],["content-panel-actions",""],[4,"ngIf"]],template:function(i,s){1&i&&(e.NAR(ii),e.j41(0,"app-content-panel",0),e.qex(1,1),e.SdG(2),e.bVm(),e.j41(3,"div",2),e.DNE(4,si,1,0,"ng-content",3)(5,ai,1,0,"ng-content",3),e.k0s(),e.SdG(6,1),e.DNE(7,ri,1,0,"ng-content",3)(8,ci,2,0,"ng-container",3),e.k0s()),2&i&&(e.Y8G("label",s.label),e.R7$(4),e.Y8G("ngIf","view"===s.mode),e.R7$(),e.Y8G("ngIf","edit"===s.mode),e.R7$(2),e.Y8G("ngIf","view"===s.mode),e.R7$(),e.Y8G("ngIf","edit"===s.mode))},dependencies:[d.bT,ni],encapsulation:2,changeDetection:0})}return n})();const li=[{name:"Afghanistan",code:"AF"},{name:"Aland Islands",code:"AX"},{name:"Albania",code:"AL"},{name:"Algeria",code:"DZ"},{name:"American Samoa",code:"AS"},{name:"Andorra",code:"AD"},{name:"Angola",code:"AO"},{name:"Anguilla",code:"AI"},{name:"Antarctica",code:"AQ"},{name:"Antigua And Barbuda",code:"AG"},{name:"Argentina",code:"AR"},{name:"Armenia",code:"AM"},{name:"Aruba",code:"AW"},{name:"Australia",code:"AU"},{name:"Austria",code:"AT"},{name:"Azerbaijan",code:"AZ"},{name:"Bahamas The",code:"BS"},{name:"Bahrain",code:"BH"},{name:"Bangladesh",code:"BD"},{name:"Barbados",code:"BB"},{name:"Belarus",code:"BY"},{name:"Belgium",code:"BE"},{name:"Belize",code:"BZ"},{name:"Benin",code:"BJ"},{name:"Bermuda",code:"BM"},{name:"Bhutan",code:"BT"},{name:"Bolivia",code:"BO"},{name:"Bonaire, Sint Eustatius and Saba",code:"BQ"},{name:"Bosnia and Herzegovina",code:"BA"},{name:"Botswana",code:"BW"},{name:"Bouvet Island",code:"BV"},{name:"Brazil",code:"BR"},{name:"British Indian Ocean Territory",code:"IO"},{name:"Brunei",code:"BN"},{name:"Bulgaria",code:"BG"},{name:"Burkina Faso",code:"BF"},{name:"Burundi",code:"BI"},{name:"Cambodia",code:"KH"},{name:"Cameroon",code:"CM"},{name:"Canada",code:"CA"},{name:"Cape Verde",code:"CV"},{name:"Cayman Islands",code:"KY"},{name:"Central African Republic",code:"CF"},{name:"Chad",code:"TD"},{name:"Chile",code:"CL"},{name:"China",code:"CN"},{name:"Christmas Island",code:"CX"},{name:"Cocos (Keeling) Islands",code:"CC"},{name:"Colombia",code:"CO"},{name:"Comoros",code:"KM"},{name:"Congo",code:"CG"},{name:"Congo The Democratic Republic Of The",code:"CD"},{name:"Cook Islands",code:"CK"},{name:"Costa Rica",code:"CR"}
1,{name:"Cote D'Ivoire (Ivory Coast)",code:"CI"},{name:"Croatia (Hrvatska)",code:"HR"},{name:"Cuba",code:"CU"},{name:"Cura\xe7ao",code:"CW"},{name:"Cyprus",code:"CY"},{name:"Czech Republic",code:"CZ"},{name:"Denmark",code:"DK"},{name:"Djibouti",code:"DJ"},{name:"Dominica",code:"DM"},{name:"Dominican Republic",code:"DO"},{name:"East Timor",code:"TL"},{name:"Ecuador",code:"EC"},{name:"Egypt",code:"EG"},{name:"El Salvador",code:"SV"},{name:"Equatorial Guinea",code:"GQ"},{name:"Eritrea",code:"ER"},{name:"Estonia",code:"EE"},{name:"Ethiopia",code:"ET"},{name:"Falkland Islands",code:"FK"},{name:"Faroe Islands",code:"FO"},{name:"Fiji Islands",code:"FJ"},{name:"Finland",code:"FI"},{name:"France",code:"FR"},{name:"French Guiana",code:"GF"},{name:"French Polynesia",code:"PF"},{name:"French Southern Territories",code:"TF"},{name:"Gabon",code:"GA"},{name:"Gambia The",code:"GM"},{name:"Georgia",code:"GE"},{name:"Germany",code:"DE"},{name:"Ghana",code:"GH"},{name:"Gibraltar",code:"GI"},{name:"Greece",code:"GR"},{name:"Greenland",code:"GL"},{name:"Grenada",code:"GD"},{name:"Guadeloupe",code:"GP"},{name:"Guam",code:"GU"},{name:"Guatemala",code:"GT"},{name:"Guernsey and Alderney",code:"GG"},{name:"Guinea",code:"GN"},{name:"Guinea-Bissau",code:"GW"},{name:"Guyana",code:"GY"},{name:"Haiti",code:"HT"},{name:"Heard Island and McDonald Islands",code:"HM"},{name:"Honduras",code:"HN"},{name:"Hong Kong S.A.R.",code:"HK"},{name:"Hungary",code:"HU"},{name:"Iceland",code:"IS"},{name:"India",code:"IN"},{name:"Indonesia",code:"ID"},{name:"Iran",code:"IR"},{name:"Iraq",code:"IQ"},{name:"Ireland",code:"IE"},{name:"Israel",code:"IL"},{name:"Italy",code:"IT"},{name:"Jamaica",code:"JM"},{name:"Japan",code:"JP"},{name:"Jersey",code:"JE"},{name:"Jordan",code:"JO"},{name:"Kazakhstan",code:"KZ"},{name:"Kenya",code:"KE"},{name:"Kiribati",code:"KI"},{name:"Korea North",code:"KP"},{name:"Korea South",code:"KR"},{name:"Kosovo",code:"XK"},{name:"Kuwait",code:"KW"},{name:"Kyrgyzstan",code:"KG"},{name:"Laos",code:"LA"},{name:"Latvia",code:"LV"},{name:"Lebanon",code:"LB"},{name:"Lesotho",code:"LS"},{name:"Liberia",code:"LR"},{name:"Libya",code:"LY"},{name:"Liechtenstein",code:"LI"},{name:"Lithuania",code:"LT"},{name:"Luxembourg",code:"LU"},{name:"Macau S.A.R.",code:"MO"},{name:"Macedonia",code:"MK"},{name:"Madagascar",code:"MG"},{name:"Malawi",code:"MW"},{name:"Malaysia",code:"MY"},{name:"Maldives",code:"MV"},{name:"Mali",code:"ML"},{name:"Malta",code:"MT"},{name:"Man (Isle of)",code:"IM"},{name:"Marshall Islands",code:"MH"},{name:"Martinique",code:"MQ"},{name:"Mauritania",code:"MR"},{name:"Mauritius",code:"MU"},{name:"Mayotte",code:"YT"},{name:"Mexico",code:"MX"},{name:"Micronesia",code:"FM"},{name:"Moldova",code:"MD"},{name:"Monaco",code:"MC"},{name:"Mongolia",code:"MN"},{name:"Montenegro",code:"ME"},{name:"Montserrat",code:"MS"},{name:"Morocco",code:"MA"},{name:"Mozambique",code:"MZ"},{name:"Myanmar",code:"MM"},{name:"Namibia",code:"NA"},{name:"Nauru",code:"NR"},{name:"Nepal",code:"NP"},{name:"Netherlands The",code:"NL"},{name:"New Caledonia",code:"NC"},{name:"New Zealand",code:"NZ"},{name:"Nicaragua",code:"NI"},{name:"Niger",code:"NE"},{name:"Nigeria",code:"NG"},{name:"Niue",code:"NU"},{name:"Norfolk Island",code:"NF"},{name:"Northern Mariana Islands",code:"MP"},{name:"Norway",code:"NO"},{name:"Oman",code:"OM"},{name:"Pakistan",code:"PK"},{name:"Palau",code:"PW"},{name:"Palestinian Territory Occupied",code:"PS"},{name:"Panama",code:"PA"},{name:"Papua new Guinea",code:"PG"},{name:"Paraguay",code:"PY"},{name:"Peru",code:"PE"},{name:"Philippines",code:"PH"},{name:"Pitcairn Island",code:"PN"},{name:"Poland",code:"PL"},{name:"Portugal",code:"PT"},{name:"Puerto Rico",code:"PR"},{name:"Qatar",code:"QA"},{name:"Reunion",code:"RE"},{name:"Romania",code:"RO"},{name:"Russia",code:"RU"},{name:"Rwanda",code:"RW"},{name:"Saint Helena",code:"SH"},{name:"Saint Kitts And Nevis",code:"KN"},{name:"Saint Lucia",code:"LC"},{name:"Saint Pierre and Miquelon",code:"PM"},{name:"Saint Vincent And The Grenadines",code:"VC"},{name:"Saint-Barthelemy",code:"BL"},{name:"Saint-Martin (French part)",code:"MF"},{name:"Samoa",code:"WS"},{name:"San Marino",code:"SM"},{name:"Sao Tome and Principe",code:"ST"},{name:"Saudi Arabia",code:"SA"},{name:"Senegal",code:"SN"},{name:"Serbia",code:"RS"},{name:"Seychelles",code:"SC"},{name:"Sierra Leone",code:"SL"},{name:"Singapore",code:"SG"},{name:"Sint Maarten (Dutch part)",code:"SX"},{name:"Slovakia",code:"SK"},{name:"Slovenia",code:"SI"},{name:"Solomon Islands",code:"SB"},{name:"Somalia",code:"SO"},{name:"South Africa",code:"ZA"},{name:"South Georgia",code:"GS"},{name:"South Sudan",code:"SS"},{name:"Spain",code:"ES"},{name:"Sri Lanka",code:"LK"},{name:"Sudan",code:"SD"},{name:"Suriname",code:"SR"},{name:"Svalbard And Jan Mayen Islands",code:"SJ"},{name:"Swaziland",code:"SZ"},{name:"Sweden",code:"SE"},{name:"Switzerland",code:"CH"},{name:"Syria",code:"SY"},{name:"Taiwan",code:"TW"},{name:"Tajikistan",code:"TJ"},{name:"Tanzania",code:"TZ"},{name:"Thailand",code:"TH"},{name:"Togo",code:"TG"},{name:"Tokelau",code:"TK"},{name:"Tonga",code:"TO"},{name:"Trinidad And Tobago",code:"TT"},{name:"Tunisia",code:"TN"},{name:"Turkey",code:"TR"},{name:"Turkmenistan",code:"TM"},{name:"Turks And Caicos Islands",code:"TC"},{name:"Tuvalu",code:"TV"},{name:"Uganda",code:"UG"},{name:"Ukraine",code:"UA"},{name:"United Arab Emirates",code:"AE"},{name:"United Kingdom",code:"GB"},{name:"United States",code:"US"},{name:"United States Minor Outlying Islands",code:"UM"},{name:"Uruguay",code:"UY"},{name:"Uzbekistan",code:"UZ"},{name:"Vanuatu",code:"VU"},{name:"Vatican City State (Holy See)",code:"VA"},{name:"Venezuela",code:"VE"},{name:"Vietnam",code:"VN"},{name:"Virgin Islands (British)",code:"VG"},{name:"Virgin Islands (US)",code:"VI"},{name:"Wallis And Futuna Islands",code:"WF"},{name:"Western Sahara",code:"EH"},{name:"Yemen",code:"YE"},{name:"Zambia",code:"ZM"},{name:"Zimbabwe",code:"ZW"}],pi=[{name:"Alabama",abbreviation:"AL"},{name:"Alaska",abbreviation:"AK"},{name:"Arizona",abbreviation:"AZ"},{name:"Arkansas",abbreviation:"AR"},{name:"California",abbreviation:"CA"},{name:"Colorado",abbreviation:"CO"},{name:"Connecticut",abbreviation:"CT"},{name:"Delaware",abbreviation:"DE"},{name:"Florida",abbreviation:"FL"},{name:"Georgia",abbreviation:"GA"},{name:"Hawaii",abbreviation:"HI"},{name:"Idaho",abbreviation:"ID"},{name:"Illinois",abbreviation:"IL"},{name:"Indiana",abbreviation:"IN"},{name:"Iowa",abbreviation:"IA"},{name:"Kansas",abbreviation:"KS"},{name:"Kentucky",abbreviation:"KY"},{name:"Louisiana",abbreviation:"LA"},{name:"Maine",abbreviation:"ME"},{name:"Maryland",abbreviation:"MD"},{name:"Massachusetts",abbreviation:"MA"},{name:"Michigan",abbreviation:"MI"},{name:"Minnesota",abbreviation:"MN"},{name:"Mississippi",abbreviation:"MS"},{name:"Missouri",abbreviation:"MO"},{name:"Montana",abbreviation:"MT"},{name:"Nebraska",abbreviation:"NE"},{name:"Nevada",abbreviation:"NV"},{name:"New Hampshire",abbreviation:"NH"},{name:"New Jersey",abbreviation:"NJ"},{name:"New Mexico",abbreviation:"NM"},{name:"New York",abbreviation:"NY"},{name:"North Carolina",abbreviation:"NC"},{name:"North Dakota",abbreviation:"ND"},{name:"Ohio",abbreviation:"OH"},{name:"Oklahoma",abbreviation:"OK"},{name:"Oregon",abbreviation:"OR"},{name:"Pennsylvania",abbreviation:"PA"},{name:"Rhode Island",abbreviation:"RI"},{name:"South Carolina",abbreviation:"SC"},{name:"South Dakota",abbreviation:"SD"},{name:"Tennessee",abbreviation:"TN"},{name:"Texas",abbreviation:"TX"},{name:"Utah",abbreviation:"UT"},{name:"Vermont",abbreviation:"VT"},{name:"Virginia",abbreviation:"VA"},{name:"Washington",abbreviation:"WA"},{name:"West Virginia",abbreviation:"WV"},{name:"Wisconsin",abbreviation:"WI"},{name:"Wyoming",abbreviation:"WY"}];var O=c(95416),j=c(74369),L=c(41066),fe=c(78127);const ui=[[["","card-header",""]],[["","card-content",""]]],di=["[card-header]","[card-content]"];let nn=(()=>{class n{constructor(){}ngOnInit(){}static#e=this.\u0275fac=function(i){return new(i||n)};static#t=this.\u0275cmp=e.VBU({type:n,selectors:[["app-account-summary-card"]],standalone:!1,ngContentSelectors:di,decls:6,vars:2,consts:[["cardHeader",""],[1,"card"],[1,"font-semibold","text-sm"],[1,"text-xs"]],template:function(i,s){if(1&i&&(e.NAR(ui),e.j41(0,"div",1)(1,"div",2,0),e.SdG(3),e.k0s(),e.j41(4,"div",3),e.SdG(5,1),e.k0s()()),2&i){const a=e.sdS(2);e.R7$(),e.AVh("mb-3",a.children.length)}},styles:[".card[_ngcontent-%COMP%]{border:1px solid #d4d9e3;border-radius:4px;padding:16px 20px}.card__header[_ngcontent-%COMP%]{color:#142136}.card__content[_ngcontent-%COMP%]{color:#384c6c}"],changeDetection:0})}return n})();var Rt=function(n,o,t,i){var r,s=arguments.length,a=s<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,t):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(n,o,t,i);else for(var u=n.length-1;u>=0;u--)(r=n[u])&&(a=(s<3?r(a):s>3?r(o,t,a):r(o,t))||a);return s>3&&a&&Object.defineProperty(o,t,a),a},St=function(n,o){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(n,o)};function mi(n,o){if(1&n&&(e.j41(0,"div",35),e.EFF(1),e.k0s()),2&n){const t=e.XpG();e.R7$(),e.SpI(" ",t.name," ")}}function hi(n,o){if(1&n&&(e.j41(0,"option",42),e.EFF(1),e.k0s()),2&n){const t=o.$implicit;e.Y8G("value",t.value),e.R7$(),e.SpI(" ",t.value," ")}}function gi(n,o){if(1&n&&e.nrm(0,"input",43),2&n){const t=e.XpG(3);e.Y8G("placeholder",null==t.accountFieldQuestion?null:t.accountFieldQuestion.hint)}}function fi(n,o){if(1&n&&(e.j41(0,"app-form-field",37)(1,"select",38)(2,"optgroup",39),e.DNE(3,hi,2,2,"option",29),e.j41(4,"option",40),e.EFF(5,"Other"),e.k0s()()(),e.DNE(6,gi,1,1,"input",41),e.k0s()),2&n){const t=e.XpG(2);e.Y8G("label",t.selectedPurpose===t.accountPurposeEnum.Education?"Education":"Field"),e.R7$(2),e.Y8G("label",t.accountFieldQuestion.label),e.R7$(),e.Y8G("ngForOf",t.accountFieldQuestion.responses),e.R7$(3),e.Y8G("ngIf",t.otherFieldEnabled)}}function _i(n,o){if(1&n&&e.DNE(0,fi,7,4,"app-form-field",36),2&n){const t=e.XpG();e.Y8G("ngIf",t.accountFieldQuestion)}}function bi(n,o){if(1&n&&(e.j41(0,"option",42),e.EFF(1),e.k0s()),2&n){const t=o.$implicit;e.Y8G("value",t.value),e.R7$(),e.SpI(" ",t.value," ")}}function vi(n,o){if(1&n&&e.nrm(0,"input",43),2&n){const t=e.XpG(3);e.Y8G("placeholder",null==t.accountRoleQuestion?null:t.accountRoleQuestion.hint)}}function Ci(n,o){if(1&n&&(e.j41(0,"app-form-field",45)(1,"select",46)(2,"optgroup",39),e.DNE(3,bi,2,2,"option",29),e.j41(4,"option",40),e.EFF(5,"Other"),e.k0s()()(),e.DNE(6,vi,1,1,"input",41),e.k0s()),2&n){const t=e.XpG(2);e.R7$(2),e.Y8G("label",t.accountRoleQuestion.label),e.R7$(),e.Y8G("ngForOf",t.accountRoleQuestion.responses),e.R7$(3),e.Y8G("ngIf",t.otherRoleEnabled)}}function Ti(n,o){if(1&n&&e.DNE(0,Ci,7,3,"app-form-field",44),2&n){const t=e.XpG();e.Y8G("ngIf",t.accountRoleQuestion)}}function yi(n,o){1&n&&e.eu8(0)}function ki(n,o){if(1&n&&(e.qex(0),e.DNE(1,yi,1,0,"ng-container",47),e.bVm()),2&n){e.XpG();const t=e.sdS(37);e.R7$(),e.Y8G("ngTemplateOutlet",t)}}function Ri(n,o){if(1&n&&(e.j41(0,"option",42),e.EFF(1),e.k0s()),2&n){const t=o.$implicit;e.Y8G("value",t.value),e.R7$(),e.SpI(" ",t.value," ")}}function Si(n,o){if(1&n&&(e.j41(0,"app-form-field",51)(1,"select",52)(2,"optgroup",39),e.DNE(3,Ri,2,2,"option",29),e.k0s()()()),2&n){const t=e.XpG(2);e.R7$(2),e.Y8G("label",t.accountPurposeQuestion.label),e.R7$(),e.Y8G("ngForOf",t.accountPurposeQuestion.responses)}}function xi(n,o){1&n&&e.eu8(0)}function Fi(n,o){if(1&n&&(e.qex(0),e.DNE(1,xi,1,0,"ng-container",47),e.bVm()),2&n){e.XpG(2);const t=e.sdS(37);e.R7$(),e.Y8G("ngTemplateOutlet",t)}}function ji(n,o){1&n&&e.eu8(0)}function Ii(n,o){1&n&&e.eu8(0)}function Di(n,o){if(1&n&&(e.qex(0),e.DNE(1,ji,1,0,"ng-container",47)(2,Ii,1,0,"ng-container",47),e.bVm()),2&n){e.XpG(2);const t=e.sdS(35),i=e.sdS(37);e.R7$(),e.Y8G("ngTemplateOutlet",i),e.R7$(),e.Y8G("ngTemplateOutlet",t)}}function Ei(n,o){1&n&&e.eu8(0)}function Ui(n,o){1&n&&e.eu8(0)}function Mi(n,o){if(1&n&&(e.qex(0),e.DNE(1,Ei,1,0,"ng-container",47)(2,Ui,1,0,"ng-container",47),e.bVm()),2&n){e.XpG(2);const t=e.sdS(35),i=e.sdS(37);e.R7$(),e.Y8G("ngTemplateOutlet",t),e.R7$(),e.Y8G("ngTemplateOutlet",i)}}function wi(n,o){if(1&n&&(e.DNE(0,Si,4,2,"app-form-field",48),e.qex(1,49),e.DNE(2,Fi,2,1,"ng-container",50)(3,Di,3,2,"ng-container",50)(4,Mi,3,2,"ng-container",50),e.bVm()),2&n){const t=e.XpG();e.Y8G("ngIf",t.accountPurposeQuestion),e.R7$(),e.Y8G("ngSwitch",t.selectedPurpose),e.R7$(),e.Y8G("ngSwitchCase",t.accountPurposeEnum.PersonalUse),e.R7$(),e.Y8G("ngSwitchCase",t.accountPurposeEnum.Education),e.R7$(),e.Y8G("ngSwitchCase",t.accountPurposeEnum.Business)}}function Ai(n,o){if(1&n&&(e.j41(0,"option",42),e.EFF(1),e.k0s()),2&n){const t=o.$implicit;e.Y8G("value",t.name),e.R7$(),e.SpI(" ",t.name," ")}}function Gi(n,o){if(1&n&&(e.j41(0,"option",42),e.EFF(1),e.k0s()),2&n){const t=o.$implicit;e.Y8G("value",t.code),e.R7$(),e.SpI(" ",t.name," ")}}class Fe{constructor(o,t,i,s,a){this.store=o,this.actions=t,this.formBuilder=i,this.changeDetectorRef=s,this.snackBar=a,this.countries=li,this.states=pi,this.accountPurposeEnum=b.j,this.name="",this.address="",this.demographic="",this.ngUnsubscribe=new R.B}ngOnInit(){this.initForm(),this.initAccountSettingsListeners(),this.initProfileListeners(),this.formatProfileFields()}ngOnDestroy(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()}initForm(){this.form=this.formBuilder.group({first_name:["",p.k0.required],last_name:["",p.k0.required],city:[""],state:[""],country:[""],account_settings:this.formBuilder.group({account_purpose:this.formBuilder.group({value:[""],description:[""]}),account_role:this.formBuilder.group({value:[""],description:[""]}),account_field:this.formBuilder.group({value:[""],description:[""]})})})}initAccountSettingsListeners(){const o=this.form.get("account_settings"),t=o.get("account_purpose"),i=o.get("account_field"),s=o.get("account_role"),a=(r,u)=>(0,C.isEqual)(r,u);t.valueChanges.pipe((0,Ge.F)(a),(0,h.Q)(this.ngUnsubscribe)).subscribe(r=>{const u=r.value,v=this.store.selectSnapshot(g.k.getUserProfile);this.setQuestions(v,u),i.patchValue({value:"",description:""}),s.patchValue({value:"",description:""}),this.changeDetectorRef.markForCheck()}),i.valueChanges.pipe((0,Ge.F)(a),(0,h.Q)(this.ngUnsubscribe)).subscribe(r=>{const u=r.value,T=xe(this.store.selectSnapshot(g.k.getUserProfile),this.selectedPurpose,u,!0);T.responses.length>0&&(this.accountRoleQuestion=T),this.changeDetectorRef.markForCheck()}),(0,me.z)(t.valueChanges,i.valueChanges,s.valueChanges).pipe((0,Ge.F)(a),(0,h.Q)(this.ngUnsubscribe)).subscribe(([r,u,v])=>{const T=r.value,M=u.value,y=v.value;i.enable(),s.enable(),T!==b.j.Business||M?T===b.j.Education&&!y&&i.disable():s.disable(),this.selectedPurpose=T,this.selectedField=M,this.selectedRole=y,this.otherFieldEnabled="Other"===M,this.otherRoleEnabled="Other"===y,this.changeDetectorRef.markForCheck()})}initProfileListeners(){this.userProfile$.pipe((0,B.p)(o=>!(0,C.isNil)(o)),(0,h.Q)(this.ngUnsubscribe)).subscribe(o=>{(0,C.isNil)(this.accountPurposeQuestion)&&this.setQuestions(o,b.j.PersonalUse);const t=this.getUserAccountSettings();this.setFormValues(o,t),this.changeDetectorRef.markForCheck()}),this.actions.pipe((0,l.xi)(f.ZD),(0,h.Q)(this.ngUnsubscribe)).subscribe(()=>{this.store.dispatch(new f.hs(!0)),this.form.markAsPristine(),this.panel.mode="view"}),this.actions.pipe((0,l.xi)(f._h),(0,h.Q)(this.ngUnsubscribe)).subscribe(()=>{this.snackBar.open("There was an error updating your user profile.")})}formatProfileFields(){this.userProfile$.pipe((0,B.p)(o=>!(0,C.isNil)(o)),(0,h.Q)(this.ngUnsubscribe)).subscribe(o=>{this.formatProfile(o),this.changeDetectorRef.markForCheck()})}handleEditClick(){this.panel.mode="edit"}handleCancelClick(){this.setFormValues(this.store.selectSnapshot(g.k.getUserProfile),this.getUserAccountSettings()),this.form.markAsPristine(),this.panel.mode="view"}
1handleSaveClick(){this.saveProfile()}getUserAccountSettings(){const o=this.store.selectSnapshot(g.k.getUserAccountSettings),t=this.store.selectSnapshot(S.q.getOrganizationAccountSettings);return(0,Se.j)([...o,...t])}saveProfile(){const o=this.getUserProfileFromValues(this.form.value);this.store.dispatch(new f.Kg(o)),this.changeDetectorRef.markForCheck()}setQuestions(o,t){this.accountPurposeQuestion=kt(o,!1),this.accountFieldQuestion=ot(t),this.accountRoleQuestion=xe(o,t,"",!1)}setFormValues(o,t){this.form.patchValue({...o,account_settings:t})}getUserProfileFromValues(o){const{account_settings:t}=o,i=(0,Se.q)(t||{},!0);return{...o,account_settings:i}}formatProfile(o){const{first_name:t,last_name:i,city:s,state:a,country:r}=o;this.name=this.formatValues([t,i]," "),this.address=this.formatValues([s,a,r],", ");const u=this.getUserAccountSettings();this.demographic=this.formatDemographic(u)}formatDemographic(o){const t=o.account_field||{value:"",description:""},i=o.account_role||{value:"",description:""};return this.formatValues(["Other"===t.value?t.description:t.value,"Other"===i.value?i.description:i.value]," ")}
1formatValues(o,t=""){return o.filter(Boolean).join(t)}static#e=this.\u0275fac=function(t){return new(t||Fe)(e.rXU(l.il),e.rXU(l.En),e.rXU(p.ze),e.rXU(e.gRc),e.rXU(O.UG))};static#t=this.\u0275cmp=e.VBU({type:Fe,selectors:[["app-account-profile"]],viewQuery:function(t,i){if(1&t&&e.GBs(P,7),2&t){let s;e.mGM(s=e.lsd())&&(i.panel=s.first)}},standalone:!1,decls:62,vars:23,consts:[["panel",""],["fieldTemplate",""],["roleTemplate",""],["standardUserTemplate",""],["label","Profile"],["panel-view-actions",""],["type","button","app-button","","buttonType","secondary","buttonTheme","light","buttonSize","md","aria-label","Edit profile",3,"click"],["panel-view",""],["card-header","",4,"ngIf"],["card-content",""],["panel-edit","",1,"profile"],[1,"text-xs","profile__notice","mb-7"],["href","https://www.biodigital.com/privacy","target","_blank",1,"underline","text-link"],["href","https://support.biodigital.com/hc/en-us/articles/360054841794-What-information-does-BioDigital-collect-about-me-","target","_blank",1,"underline","text-link"],[3,"formGroup"],["label","Email","theme","light",1,"mb-2"],["type","email","appInput","",3,"value","disabled"],[1,"flex","mb-2"],["label","First Name","theme","light",1,"pr-2","grow","basis-2/4"],["appInput","","formControlName","first_name"],["label","Last Name","theme","light",1,"pl-2","grow","basis-2/4"],["appInput","","formControlName","last_name"],["formGroupName","account_settings"],[4,"ngIf","ngIfElse"],["label","City","theme","light",1,"pr-2","grow","basis-2/4"],["type","text","appInput","","formControlName","city"],["label","State","theme","light",1,"pl-2","grow","basis-2/4"],["appInput","","formControlName","state"],["value",""],[3,"value",4,"ngFor","ngForOf"],["label","Country","theme","light",1,"pb-2"],["appInput","","placeholder","Select Country","formControlName","country"],[1,"flex","justify-end","mt-4"],["type","button","app-button","","buttonType","ghost","buttonTheme","light","buttonSize","md",1,"mr-4",3,"click","disabled"],["type","submit","app-button","","buttonType","primary","buttonTheme","light","buttonSize","md",3,"click","disabled"],["card-header",""],["theme","light","class","pb-2","formGroupName","account_field",3,"label",4,"ngIf"],["theme","light","formGroupName","account_field",1,"pb-2",3,"label"],["appInput","","placeholder","Select Field","formControlName","value"],[3,"label"],["value","Other"],["type","text","appInput","","class","mt-2","formControlName","description",3,"placeholder",4,"ngIf"],[3,"value"],["type","text","appInput","","formControlName","description",1,"mt-2",3,"placeholder"],["label","Role","theme","light","class","pb-2","formGroupName","account_role",4,"ngIf"],["label","Role","theme","light","formGroupName","account_role",1,"pb-2"],["appInput","","placeholder","Select Role","formControlName","value"],[4,"ngTemplateOutlet"],["label","Purpose","theme","light","class","pb-2","formGroupName","account_purpose",4,"ngIf"],[3,"ngSwitch"],[4,"ngSwitchCase"],["label","Purpose","theme","light","formGroupName","account_purpose",1,"pb-2"],["appInput","","placeholder","Select Purpose","formControlName","value"]],template:function(t,i){if(1&t){const s=e.RV6();e.j41(0,"app-account-panel",4,0)(2,"span",5)(3,"button",6),e.bIt("click",function(){return e.eBV(s),e.Njj(i.handleEditClick())}),e.EFF(4," Edit "),e.k0s()(),e.j41(5,"div",7)(6,"app-account-summary-card"),e.DNE(7,mi,2,1,"div",8),e.j41(8,"div",9)(9,"div"),e.EFF(10),e.nI1(11,"async"),e.k0s(),e.j41(12,"div"),e.EFF(13),e.k0s(),e.j41(14,"div"),e.EFF(15),e.k0s()()()(),e.j41(16,"div",10)(17,"div",11),e.EFF(18," This information is optional, but by entering it we can provide a more personal experience, and we will always keep it secure. See our "),e.j41(19,"a",12),e.EFF(20,"privacy policy"),e.k0s(),e.EFF(21," for details. "),e.j41(22,"a",13),e.EFF(23,"What other personal information does BioDigital store?"),e.k0s()(),e.j41(24,"form",14)(25,"app-form-field",15),e.nrm(26,"input",16),e.nI1(27,"async"),e.k0s(),e.j41(28,"div",17)(29,"app-form-field",18),e.nrm(30,"input",19),e.k0s(),e.j41(31,"app-form-field",20),e.nrm(32,"input",21),e.k0s()(),e.qex(33,22),e.DNE(34,_i,1,1,"ng-template",null,1,e.C5r)(36,Ti,1,1,"ng-template",null,2,e.C5r)(38,ki,2,1,"ng-container",23),e.nI1(39,"async"),e.DNE(40,wi,5,5,"ng-template",null,3,e.C5r),e.bVm(),e.j41(42,"div",17)(43,"app-form-field",24),e.nrm(44,"input",25),e.k0s(),e.j41(45,"app-form-field",26)(46,"select",27)(47,"option",28),e.EFF(48,"-- Select a State --"),e.k0s(),e.DNE(49,Ai,2,2,"option",29),e.k0s()()(),e.j41(50,"app-form-field",30)(51,"select",31)(52,"option",28),e.EFF(53,"-- Select a Country --"),e.k0s(),e.DNE(54,Gi,2,2,"option",29),e.k0s()(),e.j41(55,"div",32)(56,"button",33),e.nI1(57,"async"),e.bIt("click",function(){return e.eBV(s),e.Njj(i.handleCancelClick())}),e.EFF(58," Cancel "),e.k0s(),e.j41(59,"button",34),e.nI1(60,"async"),e.bIt("click",function(){return e.eBV(s),e.Njj(i.handleSaveClick())}),e.EFF(61," Save Changes "),e.k0s()()()()()}if(2&t){let s,a;const r=e.sdS(41);e.R7$(7),e.Y8G("ngIf",i.name),e.R7$(3),e.JRh(null==(s=e.bMT(11,13,i.userProfile$))?null:s.email),e.R7$(3),e.JRh(i.demographic),e.R7$(2),e.JRh(i.address),e.R7$(9),e.Y8G("formGroup",i.form),e.R7$(2),e.Y8G("value",null==(a=e.bMT(27,15,i.userProfile$))?null:a.email)("disabled",!0),e.R7$(12),e.Y8G("ngIf",e.bMT(39,17,i.hasOrganization$))("ngIfElse",r),e.R7$(11),e.Y8G("ngForOf",i.states),e.R7$(5),e.Y8G("ngForOf",i.countries),e.R7$(2),e.Y8G("disabled",e.bMT(57,19,i.profileUpdating$)),e.R7$(3),e.Y8G("disabled",!i.form.dirty||i.form.invali
1d||e.bMT(60,21,i.profileUpdating$))}},dependencies:[d.Sq,d.bT,d.T3,d.ux,d.e1,p.qT,p.xH,p.y7,p.me,p.wz,p.BC,p.cb,p.j4,p.JD,p.$R,j.Q,L.k,fe.K,P,nn,d.Jj],styles:[".profile__notice[_ngcontent-%COMP%]{color:#384c6c}"],changeDetection:0})}Rt([(0,l.l6)(g.k.getUserProfile),St("design:type",_.c)],Fe.prototype,"userProfile$",void 0),Rt([(0,l.l6)(S.q.hasOrganization),St("design:type",_.c)],Fe.prototype,"hasOrganization$",void 0),Rt([(0,l.l6)(g.k.getProfileUpdating),St("design:type",_.c)],Fe.prototype,"profileUpdating$",void 0);var _e=c(67426),be=c(22443);function Ni(n,o){if(1&n){const t=e.RV6();e.j41(0,"button",10),e.bIt("click",function(){e.eBV(t);const s=e.XpG();return e.Njj(s.handleEditClick())}),e.EFF(1," Edit "),e.k0s()}}function Oi(n,o){1&n&&(e.qex(0),e.EFF(1," You've signed in with with your Google Account. Please visit your Google Account to manage your password. "),e.bVm())}function Bi(n,o){1&n&&(e.qex(0),e.EFF(1," Change the password for your account. "),e.bVm())}function Vi(n,o){if(1&n&&(e.j41(0,"div")(1,"div",11)(2,"app-message-toggle",12),e.EFF(3),e.k0s()()()),2&n){const t=e.XpG();e.R7$(2),e.Y8G("shown",t.successMessage),e.R7$(),e.SpI(" ",t.successMessage," ")}}function zi(n,o){if(1&n&&(e.j41(0,"div",27),e.EFF(1),e.k0s()),2&n){const t=e.XpG(3);e.R7$(),e.SpI(" New password must be ",t.minPasswordLength," characters or longer. ")}}function Xi(n,o){1&n&&(e.j41(0,"div",27),e.EFF(1,"Passwords must match."),e.k0s())}function Li(n,o){if(1&n){const t=e.RV6();e.j41(0,"form",15)(1,"div",11)(2,"app-message-toggle",16),e.EFF(3),e.k0s()(),e.j41(4,"app-form-field",17),e.nrm(5,"input",18),e.k0s(),e.j41(6,"app-form-field",19),e.nrm(7,"input",20),e.DNE(8,zi,2,1,"div",21),e.k0s(),e.j41(9,"app-form-field",22),e.nrm(10,"input",23),e.DNE(11,Xi,2,0,"div",21),e.k0s(),e.j41(12,"div",24)(13,"button",25),e.bIt("click",function(){e.eBV(t);const s=e.XpG(2);return e.Njj(s.handleCancelClick())}),e.EFF(14," Cancel "),e.k0s(),e.j41(15,"button",26),e.bIt("click",function(){e.eBV(t);const s=e.XpG(2);return e.Njj(s.handleSaveClick())}),e.EFF(16," Save Password "),e.k0s()()()}if(2&n){const t=e.XpG(2);e.Y8G("formGroup",t.form),e.R7$(2),e.Y8G("shown",!t.form.touched&&t.errorMessage),e.R7$(),e.SpI(" ",t.errorMessage," "),e.R7$(5),e.Y8G("ngIf",null==t.form.errors?null:t.form.errors.invalidLength),e.R7$(3),e.Y8G("ngIf",null==t.form.errors?null:t.form.errors.passwordsMismatch),e.R7$(2),e.Y8G("disabled",t.updating),e.R7$(2),e.Y8G("disabled",t.form.invalid||t.updating)}}function Yi(n,o){if(1&n&&(e.j41(0,"div",13),e.EFF(1),e.k0s(),e.DNE(2,Li,17,7,"form",14)),2&n){const t=e.XpG();e.R7$(),e.SpI(" Your password must be ",t.minPasswordLength," characters or longer. "),e.R7$(),e.Y8G("ngIf",!t.updated)}}class Xe{constructor(o,t,i,s){this.store=o,this.actions=t,this.formBuilder=i,this.changeDetectorRef=s,this.minPasswordLength=W.c.minPasswordLength,this.updating=!1,this.updated=!1,this.ngUnsubscribe=new R.B}ngOnInit(){this.initForm(),this.initUpdateListeners()}ngOnDestroy(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()}initForm(){this.form=this.formBuilder.group({current_password:["",p.k0.required],new_password:["",p.k0.required],confirm_new_password:["",p.k0.required]},{validators:this.passwordValidator})}initUpdateListeners(){this.actions.pipe((0,l.xi)(f.RE),(0,h.Q)(this.ngUnsubscribe)).subscribe(()=>{this.updating=!0,this.changeDetectorRef.markForCheck()}),this.actions.pipe((0,l.xi)(f.kP),(0,h.Q)(this.ngUnsubscribe)).subscribe(()=>{this.form.markAsUntouched(),this.updating=!1,this.updated=!0,this.errorMessage="",this.successMessage="Your password was successfully updated.",this.changeDetectorRef.markForCheck(),setTimeout(()=>{this.resetForm(),this.resetState(),this.panel.mode="view"},5e3)}),this.actions.pipe((0,l.xi)(f.j3),(0,h.Q)(this.ngUnsubscribe)).subscribe(o=>{this.form.markAsUntouched(),this.updating=!1,this.updated=!1,this.errorMessage=(0,_e.u1)(o.error)||"Your password could not be updated. Please try again.",this.successMessage="",this.changeDetectorRef.markForCheck()})}handleEditClick(){this.panel.mode="edit"}handleCancelClick(){this.resetForm(),this.resetState(),this.panel.mode="view"}
1handleSaveClick(){this.updatePassword()}resetForm(){this.form.reset()}resetState(){this.updating=!1,this.updated=!1,this.errorMessage="",this.successMessage=""}updatePassword(){const{current_password:o,new_password:t,confirm_new_password:i}=this.form.value;this.store.dispatch(new f.RE(o,t,i))}passwordValidator(o){const{new_password:t,confirm_new_password:i}=o.value,s=t&&i&&t!==i,a=t&&t.length<W.c.minPasswordLength;return s||a?{passwordsMismatch:s,invalidLength:a}:null}static#e=this.\u0275fac=function(t){return new(t||Xe)(e.rXU(l.il),e.rXU(l.En),e.rXU(p.ze),e.rXU(e.gRc))};static#t=this.\u0275cmp=e.VBU({type:Xe,selectors:[["app-account-password"]],viewQuery:function(t,i){if(1&t&&e.GBs(P,7),2&t){let s;e.mGM(s=e.lsd())&&(i.panel=s.first)}},standalone:!1,decls:13,vars:9,consts:[["changePasswordTemplate",""],["label","Password"],["panel-view-actions",""],["type","button","app-button","","buttonType","secondary","buttonTheme","light","buttonSize","md","aria-label","Edit password",3,"click",4,"ngIf"],["panel-view",""],[1,"text-sm",3,"ngSwitch"],[4,"ngSwitchCase"],[4,"ngSwitchDefault"],["panel-edit",""],[4,"ngIf","ngIfElse"],["type","button","app-button","","buttonType","secondary","buttonTheme","light","buttonSize","md","aria-label","Edit password",3,"click"],[1,"my-6"],["type","message",3,"shown"],[1,"text-sm","mb-7"],[3,"formGroup",4,"ngIf"],[3,"formGroup"],["type","error","icon","exclamation-circle",3,"shown"],["label","Current Password","theme","light",1,"mb-2"],["type","password","autoComplete","current-password","appInput","","formControlName","current_password"],["label","New Password","theme","light",1,"mb-2"],["type","password","autoComplete","new-password","appInput","","formControlName","new_password"],["form-field-error","",4,"ngIf"],["label","Confirm New Password","theme","light",1,"mb-2"],["type","password","autoComplete","new-password","appInput","","formControlName","confirm_new_password"],[1,"flex","justify-end","mt-4"],["type","button","app-button","","buttonType","ghost","buttonTheme","light","buttonSize","md",1,"mr-4",3,"click","disabled"],["type","submit","app-button","","buttonType","primary","buttonTheme","light","buttonSize","md",3,"click","disabled"],["form-field-error",""]],template:function(t,i){if(1&t&&(e.j41(0,"app-account-panel",1)(1,"div",2),e.DNE(2,Ni,2,0,"button",3),e.nI1(3,"async"),e.k0s(),e.j41(4,"div",4)(5,"div",5),e.nI1(6,"async"),e.DNE(7,Oi,2,0,"ng-container",6)(8,Bi,2,0,"ng-container",7),e.k0s()(),e.j41(9,"div",8),e.DNE(10,Vi,4,2,"div",9)(11,Yi,3,2,"ng-template",null,0,e.C5r),e.k0s()()),2&t){let s,a;const r=e.sdS(12);e.R7$(2),e.Y8G("ngIf",!(null!=(s=e.bMT(3,5,i.userProfile$))&&s.is_third_party)),e.R7$(3),e.Y8G("ngSwitch",null==(a=e.bMT(6,7,i.userProfile$))?null:a.third_party_provider_name),e.R7$(2),e.Y8G("ngSwitchCase","Google"),e.R7$(3),e.Y8G("ngIf",i.updated)("ngIfElse",r)}},dependencies:[d.bT,d.ux,d.e1,d.fG,p.qT,p.me,p.BC,p.cb,p.j4,p.JD,j.Q,L.k,fe.K,be.X,P,d.Jj],encapsulation:2,changeDetection:0})}!function(n,o,t,i){var r,s=arguments.length,a=s<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,t):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(n,o,t,i);else for(var u=n.length-1;u>=0;u--)(r=n[u])&&(a=(s<3?r(a):s>3?r(o,t,a):r(o,t))||a);s>3&&a&&Object.defineProperty(o,t,a)}([(0,l.l6)(g.k.getUserProfile),function(n,o){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata("design:type",o)}(0,_.c)],Xe.prototype,"userProfile$",void 0);var xt=c(11788),Ji=c(91986),je=c(15993),ae=c(64658),$=c(89079),on=c(76919),Ft=c(32094),jt=function(n){return n.TeamAccountClosed="team_account_closed",n.ContentOwnershipTransfer="content_ownership_transfer",n}(jt||{});function Wi(n,o){if(1&n&&(e.j41(0,"span",2),e.EFF(1),e.k0s(),e.EFF(2)),2&n){const t=e.XpG();e.R7$(),e.JRh(t.name),e.R7$(),e.SpI(" left the team on ",t.date," and their content was transferred to you. ")}}function Hi(n,o){if(1&n){const t=e.RV6();e.j41(0,"span",2),e.EFF(1,"Your team was closed"),e.k0s(),e.EFF(2),e.j41(3,"button",3),e.bIt("click",function(){e.eBV(t);const s=e.XpG();return e.Njj(s.handleUpgradeClick())}),e.EFF(4," Upgrade now. "),e.k0s()}if(2&n){const t=e.XpG();e.R7$(2),e.SpI(" on ",t.date,". You have been downgraded to a free Personal account. "),e.R7$(),e.Y8G("uppercase",!1)}}let Ki=(()=>{class n{constructor(t,i){this.store=t,this.upgradeService=i,this.UserNoticeTypes=jt,this.name="",this.date="",this.dismissing=!1}
1ngOnInit(){if(this.date=(0,d.Yq)(this.userNotice.notice_created_date,"longDate","en"),this.userNotice.notice_type===jt.ContentOwnershipTransfer){const t=this.userNotice.notice_details,{user_first_name:i,user_last_name:s}=t.transfer_user;this.name=[i,s].filter(Boolean).join(" ")}}handleUpgradeClick(){this.upgradeService.openUpgradeDialog()}handleDismiss(){this.dismissing=!0,this.store.dispatch(new f.EX(this.userNotice.notice_id))}static#e=this.\u0275fac=function(i){return new(i||n)(e.rXU(l.il),e.rXU(on.E))};static#t=this.\u0275cmp=e.VBU({type:n,selectors:[["app-user-notice"]],inputs:{userNotice:"userNotice"},decls:4,vars:4,consts:[["type","notification","theme","dark","icon","info-circle",1,"user-notice",3,"handleDismiss","dismiss"],[1,"text-sm"],[1,"font-bold"],["app-button","","buttonType","ghost","buttonTheme","light","buttonSize","md",1,"underline",3,"click","uppercase"]],template:function(i,s){if(1&i&&(e.j41(0,"app-message-toggle",0),e.bIt("handleDismiss",function(){return s.handleDismiss()}),e.j41(1,"div",1),e.DNE(2,Wi,3,2)(3,Hi,5,2),e.k0s()()),2&i){let a;e.AVh("user-notice--dismissing",s.dismissing),e.Y8G("dismiss",!0),e.R7$(2),e.vxM((a=s.userNotice.notice_type)===s.UserNoticeTypes.ContentOwnershipTransfer?2:a===s.UserNoticeTypes.TeamAccountClosed?3:-1)}},dependencies:[be.X,j.Q],styles:[".user-notice--dismissing[_ngcontent-%COMP%]{opacity:.5}"],changeDetection:0})}return n})();function Zi(n,o){1&n&&e.nrm(0,"app-user-notice",0),2&n&&e.Y8G("userNotice",o.$implicit)}let It=(()=>{class n{constructor(t){this.store=t,this.ngUnsubscribe=new R.B}ngOnInit(){this.userNotices$=this.store.select(g.k.getUserNotices).pipe((0,B.p)(t=>!(0,C.isNil)(t)),(0,w.T)(t=>t.filter(i=>i.notice_type===this.noticeType)),(0,h.Q)(this.ngUnsubscribe)),this.store.selectSnapshot(g.k.getUserNotices)||this.store.dispatch(new f.T9)}ngOnDestroy(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()}static#e=this.\u0275fac=function(i){return new(i||n)(e.rXU(l.il))};static#t=this.\u0275cmp=e.VBU({type:n,selectors:[["app-user-notices"]],inputs:{noticeType:"noticeType"},decls:3,vars:2,consts:[[1,"block","mb-3",3,"userNotice"]],template:function(i,s){1&i&&(e.Z7z(0,Zi,1,1,"app-user-notice",0,e.fX1),e.nI1(2,"async")),2&i&&e.Dyx(e.bMT(2,0,s.userNotices$))},dependencies:[Ki,d.Jj],encapsulation:2,changeDetection:0})}return n})();class Le{constructor(o,t,i,s,a,r){this.router=o,this.activatedRoute=t,this.store=i,this.actions=s,this.snackBar=a,this.upgradeService=r,this.selectedPlan=(0,$.ot)(this.store.select(ae.z.getSelectedPlan)),this.ngUnsubscribe=new R.B}ngOnInit(){this.initForm(),this.initSubscriptionListeners(),this.store.dispatch(new je.eI)}ngAfterViewInit(){this.initNavigation()}ngOnDestroy(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()}initForm(){this.plans$.pipe((0,B.p)(o=>o.length>0),(0,h.Q)(this.ngUnsubscribe)).subscribe(o=>{this.store.dispatch(new je.dJ(o[0]))})}initSubscriptionListeners(){this.actions.pipe((0,l.xi)(je.XF),(0,h.Q)(this.ngUnsubscribe)).subscribe(o=>{this.handleCheckoutSuccess(o)}),this.actions.pipe((0,l.rM)(f.sz),(0,h.Q)(this.ngUnsubscribe)).subscribe(o=>{this.router.navigate(["/login/verify"])})}initNavigation(){this.activatedRoute.queryParams.pipe((0,Ji.c)(0),(0,h.Q)(this.ngUnsubscribe)).subscribe(o=>{this.handleNavigation(o)})}handleNavigation(o){const{section:t,mode:i}=o;"subscription"===t&&"edit"===i&&(this.panel.mode="edit")}handleLearnMoreClick(){this.upgradeService.openUpgradeDialog()}handleCancelClick(){this.panel.mode="view"}handleCheckoutSuccess(o){this.snackBar.open("You've Successfully upgraded to a premium account");const{discountcode:t}=o.request;t&&this.store.dispatch(new f.r({type:"promocode",id:t})),window.location.href="/account/profile"}static#e=this.\u0275fac=function(t){return new(t||Le)(e.rXU(E.Ix),e.rXU(E.nX),e.rXU(l.il),e.rXU(l.En),e.rXU(O.UG),e.rXU(on.E))};static#t=this.\u0275cmp=e.VBU({type:Le,selectors:[["app-account-free-user-subscription"]],viewQuery:function(t,i){if(1&t&&e.GBs(P,7),2&t){let s;e.mGM(s=e.lsd())&&(i.panel=s.first)}},standalone:!1,decls:15,vars:1,consts:[["panel",""],["label","Subscription",1,"free-user-subscription"],["panel-view","",1,"text-sm"],["noticeType","team_account_closed"],[1,"mb-4"],[1,"font-bold"],["app-button","","buttonType","ghost","buttonTheme","light","buttonSize","md","appEventFence","",1,"underline",3,"click","padded"],[1,"px-1","text-sm"]],template:function(t,i){if(1&t){const s=e.RV6();e.j41(0,"app-account-panel",1,0)(2,"div",2),e.nrm(3,"app-user-notices",3),e.j41(4,"div",4),e.EFF(5,"You have a free "),e.j41(6,"em",5),e.EFF(7,"Personal"),e.k0s(),e.EFF(8," account."),e.k0s(),e.j41(9,"div"),e.EFF(10," As a free user you currently have access to our basic features. "),e.j41(11,"button",6),e.bIt("click",function(){return e.eBV(s),e.Njj(i.handleLearnMoreClick())}),e.j41(12,"span",7),e.EFF(13,"Contact us"),e.k0s()(),e.EFF(14," to unlock full access. "),e.k0s()()()}2&t&&(e.R7$(11),e.Y8G("padded",!1))},dependencies:[j.Q,Ft.L,It,P],styles:[".free-user-subscription__edit[_ngcontent-%COMP%]{border:1px solid #d4d9e3;border-radius:4px}.free-user-subscription__edit-head[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;padding:20px;border-bottom:1px solid #d4d9e3}.free-user-subscription__sales-tax[_ngcontent-%COMP%]{font-size:12px;color:#6d809f}.free-user-subscription__edit-body[_ngcontent-%COMP%]{padding:40px 20px 20px;border-bottom:1px solid #d4d9e3}"],changeDetection:0})}!function(n,o,t,i){var r,s=arguments.length,a=s<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,t):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(n,o,t,i);else for(var u=n.length-1;u>=0;u--)(r=n[u])&&(a=(s<3?r(a):s>3?r(o,t,a):r(o,t))||a);s>3&&a&&Object.defineProperty(o,t,a)}([(0,l.l6)(ae.z.getPlans),function(n,o){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata("design:type",o)}(0,_.c)],Le.prototype,"plans$",void 0);var sn=c(4837);function no(n,o){1&n&&e.eu8(0)}function io(n,o){if(1&n&&(e.j41(0,"div",7),e.EFF(1," This subscription has been purchased through iTunes. "),e.DNE(2,no,1,0,"ng-container",8),e.k0s()),2&n){e.XpG(2);const t=e.sdS(7);e.R7$(2),e.Y8G("ngTemplateOutlet",t)}}function oo(n,o){1&n&&e.eu8(0)}function so(n,o){if(1&n&&(e.j41(0,"div",7),e.EFF(1," This subscription has been purchased through Google Play. "),e.DNE(2,oo,1,0,"ng-container",8),e.k0s()),2&n){e.XpG(2);const t=e.sdS(7);e.R7$(2),e.Y8G("ngTemplateOutlet",t)}}function ao(n,o){if(1&n&&(e.j41(0,"div",6),e.DNE(1,io,3,1,"div",5)(2,so,3,1,"div",5),e.k0s()),2&n){const t=e.XpG(2);e.Y8G("ngSwitch",t.subscription.subscription_provider),e.R7$(),e.Y8G("ngSwitchCase","apple"),e.R7$(),e.Y8G("ngSwitchCase","google")}}function ro(n,o){1&n&&(e.j41(0,"div",7),e.EFF(1," Premium access will remain active until your renewal date passes. "),e.k0s())}function co(n,o){1&n&&(e.j41(0,"div",7),e.EFF(1," Please visit your iTunes account to manage or cancel your subscription. "),e.k0s())}function lo(n,o){1&n&&(e.j41(0,"div",7),e.EFF(1," Please visit your Google Play account to manage your subscription. "),e.k0s())}function po(n,o){if(1&n&&(e.j41(0,"div",7),e.EFF(1," Your subscription has been canceled. "),e.qex(2,3),e.DNE(3,ro,2,0,"div",5)(4,co,2,0,"div",5)(5,lo,2,0,"div",5),e.bVm(),e.k0s()),2&n){const t=e.XpG(2);e.R7$(2),e.Y8G("ngSwitch",t.subscription.subscription_provider),e.R7$(),e.Y8G("ngSwitchCase","braintree"),e.R7$(),e.Y8G("ngSwitchCase","apple"),e.R7$(),e.Y8G("ngSwitchCase","google")}}function uo(n,o){1&n&&e.eu8(0)}function mo(n,o){if(1&n&&(e.j41(0,"div",7),e.EFF(1," Your payment is past due. "),e.DNE(2,uo,1,0,"ng-container",8),e.k0s()),2&n){e.XpG();const t=e.sdS(7);e.R7$(2),e.Y8G("ngTemplateOutlet",t)}}function ho(n,o){1&n&&e.eu8(0)}function go(n,o){if(1&n&&(e.j41(0,"div",7),e.EFF(1," Your subscription has been canceled or expired. "),e.DNE(2,ho,1,0,"ng-container",8),e.k0s()),2&n){e.XpG();const t=e.sdS(7);e.R7$(2),e.Y8G("ngTemplateOutlet",t)}}function fo(n,o){1&n&&(e.j41(0,"div",7),e.EFF(1," Please update your payment info for premium access. "),e.k0s())}function _o(n,o){1&n&&(e.j41(0,"div",7),e.EFF(1," Please visit your iTunes account to manage or cancel your subscription. "),e.k0s())}function bo(n,o){1&n&&(e.j41(0,"div",7),e.EFF(1," Please visit your Google Play account to manage your subscription. "),e.k0s())}function vo(n,o){if(1&n&&(e.qex(0,3),e.DNE(1,fo,2,0,"div",5)(2,_o,2,0,"div",5)(3,bo,2,0,"div",5),e.bVm()),2&n){const t=e.XpG(2);e.Y8G("ngSwitch",t.subscription.subscription_provider),e.R7$(),e.Y8G("ngSwitchCase","braintree"),e.R7$(),e.Y8G("ngSwitchCase","apple"),e.R7$(),e.Y8G("ngSwitchCase","google")}}function Co(n,o){if(1&n&&(e.j41(0,"div",2),e.qex(1,3),e.DNE(2,ao,3,3,"div",4)(3,po,6,4,"div",5)(4,mo,3,1,"div",5)(5,go,3,1,"div",5),e.bVm(),e.DNE(6,vo,4,4,"ng-template",null,0,e.C5r),e.k0s()),2&n){const t=e.XpG();e.R7$(),e.Y8G("ngSwitch",t.subscription.subscription_status),e.R7$(),e.Y8G("ngSwitchCase","active"),e.R7$(),e.Y8G("ngSwitchCase","canceled"),e.R7$(),e.Y8G("ngSwitchCase","past due"),e.R7$(),e.Y8G("ngSwitchCase","expired")}}let To=(()=>{class n{constructor(){}ngOnInit(){}static#e=this.\u0275fac=function(i){return new(i||n)};static#t=this.\u0275cmp=e.VBU({type:n,selectors:[["app-account-status-message"]],inputs:{subscription:"subscription"},standalone:!1,decls:1,vars:1,consts:[["providerTpl",""],["class","text-sm",4,"ngIf"],[1,"text-sm"],[3,"ngSwitch"],["class","mb-1",3,"ngSwitch",4,"ngSwitchCase"],["class","mb-1",4,"ngSwitchCase"],[1,"mb-1",3,"ngSwitch"],[1,"mb-1"],[4,"ngTemplateOutlet"]],template:function(i,s){1&i&&e.DNE(0,Co,8,5,"div",1),2&i&&e.Y8G("ngIf",s.subscription)},dependencies:[d.bT,d.T3,d.ux,d.e1],encapsulation:2,changeDetection:0})}return n})();function yo(n,o){if(1&n&&(e.j41(0,"div",8)(1,"div",9),e.EFF(2),e.k0s(),e.j41(3,"div",10),e.EFF(4),e.k0s()()),2&n){const t=e.XpG();e.R7$(2),e.SpI(" $",t.subscription.billing_details.next_billing_period_amount," "),e.R7$(2),e.SpI(" ",t.calcPaymentFrequency(t.subscription.plan_id)," ")}}function ko(n,o){if(1&n&&(e.qex(0),e.j41(1,"div",11),e.EFF(2,"Renewal Date"),e.k0s(),e.j41(3,"div",12),e.qex(4),e.EFF(5),e.nI1(6,"date"),e.bVm(),e.k0s(),e.bVm()),2&n){const t=o.$implicit,i=e.XpG();e.R7$(5),e.Lme(" ",e.i5U(6,2,t,"longDate")," (in ",i.calcDaysRemaining(t)," days) ")}}let Ro=(()=>{class n{constructor(){this.calcDaysRemaining=sn.lu,this.calcPaymentFrequency=sn.Qh}ngOnInit(){}static#e=this.\u0275fac=function(i){return new(i||n)};static#t=this.\u0275cmp=e.VBU({type:n,selectors:[["app-account-subscription-summary"]],inputs:{subscription:"subscription"},standalone:!1,decls:10,vars:4,consts:[["card-header","",1,"summary","flex","flex-row","justify-between"],[1,"summary__title","flex-auto"],[1,"text-base","font-semibold","uppercase"],["class","flex flex-col items-center",4,"ngIf"],["card-content",""],[4,"ngIf"],[1,"my-1"],[3,"subscription"],[1,"flex","flex-col","items-center"],[1,"text-lg","font-semibold"],[1,"summary__pricing","text-xs"],[1,"text-xs","text-gray-400"],[1,"text-sm"]],template:function(i,s){1&i&&(e.j41(0,"app-account-summary-card")(1,"div",0)(2,"div",1)(3,"div",2),e.EFF(4),e.k0s()(),e.DNE(5,yo,5,2,"div",3),e.k0s(),e.j41(6,"div",4),e.DNE(7,ko,7,5,"ng-container",5),e.j41(8,"div",6),e.nrm(9,"app-account-status-message",7),e.k0s()()()),2&i&&(e.R7$(4),e.SpI(" ",null==s.subscription?null:s.subscription.subscription_type_display," "),e.R7$(),e.Y8G("ngIf",null==s.subscription?null:s.subscription.billing_details),e.R7$(2),e.Y8G("ngIf",null==s.subscription||null==s.subscription.billing_details?null:s.subscription.billing_details.next_billing_date_time),e.R7$(2),e.Y8G("subscription",s.subscription))},dependencies:[d.bT,nn,To,d.vh],styles:[".summary__pricing[_ngcontent-%COMP%]{color:#384c6c}"],changeDetection:0})}return n})();var Dt=function(n,o,t,i){var r,s=arguments.length,a=s<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,t):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(n,o,t,i);else for(var u=n.length-1;u>=0;u--)(r=n[u])&&(a=(s<3?r(a):s>3?r(o,t,a):r(o,t))||a);return s>3&&a&&Object.defineProperty(o,t,a),a},Et=function(n,o){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(n,o)};class Ie{get isBraintreeSubscription$(){return this.subscriptionProvider$.pipe((0,w.T)(o=>"braintree"===o))}get subscriptionProvider$(){return this.subscription$.pipe((0,w.T)(o=>o?o.subscription_provider:""))}constructor(o){this.store=o,this.ngUnsubscribe=new R.B}ngOnInit(){}ngOnDestroy(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()}static#e=this.\u0275fac=function(t){return new(t||Ie)(e.rXU(l.il))};static#t=this.\u0275cmp=e.VBU({type:Ie,selectors:[["app-account-premium-user-subscription"]],viewQuery:function(t,i){if(1&t&&e.GBs(P,7),2&t){let s;e.mGM(s=e.lsd())&&(i.panel=s.first)}},standalone:!1,decls:5,vars:3,consts:[["panel",""],["label","Subscription"],[1,"account","mt-4"],[3,"subscription"]],template:function(t,i){1&t&&(e.j41(0,"app-account-panel",1,0)(2,"div",2),e.nrm(3,"app-account-subscription-summary",3),e.nI1(4,"async"),e.k0s()()),2&t&&(e.R7$(3),e.Y8G("subscription",e.bMT(4,1,i.subscription$)))},dependencies:[P,Ro,d.Jj],encapsulation:2,changeDetection:0})}Dt([(0,l.l6)(g.k.getUserProfile),Et("design:type",_.c)],Ie.prototype,"userProfile$",void 0),Dt([(0,l.l6)(ae.z.getSubscription),Et("design:type",_.c)],Ie.prototype,"subscription$",void 0),Dt([(0,l.l6)(ae.z.isFreeTrial),Et("design:type",_.c)],Ie.prototype,"isFreeTrial$",void 0);var H=c(7673),an=c(99437),A=c(82529),K=c(26195),Z=c(79391),st=c(55091),F=c(18582),re=c(16495),Ut=c(37116),ee=c(63904),te=c(71961),ne=c(3571);function So(n,o){if(1&n&&(e.j41(0,"div",7)(1,"p"),e.EFF(2),e.k0s()()),2&n){const t=e.XpG(2);e.R7$(2),e.JRh(t.message)}}function xo(n,o){1&n&&e.nrm(0,"app-team-user",9),2&n&&e.Y8G("user",o.$implicit)("showEmail",!0)("showNameUnknown",!0)}function Fo(n,o){if(1&n&&(e.j41(0,"option",13),e.EFF(1),e.k0s()),2&n){const t=o.$implicit;e.Y8G("value",t.id),e.R7$(),e.Lme("",t.name,"(",t.email,")")}}function jo(n,o){if(1&n&&(e.j41(0,"div",3),e.DNE(1,So,3,1,"div",7),e.j41(2,"app-form-field",8),e.Z7z(3,xo,1,3,"app-team-user",9,e.fX1),e.k0s(),e.j41(5,"app-form-field",10)(6,"select",11)(7,"option",12),e.EFF(8,"-- Select User --"),e.k0s(),e.Z7z(9,Fo,2,3,"option",13,e.fX1),e.k0s()()()),2&n){const t=e.XpG();e.Y8G("formGroup",t.form),e.R7$(),e.vxM(t.message?1:-1),e.R7$(2),e.Dyx(t.sourceUsers),e.R7$(2),e.Y8G("label","To User ("+t.availableRoles.join(" OR ")+")"),e.R7$(4),e.Dyx(t.availableUsers)}}const rn=[X.x.Creator,X.x.Admin];let Io=(()=>{class n{constructor(t,i,s,a,r,u,v,T){this.data=t,this.dialogRef=i,this.formBuilder=s,this.store=a,this.actions=r,this.changeRef=u,this.snackBar=v,this.usersService=T,this.availableRoles=rn,this.availableUsers=[],this.sourceUsers=[],this.transferring=!1,this.ngUnsubscribe=new R.B}ngOnInit(){this.initForm(),this.initOrganization(),this.initMessaging()}ngOnDestroy(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()}initForm(){this.form=this.formBuilder.group({targetUserId:[`${this.data.targetUserId||""}`,p.k0.required]})}initOrganization(){const t=this.store.selectSnapshot(re.e.getUsers);this.sourceUsers=this.data.sourceUsers;const i=new Set(this.sourceUsers.map(s=>s.id));this.availableUsers=t.filter(s=>
1{const a=rn.includes(s.user_role.role_name),r=i.has(s.user_id);return a&&!r}).sort((s,a)=>(0,C.trim)((s.user_first_name??"").toLocaleUpperCase())>(0,C.trim)((a.user_first_name??"").toLocaleUpperCase())?1:-1).map(s=>this.usersService.createUserDisplayModel(s)),this.message="Transfer the original save location and management permissions of the user(s)' content to a new owner",this.data.action===K.y.RemoveUser&&(this.message+=" before removing the user(s).")}initMessaging(){this.actions.pipe((0,l.xi)(F.Qy),(0,h.Q)(this.ngUnsubscribe)).subscribe(()=>{this.transferring=!0,this.changeRef.markForCheck()}),this.actions.pipe((0,l.xi)(F.Fk),(0,h.Q)(this.ngUnsubscribe)).subscribe(t=>{this.transferring=!1,this.dialogRef.close(t.users),this.changeRef.markForCheck()}),this.actions.pipe((0,l.xi)(F.ah),(0,h.Q)(this.ngUnsubscribe)).subscribe(()=>{this.transferring=!1,this.snackBar.open("There was an error transferring user content, please try again."),this.changeRef.markForCheck()})}handleTransferClick(){const{organization:t,sourceUsers:i}=this.data,s=parseInt(this.form.value.targetUserId,10),a=i.map(r=>({sourceUserId:r.id,targetUserId:s}));this.store.dispatch(new F.Qy(t.id,a))}close(){this.dialogRef.close()}static#e=this.\u0275fac=function(i){return new(i||n)(e.rXU(A.Qs),e.rXU(A.ce),e.rXU(p.ze),e.rXU(l.il),e.rXU(l.En),e.rXU(e.gRc),e.rXU(O.UG),e.rXU(Ut.g))};static#t=this.\u0275cmp=e.VBU({type:n,selectors:[["app-team-transfer-dialog"]],decls:10,vars:2,consts:[["app-dialog-title",""],["app-dialog-content",""],["data-test","teamTransferDialog"],[3,"formGroup"],["app-dialog-actions",""],["app-button","","buttonType","ghost","buttonTheme","light","buttonSize","md",3,"click"],["app-button","","buttonType","primary","buttonTheme","light","buttonSize","md",3,"click","disabled"],[1,"mb-3","text-sm"],["label","From User","theme","light"],[1,"flex","py-2","my-1","grow",3,"user","showEmail","showNameUnknown"],["theme","light",3,"label"],["appInput","","formControlName","targetUserId"],["value",""],[3,"value"]],template:function(i,s){1&i&&(e.j41(0,"h1",0),e.EFF(1,"Transfer Content"),e.k0s(),e.j41(2,"div",1)(3,"div",2),e.DNE(4,jo,11,3,"div",3),e.k0s()(),e.j41(5,"div",4)(6,"button",5),e.bIt("click",function(){return s.close()}),e.EFF(7," Cancel "),e.k0s(),e.j41(8,"button",6),e.bIt("click",function(){return s.handleTransferClick()}),e.EFF(9," Transfer Content "),e.k0s()()),2&i&&(e.R7$(4),e.vxM(s.sourceUsers?4:-1),e.R7$(4),e.Y8G("disabled",s.form.invalid||s.transferring))},dependencies:[p.X1,p.xH,p.y7,p.wz,p.BC,p.cb,p.j4,p.JD,fe.K,st.o,j.Q,L.k,Z.U,ee.M,te.r,ne.x],encapsulation:2,changeDetection:0})}return n})();var De=c(82760),ve=c(82765),cn=c(91363);function Do(n,o){if(1&n&&(e.j41(0,"app-alert",5)(1,"strong",15),e.EFF(2),e.k0s(),e.EFF(3," is excluded as they are the current user "),e.k0s()),2&n){const t=e.XpG();e.R7$(2),e.JRh(t.data.excluded)}}function Eo(n,o){1&n&&e.nrm(0,"app-team-user",7),2&n&&e.Y8G("user",o.$implicit)("showEmail",!0)("showNameUnknown",!0)}function Uo(n,o){if(1&n&&(e.j41(0,"option",10),e.EFF(1),e.k0s()),2&n){const t=o.$implicit;e.Y8G("value",t.value),e.R7$(),e.SpI(" ",t.label," ")}}function Mo(n,o){if(1&n&&(e.j41(0,"app-message-toggle",11),e.EFF(1," You are trying to "),e.j41(2,"a",16),e.EFF(3),e.k0s(),e.EFF(4,". If you remove them, the apps will "),e.j41(5,"span",4),e.EFF(6,"stop working."),e.k0s(),e.j41(7,"div",17)(8,"mat-checkbox",18)(9,"span",19),e.EFF(10),e.k0s()()()()),2&n){const t=e.XpG();e.R7$(3),e.SpI(" remove ",1===t.activeDevelopersLength?"a "+t.developerNoun:t.developerNoun," with active developer apps"),e.R7$(7),e.SpI("I confirm that I want to remove the ",t.developerNoun,".")}}var Pe=function(n){return n.Transfer="transfer",n.Remove="remove",n}(Pe||{});let wo=(()=>{class n{constructor(t,i,s){this.data=t,this.dialogRef=i,this.formBuilder=s,this.contentOptions=[{value:Pe.Transfer,label:"Transfer ownership to a different team member"},{value:Pe.Remove,label:"Make private and remove from team"}],this.hasActiveDevelopers=!1}ngOnInit(){const t=this.data.users.length;this.userNoun=1===t?"user":"users",this.title=`Remove ${1===t?"":`${t} `}${(0,C.capitalize)(this.userNoun)}`;const i=this.data.users.filter(s=>s.activeDeveloper);this.activeDevelopersLength=i.length,this.developerNoun=1===this.activeDevelopersLength?"user":"users",this.hasActiveDevelopers=this.activeDevelopersLength>0,this.form=this.formBuilder.group({contentOptions:[Pe.Transfer,p.k0.required],confirm:[!this.hasActiveDevelopers,p.k0.requiredTrue]})}handleRemoveClick(){this.dialogRef.close(this.form.value.contentOptions)}close(){this.dialogRef.close()}static#e=this.\u0275fac=function(i){return new(i||n)(e.rXU(A.Qs),e.rXU(A.ce),e.rXU(p.ze))};static#t=this.\u0275cmp=e.VBU({type:n,selectors:[["app-team-remove-users-dialog"]],decls:22,vars:7,consts:[["app-dialog-title",""],["app-dialog-content",""],["data-test","teamRemoveUserDialog",3,"formGroup"],[1,"pb-3","text-sm"],[1,"font-bold"],["type","info"],["theme","light"],[1,"flex","py-2","my-1","grow",3,"user","showEmail","showNameUnknown"],["label","What would you like to do with their 3D models?","theme","light"],["appInput","","formControlName","contentOptions"],[3,"value"],["type","danger","theme","dark","icon","info-circle"],["app-dialog-actions",""],["app-button","","buttonType","ghost","buttonTheme","light","buttonSize","md",3,"click"],["app-button","","buttonType","primary","buttonTheme","light","buttonSize","md",3,"click","disabled"],[1,"font-semibold"],["href","https://support.biodigital.com/hc/en-us/articles/22012525162391-Remove-a-developer-from-my-team#h_01HRSNVCVE63TZ85HB9Y5436R0","target","_blank",1,"font-bold","underline","text-link"],[1,"mt-3","theme-light"],["formControlName","confirm"],[1,"whitespace-normal"]],template:function(i,s){1&i&&(e.j41(0,"h1",0),e.EFF(1),e.k0s(),e.j41(2,"div",1)(3,"div",2)(4,"div",3),e.EFF(5),e.j41(6,"span",4),e.EFF(7),e.k0s()(),e.DNE(8,Do,4,1,"app-alert",5),e.j41(9,"app-form-field",6),e.Z7z(10,Eo,1,3,"app-team-user",7,e.fX1),e.k0s(),e.j41(12,"app-form-field",8)(13,"select",9),e.Z7z(14,Uo,2,2,"option",10,e.fX1),e.k0s()(),e.DNE(16,Mo,11,2,"app-message-toggle",11),e.k0s()(),e.j41(17,"div",12)(18,"button",13),e.bIt("click",function(){return s.close()}),e.EFF(19," Cancel "),e.k0s(),e.j41(20,"button",14),e.bIt("click",function(){return s.handleRemoveClick()}),e.EFF(21," Remove "),e.k0s()()),2&i&&(e.R7$(),e.JRh(s.title),e.R7$(2),e.Y8G("formGroup",s.form),e.R7$(2),e.SpI(" Are you sure you want to remove the following ",s.userNoun,"? They will no longer have access to "),e.R7$(2),e.JRh(s.data.organization.name),e.R7$(),e.vxM(""!==s.data.excluded?8:-1),e.R7$(2),e.Dyx(s.data.users),e.R7$(4),e.Dyx(s.contentOptions),e.R7$(2),e.vxM(s.hasActiveDevelopers?16:-1),e.R7$(4),e.Y8G("disabled",0===s.data.users.length||s.form.invali
1d))},dependencies:[d.MD,p.X1,p.xH,p.y7,p.wz,p.BC,p.cb,p.j4,p.JD,fe.K,cn.C,st.o,be.X,j.Q,L.k,ve.So,Z.U,ee.M,te.r,ne.x],encapsulation:2,changeDetection:0})}return n})();function Ao(n,o){if(1&n&&(e.j41(0,"app-alert",4)(1,"strong",9),e.EFF(2),e.k0s(),e.EFF(3," is excluded as they are the current user "),e.k0s()),2&n){const t=e.XpG();e.R7$(2),e.JRh(t.data.excluded)}}function Go(n,o){1&n&&e.nrm(0,"app-team-user",5),2&n&&e.Y8G("user",o.$implicit)("showEmail",!0)("showNameUnknown",!0)}let Po=(()=>{class n{constructor(t,i){this.data=t,this.dialogRef=i}ngOnInit(){this.newRoleName=this.data.role.role_display_name}handleConfirmClick(){this.dialogRef.close(!0)}close(){this.dialogRef.close()}static#e=this.\u0275fac=function(i){return new(i||n)(e.rXU(A.Qs),e.rXU(A.ce))};static#t=this.\u0275cmp=e.VBU({type:n,selectors:[["app-team-confirm-role-dialog"]],decls:17,vars:3,consts:[["app-dialog-title",""],["app-dialog-content","","data-test","teamConfirmRoleDialog"],[1,"my-3","text-sm"],[1,"font-bold"],["type","info"],[1,"flex","py-2","my-1","grow",3,"user","showEmail","showNameUnknown"],["app-dialog-actions",""],["app-button","","buttonType","ghost","buttonTheme","light","buttonSize","md",3,"click"],["app-button","","buttonType","primary","buttonTheme","light","buttonSize","md",3,"click","disabled"],[1,"font-semibold"]],template:function(i,s){1&i&&(e.j41(0,"h1",0),e.EFF(1,"Confirm Role Change"),e.k0s(),e.j41(2,"div",1)(3,"div",2)(4,"p"),e.EFF(5," Are you sure you want to change the role of the following user(s) to "),e.j41(6,"span",3),e.
1EFF(7),e.k0s(),e.EFF(8,"? "),e.k0s()(),e.DNE(9,Ao,4,1,"app-alert",4),e.Z7z(10,Go,1,3,"app-team-user",5,e.fX1),e.k0s(),e.j41(12,"div",6)(13,"button",7),e.bIt("click",function(){return s.close()}),e.EFF(14," Cancel "),e.k0s(),e.j41(15,"button",8),e.bIt("click",function(){return s.handleConfirmClick()}),e.EFF(16," Confirm Role Change "),e.k0s()()),2&i&&(e.R7$(7),e.JRh(s.newRoleName),e.R7$(2),e.vxM(""!==s.data.excluded?9:-1),e.R7$(),e.Dyx(s.data.users),e.R7$(5),e.Y8G("disabled",0===s.data.users.length))},dependencies:[cn.C,st.o,j.Q,Z.U,ee.M,te.r,ne.x],encapsulation:2,changeDetection:0})}return n})();var U=c(29646),Y=c(49076),Mt=function(n,o,t,i){var r,s=arguments.length,a=s<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,t):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(n,o,t,i);else for(var u=n.length-1;u>=0;u--)(r=n[u])&&(a=(s<3?r(a):s>3?r(o,t,a):r(o,t))||a);return s>3&&a&&Object.defineProperty(o,t,a),a},wt=function(n,o){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(n,o)};function $o(n,o){1&n&&(e.j41(0,"li"),e.EFF(1," You will "),e.j41(2,"span",4),e.EFF(3,"lose access"),e.k0s(),e.EFF(4," to content you've added to the team. This content will be transferred to an admin. "),e.k0s())}function No(n,o){1&n&&(e.j41(0,"li"),e.EFF(1,"Your developer apps will "),e.j41(2,"span",4),e.EFF(3,"stop working."),e.k0s()())}function Oo(n,o){1&n&&e.nrm(0,"app-spinner",11)}class Ee{constructor(o,t,i,s,a,r){this.formBuilder=o,this.store=t,this.snackBar=i,this.actions=s,this.data=a,this.dialogRef=r,this.ngUnsubscribe=new R.B}ngOnInit(){this.name=this.data.organization.name,this.mode=this.data.mode,this.initActionHandlers(),this.initForm()}ngOnDestroy(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()}initForm(){this.form=this.formBuilder.group({confirm:[!1,p.k0.requiredTrue]})}initActionHandlers(){this.actions.pipe((0,l.xi)(U.GC,F.AA),(0,ue.s)(1),(0,h.Q)(this.ngUnsubscribe)).subscribe(()=>{this.store.dispatch(new f.hs),this.snackBar.open(("leave"===this.mode?"You have left the team.":"Your team account was closed.")+" You have been downgraded to a free Personal account."),this.dialogRef.close(!0)}),this.actions.pipe((0,l.xi)(U.XL,F.Rr),(0,h.Q)(this.ngUnsubscribe)).subscribe(()=>{this.snackBar.open(`There was an error ${"leave"===this.mode?"leaving":"closing"} the team. Please try again.`)})}handleCancelClick(){this.dialogRef.close()}handleLeaveClick(){this.store.dispatch("close"===this.mode?new U.$7(this.data.organization):new F.f0(this.data.organization))}static#e=this.\u0275fac=function(t){return new(t||Ee)(e.rXU(p.ze),e.rXU(l.il),e.rXU(O.UG),e.rXU(l.En),e.rXU(A.Qs),e.rXU(A.ce))};static#t=this.\u0275cmp=e.VBU({type:Ee,selectors:[["app-team-leave-dialog"]],decls:37,vars:26,consts:[["app-dialog-title",""],["app-dialog-content",""],[1,"text-sm",3,"formGroup"],[1,"flex","flex-col","gap-2","mx-6","my-3","list-disc"],[1,"font-bold"],[1,"mt-4"],["formControlName","confirm"],[1,"whitespace-normal"],["app-dialog-actions",""],["app-button","","buttonType","ghost","buttonTheme","light","buttonSize","md",3,"click"],["app-button","","buttonType","primary","buttonTheme","light","buttonSize","md",3,"click","disabled"],["size","sm","color","white",1,"mr-1"]],template:function(t,i){1&t&&(e.j41(0,"h1",0),e.EFF(1),e.nI1(2,"titlecase"),e.k0s(),e.j41(3,"div",1)(4,"div",2),e.EFF(5),e.j41(6,"ul",3)(7,"li"),e.EFF(8),e.j41(9,"span",4),e.EFF(10,"downgraded"),e.k0s(),e.EFF(11," to a free Personal account. "),e.k0s(),e.j41(12,"li"),e.EFF(13," You will "),e.j41(14,"span",4),e.EFF(15,"lose access"),e.k0s(),e.EFF(16," to collections and content in your team. "),e.k0s(),e.DNE(17,$o,5,0,"li")(18,No,4,0,"li"),e.nI1(19,"async"),e.j41(20,"li"),e.EFF(21,"Your private content will remain with your account."),e.k0s()(),e.j41(22,"div",5)(23,"mat-checkbox",6)(24,"span",7),e.EFF(25),e.k0s()()()()(),e.j41(26,"div",8)(27,"button",9),e.bIt("click",function(){return i.handleCancelClick()}),e.EFF(28," Cancel "),e.k0s(),e.j41(29,"button",10),e.nI1(30,"async"),e.nI1(31,"async"),e.bIt("click",function(){return i.handleLeaveClick()}),e.DNE(32,Oo,1,0,"app-spinner",11),e.nI1(33,"async"),e.nI1(34,"async"),e.EFF(35),e.nI1(36,"titlecase"),e.k0s()()),2&t&&(e.R7$(),e.Lme("",e.bMT(2,12,i.mode)," ",i.name," Team?"),e.R7$(3),e.Y8G("formGroup",i.form),e.R7$(),e.Lme(" Are you sure you want to ",i.mode," the ",i.name," Team? "),e.R7$(3),e.SpI(" Your account ","close"===i.mode?"and your team members' accounts":""," will be "),e.R7$(9),e.vxM("leave"===i.mode?17:-1),e.R7$(),e.vxM("close"===i.mode&&e.bMT(19,14,i.hasActiveDeveloperAccount$)?18:-1),e.R7$(7),e.SpI("I confirm that I want to ",i.mode," my team."),e.R7$(4),e.Y8G("disabled",i.form.invali
1d||e.bMT(30,16,i.leaving$)||e.bMT(31,18,i.deleting$)),e.R7$(3),e.vxM(e.bMT(33,20,i.leaving$)||e.bMT(34,22,i.deleting$)?32:-1),e.R7$(3),e.SpI(" ",e.bMT(36,24,i.mode)," Team "))},dependencies:[p.X1,p.BC,p.cb,p.j4,p.JD,j.Q,Y.t,d.Jj,d.PV,ve.So,Z.U,ee.M,te.r,ne.x],encapsulation:2,changeDetection:0})}Mt([(0,l.l6)(re.e.getLeaving),wt("design:type",_.c)],Ee.prototype,"leaving$",void 0),Mt([(0,l.l6)(S.q.getDeleting),wt("design:type",_.c)],Ee.prototype,"deleting$",void 0),Mt([(0,l.l6)(g.k.hasActiveDeveloperAccount),wt("design:type",_.c)],Ee.prototype,"hasActiveDeveloperAccount$",void 0);let ln=(()=>{class n{constructor(t,i){this.dialogService=t,this.usersService=i}removeUser(t,i,s){return this.confirmRemoveUser(t,i,s).pipe((0,J.Z)(a=>{if(a===Pe.Transfer)return this.transferUserContent(t,i,K.y.RemoveUser);if(a===Pe.Remove){const r=i.map(u=>({sourceUserId:u.id}));return(0,H.of)(r)}return(0,H.of)(!1)}),(0,J.Z)(a=>a?this.usersService.removeUsers(t.id,a).pipe((0,an.W)(()=>(0,H.of)(!1)),(0,w.T)(r=>({success:r,targetUserId:a[0].targetUserId}))):(0,H.of)({success:!1})))}setUserRole(t,i,s,a){const r=a.role_id,u=a.role_name,v=i.map(y=>({userId:y.id,roleId:r}));let T=[];return u===X.x.Viewer&&(T=i.filter(y=>y.role.role_name!==X.x.Viewer)),this.confirmRoleChange(i,s,a).pipe((0,J.Z)(y=>y&&T.length>0?this.transferUserContent(t,T,K.y.AssignRole):(0,H.of)(y)),(0,J.Z)(y=>y?this.usersService.updateUserRoles(t.id,v):(0,H.of)(!1)),(0,an.W)(()=>(0,H.of)(!1)),(0,w.T)(y=>({success:y,targetRoleId:a.role_id})))}confirmRoleChange(t,i,s){return this.dialogService.openCustom(Po,{id:De.t.ConfirmRoleDialog,disableClose:!1,maxWidth:"420px",data:{users:t,excluded:i,role:s}}).closed}confirmRemoveUser(t,i,s){return this.dialogService.openCustom(wo,{id:De.t.RemoveUserDialog,disableClose:!1,maxWidth:"420px",data:{organization:t,users:i,excluded:s}}).closed}transferUserContent(t,i,s){return this.dialogService.openCustom(Io,{id:De.t.TransferUserContentDialog,disableClose:!0,maxWidth:"420px",data:{organization:t,sourceUsers:i,action:s}}).closed}confirmLeaveTeam(t,i){return this.dialogService.openCustom(Ee,{width:"480px",data:{mode:i,organization:t}}).closed}static#e=this.\u0275fac=function(i){return new(i||n)(e.KVO(se.o),e.KVO(Ut.g))};static#t=this.\u0275prov=e.jDH({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var Bo=c(33774),Ye=function(n,o,t,i){var r,s=arguments.length,a=s<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,t):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(n,o,t,i);else for(var u=n.length-1;u>=0;u--)(r=n[u])&&(a=(s<3?r(a):s>3?r(o,t,a):r(o,t))||a);return s>3&&a&&Object.defineProperty(o,t,a),a},Qe=function(n,o){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(n,o)};function Vo(n,o){if(1&n&&(e.j41(0,"div",10)(1,"app-message-toggle",11),e.nI1(2,"async"),e.nI1(3,"async"),e.EFF(4),e.nI1(5,"async"),e.nI1(6,"async"),e.nI1(7,"async"),e.nI1(8,"date"),e.k0s()()),2&n){const t=e.XpG();e.R7$(),e.Y8G("type",e.bMT(2,6,t.isSubscriptionExpired$)?"warning":"notification")("icon",e.bMT(3,8,t.isSubscriptionExpired$)?"exclamation-triangle":"info-circle")("shown",!0),e.R7$(3),e.E5c(" Your ",e.bMT(5,10,t.isTrial$)?"free trial":"subscription"," ",e.bMT(6,12,t.isSubscriptionExpired$)?"expired":"expires"," on ",e.i5U(8,16,e.bMT(7,14,t.subscriptionEndDate$),"longDate"),". ")}}function zo(n,o){if(1&n){const t=e.RV6();e.j41(0,"div",12)(1,"button",13),e.bIt("click",function(){e.eBV(t);const s=e.XpG();return e.Njj(s.handleNeedToLeaveClick())}),e.EFF(2),e.k0s()()}if(2&n){const t=e.XpG();e.R7$(),e.Y8G("uppercase",!1),e.R7$(),e.SpI(" ",t.canCloseTeam?"Need to close your team?":"Need to leave the team?"," ")}}function Xo(n,o){1&n&&(e.j41(0,"div")(1,"div"),e.EFF(2," If you "),e.j41(3,"span",5),e.EFF(4,"close your team"),e.k0s(),e.EFF(5,", you'll lose access to everything in your team, including team collections. All members in your team including yourself will be downgraded to our free "),e.j41(6,"a",16),e.EFF(7,"Personal plan"),e.k0s(),e.EFF(8,". "),e.k0s()())}function Lo(n,o){if(1&n){const t=e.RV6();e.j41(0,"div"),e.DNE(1,Xo,9,0,"div",14),e.j41(2,"button",15),e.bIt("click",function(){e.eBV(t);const s=e.XpG(2);return e.Njj(s.handleLeaveClick())}),e.EFF(3),e.k0s()()}if(2&n){e.XpG();const t=e.sdS(3),i=e.XpG();e.R7$(),e.Y8G("ngIf",i.canCloseTeam)("ngIfElse",t),e.R7$(2),e.SpI(" ",i.canCloseTeam?"Close Team":"Leave Team"," ")}}function Yo(n,o){if(1&n&&(e.j41(0,"div"),e.EFF(1," By "),e.j41(2,"span",5),e.EFF(3),e.nI1(4,"async"),e.k0s(),e.EFF(5,", you'll lose access to everything in this team, including team collections. The content you have shared with the team will be transferred to an administrator. "),e.k0s()),2&n){let t;const i=e.XpG(2);e.R7$(3),e.SpI("leaving the ",null==(t=e.bMT(4,1,i.organization$))?null:t.name," team")}}function Qo(n,o){if(1&n){const t=e.RV6();e.j41(0,"app-message-toggle",17),e.EFF(1," You will need to "),e.j41(2,"button",13),e.bIt("click",function(){e.eBV(t);const s=e.XpG(2);return e.Njj(s.handleContactClick())}),e.EFF(3," contact us "),e.k0s(),e.EFF(4),e.nI1(5,"async"),e.k0s(),e.j41(6,"button",15),e.bIt("click",function(){e.eBV(t);const s=e.XpG(2);return e.Njj(s.handleContactClick())}),e.EFF(7," Contact Us "),e.k0s()}if(2&n){const t=e.XpG(2);e.R7$(2),e.Y8G("uppercase",!1),e.R7$(2),e.SpI(" if you need to leave the team",e.bMT(5,2,t.hasActiveDeveloperAccount$)?" because you have an active developer account associated with this team":"",". ")}}function qo(n,o){if(1&n&&(e.j41(0,"div",12),e.DNE(1,Lo,4,3,"div",14)(2,Yo,6,3,"ng-template",null,0,e.C5r)(4,Qo,8,4,"ng-template",null,1,e.C5r),e.k0s()),2&n){const t=e.sdS(5),i=e.XpG();e.R7$(),e.Y8G("ngIf",i.canCloseTeam||i.canLeaveTeam)("ngIfElse",t)}}class ce{constructor(o,t,i,s){this.store=o,this.zendeskService=t,this.organizationActionsService=i,this.changeDetectorRef=s,this.showLeaveTeam=!1,this.canLeaveTeam=!1,this.canCloseTeam=!1,this.needToLeaveClicked=!1,this.ngUnsubscribe=new R.B}ngOnInit(){this.organization$.pipe((0,B.p)(o=>!(0,C.isNil)(o)),(0,h.Q)(this.ngUnsubscribe)).subscribe(o=>{this.showLeaveTeam=!this.store.selectSnapshot(g.k.isAdmin),this.canLeaveTeam=o.user_can_leave_group,this.canCloseTeam=o.account_closure_allowed&&this.store.selectSnapshot(g.k.isAdmin),this.changeDetectorRef.markForCheck()})}handleContactClick(){this.zendeskService.showWidget("contact")}handleHelpClick(){this.zendeskService.showWidget()}handleNeedToLeaveClick(){this.needToLeaveClicked=!0}handleLeaveClick(){const o=this.canCloseTeam?"close":"leave";this.organizationActionsService.confirmLeaveTeam(this.store.selectSnapshot(S.q.getOrganization),o).subscribe(()=>{this.needToLeaveClicked=!1,this.changeDetectorRef.markForCheck()})}static#e=this.\u0275fac=function(t){return new(t||ce)(e.rXU(l.il),e.rXU(Bo.c),e.rXU(ln),e.rXU(e.gRc))};static#t=this.\u0275cmp=e.VBU({type:ce,selectors:[["app-account-premium-team-subscription"]],standalone:!1,decls:23,vars:14,consts:[["leaveTeamTemplate",""],["contactUsTemplate",""],["label","Subscription"],[1,"text-sm"],["class","mb-4",4,"ngIf"],[1,"font-bold"],[1,"mt-2"],["app-button","","buttonType","ghost","buttonTheme","light","buttonSize","md",1,"underline",3,"click","padded"],[1,"px-1","text-sm"],["class","mt-4",4,"ngIf"],[1,"mb-4"],[3,"type","icon","shown"],[1,"mt-4"],["app-button","","buttonType","ghost","buttonTheme","light","buttonSize","md",1,"underline",3,"click","uppercase"],[4,"ngIf","ngIfElse"],["app-button","","buttonType","secondary","buttonTheme","light","buttonSize","md",1,"mt-4",3,"click"],["href","https://support.biodigital.com/hc/en-us/articles/360000055447-What-subscriptions-do-you-offer#h_01JS5K4KZ7REP2YC2HM7HQKTGE","target","_blank",1,"underline","text-link"],["type","notification","theme","dark","icon","info-circle","alignIcon","center"]],template:function(t,i){if(1&t&&(e.j41(0,"app-account-panel",2)(1,"div",3),e.DNE(2,Vo,9,19,"div",4),e.nI1(3,"async"),e.nI1(4,"async"),e.j41(5,"div"),e.EFF(6," You have a "),e.j41(7,"em",5),e.EFF(8),e.nI1(9,"async"),e.k0s(),e.EFF(10," plan through the "),e.j41(11,"em",5),e.EFF(12),e.nI1(13,"async"),e.k0s(),e.EFF(14," team. "),e.k0s(),e.j41(15,"div",6),e.EFF(16," For more information or questions regarding your subscription, please contact our "),e.j41(17,"button",7),e.bIt("click",function(){return i.handleHelpClick()}),e.j41(18,"span",8),e.EFF(19,"Customer Experience"),e.k0s()(),e.EFF(20," team. "),e.k0s(),e.DNE(21,zo,3,2,"div",9)(22,qo,6,2,"div",9),e.k0s()()),2&t){let s,a;e.R7$(2),e.Y8G("ngIf",e.bMT(3,6,i.isTrial$)||e.bMT(4,8,i.isSubscriptionExpired$)),e.R7$(6),e.JRh(null==(s=e.bMT(9,10,i.organization$))?null:s.subscription.type),e.R7$(4),e.JRh(null==(a=e.bMT(13,12,i.organization$))?null:a.name),e.R7$(5),e.Y8G("padded",!1),e.R7$(4),e.Y8G("ngIf",(i.canCloseTeam||i.showLeaveTeam)&&!i.needToLeaveClicked),e.R7$(),e.Y8G("ngIf",i.needToLeaveClicked)}},dependencies:[d.bT,j.Q,be.X,P,d.Jj,d.vh],encapsulation:2,changeDetection:0})}function Ho(n,o){1&n&&(e.j41(0,"div")(1,"div",9),e.EFF(2," Are you sure you want to "),e.j41(3,"em",10),e.EFF(4,"cancel"),e.k0s(),e.EFF(5," your subscription? "),e.k0s(),e.j41(6,"ul",11)(7,"li",12),e.EFF(8," After cancelling your BioDigital Human subscription, your premium benef
1its will continue until the subscription end date. "),e.k0s(),e.j41(9,"li",12),e.EFF(10,"You will not be billed after your subscription end date."),e.k0s()(),e.j41(11,"div",13)(12,"mat-checkbox",14)(13,"span",15),e.EFF(14,"I confirm I want to cancel my subscription."),e.k0s()()()())}function Ko(n,o){1&n&&(e.j41(0,"div",16),e.nrm(1,"app-spinner",17),e.j41(2,"div",18),e.EFF(3,"Cancelling your subscription..."),e.k0s()())}Ye([(0,l.l6)(S.q.isTrial),Qe("design:type",_.c)],ce.prototype,"isTrial$",void 0),Ye([(0,l.l6)(S.q.isSubscriptionExpired),Qe("design:type",_.c)],ce.prototype,"isSubscriptionExpired$",void 0),Ye([(0,l.l6)(S.q.getSubscriptionEndDate),Qe("design:type",_.c)],ce.prototype,"subscriptionEndDate$",void 0),Ye([(0,l.l6)(S.q.getOrganization),Qe("design:type",_.c)],ce.prototype,"organization$",void 0),Ye([(0,l.l6)(g.k.hasActiveDeveloperAccount),Qe("design:type",_.c)],ce.prototype,"hasActiveDeveloperAccount$",void 0);class qe{constructor(o,t,i,s,a){this.store=o,this.actions=t,this.formBuilder=i,this.dialogRef=s,this.snackbar=a,this.ngUnsubscribe=new R.B}ngOnInit(){this.initForm(),this.initListeners()}ngOnDestroy(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()}initForm(){this.form=this.formBuilder.group({confirm:[!1,p.k0.requiredTrue]})}initListeners(){this.actions.pipe((0,l.xi)(je.lG),(0,h.Q)(this.ngUnsubscribe)).subscribe(()=>{this.snackbar.open("Subscription successfully cancelled."),this.store.dispatch(new f.hs(!0)),this.dialogRef.close()}),this.actions.pipe((0,l.xi)(je.GY),(0,h.Q)(this.ngUnsubscribe)).subscribe(o=>{const t=(0,_e.u1)(o.error)||"There was an error cancelling your subscription.";this.snackbar.open(t)})}handleCancelClick(){this.dialogRef.close()}handleCancelSubscriptionClick(){this.store.dispatch(new je.wE)}static#e=this.\u0275fac=function(t){return new(t||qe)(e.rXU(l.il),e.rXU(l.En),e.rXU(p.ze),e.rXU(A.ce),e.rXU(O.UG))};static#t=this.\u0275cmp=e.VBU({type:qe,selectors:[["app-cancel-subscription-dialog"]],decls:15,vars:10,consts:[["app-dialog-title",""],["app-dialog-content",""],[1,"dialog",3,"formGroup"],[1,"text-sm"],[4,"ngIf"],["class","flex flex-col items-center dialog__cancel",4,"ngIf"],["app-dialog-actions",""],["app-button","","buttonType","ghost","buttonTheme","light","buttonSize","md",3,"click"],["app-button","","buttonType","primary","buttonTheme","light","buttonSize","md",3,"click","disabled"],[1,"mb-6"],[1,"font-bold"],[1,"dialog__list"],[1,"my-2"],[1,"mt-4"],["formControlName","confirm"],[2,"white-space","normal"],[1,"flex","flex-col","items-center","dialog__cancel"],["size","lg","color","blue"],[1,"mt-3","text-xs"]],template:function(t,i){1&t&&(e.j41(0,"h1",0),e.EFF(1,"Cancel Subscription"),e.k0s(),e.j41(2,"div",1)(3,"div",2)(4,"div",3),e.DNE(5,Ho,15,0,"div",4),e.nI1(6,"async"),e.DNE(7,Ko,4,0,"div",5),e.nI1(8,"async"),e.k0s()()(),e.j41(9,"div",6)(10,"button",7),e.bIt("click",function(){return i.handleCancelClick()}),e.EFF(11," Cancel "),e.k0s(),e.j41(12,"button",8),e.nI1(13,"async"),e.bIt("click",function(){return i.handleCancelSubscriptionClick()}),e.EFF(14," Yes, Cancel Subscription "),e.k0s()()),2&t&&(e.R7$(3),e.Y8G("formGroup",i.form),e.R7$(2),e.Y8G("ngIf",!e.bMT(6,4,i.cancelling$)),e.R7$(2),e.Y8G("ngIf",e.bMT(8,6,i.cancelling$)),e.R7$(5),e.Y8G("disabled",i.form.invalid||e.bMT(13,8,i.cancelling$)))},dependencies:[d.MD,d.bT,d.Jj,p.X1,p.BC,p.cb,p.j4,p.JD,Y.t,j.Q,ve.So,Z.U,ee.M,te.r,ne.x],styles:[".dialog[_ngcontent-%COMP%]{max-width:520px}.dialog__list[_ngcontent-%COMP%]{list-style-type:disc;margin:0;padding-left:40px}"],changeDetection:0})}!function(n,o,t,i){var r,s=arguments.length,a=s<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,t):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(n,o,t,i);else for(var u=n.length-1;u>=0;u--)(r=n[u])&&(a=(s<3?r(a):s>3?r(o,t,a):r(o,t))||a);s>3&&a&&Object.defineProperty(o,t,a)}([(0,l.l6)(ae.z.getCancelling),function(n,o){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata("design:type",o)}(0,_.c)],qe.prototype,"cancelling$",void 0);var ts=c(66773);function ns(n,o){if(1&n&&(e.j41(0,"span"),e.EFF(1),e.k0s()),2&n){const t=e.XpG();e.R7$(),e.JRh(t.paypalEmail())}}function is(n,o){if(1&n&&(e.j41(0,"span"),e.EFF(1),e.k0s(),e.j41(2,"span",4),e.EFF(3),e.k0s()),2&n){const t=e.XpG();e.R7$(),e.SpI("Ending in ",t.cardInfo().lastFour,""),e.R7$(2),e.JRh(t.cardInfo().cardType)}}let os=(()=>{class n{constructor(t){this.subscriptionService=t,this.paymentType=(0,e.hFB
1)(),this.paypalEmail=(0,e.hFB)(),this.cardInfo=(0,e.hFB)()}getCardImageSrc(t){return this.subscriptionService.getCardImageSrc(t)}static#e=this.\u0275fac=function(i){return new(i||n)(e.rXU(ts.n))};static#t=this.\u0275cmp=e.VBU({type:n,selectors:[["app-account-subscription-payment-method"]],inputs:{paymentType:[1,"paymentType"],paypalEmail:[1,"paypalEmail"],cardInfo:[1,"cardInfo"]},standalone:!1,decls:6,vars:3,consts:[[1,"flex","flex-row","items-center","h-16","gap-3","p-3","mt-3","border-2","border-green-800","border-solid","rounded"],[1,"block","max-w-20","max-h-7",3,"alt","src"],[1,"flex","flex-col","flex-grow","gap-1"],["src","assets/shared/images/circle-check.svg","alt","Circle Check"],[1,"text-gray-600","text-2xs"]],template:function(i,s){1&i&&(e.j41(0,"div",0),e.nrm(1,"img",1),e.j41(2,"div",2),e.DNE(3,ns,2,1,"span")(4,is,4,2),e.k0s(),e.nrm(5,"img",3),e.k0s()),2&i&&(e.R7$(),e.Y8G("alt",s.paypalEmail()?"PayPal":s.cardInfo().cardType)("src",s.getCardImageSrc(s.paymentType()),e.B4B),e.R7$(2),e.vxM(s.paypalEmail()?3:s.cardInfo()?4:-1))},encapsulation:2})}return n})();function ss(n,o){if(1&n){const t=e.RV6();e.j41(0,"button",7),e.bIt("click",function(){e.eBV(t);const s=e.XpG();return e.Njj(s.handleCancelSubscriptionClick())}),e.EFF(1," Cancel "),e.k0s()}}function as(n,o){1&n&&e.nrm(0,"app-spinner",5)}function rs(n,o){if(1&n&&(e.j41(0,"div"),e.EFF(1," You have access to Premium features through a "),e.j41(2,"em",8),e.EFF(3,"free trial"),e.k0s(),e.EFF(4,". "),e.k0s(),e.j41(5,"div"),e.EFF(6),e.nI1(7,"date"),e.k0s()),2&n){let t;const i=e.XpG(2);e.R7$(6),e.SpI(" Your trial ends on ",e.i5U(7,1,null==(t=i.subscription())?null:t.paid_through_date_time,"longDate"),". ")}}function cs(n,o){1&n&&(e.j41(0,"app-message-toggle",9),e.EFF(1," Your subscription renewal failed. "),e.k0s())}function ls(n,o){if(1&n&&(e.j41(0,"app-message-toggle",10),e.EFF(1),e.nI1(2,"date"),e.j41(3,"em",8),e.EFF(4,"Free Personal plan"),e.k0s(),e.EFF(5,". "),e.k0s()),2&n){let t;const i=e.XpG(3);e.R7$(),e.SpI(" Your annual subscription has been canceled. It will remain active until ",e.i5U(2,1,null==(t=i.billingDetails())?null:t.paid_through_date,"longDate"),", after which your account will downgrade to a ")}}function ps(n,o){1&n&&(e.j41(0,"div"),e.EFF(1,"No renewal"),e.k0s())}function us(n,o){1&n&&(e.j41(0,"app-message-toggle",11),e.EFF(1," Please log in through a web browser to "),e.j41(2,"a",13),e.EFF(3,"manage your subscription"),e.k0s(),e.EFF(4,". Our mobile app does not support updates for web-based subscriptions. "),e.k0s())}function ds(n,o){if(1&n&&e.nrm(0,"app-account-subscription-payment-method",12),2&n){const t=e.XpG(4);e.Y8G("paymentType",t.paymentType())("paypalEmail",t.paypalEmail())("cardInfo",t.cardInfo())}}function ms(n,o){if(1&n&&(e.j41(0,"div"),e.EFF(1),e.nI1(2,"date"),e.k0s(),e.j41(3,"div"),e.EFF(4),e.nI1(5,"currency"),e.k0s(),e.DNE(6,us,5,0,"app-message-toggle",11)(7,ds,1,3,"app-account-subscription-payment-method",12)),2&n){let t,i;const s=e.XpG(3);e.R7$(),e.SpI("Ends ",e.i5U(2,3,null==(t=s.billingDetails())?null:t.next_billing_date,"longDate"),""),e.R7$(3),e.SpI(" ",e.ii3(5,6,null==(i=s.billingDetails())?null:i.plan_price,"USD","symbol","1.2-2")," + sales tax (if applicable) "),e.R7$(2),e.vxM(s.native?6:7)}}function hs(n,o){if(1&n&&(e.DNE(0,cs,2,0,"app-message-toggle",9)(1,ls,6,4,"app-message-toggle",10),e.j41(2,"div",8),e.EFF(3),e.k0s(),e.DNE(4,ps,2,0,"div")(5,ms,8,11)),2&n){let t;const i=e.XpG(2);e.vxM(i.failedToRenew()?0:i.isCanceled()?1:-1),e.R7$(3),e.JRh(null==(t=i.subscription())?null:t.subscription_type_display),e.R7$(),e.vxM(i.isCanceled()?4:5)}}function gs(n,o){if(1&n&&(e.j41(0,"div",6),e.DNE(1,rs,8,4)(2,hs,6,3),e.k0s()),2&n){const t=e.XpG();e.R7$(),e.vxM(t.isFreeTrial()?1:t.subscription()&&t.billingDetails()?2:-1)}}const fs={Discover:"discover",Visa:"visa",MasterCard:"master-card","American Express":"american-express"};let _s=(()=>{class n{constructor(t,i,s,a){this.store=t,this.actions=i,this.snackBar=s,this.dialog=a,this.native=W.c.native,this.subscription=(0,$.ot)(this.store.select(ae.z.getSubscription)),this.billingDetails=(0,e.EWP)(()=>{const r=this.subscription();return function es(n){return"braintree"===n.subscription_provider}(r)?r.billing_details:null}),this.failedToRenew=(0,e.EWP)(()=>{const r=this.billingDetails();return r&&r.failure_count>0}),this.paymentType=(0,e.EWP)(()=>{const r=this.billingDetails();return"paypal_account"===r?.payment_type?"paypal":fs[r?.payment_info?.card_type]}),this.paypalEmail=(0,e.EWP)(()=>{const r=this.billingDetails();return"paypal_account"===r?.payment_type?r.payment_info.payer_email:""}),this.cardInfo=(0,e.EWP)(()=>{const r=this.billingDetails();return"credit_card"===r?.payment_type?{lastFour:r.payment_info.last_4,cardType:r.payment_info.card_type}:null}),this.isFreeTrial=(0,$.ot)(this.store.select(ae.z.isFreeTrial)),this.isCanceled=(0,$.ot)(this.store.select(ae.z.isCanceled)),this.loading=(0,$.ot)(this.store.select(g.k.getLoading)),this.updating=(0,$.ot)(this.store.select(ae.z.getUpdating)),this.canManage=(0,e.EWP)(()=>!this.isCanceled()&&!this.native),this.ngUnsubscribe=new R.B}ngOnInit(){this.initSubscriptionListeners()}ngOnDestroy(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()}initSubscriptionListeners(){this.actions.pipe((0,l.xi)(je.Yj),(0,h.Q)(this.ngUnsubscribe)).subscribe(()=>{this.snackBar.open("Your subscription has been successfully updated."),this.store.dispatch(new f.hs(!0)),this.panel.mode="view"})}handleCancelClick(){this.panel.mode="view"}
1handleCancelSubscriptionClick(){this.dialog.openCustom(qe)}static#e=this.\u0275fac=function(i){return new(i||n)(e.rXU(l.il),e.rXU(l.En),e.rXU(O.UG),e.rXU(se.o))};static#t=this.\u0275cmp=e.VBU({type:n,selectors:[["app-account-premium-braintree"]],viewQuery:function(i,s){if(1&i&&e.GBs(P,7),2&i){let a;e.mGM(a=e.lsd())&&(s.panel=a.first)}},standalone:!1,decls:7,vars:2,consts:[["panel",""],["label","Subscription",1,"premium-user-subscription"],["panel-view-actions",""],["type","button","app-button","","buttonType","secondary","buttonTheme","light","buttonSize","md"],["panel-view","",1,"text-sm"],["size","xl","color","blue"],[1,"flex","flex-col","gap-1"],["type","button","app-button","","buttonType","secondary","buttonTheme","light","buttonSize","md",3,"click"],[1,"font-bold"],["type","warning","icon","exclamation-triangle","alignIcon","center",1,"mb-4"],["type","notification","icon","info-circle","alignIcon","center",1,"mb-4"],["type","notification","icon","info-circle","alignIcon","center",1,"mt-2"],[3,"paymentType","paypalEmail","cardInfo"],["href","https://human.biodigital.com/account/profile",1,"underline"]],template:function(i,s){1&i&&(e.j41(0,"app-account-panel",1,0)(2,"span",2),e.DNE(3,ss,2,0,"button",3),e.k0s(),e.j41(4,"div",4),e.DNE(5,as,1,0,"app-spinner",5)(6,gs,3,1,"div",6),e.k0s()()),2&i&&(e.R7$(3),e.vxM(s.canManage()?3:-1),e.R7$(2),e.vxM(s.loading()?5:6))},dependencies:[j.Q,Y.t,be.X,P,os,d.oe,d.vh],styles:[".premium-user-subscription__edit[_ngcontent-%COMP%]{border:1px solid #d4d9e3;border-radius:4px}.premium-user-subscription__edit-head[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;padding:20px;border-bottom:1px solid #d4d9e3}.premium-user-subscription__edit-body[_ngcontent-%COMP%]{padding:40px 20px 20px;border-bottom:1px solid #d4d9e3}"],changeDetection:0})}return n})();var pn=function(n,o,t,i){var r,s=arguments.length,a=s<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,t):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(n,o,t,i);else for(var u=n.length-1;u>=0;u--)(r=n[u])&&(a=(s<3?r(a):s>3?r(o,t,a):r(o,t))||a);return s>3&&a&&Object.defineProperty(o,t,a),a},un=function(n,o){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(n,o)};function bs(n,o){1&n&&e.nrm(0,"app-account-free-user-subscription")}function vs(n,o){1&n&&(e.qex(0),e.nrm(1,"app-account-premium-braintree"),e.bVm())}function Cs(n,o){1&n&&e.nrm(0,"app-account-premium-user-subscription")}function Ts(n,o){if(1&n&&(e.qex(0),e.DNE(1,vs,2,0,"ng-container",3)(2,Cs,1,0,"ng-template",null,0,e.C5r),e.bVm()),2&n){const t=e.sdS(3),i=e.XpG();e.R7$(),e.Y8G("ngIf",i.isBraintreeSubscription)("ngIfElse",t)}}function ys(n,o){1&n&&e.nrm(0,"app-account-premium-team-subscription")}class $e{constructor(o){this.changeDetectorRef=o,this.userType=xt.I,this.isBraintreeSubscription=!1,this.ngUnsubscribe=new R.B}ngOnInit(){this.initProfileCheck()}ngOnDestroy(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()}initProfileCheck(){this.userProfile$.pipe((0,B.p)(o=>!(0,C.isNil)(o)),(0,Ge.F)((o,t)=>(0,C.isEqual)(o,t)),(0,h.Q)(this.ngUnsubscribe)).subscribe(o=>{this.isBraintreeSubscription=o.subscription&&"braintree"===o.subscription.subscription_provider,this.changeDetectorRef.markForCheck()})}static#e=this.\u0275fac=function(t){return new(t||$e)(e.rXU(e.gRc))};static#t=this.\u0275cmp=e.VBU({type:$e,selectors:[["app-account-subscription"]],standalone:!1,decls:5,vars:6,consts:[["manageExternalTmp",""],[3,"ngSwitch"],[4,"ngSwitchCase"],[4,"ngIf","ngIfElse"]],template:function(t,i){1&t&&(e.qex(0,1),e.nI1(1,"async"),e.DNE(2,bs,1,0,"app-account-free-user-subscription",2)(3,Ts,4,2,"ng-container",2)(4,ys,1,0,"app-account-premium-team-subscription",2),e.bVm()),2&t&&(e.Y8G("ngSwitch",e.bMT(1,4,i.userType$)),e.R7$(2),e.Y8G("ngSwitchCase",i.userType.Free),e.R7$(),e.Y8G("ngSwitchCase",i.userType.Premium),e.R7$(),e.Y8G("ngSwitchCase",i.userType.Team))},dependencies:[d.bT,d.ux,d.e1,Le,Ie,ce,_s,d.Jj],encapsulation:2,changeDetection:0})}pn([(0,l.l6)(g.k.getUserProfile),un("design:type",_.c)],$e.prototype,"userProfile$",void 0),pn([(0,l.l6)(g.k.getUserType),un("design:type",_.c)],$e.prototype,"userType$",void 0);var dn=c(46588),mn=c(53299),ks=c(96622),hn=c(37195),le=c(59115),At=c(7104);function Rs(n,o){if(1&n){const t=e.RV6();e.j41(0,"app-badge",7),e.bIt("click",function(s){e.eBV(t);const a=e.XpG();return e.Njj(a.handleAppToggleClick(a.app,s))}),e.k0s()}}let Ss=(()=>{class n{constructor(){this.compact=!1,this.appSelected=new e.bkB,this.appToggleSelected=new e.bkB}ngOnInit(){}
1handleSelectAppClick(t,i){i.stopPropagation(),this.appSelected.emit(t)}handleAppToggleClick(t,i){i.stopPropagation(),this.appToggleSelected.emit(t)}formatPlatforms(t){return t.map(i=>i.display_name).join(", ")}formatPlatformTypes(t){return t.map(i=>i.type===dn.MM.Mobile?"API Bundle IDs":"Domains").join(", ")}formatDomains(t){return t.map(i=>i.value).join(", ")}static#e=this.\u0275fac=function(i){return new(i||n)};static#t=this.\u0275cmp=e.VBU({type:n,selectors:[["app-account-app"]],inputs:{app:"app",selected:"selected",compact:"compact"},outputs:{appSelected:"appSelected",appToggleSelected:"appToggleSelected"},standalone:!1,decls:16,vars:10,consts:[[1,"app",3,"click"],[1,"flex","flex-row","justify-between","app__header"],[1,"text-sm","font-semibold"],["theme","blue","icon","circle-check","label","Default"],[1,"text-xs","text-hint"],[1,"mt-4","text-xs","app__settings"],[1,"font-semibold"],["theme","blue","icon","circle-check","label","Default",3,"click"]],template:function(i,s){1&i&&(e.j41(0,"div",0),e.bIt("click",function(r){return s.handleSelectAppClick(s.app,r)}),e.j41(1,"div",1)(2,"div",2),e.EFF(3),e.k0s(),e.DNE(4,Rs,1,0,"app-badge",3),e.k0s(),e.j41(5,"div",4),e.EFF(6),e.k0s(),e.j41(7,"div",5)(8,"div",6),e.EFF(9,"API Key"),e.k0s(),e.j41(10,"div"),e.EFF(11),e.k0s(),e.j41(12,"div",6),e.EFF(13),e.k0s(),e.j41(14,"div"),e.EFF(15),e.k0s()()()),2&i&&(e.AVh("app--selected",s.selected)("app--compact",s.compact),e.R7$(3),e.SpI(" ",s.app.app_name," "),e.R7$(),e.vxM(s.selected?4:-1),e.R7$(2),e.SpI(" ",s.formatPlatforms(s.app.app_platform)," "),e.R7$(5),e.JRh(s.app.app_apikey),e.R7$(2),e.JRh(s.formatPlatformTypes(s.app.app_platform)),e.R7$(2),e.JRh(s.formatDomains(s.app.app_domains)))},dependencies:[At.n],styles:[".app[_ngcontent-%COMP%]{background-color:#fff;border:1px solid #d4d9e3;border-radius:4px;padding:20px}.app__settings[_ngcontent-%COMP%]{display:grid;grid-template-columns:20% 80%;gap:8px 0px}.app--selected[_ngcontent-%COMP%]{border:2px solid #2472e9}.app--compact[_ngcontent-%COMP%]{padding:12px}.app--compact[_ngcontent-%COMP%]   .app__settings[_ngcontent-%COMP%]{display:flex;flex-direction:column}"],changeDetection:0})}return n})();var Je=function(n,o,t,i){var r,s=arguments.length,a=s<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,t):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(n,o,t,i);else for(var u=n.length-1;u>=0;u--)(r=n[u])&&(a=(s<3?r(a):s>3?r(o,t,a):r(o,t))||a);return s>3&&a&&Object.defineProperty(o,t,a),a},We=function(n,o){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(n,o)};function xs(n,o){if(1&n&&e.nrm(0,"app-badge",11),2&n){const t=e.XpG(2);e.Y8G("label",t.premiumOnlyTag)}}function Fs(n,o){if(1&n&&(e.qex(0,10),e.DNE(1,xs,1,1,"app-badge",11),e.nI1(2,"async"),e.bVm()),2&n){let t;const i=e.XpG();e.R7$(),e.vxM(null!=(t=e.bMT(2,1,i.userProfile$))&&t.developer_account_valid_plan?-1:1)}}function js(n,o){if(1&n){const t=e.RV6();e.j41(0,"button",12),e.bIt("click",function(){e.eBV(t);const s=e.XpG();return e.Njj(s.handleManageAppsClick())}),e.nrm(1,"app-icon",13),e.EFF(2," Manage "),e.k0s()}}function Is(n,o){if(1&n&&(e.j41(0,"button",17)(1,"span",22)(2,"span",23),e.EFF(3,"Sort:"),e.k0s(),e.EFF(4),e.nrm(5,"app-icon",24),e.k0s()()),2&n){e.XpG();const t=e.sdS(9),i=e.XpG(2);e.Y8G("uppercase",!1)("matMenuTriggerFor",t.menu()),e.BMQ("aria-label","Sort Apps: "+i.sort.label+" selected"),e.R7$(4),e.SpI("",i.sort.label," ")}}function Ds(n,o){if(1&n){const t=e.RV6();e.j41(0,"div",25)(1,"app-account-app",26),e.nI1(2,"async"),e.nI1(3,"async"),e.bIt("appSelected",function(s){e.eBV(t);const a=e.XpG(3);return e.Njj(a.handleSelectAppSelected(s,!1))})("appToggleSelected",function(s){e.eBV(t);const a=e.XpG(3);return e.Njj(a.handleSelectAppSelected(s,!0))}),e.k0s()()}if(2&n){let t;const i=o.$implicit,s=e.XpG(3);e.R7$(),e.Y8G("app",i)("compact",e.bMT(2,3,s.horizontalBreakpoint$)<s.breakPoints.Medium)("selected",i.id===(null==(t=e.bMT(3,5,s.selectedUserApp$))?null:t.id))}}function Es(n,o){if(1&n){const t=e.RV6();e.qex(0),e.j41(1,"div",14),e.EFF(2,"Select a default application:"),e.k0s(),e.j41(3,"div",15)(4,"div",16),e.EFF(5),e.k0s(),e.j41(6,"div"),e.DNE(7,Is,6,4,"button",17),e.j41(8,"app-sort",18,2),e.bIt("sortChange",function(s){e.eBV(t);const a=e.XpG(2);return e.Njj(a.handleSort(s))}),e.k0s()()(),e.DNE(10,Ds,4,7,"div",19),e.j41(11,"div",20),e.EFF(12," All models will be published with the developer key associated with your default application. Learn more about how to register an application "),e.j41(13,"a",21),e.EFF(14,"here"),e.k0s(),e.EFF(15,". "),e.k0s(),e.bVm()}if(2&n){const t=e.XpG(2);e.R7$(5),e.Lme(" ",t.userApps.length," ",1===t.userApps.length?"app":"apps"," "),e.R7$(2),e.vxM(t.sort?7:-1),e.R7$(),e.Y8G("sortOptions",t.sortOptions)("currentSort",t.sort),e.R7$(2),e.Y8G("ngForOf",t.userApps)}}function Us(n,o){1&n&&(e.j41(0,"div",27)(1,"div",28),e.EFF(2,"You don't have any apps."),e.k0s(),e.j41(3,"a",29),e.EFF(4,"What's an app?"),e.k0s()())}function Ms(n,o){if(1&n&&(e.j41(0,"div"),e.DNE(1,Es,16,6,"ng-container",9)(2,Us,5,0,"ng-template",null,1,e.C5r),e.k0s()),2&n){const t=e.sdS(3),i=e.XpG();e.R7$(),e.Y8G("ngIf",i.userApps.length>0)("ngIfElse",t)}}function ws(n,o){if(1&n){const t=e.RV6();e.qex(0),e.EFF(1," You must sign in on the developer site to activate access. Click "),e.j41(2,"button",31),e.bIt("click",function(s){e.eBV(t);const a=e.XpG(2);return e.Njj(a.handleDeveloperActivateClick(s))}),e.j41(3,"span",32),e.EFF(4,"here"),e.k0s()(),e.EFF(5," to activate. "),e.bVm()}2&n&&(e.R7$(2),e.Y8G("padded",!1))}function As(n,o){if(1&n){const t=e.RV6();e.EFF(0," Interested in leveraging the BioDigital Human's powerful toolkit to create your own custom applications? Visit our Developer Site to "),e.j41(1,"button",33),e.bIt("click",function(s){e.eBV(t);const a=e.XpG(2);return e.Njj(a.handleDeveloperTrialClick(s))}),e.j41(2,"span",32),e.EFF(3,"learn more."),e.k0s()()}2&n&&(e.R7$(),e.Y8G("padded",!1))}function Gs(n,o){if(1&n&&(e.j41(0,"p",30),e.DNE(1,ws,6,1,"ng-container",9),e.nI1(2,"async"),e.DNE(3,As,4,1,"ng-template",null,3,e.C5r),e.k0s()),2&n){let t;const i=e.sdS(4),s=e.XpG();e.R7$(),e.Y8G("ngIf",null==(t=e.bMT(2,2,s.userProfile$))?null:t.developer_account_val
1id_plan)("ngIfElse",i)}}const gn=[ze.Z.QA,ze.Z.Local].includes(W.c.deploy)?"https://developer-qa.biodigital.com":"https://developer.biodigital.com",fn=[{label:"Last Updated",fields:["timestamp"],ascending:!1},{label:"Name (A-Z)",fields:["app_name"],ascending:!0},{label:"Name (Z-A)",fields:["app_name"],ascending:!1}];class pe{get sort(){return this._sort}set sort(o){this._sort=o,this.userApps=this.sortApps(this.userApps,this.sort),this.changeDetectorRef.markForCheck()}constructor(o,t,i,s){this.store=o,this.snackBar=t,this.router=i,this.changeDetectorRef=s,this.breakPoints=m.m,this.authUserTypes=xt.I,this.premiumOnlyTag=ks.kf,this.ngUnsubscribe=new R.B,this.userApps=[],this.sortOptions=fn,this._sort=fn[0]}ngOnInit(){this.userApps$.pipe((0,h.Q)(this.ngUnsubscribe)).subscribe(o=>{this.userApps=this.sortApps(o,this.sort),this.changeDetectorRef.markForCheck()})}ngOnDestroy(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()}handleSort(o){this.sort=o}handleSelectAppSelected(o,t=!1){if(o.app_platform.some(s=>s.type===dn.MM.Web)){const s=this.store.selectSnapshot(g.k.getSelectedUserApp);s&&s.id===o.id?t&&this.store.dispatch(new f.A$(void 0)):this.store.dispatch(new f.A$(o.id))}else this.snackBar.open("Cannot assign default app. Please select a Web Widget to continue.")}handleManageAppsClick(){this.navigateToDeveloperPortal()}handleDeveloperActivateClick(o){o.preventDefault(),this.navigateToDeveloperPortal()}handleDeveloperTrialClick(o){o.preventDefault(),this.navigateToDeveloperPortal()}sortApps(o,t){const{ascending:i,fields:s}=t;return(0,mn.h5)(o,s,i)}navigateToDeveloperPortal(){const t=this.store.selectSnapshot(g.k.getUserProfile).developer_portal_signin_credentials;window.open(t?`${gn}/account/apps?credentials=${t}`:gn,"_blank")}static#e=this.\u0275fac=function(t){return new(t||pe)(e.rXU(l.il),e.rXU(O.UG),e.rXU(E.Ix),e.rXU(e.gRc))};static#t=this.\u0275cmp=e.VBU({type:pe,selectors:[["app-account-apps"]],standalone:!1,decls:11,vars:10,consts:[["nonDeveloper",""],["noApps",""],["sortMenu",""],["nonValidPlan",""],["label","Developer Apps"],["panel-view-tags","",4,"ngIf"],["panel-view-actions",""],["type","button","app-button","","buttonType","secondary","buttonTheme","light","buttonSize","md",3,"click",4,"ngIf"],["panel-view","",1,"developer"],[4,"ngIf","ngIfElse"],["panel-view-tags",""],["theme","blue","icon","lock",3,"label"],["type","button","app-button","","buttonType","secondary","buttonTheme","light","buttonSize","md",3,"click"],["icon","external-link-alt",1,"mr-2"],[1,"my-5","text-sm"],[1,"flex","flex-row","items-center","justify-between"],[1,"text-xs"],["app-button","","buttonType","ghost","buttonTheme","light","buttonSize","md",3,"uppercase","matMenuTriggerFor"],[3,"sortChange","sortOptions","currentSort"],["class","my-3 developer__app",4,"ngFor","ngForOf"],[1,"my-4","text-xs","developer__notice"],["href","https://devsupport.biodigital.com/hc/en-us/articles/234450188-How-to-register-an-app","target","_blank",1,"text-link"],[1,"whitespace-nowrap"],[1,"mr-1","font-semibold"],["icon","caret-down",1,"ml-1"],[1,"my-3","developer__app"],[3,"appSelected","appToggleSelected","app","compact","selected"],[1,"flex","flex-col","items-center","my-10"],[1,"mb-1","text-sm"],["href","https://devsupport.biodigital.com/hc/en-us/articles/234450188","target","_blank",1,"text-xs","text-gray-400"],[1,"text-sm"],["app-button","","buttonType","ghost","buttonTheme","light","buttonSize","md",1,"underline",3,"click","padded"],[1,"px-1","text-sm"],["appEventFence","","app-button","","buttonType","ghost","buttonTheme","light","buttonSize","md",1,"underline",3,"click","padded"]],template:function(t,i){if(1&t&&(e.j41(0,"app-account-panel",4),e.DNE(1,Fs,3,3,"ng-container",5),e.nI1(2,"async"),e.j41(3,"div",6),e.DNE(4,js,3,0,"button",7),e.nI1(5,"async"),e.k0s(),e.j41(6,"div",8),e.DNE(7,Ms,4,2,"div",9),e.nI1(8,"async"),e.DNE(9,Gs,5,4,"ng-template",null,0,e.C5r),e.k0s()()),2&t){let s,a;const r=e.sdS(10);e.R7$(),e.Y8G("ngIf",e.bMT(2,4,i.userType$)!==i.authUserTypes.Team),e.R7$(3),e.Y8G("ngIf",null==(s=e.bMT(5,6,i.userProfile$))?null:s.developer_account),e.R7$(3),e.Y8G("ngIf",null==(a=e.bMT(8,8,i.userProfile$))?null:a.developer_account)("ngIfElse",r)}},dependencies:[d.Sq,d.bT,j.Q,Ft.L,N.R,hn.K,le.Cp,At.n,P,Ss,d.Jj],styles:[".developer__app[_ngcontent-%COMP%]{cursor:pointer}.developer__notice[_ngcontent-%COMP%]{color:#384c6c}"],changeDetection:0})}function Ns(n,o){1&n&&(e.j41(0,"div",8),e.nrm(1,"app-spinner",9),e.j41(2,"div",10),e.EFF(3,"Deleting your account..."),e.k0s()())}function Os(n,o){if(1&n&&(e.j41(0,"div",20)(1,"app-message-toggle",21)(2,"em",13),e.EFF(3,"Server Error."),e.k0s(),e.EFF(4),e.k0s()()),2&n){const t=e.XpG(2);e.R7$(4),e.SpI(" ",t.error," ")}}function Bs(n,o){if(1&n&&(e.j41(0,"div")(1,"div",11)(2,"div")(3,"div",12),e.
1EFF(4," Are you sure you want to "),e.j41(5,"em",13),e.EFF(6,"permanently delete"),e.k0s(),e.EFF(7," your account? "),e.k0s(),e.j41(8,"ul",14)(9,"li",15),e.EFF(10," Deleting your BioDigital Human account is a permanent action and "),e.j41(11,"em",13),e.EFF(12,"cannot be undone"),e.k0s(),e.EFF(13,". "),e.k0s(),e.j41(14,"li",15),e.EFF(15," After you delete your account, you will not be able to log back in to the app, and any 3D models you created and saved to your Library will be removed from our database permanently and cannot be restored. "),e.k0s()(),e.j41(16,"div",16)(17,"mat-checkbox",17)(18,"span",18),e.EFF(19,"I confirm that I want to permanently delete my account."),e.k0s()()()(),e.DNE(20,Os,5,1,"div",19),e.k0s()()),2&n){const t=e.XpG();e.R7$(20),e.Y8G("ngIf",t.error)}}Je([(0,l.l6)(de.V.getHorizontalBreakpoint),We("design:type",_.c)],pe.prototype,"horizontalBreakpoint$",void 0),Je([(0,l.l6)(g.k.getUserProfile),We("design:type",_.c)],pe.prototype,"userProfile$",void 0),Je([(0,l.l6)(g.k.getUserType),We("design:type",_.c)],pe.prototype,"userType$",void 0),Je([(0,l.l6)(g.k.getUserApps),We("design:type",_.c)],pe.prototype,"userApps$",void 0),Je([(0,l.l6)(g.k.getSelectedUserApp),We("design:type",_.c)],pe.prototype,"selectedUserApp$",void 0);class He{constructor(o,t,i,s,a){this.store=o,this.actions=t,this.formBuilder=i,this.dialogRef=s,this.changeRef=a,this.error="",this.attempts=0,this.ngUnsubscribe=new R.B}ngOnInit(){this.initForm(),this.initListeners()}ngOnDestroy(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete(),this.setDialogTransparent(!1)}initForm(){this.form=this.formBuilder.group({confirm:[!1,p.k0.requiredTrue]})}initListeners(){this.deleting$.pipe((0,h.Q)(this.ngUnsubscribe)).subscribe(o=>{o&&(this.error="",this.attempts++),this.setDialogTransparent(o),this.changeRef.markForCheck()}),this.actions.pipe((0,l.xi)(f.nb),(0,h.Q)(this.ngUnsubscribe)).subscribe(()=>{this.store.dispatch(new f.fQ)}),this.actions.pipe((0,l.xi)(f.cO,f.je),(0,h.Q)(this.ngUnsubscribe)).subscribe(()=>{this.redirectOnLogout(),this.dialogRef.close()}),this.actions.pipe((0,l.xi)(f.cZ),(0,h.Q)(this.ngUnsubscribe)).subscribe(o=>{this.error=(0,_e.u1)(o.error)||"There was an error deleting your account.",this.changeRef.markForCheck()})}handleCancelClick(){this.dialogRef.close()}handleDeleteClick(){this.store.dispatch(new f.sG)}redirectOnLogout(){window.location.href=W.c.native?"/#/login?returnUrl=/explore":"/login"}setDialogTransparent(o){this.dialogRef.removePanelClass("transparent"),o&&this.dialogRef.addPanelClass("transparent")}static#e=this.\u0275fac=function(t){return new(t||He)(e.rXU(l.il),e.rXU(l.En),e.rXU(p.ze),e.rXU(A.ce),e.rXU(e.gRc))};static#t=this.\u0275cmp=e.VBU({type:He,selectors:[["app-delete-account-dialog"]],decls:13,vars:9,consts:[["app-dialog-title",""],["app-dialog-content",""],[1,"dialog",3,"formGroup"],["class","flex flex-col items-center",4,"ngIf"],[4,"ngIf"],["app-dialog-actions",""],["app-button","","buttonType","ghost","buttonTheme","light","buttonSize","md",3,"click"],["app-button","","buttonType","ghost","buttonTheme","light","buttonSize","md",3,"click","disabled"],[1,"flex","flex-col","items-center"],["size","lg","color","blue"],[1,"mt-3","text-xs"],[1,"text-sm","my-4","mb-9"],[1,"mb-6"],[1,"font-bold"],[1,"dialog__list"],[1,"my-2"],[1,"mt-4"],["formControlName","confirm"],[2,"white-space","normal"],["class","mt-1",4,"ngIf"],[1,"mt-1"],["type","error","icon","info"]],template:function(t,i){1&t&&(e.j41(0,"h1",0),e.EFF(1,"Delete Account"),e.k0s(),e.j41(2,"div",1)(3,"div",2),e.DNE(4,Ns,4,0,"div",3),e.nI1(5,"async"),e.DNE(6,Bs,21,1,"div",4),e.nI1(7,"async"),e.k0s()(),e.j41(8,"div",5)(9,"button",6),e.bIt("click",function(){return i.handleCancelClick()}),e.EFF(10," Cancel "),e.k0s(),e.j41(11,"button",7),e.bIt("click",function(){return i.handleDeleteClick()}),e.EFF(12),e.k0s()()),2&t&&(e.R7$(3),e.Y8G("formGroup",i.form),e.R7$(),e.Y8G("ngIf",e.bMT(5,5,i.deleting$)),e.R7$(2),e.Y8G("ngIf",!e.bMT(7,7,i.deleting$)),e.R7$(5),e.Y8G("disabled",i.form.invalid),e.R7$(),e.SpI(" ",i.attempts>0?"Try Again":"Yes, Delete Account"," "))},dependencies:[d.MD,d.bT,d.Jj,Z.U,ee.M,te.r,ne.x,p.X1,p.BC,p.cb,p.j4,p.JD,j.Q,Y.t,be.X,ve.So],styles:[".dialog[_ngcontent-%COMP%]{max-width:520px}.dialog__list[_ngcontent-%COMP%]{list-style-type:disc;margin:0;padding-left:40px}"],changeDetection:0})}!function(n,o,t,i){var r,s=arguments.length,a=s<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,t):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(n,o,t,i);else for(var u=n.length-1;u>=0;u--)(r=n[u])&&(a=(s<3?r(a):s>3?r(o,t,a):r(o,t))||a);s>3&&a&&Object.defineProperty(o,t,a)}([(0,l.l6)(g.k.getProfileDeleting),function(n,o){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata("design:type",o)}(0,_.c)],He.prototype,"deleting$",void 0);const zs=()=>["./"];let Xs=(()=>{class n{constructor(t){this.dialog=t}ngOnInit(){}handleDeleteAccountClick(){this.dialog.openCustom(He)}static#e=this.\u0275fac=function(i){return new(i||n)(e.rXU(se.o))};static#t=this.\u0275cmp=e.VBU({type:n,selectors:[["app-account-delete"]],standalone:!1,decls:10,vars:2,consts:[["label","Delete Account"],[1,"delete-account","text-sm"],[1,"font-bold"],[1,"mt-4"],[1,"text-link","underline",3,"click","routerLink"]],template:function(i,s){1&i&&(e.j41(0,"app-account-panel",0)(1,"div",1)(2,"div"),e.EFF(3," Deleting your BioDigital Human account is a permanent action and "),e.j41(4,"em",2),e.EFF(5,"cannot be undone"),e.k0s(),e.EFF(6,". "),e.k0s(),e.j41(7,"div",3)(8,"a",4),e.bIt("click",function(){return s.handleDeleteAccountClick()}),e.EFF(9," Delete account "),e.k0s()()()()),2&i&&(e.R7$(8),e.Y8G("routerLink",e.lJ4(1,zs)))},dependencies:[E.Wk,P],encapsulation:2,changeDetection:0})}return n})();var _n=function(n,o,t,i){var r,s=arguments.length,a=s<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,t):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(n,o,t,i);else for(var u=n.length-1;u>=0;u--)(r=n[u])&&(a=(s<3?r(a):s>3?r(o,t,a):r(o,t))||a);return s>3&&a&&Object.defineProperty(o,t,a),a},bn=function(n,o){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(n,o)};function Ls(n,o){1&n&&(e.qex(0),e.nrm(1,"mat-divider"),e.j41(2,"div",4),e.nrm(3,"app-account-apps"),e.k0s(),e.bVm())}function Ys(n,o){1&n&&(e.qex(0),e.nrm(1,"mat-divider"),e.j41(2,"div",5),e.nrm(3,"app-account-delete"),e.k0s(),e.bVm())}class Ne{constructor(o,t){this.store=o,this.activatedRoute=t,this.ngUnsubscribe=new R.B,this.userRoleEnum=X.x}ngOnInit(){this.store.dispatch(new f.hs(!0))}ngAfterViewInit(){this.initRoutingListeners()}ngOnDestroy(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()}initRoutingListeners(){(0,G.h)(this.activatedRoute.url,this.activatedRoute.queryParams).pipe((0,w.T)(()=>this.activatedRoute.snapshot.queryParams),(0,h.Q)(this.ngUnsubscribe)).subscribe(o=>{const{section:t}=o;this.scrollToSection(t)})}scrollToSection(o){const i=document.getElementById(`account-${o}`);i&&i.scrollIntoView()}static#e=this.\u0275fac=function(t){return new(t||Ne)(e.rXU(l.il),e.rXU(E.nX))};static#t=this.\u0275cmp=e.VBU({type:Ne,selectors:[["app-profile-page"]],standalone:!1,decls:13,vars:8,consts:[["id","account-profile",1,"mb-10"],["id","account-password",1,"my-10"],["id","account-subscription",1,"my-10"],[4,"ngIf"],["id","account-developer",1,"my-10"],["id","account-delete",1,"my-10"]],template:function(t,i){if(1&t&&(e.j41(0,"div",0),e.nrm(1,"app-account-profile"),e.k0s(),e.nrm(2,"mat-divider"),e.j41(3,"div",1),e.nrm(4,"app-account-password"),e.k0s(),e.nrm(5,"mat-divider"),e.j41(6,"div",2),e.nrm(7,"app-account-subscription"),e.k0s(),e.DNE(8,Ls,4,0,"ng-container",3),e.nI1(9,"async"),e.nI1(10,"async"),e.DNE(11,Ys,4,0,"ng-container",3),e.nI1(12,"async")),2&t){let s;e.R7$(8),e.Y8G("ngIf",(null==(s=e.bMT(9,2,i.userRole$))?null:s.role_name)===i.userRoleEnum.Creator||(null==(s=e.bMT(10,4,i.userRole$))?null:s.role_name)===i.userRoleEnum.Admin),e.R7$(3),e.Y8G("ngIf",!e.bMT(12,6,i.organization$))}},dependencies:[d.bT,q.q,Fe,Xe,$e,pe,Xs,d.Jj],encapsulation:2,changeDetection:0})}_n([(0,l.l6)(g.k.getUserRole),bn("design:type",_.c)],Ne.prototype,"userRole$",void 0),_n([(0,l.l6)(S.q.getOrganization),bn("design:type",_.c)],Ne.prototype,"organization$",void 0);var Gt=c(73540),Pt=c(13610),vn=c(14073),Cn=c(25221),Qs=c(46514),qs=c(30433),Js=c(93165),Ws=c(3),$t=function(n,o,t,i){var r,s=arguments.length,a=s<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,t):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(n,o,t,i);else for(var u=n.length-1;u>=0;u--)(r=n[u])&&(a=(s<3?r(a):s>3?r(o,t,a):r(o,t))||a);return s>3&&a&&Object.defineProperty(o,t,a),a},Nt=function(n,o){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(n,o)};const Hs=(n,o)=>o.value;function Ks(n,o){if(1&n){const t=e.RV6();e.j41(0,"div",12)(1,"app-account-panel",27)(2,"div",4),e.EFF(3,"This will clear your downloaded content from this device."),e.k0s(),e.j41(4,"button",28),e.bIt("click",function(){e.eBV(t);const s=e.XpG();return e.Njj(s.handleDeleteDataClick())}),e.EFF(5," Delete Data "),e.k0s()()()}}function Zs(n,o){if(1&n){const t=e.RV6();e.j41(0,"h3",18),e.EFF(1,"Keyboard Drawing"),e.k0s(),e.j41(2,"div",14)(3,"mat-checkbox",29),e.nI1(4,"async"),e.bIt("ngModelChange",function(s){e.eBV(t);const a=e.XpG();return e.Njj(a.handleTogglePointerLockDraw(s))}),e.k0s(),e.j41(5,"div")(6,"div",16),e.EFF(7,"Enable keyboard drawing controls."),e.k0s(),e.j41(8,"div",10),e.EFF(9," Allows movement of the whiteboard drawing tools via the arrow keys. "),e.k0s()()()}if(2&n){const t=e.XpG();e.R7$(3),e.Y8G("disabled",e.bMT(4,2,t.profileUpdating$))("ngModel",t.pointerLockDraw)}}function ea(n,o){if(1&n&&(e.j41(0,"mat-option",22),e.EFF(1),e.k0s()),2&n){const t=o.$implicit;e.Y8G("value",t.value),e.R7$(),e.JRh(t.label)}}
1class Ue{constructor(o,t,i,s){this.actions=o,this.changeRef=t,this.store=i,this.snackbar=s,this.environment=W.c,this.localeButtonAriaLabel=Cn.Q,this.ngUnsubscribe=new R.B,this.snackbarDurationOptions=vn.U.map(a=>({label:vn.X*a/1e3+" seconds",value:a})),this.snackbarDurationMultiplier=1,this.pointerLockSupported=(0,Qs.$X)()}ngOnInit(){this.initEmailPreferenceObservers(),this.initAccessibilityPreferences()}ngOnDestroy(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()}initEmailPreferenceObservers(){this.userAccountSettings$.pipe((0,w.T)(o=>{const t=(0,Se.j)(o);return(0,C.get)(t,"email_marketing_optin.value")}),(0,B.p)(o=>!(0,C.isNil)(o)),(0,h.Q)(this.ngUnsubscribe)).subscribe(o=>{this.emailPreference=o,this.changeRef.markForCheck()}),this.actions.pipe((0,l.xi)(f.ZD),(0,h.Q)(this.ngUnsubscribe)).subscribe(()=>{this.snackbar.open("You have successfully "+(this.emailPreference?"subscribed":"unsubscribed")),this.store.dispatch(new f.hs)}),this.actions.pipe((0,l.xi)(f._h),(0,h.Q)(this.ngUnsubscribe)).subscribe(()=>{this.snackbar.open("There was a problem updating your email preferences. Please try again later."),this.store.dispatch(new f.hs)})}initAccessibilityPreferences(){this.snackbarDurationMultiplier=this.store.selectSnapshot(Gt.U.getSnackbarDurationMultiplier),this.singlePointerDrag=this.store.selectSnapshot(Gt.U.getSinglePointerDrag),this.pointerLockDraw=this.store.selectSnapshot(Gt.U.getPointerLockDraw)}handleDeleteDataClick(){this.store.dispatch(new f.tM)}handleToggleEmail(o){o!==this.emailPreference&&(this.emailPreference=o,this.store.dispatch(new f.Kg({account_settings:[{email_marketing_optin:{value:o?1:0}}]})))}handleToggleSinglePointerDrag(o){o!==this.singlePointerDrag&&(this.singlePointerDrag=o,this.store.dispatch(new Pt.MW(o)))}handleSnackbarDurationChange(o){this.snackbarDurationMultiplier=o,this.store.dispatch(new Pt.PU(o))}handleTogglePointerLockDraw(o){o!==this.pointerLockDraw&&(this.pointerLockDraw=o,this.store.dispatch(new Pt.vd(o)))}static#e=this.\u0275fac=function(t){return new(t||Ue)(e.rXU(l.En),e.rXU(e.gRc),e.rXU(l.il),e.rXU(O.UG))};static#t=this.\u0275cmp=e.VBU({type:Ue,selectors:[["app-settings-page"]],standalone:!1,decls:55,vars:15,consts:[["localesMenu",""],[1,"flex","flex-col","settings"],[1,"mb-6"],["label","Language"],[1,"mb-5","text-sm"],[1,"flex","flex-row"],["app-button","","buttonType","secondary",3,"matMenuTriggerFor","uppercase"],[1,"flex","items-center","font-semibold"],["localeFormat","full",3,"showFlag"],["icon","caret-down",1,"ml-1"],[1,"my-2","text-xs","settings__notice"],["class","my-6",4,"ngIf"],[1,"my-6"],["label","Email"],[1,"flex"],["aria-label","Email preferences",1,"mr-2",3,"ngModelChange","disabled","ngModel"],[1,"text-sm"],["label","Accessibility"],[1,"mt-5","mb-3","text-sm","font-semibold"],["aria-label","Single Pointer Drag preference",1,"mr-2",3,"ngModelChange","disabled","ngModel"],[1,"flex","flex-row","w-40"],["appInput","","size","lg","aria-label","Notification display duration",3,"ngModelChange","ngModel"],[3,"value"],["label","Legal"],[1,"flex","flex-col","text-sm"],["href","https://www.biodigital.com/terms","target","_blank",1,"underline","text-link"],["href","https://www.biodigital.com/privacy","target","_blank",1,"mt-2","underline","text-link"],["label","Delete Stored Data"],["type","submit","app-button","","buttonType","primary","buttonTheme","light","buttonSize","md",3,"click"],["aria-label","Keyboard Drawing preference",1,"mr-2",3,"ngModelChange","disabled","ngModel"]],template:function(t,i){if(1&t){const s=e.RV6();e.j41(0,"div",1)(1,"div",2)(2,"app-account-panel",3)(3,"div",4),e.EFF(4,"Choose the language for your 3D models."),e.k0s(),e.j41(5,"div",5)(6,"button",6)(7,"div",7),e.nrm(8,"app-locale-display",8)(9,"app-icon",9),e.k0s()(),e.nrm(10,"app-locales-menu",null,0),e.k0s(),e.j41(12,"div",10),e.EFF(13," This setting translates the titles, descriptions, and labels within the 3D models in Explore. The models in your Library are not translated. "),e.k0s()()(),e.DNE(14,Ks,6,0,"div",11),e.j41(15,"div",12)(16,"app-account-panel",13)(17,"div",14)(18,"mat-checkbox",15),e.nI1(19,"async"),e.bIt("ngModelChange",function(r){return e.eBV(s),e.Njj(i.handleToggleEmail(r))}),e.k0s(),e.j41(20,"div")(21,"div",16),e.EFF(22,"Receive product updates, educational resources, and news."),e.k0s(),e.j41(23,"div",10),e.EFF(24," You will c
1ontinue to receive important account, security, and billing emails. "),e.k0s()()()()(),e.j41(25,"div",12)(26,"app-account-panel",17)(27,"div",16),e.EFF(28,"Customize how you view and interact with the BioDigital Human."),e.k0s(),e.j41(29,"h3",18),e.EFF(30,"Directional Controls"),e.k0s(),e.j41(31,"div",14)(32,"mat-checkbox",19),e.nI1(33,"async"),e.bIt("ngModelChange",function(r){return e.eBV(s),e.Njj(i.handleToggleSinglePointerDrag(r))}),e.k0s(),e.j41(34,"div")(35,"div",16),e.EFF(36,"Enable single-pointer alternative for draggable elements."),e.k0s(),e.j41(37,"div",10),e.EFF(38," Adds on-screen arrow controls so you can move 3D labels, pins, and Studio pop-up windows in any direction using single-pointer actions. "),e.k0s()()(),e.DNE(39,Zs,10,4),e.j41(40,"h3",18),e.EFF(41,"Notification Duration"),e.k0s(),e.j41(42,"div",4),e.EFF(43," Choose how long on-screen notifications remain visible before disappearing. "),e.k0s(),e.j41(44,"div",20)(45,"mat-select",21),e.bIt("ngModelChange",function(r){return e.eBV(s),e.Njj(i.handleSnackbarDurationChange(r))}),e.Z7z(46,ea,2,2,"mat-option",22,Hs),e.k0s()()()(),e.j41(48,"div",12)(49,"app-account-panel",23)(50,"div",24)(51,"a",25),e.EFF(52,"Terms of Service"),e.k0s(),e.j41(53,"a",26),e.EFF(54,"Privacy Policy"),e.k0s()()()()()}if(2&t){const s=e.sdS(11);e.R7$(6),e.Y8G("matMenuTriggerFor",s.menu())("uppercase",!0),e.BMQ("aria-label",i.localeButtonAriaLabel),e.R7$(2),e.Y8G("showFlag",!1),e.R7$(6),e.Y8G("ngIf",i.environment.native),e.R7$(4),e.Y8G("disabled",e.bMT(19,11,i.profileUpdating$))("ngModel",i.emailPreference),e.R7$(14),e.Y8G("disabled",e.bMT(33,13,i.profileUpdating$))("ngModel",i.singlePointerDrag),e.R7$(7),e.vxM(i.pointerLockSupported?39:-1),e.R7$(6),e.Y8G("ngModel",i.snackbarDurationMultiplier),e.R7$(),e.Dyx(i.snackbarDurationOptions)}},dependencies:[d.bT,p.BC,p.vS,j.Q,L.k,N.R,qs.O,Cn.x,ve.So,Js.VO,Ws.wT,le.Cp,P,d.Jj],styles:[".settings__select[_ngcontent-%COMP%]{font-size:.875rem;line-height:1.25rem}.settings__notice[_ngcontent-%COMP%]{color:#384c6c}"],changeDetection:0})}$t([(0,l.l6)(g.k.getUserLocale),Nt("design:type",_.c)],Ue.prototype,"userLocale$",void 0),$t([(0,l.l6)(g.k.getUserAccountSettings),Nt("design:type",_.c)],Ue.prototype,"userAccountSettings$",void 0),$t([(0,l.l6)(g.k.getProfileUpdating),Nt("design:type",_.c)],Ue.prototype,"profileUpdating$",void 0);var ta=c(99447),Tn=c(87357),Ot=function(n,o,t,i){var r,s=arguments.length,a=s<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,t):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(n,o,t,i);else for(var u=n.length-1;u>=0;u--)(r=n[u])&&(a=(s<3?r(a):s>3?r(o,t,a):r(o,t))||a);return s>3&&a&&Object.defineProperty(o,t,a),a},Bt=function(n,o){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(n,o)};const na=["error"];function ia(n,o){if(1&n){const t=e.RV6();e.j41(0,"button",8),e.bIt("click",function(){e.eBV(t);const s=e.XpG(2);return e.Njj(s.handleShowFormClick())}),e.j41(1,"div",9),e.EFF(2,"Have a team invite code for a different team?"),e.k0s()()}2&n&&e.Y8G("uppercase",!1)}function oa(n,o){1&n&&(e.j41(0,"div",10),e.nrm(1,"mat-divider"),e.k0s())}function sa(n,o){if(1&n&&(e.qex(0),e.DNE(1,ia,3,1,"button",6),e.nI1(2,"async"),e.DNE(3,oa,2,0,"div",7),e.bVm()),2&n){const t=e.XpG();e.R7$(),e.Y8G("ngIf",!1===e.bMT(2,2,t.requesting$)&&!t.showInviteForm),e.R7$(2),e.Y8G("ngIf",t.showInviteForm)}}function aa(n,o){1&n&&e.nrm(0,"app-spinner",13)}function ra(n,o){if(1&n){const t=e.RV6();e.j41(0,"button",22),e.bIt("click",function(){e.eBV(t);const s=e.XpG(3);return e.Njj(s.handleCancelClick())}),e.EFF(1," Cancel "),e.k0s()}}function ca(n,o){if(1&n){const t=e.RV6();e.qex(0),e.j41(1,"div",14)(2,"app-message-toggle",15,0),e.EFF(4),e.k0s()(),e.j41(5,"div",16)(6,"app-form-field",17),e.nrm(7,"input",18),e.k0s(),e.j41(8,"div",19),e.DNE(9,ra,2,0,"button",20),e.j41(10,"button",21),e.bIt("click",function(){e.eBV(t);const s=e.XpG(2);return e.Njj(s.handleJoinClick())}),e.EFF(11," Join Team "),e.k0s()()(),e.bVm()}if(2&n){const t=e.XpG(2);e.R7$(2),e.Y8G("shown",!1),e.R7$(2),e.SpI(" ",t.errorMessage," "),e.R7$(),e.Y8G("formGroup",t.form),e.R7$(4),e.Y8G("ngIf",t.form.dirty),e.R7$(),e.Y8G("disabled",t.form.invali
1d)}}function la(n,o){if(1&n&&(e.qex(0),e.j41(1,"div",11),e.EFF(2,"Use your team invite code to join an existing team account."),e.k0s(),e.DNE(3,aa,1,0,"app-spinner",12),e.nI1(4,"async"),e.DNE(5,ca,12,5,"ng-container",5),e.bVm()),2&n){const t=e.XpG();e.R7$(3),e.Y8G("ngIf",e.bMT(4,2,t.joining$)||t.joined),e.R7$(2),e.Y8G("ngIf",!t.joined)}}class Me{constructor(o,t,i,s,a,r){this.store=o,this.actions=t,this.formBuilder=i,this.changeDetectorRef=s,this.activatedRoute=a,this.ssoUtilsService=r,this.showInviteForm=!1,this.showFreeTrial=!1,this.joined=!1,this.errorMessage="",this.requestOrganizationsText="The following teams are available for you to join based on your email domain. Submit a request to start collaborating.",this.ngUnsubscribe=new R.B}ngOnInit(){this.initForm(),this.initEventListers(),this.checkForAutoJoinAfterSSO()}ngOnDestroy(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()}initForm(){this.form=this.formBuilder.group({code:["",p.k0.required]})}initEventListers(){this.actions.pipe((0,l.xi)(F.yX),(0,h.Q)(this.ngUnsubscribe)).subscribe(()=>{this.joined=!0,this.errorMessage="",this.store.dispatch(new f.hs),this.changeDetectorRef.markForCheck()}),this.actions.pipe((0,l.xi)(F.zi),(0,h.Q)(this.ngUnsubscribe)).subscribe(o=>{this.ssoUtilsService.handleSSORedirectIfRequired(o.error)||(this.errorMessage=(0,_e.u1)(o.error)||"There was an error joining the group",this.error.shown=!0,this.form.markAsUntouched(),this.changeDetectorRef.markForCheck())})}handleCancelClick(){this.form.reset(),this.errorMessage="",this.error.shown=!1,this.changeDetectorRef.markForCheck()}handleJoinClick(){const{code:o}=this.form.value;this.store.dispatch(new F.Jt(o))}handleShowFormClick(){this.showInviteForm=!0}handlePendingJoinRequest(o){this.showFreeTrial=void 0===o,o&&(this.showInviteForm=!1)}handleRequestOrganizationsSuccess(o){this.showInviteForm=0===o.length}checkForAutoJoinAfterSSO(){const o=this.activatedRoute.snapshot.queryParams,t=o.group_code||o.code;o.account_linked&&t&&(this.showInviteForm=!0,this.form.patchValue({code:t}),setTimeout(()=>{this.handleJoinClick()},500))}static#e=this.\u0275fac=function(t){return new(t||Me)(e.rXU(l.il),e.rXU(l.En),e.rXU(p.ze),e.rXU(e.gRc),e.rXU(E.nX),e.rXU(ta.S))};static#t=this.\u0275cmp=e.VBU({type:Me,selectors:[["app-team-free-user"]],viewQuery:function(t,i){if(1&t&&e.GBs(na,5),2&t){let s;e.mGM(s=e.lsd())&&(i.error=s.first)}},standalone:!1,decls:6,vars:3,consts:[["error",""],[1,"team"],["noticeType","team_account_closed"],["label","Join a Team"],[3,"pendingJoinRequestSuccess","requestOrganizationsSuccess","requestOrganizationsText"],[4,"ngIf"],["class","mt-3","app-button","","buttonType","ghost","buttonTheme","light","buttonSize","xs",3,"uppercase","click",4,"ngIf"],["class","my-8",4,"ngIf"],["app-button","","buttonType","ghost","buttonTheme","light","buttonSize","xs",1,"mt-3",3,"click","uppercase"],[1,"text-sm","underline"],[1,"my-8"],[1,"my-4","text-sm"],["size","xl","color","blue",4,"ngIf"],["size","xl","color","blue"],[1,"my-4"],["type","error","icon","exclamation-circle",3,"shown"],[1,"mt-4",3,"formGroup"],["label","Team Invite Code","theme","light"],["type","text","appInput","","formControlName","code"],[1,"flex","justify-end","mt-1"],["type","reset","app-button","","buttonType","ghost","buttonTheme","light","buttonSize","md","class","mr-4",3,"click",4,"ngIf"],["type","submit","app-button","","buttonType","primary","buttonTheme","light","buttonSize","md",3,"click","disabled"],["type","reset","app-button","","buttonType","ghost","buttonTheme","light","buttonSize","md",1,"mr-4",3,"click"]],template:function(t,i){1&t&&(e.j41(0,"div",1),e.nrm(1,"app-user-notices",2),e.j41(2,"app-account-panel",3)(3,"app-team-join",4),e.bIt("pendingJoinRequestSuccess",function(a){return i.handlePendingJoinRequest(a)})("requestOrganizationsSuccess",function(a){return i.handleRequestOrganizationsSuccess(a)}),e.k0s(),e.DNE(4,sa,4,4,"ng-container",5)(5,la,6,4,"ng-container",5),e.k0s()()),2&t&&(e.R7$(3),e.Y8G("requestOrganizationsText",i.requestOrganizationsText),e.R7$(),e.Y8G("ngIf",i.showFreeTrial),e.R7$(),e.Y8G("ngIf",i.showInviteForm))},dependencies:[d.bT,p.me,p.BC,p.cb,p.j4,p.JD,j.Q,L.k,fe.K,Y.t,be.X,Tn.H,It,q.q,P,d.Jj],encapsulation:2,changeDetection:0})}Ot([(0,l.l6)(re.e.getJoining),Bt("design:type",_.c)],Me.prototype,"joining$",void 0),Ot([(0,l.l6)(re.e.getRequesting),Bt("design:type",_.c)],Me.prototype,"requesting$",void 0),Ot([(0,l.l6)(g.k.canStartFreeTrial),Bt("design:type",_.c)],Me.prototype,"canStartFreeTrial$",void 0);var Vt=c(10467),zt=c(54843),Ce=c(89094),ua=c(44437),da=c(41584),ma=c(99172),ha=c(25558),ga=c(88141),fa=(c(14066),c(70722)),Ke=c(21626);
1const Xt="/ws/organization/sso/settings";let yn=(()=>{class n{constructor(t){this.http=t}getSsoSettings(t){const i=(new Ke.Nl).set("group_id",t.toString()).set("version","1");return this.http.get(Xt,{params:i})}updateSsoConfig(t,i){const s=(new Ke.Nl).set("group_id",t.toString()).set("version","1");return this.http.post(Xt,i,{params:s})}deleteSsoConfig(t,i){const s=(new Ke.Nl).set("group_id",t.toString()).set("auth_method",i).set("version","1");return this.http.delete(Xt,{params:s})}getSsoAccess(t){const i=(new Ke.Nl).set("group_id",t.toString());return this.http.get("/ws/organization/sso/access",{params:i})}static#e=this.\u0275fac=function(i){return new(i||n)(e.KVO(Ke.Qq))};static#t=this.\u0275prov=e.jDH({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function ba(n,o){1&n&&(e.j41(0,"div",11),e.EFF(1,"SSO Provider is required."),e.k0s())}function va(n,o){1&n&&(e.j41(0,"div",11),e.EFF(1,"Configuration name is required."),e.k0s())}function Ca(n,o){1&n&&(e.j41(0,"div",11),e.EFF(1,"Client ID is required."),e.k0s())}function Ta(n,o){1&n&&(e.j41(0,"div",11),e.EFF(1,"Tenant ID is required."),e.k0s())}function ya(n,o){1&n&&(e.j41(0,"div",11),e.EFF(1,"Client Secret is required."),e.k0s())}function ka(n,o){if(1&n){const t=e.RV6();e.j41(0,"div",14)(1,"div",23),e.EFF(2,"Microsoft Entra ID (OIDC) Configuration"),e.k0s(),e.j41(3,"div",24),e.EFF(4," Enter your Azure AD app registration details. You can find these in the Azure portal under your app registration. "),e.k0s(),e.j41(5,"app-form-field",25),e.nrm(6,"input",26),e.DNE(7,Ca,2,0,"div",11),e.k0s(),e.j41(8,"app-form-field",27),e.nrm(9,"input",28),e.DNE(10,Ta,2,0,"div",11),e.k0s(),e.j41(11,"app-form-field",29)(12,"div",30),e.nrm(13,"input",31),e.j41(14,"button",32),e.bIt("click",function(){e.eBV(t);const s=e.XpG();return e.Njj(s.toggleClientSecretVisibility())}),e.nrm(15,"app-icon",33),e.k0s()(),e.DNE(16,ya,2,0,"div",11),e.k0s()()}if(2&n){const t=e.XpG();e.R7$(7),e.vxM(t.clientId.touched&&t.clientId.invalid?7:-1),e.R7$(3),e.vxM(t.tenantId.touched&&t.tenantId.invalid?10:-1),e.R7$(3),e.Y8G("type",t.showClientSecret()?"text":"password"),e.R7$(),e.BMQ("aria-label",t.showClientSecret()?"Hide Client Secret":"Show Client Secret"),e.R7$(),e.Y8G("icon",t.showClientSecret()?"eye-slash":"eye"),e.R7$(),e.vxM(t.clientSecret.touched&&t.clientSecret.invalid?16:-1)}}function Ra(n,o){1&n&&(e.j41(0,"div",11),e.EFF(1,"Metadata URL is required and must be valid."),e.k0s())}function Sa(n,o){if(1&n&&(e.j41(0,"div",14)(1,"div",23),e.EFF(2,"Microsoft Entra ID (SAML) Configuration"),e.k0s(),e.j41(3,"div",24),e.EFF(4," Enter your Microsoft Entra ID SAML metadata URL. You can find this in the Azure portal under your Enterprise Application > Single sign-on > SAML Certificates. "),e.k0s(),e.j41(5,"app-form-field",34),e.nrm(6,"input",35),e.DNE(7,Ra,2,0,"div",11),e.k0s()()),2&n){const t=e.XpG();e.R7$(7),e.vxM(t.metadataUrl.touched&&t.metadataUrl.invalid?7:-1)}}function xa(n,o){1&n&&(e.j41(0,"div",11),e.EFF(1,"Metadata URL is required and must be valid."),e.k0s())}function Fa(n,o){if(1&n&&(e.j41(0,"div",14)(1,"div",23),e.EFF(2,"Okta (SAML) Configuration"),e.k0s(),e.j41(3,"div",24),e.EFF(4,"Enter your Okta SAML metadata URL."),e.k0s(),e.j41(5,"app-form-field",34),e.nrm(6,"input",36),e.DNE(7,xa,2,0,"div",11),e.k0s()()),2&n){const t=e.XpG();e.R7$(7),e.vxM(t.metadataUrl.touched&&t.metadataUrl.invalid?7:-1)}}function ja(n,o){1&n&&(e.j41(0,"div",11),e.EFF(1,"Metadata URL is required and must be valid."),e.k0s())}function Ia(n,o){if(1&n&&(e.j41(0,"div",14)(1,"div",23),e.EFF(2,"Shibboleth (SAML) Configuration"),e.k0s(),e.j41(3,"div",24),e.EFF(4,"Enter your IdP SAML metadata URL."),e.k0s(),e.j41(5,"app-form-field",34),e.nrm(6,"input",37),e.DNE(7,ja,2,0,"div",11),e.k0s()()),2&n){const t=e.XpG();e.R7$(7),e.vxM(t.metadataUrl.touched&&t.metadataUrl.invalid?7:-1)}}function Da(n,o){1&n&&(e.j41(0,"div",39)(1,"mat-error"),e.EFF(2,"Metadata URL is required and must be valid."),e.k0s()())}function Ea(n,o){if(1&n&&(e.j41(0,"div",14)(1,"div",23),e.EFF(2,"OpenAthens (SAML) Configuration"),e.k0s(),e.j41(3,"div",24),e.EFF(4," Enter your OpenAthens SAML metadata URL. You can find this in the OpenAthens admin console under your connection's SAML settings. "),e.k0s(),e.j41(5,"app-form-field",34),e.nrm(6,"input",38),e.DNE(7,Da,3,0,"div",39),e.k0s()()),2&n){const t=e.XpG();
1e.R7$(7),e.vxM(t.metadataUrl.touched&&t.metadataUrl.invalid?7:-1)}}function Ua(n,o){1&n&&e.nrm(0,"app-spinner",22)}let kn=(()=>{class n{constructor(t,i,s,a,r){this.formBuilder=t,this.organizationsSsoService=i,this.snackBar=s,this.dialogRef=a,this.data=r,this.saving=(0,e.vPA)(!1),this.isEditMode=(0,e.vPA)(!1),this.showClientSecret=(0,e.vPA)(!1),this.ngUnsubscribe=new R.B,this.isEditMode.set(!!this.data.existingConfig),this.initForm()}ngOnInit(){this.isEditMode()&&this.populateFormWithExistingData()}ngOnDestroy(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()}initForm(){this.form=this.formBuilder.group({authMethod:["",p.k0.required],authConfigDisplayName:["",p.k0.required],clientId:[""],tenantId:[""],clientSecret:[""],metadataUrl:[""],active:[!0]}),this.form.get("authMethod")?.valueChanges.pipe((0,h.Q)(this.ngUnsubscribe)).subscribe(t=>{const i="entra"===t,v="entra_saml"===t||"okta"===t||"shibboleth"===t||"openathens"===t;this.form.get("clientId")?.setValidators(i?[p.k0.required]:[]),this.form.get("tenantId")?.setValidators(i?[p.k0.required]:[]),this.form.get("clientSecret")?.setValidators(i?[p.k0.required]:[]),this.form.get("metadataUrl")?.setValidators(v?[p.k0.required,p.k0.pattern(/^(https?):\/\//i)]:[]),this.form.get("clientId")?.updateValueAndValidity(),this.form.get("tenantId")?.updateValueAndValidity(),this.form.get("clientSecret")?.updateValueAndValidity(),this.form.get("metadataUrl")?.updateValueAndValidity()})}populateFormWithExistingData(){if(!this.data.existingConfig)return;const t=this.data.existingConfig;let i={};if(t.auth_config_data)try{i="string"==typeof t.auth_config_data?JSON.parse(t.auth_config_data):t.auth_config_data}catch(s){console.warn("Failed to parse auth_config_data:",s),i={}}this.form.patchValue({authMethod:t.auth_method||"",authConfigDisplayName:t.auth_config_display_name||"",clientId:i.client_id||"",tenantId:i.tenant_id||"",clientSecret:i.client_secret||"",metadataUrl:t.auth_config_url||"",active:t.active||!1})}get authMethod(){return this.form.get("authMethod")}get authConfigDisplayName(){return this.form.get("authConfigDisplayName")}get clientId(){return this.form.get("clientId")}get tenantId(){return this.form.get("tenantId")}get clientSecret(){return this.form.get("clientSecret")}get active(){return this.form.get("active")}get metadataUrl(){return this.form.get("metadataUrl")}toggleClientSecretVisibility(){this.showClientSecret.set(!this.showClientSecret())}handleCancelClick(){this.dialogRef.close(!1)}handleSaveClick(){if(this.form.valid){this.saving.set(!0);const t=this.form.value;let i;i="okta"===t.authMethod?{auth_method:"okta",auth_method_name:"Okta (SAML)",auth_config_display_name:t.authConfigDisplayName,auth_config_url:t.metadataUrl,active:t.active}:"entra_saml"===t.authMethod?{auth_method:"entra_saml",auth_method_name:"Microsoft Entra ID (SAML)",auth_config_display_name:t.authConfigDisplayName,auth_config_url:t.metadataUrl,active:t.active}:"shibboleth"===t.authMethod?{auth_method:"shibboleth",auth_method_name:"Shibboleth (SAML)",auth_config_display_name:t.authConfigDisplayName,auth_config_url:t.metadataUrl,active:t.active}:"openathens"===t.authMethod?{auth_method:"openathens",auth_method_name:"OpenAthens (SAML)",auth_config_display_name:t.authConfigDisplayName,auth_config_url:t.metadataUrl,active:t.active}:{auth_method:t.authMethod,auth_method_name:"Microsoft Entra ID (OIDC)",auth_config_display_name:t.authConfigDisplayName,auth_config_data:JSON.stringify({client_id:t.clientId,tenant_id:t.tenantId,client_secret:t.clientSecret}),active:t.active},this.organizationsSsoService.updateSsoConfig(this.data.organizationId,i).pipe((0,h.Q)(this.ngUnsubscribe)).subscribe({next:s=>{if(this.saving.set(!1),"authentication_methods"in s?s.authentication_methods:s.success){const r=this.isEditMode()?"SSO configuration updated successfully":"SSO configuration added successfully";this.snackBar.open(r),this.dialogRef.close(!0)}else{const r=this.isEditMode()?"Failed to update SSO configuration":"Failed to add SSO configuration";this.snackBar.open(r)}},error:s=>{const a=this.isEditMode()?"Failed to update SSO configuration":"Failed to add SSO configuration";console.error(a,s),this.saving.set(!1),this.snackBar.open(a)}})}}static#e=this.\u0275fac=function(i){return new(i||n)(e.rXU(p.ok),e.rXU(yn),e.rXU(O.UG),e.rXU(A.ce),e.rXU(A.Qs))};static#t=this.\u0275cmp=e.VBU({type:n,selectors:[["app-sso-config-dialog"]],decls:38,vars:12,consts:[["app-dialog-title",""],["app-dialog-content",""],[1,"theme-light",3,"formGroup"],["theme","light","label","SSO Provider"],["appInput","","formControlName","authMethod","required",""],["value",""],["value","entra"],["value","entra_saml"],["value","okta"],["value","shibboleth"],["value","o
1penathens"],["form-field-error",""],["theme","light","label","Configuration Name"],["type","text","appInput","","formControlName","authConfigDisplayName","placeholder","e.g. Company SSO","required",""],[1,"space-y-4"],["theme","light"],[1,"flex","flex-row","items-center"],["formControlName","active",1,"mr-2"],[1,"text-sm"],["app-dialog-actions",""],["app-button","","buttonType","ghost","buttonTheme","light","buttonSize","md","type","button",3,"click"],["app-button","","buttonType","primary","buttonTheme","light","buttonSize","md","type","button",3,"click","disabled"],["size","sm","color","white",1,"mr-2"],[1,"text-sm","font-medium","text-gray-700"],[1,"mb-3","text-xs","text-gray-500"],["theme","light","label","Client ID"],["type","text","appInput","","formControlName","clientId","placeholder","e.g. c6d5d40e-207b-4887-a435-dadad5cf00db","required",""],["theme","light","label","Tenant ID"],["type","text","appInput","","formControlName","tenantId","placeholder","e.g. c2f58787-1177-45fa-8e8d-51a98090d95e","required",""],["theme","light","label","Client Secret"],[1,"relative"],["appInput","","formControlName","clientSecret","placeholder","Enter your client secret","required","",3,"type"],["type","button",1,"absolute","text-gray-500","transform","-translate-y-1/2","right-2","top-1/2","hover:text-gray-700",3,"click"],["size","sm",3,"icon"],["theme","light","label","Metadata URL"],["type","url","appInput","","formControlName","metadataUrl","placeholder","https://login.microsoftonline.com/.../federationmetadata/2007-06/federationmetadata.xml","required",""],["type","url","appInput","","formControlName","metadataUrl","placeholder","https://example.okta.com/app/xxxxx/sso/saml/metadata","required",""],["type","url","appInput","","formControlName","metadataUrl","placeholder","https://idp.example.edu/idp/shibboleth","required",""],["type","url","appInput","","formControlName","metadataUrl","placeholder","https://login.openathens.net/saml/2/metadata-idp/...","required",""],[1,"mt-1"]],template:function(i,s){1&i&&(e.j41(0,"h1",0),e.EFF(1),e.k0s(),e.j41(2,"div",1)(3,"form",2)(4,"app-form-field",3)(5,"select",4)(6,"option",5),e.EFF(7,"Select Provider"),e.k0s(),e.j41(8,"option",6),e.EFF(9,"Microsoft Entra ID (OIDC)"),e.k0s(),e.j41(10,"option",7),e.EFF(11,"Microsoft Entra ID (SAML)"),e.k0s(),e.j41(12,"option",8),e.EFF(13,"Okta (SAML)"),e.k0s(),e.j41(14,"option",9),e.EFF(15,"Shibboleth (SAML)"),e.k0s(),e.j41(16,"option",10),e.EFF(17,"OpenAthens (SAML)"),e.k0s()(),e.DNE(18,ba,2,0,"div",11),e.k0s(),e.j41(19,"app-form-field",12),e.nrm(20,"input",13),e.DNE(21,va,2,0,"div",11),e.k0s(),e.DNE(22,ka,17,6,"div",14)(23,Sa,8,1,"div",14)(24,Fa,8,1,"div",14)(25,Ia,8,1,"div",14)(26,Ea,8,1,"div",14),e.j41(27,"app-form-field",15)(28,"div",16)(29,"mat-checkbox",17)(30,"span",18),e.EFF(31,"Enable this SSO configuration"),e.k0s()()()()()(),e.j41(32,"div",19)(33,"button",20),e.bIt("click",function(){return s.handleCancelClick()}),e.EFF(34," Cancel "),e.k0s(),e.j41(35,"button",21),e.bIt("click",function(){return s.handleSaveClick()}),e.DNE(36,Ua,1,0,"app-spinner",22),e.EFF(37),e.k0s()()),2&i&&(e.R7$(),e.JRh(s.isEditMode()?"Edit SSO Configuration":"Add SSO Configuration"),e.R7$(2),e.Y8G("formGroup",s.form),e.R7$(15),e.vxM(s.authMethod.touched&&s.authMethod.invalid?18:-1),e.R7$(3),e.vxM(s.authConfigDisplayName.touched&&s.authConfigDisplayName.invalid?21:-1),e.R7$(),e.vxM("entra"===s.authMethod.value?22:-1),e.R7$(),e.vxM("entra_saml"===s.authMethod.value?23:-1),e.R7$(),e.vxM("okta"===s.authMethod.value?24:-1),e.R7$(),e.vxM("shibboleth"===s.authMethod.value?25:-1),e.R7$(),e.vxM("openathens"===s.authMethod.value?26:-1),e.R7$(9),e.Y8G("disabled",s.form.invalid||s.saving()),e.R7$(),e.vxM(s.saving()?36:-1),e.R7$(),e.SpI(" ",s.isEditMode()?"Update":"Save Configuration"," "))},dependencies:[d.MD,p.X1,p.qT,p.xH,p.y7,p.me,p.wz,p.BC,p.cb,p.YS,p.j4,p.JD,fe.K,ve.So,j.Q,Y.t,N.R,L.k,Z.U,ee.M,te.r,ne.x],encapsulation:2,changeDetection:0})}return n})();var Ma=c(62847),wa=c(29108),Aa=c(48141),Ga=c(72685),Rn=c(5951),Pa=c(21688),$a=c(71902),Na=c(93724),Oa=c(74050),Ba=c(26597),Va=c(29284),we=function(n,o,t,i){var r,s=arguments.length,a=s<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,t):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(n,o,t,i);else for(var u=n.length-1;u>=0;u--)(r=n[u])&&(a=(s<3?r(a):s>3?r(o,t,a):r(o,t))||a);return s>3&&a&&Object.defineProperty(o,t,a),a},Ae=function(n,o){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(n,o)};const za=["upload"],Xa=n=>({"w-1/2":n}),La=()=>[];function Ya(n,o){1&n&&(e.j41(0,"span",29),e.EFF(1,"Recommended size: 238x40"),e.k0s())}function Qa(n,o){if(1&n&&(e.j41(0,"div",30),e.nrm(1,"app-image-view",32),e.k0s()),2&n){const t=e.XpG(3);e.R7$(),e.Y8G("src",null==t.formAccountLogo?null:t.formAccountLogo.small)("fullscreenSrc",null==t.formAccountLogo?null:t.formAccountLogo.default)}}function qa(n,o){if(1&n){const t=e.RV6();e.j41(0,"button",33),e.bIt("click",function(){e.eBV(t);const s=e.XpG(3);return e.Njj(s.handleDeleteLogoClick())}),e.nrm(1,"app-icon",34),e.k0s()}2&n&&e.Y8G("square",!0)}function Ja(n,o){if(1&n&&(e.j41(0,"div",25),e.nI1(1,"async"),e.j41(2,"app-form-field",15)(3,"div",26)(4,"div",27),e.nrm(5,"app-upload",28,4),e.DNE(8,Ya,2,0,"span",29),e.k0s(),e.DNE(9,Qa,2,2,"div",30)(10,qa,2,1,"button",31),e.k0s()()()),2&n){const t=e.sdS(7),i=e.XpG(2);e.Y8G("ngClass",e.eq3(7,Xa,e.bMT(1,5,i.horizontalBreakpoint$)>i.horizontalBreakpoint.Small)),e.R7$(2),e.Y8G("label",i.teamLogoLabel),e.R7$(6),e.vxM("done"!==t.status()?8:-1),e.R7$(),e.vxM("done"===t.status()&&t.value()?9:-1),e.R7$(),e.vxM(i.formAccountLogoURL?10:-1)}}function Wa(n,o){if(1&n&&(e.j41(0,"div",35),e.EFF(1),e.k0s()),2&n){const t=e.XpG(2);e.R7$(),e.SpI(" ",t.teamNamePlaceholder," ")}}function Ha(n,o){if(1&n&&(e.j41(0,"option",36),e.EFF(1),e.k0s()),2&n){const t=o.$implicit;e.Y8G("value",t),e.R7$(),e.SpI(" ",t," ")}}function Ka(n,o){1&n&&(e.j41(0,"div",35),e.EFF(1," Please enter a valid website (e.g. www.example.com or example.com). "),e.k0s())}function Za(n,o){if(1&n&&(e.j41(0,"option",36),e.EFF(1),e.k0s()),2&n){const t=o.$implicit;e.Y8G("value",t),e.R7$(),e.SpI(" ",t," ")}}function er(n,o){1&n&&(e.j41(0,"div",37),e.nrm(1,"input",38),e.k0s())}function tr(n,o){if(1&n&&(e.j41(0,"div",13),e.DNE(1,Ja,11,9,"div",14),e.j41(2,"app-form-field",15),e.nrm(3,"input",16),e.DNE(4,Wa,2,1,"div",17),e.k0s(),e.j41(5,"app-form-field",15)(6,"select",18),e.nrm(7,"option",19),e.DNE(8,Ha,2,2,"option",20),e.k0s()(),e.j41(9,"app-form-field",15),e.nrm(10,"input",21),e.DNE(11,Ka,2,0,"div",17),e.k0s(),e.j41(12,"app-form-field",15)(13,"select",22),e.nrm(14,"option",19),e.DNE(15,Za,2,2,"option",20),e.nrm(16,"option",23),e.k0s(),e.DNE(17,er,2,0,"div",24),e.k0s()()),2&n){const t=e.XpG();e.R7$(),e.Y8G("ngIf",!t.environment.native),e.R7$(),e.Y8G("label",t.teamNameLabel),e.R7$(),e.Y8G("minlength",t.minNameLength)("maxlength",t.maxNameLength),e.R7$(),e.Y8G("ngIf",t.nameField.touched&&t.nameField.invalid),e.R7$(),e.Y8G("label",t.teamSizeLabel),e.R7$(3),e.Y8G("ngForOf",t.teamSizes),e.R7$(),e.Y8G("label",t.teamWebsiteLabel),e.R7$(2),e.Y8G("ngIf",t.websiteField.touched&&t.websiteField.invalid),e.R7$(),e.Y8G("label",t.teamIndustryLabel),e.R7$(3),e.Y8G("ngForOf",t.teamIndustries),e.R7$(),e.Y8G("label","Other")("value","Other"),e.R7$(),e.Y8G("ngIf","Other"===t.form.get("industry").value)}}function nr(n,o){1&n&&e.eu8(0)}function ir(n,o){if(1&n&&(e.j41(0,"option",36),e.EFF(1),e.k0s()),2&n){const t=o.$implicit;e.Y8G("value",t.role_id),e.R7$(),e.SpI(" ",t.role_display_name," ")}}function or(n,o){if(1&n){const t=e.RV6();e.qex(0),e.j41(1,"div",41),e.EFF(2," You can generate a new team invite code and link if you no longer wish to use the old one. "),e.k0s(),e.j41(3,"button",50),e.bIt("click",function(){e.eBV(t);const s=e.XpG(2);return e.Njj(s.setShowGenerateCode(!0))}),e.EFF(4," Generate New Team Code and Link "),e.k0s(),e.bVm()}}function sr(n,o){1&n&&e.nrm(0,"app-spinner",62)}function ar(n,o){if(1&n){const t=e.RV6();e.j41(0,"div",51),e.EFF(1,"Are you sure you want to generate a new team invite code?"),e.k0s(),e.j41(2,"ul",52)(3,"li",53),e.EFF(4,"This action "),e.j41(5,"span",54),e.
1EFF(6,"cannot be undone."),e.k0s()(),e.j41(7,"li",53),e.EFF(8,"Previously shared team invite codes and links will be invalid."),e.k0s()(),e.j41(9,"div",55)(10,"mat-checkbox",56)(11,"span",57),e.EFF(12,"I confirm that I want to generate a new team invite code and link."),e.k0s()()(),e.j41(13,"div",58)(14,"button",59),e.bIt("click",function(){e.eBV(t);const s=e.XpG(2);return e.Njj(s.setShowGenerateCode(!1))}),e.EFF(15," Cancel "),e.k0s(),e.j41(16,"button",60),e.nI1(17,"async"),e.bIt("click",function(s){e.eBV(t);const a=e.XpG(2);return e.Njj(a.handleGenerateCodeClick(s))}),e.EFF(18," Yes, Generate "),e.DNE(19,sr,1,0,"app-spinner",61),e.nI1(20,"async"),e.k0s()()}if(2&n){const t=e.XpG(2);e.R7$(14),e.Y8G("uppercase",!0),e.R7$(2),e.Y8G("disabled",!t.confirmGenerateCode.value||e.bMT(17,4,t.generatingGroupCode$))("uppercase",!0),e.R7$(3),e.Y8G("ngIf",e.bMT(20,6,t.generatingGroupCode$))}}function rr(n,o){1&n&&e.nrm(0,"app-spinner",69)}function cr(n,o){1&n&&(e.j41(0,"div",35),e.EFF(1," Please enter a valid domain format. "),e.k0s())}function lr(n,o){1&n&&(e.j41(0,"div",35),e.EFF(1," You've already added this domain. "),e.k0s())}function pr(n,o){1&n&&(e.j41(0,"div",35),e.EFF(1," You cannot use this domain. "),e.k0s())}function ur(n,o){1&n&&e.nrm(0,"app-spinner",74)}function dr(n,o){1&n&&e.nrm(0,"app-icon",75)}function mr(n,o){if(1&n){const t=e.RV6();e.j41(0,"li",70)(1,"div",71),e.EFF(2),e.k0s(),e.j41(3,"button",72),e.nI1(4,"async"),e.bIt("click",function(s){const a=e.eBV(t).$implicit,r=e.XpG(3);return e.Njj(r.handleRemoveDomainClick(s,a))}),e.DNE(5,ur,1,0,"app-spinner",73)(6,dr,1,0,"ng-template",null,6,e.C5r),e.k0s()()}if(2&n){const t=o.$implicit,i=e.sdS(7),s=e.XpG(3);e.R7$(2),e.JRh(t.email_domain),e.R7$(),e.Y8G("disabled",e.bMT(4,4,s.removingJoinDomains$)),e.R7$(2),e.Y8G("ngIf",t.join_domain_id===s.domainIdToRemove)("ngIfElse",i)}}function hr(n,o){if(1&n){const t=e.RV6();e.j41(0,"div")(1,"div",44),e.EFF(2,"Enable join requests"),e.k0s(),e.j41(3,"div",41),e.EFF(4," Allow users with specific email domains to request to join your team. Administrators will be prompted via email to approve or deny each request. "),e.k0s(),e.j41(5,"app-form-field",42)(6,"div",63),e.nrm(7,"input",64),e.j41(8,"button",65),e.nI1(9,"async"),e.nI1(10,"async"),e.bIt("click",function(s){e.eBV(t);const a=e.XpG(2);return e.Njj(a.handleAddDomainClick(s))}),e.EFF(11," Add Domain "),e.DNE(12,rr,1,0,"app-spinner",66),e.nI1(13,"async"),e.k0s()(),e.DNE(14,cr,2,0,"div",17)(15,lr,2,0,"div",17)(16,pr,2,0,"div",17),e.k0s(),e.j41(17,"ul",67),e.DNE(18,mr,8,6,"li",68),e.k0s()()}if(2&n){const t=e.XpG(2);e.R7$(8),e.Y8G("disabled",t.domainToAddEmpty||t.domainToAdd.invalid||t.domainToAdd.pending||e.bMT(9,6,t.loadingJoinDomains$)||e.bMT(10,8,t.addingJoinDomains$)),e.R7$(4),e.Y8G("ngIf",t.domainToAdd.pending||e.bMT(13,10,t.addingJoinDomains$)),e.R7$(2),e.Y8G("ngIf",null==t.domainToAdd.errors?null:t.domainToAdd.errors.invalidDomainPattern),e.R7$(),e.Y8G("ngIf",null==t.domainToAdd.errors?null:t.domainToAdd.errors.duplicateDomain),e.R7$(),e.Y8G("ngIf",null==t.domainToAdd.errors?null:t.domainToAdd.errors.forbiddenDomain),e.R7$(2),e.Y8G("ngForOf",t.joinDomains)}}function gr(n,o){1&n&&(e.j41(0,"span",91),e.EFF(1,"Active"),e.k0s())}function fr(n,o){1&n&&(e.j41(0,"span",92),e.EFF(1,"Inactive"),e.k0s())}function _r(n,o){if(1&n){const t=e.RV6();e.j41(0,"div",80)(1,"div",81)(2,"div",82)(3,"span",83),e.EFF(4),e.k0s(),e.j41(5,"span",84),e.EFF(6),e.k0s(),e.DNE(7,gr,2,0,"span",85)(8,fr,2,0,"span",86),e.k0s(),e.j41(9,"div",87)(10,"button",88),e.bIt("click",function(){const s=e.eBV(t).$implicit,a=e.XpG(3);return e.Njj(a.toggleSsoConfig(s))}),e.EFF(11),e.k0s(),e.j41(12,"button",89),e.bIt("click",function(){const s=e.eBV(t).$implicit,a=e.XpG(3);return e.Njj(a.editSsoConfig(s))}),e.EFF(13," Edit "),e.k0s()()(),e.j41(14,"div",90)(15,"div"),e.EFF(16),e.k0s(),e.j41(17,"div"),e.EFF(18),e.nI1(19,"date"),e.k0s()()()}if(2&n){const t=o.$implicit,i=e.XpG(3);e.R7$(4),e.JRh(t.auth_config_display_name),e.R7$(2),e.JRh(t.auth_method_name),e.R7$(),e.Y8G("ngIf",t.active),e.R7$(),e.Y8G("ngIf",!t.active),e.R7$(2),e.Y8G("disabled",i.ssoLoading),e.R7$(),e.SpI(" ",t.active?"Disable":"Enable"," "),e.R7$(5),e.SpI("URL: ",t.auth_config_url,""),e.R7$(2),e.SpI("Created: ",e.i5U(19,8,t.create_datetime,"short"),"")}}function br(n,o){1&n&&(e.j41(0,"div",93)(1,"div",94),e.nrm(2,"app-icon",95),e.k0s(),e.j41(3,"div",96),e.EFF(4,"No SSO configuration found"),e.k0s(),e.j41(5,"div",97),e.EFF(6," Add an SSO configuration to enable single sign-on for your team "),e.k0s()())}function vr(n,o){if(1&n){const t=e.RV6();e.j41(0,"div",98)(1,"button",99),e.bIt("click",function(){e.eBV(t);const s=e.XpG(3);return e.Njj(s.addSsoConfig())}),e.nrm(2,"app-icon",100),e.EFF(3," Add SSO Configuration "),e.k0s()()}}function Cr(n,o){if(1&n&&(e.j41(0,"div")(1,"div",44),e.EFF(2,"Single Sign-On (SSO) Configuration"),e.k0s(),e.j41(3,"div",41),e.EFF(4," Configure Single Sign-On authentication for your team. This allows team members to 
1sign in using your organization's identity provider. "),e.k0s(),e.j41(5,"div",76),e.DNE(6,_r,20,11,"div",77)(7,br,7,0,"div",78),e.k0s(),e.DNE(8,vr,4,0,"div",79),e.k0s()),2&n){const t=e.XpG(2);e.R7$(6),e.Y8G("ngForOf",t.ssoConfigs||e.lJ4(3,La)),e.R7$(),e.Y8G("ngIf",0===(null==t.ssoConfigs?null:t.ssoConfigs.length)),e.R7$(),e.Y8G("ngIf",!t.hasSsoConfig)}}function Tr(n,o){1&n&&(e.j41(0,"div",101),e.EFF(1," Single Sign-On (SSO) Configuration "),e.k0s())}function yr(n,o){1&n&&(e.j41(0,"div",102),e.EFF(1," SSO configuration is not available for this organization. Contact your administrator for more information. "),e.k0s())}function kr(n,o){if(1&n&&(e.j41(0,"div",13),e.DNE(1,nr,1,0,"ng-container",39),e.j41(2,"div",40),e.EFF(3,"Default Member Role"),e.k0s(),e.j41(4,"div",41),e.EFF(5," New members are automatically assigned this role unless specified otherwise in the email invitation. Roles can also be managed on the Team page. "),e.k0s(),e.j41(6,"app-form-field",42)(7,"select",43),e.DNE(8,ir,2,2,"option",20),e.nI1(9,"async"),e.k0s()(),e.j41(10,"div",44),e.EFF(11,"Team Invite Code and Link"),e.k0s(),e.nrm(12,"app-team-group-code")(13,"mat-divider",45),e.DNE(14,or,5,0,"ng-container",46)(15,ar,21,8,"ng-template",null,5,e.C5r)(17,hr,19,12,"div",47),e.nrm(18,"mat-divider",45),e.DNE(19,Cr,9,4,"div",47)(20,Tr,2,0,"div",48)(21,yr,2,0,"div",49),e.k0s()),2&n){const t=e.sdS(16),i=e.XpG(),s=e.sdS(14);e.R7$(),e.Y8G("ngTemplateOutlet",s),e.R7$(7),e.Y8G("ngForOf",e.bMT(9,8,i.defaultRoleOptions$)),e.R7$(6),e.Y8G("ngIf",!i.showGenerateGroupCode)("ngIfElse",t),e.R7$(3),e.Y8G("ngIf",i.isValidPaidSubscription),e.R7$(2),e.Y8G("ngIf",i.ssoAccess),e.R7$(),e.Y8G("ngIf",!i.ssoAccess&&!i.ssoAccessLoading),e.R7$(),e.Y8G("ngIf",!i.ssoAccess&&!i.ssoAccessLoading)}}function Rr(n,o){1&n&&e.eu8(0)}function Sr(n,o){if(1&n&&(e.j41(0,"div",13),e.DNE(1,Rr,1,0,"ng-container",39),e.j41(2,"p",103),e.EFF(3," Set the fallback source to use when no official BioDigital anatomy description is available. "),e.k0s(),e.j41(4,"app-form-field",42)(5,"mat-radio-group",104)(6,"app-list",105)(7,"app-list-item")(8,"mat-radio-button",106),e.EFF(9,"Wikipedia"),e.k0s()(),e.j41(10,"app-list-item")(11,"mat-radio-button",107),e.EFF(12,"NCIT"),e.k0s()()()()()()),2&n){e.XpG();const t=e.sdS(14);e.R7$(),e.Y8G("ngTemplateOutlet",t)}}function xr(n,o){1&n&&e.eu8(0)}function Fr(n,o){if(1&n&&(e.qex(0),e.j41(1,"legend",108),e.EFF(2,"Create your team"),e.k0s(),e.j41(3,"p",109),e.EFF(4,"Tell us about your team to set up your account."),e.k0s(),e.j41(5,"div",110),e.DNE(6,xr,1,0,"ng-container",39),e.k0s(),e.bVm()),2&n){e.XpG();const t=e.sdS(3);e.R7$(6),e.Y8G("ngTemplateOutlet",t)}}function jr(n,o){1&n&&e.eu8(0)}function Ir(n,o){1&n&&e.eu8(0)}function Dr(n,o){1&n&&e.eu8(0)}function Er(n,o){if(1&n){const t=e.RV6();e.qex(0),e.j41(1,"legend",111),e.EFF(2,"Manage Team"),e.k0s(),e.j41(3,"app-tabs",112),e.bIt("activeTabChange",function(s){e.eBV(t);const a=e.XpG();return e.Njj(a.handleActiveTabChange(s))}),e.j41(4,"app-tab",113),e.DNE(5,jr,1,0,"ng-container",39),e.k0s(),e.j41(6,"app-tab",114),e.DNE(7,Ir,1,0,"ng-container",39),e.k0s(),e.j41(8,"app-tab",115),e.DNE(9,Dr,1,0,"ng-container",39),e.k0s()(),e.bVm()}if(2&n){const t=e.XpG(),i=e.sdS(3),s=e.sdS(5),a=e.sdS(7);e.R7$(3),e.Y8G("activeTab",t.sections.Profile),e.R7$(2),e.Y8G("ngTemplateOutlet",i),e.R7$(2),e.Y8G("ngTemplateOutlet",s),e.R7$(2),e.Y8G("ngTemplateOutlet",a)}}function Ur(n,o){1&n&&e.nrm(0,"app-spinner",62)}function Mr(n,o){if(1&n&&(e.j41(0,"button",116),e.EFF(1),e.DNE(2,Ur,1,0,"app-spinner",61),e.k0s()),2&n){const t=e.XpG();e.AVh("w-full","create"===t.mode),e.Y8G("disabled",t.form.invalid||t.actionState),e.R7$(),e.SpI(" ",t.actionLabel," "),e.R7$(),e.Y8G("ngIf",t.actionState)}}function wr(n,o){1&n&&(e.j41(0,"div",118),e.EFF(1," Please fill out the required fields in the "),e.j41(2,"span",54),e.EFF(3,"Profile"),e.k0s(),e.EFF(4," tab. "),e.k0s())}function Ar(n,o){if(1&n&&e.DNE(0,wr,5,0,"div",117),2&n){const t=e.XpG();e.Y8G("ngIf",t.profileFieldInvalid)}}const Gr=new RegExp("(https?://)?([\\da-z.-]+)\\.([a-z.]{2,6})[/\\w .-]*/?","i"),Pr=new RegExp(/^(?!-)[A-Za-z0-9-]+([\\-\\.]{1}[a-z0-9]+)*\.[A-Za-z]{2,6}$/,"i");var Lt=function(n){return n[n.Profile=0]="Profile",n[n.TeamAccess=1]="TeamAccess",n[n.AppSettings=2]="AppSettings",n}(Lt||{});class Q{get formAccountLogo(){return(0,C.get)(this.form,"value.account_logo_url",{})}get formAccountLogoURL(){return(0,C.get)(this.form,"value.account_logo_url.default","")}get mode(){return(0,C.isNil)(this.organization)?"create":"manage"}get nameField(){return this.form.get("account_name")}get websiteField(){return this.form.get("website")}get sizeField(){return this.form.get("size")}get industry(){return this.form.get("industry")}get defaultRoleId(){return this.form.get("defaultRoleId")}get domainToAdd(){return this.form.get("domainToAdd")}get confirmGenerateCode(){return this.form.get("confirmGenerateCode")}get domainToAddEmpty(){const o=this.domainToAdd.value;return!o||0===o.length}get hasSsoConfig(){return this.ssoConfigs&&this.ssoConfigs.length>0}get profileFieldInvalid(){return this.nameField.invalid||this.sizeField.invalid||this.websiteField.invalid||this.industry.invalid}constructor(o,t,i,s,a,r,u,v){this.organizationsService=o,this.organizationsSsoService=t,this.dialogService=i,this.formBuilder=s,this.store=a,this.actions=r,this.snackBar=u,this.changeRef=v,this.environment=W.c,this.accountPurposeEnum=b.j,this.horizontalBreakpoint=m.m,this.minNameLength=3,this.maxNameLength=45,this.isValidPaidSub
1scription=!1,this.joinDomains=[],this.organizationCreated=new e.bkB,this.organizationUpdated=new e.bkB,this.teamIndustries=[],this.showGenerateGroupCode=!1,this.ngUnsubscribe=new R.B,this.sections=Lt,this.showSubmitButton=!0,this.ssoConfigs=[],this.ssoLoading=!1,this.ssoAccess=!1,this.ssoAccessLoading=!1;const T=this.store.selectSnapshot(g.k.isDeveloperReferral)?"developer":"";this.form=this.formBuilder.group({account_logo_url:[this.createImageURLs()],account_logo:[this.createAccountLogo()],account_name:["",[p.k0.required,p.k0.minLength(this.minNameLength),p.k0.maxLength(this.maxNameLength)]],size:["",[p.k0.required]],website:["",[p.k0.required,p.k0.pattern(Gr)]],industry:["",p.k0.required],industryDescription:[""],purposeDescription:[T],defaultRoleId:[null],confirmGenerateCode:[!1],domainToAdd:[null,{validators:this.getDomainToAddValidator(),asyncValidators:this.getDomainToAddAsyncValidator()}],anatomyDescriptionFallback:[null]},{validators:this.getFormValidator()}),this.defaultRoleOptions$=this.userRoles$.pipe((0,w.T)(M=>M.filter(({role_name:y})=>y!==X.x.Admin)),(0,Ge.F)(C.isEqual),(0,h.Q)(this.ngUnsubscribe))}ngOnInit(){if(this.setTeamFields(this.purpose),this.initLoadingState(),this.initFormListeners(),this.initCreateActionListeners(),this.initGroupCodeListeners(),this.checkSsoAccess(),this.store.dispatch(new f.hs),this.isValidPaidSubscription=this.store.selectSnapshot(S.q.isValidPaidSubscription),this.isValidPaidSubscription&&(this.store.dispatch(new U.O4),this.initJoinDomainListeners()),this.organization)this.setExistingOrganizationFormValues(this.organization);else{const o=this.store.selectSnapshot(g.k.isDeveloperReferral);this.setNewOrganizationFormValues(o)}}ngOnDestroy(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()}initLoadingState(){(0,me.z)([this.store.select(g.k.getLoading),this.store.select(S.q.getCreating),this.store.select(S.q.getUpdating)]).pipe((0,h.Q)(this.ngUnsubscribe)).subscribe(([o,t,i])=>{this.actionState=o||t||i,"create"===this.mode?this.actionLabel=(t?"Creating":"Create")+" Team":"manage"===this.mode&&(this.actionLabel=(i?"Saving":"Save")+" Changes"),this.changeRef.markForCheck()})}setTeamFields(o){this.purpose=o===b.j.Education?b.j.Education:b.j.Business,this.teamIndustries=Jn[this.purpose]||[],this.teamSizes=Hn[this.purpose]||[],this.teamLogoLabel=this.purpose===b.j.Education?"School Logo":"Company Logo",this.teamNameLabel=this.purpose===b.j.Education?"School Name":"Company Name",this.teamNamePlaceholder=`Your ${this.teamNameLabel.toLowerCase()} must be ${this.minNameLength} or more characters.`,this.teamWebsiteLabel=this.purpose===b.j.Education?"School Website":"Company Website",this.teamSizeLabel=this.purpose===b.j.Education?"# of Students":"Company Size",this.teamIndustryLabel=this.purpose===b.j.Education?"Education Level":"Company Industry"}initFormListeners(){this.form.valueChanges.pipe((0,ma.Z)(this.formAccountLogoURL),(0,w.T)(()=>!!this.formAccountLogoURL),(0,Ge.F)(),(0,J.Z)(()=>this.getOrganizationLogoModel()),(0,h.Q)(this.ngUnsubscribe)).subscribe(o=>{this.form.patchValue({account_logo:o}),this.changeRef.markForCheck()}),this.defaultRoleId.valueChanges.pipe((0,h.Q)(this.ngUnsubscribe)).subscribe(o=>this.updateDefaultRoleId(o))}initCreateActionListeners(){(0,ua.y)(this.actions.pipe((0,l.xi)(f.Kg)),this.actions.pipe((0,l.xi)(U.nB))).pipe((0,h.Q)(this.ngUnsubscribe)).subscribe(()=>{this.store.dispatch(new f.hs),this.store.dispatch(new F.jV),this.organizationCreated.next(),this.snackBar.open("Your team has been successfully created.")}),this.actions.pipe((0,l.xi)(U.cw),(0,h.Q)(this.ngUnsubscribe)).subscribe(o=>{const t=(0,C.get)(o.error,"status",400),i=(0,_e.u1)(o.error);let s="There was an error creating your team.";i?s=i:413===t&&(s="The file size of your logo is too large. Please upload a new logo and try again."),this.snackBar.open(s)})}initUpdateActionListeners(o=!0){this.actions.pipe((0,l.xi)(U.m1),(0,ue.s)(1),(0,h.Q)(this.ngUnsubscribe)).subscribe(()=>{this.store.dispatch(new f.hs),o&&this.organizationUpdated.next(),this.snackBar.open("Your team has been successfully updated.")}),this.actions.pipe((0,l.xi)(U.xX),(0,ue.s)(1),(0,h.Q)(this.ngUnsubscribe)).subscribe(t=>{const i=(0,_e.u1)(t.error);this.snackBar.open(i||"There was an error updating your team.")})}initGroupCodeListeners(){this.actions.pipe((0,l.xi)(U.pv),(0,h.Q)(this.ngUnsubscribe)).subscribe(()=>{this.snackBar.open("New team invite code and link generated."),this.setShowGenerateCode(!1),this.changeRef.markForCheck()}),this.actions.pipe((0,l.xi)(U.cz),(0,h.Q)(this.ngUnsubscribe)).subscribe(()=>{this.snackBar.open("There was an error generating the new team invite code and link.")})}initJoinDomainListeners(){this.joinDomains$.pipe((0,h.Q)(this.ngUnsubscribe)).subscribe(o=>{this.joinDomains=o,this.changeRef.markForCheck()}),this.actions.pipe((0,l.xi)(U.Hi),(0,h.Q)(this.ngUnsubscribe)).subscribe(o=>{this.store.dispatch(new U.O4)}),this.actions.pipe((0,l.xi)(U.e1,U.bE),(0,h.Q)(this.ngUnsubscribe)).subscribe(o=>{o instanceof U.e1&&this.removeDomains(o.joinDomainIds),this.domainIdToRemove=null,this.changeRef.markForCheck()}),this.actions.pipe((0,l.xi)(U.Uj,U.bE),(0,h.Q)(this.ngUnsubscribe)).subscribe(o=>{this.snackBar.open(`There was an error ${o instanceof U.Uj?"adding":"remov
1ing"} the email domain.`)})}handleDeleteLogoClick(){this.form.patchValue({account_logo_url:this.createImageURLs(),account_logo:this.createAccountLogo()}),this.changeRef.markForCheck()}onSubmit(){if(this.form.valid){const o=this.form.value;"create"===this.mode?this.createTeam(o):"manage"===this.mode&&this.updateTeam(this.organization.id,o)}}handleActiveTabChange(o){this.showSubmitButton=o!==Lt.TeamAccess,this.changeRef.markForCheck()}setNewOrganizationFormValues(o){this.form.patchValue({purposeDescription:o?"developer":""})}setExistingOrganizationFormValues(o){const t=o.group_attributes,i=this.getTeamAccountSetting(t,"account_purpose"),s=this.getTeamAccountSetting(t,"account_field"),a=this.getTeamAccountSetting(t,"account_company_size"),r=this.getTeamAccountSetting(t,"account_company_website"),u=this.getTeamAppSetting(t,"anatomy_description_fallback"),v=o.group_logos?.human_app?.default?.logo_url??"",T=v.split(".").pop(),M=this.createImageURLs(v),y=this.createAccountLogo(v,T);this.setTeamFields(i?i.value:b.j.Business);let it=(0,C.get)(i,"description","");it="developer"===it?"developer":"";const Ep=(0,C.get)(u,"value",Aa.H.Wikipedia),Up=this.store.selectSnapshot(S.q.getDefaultUserRole).role_id;this.form.patchValue({account_name:o.name,website:r?r.value:"",account_logo_url:M,account_logo:y,size:a?a.value:"",industry:s?s.value:"",industryDescription:s?s.value_desc:"",purposeDescription:it,anatomyDescriptionFallback:Ep}),this.form.patchValue({defaultRoleId:Up},{emitEvent:!1})}handleAddDomainClick(o){o.preventDefault(),this.store.dispatch(new U.OG([this.domainToAdd.value])),this.domainToAdd.setValue(null)}handleRemoveDomainClick(o,t){o.preventDefault(),this.domainIdToRemove=t.join_domain_id,this.store.dispatch(new U.DM([t.join_domain_id]))}removeDomains(o){o.forEach(t=>{const i=this.joinDomains.findIndex(s=>s.join_domain_id===t);this.joinDomains.splice(i,1)}),this.changeRef.markForCheck()}handleGenerateCodeClick(o){o.preventDefault(),this.organization&&this.confirmGenerateCode&&this.store.dispatch(new U.eS(this.organization.id))}setShowGenerateCode(o){this.showGenerateGroupCode=o}getTeamAccountSetting(o,t){return this.organizationsService.getOrganizationAttribute(o,"account_settings",t)}getTeamAppSetting(o,t){return this.organizationsService.getOrganizationAttribute(o,"app_settings",t)}createTeam(o){const{account_name:t,account_logo:i}=o,s=this.createTeamAccountSettings(this.purpose,o);this.store.dispatch(new f.Kg({account_settings:s})),this.store.dispatch(new U.ul({account_name:t,account_settings:s,account_logo:i.default.image_src?i:void 0}))}updateTeam(o,t){const{account_name:i}=t;let{account_logo:s}=t;const a=this.createTeamAccountSettings(this.purpose,t);s=this.formAccountLogoURL?s.default.image_src?s:void 0:this.createAccountLogo("","",!0),this.store.dispatch(new U.Lo({group_id:o,account_name:i,account_settings:a,account_logo:s})),this.initUpdateActionListeners()}updateDefaultRoleId(o){this.store.dispatch(new U.Lo({group_id:this.organization.id,account_settings:[{default_user_role_id:parseInt(o,10)}]})),this.initUpdateActionListeners(!1)}createTeamAccountSettings(o,t){const{size:i,industry:s,industryDescription:a,website:r,purposeDescription:u,anatomyDescriptionFallback:v,defaultRoleId:T}=t;return(0,Se.q)({account_purpose:{value:o,description:u},account_field:{value:s,description:"Other"===s?a:""},account_company_size:i,account_company_website:r,anatomy_description_fallback:v,default_user_role_id:T})}getFormValidator(){return o=>{const{industry:t,industryDescription:i}=o.value,s="Other"===t&&""===i;return s?{invalidIndustry:s}:null}}getDomainToAddValidator(){return o=>{const t=o.value;let i=!1,s=!1;return t&&(i=!Pr.test(t),s=this.store.selectSnapshot(S.q.getJoinDomains).map(u=>u.email_domain).includes(t)),i||s?{invalidDomainPattern:i,duplicateDomain:s}:null}}getDomainToAddAsyncValidator(){return o=>{const t=o.value;return t?(0,da.O)(300).pipe((0,ha.n)(()=>this.organizationsService.checkJoinDomains([t])),(0,ga.M)(()=>this.changeRef.markForCheck()),(0,w.T)(i=>i[0]?{forbiddenDomain:!0}:null)):(0,H.of)(null)}}getOrganizationLogoModel(){const o=this.upload?this.upload.getBlob():void 0;if(this.formAccountLogoURL&&!(0,C.isNil)(o)){const t=o.type.split("/")[1];return(0,H.of)(o).pipe((0,J.Z)(i=>wa.X.blobToBase64(i)),(0,w.T)(i=>this.createAccountLogo(i,t)))}return(0,H.of)(this.createAccountLogo("",""))}createAccountLogo(o="",t="",i=!1){return{default:{delete:i?"1":"0",image_type:t,image_src:o}}}createImageURLs(o=""){if(o)return{default:o,small:o,large:o}}
1checkSsoAccess(){this.organization?.id&&(this.ssoAccessLoading=!0,this.organizationsSsoService.getSsoAccess(this.organization.id).pipe((0,h.Q)(this.ngUnsubscribe)).subscribe({next:o=>{this.ssoAccess=o.sso_access,this.ssoAccessLoading=!1,this.changeRef.markForCheck(),this.loadSsoConfigurations()},error:o=>{this.ssoAccess=!1,this.ssoAccessLoading=!1,this.changeRef.markForCheck(),this.loadSsoConfigurations()}}))}loadSsoConfigurations(){!this.organization?.id||!this.ssoAccess||(this.ssoLoading=!0,this.organizationsSsoService.getSsoSettings(this.organization.id).pipe((0,h.Q)(this.ngUnsubscribe)).subscribe({next:o=>{this.ssoConfigs=o.authentication_methods?.map(t=>({id:t.id||0,auth_method:t.auth_method,auth_method_name:t.auth_method_name,auth_config_display_name:t.display_name||t.auth_method_name,auth_config_url:t.config_url||"",auth_config_data:t.config_data||"{}",active:t.enabled,create_datetime:t.create_datetime||(new Date).toISOString(),timestamp:t.timestamp||(new Date).toISOString()}))||[],this.ssoLoading=!1,this.changeRef.markForCheck()},error:o=>{this.ssoLoading=!1,this.snackBar.open("Failed to load SSO configurations"),this.changeRef.markForCheck()}}))}toggleSsoConfig(o){if(!this.organization?.id)return;this.dialogService.openCustom(Ma.w,{id:De.t.ConfirmDialog,width:"500px",data:!o.active?{titleText:"Enable SSO Configuration",bodyText:`Are you sure you want to enable "${o.auth_config_display_name}"? Enabling this will require users to sign in using Single Sign-On (SSO). Existing accounts will be prompted to link their SSO credentials, and traditional login methods may no longer be available.`,confirmText:"Enable SSO",confirmColor:"primary",cancelText:"Cancel"}:{titleText:"Disable SSO Configuration",bodyText:`Are you sure you want to disable "${o.auth_config_display_name}"? Disabling this will require users to sign in with a password. Accounts that were created using SSO will be prompted to set a password before they can log in.`,confirmText:"Disable SSO",confirmColor:"warn",cancelText:"Cancel"}}).closed.subscribe(r=>{r&&(this.ssoLoading=!0,this.changeRef.markForCheck(),this.organizationsSsoService.updateSsoConfig(this.organization.id,{auth_method:o.auth_method,auth_method_name:o.auth_method_name,auth_config_display_name:o.auth_config_display_name,auth_config_url:o.auth_config_url,auth_config_data:o.auth_config_data,active:!o.active}).pipe((0,h.Q)(this.ngUnsubscribe)).subscribe({next:v=>{this.snackBar.open(`SSO configuration ${o.active?"disabled":"enabled"} successfully`),this.loadSsoConfigurations(),this.ssoLoading=!1,this.changeRef.markForCheck()},error:v=>{console.error("Failed to update SSO configuration:",v),this.ssoLoading=!1,this.snackBar.open("Failed to update SSO configuration"),this.changeRef.markForCheck()}}))})}editSsoConfig(o){this.organization?.id?this.dialogService.openCustom(kn,{id:De.t.SsoConfigDialog,width:"600px",data:{organizationId:this.organization.id,existingConfig:o}}).closed.subscribe(i=>{i&&this.loadSsoConfigurations()}):this.snackBar.open("Organization ID not available")}addSsoConfig(){this.organization?.id?this.dialogService.openCustom(kn,{id:De.t.SsoConfigDialog,width:"600px",data:{organizationId:this.organization.id}}).closed.subscribe(t=>{t&&this.loadSsoConfigurations()}):this.snackBar.open("Organization ID not available")}static#e=this.\u0275fac=function(t){return new(t||Q)(e.rXU(fa.k),e.rXU(yn),e.rXU(se.o),e.rXU(p.ze),e.rXU(l.il),e.rXU(l.En),e.rXU(O.UG),e.rXU(e.gRc))};static#t=this.\u0275cmp=e.VBU({type:Q,selectors:[["app-team-create"]],viewQuery:function(t,i){if(1&t&&e.GBs(za,5),2&t){let s;e.mGM(s=e.lsd())&&(i.upload=s.first)}},inputs:{organization:"organization",purpose:"purpose"},outputs:{organizationCreated:"organizationCreated",organizationUpdated:"organizationUpdated"},decls:15,vars:5,consts:[["profileTmpl",""],["teamAccessTmpl",""],["appSettingsTmpl",""],["profileFieldInvalidMessage",""],["upload","","imageUpload",""],["generateGroupCode",""],["removeDomainIcon",""],[1,"flex","flex-col","flex-auto","create","theme-light",3,"ngSubmit","formGroup","ngSwitch"],[1,"create__fieldset"],["type","hidden","formControlName","purposeDescription","data-test","purposeDescription"],[4,"ngSwitchCase"],[1,"flex","flex-row","justify-end","mt-5"],["type","submit","app-button","","buttonType","primary","buttonTheme","light","buttonSize","lg","data-test","teamActionButton",3,"disabled","w-full",4,"ngIf"],[1,"my-5","create__fields"],[3,"ngClass",4,"ngIf"],["theme","light",3,"label"],["type","text","appInput","","formControlName","account_name","data-test","account_name",3,"minlength","maxlength"],["form-field-error","",4,"ngIf"],["appInput","","formControlName","size","data-test","size"],["value",""],[3,"value",4,"ngFor","ngForOf"],["type","url","appInput","","formControlName","website","data-test","website"],["appInput","","formControlName","industry","data-test","industry"],[3,"label","value"],["class","mt-2",4,"ngIf"],[3,"ngClass"],[1,"relative","flex","items-center","gap-4"],[1,"flex","flex-col","gap-1"],["type","image","formControlName","account_logo_url"],[1,"text-xs","italic","text-gray-400"],[1,"self-center","relative","m-w-[150px]","m-h-[150px]"],["app-button","","buttonType","tertiary","buttonTheme","light","buttonSize","sm","aria-label","Remove logo",1,"absolute","top-1","right-1",3,"square"],[3,"src","fullscreenSrc"],["app-button","","buttonType","tertiary","buttonTheme","light","buttonSize","sm","aria-label","Remove logo",1,"absolute","top-1","right-1",3,"click","
1square"],["icon","times"],["form-field-error",""],[3,"value"],[1,"mt-2"],["type","text","appInput","","formControlName","industryDescription"],[4,"ngTemplateOutlet"],[1,"mb-3","text-base","font-semibold"],[1,"mb-3","text-sm"],["theme","light"],["appInput","","formControlName","defaultRoleId",1,"w-auto"],[1,"my-3","text-base","font-semibold"],[1,"!my-4"],[4,"ngIf","ngIfElse"],[4,"ngIf"],["class","my-3 text-base font-semibold text-gray-500",4,"ngIf"],["class","mb-3 text-sm text-gray-500",4,"ngIf"],["type","button","app-button","","buttonType","tertiary","buttonTheme","light","buttonSize","lg",3,"click"],[1,"mb-4","text-sm"],[1,"pl-3","mb-3","ml-3","text-sm","create__list"],[1,"mb-1"],[1,"font-bold"],[1,"mb-3","text-xs"],["formControlName","confirmGenerateCode"],[1,"create__confirm-generate-code"],[1,"flex","justify-end","pb-4"],["app-button","","buttonType","ghost","buttonTheme","light","buttonSize","md",3,"click","uppercase"],["app-button","","buttonType","primary","buttonTheme","light","buttonSize","md",1,"ml-3",3,"click","disabled","uppercase"],["size","md","color","white","class","ml-2",4,"ngIf"],["size","md","color","white",1,"ml-2"],[1,"flex","flex-row"],["type","text","appInput","","placeholder","e.g. example.com","formControlName","domainToAdd"],["type","button","app-button","","buttonType","tertiary","buttonTheme","light","buttonSize","lg",1,"flex-none","ml-4",3,"click","disabled"],["size","md","color","blue","class","ml-2",4,"ngIf"],[1,"create__join-domains"],["class","flex items-center justify-between p-1 create__join-domain",4,"ngFor","ngForOf"],["size","md","color","blue",1,"ml-2"],[1,"flex","items-center","justify-between","p-1","create__join-domain"],[1,"pl-2","text-xs"],["app-button","","buttonType","ghost","buttonTheme","light","buttonSize","sm",3,"click","disabled"],["size","sm","color","blue","class","ml-2",4,"ngIf","ngIfElse"],["size","sm","color","blue",1,"ml-2"],["size","sm","icon","trash"],[1,"space-y-3"],["class","p-3 border border-gray-200 rounded-lg",4,"ngFor","ngForOf"],["class","p-4 text-center text-gray-500 border border-gray-200 rounded-lg",4,"ngIf"],["class","mt-4",4,"ngIf"],[1,"p-3","border","border-gray-200","rounded-lg"],[1,"flex","items-center","justify-between","mb-2"],[1,"flex","items-center"],[1,"text-sm","font-medium"],[1,"px-2","py-1","ml-2","text-xs","bg-gray-100","rounded"],["class","px-2 py-1 ml-2 text-xs text-green-800 bg-green-100 rounded",4,"ngIf"],["class","px-2 py-1 ml-2 text-xs text-gray-600 bg-gray-100 rounded",4,"ngIf"],[1,"flex","items-center","space-x-2"],["type","button","app-button","","buttonType","tertiary","buttonTheme","light","buttonSize","sm",3,"click","disabled"],["type","button","app-button","","buttonType","tertiary","buttonTheme","light","buttonSize","sm",3,"click"],[1,"text-xs","text-gray-600"],[1,"px-2","py-1","ml-2","text-xs","text-green-800","bg-green-100","rounded"],[1,"px-2","py-1","ml-2","text-xs","text-gray-600","bg-gray-100","rounded"],[1,"p-4","text-center","text-gray-500","border","border-gray-200","rounded-lg"],[1,"mb-2"],["icon","shield-alt","size","lg",1,"text-gray-400"],[1,"text-sm"],[1,"mt-1","text-xs"],[1,"mt-4"],["type","button","app-button","","buttonType","secondary","buttonTheme","light","buttonSize","md",3,"click"],["icon","plus",1,"mr-2"],[1,"my-3","text-base","font-semibold","text-gray-500"],[1,"mb-3","text-sm","text-gray-500"],[1,"mt-3","text-xs"],["formControlName","anatomyDescriptionFallback"],["listType","flat"],["value","wikipedia",1,"text-xs"],["value","ncit",1,"text-xs"],[1,"text-3xl","font-semibold"],[1,"mt-3","mb-5","text-base"],[1,"mt-10"],[1,"mb-5","text-xl","font-semibold"],["type","underline",3,"activeTabChange","activeTab"],["label","Profile"],["label","Team Access"],["label","App Settings"],["type","submit","app-button","","buttonType","primary","buttonTheme","light","buttonSize","lg","data-test","teamActionButton",3,"disabled"],["class","p-3 mb-3 text-sm create__profile-tab-error",4,"ngIf"],[1,"p-3","mb-3","text-sm","create__profile-tab-error"]],template:function(t,i){if(1&t){const s=e.RV6();e.j41(0,"form",7),e.bIt("ngSubmit",function(){return e.eBV(s),e.Njj(i.onSubmit())}),e.j41(1,"fieldset",8),e.DNE(2,tr,18,14,"ng-template",null,0,e.C5r)(4,kr,22,10,"ng-template",null,1,e.C5r)(6,Sr,13,1,"ng-template",null,2,e.C5r),e.nrm(8,"input",9),e.DNE(9,Fr,7,1,"ng-container",10)(10,Er,10,4,"ng-container",10),e.k0s(),e.j41(11,"div",11),e.DNE(12,Mr,3,5,"button",12),e.k0s()(),e.DNE(13,Ar,1,1,"ng-template",null,3,e.C5r)}2&t&&(e.Y8G("formGroup",i.form)("ngSwitch",i.mode),e.R7$(9),e.Y8G("ngSwitchCase","create"),e.R7$(),e.Y8G("ngSwitchCase","manage"),e.R7$(2),e.Y8G("ngIf",i.showSubmitButton))},dependencies:[p.YN,p.qT,p.xH,p.y7,p.me,p.wz,p.BC,p.cb,p.xh,p.tU,p.X1,p.j4,p.JD,d.ux,d.bT,d.YU,fe.K,d.pM,d.T3,Ga.H,q.q,j.Q,ve.So,Y.t,N.R,Rn.VT,Pa.s,$a.P,Rn._g,d.e1,Na.O,Oa.j,d.Jj,d.vh,Ba.v,L.k,V
1a.o],styles:[".create__fieldset[_ngcontent-%COMP%]{overflow:auto;padding:0 20px;margin:0 -20px}.create__join-domain[_ngcontent-%COMP%]{border-radius:4px}.create__join-domain[_ngcontent-%COMP%]:hover, .create__join-domain[_ngcontent-%COMP%]:focus{background-color:#e7eaee}.create__profile-tab-error[_ngcontent-%COMP%]{background-color:#fef2f2;border-radius:4px}.create__list[_ngcontent-%COMP%]{list-style-type:disc;line-height:20px}.create__confirm-generate-code[_ngcontent-%COMP%]{white-space:normal;display:block;font-size:.75rem;line-height:1rem}"],changeDetection:0})}we([(0,l.l6)(de.V.getHorizontalBreakpoint),Ae("design:type",_.c)],Q.prototype,"horizontalBreakpoint$",void 0),we([(0,l.l6)(g.k.getUserRoles),Ae("design:type",_.c)],Q.prototype,"userRoles$",void 0),we([(0,l.l6)(S.q.getJoinDomains),Ae("design:type",_.c)],Q.prototype,"joinDomains$",void 0),we([(0,l.l6)(S.q.getGeneratingGroupCode),Ae("design:type",_.c)],Q.prototype,"generatingGroupCode$",void 0),we([(0,l.l6)(S.q.getLoadingJoinDomains),Ae("design:type",_.c)],Q.prototype,"loadingJoinDomains$",void 0),we([(0,l.l6)(S.q.getAddingJoinDomains),Ae("design:type",_.c)],Q.prototype,"addingJoinDomains$",void 0),we([(0,l.l6)(S.q.getRemovingJoinDomains),Ae("design:type",_.c)],Q.prototype,"removingJoinDomains$",void 0);let $r=(()=>{class n{constructor(t,i){this.dialogRef=t,this.data=i,this.ngUnsubscribe=new R.B,this.organization=this.data.organization}ngOnInit(){}ngOnDestroy(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()}handleCancelClick(){this.closeDialog()}handleOrganizationUpdated(){this.closeDialog()}closeDialog(){this.dialogRef.close()}static#e=this.\u0275fac=function(i){return new(i||n)(e.rXU(A.ce),e.rXU(A.Qs))};static#t=this.\u0275cmp=e.VBU({type:n,selectors:[["app-team-manage-dialog"]],decls:4,vars:3,consts:[[1,"team-manage"],["app-button","","buttonType","ghost","buttonTheme","light","buttonSize","md","type","button","title","Close",1,"absolute","top-0","right-0",3,"click","square"],["icon","times","size","lg"],[1,"team-manage__create",3,"organizationUpdated","organization"]],template:function(i,s){1&i&&(e.j41(0,"div",0)(1,"button",1),e.bIt("click",function(){return s.handleCancelClick()}),e.nrm(2,"app-icon",2),e.k0s(),e.j41(3,"app-team-create",3),e.bIt("organizationUpdated",function(){return s.handleOrganizationUpdated()}),e.k0s()()),2&i&&(e.R7$(),e.Y8G("square",!0),e.BMQ("aria-label","Close"),e.R7$(2),e.Y8G("organization",s.organization))},dependencies:[j.Q,N.R,Q],styles:[".team-manage[_ngcontent-%COMP%]{max-height:100%;position:relative}.team-manage__create[_ngcontent-%COMP%]{max-height:90vh;display:flex}@media (max-width: 480px){.dialog[_ngcontent-%COMP%]{width:100vw}.dialog__team-create[_ngcontent-%COMP%]{max-height:100vh}}"],changeDetection:0})}return n})();var Nr=c(1661),Or=c(8917),Br=c(96438),Sn=c(21835);const xn={label:"Status",fields:["invitationStatus"],dataTest:"invitationStatusAscending",ascending:!0},Ze={label:"Name (A-Z)",fields:["name"],dataTest:"nameAscending",ascending:!0},Yt={label:"Name (Z-A)",fields:["name"],dataTest:"nameDescending",ascending:!1},Qt={label:"Email (A-Z)",fields:["email"],dataTest:"emailAscending",ascending:!0},qt={label:"Email (Z-A)",fields:["email"],dataTest:"emailDescending",ascending:!1},zr=[{label:"Role",fields:["role"],dataTest:"roleDescending",ascending:!1,compareFn:(n,o,t)=>{const s=o.role.role_name;let u=Sn.Zv.indexOf(n.role.role_name)-Sn.Zv.indexOf(s);if(0===u){const v=n.name.toLowerCase(),T=o.name.toLowerCase();u=v.localeCompare(T,"en-US",{sensitivity:"base"})*(t?1:-1)}return u*(t?1:-1)}},Ze,Yt,Qt,qt],Xr=[xn,Ze,Yt,Qt,qt],Lr=[Ze,Yt,Qt,qt];var Fn=c(53977),Yr=c(2578),Qr=c.n(Yr),at=c(74296),rt=c(54839),qr=c(70152),Jt=c(75272);let Jr=(()=>{class n{constructor(){}ngOnInit(){}static#e=this.\u0275fac=function(i){return new(i||n)};static#t=this.\u0275cmp=e.VBU({type:n,selectors:[["app-divider"]],decls:1,vars:0,consts:[[1,"divider"]],template:function(i,s){1&i&&e.nrm(0,"span",0)},styles:[".divider{display:inline-block;width:1px;height:1em;border-left:1px solid #8999b3}\n"],encapsulation:2,changeDetection:0})}return n})();const Wr=["*",[["","input-after",""]]],Hr=["*","[input-after]"],Kr=n=>({"input-group--has-icon":n});function Zr(n,o){if(1&n&&e.nrm(0,"app-icon",1),2&n){const t=e.XpG();e.Y8G("icon",t.icon)}}let ec=(()=>{class n{constructor(){this.icon=""}ngOnInit(){}static#e=this.\u0275fac=function(i){return new(i||n)};static#t=this.\u0275cmp=e.VBU({type:n,selectors:[["app-input-group"]],inputs:{icon:"icon"},ngContentSelectors:Hr,decls:6,vars:4,consts:[[1,"input-group",3,"ngClass"],[1,"input-group__icon",3,"icon"],[1,"input-group__main"],[1,"input-group__after"]],template:function(i,s){1&i&&(e.NAR(Wr),e.j41(0,"div",0),e.DNE(1,Zr,1,1,"app-icon",1),e.j41(2,"div",2),e.SdG(3),e.k0s(),e.j41(4,"div",3),e.SdG(5,1),e.k0s()()),2&i&&(e.Y8G("ngClass",e.eq3(2,Kr,s.icon)),e.R7$(),e.vxM(s.icon?1:-1))}
1,dependencies:[d.YU,N.R],styles:[".input-group{display:flex;position:relative}.input-group__icon{display:flex;align-items:center;justify-content:center;position:absolute;z-index:1;top:0;left:0;height:100%;width:36px}.input-group__main{flex:1 1 100%}.input-group__after{position:absolute;top:0;bottom:0;right:0;display:flex;z-index:1}.input-group--has-icon input{padding-left:36px!important}\n"],encapsulation:2,changeDetection:0})}return n})();const tc=["itemTemplate"],nc=["actionsMenu"],ic=["listActionsMenu"],oc=()=>["text-gray-950","border-blue-600"],sc=()=>["text-gray-700","border-transparent"],ac=(n,o)=>({"hover:bg-gray-100 focus:bg-gray-100":n,"bg-blue-100 hover:bg-blue-200 focus:bg-blue-200":o}),rc=n=>({$implicit:n}),cc=n=>({item:n}),lc=(n,o)=>o.title;function pc(n,o){if(1&n){const t=e.RV6();e.j41(0,"button",13),e.bIt("click",function(){e.eBV(t);const s=e.XpG();return e.Njj(s.clearSearch())}),e.EFF(1," Clear "),e.k0s()}}function uc(n,o){if(1&n){const t=e.RV6();e.j41(0,"button",15),e.bIt("click",function(){e.eBV(t);const s=e.XpG().$index,a=e.XpG();return e.Njj(a.handleSectionClick(s))}),e.EFF(1),e.k0s()}if(2&n){const t=e.XpG().$implicit,i=e.XpG();e.Y8G("ngClass",t===i.activeSection()?e.lJ4(3,oc):e.lJ4(4,sc)),e.R7$(),e.Lme(" ",t.title," (",t.items.length,") ")}}function dc(n,o){if(1&n&&e.DNE(0,uc,2,5,"button",14),2&n){const t=o.$implicit;e.vxM(t.items.length>0&&t.shown?0:-1)}}function mc(n,o){if(1&n){const t=e.RV6();e.j41(0,"button",19),e.bIt("click",function(){e.eBV(t);const s=e.XpG(2);return e.Njj(s.selectAllItems())}),e.EFF(1," Select All "),e.k0s()}2&n&&e.Y8G("uppercase",!1)}function hc(n,o){if(1&n&&(e.j41(0,"button",17)(1,"span"),e.EFF(2),e.nrm(3,"app-icon",20),e.k0s()()),2&n){const t=e.XpG(2);e.Y8G("uppercase",!1)("matMenuTriggerFor",t.activeActionsMenu),e.R7$(2),e.SpI(" ",t.selectedItemIds().size," selected ")}}function gc(n,o){if(1&n&&(e.j41(0,"div",7),e.DNE(1,mc,2,1,"button",16)(2,hc,4,3,"button",17),e.nrm(3,"app-divider",18),e.k0s()),2&n){const t=e.XpG();e.R7$(),e.vxM(0===t.selectedItemIds().size?1:2)}}function fc(n,o){if(1&n&&(e.j41(0,"button",9)(1,"span",21)(2,"span",22),e.EFF(3,"Sort:"),e.k0s(),e.EFF(4),e.nrm(5,"app-icon",20),e.k0s()()),2&n){const t=e.XpG(),i=e.sdS(13);e.Y8G("uppercase",!1)("matMenuTriggerFor",i.menu()),e.BMQ("aria-label","Sort "+t.activeSection().sort.label+": "+t.sort().label+" selected"),e.R7$(4),e.SpI("",t.sort().label," ")}}function _c(n,o){1&n&&e.eu8(0)}function bc(n,o){if(1&n){const t=e.RV6();e.j41(0,"button",26),e.bIt("click",function(){e.eBV(t);const s=e.XpG().$implicit,a=e.XpG();return e.Njj(a.handleItemActionsClick(s))}),e.nrm(1,"app-icon",27),e.k0s()}if(2&n){const t=e.XpG().$implicit,i=e.XpG();e.Y8G("matMenuTriggerFor",i.activeListActionsMenu)("matMenuTriggerData",e.eq3(2,cc,t))}}function vc(n,o){if(1&n){const t=e.RV6();e.j41(0,"div",23),e.bIt("click",function(s){const a=e.eBV(t).$implicit,r=e.XpG();return e.Njj(r.handleItemClick(s,a))})("mouseenter",function(){const s=e.eBV(t).$implicit,a=e.XpG();return e.Njj(a.handleItemMouseEnter(s))})("mouseleave",function(){const s=e.eBV(t).$implicit,a=e.XpG();return e.Njj(a.handleItemMouseLeave(s))}),e.DNE(1,_c,1,0,"ng-container",24)(2,bc,2,4,"button",25),e.k0s()}if(2&n){const t=o.$implicit,i=e.XpG();e.xc7("min-height",i.itemSize()-8,"px"),e.AVh("cursor-pointer",i.activeSection().selectable),e.Y8G("ngClass",e.l_i(8,ac,!i.itemSelected(t),i.itemSelected(t))),e.R7$(),e.Y8G("ngTemplateOutlet",i.itemTemplate)("ngTemplateOutletContext",e.eq3(11,rc,t)),e.R7$(),e.vxM(i.activeSection().selectable?2:-1)}}const jn="section";let Wt=(()=>{class n{get formSearch(){return this.form.value.search}constructor(t,i){this.formBuilder=t,this.location=i,this.sections=e.hFB.required(),this.itemSize=e.hFB.required(),this.heightRule=e.hFB.required(),this.ariaLabel=e.hFB.required(),this.selectedItemIds=(0,e.vPA)(new Set),this.activeSectionIndex=(0,e.vPA)(0),this.activeSection=(0,e.EWP)(()=>this.sections()[this.activeSectionIndex()]),this.activeItems=(0,e.EWP)(()=>this.activeSection()?.items??[]),this.itemStates=(0,e.EWP)(()=>{const s=this.activeSection(),a=this.selectedItemIds();let r=new Map;
1return this.selectedItems.length=0,s&&s.items.forEach(u=>{const v=u[s.trackProperty],T=a.has(v);r.set(u,{trackId:v,selected:T,hovered:!1}),T&&this.selectedItems.push(u)}),r}),this.currentItems=(0,e.EWP)(()=>{const s=this.activeItems(),a=this.formChanges()?.search??"",r=this.sort();return this.sortItems(this.filterItems(s,a),r)}),this.allItemsSelected=(0,e.EWP)(()=>{const s=this.currentItems(),a=this.selectedItemIds();return s.length===a.size}),this.minHeight=(0,e.EWP)(()=>Math.min(this.activeItems().length,4)*this.itemSize()+"px"),this.selectedItems=[],this.form=this.formBuilder.group({search:[""]}),this.formChanges=(0,$.ot)(this.form.valueChanges.pipe((0,qr.B)(125))),this.sort=(0,e.vPA)(null),this.initEffects()}ngAfterContentInit(){const t=this.activeSectionIndex();this.setActiveTemplates(t)}initEffects(){const t=(0,e.QZP)(()=>{this.initializeSection(this.sections()),t.destroy()});(0,e.QZP)(()=>{const i=this.activeSectionIndex();this.handleActiveSectionIndexChange(i)}),(0,e.QZP)(()=>{const i=this.activeSection();this.handleActiveSectionChange(i)})}clearSearch(){this.form.patchValue({search:""})}itemSelected(t){return this.itemStates().get(t).selected}selectAllItems(){const t=this.activeSection().trackProperty;this.selectedItemIds.set(new Set(this.currentItems().map(i=>i[t])))}deselectAllItems(){this.selectedItemIds.set(new Set)}filterItems(t,i){i=i.toLocaleLowerCase();const s=this.activeSection().searchProperties;return t.filter(a=>s.map(u=>a[u]).some(u=>(u||"").toLocaleLowerCase().includes(i)))}sortItems(t,i){return(0,mn.h5)([...t],i.fields,i.ascending,i.compareFn)}trackItems(t,i){return this.itemStates().get(i).trackId}handleSectionClick(t){this.activeSectionIndex.set(t)}handleSort(t){this.sort.set(t)}handleItemClick(t,i){if(!this.activeSection().selectable)return;const s=this.itemStates().get(i);t.shiftKey?s.selected?this.deselectItem(s):this.selectItem(s,!1):this.selectItem(s,!0)}handleItemMouseEnter(t){this.itemStates().get(t).hovered=!0}handleItemMouseLeave(t){this.itemStates().get(t).hovered=!1}handleItemActionsClick(t){if(!this.activeSection().selectable)return;const i=this.itemStates().get(t);this.selectItem(i,!0)}handleActiveSectionIndexChange(t){this.deselectAllItems(),this.setActiveTemplates(t)}handleActiveSectionChange(t){t&&(this.sort.set(t.sort.initial),t.slug&&this.updateSlug(t.slug),t.itemsLoaded&&0===t.items.length&&this.activeSectionIndex.set(0))}selectItem(t,i){const s=new Set(this.selectedItemIds());i&&s.clear(),s.add(t.trackId),this.selectedItemIds.set(s)}deselectItem(t){const i=new Set(this.selectedItemIds());i.delete(t.trackId),this.selectedItemIds.set(i)}setActiveTemplates(t){this.actionsMenus&&(this.activeActionsMenu=this.actionsMenus.get(t)),this.listActionsMenus&&(this.activeListActionsMenu=this.listActionsMenus.get(t))}initializeSection(t){const s=new URLSearchParams(document.location.search).get(jn);if(s){const a=t.findIndex(r=>r.slug===s);-1!==a&&this.activeSectionIndex.set(a)}}updateSlug(t){const i=document.location.pathname,s=new URLSearchParams(document.location.search);s.set(jn,t),this.location.replaceState(i,s.toString())}static#e=this.\u0275fac=function(i){return new(i||n)(e.rXU(p.ok),e.rXU(d.aZ))};static#t=this.\u0275cmp=e.VBU({type:n,selectors:[["app-actionable-list"]],contentQueries:function(i,s,a){if(1&i&&(e.wni(a,tc,5),e.wni(a,nc,4),e.wni(a,ic,4)),2&i){let r;e.mGM(r=e.lsd())&&(s.itemTemplate=r.first),e.mGM(r=e.lsd())&&(s.actionsMenus=r),e.mGM(r=e.lsd())&&(s.listActionsMenus=r)}},inputs:{sections:[1,"sections"],itemSize:[1,"itemSize"],heightRule:[1,"heightRule"],ariaLabel:[1,"ariaLabel"]},decls:16,vars:14,consts:[["sortMenu",""],[1,"my-5",3,"formGroup"],["icon","search"],["appInput","","theme","light","type","text","placeholder","Search...","formControlName","search"],["type","button","buttonSize","md","buttonType","ghost","app-button","","input-after","","buttonTheme","light",1,"self-center","mr-2"],[1,"flex","flex-col","items-start","justify-between","border-b","border-gray-100","border-solid","sm:flex-row","sm:items-center"],[1,"flex","items-center","justify-between","w-full","pt-4","sm:pt-0","sm:w-auto"],[1,"flex","items-center"],["data-test","itemsSort"],["app-button","","buttonType","ghost","buttonTheme","light","buttonSize","md",3,"uppercase","matMenuTriggerFor"],[3,"sortChange","sortOptions","currentSort"],["tabindex","0",1,"pl-2",3,"itemSize"],["class","flex flex-row items-center p-2 my-1 rounded select-none","data-test","actionableListItem",3,"minHeight","cursor-pointer","ngClass","click","mouseenter","mouseleave",4,"cdkVirtualFor","cdkVirtualForOf","cdkVirtualForTrackBy"],["type","button","buttonSize","md","buttonType","ghost","app-button","","input-after","","buttonTheme","light",1,"self-center","mr-2",3,"click"],[1,"px-1","py-2.5","mr-3","text-xs","font-semibold","border-b-[3px]","border-solid",3,"ngClass"],[1,"px-1","py-2.5","mr-3","text-xs","font-semibold","border-b-[3px]","border-solid",3,"click","ngClass"],["app-button","","buttonType","ghost","buttonTheme","light","buttonSize","md","data-test","selectAllItemsButton",3,"uppercase"],["app-button","","buttonType","ghost","buttonTheme","light","buttonSize","md","data-test","selectedItemsActionsButton",3,"uppercase","matMenuTriggerFor"],[1,"hidden","mx-1","sm:inline"],["app-button","","buttonType","ghost","buttonTheme","light","buttonSize","md","data-test","selectAllItemsButton",3,"click","uppercase"],["icon","caret-down",1,"ml-1"],[1,"whitespace-nowrap"],[1,"mr-1","font-semibold"],["data-test","actionableListItem",1,"flex","flex-row","items-center","p-2","my-1","rounded","select-none",3,"click","mouseenter","mouseleave","ngClass"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["app-button","","buttonType","ghost","appEventFence","","buttonTheme","light","data-test","itemActionsMenuButton","aria-label","Item actions menu",3,"matMenuTriggerFor","matMenuTriggerData"],["app-button","","buttonType","ghost","appEventFence","","buttonTheme","light","data-test","itemActionsMenuButton","aria-label","Item actions menu",3,"click","matMenuTriggerFor","matMenuTriggerData"],["icon","ellipsis-v"]],template:function(i,s){if(1&i){const a=e.RV6();e.j41(0,"div",1)(1,"app-input-group",2),e.nrm(2,"input",3),e.DNE(3,pc,2,0,"button",4),e.k0s()(),e.j41(4,"div",5)(5,"div"),e.Z7z(6,dc,1,1,null,null,lc),e.k0s(),e.j41(8,"div",6),e.DNE(9,gc,4,1,"div",7),e.j41(10,"div",8),e.DNE(11,fc,6,4,"button",9),e.j41(12,"app-sort",10,0),e.bIt("sortChange",function(u){return e.eBV(a),e.Njj(s.handleSort(u))}),e.k0s()()()(),e.j41(14,"cdk-virtual-scroll-viewport",11),e.DNE(15,vc,3,13,"div",12),e.k0s()}2&i&&(e.Y8G("formGroup",s.form),e.R7$(3),e.vxM(s.formSearch?3:-1),e.R7$(3),e.Dyx(s.sections()),e.R7$(3),e.vxM(s.activeSection().selectable?9:-1),e.R7$(2),e.vxM(s.sort()?11:-1),e.R7$(),e.Y8G("sortOptions",s.activeSection().sort.options)("currentSort",s.sort()),e.R7$(2),e.xc7("height",s.heightRule())("min-height",s.minHeight()),e.Y8G("itemSize",s.itemSize()),e.BMQ("aria-label",s.ariaLabel()),e.R7$(),e.Y8G("cdkVirtualForOf",s.currentItems())("cdkVirtualForTrackBy",s.trackItems.bind(s)))},dependencies:[d.MD,d.YU,d.T3,p.X1,p.me,p.BC,p.cb,p.j4,p.JD,rt.GC,le.Cp,Jt.yg,Jt.E$,Jt.d6,at.G,j.Q,Ft.L,L.k,N.R,hn.K,Jr,ec],encapsulation:2,changeDetection:0})}return n})();var ct=c(68062),Cc=c(42750),Tc=c(13863),yc=c(27329);const kc=["list"],Rc=(n,o)=>o.role_id;function Sc(n,o){if(1&n){const t=e.RV6();e.j41(0,"button",14),e.bIt("click",function(){e.eBV(t);const s=e.XpG(2);return e.Njj(s.handleManageTeamAccountClick())}),e.j41(1,"div",15),e.nrm(2,"app-icon",16),e.j41(3,"div",17),e.EFF(4,"Manage"),e.k0s()()()}if(2&n){const t=e.XpG(2);e.Y8G("disabled",t.isSubscriptionExpired())}}function xc(n,o){if(1&n){const t=e.RV6();e.j41(0,"button",18),e.bIt("click",function(){e.eBV(t);const s=e.XpG(2);return e.Njj(s.handleAddMemberClick())}),e.nrm(1,"app-icon",19),e.k0s()}if(2&n){const t=e.XpG(2);e.Y8G("disabled",t.isSubscriptionExpired())}}function Fc(n,o){if(1&n&&(e.j41(0,"div",8),e.DNE(1,Sc,5,1,"button",12)(2,xc,2,1,"button",13),e.k0s()),2&n){const t=e.XpG();e.R7$(),e.vxM(t.canManageTeam()?1:-1),e.R7$(),e.vxM(t.canInviteUsers()?2:-1)}}function jc(n,o){if(1&n&&e.EFF(0),2&n){const t=e.XpG();e.SpI(" ",t.userLimitMsg()," ")}}function Ic(n,o){if(1&n&&e.nrm(0,"app-team-user",33),2&n){const t=o.$implicit;e.XpG();const i=e.sdS(3),s=e.XpG();e.Y8G("user",t)("theme",s.getUserTheme(t))("showNameUnknown",0===i.activeSectionIndex())("showEmail",s.canInviteUsers())}}function Dc(n,o){1&n&&e.eu8(0)}function Ec(n,o){if(1&n){const t=e.RV6();e.j41(0,"button",24),e.bIt("click",function(){e.eBV(t);const s=e.XpG(3);return e.Njj(s.exportUsersToCSV())}),e.EFF(1,"Export to CSV"),e.k0s()}}function Uc(n,o){if(1&n&&(e.qex(0),e.DNE(1,Ec,2,0,"button",34),e.bVm()),2&n){const t=e.XpG(2);e.R7$(),e.vxM(t.showExportUsersToCSV()?1:-1)}}function Mc(n,o){if(1&n){const t=e.RV6();e.j41(0,"button",24),e.bIt("click",function(){e.eBV(t);const s=e.XpG().item,a=e.XpG(2);return e.Njj(a.copyEmailClick(s.email))}
1),e.EFF(1,"Copy Email"),e.k0s()}}function wc(n,o){if(1&n&&e.DNE(0,Mc,2,0,"button",34),2&n){const t=o.item,i=e.XpG(2);e.vxM(i.canManageTeam()&&t.email?0:-1)}}function Ac(n,o){1&n&&e.eu8(0)}function Gc(n,o){if(1&n){const t=e.RV6();e.j41(0,"button",24),e.bIt("click",function(){e.eBV(t);const s=e.XpG(3);return e.Njj(s.exportUsersToCSV())}),e.EFF(1,"Export to CSV"),e.k0s()}}function Pc(n,o){if(1&n&&(e.qex(0),e.DNE(1,Gc,2,0,"button",34),e.bVm()),2&n){const t=e.XpG(2);e.R7$(),e.vxM(t.showExportUsersToCSV()?1:-1)}}function $c(n,o){if(1&n){const t=e.RV6();e.j41(0,"button",24),e.bIt("click",function(){e.eBV(t);const s=e.XpG().item,a=e.XpG(2);return e.Njj(a.copyEmailClick(s.email))}),e.EFF(1,"Copy Email"),e.k0s()}}function Nc(n,o){if(1&n&&e.DNE(0,$c,2,0,"button",34),2&n){const t=o.item,i=e.XpG(2);e.vxM(i.canInviteUsers()&&t.email?0:-1)}}function Oc(n,o){1&n&&e.eu8(0)}function Bc(n,o){1&n&&e.eu8(0)}function Vc(n,o){if(1&n){const t=e.RV6();e.j41(0,"button",24),e.bIt("click",function(){e.eBV(t);const s=e.XpG().item,a=e.XpG(2);return e.Njj(a.copyEmailClick(s.email))}),e.EFF(1,"Copy Email"),e.k0s()}}function zc(n,o){if(1&n&&e.DNE(0,Vc,2,0,"button",34),2&n){const t=o.item,i=e.XpG(2);e.vxM(i.canManageTeam()&&t.email?0:-1)}}function Xc(n,o){1&n&&e.eu8(0)}function Lc(n,o){1&n&&e.nrm(0,"app-spinner",32)}function Yc(n,o){if(1&n){const t=e.RV6();e.j41(0,"div",20),e.nrm(1,"app-user-notices",21),e.k0s(),e.j41(2,"app-actionable-list",22,3),e.DNE(4,Ic,1,4,"ng-template",null,4,e.C5r),e.j41(6,"mat-menu",null,5),e.DNE(8,Dc,1,0,"ng-container",23),e.j41(9,"button",24),e.bIt("click",function(){e.eBV(t);const s=e.XpG();return e.Njj(s.transferSelectedUsersContent())}),e.EFF(10,"Transfer Content"),e.k0s(),e.j41(11,"button",25),e.EFF(12,"Change Role"),e.k0s(),e.DNE(13,Uc,2,1,"ng-container",26),e.nrm(14,"mat-divider"),e.j41(15,"button",24),e.bIt("click",function(){e.eBV(t);const s=e.XpG();return e.Njj(s.removeSelectedUsers())}),e.EFF(16,"Remove From Team"),e.k0s()(),e.j41(17,"mat-menu",null,6),e.DNE(19,wc,1,1,"ng-template",27),e.j41(20,"button",24),e.bIt("click",function(){e.eBV(t);const s=e.XpG();return e.Njj(s.transferSelectedUsersContent())}),e.EFF(21,"Transfer Content"),e.k0s(),e.j41(22,"button",28),e.EFF(23," Change Role "),e.k0s(),e.nrm(24,"mat-divider"),e.j41(25,"button",29),e.bIt("click",function(){e.eBV(t);const s=e.XpG();return e.Njj(s.removeSelectedUsers())}),e.EFF(26," Remove From Team "),e.k0s()(),e.j41(27,"mat-menu",null,5),e.DNE(29,Ac,1,0,"ng-container",23),e.j41(30,"button",30),e.bIt("click",function(){e.eBV(t);const s=e.XpG();return e.Njj(s.resendSelectedUsersInvites())}),e.EFF(31," Resend Invite "),e.k0s(),e.DNE(32,Pc,2,1,"ng-container",26),e.k0s(),e.j41(33,"mat-menu",null,6),e.DNE(35,Nc,1,1,"ng-template",27),e.j41(36,"button",31),e.bIt("click",function(){e.eBV(t);const s=e.XpG();return e.Njj(s.resendSelectedUsersInvites())}),e.EFF(37," Resend Invite "),e.k0s()(),e.j41(38,"mat-menu",null,5),e.DNE(40,Oc,1,0,"ng-container",23)(41,Bc,1,0,"ng-container",23),e.k0s(),e.j41(42,"mat-menu",null,6),e.DNE(44,zc,1,1,"ng-template",27)(45,Xc,1,0,"ng-container",23),e.k0s()(),e.DNE(46,Lc,1,0,"app-spinner",32)}if(2&n){const t=e.XpG(),i=e.sdS(10),s=e.sdS(14),a=e.sdS(16);e.R7$(2),e.Y8G("sections",t.sections())("itemSize",60),e.R7$(6),e.Y8G("ngTemplateOutlet",s),e.R7$(3),e.Y8G("matMenuTriggerFor",i),e.R7$(2),e.Y8G("appFlagApplication",t.envApplication.All)("appFlagApplicationMode","exclude")("appFlagApplicationNative",t.nativePlatform.All),e.R7$(9),e.Y8G("matMenuTriggerFor",i),e.R7$(7),e.Y8G("ngTemplateOutlet",s),e.R7$(3),e.Y8G("appFlagApplication",t.envApplication.All)("appFlagApplicationMode","exclude")("appFlagApplicationNative",t.nativePlatform.All),e.R7$(8),e.Y8G("ngTemplateOutlet",s),e.R7$(),e.Y8G("ngTemplateOutlet",a),e.R7$(4),e.Y8G("ngTemplateOutlet",a),e.R7$(),e.vxM(t.loadingUsers()?46:-1)}}function Qc(n,o){if(1&n){const t=e.RV6();e.j41(0,"button",35),e.bIt("click",function(){const s=e.eBV(t).$implicit,a=e.XpG();return e.Njj(a.setSelectedUsersRole(s))}),e.j41(1,"app-multipart-menu-item",36),e.EFF(2),e.k0s()()}if(2&n){const t=o.$implicit;e.R7$(),e.Y8G("helperText",t.role_description),e.R7$(),e.SpI(" ",t.role_display_name," ")}}function qc(n,o){if(1&n){const t=e.RV6();e.j41(0,"button",24),e.bIt("click",function(){e.eBV(t);const s=e.XpG();return e.Njj(s.list.deselectAllItems())}),e.EFF(1,"Clear Selection"),e.k0s(),e.j41(2,"button",37),e.bIt("click",function(){e.eBV(t);const s=e.XpG();return e.Njj(s.list.selectAllItems())}),e.EFF(3," Select All "),e.k0s()}if(2&n){const t=e.XpG();e.R7$(2),e.Y8G("disabled",t.allItemsSelected)}}
1function Jc(n,o){if(1&n){const t=e.RV6();e.j41(0,"button",24),e.bIt("click",function(){e.eBV(t);const s=e.XpG();return e.Njj(s.acceptSelectedUsersJoinRequest())}),e.EFF(1,"Approve Request"),e.k0s(),e.j41(2,"button",24),e.bIt("click",function(){e.eBV(t);const s=e.XpG();return e.Njj(s.denySelectedUsersJoinRequest())}),e.EFF(3,"Deny Request"),e.k0s()}}let Wc=(()=>{class n{get selectedUsers(){return this.list.selectedItems}get allItemsSelected(){return this.list?.allItemsSelected()}constructor(t,i,s,a,r,u,v,T,M){this.store=t,this.actions=i,this.dialogService=s,this.organizationDialogsService=a,this.usersService=r,this.organizationActionsService=u,this.clipboardService=v,this.snackBar=T,this.activatedRoute=M,this.roles=(0,l.Lt)(g.k.getUserRoles),this.userRole=(0,l.Lt)(g.k.getUserRole),this.isAdmin=(0,l.Lt)(g.k.isAdmin),this.organization=(0,l.Lt)(S.q.getOrganization),this.defaultUserRole=(0,l.Lt)(S.q.getDefaultUserRole),this.isSubscriptionExpired=(0,l.Lt)(S.q.isSubscriptionExpired),this.isValidPaidSubscription=(0,l.Lt)(S.q.isValidPaidSubscription),this.users=(0,l.Lt)(re.e.getUsers),this.invites=(0,l.Lt)(re.e.getInvites),this.pendingJoinRequests=(0,l.Lt)(re.e.getPendingOrganizationJoinRequests),this.loadingUsers=(0,l.Lt)(re.e.getUsersLoading),this.horizontalBreakpoint=(0,l.Lt)(de.V.getHorizontalBreakpoint),this.userDisplays=(0,e.EWP)(()=>this.users().map(y=>this.usersService.createUserDisplayModel(y))),this.inviteDisplays=(0,e.EWP)(()=>this.invites().map(y=>this.usersService.createUserDisplayModel(y.invitee_user,y.invite_status,y.invite_id))),this.pendingJoinRequestDisplays=(0,e.EWP)(()=>{const y=this.pendingJoinRequests(),ke=this.defaultUserRole();return y.map(it=>this.JoinRequestToUserDisplay(it,ke))}),this.usersLoaded=(0,e.vPA)(!1),this.invitesLoaded=(0,e.vPA)(!1),this.pendingJoinRequestsLoaded=(0,e.vPA)(!1),this.sections=(0,e.EWP)(()=>[{title:"Members",slug:"members",items:this.userDisplays(),itemsLoaded:this.usersLoaded(),trackProperty:"id",searchProperties:["name","email"],sort:{label:"Sort Team Members",options:zr,initial:Ze},selectable:this.isAdmin(),shown:!0},{title:"Pending Invites",slug:"pending-invites",items:this.inviteDisplays(),itemsLoaded:this.invitesLoaded(),trackProperty:"inviteId",searchProperties:["name","email"],sort:{label:"Sort Pending Invites",options:Xr,initial:xn},selectable:this.canInviteUsers(),shown:this.canInviteUsers()},{title:"Join Requests",slug:"join-requests",items:this.pendingJoinRequestDisplays(),itemsLoaded:this.pendingJoinRequestsLoaded(),trackProperty:"id",searchProperties:["name","email"],sort:{label:"Sort Join Requests",options:Lr,initial:Ze},selectable:this.isAdmin(),shown:this.canManageJoinRequests()}]),this.userLimitMsg=(0,e.EWP)(()=>{const y=this.organization();let ke="";return y&&(ke="Unlimited"!==y.user_limit?`Your team member limit is ${y.user_limit}.`:"This team has unlimited members."),ke}),this.currentUser=(0,e.EWP)(()=>{const y=this.store.selectSnapshot(g.k.getUserProfile).id;return this.getDisplayUser(y)}),this.canViewUsers=(0,e.EWP)(()=>{this.users();const y=this.userRole();return Ce._m(y,K.y.ViewUsers)}),this.canManageTeam=(0,e.EWP)(()=>{this.users();const y=this.userRole();return Ce._m(y,K.y.EditTeamAccount)}),this.canInviteUsers=(0,e.EWP)(()=>{this.users();const y=this.userRole();return Ce._m(y,K.y.InviteUsers)}),this.canManageJoinRequests=(0,e.EWP)(()=>{this.users();const y=this.userRole();return this.isValidPaidSubscription()&&Ce._m(y,K.y.ManageJoinRequests)}),this.showExportUsersToCSV=(0,e.EWP)(()=>this.horizontalBreakpoint()>m.m.Medium),this.envApplication=Br.c,this.nativePlatform=Or.I,this.ngUnsubscribe=new R.B,this.pendingRequesterName="",this.store.dispatch(new f.Xb),this.initSections(),this.initInviteListener(),this.initJoinRequestListeners(),this.initJoinRequestParamHandling()}ngOnDestroy(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()}initJoinRequestParamHandling(){var t=this;return(0,Vt.A)(function*(){const{join_request_key:i,action:s}=t.activatedRoute.snapshot.queryParams;if(i&&s){const a=yield(0,zt._)(t.usersService.getOrganizationJoinRequests({join_request_key:i}));if(0===a.join_request_count)t.snackBar.open("This request cannot be found and may have been canceled by the user.");else{const r=a.join_requests[0],u=t.JoinRequestToUserDisplay(r,t.defaultUserRole());switch(r.request_status){case ct.s.Pending:t.manageJoinRequests([u],"accept"===s);break;case ct.s.Accepted:t.snackBar.open(`${u.name}'s request to join your team has already been accepted.`);break;case ct.s.Denied:t.snackBar.open(`${u.name}'s request to join your team has already been denied.`);break;case ct.s.Expired:t.snackBar.open(`${u.name}'s request to join your team has expired.`)}}}})()}initSections(){(0,e.QZP)(()=>{this.organization()&&this.fetchSections()}),this.actions.pipe((0,l.xi)(F.HO,F.rD,F.J0),(0,$.pQ)()).subscribe(t=>{switch(t.constructor){case F.HO:this.usersLoaded.set(!0);break;case F.rD:this.invitesLoaded.set(!0);break;case F.J0:this.pendingJoinRequestsLoaded.set(!0)}})}initInviteListener(){this.actions.pipe((0,l.xi)(F.w9),(0,$.pQ)()).subscribe(({responses:t})=>{const i=t.filter(r=>"success"===r.status);0===t.filter(r=>"error"===r.status).length&&(this.snackBar.open(`${this.printCount(i.length,"invite")} have been sent`),this.fetchSections())}),this.actions.pipe((0,l.xi)(F.HZ),(0,$.pQ)()).subscribe(()=>{this.snackBar.open("There was an error sending the invites, please try again.")})}initJoinRequestListeners(){this.actions.pipe((0,l.xi)(F.mb,F.mq),(0,$.pQ)()).subscribe(t=>{const s=t.count>1;this.snackBar.open(`${this.pendingRequesterName?`${this.pendingRequesterName}'s`:"The"} request${s?"s":""} to join your team ${s?"have":"has"} been ${t instanceof F.mb?"accepted":"denied"}.`),this.fetchSections(),this.pendingRequesterName=""}),this.actions.pipe((0,l.xi)(F.DY,F.Lh),(0,$.pQ)()).subscribe(t=>{this.snackBar.open(`There was an error ${t instanceof F.DY?"accepting":"denying"} ${this.pendingRequesterName?`${this.pendingRequesterName}'s`:"the"} request${t.count>1?"s":""}, please try again.`),this.pendingRequesterName=""})}handleManageTeamAccountClick(){this.manageTeam(this.organization())}handleAddMemberClick(){this.organizationDialogsService.openAddUserDialog()}copyEmailClick(t){this.clipboardService.copyToClipboard(t,"text").pipe((0,h.Q)(this.ngUnsubscribe)).subscribe(i=>{this.snackBar.open(i?"Email copied successfully.":"Email not copied.")})}resendSelectedUsersInvites(){const{eid:t}=this.store.selectSnapshot(S.q.getOrganization),i=this.selectedUsers.map(s=>({user_email:s.email,role_id:s.role.role_id}));this.store.dispatch(new F.h2(t,i))}transferSelectedUsersContent(){const t=this.store.selectSnapshot(S.q.getOrganization);this.organizationActionsService.transferUserContent(t,this.selectedUsers).pipe((0,h.Q)(this.ngUnsubscribe)).subscribe(i=>{this.handleUserTransferResponse(i),i&&this.list.deselectAllItems()})}setSelectedUsersRole(t){const i=this.store.selectSnapshot(S.q.getOrganization),s=(0,C.remove)(this.selectedUsers,r=>r.id===this.currentUser().id);this.organizationActionsService.setUserRole(i,this.selectedUsers,s[0]?s[0].email:"",t).pipe((0,h.Q)(this.ngUnsubscribe)).subscribe(r=>{this.handleRoleChangeResponse(r),r.success&&this.fetchSections()})}removeSelectedUsers(){const t=this.store.selectSnapshot(S.q.getOrganization),i=(0,C.remove)(this.selectedUsers,a=>a.id===this.currentUser().id);this.organizationActionsService.removeUser(t,this.selectedUsers,i[0]?i[0].email:"").pipe((0,h.Q)(this.ngUnsubscribe)).subscribe(a=>
1{this.handleUserRemoveResponse(a),a.success&&this.fetchSections()})}isCurrentUser(t){const i=this.store.selectSnapshot(g.k.getUserProfile).id;return t.id===i}getUserTheme(t){const i=this.list.itemStates().get(t);return i.selected||i.hovered?"dark":"light"}exportUsersToCSV(){const t=this.selectedUsers.some(a=>a.invitationStatus),i=this.selectedUsers.map(a=>({email:a.email,name:a.name,role:a.role.role_display_name,invitationStatus:a.invitationStatus})),s=[{field:"name",label:"Name"},{field:"email",label:"Email"},{field:"role",label:"Role"}];t&&s.push({field:"invitationStatus",label:"Invitation Status"}),(0,Nr.H)(i,s).subscribe(a=>{const v=`biodigital-${t?"invitations":"members"}-${(new Date).toISOString().split("T")[0]}.csv`,T=new Blob([a],{type:"text/csv;charset=utf-8"});Qr()(T,v)})}acceptSelectedUsersJoinRequest(){this.manageJoinRequests(this.selectedUsers,!0)}denySelectedUsersJoinRequest(){this.manageJoinRequests(this.selectedUsers,!1)}manageJoinRequests(t,i){this.organizationDialogsService.openTeamJoinDialog(t,i).closed.subscribe(s=>{s&&(1===t.length&&(this.pendingRequesterName=t[0].name),this.store.dispatch(i?new F.$k(s):new F.H7(s)))})}fetchSections(){const t=this.organization();this.store.dispatch(new F.iW(t.id)),this.store.dispatch(new F.Kl(t.id)),this.canManageJoinRequests()&&this.store.dispatch(new F.Qi)}manageTeam(t){this.dialogService.openCustom($r,{id:De.t.AddTeamModelDialog,disableClose:!1,data:{organization:t},width:"640px"})}handleRoleChangeResponse(t){const i=this.getModifiedUserCount();if(t.success){const a=this.getRole(t.targetRoleId).role_display_name;this.snackBar.open(`The role of ${this.printCount(i,"user")} has been updated to ${a}.`)}else this.snackBar.open(`The role of ${this.printCount(i,"user")} was not updated.`)}handleUserRemoveResponse(t){const i=this.getModifiedUserCount(),s=1===i?"has":"have";if(t.success)if("number"==typeof t.targetUserId){const a=this.getDisplayUser(t.targetUserId),r=a.name||a.email;this.snackBar.open(`${this.printCount(i,"user")} ${s} been removed from the team and their content transferred to ${r}.`)}else this.snackBar.open(`${this.printCount(i,"user")} ${s} been removed from the team and their content deleted.`);else this.snackBar.open(`${this.printCount(i,"user")} ${s} not been removed.`)}handleUserTransferResponse(t){const i=this.selectedUsers.length,s=1===i?"has":"have";if(t){const a=this.getDisplayUser(t[0].targetUserId),r=a.name||a.email;this.snackBar.open(`The content of ${this.printCount(i,"user")} ${s} been transferred to ${r}.`)}else this.snackBar.open(`The content of ${this.printCount(i,"user")} was not transferred`)}getModifiedUserCount(){return this.selectedUsers.filter(t=>!this.isCurrentUser(t)).length}getDisplayUser(t){return this.userDisplays().find(i=>i.id===t)}getRole(t){return this.store.selectSnapshot(g.k.getUserRoles).find(i=>i.role_id===t)}JoinRequestToUserDisplay(t,i){const s={...t.request_user,user_role:i,developer_account:!1,developer_account_active:!1,developer_has_apps:!1};return this.usersService.createUserDisplayModel(s,void 0,void 0,t.join_request_key)}printCount(t,i){return`${t} ${1===t?i:i+"s"}`}static#e=this.\u0275fac=function(i){return new(i||n)(e.rXU(l.il),e.rXU(l.En),e.rXU(se.o),e.rXU(Cc.A),e.rXU(Ut.g),e.rXU(ln),e.rXU(Fn.W),e.rXU(O.UG),e.rXU(E.nX))};static#t=this.\u0275cmp=e.VBU({type:n,selectors:[["app-team-manage"]],viewQuery:function(i,s){if(1&i&&e.GBs(kc,5),2&i){let a;e.mGM(a=e.lsd())&&(s.list=a.first)}},standalone:!1,decls:17,vars:4,consts:[["userRolesMenu","matMenu"],["selectActions",""],["joinRequestsActions",""],["list",""],["itemTemplate",""],["actionsMenu",""],["listActionsMenu",""],["label","Team"],["panel-view-actions",""],[1,"mb-3","text-sm"],[1,"font-bold"],["mat-menu-item","","data-test","userRoleMenuItem"],["type","button","app-button","","buttonSize","md","buttonType","secondary","buttonTheme","light","data-test","teamManageButton",1,"mr-2",3,"disabled"],["type","button","app-button","","buttonSize","md","buttonType","secondary","buttonTheme","light","buttonShape","square","data-test","teamInviteMembersButton","aria-label","Invite Members",3,"disabled"],["type","button","app-button","","buttonSize","md","buttonType","secondary","buttonTheme","light","data-test","teamManageButton",1,"mr-2",3,"click","disabled"],[1,"flex","flex-row"],["icon","cog"],[1,"ml-2"],["type","button","app-button","","buttonSize","md","buttonType","secondary","buttonTheme","light","buttonShape","square","data-test","teamInviteMembersButton","aria-label","Invite Members",3,"click","disabled"],["icon","user-plus"],[1,"overflow-auto","max-h-48"],["noticeType","content_ownership_transfer"],["ariaLabel","Team Members list","heightRule","calc(100vh - 380px)",1,"block","mb-2",3,"sections","itemSize"],[4,"ngTemplateOutlet"],["mat-menu-item","",3,"click"],["mat-menu-item","",3,"matMenuTriggerFor"],[4,"appFlagApplication","appFlagApplicationMode","appFlagApplicationNative"],["matMenuContent",""],["mat-menu-item","","data-test","userRoleMenuButon",3,"matMenuTriggerFor"],["mat-menu-item","","data-test","userLeaveTeamButon",3,"click"],["mat-menu-item","","data-test","resendSelectedUserInvites",3,"click"],["mat-menu-item","","data-test","resendUserInvite",3,"click"],["size","xl","color","blue",1,"block","my-2"],[1,"flex","mr-2","grow",3,"user","theme","showNameUnknown","showEmail"],["mat-menu-item",""],["mat-menu-item","","data-test","userRoleMenuItem",3,"click"],[3,"helperText"],["mat-menu-item","",3,"click","disabled"]],template:function(i,s){if(1&i&&(e.j41(0,"app-account-panel",7),e.DNE(1,Fc,3,2,"div",8),e.j41(2,"div",9),e.EFF(3," You are in the "),e.j41(4,"em",10),e.EFF(5),e.k0s(),e.EFF(6," team. "),e.DNE(7,jc,1,1),e.k0s(),e.DNE(8,Yc,47,16),e.k0s(),e.j41(9,"mat-menu",null,0),e.Z7z(11,Qc,3,2,"button",11,Rc),e.k0s(),e.DNE(13,qc,4,1,"ng-template",null,1,e.C5r)(15,Jc,4,0,"ng-template",null,2,e.C5r)),2&i){let a;e.R7$(),e.vxM(s.canManageTeam()||s.canInviteUsers()?1:-1),e.R7$(4),e.JRh(null==(a=s.organization())?null:a.name),e.R7$(2),e.vxM(s.canViewUsers()?7:-1),e.R7$(),e.vxM(s.canViewUsers()?8:-1),e.R7$(3),e.Dyx(s.roles())}},dependencies:[d.T3,j.Q,Tc.Y,N.R,Y.t,st.o,It,le.kk,le.fb,le.z8,le.Cp,q.q,yc.A,Wt,P],encapsulation:2,changeDetection:0})}return n})();var Hc=c(64108),Kc=c(98781);let Zc=(()=>{class n{constructor(){}ngOnInit(){}static#e=this.\u0275fac=function(i){return new(i||n)};static#t=this.\u0275cmp=e.VBU({type:n,selectors:[["app-team-premium-user"]],standalone:!1,decls:6,vars:1,consts:[["label","Team",1,"team"],[1,"team__features"],[1,"mt-4","flex","flex-col","items-center"],["type","button","appSupportLink","","app-button","","buttonType","primary","buttonTheme","light","buttonSize","md",3,"uppercase"]],template:function(i,s){1&i&&(e.j41(0,"app-account-panel",0)(1,"div",1),e.nrm(2,"app-team-features"),e.k0s(),e.j41(3,"div",2)(4,"button",3),e.
1EFF(5," Contact Us "),e.k0s()()()),2&i&&(e.R7$(4),e.Y8G("uppercase",!1))},dependencies:[j.Q,Hc.R,Kc.W,P],styles:[".team__features[_ngcontent-%COMP%]{padding:32px}@media (max-width: 480px){.team__features[_ngcontent-%COMP%]{padding:16px}}"],changeDetection:0})}return n})();var In=function(n,o,t,i){var r,s=arguments.length,a=s<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,t):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(n,o,t,i);else for(var u=n.length-1;u>=0;u--)(r=n[u])&&(a=(s<3?r(a):s>3?r(o,t,a):r(o,t))||a);return s>3&&a&&Object.defineProperty(o,t,a),a},Dn=function(n,o){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(n,o)};function el(n,o){1&n&&e.nrm(0,"app-team-manage")}function tl(n,o){1&n&&e.nrm(0,"app-team-premium-user")}function nl(n,o){1&n&&e.nrm(0,"app-team-free-user")}class Oe{constructor(){this.userType=xt.I}ngOnInit(){}static#e=this.\u0275fac=function(t){return new(t||Oe)};static#t=this.\u0275cmp=e.VBU({type:Oe,selectors:[["app-team-page"]],standalone:!1,decls:5,vars:6,consts:[[3,"ngSwitch"],[4,"ngSwitchCase"]],template:function(t,i){1&t&&(e.qex(0,0),e.nI1(1,"async"),e.DNE(2,el,1,0,"app-team-manage",1)(3,tl,1,0,"app-team-premium-user",1)(4,nl,1,0,"app-team-free-user",1),e.bVm()),2&t&&(e.Y8G("ngSwitch",e.bMT(1,4,i.userType$)),e.R7$(2),e.Y8G("ngSwitchCase",i.userType.Team),e.R7$(),e.Y8G("ngSwitchCase",i.userType.Premium),e.R7$(),e.Y8G("ngSwitchCase",i.userType.Free))},dependencies:[d.ux,d.e1,Me,Wc,Zc,d.Jj],encapsulation:2,changeDetection:0})}In([(0,l.l6)(g.k.getUserType),Dn("design:type",_.c)],Oe.prototype,"userType$",void 0),In([(0,l.l6)(S.q.getOrganization),Dn("design:type",_.c)],Oe.prototype,"organization$",void 0);const il=(n,o)=>({"button-icon__label--light":n,"button-icon__label--dark":o});function ol(n,o){1&n&&e.nrm(0,"app-icon",3)}function sl(n,o){1&n&&e.nrm(0,"app-icon",4)}let al=(()=>{class n{constructor(){this.iconType="solid",this.iconPlacement="bottom",this.arrow="",this.color="",this.label=""}ngOnInit(){}static#e=this.\u0275fac=function(i){return new(i||n)};static#t=this.\u0275cmp=e.VBU({type:n,selectors:[["app-button-icon"]],inputs:{icon:"icon",iconType:"iconType",iconPlacement:"iconPlacement",arrow:"arrow",color:"color",label:"label"},decls:7,vars:9,consts:[[1,"button-icon",3,"ngClass"],[1,"button-icon__icon"],[3,"icon"],["icon","angle-down","size","sm",1,"button-icon__arrow"],["icon","angle-up","size","sm",1,"button-icon__arrow"],[1,"button-icon__label","button-icon__label--medium",3,"ngClass"]],template:function(i,s){1&i&&(e.j41(0,"div",0)(1,"div",1),e.nrm(2,"app-icon",2),e.DNE(3,ol,1,0,"app-icon",3)(4,sl,1,0,"app-icon",4),e.k0s(),e.j41(5,"div",5),e.EFF(6),e.k0s()()),2&i&&(e.Y8G("ngClass","button-icon--"+s.iconPlacement),e.R7$(2),e.Y8G("icon",s.icon),e.R7$(),e.vxM("down"===s.arrow?3:-1),e.R7$(),e.vxM("up"===s.arrow?4:-1),e.R7$(),e.Y8G("ngClass",e.l_i(6,il,"light"===s.color,"dark"===s.color)),e.R7$(),e.SpI(" ",s.label," "))},dependencies:[d.YU,N.R],styles:["[_nghost-%COMP%]{white-space:nowrap}.button-icon[_ngcontent-%COMP%]{display:flex}.button-icon__label[_ngcontent-%COMP%]{color:#d4d9e3}.theme-light[_nghost-%COMP%]   .button-icon__label[_ngcontent-%COMP%], .theme-light   [_nghost-%COMP%]   .button-icon__label[_ngcontent-%COMP%]{color:#142136}.theme-dark[_nghost-%COMP%]   .button-icon__label[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   .button-icon__label[_ngcontent-%COMP%]{color:#d4d9e3}.button-icon__label--light[_ngcontent-%COMP%]{color:#d4d9e3!important}.button-icon__label--dark[_ngcontent-%COMP%]{color:#142136!important}.button-icon--left[_ngcontent-%COMP%]{flex-direction:row;align-items:center}.button-icon--left[_ngcontent-%COMP%]   .button-icon__label[_ngcontent-%COMP%]{padding-right:4px;font-size:.75rem;line-height:1rem}.button-icon--left[_ngcontent-%COMP%]   .button-icon__icon[_ngcontent-%COMP%]{margin-right:8px}.button-icon--bottom[_ngcontent-%COMP%]{flex-direction:column}.button-icon--bottom[_ngcontent-%COMP%]   .button-icon__label[_ngcontent-%COMP%]{margin-top:4px;font-size:8px;text-transform:uppercase}.button-icon__arrow[_ngcontent-%COMP%]{display:inline-block;margin-left:4px}"],changeDetection:0})}return n})();var rl=c(86132);const cl=["optionEl"],ll=["*"];function pl(n,o){if(1&n&&e.nrm(0,"app-icon",14),2&n){const t=e.XpG();e.Y8G("icon",t.icon)}}function ul(n,o){if(1&n&&(e.j41(0,"div",15),e.EFF(1),e.k0s()),2&n){const t=e.XpG();e.R7$(),e.SpI(" ",t.tag," ")}}function dl(n,o){if(1&n&&(e.j41(0,"p",16),e.EFF(1),e.k0s()),2&n){const t=e.XpG();e.R7$(),e.SpI(" ",t.description," ")}}function ml(n,o){if(1&n&&(e.j41(0,"div",17),e.EFF(1),e.k0s()),2&n){const t=e.XpG();e.R7$(),e.SpI(" ",t.tag," ")}}function hl(n,o){if(1&n&&(e.j41(0,"li"),e.EFF(1),e.k0s()),2&n){const t=o.$implicit;e.R7$(),e.SpI(" ",t," ")}}function gl(n,o){if(1&n&&(e.j41(0,"div",18)(1,"p"),e.EFF(2),e.k0s(),e.j41(3,"ul",19),e.DNE(4,hl,2,1,"li",20),e.k0s()()),2&n){const t=e.XpG();e.R7$(2),e.JRh(t.content.title),e.R7$(2),e.Y8G("ngForOf",t.content.content)}}let En=(()=>{class n extends rl.Z{constructor(){super(...arguments),this.compact=!0,this.responseSelected=new e.bkB}ngOnInit(){}handleResponseClicked(){this.responseSelected.emit()}focus(t){this.optionEl&&this.optionEl.nativeElement.focus()}static#e=this.\u0275fac=(()=>{let t;return function(s){return(t||(t=e.xGo(n)))(s||n)}})();static#t=this.\u0275cmp=e.VBU({type:n,selectors:[["app-account-question-response"]],viewQuery:function(i,s){if(1&i&&e.GBs(cl,7),2&i){let a;e.mGM(a=e.lsd())&&(s.optionEl=a.first)}},inputs:{title:"title",description:"description",tag:"tag",icon:"icon",content:"content",selected:"selected",compact:"compact",value:"value",responsive:"responsive"},outputs:{responseSelected:"responseSelected"},standalone:!1,features:[e.Jv_([{provide:p.kq,useExisting:(0,e.Rfq)(()=>n),multi:!0}]),e.Vt3],ngContentSelectors:ll,decls:17,vars:16,consts:[["optionEl",""],["data-test","questionResponseLabel",1,"response","flex","flex-col",3,"pointerup"],["type","radio",1,"sr-only",3,"formControl","value"],[1,"flex","flex-row","justify-between","items-center"],["aria-hidden","true",1,"flex","flex-col","flex-auto"],[1,"response__title","flex","flex-row"],["class","response__title-icon mr-2",3,"icon",4,"ngIf"],[1,"flex-auto"],["class","response__tag mt-2",4,"ngIf"],["class","response__description mt-2",4,"ngIf"],["aria-hidden","true",1,"flex","flex-row","items-center"],["class","response__tag",4,"ngIf"],[1,"response__icon","ml-3",3,"icon"],["class","response__content ml-8 mt-1","aria-hidden","","data-test","questionResponseContent",4,"ngIf"],[1,"response__title-icon","mr-2",3,"icon"],[1,"response__tag","mt-2"],[1,"response__description","mt-2"],[1,"response__tag"],["aria-hidden","","data-test","questionResponseContent",1,"response__content","ml-8","mt-1"],[1,"response__content-list"],[4,"ngFor","ngForOf"]],template:function(i,s){if(1&i){const a=e.RV6();e.NAR(),e.j41(0,"label",1,0),e.bIt("pointerup",function(){return e.eBV(a),e.Njj(s.handleResponseClicked())}),e.nrm(2,"input",2),e.j41(3,"div",3)(4,"div",4)(5,"div",5),e.DNE(6,pl,1,1,"app-icon",6),e.j41(7,"span",7),e.EFF(8),e.k0s()(),e.DNE(9,ul,2,1,"div",8)(10,dl,2,1,"p",9),e.j41(11,"div"),e.SdG(12),e.k0s()(),e.j41(13,"div",10),e.DNE(14,ml,2,1,"div",11),e.nrm(15,"app-icon",12),e.k0s()(),e.DNE(16,gl,5,2,"div",13),e.k0s()}2&i&&(e.AVh("response--selected",s.selected)("response--compact",s.compact),e.R7$(2),e.Y8G("formControl",s.control)("value",s.value),e.BMQ("aria-label",s.title),e.R7$(4),e.Y8G("ngIf",s.icon),e.R7$(2),e.JRh(s.title),e.R7$(),e.Y8G("ngIf",s.tag&&s.responsive),e.R7$(),e.Y8G("ngIf",s.description),e.R7$(4),e.Y8G("ngIf",s.tag&&!s.responsive),e.R7$(),e.xc7("visibility",s.selected?"visible":"hidden"),e.Y8G("icon",s.selected?"check-circle":"times-circle"),e.R7$(),e.Y8G("ngIf",s.selected&&s.c
1ontent))},dependencies:[d.Sq,d.bT,p.me,p.Fm,p.BC,p.l_,N.R],styles:[".response[_ngcontent-%COMP%]{padding:20px 24px;border:1px solid #8999b3;box-sizing:border-box;border-radius:4px;color:#384c6c;cursor:pointer}.response__title[_ngcontent-%COMP%]{color:#142136;font-weight:600;font-size:1rem;line-height:1.5rem}.response__title-icon[_ngcontent-%COMP%]{flex:0 0 24px}.response__description[_ngcontent-%COMP%]{color:#384c6c;font-size:.875rem;line-height:1.25rem}.response__tag[_ngcontent-%COMP%]{color:#536788;font-size:.75rem;line-height:1rem;text-transform:uppercase;font-weight:600;white-space:nowrap}.response__icon[_ngcontent-%COMP%]{flex:0 0 48px;color:#2472e9;white-space:nowrap;font-size:1.25rem;line-height:1.75rem}.response__content[_ngcontent-%COMP%]{color:#283853;font-size:.875rem;line-height:1.25rem}.response__content-list[_ngcontent-%COMP%]{list-style-type:disc;margin-left:24px}.response[_ngcontent-%COMP%]:not(.response--selected):hover, .response[_ngcontent-%COMP%]:not(.response--selected):focus{border-color:#536788;color:#142136;background-color:#f8f9fa}.response--selected[_ngcontent-%COMP%]{border-color:#2472e9;box-shadow:0 0 0 1px #2472e9}.response--selected[_ngcontent-%COMP%]   .response__tag[_ngcontent-%COMP%]{color:#2472e9}.response--compact[_ngcontent-%COMP%]   .response__title[_ngcontent-%COMP%]{font-weight:400;font-size:.875rem;line-height:1.25rem}.response[_ngcontent-%COMP%]:focus-within{outline:#2472e9 solid 2px!important}"],changeDetection:0})}return n})();var fl=c(18617),_l=c(23603);function bl(n,o){if(1&n&&(e.j41(0,"p",9),e.EFF(1),e.k0s()),2&n){const t=e.XpG(2);e.R7$(),e.SpI(" ",t.question.hint," ")}}function vl(n,o){if(1&n){const t=e.RV6();e.j41(0,"div",10)(1,"app-account-question-response",11),e.bIt("responseSelected",function(){const s=e.eBV(t).$implicit,a=e.XpG(2);return e.Njj(a.handleResponseSelected(s))}),e.k0s()()}if(2&n){const t=o.$implicit,i=o.index,s=e.XpG(2);e.AVh("question__item--first",0===i),e.BMQ("aria-label",t.value)("data-test-value",t.value),e.R7$(),e.Y8G("title",t.label||t.value)("description",t.hint)("tag",t.tag)("icon",t.icon)("content",t.content)("compact",!t.content)("selected",s.isResponseSelected(t))("value",t)("responsive",s.responsive)}}function Cl(n,o){if(1&n&&e.nrm(0,"input",14),2&n){const t=e.XpG(3);e.BMQ("placeholder",t.question.label||"")}}function Tl(n,o){if(1&n){const t=e.RV6();e.j41(0,"div",10)(1,"app-account-question-response",12),e.bIt("responseSelected",function(){e.eBV(t);const s=e.XpG(2);return e.Njj(s.handleOtherResponseSelected())}),e.DNE(2,Cl,1,1,"input",13),e.k0s()()}if(2&n){const t=e.XpG(2);e.BMQ("aria-label","Other")("data-test-value","Other"),e.R7$(),e.Y8G("title","Other")("selected",t.isOtherSelected)("value",t.getOtherResponse())("responsive",t.responsive),e.R7$(),e.Y8G("ngIf",t.isOtherSelected)}}function yl(n,o){if(1&n){const t=e.RV6();e.j41(0,"fieldset",1)(1,"legend",2),e.EFF(2),e.k0s(),e.DNE(3,bl,2,1,"p",3),e.j41(4,"div",4),e.DNE(5,vl,2,13,"div",5)(6,Tl,3,7,"div",6),e.k0s(),e.j41(7,"div",7)(8,"button",8),e.bIt("click",function(){e.eBV(t);const s=e.XpG();return e.Njj(s.handleContinueClick())}),e.EFF(9),e.k0s()()()}if(2&n){const t=e.XpG();e.Y8G("formGroup",t.form),e.BMQ("data-test-value",t.question.account_setting),e.R7$(2),e.SpI(" ",t.question.label," "),e.R7$(),e.Y8G("ngIf",t.question.hint),e.R7$(2),e.Y8G("ngForOf",t.question.responses),e.R7$(),e.Y8G("ngIf",t.other),e.R7$(2),e.Y8G("uppercase",!1)("disabled",!t.isAdvanceEnabled),e.BMQ("aria-disabled",!t.isAdvanceEnabled),e.R7$(),e.SpI(" ",t.advanceLabel," ")}}let Un=(()=>{class n{get selectedResponse(){return this._selectedResponse}set selectedResponse(t){this._selectedResponse=t,this.changeRef.markForCheck()}get isOtherSelected(){return 0===this.question.responses.length||this.isResponseSelected({value:"Other"})}get isOtherValid(){const{description:t}=this.form.value;return""!==t}get isAdvanceEnabled(){return!!this.advanceEnabled&&(this.isOtherSelected?this.isOtherValid:!(0,C.isNil)(this.selectedResponse))}get shown(){return this._shown}set shown(t){this._shown=t,this.changeRef.markForCheck()}get responseSize(){return(this.question?.responses?.length??0)+(this.other?1:0)}constructor(t,i){this.formBuilder=t,this.changeRef=i,this.responseSelected=new e.bkB,this.advanceSelected=new e.bkB,this.other=!0,this.advanceLabel="Continue",this.advanceEnabled=!0,this._shown=!1,this.isLast=!1,this.ngUnsubscribe=new R.B,this.initForm()}ngOnInit(){this.initFormListener()}ngOnDestroy(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()}ngAfterViewInit(){this.keyManager=new fl.Bu(this.responsesList)}focus(t){if(this.keyManager){let i=0;this.isOtherSelected?i=this.responseSize-1:this.question?.responses&&(i=this.question.responses.findIndex(a=>this.isResponseSelected(a)));const s=Math.max(i,0);this.keyManager.setActiveItem(s)}}initForm(){this.form=this.formBuilder.group({response:[null,p.k0.required],description:[""]})}initFormListener(){this.form.valueChanges.pipe((0,h.Q)(this.ngUnsubscribe)).subscribe(t=>{this.selectedResponse=t.response,this.changeRef.markForCheck()}),this.form.get("description").valueChanges.pipe((0,h.Q)(this.ngUnsubscribe)).subscribe(()=>{this.selectedResponse=this.getOtherResponse()})}clearSelection(){this.selectedResponse=null}handleResponseSelected(t){this.selectedResponse=t,this.isLast||this.responseSelected.next(this.selectedResponse)}handleOtherResponseSelected(){this.selectedResponse=this.getOtherResponse()}handleContinueClick(){this.advanceSelected.next(this.selectedResponse)}isResponseSelected(t){return this.selectedResponse&&this.selectedResponse.value===t.value}getOtherResponse(){const{description:t}=this.form.value;return{value:"Other",description:t}}static#e=this.\u0275fac=function(i){return new(i||n)(e.rXU(p.ze),e.rXU(e.gRc))};static#t=this.\u0275cmp=e.VBU({type:n,selectors:[["app-account-question"]],viewQuery:function(i,s){if(1&i&&e.GBs(En,5),2&i){let a;e.mGM(a=e.lsd())&&(s.responsesList=a)}},inputs:{question:"question",other:"other",advanceLabel:"advanceLabel",advanceEnabled:"advanceEnabled",selectedResponse:"selectedResponse",shown:"shown",isLast:"isLast",responsive:"responsive"},outputs:{responseSelected:"responseSelected",advanceSelected:"advanceSelected"},standalone:!1,decls:1,vars:1,consts:[["class","flex flex-col question","data-test","question",3,"formGroup",4,"ngIf"],["data-test","question",1,"flex","flex-col","question",3,"formGroup"],["data-test","questionLabel",1,"font-semibold","question__label"],["class","mt-3 question__hint","data-test","questionHint",4,"ngIf"],[1,"flex","flex-col","my-10"],["class","question__item","data-test","questionResponse",3,"question__item--first",4,"ngFor","ngForOf"],["class","question__item","data-test","questionResponse",4,"ngIf"],[1,"flex","flex-col","items-end"],["app-button","","buttonType","primary","buttonTheme","light","buttonSize","xl","data-test","questionAdvanceButton",1,"w-full",3,"click","uppercase","disabled"],["data-test","questionHint",1,"mt-3","question__hint"],["data-test","questionResponse",1,"question__item"],["formControlName","response",3,"responseSelected","title","description","tag","icon","content","compact","selected","value","responsive"],["formControlName","response",3,"responseSelected","title","selected","value","responsive"],["type","text","class","my-2","appInput","","theme","light","formControlName","description","appAutoFocus","",4,"ngIf"],["type","text","appInput","","theme","light","formControlName","description","appAutoFocus","",1,"my-2"]],template:function(i,s){1&i&&e.DNE(0,yl,10,10,"fieldset",0),2&i&&e.Y8G("ngIf",s.shown)},dependencies:[d.Sq,d.bT,p.me,p.BC,p.cb,p.j4,p.JD,j.Q,_l.B,L.k,En],styles:[".question__label[_ngcontent-%COMP%]{color:#0c1726;font-size:1.5rem;line-height:2rem}.question__hint[_ngcontent-%COMP%]{color:#283853;font-size:1rem;line-height:1.5rem}.question__item[_ngcontent-%COMP%]{margin-top:20px}.question__item--first[_ngcontent-%COMP%]{margin-top:0}@media (max-width: 959px){.question__label[_ngcontent-%COMP%]{font-size:1.5rem;line-height:2rem}}"],changeDetection:0})}return n})();function kl(n,o){if(1&n){const t=e.RV6();e.j41(0,"button",5),e.bIt("click",function(){e.eBV(t);const s=e.XpG();return e.Njj(s.handleBackClick())}),e.nrm(1,"app-button-icon",6),e.k0s()}}function Rl(n,o){if(1&n){const t=e.RV6();e.j41(0,"app-account-question",7),e.bIt("responseSelected",function(s){const a=e.eBV(t),r=a.$implicit,u=a.index,v=e.XpG();return e.Njj(v.handleResponseSelected(r,s,u))})("advanceSelected",function(s){const a=e.eBV(t),r=a.$implicit,u=a.index,v=e.XpG();return e.Njj(v.handleAdvanceSelected(r,s,u))}),e.k0s()}if(2&n){const t=o.$implicit,i=o.index,s=e.XpG();e.Y8G("shown",i===s.selectedIndex)("question",t)("other",t.other)("advanceLabel",s.advanceLabel)("isLast",i===s.questions.length-1)("responsive",s.responsive)}}let Sl=(()=>{class n{get selectedIndex(){return this._selectedIndex}set selectedIndex(t){this._selectedIndex=t}constructor(){this.questions=[],this.advanceLabel="Continue",this.handleQuestionResponse=new e.bkB,this._selectedIndex=0}ngOnInit(){}handleResponseSelected(t,i,s){s===this.questions.length-1||this.emitResponse(t,i)}handleAdvanceSelected(t,i,s){this.emitResponse(t,i)}handleNextClick(){this.nextQuestion()}handleBackClick(){this.prevQuestion()}nextQuestion(){const t=Math.max(0,this.questions.length-1);this.selectedIndex=Math.min(t,this.selectedIndex+1)}prevQuestion(){this.selectedIndex=Math.max(0,this.selectedIndex-1)}emitResponse(t,i){this.handleQuestionResponse.next({question:t,response:i})}static#e=this.\u0275fac=function(i){return new(i||n)};static#t=this.\u0275cmp=e.VBU({type:n,selectors:[["app-account-question-wizard"]],inputs:{questions:"questions",advanceLabel:"advanceLabel",responsive:"responsive"},outputs:{handleQuestionResponse:"handleQuestionResponse"},standalone:!1,decls:5,vars:2,consts:[[1,"questions"],["app-button","","buttonType","ghost","buttonTheme","light","buttonSize","md","class","questions__back","aria-label","Go Back",3,"click",4,"ngIf"],[1,"questions__content"],[1,"questions__list"],[3,"shown","question","other","advanceLabel","isLast","responsive","responseSelected","advanceSelected",4,"ngFor","ngForOf"],["app-button","","buttonType","ghost","buttonTheme","light","buttonSize","md","aria-label","Go Back",1,"questions__back",3,"click"],["icon","arrow-left","iconType","solid","iconPlacement","left","label","Go Back"],[3,"responseSelected","advanceSelected","shown","question","other","advanceLabel","isLast","responsive"]],template:function(i,s){1&i&&(e.j41(0,"div",0),e.DNE(1,kl,2,0,"button",1),e.j41(2,"div",2)(3,"div",3),e.DNE(4,Rl,1,6,"app-account-question",4),e.k0s()()()),2&i&&(e.R7$(),e.Y8G("ngIf",s.selectedIndex>0),e.R7$(3),e.Y8G("ngForOf",s.questions))},dependencies:[d.Sq,d.bT,j.Q,al,Un],styles:[".questions__back[_ngcontent-%COMP%]{margin-left:-16px}.questions__step[_ngcontent-%COMP%]{color:#8999b3;font-weight:500;font-size:.875rem;line-height:1.25rem}@media (max-width: 959px){.questions__step[_ngcontent-%COMP%]{font-size:.75rem;line-height:1rem}}"],changeDetection:0})}return n})();var Mn=c(33179),et=c(1929),lt=function(n,o,t,i){var r,s=arguments.length,a=s<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,t):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(n,o,t,i);else for(var u=n.length-1;u>=0;u--)(r=n[u])&&(a=(s<3?r(a):s>3?r(o,t,a):r(o,t))||a);return s>3&&a&&Object.defineProperty(o,t,a),a},pt=function(n,o){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(n,o)};const xl=["wizard"];class Te{constructor(o,t,i,s,a,r){this.authRoutingService=o,this.authService=t,this.store=i,this.router=s,this.activatedRoute=a,this.changeRef=r,this.breakPoints=m.m,this.selectedAccountSetting={},this.questionnaireStarted=!1,this.isReturningUser=!1,this.questions=[],this.ngUnsubscribe=new R.B}ngOnInit(){this.initQuestionnaire()}ngOnDestroy(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()}initQuestionnaire(){const o=this.authService.checkProfileIncomplete();(0,me.z)([this.userProfile$,o,this.organizationSettings$,this.accountSettings$]).pipe((0,B.p)(([t])=>!(0,C.isNil)(t)),(0,h.Q)(this.ngUnsubscribe)).subscribe(([t,i,s,a])=>{const{is_new_user:r,is_team_user:u}=i.messageData;this.completeProfileMessage=i,this.isReturningUser=!0!==r,this.intent=u?ge.Team:ge.Individual;const v=this.activatedRoute.snapshot.queryParams.question,T="true"===this.activatedRoute.snapshot.queryParams.welcome;this.selectedAccountSetting=(0,Se.j)([...a,...s]);const M=(0,C.get)(this.selectedAccountSetting,"account_purpose.value",b.j.PersonalUse),y=(0,C.get)(this.selectedAccountSetting,"account_field.value");this.questions=this.getCustomQueryQuestions(t,v,M,y,this.isReturningUser,T),this.changeRef.markForCheck()})}handleQuestionResponse(o){const{question:t,response:i}=o,s=t.account_setting,a=this.activatedRoute.snapshot.queryParams.question,r="true"===this.activatedRoute.snapshot.queryParams.welcome,u=this.store.selectSnapshot(g.k.getUserProfile);this.questionnaireStarted=!0,"account_purpose"===t.account_setting&&(this.selectedAccountSetting={}),this.selectedAccountSetting[s]=i;const v=(0,C.get)(this.selectedAccountSetting,"account_purpose.value"),T=(0,C.get)(this.selectedAccountSetting,"account_field.value"),M=this.isReturningUser;if(this.questions.length>1)if(a)this.questions=this.getCustomQueryQuestions(u,a,v,T,this.isReturningUser,r);else if(this.questions.length>1)switch(v){case b.j.PersonalUse:this.questions=this.getPersonalUseQuestions(M);break;case b.j.Education:this.questions=this.getEducationQuestions(M);break;case b.j.Business:this.questions=this.getBusinessQuestions(M,T)}this.wizard.selectedIndex===this.questions.length-1?this.completeQuestionnaire():this.nextQuestion(),this.changeRef.markForCheck()}handleSkipClick(){this.completeQuestionnaire()}nextQuestion(){this.wizard.nextQuestion()}completeQuestionnaire(){const o=(0,Se.q)(this.selectedAccountSetting,!0);if(this.store.selectSnapshot(g.k.isDeveloperReferral)){const T=o.find(M=>"account_purpose"in M);T&&"account_purpose"in T&&(T.account_purpose={...T.account_purpose,description:"developer"})}this.updateAccountSettings(...o);const t=(0,C.get)(this.completeProfileMessage,"messageSeenId");(0,C.isNil)(t)||this.store.dispatch(new f.P(t));const i=this.store.selectSnapshot(S.q.hasOrganization),s=this.store.selectSnapshot(S.q.getOrganizationProfile),a=!(0,C.isNil)(s),r=this.store.selectSnapshot(g.k.getUserRole),u=(0,Ce._m)(r,K.y.InviteUsers);this.intent===ge.Team&&i&&u&&!a&&!this.isReturningUser?this.authRoutingService.navigateToTeamInvite(!0):this.router.navigate(["/"])}getPersonalUseQuestions(o){const t=this.store.selectSnapshot(g.k.getUserProfile);return[this.createPurposeQuestion(o),xe(t,b.j.PersonalUse,"",this.isReturningUser)]}getEducationQuestions(o){const t=this.store.selectSnapshot(g.k.getUserProfile);return[this.createPurposeQuestion(o),xe(t,b.j.Education,"",this.isReturningUser),ot(b.j.Education)]}getBusinessQuestions(o,t){const i=this.store.selectSnapshot(g.k.getUserProfile);return[this.createPurposeQuestion(o),ot(b.j.Business),xe(i,b.j.Business,t,this.isReturningUser)]}updateAccountSettings(...o){this.store.dispatch(new f.Kg({account_settings:o}))}createPurposeQuestion(o){return kt(this.store.selectSnapshot(g.k.getUserProfile),o)}getCustomQueryQuestions(o,t,i,s,a,r){switch(t){case et.w.Role:return[xe(o,i,s,a,r)];case et.w.Field:return[ot(i),xe(o,i,s,a)];default:return[...this.getPersonalUseQuestions(a)]}}static#e=this.\u0275fac=function(t){return new(t||Te)(e.rXU(Re.y),e.rXU(Mn.u),e.rXU(l.il),e.rXU(E.Ix),e.rXU(E.nX),e.rXU(e.gRc))};static#t=this.\u0275cmp=e.VBU({type:Te,selectors:[["app-account-questionnaire"]],viewQuery:function(t,i){if(1&t&&e.GBs(xl,7),2&t){let s;e.mGM(s=e.lsd())&&(i.wizard=s.first)}},standalone:!1,decls:4,vars:4,consts:[["wizard",""],[1,"account","theme-light"],[3,"handleQuestionResponse","questions","responsive"]],template:function(t,i){if(1&t){const s=e.RV6();e.j41(0,"div",1)(1,"app-account-question-wizard",2,0),e.nI1(3,"async"),e.bIt("handleQuestionResponse",function(r){return e.eBV(s),e.Njj(i.handleQuestionResponse(r))}),e.k0s()()}2&t&&(e.R7$(),e.Y8G("questions",i.questions)("responsive",e.bMT(3,2,i.horizontalBreakpoint$)<i.breakPoints.Medium))},dependencies:[Sl,d.Jj],encapsulation:2,changeDetection:0})}lt([(0,l.l6)(de.V.getHorizontalBreakpoint),pt("design:type",_.c)],Te.prototyp
1e,"horizontalBreakpoint$",void 0),lt([(0,l.l6)(g.k.getUserProfile),pt("design:type",_.c)],Te.prototype,"userProfile$",void 0),lt([(0,l.l6)(g.k.getUserAccountSettings),pt("design:type",_.c)],Te.prototype,"accountSettings$",void 0),lt([(0,l.l6)(S.q.getOrganizationAccountSettings),pt("design:type",_.c)],Te.prototype,"organizationSettings$",void 0);var wn=function(n,o,t,i){var r,s=arguments.length,a=s<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,t):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(n,o,t,i);else for(var u=n.length-1;u>=0;u--)(r=n[u])&&(a=(s<3?r(a):s>3?r(o,t,a):r(o,t))||a);return s>3&&a&&Object.defineProperty(o,t,a),a},An=function(n,o){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(n,o)};function Fl(n,o){if(1&n){const t=e.RV6();e.j41(0,"app-account-question",2),e.nI1(1,"async"),e.nI1(2,"async"),e.bIt("advanceSelected",function(s){e.eBV(t);const a=e.XpG();return e.Njj(a.handleResponseSelected(s))}),e.k0s()}if(2&n){const t=e.XpG();e.Y8G("shown",!0)("question",t.question)("other",t.question.other)("selectedResponse",t.selectedResponse)("advanceLabel","Continue")("advanceEnabled",!e.bMT(1,8,t.updating$))("isLast",!0)("responsive",e.bMT(2,10,t.horizontalBreakpoint$)<t.breakPoints.Medium)}}class Be{constructor(o,t,i,s,a,r,u){this.actions=o,this.authService=t,this.authRoutingService=i,this.store=s,this.activatedRoute=a,this.changeRef=r,this.snackBar=u,this.breakPoints=m.m,this.ngUnsubscribe=new R.B}ngOnInit(){this.initQuestions(),this.initProfileUpdateRedirect()}ngOnDestroy(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()}handleResponseSelected(o){this.updateAccountPurpose(o)}initQuestions(){const o=this.authService.checkProfileIncomplete();(0,me.z)([this.store.select(g.k.getUserProfile),o]).pipe((0,B.p)(([t])=>!(0,C.isNil)(t)),(0,h.Q)(this.ngUnsubscribe)).subscribe(([t,i])=>{const{is_new_user:s}=i.messageData;this.setQuestion(t,!0!==s,t.premium_account,t.organizations.length>0),this.changeRef.markForCheck()})}initProfileUpdateRedirect(){this.actions.pipe((0,l.xi)(f.ZD),(0,h.Q)(this.ngUnsubscribe)).subscribe(o=>{this.store.dispatch(new f.hs)}),this.actions.pipe((0,l.xi)(f.ZD),(0,J.Z)(()=>this.actions.pipe((0,l.xi)(f.Cy))),(0,h.Q)(this.ngUnsubscribe)).subscribe(o=>{this.handleProfileUpdateSuccess(o.userProfile)}),this.actions.pipe((0,l.xi)(f._h),(0,h.Q)(this.ngUnsubscribe)).subscribe(o=>{this.handleProfileUpdateFailure(o)})}setQuestion(o,t,i,s){const{queryParams:a}=this.activatedRoute.snapshot,r=a.purpose,u=a.intent,v=this.store.selectSnapshot(g.k.isDeveloperReferral);let T;T=s||v?ge.Team:i?ge.Individual:u,this.question=kt(o,t,T),this.selectedResponse=this.question.responses.find(M=>M.value===r),this.changeRef.markForCheck()}handleProfileUpdateSuccess(o){const i=(0,Se.j)(o.account_settings),s=(0,C.get)(i,"account_purpose.value",b.j.PersonalUse);this.authRoutingService.navigateToQuestionnaire(s===b.j.Business?et.w.Field:et.w.Role,!0,s)}handleProfileUpdateFailure(o){const t=(0,C.get)(o.error,"error.error.message","There was an error updating your profile.");this.snackBar.open(t)}updateAccountPurpose(o){this.store.dispatch(new f.Kg({account_settings:[{account_purpose:o}]}))}static#e=this.\u0275fac=function(t){return new(t||Be)(e.rXU(l.En),e.rXU(Mn.u),e.rXU(Re.y),e.rXU(l.il),e.rXU(E.nX),e.rXU(e.gRc),e.rXU(O.UG))};static#t=this.\u0275cmp=e.VBU({type:Be,selectors:[["app-account-creation"]],standalone:!1,decls:2,vars:1,consts:[["role","status",1,"account","theme-light"],[3,"shown","question","other","selectedResponse","advanceLabel","advanceEnabled","isLast","responsive","advanceSelected",4,"ngIf"],[3,"advanceSelected","shown","question","other","selectedResponse","advanceLabel","advanceEnabled","isLast","responsive"]],template:function(t,i){1&t&&(e.j41(0,"div",0),e.DNE(1,Fl,3,12,"app-account-question",1),e.k0s()),2&t&&(e.R7$(),e.Y8G("ngIf",i.question))},dependencies:[d.bT,Un,d.Jj],encapsulation:2,changeDetection:0})}wn([(0,l.l6)(g.k.getProfileUpdating),An("design:type",_.c)],Be.prototype,"updating$",void 0),wn([(0,l.l6)(de.V.getHorizontalBreakpoint),An("design:type",_.c)],Be.prototype,"horizontalBreakpoint$",void 0);var jl=c(10123);function Il(n,o){if(1&n){const t=e.RV6();e.j41(0,"button",5),e.bIt("click",function(){e.eBV(t);const s=e.XpG();return e.Njj(s.handleBackClick())}
1),e.j41(1,"div",6),e.nrm(2,"app-icon",7),e.j41(3,"div",8),e.EFF(4,"Back"),e.k0s()()()}}let Dl=(()=>{class n{constructor(t,i,s,a){this.store=t,this.router=i,this.activatedRoute=s,this.changeRef=a,this.ngUnsubscribe=new R.B,this.store.dispatch(new f.hs)}ngOnInit(){this.initRouteHandling()}ngOnDestroy(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()}initRouteHandling(){(0,G.h)(this.activatedRoute.url,this.router.events.pipe((0,B.p)(t=>t instanceof E.wF))).pipe((0,h.Q)(this.ngUnsubscribe)).subscribe(()=>{this.returnTo=this.activatedRoute.snapshot.queryParams.returnTo,this.changeRef.markForCheck()})}handleBackClick(){this.router.navigateByUrl(this.returnTo)}static#e=this.\u0275fac=function(i){return new(i||n)(e.rXU(l.il),e.rXU(E.Ix),e.rXU(E.nX),e.rXU(e.gRc))};static#t=this.\u0275cmp=e.VBU({type:n,selectors:[["app-account-workflow-master"]],standalone:!1,decls:6,vars:1,consts:[[1,"master"],[1,"master__art"],[1,"master__content-wrapper","flex","flex-col","items-center","flex-auto"],["class","master__nav","app-button","","buttonType","ghost","buttonTheme","light","buttonSize","md",3,"click",4,"ngIf"],[1,"master__content-container","flex","flex-col","justify-center","items-stretch","flex-auto"],["app-button","","buttonType","ghost","buttonTheme","light","buttonSize","md",1,"master__nav",3,"click"],[1,"flex","flex-row"],["icon","arrow-left"],[1,"ml-2"]],template:function(i,s){1&i&&(e.j41(0,"div",0),e.nrm(1,"app-login-art",1),e.j41(2,"div",2),e.DNE(3,Il,5,0,"button",3),e.j41(4,"div",4),e.nrm(5,"router-outlet"),e.k0s()()()),2&i&&(e.R7$(3),e.Y8G("ngIf",s.returnTo))},dependencies:[d.bT,E.n3,j.Q,N.R,jl.Y],styles:[".master[_ngcontent-%COMP%]{background:#fff;display:flex;flex-direction:row;height:100vh;width:100%}.master__art[_ngcontent-%COMP%]{flex-basis:480px}.master__content-wrapper[_ngcontent-%COMP%]{overflow:auto;margin:auto;padding:40px;height:100%}.master__content-container[_ngcontent-%COMP%]{width:100%;max-width:560px;padding:12px}.master__nav[_ngcontent-%COMP%]{align-self:flex-start;margin:0 20px 24px 0}@media (max-width: 959px){.master__art[_ngcontent-%COMP%]{display:none}}@media (max-width: 480px){.master__content-wrapper[_ngcontent-%COMP%]{padding:20px}.master__content-container[_ngcontent-%COMP%]{padding:4px}}"],changeDetection:0})}return n})();var El=c(565),Gn=function(n,o,t,i){var r,s=arguments.length,a=s<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,t):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(n,o,t,i);else for(var u=n.length-1;u>=0;u--)(r=n[u])&&(a=(s<3?r(a):s>3?r(o,t,a):r(o,t))||a);return s>3&&a&&Object.defineProperty(o,t,a),a},Pn=function(n,o){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(n,o)};function Ul(n,o){if(1&n){const t=e.RV6();e.j41(0,"app-team-invite",3),e.nI1(1,"async"),e.bIt("inviteSent",function(){e.eBV(t);const s=e.XpG();return e.Njj(s.handleInviteComplete())})("inviteCancelled",function(){e.eBV(t);const s=e.XpG();return e.Njj(s.handleInviteComplete())}),e.k0s()}if(2&n){const t=e.XpG();e.Y8G("organization",e.bMT(1,2,t.organization$))("layout","block")}}class Ve{constructor(o,t,i){this.store=o,this.router=t,this.authRoutingService=i,this.ngUnsubscribe=new R.B}ngOnInit(){this.userProfile$.pipe((0,B.p)(o=>!(0,C.isNil)(o)),(0,ue.s)(1),(0,h.Q)(this.ngUnsubscribe)).subscribe(o=>{o.organizations&&o.organizations.length>0||this.handleInviteComplete()})}ngOnDestroy(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()}handleInviteComplete(){this.store.selectSnapshot(g.k.isDeveloperReferral)?this.authRoutingService.navigateToDeveloperWelcome():this.router.navigate(["/explore"])}static#e=this.\u0275fac=function(t){return new(t||Ve)(e.rXU(l.il),e.rXU(E.Ix),e.rXU(Re.y))};static#t=this.\u0275cmp=e.VBU({type:Ve,selectors:[["app-team-invite-page"]],standalone:!1,decls:7,vars:3,consts:[[1,"text-3xl","font-semibold"],[1,"text-base","mt-3","mb-10"],["sentText","Send invites","cancelText","Skip this step",3,"organization","layout","inviteSent","inviteCancelled",4,"ngIf"],["sentText","Send invites","cancelText","Skip this step",3,"inviteSent","invite
1Cancelled","organization","layout"]],template:function(t,i){1&t&&(e.j41(0,"div")(1,"h3",0),e.EFF(2,"Invite members to join your team"),e.k0s(),e.j41(3,"p",1),e.EFF(4,"If you'd like, you can always send invites later."),e.k0s(),e.DNE(5,Ul,2,4,"app-team-invite",2),e.nI1(6,"async"),e.k0s()),2&t&&(e.R7$(5),e.Y8G("ngIf",e.bMT(6,1,i.organization$)))},dependencies:[d.bT,El.G,d.Jj],encapsulation:2,changeDetection:0})}Gn([(0,l.l6)(g.k.getUserProfile),Pn("design:type",_.c)],Ve.prototype,"userProfile$",void 0),Gn([(0,l.l6)(S.q.getOrganization),Pn("design:type",_.c)],Ve.prototype,"organization$",void 0);var Ml=c(84412);function Gl(n,o){if(1&n&&(e.j41(0,"a",3),e.nI1(1,"async"),e.EFF(2," Take me to the developer site "),e.k0s()),2&n){const t=e.XpG();e.Y8G("href",e.bMT(1,1,t.developerPortalSignInUrl$),e.B4B)}}class tt{constructor(o){this.store=o,this.ngUnsubscribe=new R.B,this.developerPortalSignInUrl$=new Ml.t("")}ngOnInit(){this.store.dispatch(new f.hs(!0)),this.userProfile$.pipe((0,h.Q)(this.ngUnsubscribe),(0,B.p)(o=>!(0,C.isNil)(o))).subscribe(o=>{this.developerPortalSignInUrl$.next(o.developer_portal_signin_url)})}ngOnDestroy(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()}static#e=this.\u0275fac=function(t){return new(t||tt)(e.rXU(l.il))};static#t=this.\u0275cmp=e.VBU({type:tt,selectors:[["app-team-developer"]],standalone:!1,decls:8,vars:6,consts:[[1,"text-3xl","font-semibold"],[1,"text-base","mt-3","mb-10"],["class","button button--primary button--large mb-5",3,"href",4,"ngIf"],[1,"button","button--primary","button--large","mb-5",3,"href"]],template:function(t,i){if(1&t&&(e.j41(0,"div")(1,"div",0),e.EFF(2),e.nI1(3,"async"),e.k0s(),e.j41(4,"div",1),e.EFF(5," Now that you've set up your account, navigate to the developer site to finish activating your developer access and begin building custom 3D experiences. "),e.k0s(),e.DNE(6,Gl,3,3,"a",2),e.nI1(7,"async"),e.k0s()),2&t){let s;e.R7$(2),e.SpI("Welcome ",null==(s=e.bMT(3,2,i.userProfile$))?null:s.first_name,"!"),e.R7$(4),e.Y8G("ngIf",e.bMT(7,4,i.developerPortalSignInUrl$))}},dependencies:[d.bT,d.Jj],encapsulation:2,changeDetection:0})}!function(n,o,t,i){var r,s=arguments.length,a=s<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,t):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(n,o,t,i);else for(var u=n.length-1;u>=0;u--)(r=n[u])&&(a=(s<3?r(a):s>3?r(o,t,a):r(o,t))||a);s>3&&a&&Object.defineProperty(o,t,a)}([(0,l.l6)(g.k.getUserProfile),function(n,o){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata("design:type",o)}(0,_.c)],tt.prototype,"userProfile$",void 0);var Pl=c(40238),$n=c(15504);function Ol(n,o){if(1&n&&(e.j41(0,"h1",4),e.EFF(1),e.k0s()),2&n){const t=e.XpG();e.R7$(),e.SpI(" ",t.headerText," ")}}function Bl(n,o){if(1&n){const t=e.RV6();e.j41(0,"button",5),e.bIt("click",function(){e.eBV(t);const s=e.XpG();return e.Njj(s.handleContinueClick())}),e.EFF(1),e.k0s()}if(2&n){const t=e.XpG();e.Y8G("buttonType",t.skip?"tertiary":"primary")("uppercase",!1),e.R7$(),e.SpI(" ",t.buttonText," ")}}class nt{constructor(o,t){this.authRoutingService=o,this.storageService=t,this.skip=!0,this.headerText="",this.buttonText="",this.requestOrganizationsText="It looks like of some of your teammates are already using the BioDigital Human. Submit a request to start collaborating.",this.joinRequestText="Your request has been sent to the team's administrators. While you wait for approval, continue to the next step to start exploring the BioDigital Human on your own."}ngOnInit(){this.storageService.setLocalItem($n.UT.UserJoinPromptSeen,!0)}handleContinueClick(){this.skip?this.authRoutingService.navigateToWorkflow():this.authRoutingService.navigateToQuestionnaire(et.w.Role,!1,b.j.PersonalUse)}handlePendingJoinRequest(o){this.skip=void 0===o,this.buttonText=this.skip?"No thanks":"Continue",this.headerText=this.skip?"We found your team":"Request sent"}handleRequestOrganizationsSuccess(o){0===o.length&&this.authRoutingService.navigateToWorkflow()}static#e=this.\u0275fac=function(t){return new(t||nt)(e.rXU(Re.y),e.rXU($n.n$))};static#t=this.\u0275cmp=e.VBU({type:nt,selectors:[["app-team-join-page"]],standalone:!1,decls:6,vars:8,consts:[[1,"team-join","flex","flex-col"],["class","team-join__title mt-4 text-3xl font-semibold",4,"ngIf"],["theme","light",1,"mb-4",3,"pen
1dingJoinRequestSuccess","requestOrganizationsSuccess","requestOrganizationsText","joinRequestText"],["class","w-full","app-button","","buttonTheme","light","buttonSize","xl",3,"buttonType","uppercase","click",4,"ngIf"],[1,"team-join__title","mt-4","text-3xl","font-semibold"],["app-button","","buttonTheme","light","buttonSize","xl",1,"w-full",3,"click","buttonType","uppercase"]],template:function(t,i){1&t&&(e.j41(0,"div",0),e.DNE(1,Ol,2,1,"h1",1),e.nI1(2,"async"),e.j41(3,"app-team-join",2),e.bIt("pendingJoinRequestSuccess",function(a){return i.handlePendingJoinRequest(a)})("requestOrganizationsSuccess",function(a){return i.handleRequestOrganizationsSuccess(a)}),e.k0s(),e.DNE(4,Bl,2,3,"button",3),e.nI1(5,"async"),e.k0s()),2&t&&(e.R7$(),e.Y8G("ngIf",!1===e.bMT(2,4,i.requesting$)),e.R7$(2),e.Y8G("requestOrganizationsText",i.requestOrganizationsText)("joinRequestText",i.joinRequestText),e.R7$(),e.Y8G("ngIf",!1===e.bMT(5,6,i.requesting$)))},dependencies:[d.bT,j.Q,Tn.H,d.Jj],styles:[".team-join__title[_ngcontent-%COMP%]{color:#0c1726}"],changeDetection:0})}function Vl(n,o){1&n&&e.nrm(0,"app-spinner",10)}!function(n,o,t,i){var r,s=arguments.length,a=s<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,t):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(n,o,t,i);else for(var u=n.length-1;u>=0;u--)(r=n[u])&&(a=(s<3?r(a):s>3?r(o,t,a):r(o,t))||a);s>3&&a&&Object.defineProperty(o,t,a)}([(0,l.l6)(re.e.getRequesting),function(n,o){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata("design:type",o)}(0,_.c)],nt.prototype,"requesting$",void 0);let zl=(()=>{class n{constructor(t,i,s,a,r){this.store=t,this.actions=i,this.formBuilder=s,this.dialogRef=a,this.snackbar=r,this.organization=(0,l.Lt)(S.q.getOrganization),this.generating=(0,e.vPA)(!1),this.form=this.formBuilder.group({confirm:[!1,p.k0.requiredTrue]}),this.initActionListeners()}initActionListeners(){this.actions.pipe((0,l.xi)(U.$v),(0,$.pQ)()).subscribe(()=>{this.snackbar.open("New VR registration code generated."),this.dialogRef.close()}),this.actions.pipe((0,l.xi)(U.aR),(0,$.pQ)()).subscribe(()=>{this.snackbar.open("Failed to generate registration code."),this.generating.set(!1)})}handleCancelClick(){this.dialogRef.close()}handleGenerateCodeClick(){this.generating.set(!0),this.store.dispatch(new U.Ms(this.organization().id))}static#e=this.\u0275fac=function(i){return new(i||n)(e.rXU(l.il),e.rXU(l.En),e.rXU(p.ok),e.rXU(A.ce),e.rXU(O.UG))};static#t=this.\u0275cmp=e.VBU({type:n,selectors:[["app-generate-xr-code-dialog"]],decls:22,vars:3,consts:[["app-dialog-title",""],["app-dialog-content","",3,"formGroup"],[1,"text-sm"],[1,"my-4","list-disc","list-inside"],[1,"font-semibold"],["formControlName","confirm"],[1,"text-xs","whitespace-normal"],["app-dialog-actions",""],["app-button","","buttonTheme","light","buttonType","tertiary",3,"click"],["app-button","","buttonType","primary","buttonTheme","light",3,"click","disabled"],["size","sm","color","white",1,"mr-1"]],template:function(i,s){1&i&&(e.j41(0,"h1",0),e.EFF(1,"Generate New VR Code"),e.k0s(),e.j41(2,"div",1)(3,"div",2)(4,"div"),e.EFF(5,"Are you sure you want to generate a new VR registration code?"),e.k0s(),e.j41(6,"ul",3)(7,"li"),e.EFF(8,"This action "),e.j41(9,"span",4),e.EFF(10,"cannot be undone."),e.k0s()(),e.j41(11,"li"),e.EFF(12,"Previously shared registration codes will be invalid."),e.k0s()(),e.j41(13,"mat-checkbox",5)(14,"span",6),e.EFF(15,"I confirm that I want to generate a new VR registration code."),e.k0s()()()(),e.j41(16,"div",7)(17,"button",8),e.bIt("click",function(){return s.handleCancelClick()}),e.EFF(18," Cancel "),e.k0s(),e.j41(19,"button",9),e.bIt("click",function(){return s.handleGenerateCodeClick()}),e.DNE(20,Vl,1,0,"app-spinner",10),e.EFF(21," Yes, generate "),e.k0s()()),2&i&&(e.R7$(2),e.Y8G("formGroup",s.form),e.R7$(17),e.Y8G("disabled",s.form.invalid||s.generating(
1)),e.R7$(),e.vxM(s.generating()?20:-1))},dependencies:[ve.So,p.X1,p.BC,p.cb,p.j4,p.JD,at.G,j.Q,Y.t,Z.U,ee.M,te.r,ne.x],encapsulation:2})}return n})();var ye=c(39537),Nn=c(75275);const On={label:"Device Name (A-Z)",fields:["device_name"],dataTest:"deviceNameAscending",ascending:!0},Xl=[On,{label:"Device Name (Z-A)",fields:["device_name"],dataTest:"deviceNameDescending",ascending:!1},{label:"Registration Number (A-Z)",fields:["device_registration_num"],dataTest:"registrationNumberAscending",ascending:!0},{label:"Registration Number (Z-A)",fields:["device_registration_num"],dataTest:"registrationNumberDescending",ascending:!1},{label:"Registration Date",fields:["device_registration_createdate"],ascending:!1}];function Ll(n,o){1&n&&(e.j41(0,"div",7),e.EFF(1,"Device Name is required."),e.k0s())}function Yl(n,o){1&n&&e.nrm(0,"app-spinner",16)}let Ql=(()=>{class n{get deviceName(){return this.form.get("deviceName")}get registrationNumber(){return this.form.get("registrationNumber")}get registrationDate(){return this.form.get("registrationDate")}get deviceDescription(){return this.form.get("deviceDescription")}constructor(t,i,s,a,r,u){this.store=t,this.snackbar=i,this.actions=s,this.dialogRef=a,this.formBuilder=r,this.data=u,this.organization=(0,l.Lt)(S.q.getOrganization),this.form=this.formBuilder.group({deviceName:["",p.k0.required],registrationNumber:[{value:"",disabled:!0},p.k0.required],registrationDate:[{value:"",disabled:!0},p.k0.required],deviceDescription:[""]}),this.saving=(0,e.vPA)(!1),this.xrDevice=this.data.xrDevice,this.form.setValue({deviceName:this.xrDevice.device_name,registrationNumber:this.xrDevice.device_registration_num,registrationDate:(0,d.Yq)(this.xrDevice.device_registration_createdate,"MM/dd/yyyy","en"),deviceDescription:this.xrDevice.device_desc}),this.initActionListeners()}initActionListeners(){this.actions.pipe((0,l.xi)(ye.jO),(0,$.pQ)()).subscribe(()=>{this.snackbar.open("VR device details updated."),this.dialogRef.close()}),this.actions.pipe((0,l.xi)(ye.EE),(0,$.pQ)()).subscribe(t=>{const i=(0,_e.u1)(t.error);this.snackbar.open(`Failed to update VR device details. ${i}`),this.saving.set(!1)})}handleSaveChangesClick(){this.saving.set(!0),this.store.dispatch(new ye.sL(this.organization().id,this.xrDevice.xrdevice_db_id,this.deviceName.value,this.deviceDescription.value))}close(){this.dialogRef.close()}static#e=this.\u0275fac=function(i){return new(i||n)(e.rXU(l.il),e.rXU(O.UG),e.rXU(l.En),e.rXU(A.ce),e.rXU(p.ok),e.rXU(A.Qs))};static#t=this.\u0275cmp=e.VBU({type:n,selectors:[["app-xr-device-edit-dialog"]],decls:19,vars:5,consts:[[1,"flex","items-center","justify-between"],["app-dialog-title",""],["app-button","","buttonType","ghost","buttonTheme","light","type","button","title","Close",1,"mr-3",3,"click"],["icon","times","size","lg"],["app-dialog-content","",3,"formGroup"],["theme","light","label","Device Name"],["type","text","appInput","","formControlName","deviceName"],["form-field-error","",1,"block","mt-1","text-sm"],["theme","light","label","Device Registration Number"],["type","text","appInput","","formControlName","registrationNumber"],["theme","light","label","Registration Date"],["type","text","appInput","","formControlName","registrationDate"],["theme","light","label","Description"],["formControlName","deviceDescription","appInput","","rows","4",1,"resize-none"],["app-dialog-actions",""],["app-button","","buttonType","primary",3,"click","disabled"],["size","sm","color","white",1,"mr-1"]],template:function(i,s){1&i&&(e.j41(0,"div",0)(1,"h1",1),e.EFF(2,"Edit Details"),e.k0s(),e.j41(3,"button",2),e.bIt("click",function(){return s.close()}),e.nrm(4,"app-icon",3),e.k0s()(),e.j41(5,"div",4)(6,"app-form-field",5),e.nrm(7,"input",6),e.DNE(8,Ll,2,0,"div",7),e.k0s(),e.j41(9,"app-form-field",8),e.nrm(10,"input",9),e.k0s(),e.j41(11,"app-form-field",10),e.nrm(12,"input",11),e.k0s(),e.j41(13,"app-form-field",12),e.nrm(14,"textarea",13),e.k0s()(),e.j41(15,"div",14)(16,"button",15),e.bIt("click",function(){return s.handleSaveChangesClick()}),e.DNE(17,Yl,1,0,"app-spinner",16),e.EFF(18," Save Changes "),e.k0s()()),2&i&&(e.R7$(3),e.BMQ("aria-label","Close"),e.R7$(2),e.Y8G("formGroup",s.form),e.R7$(3),e.vxM(s.deviceName.touched&&s.deviceName.invali
1d?8:-1),e.R7$(8),e.Y8G("disabled",s.form.invalid||s.saving()),e.R7$(),e.vxM(s.saving()?17:-1))},dependencies:[p.X1,p.me,p.BC,p.cb,p.j4,p.JD,L.k,fe.K,j.Q,Y.t,N.R,Z.U,ee.M,te.r,ne.x],encapsulation:2,changeDetection:0})}return n})(),Bn=(()=>{class n{constructor(){this.xrDevice=(0,e.hFB)()}static#e=this.\u0275fac=function(i){return new(i||n)};static#t=this.\u0275cmp=e.VBU({type:n,selectors:[["app-xr-device"]],inputs:{xrDevice:[1,"xrDevice"]},decls:9,vars:6,consts:[[1,"h-12","flex","flex-row","items-center","justify-between","flex-grow"],[1,"flex","flex-col"],[1,"text-sm"],[1,"text-gray-700","text-xs"],[1,"text-gray-400","text-xs"]],template:function(i,s){1&i&&(e.j41(0,"div",0)(1,"div",1)(2,"div",2),e.EFF(3),e.k0s(),e.j41(4,"div",3),e.EFF(5),e.k0s()(),e.j41(6,"div",4),e.EFF(7),e.nI1(8,"date"),e.k0s()()),2&i&&(e.R7$(3),e.JRh(s.xrDevice().device_name),e.R7$(2),e.JRh(s.xrDevice().device_registration_num),e.R7$(2),e.SpI(" ",e.i5U(8,3,s.xrDevice().device_registration_createdate,"MMMM d, y")," "))},dependencies:[d.vh],encapsulation:2,changeDetection:0})}return n})();const ql=(n,o)=>o.xrdevice_db_id;function Jl(n,o){if(1&n&&(e.j41(0,"div",3),e.nrm(1,"app-xr-device",8),e.k0s()),2&n){const t=o.$implicit;e.R7$(),e.Y8G("xrDevice",t)}}function Wl(n,o){1&n&&e.nrm(0,"app-spinner",7)}let Hl=(()=>{class n{constructor(t,i,s,a,r){this.store=t,this.snackbar=i,this.actions=s,this.dialogRef=a,this.data=r,this.organization=(0,l.Lt)(S.q.getOrganization),this.deleting=(0,e.vPA)(!1),this.xrDevices=this.data.xrDevices,this.count=this.xrDevices.length,this.deviceNoun=1===this.count?"device":"devices",this.userNoun=1===this.count?"user":"users",this.title=1===this.count?"Remove VR Device":`Remove ${this.count} VR Devices`,this.initActionListeners()}initActionListeners(){this.actions.pipe((0,l.xi)(ye.yD),(0,$.pQ)()).subscribe(()=>{this.snackbar.open(`${this.count} ${this.deviceNoun} removed from your team.`),this.dialogRef.close(!0)}),this.actions.pipe((0,l.xi)(ye.ZN),(0,$.pQ)()).subscribe(t=>{const i=(0,_e.u1)(t.error);this.snackbar.open(`Failed to remove VR ${this.deviceNoun}. ${i}`),this.deleting.set(!1)})}handleRemoveClick(){this.deleting.set(!0),this.store.dispatch(new ye.hX(this.organization().id,this.xrDevices.map(t=>t.xrdevice_db_id)))}close(){this.dialogRef.close()}static#e=this.\u0275fac=function(i){return new(i||n)(e.rXU(l.il),e.rXU(O.UG),e.rXU(l.En),e.rXU(A.ce),e.rXU(A.Qs))};static#t=this.\u0275cmp=e.VBU({type:n,selectors:[["app-xr-device-remove-dialog"]],decls:13,vars:6,consts:[["app-dialog-title",""],["app-dialog-content",""],[1,"pb-3","text-sm"],[1,"h-[52px]","my-1","p-2","flex","flex-row","items-center"],["app-dialog-actions",""],["app-button","","buttonType","ghost","buttonTheme","light",3,"click"],["app-button","","buttonType","primary",3,"click","disabled"],["size","sm","color","white",1,"mr-1"],[1,"grow",3,"xrDevice"]],template:function(i,s){1&i&&(e.j41(0,"h1",0),e.EFF(1),e.k0s(),e.j41(2,"div",1)(3,"div",2),e.EFF(4),e.k0s(),e.Z7z(5,Jl,2,1,"div",3,ql),e.k0s(),e.j41(7,"div",4)(8,"button",5),e.bIt("click",function(){return s.close()}),e.EFF(9,"Cancel"),e.k0s(),e.j41(10,"button",6),e.bIt("click",function(){return s.handleRemoveClick()}),e.DNE(11,Wl,1,0,"app-spinner",7),e.EFF(12," Remove "),e.k0s()()),2&i&&(e.R7$(),e.JRh(s.title),e.R7$(3),e.E5c(" Are you sure you want to remove the following ",s.deviceNoun," from your team? The ",s.userNoun," will be logged out and will be required to sign in or register the ",s.deviceNoun," again. "),e.R7$(),e.Dyx(s.xrDevices),e.R7$(5),e.Y8G("disabled",0===s.xrDevices.length||s.deleting()),e.R7$(),e.vxM(s.deleting()?11:-1))},dependencies:[Y.t,j.Q,Bn,Z.U,ee.M,te.r,ne.x],encapsulation:2,changeDetection:0})}return n})();const Kl=["list"];function Zl(n,o){1&n&&e.EFF(0," an unlimited number of ")}function ep(n,o){if(1&n&&e.EFF(0),2&n){const t=e.XpG(2);e.SpI(" up to ",t.registrationLimit()," ")}}function tp(n,o){if(1&n&&(e.EFF(0," Your team can register "),e.DNE(1,Zl,1,0)(2,ep,1,1),e.EFF(3," devices using the registration code to skip sign in. ")),2&n){const t=e.XpG();e.R7$(),e.vxM(0===t.registrationLimit()?1:2)}}function np(n,o){1&n&&e.EFF(0," Contact your team administrator to register your device. ")}function ip(n,o){if(1&n&&(e.j41(0,"app-message-toggle",6),e.EFF(1),e.k0s()),2&n){const t=e.XpG(2);e.R7$(),e.SpI(' The code "',t.registrationCode(),'" is expired. Generate a new code to share with your users. ')}}function op(n,o){1&n&&e.EFF(0," expired ")}function sp(n,o){1&n&&e.EFF(0," expires ")}function ap(n,o){if(1&n){const t=e.RV6();e.j41(0,"div",5),e.EFF(1,"Registration Code"),e.k0s(),e.DNE(2,ip,2,1,"app-message-toggle",6),e.j41(3,"div",7),e.EFF(4," Share this code with users so they can register their device. This "),e.j41(5,"span",8),e.EFF(6," code "),e.DNE(7,op,1,0)(8,sp,1,0),e.EFF(9),e.k0s()(),e.j41(10,"div",9),e.nrm(11,"input",10),e.j41(12,"button",11),e.bIt("click",function(s){e.eBV(t);const a=e.XpG();return e.Njj(a.handleCopyCodeClick(s))}
1),e.EFF(13," Copy Registration Code "),e.k0s()(),e.j41(14,"div",12),e.EFF(15," You can generate a new VR registration code if you no longer wish to use the old one. The code will be valid for 14 days. "),e.k0s(),e.j41(16,"button",13),e.bIt("click",function(){e.eBV(t);const s=e.XpG();return e.Njj(s.handleGenerateCodeClick())}),e.EFF(17," Generate New Registration Code "),e.k0s()}if(2&n){const t=e.XpG();e.R7$(2),e.vxM(t.registractionCodeExpired()?2:-1),e.R7$(5),e.vxM(t.registractionCodeExpired()?7:8),e.R7$(2),e.SpI(" on ",t.registrationCodeExpirationDate(),". "),e.R7$(),e.AVh("opacity-60",t.registractionCodeExpired()),e.R7$(),e.Y8G("readonly",!0)("value",t.registrationCode()),e.R7$(),e.Y8G("disabled",t.registractionCodeExpired())}}function rp(n,o){1&n&&e.nrm(0,"app-spinner",15)}function cp(n,o){if(1&n&&(e.j41(0,"div",18),e.EFF(1," Share your registration code "),e.j41(2,"span",8),e.EFF(3),e.k0s(),e.EFF(4," so users can skip login and start using the VR app faster. "),e.k0s()),2&n){const t=e.XpG(3);e.R7$(3),e.JRh(t.registrationCode())}}function lp(n,o){if(1&n&&(e.j41(0,"div",16)(1,"div",8),e.EFF(2,"There are no registered devices."),e.k0s(),e.DNE(3,cp,5,1,"div",18),e.k0s()),2&n){const t=e.XpG(2);e.R7$(3),e.vxM(t.canManageRegisteredDevices()?3:-1)}}function pp(n,o){1&n&&e.nrm(0,"app-xr-device",23),2&n&&e.Y8G("xrDevice",o.$implicit)}function up(n,o){if(1&n){const t=e.RV6();e.j41(0,"app-actionable-list",17,0),e.DNE(2,pp,1,1,"ng-template",null,1,e.C5r),e.j41(4,"mat-menu",null,2)(6,"button",19),e.bIt("click",function(){e.eBV(t);const s=e.sdS(1);return e.Njj(s.deselectAllItems())}),e.EFF(7,"Clear Selection"),e.k0s(),e.j41(8,"button",20),e.bIt("click",function(){e.eBV(t);const s=e.sdS(1);return e.Njj(s.selectAllItems())}),e.EFF(9," Select All "),e.k0s(),e.nrm(10,"mat-divider"),e.j41(11,"button",19),e.bIt("click",function(){e.eBV(t);const s=e.XpG(2);return e.Njj(s.removeSelectedXrDevices())}),e.EFF(12,"Remove Selected Devices"),e.k0s()(),e.j41(13,"mat-menu",null,3)(15,"button",21),e.bIt("click",function(){e.eBV(t);const s=e.XpG(2);return e.Njj(s.editSelectedXrDevice())}),e.EFF(16," Edit Details "),e.k0s(),e.nrm(17,"mat-divider"),e.j41(18,"button",22),e.bIt("click",function(){e.eBV(t);const s=e.XpG(2);return e.Njj(s.removeSelectedXrDevices())}),e.EFF(19," Remove "),e.k0s()()()}if(2&n){const t=e.XpG(2);e.Y8G("sections",t.sections())("itemSize",72),e.R7$(8),e.Y8G("disabled",t.allItemsSelected)}}function dp(n,o){if(1&n&&(e.nrm(0,"mat-divider",14),e.j41(1,"div",8),e.EFF(2,"Registered Devices"),e.k0s(),e.DNE(3,rp,1,0,"app-spinner",15)(4,lp,4,1,"div",16)(5,up,20,3,"app-actionable-list",17)),2&n){const t=e.XpG();e.R7$(3),e.vxM(t.loadingXrDevices()?3:0===t.xrDevices().length?4:5)}}let Vn=(()=>{class n{get allItemsSelected(){return this.list?.allItemsSelected()}constructor(t,i,s,a){this.store=t,this.clipboardService=i,this.snackbar=s,this.dialog=a,this.userRole=(0,l.Lt)(g.k.getUserRole),this.organization=(0,l.Lt)(S.q.getOrganization),this.xrDevicesSettings=(0,l.Lt)(S.q.getOrganizationXRDevicesSettings),this.xrDevices=(0,l.Lt)(Nn.f.getXrDevices),this.loadingXrDevices=(0,l.Lt)(Nn.f.getLoadingXrDevices),this.canViewRegisteredDevices=(0,e.EWP)(()=>{const r=this.userRole();return(0,Ce._m)(r,K.y.ViewRegisteredDevices)}),this.canManageRegisteredDevices=(0,e.EWP)(()=>{const r=this.userRole();return(0,Ce._m)(r,K.y.ManageRegisteredDevices)}),this.registrationLimit=(0,e.EWP)(()=>this.xrDevicesSettings()?.device_registration_limit),this.registrationCode=(0,e.EWP)(()=>this.xrDevicesSettings()?.device_registration_code),this.registractionCodeExpired=(0,e.EWP)(()=>this.xrDevicesSettings()?.device_registration_code_is_expired),this.registrationCodeExpirationDate=(0,e.EWP)(()=>{const r=this.xrDevicesSettings();if(r?.device_registration_code_expirationdate)return(0,d.Yq)(r.device_registration_code_expirationdate,"MM/dd/yyyy","en")}),this.sections=(0,e.EWP)(()=>[{title:"Devices",items:this.xrDevices(),itemsLoaded:!this.loadingXrDevices(),searchProperties:["device_name","device_registration_num"],trackProperty:"xrdevice_db_id",sort:{label:"Sort XR Devices",options:Xl,initial:On},selectable:this.canManageRegisteredDevices(),shown:!0}]),this.initXrDevices()}initXrDevices(){this.store.dispatch(new ye.rg),(0,e.QZP)(()=>{const t=this.organization();this.store.dispatch(new ye.Qm(t.id))})}handleCopyCodeClick(t){var i=this;return(0,Vt.A)(function*(){t.preventDefault();const a=(yield(0,zt._)(i.clipboardService.copyToClipboard(i.registrationCode(),"text")))?"Registration code copied to your clipboard.":"There was a problem copying to the clipboard.";i.snackbar.open(a)})()}handleGenerateCodeClick(){this.dialog.openCustom(zl)}editSelectedXrDevice(){this.dialog.openCustom(Ql,{width:"640px",data:{xrDevice:this.list.selectedItems[0]}})}removeSelectedXrDevices(){var t=this;return(0,Vt.A)(function*(){(yield(0,zt._)(t.dialog.openCustom(Hl,{width:"420px",data:{xrDevices:t.list.selectedItems}}).closed))&&t.list.deselectAllItems()})()}static#e=this.\u0275fac=function(i){return new(i||n)(e.rXU(l.il),e.rXU(Fn.W),e.rXU(O.UG),e.rXU(se.o))};static#t=this.\u0275cmp=e.VBU({type:n,selectors:[["app-vr-enabled"]],viewQuery:function(i,s){if(1&i&&e.GBs(Kl,5),2&i){let a;e.mGM(a=e.lsd())&&(s.list=a.first)}},decls:6,vars:3,consts:[["list",""],["itemTemplate",""],["actionsMenu",""],["listActionsMenu",""],[1,"text-sm"],[1,"mt-5","font-semibold"],["type","warning","icon","exclamation-triangle",1,"block","mt-3","mb-6"],[1,"mt-3","text-sm"],[1,"font-semibold"],[1,"flex","flex-col","gap-4","mt-3","sm:flex-row"],["type","text","appInput","","theme","light","size","md",1,"!w-40",3,"readonly","value"],["app-button","","buttonSize","md","buttonTheme","light","buttonType","primary",1,"!w-48",3,"click","disabled"],[1,"mt-6","text-sm"],["type","button","app-button","","buttonTheme","light","buttonType","tertiary",1,"block","mt-3",3,"click"],[1,"block","!my-9"],["size","xl","color","blue",1,"block","my-5"],[1,"flex","flex-col","items-center","gap-5","my-10","text-sm"],["ariaLabel","Registered Devices list","heightRule","calc(100vh - 680px)",1,"block","mb-2",3,"sections","itemSize"],[1,"text-center","max-w-96"],["mat-menu-item","",3,"click"],["mat-menu-item","",3,"click","disabled"],["mat-menu-item","","data-test","editXrDevicesButton",3,"click"],["mat-menu-item","","data-test","removeXrDevicesButton",3,"click"],[1,"flex","mr-2","grow",3,"xrDevice"]],template:function(i,s){1&i&&(e.j41(0,"div",4),e.EFF(1," Your team has access to VR. "),e.DNE(2,tp,4,1)(3,np,1,0),e.k0s(),e.DNE(4,ap,18,8)(5,dp,6,1)),2&i&&(e.R7$(2),e.vxM(s.canManageRegisteredDevices()?2:3),e.R7$(2),e.vxM(s.canManageRegisteredDevices()?4:-1),e.R7$(),e.vxM(s.canViewRegisteredDevices()?5:-1))},dependencies:[d.MD,p.X1,rt.GC,le.kk,le.fb,q.q,at.G,j.Q,L.k,Y.t,be.X,Bn,Wt],encapsulation:2,changeDetection:0})}return n})();function mp(n,o){1&n&&(e.j41(0,"a",7),e.EFF(1," Contact Us "),e.k0s())}function hp(n,o){1&n&&(e.j41(0,"div"),e.EFF(1," Interested in VR? Let your Administrator know! They can reach out to our team to learn more & schedule a live demo. "),e.k0s())}let gp=(()=>{class n{constructor(){this.isAdmin=(0,l.Lt)(g.k.isAdmin)}static#e=this.\u0275fac=function(i){return new(i||n)};static#t=this.\u0275cmp=e.VBU({type:n,selectors:[["app-vr-disabled"]],decls:38,vars:1,consts:[[1,"text-sm"],[1,"font-semibold"],[1,"flex","flex-col","gap-3","mt-5","text-sm"],[1,"flex"],["icon","check","size","lg",1,"mr-2"],[1,"flex","flex-col","items-start","gap-5","my-5","text-sm"],["t
1itle","BioDigital VR Overview Video","width","450","height","253","src",e.wXG`https://www.youtube.com/embed/2Ffhr1-P1ZE?si=SDrRVxQG2YEEapsh`,"frameborder","0","allow","accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share","referrerpolicy","strict-origin-when-cross-origin","allowfullscreen","",1,"max-w-full"],["href","https://www.biodigital.com/contact","target","_blank","app-button","","buttonType","secondary","buttonTheme","light"]],template:function(i,s){1&i&&(e.j41(0,"div",0),e.EFF(1," Step into a new dimension of anatomical education with "),e.j41(2,"span",1),e.EFF(3,"BioDigital VR"),e.k0s(),e.EFF(4,", our cutting-edge VR application designed for immersive learning.\n"),e.k0s(),e.j41(5,"div",2)(6,"h3"),e.EFF(7,"Why BioDigital VR?"),e.k0s(),e.j41(8,"div",3),e.nrm(9,"app-icon",4),e.j41(10,"div")(11,"span",1),e.EFF(12,"Immersive Learning:"),e.k0s(),e.EFF(13," Experience anatomy in life-size, 360\xb0 detail. "),e.k0s()(),e.j41(14,"div",3),e.nrm(15,"app-icon",4),e.j41(16,"div")(17,"span",1),e.EFF(18,"Interactive Features:"),e.k0s(),e.EFF(19," Manipulate structures, explore systems, and customize views. "),e.k0s()(),e.j41(20,"div",3),e.nrm(21,"app-icon",4),e.j41(22,"div")(23,"span",1),e.EFF(24,"Engage Your Students:"),e.k0s(),e.EFF(25," Captivate learners with hands-on exploration in a fully immersive environment. "),e.k0s()(),e.j41(26,"div",3),e.nrm(27,"app-icon",4),e.j41(28,"div")(29,"span",1),e.EFF(30,"Designed for Educators:"),e.k0s(),e.EFF(31," Control collaborative sessions and guide users through complex topics seamlessly. "),e.k0s()()(),e.j41(32,"div",5)(33,"div"),e.EFF(34,"Discover how BioDigital VR transforms anatomy education:"),e.k0s(),e.nrm(35,"iframe",6),e.DNE(36,mp,2,0,"a",7)(37,hp,2,0,"div"),e.k0s()),2&i&&(e.R7$(36),e.vxM(s.isAdmin()?36:37))},dependencies:[N.R,j.Q],encapsulation:2,changeDetection:0})}return n})();function fp(n,o){1&n&&e.nrm(0,"app-vr-enabled")}function _p(n,o){1&n&&e.nrm(0,"app-vr-disabled")}const vp=[{path:"questionnaire",redirectTo:"workflow/questionnaire"},{path:"workflow",component:Dl,canActivate:[V.q,oe.Y],data:{title:"Welcome"},children:[{path:"",component:Be,pathMatch:"full"},{path:"team",children:[{path:"invite",component:Ve,pathMatch:"full",data:{title:"Invite Members"}},{path:"developer",component:tt,pathMatch:"full",data:{title:"Ap
1p Configuration"}},{path:"join",component:nt,pathMatch:"full",data:{title:"Join Your Team"}}]},{path:"questionnaire",component:Te,pathMatch:"full",data:{title:"Questionnaire"}}]},{path:"",component:dt.m,canActivate:[V.q,oe.Y],data:{fixedHeight:!1},children:[{path:"",component:x,children:[{path:"",redirectTo:"/account/profile",pathMatch:"full"},{path:"profile",component:Ne,pathMatch:"full",data:{title:"Account"}},{path:"team",component:Oe,pathMatch:"full",data:{title:"Team"}},{path:"vr",component:(()=>{class n{constructor(){this.addOns=(0,l.Lt)(S.q.getOrganizationAddOns),this.hasVRAccess=(0,e.EWP)(()=>(0,Ce.XL)(this.addOns()))}static#e=this.\u0275fac=function(i){return new(i||n)};static#t=this.\u0275cmp=e.VBU({type:n,selectors:[["app-vr-page"]],standalone:!1,decls:3,vars:1,consts:[["label","Virtual Reality"]],template:function(i,s){1&i&&(e.j41(0,"app-account-panel",0),e.DNE(1,fp,1,0,"app-vr-enabled")(2,_p,1,0,"app-vr-disabled"),e.k0s()),2&i&&(e.R7$(),e.vxM(s.hasVRAccess()?1:2))},dependencies:[Vn,gp,P],encapsulation:2,changeDetection:0})}return n})(),pathMatch:"full",data:{title:"VR"}},{path:"settings",component:Ue,pathMatch:"full",data:{title:"Settings"}},{path:"internal",canLoad:[Pl.InternalDevGuard],canActivate:[V.q],loadChildren:()=>Promise.resolve().then(c.bind(c,40238)).then(n=>n.InternalDevModule)}]}]}];let zn=(()=>{class n{static#e=this.\u0275fac=function(i){return new(i||n)};static#t=this.\u0275mod=e.$C({type:n});static#n=this.\u0275inj=e.G2t({imports:[E.iI.forChild(vp),E.iI]})}return n})();var Cp=c(48177),Ht=c(17136),Tp=c(38014);let yp=(()=>{class n{static#e=this.\u0275fac=function(i){return new(i||n)};static#t=this.\u0275mod=e.$C({type:n});static#n=this.\u0275inj=e.G2t({imports:[d.MD,Ht.o]})}return n})();var Xn=c(90432),Ln=c(17286),kp=c(35286),Rp=c(55691),Sp=c(46046),xp=c(6736),Fp=c(83622);let jp=(()=>{class n{static#e=this.\u0275fac=function(i){return new(i||n)};static#t=this.\u0275mod=e.$C({type:n});static#n=this.\u0275inj=e.G2t({imports:[d.MD,rt.GC,p.YN,Ln.D,p.X1,Rp.M,Xn.C,Sp.j,Ht.o,xp.m,Fp.H,Q]})}return n})();var Ip=c(40746);let Dp=(()=>{class n{static#e=this.\u0275fac=function(i){return new(i||n)};static#t=this.\u0275mod=e.$C({type:n});static#n=this.\u0275inj=e.G2t({imports:[d.MD,zn,p.YN,p.X1,Cp.R,at.G,Xn.C,Ht.o,Ln.D,Tp.f,yp,rt.GC,kp.y2.forChild(),jp,Ip.R,Vn,Wt,At.n,zn]})}return n})()}}]);

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.