import{c as i,d as p,p as l}from"./chunk-SPUEGBWO.js";import{k as n}from"./chunk-3JLWQSYQ.js";import{A as t,w as c}from"./chunk-ZVAMPSQU.js";import{a,j as o}from"./chunk-FB5LSH2R.js";var m=5e3,h={highResImages:!1,multipleImages:!1,expandablePreviews:!1,assistantMoreMessages:!1,moreUsageCredits:!1},T=(()=>{let e=class e{constructor(){this.serverActionsService=t(l),this.events=t(p),this.utilService=t(n),this.capabilities=a({},h),this.events.subscribe(i.Auth,()=>{this.updateCapabilities()}),this.updateCapabilities()}retry(){this.retryTimeout&&clearTimeout(this.retryTimeout),this.retryTimeout=setTimeout(()=>{this.updateCapabilities()},m)}updateCapabilities(){return o(this,null,function*(){if(!this.utilService.isLoggedIn()){this.capabilities=a({},h),this.events.publish(i.CapabilitiesUpdated);return}let r=yield this.serverActionsService.users.getMyCapabilities({401:()=>{}});if(!r)return this.retry();this.capabilities=r,this.events.publish(i.CapabilitiesUpdated)})}};e.\u0275fac=function(u){return new(u||e)},e.\u0275prov=c({token:e,factory:e.\u0275fac,providedIn:"root"});let s=e;return s})();export{T as a};
