[6a3a178] | 1 | /**
|
---|
| 2 | * @license
|
---|
| 3 | * Copyright Google LLC All Rights Reserved.
|
---|
| 4 | *
|
---|
| 5 | * Use of this source code is governed by an MIT-style license that can be
|
---|
| 6 | * found in the LICENSE file at https://angular.io/license
|
---|
| 7 | */
|
---|
| 8 | import { DOWN_ARROW, END, ENTER, HOME, LEFT_ARROW, PAGE_DOWN, PAGE_UP, RIGHT_ARROW, UP_ARROW, SPACE, ESCAPE, hasModifierKey, } from '@angular/cdk/keycodes';
|
---|
| 9 | import { ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, Inject, Input, Optional, Output, ViewEncapsulation, ViewChild, } from '@angular/core';
|
---|
| 10 | import { DateAdapter, MAT_DATE_FORMATS } from '@angular/material/core';
|
---|
| 11 | import { Directionality } from '@angular/cdk/bidi';
|
---|
| 12 | import { MatCalendarBody, MatCalendarCell, } from './calendar-body';
|
---|
| 13 | import { createMissingDateImplError } from './datepicker-errors';
|
---|
| 14 | import { Subscription } from 'rxjs';
|
---|
| 15 | import { startWith } from 'rxjs/operators';
|
---|
| 16 | import { DateRange } from './date-selection-model';
|
---|
| 17 | import { MAT_DATE_RANGE_SELECTION_STRATEGY, } from './date-range-selection-strategy';
|
---|
| 18 | const DAYS_PER_WEEK = 7;
|
---|
| 19 | /**
|
---|
| 20 | * An internal component used to display a single month in the datepicker.
|
---|
| 21 | * @docs-private
|
---|
| 22 | */
|
---|
| 23 | export class MatMonthView {
|
---|
| 24 | constructor(_changeDetectorRef, _dateFormats, _dateAdapter, _dir, _rangeStrategy) {
|
---|
| 25 | this._changeDetectorRef = _changeDetectorRef;
|
---|
| 26 | this._dateFormats = _dateFormats;
|
---|
| 27 | this._dateAdapter = _dateAdapter;
|
---|
| 28 | this._dir = _dir;
|
---|
| 29 | this._rangeStrategy = _rangeStrategy;
|
---|
| 30 | this._rerenderSubscription = Subscription.EMPTY;
|
---|
| 31 | /** Emits when a new date is selected. */
|
---|
| 32 | this.selectedChange = new EventEmitter();
|
---|
| 33 | /** Emits when any date is selected. */
|
---|
| 34 | this._userSelection = new EventEmitter();
|
---|
| 35 | /** Emits when any date is activated. */
|
---|
| 36 | this.activeDateChange = new EventEmitter();
|
---|
| 37 | if (typeof ngDevMode === 'undefined' || ngDevMode) {
|
---|
| 38 | if (!this._dateAdapter) {
|
---|
| 39 | throw createMissingDateImplError('DateAdapter');
|
---|
| 40 | }
|
---|
| 41 | if (!this._dateFormats) {
|
---|
| 42 | throw createMissingDateImplError('MAT_DATE_FORMATS');
|
---|
| 43 | }
|
---|
| 44 | }
|
---|
| 45 | this._activeDate = this._dateAdapter.today();
|
---|
| 46 | }
|
---|
| 47 | /**
|
---|
| 48 | * The date to display in this month view (everything other than the month and year is ignored).
|
---|
| 49 | */
|
---|
| 50 | get activeDate() { return this._activeDate; }
|
---|
| 51 | set activeDate(value) {
|
---|
| 52 | const oldActiveDate = this._activeDate;
|
---|
| 53 | const validDate = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value)) || this._dateAdapter.today();
|
---|
| 54 | this._activeDate = this._dateAdapter.clampDate(validDate, this.minDate, this.maxDate);
|
---|
| 55 | if (!this._hasSameMonthAndYear(oldActiveDate, this._activeDate)) {
|
---|
| 56 | this._init();
|
---|
| 57 | }
|
---|
| 58 | }
|
---|
| 59 | /** The currently selected date. */
|
---|
| 60 | get selected() { return this._selected; }
|
---|
| 61 | set selected(value) {
|
---|
| 62 | if (value instanceof DateRange) {
|
---|
| 63 | this._selected = value;
|
---|
| 64 | }
|
---|
| 65 | else {
|
---|
| 66 | this._selected = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));
|
---|
| 67 | }
|
---|
| 68 | this._setRanges(this._selected);
|
---|
| 69 | }
|
---|
| 70 | /** The minimum selectable date. */
|
---|
| 71 | get minDate() { return this._minDate; }
|
---|
| 72 | set minDate(value) {
|
---|
| 73 | this._minDate = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));
|
---|
| 74 | }
|
---|
| 75 | /** The maximum selectable date. */
|
---|
| 76 | get maxDate() { return this._maxDate; }
|
---|
| 77 | set maxDate(value) {
|
---|
| 78 | this._maxDate = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));
|
---|
| 79 | }
|
---|
| 80 | ngAfterContentInit() {
|
---|
| 81 | this._rerenderSubscription = this._dateAdapter.localeChanges
|
---|
| 82 | .pipe(startWith(null))
|
---|
| 83 | .subscribe(() => this._init());
|
---|
| 84 | }
|
---|
| 85 | ngOnChanges(changes) {
|
---|
| 86 | const comparisonChange = changes['comparisonStart'] || changes['comparisonEnd'];
|
---|
| 87 | if (comparisonChange && !comparisonChange.firstChange) {
|
---|
| 88 | this._setRanges(this.selected);
|
---|
| 89 | }
|
---|
| 90 | }
|
---|
| 91 | ngOnDestroy() {
|
---|
| 92 | this._rerenderSubscription.unsubscribe();
|
---|
| 93 | }
|
---|
| 94 | /** Handles when a new date is selected. */
|
---|
| 95 | _dateSelected(event) {
|
---|
| 96 | const date = event.value;
|
---|
| 97 | const selectedYear = this._dateAdapter.getYear(this.activeDate);
|
---|
| 98 | const selectedMonth = this._dateAdapter.getMonth(this.activeDate);
|
---|
| 99 | const selectedDate = this._dateAdapter.createDate(selectedYear, selectedMonth, date);
|
---|
| 100 | let rangeStartDate;
|
---|
| 101 | let rangeEndDate;
|
---|
| 102 | if (this._selected instanceof DateRange) {
|
---|
| 103 | rangeStartDate = this._getDateInCurrentMonth(this._selected.start);
|
---|
| 104 | rangeEndDate = this._getDateInCurrentMonth(this._selected.end);
|
---|
| 105 | }
|
---|
| 106 | else {
|
---|
| 107 | rangeStartDate = rangeEndDate = this._getDateInCurrentMonth(this._selected);
|
---|
| 108 | }
|
---|
| 109 | if (rangeStartDate !== date || rangeEndDate !== date) {
|
---|
| 110 | this.selectedChange.emit(selectedDate);
|
---|
| 111 | }
|
---|
| 112 | this._userSelection.emit({ value: selectedDate, event: event.event });
|
---|
| 113 | this._previewStart = this._previewEnd = null;
|
---|
| 114 | this._changeDetectorRef.markForCheck();
|
---|
| 115 | }
|
---|
| 116 | /** Handles keydown events on the calendar body when calendar is in month view. */
|
---|
| 117 | _handleCalendarBodyKeydown(event) {
|
---|
| 118 | // TODO(mmalerba): We currently allow keyboard navigation to disabled dates, but just prevent
|
---|
| 119 | // disabled ones from being selected. This may not be ideal, we should look into whether
|
---|
| 120 | // navigation should skip over disabled dates, and if so, how to implement that efficiently.
|
---|
| 121 | const oldActiveDate = this._activeDate;
|
---|
| 122 | const isRtl = this._isRtl();
|
---|
| 123 | switch (event.keyCode) {
|
---|
| 124 | case LEFT_ARROW:
|
---|
| 125 | this.activeDate = this._dateAdapter.addCalendarDays(this._activeDate, isRtl ? 1 : -1);
|
---|
| 126 | break;
|
---|
| 127 | case RIGHT_ARROW:
|
---|
| 128 | this.activeDate = this._dateAdapter.addCalendarDays(this._activeDate, isRtl ? -1 : 1);
|
---|
| 129 | break;
|
---|
| 130 | case UP_ARROW:
|
---|
| 131 | this.activeDate = this._dateAdapter.addCalendarDays(this._activeDate, -7);
|
---|
| 132 | break;
|
---|
| 133 | case DOWN_ARROW:
|
---|
| 134 | this.activeDate = this._dateAdapter.addCalendarDays(this._activeDate, 7);
|
---|
| 135 | break;
|
---|
| 136 | case HOME:
|
---|
| 137 | this.activeDate = this._dateAdapter.addCalendarDays(this._activeDate, 1 - this._dateAdapter.getDate(this._activeDate));
|
---|
| 138 | break;
|
---|
| 139 | case END:
|
---|
| 140 | this.activeDate = this._dateAdapter.addCalendarDays(this._activeDate, (this._dateAdapter.getNumDaysInMonth(this._activeDate) -
|
---|
| 141 | this._dateAdapter.getDate(this._activeDate)));
|
---|
| 142 | break;
|
---|
| 143 | case PAGE_UP:
|
---|
| 144 | this.activeDate = event.altKey ?
|
---|
| 145 | this._dateAdapter.addCalendarYears(this._activeDate, -1) :
|
---|
| 146 | this._dateAdapter.addCalendarMonths(this._activeDate, -1);
|
---|
| 147 | break;
|
---|
| 148 | case PAGE_DOWN:
|
---|
| 149 | this.activeDate = event.altKey ?
|
---|
| 150 | this._dateAdapter.addCalendarYears(this._activeDate, 1) :
|
---|
| 151 | this._dateAdapter.addCalendarMonths(this._activeDate, 1);
|
---|
| 152 | break;
|
---|
| 153 | case ENTER:
|
---|
| 154 | case SPACE:
|
---|
| 155 | this._selectionKeyPressed = true;
|
---|
| 156 | if (this._canSelect(this._activeDate)) {
|
---|
| 157 | // Prevent unexpected default actions such as form submission.
|
---|
| 158 | // Note that we only prevent the default action here while the selection happens in
|
---|
| 159 | // `keyup` below. We can't do the selection here, because it can cause the calendar to
|
---|
| 160 | // reopen if focus is restored immediately. We also can't call `preventDefault` on `keyup`
|
---|
| 161 | // because it's too late (see #23305).
|
---|
| 162 | event.preventDefault();
|
---|
| 163 | }
|
---|
| 164 | return;
|
---|
| 165 | case ESCAPE:
|
---|
| 166 | // Abort the current range selection if the user presses escape mid-selection.
|
---|
| 167 | if (this._previewEnd != null && !hasModifierKey(event)) {
|
---|
| 168 | this._previewStart = this._previewEnd = null;
|
---|
| 169 | this.selectedChange.emit(null);
|
---|
| 170 | this._userSelection.emit({ value: null, event });
|
---|
| 171 | event.preventDefault();
|
---|
| 172 | event.stopPropagation(); // Prevents the overlay from closing.
|
---|
| 173 | }
|
---|
| 174 | return;
|
---|
| 175 | default:
|
---|
| 176 | // Don't prevent default or focus active cell on keys that we don't explicitly handle.
|
---|
| 177 | return;
|
---|
| 178 | }
|
---|
| 179 | if (this._dateAdapter.compareDate(oldActiveDate, this.activeDate)) {
|
---|
| 180 | this.activeDateChange.emit(this.activeDate);
|
---|
| 181 | }
|
---|
| 182 | this._focusActiveCell();
|
---|
| 183 | // Prevent unexpected default actions such as form submission.
|
---|
| 184 | event.preventDefault();
|
---|
| 185 | }
|
---|
| 186 | /** Handles keyup events on the calendar body when calendar is in month view. */
|
---|
| 187 | _handleCalendarBodyKeyup(event) {
|
---|
| 188 | if (event.keyCode === SPACE || event.keyCode === ENTER) {
|
---|
| 189 | if (this._selectionKeyPressed && this._canSelect(this._activeDate)) {
|
---|
| 190 | this._dateSelected({ value: this._dateAdapter.getDate(this._activeDate), event });
|
---|
| 191 | }
|
---|
| 192 | this._selectionKeyPressed = false;
|
---|
| 193 | }
|
---|
| 194 | }
|
---|
| 195 | /** Initializes this month view. */
|
---|
| 196 | _init() {
|
---|
| 197 | this._setRanges(this.selected);
|
---|
| 198 | this._todayDate = this._getCellCompareValue(this._dateAdapter.today());
|
---|
| 199 | this._monthLabel = this._dateFormats.display.monthLabel
|
---|
| 200 | ? this._dateAdapter.format(this.activeDate, this._dateFormats.display.monthLabel)
|
---|
| 201 | : this._dateAdapter.getMonthNames('short')[this._dateAdapter.getMonth(this.activeDate)]
|
---|
| 202 | .toLocaleUpperCase();
|
---|
| 203 | let firstOfMonth = this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate), this._dateAdapter.getMonth(this.activeDate), 1);
|
---|
| 204 | this._firstWeekOffset =
|
---|
| 205 | (DAYS_PER_WEEK + this._dateAdapter.getDayOfWeek(firstOfMonth) -
|
---|
| 206 | this._dateAdapter.getFirstDayOfWeek()) % DAYS_PER_WEEK;
|
---|
| 207 | this._initWeekdays();
|
---|
| 208 | this._createWeekCells();
|
---|
| 209 | this._changeDetectorRef.markForCheck();
|
---|
| 210 | }
|
---|
| 211 | /** Focuses the active cell after the microtask queue is empty. */
|
---|
| 212 | _focusActiveCell(movePreview) {
|
---|
| 213 | this._matCalendarBody._focusActiveCell(movePreview);
|
---|
| 214 | }
|
---|
| 215 | /** Called when the user has activated a new cell and the preview needs to be updated. */
|
---|
| 216 | _previewChanged({ event, value: cell }) {
|
---|
| 217 | if (this._rangeStrategy) {
|
---|
| 218 | // We can assume that this will be a range, because preview
|
---|
| 219 | // events aren't fired for single date selections.
|
---|
| 220 | const value = cell ? cell.rawValue : null;
|
---|
| 221 | const previewRange = this._rangeStrategy.createPreview(value, this.selected, event);
|
---|
| 222 | this._previewStart = this._getCellCompareValue(previewRange.start);
|
---|
| 223 | this._previewEnd = this._getCellCompareValue(previewRange.end);
|
---|
| 224 | // Note that here we need to use `detectChanges`, rather than `markForCheck`, because
|
---|
| 225 | // the way `_focusActiveCell` is set up at the moment makes it fire at the wrong time
|
---|
| 226 | // when navigating one month back using the keyboard which will cause this handler
|
---|
| 227 | // to throw a "changed after checked" error when updating the preview state.
|
---|
| 228 | this._changeDetectorRef.detectChanges();
|
---|
| 229 | }
|
---|
| 230 | }
|
---|
| 231 | /** Initializes the weekdays. */
|
---|
| 232 | _initWeekdays() {
|
---|
| 233 | const firstDayOfWeek = this._dateAdapter.getFirstDayOfWeek();
|
---|
| 234 | const narrowWeekdays = this._dateAdapter.getDayOfWeekNames('narrow');
|
---|
| 235 | const longWeekdays = this._dateAdapter.getDayOfWeekNames('long');
|
---|
| 236 | // Rotate the labels for days of the week based on the configured first day of the week.
|
---|
| 237 | let weekdays = longWeekdays.map((long, i) => {
|
---|
| 238 | return { long, narrow: narrowWeekdays[i] };
|
---|
| 239 | });
|
---|
| 240 | this._weekdays = weekdays.slice(firstDayOfWeek).concat(weekdays.slice(0, firstDayOfWeek));
|
---|
| 241 | }
|
---|
| 242 | /** Creates MatCalendarCells for the dates in this month. */
|
---|
| 243 | _createWeekCells() {
|
---|
| 244 | const daysInMonth = this._dateAdapter.getNumDaysInMonth(this.activeDate);
|
---|
| 245 | const dateNames = this._dateAdapter.getDateNames();
|
---|
| 246 | this._weeks = [[]];
|
---|
| 247 | for (let i = 0, cell = this._firstWeekOffset; i < daysInMonth; i++, cell++) {
|
---|
| 248 | if (cell == DAYS_PER_WEEK) {
|
---|
| 249 | this._weeks.push([]);
|
---|
| 250 | cell = 0;
|
---|
| 251 | }
|
---|
| 252 | const date = this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate), this._dateAdapter.getMonth(this.activeDate), i + 1);
|
---|
| 253 | const enabled = this._shouldEnableDate(date);
|
---|
| 254 | const ariaLabel = this._dateAdapter.format(date, this._dateFormats.display.dateA11yLabel);
|
---|
| 255 | const cellClasses = this.dateClass ? this.dateClass(date, 'month') : undefined;
|
---|
| 256 | this._weeks[this._weeks.length - 1].push(new MatCalendarCell(i + 1, dateNames[i], ariaLabel, enabled, cellClasses, this._getCellCompareValue(date), date));
|
---|
| 257 | }
|
---|
| 258 | }
|
---|
| 259 | /** Date filter for the month */
|
---|
| 260 | _shouldEnableDate(date) {
|
---|
| 261 | return !!date &&
|
---|
| 262 | (!this.minDate || this._dateAdapter.compareDate(date, this.minDate) >= 0) &&
|
---|
| 263 | (!this.maxDate || this._dateAdapter.compareDate(date, this.maxDate) <= 0) &&
|
---|
| 264 | (!this.dateFilter || this.dateFilter(date));
|
---|
| 265 | }
|
---|
| 266 | /**
|
---|
| 267 | * Gets the date in this month that the given Date falls on.
|
---|
| 268 | * Returns null if the given Date is in another month.
|
---|
| 269 | */
|
---|
| 270 | _getDateInCurrentMonth(date) {
|
---|
| 271 | return date && this._hasSameMonthAndYear(date, this.activeDate) ?
|
---|
| 272 | this._dateAdapter.getDate(date) : null;
|
---|
| 273 | }
|
---|
| 274 | /** Checks whether the 2 dates are non-null and fall within the same month of the same year. */
|
---|
| 275 | _hasSameMonthAndYear(d1, d2) {
|
---|
| 276 | return !!(d1 && d2 && this._dateAdapter.getMonth(d1) == this._dateAdapter.getMonth(d2) &&
|
---|
| 277 | this._dateAdapter.getYear(d1) == this._dateAdapter.getYear(d2));
|
---|
| 278 | }
|
---|
| 279 | /** Gets the value that will be used to one cell to another. */
|
---|
| 280 | _getCellCompareValue(date) {
|
---|
| 281 | if (date) {
|
---|
| 282 | // We use the time since the Unix epoch to compare dates in this view, rather than the
|
---|
| 283 | // cell values, because we need to support ranges that span across multiple months/years.
|
---|
| 284 | const year = this._dateAdapter.getYear(date);
|
---|
| 285 | const month = this._dateAdapter.getMonth(date);
|
---|
| 286 | const day = this._dateAdapter.getDate(date);
|
---|
| 287 | return new Date(year, month, day).getTime();
|
---|
| 288 | }
|
---|
| 289 | return null;
|
---|
| 290 | }
|
---|
| 291 | /** Determines whether the user has the RTL layout direction. */
|
---|
| 292 | _isRtl() {
|
---|
| 293 | return this._dir && this._dir.value === 'rtl';
|
---|
| 294 | }
|
---|
| 295 | /** Sets the current range based on a model value. */
|
---|
| 296 | _setRanges(selectedValue) {
|
---|
| 297 | if (selectedValue instanceof DateRange) {
|
---|
| 298 | this._rangeStart = this._getCellCompareValue(selectedValue.start);
|
---|
| 299 | this._rangeEnd = this._getCellCompareValue(selectedValue.end);
|
---|
| 300 | this._isRange = true;
|
---|
| 301 | }
|
---|
| 302 | else {
|
---|
| 303 | this._rangeStart = this._rangeEnd = this._getCellCompareValue(selectedValue);
|
---|
| 304 | this._isRange = false;
|
---|
| 305 | }
|
---|
| 306 | this._comparisonRangeStart = this._getCellCompareValue(this.comparisonStart);
|
---|
| 307 | this._comparisonRangeEnd = this._getCellCompareValue(this.comparisonEnd);
|
---|
| 308 | }
|
---|
| 309 | /** Gets whether a date can be selected in the month view. */
|
---|
| 310 | _canSelect(date) {
|
---|
| 311 | return !this.dateFilter || this.dateFilter(date);
|
---|
| 312 | }
|
---|
| 313 | }
|
---|
| 314 | MatMonthView.decorators = [
|
---|
| 315 | { type: Component, args: [{
|
---|
| 316 | selector: 'mat-month-view',
|
---|
| 317 | template: "<table class=\"mat-calendar-table\" role=\"grid\">\n <thead class=\"mat-calendar-table-header\">\n <tr>\n <!-- For the day-of-the-week column header, we use an `<abbr>` element because VoiceOver\n ignores the `aria-label`. ChromeVox, however, does not read the full name\n for the `<abbr>`, so we still set `aria-label` on the header element. -->\n <th scope=\"col\" *ngFor=\"let day of _weekdays\" [attr.aria-label]=\"day.long\">\n <abbr class=\"mat-calendar-abbr\" [attr.title]=\"day.long\">{{day.narrow}}</abbr>\n </th>\n </tr>\n <tr><th aria-hidden=\"true\" class=\"mat-calendar-table-header-divider\" colspan=\"7\"></th></tr>\n </thead>\n <tbody mat-calendar-body\n [label]=\"_monthLabel\"\n [rows]=\"_weeks\"\n [todayValue]=\"_todayDate!\"\n [startValue]=\"_rangeStart!\"\n [endValue]=\"_rangeEnd!\"\n [comparisonStart]=\"_comparisonRangeStart\"\n [comparisonEnd]=\"_comparisonRangeEnd\"\n [previewStart]=\"_previewStart\"\n [previewEnd]=\"_previewEnd\"\n [isRange]=\"_isRange\"\n [labelMinRequiredCells]=\"3\"\n [activeCell]=\"_dateAdapter.getDate(activeDate) - 1\"\n (selectedValueChange)=\"_dateSelected($event)\"\n (previewChange)=\"_previewChanged($event)\"\n (keyup)=\"_handleCalendarBodyKeyup($event)\"\n (keydown)=\"_handleCalendarBodyKeydown($event)\">\n </tbody>\n</table>\n",
|
---|
| 318 | exportAs: 'matMonthView',
|
---|
| 319 | encapsulation: ViewEncapsulation.None,
|
---|
| 320 | changeDetection: ChangeDetectionStrategy.OnPush
|
---|
| 321 | },] }
|
---|
| 322 | ];
|
---|
| 323 | MatMonthView.ctorParameters = () => [
|
---|
| 324 | { type: ChangeDetectorRef },
|
---|
| 325 | { type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [MAT_DATE_FORMATS,] }] },
|
---|
| 326 | { type: DateAdapter, decorators: [{ type: Optional }] },
|
---|
| 327 | { type: Directionality, decorators: [{ type: Optional }] },
|
---|
| 328 | { type: undefined, decorators: [{ type: Inject, args: [MAT_DATE_RANGE_SELECTION_STRATEGY,] }, { type: Optional }] }
|
---|
| 329 | ];
|
---|
| 330 | MatMonthView.propDecorators = {
|
---|
| 331 | activeDate: [{ type: Input }],
|
---|
| 332 | selected: [{ type: Input }],
|
---|
| 333 | minDate: [{ type: Input }],
|
---|
| 334 | maxDate: [{ type: Input }],
|
---|
| 335 | dateFilter: [{ type: Input }],
|
---|
| 336 | dateClass: [{ type: Input }],
|
---|
| 337 | comparisonStart: [{ type: Input }],
|
---|
| 338 | comparisonEnd: [{ type: Input }],
|
---|
| 339 | selectedChange: [{ type: Output }],
|
---|
| 340 | _userSelection: [{ type: Output }],
|
---|
| 341 | activeDateChange: [{ type: Output }],
|
---|
| 342 | _matCalendarBody: [{ type: ViewChild, args: [MatCalendarBody,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