1import{a as L}from"./chunk-36G5EF3V.js";import{Db as W,Eb as x,Ga as f,Ia as S,La as u,Pa as v,Ua as C,Y as o,Za as _,fa as l,ga as c,hb as m,ic as E,mb as s,nb as a,sb as p,ub as n,vb as h,wb as w,xb as g}from"./chunk-MUD633XU.js";var R=["scrollerWrapper"],k=["*"];function y(i,b){if(i&1){let e=p();s(0,"div",1)(1,"button",4),n("click",function(){l(e);let t=h();return c(t.scrollHorizontal(!0))}),a()()}}function V(i,b){if(i&1){let e=p();s(0,"div",3)(1,"button",5),n("click",function(){l(e);let t=h();return c(t.scrollHorizontal(!1))}),a()()}}var D=(()=>{class i{constructor(){this.scrollerWrapper=v("scrollerWrapper"),this.canScrollLeft=!1,this.canScrollRight=!1,this.deviceService=o(L),this.renderer2=o(u),this.cdr=o(E),this.SCROLL_SIZE=300}ngAfterViewInit(){this.listenScrollPosition(),this.onResize(),this.cdr.detectChanges()}onResize(){this.checkScrollPosition()}scrollHorizontal(e){this.elementExists&&this.scrollerWrapper()?.nativeElement.scrollBy({left:e?-this.SCROLL_SIZE:this.SCROLL_SIZE,behavior:"smooth"})}checkScrollPosition(){if(this.elementExists){let e=this.scrollerWrapper()?.nativeElement;if(e){let r=e.scrollWidth-e.clientWidth;this.canScrollLeft=e.scrollLeft>0,this.canScrollRight=e.scrollLeft<r}}}listenScrollPosition(){this.renderer2.listen(this.scrollerWrapper()?.nativeElement,"scroll",()=>{this.checkScrollPosition()})}get elementExists(){return this.deviceService.isBrowser()&&!!this.scrollerWrapper()?.nativeElement}static{this.\u0275fac=function(r){return new(r||i)}}static{this.\u0275cmp=C({type:i,selectors:[["scroller-wrapper"]],viewQuery:function(r,t){r&1&&W(t.scrollerWrapper,R,5),r&2&&x()},hostBindings:function(r,t){r&1&&n("resize",function(){return t.onResize()},!1,f)},ngContentSelectors:k,decls:5,vars:2,consts:[["scrollerWrapper",""],[1,"c-scroller-wrapper__navigation","c-scroller-wrapper__navigation--prev"],[1,"c-scroller-wrapper__container",3,"scroll"],[1,"c-scroller-wrapper__navigation","c-scroller-wrapper__navigation--next"],["type","button","aria-label","Previous",1,"c-scroller-wrapper__navigation-btn",3,"click"],["type","button","aria-label","Next",1,"c-scroller-wrapper__navigation-btn",3,"click"]],template:function(r,t){if(r&1){let d=p();w(),_(0,y,2,0,"div",1),s(1,"div",2,0),n("scroll",function(){return l(d),c(t.checkScrollPosition())}),g(3),a(),_(4,V,2,0,"div",3)}r&2&&(m(t.canScrollLeft?0:-1),S(4),m(t.canScrollRight?4:-1))},encapsulation:2})}}return i})();export{D as a};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.