import{b as kt,d as Rt,g as Et}from"./chunk-MLUJBK3M.js";import{d as et,e as _,f as Ot,h as k,l as P,m as j,n as I,p as N,q as it,r as F,s as T,t as xt}from"./chunk-TNYSAYFQ.js";import{d as b,j as Ct}from"./chunk-E2GGCCQI.js";import{$b as J,Aa as vt,F as _t,Gd as St,Ia as y,Ja as B,La as mt,Na as h,Oa as q,Pd as x,R as U,Rb as v,Tb as Q,U as pt,Ua as u,V as z,Vb as bt,Wa as M,Xa as L,Y as G,Zb as w,a as V,b as ut,ba as gt,db as K,ec as tt,i as O,kb as yt,l as $,o as m,ob as R,pb as E,vb as wt,za as A}from"./chunk-V6BPA3D7.js";var Ht=20,Y=(()=>{class r{constructor(t,i,s){this._ngZone=t,this._platform=i,this._scrolled=new m,this._globalSubscription=null,this._scrolledCount=0,this.scrollContainers=new Map,this._document=s}register(t){this.scrollContainers.has(t)||this.scrollContainers.set(t,t.elementScrolled().subscribe(()=>this._scrolled.next(t)))}deregister(t){let i=this.scrollContainers.get(t);i&&(i.unsubscribe(),this.scrollContainers.delete(t))}scrolled(t=Ht){return this._platform.isBrowser?new $(i=>{this._globalSubscription||this._addGlobalListener();let s=t>0?this._scrolled.pipe(G(t)).subscribe(i):this._scrolled.subscribe(i);return this._scrolledCount++,()=>{s.unsubscribe(),this._scrolledCount--,this._scrolledCount||this._removeGlobalListener()}}):_t()}ngOnDestroy(){this._removeGlobalListener(),this.scrollContainers.forEach((t,i)=>this.deregister(i)),this._scrolled.complete()}ancestorScrolled(t,i){let s=this.getAncestorScrollContainers(t);return this.scrolled(i).pipe(z(n=>!n||s.indexOf(n)>-1))}getAncestorScrollContainers(t){let i=[];return this.scrollContainers.forEach((s,n)=>{this._scrollableContainsElement(n,t)&&i.push(n)}),i}_getWindow(){return this._document.defaultView||window}_scrollableContainsElement(t,i){let s=Ot(i),n=t.getElementRef().nativeElement;do if(s==n)return!0;while(s=s.parentElement);return!1}_addGlobalListener(){this._globalSubscription=this._ngZone.runOutsideAngular(()=>{let t=this._getWindow();return U(t.document,"scroll").subscribe(()=>this._scrolled.next())})}_removeGlobalListener(){this._globalSubscription&&(this._globalSubscription.unsubscribe(),this._globalSubscription=null)}static{this.\u0275fac=function(i){return new(i||r)(h(w),h(k),h(b,8))}}static{this.\u0275prov=y({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})(),Xt=(()=>{class r{constructor(t,i,s,n){this.elementRef=t,this.scrollDispatcher=i,this.ngZone=s,this.dir=n,this._destroyed=new m,this._elementScrolled=new $(o=>this.ngZone.runOutsideAngular(()=>U(this.elementRef.nativeElement,"scroll").pipe(A(this._destroyed)).subscribe(o)))}ngOnInit(){this.scrollDispatcher.register(this)}ngOnDestroy(){this.scrollDispatcher.deregister(this),this._destroyed.next(),this._destroyed.complete()}elementScrolled(){return this._elementScrolled}getElementRef(){return this.elementRef}scrollTo(t){let i=this.elementRef.nativeElement,s=this.dir&&this.dir.value=="rtl";t.left==null&&(t.left=s?t.end:t.start),t.right==null&&(t.right=s?t.start:t.end),t.bottom!=null&&(t.top=i.scrollHeight-i.clientHeight-t.bottom),s&&I()!=P.NORMAL?(t.left!=null&&(t.right=i.scrollWidth-i.clientWidth-t.left),I()==P.INVERTED?t.left=t.right:I()==P.NEGATED&&(t.left=t.right?-t.right:t.right)):t.right!=null&&(t.left=i.scrollWidth-i.clientWidth-t.right),this._applyScrollToOptions(t)}_applyScrollToOptions(t){let i=this.elementRef.nativeElement;j()?i.scrollTo(t):(t.top!=null&&(i.scrollTop=t.top),t.left!=null&&(i.scrollLeft=t.left))}measureScrollOffset(t){let i="left",s="right",n=this.elementRef.nativeElement;if(t=="top")return n.scrollTop;if(t=="bottom")return n.scrollHeight-n.clientHeight-n.scrollTop;let o=this.dir&&this.dir.value=="rtl";return t=="start"?t=o?s:i:t=="end"&&(t=o?i:s),o&&I()==P.INVERTED?t==i?n.scrollWidth-n.clientWidth-n.scrollLeft:n.scrollLeft:o&&I()==P.NEGATED?t==i?n.scrollLeft+n.scrollWidth-n.clientWidth:-n.scrollLeft:t==i?n.scrollLeft:n.scrollWidth-n.clientWidth-n.scrollLeft}static{this.\u0275fac=function(i){return new(i||r)(v(R),v(Y),v(w),v(F,8))}}static{this.\u0275dir=L({type:r,selectors:[["","cdk-scrollable",""],["","cdkScrollable",""]],standalone:!0})}}return r})(),Wt=20,H=(()=>{class r{constructor(t,i,s){this._platform=t,this._change=new m,this._changeListener=n=>{this._change.next(n)},this._document=s,i.runOutsideAngular(()=>{if(t.isBrowser){let n=this._getWindow();n.addEventListener("resize",this._changeListener),n.addEventListener("orientationchange",this._changeListener)}this.change().subscribe(()=>this._viewportSize=null)})}ngOnDestroy(){if(this._platform.isBrowser){let t=this._getWindow();t.removeEventListener("resize",this._changeListener),t.removeEventListener("orientationchange",this._changeListener)}this._change.complete()}getViewportSize(){this._viewportSize||this._updateViewportSize();let t={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),t}getViewportRect(){let t=this.getViewportScrollPosition(),{width:i,height:s}=this.getViewportSize();return{top:t.top,left:t.left,bottom:t.top+s,right:t.left+i,height:s,width:i}}getViewportScrollPosition(){if(!this._platform.isBrowser)return{top:0,left:0};let t=this._document,i=this._getWindow(),s=t.documentElement,n=s.getBoundingClientRect(),o=-n.top||t.body.scrollTop||i.scrollY||s.scrollTop||0,l=-n.left||t.body.scrollLeft||i.scrollX||s.scrollLeft||0;return{top:o,left:l}}change(t=Wt){return t>0?this._change.pipe(G(t)):this._change}_getWindow(){return this._document.defaultView||window}_updateViewportSize(){let t=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:t.innerWidth,height:t.innerHeight}:{width:0,height:0}}static{this.\u0275fac=function(i){return new(i||r)(h(k),h(w),h(b,8))}}static{this.\u0275prov=y({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var Dt=(()=>{class r{static{this.\u0275fac=function(i){return new(i||r)}}static{this.\u0275mod=M({type:r})}static{this.\u0275inj=B({})}}return r})(),st=(()=>{class r{static{this.\u0275fac=function(i){return new(i||r)}}static{this.\u0275mod=M({type:r})}static{this.\u0275inj=B({imports:[T,Dt,T,Dt]})}}return r})();var Pt=j(),nt=class{constructor(e,t){this._viewportRuler=e,this._previousHTMLStyles={top:"",left:""},this._isEnabled=!1,this._document=t}attach(){}enable(){if(this._canBeEnabled()){let e=this._document.documentElement;this._previousScrollPosition=this._viewportRuler.getViewportScrollPosition(),this._previousHTMLStyles.left=e.style.left||"",this._previousHTMLStyles.top=e.style.top||"",e.style.left=_(-this._previousScrollPosition.left),e.style.top=_(-this._previousScrollPosition.top),e.classList.add("cdk-global-scrollblock"),this._isEnabled=!0}}disable(){if(this._isEnabled){let e=this._document.documentElement,t=this._document.body,i=e.style,s=t.style,n=i.scrollBehavior||"",o=s.scrollBehavior||"";this._isEnabled=!1,i.left=this._previousHTMLStyles.left,i.top=this._previousHTMLStyles.top,e.classList.remove("cdk-global-scrollblock"),Pt&&(i.scrollBehavior=s.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),Pt&&(i.scrollBehavior=n,s.scrollBehavior=o)}}_canBeEnabled(){if(this._document.documentElement.classList.contains("cdk-global-scrollblock")||this._isEnabled)return!1;let t=this._document.body,i=this._viewportRuler.getViewportSize();return t.scrollHeight>i.height||t.scrollWidth>i.width}};var rt=class{constructor(e,t,i,s){this._scrollDispatcher=e,this._ngZone=t,this._viewportRuler=i,this._config=s,this._scrollSubscription=null,this._detach=()=>{this.disable(),this._overlayRef.hasAttached()&&this._ngZone.run(()=>this._overlayRef.detach())}}attach(e){this._overlayRef,this._overlayRef=e}enable(){if(this._scrollSubscription)return;let e=this._scrollDispatcher.scrolled(0).pipe(z(t=>!t||!this._overlayRef.overlayElement.contains(t.getElementRef().nativeElement)));this._config&&this._config.threshold&&this._config.threshold>1?(this._initialScrollPosition=this._viewportRuler.getViewportScrollPosition().top,this._scrollSubscription=e.subscribe(()=>{let t=this._viewportRuler.getViewportScrollPosition().top;Math.abs(t-this._initialScrollPosition)>this._config.threshold?this._detach():this._overlayRef.updatePosition()})):this._scrollSubscription=e.subscribe(this._detach)}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}},X=class{enable(){}disable(){}attach(){}};function ot(r,e){return e.some(t=>{let i=r.bottom<t.top,s=r.top>t.bottom,n=r.right<t.left,o=r.left>t.right;return i||s||n||o})}function It(r,e){return e.some(t=>{let i=r.top<t.top,s=r.bottom>t.bottom,n=r.left<t.left,o=r.right>t.right;return i||s||n||o})}var lt=class{constructor(e,t,i,s){this._scrollDispatcher=e,this._viewportRuler=t,this._ngZone=i,this._config=s,this._scrollSubscription=null}attach(e){this._overlayRef,this._overlayRef=e}enable(){if(!this._scrollSubscription){let e=this._config?this._config.scrollThrottle:0;this._scrollSubscription=this._scrollDispatcher.scrolled(e).subscribe(()=>{if(this._overlayRef.updatePosition(),this._config&&this._config.autoClose){let t=this._overlayRef.overlayElement.getBoundingClientRect(),{width:i,height:s}=this._viewportRuler.getViewportSize();ot(t,[{width:i,height:s,bottom:s,right:i,top:0,left:0}])&&(this.disable(),this._ngZone.run(()=>this._overlayRef.detach()))}})}}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}},Ut=(()=>{class r{constructor(t,i,s,n){this._scrollDispatcher=t,this._viewportRuler=i,this._ngZone=s,this.noop=()=>new X,this.close=o=>new rt(this._scrollDispatcher,this._ngZone,this._viewportRuler,o),this.block=()=>new nt(this._viewportRuler,this._document),this.reposition=o=>new lt(this._scrollDispatcher,this._viewportRuler,this._ngZone,o),this._document=n}static{this.\u0275fac=function(i){return new(i||r)(h(Y),h(H),h(w),h(b))}}static{this.\u0275prov=y({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})(),W=class{constructor(e){if(this.scrollStrategy=new X,this.panelClass="",this.hasBackdrop=!1,this.backdropClass="cdk-overlay-dark-backdrop",this.disposeOnNavigation=!1,e){let t=Object.keys(e);for(let i of t)e[i]!==void 0&&(this[i]=e[i])}}};var at=class{constructor(e,t){this.connectionPair=e,this.scrollableViewProperties=t}};var Vt=(()=>{class r{constructor(t){this._attachedOverlays=[],this._document=t}ngOnDestroy(){this.detach()}add(t){this.remove(t),this._attachedOverlays.push(t)}remove(t){let i=this._attachedOverlays.indexOf(t);i>-1&&this._attachedOverlays.splice(i,1),this._attachedOverlays.length===0&&this.detach()}static{this.\u0275fac=function(i){return new(i||r)(h(b))}}static{this.\u0275prov=y({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})(),Gt=(()=>{class r extends Vt{constructor(t,i){super(t),this._ngZone=i,this._keydownListener=s=>{let n=this._attachedOverlays;for(let o=n.length-1;o>-1;o--)if(n[o]._keydownEvents.observers.length>0){let l=n[o]._keydownEvents;this._ngZone?this._ngZone.run(()=>l.next(s)):l.next(s);break}}}add(t){super.add(t),this._isAttached||(this._ngZone?this._ngZone.runOutsideAngular(()=>this._document.body.addEventListener("keydown",this._keydownListener)):this._document.body.addEventListener("keydown",this._keydownListener),this._isAttached=!0)}detach(){this._isAttached&&(this._document.body.removeEventListener("keydown",this._keydownListener),this._isAttached=!1)}static{this.\u0275fac=function(i){return new(i||r)(h(b),h(w,8))}}static{this.\u0275prov=y({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})(),qt=(()=>{class r extends Vt{constructor(t,i,s){super(t),this._platform=i,this._ngZone=s,this._cursorStyleIsSet=!1,this._pointerDownListener=n=>{this._pointerDownEventTarget=N(n)},this._clickListener=n=>{let o=N(n),l=n.type==="click"&&this._pointerDownEventTarget?this._pointerDownEventTarget:o;this._pointerDownEventTarget=null;let c=this._attachedOverlays.slice();for(let d=c.length-1;d>-1;d--){let a=c[d];if(a._outsidePointerEvents.observers.length<1||!a.hasAttached())continue;if(a.overlayElement.contains(o)||a.overlayElement.contains(l))break;let f=a._outsidePointerEvents;this._ngZone?this._ngZone.run(()=>f.next(n)):f.next(n)}}}add(t){if(super.add(t),!this._isAttached){let i=this._document.body;this._ngZone?this._ngZone.runOutsideAngular(()=>this._addEventListeners(i)):this._addEventListeners(i),this._platform.IOS&&!this._cursorStyleIsSet&&(this._cursorOriginalValue=i.style.cursor,i.style.cursor="pointer",this._cursorStyleIsSet=!0),this._isAttached=!0}}detach(){if(this._isAttached){let t=this._document.body;t.removeEventListener("pointerdown",this._pointerDownListener,!0),t.removeEventListener("click",this._clickListener,!0),t.removeEventListener("auxclick",this._clickListener,!0),t.removeEventListener("contextmenu",this._clickListener,!0),this._platform.IOS&&this._cursorStyleIsSet&&(t.style.cursor=this._cursorOriginalValue,this._cursorStyleIsSet=!1),this._isAttached=!1}}_addEventListeners(t){t.addEventListener("pointerdown",this._pointerDownListener,!0),t.addEventListener("click",this._clickListener,!0),t.addEventListener("auxclick",this._clickListener,!0),t.addEventListener("contextmenu",this._clickListener,!0)}static{this.\u0275fac=function(i){return new(i||r)(h(b),h(k),h(w,8))}}static{this.\u0275prov=y({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})(),zt=(()=>{class r{constructor(t,i){this._platform=i,this._document=t}ngOnDestroy(){this._containerElement?.remove()}getContainerElement(){return this._containerElement||this._createContainer(),this._containerElement}_createContainer(){let t="cdk-overlay-container";if(this._platform.isBrowser||it()){let s=this._document.querySelectorAll(`.${t}[platform="server"], .${t}[platform="test"]`);for(let n=0;n<s.length;n++)s[n].remove()}let i=this._document.createElement("div");i.classList.add(t),it()?i.setAttribute("platform","test"):this._platform.isBrowser||i.setAttribute("platform","server"),this._document.body.appendChild(i),this._containerElement=i}static{this.\u0275fac=function(i){return new(i||r)(h(b),h(k))}}static{this.\u0275prov=y({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})(),ht=class{constructor(e,t,i,s,n,o,l,c,d,a=!1){this._portalOutlet=e,this._host=t,this._pane=i,this._config=s,this._ngZone=n,this._keyboardDispatcher=o,this._document=l,this._location=c,this._outsideClickDispatcher=d,this._animationsDisabled=a,this._backdropElement=null,this._backdropClick=new m,this._attachments=new m,this._detachments=new m,this._locationChanges=O.EMPTY,this._backdropClickHandler=f=>this._backdropClick.next(f),this._backdropTransitionendHandler=f=>{this._disposeBackdrop(f.target)},this._keydownEvents=new m,this._outsidePointerEvents=new m,s.scrollStrategy&&(this._scrollStrategy=s.scrollStrategy,this._scrollStrategy.attach(this)),this._positionStrategy=s.positionStrategy}get overlayElement(){return this._pane}get backdropElement(){return this._backdropElement}get hostElement(){return this._host}attach(e){!this._host.parentElement&&this._previousHostParent&&this._previousHostParent.appendChild(this._host);let t=this._portalOutlet.attach(e);return this._positionStrategy&&this._positionStrategy.attach(this),this._updateStackingOrder(),this._updateElementSize(),this._updateElementDirection(),this._scrollStrategy&&this._scrollStrategy.enable(),this._ngZone.onStable.pipe(gt(1)).subscribe(()=>{this.hasAttached()&&this.updatePosition()}),this._togglePointerEvents(!0),this._config.hasBackdrop&&this._attachBackdrop(),this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!0),this._attachments.next(),this._keyboardDispatcher.add(this),this._config.disposeOnNavigation&&(this._locationChanges=this._location.subscribe(()=>this.dispose())),this._outsideClickDispatcher.add(this),typeof t?.onDestroy=="function"&&t.onDestroy(()=>{this.hasAttached()&&this._ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>this.detach()))}),t}detach(){if(!this.hasAttached())return;this.detachBackdrop(),this._togglePointerEvents(!1),this._positionStrategy&&this._positionStrategy.detach&&this._positionStrategy.detach(),this._scrollStrategy&&this._scrollStrategy.disable();let e=this._portalOutlet.detach();return this._detachments.next(),this._keyboardDispatcher.remove(this),this._detachContentWhenStable(),this._locationChanges.unsubscribe(),this._outsideClickDispatcher.remove(this),e}dispose(){let e=this.hasAttached();this._positionStrategy&&this._positionStrategy.dispose(),this._disposeScrollStrategy(),this._disposeBackdrop(this._backdropElement),this._locationChanges.unsubscribe(),this._keyboardDispatcher.remove(this),this._portalOutlet.dispose(),this._attachments.complete(),this._backdropClick.complete(),this._keydownEvents.complete(),this._outsidePointerEvents.complete(),this._outsideClickDispatcher.remove(this),this._host?.remove(),this._previousHostParent=this._pane=this._host=null,e&&this._detachments.next(),this._detachments.complete()}hasAttached(){return this._portalOutlet.hasAttached()}backdropClick(){return this._backdropClick}attachments(){return this._attachments}detachments(){return this._detachments}keydownEvents(){return this._keydownEvents}outsidePointerEvents(){return this._outsidePointerEvents}getConfig(){return this._config}updatePosition(){this._positionStrategy&&this._positionStrategy.apply()}updatePositionStrategy(e){e!==this._positionStrategy&&(this._positionStrategy&&this._positionStrategy.dispose(),this._positionStrategy=e,this.hasAttached()&&(e.attach(this),this.updatePosition()))}updateSize(e){this._config=V(V({},this._config),e),this._updateElementSize()}setDirection(e){this._config=ut(V({},this._config),{direction:e}),this._updateElementDirection()}addPanelClass(e){this._pane&&this._toggleClasses(this._pane,e,!0)}removePanelClass(e){this._pane&&this._toggleClasses(this._pane,e,!1)}getDirection(){let e=this._config.direction;return e?typeof e=="string"?e:e.value:"ltr"}updateScrollStrategy(e){e!==this._scrollStrategy&&(this._disposeScrollStrategy(),this._scrollStrategy=e,this.hasAttached()&&(e.attach(this),e.enable()))}_updateElementDirection(){this._host.setAttribute("dir",this.getDirection())}_updateElementSize(){if(!this._pane)return;let e=this._pane.style;e.width=_(this._config.width),e.height=_(this._config.height),e.minWidth=_(this._config.minWidth),e.minHeight=_(this._config.minHeight),e.maxWidth=_(this._config.maxWidth),e.maxHeight=_(this._config.maxHeight)}_togglePointerEvents(e){this._pane.style.pointerEvents=e?"":"none"}_attachBackdrop(){let e="cdk-overlay-backdrop-showing";this._backdropElement=this._document.createElement("div"),this._backdropElement.classList.add("cdk-overlay-backdrop"),this._animationsDisabled&&this._backdropElement.classList.add("cdk-overlay-backdrop-noop-animation"),this._config.backdropClass&&this._toggleClasses(this._backdropElement,this._config.backdropClass,!0),this._host.parentElement.insertBefore(this._backdropElement,this._host),this._backdropElement.addEventListener("click",this._backdropClickHandler),!this._animationsDisabled&&typeof requestAnimationFrame<"u"?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>{this._backdropElement&&this._backdropElement.classList.add(e)})}):this._backdropElement.classList.add(e)}_updateStackingOrder(){this._host.nextSibling&&this._host.parentNode.appendChild(this._host)}detachBackdrop(){let e=this._backdropElement;if(e){if(this._animationsDisabled){this._disposeBackdrop(e);return}e.classList.remove("cdk-overlay-backdrop-showing"),this._ngZone.runOutsideAngular(()=>{e.addEventListener("transitionend",this._backdropTransitionendHandler)}),e.style.pointerEvents="none",this._backdropTimeout=this._ngZone.runOutsideAngular(()=>setTimeout(()=>{this._disposeBackdrop(e)},500))}}_toggleClasses(e,t,i){let s=et(t||[]).filter(n=>!!n);s.length&&(i?e.classList.add(...s):e.classList.remove(...s))}_detachContentWhenStable(){this._ngZone.runOutsideAngular(()=>{let e=this._ngZone.onStable.pipe(A(pt(this._attachments,this._detachments))).subscribe(()=>{(!this._pane||!this._host||this._pane.children.length===0)&&(this._pane&&this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!1),this._host&&this._host.parentElement&&(this._previousHostParent=this._host.parentElement,this._host.remove()),e.unsubscribe())})})}_disposeScrollStrategy(){let e=this._scrollStrategy;e&&(e.disable(),e.detach&&e.detach())}_disposeBackdrop(e){e&&(e.removeEventListener("click",this._backdropClickHandler),e.removeEventListener("transitionend",this._backdropTransitionendHandler),e.remove(),this._backdropElement===e&&(this._backdropElement=null)),this._backdropTimeout&&(clearTimeout(this._backdropTimeout),this._backdropTimeout=void 0)}},Bt="cdk-overlay-connected-position-bounding-box",Kt=/([A-Za-z%]+)$/,ct=class{get positions(){return this._preferredPositions}constructor(e,t,i,s,n){this._viewportRuler=t,this._document=i,this._platform=s,this._overlayContainer=n,this._lastBoundingBoxSize={width:0,height:0},this._isPushed=!1,this._canPush=!0,this._growAfterOpen=!1,this._hasFlexibleDimensions=!0,this._positionLocked=!1,this._viewportMargin=0,this._scrollables=[],this._preferredPositions=[],this._positionChanges=new m,this._resizeSubscription=O.EMPTY,this._offsetX=0,this._offsetY=0,this._appliedPanelClasses=[],this.positionChanges=this._positionChanges,this.setOrigin(e)}attach(e){this._overlayRef&&this._overlayRef,this._validatePositions(),e.hostElement.classList.add(Bt),this._overlayRef=e,this._boundingBox=e.hostElement,this._pane=e.overlayElement,this._isDisposed=!1,this._isInitialRender=!0,this._lastPosition=null,this._resizeSubscription.unsubscribe(),this._resizeSubscription=this._viewportRuler.change().subscribe(()=>{this._isInitialRender=!0,this.apply()})}apply(){if(this._isDisposed||!this._platform.isBrowser)return;if(!this._isInitialRender&&this._positionLocked&&this._lastPosition){this.reapplyLastPosition();return}this._clearPanelClasses(),this._resetOverlayElementStyles(),this._resetBoundingBoxStyles(),this._viewportRect=this._getNarrowedViewportRect(),this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();let e=this._originRect,t=this._overlayRect,i=this._viewportRect,s=this._containerRect,n=[],o;for(let l of this._preferredPositions){let c=this._getOriginPoint(e,s,l),d=this._getOverlayPoint(c,t,l),a=this._getOverlayFit(d,t,i,l);if(a.isCompletelyWithinViewport){this._isPushed=!1,this._applyPosition(l,c);return}if(this._canFitWithFlexibleDimensions(a,d,i)){n.push({position:l,origin:c,overlayRect:t,boundingBoxRect:this._calculateBoundingBoxRect(c,l)});continue}(!o||o.overlayFit.visibleArea<a.visibleArea)&&(o={overlayFit:a,overlayPoint:d,originPoint:c,position:l,overlayRect:t})}if(n.length){let l=null,c=-1;for(let d of n){let a=d.boundingBoxRect.width*d.boundingBoxRect.height*(d.position.weight||1);a>c&&(c=a,l=d)}this._isPushed=!1,this._applyPosition(l.position,l.origin);return}if(this._canPush){this._isPushed=!0,this._applyPosition(o.position,o.originPoint);return}this._applyPosition(o.position,o.originPoint)}detach(){this._clearPanelClasses(),this._lastPosition=null,this._previousPushAmount=null,this._resizeSubscription.unsubscribe()}dispose(){this._isDisposed||(this._boundingBox&&D(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove(Bt),this.detach(),this._positionChanges.complete(),this._overlayRef=this._boundingBox=null,this._isDisposed=!0)}reapplyLastPosition(){if(this._isDisposed||!this._platform.isBrowser)return;let e=this._lastPosition;if(e){this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._viewportRect=this._getNarrowedViewportRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();let t=this._getOriginPoint(this._originRect,this._containerRect,e);this._applyPosition(e,t)}else this.apply()}withScrollableContainers(e){return this._scrollables=e,this}withPositions(e){return this._preferredPositions=e,e.indexOf(this._lastPosition)===-1&&(this._lastPosition=null),this._validatePositions(),this}withViewportMargin(e){return this._viewportMargin=e,this}withFlexibleDimensions(e=!0){return this._hasFlexibleDimensions=e,this}withGrowAfterOpen(e=!0){return this._growAfterOpen=e,this}withPush(e=!0){return this._canPush=e,this}withLockedPosition(e=!0){return this._positionLocked=e,this}setOrigin(e){return this._origin=e,this}withDefaultOffsetX(e){return this._offsetX=e,this}withDefaultOffsetY(e){return this._offsetY=e,this}withTransformOriginOn(e){return this._transformOriginSelector=e,this}_getOriginPoint(e,t,i){let s;if(i.originX=="center")s=e.left+e.width/2;else{let o=this._isRtl()?e.right:e.left,l=this._isRtl()?e.left:e.right;s=i.originX=="start"?o:l}t.left<0&&(s-=t.left);let n;return i.originY=="center"?n=e.top+e.height/2:n=i.originY=="top"?e.top:e.bottom,t.top<0&&(n-=t.top),{x:s,y:n}}_getOverlayPoint(e,t,i){let s;i.overlayX=="center"?s=-t.width/2:i.overlayX==="start"?s=this._isRtl()?-t.width:0:s=this._isRtl()?0:-t.width;let n;return i.overlayY=="center"?n=-t.height/2:n=i.overlayY=="top"?0:-t.height,{x:e.x+s,y:e.y+n}}_getOverlayFit(e,t,i,s){let n=Lt(t),{x:o,y:l}=e,c=this._getOffset(s,"x"),d=this._getOffset(s,"y");c&&(o+=c),d&&(l+=d);let a=0-o,f=o+n.width-i.width,C=0-l,p=l+n.height-i.height,g=this._subtractOverflows(n.width,a,f),S=this._subtractOverflows(n.height,C,p),ft=g*S;return{visibleArea:ft,isCompletelyWithinViewport:n.width*n.height===ft,fitsInViewportVertically:S===n.height,fitsInViewportHorizontally:g==n.width}}_canFitWithFlexibleDimensions(e,t,i){if(this._hasFlexibleDimensions){let s=i.bottom-t.y,n=i.right-t.x,o=Mt(this._overlayRef.getConfig().minHeight),l=Mt(this._overlayRef.getConfig().minWidth),c=e.fitsInViewportVertically||o!=null&&o<=s,d=e.fitsInViewportHorizontally||l!=null&&l<=n;return c&&d}return!1}_pushOverlayOnScreen(e,t,i){if(this._previousPushAmount&&this._positionLocked)return{x:e.x+this._previousPushAmount.x,y:e.y+this._previousPushAmount.y};let s=Lt(t),n=this._viewportRect,o=Math.max(e.x+s.width-n.width,0),l=Math.max(e.y+s.height-n.height,0),c=Math.max(n.top-i.top-e.y,0),d=Math.max(n.left-i.left-e.x,0),a=0,f=0;return s.width<=n.width?a=d||-o:a=e.x<this._viewportMargin?n.left-i.left-e.x:0,s.height<=n.height?f=c||-l:f=e.y<this._viewportMargin?n.top-i.top-e.y:0,this._previousPushAmount={x:a,y:f},{x:e.x+a,y:e.y+f}}_applyPosition(e,t){if(this._setTransformOrigin(e),this._setOverlayElementStyles(t,e),this._setBoundingBoxStyles(t,e),e.panelClass&&this._addPanelClasses(e.panelClass),this._positionChanges.observers.length){let i=this._getScrollVisibility();if(e!==this._lastPosition||!this._lastScrollVisibility||!Qt(this._lastScrollVisibility,i)){let s=new at(e,i);this._positionChanges.next(s)}this._lastScrollVisibility=i}this._lastPosition=e,this._isInitialRender=!1}_setTransformOrigin(e){if(!this._transformOriginSelector)return;let t=this._boundingBox.querySelectorAll(this._transformOriginSelector),i,s=e.overlayY;e.overlayX==="center"?i="center":this._isRtl()?i=e.overlayX==="start"?"right":"left":i=e.overlayX==="start"?"left":"right";for(let n=0;n<t.length;n++)t[n].style.transformOrigin=`${i} ${s}`}_calculateBoundingBoxRect(e,t){let i=this._viewportRect,s=this._isRtl(),n,o,l;if(t.overlayY==="top")o=e.y,n=i.height-o+this._viewportMargin;else if(t.overlayY==="bottom")l=i.height-e.y+this._viewportMargin*2,n=i.height-l+this._viewportMargin;else{let p=Math.min(i.bottom-e.y+i.top,e.y),g=this._lastBoundingBoxSize.height;n=p*2,o=e.y-p,n>g&&!this._isInitialRender&&!this._growAfterOpen&&(o=e.y-g/2)}let c=t.overlayX==="start"&&!s||t.overlayX==="end"&&s,d=t.overlayX==="end"&&!s||t.overlayX==="start"&&s,a,f,C;if(d)C=i.width-e.x+this._viewportMargin*2,a=e.x-this._viewportMargin;else if(c)f=e.x,a=i.right-e.x;else{let p=Math.min(i.right-e.x+i.left,e.x),g=this._lastBoundingBoxSize.width;a=p*2,f=e.x-p,a>g&&!this._isInitialRender&&!this._growAfterOpen&&(f=e.x-g/2)}return{top:o,left:f,bottom:l,right:C,width:a,height:n}}_setBoundingBoxStyles(e,t){let i=this._calculateBoundingBoxRect(e,t);!this._isInitialRender&&!this._growAfterOpen&&(i.height=Math.min(i.height,this._lastBoundingBoxSize.height),i.width=Math.min(i.width,this._lastBoundingBoxSize.width));let s={};if(this._hasExactPosition())s.top=s.left="0",s.bottom=s.right=s.maxHeight=s.maxWidth="",s.width=s.height="100%";else{let n=this._overlayRef.getConfig().maxHeight,o=this._overlayRef.getConfig().maxWidth;s.height=_(i.height),s.top=_(i.top),s.bottom=_(i.bottom),s.width=_(i.width),s.left=_(i.left),s.right=_(i.right),t.overlayX==="center"?s.alignItems="center":s.alignItems=t.overlayX==="end"?"flex-end":"flex-start",t.overlayY==="center"?s.justifyContent="center":s.justifyContent=t.overlayY==="bottom"?"flex-end":"flex-start",n&&(s.maxHeight=_(n)),o&&(s.maxWidth=_(o))}this._lastBoundingBoxSize=i,D(this._boundingBox.style,s)}_resetBoundingBoxStyles(){D(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}_resetOverlayElementStyles(){D(this._pane.style,{top:"",left:"",bottom:"",right:"",position:"",transform:""})}_setOverlayElementStyles(e,t){let i={},s=this._hasExactPosition(),n=this._hasFlexibleDimensions,o=this._overlayRef.getConfig();if(s){let a=this._viewportRuler.getViewportScrollPosition();D(i,this._getExactOverlayY(t,e,a)),D(i,this._getExactOverlayX(t,e,a))}else i.position="static";let l="",c=this._getOffset(t,"x"),d=this._getOffset(t,"y");c&&(l+=`translateX(${c}px) `),d&&(l+=`translateY(${d}px)`),i.transform=l.trim(),o.maxHeight&&(s?i.maxHeight=_(o.maxHeight):n&&(i.maxHeight="")),o.maxWidth&&(s?i.maxWidth=_(o.maxWidth):n&&(i.maxWidth="")),D(this._pane.style,i)}_getExactOverlayY(e,t,i){let s={top:"",bottom:""},n=this._getOverlayPoint(t,this._overlayRect,e);if(this._isPushed&&(n=this._pushOverlayOnScreen(n,this._overlayRect,i)),e.overlayY==="bottom"){let o=this._document.documentElement.clientHeight;s.bottom=`${o-(n.y+this._overlayRect.height)}px`}else s.top=_(n.y);return s}_getExactOverlayX(e,t,i){let s={left:"",right:""},n=this._getOverlayPoint(t,this._overlayRect,e);this._isPushed&&(n=this._pushOverlayOnScreen(n,this._overlayRect,i));let o;if(this._isRtl()?o=e.overlayX==="end"?"left":"right":o=e.overlayX==="end"?"right":"left",o==="right"){let l=this._document.documentElement.clientWidth;s.right=`${l-(n.x+this._overlayRect.width)}px`}else s.left=_(n.x);return s}_getScrollVisibility(){let e=this._getOriginRect(),t=this._pane.getBoundingClientRect(),i=this._scrollables.map(s=>s.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:It(e,i),isOriginOutsideView:ot(e,i),isOverlayClipped:It(t,i),isOverlayOutsideView:ot(t,i)}}_subtractOverflows(e,...t){return t.reduce((i,s)=>i-Math.max(s,0),e)}_getNarrowedViewportRect(){let e=this._document.documentElement.clientWidth,t=this._document.documentElement.clientHeight,i=this._viewportRuler.getViewportScrollPosition();return{top:i.top+this._viewportMargin,left:i.left+this._viewportMargin,right:i.left+e-this._viewportMargin,bottom:i.top+t-this._viewportMargin,width:e-2*this._viewportMargin,height:t-2*this._viewportMargin}}_isRtl(){return this._overlayRef.getDirection()==="rtl"}_hasExactPosition(){return!this._hasFlexibleDimensions||this._isPushed}_getOffset(e,t){return t==="x"?e.offsetX==null?this._offsetX:e.offsetX:e.offsetY==null?this._offsetY:e.offsetY}_validatePositions(){}_addPanelClasses(e){this._pane&&et(e).forEach(t=>{t!==""&&this._appliedPanelClasses.indexOf(t)===-1&&(this._appliedPanelClasses.push(t),this._pane.classList.add(t))})}_clearPanelClasses(){this._pane&&(this._appliedPanelClasses.forEach(e=>{this._pane.classList.remove(e)}),this._appliedPanelClasses=[])}_getOriginRect(){let e=this._origin;if(e instanceof R)return e.nativeElement.getBoundingClientRect();if(e instanceof Element)return e.getBoundingClientRect();let t=e.width||0,i=e.height||0;return{top:e.y,bottom:e.y+i,left:e.x,right:e.x+t,height:i,width:t}}};function D(r,e){for(let t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);return r}function Mt(r){if(typeof r!="number"&&r!=null){let[e,t]=r.split(Kt);return!t||t==="px"?parseFloat(e):null}return r||null}function Lt(r){return{top:Math.floor(r.top),right:Math.floor(r.right),bottom:Math.floor(r.bottom),left:Math.floor(r.left),width:Math.floor(r.width),height:Math.floor(r.height)}}function Qt(r,e){return r===e?!0:r.isOriginClipped===e.isOriginClipped&&r.isOriginOutsideView===e.isOriginOutsideView&&r.isOverlayClipped===e.isOverlayClipped&&r.isOverlayOutsideView===e.isOverlayOutsideView}var Ft="cdk-global-overlay-wrapper",dt=class{constructor(){this._cssPosition="static",this._topOffset="",this._bottomOffset="",this._alignItems="",this._xPosition="",this._xOffset="",this._width="",this._height="",this._isDisposed=!1}attach(e){let t=e.getConfig();this._overlayRef=e,this._width&&!t.width&&e.updateSize({width:this._width}),this._height&&!t.height&&e.updateSize({height:this._height}),e.hostElement.classList.add(Ft),this._isDisposed=!1}top(e=""){return this._bottomOffset="",this._topOffset=e,this._alignItems="flex-start",this}left(e=""){return this._xOffset=e,this._xPosition="left",this}bottom(e=""){return this._topOffset="",this._bottomOffset=e,this._alignItems="flex-end",this}right(e=""){return this._xOffset=e,this._xPosition="right",this}start(e=""){return this._xOffset=e,this._xPosition="start",this}end(e=""){return this._xOffset=e,this._xPosition="end",this}width(e=""){return this._overlayRef?this._overlayRef.updateSize({width:e}):this._width=e,this}height(e=""){return this._overlayRef?this._overlayRef.updateSize({height:e}):this._height=e,this}centerHorizontally(e=""){return this.left(e),this._xPosition="center",this}centerVertically(e=""){return this.top(e),this._alignItems="center",this}apply(){if(!this._overlayRef||!this._overlayRef.hasAttached())return;let e=this._overlayRef.overlayElement.style,t=this._overlayRef.hostElement.style,i=this._overlayRef.getConfig(),{width:s,height:n,maxWidth:o,maxHeight:l}=i,c=(s==="100%"||s==="100vw")&&(!o||o==="100%"||o==="100vw"),d=(n==="100%"||n==="100vh")&&(!l||l==="100%"||l==="100vh"),a=this._xPosition,f=this._xOffset,C=this._overlayRef.getConfig().direction==="rtl",p="",g="",S="";c?S="flex-start":a==="center"?(S="center",C?g=f:p=f):C?a==="left"||a==="end"?(S="flex-end",p=f):(a==="right"||a==="start")&&(S="flex-start",g=f):a==="left"||a==="start"?(S="flex-start",p=f):(a==="right"||a==="end")&&(S="flex-end",g=f),e.position=this._cssPosition,e.marginLeft=c?"0":p,e.marginTop=d?"0":this._topOffset,e.marginBottom=this._bottomOffset,e.marginRight=c?"0":g,t.justifyContent=S,t.alignItems=d?"flex-start":this._alignItems}dispose(){if(this._isDisposed||!this._overlayRef)return;let e=this._overlayRef.overlayElement.style,t=this._overlayRef.hostElement,i=t.style;t.classList.remove(Ft),i.justifyContent=i.alignItems=e.marginTop=e.marginBottom=e.marginLeft=e.marginRight=e.position="",this._overlayRef=null,this._isDisposed=!0}},Jt=(()=>{class r{constructor(t,i,s,n){this._viewportRuler=t,this._document=i,this._platform=s,this._overlayContainer=n}global(){return new dt}flexibleConnectedTo(t){return new ct(t,this._viewportRuler,this._document,this._platform,this._overlayContainer)}static{this.\u0275fac=function(i){return new(i||r)(h(H),h(b),h(k),h(zt))}}static{this.\u0275prov=y({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})(),te=0,Z=(()=>{class r{constructor(t,i,s,n,o,l,c,d,a,f,C,p){this.scrollStrategies=t,this._overlayContainer=i,this._componentFactoryResolver=s,this._positionBuilder=n,this._keyboardDispatcher=o,this._injector=l,this._ngZone=c,this._document=d,this._directionality=a,this._location=f,this._outsideClickDispatcher=C,this._animationsModuleType=p}create(t){let i=this._createHostElement(),s=this._createPaneElement(i),n=this._createPortalOutlet(s),o=new W(t);return o.direction=o.direction||this._directionality.value,new ht(n,i,s,o,this._ngZone,this._keyboardDispatcher,this._document,this._location,this._outsideClickDispatcher,this._animationsModuleType==="NoopAnimations")}position(){return this._positionBuilder}_createPaneElement(t){let i=this._document.createElement("div");return i.id=`cdk-overlay-${te++}`,i.classList.add("cdk-overlay-pane"),t.appendChild(i),i}_createHostElement(){let t=this._document.createElement("div");return this._overlayContainer.getContainerElement().appendChild(t),t}_createPortalOutlet(t){return this._appRef||(this._appRef=this._injector.get(St)),new Rt(t,this._componentFactoryResolver,this._appRef,this._injector,this._document)}static{this.\u0275fac=function(i){return new(i||r)(h(Ut),h(zt),h(bt),h(Jt),h(Gt),h(yt),h(w),h(b),h(F),h(Ct),h(qt),h(wt,8))}}static{this.\u0275prov=y({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})(),ee=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom"},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}],At=new mt("cdk-connected-overlay-scroll-strategy",{providedIn:"root",factory:()=>{let r=q(Z);return()=>r.scrollStrategies.reposition()}}),Tt=(()=>{class r{constructor(t){this.elementRef=t}static{this.\u0275fac=function(i){return new(i||r)(v(R))}}static{this.\u0275dir=L({type:r,selectors:[["","cdk-overlay-origin",""],["","overlay-origin",""],["","cdkOverlayOrigin",""]],exportAs:["cdkOverlayOrigin"],standalone:!0})}}return r})(),ti=(()=>{class r{get offsetX(){return this._offsetX}set offsetX(t){this._offsetX=t,this._position&&this._updatePositionStrategy(this._position)}get offsetY(){return this._offsetY}set offsetY(t){this._offsetY=t,this._position&&this._updatePositionStrategy(this._position)}get disposeOnNavigation(){return this._disposeOnNavigation}set disposeOnNavigation(t){this._disposeOnNavigation=t}constructor(t,i,s,n,o){this._overlay=t,this._dir=o,this._backdropSubscription=O.EMPTY,this._attachSubscription=O.EMPTY,this._detachSubscription=O.EMPTY,this._positionSubscription=O.EMPTY,this._disposeOnNavigation=!1,this._ngZone=q(w),this.viewportMargin=0,this.open=!1,this.disableClose=!1,this.hasBackdrop=!1,this.lockPosition=!1,this.flexibleDimensions=!1,this.growAfterOpen=!1,this.push=!1,this.backdropClick=new E,this.positionChange=new E,this.attach=new E,this.detach=new E,this.overlayKeydown=new E,this.overlayOutsideClick=new E,this._templatePortal=new kt(i,s),this._scrollStrategyFactory=n,this.scrollStrategy=this._scrollStrategyFactory()}get overlayRef(){return this._overlayRef}get dir(){return this._dir?this._dir.value:"ltr"}ngOnDestroy(){this._attachSubscription.unsubscribe(),this._detachSubscription.unsubscribe(),this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this._overlayRef&&this._overlayRef.dispose()}ngOnChanges(t){this._position&&(this._updatePositionStrategy(this._position),this._overlayRef.updateSize({width:this.width,minWidth:this.minWidth,height:this.height,minHeight:this.minHeight}),t.origin&&this.open&&this._position.apply()),t.open&&(this.open?this._attachOverlay():this._detachOverlay())}_createOverlay(){(!this.positions||!this.positions.length)&&(this.positions=ee);let t=this._overlayRef=this._overlay.create(this._buildConfig());this._attachSubscription=t.attachments().subscribe(()=>this.attach.emit()),this._detachSubscription=t.detachments().subscribe(()=>this.detach.emit()),t.keydownEvents().subscribe(i=>{this.overlayKeydown.next(i),i.keyCode===27&&!this.disableClose&&!xt(i)&&(i.preventDefault(),this._detachOverlay())}),this._overlayRef.outsidePointerEvents().subscribe(i=>{let s=this._getOriginElement(),n=N(i);(!s||s!==n&&!s.contains(n))&&this.overlayOutsideClick.next(i)})}_buildConfig(){let t=this._position=this.positionStrategy||this._createPositionStrategy(),i=new W({direction:this._dir,positionStrategy:t,scrollStrategy:this.scrollStrategy,hasBackdrop:this.hasBackdrop,disposeOnNavigation:this.disposeOnNavigation});return(this.width||this.width===0)&&(i.width=this.width),(this.height||this.height===0)&&(i.height=this.height),(this.minWidth||this.minWidth===0)&&(i.minWidth=this.minWidth),(this.minHeight||this.minHeight===0)&&(i.minHeight=this.minHeight),this.backdropClass&&(i.backdropClass=this.backdropClass),this.panelClass&&(i.panelClass=this.panelClass),i}_updatePositionStrategy(t){let i=this.positions.map(s=>({originX:s.originX,originY:s.originY,overlayX:s.overlayX,overlayY:s.overlayY,offsetX:s.offsetX||this.offsetX,offsetY:s.offsetY||this.offsetY,panelClass:s.panelClass||void 0}));return t.setOrigin(this._getOrigin()).withPositions(i).withFlexibleDimensions(this.flexibleDimensions).withPush(this.push).withGrowAfterOpen(this.growAfterOpen).withViewportMargin(this.viewportMargin).withLockedPosition(this.lockPosition).withTransformOriginOn(this.transformOriginSelector)}_createPositionStrategy(){let t=this._overlay.position().flexibleConnectedTo(this._getOrigin());return this._updatePositionStrategy(t),t}_getOrigin(){return this.origin instanceof Tt?this.origin.elementRef:this.origin}_getOriginElement(){return this.origin instanceof Tt?this.origin.elementRef.nativeElement:this.origin instanceof R?this.origin.nativeElement:typeof Element<"u"&&this.origin instanceof Element?this.origin:null}_attachOverlay(){this._overlayRef?this._overlayRef.getConfig().hasBackdrop=this.hasBackdrop:this._createOverlay(),this._overlayRef.hasAttached()||this._overlayRef.attach(this._templatePortal),this.hasBackdrop?this._backdropSubscription=this._overlayRef.backdropClick().subscribe(t=>{this.backdropClick.emit(t)}):this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this.positionChange.observers.length>0&&(this._positionSubscription=this._position.positionChanges.pipe(vt(()=>this.positionChange.observers.length>0)).subscribe(t=>{this._ngZone.run(()=>this.positionChange.emit(t)),this.positionChange.observers.length===0&&this._positionSubscription.unsubscribe()}))}_detachOverlay(){this._overlayRef&&this._overlayRef.detach(),this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe()}static{this.\u0275fac=function(i){return new(i||r)(v(Z),v(Q),v(J),v(At),v(F,8))}}static{this.\u0275dir=L({type:r,selectors:[["","cdk-connected-overlay",""],["","connected-overlay",""],["","cdkConnectedOverlay",""]],inputs:{origin:[u.None,"cdkConnectedOverlayOrigin","origin"],positions:[u.None,"cdkConnectedOverlayPositions","positions"],positionStrategy:[u.None,"cdkConnectedOverlayPositionStrategy","positionStrategy"],offsetX:[u.None,"cdkConnectedOverlayOffsetX","offsetX"],offsetY:[u.None,"cdkConnectedOverlayOffsetY","offsetY"],width:[u.None,"cdkConnectedOverlayWidth","width"],height:[u.None,"cdkConnectedOverlayHeight","height"],minWidth:[u.None,"cdkConnectedOverlayMinWidth","minWidth"],minHeight:[u.None,"cdkConnectedOverlayMinHeight","minHeight"],backdropClass:[u.None,"cdkConnectedOverlayBackdropClass","backdropClass"],panelClass:[u.None,"cdkConnectedOverlayPanelClass","panelClass"],viewportMargin:[u.None,"cdkConnectedOverlayViewportMargin","viewportMargin"],scrollStrategy:[u.None,"cdkConnectedOverlayScrollStrategy","scrollStrategy"],open:[u.None,"cdkConnectedOverlayOpen","open"],disableClose:[u.None,"cdkConnectedOverlayDisableClose","disableClose"],transformOriginSelector:[u.None,"cdkConnectedOverlayTransformOriginOn","transformOriginSelector"],hasBackdrop:[u.HasDecoratorInputTransform,"cdkConnectedOverlayHasBackdrop","hasBackdrop",x],lockPosition:[u.HasDecoratorInputTransform,"cdkConnectedOverlayLockPosition","lockPosition",x],flexibleDimensions:[u.HasDecoratorInputTransform,"cdkConnectedOverlayFlexibleDimensions","flexibleDimensions",x],growAfterOpen:[u.HasDecoratorInputTransform,"cdkConnectedOverlayGrowAfterOpen","growAfterOpen",x],push:[u.HasDecoratorInputTransform,"cdkConnectedOverlayPush","push",x],disposeOnNavigation:[u.HasDecoratorInputTransform,"cdkConnectedOverlayDisposeOnNavigation","disposeOnNavigation",x]},outputs:{backdropClick:"backdropClick",positionChange:"positionChange",attach:"attach",detach:"detach",overlayKeydown:"overlayKeydown",overlayOutsideClick:"overlayOutsideClick"},exportAs:["cdkConnectedOverlay"],standalone:!0,features:[tt,K]})}}return r})();function ie(r){return()=>r.scrollStrategies.reposition()}var se={provide:At,deps:[Z],useFactory:ie},ei=(()=>{class r{static{this.\u0275fac=function(i){return new(i||r)}}static{this.\u0275mod=M({type:r})}static{this.\u0275inj=B({providers:[Z,se],imports:[T,Et,st,st]})}}return r})();export{Y as a,Xt as b,H as c,Dt as d,W as e,zt as f,ht as g,ct as h,Z as i,Tt as j,ti as k,ei as l};