(function(i,s){typeof exports=="object"&&typeof module<"u"?s(exports):typeof define=="function"&&define.amd?define(["exports"],s):(i=typeof globalThis<"u"?globalThis:i||self,s(i.bsBreakpoints={}))})(this,function(i){"use strict";const s={xSmall:{min:0,max:575},small:{min:576,max:767},medium:{min:768,max:991},large:{min:992,max:1199},xLarge:{min:1200,max:1399},xxLarge:{min:1400,max:1/0}};var a=(r=>(r.INIT="init.bs.breakpoint",r.NEW="new.bs.breakpoint",r))(a||{});const k=r=>r?window:{document:{documentElement:{}},addEventListener:()=>null,dispatchEvent:()=>!0,getComputedStyle:()=>({getPropertyValue:()=>""})};class h{window;breakPoints={...s};currentBreakpoint="medium";constructor(){this.window=k(typeof window<"u"),this.getBreakPoints(),this.getCurrentBreakpoint(),this.dispatchBreakpoint(a.INIT),this.window.addEventListener("resize",()=>{this.getCurrentBreakpoint(),this.dispatchBreakpoint(a.NEW)})}addBreakpoint(t,e){return this.breakPoints[t]=e,this.breakPoints}removeBreakpoint(t){return delete this.breakPoints[t],this.breakPoints}getBreakPoints(){const t=this.window.document.documentElement,e=parseInt(this.window.getComputedStyle(t).getPropertyValue("--bs-breakpoint-sm"),10)||this.breakPoints.small.min,n=parseInt(this.window.getComputedStyle(t).getPropertyValue("--bs-breakpoint-md"),10)||this.breakPoints.medium.min,o=parseInt(this.window.getComputedStyle(t).getPropertyValue("--bs-breakpoint-lg"),10)||this.breakPoints.large.min,m=parseInt(this.window.getComputedStyle(t).getPropertyValue("--bs-breakpoint-xl"),10)||this.breakPoints.xLarge.min,d=parseInt(this.window.getComputedStyle(t).getPropertyValue("--bs-breakpoint-xxl"),10)||this.breakPoints.xxLarge.min;return this.breakPoints.xSmall.max=e-1,this.breakPoints.small.min=e,this.breakPoints.small.max=n-1,this.breakPoints.medium.min=n,this.breakPoints.medium.max=o-1,this.breakPoints.large.min=o,this.breakPoints.large.max=m-1,this.breakPoints.xLarge.min=m,this.breakPoints.xLarge.max=d-1,this.breakPoints.xxLarge.min=d,this.breakPoints}getCurrentBreakpoint(){const t=Math.max(this.window.document.documentElement.clientWidth,this.window.innerWidth||0),n=Object.keys(this.breakPoints).find(o=>t<=this.breakPoints[o].max&&t>=this.breakPoints[o].min);return n?(this.currentBreakpoint=n,n):this.currentBreakpoint}isGreaterThan(t){if(!this.breakPoints[t])throw new Error(`unknown breakpoint: ${t}`);const e=this.getCurrentBreakpoint(),n=this.getSortedBreakpoints();return n.indexOf(e)>n.indexOf(t)}isLowerThan(t){if(!this.breakPoints[t])throw new Error(`unknown breakpoint: ${t}`);const e=this.getCurrentBreakpoint(),n=this.getSortedBreakpoints();return n.indexOf(e)this.breakPoints[t].min-this.breakPoints[e].min)}}i.BreakpointDetector=h,Object.defineProperty(i,Symbol.toStringTag,{value:"Module"})});