import{ea as r,ia as c,qa as h}from"./chunk-5YITAGFP.js";import{h as m}from"./chunk-J2SLNJRR.js";var x=(()=>{class a{_document=c(h);init(){let t=this._document.getElementsByTagName("html")[0],e=localStorage.getItem("data-bs-theme");e?t.setAttribute("data-bs-theme",e):(localStorage.setItem("data-bs-theme","dark"),t.setAttribute("data-bs-theme","dark"))}toggleStatus(){let t=this._document.getElementsByTagName("html")[0];t.getAttribute("data-bs-theme")==="dark"?t.setAttribute("data-bs-theme","light"):t.setAttribute("data-bs-theme","dark"),localStorage.setItem("data-bs-theme",t.getAttribute("data-bs-theme")??"dark")}toggleStatusAnimated(t,e=400){return m(this,null,function*(){if(!this._document.startViewTransition){this.toggleStatus();return}yield this._document.startViewTransition(()=>{this.toggleStatus()}).ready;let{top:i,left:n,width:d,height:l}=t.getBoundingClientRect(),s=n+d/2,o=i+l/2,g=Math.hypot(Math.max(n,window.innerWidth-n),Math.max(i,window.innerHeight-i));this._document.documentElement.animate({clipPath:[`circle(0px at ${s}px ${o}px)`,`circle(${g}px at ${s}px ${o}px)`]},{duration:e,easing:"ease-in-out",pseudoElement:"::view-transition-new(root)"})})}get dataTheme(){return this._document.getElementsByTagName("html")[0].getAttribute("data-bs-theme")}static \u0275fac=function(e){return new(e||a)};static \u0275prov=r({token:a,factory:a.\u0275fac,providedIn:"root"})}return a})();export{x as a}; //# sourceMappingURL=chunk-K4T3TLTJ.js.map