-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathchunk-T7S57SFR.js
1 lines (1 loc) · 17.1 KB
/
chunk-T7S57SFR.js
1
import{a as fe,c as ge,d as pe,e as V,f as me}from"./chunk-MABOOWEJ.js";import{B as le,I as U,d as he,f as h,m as de,n as L,r as E}from"./chunk-RAJBATEM.js";import{Aa as te,B as _,Ca as N,D as R,E as x,Fa as O,Ga as k,J as Q,Lb as K,M as T,Nb as b,O as X,Tb as re,Vb as oe,W as y,Wb as ae,X as $,Y as u,a as m,aa as q,ba as J,bc as D,cb as S,da as p,fb as ie,ga as r,ha as P,ia as B,ib as C,ja as H,jb as ne,k as d,na as ee,oa as g,tb as M,uc as ue,w as v,x as I,xb as se,xc as ce,z as F}from"./chunk-FNSPSJSE.js";var ye=(()=>{let i=class i{};i.\u0275fac=function(t){return new(t||i)},i.\u0275dir=g({type:i,selectors:[["","cdkMenuGroup",""]],hostAttrs:["role","group",1,"cdk-menu-group"],exportAs:["cdkMenuGroup"],standalone:!0,features:[D([{provide:U,useClass:U}])]});let n=i;return n})(),Z=new p("cdk-menu"),l=function(n){return n[n.nextItem=0]="nextItem",n[n.previousItem=1]="previousItem",n[n.currentItem=2]="currentItem",n}(l||{}),f=new p("cdk-menu-stack"),Te={provide:f,deps:[[new B,new H,new P(f)]],useFactory:n=>n||new ke},Oe=n=>({provide:f,deps:[[new B,new H,new P(f)]],useFactory:i=>i||ke.inline(n)}),Se=0,ke=(()=>{let i=class i{constructor(){this.id=`${Se++}`,this._elements=[],this._close=new d,this._empty=new d,this._hasFocus=new d,this.closed=this._close,this.hasFocus=this._hasFocus.pipe(y(!1),Q(0),X()),this.emptied=this._empty,this._inlineMenuOrientation=null}static inline(e){let t=new i;return t._inlineMenuOrientation=e,t}push(e){this._elements.push(e)}close(e,t){let{focusNextOnEmpty:s,focusParentTrigger:o}=m({},t);if(this._elements.indexOf(e)>=0){let a;do a=this._elements.pop(),this._close.next({item:a,focusParentTrigger:o});while(a!==e);this.isEmpty()&&this._empty.next(s)}}closeSubMenuOf(e){let t=!1;if(this._elements.indexOf(e)>=0)for(t=this.peek()!==e;this.peek()!==e;)this._close.next({item:this._elements.pop()});return t}closeAll(e){let{focusNextOnEmpty:t,focusParentTrigger:s}=m({},e);if(!this.isEmpty()){for(;!this.isEmpty();){let o=this._elements.pop();o&&this._close.next({item:o,focusParentTrigger:s})}this._empty.next(t)}}isEmpty(){return!this._elements.length}length(){return this._elements.length}peek(){return this._elements[this._elements.length-1]}hasInlineMenu(){return this._inlineMenuOrientation!=null}inlineMenuOrientation(){return this._inlineMenuOrientation}setHasFocus(e){this._hasFocus.next(e)}};i.\u0275fac=function(t){return new(t||i)},i.\u0275prov=q({token:i,factory:i.\u0275fac});let n=i;return n})(),Y=new p("cdk-menu-trigger"),Ce=new p("cdk-menu-scroll-strategy",{providedIn:"root",factory:()=>{let n=r(V);return()=>n.scrollStrategies.reposition()}}),De=(()=>{let i=class i{constructor(){this.injector=r(N),this.viewContainerRef=r(ie),this.menuStack=r(f),this.menuScrollStrategy=r(Ce),this.opened=new k,this.closed=new k,this.overlayRef=null,this.destroyed=new d,this.stopOutsideClicksListener=R(this.closed,this.destroyed)}ngOnDestroy(){this._destroyOverlay(),this.destroyed.next(),this.destroyed.complete()}isOpen(){return!!this.overlayRef?.hasAttached()}registerChildMenu(e){this.childMenu=e}getMenuContentPortal(){let e=this.menuTemplateRef!==this._menuPortal?.templateRef;return this.menuTemplateRef&&(!this._menuPortal||e)&&(this._menuPortal=new le(this.menuTemplateRef,this.viewContainerRef,this.menuData,this._getChildMenuInjector())),this._menuPortal}isElementInsideMenuStack(e){for(let t=e;t;t=t?.parentElement??null)if(t.getAttribute("data-cdk-menu-stack-id")===this.menuStack.id)return!0;return!1}_destroyOverlay(){this.overlayRef&&(this.overlayRef.dispose(),this.overlayRef=null)}_getChildMenuInjector(){return this._childMenuInjector=this._childMenuInjector||N.create({providers:[{provide:Y,useValue:this},{provide:f,useValue:this.menuStack}],parent:this.injector}),this._childMenuInjector}};i.\u0275fac=function(t){return new(t||i)},i.\u0275dir=g({type:i,hostVars:2,hostBindings:function(t,s){t&2&&M("aria-controls",s.childMenu==null?null:s.childMenu.id)("data-cdk-menu-stack-id",s.menuStack.id)},standalone:!0});let n=i;return n})();var G=new p("cdk-menu-aim");function Me(n,i){if(!i.isTrusted)return!1;let c=n.nativeElement,e=i.keyCode;return c.nodeName==="BUTTON"&&!c.disabled?e===13||e===32:c.nodeName==="A"?e===13:!1}var Ee=(()=>{let i=class i extends De{constructor(){super(),this._elementRef=r(O),this._overlay=r(V),this._ngZone=r(S),this._changeDetectorRef=r(ue),this._inputModalityDetector=r(L),this._directionality=r(E,{optional:!0}),this._parentMenu=r(Z,{optional:!0}),this._menuAim=r(G,{optional:!0}),this._setRole(),this._registerCloseHandler(),this._subscribeToMenuStackClosed(),this._subscribeToMouseEnter(),this._subscribeToMenuStackHasFocus(),this._setType()}toggle(){this.isOpen()?this.close():this.open()}open(){!this.isOpen()&&this.menuTemplateRef!=null&&(this.opened.next(),this.overlayRef=this.overlayRef||this._overlay.create(this._getOverlayConfig()),this.overlayRef.attach(this.getMenuContentPortal()),this._changeDetectorRef.markForCheck(),this._subscribeToOutsideClicks())}close(){this.isOpen()&&(this.closed.next(),this.overlayRef.detach(),this._changeDetectorRef.markForCheck()),this._closeSiblingTriggers()}getMenu(){return this.childMenu}_toggleOnKeydown(e){let t=this._parentMenu?.orientation==="vertical";switch(e.keyCode){case 32:case 13:!h(e)&&!Me(this._elementRef,e)&&(this.toggle(),this.childMenu?.focusFirstItem("keyboard"));break;case 39:h(e)||this._parentMenu&&t&&this._directionality?.value!=="rtl"&&(e.preventDefault(),this.open(),this.childMenu?.focusFirstItem("keyboard"));break;case 37:h(e)||this._parentMenu&&t&&this._directionality?.value==="rtl"&&(e.preventDefault(),this.open(),this.childMenu?.focusFirstItem("keyboard"));break;case 40:case 38:h(e)||t||(e.preventDefault(),this.open(),e.keyCode===40?this.childMenu?.focusFirstItem("keyboard"):this.childMenu?.focusLastItem("keyboard"));break}}_handleClick(){this.toggle(),this.childMenu?.focusFirstItem("mouse")}_setHasFocus(e){this._parentMenu||this.menuStack.setHasFocus(e)}_subscribeToMouseEnter(){this._ngZone.runOutsideAngular(()=>{_(this._elementRef.nativeElement,"mouseenter").pipe(x(()=>this._inputModalityDetector.mostRecentModality!=="touch"&&!this.menuStack.isEmpty()&&!this.isOpen()),u(this.destroyed)).subscribe(()=>{let e=()=>this._ngZone.run(()=>{this._closeSiblingTriggers(),this.open()});this._menuAim?this._menuAim.toggle(e):e()})})}_closeSiblingTriggers(){this._parentMenu?!this.menuStack.closeSubMenuOf(this._parentMenu)&&this.menuStack.peek()!==this._parentMenu&&this.menuStack.closeAll():this.menuStack.closeAll()}_getOverlayConfig(){return new fe({positionStrategy:this._getOverlayPositionStrategy(),scrollStrategy:this.menuScrollStrategy(),direction:this._directionality||void 0})}_getOverlayPositionStrategy(){return this._overlay.position().flexibleConnectedTo(this._elementRef).withLockedPosition().withGrowAfterOpen().withPositions(this._getOverlayPositions())}_getOverlayPositions(){return this.menuPosition??(!this._parentMenu||this._parentMenu.orientation==="horizontal"?ge:pe)}_registerCloseHandler(){this._parentMenu||this.menuStack.closed.pipe(u(this.destroyed)).subscribe(({item:e})=>{e===this.childMenu&&this.close()})}_subscribeToOutsideClicks(){this.overlayRef&&this.overlayRef.outsidePointerEvents().pipe(u(this.stopOutsideClicksListener)).subscribe(e=>{let t=he(e),s=this._elementRef.nativeElement;t!==s&&!s.contains(t)&&(this.isElementInsideMenuStack(t)?this._closeSiblingTriggers():this.menuStack.closeAll())})}_subscribeToMenuStackHasFocus(){this._parentMenu||this.menuStack.hasFocus.pipe(u(this.destroyed)).subscribe(e=>{e||this.menuStack.closeAll()})}_subscribeToMenuStackClosed(){this._parentMenu||this.menuStack.closed.subscribe(({focusParentTrigger:e})=>{e&&!this.menuStack.length()&&this._elementRef.nativeElement.focus()})}_setRole(){this._parentMenu||this._elementRef.nativeElement.setAttribute("role","button")}_setType(){let e=this._elementRef.nativeElement;e.nodeName==="BUTTON"&&!e.getAttribute("type")&&e.setAttribute("type","button")}};i.\u0275fac=function(t){return new(t||i)},i.\u0275dir=g({type:i,selectors:[["","cdkMenuTriggerFor",""]],hostAttrs:[1,"cdk-menu-trigger"],hostVars:2,hostBindings:function(t,s){t&1&&b("focusin",function(){return s._setHasFocus(!0)})("focusout",function(){return s._setHasFocus(!1)})("keydown",function(a){return s._toggleOnKeydown(a)})("click",function(){return s._handleClick()}),t&2&&M("aria-haspopup",s.menuTemplateRef?"menu":null)("aria-expanded",s.menuTemplateRef==null?null:s.isOpen())},inputs:{menuTemplateRef:[0,"cdkMenuTriggerFor","menuTemplateRef"],menuPosition:[0,"cdkMenuPosition","menuPosition"],menuData:[0,"cdkMenuTriggerData","menuData"]},outputs:{opened:"cdkMenuOpened",closed:"cdkMenuClosed"},exportAs:["cdkMenuTriggerFor"],standalone:!0,features:[D([{provide:Y,useExisting:i},Te]),C]});let n=i;return n})(),we=(()=>{let i=class i{get hasMenu(){return this._menuTrigger?.menuTemplateRef!=null}constructor(){this._dir=r(E,{optional:!0}),this._elementRef=r(O),this._ngZone=r(S),this._inputModalityDetector=r(L),this._menuAim=r(G,{optional:!0}),this._menuStack=r(f),this._parentMenu=r(Z,{optional:!0}),this._menuTrigger=r(Ee,{optional:!0,self:!0}),this.disabled=!1,this.triggered=new k,this._tabindex=-1,this.closeOnSpacebarTrigger=!0,this.destroyed=new d,this._setupMouseEnter(),this._setType(),this._isStandaloneItem()&&(this._tabindex=0)}ngOnDestroy(){this.destroyed.next(),this.destroyed.complete()}focus(){this._elementRef.nativeElement.focus()}trigger(e){let{keepOpen:t}=m({},e);!this.disabled&&!this.hasMenu&&(this.triggered.next(),t||this._menuStack.closeAll({focusParentTrigger:!0}))}isMenuOpen(){return!!this._menuTrigger?.isOpen()}getMenu(){return this._menuTrigger?.getMenu()}getMenuTrigger(){return this._menuTrigger}getLabel(){return this.typeaheadLabel||this._elementRef.nativeElement.textContent?.trim()||""}_resetTabIndex(){this._isStandaloneItem()||(this._tabindex=-1)}_setTabIndex(e){this.disabled||(!e||!this._menuStack.isEmpty())&&(this._tabindex=0)}_onKeydown(e){switch(e.keyCode){case 32:case 13:!h(e)&&!Me(this._elementRef,e)&&this.trigger({keepOpen:e.keyCode===32&&!this.closeOnSpacebarTrigger});break;case 39:h(e)||this._parentMenu&&this._isParentVertical()&&(this._dir?.value!=="rtl"?this._forwardArrowPressed(e):this._backArrowPressed(e));break;case 37:h(e)||this._parentMenu&&this._isParentVertical()&&(this._dir?.value!=="rtl"?this._backArrowPressed(e):this._forwardArrowPressed(e));break}}_isStandaloneItem(){return!this._parentMenu}_backArrowPressed(e){let t=this._parentMenu;(this._menuStack.hasInlineMenu()||this._menuStack.length()>1)&&(e.preventDefault(),this._menuStack.close(t,{focusNextOnEmpty:this._menuStack.inlineMenuOrientation()==="horizontal"?l.previousItem:l.currentItem,focusParentTrigger:!0}))}_forwardArrowPressed(e){!this.hasMenu&&this._menuStack.inlineMenuOrientation()==="horizontal"&&(e.preventDefault(),this._menuStack.closeAll({focusNextOnEmpty:l.nextItem,focusParentTrigger:!0}))}_setupMouseEnter(){if(!this._isStandaloneItem()){let e=()=>this._ngZone.run(()=>this._menuStack.closeSubMenuOf(this._parentMenu));this._ngZone.runOutsideAngular(()=>_(this._elementRef.nativeElement,"mouseenter").pipe(x(()=>this._inputModalityDetector.mostRecentModality!=="touch"&&!this._menuStack.isEmpty()&&!this.hasMenu),u(this.destroyed)).subscribe(()=>{this._menuAim?this._menuAim.toggle(e):e()}))}}_isParentVertical(){return this._parentMenu?.orientation==="vertical"}_setType(){let e=this._elementRef.nativeElement;e.nodeName==="BUTTON"&&!e.getAttribute("type")&&e.setAttribute("type","button")}};i.\u0275fac=function(t){return new(t||i)},i.\u0275dir=g({type:i,selectors:[["","cdkMenuItem",""]],hostAttrs:["role","menuitem",1,"cdk-menu-item"],hostVars:2,hostBindings:function(t,s){t&1&&b("blur",function(){return s._resetTabIndex()})("focus",function(){return s._setTabIndex()})("click",function(){return s.trigger()})("keydown",function(a){return s._onKeydown(a)}),t&2&&(K("tabindex",s._tabindex),M("aria-disabled",s.disabled||null))},inputs:{disabled:[2,"cdkMenuItemDisabled","disabled",ce],typeaheadLabel:[0,"cdkMenuitemTypeaheadLabel","typeaheadLabel"]},outputs:{triggered:"cdkMenuItemTriggered"},exportAs:["cdkMenuItem"],standalone:!0,features:[ne]});let n=i;return n})(),j=class{constructor(i){this._items=i,this.entered=this._getItemPointerEntries(),this.exited=this._getItemPointerExits(),this._destroyed=new d,this.entered.subscribe(c=>this.activeElement=c),this.exited.subscribe(()=>{this.previousElement=this.activeElement,this.activeElement=void 0})}destroy(){this._destroyed.next(),this._destroyed.complete()}_getItemPointerEntries(){return F(()=>this._items.changes.pipe(y(this._items),v(i=>i.map(c=>_(c._elementRef.nativeElement,"mouseenter").pipe(T(c),u(this._items.changes)))),I()))}_getItemPointerExits(){return F(()=>this._items.changes.pipe(y(this._items),v(i=>i.map(c=>_(c._elementRef.nativeElement,"mouseout").pipe(T(c),u(this._items.changes)))),I()))}},Ae=0,Fe=(()=>{let i=class i extends ye{constructor(){super(...arguments),this.nativeElement=r(O).nativeElement,this.ngZone=r(S),this.menuStack=r(f),this.menuAim=r(G,{optional:!0,self:!0}),this.dir=r(E,{optional:!0}),this.id=`cdk-menu-${Ae++}`,this.orientation="vertical",this.isInline=!1,this.destroyed=new d,this._menuStackHasFocus=!1}ngAfterContentInit(){this.isInline||this.menuStack.push(this),this._setKeyManager(),this._subscribeToMenuStackHasFocus(),this._subscribeToMenuOpen(),this._subscribeToMenuStackClosed(),this._setUpPointerTracker()}ngOnDestroy(){this.keyManager?.destroy(),this.destroyed.next(),this.destroyed.complete(),this.pointerTracker?.destroy()}focusFirstItem(e="program"){this.keyManager.setFocusOrigin(e),this.keyManager.setFirstItemActive()}focusLastItem(e="program"){this.keyManager.setFocusOrigin(e),this.keyManager.setLastItemActive()}_getTabIndex(){let e=this._menuStackHasFocus?-1:0;return this.isInline?e:null}closeOpenMenu(e,t){let{focusParentTrigger:s}=m({},t),o=this.keyManager,a=this.triggerItem;e===a?.getMenuTrigger()?.getMenu()&&(a?.getMenuTrigger()?.close(),s&&(a?o.setActiveItem(a):o.setFirstItemActive()))}_setKeyManager(){this.keyManager=new de(this.items).withWrap().withTypeAhead().withHomeAndEnd(),this.orientation==="horizontal"?this.keyManager.withHorizontalOrientation(this.dir?.value||"ltr"):this.keyManager.withVerticalOrientation()}_subscribeToMenuOpen(){let e=R(this.items.changes,this.destroyed);this.items.changes.pipe(y(this.items),v(t=>t.filter(s=>s.hasMenu).map(s=>s.getMenuTrigger().opened.pipe(T(s),u(e)))),I(),$(t=>(this.triggerItem=t,t.getMenuTrigger().closed)),u(this.destroyed)).subscribe(()=>this.triggerItem=void 0)}_subscribeToMenuStackClosed(){this.menuStack.closed.pipe(u(this.destroyed)).subscribe(({item:e,focusParentTrigger:t})=>this.closeOpenMenu(e,{focusParentTrigger:t}))}_subscribeToMenuStackHasFocus(){this.isInline&&this.menuStack.hasFocus.pipe(u(this.destroyed)).subscribe(e=>{this._menuStackHasFocus=e})}_setUpPointerTracker(){this.menuAim&&(this.ngZone.runOutsideAngular(()=>{this.pointerTracker=new j(this.items)}),this.menuAim.initialize(this,this.pointerTracker))}};i.\u0275fac=(()=>{let e;return function(s){return(e||(e=te(i)))(s||i)}})(),i.\u0275dir=g({type:i,contentQueries:function(t,s,o){if(t&1&&re(o,we,5),t&2){let a;oe(a=ae())&&(s.items=a)}},hostAttrs:["role","menu"],hostVars:4,hostBindings:function(t,s){t&1&&b("focus",function(){return s.focusFirstItem()})("focusin",function(){return s.menuStack.setHasFocus(!0)})("focusout",function(){return s.menuStack.setHasFocus(!1)}),t&2&&(K("tabindex",s._getTabIndex())("id",s.id),M("aria-orientation",s.orientation)("data-cdk-menu-stack-id",s.menuStack.id))},inputs:{id:"id"},standalone:!0,features:[C]});let n=i;return n})(),et=(()=>{let i=class i extends Fe{constructor(){super(),this._parentTrigger=r(Y,{optional:!0}),this.closed=new k,this.orientation="vertical",this.isInline=!this._parentTrigger,this.destroyed.subscribe(this.closed),this._parentTrigger?.registerChildMenu(this)}ngAfterContentInit(){super.ngAfterContentInit(),this._subscribeToMenuStackEmptied()}ngOnDestroy(){super.ngOnDestroy(),this.closed.complete()}_handleKeyEvent(e){let t=this.keyManager;switch(e.keyCode){case 37:case 39:h(e)||(e.preventDefault(),t.setFocusOrigin("keyboard"),t.onKeydown(e));break;case 27:h(e)||(e.preventDefault(),this.menuStack.close(this,{focusNextOnEmpty:l.currentItem,focusParentTrigger:!0}));break;case 9:h(e,"altKey","metaKey","ctrlKey")||this.menuStack.closeAll({focusParentTrigger:!0});break;default:t.onKeydown(e)}}_toggleMenuFocus(e){let t=this.keyManager;switch(e){case l.nextItem:t.setFocusOrigin("keyboard"),t.setNextItemActive();break;case l.previousItem:t.setFocusOrigin("keyboard"),t.setPreviousItemActive();break;case l.currentItem:t.activeItem&&(t.setFocusOrigin("keyboard"),t.setActiveItem(t.activeItem));break}}_subscribeToMenuStackEmptied(){this.menuStack.emptied.pipe(u(this.destroyed)).subscribe(e=>this._toggleMenuFocus(e))}};i.\u0275fac=function(t){return new(t||i)},i.\u0275dir=g({type:i,selectors:[["","cdkMenu",""]],hostAttrs:["role","menu",1,"cdk-menu"],hostVars:2,hostBindings:function(t,s){t&1&&b("keydown",function(a){return s._handleKeyEvent(a)}),t&2&&se("cdk-menu-inline",s.isInline)},outputs:{closed:"closed"},exportAs:["cdkMenu"],standalone:!0,features:[D([{provide:ye,useExisting:i},{provide:Z,useExisting:i},Oe("vertical")]),C]});let n=i;return n})();var tt=(()=>{let i=class i{};i.\u0275fac=function(t){return new(t||i)},i.\u0275mod=ee({type:i}),i.\u0275inj=J({imports:[me]});let n=i;return n})();export{Ee as a,we as b,et as c,tt as d};