UNPKG

p3x-redis-ui-material

Version:

💿 P3X Redis UI triple frontend — Angular + React/MUI + Vue/Vuetify with 54 languages, 7 themes, Socket.IO, desktop notifications, and full feature parity

197 lines (190 loc) 29 kB
import{a as F,i as E}from"./main-OCJB5534.js";import{$t as Vp,Ai as wy,At as R,C as EE,Di as wf,Ei as wE,Fi as xi,Ft as Ro,H as In,Hn as cw,Hr as nn,Ii as xk,Ir as mo,Jr as os,Kn as dp,Ln as cl,Ni as xe,Nr as mE,O as Fr,On as aE,Pi as xf,Pr as mc,Rr as nJ,S as Do,Si as v0,T as Ee$1,Ut as Tn,V as I,Vr as nl,W as J$1,Wi as ze$1,Yn as f0,Zr as q,Zt as V$1,_ as Cf,_r as jo,ai as re,bt as Pc,c as A0,dn as Xe,dt as Nc,fr as io,gn as Z,gt as O,in as Wa,ir as h,it as M,kr as lt,lr as hy,mi as te,mr as iw,n as $e$1,qr as oe,ti as qi,wi as vt,wn as _e,wr as lc,xi as v,xn as Zp,z as Hx,zt as T0}from"./chunk-CHqDEyfr.js";function Me(i,a){}var g=class{viewContainerRef;injector;id;role=`dialog`;panelClass=``;hasBackdrop=!0;backdropClass=``;disableClose=!1;closePredicate;width=``;height=``;minWidth;minHeight;maxWidth;maxHeight;positionStrategy;data=null;direction;ariaDescribedBy=null;ariaLabelledBy=null;ariaLabel=null;ariaModal=!1;autoFocus=`first-tabbable`;restoreFocus=!0;scrollStrategy;closeOnNavigation=!0;closeOnDestroy=!0;closeOnOverlayDetachments=!0;disableAnimations=!1;providers;container;templateContext;bindings};var K=(()=>{class i extends nl{_elementRef=h(q);_focusTrapFactory=h(T0);_config;_interactivityChecker=h(v0);_ngZone=h(O);_focusMonitor=h(Pc);_renderer=h(Xe);_changeDetectorRef=h(mc);_injector=h(V$1);_platform=h(re);_document=h(R);_portalOutlet;_focusTrapped=new I;_focusTrap=null;_elementFocusedBeforeDialogWasOpened=null;_closeInteractionType=null;_ariaLabelledByQueue=[];_isDestroyed=!1;constructor(){super(),this._config=h(g,{optional:!0})||new g,this._config.ariaLabelledBy&&this._ariaLabelledByQueue.push(this._config.ariaLabelledBy)}_addAriaLabelledBy(e){this._ariaLabelledByQueue.push(e),this._changeDetectorRef.markForCheck()}_removeAriaLabelledBy(e){let t=this._ariaLabelledByQueue.indexOf(e);t>-1&&(this._ariaLabelledByQueue.splice(t,1),this._changeDetectorRef.markForCheck())}_contentAttached(){this._initializeFocusTrap(),this._captureInitialFocus()}_captureInitialFocus(){this._trapFocus()}ngOnDestroy(){this._focusTrapped.complete(),this._isDestroyed=!0,this._restoreFocus()}attachComponentPortal(e){this._portalOutlet.hasAttached();let t=this._portalOutlet.attachComponentPortal(e);return this._contentAttached(),t}attachTemplatePortal(e){this._portalOutlet.hasAttached();let t=this._portalOutlet.attachTemplatePortal(e);return this._contentAttached(),t}attachDomPortal=e=>{this._portalOutlet.hasAttached();let t=this._portalOutlet.attachDomPortal(e);return this._contentAttached(),t};_recaptureFocus(){this._containsFocus()||this._trapFocus()}_forceFocus(e,t){this._interactivityChecker.isFocusable(e)||(e.tabIndex=-1,this._ngZone.runOutsideAngular(()=>{let n=()=>{o(),l(),e.removeAttribute(`tabindex`)},o=this._renderer.listen(e,`blur`,n),l=this._renderer.listen(e,`mousedown`,n)})),e.focus(t)}_focusByCssSelector(e,t){let n=this._elementRef.nativeElement.querySelector(e);n&&this._forceFocus(n,t)}_trapFocus(e){this._isDestroyed||In(()=>{let t=this._elementRef.nativeElement;switch(this._config.autoFocus){case!1:case`dialog`:this._containsFocus()||t.focus(e);break;case!0:case`first-tabbable`:this._focusTrap?.focusInitialElement(e)||this._focusDialogContainer(e);break;case`first-heading`:this._focusByCssSelector(`h1, h2, h3, h4, h5, h6, [role="heading"]`,e);break;default:this._focusByCssSelector(this._config.autoFocus,e);break}this._focusTrapped.next()},{injector:this._injector})}_restoreFocus(){let e=this._config.restoreFocus,t=null;if(typeof e==`string`?t=this._document.querySelector(e):typeof e==`boolean`?t=e?this._elementFocusedBeforeDialogWasOpened:null:e&&(t=e),this._config.restoreFocus&&t&&typeof t.focus==`function`){let n=f0(),o=this._elementRef.nativeElement;(!n||n===this._document.body||n===o||o.contains(n))&&(this._focusMonitor?(this._focusMonitor.focusVia(t,this._closeInteractionType),this._closeInteractionType=null):t.focus())}this._focusTrap&&this._focusTrap.destroy()}_focusDialogContainer(e){this._elementRef.nativeElement.focus?.(e)}_containsFocus(){let e=this._elementRef.nativeElement,t=f0();return e===t||e.contains(t)}_initializeFocusTrap(){this._platform.isBrowser&&(this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._document&&(this._elementFocusedBeforeDialogWasOpened=f0()))}static ɵfac=function(t){return new(t||i)};static ɵcmp=Ee$1({type:i,selectors:[[`cdk-dialog-container`]],viewQuery:function(t,n){if(t&1&&lc(nJ,7),t&2){let o;Cf(o=xf())&&(n._portalOutlet=o.first)}},hostAttrs:[`tabindex`,`-1`,1,`cdk-dialog-container`],hostVars:6,hostBindings:function(t,n){t&2&&xi(`id`,n._config.id||null)(`role`,n._config.role)(`aria-modal`,n._config.ariaModal)(`aria-labelledby`,n._config.ariaLabel?null:n._ariaLabelledByQueue[0])(`aria-label`,n._config.ariaLabel)(`aria-describedby`,n._config.ariaDescribedBy||null)},features:[ze$1],decls:1,vars:0,consts:[[`cdkPortalOutlet`,``]],template:function(t,n){t&1&&hy(0,Me,0,0,`ng-template`,0)},dependencies:[nJ],styles:[`.cdk-dialog-container { display: block; width: 100%; height: 100%; min-height: inherit; max-height: inherit; } `],encapsulation:2,changeDetection:1})}return i})();var p=class{overlayRef;config;componentInstance=null;componentRef=null;containerInstance;disableClose;closed=new I;backdropClick;keydownEvents;outsidePointerEvents;id;_detachSubscription;constructor(a,e){this.overlayRef=a,this.config=e,this.disableClose=e.disableClose,this.backdropClick=a.backdropClick(),this.keydownEvents=a.keydownEvents(),this.outsidePointerEvents=a.outsidePointerEvents(),this.id=e.id,this.keydownEvents.subscribe(t=>{t.keyCode===27&&!this.disableClose&&!Nc(t)&&(t.preventDefault(),this.close(void 0,{focusOrigin:`keyboard`}))}),this.backdropClick.subscribe(()=>{!this.disableClose&&this._canClose()?this.close(void 0,{focusOrigin:`mouse`}):this.containerInstance._recaptureFocus?.()}),this._detachSubscription=a.detachments().subscribe(()=>{e.closeOnOverlayDetachments!==!1&&this.close()})}close(a,e){if(this._canClose(a)){let t=this.closed;this.containerInstance._closeInteractionType=e?.focusOrigin||`program`,this._detachSubscription.unsubscribe(),this.overlayRef.dispose(),t.next(a),t.complete(),this.componentInstance=this.containerInstance=null}}updatePosition(){return this.overlayRef.updatePosition(),this}updateSize(a=``,e=``){return this.overlayRef.updateSize({width:a,height:e}),this}addPanelClass(a){return this.overlayRef.addPanelClass(a),this}removePanelClass(a){return this.overlayRef.removePanelClass(a),this}_canClose(a){let e=this.config;return!!this.containerInstance&&(!e.closePredicate||e.closePredicate(a,e,this.componentInstance))}};var Be=new v(`DialogScrollStrategy`,{providedIn:`root`,factory:()=>{let i=h(V$1);return()=>mE(i)}});var je=new v(`DialogData`);var Ve=new v(`DefaultDialogConfig`);function ze(i){let a=xe(i),e=new J$1;return{valueSignal:a,get value(){return a()},change:e,ngOnDestroy(){e.complete()}}}var X=(()=>{class i{_injector=h(V$1);_defaultOptions=h(Ve,{optional:!0});_parentDialog=h(i,{optional:!0,skipSelf:!0});_overlayContainer=h(EE);_idGenerator=h(qi);_openDialogsAtThisLevel=[];_afterAllClosedAtThisLevel=new I;_afterOpenedAtThisLevel=new I;_ariaHiddenElements=new Map;_scrollStrategy=h(Be);get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}afterAllClosed=iw(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(Fr(void 0)));open(e,t){t=E(E({},this._defaultOptions||new g),t),t.id=t.id||this._idGenerator.getId(`cdk-dialog-`),t.id&&this.getDialogById(t.id);let o=this._getOverlayConfig(t),l=Zp(this._injector,o),r=new p(l,t),d=this._attachContainer(l,r,t);if(r.containerInstance=d,!this.openDialogs.length){let H=this._overlayContainer.getContainerElement();d._focusTrapped?d._focusTrapped.pipe(lt(1)).subscribe(()=>{this._hideNonDialogContentFromAssistiveTechnology(H)}):this._hideNonDialogContentFromAssistiveTechnology(H)}return this._attachDialogContent(e,r,d,t),this.openDialogs.push(r),r.closed.subscribe(()=>this._removeOpenDialog(r,!0)),this.afterOpened.next(r),r}closeAll(){$(this.openDialogs,e=>e.close())}getDialogById(e){return this.openDialogs.find(t=>t.id===e)}ngOnDestroy(){$(this._openDialogsAtThisLevel,e=>{e.config.closeOnDestroy===!1&&this._removeOpenDialog(e,!1)}),$(this._openDialogsAtThisLevel,e=>e.close()),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete(),this._openDialogsAtThisLevel=[]}_getOverlayConfig(e){let t=new os({positionStrategy:e.positionStrategy||wE().centerHorizontally().centerVertically(),scrollStrategy:e.scrollStrategy||this._scrollStrategy(),panelClass:e.panelClass,hasBackdrop:e.hasBackdrop,direction:e.direction,minWidth:e.minWidth,minHeight:e.minHeight,maxWidth:e.maxWidth,maxHeight:e.maxHeight,width:e.width,height:e.height,disposeOnNavigation:e.closeOnNavigation,disableAnimations:e.disableAnimations});return e.backdropClass&&(t.backdropClass=e.backdropClass),t}_attachContainer(e,t,n){let o=n.injector||n.viewContainerRef?.injector,l=[{provide:g,useValue:n},{provide:p,useValue:t},{provide:cl,useValue:e}],r;n.container?typeof n.container==`function`?r=n.container:(r=n.container.type,l.push(...n.container.providers(n))):r=K;let d=new Vp(r,n.viewContainerRef,V$1.create({parent:o||this._injector,providers:l}));return e.attach(d).instance}_attachDialogContent(e,t,n,o){if(e instanceof $e$1){let l=this._createInjector(o,t,n,void 0),r={$implicit:o.data,dialogRef:t};o.templateContext&&(r=E(E({},r),typeof o.templateContext==`function`?o.templateContext():o.templateContext)),n.attachTemplatePortal(new Ro(e,null,r,l))}else{let l=this._createInjector(o,t,n,this._injector),r=n.attachComponentPortal(new Vp(e,o.viewContainerRef,l,null,o.bindings));t.componentRef=r,t.componentInstance=r.instance}}_createInjector(e,t,n,o){let l=e.injector||e.viewContainerRef?.injector,r=[{provide:je,useValue:e.data},{provide:p,useValue:t}];return e.providers&&(typeof e.providers==`function`?r.push(...e.providers(t,e,n)):r.push(...e.providers)),e.direction&&(!l||!l.get(mo,null,{optional:!0}))&&r.push({provide:mo,useValue:ze(e.direction)}),V$1.create({parent:l||o,providers:r})}_removeOpenDialog(e,t){let n=this.openDialogs.indexOf(e);n>-1&&(this.openDialogs.splice(n,1),this.openDialogs.length||(this._ariaHiddenElements.forEach((o,l)=>{o?l.setAttribute(`aria-hidden`,o):l.removeAttribute(`aria-hidden`)}),this._ariaHiddenElements.clear(),t&&this._getAfterAllClosed().next()))}_hideNonDialogContentFromAssistiveTechnology(e){if(e.parentElement){let t=e.parentElement.children;for(let n=t.length-1;n>-1;n--){let o=t[n];o!==e&&o.nodeName!==`SCRIPT`&&o.nodeName!==`STYLE`&&!o.hasAttribute(`aria-live`)&&!o.hasAttribute(`popover`)&&(this._ariaHiddenElements.set(o,o.getAttribute(`aria-hidden`)),o.setAttribute(`aria-hidden`,`true`))}}}_getAfterAllClosed(){let e=this._parentDialog;return e?e._getAfterAllClosed():this._afterAllClosedAtThisLevel}static ɵfac=function(t){return new(t||i)};static ɵprov=M({token:i,factory:i.ɵfac})}return i})();function $(i,a){let e=i.length;for(;e--;)a(i[e])}var ke=(()=>{class i{static ɵfac=function(t){return new(t||i)};static ɵmod=oe({type:i});static ɵinj=te({providers:[X],imports:[xk,aE,A0,aE]})}return i})();function He(i,a){}var V=class{viewContainerRef;injector;id;role=`dialog`;panelClass=``;hasBackdrop=!0;backdropClass=``;disableClose=!1;closePredicate;width=``;height=``;minWidth;minHeight;maxWidth;maxHeight;position;data=null;direction;ariaDescribedBy=null;ariaLabelledBy=null;ariaLabel=null;ariaModal=!1;autoFocus=`first-tabbable`;restoreFocus=!0;delayFocusTrap=!0;scrollStrategy;closeOnNavigation=!0;enterAnimationDuration;exitAnimationDuration;bindings};var J=`mdc-dialog--open`;var Ie=`mdc-dialog--opening`;var Ee=`mdc-dialog--closing`;var Ge=150;var We=75;var Qe=(()=>{class i extends K{_animationStateChanged=new J$1;_animationsEnabled=!Do();_actionSectionCount=0;_hostElement=this._elementRef.nativeElement;_enterAnimationDuration=this._animationsEnabled?Ne(this._config.enterAnimationDuration)??Ge:0;_exitAnimationDuration=this._animationsEnabled?Ne(this._config.exitAnimationDuration)??We:0;_animationTimer=null;_contentAttached(){super._contentAttached(),this._startOpenAnimation()}_startOpenAnimation(){this._animationStateChanged.emit({state:`opening`,totalTime:this._enterAnimationDuration}),this._animationsEnabled?(this._hostElement.style.setProperty(Fe,`${this._enterAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(Ie,J)),this._waitForAnimationToComplete(this._enterAnimationDuration,this._finishDialogOpen)):(this._hostElement.classList.add(J),Promise.resolve().then(()=>this._finishDialogOpen()))}_startExitAnimation(){this._animationStateChanged.emit({state:`closing`,totalTime:this._exitAnimationDuration}),this._hostElement.classList.remove(J),this._animationsEnabled?(this._hostElement.style.setProperty(Fe,`${this._exitAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(Ee)),this._waitForAnimationToComplete(this._exitAnimationDuration,this._finishDialogClose)):Promise.resolve().then(()=>this._finishDialogClose())}_updateActionSectionCount(e){this._actionSectionCount+=e,this._changeDetectorRef.markForCheck()}_finishDialogOpen=()=>{this._clearAnimationClasses(),this._openAnimationDone(this._enterAnimationDuration)};_finishDialogClose=()=>{this._clearAnimationClasses(),this._animationStateChanged.emit({state:`closed`,totalTime:this._exitAnimationDuration})};_clearAnimationClasses(){this._hostElement.classList.remove(Ie,Ee)}_waitForAnimationToComplete(e,t){this._animationTimer!==null&&clearTimeout(this._animationTimer),this._animationTimer=setTimeout(t,e)}_requestAnimationFrame(e){this._ngZone.runOutsideAngular(()=>{typeof requestAnimationFrame==`function`?requestAnimationFrame(e):e()})}_captureInitialFocus(){this._config.delayFocusTrap||this._trapFocus()}_openAnimationDone(e){this._config.delayFocusTrap&&this._trapFocus(),this._animationStateChanged.next({state:`opened`,totalTime:e})}ngOnDestroy(){super.ngOnDestroy(),this._animationTimer!==null&&clearTimeout(this._animationTimer)}attachComponentPortal(e){let t=super.attachComponentPortal(e);return t.location.nativeElement.classList.add(`mat-mdc-dialog-component-host`),t}static ɵfac=(()=>{let e;return function(n){return(e||(e=io(i)))(n||i)}})();static ɵcmp=Ee$1({type:i,selectors:[[`mat-dialog-container`]],hostAttrs:[`tabindex`,`-1`,1,`mat-mdc-dialog-container`,`mdc-dialog`],hostVars:10,hostBindings:function(t,n){t&2&&(wy(`id`,n._config.id),xi(`aria-modal`,n._config.ariaModal)(`role`,n._config.role)(`aria-labelledby`,n._config.ariaLabel?null:n._ariaLabelledByQueue[0])(`aria-label`,n._config.ariaLabel)(`aria-describedby`,n._config.ariaDescribedBy||null),vt(`_mat-animation-noopable`,!n._animationsEnabled)(`mat-mdc-dialog-container-with-actions`,n._actionSectionCount>0))},features:[ze$1],decls:3,vars:0,consts:[[1,`mat-mdc-dialog-inner-container`,`mdc-dialog__container`],[1,`mat-mdc-dialog-surface`,`mdc-dialog__surface`],[`cdkPortalOutlet`,``]],template:function(t,n){t&1&&(Wa(0,`div`,0)(1,`div`,1),hy(2,He,0,0,`ng-template`,2),wf()())},dependencies:[nJ],styles:[`.mat-mdc-dialog-container { width: 100%; height: 100%; display: block; box-sizing: border-box; max-height: inherit; min-height: inherit; min-width: inherit; max-width: inherit; outline: 0; } .cdk-overlay-pane.mat-mdc-dialog-panel { max-width: var(--%NS%mat-dialog-container-max-width, 560px); min-width: var(--%NS%mat-dialog-container-min-width, 280px); } @media (max-width: 599px) { .cdk-overlay-pane.mat-mdc-dialog-panel { max-width: var(--%NS%mat-dialog-container-small-max-width, calc(100vw - 32px)); } } .mat-mdc-dialog-inner-container { display: flex; flex-direction: row; align-items: center; justify-content: space-around; box-sizing: border-box; height: 100%; opacity: 0; transition: opacity linear var(--%NS%mat-dialog-transition-duration, 0ms); max-height: inherit; min-height: inherit; min-width: inherit; max-width: inherit; } .mdc-dialog--closing .mat-mdc-dialog-inner-container { transition: opacity 75ms linear; transform: none; } .mdc-dialog--open .mat-mdc-dialog-inner-container { opacity: 1; } ._mat-animation-noopable .mat-mdc-dialog-inner-container { transition: none; } .mat-mdc-dialog-surface { display: flex; flex-direction: column; flex-grow: 0; flex-shrink: 0; box-sizing: border-box; width: 100%; height: 100%; position: relative; overflow-y: auto; outline: 0; transform: scale(0.8); transition: transform var(--%NS%mat-dialog-transition-duration, 0ms) cubic-bezier(0, 0, 0.2, 1); max-height: inherit; min-height: inherit; min-width: inherit; max-width: inherit; box-shadow: var(--%NS%mat-dialog-container-elevation-shadow, none); border-radius: var(--%NS%mat-dialog-container-shape, var(--%NS%mat-sys-corner-extra-large, 4px)); background-color: var(--%NS%mat-dialog-container-color, var(--%NS%mat-sys-surface, white)); } [dir=rtl] .mat-mdc-dialog-surface { text-align: right; } .mdc-dialog--open .mat-mdc-dialog-surface, .mdc-dialog--closing .mat-mdc-dialog-surface { transform: none; } ._mat-animation-noopable .mat-mdc-dialog-surface { transition: none; } .mat-mdc-dialog-surface::before { position: absolute; box-sizing: border-box; width: 100%; height: 100%; top: 0; left: 0; border: 2px solid transparent; border-radius: inherit; content: ""; pointer-events: none; } .mat-mdc-dialog-title { display: block; position: relative; flex-shrink: 0; box-sizing: border-box; margin: 0 0 1px; padding: var(--%NS%mat-dialog-headline-padding, 6px 24px 13px); } .mat-mdc-dialog-title::before { display: inline-block; width: 0; height: 40px; content: ""; vertical-align: 0; } [dir=rtl] .mat-mdc-dialog-title { text-align: right; } .mat-mdc-dialog-container .mat-mdc-dialog-title { color: var(--%NS%mat-dialog-subhead-color, var(--%NS%mat-sys-on-surface, rgba(0, 0, 0, 0.87))); font-family: var(--%NS%mat-dialog-subhead-font, var(--%NS%mat-sys-headline-small-font, inherit)); line-height: var(--%NS%mat-dialog-subhead-line-height, var(--%NS%mat-sys-headline-small-line-height, 1.5rem)); font-size: var(--%NS%mat-dialog-subhead-size, var(--%NS%mat-sys-headline-small-size, 1rem)); font-weight: var(--%NS%mat-dialog-subhead-weight, var(--%NS%mat-sys-headline-small-weight, 400)); letter-spacing: var(--%NS%mat-dialog-subhead-tracking, var(--%NS%mat-sys-headline-small-tracking, 0.03125em)); } .mat-mdc-dialog-content { display: block; flex-grow: 1; box-sizing: border-box; margin: 0; overflow: auto; max-height: 65vh; } .mat-mdc-dialog-content > :first-child { margin-top: 0; } .mat-mdc-dialog-content > :last-child { margin-bottom: 0; } .mat-mdc-dialog-container .mat-mdc-dialog-content { color: var(--%NS%mat-dialog-supporting-text-color, var(--%NS%mat-sys-on-surface-variant, rgba(0, 0, 0, 0.6))); font-family: var(--%NS%mat-dialog-supporting-text-font, var(--%NS%mat-sys-body-medium-font, inherit)); line-height: var(--%NS%mat-dialog-supporting-text-line-height, var(--%NS%mat-sys-body-medium-line-height, 1.5rem)); font-size: var(--%NS%mat-dialog-supporting-text-size, var(--%NS%mat-sys-body-medium-size, 1rem)); font-weight: var(--%NS%mat-dialog-supporting-text-weight, var(--%NS%mat-sys-body-medium-weight, 400)); letter-spacing: var(--%NS%mat-dialog-supporting-text-tracking, var(--%NS%mat-sys-body-medium-tracking, 0.03125em)); } .mat-mdc-dialog-container .mat-mdc-dialog-content { padding: var(--%NS%mat-dialog-content-padding, 20px 24px); } .mat-mdc-dialog-container-with-actions .mat-mdc-dialog-content { padding: var(--%NS%mat-dialog-with-actions-content-padding, 20px 24px 0); } .mat-mdc-dialog-container .mat-mdc-dialog-title + .mat-mdc-dialog-content { padding-top: 0; } .mat-mdc-dialog-actions { display: flex; position: relative; flex-shrink: 0; flex-wrap: wrap; align-items: center; box-sizing: border-box; min-height: 52px; margin: 0; border-top: 1px solid transparent; padding: var(--%NS%mat-dialog-actions-padding, 16px 24px); justify-content: var(--%NS%mat-dialog-actions-alignment, flex-end); } @media (forced-colors: active) { .mat-mdc-dialog-actions { border-top-color: CanvasText; } } .mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-start, .mat-mdc-dialog-actions[align=start] { justify-content: start; } .mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-center, .mat-mdc-dialog-actions[align=center] { justify-content: center; } .mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-end, .mat-mdc-dialog-actions[align=end] { justify-content: flex-end; } .mat-mdc-dialog-actions .mat-button-base + .mat-button-base, .mat-mdc-dialog-actions .mat-mdc-button-base + .mat-mdc-button-base { margin-left: 8px; } [dir=rtl] .mat-mdc-dialog-actions .mat-button-base + .mat-button-base, [dir=rtl] .mat-mdc-dialog-actions .mat-mdc-button-base + .mat-mdc-button-base { margin-left: 0; margin-right: 8px; } .mat-mdc-dialog-component-host { display: contents; } `],encapsulation:2,changeDetection:1})}return i})();var Fe=`--mat-dialog-transition-duration`;function Ne(i){return i==null?null:typeof i==`number`?i:i.endsWith(`ms`)?Tn(i.substring(0,i.length-2)):i.endsWith(`s`)?Tn(i.substring(0,i.length-1))*1e3:i===`0`?0:null}var j=(function(i){return i[i.OPEN=0]=`OPEN`,i[i.CLOSING=1]=`CLOSING`,i[i.CLOSED=2]=`CLOSED`,i})(j||{});var z=class{_ref;_config;_containerInstance;componentInstance;componentRef=null;disableClose;id;_afterOpened=new jo(1);_beforeClosed=new jo(1);_result;_closeFallbackTimeout;_state=j.OPEN;_closeInteractionType;constructor(a,e,t){this._ref=a,this._config=e,this._containerInstance=t,this.disableClose=e.disableClose,this.id=a.id,a.addPanelClass(`mat-mdc-dialog-panel`),t._animationStateChanged.pipe(_e(n=>n.state===`opened`),lt(1)).subscribe(()=>{this._afterOpened.next(),this._afterOpened.complete()}),t._animationStateChanged.pipe(_e(n=>n.state===`closed`),lt(1)).subscribe(()=>{clearTimeout(this._closeFallbackTimeout),this._finishDialogClose()}),a.overlayRef.detachments().subscribe(()=>{this._beforeClosed.next(this._result),this._beforeClosed.complete(),this._finishDialogClose()}),cw(this.backdropClick(),this.keydownEvents().pipe(_e(n=>n.keyCode===27&&!this.disableClose&&!Nc(n)))).subscribe(n=>{this.disableClose||(n.preventDefault(),qe(this,n.type===`keydown`?`keyboard`:`mouse`))})}close(a){let e=this._config.closePredicate;e&&!e(a,this._config,this.componentInstance)||(this._result=a,this._containerInstance._animationStateChanged.pipe(_e(t=>t.state===`closing`),lt(1)).subscribe(t=>{this._beforeClosed.next(a),this._beforeClosed.complete(),this._ref.overlayRef.detachBackdrop(),this._closeFallbackTimeout=setTimeout(()=>this._finishDialogClose(),t.totalTime+100)}),this._state=j.CLOSING,this._containerInstance._startExitAnimation())}afterOpened(){return this._afterOpened}afterClosed(){return this._ref.closed}beforeClosed(){return this._beforeClosed}backdropClick(){return this._ref.backdropClick}keydownEvents(){return this._ref.keydownEvents}updatePosition(a){let e=this._ref.config.positionStrategy;return a&&(a.left||a.right)?a.left?e.left(a.left):e.right(a.right):e.centerHorizontally(),a&&(a.top||a.bottom)?a.top?e.top(a.top):e.bottom(a.bottom):e.centerVertically(),this._ref.updatePosition(),this}updateSize(a=``,e=``){return this._ref.updateSize(a,e),this}addPanelClass(a){return this._ref.addPanelClass(a),this}removePanelClass(a){return this._ref.removePanelClass(a),this}getState(){return this._state}_finishDialogClose(){this._state=j.CLOSED,this._ref.close(this._result,{focusOrigin:this._closeInteractionType}),this.componentInstance=null}};function qe(i,a,e){return i._closeInteractionType=a,i.close(e)}var Ue=new v(`MatMdcDialogData`);var Ye=new v(`mat-mdc-dialog-default-options`);var Ze=new v(`mat-mdc-dialog-scroll-strategy`,{providedIn:`root`,factory:()=>{let i=h(V$1);return()=>mE(i)}});var Le=(()=>{class i{_defaultOptions=h(Ye,{optional:!0});_scrollStrategy=h(Ze);_parentDialog=h(i,{optional:!0,skipSelf:!0});_idGenerator=h(qi);_injector=h(V$1);_dialog=h(X);_animationsDisabled=Do();_openDialogsAtThisLevel=[];_afterAllClosedAtThisLevel=new I;_afterOpenedAtThisLevel=new I;dialogConfigClass=V;_dialogRefConstructor;_dialogContainerType;_dialogDataToken;get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}_getAfterAllClosed(){let e=this._parentDialog;return e?e._getAfterAllClosed():this._afterAllClosedAtThisLevel}afterAllClosed=iw(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(Fr(void 0)));constructor(){this._dialogRefConstructor=z,this._dialogContainerType=Qe,this._dialogDataToken=Ue}open(e,t){let n;t=E(E({},this._defaultOptions||new V),t),t.id=t.id||this._idGenerator.getId(`mat-mdc-dialog-`),t.scrollStrategy=t.scrollStrategy||this._scrollStrategy();let o=this._dialog.open(e,F(E({},t),{positionStrategy:wE(this._injector).centerHorizontally().centerVertically(),disableClose:!0,closePredicate:void 0,closeOnDestroy:!1,closeOnOverlayDetachments:!1,disableAnimations:this._animationsDisabled||t.enterAnimationDuration?.toLocaleString()===`0`||t.exitAnimationDuration?.toString()===`0`,container:{type:this._dialogContainerType,providers:()=>[{provide:this.dialogConfigClass,useValue:t},{provide:g,useValue:t}]},templateContext:()=>({dialogRef:n}),providers:(l,r,d)=>(n=new this._dialogRefConstructor(l,t,d),n.updatePosition(t?.position),[{provide:this._dialogContainerType,useValue:d},{provide:this._dialogDataToken,useValue:r.data},{provide:this._dialogRefConstructor,useValue:n},{provide:p,useValue:null}])}));return n.componentRef=o.componentRef,n.componentInstance=o.componentInstance,this.openDialogs.push(n),this.afterOpened.next(n),n.afterClosed().subscribe(()=>{let l=this.openDialogs.indexOf(n);l>-1&&(this.openDialogs.splice(l,1),this.openDialogs.length||this._getAfterAllClosed().next())}),n}closeAll(){this._closeDialogs(this.openDialogs)}getDialogById(e){return this.openDialogs.find(t=>t.id===e)}ngOnDestroy(){this._closeDialogs(this._openDialogsAtThisLevel),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete()}_closeDialogs(e){let t=e.length;for(;t--;)e[t].close()}static ɵfac=function(t){return new(t||i)};static ɵprov=M({token:i,factory:i.ɵfac})}return i})();var Re=(()=>{class i{_dialogRef=h(z,{optional:!0});_elementRef=h(q);_dialog=h(Le);ngOnInit(){this._dialogRef||(this._dialogRef=$e(this._elementRef,this._dialog.openDialogs)),this._dialogRef&&Promise.resolve().then(()=>{this._onAdd()})}ngOnDestroy(){this._dialogRef?._containerInstance&&Promise.resolve().then(()=>{this._onRemove()})}static ɵfac=function(t){return new(t||i)};static ɵdir=Z({type:i})}return i})();var Bt=(()=>{class i extends Re{id=h(qi).getId(`mat-mdc-dialog-title-`);_onAdd(){this._dialogRef._containerInstance?._addAriaLabelledBy?.(this.id)}_onRemove(){this._dialogRef?._containerInstance?._removeAriaLabelledBy?.(this.id)}static ɵfac=(()=>{let e;return function(n){return(e||(e=io(i)))(n||i)}})();static ɵdir=Z({type:i,selectors:[[``,`mat-dialog-title`,``],[``,`matDialogTitle`,``]],hostAttrs:[1,`mat-mdc-dialog-title`,`mdc-dialog__title`],hostVars:1,hostBindings:function(t,n){t&2&&wy(`id`,n.id)},inputs:{id:`id`},exportAs:[`matDialogTitle`],features:[ze$1]})}return i})();var jt=(()=>{class i{static ɵfac=function(t){return new(t||i)};static ɵdir=Z({type:i,selectors:[[``,`mat-dialog-content`,``],[`mat-dialog-content`],[``,`matDialogContent`,``]],hostAttrs:[1,`mat-mdc-dialog-content`,`mdc-dialog__content`],features:[Hx([dp])]})}return i})();var Vt=(()=>{class i extends Re{align;_onAdd(){this._dialogRef._containerInstance?._updateActionSectionCount?.(1)}_onRemove(){this._dialogRef._containerInstance?._updateActionSectionCount?.(-1)}static ɵfac=(()=>{let e;return function(n){return(e||(e=io(i)))(n||i)}})();static ɵdir=Z({type:i,selectors:[[``,`mat-dialog-actions`,``],[`mat-dialog-actions`],[``,`matDialogActions`,``]],hostAttrs:[1,`mat-mdc-dialog-actions`,`mdc-dialog__actions`],hostVars:6,hostBindings:function(t,n){t&2&&vt(`mat-mdc-dialog-actions-align-start`,n.align===`start`)(`mat-mdc-dialog-actions-align-center`,n.align===`center`)(`mat-mdc-dialog-actions-align-end`,n.align===`end`)},inputs:{align:`align`},features:[ze$1]})}return i})();function $e(i,a){let e=i.nativeElement.parentElement;for(;e&&!e.classList.contains(`mat-mdc-dialog-container`);)e=e.parentElement;return e?a.find(t=>t.id===e.id):null}var zt=(()=>{class i{static ɵfac=function(t){return new(t||i)};static ɵmod=oe({type:i});static ɵinj=te({providers:[Le],imports:[ke,xk,aE,nn]})}return i})();export{jt as a,Vt as i,Le as n,z as o,Ue as r,zt as s,Bt as t};