import{A as Ut,B as F,D as U,E as $t,F as $,G as T,I as f,S as q,T as Y,Y as Q,b as nt,g as zt,k as G,m as at,v as Ht,y as st,z as Gt}from"./chunk-GMSM77ZG.js";import{$ as D,Aa as xt,Ca as it,Da as l,Db as Pt,E as B,Fa as It,M as N,Mb as I,Mc as qt,Nc as Yt,Oa as S,Pa as Tt,Ra as x,U as C,Ua as Ot,Va as E,W as p,Wa as kt,X as c,Y as _,Ya as wt,Zb as Bt,ab as St,ba as w,d as u,fb as R,fc as v,gb as L,ha as yt,hb as Et,hc as H,ia as bt,ic as Nt,ja as Ct,k as ft,lb as Rt,ma as Dt,mb as ot,o as _t,oa as g,ob as z,qa as At,qb as Lt,r as P,ra as V,ta as A,w as vt,x as k,xa as et,xb as Ft,xc as Vt,yb as Mt,zb as jt}from"./chunk-ZTQYYU2E.js";import{a as m,b as gt}from"./chunk-ZY7WU73K.js";function he(o,n){}var y=class{constructor(){this.role="dialog",this.panelClass="",this.hasBackdrop=!0,this.backdropClass="",this.disableClose=!1,this.width="",this.height="",this.data=null,this.ariaDescribedBy=null,this.ariaLabelledBy=null,this.ariaLabel=null,this.ariaModal=!0,this.autoFocus="first-tabbable",this.restoreFocus=!0,this.closeOnNavigation=!0,this.closeOnDestroy=!0,this.closeOnOverlayDetachments=!0}};var dt=(()=>{class o extends Ut{constructor(t,e,i,a,s,r,h,O){super(),this._elementRef=t,this._focusTrapFactory=e,this._config=a,this._interactivityChecker=s,this._ngZone=r,this._overlayRef=h,this._focusMonitor=O,this._platform=_(zt),this._focusTrap=null,this._elementFocusedBeforeDialogWasOpened=null,this._closeInteractionType=null,this._ariaLabelledByQueue=[],this._changeDetectorRef=_(Bt),this._injector=_(g),this._isDestroyed=!1,this.attachDomPortal=tt=>{this._portalOutlet.hasAttached();let ne=this._portalOutlet.attachDomPortal(tt);return this._contentAttached(),ne},this._document=i,this._config.ariaLabelledBy&&this._ariaLabelledByQueue.push(this._config.ariaLabelledBy)}_addAriaLabelledBy(t){this._ariaLabelledByQueue.push(t),this._changeDetectorRef.markForCheck()}_removeAriaLabelledBy(t){let e=this._ariaLabelledByQueue.indexOf(t);e>-1&&(this._ariaLabelledByQueue.splice(e,1),this._changeDetectorRef.markForCheck())}_contentAttached(){this._initializeFocusTrap(),this._handleBackdropClicks(),this._captureInitialFocus()}_captureInitialFocus(){this._trapFocus()}ngOnDestroy(){this._isDestroyed=!0,this._restoreFocus()}attachComponentPortal(t){this._portalOutlet.hasAttached();let e=this._portalOutlet.attachComponentPortal(t);return this._contentAttached(),e}attachTemplatePortal(t){this._portalOutlet.hasAttached();let e=this._portalOutlet.attachTemplatePortal(t);return this._contentAttached(),e}_recaptureFocus(){this._containsFocus()||this._trapFocus()}_forceFocus(t,e){this._interactivityChecker.isFocusable(t)||(t.tabIndex=-1,this._ngZone.runOutsideAngular(()=>{let i=()=>{t.removeEventListener("blur",i),t.removeEventListener("mousedown",i),t.removeAttribute("tabindex")};t.addEventListener("blur",i),t.addEventListener("mousedown",i)})),t.focus(e)}_focusByCssSelector(t,e){let i=this._elementRef.nativeElement.querySelector(t);i&&this._forceFocus(i,e)}_trapFocus(){this._isDestroyed||Ot(()=>{let t=this._elementRef.nativeElement;switch(this._config.autoFocus){case!1:case"dialog":this._containsFocus()||t.focus();break;case!0:case"first-tabbable":this._focusTrap?.focusInitialElement()||this._focusDialogContainer();break;case"first-heading":this._focusByCssSelector('h1, h2, h3, h4, h5, h6, [role="heading"]');break;default:this._focusByCssSelector(this._config.autoFocus);break}},{injector:this._injector})}_restoreFocus(){let t=this._config.restoreFocus,e=null;if(typeof t=="string"?e=this._document.querySelector(t):typeof t=="boolean"?e=t?this._elementFocusedBeforeDialogWasOpened:null:t&&(e=t),this._config.restoreFocus&&e&&typeof e.focus=="function"){let i=G(),a=this._elementRef.nativeElement;(!i||i===this._document.body||i===a||a.contains(i))&&(this._focusMonitor?(this._focusMonitor.focusVia(e,this._closeInteractionType),this._closeInteractionType=null):e.focus())}this._focusTrap&&this._focusTrap.destroy()}_focusDialogContainer(){this._elementRef.nativeElement.focus&&this._elementRef.nativeElement.focus()}_containsFocus(){let t=this._elementRef.nativeElement,e=G();return t===e||t.contains(e)}_initializeFocusTrap(){this._platform.isBrowser&&(this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._document&&(this._elementFocusedBeforeDialogWasOpened=G()))}_handleBackdropClicks(){this._overlayRef.backdropClick().subscribe(()=>{this._config.disableClose&&this._recaptureFocus()})}static{this.\u0275fac=function(e){return new(e||o)(l(A),l(Y),l(H,8),l(y),l(q),l(V),l(T),l(Q))}}static{this.\u0275cmp=D({type:o,selectors:[["cdk-dialog-container"]],viewQuery:function(e,i){if(e&1&&Ft(F,7),e&2){let a;Mt(a=jt())&&(i._portalOutlet=a.first)}},hostAttrs:["tabindex","-1",1,"cdk-dialog-container"],hostVars:6,hostBindings:function(e,i){e&2&&E("id",i._config.id||null)("role",i._config.role)("aria-modal",i._config.ariaModal)("aria-labelledby",i._config.ariaLabel?null:i._ariaLabelledByQueue[0])("aria-label",i._config.ariaLabel)("aria-describedby",i._config.ariaDescribedBy||null)},standalone:!0,features:[S,I],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(e,i){e&1&&x(0,he,0,0,"ng-template",0)},dependencies:[F],styles:[".cdk-dialog-container{display:block;width:100%;height:100%;min-height:inherit;max-height:inherit}"],encapsulation:2})}}return o})(),M=class{constructor(n,t){this.overlayRef=n,this.config=t,this.closed=new u,this.disableClose=t.disableClose,this.backdropClick=n.backdropClick(),this.keydownEvents=n.keydownEvents(),this.outsidePointerEvents=n.outsidePointerEvents(),this.id=t.id,this.keydownEvents.subscribe(e=>{e.keyCode===27&&!this.disableClose&&!U(e)&&(e.preventDefault(),this.close(void 0,{focusOrigin:"keyboard"}))}),this.backdropClick.subscribe(()=>{this.disableClose||this.close(void 0,{focusOrigin:"mouse"})}),this._detachSubscription=n.detachments().subscribe(()=>{t.closeOnOverlayDetachments!==!1&&this.close()})}close(n,t){if(this.containerInstance){let e=this.closed;this.containerInstance._closeInteractionType=t?.focusOrigin||"program",this._detachSubscription.unsubscribe(),this.overlayRef.dispose(),e.next(n),e.complete(),this.componentInstance=this.containerInstance=null}}updatePosition(){return this.overlayRef.updatePosition(),this}updateSize(n="",t=""){return this.overlayRef.updateSize({width:n,height:t}),this}addPanelClass(n){return this.overlayRef.addPanelClass(n),this}removePanelClass(n){return this.overlayRef.removePanelClass(n),this}},me=new p("DialogScrollStrategy",{providedIn:"root",factory:()=>{let o=_(f);return()=>o.scrollStrategies.block()}}),ue=new p("DialogData"),pe=new p("DefaultDialogConfig");var ge=0,Qt=(()=>{class o{get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}constructor(t,e,i,a,s,r){this._overlay=t,this._injector=e,this._defaultOptions=i,this._parentDialog=a,this._overlayContainer=s,this._openDialogsAtThisLevel=[],this._afterAllClosedAtThisLevel=new u,this._afterOpenedAtThisLevel=new u,this._ariaHiddenElements=new Map,this.afterAllClosed=P(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(N(void 0))),this._scrollStrategy=r}open(t,e){let i=this._defaultOptions||new y;e=m(m({},i),e),e.id=e.id||`cdk-dialog-${ge++}`,e.id&&this.getDialogById(e.id);let a=this._getOverlayConfig(e),s=this._overlay.create(a),r=new M(s,e),h=this._attachContainer(s,r,e);return r.containerInstance=h,this._attachDialogContent(t,r,h,e),this.openDialogs.length||this._hideNonDialogContentFromAssistiveTechnology(),this.openDialogs.push(r),r.closed.subscribe(()=>this._removeOpenDialog(r,!0)),this.afterOpened.next(r),r}closeAll(){rt(this.openDialogs,t=>t.close())}getDialogById(t){return this.openDialogs.find(e=>e.id===t)}ngOnDestroy(){rt(this._openDialogsAtThisLevel,t=>{t.config.closeOnDestroy===!1&&this._removeOpenDialog(t,!1)}),rt(this._openDialogsAtThisLevel,t=>t.close()),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete(),this._openDialogsAtThisLevel=[]}_getOverlayConfig(t){let e=new $t({positionStrategy:t.positionStrategy||this._overlay.position().global().centerHorizontally().centerVertically(),scrollStrategy:t.scrollStrategy||this._scrollStrategy(),panelClass:t.panelClass,hasBackdrop:t.hasBackdrop,direction:t.direction,minWidth:t.minWidth,minHeight:t.minHeight,maxWidth:t.maxWidth,maxHeight:t.maxHeight,width:t.width,height:t.height,disposeOnNavigation:t.closeOnNavigation});return t.backdropClass&&(e.backdropClass=t.backdropClass),e}_attachContainer(t,e,i){let a=i.injector||i.viewContainerRef?.injector,s=[{provide:y,useValue:i},{provide:M,useValue:e},{provide:T,useValue:t}],r;i.container?typeof i.container=="function"?r=i.container:(r=i.container.type,s.push(...i.container.providers(i))):r=dt;let h=new st(r,i.viewContainerRef,g.create({parent:a||this._injector,providers:s}),i.componentFactoryResolver);return t.attach(h).instance}_attachDialogContent(t,e,i,a){if(t instanceof It){let s=this._createInjector(a,e,i,void 0),r={$implicit:a.data,dialogRef:e};a.templateContext&&(r=m(m({},r),typeof a.templateContext=="function"?a.templateContext():a.templateContext)),i.attachTemplatePortal(new Gt(t,null,r,s))}else{let s=this._createInjector(a,e,i,this._injector),r=i.attachComponentPortal(new st(t,a.viewContainerRef,s,a.componentFactoryResolver));e.componentRef=r,e.componentInstance=r.instance}}_createInjector(t,e,i,a){let s=t.injector||t.viewContainerRef?.injector,r=[{provide:ue,useValue:t.data},{provide:M,useValue:e}];return t.providers&&(typeof t.providers=="function"?r.push(...t.providers(e,t,i)):r.push(...t.providers)),t.direction&&(!s||!s.get(at,null,{optional:!0}))&&r.push({provide:at,useValue:{value:t.direction,change:ft()}}),g.create({parent:s||a,providers:r})}_removeOpenDialog(t,e){let i=this.openDialogs.indexOf(t);i>-1&&(this.openDialogs.splice(i,1),this.openDialogs.length||(this._ariaHiddenElements.forEach((a,s)=>{a?s.setAttribute("aria-hidden",a):s.removeAttribute("aria-hidden")}),this._ariaHiddenElements.clear(),e&&this._getAfterAllClosed().next()))}_hideNonDialogContentFromAssistiveTechnology(){let t=this._overlayContainer.getContainerElement();if(t.parentElement){let e=t.parentElement.children;for(let i=e.length-1;i>-1;i--){let a=e[i];a!==t&&a.nodeName!=="SCRIPT"&&a.nodeName!=="STYLE"&&!a.hasAttribute("aria-live")&&(this._ariaHiddenElements.set(a,a.getAttribute("aria-hidden")),a.setAttribute("aria-hidden","true"))}}}_getAfterAllClosed(){let t=this._parentDialog;return t?t._getAfterAllClosed():this._afterAllClosedAtThisLevel}static{this.\u0275fac=function(e){return new(e||o)(c(f),c(g),c(pe,8),c(o,12),c($),c(me))}}static{this.\u0275prov=C({token:o,factory:o.\u0275fac,providedIn:"root"})}}return o})();function rt(o,n){let t=o.length;for(;t--;)n(o[t])}function fe(o,n){}var j=class{constructor(){this.role="dialog",this.panelClass="",this.hasBackdrop=!0,this.backdropClass="",this.disableClose=!1,this.width="",this.height="",this.data=null,this.ariaDescribedBy=null,this.ariaLabelledBy=null,this.ariaLabel=null,this.ariaModal=!0,this.autoFocus="first-tabbable",this.restoreFocus=!0,this.delayFocusTrap=!0,this.closeOnNavigation=!0}},ht="mdc-dialog--open",Wt="mdc-dialog--opening",Zt="mdc-dialog--closing",_e=150,ve=75,ye=(()=>{class o extends dt{constructor(t,e,i,a,s,r,h,O,tt){super(t,e,i,a,s,r,h,tt),this._animationMode=O,this._animationStateChanged=new At,this._animationsEnabled=this._animationMode!=="NoopAnimations",this._actionSectionCount=0,this._hostElement=this._elementRef.nativeElement,this._enterAnimationDuration=this._animationsEnabled?Xt(this._config.enterAnimationDuration)??_e:0,this._exitAnimationDuration=this._animationsEnabled?Xt(this._config.exitAnimationDuration)??ve:0,this._animationTimer=null,this._finishDialogOpen=()=>{this._clearAnimationClasses(),this._openAnimationDone(this._enterAnimationDuration)},this._finishDialogClose=()=>{this._clearAnimationClasses(),this._animationStateChanged.emit({state:"closed",totalTime:this._exitAnimationDuration})}}_contentAttached(){super._contentAttached(),this._startOpenAnimation()}_startOpenAnimation(){this._animationStateChanged.emit({state:"opening",totalTime:this._enterAnimationDuration}),this._animationsEnabled?(this._hostElement.style.setProperty(Kt,`${this._enterAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(Wt,ht)),this._waitForAnimationToComplete(this._enterAnimationDuration,this._finishDialogOpen)):(this._hostElement.classList.add(ht),Promise.resolve().then(()=>this._finishDialogOpen()))}_startExitAnimation(){this._animationStateChanged.emit({state:"closing",totalTime:this._exitAnimationDuration}),this._hostElement.classList.remove(ht),this._animationsEnabled?(this._hostElement.style.setProperty(Kt,`${this._exitAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(Zt)),this._waitForAnimationToComplete(this._exitAnimationDuration,this._finishDialogClose)):Promise.resolve().then(()=>this._finishDialogClose())}_updateActionSectionCount(t){this._actionSectionCount+=t,this._changeDetectorRef.markForCheck()}_clearAnimationClasses(){this._hostElement.classList.remove(Wt,Zt)}_waitForAnimationToComplete(t,e){this._animationTimer!==null&&clearTimeout(this._animationTimer),this._animationTimer=setTimeout(e,t)}_requestAnimationFrame(t){this._ngZone.runOutsideAngular(()=>{typeof requestAnimationFrame=="function"?requestAnimationFrame(t):t()})}_captureInitialFocus(){this._config.delayFocusTrap||this._trapFocus()}_openAnimationDone(t){this._config.delayFocusTrap&&this._trapFocus(),this._animationStateChanged.next({state:"opened",totalTime:t})}ngOnDestroy(){super.ngOnDestroy(),this._animationTimer!==null&&clearTimeout(this._animationTimer)}attachComponentPortal(t){let e=super.attachComponentPortal(t);return e.location.nativeElement.classList.add("mat-mdc-dialog-component-host"),e}static{this.\u0275fac=function(e){return new(e||o)(l(A),l(Y),l(H,8),l(j),l(q),l(V),l(T),l(et,8),l(Q))}}static{this.\u0275cmp=D({type:o,selectors:[["mat-dialog-container"]],hostAttrs:["tabindex","-1",1,"mat-mdc-dialog-container","mdc-dialog"],hostVars:10,hostBindings:function(e,i){e&2&&(ot("id",i._config.id),E("aria-modal",i._config.ariaModal)("role",i._config.role)("aria-labelledby",i._config.ariaLabel?null:i._ariaLabelledByQueue[0])("aria-label",i._config.ariaLabel)("aria-describedby",i._config.ariaDescribedBy||null),wt("_mat-animation-noopable",!i._animationsEnabled)("mat-mdc-dialog-container-with-actions",i._actionSectionCount>0))},standalone:!0,features:[S,I],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(e,i){e&1&&(R(0,"div",0)(1,"div",1),x(2,fe,0,0,"ng-template",2),L()())},dependencies:[F],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(--mat-dialog-container-max-width, 80vw);min-width:var(--mat-dialog-container-min-width, 0)}@media(max-width: 599px){.cdk-overlay-pane.mat-mdc-dialog-panel{max-width:var(--mat-dialog-container-small-max-width, 80vw)}}.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(--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(--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(--mat-dialog-container-elevation-shadow, 0px 11px 15px -7px rgba(0, 0, 0, 0.2), 0px 24px 38px 3px rgba(0, 0, 0, 0.14), 0px 9px 46px 8px rgba(0, 0, 0, 0.12));border-radius:var(--mdc-dialog-container-shape, var(--mat-app-corner-extra-large, 4px));background-color:var(--mdc-dialog-container-color, var(--mat-app-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 rgba(0,0,0,0);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(--mat-dialog-headline-padding, 0 24px 9px)}.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(--mdc-dialog-subhead-color, var(--mat-app-on-surface, rgba(0, 0, 0, 0.87)));font-family:var(--mdc-dialog-subhead-font, var(--mat-app-headline-small-font, inherit));line-height:var(--mdc-dialog-subhead-line-height, var(--mat-app-headline-small-line-height, 1.5rem));font-size:var(--mdc-dialog-subhead-size, var(--mat-app-headline-small-size, 1rem));font-weight:var(--mdc-dialog-subhead-weight, var(--mat-app-headline-small-weight, 400));letter-spacing:var(--mdc-dialog-subhead-tracking, var(--mat-app-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(--mdc-dialog-supporting-text-color, var(--mat-app-on-surface-variant, rgba(0, 0, 0, 0.6)));font-family:var(--mdc-dialog-supporting-text-font, var(--mat-app-body-medium-font, inherit));line-height:var(--mdc-dialog-supporting-text-line-height, var(--mat-app-body-medium-line-height, 1.5rem));font-size:var(--mdc-dialog-supporting-text-size, var(--mat-app-body-medium-size, 1rem));font-weight:var(--mdc-dialog-supporting-text-weight, var(--mat-app-body-medium-weight, 400));letter-spacing:var(--mdc-dialog-supporting-text-tracking, var(--mat-app-body-medium-tracking, 0.03125em))}.mat-mdc-dialog-container .mat-mdc-dialog-content{padding:var(--mat-dialog-content-padding, 20px 24px)}.mat-mdc-dialog-container-with-actions .mat-mdc-dialog-content{padding:var(--mat-dialog-with-actions-content-padding, 20px 24px)}.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;justify-content:flex-end;box-sizing:border-box;min-height:52px;margin:0;padding:8px;border-top:1px solid rgba(0,0,0,0);padding:var(--mat-dialog-actions-padding, 8px);justify-content:var(--mat-dialog-actions-alignment, start)}.cdk-high-contrast-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})}}return o})(),Kt="--mat-dialog-transition-duration";function Xt(o){return o==null?null:typeof o=="number"?o:o.endsWith("ms")?nt(o.substring(0,o.length-2)):o.endsWith("s")?nt(o.substring(0,o.length-1))*1e3:o==="0"?0:null}var W=function(o){return o[o.OPEN=0]="OPEN",o[o.CLOSING=1]="CLOSING",o[o.CLOSED=2]="CLOSED",o}(W||{}),b=class{constructor(n,t,e){this._ref=n,this._containerInstance=e,this._afterOpened=new u,this._beforeClosed=new u,this._state=W.OPEN,this.disableClose=t.disableClose,this.id=n.id,n.addPanelClass("mat-mdc-dialog-panel"),e._animationStateChanged.pipe(k(i=>i.state==="opened"),B(1)).subscribe(()=>{this._afterOpened.next(),this._afterOpened.complete()}),e._animationStateChanged.pipe(k(i=>i.state==="closed"),B(1)).subscribe(()=>{clearTimeout(this._closeFallbackTimeout),this._finishDialogClose()}),n.overlayRef.detachments().subscribe(()=>{this._beforeClosed.next(this._result),this._beforeClosed.complete(),this._finishDialogClose()}),vt(this.backdropClick(),this.keydownEvents().pipe(k(i=>i.keyCode===27&&!this.disableClose&&!U(i)))).subscribe(i=>{this.disableClose||(i.preventDefault(),Jt(this,i.type==="keydown"?"keyboard":"mouse"))})}close(n){this._result=n,this._containerInstance._animationStateChanged.pipe(k(t=>t.state==="closing"),B(1)).subscribe(t=>{this._beforeClosed.next(n),this._beforeClosed.complete(),this._ref.overlayRef.detachBackdrop(),this._closeFallbackTimeout=setTimeout(()=>this._finishDialogClose(),t.totalTime+100)}),this._state=W.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(n){let t=this._ref.config.positionStrategy;return n&&(n.left||n.right)?n.left?t.left(n.left):t.right(n.right):t.centerHorizontally(),n&&(n.top||n.bottom)?n.top?t.top(n.top):t.bottom(n.bottom):t.centerVertically(),this._ref.updatePosition(),this}updateSize(n="",t=""){return this._ref.updateSize(n,t),this}addPanelClass(n){return this._ref.addPanelClass(n),this}removePanelClass(n){return this._ref.removePanelClass(n),this}getState(){return this._state}_finishDialogClose(){this._state=W.CLOSED,this._ref.close(this._result,{focusOrigin:this._closeInteractionType}),this.componentInstance=null}};function Jt(o,n,t){return o._closeInteractionType=n,o.close(t)}var be=new p("MatMdcDialogData"),Ce=new p("mat-mdc-dialog-default-options"),De=new p("mat-mdc-dialog-scroll-strategy",{providedIn:"root",factory:()=>{let o=_(f);return()=>o.scrollStrategies.block()}});var Ae=0,Z=(()=>{class o{get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}_getAfterAllClosed(){let t=this._parentDialog;return t?t._getAfterAllClosed():this._afterAllClosedAtThisLevel}constructor(t,e,i,a,s,r,h,O){this._overlay=t,this._defaultOptions=a,this._scrollStrategy=s,this._parentDialog=r,this._openDialogsAtThisLevel=[],this._afterAllClosedAtThisLevel=new u,this._afterOpenedAtThisLevel=new u,this.dialogConfigClass=j,this.afterAllClosed=P(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(N(void 0))),this._dialog=e.get(Qt),this._dialogRefConstructor=b,this._dialogContainerType=ye,this._dialogDataToken=be}open(t,e){let i;e=m(m({},this._defaultOptions||new j),e),e.id=e.id||`mat-mdc-dialog-${Ae++}`,e.scrollStrategy=e.scrollStrategy||this._scrollStrategy();let a=this._dialog.open(t,gt(m({},e),{positionStrategy:this._overlay.position().global().centerHorizontally().centerVertically(),disableClose:!0,closeOnDestroy:!1,closeOnOverlayDetachments:!1,container:{type:this._dialogContainerType,providers:()=>[{provide:this.dialogConfigClass,useValue:e},{provide:y,useValue:e}]},templateContext:()=>({dialogRef:i}),providers:(s,r,h)=>(i=new this._dialogRefConstructor(s,e,h),i.updatePosition(e?.position),[{provide:this._dialogContainerType,useValue:h},{provide:this._dialogDataToken,useValue:r.data},{provide:this._dialogRefConstructor,useValue:i}])}));return i.componentRef=a.componentRef,i.componentInstance=a.componentInstance,this.openDialogs.push(i),this.afterOpened.next(i),i.afterClosed().subscribe(()=>{let s=this.openDialogs.indexOf(i);s>-1&&(this.openDialogs.splice(s,1),this.openDialogs.length||this._getAfterAllClosed().next())}),i}closeAll(){this._closeDialogs(this.openDialogs)}getDialogById(t){return this.openDialogs.find(e=>e.id===t)}ngOnDestroy(){this._closeDialogs(this._openDialogsAtThisLevel),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete()}_closeDialogs(t){let e=t.length;for(;e--;)t[e].close()}static{this.\u0275fac=function(e){return new(e||o)(c(f),c(g),c(Nt,8),c(Ce,8),c(De),c(o,12),c($),c(et,8))}}static{this.\u0275prov=C({token:o,factory:o.\u0275fac,providedIn:"root"})}}return o})(),xe=0,vi=(()=>{class o{constructor(t,e,i){this.dialogRef=t,this._elementRef=e,this._dialog=i,this.type="button"}ngOnInit(){this.dialogRef||(this.dialogRef=te(this._elementRef,this._dialog.openDialogs))}ngOnChanges(t){let e=t._matDialogClose||t._matDialogCloseResult;e&&(this.dialogResult=e.currentValue)}_onButtonClick(t){Jt(this.dialogRef,t.screenX===0&&t.screenY===0?"keyboard":"mouse",this.dialogResult)}static{this.\u0275fac=function(e){return new(e||o)(l(b,8),l(A),l(Z))}}static{this.\u0275dir=w({type:o,selectors:[["","mat-dialog-close",""],["","matDialogClose",""]],hostVars:2,hostBindings:function(e,i){e&1&&z("click",function(s){return i._onButtonClick(s)}),e&2&&E("aria-label",i.ariaLabel||null)("type",i.type)},inputs:{ariaLabel:[0,"aria-label","ariaLabel"],type:"type",dialogResult:[0,"mat-dialog-close","dialogResult"],_matDialogClose:[0,"matDialogClose","_matDialogClose"]},exportAs:["matDialogClose"],standalone:!0,features:[yt]})}}return o})(),Ie=(()=>{class o{constructor(t,e,i){this._dialogRef=t,this._elementRef=e,this._dialog=i}ngOnInit(){this._dialogRef||(this._dialogRef=te(this._elementRef,this._dialog.openDialogs)),this._dialogRef&&Promise.resolve().then(()=>{this._onAdd()})}ngOnDestroy(){this._dialogRef?._containerInstance&&Promise.resolve().then(()=>{this._onRemove()})}static{this.\u0275fac=function(e){return new(e||o)(l(b,8),l(A),l(Z))}}static{this.\u0275dir=w({type:o,standalone:!0})}}return o})(),yi=(()=>{class o extends Ie{constructor(){super(...arguments),this.id=`mat-mdc-dialog-title-${xe++}`}_onAdd(){this._dialogRef._containerInstance?._addAriaLabelledBy?.(this.id)}_onRemove(){this._dialogRef?._containerInstance?._removeAriaLabelledBy?.(this.id)}static{this.\u0275fac=(()=>{let t;return function(i){return(t||(t=Dt(o)))(i||o)}})()}static{this.\u0275dir=w({type:o,selectors:[["","mat-dialog-title",""],["","matDialogTitle",""]],hostAttrs:[1,"mat-mdc-dialog-title","mdc-dialog__title"],hostVars:1,hostBindings:function(e,i){e&2&&ot("id",i.id)},inputs:{id:"id"},exportAs:["matDialogTitle"],standalone:!0,features:[S]})}}return o})(),bi=(()=>{class o{static{this.\u0275fac=function(e){return new(e||o)}}static{this.\u0275dir=w({type:o,selectors:[["","mat-dialog-content",""],["mat-dialog-content"],["","matDialogContent",""]],hostAttrs:[1,"mat-mdc-dialog-content","mdc-dialog__content"],standalone:!0,features:[Tt([Ht])]})}}return o})();function te(o,n){let t=o.nativeElement.parentElement;for(;t&&!t.classList.contains("mat-mdc-dialog-container");)t=t.parentElement;return t?n.find(e=>e.id===t.id):null}function Te(o,n){if(o&1){let t=Rt();R(0,"div",2)(1,"button",3),z("click",function(){bt(t);let i=Lt();return Ct(i.btnClick())}),Pt(2,"OK"),L()()}}var ie=(()=>{class o{constructor(t){this.dialogRef=t,this.text="",this.showButton=!0}btnClick(){this.dialogRef.close()}static{this.\u0275fac=function(e){return new(e||o)(l(b))}}static{this.\u0275cmp=D({type:o,selectors:[["app-material-alert"]],inputs:{text:"text"},standalone:!0,features:[I],decls:3,vars:2,consts:[[1,"m-3","text-center"],[1,"mt-3",3,"innerHTML"],[1,"row","mt-3"],[1,"btn","btn-primary","mx-auto",2,"width","150px",3,"click"]],template:function(e,i){e&1&&(R(0,"div",0),Et(1,"div",1),x(2,Te,3,0,"div",2),L()),e&2&&(it(),kt("innerHTML",i.text,xt),it(),St(i.showButton?2:-1))}})}}return o})();var d=[];for(K=0;K<256;++K)d.push((K+256).toString(16).slice(1));var K;function oe(o,n=0){return(d[o[n+0]]+d[o[n+1]]+d[o[n+2]]+d[o[n+3]]+"-"+d[o[n+4]]+d[o[n+5]]+"-"+d[o[n+6]]+d[o[n+7]]+"-"+d[o[n+8]]+d[o[n+9]]+"-"+d[o[n+10]]+d[o[n+11]]+d[o[n+12]]+d[o[n+13]]+d[o[n+14]]+d[o[n+15]]).toLowerCase()}var X,Oe=new Uint8Array(16);function mt(){if(!X&&(X=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!X))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return X(Oe)}var ke=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),ut={randomUUID:ke};function we(o,n,t){if(ut.randomUUID&&!n&&!o)return ut.randomUUID();o=o||{};var e=o.random||(o.rng||mt)();if(e[6]=e[6]&15|64,e[8]=e[8]&63|128,n){t=t||0;for(var i=0;i<16;++i)n[t+i]=e[i];return n}return oe(e)}var pt=we;var J=class{constructor(n,t,e,i){this.userId=n,this.password=t,this.companyFlag=e,this.versionNumber=i}};var zi=(()=>{class o{constructor(t,e,i){this.dialog=t,this.http=e,this.settingsService=i,this.endpoint="punchoutlogin",this._deviceId="A-"+pt()}applyHeaders(t,e){return e?t.clone({setHeaders:{Authorization:"Bearer "+e}}):t.clone()}clearAll(){sessionStorage.clear()}displayTokenError(t,e=null){let i=t,a=this.dialog.open(ie,{width:"400px",maxHeight:"90vh"});a.componentInstance.text=i,a.afterClosed().subscribe(()=>{e&&e(),this.dialog.closeAll()})}tryPunchoutLoginRequestAuthorized(t,e){let i="/"+this.deviceId+"/Punchout",a=new J(t||-1,"",e,v.apiVersion);return this.http.post(v.externalEndpoint+"v"+v.apiVersion+"/"+this.endpoint+i,a).pipe(_t(s=>(sessionStorage.setItem("loginId",t.toString()),sessionStorage.setItem("punchoutCompany",e.toString()),sessionStorage.setItem("accessToken",s.token),sessionStorage.setItem("refreshToken",s.refreshToken),s)))}tryPunchoutRefreshToken(){return this.http.post(v.externalEndpoint+"v"+v.apiVersion+"/"+this.endpoint+"/punchout/refreshtoken",sessionStorage.getItem("refreshToken"))}get accessToken(){return sessionStorage.getItem("accessToken")}set accessToken(t){sessionStorage.setItem("accessToken",t)}get deviceId(){return this._deviceId}get isLoggedIn(){return!!(sessionStorage.getItem("accessToken")&&sessionStorage.getItem("refreshToken"))}get loginId(){return parseInt(sessionStorage.getItem("loginId"))}get punchoutCompany(){return qt[sessionStorage.getItem("punchoutCompany")]}get isPunchout(){return v.isPunchout}get refreshToken(){return sessionStorage.getItem("refreshToken")}set refreshToken(t){sessionStorage.setItem("refreshToken",t)}get userRole(){return sessionStorage.getItem("userRole")}static{this.\u0275fac=function(e){return new(e||o)(c(Z),c(Vt),c(Yt))}}static{this.\u0275prov=C({token:o,factory:o.\u0275fac,providedIn:"root"})}}return o})();export{b as a,be as b,Z as c,vi as d,yi as e,bi as f,ie as g,zi as h};
