import{D as N,E as G,F as D,H as $,I as T,V as x,W as F}from"./chunk-INYFUTXB.js";import{Ag as O,Bg as k,Wj as W,Xj as C,a as j,b as y}from"./chunk-2GUKPKKM.js";import{g as I,h as A}from"./chunk-CUIDVWNH.js";import{b as w,c as U}from"./chunk-IBUDDWQO.js";import{R as b,Sd as h,T as d,_a as v,g as S,h as s,ha as m,ka as c,na as f,oa as B,ta as o,x as a,ya as p,za as n}from"./chunk-XJKQ67XR.js";import{a as g,b as l,e as u}from"./chunk-SZAW6ZBW.js";var z,E=u(()=>{f();h();z=(()=>{class i{constructor(){this.toggleWhatsNewSubject=new s({visible:!1,section:"releaseNotes"}),this._sectionToShow=null,this.toggleWhatsNewIconSubject=new s(!1)}get toggleWhatsNew$(){return this.toggleWhatsNewSubject.asObservable()}toggleWhatsNew(e=!0,t){this.toggleWhatsNewSubject.next({visible:e,section:t})}get toggleWhatsNewIcon$(){return this.toggleWhatsNewIconSubject.asObservable()}toggleWhatsNewIcon(e=!0){this.toggleWhatsNewIconSubject.next(e)}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275prov=o({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})()});var ie,M=u(()=>{h();C();k();B();y();f();T();F();G();h();U();A();ie=(()=>{class i extends j{constructor(e,t){super(e,t),this.assetsService=n(W),this.currentUserService=n(x),this.privateServerInformationChange=n(N).privateServerInformationChange,this.showOnboarding$=new s(!1),this.enableOnboarding=$(this.privateServerInformationChange.pipe(a(r=>r.enableOnboarding))),this.steps=v([]),this.save$=new S,this.loadSteps(),this.save$.pipe(b(1e3),D(),m(()=>this.updateOnBoardingStepDone())).subscribe()}toggleOnboarding(){if(this.enableOnboarding()){let e=this.currentUserService.webSettingsSnapshot.clone();e.hideOnboarding=!e.hideOnboarding,this.currentUserService.saveUserWebSettings(e)}else this.showOnboarding$.next(!this.showOnboarding$.value)}loadSteps(){this.getSteps().pipe(d(1)).subscribe(e=>this.steps.set(e))}getSteps(){return this.assetsService.GetAllOnBoardingStep().pipe(c(e=>this.handleGetApiResult(e)),a(e=>this.returnWhenSuccessful(e,()=>e.data)))}toggleStepIsDone(e){return this.steps.update(t=>t.map(r=>new O(r.id===e?l(g({},r),{isDone:!r.isDone}):r))),this.save$.next(),!!this.steps().find(t=>t.id===e)?.isDone}updateOnBoardingStepDone(){let e=this.steps().filter(t=>t.isDone).map(t=>t.id);return this.assetsService.UpdateOnBoardingStepDone(e).pipe(c(t=>this.handleGetApiResult(t)))}static{this.\u0275fac=function(t){return new(t||i)(p(w),p(I))}}static{this.\u0275prov=o({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})()});export{z as a,E as b,ie as c,M as d};
