-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_angular_material_datepicker.MHcOTTS96a.js
More file actions
1165 lines (1165 loc) · 139 KB
/
_angular_material_datepicker.MHcOTTS96a.js
File metadata and controls
1165 lines (1165 loc) · 139 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
import { a as Ae } from "@nf-internal/chunk-NGVFN3SM";
import { i as we } from "@nf-internal/chunk-J3Q4VRD5";
import { c as u, d as w } from "@nf-internal/chunk-FECZLFOC";
import { a as Ce } from "@nf-internal/chunk-D2J64VUP";
import { b as ye } from "@nf-internal/chunk-JWKF23VO";
import { f as be, g as X } from "@nf-internal/chunk-5ZLKIHXA";
import { b as Z, d as J, l as ve } from "@nf-internal/chunk-MYXIVZKR";
import "@nf-internal/chunk-DGEJWT6S";
import "@nf-internal/chunk-4UKDDKDA";
import "@nf-internal/chunk-U56RZWEM";
import { a as fe } from "@nf-internal/chunk-4MZRILT7";
import { e as U } from "@nf-internal/chunk-5KSFOI5Q";
import { b as De } from "@nf-internal/chunk-RXMLTE5A";
import { g as R } from "@nf-internal/chunk-C2A5IV4Z";
import { b as _, i as f, w as z } from "@nf-internal/chunk-IR6MR6UK";
import "@nf-internal/chunk-6MDQTQU3";
import * as i from "@angular/core";
import { inject as o, ElementRef as E, NgZone as Ie, EventEmitter as c, Injector as P, Renderer2 as Fe, afterNextRender as Re, Optional as le, SkipSelf as ce, InjectionToken as Te, ChangeDetectorRef as g, signal as p, ViewContainerRef as Oe, DOCUMENT as tt, booleanAttribute as b, forwardRef as Ye, HostAttributeToken as at, TemplateRef as it } from "@angular/core";
import { _IdGenerator as W, CdkMonitorFocus as Pe, CdkTrapFocus as nt, A11yModule as rt } from "@angular/cdk/a11y";
import { Directionality as N } from "@angular/cdk/bidi";
import { coerceStringArray as st } from "@angular/cdk/coercion";
import { ESCAPE as Ne, hasModifierKey as k, SPACE as M, ENTER as S, PAGE_DOWN as q, PAGE_UP as Q, END as pe, HOME as he, DOWN_ARROW as L, UP_ARROW as O, RIGHT_ARROW as x, LEFT_ARROW as I, BACKSPACE as ot } from "@angular/cdk/keycodes";
import { createRepositionScrollStrategy as Le, FlexibleConnectedPositionStrategy as dt, createOverlayRef as lt, OverlayConfig as ct, createBlockScrollStrategy as pt, createGlobalPositionStrategy as ht, createFlexibleConnectedPositionStrategy as ut, OverlayModule as mt } from "@angular/cdk/overlay";
import { Platform as _t, _getFocusedElementPierceShadowDom as Be } from "@angular/cdk/platform";
import { ComponentPortal as He, CdkPortalOutlet as ze, TemplatePortal as gt, PortalModule as ft } from "@angular/cdk/portal";
import { startWith as ue, take as bt, filter as Dt } from "rxjs/operators";
import { NgClass as vt } from "@angular/common";
import { _CdkPrivateStyleLoader as G, _VisuallyHiddenLoader as me } from "@angular/cdk/private";
import { NG_VALUE_ACCESSOR as _e, NG_VALIDATORS as ge, Validators as $, ControlContainer as yt, NgForm as Ct, FormGroupDirective as wt, NgControl as At } from "@angular/forms";
import { CdkScrollableModule as kt } from "@angular/cdk/scrolling";
import "@angular/cdk/layout";
import "@angular/cdk/observers/private";
var Mt = ["mat-calendar-body", ""];
function St(r, d) { return this._trackRow(d); }
var Ke = (r, d) => d.id;
function Vt(r, d) { if (r & 1 && (i.\u0275\u0275elementStart(0, "tr", 0)(1, "td", 3), i.\u0275\u0275text(2), i.\u0275\u0275elementEnd()()), r & 2) {
let e = i.\u0275\u0275nextContext();
i.\u0275\u0275advance(), i.\u0275\u0275styleProp("padding-top", e._cellPadding)("padding-bottom", e._cellPadding), i.\u0275\u0275attribute("colspan", e.numCols), i.\u0275\u0275advance(), i.\u0275\u0275textInterpolate1(" ", e.label, " ");
} }
function Et(r, d) { if (r & 1 && (i.\u0275\u0275elementStart(0, "td", 3), i.\u0275\u0275text(1), i.\u0275\u0275elementEnd()), r & 2) {
let e = i.\u0275\u0275nextContext(2);
i.\u0275\u0275styleProp("padding-top", e._cellPadding)("padding-bottom", e._cellPadding), i.\u0275\u0275attribute("colspan", e._firstRowOffset), i.\u0275\u0275advance(), i.\u0275\u0275textInterpolate1(" ", e._firstRowOffset >= e.labelMinRequiredCells ? e.label : "", " ");
} }
function xt(r, d) { if (r & 1) {
let e = i.\u0275\u0275getCurrentView();
i.\u0275\u0275elementStart(0, "td", 6)(1, "button", 7), i.\u0275\u0275listener("click", function (t) { let n = i.\u0275\u0275restoreView(e).$implicit, s = i.\u0275\u0275nextContext(2); return i.\u0275\u0275resetView(s._cellClicked(n, t)); })("focus", function (t) { let n = i.\u0275\u0275restoreView(e).$implicit, s = i.\u0275\u0275nextContext(2); return i.\u0275\u0275resetView(s._emitActiveDateChange(n, t)); }), i.\u0275\u0275elementStart(2, "span", 8), i.\u0275\u0275text(3), i.\u0275\u0275elementEnd(), i.\u0275\u0275element(4, "span", 9), i.\u0275\u0275elementEnd()();
} if (r & 2) {
let e = d.$implicit, a = d.$index, t = i.\u0275\u0275nextContext().$index, n = i.\u0275\u0275nextContext();
i.\u0275\u0275styleProp("width", n._cellWidth)("padding-top", n._cellPadding)("padding-bottom", n._cellPadding), i.\u0275\u0275attribute("data-mat-row", t)("data-mat-col", a), i.\u0275\u0275advance(), i.\u0275\u0275classProp("mat-calendar-body-disabled", !e.enabled)("mat-calendar-body-active", n._isActiveCell(t, a))("mat-calendar-body-range-start", n._isRangeStart(e.compareValue))("mat-calendar-body-range-end", n._isRangeEnd(e.compareValue))("mat-calendar-body-in-range", n._isInRange(e.compareValue))("mat-calendar-body-comparison-bridge-start", n._isComparisonBridgeStart(e.compareValue, t, a))("mat-calendar-body-comparison-bridge-end", n._isComparisonBridgeEnd(e.compareValue, t, a))("mat-calendar-body-comparison-start", n._isComparisonStart(e.compareValue))("mat-calendar-body-comparison-end", n._isComparisonEnd(e.compareValue))("mat-calendar-body-in-comparison-range", n._isInComparisonRange(e.compareValue))("mat-calendar-body-preview-start", n._isPreviewStart(e.compareValue))("mat-calendar-body-preview-end", n._isPreviewEnd(e.compareValue))("mat-calendar-body-in-preview", n._isInPreview(e.compareValue)), i.\u0275\u0275property("ngClass", e.cssClasses)("tabindex", n._isActiveCell(t, a) ? 0 : -1), i.\u0275\u0275attribute("aria-label", e.ariaLabel)("aria-disabled", !e.enabled || null)("aria-pressed", n._isSelected(e.compareValue))("aria-current", n.todayValue === e.compareValue ? "date" : null)("aria-describedby", n._getDescribedby(e.compareValue)), i.\u0275\u0275advance(), i.\u0275\u0275classProp("mat-calendar-body-selected", n._isSelected(e.compareValue))("mat-calendar-body-comparison-identical", n._isComparisonIdentical(e.compareValue))("mat-calendar-body-today", n.todayValue === e.compareValue), i.\u0275\u0275advance(), i.\u0275\u0275textInterpolate1(" ", e.displayValue, " ");
} }
function It(r, d) { if (r & 1 && (i.\u0275\u0275elementStart(0, "tr", 1), i.\u0275\u0275conditionalCreate(1, Et, 2, 6, "td", 4), i.\u0275\u0275repeaterCreate(2, xt, 5, 48, "td", 5, Ke), i.\u0275\u0275elementEnd()), r & 2) {
let e = d.$implicit, a = d.$index, t = i.\u0275\u0275nextContext();
i.\u0275\u0275advance(), i.\u0275\u0275conditional(a === 0 && t._firstRowOffset ? 1 : -1), i.\u0275\u0275advance(), i.\u0275\u0275repeater(e);
} }
function Ft(r, d) { if (r & 1 && (i.\u0275\u0275elementStart(0, "th", 2)(1, "span", 6), i.\u0275\u0275text(2), i.\u0275\u0275elementEnd(), i.\u0275\u0275elementStart(3, "span", 3), i.\u0275\u0275text(4), i.\u0275\u0275elementEnd()()), r & 2) {
let e = d.$implicit;
i.\u0275\u0275advance(2), i.\u0275\u0275textInterpolate(e.long), i.\u0275\u0275advance(2), i.\u0275\u0275textInterpolate(e.narrow);
} }
var je = ["*"];
function Rt(r, d) { }
function Tt(r, d) { if (r & 1) {
let e = i.\u0275\u0275getCurrentView();
i.\u0275\u0275elementStart(0, "mat-month-view", 4), i.\u0275\u0275twoWayListener("activeDateChange", function (t) { i.\u0275\u0275restoreView(e); let n = i.\u0275\u0275nextContext(); return i.\u0275\u0275twoWayBindingSet(n.activeDate, t) || (n.activeDate = t), i.\u0275\u0275resetView(t); }), i.\u0275\u0275listener("_userSelection", function (t) { i.\u0275\u0275restoreView(e); let n = i.\u0275\u0275nextContext(); return i.\u0275\u0275resetView(n._dateSelected(t)); })("dragStarted", function (t) { i.\u0275\u0275restoreView(e); let n = i.\u0275\u0275nextContext(); return i.\u0275\u0275resetView(n._dragStarted(t)); })("dragEnded", function (t) { i.\u0275\u0275restoreView(e); let n = i.\u0275\u0275nextContext(); return i.\u0275\u0275resetView(n._dragEnded(t)); }), i.\u0275\u0275elementEnd();
} if (r & 2) {
let e = i.\u0275\u0275nextContext();
i.\u0275\u0275twoWayProperty("activeDate", e.activeDate), i.\u0275\u0275property("selected", e.selected)("dateFilter", e.dateFilter)("maxDate", e.maxDate)("minDate", e.minDate)("dateClass", e.dateClass)("comparisonStart", e.comparisonStart)("comparisonEnd", e.comparisonEnd)("startDateAccessibleName", e.startDateAccessibleName)("endDateAccessibleName", e.endDateAccessibleName)("activeDrag", e._activeDrag);
} }
function Ot(r, d) { if (r & 1) {
let e = i.\u0275\u0275getCurrentView();
i.\u0275\u0275elementStart(0, "mat-year-view", 5), i.\u0275\u0275twoWayListener("activeDateChange", function (t) { i.\u0275\u0275restoreView(e); let n = i.\u0275\u0275nextContext(); return i.\u0275\u0275twoWayBindingSet(n.activeDate, t) || (n.activeDate = t), i.\u0275\u0275resetView(t); }), i.\u0275\u0275listener("monthSelected", function (t) { i.\u0275\u0275restoreView(e); let n = i.\u0275\u0275nextContext(); return i.\u0275\u0275resetView(n._monthSelectedInYearView(t)); })("selectedChange", function (t) { i.\u0275\u0275restoreView(e); let n = i.\u0275\u0275nextContext(); return i.\u0275\u0275resetView(n._goToDateInView(t, "month")); }), i.\u0275\u0275elementEnd();
} if (r & 2) {
let e = i.\u0275\u0275nextContext();
i.\u0275\u0275twoWayProperty("activeDate", e.activeDate), i.\u0275\u0275property("selected", e.selected)("dateFilter", e.dateFilter)("maxDate", e.maxDate)("minDate", e.minDate)("dateClass", e.dateClass);
} }
function Yt(r, d) { if (r & 1) {
let e = i.\u0275\u0275getCurrentView();
i.\u0275\u0275elementStart(0, "mat-multi-year-view", 6), i.\u0275\u0275twoWayListener("activeDateChange", function (t) { i.\u0275\u0275restoreView(e); let n = i.\u0275\u0275nextContext(); return i.\u0275\u0275twoWayBindingSet(n.activeDate, t) || (n.activeDate = t), i.\u0275\u0275resetView(t); }), i.\u0275\u0275listener("yearSelected", function (t) { i.\u0275\u0275restoreView(e); let n = i.\u0275\u0275nextContext(); return i.\u0275\u0275resetView(n._yearSelectedInMultiYearView(t)); })("selectedChange", function (t) { i.\u0275\u0275restoreView(e); let n = i.\u0275\u0275nextContext(); return i.\u0275\u0275resetView(n._goToDateInView(t, "year")); }), i.\u0275\u0275elementEnd();
} if (r & 2) {
let e = i.\u0275\u0275nextContext();
i.\u0275\u0275twoWayProperty("activeDate", e.activeDate), i.\u0275\u0275property("selected", e.selected)("dateFilter", e.dateFilter)("maxDate", e.maxDate)("minDate", e.minDate)("dateClass", e.dateClass);
} }
function Pt(r, d) { }
var Nt = ["button"], Lt = [[["", "matDatepickerToggleIcon", ""]]], Bt = ["[matDatepickerToggleIcon]"];
function Ht(r, d) { r & 1 && (i.\u0275\u0275namespaceSVG(), i.\u0275\u0275elementStart(0, "svg", 2), i.\u0275\u0275element(1, "path", 3), i.\u0275\u0275elementEnd()); }
var zt = [[["input", "matStartDate", ""]], [["input", "matEndDate", ""]]], Kt = ["input[matStartDate]", "input[matEndDate]"];
function jt(r, d) { r & 1 && (i.\u0275\u0275domElementStart(0, "div", 0), i.\u0275\u0275projection(1), i.\u0275\u0275domElementEnd()); }
var F = (() => { class r {
changes = new f;
calendarLabel = "Calendar";
openCalendarLabel = "Open calendar";
closeCalendarLabel = "Close calendar";
prevMonthLabel = "Previous month";
nextMonthLabel = "Next month";
prevYearLabel = "Previous year";
nextYearLabel = "Next year";
prevMultiYearLabel = "Previous 24 years";
nextMultiYearLabel = "Next 24 years";
switchToMonthViewLabel = "Choose date";
switchToMultiYearViewLabel = "Choose month and year";
startDateLabel = "Start date";
endDateLabel = "End date";
comparisonDateLabel = "Comparison range";
formatYearRange(e, a) { return `${e} \u2013 ${a}`; }
formatYearRangeLabel(e, a) { return `${e} to ${a}`; }
static \u0275fac = function (a) { return new (a || r); };
static \u0275prov = i.\u0275\u0275defineInjectable({ token: r, factory: r.\u0275fac, providedIn: "root" });
} return r; })(), Wt = 0, Y = class {
value;
displayValue;
ariaLabel;
enabled;
cssClasses;
compareValue;
rawValue;
id = Wt++;
constructor(d, e, a, t, n = {}, s = d, l) { this.value = d, this.displayValue = e, this.ariaLabel = a, this.enabled = t, this.cssClasses = n, this.compareValue = s, this.rawValue = l; }
}, qt = { passive: !1, capture: !0 }, K = { passive: !0, capture: !0 }, ke = { passive: !0 }, V = (() => {
class r {
_elementRef = o(E);
_ngZone = o(Ie);
_platform = o(_t);
_intl = o(F);
_eventCleanups;
_skipNextFocus;
_focusActiveCellAfterViewChecked = !1;
label;
rows;
todayValue;
startValue;
endValue;
labelMinRequiredCells;
numCols = 7;
activeCell = 0;
ngAfterViewChecked() { this._focusActiveCellAfterViewChecked && (this._focusActiveCell(), this._focusActiveCellAfterViewChecked = !1); }
isRange = !1;
cellAspectRatio = 1;
comparisonStart;
comparisonEnd;
previewStart = null;
previewEnd = null;
startDateAccessibleName;
endDateAccessibleName;
selectedValueChange = new c;
previewChange = new c;
activeDateChange = new c;
dragStarted = new c;
dragEnded = new c;
_firstRowOffset;
_cellPadding;
_cellWidth;
_startDateLabelId;
_endDateLabelId;
_comparisonStartDateLabelId;
_comparisonEndDateLabelId;
_didDragSinceMouseDown = !1;
_injector = o(P);
comparisonDateAccessibleName = this._intl.comparisonDateLabel;
_trackRow = e => e;
constructor() { let e = o(Fe), a = o(W); this._startDateLabelId = a.getId("mat-calendar-body-start-"), this._endDateLabelId = a.getId("mat-calendar-body-end-"), this._comparisonStartDateLabelId = a.getId("mat-calendar-body-comparison-start-"), this._comparisonEndDateLabelId = a.getId("mat-calendar-body-comparison-end-"), o(G).load(fe), this._ngZone.runOutsideAngular(() => { let t = this._elementRef.nativeElement, n = [e.listen(t, "touchmove", this._touchmoveHandler, qt), e.listen(t, "mouseenter", this._enterHandler, K), e.listen(t, "focus", this._enterHandler, K), e.listen(t, "mouseleave", this._leaveHandler, K), e.listen(t, "blur", this._leaveHandler, K), e.listen(t, "mousedown", this._mousedownHandler, ke), e.listen(t, "touchstart", this._mousedownHandler, ke)]; this._platform.isBrowser && n.push(e.listen("window", "mouseup", this._mouseupHandler), e.listen("window", "touchend", this._touchendHandler)), this._eventCleanups = n; }); }
_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: n } = this; (e.rows || a) && (this._firstRowOffset = t && t.length && t[0].length ? n - t[0].length : 0), (e.cellAspectRatio || a || !this._cellPadding) && (this._cellPadding = `${50 * this.cellAspectRatio / n}%`), (a || !this._cellWidth) && (this._cellWidth = `${100 / n}%`); }
ngOnDestroy() { this._eventCleanups.forEach(e => e()); }
_isActiveCell(e, a) { let t = e * this.numCols + a; return e && (t -= this._firstRowOffset), t == this.activeCell; }
_focusActiveCell(e = !0) { Re(() => { setTimeout(() => { let a = this._elementRef.nativeElement.querySelector(".mat-calendar-body-active"); a && (e || (this._skipNextFocus = !0), a.focus()); }); }, { injector: this._injector }); }
_scheduleFocusActiveCellAfterViewChecked() { this._focusActiveCellAfterViewChecked = !0; }
_isRangeStart(e) { return ae(e, this.startValue, this.endValue); }
_isRangeEnd(e) { return ie(e, this.startValue, this.endValue); }
_isInRange(e) { return ne(e, this.startValue, this.endValue, this.isRange); }
_isComparisonStart(e) { return ae(e, this.comparisonStart, this.comparisonEnd); }
_isComparisonBridgeStart(e, a, t) { if (!this._isComparisonStart(e) || this._isRangeStart(e) || !this._isInRange(e))
return !1; let n = this.rows[a][t - 1]; if (!n) {
let s = this.rows[a - 1];
n = s && s[s.length - 1];
} return n && !this._isRangeEnd(n.compareValue); }
_isComparisonBridgeEnd(e, a, t) { if (!this._isComparisonEnd(e) || this._isRangeEnd(e) || !this._isInRange(e))
return !1; let n = this.rows[a][t + 1]; if (!n) {
let s = this.rows[a + 1];
n = s && s[0];
} return n && !this._isRangeStart(n.compareValue); }
_isComparisonEnd(e) { return ie(e, this.comparisonStart, this.comparisonEnd); }
_isInComparisonRange(e) { return ne(e, this.comparisonStart, this.comparisonEnd, this.isRange); }
_isComparisonIdentical(e) { return this.comparisonStart === this.comparisonEnd && e === this.comparisonStart; }
_isPreviewStart(e) { return ae(e, this.previewStart, this.previewEnd); }
_isPreviewEnd(e) { return ie(e, this.previewStart, this.previewEnd); }
_isInPreview(e) { return ne(e, this.previewStart, this.previewEnd, this.isRange); }
_getDescribedby(e) { if (!this.isRange)
return null; if (this.startValue === e && this.endValue === e)
return `${this._startDateLabelId} ${this._endDateLabelId}`; if (this.startValue === e)
return this._startDateLabelId; if (this.endValue === e)
return this._endDateLabelId; if (this.comparisonStart !== null && this.comparisonEnd !== null) {
if (e === this.comparisonStart && e === this.comparisonEnd)
return `${this._comparisonStartDateLabelId} ${this._comparisonEndDateLabelId}`;
if (e === this.comparisonStart)
return this._comparisonStartDateLabelId;
if (e === this.comparisonEnd)
return this._comparisonEndDateLabelId;
} return null; }
_enterHandler = e => { if (this._skipNextFocus && e.type === "focus") {
this._skipNextFocus = !1;
return;
} if (e.target && this.isRange) {
let a = this._getCellFromElement(e.target);
a && this._ngZone.run(() => this.previewChange.emit({ value: a.enabled ? a : null, event: e }));
} };
_touchmoveHandler = e => { if (!this.isRange)
return; let a = Me(e), t = a ? this._getCellFromElement(a) : null; a !== e.target && (this._didDragSinceMouseDown = !0), te(e.target) && e.preventDefault(), this._ngZone.run(() => this.previewChange.emit({ value: t?.enabled ? t : null, event: e })); };
_leaveHandler = e => { this.previewEnd !== null && this.isRange && (e.type !== "blur" && (this._didDragSinceMouseDown = !0), e.target && this._getCellFromElement(e.target) && !(e.relatedTarget && this._getCellFromElement(e.relatedTarget)) && this._ngZone.run(() => this.previewChange.emit({ value: null, event: e }))); };
_mousedownHandler = e => { if (!this.isRange)
return; this._didDragSinceMouseDown = !1; let a = e.target && this._getCellFromElement(e.target); !a || !this._isInRange(a.compareValue) || this._ngZone.run(() => { this.dragStarted.emit({ value: a.rawValue, event: e }); }); };
_mouseupHandler = e => { if (!this.isRange)
return; let a = te(e.target); if (!a) {
this._ngZone.run(() => { this.dragEnded.emit({ value: null, event: e }); });
return;
} a.closest(".mat-calendar-body") === this._elementRef.nativeElement && this._ngZone.run(() => { let t = this._getCellFromElement(a); this.dragEnded.emit({ value: t?.rawValue ?? null, event: e }); }); };
_touchendHandler = e => { let a = Me(e); a && this._mouseupHandler({ target: a }); };
_getCellFromElement(e) { let a = te(e); if (a) {
let t = a.getAttribute("data-mat-row"), n = a.getAttribute("data-mat-col");
if (t && n)
return this.rows[parseInt(t)]?.[parseInt(n)] || null;
} return null; }
static \u0275fac = function (a) { return new (a || r); };
static \u0275cmp = i.\u0275\u0275defineComponent({ type: r, 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"], features: [i.\u0275\u0275NgOnChangesFeature], attrs: Mt, decls: 11, vars: 11, consts: [["aria-hidden", "true"], ["role", "row"], [1, "mat-calendar-body-hidden-label", 3, "id"], [1, "mat-calendar-body-label"], [1, "mat-calendar-body-label", 3, "paddingTop", "paddingBottom"], ["role", "gridcell", 1, "mat-calendar-body-cell-container", 3, "width", "paddingTop", "paddingBottom"], ["role", "gridcell", 1, "mat-calendar-body-cell-container"], ["type", "button", 1, "mat-calendar-body-cell", 3, "click", "focus", "ngClass", "tabindex"], [1, "mat-calendar-body-cell-content", "mat-focus-indicator"], ["aria-hidden", "true", 1, "mat-calendar-body-cell-preview"]], template: function (a, t) {
a & 1 && (i.\u0275\u0275conditionalCreate(0, Vt, 3, 6, "tr", 0), i.\u0275\u0275repeaterCreate(1, It, 4, 1, "tr", 1, St, !0), i.\u0275\u0275elementStart(3, "span", 2), i.\u0275\u0275text(4), i.\u0275\u0275elementEnd(), i.\u0275\u0275elementStart(5, "span", 2), i.\u0275\u0275text(6), i.\u0275\u0275elementEnd(), i.\u0275\u0275elementStart(7, "span", 2), i.\u0275\u0275text(8), i.\u0275\u0275elementEnd(), i.\u0275\u0275elementStart(9, "span", 2), i.\u0275\u0275text(10), i.\u0275\u0275elementEnd()), a & 2 && (i.\u0275\u0275conditional(t._firstRowOffset < t.labelMinRequiredCells ? 0 : -1), i.\u0275\u0275advance(), i.\u0275\u0275repeater(t.rows), i.\u0275\u0275advance(2), i.\u0275\u0275property("id", t._startDateLabelId), i.\u0275\u0275advance(), i.\u0275\u0275textInterpolate1(" ", t.startDateAccessibleName, `
`), i.\u0275\u0275advance(), i.\u0275\u0275property("id", t._endDateLabelId), i.\u0275\u0275advance(), i.\u0275\u0275textInterpolate1(" ", t.endDateAccessibleName, `
`), i.\u0275\u0275advance(), i.\u0275\u0275property("id", t._comparisonStartDateLabelId), i.\u0275\u0275advance(), i.\u0275\u0275textInterpolate2(" ", t.comparisonDateAccessibleName, " ", t.startDateAccessibleName, `
`), i.\u0275\u0275advance(), i.\u0275\u0275property("id", t._comparisonEndDateLabelId), i.\u0275\u0275advance(), i.\u0275\u0275textInterpolate2(" ", t.comparisonDateAccessibleName, " ", t.endDateAccessibleName, `
`));
}, dependencies: [vt], styles: [`.mat-calendar-body{min-width:224px}.mat-calendar-body-today:not(.mat-calendar-body-selected):not(.mat-calendar-body-comparison-identical){border-color:var(--mat-datepicker-calendar-date-today-outline-color, var(--mat-sys-primary))}.mat-calendar-body-label{height:0;line-height:0;text-align:start;padding-left:4.7142857143%;padding-right:4.7142857143%;font-size:var(--mat-datepicker-calendar-body-label-text-size, var(--mat-sys-title-small-size));font-weight:var(--mat-datepicker-calendar-body-label-text-weight, var(--mat-sys-title-small-weight));color:var(--mat-datepicker-calendar-body-label-text-color, var(--mat-sys-on-surface))}.mat-calendar-body-hidden-label{display:none}.mat-calendar-body-cell-container{position:relative;height:0;line-height:0}.mat-calendar-body-cell{position:absolute;top:0;left:0;width:100%;height:100%;background:none;text-align:center;outline:none;margin:0;font-family:var(--mat-datepicker-calendar-text-font, var(--mat-sys-body-medium-font));font-size:var(--mat-datepicker-calendar-text-size, var(--mat-sys-body-medium-size));-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-calendar-body-cell::-moz-focus-inner{border:0}.mat-calendar-body-cell::before,.mat-calendar-body-cell::after,.mat-calendar-body-cell-preview{content:"";position:absolute;top:5%;left:0;z-index:0;box-sizing:border-box;display:block;height:90%;width:100%}.mat-calendar-body-range-start:not(.mat-calendar-body-in-comparison-range)::before,.mat-calendar-body-range-start::after,.mat-calendar-body-comparison-start:not(.mat-calendar-body-comparison-bridge-start)::before,.mat-calendar-body-comparison-start::after,.mat-calendar-body-preview-start .mat-calendar-body-cell-preview{left:5%;width:95%;border-top-left-radius:999px;border-bottom-left-radius:999px}[dir=rtl] .mat-calendar-body-range-start:not(.mat-calendar-body-in-comparison-range)::before,[dir=rtl] .mat-calendar-body-range-start::after,[dir=rtl] .mat-calendar-body-comparison-start:not(.mat-calendar-body-comparison-bridge-start)::before,[dir=rtl] .mat-calendar-body-comparison-start::after,[dir=rtl] .mat-calendar-body-preview-start .mat-calendar-body-cell-preview{left:0;border-radius:0;border-top-right-radius:999px;border-bottom-right-radius:999px}.mat-calendar-body-range-end:not(.mat-calendar-body-in-comparison-range)::before,.mat-calendar-body-range-end::after,.mat-calendar-body-comparison-end:not(.mat-calendar-body-comparison-bridge-end)::before,.mat-calendar-body-comparison-end::after,.mat-calendar-body-preview-end .mat-calendar-body-cell-preview{width:95%;border-top-right-radius:999px;border-bottom-right-radius:999px}[dir=rtl] .mat-calendar-body-range-end:not(.mat-calendar-body-in-comparison-range)::before,[dir=rtl] .mat-calendar-body-range-end::after,[dir=rtl] .mat-calendar-body-comparison-end:not(.mat-calendar-body-comparison-bridge-end)::before,[dir=rtl] .mat-calendar-body-comparison-end::after,[dir=rtl] .mat-calendar-body-preview-end .mat-calendar-body-cell-preview{left:5%;border-radius:0;border-top-left-radius:999px;border-bottom-left-radius:999px}[dir=rtl] .mat-calendar-body-comparison-bridge-start.mat-calendar-body-range-end::after,[dir=rtl] .mat-calendar-body-comparison-bridge-end.mat-calendar-body-range-start::after{width:95%;border-top-right-radius:999px;border-bottom-right-radius:999px}.mat-calendar-body-comparison-start.mat-calendar-body-range-end::after,[dir=rtl] .mat-calendar-body-comparison-start.mat-calendar-body-range-end::after,.mat-calendar-body-comparison-end.mat-calendar-body-range-start::after,[dir=rtl] .mat-calendar-body-comparison-end.mat-calendar-body-range-start::after{width:90%}.mat-calendar-body-in-preview{color:var(--mat-datepicker-calendar-date-preview-state-outline-color, var(--mat-sys-primary))}.mat-calendar-body-in-preview .mat-calendar-body-cell-preview{border-top:dashed 1px;border-bottom:dashed 1px}.mat-calendar-body-preview-start .mat-calendar-body-cell-preview{border-left:dashed 1px}[dir=rtl] .mat-calendar-body-preview-start .mat-calendar-body-cell-preview{border-left:0;border-right:dashed 1px}.mat-calendar-body-preview-end .mat-calendar-body-cell-preview{border-right:dashed 1px}[dir=rtl] .mat-calendar-body-preview-end .mat-calendar-body-cell-preview{border-right:0;border-left:dashed 1px}.mat-calendar-body-disabled{cursor:default}.mat-calendar-body-disabled>.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, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.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, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}@media(forced-colors: 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, var(--mat-sys-on-surface));border-color:var(--mat-datepicker-calendar-date-outline-color, transparent)}.mat-calendar-body-cell-content.mat-focus-indicator{position:absolute}@media(forced-colors: 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, color-mix(in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-focus-state-layer-opacity) * 100%), transparent))}@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, color-mix(in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-hover-state-layer-opacity) * 100%), transparent))}}.mat-calendar-body-selected{background-color:var(--mat-datepicker-calendar-date-selected-state-background-color, var(--mat-sys-primary));color:var(--mat-datepicker-calendar-date-selected-state-text-color, var(--mat-sys-on-primary))}.mat-calendar-body-disabled>.mat-calendar-body-selected{background-color:var(--mat-datepicker-calendar-date-selected-disabled-state-background-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.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, var(--mat-sys-primary))}.mat-calendar-body-in-range::before{background:var(--mat-datepicker-calendar-date-in-range-state-background-color, var(--mat-sys-primary-container))}.mat-calendar-body-comparison-identical,.mat-calendar-body-in-comparison-range::before{background:var(--mat-datepicker-calendar-date-in-comparison-range-state-background-color, var(--mat-sys-tertiary-container))}.mat-calendar-body-comparison-identical,.mat-calendar-body-in-comparison-range::before{background:var(--mat-datepicker-calendar-date-in-comparison-range-state-background-color, var(--mat-sys-tertiary-container))}.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, var(--mat-sys-primary-container)) 50%, var(--mat-datepicker-calendar-date-in-comparison-range-state-background-color, var(--mat-sys-tertiary-container)) 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, var(--mat-sys-primary-container)) 50%, var(--mat-datepicker-calendar-date-in-comparison-range-state-background-color, var(--mat-sys-tertiary-container)) 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, var(--mat-sys-secondary-container))}.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, var(--mat-sys-secondary))}@media(forced-colors: active){.mat-datepicker-popup:not(:empty),.mat-calendar-body-cell:not(.mat-calendar-body-in-range) .mat-calendar-body-selected{outline:solid 1px}.mat-calendar-body-today{outline:dotted 1px}.mat-calendar-body-cell::before,.mat-calendar-body-cell::after,.mat-calendar-body-selected{background:none}.mat-calendar-body-in-range::before,.mat-calendar-body-comparison-bridge-start::before,.mat-calendar-body-comparison-bridge-end::before{border-top:solid 1px;border-bottom:solid 1px}.mat-calendar-body-range-start::before{border-left:solid 1px}[dir=rtl] .mat-calendar-body-range-start::before{border-left:0;border-right:solid 1px}.mat-calendar-body-range-end::before{border-right:solid 1px}[dir=rtl] .mat-calendar-body-range-end::before{border-right:0;border-left:solid 1px}.mat-calendar-body-in-comparison-range::before{border-top:dashed 1px;border-bottom:dashed 1px}.mat-calendar-body-comparison-start::before{border-left:dashed 1px}[dir=rtl] .mat-calendar-body-comparison-start::before{border-left:0;border-right:dashed 1px}.mat-calendar-body-comparison-end::before{border-right:dashed 1px}[dir=rtl] .mat-calendar-body-comparison-end::before{border-right:0;border-left:dashed 1px}}
`], encapsulation: 2, changeDetection: 0 });
}
return r;
})();
function ee(r) { return r?.nodeName === "TD"; }
function te(r) { let d; return ee(r) ? d = r : ee(r.parentNode) ? d = r.parentNode : ee(r.parentNode?.parentNode) && (d = r.parentNode.parentNode), d?.getAttribute("data-mat-row") != null ? d : null; }
function ae(r, d, e) { return e !== null && d !== e && r < e && r === d; }
function ie(r, d, e) { return d !== null && d !== e && r >= d && r === e; }
function ne(r, d, e, a) { return a && d !== null && e !== null && d !== e && r >= d && r <= e; }
function Me(r) { let d = r.changedTouches[0]; return document.elementFromPoint(d.clientX, d.clientY); }
var h = class {
start;
end;
_disableStructuralEquivalency;
constructor(d, e) { this.start = d, this.end = e; }
}, D = (() => { class r {
selection;
_adapter;
_selectionChanged = new f;
selectionChanged = this._selectionChanged;
constructor(e, a) { this.selection = e, this._adapter = a, 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); }
static \u0275fac = function (a) { i.\u0275\u0275invalidFactory(); };
static \u0275prov = i.\u0275\u0275defineInjectable({ token: r, factory: r.\u0275fac });
} return r; })(), Qt = (() => { class r extends D {
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 r(this._adapter); return e.updateSelection(this.selection, this), e; }
static \u0275fac = function (a) { return new (a || r)(i.\u0275\u0275inject(u)); };
static \u0275prov = i.\u0275\u0275defineInjectable({ token: r, factory: r.\u0275fac });
} return r; })(), Gt = (() => { class r extends D {
constructor(e) { super(new h(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 h(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 r(this._adapter); return e.updateSelection(this.selection, this), e; }
static \u0275fac = function (a) { return new (a || r)(i.\u0275\u0275inject(u)); };
static \u0275prov = i.\u0275\u0275defineInjectable({ token: r, factory: r.\u0275fac });
} return r; })();
function $t(r, d) { return r || new Qt(d); }
var We = { provide: D, deps: [[new le, new ce, D], u], useFactory: $t };
function Ut(r, d) { return r || new Gt(d); }
var Xt = { provide: D, deps: [[new le, new ce, D], u], useFactory: Ut }, j = new Te("MAT_DATE_RANGE_SELECTION_STRATEGY"), Zt = (() => { class r {
_dateAdapter;
constructor(e) { this._dateAdapter = e; }
selectionFinished(e, a) { let { start: t, end: n } = a; return t == null ? t = e : n == null && e && this._dateAdapter.compareDate(e, t) >= 0 ? n = e : (t = e, n = null), new h(t, n); }
createPreview(e, a) { let t = null, n = null; return a.start && !a.end && e && (t = a.start, n = e), new h(t, n); }
createDrag(e, a, t) { let n = a.start, s = a.end; if (!n || !s)
return null; let l = this._dateAdapter, B = l.compareDate(n, s) !== 0, y = l.getYear(t) - l.getYear(e), C = l.getMonth(t) - l.getMonth(e), H = l.getDate(t) - l.getDate(e); return B && l.sameDate(e, a.start) ? (n = t, l.compareDate(t, s) > 0 && (s = l.addCalendarYears(s, y), s = l.addCalendarMonths(s, C), s = l.addCalendarDays(s, H))) : B && l.sameDate(e, a.end) ? (s = t, l.compareDate(t, n) < 0 && (n = l.addCalendarYears(n, y), n = l.addCalendarMonths(n, C), n = l.addCalendarDays(n, H))) : (n = l.addCalendarYears(n, y), n = l.addCalendarMonths(n, C), n = l.addCalendarDays(n, H), s = l.addCalendarYears(s, y), s = l.addCalendarMonths(s, C), s = l.addCalendarDays(s, H)), new h(n, s); }
static \u0275fac = function (a) { return new (a || r)(i.\u0275\u0275inject(u)); };
static \u0275prov = i.\u0275\u0275defineInjectable({ token: r, factory: r.\u0275fac });
} return r; })();
function Jt(r, d) { return r || new Zt(d); }
var ea = { provide: j, deps: [[new le, new ce, j], u], useFactory: Jt }, re = 7, ta = 0, Se = (() => { class r {
_changeDetectorRef = o(g);
_dateFormats = o(w, { optional: !0 });
_dateAdapter = o(u, { optional: !0 });
_dir = o(N, { optional: !0 });
_rangeStrategy = o(j, { optional: !0 });
_rerenderSubscription = _.EMPTY;
_selectionKeyPressed;
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(); }
_activeDate;
get selected() { return this._selected; }
set selected(e) { e instanceof h ? this._selected = e : this._selected = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e)), this._setRanges(this._selected); }
_selected;
get minDate() { return this._minDate; }
set minDate(e) { this._minDate = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e)); }
_minDate;
get maxDate() { return this._maxDate; }
set maxDate(e) { this._maxDate = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e)); }
_maxDate;
dateFilter;
dateClass;
comparisonStart;
comparisonEnd;
startDateAccessibleName;
endDateAccessibleName;
activeDrag = null;
selectedChange = new c;
_userSelection = new c;
dragStarted = new c;
dragEnded = new c;
activeDateChange = new c;
_matCalendarBody;
_monthLabel = p("");
_weeks = p([]);
_firstWeekOffset = p(0);
_rangeStart = p(null);
_rangeEnd = p(null);
_comparisonRangeStart = p(null);
_comparisonRangeEnd = p(null);
_previewStart = p(null);
_previewEnd = p(null);
_isRange = p(!1);
_todayDate = p(null);
_weekdays = p([]);
constructor() { o(G).load(me), this._activeDate = this._dateAdapter.today(); }
ngAfterContentInit() { this._rerenderSubscription = this._dateAdapter.localeChanges.pipe(ue(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), n, s; this._selected instanceof h ? (n = this._getDateInCurrentMonth(this._selected.start), s = this._getDateInCurrentMonth(this._selected.end)) : n = s = this._getDateInCurrentMonth(this._selected), (n !== 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 I:
this.activeDate = this._dateAdapter.addCalendarDays(this._activeDate, t ? 1 : -1);
break;
case x:
this.activeDate = this._dateAdapter.addCalendarDays(this._activeDate, t ? -1 : 1);
break;
case O:
this.activeDate = this._dateAdapter.addCalendarDays(this._activeDate, -7);
break;
case L:
this.activeDate = this._dateAdapter.addCalendarDays(this._activeDate, 7);
break;
case he:
this.activeDate = this._dateAdapter.addCalendarDays(this._activeDate, 1 - this._dateAdapter.getDate(this._activeDate));
break;
case pe:
this.activeDate = this._dateAdapter.addCalendarDays(this._activeDate, this._dateAdapter.getNumDaysInMonth(this._activeDate) - this._dateAdapter.getDate(this._activeDate));
break;
case Q:
this.activeDate = e.altKey ? this._dateAdapter.addCalendarYears(this._activeDate, -1) : this._dateAdapter.addCalendarMonths(this._activeDate, -1);
break;
case q:
this.activeDate = e.altKey ? this._dateAdapter.addCalendarYears(this._activeDate, 1) : this._dateAdapter.addCalendarMonths(this._activeDate, 1);
break;
case S:
case M:
this._selectionKeyPressed = !0, this._canSelect(this._activeDate) && e.preventDefault();
return;
case Ne:
this._previewEnd() != null && !k(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 === M || e.keyCode === S) && (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.set(this._getCellCompareValue(this._dateAdapter.today())), this._monthLabel.set(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.set((re + this._dateAdapter.getDayOfWeek(e) - this._dateAdapter.getFirstDayOfWeek()) % re), 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, n = this._rangeStrategy.createPreview(t, this.selected, e);
if (this._previewStart.set(this._getCellCompareValue(n.start)), this._previewEnd.set(this._getCellCompareValue(n.end)), this.activeDrag && t) {
let s = this._rangeStrategy.createDrag?.(this.activeDrag.value, this.selected, t, e);
s && (this._previewStart.set(this._getCellCompareValue(s.start)), this._previewEnd.set(this._getCellCompareValue(s.end)));
}
} }
_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"), n = this._dateAdapter.getDayOfWeekNames("long").map((s, l) => ({ long: s, narrow: a[l], id: ta++ })); this._weekdays.set(n.slice(e).concat(n.slice(0, e))); }
_createWeekCells() { let e = this._dateAdapter.getNumDaysInMonth(this.activeDate), a = this._dateAdapter.getDateNames(), t = [[]]; for (let n = 0, s = this._firstWeekOffset(); n < e; n++, s++) {
s == re && (t.push([]), s = 0);
let l = this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate), this._dateAdapter.getMonth(this.activeDate), n + 1), B = this._shouldEnableDate(l), y = this._dateAdapter.format(l, this._dateFormats.display.dateA11yLabel), C = this.dateClass ? this.dateClass(l, "month") : void 0;
t[t.length - 1].push(new Y(n + 1, a[n], y, B, C, this._getCellCompareValue(l), l));
} this._weeks.set(t); }
_shouldEnableDate(e) { return !!e && (!this.minDate || this._dateAdapter.compareDate(e, this.minDate) >= 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), n = this._dateAdapter.getDate(e);
return new Date(a, t, n).getTime();
} return null; }
_isRtl() { return this._dir && this._dir.value === "rtl"; }
_setRanges(e) { e instanceof h ? (this._rangeStart.set(this._getCellCompareValue(e.start)), this._rangeEnd.set(this._getCellCompareValue(e.end)), this._isRange.set(!0)) : (this._rangeStart.set(this._getCellCompareValue(e)), this._rangeEnd.set(this._rangeStart()), this._isRange.set(!1)), this._comparisonRangeStart.set(this._getCellCompareValue(this.comparisonStart)), this._comparisonRangeEnd.set(this._getCellCompareValue(this.comparisonEnd)); }
_canSelect(e) { return !this.dateFilter || this.dateFilter(e); }
_clearPreview() { this._previewStart.set(null), this._previewEnd.set(null); }
static \u0275fac = function (a) { return new (a || r); };
static \u0275cmp = i.\u0275\u0275defineComponent({ type: r, selectors: [["mat-month-view"]], viewQuery: function (a, t) { if (a & 1 && i.\u0275\u0275viewQuery(V, 5), a & 2) {
let n;
i.\u0275\u0275queryRefresh(n = i.\u0275\u0275loadQuery()) && (t._matCalendarBody = n.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"], features: [i.\u0275\u0275NgOnChangesFeature], decls: 8, vars: 14, consts: [["role", "grid", 1, "mat-calendar-table"], [1, "mat-calendar-table-header"], ["scope", "col"], ["aria-hidden", "true"], ["colspan", "7", 1, "mat-calendar-table-header-divider"], ["mat-calendar-body", "", 3, "selectedValueChange", "activeDateChange", "previewChange", "dragStarted", "dragEnded", "keyup", "keydown", "label", "rows", "todayValue", "startValue", "endValue", "comparisonStart", "comparisonEnd", "previewStart", "previewEnd", "isRange", "labelMinRequiredCells", "activeCell", "startDateAccessibleName", "endDateAccessibleName"], [1, "cdk-visually-hidden"]], template: function (a, t) { a & 1 && (i.\u0275\u0275elementStart(0, "table", 0)(1, "thead", 1)(2, "tr"), i.\u0275\u0275repeaterCreate(3, Ft, 5, 2, "th", 2, Ke), i.\u0275\u0275elementEnd(), i.\u0275\u0275elementStart(5, "tr", 3), i.\u0275\u0275element(6, "th", 4), i.\u0275\u0275elementEnd()(), i.\u0275\u0275elementStart(7, "tbody", 5), i.\u0275\u0275listener("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); }), i.\u0275\u0275elementEnd()()), a & 2 && (i.\u0275\u0275advance(3), i.\u0275\u0275repeater(t._weekdays()), i.\u0275\u0275advance(4), i.\u0275\u0275property("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: [V], encapsulation: 2, changeDetection: 0 });
} return r; })(), m = 24, se = 4, Ve = (() => { class r {
_changeDetectorRef = o(g);
_dateAdapter = o(u, { optional: !0 });
_dir = o(N, { optional: !0 });
_rerenderSubscription = _.EMPTY;
_selectionKeyPressed;
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), qe(this._dateAdapter, a, this._activeDate, this.minDate, this.maxDate) || this._init(); }
_activeDate;
get selected() { return this._selected; }
set selected(e) { e instanceof h ? this._selected = e : this._selected = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e)), this._setSelectedYear(e); }
_selected;
get minDate() { return this._minDate; }
set minDate(e) { this._minDate = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e)); }
_minDate;
get maxDate() { return this._maxDate; }
set maxDate(e) { this._maxDate = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e)); }
_maxDate;
dateFilter;
dateClass;
selectedChange = new c;
yearSelected = new c;
activeDateChange = new c;
_matCalendarBody;
_years = p([]);
_todayYear = p(0);
_selectedYear = p(null);
constructor() { this._dateAdapter, this._activeDate = this._dateAdapter.today(); }
ngAfterContentInit() { this._rerenderSubscription = this._dateAdapter.localeChanges.pipe(ue(null)).subscribe(() => this._init()); }
ngOnDestroy() { this._rerenderSubscription.unsubscribe(); }
_init() { this._todayYear.set(this._dateAdapter.getYear(this._dateAdapter.today())); let a = this._dateAdapter.getYear(this._activeDate) - T(this._dateAdapter, this.activeDate, this.minDate, this.maxDate), t = []; for (let n = 0, s = []; n < m; n++)
s.push(a + n), s.length == se && (t.push(s.map(l => this._createCellForYear(l))), s = []); this._years.set(t), this._changeDetectorRef.markForCheck(); }
_yearSelected(e) { let a = e.value, t = this._dateAdapter.createDate(a, 0, 1), n = this._getDateFromYear(a); this.yearSelected.emit(t), this.selectedChange.emit(n); }
_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 I:
this.activeDate = this._dateAdapter.addCalendarYears(this._activeDate, t ? 1 : -1);
break;
case x:
this.activeDate = this._dateAdapter.addCalendarYears(this._activeDate, t ? -1 : 1);
break;
case O:
this.activeDate = this._dateAdapter.addCalendarYears(this._activeDate, -se);
break;
case L:
this.activeDate = this._dateAdapter.addCalendarYears(this._activeDate, se);
break;
case he:
this.activeDate = this._dateAdapter.addCalendarYears(this._activeDate, -T(this._dateAdapter, this.activeDate, this.minDate, this.maxDate));
break;
case pe:
this.activeDate = this._dateAdapter.addCalendarYears(this._activeDate, m - T(this._dateAdapter, this.activeDate, this.minDate, this.maxDate) - 1);
break;
case Q:
this.activeDate = this._dateAdapter.addCalendarYears(this._activeDate, e.altKey ? -m * 10 : -m);
break;
case q:
this.activeDate = this._dateAdapter.addCalendarYears(this._activeDate, e.altKey ? m * 10 : m);
break;
case S:
case M:
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 === M || e.keyCode === S) && (this._selectionKeyPressed && this._yearSelected({ value: this._dateAdapter.getYear(this._activeDate), event: e }), this._selectionKeyPressed = !1); }
_getActiveCell() { return T(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), n = this.dateClass ? this.dateClass(a, "multi-year") : void 0; return new Y(e, t, t, this._shouldEnableYear(e), n); }
_shouldEnableYear(e) { if (e == null || this.maxDate && e > this._dateAdapter.getYear(this.maxDate) || this.minDate && e < this._dateAdapter.getYear(this.minDate))
return !1; if (!this.dateFilter)
return !0; let a = this._dateAdapter.createDate(e, 0, 1); for (let t = a; this._dateAdapter.getYear(t) == e; t = this._dateAdapter.addCalendarDays(t, 1))
if (this.dateFilter(t))
return !0; return !1; }
_isRtl() { return this._dir && this._dir.value === "rtl"; }
_setSelectedYear(e) { if (this._selectedYear.set(null), e instanceof h) {
let a = e.start || e.end;
a && this._selectedYear.set(this._dateAdapter.getYear(a));
}
else
e && this._selectedYear.set(this._dateAdapter.getYear(e)); }
static \u0275fac = function (a) { return new (a || r); };
static \u0275cmp = i.\u0275\u0275defineComponent({ type: r, selectors: [["mat-multi-year-view"]], viewQuery: function (a, t) { if (a & 1 && i.\u0275\u0275viewQuery(V, 5), a & 2) {
let n;
i.\u0275\u0275queryRefresh(n = i.\u0275\u0275loadQuery()) && (t._matCalendarBody = n.first);
} }, inputs: { activeDate: "activeDate", selected: "selected", minDate: "minDate", maxDate: "maxDate", dateFilter: "dateFilter", dateClass: "dateClass" }, outputs: { selectedChange: "selectedChange", yearSelected: "yearSelected", activeDateChange: "activeDateChange" }, exportAs: ["matMultiYearView"], decls: 5, vars: 7, consts: [["role", "grid", 1, "mat-calendar-table"], ["aria-hidden", "true", 1, "mat-calendar-table-header"], ["colspan", "4", 1, "mat-calendar-table-header-divider"], ["mat-calendar-body", "", 3, "selectedValueChange", "activeDateChange", "keyup", "keydown", "rows", "todayValue", "startValue", "endValue", "numCols", "cellAspectRatio", "activeCell"]], template: function (a, t) { a & 1 && (i.\u0275\u0275elementStart(0, "table", 0)(1, "thead", 1)(2, "tr"), i.\u0275\u0275element(3, "th", 2), i.\u0275\u0275elementEnd()(), i.\u0275\u0275elementStart(4, "tbody", 3), i.\u0275\u0275listener("selectedValueChange", function (s) { return t._yearSelected(s); })("activeDateChange", function (s) { return t._updateActiveDate(s); })("keyup", function (s) { return t._handleCalendarBodyKeyup(s); })("keydown", function (s) { return t._handleCalendarBodyKeydown(s); }), i.\u0275\u0275elementEnd()()), a & 2 && (i.\u0275\u0275advance(4), i.\u0275\u0275property("rows", t._years())("todayValue", t._todayYear())("startValue", t._selectedYear())("endValue", t._selectedYear())("numCols", 4)("cellAspectRatio", 4 / 7)("activeCell", t._getActiveCell())); }, dependencies: [V], encapsulation: 2, changeDetection: 0 });
} return r; })();
function qe(r, d, e, a, t) { let n = r.getYear(d), s = r.getYear(e), l = Qe(r, a, t); return Math.floor((n - l) / m) === Math.floor((s - l) / m); }
function T(r, d, e, a) { let t = r.getYear(d); return aa(t - Qe(r, e, a), m); }
function Qe(r, d, e) { let a = 0; return e ? a = r.getYear(e) - m + 1 : d && (a = r.getYear(d)), a; }
function aa(r, d) { return (r % d + d) % d; }
var Ee = (() => { class r {
_changeDetectorRef = o(g);
_dateFormats = o(w, { optional: !0 });
_dateAdapter = o(u, { optional: !0 });
_dir = o(N, { optional: !0 });
_rerenderSubscription = _.EMPTY;
_selectionKeyPressed;
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(); }
_activeDate;
get selected() { return this._selected; }
set selected(e) { e instanceof h ? this._selected = e : this._selected = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e)), this._setSelectedMonth(e); }
_selected;
get minDate() { return this._minDate; }
set minDate(e) { this._minDate = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e)); }
_minDate;
get maxDate() { return this._maxDate; }
set maxDate(e) { this._maxDate = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e)); }
_maxDate;
dateFilter;
dateClass;
selectedChange = new c;
monthSelected = new c;
activeDateChange = new c;
_matCalendarBody;
_months = p([]);
_yearLabel = p("");
_todayMonth = p(null);
_selectedMonth = p(null);
constructor() { this._activeDate = this._dateAdapter.today(); }
ngAfterContentInit() { this._rerenderSubscription = this._dateAdapter.localeChanges.pipe(ue(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 n = this._getDateFromMonth(a); this.selectedChange.emit(n); }
_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 I:
this.activeDate = this._dateAdapter.addCalendarMonths(this._activeDate, t ? 1 : -1);
break;
case x:
this.activeDate = this._dateAdapter.addCalendarMonths(this._activeDate, t ? -1 : 1);
break;
case O:
this.activeDate = this._dateAdapter.addCalendarMonths(this._activeDate, -4);
break;
case L:
this.activeDate = this._dateAdapter.addCalendarMonths(this._activeDate, 4);
break;
case he:
this.activeDate = this._dateAdapter.addCalendarMonths(this._activeDate, -this._dateAdapter.getMonth(this._activeDate));
break;
case pe:
this.activeDate = this._dateAdapter.addCalendarMonths(this._activeDate, 11 - this._dateAdapter.getMonth(this._activeDate));
break;
case Q:
this.activeDate = this._dateAdapter.addCalendarYears(this._activeDate, e.altKey ? -10 : -1);
break;
case q:
this.activeDate = this._dateAdapter.addCalendarYears(this._activeDate, e.altKey ? 10 : 1);
break;
case S:
case M:
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 === M || e.keyCode === S) && (this._selectionKeyPressed && this._monthSelected({ value: this._dateAdapter.getMonth(this._activeDate), event: e }), this._selectionKeyPressed = !1); }
_init() { this._setSelectedMonth(this.selected), this._todayMonth.set(this._getMonthInCurrentYear(this._dateAdapter.today())), this._yearLabel.set(this._dateAdapter.getYearName(this.activeDate)); let e = this._dateAdapter.getMonthNames("short"); this._months.set([[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), n = this._dateAdapter.format(t, this._dateFormats.display.monthYearA11yLabel), s = this.dateClass ? this.dateClass(t, "year") : void 0; return new Y(e, a.toLocaleUpperCase(), n, 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 n = t; this._dateAdapter.getMonth(n) == e; n = this._dateAdapter.addCalendarDays(n, 1))
if (this.dateFilter(n))
return !0; return !1; }
_isYearAndMonthAfterMaxDate(e, a) { if (this.maxDate) {
let t = this._dateAdapter.getYear(this.maxDate), n = this._dateAdapter.getMonth(this.maxDate);
return e > t || e === t && a > n;
} return !1; }
_isYearAndMonthBeforeMinDate(e, a) { if (this.minDate) {
let t = this._dateAdapter.getYear(this.minDate), n = this._dateAdapter.getMonth(this.minDate);
return e < t || e === t && a < n;
} return !1; }
_isRtl() { return this._dir && this._dir.value === "rtl"; }
_setSelectedMonth(e) { e instanceof h ? this._selectedMonth.set(this._getMonthInCurrentYear(e.start) || this._getMonthInCurrentYear(e.end)) : this._selectedMonth.set(this._getMonthInCurrentYear(e)); }
static \u0275fac = function (a) { return new (a || r); };
static \u0275cmp = i.\u0275\u0275defineComponent({ type: r, selectors: [["mat-year-view"]], viewQuery: function (a, t) { if (a & 1 && i.\u0275\u0275viewQuery(V, 5), a & 2) {
let n;
i.\u0275\u0275queryRefresh(n = i.\u0275\u0275loadQuery()) && (t._matCalendarBody = n.first);
} }, inputs: { activeDate: "activeDate", selected: "selected", minDate: "minDate", maxDate: "maxDate", dateFilter: "dateFilter", dateClass: "dateClass" }, outputs: { selectedChange: "selectedChange", monthSelected: "monthSelected", activeDateChange: "activeDateChange" }, exportAs: ["matYearView"], decls: 5, vars: 9, consts: [["role", "grid", 1, "mat-calendar-table"], ["aria-hidden", "true", 1, "mat-calendar-table-header"], ["colspan", "4", 1, "mat-calendar-table-header-divider"], ["mat-calendar-body", "", 3, "selectedValueChange", "activeDateChange", "keyup", "keydown", "label", "rows", "todayValue", "startValue", "endValue", "labelMinRequiredCells", "numCols", "cellAspectRatio", "activeCell"]], template: function (a, t) { a & 1 && (i.\u0275\u0275elementStart(0, "table", 0)(1, "thead", 1)(2, "tr"), i.\u0275\u0275element(3, "th", 2), i.\u0275\u0275elementEnd()(), i.\u0275\u0275elementStart(4, "tbody", 3), i.\u0275\u0275listener("selectedValueChange", function (s) { return t._monthSelected(s); })("activeDateChange", function (s) { return t._updateActiveDate(s); })("keyup", function (s) { return t._handleCalendarBodyKeyup(s); })("keydown", function (s) { return t._handleCalendarBodyKeydown(s); }), i.\u0275\u0275elementEnd()()), a & 2 && (i.\u0275\u0275advance(4), i.\u0275\u0275property("label", t._yearLabel())("rows", t._months())("todayValue", t._todayMonth())("startValue", t._selectedMonth())("endValue", t._selectedMonth())("labelMinRequiredCells", 2)("numCols", 4)("cellAspectRatio", 4 / 7)("activeCell", t._dateAdapter.getMonth(t.activeDate))); }, dependencies: [V], encapsulation: 2, changeDetection: 0 });
} return r; })(), Ge = (() => { class r {
_intl = o(F);
calendar = o(oe);
_dateAdapter = o(u, { optional: !0 });
_dateFormats = o(w, { optional: !0 });
_periodButtonText;
_periodButtonDescription;
_periodButtonLabel;
_prevButtonLabel;
_nextButtonLabel;
constructor() { o(G).load(me); let e = o(g); this._updateLabels(), this.calendar.stateChanges.subscribe(() => { this._updateLabels(), e.markForCheck(); }); }
get periodButtonText() { return this._periodButtonText; }
get periodButtonDescription() { return this._periodButtonDescription; }
get periodButtonLabel() { return this._periodButtonLabel; }
get prevButtonLabel() { return this._prevButtonLabel; }
get nextButtonLabel() { return this._nextButtonLabel; }
currentPeriodClicked() { this.calendar.currentView = this.calendar.currentView == "month" ? "multi-year" : "month"; }
previousClicked() { this.previousEnabled() && (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 : -m)); }
nextClicked() { this.nextEnabled() && (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 : m)); }
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); }
_updateLabels() { let e = this.calendar, a = this._intl, t = this._dateAdapter; e.currentView === "month" ? (this._periodButtonText = t.format(e.activeDate, this._dateFormats.display.monthYearLabel).toLocaleUpperCase(), this._periodButtonDescription = t.format(e.activeDate, this._dateFormats.display.monthYearLabel).toLocaleUpperCase(), this._periodButtonLabel = a.switchToMultiYearViewLabel, this._prevButtonLabel = a.prevMonthLabel, this._nextButtonLabel = a.nextMonthLabel) : e.currentView === "year" ? (this._periodButtonText = t.getYearName(e.activeDate), this._periodButtonDescription = t.getYearName(e.activeDate), this._periodButtonLabel = a.switchToMonthViewLabel, this._prevButtonLabel = a.prevYearLabel, this._nextButtonLabel = a.nextYearLabel) : (this._periodButtonText = a.formatYearRange(...this._formatMinAndMaxYearLabels()), this._periodButtonDescription = a.formatYearRangeLabel(...this._formatMinAndMaxYearLabels()), this._periodButtonLabel = a.switchToMonthViewLabel, this._prevButtonLabel = a.prevMultiYearLabel, this._nextButtonLabel = a.nextMultiYearLabel); }
_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) : qe(this._dateAdapter, e, a, this.calendar.minDate, this.calendar.maxDate); }
_formatMinAndMaxYearLabels() { let a = this._dateAdapter.getYear(this.calendar.activeDate) - T(this._dateAdapter, this.calendar.activeDate, this.calendar.minDate, this.calendar.maxDate), t = a + m - 1, n = this._dateAdapter.getYearName(this._dateAdapter.createDate(a, 0, 1)), s = this._dateAdapter.getYearName(this._dateAdapter.createDate(t, 0, 1)); return [n, s]; }
_periodButtonLabelId = o(W).getId("mat-calendar-period-label-");
static \u0275fac = function (a) { return new (a || r); };
static \u0275cmp = i.\u0275\u0275defineComponent({ type: r, selectors: [["mat-calendar-header"]], exportAs: ["matCalendarHeader"], ngContentSelectors: je, decls: 17, vars: 13, consts: [[1, "mat-calendar-header"], [1, "mat-calendar-controls"], ["aria-live", "polite", 1, "cdk-visually-hidden", 3, "id"], ["matButton", "", "type", "button", 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"], ["matIconButton", "", "type", "button", "disabledInteractive", "", 1, "mat-calendar-previous-button", 3, "click", "disabled", "matTooltip"], ["viewBox", "0 0 24 24", "focusable", "false", "aria-hidden", "true"], ["d", "M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"], ["matIconButton", "", "type", "button", "disabledInteractive", "", 1, "mat-calendar-next-button", 3, "click", "disabled", "matTooltip"], ["d", "M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"]], template: function (a, t) { a & 1 && (i.\u0275\u0275projectionDef(), i.\u0275\u0275elementStart(0, "div", 0)(1, "div", 1)(2, "span", 2), i.\u0275\u0275text(3), i.\u0275\u0275elementEnd(), i.\u0275\u0275elementStart(4, "button", 3), i.\u0275\u0275listener("click", function () { return t.currentPeriodClicked(); }), i.\u0275\u0275elementStart(5, "span", 4), i.\u0275\u0275text(6), i.\u0275\u0275elementEnd(), i.\u0275\u0275namespaceSVG(), i.\u0275\u0275elementStart(7, "svg", 5), i.\u0275\u0275element(8, "polygon", 6), i.\u0275\u0275elementEnd()(), i.\u0275\u0275namespaceHTML(), i.\u0275\u0275element(9, "div", 7), i.\u0275\u0275projection(10), i.\u0275\u0275elementStart(11, "button", 8), i.\u0275\u0275listener("click", function () { return t.previousClicked(); }), i.\u0275\u0275namespaceSVG(), i.\u0275\u0275elementStart(12, "svg", 9), i.\u0275\u0275element(13, "path", 10), i.\u0275\u0275elementEnd()(), i.\u0275\u0275namespaceHTML(), i.\u0275\u0275elementStart(14, "button", 11), i.\u0275\u0275listener("click", function () { return t.nextClicked(); }), i.\u0275\u0275namespaceSVG(), i.\u0275\u0275elementStart(15, "svg", 9), i.\u0275\u0275element(16, "path", 12), i.\u0275\u0275elementEnd()()()()), a & 2 && (i.\u0275\u0275advance(2), i.\u0275\u0275property("id", t._periodButtonLabelId), i.\u0275\u0275advance(), i.\u0275\u0275textInterpolate(t.periodButtonDescription), i.\u0275\u0275advance(), i.\u0275\u0275attribute("aria-label", t.periodButtonLabel)("aria-describedby", t._periodButtonLabelId), i.\u0275\u0275advance(2), i.\u0275\u0275textInterpolate(t.periodButtonText), i.\u0275\u0275advance(), i.\u0275\u0275classProp("mat-calendar-invert", t.calendar.currentView !== "month"), i.\u0275\u0275advance(4), i.\u0275\u0275property("disabled", !t.previousEnabled())("matTooltip", t.prevButtonLabel), i.\u0275\u0275attribute("aria-label", t.prevButtonLabel), i.\u0275\u0275advance(3), i.\u0275\u0275property("disabled", !t.nextEnabled())("matTooltip", t.nextButtonLabel), i.\u0275\u0275attribute("aria-label", t.nextButtonLabel)); }, dependencies: [J, Z, we], encapsulation: 2, changeDetection: 0 });
} return r; })(), oe = (() => {
class r {
_dateAdapter = o(u, { optional: !0 });
_dateFormats = o(w, { optional: !0 });
_changeDetectorRef = o(g);
_elementRef = o(E);
headerComponent;
_calendarHeaderPortal;
_intlChanges;
_moveFocusOnNextTick = !1;
get startAt() { return this._startAt; }
set startAt(e) { this._startAt = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e)); }
_startAt;
startView = "month";
get selected() { return this._selected; }
set selected(e) { e instanceof h ? this._selected = e : this._selected = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e)); }
_selected;
get minDate() { return this._minDate; }
set minDate(e) { this._minDate = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e)); }
_minDate;
get maxDate() { return this._maxDate; }
set maxDate(e) { this._maxDate = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e)); }
_maxDate;
dateFilter;
dateClass;
comparisonStart;
comparisonEnd;
startDateAccessibleName;
endDateAccessibleName;
selectedChange = new c;
yearSelected = new c;
monthSelected = new c;
viewChanged = new c(!0);
_userSelection = new c;
_userDragDrop = new c;
monthView;
yearView;
multiYearView;
get activeDate() { return this._clampedActiveDate; }
set activeDate(e) { this._clampedActiveDate = this._dateAdapter.clampDate(e, this.minDate, this.maxDate), this.stateChanges.next(), this._changeDetectorRef.markForCheck(); }
_clampedActiveDate;
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.stateChanges.next(), this.viewChanged.emit(a)); }
_currentView;
_activeDrag = null;
stateChanges = new f;
constructor() { this._intlChanges = o(F).changes.subscribe(() => { this._changeDetectorRef.markForCheck(), this.stateChanges.next(); }); }
ngAfterContentInit() { this._calendarHeaderPortal = new He(this.headerComponent || Ge), 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, n = a || t || e.dateFilter; if (n && !n.firstChange) {
let s = this._getCurrentViewComponent();
s && (this._elementRef.nativeElement.contains(Be()) && (this._moveFocusOnNextTick = !0), 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 h || 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; }
static \u0275fac = function (a) { return new (a || r); };
static \u0275cmp = i.\u0275\u0275defineComponent({ type: r, selectors: [["mat-calendar"]], viewQuery: function (a, t) { if (a & 1 && (i.\u0275\u0275viewQuery(Se, 5), i.\u0275\u0275viewQuery(Ee, 5), i.\u0275\u0275viewQuery(Ve, 5)), a & 2) {
let n;
i.\u0275\u0275queryRefresh(n = i.\u0275\u0275loadQuery()) && (t.monthView = n.first), i.\u0275\u0275queryRefresh(n = i.\u0275\u0275loadQuery()) && (t.yearView = n.first), i.\u0275\u0275queryRefresh(n = i.\u0275\u0275loadQuery()) && (t.multiYearView = n.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"], features: [i.\u0275\u0275ProvidersFeature([We]), i.\u0275\u0275NgOnChangesFeature], 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"], [3, "activeDate", "selected", "dateFilter", "maxDate", "minDate", "dateClass"], [3, "activeDateChange", "_userSelection", "dragStarted", "dragEnded", "activeDate", "selected", "dateFilter", "maxDate", "minDate", "dateClass", "comparisonStart", "comparisonEnd", "startDateAccessibleName", "endDateAccessibleName", "activeDrag"], [3, "activeDateChange", "monthSelected", "selectedChange", "activeDate", "selected", "dateFilter", "maxDate", "minDate", "dateClass"], [3, "activeDateChange", "yearSelected", "selectedChange", "activeDate", "selected", "dateFilter", "maxDate", "minDate", "dateClass"]], template: function (a, t) { if (a & 1 && (i.\u0275\u0275template(0, Rt, 0, 0, "ng-template", 0), i.\u0275\u0275elementStart(1, "div", 1), i.\u0275\u0275conditionalCreate(2, Tt, 1, 11, "mat-month-view", 2)(3, Ot, 1, 6, "mat-year-view", 3)(4, Yt, 1, 6, "mat-multi-year-view", 3), i.\u0275\u0275elementEnd()), a & 2) {
let n;
i.\u0275\u0275property("cdkPortalOutlet", t._calendarHeaderPortal), i.\u0275\u0275advance(2), i.\u0275\u0275conditional((n = t.currentView) === "month" ? 2 : n === "year" ? 3 : n === "multi-year" ? 4 : -1);
} }, dependencies: [ze, Pe, Se, Ee, Ve], styles: [`.mat-calendar{display:block;line-height:normal;font-family:var(--mat-datepicker-calendar-text-font, var(--mat-sys-body-medium-font));font-size:var(--mat-datepicker-calendar-text-size, var(--mat-sys-body-medium-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, var(--mat-sys-title-small-size));font-weight:var(--mat-datepicker-calendar-period-button-text-weight, var(--mat-sys-title-small-weight));--mat-button-text-label-text-color: var(--mat-datepicker-calendar-period-button-text-color, var(--mat-sys-on-surface-variant))}.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, var(--mat-sys-on-surface-variant))}.mat-calendar-arrow.mat-calendar-invert{transform:rotate(180deg)}[dir=rtl] .mat-calendar-arrow{margin:0 5px 0 0}@media(forced-colors: active){.mat-calendar-arrow{fill:CanvasText}}.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, var(--mat-sys-on-surface-variant))}[dir=rtl] .mat-calendar-previous-button,[dir=rtl] .mat-calendar-next-button{transform:rotate(180deg)}.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, var(--mat-sys-on-surface-variant));font-size:var(--mat-datepicker-calendar-header-text-size, var(--mat-sys-title-small-size));font-weight:var(--mat-datepicker-calendar-header-text-weight, var(--mat-sys-title-small-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, transparent)}.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:""}
`], encapsulation: 2, changeDetection: 0 });
}
return r;
})(), $e = new Te("mat-datepicker-scroll-strategy", { providedIn: "root", factory: () => { let r = o(P); return () => Le(r); } });
function ia(r) { let d = o(P); return () => Le(d); }
var na = { provide: $e, deps: [], useFactory: ia }, Ue = (() => {
class r {
_elementRef = o(E);
_animationsDisabled = U();
_changeDetectorRef = o(g);
_globalModel = o(D);
_dateAdapter = o(u);
_ngZone = o(Ie);
_rangeSelectionStrategy = o(j, { optional: !0 });
_stateChanges;
_model;
_eventCleanups;
_animationFallback;
_calendar;
color;
datepicker;
comparisonStart;
comparisonEnd;
startDateAccessibleName;
endDateAccessibleName;
_isAbove;
_animationDone = new f;
_isAnimating = !1;
_closeButtonText;
_closeButtonFocused;
_actionsPortal = null;
_dialogLabelId;
constructor() { if (o(G).load(me), this._closeButtonText = o(F).closeCalendarLabel, !this._animationsDisabled) {
let e = this._elementRef.nativeElement, a = o(Fe);
this._eventCleanups = this._ngZone.runOutsideAngular(() => [a.listen(e, "animationstart", this._handleAnimationEvent), a.listen(e, "animationend", this._handleAnimationEvent), a.listen(e, "animationcancel", this._handleAnimationEvent)]);
} }
ngAfterViewInit() { this._stateChanges = this.datepicker.stateChanges.subscribe(() => { this._changeDetectorRef.markForCheck(); }), this._calendar.focusActiveCell(); }
ngOnDestroy() { clearTimeout(this._animationFallback), this._eventCleanups?.forEach(e => e()), this._stateChanges?.unsubscribe(), this._animationDone.complete(); }
_handleUserSelection(e) { let a = this._model.selection, t = e.value, n = a instanceof h; if (n && this._rangeSelectionStrategy) {
let s = this._rangeSelectionStrategy.selectionFinished(t, a, e.event);
this._model.updateSelection(s, this);
}
else
t && (n || !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._elementRef.nativeElement.classList.add("mat-datepicker-content-exit"), this._animationsDisabled ? this._animationDone.next() : (clearTimeout(this._animationFallback), this._animationFallback = setTimeout(() => { this._isAnimating || this._animationDone.next(); }, 200)); }
_handleAnimationEvent = e => { let a = this._elementRef.nativeElement; e.target !== a || !e.animationName.startsWith("_mat-datepicker-content") || (clearTimeout(this._animationFallback), this._isAnimating = e.type === "animationstart", a.classList.toggle("mat-datepicker-content-animating", this._isAnimating), 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(); }
static \u0275fac = function (a) { return new (a || r); };
static \u0275cmp = i.\u0275\u0275defineComponent({ type: r, selectors: [["mat-datepicker-content"]], viewQuery: function (a, t) { if (a & 1 && i.\u0275\u0275viewQuery(oe, 5), a & 2) {
let n;
i.\u0275\u0275queryRefresh(n = i.\u0275\u0275loadQuery()) && (t._calendar = n.first);
} }, hostAttrs: [1, "mat-datepicker-content"], hostVars: 6, hostBindings: function (a, t) { a & 2 && (i.\u0275\u0275classMap(t.color ? "mat-" + t.color : ""), i.\u0275\u0275classProp("mat-datepicker-content-touch", t.datepicker.touchUi)("mat-datepicker-content-animations-enabled", !t._animationsDisabled)); }, inputs: { color: "color" }, exportAs: ["matDatepickerContent"], decls: 5, vars: 26, consts: [["cdkTrapFocus", "", "role", "dialog", 1, "mat-datepicker-content-container"], [3, "yearSelected", "monthSelected", "viewChanged", "_userSelection", "_userDragDrop", "id", "startAt", "startView", "minDate", "maxDate", "dateFilter", "headerComponent", "selected", "dateClass", "comparisonStart", "comparisonEnd", "startDateAccessibleName", "endDateAccessibleName"], [3, "cdkPortalOutlet"], ["type", "button", "matButton", "elevated", 1, "mat-datepicker-close-button", 3, "focus", "blur", "click", "color"]], template: function (a, t) { a & 1 && (i.\u0275\u0275elementStart(0, "div", 0)(1, "mat-calendar", 1), i.\u0275\u0275listener("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); }), i.\u0275\u0275elementEnd(), i.\u0275\u0275template(2, Pt, 0, 0, "ng-template", 2), i.\u0275\u0275elementStart(3, "button", 3), i.\u0275\u0275listener("focus", function () { return t._closeButtonFocused = !0; })("blur", function () { return t._closeButtonFocused = !1; })("click", function () { return t.datepicker.close(); }), i.\u0275\u0275text(4), i.\u0275\u0275elementEnd()()), a & 2 && (i.\u0275\u0275classProp("mat-datepicker-content-container-with-custom-header", t.datepicker.calendarHeaderComponent)("mat-datepicker-content-container-with-actions", t._actionsPortal), i.\u0275\u0275attribute("aria-modal", !0)("aria-labelledby", t._dialogLabelId ?? void 0), i.\u0275\u0275advance(), i.\u0275\u0275classMap(t.datepicker.panelClass), i.\u0275\u0275property("id", t.datepicker.id)("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)("startDateAccessibleName", t.startDateAccessibleName)("endDateAccessibleName", t.endDateAccessibleName), i.\u0275\u0275advance(), i.\u0275\u0275property("cdkPortalOutlet", t._actionsPortal), i.\u0275\u0275advance(), i.\u0275\u0275classProp("cdk-visually-hidden", !t._closeButtonFocused), i.\u0275\u0275property("color", t.color || "primary"), i.\u0275\u0275advance(), i.\u0275\u0275textInterpolate(t._closeButtonText)); }, dependencies: [nt, oe, ze, J], styles: [`@keyframes _mat-datepicker-content-dropdown-enter{from{opacity:0;transform:scaleY(0.8)}to{opacity:1;transform:none}}@keyframes _mat-datepicker-content-dialog-enter{from{opacity:0;transform:scale(0.8)}to{opacity:1;transform:none}}@keyframes _mat-datepicker-content-exit{from{opacity:1}to{opacity:0}}.mat-datepicker-content{display:block;background-color:var(--mat-datepicker-calendar-container-background-color, var(--mat-sys-surface-container-high));color:var(--mat-datepicker-calendar-container-text-color, var(--mat-sys-on-surface));box-shadow:var(--mat-datepicker-calendar-container-elevation-shadow, 0px 0px 0px 0px rgba(0, 0, 0, 0.2), 0px 0px 0px 0px rgba(0, 0, 0, 0.14), 0px 0px 0px 0px rgba(0, 0, 0, 0.12));border-radius:var(--mat-datepicker-calendar-container-shape, var(--mat-sys-corner-large))}.mat-datepicker-content.mat-datepicker-content-animations-enabled{animation:_mat-datepicker-content-dropdown-enter 120ms cubic-bezier(0, 0, 0.2, 1)}.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}.mat-datepicker-content-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{display:block;max-height:80vh;box-shadow:var(--mat-datepicker-calendar-container-touch-elevation-shadow, 0px 0px 0px 0px rgba(0, 0, 0, 0.2), 0px 0px 0px 0px rgba(0, 0, 0, 0.14), 0px 0px 0px 0px rgba(0, 0, 0, 0.12));border-radius:var(--mat-datepicker-calendar-container-touch-shape, var(--mat-sys-corner-extra-large));position:relative;overflow:visible}.mat-datepicker-content-touch.mat-datepicker-content-animations-enabled{animation:_mat-datepicker-content-dialog-enter 150ms cubic-bezier(0, 0, 0.2, 1)}.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}.mat-datepicker-content-exit.mat-datepicker-content-animations-enabled{animation:_mat-datepicker-content-exit 100ms linear}@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, changeDetection: 0 });
}
return r;
})(), v = (() => { class r {
_injector = o(P);
_viewContainerRef = o(Oe);
_dateAdapter = o(u, { optional: !0 });
_dir = o(N, { optional: !0 });
_model = o(D);
_animationsDisabled = U();
_scrollStrategy = o($e);
_inputStateChanges = _.EMPTY;
_document = o(tt);
calendarHeaderComponent;
get startAt() { return this._startAt || (this.datepickerInput ? this.datepickerInput.getStartValue() : null); }
set startAt(e) { this._startAt = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e)); }
_startAt;
startView = "month";
get color() { return this._color || (this.datepickerInput ? this.datepickerInput.getThemePalette() : void 0); }
set color(e) { this._color = e; }
_color;
touchUi = !1;
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)); }
_disabled;
xPosition = "start";
yPosition = "below";
restoreFocus = !0;
yearSelected = new c;
monthSelected = new c;
viewChanged = new c(!0);
dateClass;
openedStream = new c;
closedStream = new c;
get panelClass() { return this._panelClass; }
set panelClass(e) { this._panelClass = st(e); }
_panelClass;
get opened() { return this._opened; }
set opened(e) { e ? this.open() : this.close(); }
_opened = !1;
id = o(W).getId("mat-datepicker-");
_getMinDate() { return this.datepickerInput && this.datepickerInput.min; }
_getMaxDate() { return this.datepickerInput && this.datepickerInput.max; }
_getDateFilter() { return this.datepickerInput && this.datepickerInput.dateFilter; }
_overlayRef;
_componentRef;
_focusedElementBeforeOpen = null;
_backdropHarnessClass = `${this.id}-backdrop`;
_actionsPortal;
datepickerInput;
stateChanges = new f;
_changeDetectorRef = o(g);
constructor() { this._dateAdapter, this._model.selectionChanged.subscribe(() => { this._changeDetectorRef.markForCheck(); }); }
ngOnChanges(e) { let a = e.xPosition || e.yPosition; if (a && !a.firstChange && this._overlayRef) {
let t = this._overlayRef.getConfig().positionStrategy;
t instanceof dt && (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 = Be(), 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: n } = this._componentRef;
t._animationDone.pipe(bt(1)).subscribe(() => { let s = this._document.activeElement; e && (!s || s === this._document.activeElement || n.nativeElement.contains(s)) && this._focusedElementBeforeOpen.focus(), this._focusedElementBeforeOpen = null, this._destroyOverlay(); }), t._startExitAnimation();
} 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 He(Ue, this._viewContainerRef), t = this._overlayRef = lt(this._injector, new ct({ positionStrategy: e ? this._getDialogStrategy() : this._getDropdownStrategy(), hasBackdrop: !0, backdropClass: [e ? "cdk-overlay-dark-backdrop" : "mat-overlay-transparent-backdrop", this._backdropHarnessClass], direction: this._dir || "ltr", scrollStrategy: e ? pt(this._injector) : this._scrollStrategy(), panelClass: `mat-datepicker-${e ? "dialog" : "popup"}`, disableAnimations: this._animationsDisabled })); this._getCloseStream(t).subscribe(n => { n && n.preventDefault(), this.close(); }), t.keydownEvents().subscribe(n => { let s = n.keyCode; (s === O || s === L || s === I || s === x || s === Q || s === q) && n.preventDefault(); }), this._componentRef = t.attach(a), this._forwardContentValues(this._componentRef.instance), e || Re(() => { t.updatePosition(); }, { injector: this._injector }); }
_destroyOverlay() { this._overlayRef && (this._overlayRef.dispose(), this._overlayRef = this._componentRef = null); }
_getDialogStrategy() { return ht(this._injector).centerHorizontally().centerVertically(); }
_getDropdownStrategy() { let e = ut(this._injector, 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", n = this.yPosition === "above" ? "bottom" : "top", s = n === "top" ? "bottom" : "top"; return e.withPositions([{ originX: a, originY: s, overlayX: a, overlayY: n }, { originX: a, originY: n, overlayX: a, overlayY: s }, { originX: t, originY: s, overlayX: t, overlayY: n }, { originX: t, originY: n, overlayX: t, overlayY: s }]); }
_getCloseStream(e) { let a = ["ctrlKey", "shiftKey", "metaKey"]; return R(e.backdropClick(), e.detachments(), e.keydownEvents().pipe(Dt(t => t.keyCode === Ne && !k(t) || this.datepickerInput && k(t, "altKey") && t.keyCode === O && a.every(n => !k(t, n))))); }
static \u0275fac = function (a) { return new (a || r); };
static \u0275dir = i.\u0275\u0275defineDirective({ type: r, inputs: { calendarHeaderComponent: "calendarHeaderComponent", startAt: "startAt", startView: "startView", color: "color", touchUi: [2, "touchUi", "touchUi", b], disabled: [2, "disabled", "disabled", b], xPosition: "xPosition", yPosition: "yPosition", restoreFocus: [2, "restoreFocus", "restoreFocus", b], dateClass: "dateClass", panelClass: "panelClass", opened: [2, "opened", "opened", b] }, outputs: { yearSelected: "yearSelected", monthSelected: "monthSelected", viewChanged: "viewChanged", openedStream: "opened", closedStream: "closed" }, features: [i.\u0275\u0275NgOnChangesFeature] });
} return r; })(), Ua = (() => { class r extends v {
static \u0275fac = (() => { let e; return function (t) { return (e || (e = i.\u0275\u0275getInheritedFactory(r)))(t || r); }; })();
static \u0275cmp = i.\u0275\u0275defineComponent({ type: r, selectors: [["mat-datepicker"]], exportAs: ["matDatepicker"], features: [i.\u0275\u0275ProvidersFeature([We, { provide: v, useExisting: r }]), i.\u0275\u0275InheritDefinitionFeature], decls: 0, vars: 0, template: function (a, t) { }, encapsulation: 2, changeDetection: 0 });
} return r; })(), A = class {
target;
targetElement;
value;
constructor(d, e) { this.target = d, this.targetElement = e, this.value = this.target.value; }
}, Xe = (() => { class r {
_elementRef = o(E);
_dateAdapter = o(u, { optional: !0 });
_dateFormats = o(w, { optional: !0 });
_isInitialized;
get value() { return this._model ? this._getValueFromModel(this._model.selection) : this._pendingValue; }
set value(e) { this._assignValueProgrammatically(e); }
_model;
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(); }
_disabled;
dateChange = new c;
dateInput = new c;
stateChanges = new f;
_onTouched = () => { };
_validatorOnChange = () => { };
_cvaOnChange = () => { };
_valueChangesSubscription = _.EMPTY;
_localeSubscription = _.EMPTY;
_pendingValue;
_parseValidator = () => this._lastValueValid ? null : { matDatepickerParse: { text: this._elementRef.nativeElement.value } };
_filterValidator = e => { let a = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e.value)); return !a || this._matchesFilter(a) ? null : { matDatepickerFilter: !0 }; };
_minValidator = e => { let a = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e.value)), t = this._getMinDate(); return !t || !a || this._dateAdapter.compareDate(t, a) <= 0 ? null : { matDatepickerMin: { min: t, actual: a } }; };
_maxValidator = e => { let a = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e.value)), t = this._getMaxDate(); return !t || !a || this._dateAdapter.compareDate(t, a) >= 0 ? null : { matDatepickerMax: { max: t, actual: a } }; };
_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 A(this, this._elementRef.nativeElement)), this.dateChange.emit(new A(this, this._elementRef.nativeElement));
} }); }
_lastValueValid = !1;
constructor() { this._localeSubscription = this._dateAdapter.localeChanges.subscribe(() => { this._assignValueProgrammatically(this.value); }); }
ngAfterViewInit() { this._isInitialized = !0; }
ngOnChanges(e) { Ze(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"]; k(e, "altKey") && e.keyCode === L && a.every(n => !k(e, n)) && !this._elementRef.nativeElement.readOnly && (this._openPopup(), e.preventDefault()); }
_onInput(e) { let a = e.target.value, t = this._lastValueValid, n = this._dateAdapter.parse(a, this._dateFormats.parse.dateInput); this._lastValueValid = this._isValidValue(n), n = this._dateAdapter.getValidDateOrNull(n); let s = !this._dateAdapter.sameDate(n, this.value); !n || s ? this._cvaOnChange(n) : (a && !this.value && this._cvaOnChange(n), t !== this._lastValueValid && this._validatorOnChange()), s && (this._assignValue(n), this.dateInput.emit(new A(this, this._elementRef.nativeElement))); }
_onChange() { this.dateChange.emit(new A(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); }
static \u0275fac = function (a) { return new (a || r); };
static \u0275dir = i.\u0275\u0275defineDirective({ type: r, inputs: { value: "value", disabled: [2, "disabled", "disabled", b] }, outputs: { dateChange: "dateChange", dateInput: "dateInput" }, features: [i.\u0275\u0275NgOnChangesFeature] });
} return r; })();
function Ze(r, d) { let e = Object.keys(r); for (let a of e) {
let { previousValue: t, currentValue: n } = r[a];
if (d.isDateInstance(t) && d.isDateInstance(n)) {
if (!d.sameDate(t, n))
return !0;
}
else
return !0;
} return !1; }
var ra = { provide: _e, useExisting: Ye(() => Je), multi: !0 }, sa = { provide: ge, useExisting: Ye(() => Je), multi: !0 }, Je = (() => { class r extends Xe {
_formField = o(X, { optional: !0 });
_closedSubscription = _.EMPTY;
_openedSubscription = _.EMPTY;
set matDatepicker(e) { e && (this._datepicker = e, this._ariaOwns.set(e.opened ? e.id : null), this._closedSubscription = e.closedStream.subscribe(() => { this._onTouched(), this._ariaOwns.set(null); }), this._openedSubscription = e.openedStream.subscribe(() => { this._ariaOwns.set(e.id); }), this._registerModel(e.registerInput(this))); }
_datepicker;
_ariaOwns = p(null);
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()); }
_min;
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()); }
_max;
get dateFilter() { return this._dateFilter; }
set dateFilter(e) { let a = this._matchesFilter(this.value); this._dateFilter = e, this._matchesFilter(this.value) !== a && this._validatorOnChange(); }
_dateFilter;
_validator;
constructor() { super(), this._validator = $.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(), this._openedSubscription.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; }
static \u0275fac = function (a) { return new (a || r); };
static \u0275dir = i.\u0275\u0275defineDirective({ type: r, selectors: [["input", "matDatepicker", ""]], hostAttrs: [1, "mat-datepicker-input"], hostVars: 6, hostBindings: function (a, t) { a & 1 && i.\u0275\u0275listener("input", function (s) { return t._onInput(s); })("change", function () { return t._onChange(); })("blur", function () { return t._onBlur(); })("keydown", function (s) { return t._onKeydown(s); }), a & 2 && (i.\u0275\u0275domProperty("disabled", t.disabled), i.\u0275\u0275attribute("aria-haspopup", t._datepicker ? "dialog" : null)("aria-owns", t._ariaOwns())("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: [0, "matDatepickerFilter", "dateFilter"] }, exportAs: ["matDatepickerInput"], features: [i.\u0275\u0275ProvidersFeature([ra, sa, { provide: Ae, useExisting: r }]), i.\u0275\u0275InheritDefinitionFeature] });
} return r; })(), oa = (() => { class r {
static \u0275fac = function (a) { return new (a || r); };
static \u0275dir = i.\u0275\u0275defineDirective({ type: r, selectors: [["", "matDatepickerToggleIcon", ""]] });
} return r; })(), da = (() => {
class r {
_intl = o(F);
_changeDetectorRef = o(g);
_stateChanges = _.EMPTY;
datepicker;
tabIndex;
ariaLabel;
get disabled() { return this._disabled === void 0 && this.datepicker ? this.datepicker.disabled : !!this._disabled; }
set disabled(e) { this._disabled = e; }
_disabled;
disableRipple;
_customIcon;
_button;
constructor() { let e = o(new at("tabindex"), { optional: !0 }), a = Number(e); this.tabIndex = a || a === 0 ? a : 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 : z(), a = this.datepicker && this.datepicker.datepickerInput ? this.datepicker.datepickerInput.stateChanges : z(), t = this.datepicker ? R(this.datepicker.openedStream, this.datepicker.closedStream) : z(); this._stateChanges.unsubscribe(), this._stateChanges = R(this._intl.changes, e, a, t).subscribe(() => this._changeDetectorRef.markForCheck()); }
static \u0275fac = function (a) { return new (a || r); };
static \u0275cmp = i.\u0275\u0275defineComponent({ type: r, selectors: [["mat-datepicker-toggle"]], contentQueries: function (a, t, n) { if (a & 1 && i.\u0275\u0275contentQuery(n, oa, 5), a & 2) {
let s;
i.\u0275\u0275queryRefresh(s = i.\u0275\u0275loadQuery()) && (t._customIcon = s.first);
} }, viewQuery: function (a, t) { if (a & 1 && i.\u0275\u0275viewQuery(Nt, 5), a & 2) {
let n;
i.\u0275\u0275queryRefresh(n = i.\u0275\u0275loadQuery()) && (t._button = n.first);
} }, hostAttrs: [1, "mat-datepicker-toggle"], hostVars: 8, hostBindings: function (a, t) { a & 1 && i.\u0275\u0275listener("click", function (s) { return t._open(s); }), a & 2 && (i.\u0275\u0275attribute("tabindex", null)("data-mat-calendar", t.datepicker ? t.datepicker.id : null), i.\u0275\u0275classProp("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: [0, "for", "datepicker"], tabIndex: "tabIndex", ariaLabel: [0, "aria-label", "ariaLabel"], disabled: [2, "disabled", "disabled", b], disableRipple: "disableRipple" }, exportAs: ["matDatepickerToggle"], features: [i.\u0275\u0275NgOnChangesFeature], ngContentSelectors: Bt, decls: 4, vars: 7, consts: [["button", ""], ["matIconButton", "", "type", "button", 3, "tabIndex", "disabled", "disableRipple"], ["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 && (i.\u0275\u0275projectionDef(Lt), i.\u0275\u0275elementStart(0, "button", 1, 0), i.\u0275\u0275conditionalCreate(2, Ht, 2, 0, ":svg:svg", 2), i.\u0275\u0275projection(3), i.\u0275\u0275elementEnd()), a & 2 && (i.\u0275\u0275property("tabIndex", t.disabled ? -1 : t.tabIndex)("disabled", t.disabled)("disableRipple", t.disableRipple), i.\u0275\u0275attribute("aria-haspopup", t.datepicker ? "dialog" : null)("aria-label", t.ariaLabel || t._intl.openCalendarLabel)("aria-expanded", t.datepicker ? t.datepicker.opened : null), i.\u0275\u0275advance(2), i.\u0275\u0275conditional(t._customIcon ? -1 : 2)); }, dependencies: [Z], styles: [`.mat-datepicker-toggle{pointer-events:auto;color:var(--mat-datepicker-toggle-icon-color, var(--mat-sys-on-surface-variant))}.mat-datepicker-toggle button{color:inherit}.mat-datepicker-toggle-active{color:var(--mat-datepicker-toggle-active-state-icon-color, var(--mat-sys-primary))}@media(forced-colors: active){.mat-datepicker-toggle-default-icon{color:CanvasText}}
`], encapsulation: 2, changeDetection: 0 });
}
return r;
})(), la = (() => {
class r {
_changeDetectorRef = o(g);
_elementRef = o(E);
_dateAdapter = o(u, { optional: !0 });
_formField = o(X, { optional: !0 });
_closedSubscription = _.EMPTY;
_openedSubscription = _.EMPTY;
_startInput;
_endInput;
get value() { return this._model ? this._model.selection : null; }
id = o(W).getId("mat-date-range-input-");
focused = !1;
get shouldLabelFloat() { return this.focused || !this.empty; }
controlType = "mat-date-range-input";
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._openedSubscription.unsubscribe(), this._ariaOwns.set(this.rangePicker.opened ? e.id : null), this._closedSubscription = e.closedStream.subscribe(() => { this._startInput?._onTouched(), this._endInput?._onTouched(), this._ariaOwns.set(null); }), this._openedSubscription = e.openedStream.subscribe(() => { this._ariaOwns.set(e.id); }), this._registerModel(this._model)); }
_rangePicker;
_ariaOwns = p(null);
get required() { return this._required ?? (this._isTargetRequired(this) || this._isTargetRequired(this._startInput) || this._isTargetRequired(this._endInput)) ?? !1; }
set required(e) { this._required = e; }
_required;
get dateFilter() { return this._dateFilter; }
set dateFilter(e) { let a = this._startInput, t = this._endInput, n = a && a._matchesFilter(a.value), s = t && t._matchesFilter(a.value); this._dateFilter = e, a && a._matchesFilter(a.value) !== n && a._validatorOnChange(), t && t._matchesFilter(t.value) !== s && t._validatorOnChange(); }
_dateFilter;
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()); }
_min;
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()); }
_max;