import{a as Qt,b as ot,e as lt,f as $t,g as qt,j as Gt,k as fe,l as Ut}from"./chunk-DPSBM3QB.js";import{a as rt,c as st,d as jt}from"./chunk-XGMBPPGK.js";import{a as Kt}from"./chunk-R7FJHKSY.js";import{A as Pt,Da as Ke,F as tt,G as Yt,H as J,J as Nt,K as Lt,M as _,N as T,P as je,Ra as zt,Sa as dt,a as Rt,c as Le,da as at,e as Tt,ea as me,ga as $,h as Z,ha as it,ia as nt,ja as _e,o as Ot,pa as Be,ra as He,sa as ge,ta as Bt,ua as Ht,ya as ze}from"./chunk-JJBFUK5W.js";import{d as xt,i as et,o as Ft}from"./chunk-ZEDFMZ3B.js";import{$ as Ct,$a as o,A as yt,Cb as ue,Db as Pe,Eb as Vt,G as we,Jb as v,Kb as Et,Lb as m,Mb as Ye,Nb as pe,Qb as Ne,Rb as Y,S as ke,Sb as V,Tb as E,Va as O,Vb as D,Wb as N,Xb as te,Yb as Q,Z as Me,Zb as x,_ as ee,_a as c,ab as Mt,bb as P,ca as Ie,cb as p,d as F,da as Se,db as Je,ea as le,fb as W,ga as I,gb as ce,ha as S,hb as It,i as B,ia as At,ja as H,la as z,lb as X,lc as L,ma as y,mb as b,n as Ae,na as C,nb as f,oa as Xe,ob as Fe,pa as wt,pb as R,qa as Ze,qb as St,ra as kt,sa as Ve,sb as he,ta as Ee,tb as Re,ub as Te,vb as Oe,wb as h,xb as u,yb as K,z as oe,za as xe}from"./chunk-PEWEDMBK.js";var _a=["mat-calendar-body",""];function ga(r,n){if(r&1&&(h(0,"tr",0)(1,"td",2),D(2),u()()),r&2){let d=m();c(),Fe("padding-top",d._cellPadding)("padding-bottom",d._cellPadding),b("colspan",d.numCols),c(),te(" ",d.label," ")}}function fa(r,n){if(r&1&&(h(0,"td",2),D(1),u()),r&2){let d=m(2);Fe("padding-top",d._cellPadding)("padding-bottom",d._cellPadding),b("colspan",d._firstRowOffset),c(),te(" ",d._firstRowOffset>=d.labelMinRequiredCells?d.label:""," ")}}function va(r,n){if(r&1){let d=ue();h(0,"td",5)(1,"button",6),v("click",function(a){let i=y(d).$implicit,s=m(2);return C(s._cellClicked(i,a))})("focus",function(a){let i=y(d).$implicit,s=m(2);return C(s._emitActiveDateChange(i,a))}),h(2,"span",7),D(3),u(),K(4,"span",8),u()()}if(r&2){let d=n.$implicit,e=n.$index,a=m().$index,t=m();Fe("width",t._cellWidth)("padding-top",t._cellPadding)("padding-bottom",t._cellPadding),b("data-mat-row",a)("data-mat-col",e),c(),R("mat-calendar-body-disabled",!d.enabled)("mat-calendar-body-active",t._isActiveCell(a,e))("mat-calendar-body-range-start",t._isRangeStart(d.compareValue))("mat-calendar-body-range-end",t._isRangeEnd(d.compareValue))("mat-calendar-body-in-range",t._isInRange(d.compareValue))("mat-calendar-body-comparison-bridge-start",t._isComparisonBridgeStart(d.compareValue,a,e))("mat-calendar-body-comparison-bridge-end",t._isComparisonBridgeEnd(d.compareValue,a,e))("mat-calendar-body-comparison-start",t._isComparisonStart(d.compareValue))("mat-calendar-body-comparison-end",t._isComparisonEnd(d.compareValue))("mat-calendar-body-in-comparison-range",t._isInComparisonRange(d.compareValue))("mat-calendar-body-preview-start",t._isPreviewStart(d.compareValue))("mat-calendar-body-preview-end",t._isPreviewEnd(d.compareValue))("mat-calendar-body-in-preview",t._isInPreview(d.compareValue)),f("ngClass",d.cssClasses)("tabindex",t._isActiveCell(a,e)?0:-1),b("aria-label",d.ariaLabel)("aria-disabled",!d.enabled||null)("aria-pressed",t._isSelected(d.compareValue))("aria-current",t.todayValue===d.compareValue?"date":null)("aria-describedby",t._getDescribedby(d.compareValue)),c(),R("mat-calendar-body-selected",t._isSelected(d.compareValue))("mat-calendar-body-comparison-identical",t._isComparisonIdentical(d.compareValue))("mat-calendar-body-today",t.todayValue===d.compareValue),c(),te(" ",d.displayValue," ")}}function ba(r,n){if(r&1&&(h(0,"tr",3),X(1,fa,2,6,"td",4),Te(2,va,5,48,"td",9,Re),u()),r&2){let d=n.$implicit,e=n.$index,a=m();c(),he(1,e===0&&a._firstRowOffset?1:-1),c(),Oe(d)}}function Da(r,n){if(r&1&&(h(0,"th",4)(1,"span",5),D(2),u(),h(3,"span",6),D(4),u()()),r&2){let d=n.$implicit;c(2),N(d.long),c(2),N(d.narrow)}}var ya=["*"];function Ca(r,n){}function Aa(r,n){if(r&1){let d=ue();h(0,"mat-month-view",2),v("activeDateChange",function(a){y(d);let t=m();return C(t.activeDate=a)})("_userSelection",function(a){y(d);let t=m();return C(t._dateSelected(a))})("dragStarted",function(a){y(d);let t=m();return C(t._dragStarted(a))})("dragEnded",function(a){y(d);let t=m();return C(t._dragEnded(a))}),u()}if(r&2){let d=m();f("activeDate",d.activeDate)("selected",d.selected)("dateFilter",d.dateFilter)("maxDate",d.maxDate)("minDate",d.minDate)("dateClass",d.dateClass)("comparisonStart",d.comparisonStart)("comparisonEnd",d.comparisonEnd)("startDateAccessibleName",d.startDateAccessibleName)("endDateAccessibleName",d.endDateAccessibleName)("activeDrag",d._activeDrag)}}function wa(r,n){if(r&1){let d=ue();h(0,"mat-year-view",3),v("activeDateChange",function(a){y(d);let t=m();return C(t.activeDate=a)})("monthSelected",function(a){y(d);let t=m();return C(t._monthSelectedInYearView(a))})("selectedChange",function(a){y(d);let t=m();return C(t._goToDateInView(a,"month"))}),u()}if(r&2){let d=m();f("activeDate",d.activeDate)("selected",d.selected)("dateFilter",d.dateFilter)("maxDate",d.maxDate)("minDate",d.minDate)("dateClass",d.dateClass)}}function ka(r,n){if(r&1){let d=ue();h(0,"mat-multi-year-view",4),v("activeDateChange",function(a){y(d);let t=m();return C(t.activeDate=a)})("yearSelected",function(a){y(d);let t=m();return C(t._yearSelectedInMultiYearView(a))})("selectedChange",function(a){y(d);let t=m();return C(t._goToDateInView(a,"year"))}),u()}if(r&2){let d=m();f("activeDate",d.activeDate)("selected",d.selected)("dateFilter",d.dateFilter)("maxDate",d.maxDate)("minDate",d.minDate)("dateClass",d.dateClass)}}function Ma(r,n){}var Ia=["button"];function Sa(r,n){r&1&&(Xe(),h(0,"svg",3),K(1,"path",4),u())}var Va=[[["","matDatepickerToggleIcon",""]]],Ea=["[matDatepickerToggleIcon]"],xa=[[["input","matStartDate",""]],[["input","matEndDate",""]]],Fa=["input[matStartDate]","input[matEndDate]"];var Ce=(()=>{let n=class n{constructor(){this.changes=new B,this.calendarLabel="Calendar",this.openCalendarLabel="Open calendar",this.closeCalendarLabel="Close calendar",this.prevMonthLabel="Previous month",this.nextMonthLabel="Next month",this.prevYearLabel="Previous year",this.nextYearLabel="Next year",this.prevMultiYearLabel="Previous 24 years",this.nextMultiYearLabel="Next 24 years",this.switchToMonthViewLabel="Choose date",this.switchToMultiYearViewLabel="Choose month and year",this.startDateLabel="Start date",this.endDateLabel="End date"}formatYearRange(e,a){return`${e} \u2013 ${a}`}formatYearRangeLabel(e,a){return`${e} to ${a}`}};n.\u0275fac=function(a){return new(a||n)},n.\u0275prov=ee({token:n,factory:n.\u0275fac,providedIn:"root"});let r=n;return r})(),De=class{constructor(n,d,e,a,t={},i=n,s){this.value=n,this.displayValue=d,this.ariaLabel=e,this.enabled=a,this.cssClasses=t,this.compareValue=i,this.rawValue=s}},Ra=1,Wt=Le({passive:!1,capture:!0}),q=Le({passive:!0,capture:!0}),Qe=Le({passive:!0}),re=(()=>{let n=class n{ngAfterViewChecked(){this._focusActiveCellAfterViewChecked&&(this._focusActiveCell(),this._focusActiveCellAfterViewChecked=!1)}constructor(e,a){this._elementRef=e,this._ngZone=a,this._platform=le(Rt),this._focusActiveCellAfterViewChecked=!1,this.numCols=7,this.activeCell=0,this.isRange=!1,this.cellAspectRatio=1,this.previewStart=null,this.previewEnd=null,this.selectedValueChange=new p,this.previewChange=new p,this.activeDateChange=new p,this.dragStarted=new p,this.dragEnded=new p,this._didDragSinceMouseDown=!1,this._enterHandler=t=>{if(this._skipNextFocus&&t.type==="focus"){this._skipNextFocus=!1;return}if(t.target&&this.isRange){let i=this._getCellFromElement(t.target);i&&this._ngZone.run(()=>this.previewChange.emit({value:i.enabled?i:null,event:t}))}},this._touchmoveHandler=t=>{if(!this.isRange)return;let i=Xt(t),s=i?this._getCellFromElement(i):null;i!==t.target&&(this._didDragSinceMouseDown=!0),ht(t.target)&&t.preventDefault(),this._ngZone.run(()=>this.previewChange.emit({value:s?.enabled?s:null,event:t}))},this._leaveHandler=t=>{this.previewEnd!==null&&this.isRange&&(t.type!=="blur"&&(this._didDragSinceMouseDown=!0),t.target&&this._getCellFromElement(t.target)&&!(t.relatedTarget&&this._getCellFromElement(t.relatedTarget))&&this._ngZone.run(()=>this.previewChange.emit({value:null,event:t})))},this._mousedownHandler=t=>{if(!this.isRange)return;this._didDragSinceMouseDown=!1;let i=t.target&&this._getCellFromElement(t.target);!i||!this._isInRange(i.compareValue)||this._ngZone.run(()=>{this.dragStarted.emit({value:i.rawValue,event:t})})},this._mouseupHandler=t=>{if(!this.isRange)return;let i=ht(t.target);if(!i){this._ngZone.run(()=>{this.dragEnded.emit({value:null,event:t})});return}i.closest(".mat-calendar-body")===this._elementRef.nativeElement&&this._ngZone.run(()=>{let s=this._getCellFromElement(i);this.dragEnded.emit({value:s?.rawValue??null,event:t})})},this._touchendHandler=t=>{let i=Xt(t);i&&this._mouseupHandler({target:i})},this._id=`mat-calendar-body-${Ra++}`,this._startDateLabelId=`${this._id}-start-date`,this._endDateLabelId=`${this._id}-end-date`,a.runOutsideAngular(()=>{let t=e.nativeElement;t.addEventListener("touchmove",this._touchmoveHandler,Wt),t.addEventListener("mouseenter",this._enterHandler,q),t.addEventListener("focus",this._enterHandler,q),t.addEventListener("mouseleave",this._leaveHandler,q),t.addEventListener("blur",this._leaveHandler,q),t.addEventListener("mousedown",this._mousedownHandler,Qe),t.addEventListener("touchstart",this._mousedownHandler,Qe),this._platform.isBrowser&&(window.addEventListener("mouseup",this._mouseupHandler),window.addEventListener("touchend",this._touchendHandler))})}_cellClicked(e,a){this._didDragSinceMouseDown||e.enabled&&this.selectedValueChange.emit({value:e.value,event:a})}_emitActiveDateChange(e,a){e.enabled&&this.activeDateChange.emit({value:e.value,event:a})}_isSelected(e){return this.startValue===e||this.endValue===e}ngOnChanges(e){let a=e.numCols,{rows:t,numCols:i}=this;(e.rows||a)&&(this._firstRowOffset=t&&t.length&&t[0].length?i-t[0].length:0),(e.cellAspectRatio||a||!this._cellPadding)&&(this._cellPadding=`${50*this.cellAspectRatio/i}%`),(a||!this._cellWidth)&&(this._cellWidth=`${100/i}%`)}ngOnDestroy(){let e=this._elementRef.nativeElement;e.removeEventListener("touchmove",this._touchmoveHandler,Wt),e.removeEventListener("mouseenter",this._enterHandler,q),e.removeEventListener("focus",this._enterHandler,q),e.removeEventListener("mouseleave",this._leaveHandler,q),e.removeEventListener("blur",this._leaveHandler,q),e.removeEventListener("mousedown",this._mousedownHandler,Qe),e.removeEventListener("touchstart",this._mousedownHandler,Qe),this._platform.isBrowser&&(window.removeEventListener("mouseup",this._mouseupHandler),window.removeEventListener("touchend",this._touchendHandler))}_isActiveCell(e,a){let t=e*this.numCols+a;return e&&(t-=this._firstRowOffset),t==this.activeCell}_focusActiveCell(e=!0){this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.pipe(we(1)).subscribe(()=>{setTimeout(()=>{let a=this._elementRef.nativeElement.querySelector(".mat-calendar-body-active");a&&(e||(this._skipNextFocus=!0),a.focus())})})})}_scheduleFocusActiveCellAfterViewChecked(){this._focusActiveCellAfterViewChecked=!0}_isRangeStart(e){return ut(e,this.startValue,this.endValue)}_isRangeEnd(e){return pt(e,this.startValue,this.endValue)}_isInRange(e){return mt(e,this.startValue,this.endValue,this.isRange)}_isComparisonStart(e){return ut(e,this.comparisonStart,this.comparisonEnd)}_isComparisonBridgeStart(e,a,t){if(!this._isComparisonStart(e)||this._isRangeStart(e)||!this._isInRange(e))return!1;let i=this.rows[a][t-1];if(!i){let s=this.rows[a-1];i=s&&s[s.length-1]}return i&&!this._isRangeEnd(i.compareValue)}_isComparisonBridgeEnd(e,a,t){if(!this._isComparisonEnd(e)||this._isRangeEnd(e)||!this._isInRange(e))return!1;let i=this.rows[a][t+1];if(!i){let s=this.rows[a+1];i=s&&s[0]}return i&&!this._isRangeStart(i.compareValue)}_isComparisonEnd(e){return pt(e,this.comparisonStart,this.comparisonEnd)}_isInComparisonRange(e){return mt(e,this.comparisonStart,this.comparisonEnd,this.isRange)}_isComparisonIdentical(e){return this.comparisonStart===this.comparisonEnd&&e===this.comparisonStart}_isPreviewStart(e){return ut(e,this.previewStart,this.previewEnd)}_isPreviewEnd(e){return pt(e,this.previewStart,this.previewEnd)}_isInPreview(e){return mt(e,this.previewStart,this.previewEnd,this.isRange)}_getDescribedby(e){return this.isRange?this.startValue===e&&this.endValue===e?`${this._startDateLabelId} ${this._endDateLabelId}`:this.startValue===e?this._startDateLabelId:this.endValue===e?this._endDateLabelId:null:null}_getCellFromElement(e){let a=ht(e);if(a){let t=a.getAttribute("data-mat-row"),i=a.getAttribute("data-mat-col");if(t&&i)return this.rows[parseInt(t)][parseInt(i)]}return null}};n.\u0275fac=function(a){return new(a||n)(o(O),o(Je))},n.\u0275cmp=S({type:n,selectors:[["","mat-calendar-body",""]],hostAttrs:[1,"mat-calendar-body"],inputs:{label:"label",rows:"rows",todayValue:"todayValue",startValue:"startValue",endValue:"endValue",labelMinRequiredCells:"labelMinRequiredCells",numCols:"numCols",activeCell:"activeCell",isRange:"isRange",cellAspectRatio:"cellAspectRatio",comparisonStart:"comparisonStart",comparisonEnd:"comparisonEnd",previewStart:"previewStart",previewEnd:"previewEnd",startDateAccessibleName:"startDateAccessibleName",endDateAccessibleName:"endDateAccessibleName"},outputs:{selectedValueChange:"selectedValueChange",previewChange:"previewChange",activeDateChange:"activeDateChange",dragStarted:"dragStarted",dragEnded:"dragEnded"},exportAs:["matCalendarBody"],standalone:!0,features:[z,x],attrs:_a,decls:7,vars:5,consts:[["aria-hidden","true"],[1,"mat-calendar-body-hidden-label",3,"id"],[1,"mat-calendar-body-label"],["role","row"],["class","mat-calendar-body-label",3,"paddingTop","paddingBottom"],["role","gridcell",1,"mat-calendar-body-cell-container"],["type","button",1,"mat-calendar-body-cell",3,"ngClass","tabindex","click","focus"],[1,"mat-calendar-body-cell-content","mat-focus-indicator"],["aria-hidden","true",1,"mat-calendar-body-cell-preview"],["role","gridcell","class","mat-calendar-body-cell-container",3,"width","paddingTop","paddingBottom"]],template:function(a,t){a&1&&(X(0,ga,3,6,"tr",0),Te(1,ba,4,1,"tr",3,Re),h(3,"label",1),D(4),u(),h(5,"label",1),D(6),u()),a&2&&(he(0,t._firstRowOffset.mat-calendar-body-cell-content:not(.mat-calendar-body-selected):not(.mat-calendar-body-comparison-identical){color:var(--mat-datepicker-calendar-date-disabled-state-text-color)}.mat-calendar-body-disabled>.mat-calendar-body-today:not(.mat-calendar-body-selected):not(.mat-calendar-body-comparison-identical){border-color:var(--mat-datepicker-calendar-date-today-disabled-state-outline-color)}.cdk-high-contrast-active .mat-calendar-body-disabled{opacity:.5}.mat-calendar-body-cell-content{top:5%;left:5%;z-index:1;display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:90%;height:90%;line-height:1;border-width:1px;border-style:solid;border-radius:999px;color:var(--mat-datepicker-calendar-date-text-color);border-color:var(--mat-datepicker-calendar-date-outline-color)}.mat-calendar-body-cell-content.mat-focus-indicator{position:absolute}.cdk-high-contrast-active .mat-calendar-body-cell-content{border:none}.cdk-keyboard-focused .mat-calendar-body-active>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected):not(.mat-calendar-body-comparison-identical),.cdk-program-focused .mat-calendar-body-active>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected):not(.mat-calendar-body-comparison-identical){background-color:var(--mat-datepicker-calendar-date-focus-state-background-color)}@media(hover: hover){.mat-calendar-body-cell:not(.mat-calendar-body-disabled):hover>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected):not(.mat-calendar-body-comparison-identical){background-color:var(--mat-datepicker-calendar-date-hover-state-background-color)}}.mat-calendar-body-selected{background-color:var(--mat-datepicker-calendar-date-selected-state-background-color);color:var(--mat-datepicker-calendar-date-selected-state-text-color)}.mat-calendar-body-disabled>.mat-calendar-body-selected{background-color:var(--mat-datepicker-calendar-date-selected-disabled-state-background-color)}.mat-calendar-body-selected.mat-calendar-body-today{box-shadow:inset 0 0 0 1px var(--mat-datepicker-calendar-date-today-selected-state-outline-color)}.mat-calendar-body-in-range::before{background:var(--mat-datepicker-calendar-date-in-range-state-background-color)}.mat-calendar-body-comparison-identical,.mat-calendar-body-in-comparison-range::before{background:var(--mat-datepicker-calendar-date-in-comparison-range-state-background-color)}.mat-calendar-body-comparison-identical,.mat-calendar-body-in-comparison-range::before{background:var(--mat-datepicker-calendar-date-in-comparison-range-state-background-color)}.mat-calendar-body-comparison-bridge-start::before,[dir=rtl] .mat-calendar-body-comparison-bridge-end::before{background:linear-gradient(to right, var(--mat-datepicker-calendar-date-in-range-state-background-color) 50%, var(--mat-datepicker-calendar-date-in-comparison-range-state-background-color) 50%)}.mat-calendar-body-comparison-bridge-end::before,[dir=rtl] .mat-calendar-body-comparison-bridge-start::before{background:linear-gradient(to left, var(--mat-datepicker-calendar-date-in-range-state-background-color) 50%, var(--mat-datepicker-calendar-date-in-comparison-range-state-background-color) 50%)}.mat-calendar-body-in-range>.mat-calendar-body-comparison-identical,.mat-calendar-body-in-comparison-range.mat-calendar-body-in-range::after{background:var(--mat-datepicker-calendar-date-in-overlap-range-state-background-color)}.mat-calendar-body-comparison-identical.mat-calendar-body-selected,.mat-calendar-body-in-comparison-range>.mat-calendar-body-selected{background:var(--mat-datepicker-calendar-date-in-overlap-range-selected-state-background-color)}.cdk-high-contrast-active .mat-datepicker-popup:not(:empty),.cdk-high-contrast-active .mat-calendar-body-cell:not(.mat-calendar-body-in-range) .mat-calendar-body-selected{outline:solid 1px}.cdk-high-contrast-active .mat-calendar-body-today{outline:dotted 1px}.cdk-high-contrast-active .mat-calendar-body-cell::before,.cdk-high-contrast-active .mat-calendar-body-cell::after,.cdk-high-contrast-active .mat-calendar-body-selected{background:none}.cdk-high-contrast-active .mat-calendar-body-in-range::before,.cdk-high-contrast-active .mat-calendar-body-comparison-bridge-start::before,.cdk-high-contrast-active .mat-calendar-body-comparison-bridge-end::before{border-top:solid 1px;border-bottom:solid 1px}.cdk-high-contrast-active .mat-calendar-body-range-start::before{border-left:solid 1px}[dir=rtl] .cdk-high-contrast-active .mat-calendar-body-range-start::before{border-left:0;border-right:solid 1px}.cdk-high-contrast-active .mat-calendar-body-range-end::before{border-right:solid 1px}[dir=rtl] .cdk-high-contrast-active .mat-calendar-body-range-end::before{border-right:0;border-left:solid 1px}.cdk-high-contrast-active .mat-calendar-body-in-comparison-range::before{border-top:dashed 1px;border-bottom:dashed 1px}.cdk-high-contrast-active .mat-calendar-body-comparison-start::before{border-left:dashed 1px}[dir=rtl] .cdk-high-contrast-active .mat-calendar-body-comparison-start::before{border-left:0;border-right:dashed 1px}.cdk-high-contrast-active .mat-calendar-body-comparison-end::before{border-right:dashed 1px}[dir=rtl] .cdk-high-contrast-active .mat-calendar-body-comparison-end::before{border-right:0;border-left:dashed 1px}[dir=rtl] .mat-calendar-body-label{text-align:right}'],encapsulation:2,changeDetection:0});let r=n;return r})();function ct(r){return r?.nodeName==="TD"}function ht(r){let n;return ct(r)?n=r:ct(r.parentNode)?n=r.parentNode:ct(r.parentNode?.parentNode)&&(n=r.parentNode.parentNode),n?.getAttribute("data-mat-row")!=null?n:null}function ut(r,n,d){return d!==null&&n!==d&&r=n&&r===d}function mt(r,n,d,e){return e&&n!==null&&d!==null&&n!==d&&r>=n&&r<=d}function Xt(r){let n=r.changedTouches[0];return document.elementFromPoint(n.clientX,n.clientY)}var g=class{constructor(n,d){this.start=n,this.end=d}},G=(()=>{let n=class n{constructor(e,a){this.selection=e,this._adapter=a,this._selectionChanged=new B,this.selectionChanged=this._selectionChanged,this.selection=e}updateSelection(e,a){let t=this.selection;this.selection=e,this._selectionChanged.next({selection:e,source:a,oldValue:t})}ngOnDestroy(){this._selectionChanged.complete()}_isValidDateInstance(e){return this._adapter.isDateInstance(e)&&this._adapter.isValid(e)}};n.\u0275fac=function(a){Mt()},n.\u0275prov=ee({token:n,factory:n.\u0275fac});let r=n;return r})(),Ta=(()=>{let n=class n extends G{constructor(e){super(null,e)}add(e){super.updateSelection(e,this)}isValid(){return this.selection!=null&&this._isValidDateInstance(this.selection)}isComplete(){return this.selection!=null}clone(){let e=new n(this._adapter);return e.updateSelection(this.selection,this),e}};n.\u0275fac=function(a){return new(a||n)(Se(_))},n.\u0275prov=ee({token:n,factory:n.\u0275fac});let r=n;return r})(),Oa=(()=>{let n=class n extends G{constructor(e){super(new g(null,null),e)}add(e){let{start:a,end:t}=this.selection;a==null?a=e:t==null?t=e:(a=e,t=null),super.updateSelection(new g(a,t),this)}isValid(){let{start:e,end:a}=this.selection;return e==null&&a==null?!0:e!=null&&a!=null?this._isValidDateInstance(e)&&this._isValidDateInstance(a)&&this._adapter.compareDate(e,a)<=0:(e==null||this._isValidDateInstance(e))&&(a==null||this._isValidDateInstance(a))}isComplete(){return this.selection.start!=null&&this.selection.end!=null}clone(){let e=new n(this._adapter);return e.updateSelection(this.selection,this),e}};n.\u0275fac=function(a){return new(a||n)(Se(_))},n.\u0275prov=ee({token:n,factory:n.\u0275fac});let r=n;return r})();function Pa(r,n){return r||new Ta(n)}var na={provide:G,deps:[[new Ve,new Ee,G],_],useFactory:Pa};function Ya(r,n){return r||new Oa(n)}var Na={provide:G,deps:[[new Ve,new Ee,G],_],useFactory:Ya},$e=new Ie("MAT_DATE_RANGE_SELECTION_STRATEGY"),La=(()=>{let n=class n{constructor(e){this._dateAdapter=e}selectionFinished(e,a){let{start:t,end:i}=a;return t==null?t=e:i==null&&e&&this._dateAdapter.compareDate(e,t)>=0?i=e:(t=e,i=null),new g(t,i)}createPreview(e,a){let t=null,i=null;return a.start&&!a.end&&e&&(t=a.start,i=e),new g(t,i)}createDrag(e,a,t){let i=a.start,s=a.end;if(!i||!s)return null;let l=this._dateAdapter,w=l.compareDate(i,s)!==0,k=l.getYear(t)-l.getYear(e),j=l.getMonth(t)-l.getMonth(e),M=l.getDate(t)-l.getDate(e);return w&&l.sameDate(e,a.start)?(i=t,l.compareDate(t,s)>0&&(s=l.addCalendarYears(s,k),s=l.addCalendarMonths(s,j),s=l.addCalendarDays(s,M))):w&&l.sameDate(e,a.end)?(s=t,l.compareDate(t,i)<0&&(i=l.addCalendarYears(i,k),i=l.addCalendarMonths(i,j),i=l.addCalendarDays(i,M))):(i=l.addCalendarYears(i,k),i=l.addCalendarMonths(i,j),i=l.addCalendarDays(i,M),s=l.addCalendarYears(s,k),s=l.addCalendarMonths(s,j),s=l.addCalendarDays(s,M)),new g(i,s)}};n.\u0275fac=function(a){return new(a||n)(Se(_))},n.\u0275prov=ee({token:n,factory:n.\u0275fac});let r=n;return r})();function ja(r,n){return r||new La(n)}var Ba={provide:$e,deps:[[new Ve,new Ee,$e],_],useFactory:ja},_t=7,Zt=(()=>{let n=class n{get activeDate(){return this._activeDate}set activeDate(e){let a=this._activeDate,t=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e))||this._dateAdapter.today();this._activeDate=this._dateAdapter.clampDate(t,this.minDate,this.maxDate),this._hasSameMonthAndYear(a,this._activeDate)||this._init()}get selected(){return this._selected}set selected(e){e instanceof g?this._selected=e:this._selected=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e)),this._setRanges(this._selected)}get minDate(){return this._minDate}set minDate(e){this._minDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e))}get maxDate(){return this._maxDate}set maxDate(e){this._maxDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e))}constructor(e,a,t,i,s){this._changeDetectorRef=e,this._dateFormats=a,this._dateAdapter=t,this._dir=i,this._rangeStrategy=s,this._rerenderSubscription=F.EMPTY,this.activeDrag=null,this.selectedChange=new p,this._userSelection=new p,this.dragStarted=new p,this.dragEnded=new p,this.activeDateChange=new p,this._activeDate=this._dateAdapter.today()}ngAfterContentInit(){this._rerenderSubscription=this._dateAdapter.localeChanges.pipe(ke(null)).subscribe(()=>this._init())}ngOnChanges(e){let a=e.comparisonStart||e.comparisonEnd;a&&!a.firstChange&&this._setRanges(this.selected),e.activeDrag&&!this.activeDrag&&this._clearPreview()}ngOnDestroy(){this._rerenderSubscription.unsubscribe()}_dateSelected(e){let a=e.value,t=this._getDateFromDayOfMonth(a),i,s;this._selected instanceof g?(i=this._getDateInCurrentMonth(this._selected.start),s=this._getDateInCurrentMonth(this._selected.end)):i=s=this._getDateInCurrentMonth(this._selected),(i!==a||s!==a)&&this.selectedChange.emit(t),this._userSelection.emit({value:t,event:e.event}),this._clearPreview(),this._changeDetectorRef.markForCheck()}_updateActiveDate(e){let a=e.value,t=this._activeDate;this.activeDate=this._getDateFromDayOfMonth(a),this._dateAdapter.compareDate(t,this.activeDate)&&this.activeDateChange.emit(this._activeDate)}_handleCalendarBodyKeydown(e){let a=this._activeDate,t=this._isRtl();switch(e.keyCode){case 37:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,t?1:-1);break;case 39:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,t?-1:1);break;case 38:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,-7);break;case 40:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,7);break;case 36:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,1-this._dateAdapter.getDate(this._activeDate));break;case 35:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,this._dateAdapter.getNumDaysInMonth(this._activeDate)-this._dateAdapter.getDate(this._activeDate));break;case 33:this.activeDate=e.altKey?this._dateAdapter.addCalendarYears(this._activeDate,-1):this._dateAdapter.addCalendarMonths(this._activeDate,-1);break;case 34:this.activeDate=e.altKey?this._dateAdapter.addCalendarYears(this._activeDate,1):this._dateAdapter.addCalendarMonths(this._activeDate,1);break;case 13:case 32:this._selectionKeyPressed=!0,this._canSelect(this._activeDate)&&e.preventDefault();return;case 27:this._previewEnd!=null&&!Z(e)&&(this._clearPreview(),this.activeDrag?this.dragEnded.emit({value:null,event:e}):(this.selectedChange.emit(null),this._userSelection.emit({value:null,event:e})),e.preventDefault(),e.stopPropagation());return;default:return}this._dateAdapter.compareDate(a,this.activeDate)&&(this.activeDateChange.emit(this.activeDate),this._focusActiveCellAfterViewChecked()),e.preventDefault()}_handleCalendarBodyKeyup(e){(e.keyCode===32||e.keyCode===13)&&(this._selectionKeyPressed&&this._canSelect(this._activeDate)&&this._dateSelected({value:this._dateAdapter.getDate(this._activeDate),event:e}),this._selectionKeyPressed=!1)}_init(){this._setRanges(this.selected),this._todayDate=this._getCellCompareValue(this._dateAdapter.today()),this._monthLabel=this._dateFormats.display.monthLabel?this._dateAdapter.format(this.activeDate,this._dateFormats.display.monthLabel):this._dateAdapter.getMonthNames("short")[this._dateAdapter.getMonth(this.activeDate)].toLocaleUpperCase();let e=this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),this._dateAdapter.getMonth(this.activeDate),1);this._firstWeekOffset=(_t+this._dateAdapter.getDayOfWeek(e)-this._dateAdapter.getFirstDayOfWeek())%_t,this._initWeekdays(),this._createWeekCells(),this._changeDetectorRef.markForCheck()}_focusActiveCell(e){this._matCalendarBody._focusActiveCell(e)}_focusActiveCellAfterViewChecked(){this._matCalendarBody._scheduleFocusActiveCellAfterViewChecked()}_previewChanged({event:e,value:a}){if(this._rangeStrategy){let t=a?a.rawValue:null,i=this._rangeStrategy.createPreview(t,this.selected,e);if(this._previewStart=this._getCellCompareValue(i.start),this._previewEnd=this._getCellCompareValue(i.end),this.activeDrag&&t){let s=this._rangeStrategy.createDrag?.(this.activeDrag.value,this.selected,t,e);s&&(this._previewStart=this._getCellCompareValue(s.start),this._previewEnd=this._getCellCompareValue(s.end))}this._changeDetectorRef.detectChanges()}}_dragEnded(e){if(this.activeDrag)if(e.value){let a=this._rangeStrategy?.createDrag?.(this.activeDrag.value,this.selected,e.value,e.event);this.dragEnded.emit({value:a??null,event:e.event})}else this.dragEnded.emit({value:null,event:e.event})}_getDateFromDayOfMonth(e){return this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),this._dateAdapter.getMonth(this.activeDate),e)}_initWeekdays(){let e=this._dateAdapter.getFirstDayOfWeek(),a=this._dateAdapter.getDayOfWeekNames("narrow"),i=this._dateAdapter.getDayOfWeekNames("long").map((s,l)=>({long:s,narrow:a[l]}));this._weekdays=i.slice(e).concat(i.slice(0,e))}_createWeekCells(){let e=this._dateAdapter.getNumDaysInMonth(this.activeDate),a=this._dateAdapter.getDateNames();this._weeks=[[]];for(let t=0,i=this._firstWeekOffset;t=0)&&(!this.maxDate||this._dateAdapter.compareDate(e,this.maxDate)<=0)&&(!this.dateFilter||this.dateFilter(e))}_getDateInCurrentMonth(e){return e&&this._hasSameMonthAndYear(e,this.activeDate)?this._dateAdapter.getDate(e):null}_hasSameMonthAndYear(e,a){return!!(e&&a&&this._dateAdapter.getMonth(e)==this._dateAdapter.getMonth(a)&&this._dateAdapter.getYear(e)==this._dateAdapter.getYear(a))}_getCellCompareValue(e){if(e){let a=this._dateAdapter.getYear(e),t=this._dateAdapter.getMonth(e),i=this._dateAdapter.getDate(e);return new Date(a,t,i).getTime()}return null}_isRtl(){return this._dir&&this._dir.value==="rtl"}_setRanges(e){e instanceof g?(this._rangeStart=this._getCellCompareValue(e.start),this._rangeEnd=this._getCellCompareValue(e.end),this._isRange=!0):(this._rangeStart=this._rangeEnd=this._getCellCompareValue(e),this._isRange=!1),this._comparisonRangeStart=this._getCellCompareValue(this.comparisonStart),this._comparisonRangeEnd=this._getCellCompareValue(this.comparisonEnd)}_canSelect(e){return!this.dateFilter||this.dateFilter(e)}_clearPreview(){this._previewStart=this._previewEnd=null}};n.\u0275fac=function(a){return new(a||n)(o(P),o(T,8),o(_,8),o(J,8),o($e,8))},n.\u0275cmp=S({type:n,selectors:[["mat-month-view"]],viewQuery:function(a,t){if(a&1&&Y(re,5),a&2){let i;V(i=E())&&(t._matCalendarBody=i.first)}},inputs:{activeDate:"activeDate",selected:"selected",minDate:"minDate",maxDate:"maxDate",dateFilter:"dateFilter",dateClass:"dateClass",comparisonStart:"comparisonStart",comparisonEnd:"comparisonEnd",startDateAccessibleName:"startDateAccessibleName",endDateAccessibleName:"endDateAccessibleName",activeDrag:"activeDrag"},outputs:{selectedChange:"selectedChange",_userSelection:"_userSelection",dragStarted:"dragStarted",dragEnded:"dragEnded",activeDateChange:"activeDateChange"},exportAs:["matMonthView"],standalone:!0,features:[z,x],decls:8,vars:14,consts:[["role","grid",1,"mat-calendar-table"],[1,"mat-calendar-table-header"],["aria-hidden","true","colspan","7",1,"mat-calendar-table-header-divider"],["mat-calendar-body","",3,"label","rows","todayValue","startValue","endValue","comparisonStart","comparisonEnd","previewStart","previewEnd","isRange","labelMinRequiredCells","activeCell","startDateAccessibleName","endDateAccessibleName","selectedValueChange","activeDateChange","previewChange","dragStarted","dragEnded","keyup","keydown"],["scope","col"],[1,"cdk-visually-hidden"],["aria-hidden","true"]],template:function(a,t){a&1&&(h(0,"table",0)(1,"thead",1)(2,"tr"),Te(3,Da,5,2,"th",4,Re),u(),h(5,"tr"),K(6,"th",2),u()(),h(7,"tbody",3),v("selectedValueChange",function(s){return t._dateSelected(s)})("activeDateChange",function(s){return t._updateActiveDate(s)})("previewChange",function(s){return t._previewChanged(s)})("dragStarted",function(s){return t.dragStarted.emit(s)})("dragEnded",function(s){return t._dragEnded(s)})("keyup",function(s){return t._handleCalendarBodyKeyup(s)})("keydown",function(s){return t._handleCalendarBodyKeydown(s)}),u()()),a&2&&(c(3),Oe(t._weekdays),c(4),f("label",t._monthLabel)("rows",t._weeks)("todayValue",t._todayDate)("startValue",t._rangeStart)("endValue",t._rangeEnd)("comparisonStart",t._comparisonRangeStart)("comparisonEnd",t._comparisonRangeEnd)("previewStart",t._previewStart)("previewEnd",t._previewEnd)("isRange",t._isRange)("labelMinRequiredCells",3)("activeCell",t._dateAdapter.getDate(t.activeDate)-1)("startDateAccessibleName",t.startDateAccessibleName)("endDateAccessibleName",t.endDateAccessibleName))},dependencies:[re],encapsulation:2,changeDetection:0});let r=n;return r})(),A=24,gt=4,Jt=(()=>{let n=class n{get activeDate(){return this._activeDate}set activeDate(e){let a=this._activeDate,t=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e))||this._dateAdapter.today();this._activeDate=this._dateAdapter.clampDate(t,this.minDate,this.maxDate),ra(this._dateAdapter,a,this._activeDate,this.minDate,this.maxDate)||this._init()}get selected(){return this._selected}set selected(e){e instanceof g?this._selected=e:this._selected=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e)),this._setSelectedYear(e)}get minDate(){return this._minDate}set minDate(e){this._minDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e))}get maxDate(){return this._maxDate}set maxDate(e){this._maxDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e))}constructor(e,a,t){this._changeDetectorRef=e,this._dateAdapter=a,this._dir=t,this._rerenderSubscription=F.EMPTY,this.selectedChange=new p,this.yearSelected=new p,this.activeDateChange=new p,this._dateAdapter,this._activeDate=this._dateAdapter.today()}ngAfterContentInit(){this._rerenderSubscription=this._dateAdapter.localeChanges.pipe(ke(null)).subscribe(()=>this._init())}ngOnDestroy(){this._rerenderSubscription.unsubscribe()}_init(){this._todayYear=this._dateAdapter.getYear(this._dateAdapter.today());let a=this._dateAdapter.getYear(this._activeDate)-ve(this._dateAdapter,this.activeDate,this.minDate,this.maxDate);this._years=[];for(let t=0,i=[];tthis._createCellForYear(s))),i=[]);this._changeDetectorRef.markForCheck()}_yearSelected(e){let a=e.value,t=this._dateAdapter.createDate(a,0,1),i=this._getDateFromYear(a);this.yearSelected.emit(t),this.selectedChange.emit(i)}_updateActiveDate(e){let a=e.value,t=this._activeDate;this.activeDate=this._getDateFromYear(a),this._dateAdapter.compareDate(t,this.activeDate)&&this.activeDateChange.emit(this.activeDate)}_handleCalendarBodyKeydown(e){let a=this._activeDate,t=this._isRtl();switch(e.keyCode){case 37:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,t?1:-1);break;case 39:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,t?-1:1);break;case 38:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,-gt);break;case 40:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,gt);break;case 36:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,-ve(this._dateAdapter,this.activeDate,this.minDate,this.maxDate));break;case 35:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,A-ve(this._dateAdapter,this.activeDate,this.minDate,this.maxDate)-1);break;case 33:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,e.altKey?-A*10:-A);break;case 34:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,e.altKey?A*10:A);break;case 13:case 32:this._selectionKeyPressed=!0;break;default:return}this._dateAdapter.compareDate(a,this.activeDate)&&this.activeDateChange.emit(this.activeDate),this._focusActiveCellAfterViewChecked(),e.preventDefault()}_handleCalendarBodyKeyup(e){(e.keyCode===32||e.keyCode===13)&&(this._selectionKeyPressed&&this._yearSelected({value:this._dateAdapter.getYear(this._activeDate),event:e}),this._selectionKeyPressed=!1)}_getActiveCell(){return ve(this._dateAdapter,this.activeDate,this.minDate,this.maxDate)}_focusActiveCell(){this._matCalendarBody._focusActiveCell()}_focusActiveCellAfterViewChecked(){this._matCalendarBody._scheduleFocusActiveCellAfterViewChecked()}_getDateFromYear(e){let a=this._dateAdapter.getMonth(this.activeDate),t=this._dateAdapter.getNumDaysInMonth(this._dateAdapter.createDate(e,a,1));return this._dateAdapter.createDate(e,a,Math.min(this._dateAdapter.getDate(this.activeDate),t))}_createCellForYear(e){let a=this._dateAdapter.createDate(e,0,1),t=this._dateAdapter.getYearName(a),i=this.dateClass?this.dateClass(a,"multi-year"):void 0;return new De(e,t,t,this._shouldEnableYear(e),i)}_shouldEnableYear(e){if(e==null||this.maxDate&&e>this._dateAdapter.getYear(this.maxDate)||this.minDate&&e{let n=class n{get activeDate(){return this._activeDate}set activeDate(e){let a=this._activeDate,t=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e))||this._dateAdapter.today();this._activeDate=this._dateAdapter.clampDate(t,this.minDate,this.maxDate),this._dateAdapter.getYear(a)!==this._dateAdapter.getYear(this._activeDate)&&this._init()}get selected(){return this._selected}set selected(e){e instanceof g?this._selected=e:this._selected=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e)),this._setSelectedMonth(e)}get minDate(){return this._minDate}set minDate(e){this._minDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e))}get maxDate(){return this._maxDate}set maxDate(e){this._maxDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e))}constructor(e,a,t,i){this._changeDetectorRef=e,this._dateFormats=a,this._dateAdapter=t,this._dir=i,this._rerenderSubscription=F.EMPTY,this.selectedChange=new p,this.monthSelected=new p,this.activeDateChange=new p,this._activeDate=this._dateAdapter.today()}ngAfterContentInit(){this._rerenderSubscription=this._dateAdapter.localeChanges.pipe(ke(null)).subscribe(()=>this._init())}ngOnDestroy(){this._rerenderSubscription.unsubscribe()}_monthSelected(e){let a=e.value,t=this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),a,1);this.monthSelected.emit(t);let i=this._getDateFromMonth(a);this.selectedChange.emit(i)}_updateActiveDate(e){let a=e.value,t=this._activeDate;this.activeDate=this._getDateFromMonth(a),this._dateAdapter.compareDate(t,this.activeDate)&&this.activeDateChange.emit(this.activeDate)}_handleCalendarBodyKeydown(e){let a=this._activeDate,t=this._isRtl();switch(e.keyCode){case 37:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,t?1:-1);break;case 39:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,t?-1:1);break;case 38:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,-4);break;case 40:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,4);break;case 36:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,-this._dateAdapter.getMonth(this._activeDate));break;case 35:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,11-this._dateAdapter.getMonth(this._activeDate));break;case 33:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,e.altKey?-10:-1);break;case 34:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,e.altKey?10:1);break;case 13:case 32:this._selectionKeyPressed=!0;break;default:return}this._dateAdapter.compareDate(a,this.activeDate)&&(this.activeDateChange.emit(this.activeDate),this._focusActiveCellAfterViewChecked()),e.preventDefault()}_handleCalendarBodyKeyup(e){(e.keyCode===32||e.keyCode===13)&&(this._selectionKeyPressed&&this._monthSelected({value:this._dateAdapter.getMonth(this._activeDate),event:e}),this._selectionKeyPressed=!1)}_init(){this._setSelectedMonth(this.selected),this._todayMonth=this._getMonthInCurrentYear(this._dateAdapter.today()),this._yearLabel=this._dateAdapter.getYearName(this.activeDate);let e=this._dateAdapter.getMonthNames("short");this._months=[[0,1,2,3],[4,5,6,7],[8,9,10,11]].map(a=>a.map(t=>this._createCellForMonth(t,e[t]))),this._changeDetectorRef.markForCheck()}_focusActiveCell(){this._matCalendarBody._focusActiveCell()}_focusActiveCellAfterViewChecked(){this._matCalendarBody._scheduleFocusActiveCellAfterViewChecked()}_getMonthInCurrentYear(e){return e&&this._dateAdapter.getYear(e)==this._dateAdapter.getYear(this.activeDate)?this._dateAdapter.getMonth(e):null}_getDateFromMonth(e){let a=this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),e,1),t=this._dateAdapter.getNumDaysInMonth(a);return this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),e,Math.min(this._dateAdapter.getDate(this.activeDate),t))}_createCellForMonth(e,a){let t=this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),e,1),i=this._dateAdapter.format(t,this._dateFormats.display.monthYearA11yLabel),s=this.dateClass?this.dateClass(t,"year"):void 0;return new De(e,a.toLocaleUpperCase(),i,this._shouldEnableMonth(e),s)}_shouldEnableMonth(e){let a=this._dateAdapter.getYear(this.activeDate);if(e==null||this._isYearAndMonthAfterMaxDate(a,e)||this._isYearAndMonthBeforeMinDate(a,e))return!1;if(!this.dateFilter)return!0;let t=this._dateAdapter.createDate(a,e,1);for(let i=t;this._dateAdapter.getMonth(i)==e;i=this._dateAdapter.addCalendarDays(i,1))if(this.dateFilter(i))return!0;return!1}_isYearAndMonthAfterMaxDate(e,a){if(this.maxDate){let t=this._dateAdapter.getYear(this.maxDate),i=this._dateAdapter.getMonth(this.maxDate);return e>t||e===t&&a>i}return!1}_isYearAndMonthBeforeMinDate(e,a){if(this.minDate){let t=this._dateAdapter.getYear(this.minDate),i=this._dateAdapter.getMonth(this.minDate);return e{let n=class n{constructor(e,a,t,i,s){this._intl=e,this.calendar=a,this._dateAdapter=t,this._dateFormats=i,this._id=`mat-calendar-header-${za++}`,this._periodButtonLabelId=`${this._id}-period-label`,this.calendar.stateChanges.subscribe(()=>s.markForCheck())}get periodButtonText(){return this.calendar.currentView=="month"?this._dateAdapter.format(this.calendar.activeDate,this._dateFormats.display.monthYearLabel).toLocaleUpperCase():this.calendar.currentView=="year"?this._dateAdapter.getYearName(this.calendar.activeDate):this._intl.formatYearRange(...this._formatMinAndMaxYearLabels())}get periodButtonDescription(){return this.calendar.currentView=="month"?this._dateAdapter.format(this.calendar.activeDate,this._dateFormats.display.monthYearLabel).toLocaleUpperCase():this.calendar.currentView=="year"?this._dateAdapter.getYearName(this.calendar.activeDate):this._intl.formatYearRangeLabel(...this._formatMinAndMaxYearLabels())}get periodButtonLabel(){return this.calendar.currentView=="month"?this._intl.switchToMultiYearViewLabel:this._intl.switchToMonthViewLabel}get prevButtonLabel(){return{month:this._intl.prevMonthLabel,year:this._intl.prevYearLabel,"multi-year":this._intl.prevMultiYearLabel}[this.calendar.currentView]}get nextButtonLabel(){return{month:this._intl.nextMonthLabel,year:this._intl.nextYearLabel,"multi-year":this._intl.nextMultiYearLabel}[this.calendar.currentView]}currentPeriodClicked(){this.calendar.currentView=this.calendar.currentView=="month"?"multi-year":"month"}previousClicked(){this.calendar.activeDate=this.calendar.currentView=="month"?this._dateAdapter.addCalendarMonths(this.calendar.activeDate,-1):this._dateAdapter.addCalendarYears(this.calendar.activeDate,this.calendar.currentView=="year"?-1:-A)}nextClicked(){this.calendar.activeDate=this.calendar.currentView=="month"?this._dateAdapter.addCalendarMonths(this.calendar.activeDate,1):this._dateAdapter.addCalendarYears(this.calendar.activeDate,this.calendar.currentView=="year"?1:A)}previousEnabled(){return this.calendar.minDate?!this.calendar.minDate||!this._isSameView(this.calendar.activeDate,this.calendar.minDate):!0}nextEnabled(){return!this.calendar.maxDate||!this._isSameView(this.calendar.activeDate,this.calendar.maxDate)}_isSameView(e,a){return this.calendar.currentView=="month"?this._dateAdapter.getYear(e)==this._dateAdapter.getYear(a)&&this._dateAdapter.getMonth(e)==this._dateAdapter.getMonth(a):this.calendar.currentView=="year"?this._dateAdapter.getYear(e)==this._dateAdapter.getYear(a):ra(this._dateAdapter,e,a,this.calendar.minDate,this.calendar.maxDate)}_formatMinAndMaxYearLabels(){let a=this._dateAdapter.getYear(this.calendar.activeDate)-ve(this._dateAdapter,this.calendar.activeDate,this.calendar.minDate,this.calendar.maxDate),t=a+A-1,i=this._dateAdapter.getYearName(this._dateAdapter.createDate(a,0,1)),s=this._dateAdapter.getYearName(this._dateAdapter.createDate(t,0,1));return[i,s]}};n.\u0275fac=function(a){return new(a||n)(o(Ce),o(Me(()=>ft)),o(_,8),o(T,8),o(P))},n.\u0275cmp=S({type:n,selectors:[["mat-calendar-header"]],exportAs:["matCalendarHeader"],standalone:!0,features:[x],ngContentSelectors:ya,decls:13,vars:11,consts:[[1,"mat-calendar-header"],[1,"mat-calendar-controls"],["mat-button","","type","button","aria-live","polite",1,"mat-calendar-period-button",3,"click"],["aria-hidden","true"],["viewBox","0 0 10 5","focusable","false","aria-hidden","true",1,"mat-calendar-arrow"],["points","0,0 5,5 10,0"],[1,"mat-calendar-spacer"],["mat-icon-button","","type","button",1,"mat-calendar-previous-button",3,"disabled","click"],["mat-icon-button","","type","button",1,"mat-calendar-next-button",3,"disabled","click"],[1,"mat-calendar-hidden-label",3,"id"]],template:function(a,t){a&1&&(Ye(),h(0,"div",0)(1,"div",1)(2,"button",2),v("click",function(){return t.currentPeriodClicked()}),h(3,"span",3),D(4),u(),Xe(),h(5,"svg",4),K(6,"polygon",5),u()(),wt(),K(7,"div",6),pe(8),h(9,"button",7),v("click",function(){return t.previousClicked()}),u(),h(10,"button",8),v("click",function(){return t.nextClicked()}),u()()(),h(11,"label",9),D(12),u()),a&2&&(c(2),b("aria-label",t.periodButtonLabel)("aria-describedby",t._periodButtonLabelId),c(2),N(t.periodButtonText),c(),R("mat-calendar-invert",t.calendar.currentView!=="month"),c(4),f("disabled",!t.previousEnabled()),b("aria-label",t.prevButtonLabel),c(),f("disabled",!t.nextEnabled()),b("aria-label",t.nextButtonLabel),c(),f("id",t._periodButtonLabelId),c(),N(t.periodButtonDescription))},dependencies:[rt,st],encapsulation:2,changeDetection:0});let r=n;return r})(),ft=(()=>{let n=class n{get startAt(){return this._startAt}set startAt(e){this._startAt=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e))}get selected(){return this._selected}set selected(e){e instanceof g?this._selected=e:this._selected=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e))}get minDate(){return this._minDate}set minDate(e){this._minDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e))}get maxDate(){return this._maxDate}set maxDate(e){this._maxDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e))}get activeDate(){return this._clampedActiveDate}set activeDate(e){this._clampedActiveDate=this._dateAdapter.clampDate(e,this.minDate,this.maxDate),this.stateChanges.next(),this._changeDetectorRef.markForCheck()}get currentView(){return this._currentView}set currentView(e){let a=this._currentView!==e?e:null;this._currentView=e,this._moveFocusOnNextTick=!0,this._changeDetectorRef.markForCheck(),a&&this.viewChanged.emit(a)}constructor(e,a,t,i){this._dateAdapter=a,this._dateFormats=t,this._changeDetectorRef=i,this._moveFocusOnNextTick=!1,this.startView="month",this.selectedChange=new p,this.yearSelected=new p,this.monthSelected=new p,this.viewChanged=new p(!0),this._userSelection=new p,this._userDragDrop=new p,this._activeDrag=null,this.stateChanges=new B,this._intlChanges=e.changes.subscribe(()=>{i.markForCheck(),this.stateChanges.next()})}ngAfterContentInit(){this._calendarHeaderPortal=new ot(this.headerComponent||da),this.activeDate=this.startAt||this._dateAdapter.today(),this._currentView=this.startView}ngAfterViewChecked(){this._moveFocusOnNextTick&&(this._moveFocusOnNextTick=!1,this.focusActiveCell())}ngOnDestroy(){this._intlChanges.unsubscribe(),this.stateChanges.complete()}ngOnChanges(e){let a=e.minDate&&!this._dateAdapter.sameDate(e.minDate.previousValue,e.minDate.currentValue)?e.minDate:void 0,t=e.maxDate&&!this._dateAdapter.sameDate(e.maxDate.previousValue,e.maxDate.currentValue)?e.maxDate:void 0,i=a||t||e.dateFilter;if(i&&!i.firstChange){let s=this._getCurrentViewComponent();s&&(this._changeDetectorRef.detectChanges(),s._init())}this.stateChanges.next()}focusActiveCell(){this._getCurrentViewComponent()._focusActiveCell(!1)}updateTodaysDate(){this._getCurrentViewComponent()._init()}_dateSelected(e){let a=e.value;(this.selected instanceof g||a&&!this._dateAdapter.sameDate(a,this.selected))&&this.selectedChange.emit(a),this._userSelection.emit(e)}_yearSelectedInMultiYearView(e){this.yearSelected.emit(e)}_monthSelectedInYearView(e){this.monthSelected.emit(e)}_goToDateInView(e,a){this.activeDate=e,this.currentView=a}_dragStarted(e){this._activeDrag=e}_dragEnded(e){this._activeDrag&&(e.value&&this._userDragDrop.emit(e),this._activeDrag=null)}_getCurrentViewComponent(){return this.monthView||this.yearView||this.multiYearView}};n.\u0275fac=function(a){return new(a||n)(o(Ce),o(_,8),o(T,8),o(P))},n.\u0275cmp=S({type:n,selectors:[["mat-calendar"]],viewQuery:function(a,t){if(a&1&&(Y(Zt,5),Y(ea,5),Y(Jt,5)),a&2){let i;V(i=E())&&(t.monthView=i.first),V(i=E())&&(t.yearView=i.first),V(i=E())&&(t.multiYearView=i.first)}},hostAttrs:[1,"mat-calendar"],inputs:{headerComponent:"headerComponent",startAt:"startAt",startView:"startView",selected:"selected",minDate:"minDate",maxDate:"maxDate",dateFilter:"dateFilter",dateClass:"dateClass",comparisonStart:"comparisonStart",comparisonEnd:"comparisonEnd",startDateAccessibleName:"startDateAccessibleName",endDateAccessibleName:"endDateAccessibleName"},outputs:{selectedChange:"selectedChange",yearSelected:"yearSelected",monthSelected:"monthSelected",viewChanged:"viewChanged",_userSelection:"_userSelection",_userDragDrop:"_userDragDrop"},exportAs:["matCalendar"],standalone:!0,features:[Q([na]),z,x],decls:5,vars:2,consts:[[3,"cdkPortalOutlet"],["cdkMonitorSubtreeFocus","","tabindex","-1",1,"mat-calendar-content"],[3,"activeDate","selected","dateFilter","maxDate","minDate","dateClass","comparisonStart","comparisonEnd","startDateAccessibleName","endDateAccessibleName","activeDrag","activeDateChange","_userSelection","dragStarted","dragEnded"],[3,"activeDate","selected","dateFilter","maxDate","minDate","dateClass","activeDateChange","monthSelected","selectedChange"],[3,"activeDate","selected","dateFilter","maxDate","minDate","dateClass","activeDateChange","yearSelected","selectedChange"]],template:function(a,t){if(a&1&&(X(0,Ca,0,0,"ng-template",0),h(1,"div",1),X(2,Aa,1,11)(3,wa,1,6)(4,ka,1,6),u()),a&2){let i;f("cdkPortalOutlet",t._calendarHeaderPortal),c(2),he(2,(i=t.currentView)==="month"?2:i==="year"?3:i==="multi-year"?4:-1)}},dependencies:[lt,tt,Zt,ea,Jt],styles:['.mat-calendar{display:block;font-family:var(--mat-datepicker-calendar-text-font);font-size:var(--mat-datepicker-calendar-text-size)}.mat-calendar-header{padding:8px 8px 0 8px}.mat-calendar-content{padding:0 8px 8px 8px;outline:none}.mat-calendar-controls{display:flex;align-items:center;margin:5% calc(4.7142857143% - 16px)}.mat-calendar-spacer{flex:1 1 auto}.mat-calendar-period-button{min-width:0;margin:0 8px;font-size:var(--mat-datepicker-calendar-period-button-text-size);font-weight:var(--mat-datepicker-calendar-period-button-text-weight)}.mat-calendar-arrow{display:inline-block;width:10px;height:5px;margin:0 0 0 5px;vertical-align:middle;fill:var(--mat-datepicker-calendar-period-button-icon-color)}.mat-calendar-arrow.mat-calendar-invert{transform:rotate(180deg)}[dir=rtl] .mat-calendar-arrow{margin:0 5px 0 0}.cdk-high-contrast-active .mat-calendar-arrow{fill:CanvasText}.mat-calendar-previous-button,.mat-calendar-next-button{position:relative}.mat-datepicker-content .mat-calendar-previous-button:not(.mat-mdc-button-disabled),.mat-datepicker-content .mat-calendar-next-button:not(.mat-mdc-button-disabled){color:var(--mat-datepicker-calendar-navigation-button-icon-color)}.mat-calendar-previous-button::after,.mat-calendar-next-button::after{top:0;left:0;right:0;bottom:0;position:absolute;content:"";margin:15.5px;border:0 solid currentColor;border-top-width:2px}[dir=rtl] .mat-calendar-previous-button,[dir=rtl] .mat-calendar-next-button{transform:rotate(180deg)}.mat-calendar-previous-button::after{border-left-width:2px;transform:translateX(2px) rotate(-45deg)}.mat-calendar-next-button::after{border-right-width:2px;transform:translateX(-2px) rotate(45deg)}.mat-calendar-table{border-spacing:0;border-collapse:collapse;width:100%}.mat-calendar-table-header th{text-align:center;padding:0 0 8px 0;color:var(--mat-datepicker-calendar-header-text-color);font-size:var(--mat-datepicker-calendar-header-text-size);font-weight:var(--mat-datepicker-calendar-header-text-weight)}.mat-calendar-table-header-divider{position:relative;height:1px}.mat-calendar-table-header-divider::after{content:"";position:absolute;top:0;left:-8px;right:-8px;height:1px;background:var(--mat-datepicker-calendar-header-divider-color)}.mat-calendar-body-cell-content::before{margin:calc(calc(var(--mat-focus-indicator-border-width, 3px) + 3px)*-1)}.mat-calendar-body-cell:focus .mat-focus-indicator::before{content:""}.mat-calendar-hidden-label{display:none}'],encapsulation:2,changeDetection:0});let r=n;return r})(),ta={transformPanel:at("transformPanel",[_e("void => enter-dropdown",me("120ms cubic-bezier(0, 0, 0.2, 1)",nt([$({opacity:0,transform:"scale(1, 0.8)"}),$({opacity:1,transform:"scale(1, 1)"})]))),_e("void => enter-dialog",me("150ms cubic-bezier(0, 0, 0.2, 1)",nt([$({opacity:0,transform:"scale(0.7)"}),$({transform:"none",opacity:1})]))),_e("* => void",me("100ms linear",$({opacity:0})))]),fadeInCalendar:at("fadeInCalendar",[it("void",$({opacity:0})),it("enter",$({opacity:1})),_e("void => *",me("120ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)"))])},Ka=0,oa=new Ie("mat-datepicker-scroll-strategy",{providedIn:"root",factory:()=>{let r=le(fe);return()=>r.scrollStrategies.reposition()}});function Qa(r){return()=>r.scrollStrategies.reposition()}var $a={provide:oa,deps:[fe],useFactory:Qa},la=(()=>{let n=class n{constructor(e,a,t,i,s,l){this._elementRef=e,this._changeDetectorRef=a,this._globalModel=t,this._dateAdapter=i,this._rangeSelectionStrategy=s,this._subscriptions=new F,this._animationDone=new B,this._isAnimating=!1,this._actionsPortal=null,this._closeButtonText=l.closeCalendarLabel}ngOnInit(){this._animationState=this.datepicker.touchUi?"enter-dialog":"enter-dropdown"}ngAfterViewInit(){this._subscriptions.add(this.datepicker.stateChanges.subscribe(()=>{this._changeDetectorRef.markForCheck()})),this._calendar.focusActiveCell()}ngOnDestroy(){this._subscriptions.unsubscribe(),this._animationDone.complete()}_handleUserSelection(e){let a=this._model.selection,t=e.value,i=a instanceof g;if(i&&this._rangeSelectionStrategy){let s=this._rangeSelectionStrategy.selectionFinished(t,a,e.event);this._model.updateSelection(s,this)}else t&&(i||!this._dateAdapter.sameDate(t,a))&&this._model.add(t);(!this._model||this._model.isComplete())&&!this._actionsPortal&&this.datepicker.close()}_handleUserDragDrop(e){this._model.updateSelection(e.value,this)}_startExitAnimation(){this._animationState="void",this._changeDetectorRef.markForCheck()}_handleAnimationEvent(e){this._isAnimating=e.phaseName==="start",this._isAnimating||this._animationDone.next()}_getSelected(){return this._model.selection}_applyPendingSelection(){this._model!==this._globalModel&&this._globalModel.updateSelection(this._model.selection,this)}_assignActions(e,a){this._model=e?this._globalModel.clone():this._globalModel,this._actionsPortal=e,a&&this._changeDetectorRef.detectChanges()}};n.\u0275fac=function(a){return new(a||n)(o(O),o(P),o(G),o(_),o($e,8),o(Ce))},n.\u0275cmp=S({type:n,selectors:[["mat-datepicker-content"]],viewQuery:function(a,t){if(a&1&&Y(ft,5),a&2){let i;V(i=E())&&(t._calendar=i.first)}},hostAttrs:[1,"mat-datepicker-content"],hostVars:5,hostBindings:function(a,t){a&1&&Et("@transformPanel.start",function(s){return t._handleAnimationEvent(s)})("@transformPanel.done",function(s){return t._handleAnimationEvent(s)}),a&2&&(Vt("@transformPanel",t._animationState),St(t.color?"mat-"+t.color:""),R("mat-datepicker-content-touch",t.datepicker.touchUi))},inputs:{color:"color"},exportAs:["matDatepickerContent"],standalone:!0,features:[x],decls:5,vars:26,consts:[["cdkTrapFocus","","role","dialog",1,"mat-datepicker-content-container"],[3,"id","ngClass","startAt","startView","minDate","maxDate","dateFilter","headerComponent","selected","dateClass","comparisonStart","comparisonEnd","startDateAccessibleName","endDateAccessibleName","yearSelected","monthSelected","viewChanged","_userSelection","_userDragDrop"],[3,"cdkPortalOutlet"],["type","button","mat-raised-button","",1,"mat-datepicker-close-button",3,"color","focus","blur","click"]],template:function(a,t){if(a&1&&(h(0,"div",0)(1,"mat-calendar",1),v("yearSelected",function(s){return t.datepicker._selectYear(s)})("monthSelected",function(s){return t.datepicker._selectMonth(s)})("viewChanged",function(s){return t.datepicker._viewChanged(s)})("_userSelection",function(s){return t._handleUserSelection(s)})("_userDragDrop",function(s){return t._handleUserDragDrop(s)}),u(),X(2,Ma,0,0,"ng-template",2),h(3,"button",3),v("focus",function(){return t._closeButtonFocused=!0})("blur",function(){return t._closeButtonFocused=!1})("click",function(){return t.datepicker.close()}),D(4),u()()),a&2){let i;R("mat-datepicker-content-container-with-custom-header",t.datepicker.calendarHeaderComponent)("mat-datepicker-content-container-with-actions",t._actionsPortal),b("aria-modal",!0)("aria-labelledby",(i=t._dialogLabelId)!==null&&i!==void 0?i:void 0),c(),f("id",t.datepicker.id)("ngClass",t.datepicker.panelClass)("startAt",t.datepicker.startAt)("startView",t.datepicker.startView)("minDate",t.datepicker._getMinDate())("maxDate",t.datepicker._getMaxDate())("dateFilter",t.datepicker._getDateFilter())("headerComponent",t.datepicker.calendarHeaderComponent)("selected",t._getSelected())("dateClass",t.datepicker.dateClass)("comparisonStart",t.comparisonStart)("comparisonEnd",t.comparisonEnd)("@fadeInCalendar","enter")("startDateAccessibleName",t.startDateAccessibleName)("endDateAccessibleName",t.endDateAccessibleName),c(),f("cdkPortalOutlet",t._actionsPortal),c(),R("cdk-visually-hidden",!t._closeButtonFocused),f("color",t.color||"primary"),c(),N(t._closeButtonText)}},dependencies:[Pt,ft,et,lt,rt],styles:[".mat-datepicker-content{box-shadow:0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12);display:block;border-radius:4px;background-color:var(--mat-datepicker-calendar-container-background-color);color:var(--mat-datepicker-calendar-container-text-color)}.mat-datepicker-content .mat-calendar{width:296px;height:354px}.mat-datepicker-content .mat-datepicker-content-container-with-custom-header .mat-calendar{height:auto}.mat-datepicker-content .mat-datepicker-close-button{position:absolute;top:100%;left:0;margin-top:8px}.ng-animating .mat-datepicker-content .mat-datepicker-close-button{display:none}.mat-datepicker-content-container{display:flex;flex-direction:column;justify-content:space-between}.mat-datepicker-content-touch{box-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);display:block;max-height:80vh;position:relative;overflow:visible}.mat-datepicker-content-touch .mat-datepicker-content-container{min-height:312px;max-height:788px;min-width:250px;max-width:750px}.mat-datepicker-content-touch .mat-calendar{width:100%;height:auto}@media all and (orientation: landscape){.mat-datepicker-content-touch .mat-datepicker-content-container{width:64vh;height:80vh}}@media all and (orientation: portrait){.mat-datepicker-content-touch .mat-datepicker-content-container{width:80vw;height:100vw}.mat-datepicker-content-touch .mat-datepicker-content-container-with-actions{height:115vw}}"],encapsulation:2,data:{animation:[ta.transformPanel,ta.fadeInCalendar]},changeDetection:0});let r=n;return r})(),qe=(()=>{let n=class n{get startAt(){return this._startAt||(this.datepickerInput?this.datepickerInput.getStartValue():null)}set startAt(e){this._startAt=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e))}get color(){return this._color||(this.datepickerInput?this.datepickerInput.getThemePalette():void 0)}set color(e){this._color=e}get disabled(){return this._disabled===void 0&&this.datepickerInput?this.datepickerInput.disabled:!!this._disabled}set disabled(e){e!==this._disabled&&(this._disabled=e,this.stateChanges.next(void 0))}get panelClass(){return this._panelClass}set panelClass(e){this._panelClass=Ot(e)}get opened(){return this._opened}set opened(e){e?this.open():this.close()}_getMinDate(){return this.datepickerInput&&this.datepickerInput.min}_getMaxDate(){return this.datepickerInput&&this.datepickerInput.max}_getDateFilter(){return this.datepickerInput&&this.datepickerInput.dateFilter}constructor(e,a,t,i,s,l,w){this._overlay=e,this._ngZone=a,this._viewContainerRef=t,this._dateAdapter=s,this._dir=l,this._model=w,this._inputStateChanges=F.EMPTY,this._document=le(xt),this.startView="month",this.touchUi=!1,this.xPosition="start",this.yPosition="below",this.restoreFocus=!0,this.yearSelected=new p,this.monthSelected=new p,this.viewChanged=new p(!0),this.openedStream=new p,this.closedStream=new p,this._opened=!1,this.id=`mat-datepicker-${Ka++}`,this._focusedElementBeforeOpen=null,this._backdropHarnessClass=`${this.id}-backdrop`,this.stateChanges=new B,this._dateAdapter,this._scrollStrategy=i}ngOnChanges(e){let a=e.xPosition||e.yPosition;if(a&&!a.firstChange&&this._overlayRef){let t=this._overlayRef.getConfig().positionStrategy;t instanceof Gt&&(this._setConnectedPositions(t),this.opened&&this._overlayRef.updatePosition())}this.stateChanges.next(void 0)}ngOnDestroy(){this._destroyOverlay(),this.close(),this._inputStateChanges.unsubscribe(),this.stateChanges.complete()}select(e){this._model.add(e)}_selectYear(e){this.yearSelected.emit(e)}_selectMonth(e){this.monthSelected.emit(e)}_viewChanged(e){this.viewChanged.emit(e)}registerInput(e){return this.datepickerInput,this._inputStateChanges.unsubscribe(),this.datepickerInput=e,this._inputStateChanges=e.stateChanges.subscribe(()=>this.stateChanges.next(void 0)),this._model}registerActions(e){this._actionsPortal,this._actionsPortal=e,this._componentRef?.instance._assignActions(e,!0)}removeActions(e){e===this._actionsPortal&&(this._actionsPortal=null,this._componentRef?.instance._assignActions(null,!0))}open(){this._opened||this.disabled||this._componentRef?.instance._isAnimating||(this.datepickerInput,this._focusedElementBeforeOpen=Tt(),this._openOverlay(),this._opened=!0,this.openedStream.emit())}close(){if(!this._opened||this._componentRef?.instance._isAnimating)return;let e=this.restoreFocus&&this._focusedElementBeforeOpen&&typeof this._focusedElementBeforeOpen.focus=="function",a=()=>{this._opened&&(this._opened=!1,this.closedStream.emit())};if(this._componentRef){let{instance:t,location:i}=this._componentRef;t._startExitAnimation(),t._animationDone.pipe(we(1)).subscribe(()=>{let s=this._document.activeElement;e&&(!s||s===this._document.activeElement||i.nativeElement.contains(s))&&this._focusedElementBeforeOpen.focus(),this._focusedElementBeforeOpen=null,this._destroyOverlay()})}e?setTimeout(a):a()}_applyPendingSelection(){this._componentRef?.instance?._applyPendingSelection()}_forwardContentValues(e){e.datepicker=this,e.color=this.color,e._dialogLabelId=this.datepickerInput.getOverlayLabelId(),e._assignActions(this._actionsPortal,!1)}_openOverlay(){this._destroyOverlay();let e=this.touchUi,a=new ot(la,this._viewContainerRef),t=this._overlayRef=this._overlay.create(new qt({positionStrategy:e?this._getDialogStrategy():this._getDropdownStrategy(),hasBackdrop:!0,backdropClass:[e?"cdk-overlay-dark-backdrop":"mat-overlay-transparent-backdrop",this._backdropHarnessClass],direction:this._dir,scrollStrategy:e?this._overlay.scrollStrategies.block():this._scrollStrategy(),panelClass:`mat-datepicker-${e?"dialog":"popup"}`}));this._getCloseStream(t).subscribe(i=>{i&&i.preventDefault(),this.close()}),t.keydownEvents().subscribe(i=>{let s=i.keyCode;(s===38||s===40||s===37||s===39||s===33||s===34)&&i.preventDefault()}),this._componentRef=t.attach(a),this._forwardContentValues(this._componentRef.instance),e||this._ngZone.onStable.pipe(we(1)).subscribe(()=>t.updatePosition())}_destroyOverlay(){this._overlayRef&&(this._overlayRef.dispose(),this._overlayRef=this._componentRef=null)}_getDialogStrategy(){return this._overlay.position().global().centerHorizontally().centerVertically()}_getDropdownStrategy(){let e=this._overlay.position().flexibleConnectedTo(this.datepickerInput.getConnectedOverlayOrigin()).withTransformOriginOn(".mat-datepicker-content").withFlexibleDimensions(!1).withViewportMargin(8).withLockedPosition();return this._setConnectedPositions(e)}_setConnectedPositions(e){let a=this.xPosition==="end"?"end":"start",t=a==="start"?"end":"start",i=this.yPosition==="above"?"bottom":"top",s=i==="top"?"bottom":"top";return e.withPositions([{originX:a,originY:s,overlayX:a,overlayY:i},{originX:a,originY:i,overlayX:a,overlayY:s},{originX:t,originY:s,overlayX:t,overlayY:i},{originX:t,originY:i,overlayX:t,overlayY:s}])}_getCloseStream(e){let a=["ctrlKey","shiftKey","metaKey"];return oe(e.backdropClick(),e.detachments(),e.keydownEvents().pipe(yt(t=>t.keyCode===27&&!Z(t)||this.datepickerInput&&Z(t,"altKey")&&t.keyCode===38&&a.every(i=>!Z(t,i)))))}};n.\u0275fac=function(a){return new(a||n)(o(fe),o(Je),o(It),o(oa),o(_,8),o(J,8),o(G))},n.\u0275dir=H({type:n,inputs:{calendarHeaderComponent:"calendarHeaderComponent",startAt:"startAt",startView:"startView",color:"color",touchUi:[I.HasDecoratorInputTransform,"touchUi","touchUi",L],disabled:[I.HasDecoratorInputTransform,"disabled","disabled",L],xPosition:"xPosition",yPosition:"yPosition",restoreFocus:[I.HasDecoratorInputTransform,"restoreFocus","restoreFocus",L],dateClass:"dateClass",panelClass:"panelClass",opened:[I.HasDecoratorInputTransform,"opened","opened",L]},outputs:{yearSelected:"yearSelected",monthSelected:"monthSelected",viewChanged:"viewChanged",openedStream:"opened",closedStream:"closed"},features:[ce,z]});let r=n;return r})(),Bi=(()=>{let n=class n extends qe{};n.\u0275fac=(()=>{let e;return function(t){return(e||(e=Ze(n)))(t||n)}})(),n.\u0275cmp=S({type:n,selectors:[["mat-datepicker"]],exportAs:["matDatepicker"],standalone:!0,features:[Q([na,{provide:qe,useExisting:n}]),W,x],decls:0,vars:0,template:function(a,t){},encapsulation:2,changeDetection:0});let r=n;return r})(),ae=class{constructor(n,d){this.target=n,this.targetElement=d,this.value=this.target.value}},ca=(()=>{let n=class n{get value(){return this._model?this._getValueFromModel(this._model.selection):this._pendingValue}set value(e){this._assignValueProgrammatically(e)}get disabled(){return!!this._disabled||this._parentDisabled()}set disabled(e){let a=e,t=this._elementRef.nativeElement;this._disabled!==a&&(this._disabled=a,this.stateChanges.next(void 0)),a&&this._isInitialized&&t.blur&&t.blur()}_getValidators(){return[this._parseValidator,this._minValidator,this._maxValidator,this._filterValidator]}_registerModel(e){this._model=e,this._valueChangesSubscription.unsubscribe(),this._pendingValue&&this._assignValue(this._pendingValue),this._valueChangesSubscription=this._model.selectionChanged.subscribe(a=>{if(this._shouldHandleChangeEvent(a)){let t=this._getValueFromModel(a.selection);this._lastValueValid=this._isValidValue(t),this._cvaOnChange(t),this._onTouched(),this._formatValue(t),this.dateInput.emit(new ae(this,this._elementRef.nativeElement)),this.dateChange.emit(new ae(this,this._elementRef.nativeElement))}})}constructor(e,a,t){this._elementRef=e,this._dateAdapter=a,this._dateFormats=t,this.dateChange=new p,this.dateInput=new p,this.stateChanges=new B,this._onTouched=()=>{},this._validatorOnChange=()=>{},this._cvaOnChange=()=>{},this._valueChangesSubscription=F.EMPTY,this._localeSubscription=F.EMPTY,this._parseValidator=()=>this._lastValueValid?null:{matDatepickerParse:{text:this._elementRef.nativeElement.value}},this._filterValidator=i=>{let s=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(i.value));return!s||this._matchesFilter(s)?null:{matDatepickerFilter:!0}},this._minValidator=i=>{let s=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(i.value)),l=this._getMinDate();return!l||!s||this._dateAdapter.compareDate(l,s)<=0?null:{matDatepickerMin:{min:l,actual:s}}},this._maxValidator=i=>{let s=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(i.value)),l=this._getMaxDate();return!l||!s||this._dateAdapter.compareDate(l,s)>=0?null:{matDatepickerMax:{max:l,actual:s}}},this._lastValueValid=!1,this._localeSubscription=a.localeChanges.subscribe(()=>{this._assignValueProgrammatically(this.value)})}ngAfterViewInit(){this._isInitialized=!0}ngOnChanges(e){ha(e,this._dateAdapter)&&this.stateChanges.next(void 0)}ngOnDestroy(){this._valueChangesSubscription.unsubscribe(),this._localeSubscription.unsubscribe(),this.stateChanges.complete()}registerOnValidatorChange(e){this._validatorOnChange=e}validate(e){return this._validator?this._validator(e):null}writeValue(e){this._assignValueProgrammatically(e)}registerOnChange(e){this._cvaOnChange=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this.disabled=e}_onKeydown(e){let a=["ctrlKey","shiftKey","metaKey"];Z(e,"altKey")&&e.keyCode===40&&a.every(i=>!Z(e,i))&&!this._elementRef.nativeElement.readOnly&&(this._openPopup(),e.preventDefault())}_onInput(e){let a=this._lastValueValid,t=this._dateAdapter.parse(e,this._dateFormats.parse.dateInput);this._lastValueValid=this._isValidValue(t),t=this._dateAdapter.getValidDateOrNull(t);let i=!this._dateAdapter.sameDate(t,this.value);!t||i?this._cvaOnChange(t):(e&&!this.value&&this._cvaOnChange(t),a!==this._lastValueValid&&this._validatorOnChange()),i&&(this._assignValue(t),this.dateInput.emit(new ae(this,this._elementRef.nativeElement)))}_onChange(){this.dateChange.emit(new ae(this,this._elementRef.nativeElement))}_onBlur(){this.value&&this._formatValue(this.value),this._onTouched()}_formatValue(e){this._elementRef.nativeElement.value=e!=null?this._dateAdapter.format(e,this._dateFormats.display.dateInput):""}_assignValue(e){this._model?(this._assignValueToModel(e),this._pendingValue=null):this._pendingValue=e}_isValidValue(e){return!e||this._dateAdapter.isValid(e)}_parentDisabled(){return!1}_assignValueProgrammatically(e){e=this._dateAdapter.deserialize(e),this._lastValueValid=this._isValidValue(e),e=this._dateAdapter.getValidDateOrNull(e),this._assignValue(e),this._formatValue(e)}_matchesFilter(e){let a=this._getDateFilter();return!a||a(e)}};n.\u0275fac=function(a){return new(a||n)(o(O),o(_,8),o(T,8))},n.\u0275dir=H({type:n,inputs:{value:"value",disabled:[I.HasDecoratorInputTransform,"disabled","disabled",L]},outputs:{dateChange:"dateChange",dateInput:"dateInput"},standalone:!0,features:[ce,z]});let r=n;return r})();function ha(r,n){let d=Object.keys(r);for(let e of d){let{previousValue:a,currentValue:t}=r[e];if(n.isDateInstance(a)&&n.isDateInstance(t)){if(!n.sameDate(a,t))return!0}else return!0}return!1}var qa={provide:Be,useExisting:Me(()=>ua),multi:!0},Ga={provide:He,useExisting:Me(()=>ua),multi:!0},ua=(()=>{let n=class n extends ca{set matDatepicker(e){e&&(this._datepicker=e,this._closedSubscription=e.closedStream.subscribe(()=>this._onTouched()),this._registerModel(e.registerInput(this)))}get min(){return this._min}set min(e){let a=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e));this._dateAdapter.sameDate(a,this._min)||(this._min=a,this._validatorOnChange())}get max(){return this._max}set max(e){let a=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e));this._dateAdapter.sameDate(a,this._max)||(this._max=a,this._validatorOnChange())}get dateFilter(){return this._dateFilter}set dateFilter(e){let a=this._matchesFilter(this.value);this._dateFilter=e,this._matchesFilter(this.value)!==a&&this._validatorOnChange()}constructor(e,a,t,i){super(e,a,t),this._formField=i,this._closedSubscription=F.EMPTY,this._validator=ge.compose(super._getValidators())}getConnectedOverlayOrigin(){return this._formField?this._formField.getConnectedOverlayOrigin():this._elementRef}getOverlayLabelId(){return this._formField?this._formField.getLabelId():this._elementRef.nativeElement.getAttribute("aria-labelledby")}getThemePalette(){return this._formField?this._formField.color:void 0}getStartValue(){return this.value}ngOnDestroy(){super.ngOnDestroy(),this._closedSubscription.unsubscribe()}_openPopup(){this._datepicker&&this._datepicker.open()}_getValueFromModel(e){return e}_assignValueToModel(e){this._model&&this._model.updateSelection(e,this)}_getMinDate(){return this._min}_getMaxDate(){return this._max}_getDateFilter(){return this._dateFilter}_shouldHandleChangeEvent(e){return e.source!==this}};n.\u0275fac=function(a){return new(a||n)(o(O),o(_,8),o(T,8),o(dt,8))},n.\u0275dir=H({type:n,selectors:[["input","matDatepicker",""]],hostAttrs:[1,"mat-datepicker-input"],hostVars:6,hostBindings:function(a,t){a&1&&v("input",function(s){return t._onInput(s.target.value)})("change",function(){return t._onChange()})("blur",function(){return t._onBlur()})("keydown",function(s){return t._onKeydown(s)}),a&2&&(Pe("disabled",t.disabled),b("aria-haspopup",t._datepicker?"dialog":null)("aria-owns",(t._datepicker==null?null:t._datepicker.opened)&&t._datepicker.id||null)("min",t.min?t._dateAdapter.toIso8601(t.min):null)("max",t.max?t._dateAdapter.toIso8601(t.max):null)("data-mat-calendar",t._datepicker?t._datepicker.id:null))},inputs:{matDatepicker:"matDatepicker",min:"min",max:"max",dateFilter:[I.None,"matDatepickerFilter","dateFilter"]},exportAs:["matDatepickerInput"],standalone:!0,features:[Q([qa,Ga,{provide:Kt,useExisting:n}]),W]});let r=n;return r})(),Ua=(()=>{let n=class n{};n.\u0275fac=function(a){return new(a||n)},n.\u0275dir=H({type:n,selectors:[["","matDatepickerToggleIcon",""]],standalone:!0});let r=n;return r})(),Wa=(()=>{let n=class n{get disabled(){return this._disabled===void 0&&this.datepicker?this.datepicker.disabled:!!this._disabled}set disabled(e){this._disabled=e}constructor(e,a,t){this._intl=e,this._changeDetectorRef=a,this._stateChanges=F.EMPTY;let i=Number(t);this.tabIndex=i||i===0?i:null}ngOnChanges(e){e.datepicker&&this._watchStateChanges()}ngOnDestroy(){this._stateChanges.unsubscribe()}ngAfterContentInit(){this._watchStateChanges()}_open(e){this.datepicker&&!this.disabled&&(this.datepicker.open(),e.stopPropagation())}_watchStateChanges(){let e=this.datepicker?this.datepicker.stateChanges:Ae(),a=this.datepicker&&this.datepicker.datepickerInput?this.datepicker.datepickerInput.stateChanges:Ae(),t=this.datepicker?oe(this.datepicker.openedStream,this.datepicker.closedStream):Ae();this._stateChanges.unsubscribe(),this._stateChanges=oe(this._intl.changes,e,a,t).subscribe(()=>this._changeDetectorRef.markForCheck())}};n.\u0275fac=function(a){return new(a||n)(o(Ce),o(P),kt("tabindex"))},n.\u0275cmp=S({type:n,selectors:[["mat-datepicker-toggle"]],contentQueries:function(a,t,i){if(a&1&&Ne(i,Ua,5),a&2){let s;V(s=E())&&(t._customIcon=s.first)}},viewQuery:function(a,t){if(a&1&&Y(Ia,5),a&2){let i;V(i=E())&&(t._button=i.first)}},hostAttrs:[1,"mat-datepicker-toggle"],hostVars:8,hostBindings:function(a,t){a&1&&v("click",function(s){return t._open(s)}),a&2&&(b("tabindex",null)("data-mat-calendar",t.datepicker?t.datepicker.id:null),R("mat-datepicker-toggle-active",t.datepicker&&t.datepicker.opened)("mat-accent",t.datepicker&&t.datepicker.color==="accent")("mat-warn",t.datepicker&&t.datepicker.color==="warn"))},inputs:{datepicker:[I.None,"for","datepicker"],tabIndex:"tabIndex",ariaLabel:[I.None,"aria-label","ariaLabel"],disabled:[I.HasDecoratorInputTransform,"disabled","disabled",L],disableRipple:"disableRipple"},exportAs:["matDatepickerToggle"],standalone:!0,features:[ce,z,x],ngContentSelectors:Ea,decls:4,vars:6,consts:[["mat-icon-button","","type","button",3,"disabled","disableRipple"],["button",""],["class","mat-datepicker-toggle-default-icon","viewBox","0 0 24 24","width","24px","height","24px","fill","currentColor","focusable","false","aria-hidden","true"],["viewBox","0 0 24 24","width","24px","height","24px","fill","currentColor","focusable","false","aria-hidden","true",1,"mat-datepicker-toggle-default-icon"],["d","M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zM7 10h5v5H7z"]],template:function(a,t){a&1&&(Ye(Va),h(0,"button",0,1),X(2,Sa,2,0,":svg:svg",2),pe(3),u()),a&2&&(f("disabled",t.disabled)("disableRipple",t.disableRipple),b("aria-haspopup",t.datepicker?"dialog":null)("aria-label",t.ariaLabel||t._intl.openCalendarLabel)("tabindex",t.disabled?-1:t.tabIndex),c(2),he(2,t._customIcon?-1:2))},dependencies:[st],styles:[".mat-datepicker-toggle{pointer-events:auto;color:var(--mat-datepicker-toggle-icon-color)}.mat-datepicker-toggle-active{color:var(--mat-datepicker-toggle-active-state-icon-color)}.cdk-high-contrast-active .mat-datepicker-toggle-default-icon{color:CanvasText}"],encapsulation:2,changeDetection:0});let r=n;return r})();function Xa(r){return vt(r,!0)}function aa(r){return r.nodeType===Node.ELEMENT_NODE}function Za(r){return r.nodeName==="INPUT"}function Ja(r){return r.nodeName==="TEXTAREA"}function vt(r,n){if(aa(r)&&n){let e=(r.getAttribute?.("aria-labelledby")?.split(/\s+/g)||[]).reduce((a,t)=>{let i=document.getElementById(t);return i&&a.push(i),a},[]);if(e.length)return e.map(a=>vt(a,!1)).join(" ")}if(aa(r)){let d=r.getAttribute("aria-label")?.trim();if(d)return d}if(Za(r)||Ja(r)){if(r.labels?.length)return Array.from(r.labels).map(a=>vt(a,!1)).join(" ");let d=r.getAttribute("placeholder")?.trim();if(d)return d;let e=r.getAttribute("title")?.trim();if(e)return e}return(r.textContent||"").replace(/\s+/g," ").trim()}var We=new Ie("MAT_DATE_RANGE_INPUT_PARENT"),pa=(()=>{let n=class n extends ca{get errorStateMatcher(){return this._errorStateTracker.matcher}set errorStateMatcher(e){this._errorStateTracker.matcher=e}get errorState(){return this._errorStateTracker.errorState}set errorState(e){this._errorStateTracker.errorState=e}constructor(e,a,t,i,s,l,w,k){super(a,w,k),this._rangeInput=e,this._elementRef=a,this._defaultErrorStateMatcher=t,this._injector=i,this._parentForm=s,this._parentFormGroup=l,this._dir=le(J,{optional:!0}),this._errorStateTracker=new Lt(this._defaultErrorStateMatcher,null,this._parentFormGroup,this._parentForm,this.stateChanges)}ngOnInit(){let e=this._injector.get(Ht,null,{optional:!0,self:!0});e&&(this.ngControl=e,this._errorStateTracker.ngControl=e)}ngDoCheck(){this.ngControl&&this.updateErrorState()}isEmpty(){return this._elementRef.nativeElement.value.length===0}_getPlaceholder(){return this._elementRef.nativeElement.placeholder}focus(){this._elementRef.nativeElement.focus()}getMirrorValue(){let e=this._elementRef.nativeElement,a=e.value;return a.length>0?a:e.placeholder}updateErrorState(){this._errorStateTracker.updateErrorState()}_onInput(e){super._onInput(e),this._rangeInput._handleChildValueChange()}_openPopup(){this._rangeInput._openDatepicker()}_getMinDate(){return this._rangeInput.min}_getMaxDate(){return this._rangeInput.max}_getDateFilter(){return this._rangeInput.dateFilter}_parentDisabled(){return this._rangeInput._groupDisabled}_shouldHandleChangeEvent({source:e}){return e!==this._rangeInput._startInput&&e!==this._rangeInput._endInput}_assignValueProgrammatically(e){super._assignValueProgrammatically(e),(this===this._rangeInput._startInput?this._rangeInput._endInput:this._rangeInput._startInput)?._validatorOnChange()}_getAccessibleName(){return Xa(this._elementRef.nativeElement)}};n.\u0275fac=function(a){return new(a||n)(o(We),o(O),o(je),o(xe),o(ze,8),o(Ke,8),o(_,8),o(T,8))},n.\u0275dir=H({type:n,inputs:{errorStateMatcher:"errorStateMatcher"},standalone:!0,features:[W]});let r=n;return r})(),ei=(()=>{let n=class n extends pa{constructor(e,a,t,i,s,l,w,k){super(e,a,t,i,s,l,w,k),this._startValidator=j=>{let M=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(j.value)),U=this._model?this._model.selection.end:null;return!M||!U||this._dateAdapter.compareDate(M,U)<=0?null:{matStartDateInvalid:{end:U,actual:M}}},this._validator=ge.compose([...super._getValidators(),this._startValidator])}_getValueFromModel(e){return e.start}_shouldHandleChangeEvent(e){return super._shouldHandleChangeEvent(e)?e.oldValue?.start?!e.selection.start||!!this._dateAdapter.compareDate(e.oldValue.start,e.selection.start):!!e.selection.start:!1}_assignValueToModel(e){if(this._model){let a=new g(e,this._model.selection.end);this._model.updateSelection(a,this)}}_formatValue(e){super._formatValue(e),this._rangeInput._handleChildValueChange()}_onKeydown(e){let a=this._rangeInput._endInput,t=this._elementRef.nativeElement,i=this._dir?.value!=="rtl";(e.keyCode===39&&i||e.keyCode===37&&!i)&&t.selectionStart===t.value.length&&t.selectionEnd===t.value.length?(e.preventDefault(),a._elementRef.nativeElement.setSelectionRange(0,0),a.focus()):super._onKeydown(e)}};n.\u0275fac=function(a){return new(a||n)(o(We),o(O),o(je),o(xe),o(ze,8),o(Ke,8),o(_,8),o(T,8))},n.\u0275dir=H({type:n,selectors:[["input","matStartDate",""]],hostAttrs:["type","text",1,"mat-start-date","mat-date-range-input-inner"],hostVars:5,hostBindings:function(a,t){a&1&&v("input",function(s){return t._onInput(s.target.value)})("change",function(){return t._onChange()})("keydown",function(s){return t._onKeydown(s)})("blur",function(){return t._onBlur()}),a&2&&(Pe("disabled",t.disabled),b("aria-haspopup",t._rangeInput.rangePicker?"dialog":null)("aria-owns",(t._rangeInput.rangePicker==null?null:t._rangeInput.rangePicker.opened)&&t._rangeInput.rangePicker.id||null)("min",t._getMinDate()?t._dateAdapter.toIso8601(t._getMinDate()):null)("max",t._getMaxDate()?t._dateAdapter.toIso8601(t._getMaxDate()):null))},outputs:{dateChange:"dateChange",dateInput:"dateInput"},standalone:!0,features:[Q([{provide:Be,useExisting:n,multi:!0},{provide:He,useExisting:n,multi:!0}]),W]});let r=n;return r})(),ti=(()=>{let n=class n extends pa{constructor(e,a,t,i,s,l,w,k){super(e,a,t,i,s,l,w,k),this._endValidator=j=>{let M=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(j.value)),U=this._model?this._model.selection.start:null;return!M||!U||this._dateAdapter.compareDate(M,U)>=0?null:{matEndDateInvalid:{start:U,actual:M}}},this._validator=ge.compose([...super._getValidators(),this._endValidator])}_getValueFromModel(e){return e.end}_shouldHandleChangeEvent(e){return super._shouldHandleChangeEvent(e)?e.oldValue?.end?!e.selection.end||!!this._dateAdapter.compareDate(e.oldValue.end,e.selection.end):!!e.selection.end:!1}_assignValueToModel(e){if(this._model){let a=new g(this._model.selection.start,e);this._model.updateSelection(a,this)}}_onKeydown(e){let a=this._rangeInput._startInput,t=this._elementRef.nativeElement,i=this._dir?.value!=="rtl";if(e.keyCode===8&&!t.value)a.focus();else if((e.keyCode===37&&i||e.keyCode===39&&!i)&&t.selectionStart===0&&t.selectionEnd===0){e.preventDefault();let s=a._elementRef.nativeElement.value.length;a._elementRef.nativeElement.setSelectionRange(s,s),a.focus()}else super._onKeydown(e)}};n.\u0275fac=function(a){return new(a||n)(o(We),o(O),o(je),o(xe),o(ze,8),o(Ke,8),o(_,8),o(T,8))},n.\u0275dir=H({type:n,selectors:[["input","matEndDate",""]],hostAttrs:["type","text",1,"mat-end-date","mat-date-range-input-inner"],hostVars:5,hostBindings:function(a,t){a&1&&v("input",function(s){return t._onInput(s.target.value)})("change",function(){return t._onChange()})("keydown",function(s){return t._onKeydown(s)})("blur",function(){return t._onBlur()}),a&2&&(Pe("disabled",t.disabled),b("aria-haspopup",t._rangeInput.rangePicker?"dialog":null)("aria-owns",(t._rangeInput.rangePicker==null?null:t._rangeInput.rangePicker.opened)&&t._rangeInput.rangePicker.id||null)("min",t._getMinDate()?t._dateAdapter.toIso8601(t._getMinDate()):null)("max",t._getMaxDate()?t._dateAdapter.toIso8601(t._getMaxDate()):null))},outputs:{dateChange:"dateChange",dateInput:"dateInput"},standalone:!0,features:[Q([{provide:Be,useExisting:n,multi:!0},{provide:He,useExisting:n,multi:!0}]),W]});let r=n;return r})(),ai=0,Hi=(()=>{let n=class n{get value(){return this._model?this._model.selection:null}get shouldLabelFloat(){return this.focused||!this.empty}get placeholder(){let e=this._startInput?._getPlaceholder()||"",a=this._endInput?._getPlaceholder()||"";return e||a?`${e} ${this.separator} ${a}`:""}get rangePicker(){return this._rangePicker}set rangePicker(e){e&&(this._model=e.registerInput(this),this._rangePicker=e,this._closedSubscription.unsubscribe(),this._closedSubscription=e.closedStream.subscribe(()=>{this._startInput?._onTouched(),this._endInput?._onTouched()}),this._registerModel(this._model))}get required(){return this._required??(this._isTargetRequired(this)||this._isTargetRequired(this._startInput)||this._isTargetRequired(this._endInput))??!1}set required(e){this._required=e}get dateFilter(){return this._dateFilter}set dateFilter(e){let a=this._startInput,t=this._endInput,i=a&&a._matchesFilter(a.value),s=t&&t._matchesFilter(a.value);this._dateFilter=e,a&&a._matchesFilter(a.value)!==i&&a._validatorOnChange(),t&&t._matchesFilter(t.value)!==s&&t._validatorOnChange()}get min(){return this._min}set min(e){let a=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e));this._dateAdapter.sameDate(a,this._min)||(this._min=a,this._revalidate())}get max(){return this._max}set max(e){let a=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e));this._dateAdapter.sameDate(a,this._max)||(this._max=a,this._revalidate())}get disabled(){return this._startInput&&this._endInput?this._startInput.disabled&&this._endInput.disabled:this._groupDisabled}set disabled(e){e!==this._groupDisabled&&(this._groupDisabled=e,this.stateChanges.next(void 0))}get errorState(){return this._startInput&&this._endInput?this._startInput.errorState||this._endInput.errorState:!1}get empty(){let e=this._startInput?this._startInput.isEmpty():!1,a=this._endInput?this._endInput.isEmpty():!1;return e&&a}constructor(e,a,t,i,s){this._changeDetectorRef=e,this._elementRef=a,this._dateAdapter=i,this._formField=s,this._closedSubscription=F.EMPTY,this.id=`mat-date-range-input-${ai++}`,this.focused=!1,this.controlType="mat-date-range-input",this._groupDisabled=!1,this._ariaDescribedBy=null,this.separator="\u2013",this.comparisonStart=null,this.comparisonEnd=null,this.stateChanges=new B,s?._elementRef.nativeElement.classList.contains("mat-mdc-form-field")&&a.nativeElement.classList.add("mat-mdc-input-element","mat-mdc-form-field-input-control","mdc-text-field__input"),this.ngControl=t}setDescribedByIds(e){this._ariaDescribedBy=e.length?e.join(" "):null}onContainerClick(){!this.focused&&!this.disabled&&(!this._model||!this._model.selection.start?this._startInput.focus():this._endInput.focus())}ngAfterContentInit(){this._model&&this._registerModel(this._model),oe(this._startInput.stateChanges,this._endInput.stateChanges).subscribe(()=>{this.stateChanges.next(void 0)})}ngOnChanges(e){ha(e,this._dateAdapter)&&this.stateChanges.next(void 0)}ngOnDestroy(){this._closedSubscription.unsubscribe(),this.stateChanges.complete()}getStartValue(){return this.value?this.value.start:null}getThemePalette(){return this._formField?this._formField.color:void 0}getConnectedOverlayOrigin(){return this._formField?this._formField.getConnectedOverlayOrigin():this._elementRef}getOverlayLabelId(){return this._formField?this._formField.getLabelId():null}_getInputMirrorValue(e){let a=e==="start"?this._startInput:this._endInput;return a?a.getMirrorValue():""}_shouldHidePlaceholders(){return this._startInput?!this._startInput.isEmpty():!1}_handleChildValueChange(){this.stateChanges.next(void 0),this._changeDetectorRef.markForCheck()}_openDatepicker(){this._rangePicker&&this._rangePicker.open()}_shouldHideSeparator(){return(!this._formField||this._formField.getLabelId()&&!this._formField._shouldLabelFloat())&&this.empty}_getAriaLabelledby(){let e=this._formField;return e&&e._hasFloatingLabel()?e._labelId:null}_getStartDateAccessibleName(){return this._startInput._getAccessibleName()}_getEndDateAccessibleName(){return this._endInput._getAccessibleName()}_updateFocus(e){this.focused=e!==null,this.stateChanges.next()}_revalidate(){this._startInput&&this._startInput._validatorOnChange(),this._endInput&&this._endInput._validatorOnChange()}_registerModel(e){this._startInput&&this._startInput._registerModel(e),this._endInput&&this._endInput._registerModel(e)}_isTargetRequired(e){return e?.ngControl?.control?.hasValidator(ge.required)}};n.\u0275fac=function(a){return new(a||n)(o(P),o(O),o(Bt,10),o(_,8),o(dt,8))},n.\u0275cmp=S({type:n,selectors:[["mat-date-range-input"]],contentQueries:function(a,t,i){if(a&1&&(Ne(i,ei,5),Ne(i,ti,5)),a&2){let s;V(s=E())&&(t._startInput=s.first),V(s=E())&&(t._endInput=s.first)}},hostAttrs:["role","group",1,"mat-date-range-input"],hostVars:8,hostBindings:function(a,t){a&2&&(b("id",t.id)("aria-labelledby",t._getAriaLabelledby())("aria-describedby",t._ariaDescribedBy)("data-mat-calendar",t.rangePicker?t.rangePicker.id:null),R("mat-date-range-input-hide-placeholders",t._shouldHidePlaceholders())("mat-date-range-input-required",t.required))},inputs:{rangePicker:"rangePicker",required:[I.HasDecoratorInputTransform,"required","required",L],dateFilter:"dateFilter",min:"min",max:"max",disabled:[I.HasDecoratorInputTransform,"disabled","disabled",L],separator:"separator",comparisonStart:"comparisonStart",comparisonEnd:"comparisonEnd"},exportAs:["matDateRangeInput"],standalone:!0,features:[Q([{provide:zt,useExisting:n},{provide:We,useExisting:n}]),ce,z,x],ngContentSelectors:Fa,decls:11,vars:5,consts:[["cdkMonitorSubtreeFocus","",1,"mat-date-range-input-container",3,"cdkFocusChange"],[1,"mat-date-range-input-wrapper"],["aria-hidden","true",1,"mat-date-range-input-mirror"],[1,"mat-date-range-input-separator"],[1,"mat-date-range-input-wrapper","mat-date-range-input-end-wrapper"]],template:function(a,t){a&1&&(Ye(xa),h(0,"div",0),v("cdkFocusChange",function(s){return t._updateFocus(s)}),h(1,"div",1),pe(2),h(3,"span",2),D(4),u()(),h(5,"span",3),D(6),u(),h(7,"div",4),pe(8,1),h(9,"span",2),D(10),u()()()),a&2&&(c(4),N(t._getInputMirrorValue("start")),c(),R("mat-date-range-input-separator-hidden",t._shouldHideSeparator()),c(),N(t.separator),c(4),N(t._getInputMirrorValue("end")))},dependencies:[tt],styles:[".mat-date-range-input{display:block;width:100%}.mat-date-range-input-container{display:flex;align-items:center}.mat-date-range-input-separator{transition:opacity 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1);margin:0 4px;color:var(--mat-datepicker-range-input-separator-color)}.mat-form-field-disabled .mat-date-range-input-separator{color:var(--mat-datepicker-range-input-disabled-state-separator-color)}._mat-animation-noopable .mat-date-range-input-separator{transition:none}.mat-date-range-input-separator-hidden{-webkit-user-select:none;user-select:none;opacity:0;transition:none}.mat-date-range-input-wrapper{position:relative;overflow:hidden;max-width:calc(50% - 4px)}.mat-date-range-input-end-wrapper{flex-grow:1}.mat-date-range-input-inner{position:absolute;top:0;left:0;font:inherit;background:rgba(0,0,0,0);color:currentColor;border:none;outline:none;padding:0;margin:0;vertical-align:bottom;text-align:inherit;-webkit-appearance:none;width:100%;height:100%}.mat-date-range-input-inner:-moz-ui-invalid{box-shadow:none}.mat-date-range-input-inner::placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-date-range-input-inner::-moz-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-date-range-input-inner::-webkit-input-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-date-range-input-inner:-ms-input-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-date-range-input-inner[disabled]{color:var(--mat-datepicker-range-input-disabled-state-text-color)}.mat-form-field-hide-placeholder .mat-date-range-input-inner::placeholder,.mat-date-range-input-hide-placeholders .mat-date-range-input-inner::placeholder{-webkit-user-select:none;user-select:none;color:rgba(0,0,0,0) !important;-webkit-text-fill-color:rgba(0,0,0,0);transition:none}.cdk-high-contrast-active .mat-form-field-hide-placeholder .mat-date-range-input-inner::placeholder,.cdk-high-contrast-active .mat-date-range-input-hide-placeholders .mat-date-range-input-inner::placeholder{opacity:0}.mat-form-field-hide-placeholder .mat-date-range-input-inner::-moz-placeholder,.mat-date-range-input-hide-placeholders .mat-date-range-input-inner::-moz-placeholder{-webkit-user-select:none;user-select:none;color:rgba(0,0,0,0) !important;-webkit-text-fill-color:rgba(0,0,0,0);transition:none}.cdk-high-contrast-active .mat-form-field-hide-placeholder .mat-date-range-input-inner::-moz-placeholder,.cdk-high-contrast-active .mat-date-range-input-hide-placeholders .mat-date-range-input-inner::-moz-placeholder{opacity:0}.mat-form-field-hide-placeholder .mat-date-range-input-inner::-webkit-input-placeholder,.mat-date-range-input-hide-placeholders .mat-date-range-input-inner::-webkit-input-placeholder{-webkit-user-select:none;user-select:none;color:rgba(0,0,0,0) !important;-webkit-text-fill-color:rgba(0,0,0,0);transition:none}.cdk-high-contrast-active .mat-form-field-hide-placeholder .mat-date-range-input-inner::-webkit-input-placeholder,.cdk-high-contrast-active .mat-date-range-input-hide-placeholders .mat-date-range-input-inner::-webkit-input-placeholder{opacity:0}.mat-form-field-hide-placeholder .mat-date-range-input-inner:-ms-input-placeholder,.mat-date-range-input-hide-placeholders .mat-date-range-input-inner:-ms-input-placeholder{-webkit-user-select:none;user-select:none;color:rgba(0,0,0,0) !important;-webkit-text-fill-color:rgba(0,0,0,0);transition:none}.cdk-high-contrast-active .mat-form-field-hide-placeholder .mat-date-range-input-inner:-ms-input-placeholder,.cdk-high-contrast-active .mat-date-range-input-hide-placeholders .mat-date-range-input-inner:-ms-input-placeholder{opacity:0}._mat-animation-noopable .mat-date-range-input-inner::placeholder{transition:none}._mat-animation-noopable .mat-date-range-input-inner::-moz-placeholder{transition:none}._mat-animation-noopable .mat-date-range-input-inner::-webkit-input-placeholder{transition:none}._mat-animation-noopable .mat-date-range-input-inner:-ms-input-placeholder{transition:none}.mat-date-range-input-mirror{-webkit-user-select:none;user-select:none;visibility:hidden;white-space:nowrap;display:inline-block;min-width:2px}.mat-mdc-form-field-type-mat-date-range-input .mat-mdc-form-field-infix{width:200px}"],encapsulation:2,changeDetection:0});let r=n;return r})(),zi=(()=>{let n=class n extends qe{_forwardContentValues(e){super._forwardContentValues(e);let a=this.datepickerInput;a&&(e.comparisonStart=a.comparisonStart,e.comparisonEnd=a.comparisonEnd,e.startDateAccessibleName=a._getStartDateAccessibleName(),e.endDateAccessibleName=a._getEndDateAccessibleName())}};n.\u0275fac=(()=>{let e;return function(t){return(e||(e=Ze(n)))(t||n)}})(),n.\u0275cmp=S({type:n,selectors:[["mat-date-range-picker"]],exportAs:["matDateRangePicker"],standalone:!0,features:[Q([Na,Ba,{provide:qe,useExisting:n}]),W,x],decls:0,vars:0,template:function(a,t){},encapsulation:2,changeDetection:0});let r=n;return r})();var Ki=(()=>{let n=class n{};n.\u0275fac=function(a){return new(a||n)},n.\u0275mod=At({type:n}),n.\u0275inj=Ct({providers:[Ce,$a],imports:[Ft,jt,Ut,Yt,$t,Nt,la,Wa,da,Qt]});let r=n;return r})();export{Bi as a,ua as b,Wa as c,ei as d,ti as e,Hi as f,zi as g,Ki as h};