import{E as m,J as a,R as p,Sa as w,W as h,be as T,h as o,ka as d,la as g,na as z,ta as c,wa as f,xa as x}from"./chunk-WL5U2YIT.js";import{e as k}from"./chunk-ADEKKGI2.js";var L,B,S=k(()=>{T();z();w();T();L=new f("breakpoint"),B=(()=>{let n=class n{constructor(e){this.sizeTable=["xs","sm","md","lg","xl"],this.breakpoints={xs:0,sm:576,md:768,lg:992,xl:1200},this.currentSize=null,e&&(this.breakpoints=e);let t=this.getViewport();this.sizeListener=new o(t),this.breakpointListener=new o(t.currentSize),m(window,"resize").pipe(g(100),p(100),d(()=>{let r=this.getViewport();this.sizeListener.next(r),this.breakpointListener.next(r.currentSize),this.currentSize=r.currentSize})).subscribe()}getViewport(){let e=window,t=document,r=t.documentElement,u=t.getElementsByTagName("body")[0],i=e.innerWidth||r.clientWidth||u.clientWidth,b=e.innerHeight||r.clientHeight||u.clientHeight,s="xs";return i>=this.breakpoints.sm&&i<this.breakpoints.md?s="sm":i>=this.breakpoints.md&&i<this.breakpoints.lg?s="md":i>=this.breakpoints.lg&&i<this.breakpoints.xl?s="lg":i>=this.breakpoints.xl&&(s="xl"),{width:i,height:b,currentSize:s}}enterExtraSmall(){return this.enter("xs")}leaveExtraSmall(){return this.enter("xs")}greaterThanExtraSmall(e=!1){return this.greaterThan("xs",e)}enterSmall(){return this.enter("sm")}leaveSmall(){return this.enter("sm")}lessThanSmall(e=!1){return this.lessThan("sm",e)}greaterThanSmall(e=!1){return this.greaterThan("sm",e)}enterMedium(){return this.enter("md")}leaveMedium(){return this.enter("md")}lessThanMedium(e=!1){return this.lessThan("md",e)}greaterThanMedium(e=!1){return this.greaterThan("md",e)}enterLarge(){return this.enter("lg")}leaveLarge(){return this.enter("lg")}lessThanLarge(e=!1){return this.lessThan("lg",e)}greaterThanLarge(e=!1){return this.greaterThan("lg",e)}enterExtraLarge(){return this.enter("xl")}leaveExtraLarge(){return this.enter("xl")}lessThanExtraLarge(e=!1){return this.lessThan("xl",e)}enter(e){return this.breakpointListener.pipe(h(),a(t=>t===e))}leave(e){return this.breakpointListener.pipe(h(),a(t=>this.currentSize===e&&t!==e))}lessThan(e,t){return this.breakpointListener.pipe(h(),a(r=>t?this.sizeTable.indexOf(r)<=this.sizeTable.indexOf(e):this.sizeTable.indexOf(r)<this.sizeTable.indexOf(e)))}greaterThan(e,t){return this.breakpointListener.pipe(h(),a(r=>t?this.sizeTable.indexOf(r)>=this.sizeTable.indexOf(e):this.sizeTable.indexOf(r)>this.sizeTable.indexOf(e)))}};n.\u0275fac=function(t){return new(t||n)(x(L,8))},n.\u0275prov=c({token:n,factory:n.\u0275fac,providedIn:"root"});let l=n;return l})()});export{B as a,S as b};
