UNPKG

509 kBSource Map (JSON)View Raw
1{"version":3,"file":"ng-bootstrap.js.map","sources":["ng://@ng-bootstrap/ng-bootstrap/util/util.ts","ng://@ng-bootstrap/ng-bootstrap/accordion/accordion-config.ts","ng://@ng-bootstrap/ng-bootstrap/accordion/accordion.ts","ng://@ng-bootstrap/ng-bootstrap/accordion/accordion.module.ts","ng://@ng-bootstrap/ng-bootstrap/alert/alert-config.ts","ng://@ng-bootstrap/ng-bootstrap/alert/alert.ts","ng://@ng-bootstrap/ng-bootstrap/alert/alert.module.ts","ng://@ng-bootstrap/ng-bootstrap/buttons/label.ts","ng://@ng-bootstrap/ng-bootstrap/buttons/checkbox.ts","ng://@ng-bootstrap/ng-bootstrap/buttons/radio.ts","ng://@ng-bootstrap/ng-bootstrap/buttons/buttons.module.ts","ng://@ng-bootstrap/ng-bootstrap/carousel/carousel-config.ts","ng://@ng-bootstrap/ng-bootstrap/carousel/carousel.ts","ng://@ng-bootstrap/ng-bootstrap/carousel/carousel.module.ts","ng://@ng-bootstrap/ng-bootstrap/collapse/collapse.ts","ng://@ng-bootstrap/ng-bootstrap/collapse/collapse.module.ts","ng://@ng-bootstrap/ng-bootstrap/datepicker/ngb-date.ts","ng://@ng-bootstrap/ng-bootstrap/datepicker/ngb-calendar.ts","ng://@ng-bootstrap/ng-bootstrap/datepicker/datepicker-tools.ts","ng://@ng-bootstrap/ng-bootstrap/datepicker/datepicker-i18n.ts","ng://@ng-bootstrap/ng-bootstrap/datepicker/datepicker-service.ts","ng://@ng-bootstrap/ng-bootstrap/util/key.ts","ng://@ng-bootstrap/ng-bootstrap/datepicker/datepicker-keymap-service.ts","ng://@ng-bootstrap/ng-bootstrap/datepicker/datepicker-view-model.ts","ng://@ng-bootstrap/ng-bootstrap/datepicker/datepicker-config.ts","ng://@ng-bootstrap/ng-bootstrap/datepicker/adapters/ngb-date-adapter.ts","ng://@ng-bootstrap/ng-bootstrap/datepicker/datepicker.ts","ng://@ng-bootstrap/ng-bootstrap/datepicker/datepicker-month-view.ts","ng://@ng-bootstrap/ng-bootstrap/datepicker/datepicker-navigation.ts","ng://@ng-bootstrap/ng-bootstrap/util/autoclose.ts","ng://@ng-bootstrap/ng-bootstrap/util/focus-trap.ts","ng://@ng-bootstrap/ng-bootstrap/util/positioning.ts","ng://@ng-bootstrap/ng-bootstrap/datepicker/ngb-date-parser-formatter.ts","ng://@ng-bootstrap/ng-bootstrap/datepicker/datepicker-input.ts","ng://@ng-bootstrap/ng-bootstrap/datepicker/datepicker-day-view.ts","ng://@ng-bootstrap/ng-bootstrap/datepicker/datepicker-navigation-select.ts","ng://@ng-bootstrap/ng-bootstrap/datepicker/hijri/ngb-calendar-hijri.ts","ng://@ng-bootstrap/ng-bootstrap/datepicker/hijri/ngb-calendar-islamic-civil.ts","ng://@ng-bootstrap/ng-bootstrap/datepicker/hijri/ngb-calendar-islamic-umalqura.ts","ng://@ng-bootstrap/ng-bootstrap/datepicker/jalali/jalali.ts","ng://@ng-bootstrap/ng-bootstrap/datepicker/jalali/ngb-calendar-persian.ts","ng://@ng-bootstrap/ng-bootstrap/datepicker/hebrew/hebrew.ts","ng://@ng-bootstrap/ng-bootstrap/datepicker/hebrew/ngb-calendar-hebrew.ts","ng://@ng-bootstrap/ng-bootstrap/datepicker/hebrew/datepicker-i18n-hebrew.ts","ng://@ng-bootstrap/ng-bootstrap/datepicker/adapters/ngb-date-native-adapter.ts","ng://@ng-bootstrap/ng-bootstrap/datepicker/adapters/ngb-date-native-utc-adapter.ts","ng://@ng-bootstrap/ng-bootstrap/datepicker/datepicker.module.ts","ng://@ng-bootstrap/ng-bootstrap/dropdown/dropdown-config.ts","ng://@ng-bootstrap/ng-bootstrap/dropdown/dropdown.ts","ng://@ng-bootstrap/ng-bootstrap/dropdown/dropdown.module.ts","ng://@ng-bootstrap/ng-bootstrap/modal/modal-config.ts","ng://@ng-bootstrap/ng-bootstrap/util/popup.ts","ng://@ng-bootstrap/ng-bootstrap/util/scrollbar.ts","ng://@ng-bootstrap/ng-bootstrap/modal/modal-backdrop.ts","ng://@ng-bootstrap/ng-bootstrap/modal/modal-ref.ts","ng://@ng-bootstrap/ng-bootstrap/modal/modal-dismiss-reasons.ts","ng://@ng-bootstrap/ng-bootstrap/modal/modal-window.ts","ng://@ng-bootstrap/ng-bootstrap/modal/modal-stack.ts","ng://@ng-bootstrap/ng-bootstrap/modal/modal.ts","ng://@ng-bootstrap/ng-bootstrap/modal/modal.module.ts","ng://@ng-bootstrap/ng-bootstrap/pagination/pagination-config.ts","ng://@ng-bootstrap/ng-bootstrap/pagination/pagination.ts","ng://@ng-bootstrap/ng-bootstrap/pagination/pagination.module.ts","ng://@ng-bootstrap/ng-bootstrap/util/triggers.ts","ng://@ng-bootstrap/ng-bootstrap/popover/popover-config.ts","ng://@ng-bootstrap/ng-bootstrap/popover/popover.ts","ng://@ng-bootstrap/ng-bootstrap/popover/popover.module.ts","ng://@ng-bootstrap/ng-bootstrap/progressbar/progressbar-config.ts","ng://@ng-bootstrap/ng-bootstrap/progressbar/progressbar.ts","ng://@ng-bootstrap/ng-bootstrap/progressbar/progressbar.module.ts","ng://@ng-bootstrap/ng-bootstrap/rating/rating-config.ts","ng://@ng-bootstrap/ng-bootstrap/rating/rating.ts","ng://@ng-bootstrap/ng-bootstrap/rating/rating.module.ts","ng://@ng-bootstrap/ng-bootstrap/tabset/tabset-config.ts","ng://@ng-bootstrap/ng-bootstrap/tabset/tabset.ts","ng://@ng-bootstrap/ng-bootstrap/tabset/tabset.module.ts","ng://@ng-bootstrap/ng-bootstrap/timepicker/ngb-time.ts","ng://@ng-bootstrap/ng-bootstrap/timepicker/timepicker-config.ts","ng://@ng-bootstrap/ng-bootstrap/timepicker/ngb-time-adapter.ts","ng://@ng-bootstrap/ng-bootstrap/timepicker/timepicker.ts","ng://@ng-bootstrap/ng-bootstrap/timepicker/timepicker.module.ts","ng://@ng-bootstrap/ng-bootstrap/tooltip/tooltip-config.ts","ng://@ng-bootstrap/ng-bootstrap/tooltip/tooltip.ts","ng://@ng-bootstrap/ng-bootstrap/tooltip/tooltip.module.ts","ng://@ng-bootstrap/ng-bootstrap/typeahead/highlight.ts","ng://@ng-bootstrap/ng-bootstrap/typeahead/typeahead-window.ts","ng://@ng-bootstrap/ng-bootstrap/util/accessibility/live.ts","ng://@ng-bootstrap/ng-bootstrap/typeahead/typeahead-config.ts","ng://@ng-bootstrap/ng-bootstrap/typeahead/typeahead.ts","ng://@ng-bootstrap/ng-bootstrap/typeahead/typeahead.module.ts","ng://@ng-bootstrap/ng-bootstrap/index.ts"],"sourcesContent":["export function toInteger(value: any): number {\n return parseInt(`${value}`, 10);\n}\n\nexport function toString(value: any): string {\n return (value !== undefined && value !== null) ? `${value}` : '';\n}\n\nexport function getValueInRange(value: number, max: number, min = 0): number {\n return Math.max(Math.min(value, max), min);\n}\n\nexport function isString(value: any): value is string {\n return typeof value === 'string';\n}\n\nexport function isNumber(value: any): value is number {\n return !isNaN(toInteger(value));\n}\n\nexport function isInteger(value: any): value is number {\n return typeof value === 'number' && isFinite(value) && Math.floor(value) === value;\n}\n\nexport function isDefined(value: any): boolean {\n return value !== undefined && value !== null;\n}\n\nexport function padNumber(value: number) {\n if (isNumber(value)) {\n return `0${value}`.slice(-2);\n } else {\n return '';\n }\n}\n\nexport function regExpEscape(text) {\n return text.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&');\n}\n\nexport function hasClassName(element: any, className: string): boolean {\n return element && element.className && element.className.split &&\n element.className.split(/\\s+/).indexOf(className) >= 0;\n}\n\nif (typeof Element !== 'undefined' && !Element.prototype.closest) {\n // Polyfill for ie10+\n\n if (!Element.prototype.matches) {\n // IE uses the non-standard name: msMatchesSelector\n Element.prototype.matches = (Element.prototype as any).msMatchesSelector || Element.prototype.webkitMatchesSelector;\n }\n\n Element.prototype.closest = function(s: string) {\n let el = this;\n if (!document.documentElement.contains(el)) {\n return null;\n }\n do {\n if (el.matches(s)) {\n return el;\n }\n el = el.parentElement || el.parentNode;\n } while (el !== null && el.nodeType === 1);\n return null;\n };\n}\n\nexport function closest(element: HTMLElement, selector): HTMLElement {\n if (!selector) {\n return null;\n }\n\n return element.closest(selector);\n}\n","import {Injectable} from '@angular/core';\n\n/**\n * A configuration service for the [NgbAccordion](#/components/accordion/api#NgbAccordion) component.\n *\n * You can inject this service, typically in your root component, and customize its properties\n * to provide default values for all accordions used in the application.\n */\n@Injectable({providedIn: 'root'})\nexport class NgbAccordionConfig {\n closeOthers = false;\n type: string;\n}\n","import {\n AfterContentChecked,\n Component,\n ContentChildren,\n Directive,\n EventEmitter,\n forwardRef,\n Host,\n Inject,\n Input,\n Optional,\n Output,\n QueryList,\n TemplateRef\n} from '@angular/core';\n\nimport {isString} from '../util/util';\n\nimport {NgbAccordionConfig} from './accordion-config';\n\nlet nextId = 0;\n\n/**\n * The context for the [NgbPanelHeader](#/components/accordion/api#NgbPanelHeader) template\n *\n * @since 4.1.0\n */\nexport interface NgbPanelHeaderContext {\n /**\n * `True` if current panel is opened\n */\n opened: boolean;\n}\n\n/**\n * A directive to put on a button that toggles panel opening and closing.\n *\n * To be used inside the [`NgbPanelHeader`](#/components/accordion/api#NgbPanelHeader)\n *\n * @since 4.1.0\n */\n@Directive({\n selector: 'button[ngbPanelToggle]',\n host: {\n 'type': 'button',\n '[disabled]': 'panel.disabled',\n '[class.collapsed]': '!panel.isOpen',\n '[attr.aria-expanded]': 'panel.isOpen',\n '[attr.aria-controls]': 'panel.id',\n '(click)': 'accordion.toggle(panel.id)'\n }\n})\nexport class NgbPanelToggle {\n @Input()\n set ngbPanelToggle(panel: NgbPanel) {\n if (panel) {\n this.panel = panel;\n }\n }\n\n constructor(\n @Inject(forwardRef(() => NgbAccordion)) public accordion: NgbAccordion,\n @Optional() @Host() @Inject(forwardRef(() => NgbPanel)) public panel: NgbPanel) {}\n}\n\n/**\n * A directive that wraps an accordion panel header with any HTML markup and a toggling button\n * marked with [`NgbPanelToggle`](#/components/accordion/api#NgbPanelToggle).\n * See the [header customization demo](#/components/accordion/examples#header) for more details.\n *\n * You can also use [`NgbPanelTitle`](#/components/accordion/api#NgbPanelTitle) to customize only the panel title.\n *\n * @since 4.1.0\n */\n@Directive({selector: 'ng-template[ngbPanelHeader]'})\nexport class NgbPanelHeader {\n constructor(public templateRef: TemplateRef<any>) {}\n}\n\n/**\n * A directive that wraps only the panel title with HTML markup inside.\n *\n * You can also use [`NgbPanelHeader`](#/components/accordion/api#NgbPanelHeader) to customize the full panel header.\n */\n@Directive({selector: 'ng-template[ngbPanelTitle]'})\nexport class NgbPanelTitle {\n constructor(public templateRef: TemplateRef<any>) {}\n}\n\n/**\n * A directive that wraps the accordion panel content.\n */\n@Directive({selector: 'ng-template[ngbPanelContent]'})\nexport class NgbPanelContent {\n constructor(public templateRef: TemplateRef<any>) {}\n}\n\n/**\n * A directive that wraps an individual accordion panel with title and collapsible content.\n */\n@Directive({selector: 'ngb-panel'})\nexport class NgbPanel implements AfterContentChecked {\n /**\n * If `true`, the panel is disabled an can't be toggled.\n */\n @Input() disabled = false;\n\n /**\n * An optional id for the panel that must be unique on the page.\n *\n * If not provided, it will be auto-generated in the `ngb-panel-xxx` format.\n */\n @Input() id = `ngb-panel-${nextId++}`;\n\n isOpen = false;\n\n /**\n * The panel title.\n *\n * You can alternatively use [`NgbPanelTitle`](#/components/accordion/api#NgbPanelTitle) to set panel title.\n */\n @Input() title: string;\n\n /**\n * Type of the current panel.\n *\n * Bootstrap provides styles for the following types: `'success'`, `'info'`, `'warning'`, `'danger'`, `'primary'`,\n * `'secondary'`, `'light'` and `'dark'`.\n */\n @Input() type: string;\n\n titleTpl: NgbPanelTitle | null;\n headerTpl: NgbPanelHeader | null;\n contentTpl: NgbPanelContent | null;\n\n @ContentChildren(NgbPanelTitle, {descendants: false}) titleTpls: QueryList<NgbPanelTitle>;\n @ContentChildren(NgbPanelHeader, {descendants: false}) headerTpls: QueryList<NgbPanelHeader>;\n @ContentChildren(NgbPanelContent, {descendants: false}) contentTpls: QueryList<NgbPanelContent>;\n\n ngAfterContentChecked() {\n // We are using @ContentChildren instead of @ContentChild as in the Angular version being used\n // only @ContentChildren allows us to specify the {descendants: false} option.\n // Without {descendants: false} we are hitting bugs described in:\n // https://github.com/ng-bootstrap/ng-bootstrap/issues/2240\n this.titleTpl = this.titleTpls.first;\n this.headerTpl = this.headerTpls.first;\n this.contentTpl = this.contentTpls.first;\n }\n}\n\n/**\n * An event emitted right before toggling an accordion panel.\n */\nexport interface NgbPanelChangeEvent {\n /**\n * The id of the accordion panel that is being toggled.\n */\n panelId: string;\n\n /**\n * The next state of the panel.\n *\n * `true` if it will be opened, `false` if closed.\n */\n nextState: boolean;\n\n /**\n * Calling this function will prevent panel toggling.\n */\n preventDefault: () => void;\n}\n\n/**\n * Accordion is a collection of collapsible panels (bootstrap cards).\n *\n * It can ensure only one panel is opened at a time and allows to customize panel\n * headers.\n */\n@Component({\n selector: 'ngb-accordion',\n exportAs: 'ngbAccordion',\n host: {'class': 'accordion', 'role': 'tablist', '[attr.aria-multiselectable]': '!closeOtherPanels'},\n template: `\n <ng-template #t ngbPanelHeader let-panel>\n <button class=\"btn btn-link\" [ngbPanelToggle]=\"panel\">\n {{panel.title}}<ng-template [ngTemplateOutlet]=\"panel.titleTpl?.templateRef\"></ng-template>\n </button>\n </ng-template>\n <ng-template ngFor let-panel [ngForOf]=\"panels\">\n <div class=\"card\">\n <div role=\"tab\" id=\"{{panel.id}}-header\" [class]=\"'card-header ' + (panel.type ? 'bg-'+panel.type: type ? 'bg-'+type : '')\">\n <ng-template [ngTemplateOutlet]=\"panel.headerTpl?.templateRef || t\"\n [ngTemplateOutletContext]=\"{$implicit: panel, opened: panel.isOpen}\"></ng-template>\n </div>\n <div id=\"{{panel.id}}\" role=\"tabpanel\" [attr.aria-labelledby]=\"panel.id + '-header'\"\n class=\"collapse\" [class.show]=\"panel.isOpen\" *ngIf=\"!destroyOnHide || panel.isOpen\">\n <div class=\"card-body\">\n <ng-template [ngTemplateOutlet]=\"panel.contentTpl?.templateRef\"></ng-template>\n </div>\n </div>\n </div>\n </ng-template>\n `\n})\nexport class NgbAccordion implements AfterContentChecked {\n @ContentChildren(NgbPanel) panels: QueryList<NgbPanel>;\n\n /**\n * An array or comma separated strings of panel ids that should be opened **initially**.\n *\n * For subsequent changes use methods like `expand()`, `collapse()`, etc. and\n * the `(panelChange)` event.\n */\n @Input() activeIds: string | string[] = [];\n\n /**\n * If `true`, only one panel could be opened at a time.\n *\n * Opening a new panel will close others.\n */\n @Input('closeOthers') closeOtherPanels: boolean;\n\n /**\n * If `true`, panel content will be detached from DOM and not simply hidden when the panel is collapsed.\n */\n @Input() destroyOnHide = true;\n\n /**\n * Type of panels.\n *\n * Bootstrap provides styles for the following types: `'success'`, `'info'`, `'warning'`, `'danger'`, `'primary'`,\n * `'secondary'`, `'light'` and `'dark'`.\n */\n @Input() type: string;\n\n /**\n * Event emitted right before the panel toggle happens.\n *\n * See [NgbPanelChangeEvent](#/components/accordion/api#NgbPanelChangeEvent) for payload details.\n */\n @Output() panelChange = new EventEmitter<NgbPanelChangeEvent>();\n\n constructor(config: NgbAccordionConfig) {\n this.type = config.type;\n this.closeOtherPanels = config.closeOthers;\n }\n\n /**\n * Checks if a panel with a given id is expanded.\n */\n isExpanded(panelId: string): boolean { return this.activeIds.indexOf(panelId) > -1; }\n\n /**\n * Expands a panel with a given id.\n *\n * Has no effect if the panel is already expanded or disabled.\n */\n expand(panelId: string): void { this._changeOpenState(this._findPanelById(panelId), true); }\n\n /**\n * Expands all panels, if `[closeOthers]` is `false`.\n *\n * If `[closeOthers]` is `true`, it will expand the first panel, unless there is already a panel opened.\n */\n expandAll(): void {\n if (this.closeOtherPanels) {\n if (this.activeIds.length === 0 && this.panels.length) {\n this._changeOpenState(this.panels.first, true);\n }\n } else {\n this.panels.forEach(panel => this._changeOpenState(panel, true));\n }\n }\n\n /**\n * Collapses a panel with the given id.\n *\n * Has no effect if the panel is already collapsed or disabled.\n */\n collapse(panelId: string) { this._changeOpenState(this._findPanelById(panelId), false); }\n\n /**\n * Collapses all opened panels.\n */\n collapseAll() {\n this.panels.forEach((panel) => { this._changeOpenState(panel, false); });\n }\n\n /**\n * Toggles a panel with the given id.\n *\n * Has no effect if the panel is disabled.\n */\n toggle(panelId: string) {\n const panel = this._findPanelById(panelId);\n if (panel) {\n this._changeOpenState(panel, !panel.isOpen);\n }\n }\n\n ngAfterContentChecked() {\n // active id updates\n if (isString(this.activeIds)) {\n this.activeIds = this.activeIds.split(/\\s*,\\s*/);\n }\n\n // update panels open states\n this.panels.forEach(panel => panel.isOpen = !panel.disabled && this.activeIds.indexOf(panel.id) > -1);\n\n // closeOthers updates\n if (this.activeIds.length > 1 && this.closeOtherPanels) {\n this._closeOthers(this.activeIds[0]);\n this._updateActiveIds();\n }\n }\n\n private _changeOpenState(panel: NgbPanel, nextState: boolean) {\n if (panel && !panel.disabled && panel.isOpen !== nextState) {\n let defaultPrevented = false;\n\n this.panelChange.emit(\n {panelId: panel.id, nextState: nextState, preventDefault: () => { defaultPrevented = true; }});\n\n if (!defaultPrevented) {\n panel.isOpen = nextState;\n\n if (nextState && this.closeOtherPanels) {\n this._closeOthers(panel.id);\n }\n this._updateActiveIds();\n }\n }\n }\n\n private _closeOthers(panelId: string) {\n this.panels.forEach(panel => {\n if (panel.id !== panelId) {\n panel.isOpen = false;\n }\n });\n }\n\n private _findPanelById(panelId: string): NgbPanel | null { return this.panels.find(p => p.id === panelId); }\n\n private _updateActiveIds() {\n this.activeIds = this.panels.filter(panel => panel.isOpen && !panel.disabled).map(panel => panel.id);\n }\n}\n","import {NgModule, ModuleWithProviders} from '@angular/core';\nimport {CommonModule} from '@angular/common';\n\nimport {NgbAccordion, NgbPanel, NgbPanelTitle, NgbPanelContent, NgbPanelHeader, NgbPanelToggle} from './accordion';\n\nexport {\n NgbAccordion,\n NgbPanel,\n NgbPanelTitle,\n NgbPanelContent,\n NgbPanelChangeEvent,\n NgbPanelHeader,\n NgbPanelHeaderContext,\n NgbPanelToggle\n} from './accordion';\nexport {NgbAccordionConfig} from './accordion-config';\n\nconst NGB_ACCORDION_DIRECTIVES =\n [NgbAccordion, NgbPanel, NgbPanelTitle, NgbPanelContent, NgbPanelHeader, NgbPanelToggle];\n\n@NgModule({declarations: NGB_ACCORDION_DIRECTIVES, exports: NGB_ACCORDION_DIRECTIVES, imports: [CommonModule]})\nexport class NgbAccordionModule {\n /**\n * Importing with '.forRoot()' is no longer necessary, you can simply import the module.\n * Will be removed in 4.0.0.\n *\n * @deprecated 3.0.0\n */\n static forRoot(): ModuleWithProviders { return {ngModule: NgbAccordionModule}; }\n}\n","import {Injectable} from '@angular/core';\n\n/**\n * A configuration service for the [NgbAlert](#/components/alert/api#NgbAlert) component.\n *\n * You can inject this service, typically in your root component, and customize its properties\n * to provide default values for all alerts used in the application.\n */\n@Injectable({providedIn: 'root'})\nexport class NgbAlertConfig {\n dismissible = true;\n type = 'warning';\n}\n","import {\n Component,\n Input,\n Output,\n EventEmitter,\n ChangeDetectionStrategy,\n Renderer2,\n ElementRef,\n OnChanges,\n OnInit,\n SimpleChanges,\n ViewEncapsulation\n} from '@angular/core';\n\nimport {NgbAlertConfig} from './alert-config';\n\n/**\n * Alert is a component to provide contextual feedback messages for user.\n *\n * It supports several alert types and can be dismissed.\n */\n@Component({\n selector: 'ngb-alert',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {'role': 'alert', 'class': 'alert', '[class.alert-dismissible]': 'dismissible'},\n template: `\n <ng-content></ng-content>\n <button *ngIf=\"dismissible\" type=\"button\" class=\"close\" aria-label=\"Close\" i18n-aria-label=\"@@ngb.alert.close\"\n (click)=\"closeHandler()\">\n <span aria-hidden=\"true\">&times;</span>\n </button>\n `,\n styleUrls: ['./alert.scss']\n})\nexport class NgbAlert implements OnInit,\n OnChanges {\n /**\n * If `true`, alert can be dismissed by the user.\n *\n * The close button (×) will be displayed and you can be notified\n * of the event with the `(close)` output.\n */\n @Input() dismissible: boolean;\n /**\n * Type of the alert.\n *\n * Bootstrap provides styles for the following types: `'success'`, `'info'`, `'warning'`, `'danger'`, `'primary'`,\n * `'secondary'`, `'light'` and `'dark'`.\n */\n @Input() type: string;\n /**\n * An event emitted when the close button is clicked. It has no payload and only relevant for dismissible alerts.\n */\n @Output() close = new EventEmitter<void>();\n\n constructor(config: NgbAlertConfig, private _renderer: Renderer2, private _element: ElementRef) {\n this.dismissible = config.dismissible;\n this.type = config.type;\n }\n\n closeHandler() { this.close.emit(null); }\n\n ngOnChanges(changes: SimpleChanges) {\n const typeChange = changes['type'];\n if (typeChange && !typeChange.firstChange) {\n this._renderer.removeClass(this._element.nativeElement, `alert-${typeChange.previousValue}`);\n this._renderer.addClass(this._element.nativeElement, `alert-${typeChange.currentValue}`);\n }\n }\n\n ngOnInit() { this._renderer.addClass(this._element.nativeElement, `alert-${this.type}`); }\n}\n","import {NgModule, ModuleWithProviders} from '@angular/core';\nimport {CommonModule} from '@angular/common';\n\nimport {NgbAlert} from './alert';\n\nexport {NgbAlert} from './alert';\nexport {NgbAlertConfig} from './alert-config';\n\n@NgModule({declarations: [NgbAlert], exports: [NgbAlert], imports: [CommonModule], entryComponents: [NgbAlert]})\nexport class NgbAlertModule {\n /**\n * Importing with '.forRoot()' is no longer necessary, you can simply import the module.\n * Will be removed in 4.0.0.\n *\n * @deprecated 3.0.0\n */\n static forRoot(): ModuleWithProviders { return {ngModule: NgbAlertModule}; }\n}\n","import {Directive} from '@angular/core';\n\n@Directive({\n selector: '[ngbButtonLabel]',\n host:\n {'[class.btn]': 'true', '[class.active]': 'active', '[class.disabled]': 'disabled', '[class.focus]': 'focused'}\n})\nexport class NgbButtonLabel {\n active: boolean;\n disabled: boolean;\n focused: boolean;\n}\n","import {ChangeDetectorRef, Directive, forwardRef, Input} from '@angular/core';\nimport {ControlValueAccessor, NG_VALUE_ACCESSOR} from '@angular/forms';\n\nimport {NgbButtonLabel} from './label';\n\nconst NGB_CHECKBOX_VALUE_ACCESSOR = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => NgbCheckBox),\n multi: true\n};\n\n\n/**\n * Allows to easily create Bootstrap-style checkbox buttons.\n *\n * Integrates with forms, so the value of a checked button is bound to the underlying form control\n * either in a reactive or template-driven way.\n */\n@Directive({\n selector: '[ngbButton][type=checkbox]',\n host: {\n 'autocomplete': 'off',\n '[checked]': 'checked',\n '[disabled]': 'disabled',\n '(change)': 'onInputChange($event)',\n '(focus)': 'focused = true',\n '(blur)': 'focused = false'\n },\n providers: [NGB_CHECKBOX_VALUE_ACCESSOR]\n})\nexport class NgbCheckBox implements ControlValueAccessor {\n checked;\n\n /**\n * If `true`, the checkbox button will be disabled\n */\n @Input() disabled = false;\n\n /**\n * The form control value when the checkbox is checked.\n */\n @Input() valueChecked = true;\n\n /**\n * The form control value when the checkbox is unchecked.\n */\n @Input() valueUnChecked = false;\n\n onChange = (_: any) => {};\n onTouched = () => {};\n\n set focused(isFocused: boolean) {\n this._label.focused = isFocused;\n if (!isFocused) {\n this.onTouched();\n }\n }\n\n constructor(private _label: NgbButtonLabel, private _cd: ChangeDetectorRef) {}\n\n onInputChange($event) {\n const modelToPropagate = $event.target.checked ? this.valueChecked : this.valueUnChecked;\n this.onChange(modelToPropagate);\n this.onTouched();\n this.writeValue(modelToPropagate);\n }\n\n registerOnChange(fn: (value: any) => any): void { this.onChange = fn; }\n\n registerOnTouched(fn: () => any): void { this.onTouched = fn; }\n\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n this._label.disabled = isDisabled;\n }\n\n writeValue(value) {\n this.checked = value === this.valueChecked;\n this._label.active = this.checked;\n\n // label won't be updated, if it is inside the OnPush component when [ngModel] changes\n this._cd.markForCheck();\n }\n}\n","import {ChangeDetectorRef, Directive, ElementRef, forwardRef, Input, OnDestroy, Renderer2} from '@angular/core';\nimport {ControlValueAccessor, NG_VALUE_ACCESSOR} from '@angular/forms';\n\nimport {NgbButtonLabel} from './label';\n\nconst NGB_RADIO_VALUE_ACCESSOR = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => NgbRadioGroup),\n multi: true\n};\n\nlet nextId = 0;\n\n/**\n * Allows to easily create Bootstrap-style radio buttons.\n *\n * Integrates with forms, so the value of a checked button is bound to the underlying form control\n * either in a reactive or template-driven way.\n */\n@Directive({selector: '[ngbRadioGroup]', host: {'role': 'radiogroup'}, providers: [NGB_RADIO_VALUE_ACCESSOR]})\nexport class NgbRadioGroup implements ControlValueAccessor {\n private _radios: Set<NgbRadio> = new Set<NgbRadio>();\n private _value = null;\n private _disabled: boolean;\n\n get disabled() { return this._disabled; }\n set disabled(isDisabled: boolean) { this.setDisabledState(isDisabled); }\n\n /**\n * Name of the radio group applied to radio input elements.\n *\n * Will be applied to all radio input elements inside the group,\n * unless [`NgbRadio`](#/components/buttons/api#NgbRadio)'s specify names themselves.\n *\n * If not provided, will be generated in the `ngb-radio-xx` format.\n */\n @Input() name = `ngb-radio-${nextId++}`;\n\n onChange = (_: any) => {};\n onTouched = () => {};\n\n onRadioChange(radio: NgbRadio) {\n this.writeValue(radio.value);\n this.onChange(radio.value);\n }\n\n onRadioValueUpdate() { this._updateRadiosValue(); }\n\n register(radio: NgbRadio) { this._radios.add(radio); }\n\n registerOnChange(fn: (value: any) => any): void { this.onChange = fn; }\n\n registerOnTouched(fn: () => any): void { this.onTouched = fn; }\n\n setDisabledState(isDisabled: boolean): void {\n this._disabled = isDisabled;\n this._updateRadiosDisabled();\n }\n\n unregister(radio: NgbRadio) { this._radios.delete(radio); }\n\n writeValue(value) {\n this._value = value;\n this._updateRadiosValue();\n }\n\n private _updateRadiosValue() { this._radios.forEach((radio) => radio.updateValue(this._value)); }\n private _updateRadiosDisabled() { this._radios.forEach((radio) => radio.updateDisabled()); }\n}\n\n\n/**\n * A directive that marks an input of type \"radio\" as a part of the\n * [`NgbRadioGroup`](#/components/buttons/api#NgbRadioGroup).\n */\n@Directive({\n selector: '[ngbButton][type=radio]',\n host: {\n '[checked]': 'checked',\n '[disabled]': 'disabled',\n '[name]': 'nameAttr',\n '(change)': 'onChange()',\n '(focus)': 'focused = true',\n '(blur)': 'focused = false'\n }\n})\nexport class NgbRadio implements OnDestroy {\n private _checked: boolean;\n private _disabled: boolean;\n private _value: any = null;\n\n /**\n * The value for the 'name' property of the input element.\n *\n * All inputs of the radio group should have the same name. If not specified,\n * the name of the enclosing group is used.\n */\n @Input() name: string;\n\n /**\n * The form control value when current radio button is checked.\n */\n @Input('value')\n set value(value: any) {\n this._value = value;\n const stringValue = value ? value.toString() : '';\n this._renderer.setProperty(this._element.nativeElement, 'value', stringValue);\n this._group.onRadioValueUpdate();\n }\n\n /**\n * If `true`, current radio button will be disabled.\n */\n @Input('disabled')\n set disabled(isDisabled: boolean) {\n this._disabled = isDisabled !== false;\n this.updateDisabled();\n }\n\n set focused(isFocused: boolean) {\n if (this._label) {\n this._label.focused = isFocused;\n }\n if (!isFocused) {\n this._group.onTouched();\n }\n }\n\n get checked() { return this._checked; }\n\n get disabled() { return this._group.disabled || this._disabled; }\n\n get value() { return this._value; }\n\n get nameAttr() { return this.name || this._group.name; }\n\n constructor(\n private _group: NgbRadioGroup, private _label: NgbButtonLabel, private _renderer: Renderer2,\n private _element: ElementRef<HTMLInputElement>, private _cd: ChangeDetectorRef) {\n this._group.register(this);\n this.updateDisabled();\n }\n\n ngOnDestroy() { this._group.unregister(this); }\n\n onChange() { this._group.onRadioChange(this); }\n\n updateValue(value) {\n // label won't be updated, if it is inside the OnPush component when [ngModel] changes\n if (this.value !== value) {\n this._cd.markForCheck();\n }\n\n this._checked = this.value === value;\n this._label.active = this._checked;\n }\n\n updateDisabled() { this._label.disabled = this.disabled; }\n}\n","import {NgModule, ModuleWithProviders} from '@angular/core';\nimport {NgbButtonLabel} from './label';\nimport {NgbCheckBox} from './checkbox';\nimport {NgbRadio, NgbRadioGroup} from './radio';\n\nexport {NgbButtonLabel} from './label';\nexport {NgbCheckBox} from './checkbox';\nexport {NgbRadio, NgbRadioGroup} from './radio';\n\n\nconst NGB_BUTTON_DIRECTIVES = [NgbButtonLabel, NgbCheckBox, NgbRadioGroup, NgbRadio];\n\n@NgModule({declarations: NGB_BUTTON_DIRECTIVES, exports: NGB_BUTTON_DIRECTIVES})\nexport class NgbButtonsModule {\n /**\n * Importing with '.forRoot()' is no longer necessary, you can simply import the module.\n * Will be removed in 4.0.0.\n *\n * @deprecated 3.0.0\n */\n static forRoot(): ModuleWithProviders { return {ngModule: NgbButtonsModule}; }\n}\n","import {Injectable} from '@angular/core';\n\n/**\n * A configuration service for the [NgbCarousel](#/components/carousel/api#NgbCarousel) component.\n *\n * You can inject this service, typically in your root component, and customize its properties\n * to provide default values for all carousels used in the application.\n */\n@Injectable({providedIn: 'root'})\nexport class NgbCarouselConfig {\n interval = 5000;\n wrap = true;\n keyboard = true;\n pauseOnHover = true;\n showNavigationArrows = true;\n showNavigationIndicators = true;\n}\n","import {\n AfterContentChecked,\n AfterContentInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChildren,\n Directive,\n EventEmitter,\n Inject,\n Input,\n NgZone,\n OnChanges,\n OnDestroy,\n Output,\n PLATFORM_ID,\n QueryList,\n TemplateRef\n} from '@angular/core';\nimport {isPlatformBrowser} from '@angular/common';\n\nimport {NgbCarouselConfig} from './carousel-config';\n\nimport {merge, Subject, timer} from 'rxjs';\nimport {filter, map, switchMap, takeUntil} from 'rxjs/operators';\n\nlet nextId = 0;\n\n/**\n * A directive that wraps the individual carousel slide.\n */\n@Directive({selector: 'ng-template[ngbSlide]'})\nexport class NgbSlide {\n /**\n * Slide id that must be unique for the entire document.\n *\n * If not provided, will be generated in the `ngb-slide-xx` format.\n */\n @Input() id = `ngb-slide-${nextId++}`;\n constructor(public tplRef: TemplateRef<any>) {}\n}\n\n/**\n * Carousel is a component to easily create and control slideshows.\n *\n * Allows to set intervals, change the way user interacts with the slides and provides a programmatic API.\n */\n@Component({\n selector: 'ngb-carousel',\n exportAs: 'ngbCarousel',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n 'class': 'carousel slide',\n '[style.display]': '\"block\"',\n 'tabIndex': '0',\n '(mouseenter)': 'pauseOnHover && pause()',\n '(mouseleave)': 'pauseOnHover && cycle()',\n '(keydown.arrowLeft)': 'keyboard && prev()',\n '(keydown.arrowRight)': 'keyboard && next()'\n },\n template: `\n <ol class=\"carousel-indicators\" *ngIf=\"showNavigationIndicators\">\n <li *ngFor=\"let slide of slides\" [id]=\"slide.id\" [class.active]=\"slide.id === activeId\"\n (click)=\"select(slide.id); pauseOnHover && pause()\"></li>\n </ol>\n <div class=\"carousel-inner\">\n <div *ngFor=\"let slide of slides\" class=\"carousel-item\" [class.active]=\"slide.id === activeId\">\n <ng-template [ngTemplateOutlet]=\"slide.tplRef\"></ng-template>\n </div>\n </div>\n <a class=\"carousel-control-prev\" role=\"button\" (click)=\"prev()\" *ngIf=\"showNavigationArrows\">\n <span class=\"carousel-control-prev-icon\" aria-hidden=\"true\"></span>\n <span class=\"sr-only\" i18n=\"@@ngb.carousel.previous\">Previous</span>\n </a>\n <a class=\"carousel-control-next\" role=\"button\" (click)=\"next()\" *ngIf=\"showNavigationArrows\">\n <span class=\"carousel-control-next-icon\" aria-hidden=\"true\"></span>\n <span class=\"sr-only\" i18n=\"@@ngb.carousel.next\">Next</span>\n </a>\n `\n})\nexport class NgbCarousel implements AfterContentChecked,\n AfterContentInit, OnChanges, OnDestroy {\n @ContentChildren(NgbSlide) slides: QueryList<NgbSlide>;\n\n private _destroy$ = new Subject<void>();\n private _start$ = new Subject<void>();\n private _stop$ = new Subject<void>();\n\n /**\n * The slide id that should be displayed **initially**.\n *\n * For subsequent interactions use methods `select()`, `next()`, etc. and the `(slide)` output.\n */\n @Input() activeId: string;\n\n /**\n * Time in milliseconds before the next slide is shown.\n */\n @Input() interval: number;\n\n /**\n * If `true`, will 'wrap' the carousel by switching from the last slide back to the first.\n */\n @Input() wrap: boolean;\n\n /**\n * If `true`, allows to interact with carousel using keyboard 'arrow left' and 'arrow right'.\n */\n @Input() keyboard: boolean;\n\n /**\n * If `true`, will pause slide switching when mouse cursor hovers the slide.\n *\n * @since 2.2.0\n */\n @Input() pauseOnHover: boolean;\n\n /**\n * If `true`, 'previous' and 'next' navigation arrows will be visible on the slide.\n *\n * @since 2.2.0\n */\n @Input() showNavigationArrows: boolean;\n\n /**\n * If `true`, navigation indicators at the bottom of the slide will be visible.\n *\n * @since 2.2.0\n */\n @Input() showNavigationIndicators: boolean;\n\n /**\n * An event emitted right after the slide transition is completed.\n *\n * See [`NgbSlideEvent`](#/components/carousel/api#NgbSlideEvent) for payload details.\n */\n @Output() slide = new EventEmitter<NgbSlideEvent>();\n\n constructor(\n config: NgbCarouselConfig, @Inject(PLATFORM_ID) private _platformId, private _ngZone: NgZone,\n private _cd: ChangeDetectorRef) {\n this.interval = config.interval;\n this.wrap = config.wrap;\n this.keyboard = config.keyboard;\n this.pauseOnHover = config.pauseOnHover;\n this.showNavigationArrows = config.showNavigationArrows;\n this.showNavigationIndicators = config.showNavigationIndicators;\n }\n\n ngAfterContentInit() {\n // setInterval() doesn't play well with SSR and protractor,\n // so we should run it in the browser and outside Angular\n if (isPlatformBrowser(this._platformId)) {\n this._ngZone.runOutsideAngular(() => {\n this._start$\n .pipe(\n map(() => this.interval), filter(interval => interval > 0 && this.slides.length > 0),\n switchMap(interval => timer(interval).pipe(takeUntil(merge(this._stop$, this._destroy$)))))\n .subscribe(() => this._ngZone.run(() => this.next()));\n\n this._start$.next();\n });\n }\n\n this.slides.changes.pipe(takeUntil(this._destroy$)).subscribe(() => this._cd.markForCheck());\n }\n\n ngAfterContentChecked() {\n let activeSlide = this._getSlideById(this.activeId);\n this.activeId = activeSlide ? activeSlide.id : (this.slides.length ? this.slides.first.id : null);\n }\n\n ngOnDestroy() { this._destroy$.next(); }\n\n ngOnChanges(changes) {\n if ('interval' in changes && !changes['interval'].isFirstChange()) {\n this._start$.next();\n }\n }\n\n /**\n * Navigates to a slide with the specified identifier.\n */\n select(slideId: string) { this._cycleToSelected(slideId, this._getSlideEventDirection(this.activeId, slideId)); }\n\n /**\n * Navigates to the previous slide.\n */\n prev() { this._cycleToSelected(this._getPrevSlide(this.activeId), NgbSlideEventDirection.RIGHT); }\n\n /**\n * Navigates to the next slide.\n */\n next() { this._cycleToSelected(this._getNextSlide(this.activeId), NgbSlideEventDirection.LEFT); }\n\n /**\n * Pauses cycling through the slides.\n */\n pause() { this._stop$.next(); }\n\n /**\n * Restarts cycling through the slides from left to right.\n */\n cycle() { this._start$.next(); }\n\n private _cycleToSelected(slideIdx: string, direction: NgbSlideEventDirection) {\n let selectedSlide = this._getSlideById(slideIdx);\n if (selectedSlide && selectedSlide.id !== this.activeId) {\n this.slide.emit({prev: this.activeId, current: selectedSlide.id, direction: direction});\n this._start$.next();\n this.activeId = selectedSlide.id;\n }\n\n // we get here after the interval fires or any external API call like next(), prev() or select()\n this._cd.markForCheck();\n }\n\n private _getSlideEventDirection(currentActiveSlideId: string, nextActiveSlideId: string): NgbSlideEventDirection {\n const currentActiveSlideIdx = this._getSlideIdxById(currentActiveSlideId);\n const nextActiveSlideIdx = this._getSlideIdxById(nextActiveSlideId);\n\n return currentActiveSlideIdx > nextActiveSlideIdx ? NgbSlideEventDirection.RIGHT : NgbSlideEventDirection.LEFT;\n }\n\n private _getSlideById(slideId: string): NgbSlide { return this.slides.find(slide => slide.id === slideId); }\n\n private _getSlideIdxById(slideId: string): number {\n return this.slides.toArray().indexOf(this._getSlideById(slideId));\n }\n\n private _getNextSlide(currentSlideId: string): string {\n const slideArr = this.slides.toArray();\n const currentSlideIdx = this._getSlideIdxById(currentSlideId);\n const isLastSlide = currentSlideIdx === slideArr.length - 1;\n\n return isLastSlide ? (this.wrap ? slideArr[0].id : slideArr[slideArr.length - 1].id) :\n slideArr[currentSlideIdx + 1].id;\n }\n\n private _getPrevSlide(currentSlideId: string): string {\n const slideArr = this.slides.toArray();\n const currentSlideIdx = this._getSlideIdxById(currentSlideId);\n const isFirstSlide = currentSlideIdx === 0;\n\n return isFirstSlide ? (this.wrap ? slideArr[slideArr.length - 1].id : slideArr[0].id) :\n slideArr[currentSlideIdx - 1].id;\n }\n}\n\n/**\n * A slide change event emitted right after the slide transition is completed.\n */\nexport interface NgbSlideEvent {\n /**\n * The previous slide id.\n */\n prev: string;\n\n /**\n * The current slide id.\n */\n current: string;\n\n /**\n * The slide event direction.\n *\n * Possible values are `'left' | 'right'`.\n */\n direction: NgbSlideEventDirection;\n}\n\n/**\n * Defines the carousel slide transition direction.\n */\nexport enum NgbSlideEventDirection {\n LEFT = <any>'left',\n RIGHT = <any>'right'\n}\n\nexport const NGB_CAROUSEL_DIRECTIVES = [NgbCarousel, NgbSlide];\n","import {NgModule, ModuleWithProviders} from '@angular/core';\nimport {CommonModule} from '@angular/common';\n\nimport {NGB_CAROUSEL_DIRECTIVES} from './carousel';\n\nexport {NgbCarousel, NgbSlide, NgbSlideEvent} from './carousel';\nexport {NgbCarouselConfig} from './carousel-config';\n\n@NgModule({declarations: NGB_CAROUSEL_DIRECTIVES, exports: NGB_CAROUSEL_DIRECTIVES, imports: [CommonModule]})\nexport class NgbCarouselModule {\n /**\n * Importing with '.forRoot()' is no longer necessary, you can simply import the module.\n * Will be removed in 4.0.0.\n *\n * @deprecated 3.0.0\n */\n static forRoot(): ModuleWithProviders { return {ngModule: NgbCarouselModule}; }\n}\n","import {Directive, Input} from '@angular/core';\n\n/**\n * A directive to provide a simple way of hiding and showing elements on the page.\n */\n@Directive({\n selector: '[ngbCollapse]',\n exportAs: 'ngbCollapse',\n host: {'[class.collapse]': 'true', '[class.show]': '!collapsed'}\n})\nexport class NgbCollapse {\n /**\n * If `true`, will collapse the element or show it otherwise.\n */\n @Input('ngbCollapse') collapsed = false;\n}\n","import {NgModule, ModuleWithProviders} from '@angular/core';\nimport {NgbCollapse} from './collapse';\n\nexport {NgbCollapse} from './collapse';\n\n@NgModule({declarations: [NgbCollapse], exports: [NgbCollapse]})\nexport class NgbCollapseModule {\n /**\n * Importing with '.forRoot()' is no longer necessary, you can simply import the module.\n * Will be removed in 4.0.0.\n *\n * @deprecated 3.0.0\n */\n static forRoot(): ModuleWithProviders { return {ngModule: NgbCollapseModule}; }\n}\n","import {NgbDateStruct} from './ngb-date-struct';\nimport {isInteger} from '../util/util';\n\n/**\n * A simple class that represents a date that datepicker also uses internally.\n *\n * It is the implementation of the `NgbDateStruct` interface that adds some convenience methods,\n * like `.equals()`, `.before()`, etc.\n *\n * All datepicker APIs consume `NgbDateStruct`, but return `NgbDate`.\n *\n * In many cases it is simpler to manipulate these objects together with\n * [`NgbCalendar`](#/components/datepicker/api#NgbCalendar) than native JS Dates.\n *\n * See the [date format overview](#/components/datepicker/overview#date-model) for more details.\n *\n * @since 3.0.0\n */\nexport class NgbDate implements NgbDateStruct {\n /**\n * The year, for example 2016\n */\n year: number;\n\n /**\n * The month, for example 1=Jan ... 12=Dec as in ISO 8601\n */\n month: number;\n\n /**\n * The day of month, starting with 1\n */\n day: number;\n\n /**\n * A **static method** that creates a new date object from the `NgbDateStruct`,\n *\n * ex. `NgbDate.from({year: 2000, month: 5, day: 1})`.\n *\n * If the `date` is already of `NgbDate` type, the method will return the same object.\n */\n static from(date: NgbDateStruct): NgbDate {\n if (date instanceof NgbDate) {\n return date;\n }\n return date ? new NgbDate(date.year, date.month, date.day) : null;\n }\n\n constructor(year: number, month: number, day: number) {\n this.year = isInteger(year) ? year : null;\n this.month = isInteger(month) ? month : null;\n this.day = isInteger(day) ? day : null;\n }\n\n /**\n * Checks if the current date is equal to another date.\n */\n equals(other: NgbDateStruct): boolean {\n return other && this.year === other.year && this.month === other.month && this.day === other.day;\n }\n\n /**\n * Checks if the current date is before another date.\n */\n before(other: NgbDateStruct): boolean {\n if (!other) {\n return false;\n }\n\n if (this.year === other.year) {\n if (this.month === other.month) {\n return this.day === other.day ? false : this.day < other.day;\n } else {\n return this.month < other.month;\n }\n } else {\n return this.year < other.year;\n }\n }\n\n /**\n * Checks if the current date is after another date.\n */\n after(other: NgbDateStruct): boolean {\n if (!other) {\n return false;\n }\n if (this.year === other.year) {\n if (this.month === other.month) {\n return this.day === other.day ? false : this.day > other.day;\n } else {\n return this.month > other.month;\n }\n } else {\n return this.year > other.year;\n }\n }\n}\n","import {NgbDate} from './ngb-date';\nimport {Injectable} from '@angular/core';\nimport {isInteger} from '../util/util';\n\nexport function fromJSDate(jsDate: Date) {\n return new NgbDate(jsDate.getFullYear(), jsDate.getMonth() + 1, jsDate.getDate());\n}\nexport function toJSDate(date: NgbDate) {\n const jsDate = new Date(date.year, date.month - 1, date.day, 12);\n // this is done avoid 30 -> 1930 conversion\n if (!isNaN(jsDate.getTime())) {\n jsDate.setFullYear(date.year);\n }\n return jsDate;\n}\n\nexport type NgbPeriod = 'y' | 'm' | 'd';\n\nexport function NGB_DATEPICKER_CALENDAR_FACTORY() {\n return new NgbCalendarGregorian();\n}\n\n/**\n * A service that represents the calendar used by the datepicker.\n *\n * The default implementation uses the Gregorian calendar. You can inject it in your own\n * implementations if necessary to simplify `NgbDate` calculations.\n */\n@Injectable({providedIn: 'root', useFactory: NGB_DATEPICKER_CALENDAR_FACTORY})\nexport abstract class NgbCalendar {\n /**\n * Returns the number of days per week.\n */\n abstract getDaysPerWeek(): number;\n\n /**\n * Returns an array of months per year.\n *\n * With default calendar we use ISO 8601 and return [1, 2, ..., 12];\n */\n abstract getMonths(year?: number): number[];\n\n /**\n * Returns the number of weeks per month.\n */\n abstract getWeeksPerMonth(): number;\n\n /**\n * Returns the weekday number for a given day.\n *\n * With the default calendar we use ISO 8601: 'weekday' is 1=Mon ... 7=Sun\n */\n abstract getWeekday(date: NgbDate): number;\n\n /**\n * Adds a number of years, months or days to a given date.\n *\n * * `period` can be `y`, `m` or `d` and defaults to day.\n * * `number` defaults to 1.\n *\n * Always returns a new date.\n */\n abstract getNext(date: NgbDate, period?: NgbPeriod, number?: number): NgbDate;\n\n /**\n * Subtracts a number of years, months or days from a given date.\n *\n * * `period` can be `y`, `m` or `d` and defaults to day.\n * * `number` defaults to 1.\n *\n * Always returns a new date.\n */\n abstract getPrev(date: NgbDate, period?: NgbPeriod, number?: number): NgbDate;\n\n /**\n * Returns the week number for a given week.\n */\n abstract getWeekNumber(week: NgbDate[], firstDayOfWeek: number): number;\n\n /**\n * Returns the today's date.\n */\n abstract getToday(): NgbDate;\n\n /**\n * Checks if a date is valid in the current calendar.\n */\n abstract isValid(date: NgbDate): boolean;\n}\n\n@Injectable()\nexport class NgbCalendarGregorian extends NgbCalendar {\n getDaysPerWeek() { return 7; }\n\n getMonths() { return [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]; }\n\n getWeeksPerMonth() { return 6; }\n\n getNext(date: NgbDate, period: NgbPeriod = 'd', number = 1) {\n let jsDate = toJSDate(date);\n\n switch (period) {\n case 'y':\n return new NgbDate(date.year + number, 1, 1);\n case 'm':\n jsDate = new Date(date.year, date.month + number - 1, 1, 12);\n break;\n case 'd':\n jsDate.setDate(jsDate.getDate() + number);\n break;\n default:\n return date;\n }\n\n return fromJSDate(jsDate);\n }\n\n getPrev(date: NgbDate, period: NgbPeriod = 'd', number = 1) { return this.getNext(date, period, -number); }\n\n getWeekday(date: NgbDate) {\n let jsDate = toJSDate(date);\n let day = jsDate.getDay();\n // in JS Date Sun=0, in ISO 8601 Sun=7\n return day === 0 ? 7 : day;\n }\n\n getWeekNumber(week: NgbDate[], firstDayOfWeek: number) {\n // in JS Date Sun=0, in ISO 8601 Sun=7\n if (firstDayOfWeek === 7) {\n firstDayOfWeek = 0;\n }\n\n const thursdayIndex = (4 + 7 - firstDayOfWeek) % 7;\n let date = week[thursdayIndex];\n\n const jsDate = toJSDate(date);\n jsDate.setDate(jsDate.getDate() + 4 - (jsDate.getDay() || 7)); // Thursday\n const time = jsDate.getTime();\n jsDate.setMonth(0); // Compare with Jan 1\n jsDate.setDate(1);\n return Math.floor(Math.round((time - jsDate.getTime()) / 86400000) / 7) + 1;\n }\n\n getToday(): NgbDate { return fromJSDate(new Date()); }\n\n isValid(date: NgbDate): boolean {\n if (!date || !isInteger(date.year) || !isInteger(date.month) || !isInteger(date.day)) {\n return false;\n }\n\n // year 0 doesn't exist in Gregorian calendar\n if (date.year === 0) {\n return false;\n }\n\n const jsDate = toJSDate(date);\n\n return !isNaN(jsDate.getTime()) && jsDate.getFullYear() === date.year && jsDate.getMonth() + 1 === date.month &&\n jsDate.getDate() === date.day;\n }\n}\n","import {NgbDate} from './ngb-date';\nimport {DatepickerViewModel, DayViewModel, MonthViewModel} from './datepicker-view-model';\nimport {NgbCalendar} from './ngb-calendar';\nimport {isDefined} from '../util/util';\nimport {NgbDatepickerI18n} from './datepicker-i18n';\n\nexport function isChangedDate(prev: NgbDate, next: NgbDate) {\n return !dateComparator(prev, next);\n}\n\nexport function isChangedMonth(prev: NgbDate, next: NgbDate) {\n return !prev && !next ? false : !prev || !next ? true : prev.year !== next.year || prev.month !== next.month;\n}\n\nexport function dateComparator(prev: NgbDate, next: NgbDate) {\n return (!prev && !next) || (!!prev && !!next && prev.equals(next));\n}\n\nexport function checkMinBeforeMax(minDate: NgbDate, maxDate: NgbDate) {\n if (maxDate && minDate && maxDate.before(minDate)) {\n throw new Error(`'maxDate' ${maxDate} should be greater than 'minDate' ${minDate}`);\n }\n}\n\nexport function checkDateInRange(date: NgbDate, minDate: NgbDate, maxDate: NgbDate): NgbDate {\n if (date && minDate && date.before(minDate)) {\n return minDate;\n }\n if (date && maxDate && date.after(maxDate)) {\n return maxDate;\n }\n\n return date;\n}\n\nexport function isDateSelectable(date: NgbDate, state: DatepickerViewModel) {\n const {minDate, maxDate, disabled, markDisabled} = state;\n // clang-format off\n return !(\n !isDefined(date) ||\n disabled ||\n (markDisabled && markDisabled(date, {year: date.year, month: date.month})) ||\n (minDate && date.before(minDate)) ||\n (maxDate && date.after(maxDate))\n );\n // clang-format on\n}\n\nexport function generateSelectBoxMonths(calendar: NgbCalendar, date: NgbDate, minDate: NgbDate, maxDate: NgbDate) {\n if (!date) {\n return [];\n }\n\n let months = calendar.getMonths(date.year);\n\n if (minDate && date.year === minDate.year) {\n const index = months.findIndex(month => month === minDate.month);\n months = months.slice(index);\n }\n\n if (maxDate && date.year === maxDate.year) {\n const index = months.findIndex(month => month === maxDate.month);\n months = months.slice(0, index + 1);\n }\n\n return months;\n}\n\nexport function generateSelectBoxYears(date: NgbDate, minDate: NgbDate, maxDate: NgbDate) {\n if (!date) {\n return [];\n }\n\n const start = minDate && minDate.year || date.year - 10;\n const end = maxDate && maxDate.year || date.year + 10;\n\n return Array.from({length: end - start + 1}, (e, i) => start + i);\n}\n\nexport function nextMonthDisabled(calendar: NgbCalendar, date: NgbDate, maxDate: NgbDate) {\n return maxDate && calendar.getNext(date, 'm').after(maxDate);\n}\n\nexport function prevMonthDisabled(calendar: NgbCalendar, date: NgbDate, minDate: NgbDate) {\n const prevDate = calendar.getPrev(date, 'm');\n return minDate && (prevDate.year === minDate.year && prevDate.month < minDate.month ||\n prevDate.year < minDate.year && minDate.month === 1);\n}\n\nexport function buildMonths(\n calendar: NgbCalendar, date: NgbDate, state: DatepickerViewModel, i18n: NgbDatepickerI18n,\n force: boolean): MonthViewModel[] {\n const {displayMonths, months} = state;\n // move old months to a temporary array\n const monthsToReuse = months.splice(0, months.length);\n\n // generate new first dates, nullify or reuse months\n const firstDates = Array.from({length: displayMonths}, (_, i) => {\n const firstDate = calendar.getNext(date, 'm', i);\n months[i] = null;\n\n if (!force) {\n const reusedIndex = monthsToReuse.findIndex(month => month.firstDate.equals(firstDate));\n // move reused month back to months\n if (reusedIndex !== -1) {\n months[i] = monthsToReuse.splice(reusedIndex, 1)[0];\n }\n }\n\n return firstDate;\n });\n\n // rebuild nullified months\n firstDates.forEach((firstDate, i) => {\n if (months[i] === null) {\n months[i] = buildMonth(calendar, firstDate, state, i18n, monthsToReuse.shift() || {} as MonthViewModel);\n }\n });\n\n return months;\n}\n\nexport function buildMonth(\n calendar: NgbCalendar, date: NgbDate, state: DatepickerViewModel, i18n: NgbDatepickerI18n,\n month: MonthViewModel = {} as MonthViewModel): MonthViewModel {\n const {dayTemplateData, minDate, maxDate, firstDayOfWeek, markDisabled, outsideDays} = state;\n const calendarToday = calendar.getToday();\n\n month.firstDate = null;\n month.lastDate = null;\n month.number = date.month;\n month.year = date.year;\n month.weeks = month.weeks || [];\n month.weekdays = month.weekdays || [];\n\n date = getFirstViewDate(calendar, date, firstDayOfWeek);\n\n // month has weeks\n for (let week = 0; week < calendar.getWeeksPerMonth(); week++) {\n let weekObject = month.weeks[week];\n if (!weekObject) {\n weekObject = month.weeks[week] = {number: 0, days: [], collapsed: true};\n }\n const days = weekObject.days;\n\n // week has days\n for (let day = 0; day < calendar.getDaysPerWeek(); day++) {\n if (week === 0) {\n month.weekdays[day] = calendar.getWeekday(date);\n }\n\n const newDate = new NgbDate(date.year, date.month, date.day);\n const nextDate = calendar.getNext(newDate);\n\n const ariaLabel = i18n.getDayAriaLabel(newDate);\n\n // marking date as disabled\n let disabled = !!((minDate && newDate.before(minDate)) || (maxDate && newDate.after(maxDate)));\n if (!disabled && markDisabled) {\n disabled = markDisabled(newDate, {month: month.number, year: month.year});\n }\n\n // today\n let today = newDate.equals(calendarToday);\n\n // adding user-provided data to the context\n let contextUserData =\n dayTemplateData ? dayTemplateData(newDate, {month: month.number, year: month.year}) : undefined;\n\n // saving first date of the month\n if (month.firstDate === null && newDate.month === month.number) {\n month.firstDate = newDate;\n }\n\n // saving last date of the month\n if (newDate.month === month.number && nextDate.month !== month.number) {\n month.lastDate = newDate;\n }\n\n let dayObject = days[day];\n if (!dayObject) {\n dayObject = days[day] = {} as DayViewModel;\n }\n dayObject.date = newDate;\n dayObject.context = Object.assign(dayObject.context || {}, {\n $implicit: newDate,\n date: newDate,\n data: contextUserData,\n currentMonth: month.number, disabled,\n focused: false,\n selected: false, today\n });\n dayObject.tabindex = -1;\n dayObject.ariaLabel = ariaLabel;\n dayObject.hidden = false;\n\n date = nextDate;\n }\n\n weekObject.number = calendar.getWeekNumber(days.map(day => day.date), firstDayOfWeek);\n\n // marking week as collapsed\n weekObject.collapsed = outsideDays === 'collapsed' && days[0].date.month !== month.number &&\n days[days.length - 1].date.month !== month.number;\n }\n\n return month;\n}\n\nexport function getFirstViewDate(calendar: NgbCalendar, date: NgbDate, firstDayOfWeek: number): NgbDate {\n const daysPerWeek = calendar.getDaysPerWeek();\n const firstMonthDate = new NgbDate(date.year, date.month, 1);\n const dayOfWeek = calendar.getWeekday(firstMonthDate) % daysPerWeek;\n return calendar.getPrev(firstMonthDate, 'd', (daysPerWeek + dayOfWeek - firstDayOfWeek) % daysPerWeek);\n}\n","import {Inject, Injectable, LOCALE_ID} from '@angular/core';\nimport {FormStyle, getLocaleDayNames, getLocaleMonthNames, TranslationWidth, formatDate} from '@angular/common';\nimport {NgbDateStruct} from './ngb-date-struct';\n\nexport function NGB_DATEPICKER_18N_FACTORY(locale) {\n return new NgbDatepickerI18nDefault(locale);\n}\n\n/**\n * A service supplying i18n data to the datepicker component.\n *\n * The default implementation of this service uses the Angular locale and registered locale data for\n * weekdays and month names (as explained in the Angular i18n guide).\n *\n * It also provides a way to i18n data that depends on calendar calculations, like aria labels, day, week and year\n * numerals. For other static labels the datepicker uses the default Angular i18n.\n *\n * See the [i18n demo](#/components/datepicker/examples#i18n) and\n * [Hebrew calendar demo](#/components/datepicker/calendars#hebrew) on how to extend this class and define\n * a custom provider for i18n.\n */\n@Injectable({providedIn: 'root', useFactory: NGB_DATEPICKER_18N_FACTORY, deps: [LOCALE_ID]})\nexport abstract class NgbDatepickerI18n {\n /**\n * Returns the short weekday name to display in the heading of the month view.\n *\n * With default calendar we use ISO 8601: 'weekday' is 1=Mon ... 7=Sun.\n */\n abstract getWeekdayShortName(weekday: number): string;\n\n /**\n * Returns the short month name to display in the date picker navigation.\n *\n * With default calendar we use ISO 8601: 'month' is 1=Jan ... 12=Dec.\n */\n abstract getMonthShortName(month: number, year?: number): string;\n\n /**\n * Returns the full month name to display in the date picker navigation.\n *\n * With default calendar we use ISO 8601: 'month' is 1=Jan ... 12=Dec.\n */\n abstract getMonthFullName(month: number, year?: number): string;\n\n /**\n * Returns the value of the `aria-label` attribute for a specific date.\n *\n * @since 2.0.0\n */\n abstract getDayAriaLabel(date: NgbDateStruct): string;\n\n /**\n * Returns the textual representation of a day that is rendered in a day cell.\n *\n * @since 3.0.0\n */\n getDayNumerals(date: NgbDateStruct): string { return `${date.day}`; }\n\n /**\n * Returns the textual representation of a week number rendered by datepicker.\n *\n * @since 3.0.0\n */\n getWeekNumerals(weekNumber: number): string { return `${weekNumber}`; }\n\n /**\n * Returns the textual representation of a year that is rendered in the datepicker year select box.\n *\n * @since 3.0.0\n */\n getYearNumerals(year: number): string { return `${year}`; }\n}\n\n@Injectable()\nexport class NgbDatepickerI18nDefault extends NgbDatepickerI18n {\n private _weekdaysShort: Array<string>;\n private _monthsShort: Array<string>;\n private _monthsFull: Array<string>;\n\n constructor(@Inject(LOCALE_ID) private _locale: string) {\n super();\n\n const weekdaysStartingOnSunday = getLocaleDayNames(_locale, FormStyle.Standalone, TranslationWidth.Short);\n this._weekdaysShort = weekdaysStartingOnSunday.map((day, index) => weekdaysStartingOnSunday[(index + 1) % 7]);\n\n this._monthsShort = getLocaleMonthNames(_locale, FormStyle.Standalone, TranslationWidth.Abbreviated);\n this._monthsFull = getLocaleMonthNames(_locale, FormStyle.Standalone, TranslationWidth.Wide);\n }\n\n getWeekdayShortName(weekday: number): string { return this._weekdaysShort[weekday - 1]; }\n\n getMonthShortName(month: number): string { return this._monthsShort[month - 1]; }\n\n getMonthFullName(month: number): string { return this._monthsFull[month - 1]; }\n\n getDayAriaLabel(date: NgbDateStruct): string {\n const jsDate = new Date(date.year, date.month - 1, date.day);\n return formatDate(jsDate, 'fullDate', this._locale);\n }\n}\n","import {NgbCalendar, NgbPeriod} from './ngb-calendar';\nimport {NgbDate} from './ngb-date';\nimport {NgbDateStruct} from './ngb-date-struct';\nimport {DatepickerViewModel, NgbDayTemplateData, NgbMarkDisabled} from './datepicker-view-model';\nimport {Injectable} from '@angular/core';\nimport {isInteger, toInteger} from '../util/util';\nimport {Observable, Subject} from 'rxjs';\nimport {\n buildMonths,\n checkDateInRange,\n checkMinBeforeMax,\n isChangedDate,\n isChangedMonth,\n isDateSelectable,\n generateSelectBoxYears,\n generateSelectBoxMonths,\n prevMonthDisabled,\n nextMonthDisabled\n} from './datepicker-tools';\n\nimport {filter} from 'rxjs/operators';\nimport {NgbDatepickerI18n} from './datepicker-i18n';\n\n@Injectable()\nexport class NgbDatepickerService {\n private _model$ = new Subject<DatepickerViewModel>();\n\n private _select$ = new Subject<NgbDate>();\n\n private _state: DatepickerViewModel = {\n disabled: false,\n displayMonths: 1,\n firstDayOfWeek: 1,\n focusVisible: false,\n months: [],\n navigation: 'select',\n outsideDays: 'visible',\n prevDisabled: false,\n nextDisabled: false,\n selectBoxes: {years: [], months: []},\n selectedDate: null\n };\n\n get model$(): Observable<DatepickerViewModel> { return this._model$.pipe(filter(model => model.months.length > 0)); }\n\n get select$(): Observable<NgbDate> { return this._select$.pipe(filter(date => date !== null)); }\n\n set dayTemplateData(dayTemplateData: NgbDayTemplateData) {\n if (this._state.dayTemplateData !== dayTemplateData) {\n this._nextState({dayTemplateData});\n }\n }\n\n set disabled(disabled: boolean) {\n if (this._state.disabled !== disabled) {\n this._nextState({disabled});\n }\n }\n\n set displayMonths(displayMonths: number) {\n displayMonths = toInteger(displayMonths);\n if (isInteger(displayMonths) && displayMonths > 0 && this._state.displayMonths !== displayMonths) {\n this._nextState({displayMonths});\n }\n }\n\n set firstDayOfWeek(firstDayOfWeek: number) {\n firstDayOfWeek = toInteger(firstDayOfWeek);\n if (isInteger(firstDayOfWeek) && firstDayOfWeek >= 0 && this._state.firstDayOfWeek !== firstDayOfWeek) {\n this._nextState({firstDayOfWeek});\n }\n }\n\n set focusVisible(focusVisible: boolean) {\n if (this._state.focusVisible !== focusVisible && !this._state.disabled) {\n this._nextState({focusVisible});\n }\n }\n\n set maxDate(date: NgbDate) {\n const maxDate = this.toValidDate(date, null);\n if (isChangedDate(this._state.maxDate, maxDate)) {\n this._nextState({maxDate});\n }\n }\n\n set markDisabled(markDisabled: NgbMarkDisabled) {\n if (this._state.markDisabled !== markDisabled) {\n this._nextState({markDisabled});\n }\n }\n\n set minDate(date: NgbDate) {\n const minDate = this.toValidDate(date, null);\n if (isChangedDate(this._state.minDate, minDate)) {\n this._nextState({minDate});\n }\n }\n\n set navigation(navigation: 'select' | 'arrows' | 'none') {\n if (this._state.navigation !== navigation) {\n this._nextState({navigation});\n }\n }\n\n set outsideDays(outsideDays: 'visible' | 'collapsed' | 'hidden') {\n if (this._state.outsideDays !== outsideDays) {\n this._nextState({outsideDays});\n }\n }\n\n constructor(private _calendar: NgbCalendar, private _i18n: NgbDatepickerI18n) {}\n\n focus(date: NgbDate) {\n if (!this._state.disabled && this._calendar.isValid(date) && isChangedDate(this._state.focusDate, date)) {\n this._nextState({focusDate: date});\n }\n }\n\n focusMove(period?: NgbPeriod, number?: number) {\n this.focus(this._calendar.getNext(this._state.focusDate, period, number));\n }\n\n focusSelect() {\n if (isDateSelectable(this._state.focusDate, this._state)) {\n this.select(this._state.focusDate, {emitEvent: true});\n }\n }\n\n open(date: NgbDate) {\n const firstDate = this.toValidDate(date, this._calendar.getToday());\n if (!this._state.disabled && (!this._state.firstDate || isChangedMonth(this._state.firstDate, date))) {\n this._nextState({firstDate});\n }\n }\n\n select(date: NgbDate, options: {emitEvent?: boolean} = {}) {\n const selectedDate = this.toValidDate(date, null);\n if (!this._state.disabled) {\n if (isChangedDate(this._state.selectedDate, selectedDate)) {\n this._nextState({selectedDate});\n }\n\n if (options.emitEvent && isDateSelectable(selectedDate, this._state)) {\n this._select$.next(selectedDate);\n }\n }\n }\n\n toValidDate(date: NgbDateStruct, defaultValue?: NgbDate): NgbDate {\n const ngbDate = NgbDate.from(date);\n if (defaultValue === undefined) {\n defaultValue = this._calendar.getToday();\n }\n return this._calendar.isValid(ngbDate) ? ngbDate : defaultValue;\n }\n\n private _nextState(patch: Partial<DatepickerViewModel>) {\n const newState = this._updateState(patch);\n this._patchContexts(newState);\n this._state = newState;\n this._model$.next(this._state);\n }\n\n private _patchContexts(state: DatepickerViewModel) {\n const {months, displayMonths, selectedDate, focusDate, focusVisible, disabled, outsideDays} = state;\n state.months.forEach(month => {\n month.weeks.forEach(week => {\n week.days.forEach(day => {\n\n // patch focus flag\n if (focusDate) {\n day.context.focused = focusDate.equals(day.date) && focusVisible;\n }\n\n // calculating tabindex\n day.tabindex = !disabled && day.date.equals(focusDate) && focusDate.month === month.number ? 0 : -1;\n\n // override context disabled\n if (disabled === true) {\n day.context.disabled = true;\n }\n\n // patch selection flag\n if (selectedDate !== undefined) {\n day.context.selected = selectedDate !== null && selectedDate.equals(day.date);\n }\n\n // visibility\n if (month.number !== day.date.month) {\n day.hidden = outsideDays === 'hidden' || outsideDays === 'collapsed' ||\n (displayMonths > 1 && day.date.after(months[0].firstDate) &&\n day.date.before(months[displayMonths - 1].lastDate));\n }\n });\n });\n });\n }\n\n private _updateState(patch: Partial<DatepickerViewModel>): DatepickerViewModel {\n // patching fields\n const state = Object.assign({}, this._state, patch);\n\n let startDate = state.firstDate;\n\n // min/max dates changed\n if ('minDate' in patch || 'maxDate' in patch) {\n checkMinBeforeMax(state.minDate, state.maxDate);\n state.focusDate = checkDateInRange(state.focusDate, state.minDate, state.maxDate);\n state.firstDate = checkDateInRange(state.firstDate, state.minDate, state.maxDate);\n startDate = state.focusDate;\n }\n\n // disabled\n if ('disabled' in patch) {\n state.focusVisible = false;\n }\n\n // initial rebuild via 'select()'\n if ('selectedDate' in patch && this._state.months.length === 0) {\n startDate = state.selectedDate;\n }\n\n // terminate early if only focus visibility was changed\n if ('focusVisible' in patch) {\n return state;\n }\n\n // focus date changed\n if ('focusDate' in patch) {\n state.focusDate = checkDateInRange(state.focusDate, state.minDate, state.maxDate);\n startDate = state.focusDate;\n\n // nothing to rebuild if only focus changed and it is still visible\n if (state.months.length !== 0 && !state.focusDate.before(state.firstDate) &&\n !state.focusDate.after(state.lastDate)) {\n return state;\n }\n }\n\n // first date changed\n if ('firstDate' in patch) {\n state.firstDate = checkDateInRange(state.firstDate, state.minDate, state.maxDate);\n startDate = state.firstDate;\n }\n\n // rebuilding months\n if (startDate) {\n const forceRebuild = 'dayTemplateData' in patch || 'firstDayOfWeek' in patch || 'markDisabled' in patch ||\n 'minDate' in patch || 'maxDate' in patch || 'disabled' in patch || 'outsideDays' in patch;\n\n const months = buildMonths(this._calendar, startDate, state, this._i18n, forceRebuild);\n\n // updating months and boundary dates\n state.months = months;\n state.firstDate = months.length > 0 ? months[0].firstDate : undefined;\n state.lastDate = months.length > 0 ? months[months.length - 1].lastDate : undefined;\n\n // reset selected date if 'markDisabled' returns true\n if ('selectedDate' in patch && !isDateSelectable(state.selectedDate, state)) {\n state.selectedDate = null;\n }\n\n // adjusting focus after months were built\n if ('firstDate' in patch) {\n if (state.focusDate === undefined || state.focusDate.before(state.firstDate) ||\n state.focusDate.after(state.lastDate)) {\n state.focusDate = startDate;\n }\n }\n\n // adjusting months/years for the select box navigation\n const yearChanged = !this._state.firstDate || this._state.firstDate.year !== state.firstDate.year;\n const monthChanged = !this._state.firstDate || this._state.firstDate.month !== state.firstDate.month;\n if (state.navigation === 'select') {\n // years -> boundaries (min/max were changed)\n if ('minDate' in patch || 'maxDate' in patch || state.selectBoxes.years.length === 0 || yearChanged) {\n state.selectBoxes.years = generateSelectBoxYears(state.firstDate, state.minDate, state.maxDate);\n }\n\n // months -> when current year or boundaries change\n if ('minDate' in patch || 'maxDate' in patch || state.selectBoxes.months.length === 0 || yearChanged) {\n state.selectBoxes.months =\n generateSelectBoxMonths(this._calendar, state.firstDate, state.minDate, state.maxDate);\n }\n } else {\n state.selectBoxes = {years: [], months: []};\n }\n\n // updating navigation arrows -> boundaries change (min/max) or month/year changes\n if ((state.navigation === 'arrows' || state.navigation === 'select') &&\n (monthChanged || yearChanged || 'minDate' in patch || 'maxDate' in patch || 'disabled' in patch)) {\n state.prevDisabled = state.disabled || prevMonthDisabled(this._calendar, state.firstDate, state.minDate);\n state.nextDisabled = state.disabled || nextMonthDisabled(this._calendar, state.lastDate, state.maxDate);\n }\n }\n\n return state;\n }\n}\n","export enum Key {\n Tab = 9,\n Enter = 13,\n Escape = 27,\n Space = 32,\n PageUp = 33,\n PageDown = 34,\n End = 35,\n Home = 36,\n ArrowLeft = 37,\n ArrowUp = 38,\n ArrowRight = 39,\n ArrowDown = 40\n}\n","import {Injectable} from '@angular/core';\nimport {NgbDatepickerService} from './datepicker-service';\nimport {NgbCalendar} from './ngb-calendar';\nimport {Key} from '../util/key';\nimport {NgbDate} from './ngb-date';\n\n@Injectable()\nexport class NgbDatepickerKeyMapService {\n private _minDate: NgbDate;\n private _maxDate: NgbDate;\n private _firstViewDate: NgbDate;\n private _lastViewDate: NgbDate;\n\n constructor(private _service: NgbDatepickerService, private _calendar: NgbCalendar) {\n _service.model$.subscribe(model => {\n this._minDate = model.minDate;\n this._maxDate = model.maxDate;\n this._firstViewDate = model.firstDate;\n this._lastViewDate = model.lastDate;\n });\n }\n\n processKey(event: KeyboardEvent) {\n // tslint:disable-next-line:deprecation\n switch (event.which) {\n case Key.PageUp:\n this._service.focusMove(event.shiftKey ? 'y' : 'm', -1);\n break;\n case Key.PageDown:\n this._service.focusMove(event.shiftKey ? 'y' : 'm', 1);\n break;\n case Key.End:\n this._service.focus(event.shiftKey ? this._maxDate : this._lastViewDate);\n break;\n case Key.Home:\n this._service.focus(event.shiftKey ? this._minDate : this._firstViewDate);\n break;\n case Key.ArrowLeft:\n this._service.focusMove('d', -1);\n break;\n case Key.ArrowUp:\n this._service.focusMove('d', -this._calendar.getDaysPerWeek());\n break;\n case Key.ArrowRight:\n this._service.focusMove('d', 1);\n break;\n case Key.ArrowDown:\n this._service.focusMove('d', this._calendar.getDaysPerWeek());\n break;\n case Key.Enter:\n case Key.Space:\n this._service.focusSelect();\n break;\n default:\n return;\n }\n\n // note 'return' in default case\n event.preventDefault();\n event.stopPropagation();\n }\n}\n","import {NgbDate} from './ngb-date';\nimport {NgbDateStruct} from './ngb-date-struct';\nimport {DayTemplateContext} from './datepicker-day-template-context';\n\nexport type NgbMarkDisabled = (date: NgbDateStruct, current: {year: number, month: number}) => boolean;\nexport type NgbDayTemplateData = (date: NgbDateStruct, current: {year: number, month: number}) => any;\n\nexport type DayViewModel = {\n date: NgbDate,\n context: DayTemplateContext,\n tabindex: number,\n ariaLabel: string,\n hidden: boolean\n};\n\nexport type WeekViewModel = {\n number: number,\n days: DayViewModel[],\n collapsed: boolean\n};\n\nexport type MonthViewModel = {\n firstDate: NgbDate,\n lastDate: NgbDate,\n number: number,\n year: number,\n weeks: WeekViewModel[],\n weekdays: number[]\n};\n\n// clang-format off\nexport type DatepickerViewModel = {\n dayTemplateData?: NgbDayTemplateData,\n disabled: boolean,\n displayMonths: number,\n firstDate?: NgbDate,\n firstDayOfWeek: number,\n focusDate?: NgbDate,\n focusVisible: boolean,\n lastDate?: NgbDate,\n markDisabled?: NgbMarkDisabled,\n maxDate?: NgbDate,\n minDate?: NgbDate,\n months: MonthViewModel[],\n navigation: 'select' | 'arrows' | 'none',\n outsideDays: 'visible' | 'collapsed' | 'hidden',\n prevDisabled: boolean,\n nextDisabled: boolean,\n selectBoxes: {\n years: number[],\n months: number[]\n },\n selectedDate: NgbDate\n};\n// clang-format on\n\nexport enum NavigationEvent {\n PREV,\n NEXT\n}\n","import {Injectable, TemplateRef} from '@angular/core';\nimport {DayTemplateContext} from './datepicker-day-template-context';\nimport {NgbDateStruct} from './ngb-date-struct';\n\n/**\n * A configuration service for the [`NgbDatepicker`](#/components/datepicker/api#NgbDatepicker) component.\n *\n * You can inject this service, typically in your root component, and customize the values of its properties in\n * order to provide default values for all the datepickers used in the application.\n */\n@Injectable({providedIn: 'root'})\nexport class NgbDatepickerConfig {\n dayTemplate: TemplateRef<DayTemplateContext>;\n dayTemplateData: (date: NgbDateStruct, current: {year: number, month: number}) => any;\n footerTemplate: TemplateRef<any>;\n displayMonths = 1;\n firstDayOfWeek = 1;\n markDisabled: (date: NgbDateStruct, current: {year: number, month: number}) => boolean;\n minDate: NgbDateStruct;\n maxDate: NgbDateStruct;\n navigation: 'select' | 'arrows' | 'none' = 'select';\n outsideDays: 'visible' | 'collapsed' | 'hidden' = 'visible';\n showWeekdays = true;\n showWeekNumbers = false;\n startDate: {year: number, month: number};\n}\n","import {Injectable} from '@angular/core';\nimport {NgbDateStruct} from '../ngb-date-struct';\nimport {isInteger} from '../../util/util';\n\nexport function NGB_DATEPICKER_DATE_ADAPTER_FACTORY() {\n return new NgbDateStructAdapter();\n}\n\n/**\n * An abstract service that does the conversion between the internal datepicker `NgbDateStruct` model and\n * any provided user date model `D`, ex. a string, a native date, etc.\n *\n * The adapter is used **only** for conversion when binding datepicker to a form control,\n * ex. `[(ngModel)]=\"userDateModel\"`. Here `userDateModel` can be of any type.\n *\n * The default datepicker implementation assumes we use `NgbDateStruct` as a user model.\n *\n * See the [date format overview](#/components/datepicker/overview#date-model) for more details\n * and the [custom adapter demo](#/components/datepicker/examples#adapter) for an example.\n */\n@Injectable({providedIn: 'root', useFactory: NGB_DATEPICKER_DATE_ADAPTER_FACTORY})\nexport abstract class NgbDateAdapter<D> {\n /**\n * Converts a user-model date of type `D` to an `NgbDateStruct` for internal use.\n */\n abstract fromModel(value: D): NgbDateStruct;\n\n /**\n * Converts an internal `NgbDateStruct` date to a user-model date of type `D`.\n */\n abstract toModel(date: NgbDateStruct): D;\n}\n\n@Injectable()\nexport class NgbDateStructAdapter extends NgbDateAdapter<NgbDateStruct> {\n /**\n * Converts a NgbDateStruct value into NgbDateStruct value\n */\n fromModel(date: NgbDateStruct): NgbDateStruct {\n return (date && isInteger(date.year) && isInteger(date.month) && isInteger(date.day)) ?\n {year: date.year, month: date.month, day: date.day} :\n null;\n }\n\n /**\n * Converts a NgbDateStruct value into NgbDateStruct value\n */\n toModel(date: NgbDateStruct): NgbDateStruct {\n return (date && isInteger(date.year) && isInteger(date.month) && isInteger(date.day)) ?\n {year: date.year, month: date.month, day: date.day} :\n null;\n }\n}\n","import {fromEvent, merge, Subject} from 'rxjs';\nimport {filter, take, takeUntil} from 'rxjs/operators';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n forwardRef,\n Input,\n NgZone,\n OnChanges,\n OnDestroy,\n OnInit,\n Output,\n SimpleChanges,\n TemplateRef,\n ViewChild,\n ViewEncapsulation\n} from '@angular/core';\nimport {ControlValueAccessor, NG_VALUE_ACCESSOR} from '@angular/forms';\nimport {NgbCalendar} from './ngb-calendar';\nimport {NgbDate} from './ngb-date';\nimport {NgbDatepickerService} from './datepicker-service';\nimport {NgbDatepickerKeyMapService} from './datepicker-keymap-service';\nimport {DatepickerViewModel, NavigationEvent} from './datepicker-view-model';\nimport {DayTemplateContext} from './datepicker-day-template-context';\nimport {NgbDatepickerConfig} from './datepicker-config';\nimport {NgbDateAdapter} from './adapters/ngb-date-adapter';\nimport {NgbDateStruct} from './ngb-date-struct';\nimport {NgbDatepickerI18n} from './datepicker-i18n';\nimport {isChangedDate, isChangedMonth} from './datepicker-tools';\nimport {hasClassName} from '../util/util';\n\nconst NGB_DATEPICKER_VALUE_ACCESSOR = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => NgbDatepicker),\n multi: true\n};\n\n/**\n * An event emitted right before the navigation happens and the month displayed by the datepicker changes.\n */\nexport interface NgbDatepickerNavigateEvent {\n /**\n * The currently displayed month.\n */\n current: {year: number, month: number};\n\n /**\n * The month we're navigating to.\n */\n next: {year: number, month: number};\n\n /**\n * Calling this function will prevent navigation from happening.\n *\n * @since 4.1.0\n */\n preventDefault: () => void;\n}\n\n/**\n * A highly configurable component that helps you with selecting calendar dates.\n *\n * `NgbDatepicker` is meant to be displayed inline on a page or put inside a popup.\n */\n@Component({\n exportAs: 'ngbDatepicker',\n selector: 'ngb-datepicker',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n styleUrls: ['./datepicker.scss'],\n template: `\n <ng-template #dt let-date=\"date\" let-currentMonth=\"currentMonth\" let-selected=\"selected\" let-disabled=\"disabled\" let-focused=\"focused\">\n <div ngbDatepickerDayView\n [date]=\"date\"\n [currentMonth]=\"currentMonth\"\n [selected]=\"selected\"\n [disabled]=\"disabled\"\n [focused]=\"focused\">\n </div>\n </ng-template>\n\n <div class=\"ngb-dp-header bg-light\">\n <ngb-datepicker-navigation *ngIf=\"navigation !== 'none'\"\n [date]=\"model.firstDate\"\n [months]=\"model.months\"\n [disabled]=\"model.disabled\"\n [showSelect]=\"model.navigation === 'select'\"\n [prevDisabled]=\"model.prevDisabled\"\n [nextDisabled]=\"model.nextDisabled\"\n [selectBoxes]=\"model.selectBoxes\"\n (navigate)=\"onNavigateEvent($event)\"\n (select)=\"onNavigateDateSelect($event)\">\n </ngb-datepicker-navigation>\n </div>\n\n <div #months class=\"ngb-dp-months\" (keydown)=\"onKeyDown($event)\">\n <ng-template ngFor let-month [ngForOf]=\"model.months\" let-i=\"index\">\n <div class=\"ngb-dp-month\">\n <div *ngIf=\"navigation === 'none' || (displayMonths > 1 && navigation === 'select')\"\n class=\"ngb-dp-month-name bg-light\">\n {{ i18n.getMonthFullName(month.number, month.year) }} {{ i18n.getYearNumerals(month.year) }}\n </div>\n <ngb-datepicker-month-view\n [month]=\"month\"\n [dayTemplate]=\"dayTemplate || dt\"\n [showWeekdays]=\"showWeekdays\"\n [showWeekNumbers]=\"showWeekNumbers\"\n (select)=\"onDateSelect($event)\">\n </ngb-datepicker-month-view>\n </div>\n </ng-template>\n </div>\n\n <ng-template [ngTemplateOutlet]=\"footerTemplate\"></ng-template>\n `,\n providers: [NGB_DATEPICKER_VALUE_ACCESSOR, NgbDatepickerService, NgbDatepickerKeyMapService]\n})\nexport class NgbDatepicker implements OnDestroy,\n OnChanges, OnInit, AfterViewInit, ControlValueAccessor {\n model: DatepickerViewModel;\n\n @ViewChild('months') private _monthsEl: ElementRef<HTMLElement>;\n private _controlValue: NgbDate;\n private _destroyed$ = new Subject<void>();\n\n /**\n * The reference to a custom template for the day.\n *\n * Allows to completely override the way a day 'cell' in the calendar is displayed.\n *\n * See [`DayTemplateContext`](#/components/datepicker/api#DayTemplateContext) for the data you get inside.\n */\n @Input() dayTemplate: TemplateRef<DayTemplateContext>;\n\n /**\n * The callback to pass any arbitrary data to the template cell via the\n * [`DayTemplateContext`](#/components/datepicker/api#DayTemplateContext)'s `data` parameter.\n *\n * `current` is the month that is currently displayed by the datepicker.\n *\n * @since 3.3.0\n */\n @Input() dayTemplateData: (date: NgbDate, current: {year: number, month: number}) => any;\n\n /**\n * The number of months to display.\n */\n @Input() displayMonths: number;\n\n /**\n * The first day of the week.\n *\n * With default calendar we use ISO 8601: 'weekday' is 1=Mon ... 7=Sun.\n */\n @Input() firstDayOfWeek: number;\n\n /**\n * The reference to the custom template for the datepicker footer.\n *\n * @since 3.3.0\n */\n @Input() footerTemplate: TemplateRef<any>;\n\n /**\n * The callback to mark some dates as disabled.\n *\n * It is called for each new date when navigating to a different month.\n *\n * `current` is the month that is currently displayed by the datepicker.\n */\n @Input() markDisabled: (date: NgbDate, current: {year: number, month: number}) => boolean;\n\n /**\n * The latest date that can be displayed or selected.\n *\n * If not provided, 'year' select box will display 10 years after the current month.\n */\n @Input() maxDate: NgbDateStruct;\n\n /**\n * The earliest date that can be displayed or selected.\n *\n * If not provided, 'year' select box will display 10 years before the current month.\n */\n @Input() minDate: NgbDateStruct;\n\n /**\n * Navigation type.\n *\n * * `\"select\"` - select boxes for month and navigation arrows\n * * `\"arrows\"` - only navigation arrows\n * * `\"none\"` - no navigation visible at all\n */\n @Input() navigation: 'select' | 'arrows' | 'none';\n\n /**\n * The way of displaying days that don't belong to the current month.\n *\n * * `\"visible\"` - days are visible\n * * `\"hidden\"` - days are hidden, white space preserved\n * * `\"collapsed\"` - days are collapsed, so the datepicker height might change between months\n *\n * For the 2+ months view, days in between months are never shown.\n */\n @Input() outsideDays: 'visible' | 'collapsed' | 'hidden';\n\n /**\n * If `true`, weekdays will be displayed.\n */\n @Input() showWeekdays: boolean;\n\n /**\n * If `true`, week numbers will be displayed.\n */\n @Input() showWeekNumbers: boolean;\n\n /**\n * The date to open calendar with.\n *\n * With the default calendar we use ISO 8601: 'month' is 1=Jan ... 12=Dec.\n * If nothing or invalid date is provided, calendar will open with current month.\n *\n * You could use `navigateTo(date)` method as an alternative.\n */\n @Input() startDate: {year: number, month: number, day?: number};\n\n /**\n * An event emitted right before the navigation happens and displayed month changes.\n *\n * See [`NgbDatepickerNavigateEvent`](#/components/datepicker/api#NgbDatepickerNavigateEvent) for the payload info.\n */\n @Output() navigate = new EventEmitter<NgbDatepickerNavigateEvent>();\n\n /**\n * An event emitted when user selects a date using keyboard or mouse.\n *\n * The payload of the event is currently selected `NgbDate`.\n */\n @Output() select = new EventEmitter<NgbDate>();\n\n onChange = (_: any) => {};\n onTouched = () => {};\n\n constructor(\n private _keyMapService: NgbDatepickerKeyMapService, public _service: NgbDatepickerService,\n private _calendar: NgbCalendar, public i18n: NgbDatepickerI18n, config: NgbDatepickerConfig,\n private _cd: ChangeDetectorRef, private _elementRef: ElementRef<HTMLElement>,\n private _ngbDateAdapter: NgbDateAdapter<any>, private _ngZone: NgZone) {\n ['dayTemplate', 'dayTemplateData', 'displayMonths', 'firstDayOfWeek', 'footerTemplate', 'markDisabled', 'minDate',\n 'maxDate', 'navigation', 'outsideDays', 'showWeekdays', 'showWeekNumbers', 'startDate']\n .forEach(input => this[input] = config[input]);\n\n _service.select$.pipe(takeUntil(this._destroyed$)).subscribe(date => { this.select.emit(date); });\n\n _service.model$.pipe(takeUntil(this._destroyed$)).subscribe(model => {\n const newDate = model.firstDate;\n const oldDate = this.model ? this.model.firstDate : null;\n\n let navigationPrevented = false;\n // emitting navigation event if the first month changes\n if (!newDate.equals(oldDate)) {\n this.navigate.emit({\n current: oldDate ? {year: oldDate.year, month: oldDate.month} : null,\n next: {year: newDate.year, month: newDate.month},\n preventDefault: () => navigationPrevented = true\n });\n\n // can't prevent the very first navigation\n if (navigationPrevented && oldDate !== null) {\n this._service.open(oldDate);\n return;\n }\n }\n\n const newSelectedDate = model.selectedDate;\n const newFocusedDate = model.focusDate;\n const oldFocusedDate = this.model ? this.model.focusDate : null;\n\n this.model = model;\n\n // handling selection change\n if (isChangedDate(newSelectedDate, this._controlValue)) {\n this._controlValue = newSelectedDate;\n this.onTouched();\n this.onChange(this._ngbDateAdapter.toModel(newSelectedDate));\n }\n\n // handling focus change\n if (isChangedDate(newFocusedDate, oldFocusedDate) && oldFocusedDate && model.focusVisible) {\n this.focus();\n }\n\n _cd.markForCheck();\n });\n }\n\n focus() {\n this._ngZone.onStable.asObservable().pipe(take(1)).subscribe(() => {\n const elementToFocus =\n this._elementRef.nativeElement.querySelector<HTMLDivElement>('div.ngb-dp-day[tabindex=\"0\"]');\n if (elementToFocus) {\n elementToFocus.focus();\n }\n });\n }\n\n /**\n * Navigates to the provided date.\n *\n * With the default calendar we use ISO 8601: 'month' is 1=Jan ... 12=Dec.\n * If nothing or invalid date provided calendar will open current month.\n *\n * Use the `[startDate]` input as an alternative.\n */\n navigateTo(date?: {year: number, month: number, day?: number}) {\n this._service.open(NgbDate.from(date ? date.day ? date as NgbDateStruct : {...date, day: 1} : null));\n }\n\n ngAfterViewInit() {\n this._ngZone.runOutsideAngular(() => {\n const focusIns$ = fromEvent<FocusEvent>(this._monthsEl.nativeElement, 'focusin');\n const focusOuts$ = fromEvent<FocusEvent>(this._monthsEl.nativeElement, 'focusout');\n\n // we're changing 'focusVisible' only when entering or leaving months view\n // and ignoring all focus events where both 'target' and 'related' target are day cells\n merge(focusIns$, focusOuts$)\n .pipe(\n filter(\n ({target, relatedTarget}) =>\n !(hasClassName(target, 'ngb-dp-day') && hasClassName(relatedTarget, 'ngb-dp-day'))),\n takeUntil(this._destroyed$))\n .subscribe(({type}) => this._ngZone.run(() => this._service.focusVisible = type === 'focusin'));\n });\n }\n\n ngOnDestroy() { this._destroyed$.next(); }\n\n ngOnInit() {\n if (this.model === undefined) {\n ['dayTemplateData', 'displayMonths', 'markDisabled', 'firstDayOfWeek', 'navigation', 'minDate', 'maxDate',\n 'outsideDays']\n .forEach(input => this._service[input] = this[input]);\n this.navigateTo(this.startDate);\n }\n }\n\n ngOnChanges(changes: SimpleChanges) {\n ['dayTemplateData', 'displayMonths', 'markDisabled', 'firstDayOfWeek', 'navigation', 'minDate', 'maxDate',\n 'outsideDays']\n .filter(input => input in changes)\n .forEach(input => this._service[input] = this[input]);\n\n if ('startDate' in changes) {\n const {currentValue, previousValue} = changes.startDate;\n if (isChangedMonth(previousValue, currentValue)) {\n this.navigateTo(this.startDate);\n }\n }\n }\n\n onDateSelect(date: NgbDate) {\n this._service.focus(date);\n this._service.select(date, {emitEvent: true});\n }\n\n onKeyDown(event: KeyboardEvent) { this._keyMapService.processKey(event); }\n\n onNavigateDateSelect(date: NgbDate) { this._service.open(date); }\n\n onNavigateEvent(event: NavigationEvent) {\n switch (event) {\n case NavigationEvent.PREV:\n this._service.open(this._calendar.getPrev(this.model.firstDate, 'm', 1));\n break;\n case NavigationEvent.NEXT:\n this._service.open(this._calendar.getNext(this.model.firstDate, 'm', 1));\n break;\n }\n }\n\n registerOnChange(fn: (value: any) => any): void { this.onChange = fn; }\n\n registerOnTouched(fn: () => any): void { this.onTouched = fn; }\n\n setDisabledState(isDisabled: boolean) { this._service.disabled = isDisabled; }\n\n writeValue(value) {\n this._controlValue = NgbDate.from(this._ngbDateAdapter.fromModel(value));\n this._service.select(this._controlValue);\n }\n}\n","import {Component, Input, TemplateRef, Output, EventEmitter, ViewEncapsulation} from '@angular/core';\nimport {MonthViewModel, DayViewModel} from './datepicker-view-model';\nimport {NgbDate} from './ngb-date';\nimport {NgbDatepickerI18n} from './datepicker-i18n';\nimport {DayTemplateContext} from './datepicker-day-template-context';\n\n@Component({\n selector: 'ngb-datepicker-month-view',\n host: {'role': 'grid'},\n encapsulation: ViewEncapsulation.None,\n styleUrls: ['./datepicker-month-view.scss'],\n template: `\n <div *ngIf=\"showWeekdays\" class=\"ngb-dp-week ngb-dp-weekdays bg-light\">\n <div *ngIf=\"showWeekNumbers\" class=\"ngb-dp-weekday ngb-dp-showweek\"></div>\n <div *ngFor=\"let w of month.weekdays\" class=\"ngb-dp-weekday small\">\n {{ i18n.getWeekdayShortName(w) }}\n </div>\n </div>\n <ng-template ngFor let-week [ngForOf]=\"month.weeks\">\n <div *ngIf=\"!week.collapsed\" class=\"ngb-dp-week\" role=\"row\">\n <div *ngIf=\"showWeekNumbers\" class=\"ngb-dp-week-number small text-muted\">{{ i18n.getWeekNumerals(week.number) }}</div>\n <div *ngFor=\"let day of week.days\" (click)=\"doSelect(day)\" class=\"ngb-dp-day\" role=\"gridcell\"\n [class.disabled]=\"day.context.disabled\"\n [tabindex]=\"day.tabindex\"\n [class.hidden]=\"day.hidden\"\n [class.ngb-dp-today]=\"day.context.today\"\n [attr.aria-label]=\"day.ariaLabel\">\n <ng-template [ngIf]=\"!day.hidden\">\n <ng-template [ngTemplateOutlet]=\"dayTemplate\" [ngTemplateOutletContext]=\"day.context\"></ng-template>\n </ng-template>\n </div>\n </div>\n </ng-template>\n `\n})\nexport class NgbDatepickerMonthView {\n @Input() dayTemplate: TemplateRef<DayTemplateContext>;\n @Input() month: MonthViewModel;\n @Input() showWeekdays;\n @Input() showWeekNumbers;\n\n @Output() select = new EventEmitter<NgbDate>();\n\n constructor(public i18n: NgbDatepickerI18n) {}\n\n doSelect(day: DayViewModel) {\n if (!day.context.disabled && !day.hidden) {\n this.select.emit(day.date);\n }\n }\n}\n","import {Component, Input, Output, EventEmitter, ChangeDetectionStrategy, ViewEncapsulation} from '@angular/core';\nimport {NavigationEvent, MonthViewModel} from './datepicker-view-model';\nimport {NgbDate} from './ngb-date';\nimport {NgbDatepickerI18n} from './datepicker-i18n';\n\n@Component({\n selector: 'ngb-datepicker-navigation',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n styleUrls: ['./datepicker-navigation.scss'],\n template: `\n <div class=\"ngb-dp-arrow\">\n <button type=\"button\" class=\"btn btn-link ngb-dp-arrow-btn\" (click)=\"navigate.emit(navigation.PREV)\" [disabled]=\"prevDisabled\"\n i18n-aria-label=\"@@ngb.datepicker.previous-month\" aria-label=\"Previous month\"\n i18n-title=\"@@ngb.datepicker.previous-month\" title=\"Previous month\">\n <span class=\"ngb-dp-navigation-chevron\"></span>\n </button>\n </div>\n <ngb-datepicker-navigation-select *ngIf=\"showSelect\" class=\"ngb-dp-navigation-select\"\n [date]=\"date\"\n [disabled] = \"disabled\"\n [months]=\"selectBoxes.months\"\n [years]=\"selectBoxes.years\"\n (select)=\"select.emit($event)\">\n </ngb-datepicker-navigation-select>\n\n <ng-template *ngIf=\"!showSelect\" ngFor let-month [ngForOf]=\"months\" let-i=\"index\">\n <div class=\"ngb-dp-arrow\" *ngIf=\"i > 0\"></div>\n <div class=\"ngb-dp-month-name\">\n {{ i18n.getMonthFullName(month.number, month.year) }} {{ i18n.getYearNumerals(month.year) }}\n </div>\n <div class=\"ngb-dp-arrow\" *ngIf=\"i !== months.length - 1\"></div>\n </ng-template>\n <div class=\"ngb-dp-arrow right\">\n <button type=\"button\" class=\"btn btn-link ngb-dp-arrow-btn\" (click)=\"navigate.emit(navigation.NEXT)\" [disabled]=\"nextDisabled\"\n i18n-aria-label=\"@@ngb.datepicker.next-month\" aria-label=\"Next month\"\n i18n-title=\"@@ngb.datepicker.next-month\" title=\"Next month\">\n <span class=\"ngb-dp-navigation-chevron\"></span>\n </button>\n </div>\n `\n})\nexport class NgbDatepickerNavigation {\n navigation = NavigationEvent;\n\n @Input() date: NgbDate;\n @Input() disabled: boolean;\n @Input() months: MonthViewModel[] = [];\n @Input() showSelect: boolean;\n @Input() prevDisabled: boolean;\n @Input() nextDisabled: boolean;\n @Input() selectBoxes: {years: number[], months: number[]};\n\n @Output() navigate = new EventEmitter<NavigationEvent>();\n @Output() select = new EventEmitter<NgbDate>();\n\n constructor(public i18n: NgbDatepickerI18n) {}\n}\n","import {NgZone} from '@angular/core';\nimport {fromEvent, Observable, race} from 'rxjs';\nimport {delay, filter, map, takeUntil, withLatestFrom} from 'rxjs/operators';\nimport {Key} from './key';\nimport {closest} from './util';\n\nconst isContainedIn = (element: HTMLElement, array?: HTMLElement[]) =>\n array ? array.some(item => item.contains(element)) : false;\n\nconst matchesSelectorIfAny = (element: HTMLElement, selector?: string) =>\n !selector || closest(element, selector) != null;\n\n// we'll have to use 'touch' events instead of 'mouse' events on iOS and add a more significant delay\n// to avoid re-opening when handling (click) on a toggling element\n// TODO: use proper Angular platform detection when NgbAutoClose becomes a service and we can inject PLATFORM_ID\nlet iOS = false;\nif (typeof navigator !== 'undefined') {\n iOS = !!navigator.userAgent && /iPad|iPhone|iPod/.test(navigator.userAgent);\n}\n\nexport function ngbAutoClose(\n zone: NgZone, document: any, type: boolean | 'inside' | 'outside', close: () => void, closed$: Observable<any>,\n insideElements: HTMLElement[], ignoreElements?: HTMLElement[], insideSelector?: string) {\n // closing on ESC and outside clicks\n if (type) {\n zone.runOutsideAngular(() => {\n\n const shouldCloseOnClick = (event: MouseEvent | TouchEvent) => {\n const element = event.target as HTMLElement;\n if ((event instanceof MouseEvent && event.button === 2) || isContainedIn(element, ignoreElements)) {\n return false;\n }\n if (type === 'inside') {\n return isContainedIn(element, insideElements) && matchesSelectorIfAny(element, insideSelector);\n } else if (type === 'outside') {\n return !isContainedIn(element, insideElements);\n } else /* if (type === true) */ {\n return matchesSelectorIfAny(element, insideSelector) || !isContainedIn(element, insideElements);\n }\n };\n\n const escapes$ = fromEvent<KeyboardEvent>(document, 'keydown')\n .pipe(\n takeUntil(closed$),\n // tslint:disable-next-line:deprecation\n filter(e => e.which === Key.Escape));\n\n\n // we have to pre-calculate 'shouldCloseOnClick' on 'mousedown/touchstart',\n // because on 'mouseup/touchend' DOM nodes might be detached\n const mouseDowns$ = fromEvent<MouseEvent>(document, iOS ? 'touchstart' : 'mousedown')\n .pipe(map(shouldCloseOnClick), takeUntil(closed$));\n\n const closeableClicks$ = fromEvent<MouseEvent>(document, iOS ? 'touchend' : 'mouseup')\n .pipe(\n withLatestFrom(mouseDowns$), filter(([_, shouldClose]) => shouldClose),\n delay(iOS ? 16 : 0), takeUntil(closed$));\n\n\n race<Event>([escapes$, closeableClicks$]).subscribe(() => zone.run(close));\n });\n }\n}\n","import {fromEvent, Observable} from 'rxjs';\nimport {filter, map, takeUntil, withLatestFrom} from 'rxjs/operators';\n\nimport {Key} from '../util/key';\n\n\nconst FOCUSABLE_ELEMENTS_SELECTOR = [\n 'a[href]', 'button:not([disabled])', 'input:not([disabled]):not([type=\"hidden\"])', 'select:not([disabled])',\n 'textarea:not([disabled])', '[contenteditable]', '[tabindex]:not([tabindex=\"-1\"])'\n].join(', ');\n\n/**\n * Returns first and last focusable elements inside of a given element based on specific CSS selector\n */\nexport function getFocusableBoundaryElements(element: HTMLElement): HTMLElement[] {\n const list: HTMLElement[] =\n Array.from(element.querySelectorAll(FOCUSABLE_ELEMENTS_SELECTOR) as NodeListOf<HTMLElement>)\n .filter(el => el.tabIndex !== -1);\n return [list[0], list[list.length - 1]];\n}\n\n/**\n * Function that enforces browser focus to be trapped inside a DOM element.\n *\n * Works only for clicks inside the element and navigation with 'Tab', ignoring clicks outside of the element\n *\n * @param element The element around which focus will be trapped inside\n * @param stopFocusTrap$ The observable stream. When completed the focus trap will clean up listeners\n * and free internal resources\n * @param refocusOnClick Put the focus back to the last focused element whenever a click occurs on element (default to\n * false)\n */\nexport const ngbFocusTrap = (element: HTMLElement, stopFocusTrap$: Observable<any>, refocusOnClick = false) => {\n // last focused element\n const lastFocusedElement$ =\n fromEvent<FocusEvent>(element, 'focusin').pipe(takeUntil(stopFocusTrap$), map(e => e.target));\n\n // 'tab' / 'shift+tab' stream\n fromEvent<KeyboardEvent>(element, 'keydown')\n .pipe(\n takeUntil(stopFocusTrap$),\n // tslint:disable:deprecation\n filter(e => e.which === Key.Tab),\n // tslint:enable:deprecation\n withLatestFrom(lastFocusedElement$))\n .subscribe(([tabEvent, focusedElement]) => {\n const[first, last] = getFocusableBoundaryElements(element);\n\n if ((focusedElement === first || focusedElement === element) && tabEvent.shiftKey) {\n last.focus();\n tabEvent.preventDefault();\n }\n\n if (focusedElement === last && !tabEvent.shiftKey) {\n first.focus();\n tabEvent.preventDefault();\n }\n });\n\n // inside click\n if (refocusOnClick) {\n fromEvent(element, 'click')\n .pipe(takeUntil(stopFocusTrap$), withLatestFrom(lastFocusedElement$), map(arr => arr[1] as HTMLElement))\n .subscribe(lastFocusedElement => lastFocusedElement.focus());\n }\n};\n","// previous version:\n// https://github.com/angular-ui/bootstrap/blob/07c31d0731f7cb068a1932b8e01d2312b796b4ec/src/position/position.js\nexport class Positioning {\n private getAllStyles(element: HTMLElement) { return window.getComputedStyle(element); }\n\n private getStyle(element: HTMLElement, prop: string): string { return this.getAllStyles(element)[prop]; }\n\n private isStaticPositioned(element: HTMLElement): boolean {\n return (this.getStyle(element, 'position') || 'static') === 'static';\n }\n\n private offsetParent(element: HTMLElement): HTMLElement {\n let offsetParentEl = <HTMLElement>element.offsetParent || document.documentElement;\n\n while (offsetParentEl && offsetParentEl !== document.documentElement && this.isStaticPositioned(offsetParentEl)) {\n offsetParentEl = <HTMLElement>offsetParentEl.offsetParent;\n }\n\n return offsetParentEl || document.documentElement;\n }\n\n position(element: HTMLElement, round = true): ClientRect {\n let elPosition: ClientRect;\n let parentOffset: ClientRect = {width: 0, height: 0, top: 0, bottom: 0, left: 0, right: 0};\n\n if (this.getStyle(element, 'position') === 'fixed') {\n elPosition = element.getBoundingClientRect();\n elPosition = {\n top: elPosition.top,\n bottom: elPosition.bottom,\n left: elPosition.left,\n right: elPosition.right,\n height: elPosition.height,\n width: elPosition.width\n };\n } else {\n const offsetParentEl = this.offsetParent(element);\n\n elPosition = this.offset(element, false);\n\n if (offsetParentEl !== document.documentElement) {\n parentOffset = this.offset(offsetParentEl, false);\n }\n\n parentOffset.top += offsetParentEl.clientTop;\n parentOffset.left += offsetParentEl.clientLeft;\n }\n\n elPosition.top -= parentOffset.top;\n elPosition.bottom -= parentOffset.top;\n elPosition.left -= parentOffset.left;\n elPosition.right -= parentOffset.left;\n\n if (round) {\n elPosition.top = Math.round(elPosition.top);\n elPosition.bottom = Math.round(elPosition.bottom);\n elPosition.left = Math.round(elPosition.left);\n elPosition.right = Math.round(elPosition.right);\n }\n\n return elPosition;\n }\n\n offset(element: HTMLElement, round = true): ClientRect {\n const elBcr = element.getBoundingClientRect();\n const viewportOffset = {\n top: window.pageYOffset - document.documentElement.clientTop,\n left: window.pageXOffset - document.documentElement.clientLeft\n };\n\n let elOffset = {\n height: elBcr.height || element.offsetHeight,\n width: elBcr.width || element.offsetWidth,\n top: elBcr.top + viewportOffset.top,\n bottom: elBcr.bottom + viewportOffset.top,\n left: elBcr.left + viewportOffset.left,\n right: elBcr.right + viewportOffset.left\n };\n\n if (round) {\n elOffset.height = Math.round(elOffset.height);\n elOffset.width = Math.round(elOffset.width);\n elOffset.top = Math.round(elOffset.top);\n elOffset.bottom = Math.round(elOffset.bottom);\n elOffset.left = Math.round(elOffset.left);\n elOffset.right = Math.round(elOffset.right);\n }\n\n return elOffset;\n }\n\n /*\n Return false if the element to position is outside the viewport\n */\n positionElements(hostElement: HTMLElement, targetElement: HTMLElement, placement: string, appendToBody?: boolean):\n boolean {\n const[placementPrimary = 'top', placementSecondary = 'center'] = placement.split('-');\n\n const hostElPosition = appendToBody ? this.offset(hostElement, false) : this.position(hostElement, false);\n const targetElStyles = this.getAllStyles(targetElement);\n\n const marginTop = parseFloat(targetElStyles.marginTop);\n const marginBottom = parseFloat(targetElStyles.marginBottom);\n const marginLeft = parseFloat(targetElStyles.marginLeft);\n const marginRight = parseFloat(targetElStyles.marginRight);\n\n let topPosition = 0;\n let leftPosition = 0;\n\n switch (placementPrimary) {\n case 'top':\n topPosition = (hostElPosition.top - (targetElement.offsetHeight + marginTop + marginBottom));\n break;\n case 'bottom':\n topPosition = (hostElPosition.top + hostElPosition.height);\n break;\n case 'left':\n leftPosition = (hostElPosition.left - (targetElement.offsetWidth + marginLeft + marginRight));\n break;\n case 'right':\n leftPosition = (hostElPosition.left + hostElPosition.width);\n break;\n }\n\n switch (placementSecondary) {\n case 'top':\n topPosition = hostElPosition.top;\n break;\n case 'bottom':\n topPosition = hostElPosition.top + hostElPosition.height - targetElement.offsetHeight;\n break;\n case 'left':\n leftPosition = hostElPosition.left;\n break;\n case 'right':\n leftPosition = hostElPosition.left + hostElPosition.width - targetElement.offsetWidth;\n break;\n case 'center':\n if (placementPrimary === 'top' || placementPrimary === 'bottom') {\n leftPosition = (hostElPosition.left + hostElPosition.width / 2 - targetElement.offsetWidth / 2);\n } else {\n topPosition = (hostElPosition.top + hostElPosition.height / 2 - targetElement.offsetHeight / 2);\n }\n break;\n }\n\n /// The translate3d/gpu acceleration render a blurry text on chrome, the next line is commented until a browser fix\n // targetElement.style.transform = `translate3d(${Math.round(leftPosition)}px, ${Math.floor(topPosition)}px, 0px)`;\n targetElement.style.transform = `translate(${Math.round(leftPosition)}px, ${Math.round(topPosition)}px)`;\n\n // Check if the targetElement is inside the viewport\n const targetElBCR = targetElement.getBoundingClientRect();\n const html = document.documentElement;\n const windowHeight = window.innerHeight || html.clientHeight;\n const windowWidth = window.innerWidth || html.clientWidth;\n\n return targetElBCR.left >= 0 && targetElBCR.top >= 0 && targetElBCR.right <= windowWidth &&\n targetElBCR.bottom <= windowHeight;\n }\n}\n\nconst placementSeparator = /\\s+/;\nconst positionService = new Positioning();\n\n/*\n * Accept the placement array and applies the appropriate placement dependent on the viewport.\n * Returns the applied placement.\n * In case of auto placement, placements are selected in order\n * 'top', 'bottom', 'left', 'right',\n * 'top-left', 'top-right',\n * 'bottom-left', 'bottom-right',\n * 'left-top', 'left-bottom',\n * 'right-top', 'right-bottom'.\n * */\nexport function positionElements(\n hostElement: HTMLElement, targetElement: HTMLElement, placement: string | Placement | PlacementArray,\n appendToBody?: boolean, baseClass?: string): Placement {\n let placementVals: Array<Placement> =\n Array.isArray(placement) ? placement : placement.split(placementSeparator) as Array<Placement>;\n\n const allowedPlacements = [\n 'top', 'bottom', 'left', 'right', 'top-left', 'top-right', 'bottom-left', 'bottom-right', 'left-top', 'left-bottom',\n 'right-top', 'right-bottom'\n ];\n\n const classList = targetElement.classList;\n const addClassesToTarget = (targetPlacement: Placement): Array<string> => {\n const[primary, secondary] = targetPlacement.split('-');\n const classes = [];\n if (baseClass) {\n classes.push(`${baseClass}-${primary}`);\n if (secondary) {\n classes.push(`${baseClass}-${primary}-${secondary}`);\n }\n\n classes.forEach((classname) => { classList.add(classname); });\n }\n return classes;\n };\n\n // Remove old placement classes to avoid issues\n if (baseClass) {\n allowedPlacements.forEach((placementToRemove) => { classList.remove(`${baseClass}-${placementToRemove}`); });\n }\n\n // replace auto placement with other placements\n let hasAuto = placementVals.findIndex(val => val === 'auto');\n if (hasAuto >= 0) {\n allowedPlacements.forEach(function(obj) {\n if (placementVals.find(val => val.search('^' + obj) !== -1) == null) {\n placementVals.splice(hasAuto++, 1, obj as Placement);\n }\n });\n }\n\n // coordinates where to position\n\n // Required for transform:\n const style = targetElement.style;\n style.position = 'absolute';\n style.top = '0';\n style.left = '0';\n style['will-change'] = 'transform';\n\n let testPlacement: Placement;\n let isInViewport = false;\n for (testPlacement of placementVals) {\n let addedClasses = addClassesToTarget(testPlacement);\n\n if (positionService.positionElements(hostElement, targetElement, testPlacement, appendToBody)) {\n isInViewport = true;\n break;\n }\n\n // Remove the baseClasses for further calculation\n if (baseClass) {\n addedClasses.forEach((classname) => { classList.remove(classname); });\n }\n }\n\n if (!isInViewport) {\n // If nothing match, the first placement is the default one\n testPlacement = placementVals[0];\n addClassesToTarget(testPlacement);\n positionService.positionElements(hostElement, targetElement, testPlacement, appendToBody);\n }\n\n return testPlacement;\n}\n\nexport type Placement = 'auto' | 'top' | 'bottom' | 'left' | 'right' | 'top-left' | 'top-right' | 'bottom-left' |\n 'bottom-right' | 'left-top' | 'left-bottom' | 'right-top' | 'right-bottom';\n\nexport type PlacementArray = Placement | Array<Placement>| string;\n","import {padNumber, toInteger, isNumber} from '../util/util';\nimport {NgbDateStruct} from './ngb-date-struct';\nimport {Injectable} from '@angular/core';\n\nexport function NGB_DATEPICKER_PARSER_FORMATTER_FACTORY() {\n return new NgbDateISOParserFormatter();\n}\n\n/**\n * An abstract service for parsing and formatting dates for the\n * [`NgbInputDatepicker`](#/components/datepicker/api#NgbInputDatepicker) directive.\n * Converts between the internal `NgbDateStruct` model presentation and a `string` that is displayed in the\n * input element.\n *\n * When user types something in the input this service attempts to parse it into a `NgbDateStruct` object.\n * And vice versa, when users selects a date in the calendar with the mouse, it must be displayed as a `string`\n * in the input.\n *\n * Default implementation uses the ISO 8601 format, but you can provide another implementation via DI\n * to use an alternative string format or a custom parsing logic.\n *\n * See the [date format overview](#/components/datepicker/overview#date-model) for more details.\n */\n@Injectable({providedIn: 'root', useFactory: NGB_DATEPICKER_PARSER_FORMATTER_FACTORY})\nexport abstract class NgbDateParserFormatter {\n /**\n * Parses the given `string` to an `NgbDateStruct`.\n *\n * Implementations should try their best to provide a result, even\n * partial. They must return `null` if the value can't be parsed.\n */\n abstract parse(value: string): NgbDateStruct;\n\n /**\n * Formats the given `NgbDateStruct` to a `string`.\n *\n * Implementations should return an empty string if the given date is `null`,\n * and try their best to provide a partial result if the given date is incomplete or invalid.\n */\n abstract format(date: NgbDateStruct): string;\n}\n\n@Injectable()\nexport class NgbDateISOParserFormatter extends NgbDateParserFormatter {\n parse(value: string): NgbDateStruct {\n if (value) {\n const dateParts = value.trim().split('-');\n if (dateParts.length === 1 && isNumber(dateParts[0])) {\n return {year: toInteger(dateParts[0]), month: null, day: null};\n } else if (dateParts.length === 2 && isNumber(dateParts[0]) && isNumber(dateParts[1])) {\n return {year: toInteger(dateParts[0]), month: toInteger(dateParts[1]), day: null};\n } else if (dateParts.length === 3 && isNumber(dateParts[0]) && isNumber(dateParts[1]) && isNumber(dateParts[2])) {\n return {year: toInteger(dateParts[0]), month: toInteger(dateParts[1]), day: toInteger(dateParts[2])};\n }\n }\n return null;\n }\n\n format(date: NgbDateStruct): string {\n return date ?\n `${date.year}-${isNumber(date.month) ? padNumber(date.month) : ''}-${isNumber(date.day) ? padNumber(date.day) : ''}` :\n '';\n }\n}\n","import {\n ChangeDetectorRef,\n ComponentFactoryResolver,\n ComponentRef,\n Directive,\n ElementRef,\n EventEmitter,\n forwardRef,\n Inject,\n Input,\n NgZone,\n OnChanges,\n OnDestroy,\n Output,\n Renderer2,\n SimpleChanges,\n TemplateRef,\n ViewContainerRef\n} from '@angular/core';\nimport {DOCUMENT} from '@angular/common';\nimport {AbstractControl, ControlValueAccessor, NG_VALIDATORS, NG_VALUE_ACCESSOR, Validator} from '@angular/forms';\n\nimport {ngbAutoClose} from '../util/autoclose';\nimport {ngbFocusTrap} from '../util/focus-trap';\nimport {PlacementArray, positionElements} from '../util/positioning';\n\nimport {NgbDateAdapter} from './adapters/ngb-date-adapter';\nimport {NgbDatepicker, NgbDatepickerNavigateEvent} from './datepicker';\nimport {DayTemplateContext} from './datepicker-day-template-context';\nimport {NgbDatepickerService} from './datepicker-service';\nimport {NgbCalendar} from './ngb-calendar';\nimport {NgbDate} from './ngb-date';\nimport {NgbDateParserFormatter} from './ngb-date-parser-formatter';\nimport {NgbDateStruct} from './ngb-date-struct';\n\nconst NGB_DATEPICKER_VALUE_ACCESSOR = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => NgbInputDatepicker),\n multi: true\n};\n\nconst NGB_DATEPICKER_VALIDATOR = {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => NgbInputDatepicker),\n multi: true\n};\n\n/**\n * A directive that allows to stick a datepicker popup to an input field.\n *\n * Manages interaction with the input field itself, does value formatting and provides forms integration.\n */\n@Directive({\n selector: 'input[ngbDatepicker]',\n exportAs: 'ngbDatepicker',\n host: {\n '(input)': 'manualDateChange($event.target.value)',\n '(change)': 'manualDateChange($event.target.value, true)',\n '(blur)': 'onBlur()',\n '[disabled]': 'disabled'\n },\n providers: [NGB_DATEPICKER_VALUE_ACCESSOR, NGB_DATEPICKER_VALIDATOR, NgbDatepickerService]\n})\nexport class NgbInputDatepicker implements OnChanges,\n OnDestroy, ControlValueAccessor, Validator {\n private _cRef: ComponentRef<NgbDatepicker> = null;\n private _disabled = false;\n private _model: NgbDate;\n private _inputValue: string;\n private _zoneSubscription: any;\n\n /**\n * Indicates whether the datepicker popup should be closed automatically after date selection / outside click or not.\n *\n * * `true` - the popup will close on both date selection and outside click.\n * * `false` - the popup can only be closed manually via `close()` or `toggle()` methods.\n * * `\"inside\"` - the popup will close on date selection, but not outside clicks.\n * * `\"outside\"` - the popup will close only on the outside click and not on date selection/inside clicks.\n *\n * @since 3.0.0\n */\n @Input() autoClose: boolean | 'inside' | 'outside' = true;\n\n /**\n * The reference to a custom template for the day.\n *\n * Allows to completely override the way a day 'cell' in the calendar is displayed.\n *\n * See [`DayTemplateContext`](#/components/datepicker/api#DayTemplateContext) for the data you get inside.\n */\n @Input() dayTemplate: TemplateRef<DayTemplateContext>;\n\n /**\n * The callback to pass any arbitrary data to the template cell via the\n * [`DayTemplateContext`](#/components/datepicker/api#DayTemplateContext)'s `data` parameter.\n *\n * `current` is the month that is currently displayed by the datepicker.\n *\n * @since 3.3.0\n */\n @Input() dayTemplateData: (date: NgbDate, current: {year: number, month: number}) => any;\n\n /**\n * The number of months to display.\n */\n @Input() displayMonths: number;\n\n /**\n * The first day of the week.\n *\n * With default calendar we use ISO 8601: 'weekday' is 1=Mon ... 7=Sun.\n */\n @Input() firstDayOfWeek: number;\n\n /**\n * The reference to the custom template for the datepicker footer.\n *\n * @since 3.3.0\n */\n @Input() footerTemplate: TemplateRef<any>;\n\n /**\n * The callback to mark some dates as disabled.\n *\n * It is called for each new date when navigating to a different month.\n *\n * `current` is the month that is currently displayed by the datepicker.\n */\n @Input() markDisabled: (date: NgbDate, current: {year: number, month: number}) => boolean;\n\n /**\n * The earliest date that can be displayed or selected. Also used for form validation.\n *\n * If not provided, 'year' select box will display 10 years before the current month.\n */\n @Input() minDate: NgbDateStruct;\n\n /**\n * The latest date that can be displayed or selected. Also used for form validation.\n *\n * If not provided, 'year' select box will display 10 years after the current month.\n */\n @Input() maxDate: NgbDateStruct;\n\n /**\n * Navigation type.\n *\n * * `\"select\"` - select boxes for month and navigation arrows\n * * `\"arrows\"` - only navigation arrows\n * * `\"none\"` - no navigation visible at all\n */\n @Input() navigation: 'select' | 'arrows' | 'none';\n\n /**\n * The way of displaying days that don't belong to the current month.\n *\n * * `\"visible\"` - days are visible\n * * `\"hidden\"` - days are hidden, white space preserved\n * * `\"collapsed\"` - days are collapsed, so the datepicker height might change between months\n *\n * For the 2+ months view, days in between months are never shown.\n */\n @Input() outsideDays: 'visible' | 'collapsed' | 'hidden';\n\n /**\n * The preferred placement of the datepicker popup.\n *\n * Possible values are `\"top\"`, `\"top-left\"`, `\"top-right\"`, `\"bottom\"`, `\"bottom-left\"`,\n * `\"bottom-right\"`, `\"left\"`, `\"left-top\"`, `\"left-bottom\"`, `\"right\"`, `\"right-top\"`,\n * `\"right-bottom\"`\n *\n * Accepts an array of strings or a string with space separated possible values.\n *\n * The default order of preference is `\"bottom-left bottom-right top-left top-right\"`\n *\n * Please see the [positioning overview](#/positioning) for more details.\n */\n @Input() placement: PlacementArray = ['bottom-left', 'bottom-right', 'top-left', 'top-right'];\n\n /**\n * If `true`, weekdays will be displayed.\n */\n @Input() showWeekdays: boolean;\n\n /**\n * If `true`, week numbers will be displayed.\n */\n @Input() showWeekNumbers: boolean;\n\n /**\n * The date to open calendar with.\n *\n * With the default calendar we use ISO 8601: 'month' is 1=Jan ... 12=Dec.\n * If nothing or invalid date is provided, calendar will open with current month.\n *\n * You could use `navigateTo(date)` method as an alternative.\n */\n @Input() startDate: {year: number, month: number, day?: number};\n\n /**\n * A selector specifying the element the datepicker popup should be appended to.\n *\n * Currently only supports `\"body\"`.\n */\n @Input() container: string;\n\n /**\n * A css selector or html element specifying the element the datepicker popup should be positioned against.\n *\n * By default the input is used as a target.\n *\n * @since 4.2.0\n */\n @Input() positionTarget: string | HTMLElement;\n\n /**\n * An event emitted when user selects a date using keyboard or mouse.\n *\n * The payload of the event is currently selected `NgbDate`.\n *\n * @since 1.1.1\n */\n @Output() dateSelect = new EventEmitter<NgbDate>();\n\n /**\n * Event emitted right after the navigation happens and displayed month changes.\n *\n * See [`NgbDatepickerNavigateEvent`](#/components/datepicker/api#NgbDatepickerNavigateEvent) for the payload info.\n */\n @Output() navigate = new EventEmitter<NgbDatepickerNavigateEvent>();\n\n /**\n * An event fired after closing datepicker window.\n *\n * @since 4.2.0\n */\n @Output() closed = new EventEmitter<void>();\n\n @Input()\n get disabled() {\n return this._disabled;\n }\n set disabled(value: any) {\n this._disabled = value === '' || (value && value !== 'false');\n\n if (this.isOpen()) {\n this._cRef.instance.setDisabledState(this._disabled);\n }\n }\n\n private _onChange = (_: any) => {};\n private _onTouched = () => {};\n private _validatorChange = () => {};\n\n\n constructor(\n private _parserFormatter: NgbDateParserFormatter, private _elRef: ElementRef<HTMLInputElement>,\n private _vcRef: ViewContainerRef, private _renderer: Renderer2, private _cfr: ComponentFactoryResolver,\n private _ngZone: NgZone, private _service: NgbDatepickerService, private _calendar: NgbCalendar,\n private _dateAdapter: NgbDateAdapter<any>, @Inject(DOCUMENT) private _document: any,\n private _changeDetector: ChangeDetectorRef) {\n this._zoneSubscription = _ngZone.onStable.subscribe(() => this._updatePopupPosition());\n }\n\n registerOnChange(fn: (value: any) => any): void { this._onChange = fn; }\n\n registerOnTouched(fn: () => any): void { this._onTouched = fn; }\n\n registerOnValidatorChange(fn: () => void): void { this._validatorChange = fn; }\n\n setDisabledState(isDisabled: boolean): void { this.disabled = isDisabled; }\n\n validate(c: AbstractControl): {[key: string]: any} {\n const value = c.value;\n\n if (value === null || value === undefined) {\n return null;\n }\n\n const ngbDate = this._fromDateStruct(this._dateAdapter.fromModel(value));\n\n if (!this._calendar.isValid(ngbDate)) {\n return {'ngbDate': {invalid: c.value}};\n }\n\n if (this.minDate && ngbDate.before(NgbDate.from(this.minDate))) {\n return {'ngbDate': {requiredBefore: this.minDate}};\n }\n\n if (this.maxDate && ngbDate.after(NgbDate.from(this.maxDate))) {\n return {'ngbDate': {requiredAfter: this.maxDate}};\n }\n }\n\n writeValue(value) {\n this._model = this._fromDateStruct(this._dateAdapter.fromModel(value));\n this._writeModelValue(this._model);\n }\n\n manualDateChange(value: string, updateView = false) {\n const inputValueChanged = value !== this._inputValue;\n if (inputValueChanged) {\n this._inputValue = value;\n this._model = this._fromDateStruct(this._parserFormatter.parse(value));\n }\n if (inputValueChanged || !updateView) {\n this._onChange(this._model ? this._dateAdapter.toModel(this._model) : (value === '' ? null : value));\n }\n if (updateView && this._model) {\n this._writeModelValue(this._model);\n }\n }\n\n isOpen() { return !!this._cRef; }\n\n /**\n * Opens the datepicker popup.\n *\n * If the related form control contains a valid date, the corresponding month will be opened.\n */\n open() {\n if (!this.isOpen()) {\n const cf = this._cfr.resolveComponentFactory(NgbDatepicker);\n this._cRef = this._vcRef.createComponent(cf);\n\n this._applyPopupStyling(this._cRef.location.nativeElement);\n this._applyDatepickerInputs(this._cRef.instance);\n this._subscribeForDatepickerOutputs(this._cRef.instance);\n this._cRef.instance.ngOnInit();\n this._cRef.instance.writeValue(this._dateAdapter.toModel(this._model));\n\n // date selection event handling\n this._cRef.instance.registerOnChange((selectedDate) => {\n this.writeValue(selectedDate);\n this._onChange(selectedDate);\n this._onTouched();\n });\n\n this._cRef.changeDetectorRef.detectChanges();\n\n this._cRef.instance.setDisabledState(this.disabled);\n\n if (this.container === 'body') {\n window.document.querySelector(this.container).appendChild(this._cRef.location.nativeElement);\n }\n\n // focus handling\n ngbFocusTrap(this._cRef.location.nativeElement, this.closed, true);\n this._cRef.instance.focus();\n\n ngbAutoClose(\n this._ngZone, this._document, this.autoClose, () => this.close(), this.closed, [],\n [this._elRef.nativeElement, this._cRef.location.nativeElement]);\n }\n }\n\n /**\n * Closes the datepicker popup.\n */\n close() {\n if (this.isOpen()) {\n this._vcRef.remove(this._vcRef.indexOf(this._cRef.hostView));\n this._cRef = null;\n this.closed.emit();\n this._changeDetector.markForCheck();\n }\n }\n\n /**\n * Toggles the datepicker popup.\n */\n toggle() {\n if (this.isOpen()) {\n this.close();\n } else {\n this.open();\n }\n }\n\n /**\n * Navigates to the provided date.\n *\n * With the default calendar we use ISO 8601: 'month' is 1=Jan ... 12=Dec.\n * If nothing or invalid date provided calendar will open current month.\n *\n * Use the `[startDate]` input as an alternative.\n */\n navigateTo(date?: {year: number, month: number, day?: number}) {\n if (this.isOpen()) {\n this._cRef.instance.navigateTo(date);\n }\n }\n\n onBlur() { this._onTouched(); }\n\n ngOnChanges(changes: SimpleChanges) {\n if (changes['minDate'] || changes['maxDate']) {\n this._validatorChange();\n }\n }\n\n ngOnDestroy() {\n this.close();\n this._zoneSubscription.unsubscribe();\n }\n\n private _applyDatepickerInputs(datepickerInstance: NgbDatepicker): void {\n ['dayTemplate', 'dayTemplateData', 'displayMonths', 'firstDayOfWeek', 'footerTemplate', 'markDisabled', 'minDate',\n 'maxDate', 'navigation', 'outsideDays', 'showNavigation', 'showWeekdays', 'showWeekNumbers']\n .forEach((optionName: string) => {\n if (this[optionName] !== undefined) {\n datepickerInstance[optionName] = this[optionName];\n }\n });\n datepickerInstance.startDate = this.startDate || this._model;\n }\n\n private _applyPopupStyling(nativeElement: any) {\n this._renderer.addClass(nativeElement, 'dropdown-menu');\n this._renderer.addClass(nativeElement, 'show');\n\n if (this.container === 'body') {\n this._renderer.addClass(nativeElement, 'ngb-dp-body');\n }\n }\n\n private _subscribeForDatepickerOutputs(datepickerInstance: NgbDatepicker) {\n datepickerInstance.navigate.subscribe(navigateEvent => this.navigate.emit(navigateEvent));\n datepickerInstance.select.subscribe(date => {\n this.dateSelect.emit(date);\n if (this.autoClose === true || this.autoClose === 'inside') {\n this.close();\n }\n });\n }\n\n private _writeModelValue(model: NgbDate) {\n const value = this._parserFormatter.format(model);\n this._inputValue = value;\n this._renderer.setProperty(this._elRef.nativeElement, 'value', value);\n if (this.isOpen()) {\n this._cRef.instance.writeValue(this._dateAdapter.toModel(model));\n this._onTouched();\n }\n }\n\n private _fromDateStruct(date: NgbDateStruct): NgbDate {\n const ngbDate = date ? new NgbDate(date.year, date.month, date.day) : null;\n return this._calendar.isValid(ngbDate) ? ngbDate : null;\n }\n\n private _updatePopupPosition() {\n if (!this._cRef) {\n return;\n }\n\n let hostElement: HTMLElement;\n if (typeof this.positionTarget === 'string') {\n hostElement = window.document.querySelector(this.positionTarget);\n } else if (this.positionTarget instanceof HTMLElement) {\n hostElement = this.positionTarget;\n } else {\n hostElement = this._elRef.nativeElement;\n }\n\n if (this.positionTarget && !hostElement) {\n throw new Error('ngbDatepicker could not find element declared in [positionTarget] to position against.');\n }\n\n positionElements(hostElement, this._cRef.location.nativeElement, this.placement, this.container === 'body');\n }\n}\n","import {ChangeDetectionStrategy, Component, Input, ViewEncapsulation} from '@angular/core';\nimport {NgbDate} from './ngb-date';\nimport {NgbDatepickerI18n} from './datepicker-i18n';\n\n@Component({\n selector: '[ngbDatepickerDayView]',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n styleUrls: ['./datepicker-day-view.scss'],\n host: {\n 'class': 'btn-light',\n '[class.bg-primary]': 'selected',\n '[class.text-white]': 'selected',\n '[class.text-muted]': 'isMuted()',\n '[class.outside]': 'isMuted()',\n '[class.active]': 'focused'\n },\n template: `{{ i18n.getDayNumerals(date) }}`\n})\nexport class NgbDatepickerDayView {\n @Input() currentMonth: number;\n @Input() date: NgbDate;\n @Input() disabled: boolean;\n @Input() focused: boolean;\n @Input() selected: boolean;\n\n constructor(public i18n: NgbDatepickerI18n) {}\n\n isMuted() { return !this.selected && (this.date.month !== this.currentMonth || this.disabled); }\n}\n","import {Component, Input, Output, EventEmitter, ChangeDetectionStrategy, ViewEncapsulation} from '@angular/core';\nimport {NgbDate} from './ngb-date';\nimport {toInteger} from '../util/util';\nimport {NgbDatepickerI18n} from './datepicker-i18n';\n\n@Component({\n selector: 'ngb-datepicker-navigation-select',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n styleUrls: ['./datepicker-navigation-select.scss'],\n template: `\n <select\n [disabled]=\"disabled\"\n class=\"custom-select\"\n [value]=\"date?.month\"\n i18n-aria-label=\"@@ngb.datepicker.select-month\" aria-label=\"Select month\"\n i18n-title=\"@@ngb.datepicker.select-month\" title=\"Select month\"\n (change)=\"changeMonth($event.target.value)\">\n <option *ngFor=\"let m of months\" [attr.aria-label]=\"i18n.getMonthFullName(m, date?.year)\"\n [value]=\"m\">{{ i18n.getMonthShortName(m, date?.year) }}</option>\n </select><select\n [disabled]=\"disabled\"\n class=\"custom-select\"\n [value]=\"date?.year\"\n i18n-aria-label=\"@@ngb.datepicker.select-year\" aria-label=\"Select year\"\n i18n-title=\"@@ngb.datepicker.select-year\" title=\"Select year\"\n (change)=\"changeYear($event.target.value)\">\n <option *ngFor=\"let y of years\" [value]=\"y\">{{ i18n.getYearNumerals(y) }}</option>\n </select>\n `\n})\nexport class NgbDatepickerNavigationSelect {\n @Input() date: NgbDate;\n @Input() disabled: boolean;\n @Input() months: number[];\n @Input() years: number[];\n\n @Output() select = new EventEmitter<NgbDate>();\n\n constructor(public i18n: NgbDatepickerI18n) {}\n\n changeMonth(month: string) { this.select.emit(new NgbDate(this.date.year, toInteger(month), 1)); }\n\n changeYear(year: string) { this.select.emit(new NgbDate(toInteger(year), this.date.month, 1)); }\n}\n","import {NgbDate} from '../ngb-date';\nimport {NgbPeriod, NgbCalendar} from '../ngb-calendar';\nimport {Injectable} from '@angular/core';\nimport {isNumber} from '../../util/util';\n\n@Injectable()\nexport abstract class NgbCalendarHijri extends NgbCalendar {\n /**\n * Returns the number of days in a specific Hijri month.\n * `month` is 1 for Muharram, 2 for Safar, etc.\n * `year` is any Hijri year.\n */\n abstract getDaysPerMonth(month: number, year: number): number;\n\n /**\n * Returns the equivalent Hijri date value for a give input Gregorian date.\n * `gDate` is s JS Date to be converted to Hijri.\n */\n abstract fromGregorian(gDate: Date): NgbDate;\n\n /**\n * Converts the current Hijri date to Gregorian.\n */\n abstract toGregorian(hDate: NgbDate): Date;\n\n getDaysPerWeek() { return 7; }\n\n getMonths() { return [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]; }\n\n getWeeksPerMonth() { return 6; }\n\n getNext(date: NgbDate, period: NgbPeriod = 'd', number = 1) {\n date = new NgbDate(date.year, date.month, date.day);\n\n switch (period) {\n case 'y':\n date = this._setYear(date, date.year + number);\n date.month = 1;\n date.day = 1;\n return date;\n case 'm':\n date = this._setMonth(date, date.month + number);\n date.day = 1;\n return date;\n case 'd':\n return this._setDay(date, date.day + number);\n default:\n return date;\n }\n }\n\n getPrev(date: NgbDate, period: NgbPeriod = 'd', number = 1) { return this.getNext(date, period, -number); }\n\n getWeekday(date: NgbDate) {\n const day = this.toGregorian(date).getDay();\n // in JS Date Sun=0, in ISO 8601 Sun=7\n return day === 0 ? 7 : day;\n }\n\n getWeekNumber(week: NgbDate[], firstDayOfWeek: number) {\n // in JS Date Sun=0, in ISO 8601 Sun=7\n if (firstDayOfWeek === 7) {\n firstDayOfWeek = 0;\n }\n\n const thursdayIndex = (4 + 7 - firstDayOfWeek) % 7;\n const date = week[thursdayIndex];\n\n const jsDate = this.toGregorian(date);\n jsDate.setDate(jsDate.getDate() + 4 - (jsDate.getDay() || 7)); // Thursday\n const time = jsDate.getTime();\n const MuhDate = this.toGregorian(new NgbDate(date.year, 1, 1)); // Compare with Muharram 1\n return Math.floor(Math.round((time - MuhDate.getTime()) / 86400000) / 7) + 1;\n }\n\n getToday(): NgbDate { return this.fromGregorian(new Date()); }\n\n\n isValid(date: NgbDate): boolean {\n return date && isNumber(date.year) && isNumber(date.month) && isNumber(date.day) &&\n !isNaN(this.toGregorian(date).getTime());\n }\n\n private _setDay(date: NgbDate, day: number): NgbDate {\n day = +day;\n let mDays = this.getDaysPerMonth(date.month, date.year);\n if (day <= 0) {\n while (day <= 0) {\n date = this._setMonth(date, date.month - 1);\n mDays = this.getDaysPerMonth(date.month, date.year);\n day += mDays;\n }\n } else if (day > mDays) {\n while (day > mDays) {\n day -= mDays;\n date = this._setMonth(date, date.month + 1);\n mDays = this.getDaysPerMonth(date.month, date.year);\n }\n }\n date.day = day;\n return date;\n }\n\n private _setMonth(date: NgbDate, month: number): NgbDate {\n month = +month;\n date.year = date.year + Math.floor((month - 1) / 12);\n date.month = Math.floor(((month - 1) % 12 + 12) % 12) + 1;\n return date;\n }\n\n private _setYear(date: NgbDate, year: number): NgbDate {\n date.year = +year;\n return date;\n }\n}\n","import {NgbCalendarHijri} from './ngb-calendar-hijri';\nimport {NgbDate} from '../ngb-date';\nimport {Injectable} from '@angular/core';\n\n/**\n * Checks if islamic year is a leap year\n */\nfunction isIslamicLeapYear(hYear: number): boolean {\n return (14 + 11 * hYear) % 30 < 11;\n}\n\n/**\n * Checks if gregorian years is a leap year\n */\nfunction isGregorianLeapYear(gDate: Date): boolean {\n const year = gDate.getFullYear();\n return year % 4 === 0 && year % 100 !== 0 || year % 400 === 0;\n}\n\n/**\n * Returns the start of Hijri Month.\n * `hMonth` is 0 for Muharram, 1 for Safar, etc.\n * `hYear` is any Hijri hYear.\n */\nfunction getIslamicMonthStart(hYear: number, hMonth: number): number {\n return Math.ceil(29.5 * hMonth) + (hYear - 1) * 354 + Math.floor((3 + 11 * hYear) / 30.0);\n}\n\n/**\n * Returns the start of Hijri year.\n * `year` is any Hijri year.\n */\nfunction getIslamicYearStart(year: number): number {\n return (year - 1) * 354 + Math.floor((3 + 11 * year) / 30.0);\n}\n\nfunction mod(a: number, b: number): number {\n return a - b * Math.floor(a / b);\n}\n\n/**\n * The civil calendar is one type of Hijri calendars used in islamic countries.\n * Uses a fixed cycle of alternating 29- and 30-day months,\n * with a leap day added to the last month of 11 out of every 30 years.\n * http://cldr.unicode.org/development/development-process/design-proposals/islamic-calendar-types\n * All the calculations here are based on the equations from \"Calendrical Calculations\" By Edward M. Reingold, Nachum\n * Dershowitz.\n */\n\nconst GREGORIAN_EPOCH = 1721425.5;\nconst ISLAMIC_EPOCH = 1948439.5;\n\n@Injectable()\nexport class NgbCalendarIslamicCivil extends NgbCalendarHijri {\n /**\n * Returns the equivalent islamic(civil) date value for a give input Gregorian date.\n * `gDate` is a JS Date to be converted to Hijri.\n */\n fromGregorian(gDate: Date): NgbDate {\n const gYear = gDate.getFullYear(), gMonth = gDate.getMonth(), gDay = gDate.getDate();\n\n let julianDay = GREGORIAN_EPOCH - 1 + 365 * (gYear - 1) + Math.floor((gYear - 1) / 4) +\n -Math.floor((gYear - 1) / 100) + Math.floor((gYear - 1) / 400) +\n Math.floor(\n (367 * (gMonth + 1) - 362) / 12 + (gMonth + 1 <= 2 ? 0 : isGregorianLeapYear(gDate) ? -1 : -2) + gDay);\n julianDay = Math.floor(julianDay) + 0.5;\n\n const days = julianDay - ISLAMIC_EPOCH;\n const hYear = Math.floor((30 * days + 10646) / 10631.0);\n let hMonth = Math.ceil((days - 29 - getIslamicYearStart(hYear)) / 29.5);\n hMonth = Math.min(hMonth, 11);\n const hDay = Math.ceil(days - getIslamicMonthStart(hYear, hMonth)) + 1;\n return new NgbDate(hYear, hMonth + 1, hDay);\n }\n\n /**\n * Returns the equivalent JS date value for a give input islamic(civil) date.\n * `hDate` is an islamic(civil) date to be converted to Gregorian.\n */\n toGregorian(hDate: NgbDate): Date {\n const hYear = hDate.year;\n const hMonth = hDate.month - 1;\n const hDay = hDate.day;\n const julianDay =\n hDay + Math.ceil(29.5 * hMonth) + (hYear - 1) * 354 + Math.floor((3 + 11 * hYear) / 30) + ISLAMIC_EPOCH - 1;\n\n const wjd = Math.floor(julianDay - 0.5) + 0.5, depoch = wjd - GREGORIAN_EPOCH,\n quadricent = Math.floor(depoch / 146097), dqc = mod(depoch, 146097), cent = Math.floor(dqc / 36524),\n dcent = mod(dqc, 36524), quad = Math.floor(dcent / 1461), dquad = mod(dcent, 1461),\n yindex = Math.floor(dquad / 365);\n let year = quadricent * 400 + cent * 100 + quad * 4 + yindex;\n if (!(cent === 4 || yindex === 4)) {\n year++;\n }\n\n const gYearStart = GREGORIAN_EPOCH + 365 * (year - 1) + Math.floor((year - 1) / 4) - Math.floor((year - 1) / 100) +\n Math.floor((year - 1) / 400);\n\n const yearday = wjd - gYearStart;\n\n const tjd = GREGORIAN_EPOCH - 1 + 365 * (year - 1) + Math.floor((year - 1) / 4) - Math.floor((year - 1) / 100) +\n Math.floor((year - 1) / 400) + Math.floor(739 / 12 + (isGregorianLeapYear(new Date(year, 3, 1)) ? -1 : -2) + 1);\n\n const leapadj = wjd < tjd ? 0 : isGregorianLeapYear(new Date(year, 3, 1)) ? 1 : 2;\n\n const month = Math.floor(((yearday + leapadj) * 12 + 373) / 367);\n const tjd2 = GREGORIAN_EPOCH - 1 + 365 * (year - 1) + Math.floor((year - 1) / 4) - Math.floor((year - 1) / 100) +\n Math.floor((year - 1) / 400) +\n Math.floor(\n (367 * month - 362) / 12 + (month <= 2 ? 0 : isGregorianLeapYear(new Date(year, month - 1, 1)) ? -1 : -2) +\n 1);\n\n const day = wjd - tjd2 + 1;\n\n return new Date(year, month - 1, day);\n }\n\n /**\n * Returns the number of days in a specific Hijri month.\n * `month` is 1 for Muharram, 2 for Safar, etc.\n * `year` is any Hijri year.\n */\n getDaysPerMonth(month: number, year: number): number {\n year = year + Math.floor(month / 13);\n month = ((month - 1) % 12) + 1;\n let length = 29 + month % 2;\n if (month === 12 && isIslamicLeapYear(year)) {\n length++;\n }\n return length;\n }\n}\n","import {NgbCalendarIslamicCivil} from './ngb-calendar-islamic-civil';\nimport {NgbDate} from '../ngb-date';\nimport {Injectable} from '@angular/core';\n\n/**\n * Umalqura calendar is one type of Hijri calendars used in islamic countries.\n * This Calendar is used by Saudi Arabia for administrative purpose.\n * Unlike tabular calendars, the algorithm involves astronomical calculation, but it's still deterministic.\n * http://cldr.unicode.org/development/development-process/design-proposals/islamic-calendar-types\n */\n\nconst GREGORIAN_FIRST_DATE = new Date(1882, 10, 12);\nconst GREGORIAN_LAST_DATE = new Date(2174, 10, 25);\nconst HIJRI_BEGIN = 1300;\nconst HIJRI_END = 1600;\nconst ONE_DAY = 1000 * 60 * 60 * 24;\n\nconst MONTH_LENGTH = [\n // 1300-1304\n '101010101010', '110101010100', '111011001001', '011011010100', '011011101010',\n // 1305-1309\n '001101101100', '101010101101', '010101010101', '011010101001', '011110010010',\n // 1310-1314\n '101110101001', '010111010100', '101011011010', '010101011100', '110100101101',\n // 1315-1319\n '011010010101', '011101001010', '101101010100', '101101101010', '010110101101',\n // 1320-1324\n '010010101110', '101001001111', '010100010111', '011010001011', '011010100101',\n // 1325-1329\n '101011010101', '001011010110', '100101011011', '010010011101', '101001001101',\n // 1330-1334\n '110100100110', '110110010101', '010110101100', '100110110110', '001010111010',\n // 1335-1339\n '101001011011', '010100101011', '101010010101', '011011001010', '101011101001',\n // 1340-1344\n '001011110100', '100101110110', '001010110110', '100101010110', '101011001010',\n // 1345-1349\n '101110100100', '101111010010', '010111011001', '001011011100', '100101101101',\n // 1350-1354\n '010101001101', '101010100101', '101101010010', '101110100101', '010110110100',\n // 1355-1359\n '100110110110', '010101010111', '001010010111', '010101001011', '011010100011',\n // 1360-1364\n '011101010010', '101101100101', '010101101010', '101010101011', '010100101011',\n // 1365-1369\n '110010010101', '110101001010', '110110100101', '010111001010', '101011010110',\n // 1370-1374\n '100101010111', '010010101011', '100101001011', '101010100101', '101101010010',\n // 1375-1379\n '101101101010', '010101110101', '001001110110', '100010110111', '010001011011',\n // 1380-1384\n '010101010101', '010110101001', '010110110100', '100111011010', '010011011101',\n // 1385-1389\n '001001101110', '100100110110', '101010101010', '110101010100', '110110110010',\n // 1390-1394\n '010111010101', '001011011010', '100101011011', '010010101011', '101001010101',\n // 1395-1399\n '101101001001', '101101100100', '101101110001', '010110110100', '101010110101',\n // 1400-1404\n '101001010101', '110100100101', '111010010010', '111011001001', '011011010100',\n // 1405-1409\n '101011101001', '100101101011', '010010101011', '101010010011', '110101001001',\n // 1410-1414\n '110110100100', '110110110010', '101010111001', '010010111010', '101001011011',\n // 1415-1419\n '010100101011', '101010010101', '101100101010', '101101010101', '010101011100',\n // 1420-1424\n '010010111101', '001000111101', '100100011101', '101010010101', '101101001010',\n // 1425-1429\n '101101011010', '010101101101', '001010110110', '100100111011', '010010011011',\n // 1430-1434\n '011001010101', '011010101001', '011101010100', '101101101010', '010101101100',\n // 1435-1439\n '101010101101', '010101010101', '101100101001', '101110010010', '101110101001',\n // 1440-1444\n '010111010100', '101011011010', '010101011010', '101010101011', '010110010101',\n // 1445-1449\n '011101001001', '011101100100', '101110101010', '010110110101', '001010110110',\n // 1450-1454\n '101001010110', '111001001101', '101100100101', '101101010010', '101101101010',\n // 1455-1459\n '010110101101', '001010101110', '100100101111', '010010010111', '011001001011',\n // 1460-1464\n '011010100101', '011010101100', '101011010110', '010101011101', '010010011101',\n // 1465-1469\n '101001001101', '110100010110', '110110010101', '010110101010', '010110110101',\n // 1470-1474\n '001011011010', '100101011011', '010010101101', '010110010101', '011011001010',\n // 1475-1479\n '011011100100', '101011101010', '010011110101', '001010110110', '100101010110',\n // 1480-1484\n '101010101010', '101101010100', '101111010010', '010111011001', '001011101010',\n // 1485-1489\n '100101101101', '010010101101', '101010010101', '101101001010', '101110100101',\n // 1490-1494\n '010110110010', '100110110101', '010011010110', '101010010111', '010101000111',\n // 1495-1499\n '011010010011', '011101001001', '101101010101', '010101101010', '101001101011',\n // 1500-1504\n '010100101011', '101010001011', '110101000110', '110110100011', '010111001010',\n // 1505-1509\n '101011010110', '010011011011', '001001101011', '100101001011', '101010100101',\n // 1510-1514\n '101101010010', '101101101001', '010101110101', '000101110110', '100010110111',\n // 1515-1519\n '001001011011', '010100101011', '010101100101', '010110110100', '100111011010',\n // 1520-1524\n '010011101101', '000101101101', '100010110110', '101010100110', '110101010010',\n // 1525-1529\n '110110101001', '010111010100', '101011011010', '100101011011', '010010101011',\n // 1530-1534\n '011001010011', '011100101001', '011101100010', '101110101001', '010110110010',\n // 1535-1539\n '101010110101', '010101010101', '101100100101', '110110010010', '111011001001',\n // 1540-1544\n '011011010010', '101011101001', '010101101011', '010010101011', '101001010101',\n // 1545-1549\n '110100101001', '110101010100', '110110101010', '100110110101', '010010111010',\n // 1550-1554\n '101000111011', '010010011011', '101001001101', '101010101010', '101011010101',\n // 1555-1559\n '001011011010', '100101011101', '010001011110', '101000101110', '110010011010',\n // 1560-1564\n '110101010101', '011010110010', '011010111001', '010010111010', '101001011101',\n // 1565-1569\n '010100101101', '101010010101', '101101010010', '101110101000', '101110110100',\n // 1570-1574\n '010110111001', '001011011010', '100101011010', '101101001010', '110110100100',\n // 1575-1579\n '111011010001', '011011101000', '101101101010', '010101101101', '010100110101',\n // 1580-1584\n '011010010101', '110101001010', '110110101000', '110111010100', '011011011010',\n // 1585-1589\n '010101011011', '001010011101', '011000101011', '101100010101', '101101001010',\n // 1590-1594\n '101110010101', '010110101010', '101010101110', '100100101110', '110010001111',\n // 1595-1599\n '010100100111', '011010010101', '011010101010', '101011010110', '010101011101',\n // 1600\n '001010011101'\n];\n\nfunction getDaysDiff(date1: Date, date2: Date): number {\n const diff = Math.abs(date1.getTime() - date2.getTime());\n return Math.round(diff / ONE_DAY);\n}\n\n@Injectable()\nexport class NgbCalendarIslamicUmalqura extends NgbCalendarIslamicCivil {\n /**\n * Returns the equivalent islamic(Umalqura) date value for a give input Gregorian date.\n * `gdate` is s JS Date to be converted to Hijri.\n */\n fromGregorian(gDate: Date): NgbDate {\n let hDay = 1, hMonth = 0, hYear = 1300;\n let daysDiff = getDaysDiff(gDate, GREGORIAN_FIRST_DATE);\n if (gDate.getTime() - GREGORIAN_FIRST_DATE.getTime() >= 0 && gDate.getTime() - GREGORIAN_LAST_DATE.getTime() <= 0) {\n let year = 1300;\n for (let i = 0; i < MONTH_LENGTH.length; i++, year++) {\n for (let j = 0; j < 12; j++) {\n let numOfDays = +MONTH_LENGTH[i][j] + 29;\n if (daysDiff <= numOfDays) {\n hDay = daysDiff + 1;\n if (hDay > numOfDays) {\n hDay = 1;\n j++;\n }\n if (j > 11) {\n j = 0;\n year++;\n }\n hMonth = j;\n hYear = year;\n return new NgbDate(hYear, hMonth + 1, hDay);\n }\n daysDiff = daysDiff - numOfDays;\n }\n }\n } else {\n return super.fromGregorian(gDate);\n }\n }\n /**\n * Converts the current Hijri date to Gregorian.\n */\n toGregorian(hDate: NgbDate): Date {\n const hYear = hDate.year;\n const hMonth = hDate.month - 1;\n const hDay = hDate.day;\n let gDate = new Date(GREGORIAN_FIRST_DATE);\n let dayDiff = hDay - 1;\n if (hYear >= HIJRI_BEGIN && hYear <= HIJRI_END) {\n for (let y = 0; y < hYear - HIJRI_BEGIN; y++) {\n for (let m = 0; m < 12; m++) {\n dayDiff += +MONTH_LENGTH[y][m] + 29;\n }\n }\n for (let m = 0; m < hMonth; m++) {\n dayDiff += +MONTH_LENGTH[hYear - HIJRI_BEGIN][m] + 29;\n }\n gDate.setDate(GREGORIAN_FIRST_DATE.getDate() + dayDiff);\n } else {\n gDate = super.toGregorian(hDate);\n }\n return gDate;\n }\n /**\n * Returns the number of days in a specific Hijri hMonth.\n * `hMonth` is 1 for Muharram, 2 for Safar, etc.\n * `hYear` is any Hijri hYear.\n */\n getDaysPerMonth(hMonth: number, hYear: number): number {\n if (hYear >= HIJRI_BEGIN && hYear <= HIJRI_END) {\n const pos = hYear - HIJRI_BEGIN;\n return +MONTH_LENGTH[pos][hMonth - 1] + 29;\n }\n return super.getDaysPerMonth(hMonth, hYear);\n }\n}\n","import {NgbDate} from '../ngb-date';\n\n/**\n * Returns the equivalent JS date value for a give input Jalali date.\n * `jalaliDate` is an Jalali date to be converted to Gregorian.\n */\nexport function toGregorian(jalaliDate: NgbDate): Date {\n let jdn = jalaliToJulian(jalaliDate.year, jalaliDate.month, jalaliDate.day);\n let date = julianToGregorian(jdn);\n date.setHours(6, 30, 3, 200);\n return date;\n}\n\n/**\n * Returns the equivalent jalali date value for a give input Gregorian date.\n * `gdate` is a JS Date to be converted to jalali.\n * utc to local\n */\nexport function fromGregorian(gdate: Date): NgbDate {\n let g2d = gregorianToJulian(gdate.getFullYear(), gdate.getMonth() + 1, gdate.getDate());\n return julianToJalali(g2d);\n}\n\nexport function setJalaliYear(date: NgbDate, yearValue: number): NgbDate {\n date.year = +yearValue;\n return date;\n}\n\nexport function setJalaliMonth(date: NgbDate, month: number): NgbDate {\n month = +month;\n date.year = date.year + Math.floor((month - 1) / 12);\n date.month = Math.floor(((month - 1) % 12 + 12) % 12) + 1;\n return date;\n}\n\nexport function setJalaliDay(date: NgbDate, day: number): NgbDate {\n let mDays = getDaysPerMonth(date.month, date.year);\n if (day <= 0) {\n while (day <= 0) {\n date = setJalaliMonth(date, date.month - 1);\n mDays = getDaysPerMonth(date.month, date.year);\n day += mDays;\n }\n } else if (day > mDays) {\n while (day > mDays) {\n day -= mDays;\n date = setJalaliMonth(date, date.month + 1);\n mDays = getDaysPerMonth(date.month, date.year);\n }\n }\n date.day = day;\n return date;\n}\n\nfunction mod(a: number, b: number): number {\n return a - b * Math.floor(a / b);\n}\n\nfunction div(a: number, b: number) {\n return Math.trunc(a / b);\n}\n\n/*\n This function determines if the Jalali (Persian) year is\n leap (366-day long) or is the common year (365 days), and\n finds the day in March (Gregorian calendar) of the first\n day of the Jalali year (jalaliYear).\n @param jalaliYear Jalali calendar year (-61 to 3177)\n @return\n leap: number of years since the last leap year (0 to 4)\n gYear: Gregorian year of the beginning of Jalali year\n march: the March day of Farvardin the 1st (1st day of jalaliYear)\n @see: http://www.astro.uni.torun.pl/~kb/Papers/EMP/PersianC-EMP.htm\n @see: http://www.fourmilab.ch/documents/calendar/\n */\nfunction jalCal(jalaliYear: number) {\n // Jalali years starting the 33-year rule.\n let breaks =\n [-61, 9, 38, 199, 426, 686, 756, 818, 1111, 1181, 1210, 1635, 2060, 2097, 2192, 2262, 2324, 2394, 2456, 3178];\n const breaksLength = breaks.length;\n const gYear = jalaliYear + 621;\n let leapJ = -14;\n let jp = breaks[0];\n\n if (jalaliYear < jp || jalaliYear >= breaks[breaksLength - 1]) {\n throw new Error('Invalid Jalali year ' + jalaliYear);\n }\n\n // Find the limiting years for the Jalali year jalaliYear.\n let jump;\n for (let i = 1; i < breaksLength; i += 1) {\n const jm = breaks[i];\n jump = jm - jp;\n if (jalaliYear < jm) {\n break;\n }\n leapJ = leapJ + div(jump, 33) * 8 + div(mod(jump, 33), 4);\n jp = jm;\n }\n let n = jalaliYear - jp;\n\n // Find the number of leap years from AD 621 to the beginning\n // of the current Jalali year in the Persian calendar.\n leapJ = leapJ + div(n, 33) * 8 + div(mod(n, 33) + 3, 4);\n if (mod(jump, 33) === 4 && jump - n === 4) {\n leapJ += 1;\n }\n\n // And the same in the Gregorian calendar (until the year gYear).\n const leapG = div(gYear, 4) - div((div(gYear, 100) + 1) * 3, 4) - 150;\n\n // Determine the Gregorian date of Farvardin the 1st.\n const march = 20 + leapJ - leapG;\n\n // Find how many years have passed since the last leap year.\n if (jump - n < 6) {\n n = n - jump + div(jump + 4, 33) * 33;\n }\n let leap = mod(mod(n + 1, 33) - 1, 4);\n if (leap === -1) {\n leap = 4;\n }\n\n return {leap: leap, gy: gYear, march: march};\n}\n\n/*\n Calculates Gregorian and Julian calendar dates from the Julian Day number\n (jdn) for the period since jdn=-34839655 (i.e. the year -100100 of both\n calendars) to some millions years ahead of the present.\n @param jdn Julian Day number\n @return\n gYear: Calendar year (years BC numbered 0, -1, -2, ...)\n gMonth: Calendar month (1 to 12)\n gDay: Calendar day of the month M (1 to 28/29/30/31)\n */\nfunction julianToGregorian(julianDayNumber: number) {\n let j = 4 * julianDayNumber + 139361631;\n j = j + div(div(4 * julianDayNumber + 183187720, 146097) * 3, 4) * 4 - 3908;\n const i = div(mod(j, 1461), 4) * 5 + 308;\n const gDay = div(mod(i, 153), 5) + 1;\n const gMonth = mod(div(i, 153), 12) + 1;\n const gYear = div(j, 1461) - 100100 + div(8 - gMonth, 6);\n\n return new Date(gYear, gMonth - 1, gDay);\n}\n\n/*\n Converts a date of the Jalali calendar to the Julian Day number.\n @param jy Jalali year (1 to 3100)\n @param jm Jalali month (1 to 12)\n @param jd Jalali day (1 to 29/31)\n @return Julian Day number\n */\nfunction gregorianToJulian(gy: number, gm: number, gd: number) {\n let d = div((gy + div(gm - 8, 6) + 100100) * 1461, 4) + div(153 * mod(gm + 9, 12) + 2, 5) + gd - 34840408;\n d = d - div(div(gy + 100100 + div(gm - 8, 6), 100) * 3, 4) + 752;\n return d;\n}\n\n/*\n Converts the Julian Day number to a date in the Jalali calendar.\n @param julianDayNumber Julian Day number\n @return\n jalaliYear: Jalali year (1 to 3100)\n jalaliMonth: Jalali month (1 to 12)\n jalaliDay: Jalali day (1 to 29/31)\n */\nfunction julianToJalali(julianDayNumber: number) {\n let gy = julianToGregorian(julianDayNumber).getFullYear() // Calculate Gregorian year (gy).\n ,\n jalaliYear = gy - 621, r = jalCal(jalaliYear), gregorianDay = gregorianToJulian(gy, 3, r.march), jalaliDay,\n jalaliMonth, numberOfDays;\n\n // Find number of days that passed since 1 Farvardin.\n numberOfDays = julianDayNumber - gregorianDay;\n if (numberOfDays >= 0) {\n if (numberOfDays <= 185) {\n // The first 6 months.\n jalaliMonth = 1 + div(numberOfDays, 31);\n jalaliDay = mod(numberOfDays, 31) + 1;\n return new NgbDate(jalaliYear, jalaliMonth, jalaliDay);\n } else {\n // The remaining months.\n numberOfDays -= 186;\n }\n } else {\n // Previous Jalali year.\n jalaliYear -= 1;\n numberOfDays += 179;\n if (r.leap === 1) {\n numberOfDays += 1;\n }\n }\n jalaliMonth = 7 + div(numberOfDays, 30);\n jalaliDay = mod(numberOfDays, 30) + 1;\n\n return new NgbDate(jalaliYear, jalaliMonth, jalaliDay);\n}\n\n/*\n Converts a date of the Jalali calendar to the Julian Day number.\n @param jYear Jalali year (1 to 3100)\n @param jMonth Jalali month (1 to 12)\n @param jDay Jalali day (1 to 29/31)\n @return Julian Day number\n */\nfunction jalaliToJulian(jYear: number, jMonth: number, jDay: number) {\n let r = jalCal(jYear);\n return gregorianToJulian(r.gy, 3, r.march) + (jMonth - 1) * 31 - div(jMonth, 7) * (jMonth - 7) + jDay - 1;\n}\n\n/**\n * Returns the number of days in a specific jalali month.\n */\nfunction getDaysPerMonth(month: number, year: number): number {\n if (month <= 6) {\n return 31;\n }\n if (month <= 11) {\n return 30;\n }\n if (jalCal(year).leap === 0) {\n return 30;\n }\n return 29;\n}\n","import {Injectable} from '@angular/core';\nimport {NgbDate} from '../ngb-date';\nimport {NgbCalendar, NgbPeriod} from '../ngb-calendar';\nimport {isInteger} from '../../util/util';\n\nimport {fromGregorian, setJalaliDay, setJalaliMonth, setJalaliYear, toGregorian} from './jalali';\n\n@Injectable()\nexport class NgbCalendarPersian extends NgbCalendar {\n getDaysPerWeek() { return 7; }\n\n getMonths() { return [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]; }\n\n getWeeksPerMonth() { return 6; }\n\n getNext(date: NgbDate, period: NgbPeriod = 'd', number = 1) {\n date = new NgbDate(date.year, date.month, date.day);\n\n switch (period) {\n case 'y':\n date = setJalaliYear(date, date.year + number);\n date.month = 1;\n date.day = 1;\n return date;\n case 'm':\n date = setJalaliMonth(date, date.month + number);\n date.day = 1;\n return date;\n case 'd':\n return setJalaliDay(date, date.day + number);\n default:\n return date;\n }\n }\n\n getPrev(date: NgbDate, period: NgbPeriod = 'd', number = 1) { return this.getNext(date, period, -number); }\n\n getWeekday(date: NgbDate) {\n const day = toGregorian(date).getDay();\n // in JS Date Sun=0, in ISO 8601 Sun=7\n return day === 0 ? 7 : day;\n }\n\n getWeekNumber(week: NgbDate[], firstDayOfWeek: number) {\n // in JS Date Sun=0, in ISO 8601 Sun=7\n if (firstDayOfWeek === 7) {\n firstDayOfWeek = 0;\n }\n\n const thursdayIndex = (4 + 7 - firstDayOfWeek) % 7;\n const date = week[thursdayIndex];\n\n const jsDate = toGregorian(date);\n jsDate.setDate(jsDate.getDate() + 4 - (jsDate.getDay() || 7)); // Thursday\n const time = jsDate.getTime();\n const startDate = toGregorian(new NgbDate(date.year, 1, 1));\n return Math.floor(Math.round((time - startDate.getTime()) / 86400000) / 7) + 1;\n }\n\n getToday(): NgbDate { return fromGregorian(new Date()); }\n\n isValid(date: NgbDate): boolean {\n return date && isInteger(date.year) && isInteger(date.month) && isInteger(date.day) &&\n !isNaN(toGregorian(date).getTime());\n }\n}\n","import {NgbDate} from '../ngb-date';\nimport {NgbDateStruct} from '../ngb-date-struct';\n\nconst PARTS_PER_HOUR = 1080;\nconst PARTS_PER_DAY = 24 * PARTS_PER_HOUR;\nconst PARTS_FRACTIONAL_MONTH = 12 * PARTS_PER_HOUR + 793;\nconst PARTS_PER_MONTH = 29 * PARTS_PER_DAY + PARTS_FRACTIONAL_MONTH;\nconst BAHARAD = 11 * PARTS_PER_HOUR + 204;\nconst HEBREW_DAY_ON_JAN_1_1970 = 2092591;\nconst GREGORIAN_EPOCH = 1721425.5;\n\nfunction isGregorianLeapYear(year: number): boolean {\n return year % 4 === 0 && year % 100 !== 0 || year % 400 === 0;\n}\n\nfunction numberOfFirstDayInYear(year: number): number {\n let monthsBeforeYear = Math.floor((235 * year - 234) / 19);\n let fractionalMonthsBeforeYear = monthsBeforeYear * PARTS_FRACTIONAL_MONTH + BAHARAD;\n let dayNumber = monthsBeforeYear * 29 + Math.floor(fractionalMonthsBeforeYear / PARTS_PER_DAY);\n let timeOfDay = fractionalMonthsBeforeYear % PARTS_PER_DAY;\n\n let dayOfWeek = dayNumber % 7; // 0 == Monday\n\n if (dayOfWeek === 2 || dayOfWeek === 4 || dayOfWeek === 6) {\n dayNumber++;\n dayOfWeek = dayNumber % 7;\n }\n if (dayOfWeek === 1 && timeOfDay > 15 * PARTS_PER_HOUR + 204 && !isHebrewLeapYear(year)) {\n dayNumber += 2;\n } else if (dayOfWeek === 0 && timeOfDay > 21 * PARTS_PER_HOUR + 589 && isHebrewLeapYear(year - 1)) {\n dayNumber++;\n }\n return dayNumber;\n}\n\nfunction getDaysInGregorianMonth(month: number, year: number): number {\n let days = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\n if (isGregorianLeapYear(year)) {\n days[1]++;\n }\n return days[month - 1];\n}\n\nfunction getHebrewMonths(year: number): number {\n return isHebrewLeapYear(year) ? 13 : 12;\n}\n\n/**\n * Returns the number of days in a specific Hebrew year.\n * `year` is any Hebrew year.\n */\nfunction getDaysInHebrewYear(year: number): number {\n return numberOfFirstDayInYear(year + 1) - numberOfFirstDayInYear(year);\n}\n\nexport function isHebrewLeapYear(year: number): boolean {\n let b = (year * 12 + 17) % 19;\n return b >= ((b < 0) ? -7 : 12);\n}\n\n/**\n * Returns the number of days in a specific Hebrew month.\n * `month` is 1 for Nisan, 2 for Iyar etc. Note: Hebrew leap year contains 13 months.\n * `year` is any Hebrew year.\n */\nexport function getDaysInHebrewMonth(month: number, year: number): number {\n let yearLength = numberOfFirstDayInYear(year + 1) - numberOfFirstDayInYear(year);\n let yearType = (yearLength <= 380 ? yearLength : (yearLength - 30)) - 353;\n let leapYear = isHebrewLeapYear(year);\n let daysInMonth = leapYear ? [30, 29, 29, 29, 30, 30, 29, 30, 29, 30, 29, 30, 29] :\n [30, 29, 29, 29, 30, 29, 30, 29, 30, 29, 30, 29];\n if (yearType > 0) {\n daysInMonth[2]++; // Kislev gets an extra day in normal or complete years.\n }\n if (yearType > 1) {\n daysInMonth[1]++; // Heshvan gets an extra day in complete years only.\n }\n return daysInMonth[month - 1];\n}\n\nexport function getDayNumberInHebrewYear(date: NgbDate): number {\n let numberOfDay = 0;\n for (let i = 1; i < date.month; i++) {\n numberOfDay += getDaysInHebrewMonth(i, date.year);\n }\n return numberOfDay + date.day;\n}\n\nexport function setHebrewMonth(date: NgbDate, val: number): NgbDate {\n let after = val >= 0;\n if (!after) {\n val = -val;\n }\n while (val > 0) {\n if (after) {\n if (val > getHebrewMonths(date.year) - date.month) {\n val -= getHebrewMonths(date.year) - date.month + 1;\n date.year++;\n date.month = 1;\n } else {\n date.month += val;\n val = 0;\n }\n } else {\n if (val >= date.month) {\n date.year--;\n val -= date.month;\n date.month = getHebrewMonths(date.year);\n } else {\n date.month -= val;\n val = 0;\n }\n }\n }\n return date;\n}\n\nexport function setHebrewDay(date: NgbDate, val: number): NgbDate {\n let after = val >= 0;\n if (!after) {\n val = -val;\n }\n while (val > 0) {\n if (after) {\n if (val > getDaysInHebrewYear(date.year) - getDayNumberInHebrewYear(date)) {\n val -= getDaysInHebrewYear(date.year) - getDayNumberInHebrewYear(date) + 1;\n date.year++;\n date.month = 1;\n date.day = 1;\n } else if (val > getDaysInHebrewMonth(date.month, date.year) - date.day) {\n val -= getDaysInHebrewMonth(date.month, date.year) - date.day + 1;\n date.month++;\n date.day = 1;\n } else {\n date.day += val;\n val = 0;\n }\n } else {\n if (val >= date.day) {\n val -= date.day;\n date.month--;\n if (date.month === 0) {\n date.year--;\n date.month = getHebrewMonths(date.year);\n }\n date.day = getDaysInHebrewMonth(date.month, date.year);\n } else {\n date.day -= val;\n val = 0;\n }\n }\n }\n return date;\n}\n\n/**\n * Returns the equivalent Hebrew date value for a give input Gregorian date.\n * `gdate` is a JS Date to be converted to Hebrew date.\n */\nexport function fromGregorian(gdate: Date): NgbDate {\n const date = new Date(gdate);\n const gYear = date.getFullYear(), gMonth = date.getMonth(), gDay = date.getDate();\n let julianDay = GREGORIAN_EPOCH - 1 + 365 * (gYear - 1) + Math.floor((gYear - 1) / 4) -\n Math.floor((gYear - 1) / 100) + Math.floor((gYear - 1) / 400) +\n Math.floor((367 * (gMonth + 1) - 362) / 12 + (gMonth + 1 <= 2 ? 0 : isGregorianLeapYear(gYear) ? -1 : -2) + gDay);\n julianDay = Math.floor(julianDay + 0.5);\n let daysSinceHebEpoch = julianDay - 347997;\n let monthsSinceHebEpoch = Math.floor(daysSinceHebEpoch * PARTS_PER_DAY / PARTS_PER_MONTH);\n let hYear = Math.floor((monthsSinceHebEpoch * 19 + 234) / 235) + 1;\n let firstDayOfThisYear = numberOfFirstDayInYear(hYear);\n let dayOfYear = daysSinceHebEpoch - firstDayOfThisYear;\n while (dayOfYear < 1) {\n hYear--;\n firstDayOfThisYear = numberOfFirstDayInYear(hYear);\n dayOfYear = daysSinceHebEpoch - firstDayOfThisYear;\n }\n let hMonth = 1;\n let hDay = dayOfYear;\n while (hDay > getDaysInHebrewMonth(hMonth, hYear)) {\n hDay -= getDaysInHebrewMonth(hMonth, hYear);\n hMonth++;\n }\n return new NgbDate(hYear, hMonth, hDay);\n}\n\n/**\n * Returns the equivalent JS date value for a given Hebrew date.\n * `hebrewDate` is an Hebrew date to be converted to Gregorian.\n */\nexport function toGregorian(hebrewDate: NgbDateStruct | NgbDate): Date {\n const hYear = hebrewDate.year;\n const hMonth = hebrewDate.month;\n const hDay = hebrewDate.day;\n let days = numberOfFirstDayInYear(hYear);\n for (let i = 1; i < hMonth; i++) {\n days += getDaysInHebrewMonth(i, hYear);\n }\n days += hDay;\n let diffDays = days - HEBREW_DAY_ON_JAN_1_1970;\n let after = diffDays >= 0;\n if (!after) {\n diffDays = -diffDays;\n }\n let gYear = 1970;\n let gMonth = 1;\n let gDay = 1;\n while (diffDays > 0) {\n if (after) {\n if (diffDays >= (isGregorianLeapYear(gYear) ? 366 : 365)) {\n diffDays -= isGregorianLeapYear(gYear) ? 366 : 365;\n gYear++;\n } else if (diffDays >= getDaysInGregorianMonth(gMonth, gYear)) {\n diffDays -= getDaysInGregorianMonth(gMonth, gYear);\n gMonth++;\n } else {\n gDay += diffDays;\n diffDays = 0;\n }\n } else {\n if (diffDays >= (isGregorianLeapYear(gYear - 1) ? 366 : 365)) {\n diffDays -= isGregorianLeapYear(gYear - 1) ? 366 : 365;\n gYear--;\n } else {\n if (gMonth > 1) {\n gMonth--;\n } else {\n gMonth = 12;\n gYear--;\n }\n if (diffDays >= getDaysInGregorianMonth(gMonth, gYear)) {\n diffDays -= getDaysInGregorianMonth(gMonth, gYear);\n } else {\n gDay = getDaysInGregorianMonth(gMonth, gYear) - diffDays + 1;\n diffDays = 0;\n }\n }\n }\n }\n return new Date(gYear, gMonth - 1, gDay);\n}\n\nexport function hebrewNumerals(numerals: number): string {\n if (!numerals) {\n return '';\n }\n const hArray0_9 = ['', '\\u05d0', '\\u05d1', '\\u05d2', '\\u05d3', '\\u05d4', '\\u05d5', '\\u05d6', '\\u05d7', '\\u05d8'];\n const hArray10_19 = [\n '\\u05d9', '\\u05d9\\u05d0', '\\u05d9\\u05d1', '\\u05d9\\u05d2', '\\u05d9\\u05d3', '\\u05d8\\u05d5', '\\u05d8\\u05d6',\n '\\u05d9\\u05d6', '\\u05d9\\u05d7', '\\u05d9\\u05d8'\n ];\n const hArray20_90 = ['', '', '\\u05db', '\\u05dc', '\\u05de', '\\u05e0', '\\u05e1', '\\u05e2', '\\u05e4', '\\u05e6'];\n const hArray100_900 = [\n '', '\\u05e7', '\\u05e8', '\\u05e9', '\\u05ea', '\\u05ea\\u05e7', '\\u05ea\\u05e8', '\\u05ea\\u05e9', '\\u05ea\\u05ea',\n '\\u05ea\\u05ea\\u05e7'\n ];\n const hArray1000_9000 = [\n '', '\\u05d0', '\\u05d1', '\\u05d1\\u05d0', '\\u05d1\\u05d1', '\\u05d4', '\\u05d4\\u05d0', '\\u05d4\\u05d1',\n '\\u05d4\\u05d1\\u05d0', '\\u05d4\\u05d1\\u05d1'\n ];\n const geresh = '\\u05f3', gershaim = '\\u05f4';\n let mem = 0;\n let result = [];\n let step = 0;\n while (numerals > 0) {\n let m = numerals % 10;\n if (step === 0) {\n mem = m;\n } else if (step === 1) {\n if (m !== 1) {\n result.unshift(hArray20_90[m], hArray0_9[mem]);\n } else {\n result.unshift(hArray10_19[mem]);\n }\n } else if (step === 2) {\n result.unshift(hArray100_900[m]);\n } else {\n if (m !== 5) {\n result.unshift(hArray1000_9000[m], geresh, ' ');\n }\n break;\n }\n numerals = Math.floor(numerals / 10);\n if (step === 0 && numerals === 0) {\n result.unshift(hArray0_9[m]);\n }\n step++;\n }\n result = result.join('').split('');\n if (result.length === 1) {\n result.push(geresh);\n } else if (result.length > 1) {\n result.splice(result.length - 1, 0, gershaim);\n }\n return result.join('');\n}\n","import {NgbDate} from '../ngb-date';\nimport {fromJSDate, NgbCalendar, NgbPeriod, toJSDate} from '../ngb-calendar';\nimport {Injectable} from '@angular/core';\nimport {isNumber} from '../../util/util';\nimport {\n fromGregorian,\n getDayNumberInHebrewYear,\n getDaysInHebrewMonth,\n isHebrewLeapYear,\n toGregorian,\n setHebrewDay,\n setHebrewMonth\n} from './hebrew';\n\n/**\n * @since 3.2.0\n */\n@Injectable()\nexport class NgbCalendarHebrew extends NgbCalendar {\n getDaysPerWeek() { return 7; }\n\n getMonths(year?: number) {\n if (year && isHebrewLeapYear(year)) {\n return [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13];\n } else {\n return [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12];\n }\n }\n\n getWeeksPerMonth() { return 6; }\n\n isValid(date: NgbDate): boolean {\n let b = date && isNumber(date.year) && isNumber(date.month) && isNumber(date.day);\n b = b && date.month > 0 && date.month <= (isHebrewLeapYear(date.year) ? 13 : 12);\n b = b && date.day > 0 && date.day <= getDaysInHebrewMonth(date.month, date.year);\n return b && !isNaN(toGregorian(date).getTime());\n }\n\n getNext(date: NgbDate, period: NgbPeriod = 'd', number = 1) {\n date = new NgbDate(date.year, date.month, date.day);\n\n switch (period) {\n case 'y':\n date.year += number;\n date.month = 1;\n date.day = 1;\n return date;\n case 'm':\n date = setHebrewMonth(date, number);\n date.day = 1;\n return date;\n case 'd':\n return setHebrewDay(date, number);\n default:\n return date;\n }\n }\n\n getPrev(date: NgbDate, period: NgbPeriod = 'd', number = 1) { return this.getNext(date, period, -number); }\n\n getWeekday(date: NgbDate) {\n const day = toGregorian(date).getDay();\n // in JS Date Sun=0, in ISO 8601 Sun=7\n return day === 0 ? 7 : day;\n }\n\n getWeekNumber(week: NgbDate[], firstDayOfWeek: number) {\n const date = week[week.length - 1];\n return Math.ceil(getDayNumberInHebrewYear(date) / 7);\n }\n\n getToday(): NgbDate { return fromGregorian(new Date()); }\n\n /**\n * @since 3.4.0\n */\n toGregorian(date: NgbDate): NgbDate { return fromJSDate(toGregorian(date)); }\n\n /**\n * @since 3.4.0\n */\n fromGregorian(date: NgbDate): NgbDate { return fromGregorian(toJSDate(date)); }\n}\n","import {NgbDatepickerI18n} from '../datepicker-i18n';\nimport {NgbDateStruct} from '../../index';\nimport {hebrewNumerals, isHebrewLeapYear} from './hebrew';\nimport {Injectable} from '@angular/core';\n\n\nconst WEEKDAYS = ['שני', 'שלישי', 'רביעי', 'חמישי', 'שישי', 'שבת', 'ראשון'];\nconst MONTHS = ['תשרי', 'חשון', 'כסלו', 'טבת', 'שבט', 'אדר', 'ניסן', 'אייר', 'סיון', 'תמוז', 'אב', 'אלול'];\nconst MONTHS_LEAP =\n ['תשרי', 'חשון', 'כסלו', 'טבת', 'שבט', 'אדר א׳', 'אדר ב׳', 'ניסן', 'אייר', 'סיון', 'תמוז', 'אב', 'אלול'];\n\n/**\n * @since 3.2.0\n */\n@Injectable()\nexport class NgbDatepickerI18nHebrew extends NgbDatepickerI18n {\n getMonthShortName(month: number, year?: number): string { return this.getMonthFullName(month, year); }\n\n getMonthFullName(month: number, year?: number): string {\n return isHebrewLeapYear(year) ? MONTHS_LEAP[month - 1] : MONTHS[month - 1];\n }\n\n getWeekdayShortName(weekday: number): string { return WEEKDAYS[weekday - 1]; }\n\n getDayAriaLabel(date: NgbDateStruct): string {\n return `${hebrewNumerals(date.day)} ${this.getMonthFullName(date.month, date.year)} ${hebrewNumerals(date.year)}`;\n }\n\n getDayNumerals(date: NgbDateStruct): string { return hebrewNumerals(date.day); }\n\n getWeekNumerals(weekNumber: number): string { return hebrewNumerals(weekNumber); }\n\n getYearNumerals(year: number): string { return hebrewNumerals(year); }\n}\n","import {Injectable} from '@angular/core';\nimport {NgbDateAdapter} from './ngb-date-adapter';\nimport {NgbDateStruct} from '../ngb-date-struct';\nimport {isInteger} from '../../util/util';\n\n/**\n * [`NgbDateAdapter`](#/components/datepicker/api#NgbDateAdapter) implementation that uses\n * native javascript dates as a user date model.\n */\n@Injectable()\nexport class NgbDateNativeAdapter extends NgbDateAdapter<Date> {\n /**\n * Converts a native `Date` to a `NgbDateStruct`.\n */\n fromModel(date: Date): NgbDateStruct {\n return (date instanceof Date && !isNaN(date.getTime())) ? this._fromNativeDate(date) : null;\n }\n\n /**\n * Converts a `NgbDateStruct` to a native `Date`.\n */\n toModel(date: NgbDateStruct): Date {\n return date && isInteger(date.year) && isInteger(date.month) && isInteger(date.day) ? this._toNativeDate(date) :\n null;\n }\n\n protected _fromNativeDate(date: Date): NgbDateStruct {\n return {year: date.getFullYear(), month: date.getMonth() + 1, day: date.getDate()};\n }\n\n protected _toNativeDate(date: NgbDateStruct): Date {\n const jsDate = new Date(date.year, date.month - 1, date.day, 12);\n // avoid 30 -> 1930 conversion\n jsDate.setFullYear(date.year);\n return jsDate;\n }\n}\n","import {Injectable} from '@angular/core';\nimport {NgbDateStruct} from '../ngb-date-struct';\nimport {NgbDateNativeAdapter} from './ngb-date-native-adapter';\n\n/**\n * Same as [`NgbDateNativeAdapter`](#/components/datepicker/api#NgbDateNativeAdapter), but with UTC dates.\n *\n * @since 3.2.0\n */\n@Injectable()\nexport class NgbDateNativeUTCAdapter extends NgbDateNativeAdapter {\n protected _fromNativeDate(date: Date): NgbDateStruct {\n return {year: date.getUTCFullYear(), month: date.getUTCMonth() + 1, day: date.getUTCDate()};\n }\n\n protected _toNativeDate(date: NgbDateStruct): Date {\n const jsDate = new Date(Date.UTC(date.year, date.month - 1, date.day));\n // avoid 30 -> 1930 conversion\n jsDate.setUTCFullYear(date.year);\n return jsDate;\n }\n}\n","import {NgModule, ModuleWithProviders} from '@angular/core';\nimport {CommonModule} from '@angular/common';\nimport {FormsModule} from '@angular/forms';\nimport {NgbDatepicker} from './datepicker';\nimport {NgbDatepickerMonthView} from './datepicker-month-view';\nimport {NgbDatepickerNavigation} from './datepicker-navigation';\nimport {NgbInputDatepicker} from './datepicker-input';\nimport {NgbDatepickerDayView} from './datepicker-day-view';\nimport {NgbDatepickerNavigationSelect} from './datepicker-navigation-select';\n\nexport {NgbDatepicker, NgbDatepickerNavigateEvent} from './datepicker';\nexport {NgbInputDatepicker} from './datepicker-input';\nexport {NgbCalendar, NgbPeriod, NgbCalendarGregorian} from './ngb-calendar';\nexport {NgbCalendarIslamicCivil} from './hijri/ngb-calendar-islamic-civil';\nexport {NgbCalendarIslamicUmalqura} from './hijri/ngb-calendar-islamic-umalqura';\nexport {NgbCalendarPersian} from './jalali/ngb-calendar-persian';\nexport {NgbCalendarHebrew} from './hebrew/ngb-calendar-hebrew';\nexport {NgbDatepickerI18nHebrew} from './hebrew/datepicker-i18n-hebrew';\nexport {NgbDatepickerMonthView} from './datepicker-month-view';\nexport {NgbDatepickerDayView} from './datepicker-day-view';\nexport {NgbDatepickerNavigation} from './datepicker-navigation';\nexport {NgbDatepickerNavigationSelect} from './datepicker-navigation-select';\nexport {NgbDatepickerConfig} from './datepicker-config';\nexport {NgbDatepickerI18n} from './datepicker-i18n';\nexport {NgbDateStruct} from './ngb-date-struct';\nexport {NgbDate} from './ngb-date';\nexport {NgbDateAdapter} from './adapters/ngb-date-adapter';\nexport {NgbDateNativeAdapter} from './adapters/ngb-date-native-adapter';\nexport {NgbDateNativeUTCAdapter} from './adapters/ngb-date-native-utc-adapter';\nexport {NgbDateParserFormatter} from './ngb-date-parser-formatter';\n\n@NgModule({\n declarations: [\n NgbDatepicker, NgbDatepickerMonthView, NgbDatepickerNavigation, NgbDatepickerNavigationSelect, NgbDatepickerDayView,\n NgbInputDatepicker\n ],\n exports: [NgbDatepicker, NgbInputDatepicker],\n imports: [CommonModule, FormsModule],\n entryComponents: [NgbDatepicker]\n})\nexport class NgbDatepickerModule {\n /**\n * Importing with '.forRoot()' is no longer necessary, you can simply import the module.\n * Will be removed in 4.0.0.\n *\n * @deprecated 3.0.0\n */\n static forRoot(): ModuleWithProviders { return {ngModule: NgbDatepickerModule}; }\n}\n","import {Injectable} from '@angular/core';\nimport {PlacementArray} from '../util/positioning';\n\n/**\n * A configuration service for the [`NgbDropdown`](#/components/dropdown/api#NgbDropdown) component.\n *\n * You can inject this service, typically in your root component, and customize the values of its properties in\n * order to provide default values for all the dropdowns used in the application.\n */\n@Injectable({providedIn: 'root'})\nexport class NgbDropdownConfig {\n autoClose: boolean | 'outside' | 'inside' = true;\n placement: PlacementArray = ['bottom-left', 'bottom-right', 'top-left', 'top-right'];\n container: null | 'body';\n}\n","import {\n ChangeDetectorRef,\n ContentChild,\n ContentChildren,\n Directive,\n ElementRef,\n EventEmitter,\n forwardRef,\n Inject,\n Input,\n NgZone,\n OnDestroy,\n OnInit,\n Output,\n QueryList,\n Renderer2,\n SimpleChanges,\n Optional\n} from '@angular/core';\nimport {DOCUMENT} from '@angular/common';\nimport {Subject, Subscription} from 'rxjs';\n\nimport {Placement, PlacementArray, positionElements} from '../util/positioning';\nimport {ngbAutoClose} from '../util/autoclose';\nimport {Key} from '../util/key';\n\nimport {NgbDropdownConfig} from './dropdown-config';\n\n@Directive({selector: '.navbar'})\nexport class NgbNavbar {\n}\n\n/**\n * A directive you should put put on a dropdown item to enable keyboard navigation.\n * Arrow keys will move focus between items marked with this directive.\n *\n * @since 4.1.0\n */\n@Directive({selector: '[ngbDropdownItem]', host: {'class': 'dropdown-item', '[class.disabled]': 'disabled'}})\nexport class NgbDropdownItem {\n private _disabled = false;\n\n @Input()\n set disabled(value: boolean) {\n this._disabled = <any>value === '' || value === true; // accept an empty attribute as true\n }\n\n get disabled(): boolean { return this._disabled; }\n\n constructor(public elementRef: ElementRef<HTMLElement>) {}\n}\n\n/**\n * A directive that wraps dropdown menu content and dropdown items.\n */\n@Directive({\n selector: '[ngbDropdownMenu]',\n host: {\n '[class.dropdown-menu]': 'true',\n '[class.show]': 'dropdown.isOpen()',\n '[attr.x-placement]': 'placement',\n '(keydown.ArrowUp)': 'dropdown.onKeyDown($event)',\n '(keydown.ArrowDown)': 'dropdown.onKeyDown($event)',\n '(keydown.Home)': 'dropdown.onKeyDown($event)',\n '(keydown.End)': 'dropdown.onKeyDown($event)',\n '(keydown.Enter)': 'dropdown.onKeyDown($event)',\n '(keydown.Space)': 'dropdown.onKeyDown($event)'\n }\n})\nexport class NgbDropdownMenu {\n placement: Placement = 'bottom';\n isOpen = false;\n\n @ContentChildren(NgbDropdownItem) menuItems: QueryList<NgbDropdownItem>;\n\n constructor(@Inject(forwardRef(() => NgbDropdown)) public dropdown: NgbDropdown) {}\n}\n\n/**\n * A directive to mark an element to which dropdown menu will be anchored.\n *\n * This is a simple version of the `NgbDropdownToggle` directive.\n * It plays the same role, but doesn't listen to click events to toggle dropdown menu thus enabling support\n * for events other than click.\n *\n * @since 1.1.0\n */\n@Directive({\n selector: '[ngbDropdownAnchor]',\n host: {'class': 'dropdown-toggle', 'aria-haspopup': 'true', '[attr.aria-expanded]': 'dropdown.isOpen()'}\n})\nexport class NgbDropdownAnchor {\n anchorEl;\n\n constructor(\n @Inject(forwardRef(() => NgbDropdown)) public dropdown: NgbDropdown,\n private _elementRef: ElementRef<HTMLElement>) {\n this.anchorEl = _elementRef.nativeElement;\n }\n\n getNativeElement() { return this._elementRef.nativeElement; }\n}\n\n/**\n * A directive to mark an element that will toggle dropdown via the `click` event.\n *\n * You can also use `NgbDropdownAnchor` as an alternative.\n */\n@Directive({\n selector: '[ngbDropdownToggle]',\n host: {\n 'class': 'dropdown-toggle',\n 'aria-haspopup': 'true',\n '[attr.aria-expanded]': 'dropdown.isOpen()',\n '(click)': 'dropdown.toggle()',\n '(keydown.ArrowUp)': 'dropdown.onKeyDown($event)',\n '(keydown.ArrowDown)': 'dropdown.onKeyDown($event)',\n '(keydown.Home)': 'dropdown.onKeyDown($event)',\n '(keydown.End)': 'dropdown.onKeyDown($event)'\n },\n providers: [{provide: NgbDropdownAnchor, useExisting: forwardRef(() => NgbDropdownToggle)}]\n})\nexport class NgbDropdownToggle extends NgbDropdownAnchor {\n constructor(@Inject(forwardRef(() => NgbDropdown)) dropdown: NgbDropdown, elementRef: ElementRef<HTMLElement>) {\n super(dropdown, elementRef);\n }\n}\n\n/**\n * A directive that provides contextual overlays for displaying lists of links and more.\n */\n@Directive({selector: '[ngbDropdown]', exportAs: 'ngbDropdown', host: {'[class.show]': 'isOpen()'}})\nexport class NgbDropdown implements OnInit, OnDestroy {\n private _closed$ = new Subject<void>();\n private _zoneSubscription: Subscription;\n private _bodyContainer: HTMLElement;\n\n @ContentChild(NgbDropdownMenu) private _menu: NgbDropdownMenu;\n @ContentChild(NgbDropdownMenu, {read: ElementRef}) private _menuElement: ElementRef;\n\n @ContentChild(NgbDropdownAnchor) private _anchor: NgbDropdownAnchor;\n\n /**\n * Indicates whether the dropdown should be closed when clicking one of dropdown items or pressing ESC.\n *\n * * `true` - the dropdown will close on both outside and inside (menu) clicks.\n * * `false` - the dropdown can only be closed manually via `close()` or `toggle()` methods.\n * * `\"inside\"` - the dropdown will close on inside menu clicks, but not outside clicks.\n * * `\"outside\"` - the dropdown will close only on the outside clicks and not on menu clicks.\n */\n @Input() autoClose: boolean | 'outside' | 'inside';\n\n /**\n * Defines whether or not the dropdown menu is opened initially.\n */\n @Input('open') _open = false;\n\n /**\n * The preferred placement of the dropdown.\n *\n * Possible values are `\"top\"`, `\"top-left\"`, `\"top-right\"`, `\"bottom\"`, `\"bottom-left\"`,\n * `\"bottom-right\"`, `\"left\"`, `\"left-top\"`, `\"left-bottom\"`, `\"right\"`, `\"right-top\"`,\n * `\"right-bottom\"`\n *\n * Accepts an array of strings or a string with space separated possible values.\n *\n * The default order of preference is `\"bottom-left bottom-right top-left top-right\"`\n *\n * Please see the [positioning overview](#/positioning) for more details.\n */\n @Input() placement: PlacementArray;\n\n /**\n * A selector specifying the element the dropdown should be appended to.\n * Currently only supports \"body\".\n *\n * @since 4.1.0\n */\n @Input() container: null | 'body';\n\n /**\n * Enable or disable the dynamic positioning\n *\n * @since 4.2.0\n */\n @Input() display: 'dynamic' | 'static';\n\n /**\n * An event fired when the dropdown is opened or closed.\n *\n * The event payload is a `boolean`:\n * * `true` - the dropdown was opened\n * * `false` - the dropdown was closed\n */\n @Output() openChange = new EventEmitter<boolean>();\n\n constructor(\n private _changeDetector: ChangeDetectorRef, config: NgbDropdownConfig, @Inject(DOCUMENT) private _document: any,\n private _ngZone: NgZone, private _elementRef: ElementRef<HTMLElement>, private _renderer: Renderer2,\n @Optional() ngbNavbar: NgbNavbar) {\n this.placement = config.placement;\n this.container = config.container;\n this.autoClose = config.autoClose;\n\n this.display = ngbNavbar ? 'static' : 'dynamic';\n\n this._zoneSubscription = _ngZone.onStable.subscribe(() => { this._positionMenu(); });\n }\n\n ngOnInit() {\n this._applyPlacementClasses();\n if (this._open) {\n this._setCloseHandlers();\n }\n }\n\n ngOnChanges(changes: SimpleChanges) {\n if (changes.container && this._open) {\n this._applyContainer(this.container);\n }\n\n if (changes.placement && !changes.placement.isFirstChange) {\n this._applyPlacementClasses();\n }\n }\n\n /**\n * Checks if the dropdown menu is open.\n */\n isOpen(): boolean { return this._open; }\n\n /**\n * Opens the dropdown menu.\n */\n open(): void {\n if (!this._open) {\n this._open = true;\n this._applyContainer(this.container);\n this.openChange.emit(true);\n this._setCloseHandlers();\n }\n }\n\n private _setCloseHandlers() {\n ngbAutoClose(\n this._ngZone, this._document, this.autoClose, () => this.close(), this._closed$,\n this._menu ? [this._menuElement.nativeElement] : [], this._anchor ? [this._anchor.getNativeElement()] : [],\n '.dropdown-item,.dropdown-divider');\n }\n\n /**\n * Closes the dropdown menu.\n */\n close(): void {\n if (this._open) {\n this._open = false;\n this._resetContainer();\n this._closed$.next();\n this.openChange.emit(false);\n this._changeDetector.markForCheck();\n }\n }\n\n /**\n * Toggles the dropdown menu.\n */\n toggle(): void {\n if (this.isOpen()) {\n this.close();\n } else {\n this.open();\n }\n }\n\n ngOnDestroy() {\n this._resetContainer();\n\n this._closed$.next();\n this._zoneSubscription.unsubscribe();\n }\n\n onKeyDown(event: KeyboardEvent) {\n // tslint:disable-next-line:deprecation\n const key = event.which;\n const itemElements = this._getMenuElements();\n\n let position = -1;\n let isEventFromItems = false;\n const isEventFromToggle = this._isEventFromToggle(event);\n\n if (!isEventFromToggle && itemElements.length) {\n itemElements.forEach((itemElement, index) => {\n if (itemElement.contains(event.target as HTMLElement)) {\n isEventFromItems = true;\n }\n if (itemElement === this._document.activeElement) {\n position = index;\n }\n });\n }\n\n // closing on Enter / Space\n if (key === Key.Space || key === Key.Enter) {\n if (isEventFromItems && (this.autoClose === true || this.autoClose === 'inside')) {\n this.close();\n }\n return;\n }\n\n // opening / navigating\n if (isEventFromToggle || isEventFromItems) {\n this.open();\n\n if (itemElements.length) {\n switch (key) {\n case Key.ArrowDown:\n position = Math.min(position + 1, itemElements.length - 1);\n break;\n case Key.ArrowUp:\n if (this._isDropup() && position === -1) {\n position = itemElements.length - 1;\n break;\n }\n position = Math.max(position - 1, 0);\n break;\n case Key.Home:\n position = 0;\n break;\n case Key.End:\n position = itemElements.length - 1;\n break;\n }\n itemElements[position].focus();\n }\n event.preventDefault();\n }\n }\n\n private _isDropup(): boolean { return this._elementRef.nativeElement.classList.contains('dropup'); }\n\n private _isEventFromToggle(event: KeyboardEvent) {\n return this._anchor.getNativeElement().contains(event.target as HTMLElement);\n }\n\n private _getMenuElements(): HTMLElement[] {\n if (this._menu == null) {\n return [];\n }\n return this._menu.menuItems.filter(item => !item.disabled).map(item => item.elementRef.nativeElement);\n }\n\n private _positionMenu() {\n if (this.isOpen() && this._menu) {\n this._applyPlacementClasses(\n this.display === 'dynamic' ?\n positionElements(\n this._anchor.anchorEl, this._bodyContainer || this._menuElement.nativeElement, this.placement,\n this.container === 'body') :\n this._getFirstPlacement(this.placement));\n }\n }\n\n private _getFirstPlacement(placement: PlacementArray): Placement {\n return Array.isArray(placement) ? placement[0] : placement.split(' ')[0] as Placement;\n }\n\n private _resetContainer() {\n const renderer = this._renderer;\n if (this._menuElement) {\n const dropdownElement = this._elementRef.nativeElement;\n const dropdownMenuElement = this._menuElement.nativeElement;\n\n renderer.appendChild(dropdownElement, dropdownMenuElement);\n renderer.removeStyle(dropdownMenuElement, 'position');\n renderer.removeStyle(dropdownMenuElement, 'transform');\n }\n if (this._bodyContainer) {\n renderer.removeChild(this._document.body, this._bodyContainer);\n this._bodyContainer = null;\n }\n }\n\n private _applyContainer(container: null | 'body' = null) {\n this._resetContainer();\n if (container === 'body') {\n const renderer = this._renderer;\n const dropdownMenuElement = this._menuElement.nativeElement;\n const bodyContainer = this._bodyContainer = this._bodyContainer || renderer.createElement('div');\n\n // Override some styles to have the positionning working\n renderer.setStyle(bodyContainer, 'position', 'absolute');\n renderer.setStyle(dropdownMenuElement, 'position', 'static');\n renderer.setStyle(bodyContainer, 'z-index', '1050');\n\n renderer.appendChild(bodyContainer, dropdownMenuElement);\n renderer.appendChild(this._document.body, bodyContainer);\n }\n }\n\n private _applyPlacementClasses(placement?: Placement) {\n if (this._menu) {\n if (!placement) {\n placement = this._getFirstPlacement(this.placement);\n }\n\n const renderer = this._renderer;\n const dropdownElement = this._elementRef.nativeElement;\n\n // remove the current placement classes\n renderer.removeClass(dropdownElement, 'dropup');\n renderer.removeClass(dropdownElement, 'dropdown');\n this._menu.placement = placement;\n\n /*\n * apply the new placement\n * in case of top use up-arrow or down-arrow otherwise\n */\n const dropdownClass = placement.search('^top') !== -1 ? 'dropup' : 'dropdown';\n renderer.addClass(dropdownElement, dropdownClass);\n\n const bodyContainer = this._bodyContainer;\n if (bodyContainer) {\n renderer.removeClass(bodyContainer, 'dropup');\n renderer.removeClass(bodyContainer, 'dropdown');\n renderer.addClass(bodyContainer, dropdownClass);\n }\n }\n }\n}\n","import {NgModule, ModuleWithProviders} from '@angular/core';\nimport {\n NgbDropdown,\n NgbDropdownAnchor,\n NgbDropdownToggle,\n NgbDropdownMenu,\n NgbDropdownItem,\n NgbNavbar\n} from './dropdown';\n\nexport {NgbDropdown, NgbDropdownAnchor, NgbDropdownToggle, NgbDropdownMenu, NgbDropdownItem} from './dropdown';\nexport {NgbDropdownConfig} from './dropdown-config';\n\nconst NGB_DROPDOWN_DIRECTIVES =\n [NgbDropdown, NgbDropdownAnchor, NgbDropdownToggle, NgbDropdownMenu, NgbDropdownItem, NgbNavbar];\n\n@NgModule({declarations: NGB_DROPDOWN_DIRECTIVES, exports: NGB_DROPDOWN_DIRECTIVES})\nexport class NgbDropdownModule {\n /**\n * Importing with '.forRoot()' is no longer necessary, you can simply import the module.\n * Will be removed in 4.0.0.\n *\n * @deprecated 3.0.0\n */\n static forRoot(): ModuleWithProviders { return {ngModule: NgbDropdownModule}; }\n}\n","import {Injectable, Injector} from '@angular/core';\n\n/**\n * Options available when opening new modal windows with `NgbModal.open()` method.\n */\nexport interface NgbModalOptions {\n /**\n * `aria-labelledby` attribute value to set on the modal window.\n *\n * @since 2.2.0\n */\n ariaLabelledBy?: string;\n\n /**\n * If `true`, the backdrop element will be created for a given modal.\n *\n * Alternatively, specify `'static'` for a backdrop which doesn't close the modal on click.\n *\n * Default value is `true`.\n */\n backdrop?: boolean | 'static';\n\n /**\n * Callback right before the modal will be dismissed.\n *\n * If this function returns:\n * * `false`\n * * a promise resolved with `false`\n * * a promise that is rejected\n *\n * then the modal won't be dismissed.\n */\n beforeDismiss?: () => boolean | Promise<boolean>;\n\n /**\n * If `true`, the modal will be centered vertically.\n *\n * Default value is `false`.\n *\n * @since 1.1.0\n */\n centered?: boolean;\n\n /**\n * A selector specifying the element all new modal windows should be appended to.\n *\n * If not specified, will be `body`.\n */\n container?: string;\n\n /**\n * The `Injector` to use for modal content.\n */\n injector?: Injector;\n\n /**\n * If `true`, the modal will be closed when `Escape` key is pressed\n *\n * Default value is `true`.\n */\n keyboard?: boolean;\n\n /**\n * Size of a new modal window.\n */\n size?: 'sm' | 'lg';\n\n /**\n * A custom class to append to the modal window.\n */\n windowClass?: string;\n\n /**\n * A custom class to append to the modal backdrop.\n *\n * @since 1.1.0\n */\n backdropClass?: string;\n}\n\n/**\n * A configuration service for the [`NgbModal`](#/components/modal/api#NgbModal) service.\n *\n * You can inject this service, typically in your root component, and customize the values of its properties in\n * order to provide default values for all modals used in the application.\n*\n* @since 3.1.0\n*/\n@Injectable({providedIn: 'root'})\nexport class NgbModalConfig implements NgbModalOptions {\n backdrop: boolean | 'static' = true;\n keyboard = true;\n}\n","import {\n Injector,\n TemplateRef,\n ViewRef,\n ViewContainerRef,\n Renderer2,\n ComponentRef,\n ComponentFactoryResolver,\n ApplicationRef\n} from '@angular/core';\n\nexport class ContentRef {\n constructor(public nodes: any[], public viewRef?: ViewRef, public componentRef?: ComponentRef<any>) {}\n}\n\nexport class PopupService<T> {\n private _windowRef: ComponentRef<T>;\n private _contentRef: ContentRef;\n\n constructor(\n private _type: any, private _injector: Injector, private _viewContainerRef: ViewContainerRef,\n private _renderer: Renderer2, private _componentFactoryResolver: ComponentFactoryResolver,\n private _applicationRef: ApplicationRef) {}\n\n open(content?: string | TemplateRef<any>, context?: any): ComponentRef<T> {\n if (!this._windowRef) {\n this._contentRef = this._getContentRef(content, context);\n this._windowRef = this._viewContainerRef.createComponent(\n this._componentFactoryResolver.resolveComponentFactory<T>(this._type), 0, this._injector,\n this._contentRef.nodes);\n }\n\n return this._windowRef;\n }\n\n close() {\n if (this._windowRef) {\n this._viewContainerRef.remove(this._viewContainerRef.indexOf(this._windowRef.hostView));\n this._windowRef = null;\n\n if (this._contentRef.viewRef) {\n this._applicationRef.detachView(this._contentRef.viewRef);\n this._contentRef.viewRef.destroy();\n this._contentRef = null;\n }\n }\n }\n\n private _getContentRef(content: string | TemplateRef<any>, context?: any): ContentRef {\n if (!content) {\n return new ContentRef([]);\n } else if (content instanceof TemplateRef) {\n const viewRef = content.createEmbeddedView(context);\n this._applicationRef.attachView(viewRef);\n return new ContentRef([viewRef.rootNodes], viewRef);\n } else {\n return new ContentRef([[this._renderer.createText(`${content}`)]]);\n }\n }\n}\n","import {Injectable, Inject} from '@angular/core';\nimport {DOCUMENT} from '@angular/common';\n\n\nconst noop = () => {};\n\n\n\n/** Type for the callback used to revert the scrollbar compensation. */\nexport type CompensationReverter = () => void;\n\n\n\n/**\n * Utility to handle the scrollbar.\n *\n * It allows to compensate the lack of a vertical scrollbar by adding an\n * equivalent padding on the right of the body, and to remove this compensation.\n */\n@Injectable({providedIn: 'root'})\nexport class ScrollBar {\n constructor(@Inject(DOCUMENT) private _document: any) {}\n\n /**\n * Detects if a scrollbar is present and if yes, already compensates for its\n * removal by adding an equivalent padding on the right of the body.\n *\n * @return a callback used to revert the compensation (noop if there was none,\n * otherwise a function removing the padding)\n */\n compensate(): CompensationReverter { return !this._isPresent() ? noop : this._adjustBody(this._getWidth()); }\n\n /**\n * Adds a padding of the given width on the right of the body.\n *\n * @return a callback used to revert the padding to its previous value\n */\n private _adjustBody(width: number): CompensationReverter {\n const body = this._document.body;\n const userSetPadding = body.style.paddingRight;\n const paddingAmount = parseFloat(window.getComputedStyle(body)['padding-right']);\n body.style['padding-right'] = `${paddingAmount + width}px`;\n return () => body.style['padding-right'] = userSetPadding;\n }\n\n /**\n * Tells whether a scrollbar is currently present on the body.\n *\n * @return true if scrollbar is present, false otherwise\n */\n private _isPresent(): boolean {\n const rect = this._document.body.getBoundingClientRect();\n return rect.left + rect.right < window.innerWidth;\n }\n\n /**\n * Calculates and returns the width of a scrollbar.\n *\n * @return the width of a scrollbar on this page\n */\n private _getWidth(): number {\n const measurer = this._document.createElement('div');\n measurer.className = 'modal-scrollbar-measure';\n\n const body = this._document.body;\n body.appendChild(measurer);\n const width = measurer.getBoundingClientRect().width - measurer.clientWidth;\n body.removeChild(measurer);\n\n return width;\n }\n}\n","import {Component, Input} from '@angular/core';\n\n@Component({\n selector: 'ngb-modal-backdrop',\n template: '',\n host:\n {'[class]': '\"modal-backdrop fade show\" + (backdropClass ? \" \" + backdropClass : \"\")', 'style': 'z-index: 1050'}\n})\nexport class NgbModalBackdrop {\n @Input() backdropClass: string;\n}\n","import {ComponentRef} from '@angular/core';\n\nimport {NgbModalBackdrop} from './modal-backdrop';\nimport {NgbModalWindow} from './modal-window';\n\nimport {ContentRef} from '../util/popup';\n\n/**\n * A reference to the currently opened (active) modal.\n *\n * Instances of this class can be injected into your component passed as modal content.\n * So you can `.close()` or `.dismiss()` the modal window from your component.\n */\nexport class NgbActiveModal {\n /**\n * Closes the modal with an optional `result` value.\n *\n * The `NgbMobalRef.result` promise will be resolved with the provided value.\n */\n close(result?: any): void {}\n\n /**\n * Dismisses the modal with an optional `reason` value.\n *\n * The `NgbModalRef.result` promise will be rejected with the provided value.\n */\n dismiss(reason?: any): void {}\n}\n\n/**\n * A reference to the newly opened modal returned by the `NgbModal.open()` method.\n */\nexport class NgbModalRef {\n private _resolve: (result?: any) => void;\n private _reject: (reason?: any) => void;\n\n /**\n * The instance of a component used for the modal content.\n *\n * When a `TemplateRef` is used as the content, will return `undefined`.\n */\n get componentInstance(): any {\n if (this._contentRef.componentRef) {\n return this._contentRef.componentRef.instance;\n }\n }\n\n /**\n * The promise that is resolved when the modal is closed and rejected when the modal is dismissed.\n */\n result: Promise<any>;\n\n constructor(\n private _windowCmptRef: ComponentRef<NgbModalWindow>, private _contentRef: ContentRef,\n private _backdropCmptRef?: ComponentRef<NgbModalBackdrop>, private _beforeDismiss?: Function) {\n _windowCmptRef.instance.dismissEvent.subscribe((reason: any) => { this.dismiss(reason); });\n\n this.result = new Promise((resolve, reject) => {\n this._resolve = resolve;\n this._reject = reject;\n });\n this.result.then(null, () => {});\n }\n\n /**\n * Closes the modal with an optional `result` value.\n *\n * The `NgbMobalRef.result` promise will be resolved with the provided value.\n */\n close(result?: any): void {\n if (this._windowCmptRef) {\n this._resolve(result);\n this._removeModalElements();\n }\n }\n\n private _dismiss(reason?: any) {\n this._reject(reason);\n this._removeModalElements();\n }\n\n /**\n * Dismisses the modal with an optional `reason` value.\n *\n * The `NgbModalRef.result` promise will be rejected with the provided value.\n */\n dismiss(reason?: any): void {\n if (this._windowCmptRef) {\n if (!this._beforeDismiss) {\n this._dismiss(reason);\n } else {\n const dismiss = this._beforeDismiss();\n if (dismiss && dismiss.then) {\n dismiss.then(\n result => {\n if (result !== false) {\n this._dismiss(reason);\n }\n },\n () => {});\n } else if (dismiss !== false) {\n this._dismiss(reason);\n }\n }\n }\n }\n\n private _removeModalElements() {\n const windowNativeEl = this._windowCmptRef.location.nativeElement;\n windowNativeEl.parentNode.removeChild(windowNativeEl);\n this._windowCmptRef.destroy();\n\n if (this._backdropCmptRef) {\n const backdropNativeEl = this._backdropCmptRef.location.nativeElement;\n backdropNativeEl.parentNode.removeChild(backdropNativeEl);\n this._backdropCmptRef.destroy();\n }\n\n if (this._contentRef && this._contentRef.viewRef) {\n this._contentRef.viewRef.destroy();\n }\n\n this._windowCmptRef = null;\n this._backdropCmptRef = null;\n this._contentRef = null;\n }\n}\n","export enum ModalDismissReasons {\n BACKDROP_CLICK,\n ESC\n}\n","import {DOCUMENT} from '@angular/common';\nimport {\n AfterViewInit,\n Component,\n ElementRef,\n EventEmitter,\n Inject,\n Input,\n OnDestroy,\n OnInit,\n Output\n} from '@angular/core';\n\nimport {getFocusableBoundaryElements} from '../util/focus-trap';\nimport {ModalDismissReasons} from './modal-dismiss-reasons';\n\n@Component({\n selector: 'ngb-modal-window',\n host: {\n '[class]': '\"modal fade show d-block\" + (windowClass ? \" \" + windowClass : \"\")',\n 'role': 'dialog',\n 'tabindex': '-1',\n '(keyup.esc)': 'escKey($event)',\n '(click)': 'backdropClick($event)',\n '[attr.aria-modal]': 'true',\n '[attr.aria-labelledby]': 'ariaLabelledBy',\n },\n template: `\n <div [class]=\"'modal-dialog' + (size ? ' modal-' + size : '') + (centered ? ' modal-dialog-centered' : '')\" role=\"document\">\n <div class=\"modal-content\"><ng-content></ng-content></div>\n </div>\n `\n})\nexport class NgbModalWindow implements OnInit,\n AfterViewInit, OnDestroy {\n private _elWithFocus: Element; // element that is focused prior to modal opening\n\n @Input() ariaLabelledBy: string;\n @Input() backdrop: boolean | string = true;\n @Input() centered: string;\n @Input() keyboard = true;\n @Input() size: string;\n @Input() windowClass: string;\n\n @Output('dismiss') dismissEvent = new EventEmitter();\n\n constructor(@Inject(DOCUMENT) private _document: any, private _elRef: ElementRef<HTMLElement>) {}\n\n backdropClick($event): void {\n if (this.backdrop === true && this._elRef.nativeElement === $event.target) {\n this.dismiss(ModalDismissReasons.BACKDROP_CLICK);\n }\n }\n\n escKey($event): void {\n if (this.keyboard && !$event.defaultPrevented) {\n this.dismiss(ModalDismissReasons.ESC);\n }\n }\n\n dismiss(reason): void { this.dismissEvent.emit(reason); }\n\n ngOnInit() { this._elWithFocus = this._document.activeElement; }\n\n ngAfterViewInit() {\n if (!this._elRef.nativeElement.contains(document.activeElement)) {\n const autoFocusable = this._elRef.nativeElement.querySelector(`[ngbAutofocus]`) as HTMLElement;\n const firstFocusable = getFocusableBoundaryElements(this._elRef.nativeElement)[0];\n\n const elementToFocus = autoFocusable || firstFocusable || this._elRef.nativeElement;\n elementToFocus.focus();\n }\n }\n\n ngOnDestroy() {\n const body = this._document.body;\n const elWithFocus = this._elWithFocus;\n\n let elementToFocus;\n if (elWithFocus && elWithFocus['focus'] && body.contains(elWithFocus)) {\n elementToFocus = elWithFocus;\n } else {\n elementToFocus = body;\n }\n elementToFocus.focus();\n this._elWithFocus = null;\n }\n}\n","import {DOCUMENT} from '@angular/common';\nimport {\n ApplicationRef,\n ComponentFactoryResolver,\n ComponentRef,\n Inject,\n Injectable,\n Injector,\n RendererFactory2,\n TemplateRef,\n} from '@angular/core';\nimport {Subject} from 'rxjs';\n\nimport {ngbFocusTrap} from '../util/focus-trap';\nimport {ContentRef} from '../util/popup';\nimport {ScrollBar} from '../util/scrollbar';\nimport {isDefined, isString} from '../util/util';\nimport {NgbModalBackdrop} from './modal-backdrop';\nimport {NgbActiveModal, NgbModalRef} from './modal-ref';\nimport {NgbModalWindow} from './modal-window';\n\n@Injectable({providedIn: 'root'})\nexport class NgbModalStack {\n private _activeWindowCmptHasChanged = new Subject();\n private _ariaHiddenValues: Map<Element, string> = new Map();\n private _backdropAttributes = ['backdropClass'];\n private _modalRefs: NgbModalRef[] = [];\n private _windowAttributes = ['ariaLabelledBy', 'backdrop', 'centered', 'keyboard', 'size', 'windowClass'];\n private _windowCmpts: ComponentRef<NgbModalWindow>[] = [];\n\n constructor(\n private _applicationRef: ApplicationRef, private _injector: Injector, @Inject(DOCUMENT) private _document: any,\n private _scrollBar: ScrollBar, private _rendererFactory: RendererFactory2) {\n // Trap focus on active WindowCmpt\n this._activeWindowCmptHasChanged.subscribe(() => {\n if (this._windowCmpts.length) {\n const activeWindowCmpt = this._windowCmpts[this._windowCmpts.length - 1];\n ngbFocusTrap(activeWindowCmpt.location.nativeElement, this._activeWindowCmptHasChanged);\n this._revertAriaHidden();\n this._setAriaHidden(activeWindowCmpt.location.nativeElement);\n }\n });\n }\n\n open(moduleCFR: ComponentFactoryResolver, contentInjector: Injector, content: any, options): NgbModalRef {\n const containerEl =\n isDefined(options.container) ? this._document.querySelector(options.container) : this._document.body;\n const renderer = this._rendererFactory.createRenderer(null, null);\n\n const revertPaddingForScrollBar = this._scrollBar.compensate();\n const removeBodyClass = () => {\n if (!this._modalRefs.length) {\n renderer.removeClass(this._document.body, 'modal-open');\n this._revertAriaHidden();\n }\n };\n\n if (!containerEl) {\n throw new Error(`The specified modal container \"${options.container || 'body'}\" was not found in the DOM.`);\n }\n\n const activeModal = new NgbActiveModal();\n const contentRef = this._getContentRef(moduleCFR, options.injector || contentInjector, content, activeModal);\n\n let backdropCmptRef: ComponentRef<NgbModalBackdrop> =\n options.backdrop !== false ? this._attachBackdrop(moduleCFR, containerEl) : null;\n let windowCmptRef: ComponentRef<NgbModalWindow> = this._attachWindowComponent(moduleCFR, containerEl, contentRef);\n let ngbModalRef: NgbModalRef = new NgbModalRef(windowCmptRef, contentRef, backdropCmptRef, options.beforeDismiss);\n\n this._registerModalRef(ngbModalRef);\n this._registerWindowCmpt(windowCmptRef);\n ngbModalRef.result.then(revertPaddingForScrollBar, revertPaddingForScrollBar);\n ngbModalRef.result.then(removeBodyClass, removeBodyClass);\n activeModal.close = (result: any) => { ngbModalRef.close(result); };\n activeModal.dismiss = (reason: any) => { ngbModalRef.dismiss(reason); };\n\n this._applyWindowOptions(windowCmptRef.instance, options);\n if (this._modalRefs.length === 1) {\n renderer.addClass(this._document.body, 'modal-open');\n }\n\n if (backdropCmptRef && backdropCmptRef.instance) {\n this._applyBackdropOptions(backdropCmptRef.instance, options);\n }\n return ngbModalRef;\n }\n\n dismissAll(reason?: any) { this._modalRefs.forEach(ngbModalRef => ngbModalRef.dismiss(reason)); }\n\n hasOpenModals(): boolean { return this._modalRefs.length > 0; }\n\n private _attachBackdrop(moduleCFR: ComponentFactoryResolver, containerEl: any): ComponentRef<NgbModalBackdrop> {\n let backdropFactory = moduleCFR.resolveComponentFactory(NgbModalBackdrop);\n let backdropCmptRef = backdropFactory.create(this._injector);\n this._applicationRef.attachView(backdropCmptRef.hostView);\n containerEl.appendChild(backdropCmptRef.location.nativeElement);\n return backdropCmptRef;\n }\n\n private _attachWindowComponent(moduleCFR: ComponentFactoryResolver, containerEl: any, contentRef: any):\n ComponentRef<NgbModalWindow> {\n let windowFactory = moduleCFR.resolveComponentFactory(NgbModalWindow);\n let windowCmptRef = windowFactory.create(this._injector, contentRef.nodes);\n this._applicationRef.attachView(windowCmptRef.hostView);\n containerEl.appendChild(windowCmptRef.location.nativeElement);\n return windowCmptRef;\n }\n\n private _applyWindowOptions(windowInstance: NgbModalWindow, options: Object): void {\n this._windowAttributes.forEach((optionName: string) => {\n if (isDefined(options[optionName])) {\n windowInstance[optionName] = options[optionName];\n }\n });\n }\n\n private _applyBackdropOptions(backdropInstance: NgbModalBackdrop, options: Object): void {\n this._backdropAttributes.forEach((optionName: string) => {\n if (isDefined(options[optionName])) {\n backdropInstance[optionName] = options[optionName];\n }\n });\n }\n\n private _getContentRef(\n moduleCFR: ComponentFactoryResolver, contentInjector: Injector, content: any,\n activeModal: NgbActiveModal): ContentRef {\n if (!content) {\n return new ContentRef([]);\n } else if (content instanceof TemplateRef) {\n return this._createFromTemplateRef(content, activeModal);\n } else if (isString(content)) {\n return this._createFromString(content);\n } else {\n return this._createFromComponent(moduleCFR, contentInjector, content, activeModal);\n }\n }\n\n private _createFromTemplateRef(content: TemplateRef<any>, activeModal: NgbActiveModal): ContentRef {\n const context = {\n $implicit: activeModal,\n close(result) { activeModal.close(result); },\n dismiss(reason) { activeModal.dismiss(reason); }\n };\n const viewRef = content.createEmbeddedView(context);\n this._applicationRef.attachView(viewRef);\n return new ContentRef([viewRef.rootNodes], viewRef);\n }\n\n private _createFromString(content: string): ContentRef {\n const component = this._document.createTextNode(`${content}`);\n return new ContentRef([[component]]);\n }\n\n private _createFromComponent(\n moduleCFR: ComponentFactoryResolver, contentInjector: Injector, content: any,\n context: NgbActiveModal): ContentRef {\n const contentCmptFactory = moduleCFR.resolveComponentFactory(content);\n const modalContentInjector =\n Injector.create({providers: [{provide: NgbActiveModal, useValue: context}], parent: contentInjector});\n const componentRef = contentCmptFactory.create(modalContentInjector);\n this._applicationRef.attachView(componentRef.hostView);\n return new ContentRef([[componentRef.location.nativeElement]], componentRef.hostView, componentRef);\n }\n\n private _setAriaHidden(element: Element) {\n const parent = element.parentElement;\n if (parent && element !== this._document.body) {\n Array.from(parent.children).forEach(sibling => {\n if (sibling !== element && sibling.nodeName !== 'SCRIPT') {\n this._ariaHiddenValues.set(sibling, sibling.getAttribute('aria-hidden'));\n sibling.setAttribute('aria-hidden', 'true');\n }\n });\n\n this._setAriaHidden(parent);\n }\n }\n\n private _revertAriaHidden() {\n this._ariaHiddenValues.forEach((value, element) => {\n if (value) {\n element.setAttribute('aria-hidden', value);\n } else {\n element.removeAttribute('aria-hidden');\n }\n });\n this._ariaHiddenValues.clear();\n }\n\n private _registerModalRef(ngbModalRef: NgbModalRef) {\n const unregisterModalRef = () => {\n const index = this._modalRefs.indexOf(ngbModalRef);\n if (index > -1) {\n this._modalRefs.splice(index, 1);\n }\n };\n this._modalRefs.push(ngbModalRef);\n ngbModalRef.result.then(unregisterModalRef, unregisterModalRef);\n }\n\n private _registerWindowCmpt(ngbWindowCmpt: ComponentRef<NgbModalWindow>) {\n this._windowCmpts.push(ngbWindowCmpt);\n this._activeWindowCmptHasChanged.next();\n\n ngbWindowCmpt.onDestroy(() => {\n const index = this._windowCmpts.indexOf(ngbWindowCmpt);\n if (index > -1) {\n this._windowCmpts.splice(index, 1);\n this._activeWindowCmptHasChanged.next();\n }\n });\n }\n}\n","import {Injectable, Injector, ComponentFactoryResolver} from '@angular/core';\n\nimport {NgbModalOptions, NgbModalConfig} from './modal-config';\nimport {NgbModalRef} from './modal-ref';\nimport {NgbModalStack} from './modal-stack';\n\n/**\n * A service for opening modal windows.\n *\n * Creating a modal is straightforward: create a component or a template and pass it as an argument to\n * the `.open()` method.\n */\n@Injectable({providedIn: 'root'})\nexport class NgbModal {\n constructor(\n private _moduleCFR: ComponentFactoryResolver, private _injector: Injector, private _modalStack: NgbModalStack,\n private _config: NgbModalConfig) {}\n\n /**\n * Opens a new modal window with the specified content and supplied options.\n *\n * Content can be provided as a `TemplateRef` or a component type. If you pass a component type as content,\n * then instances of those components can be injected with an instance of the `NgbActiveModal` class. You can then\n * use `NgbActiveModal` methods to close / dismiss modals from \"inside\" of your component.\n *\n * Also see the [`NgbModalOptions`](#/components/modal/api#NgbModalOptions) for the list of supported options.\n */\n open(content: any, options: NgbModalOptions = {}): NgbModalRef {\n const combinedOptions = Object.assign({}, this._config, options);\n return this._modalStack.open(this._moduleCFR, this._injector, content, combinedOptions);\n }\n\n /**\n * Dismisses all currently displayed modal windows with the supplied reason.\n *\n * @since 3.1.0\n */\n dismissAll(reason?: any) { this._modalStack.dismissAll(reason); }\n\n /**\n * Indicates if there are currently any open modal windows in the application.\n *\n * @since 3.3.0\n */\n hasOpenModals(): boolean { return this._modalStack.hasOpenModals(); }\n}\n","import {ModuleWithProviders, NgModule} from '@angular/core';\n\nimport {NgbModal} from './modal';\nimport {NgbModalBackdrop} from './modal-backdrop';\nimport {NgbModalWindow} from './modal-window';\n\nexport {NgbModal} from './modal';\nexport {NgbModalConfig, NgbModalOptions} from './modal-config';\nexport {NgbModalRef, NgbActiveModal} from './modal-ref';\nexport {ModalDismissReasons} from './modal-dismiss-reasons';\n\n@NgModule({\n declarations: [NgbModalBackdrop, NgbModalWindow],\n entryComponents: [NgbModalBackdrop, NgbModalWindow],\n providers: [NgbModal]\n})\nexport class NgbModalModule {\n /**\n * Importing with '.forRoot()' is no longer necessary, you can simply import the module.\n * Will be removed in 4.0.0.\n *\n * @deprecated 3.0.0\n */\n static forRoot(): ModuleWithProviders { return {ngModule: NgbModalModule}; }\n}\n","import {Injectable} from '@angular/core';\n\n/**\n * A configuration service for the [`NgbPagination`](#/components/pagination/api#NgbPagination) component.\n *\n * You can inject this service, typically in your root component, and customize the values of its properties in\n * order to provide default values for all the paginations used in the application.\n */\n@Injectable({providedIn: 'root'})\nexport class NgbPaginationConfig {\n disabled = false;\n boundaryLinks = false;\n directionLinks = true;\n ellipses = true;\n maxSize = 0;\n pageSize = 10;\n rotate = false;\n size: 'sm' | 'lg';\n}\n","import {\n Component,\n ContentChild,\n Directive,\n EventEmitter,\n Input,\n Output,\n OnChanges,\n ChangeDetectionStrategy,\n SimpleChanges,\n TemplateRef\n} from '@angular/core';\nimport {getValueInRange, isNumber} from '../util/util';\nimport {NgbPaginationConfig} from './pagination-config';\n\n/**\n * A context for the\n * * `NgbPaginationFirst`\n * * `NgbPaginationPrevious`\n * * `NgbPaginationNext`\n * * `NgbPaginationLast`\n * * `NgbPaginationEllipsis`\n *\n * link templates in case you want to override one.\n *\n * @since 4.1.0\n */\nexport interface NgbPaginationLinkContext {\n /**\n * The currently selected page number\n */\n currentPage: number;\n\n /**\n * If `true`, the current link is disabled\n */\n disabled: boolean;\n}\n\n/**\n * A context for the `NgbPaginationNumber` link template in case you want to override one.\n *\n * Extends `NgbPaginationLinkContext`.\n *\n * @since 4.1.0\n */\nexport interface NgbPaginationNumberContext extends NgbPaginationLinkContext {\n /**\n * The page number, displayed by the current page link.\n */\n $implicit: number;\n}\n\n/**\n * A directive to match the 'ellipsis' link template\n *\n * @since 4.1.0\n */\n@Directive({selector: 'ng-template[ngbPaginationEllipsis]'})\nexport class NgbPaginationEllipsis {\n constructor(public templateRef: TemplateRef<NgbPaginationLinkContext>) {}\n}\n\n/**\n * A directive to match the 'first' link template\n *\n * @since 4.1.0\n */\n@Directive({selector: 'ng-template[ngbPaginationFirst]'})\nexport class NgbPaginationFirst {\n constructor(public templateRef: TemplateRef<NgbPaginationLinkContext>) {}\n}\n\n/**\n * A directive to match the 'last' link template\n *\n * @since 4.1.0\n */\n@Directive({selector: 'ng-template[ngbPaginationLast]'})\nexport class NgbPaginationLast {\n constructor(public templateRef: TemplateRef<NgbPaginationLinkContext>) {}\n}\n\n/**\n * A directive to match the 'next' link template\n *\n * @since 4.1.0\n */\n@Directive({selector: 'ng-template[ngbPaginationNext]'})\nexport class NgbPaginationNext {\n constructor(public templateRef: TemplateRef<NgbPaginationLinkContext>) {}\n}\n\n/**\n * A directive to match the page 'number' link template\n *\n * @since 4.1.0\n */\n@Directive({selector: 'ng-template[ngbPaginationNumber]'})\nexport class NgbPaginationNumber {\n constructor(public templateRef: TemplateRef<NgbPaginationNumberContext>) {}\n}\n\n/**\n * A directive to match the 'previous' link template\n *\n * @since 4.1.0\n */\n@Directive({selector: 'ng-template[ngbPaginationPrevious]'})\nexport class NgbPaginationPrevious {\n constructor(public templateRef: TemplateRef<NgbPaginationLinkContext>) {}\n}\n\n/**\n * A component that displays page numbers and allows to customize them in several ways.\n */\n@Component({\n selector: 'ngb-pagination',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {'role': 'navigation'},\n template: `\n <ng-template #first><span aria-hidden=\"true\" i18n=\"@@ngb.pagination.first\">&laquo;&laquo;</span></ng-template>\n <ng-template #previous><span aria-hidden=\"true\" i18n=\"@@ngb.pagination.previous\">&laquo;</span></ng-template>\n <ng-template #next><span aria-hidden=\"true\" i18n=\"@@ngb.pagination.next\">&raquo;</span></ng-template>\n <ng-template #last><span aria-hidden=\"true\" i18n=\"@@ngb.pagination.last\">&raquo;&raquo;</span></ng-template>\n <ng-template #ellipsis>...</ng-template>\n <ng-template #defaultNumber let-page let-currentPage=\"currentPage\">\n {{ page }}\n <span *ngIf=\"page === currentPage\" class=\"sr-only\">(current)</span>\n </ng-template>\n <ul [class]=\"'pagination' + (size ? ' pagination-' + size : '')\">\n <li *ngIf=\"boundaryLinks\" class=\"page-item\"\n [class.disabled]=\"previousDisabled()\">\n <a aria-label=\"First\" i18n-aria-label=\"@@ngb.pagination.first-aria\" class=\"page-link\" href\n (click)=\"selectPage(1); $event.preventDefault()\" [attr.tabindex]=\"(hasPrevious() ? null : '-1')\">\n <ng-template [ngTemplateOutlet]=\"tplFirst?.templateRef || first\"\n [ngTemplateOutletContext]=\"{disabled: previousDisabled(), currentPage: page}\"></ng-template>\n </a>\n </li>\n\n <li *ngIf=\"directionLinks\" class=\"page-item\"\n [class.disabled]=\"previousDisabled()\">\n <a aria-label=\"Previous\" i18n-aria-label=\"@@ngb.pagination.previous-aria\" class=\"page-link\" href\n (click)=\"selectPage(page-1); $event.preventDefault()\" [attr.tabindex]=\"(hasPrevious() ? null : '-1')\">\n <ng-template [ngTemplateOutlet]=\"tplPrevious?.templateRef || previous\"\n [ngTemplateOutletContext]=\"{disabled: previousDisabled()}\"></ng-template>\n </a>\n </li>\n <li *ngFor=\"let pageNumber of pages\" class=\"page-item\" [class.active]=\"pageNumber === page\"\n [class.disabled]=\"isEllipsis(pageNumber) || disabled\">\n <a *ngIf=\"isEllipsis(pageNumber)\" class=\"page-link\">\n <ng-template [ngTemplateOutlet]=\"tplEllipsis?.templateRef || ellipsis\"\n [ngTemplateOutletContext]=\"{disabled: true, currentPage: page}\"></ng-template>\n </a>\n <a *ngIf=\"!isEllipsis(pageNumber)\" class=\"page-link\" href (click)=\"selectPage(pageNumber); $event.preventDefault()\">\n <ng-template [ngTemplateOutlet]=\"tplNumber?.templateRef || defaultNumber\"\n [ngTemplateOutletContext]=\"{disabled: disabled, $implicit: pageNumber, currentPage: page}\"></ng-template>\n </a>\n </li>\n <li *ngIf=\"directionLinks\" class=\"page-item\" [class.disabled]=\"nextDisabled()\">\n <a aria-label=\"Next\" i18n-aria-label=\"@@ngb.pagination.next-aria\" class=\"page-link\" href\n (click)=\"selectPage(page+1); $event.preventDefault()\" [attr.tabindex]=\"(hasNext() ? null : '-1')\">\n <ng-template [ngTemplateOutlet]=\"tplNext?.templateRef || next\"\n [ngTemplateOutletContext]=\"{disabled: nextDisabled(), currentPage: page}\"></ng-template>\n </a>\n </li>\n\n <li *ngIf=\"boundaryLinks\" class=\"page-item\" [class.disabled]=\"nextDisabled()\">\n <a aria-label=\"Last\" i18n-aria-label=\"@@ngb.pagination.last-aria\" class=\"page-link\" href\n (click)=\"selectPage(pageCount); $event.preventDefault()\" [attr.tabindex]=\"(hasNext() ? null : '-1')\">\n <ng-template [ngTemplateOutlet]=\"tplLast?.templateRef || last\"\n [ngTemplateOutletContext]=\"{disabled: nextDisabled(), currentPage: page}\"></ng-template>\n </a>\n </li>\n </ul>\n `\n})\nexport class NgbPagination implements OnChanges {\n pageCount = 0;\n pages: number[] = [];\n\n @ContentChild(NgbPaginationEllipsis) tplEllipsis: NgbPaginationEllipsis;\n @ContentChild(NgbPaginationFirst) tplFirst: NgbPaginationFirst;\n @ContentChild(NgbPaginationLast) tplLast: NgbPaginationLast;\n @ContentChild(NgbPaginationNext) tplNext: NgbPaginationNext;\n @ContentChild(NgbPaginationNumber) tplNumber: NgbPaginationNumber;\n @ContentChild(NgbPaginationPrevious) tplPrevious: NgbPaginationPrevious;\n\n /**\n * If `true`, pagination links will be disabled.\n */\n @Input() disabled: boolean;\n\n /**\n * If `true`, the \"First\" and \"Last\" page links are shown.\n */\n @Input() boundaryLinks: boolean;\n\n /**\n * If `true`, the \"Next\" and \"Previous\" page links are shown.\n */\n @Input() directionLinks: boolean;\n\n /**\n * If `true`, the ellipsis symbols and first/last page numbers will be shown when `maxSize` > number of pages.\n */\n @Input() ellipses: boolean;\n\n /**\n * Whether to rotate pages when `maxSize` > number of pages.\n *\n * The current page always stays in the middle if `true`.\n */\n @Input() rotate: boolean;\n\n /**\n * The number of items in your paginated collection.\n *\n * Note, that this is not the number of pages. Page numbers are calculated dynamically based on\n * `collectionSize` and `pageSize`. Ex. if you have 100 items in your collection and displaying 20 items per page,\n * you'll end up with 5 pages.\n */\n @Input() collectionSize: number;\n\n /**\n * The maximum number of pages to display.\n */\n @Input() maxSize: number;\n\n /**\n * The current page.\n *\n * Page numbers start with `1`.\n */\n @Input() page = 1;\n\n /**\n * The number of items per page.\n */\n @Input() pageSize: number;\n\n /**\n * An event fired when the page is changed. Will fire only if collection size is set and all values are valid.\n *\n * Event payload is the number of the newly selected page.\n *\n * Page numbers start with `1`.\n */\n @Output() pageChange = new EventEmitter<number>(true);\n\n /**\n * The pagination display size.\n *\n * Bootstrap currently supports small and large sizes.\n */\n @Input() size: 'sm' | 'lg';\n\n constructor(config: NgbPaginationConfig) {\n this.disabled = config.disabled;\n this.boundaryLinks = config.boundaryLinks;\n this.directionLinks = config.directionLinks;\n this.ellipses = config.ellipses;\n this.maxSize = config.maxSize;\n this.pageSize = config.pageSize;\n this.rotate = config.rotate;\n this.size = config.size;\n }\n\n hasPrevious(): boolean { return this.page > 1; }\n\n hasNext(): boolean { return this.page < this.pageCount; }\n\n nextDisabled(): boolean { return !this.hasNext() || this.disabled; }\n\n previousDisabled(): boolean { return !this.hasPrevious() || this.disabled; }\n\n selectPage(pageNumber: number): void { this._updatePages(pageNumber); }\n\n ngOnChanges(changes: SimpleChanges): void { this._updatePages(this.page); }\n\n isEllipsis(pageNumber): boolean { return pageNumber === -1; }\n\n /**\n * Appends ellipses and first/last page number to the displayed pages\n */\n private _applyEllipses(start: number, end: number) {\n if (this.ellipses) {\n if (start > 0) {\n if (start > 1) {\n this.pages.unshift(-1);\n }\n this.pages.unshift(1);\n }\n if (end < this.pageCount) {\n if (end < (this.pageCount - 1)) {\n this.pages.push(-1);\n }\n this.pages.push(this.pageCount);\n }\n }\n }\n\n /**\n * Rotates page numbers based on maxSize items visible.\n * Currently selected page stays in the middle:\n *\n * Ex. for selected page = 6:\n * [5,*6*,7] for maxSize = 3\n * [4,5,*6*,7] for maxSize = 4\n */\n private _applyRotation(): [number, number] {\n let start = 0;\n let end = this.pageCount;\n let leftOffset = Math.floor(this.maxSize / 2);\n let rightOffset = this.maxSize % 2 === 0 ? leftOffset - 1 : leftOffset;\n\n if (this.page <= leftOffset) {\n // very beginning, no rotation -> [0..maxSize]\n end = this.maxSize;\n } else if (this.pageCount - this.page < leftOffset) {\n // very end, no rotation -> [len-maxSize..len]\n start = this.pageCount - this.maxSize;\n } else {\n // rotate\n start = this.page - leftOffset - 1;\n end = this.page + rightOffset;\n }\n\n return [start, end];\n }\n\n /**\n * Paginates page numbers based on maxSize items per page.\n */\n private _applyPagination(): [number, number] {\n let page = Math.ceil(this.page / this.maxSize) - 1;\n let start = page * this.maxSize;\n let end = start + this.maxSize;\n\n return [start, end];\n }\n\n private _setPageInRange(newPageNo) {\n const prevPageNo = this.page;\n this.page = getValueInRange(newPageNo, this.pageCount, 1);\n\n if (this.page !== prevPageNo && isNumber(this.collectionSize)) {\n this.pageChange.emit(this.page);\n }\n }\n\n private _updatePages(newPage: number) {\n this.pageCount = Math.ceil(this.collectionSize / this.pageSize);\n\n if (!isNumber(this.pageCount)) {\n this.pageCount = 0;\n }\n\n // fill-in model needed to render pages\n this.pages.length = 0;\n for (let i = 1; i <= this.pageCount; i++) {\n this.pages.push(i);\n }\n\n // set page within 1..max range\n this._setPageInRange(newPage);\n\n // apply maxSize if necessary\n if (this.maxSize > 0 && this.pageCount > this.maxSize) {\n let start = 0;\n let end = this.pageCount;\n\n // either paginating or rotating page numbers\n if (this.rotate) {\n [start, end] = this._applyRotation();\n } else {\n [start, end] = this._applyPagination();\n }\n\n this.pages = this.pages.slice(start, end);\n\n // adding ellipses\n this._applyEllipses(start, end);\n }\n }\n}\n","import {NgModule, ModuleWithProviders} from '@angular/core';\nimport {CommonModule} from '@angular/common';\n\nimport {\n NgbPagination,\n NgbPaginationEllipsis,\n NgbPaginationFirst,\n NgbPaginationLast,\n NgbPaginationNext,\n NgbPaginationNumber,\n NgbPaginationPrevious\n} from './pagination';\n\nexport {\n NgbPagination,\n NgbPaginationEllipsis,\n NgbPaginationFirst,\n NgbPaginationLast,\n NgbPaginationNext,\n NgbPaginationNumber,\n NgbPaginationPrevious\n} from './pagination';\nexport {NgbPaginationConfig} from './pagination-config';\n\nconst DIRECTIVES = [\n NgbPagination, NgbPaginationEllipsis, NgbPaginationFirst, NgbPaginationLast, NgbPaginationNext, NgbPaginationNumber,\n NgbPaginationPrevious\n];\n\n@NgModule({declarations: DIRECTIVES, exports: DIRECTIVES, imports: [CommonModule]})\nexport class NgbPaginationModule {\n /**\n * Importing with '.forRoot()' is no longer necessary, you can simply import the module.\n * Will be removed in 4.0.0.\n *\n * @deprecated 3.0.0\n */\n static forRoot(): ModuleWithProviders { return {ngModule: NgbPaginationModule}; }\n}\n","import {Observable, merge} from 'rxjs';\nimport {share, filter, delay, map} from 'rxjs/operators';\n\nexport class Trigger {\n constructor(public open: string, public close?: string) {\n if (!close) {\n this.close = open;\n }\n }\n\n isManual() { return this.open === 'manual' || this.close === 'manual'; }\n}\n\nconst DEFAULT_ALIASES = {\n 'hover': ['mouseenter', 'mouseleave'],\n 'focus': ['focusin', 'focusout'],\n};\n\nexport function parseTriggers(triggers: string, aliases = DEFAULT_ALIASES): Trigger[] {\n const trimmedTriggers = (triggers || '').trim();\n\n if (trimmedTriggers.length === 0) {\n return [];\n }\n\n const parsedTriggers = trimmedTriggers.split(/\\s+/).map(trigger => trigger.split(':')).map((triggerPair) => {\n let alias = aliases[triggerPair[0]] || triggerPair;\n return new Trigger(alias[0], alias[1]);\n });\n\n const manualTriggers = parsedTriggers.filter(triggerPair => triggerPair.isManual());\n\n if (manualTriggers.length > 1) {\n throw 'Triggers parse error: only one manual trigger is allowed';\n }\n\n if (manualTriggers.length === 1 && parsedTriggers.length > 1) {\n throw 'Triggers parse error: manual trigger can\\'t be mixed with other triggers';\n }\n\n return parsedTriggers;\n}\n\nexport function observeTriggers(renderer: any, nativeElement: any, triggers: Trigger[], isOpenedFn: () => boolean) {\n return new Observable<boolean>(subscriber => {\n const listeners = [];\n const openFn = () => subscriber.next(true);\n const closeFn = () => subscriber.next(false);\n const toggleFn = () => subscriber.next(!isOpenedFn());\n\n triggers.forEach((trigger: Trigger) => {\n if (trigger.open === trigger.close) {\n listeners.push(renderer.listen(nativeElement, trigger.open, toggleFn));\n } else {\n listeners.push(\n renderer.listen(nativeElement, trigger.open, openFn),\n renderer.listen(nativeElement, trigger.close, closeFn));\n }\n });\n\n return () => { listeners.forEach(unsubscribeFn => unsubscribeFn()); };\n });\n}\n\nconst delayOrNoop = <T>(time: number) => time > 0 ? delay<T>(time) : (a: Observable<T>) => a;\n\nexport function triggerDelay(openDelay: number, closeDelay: number, isOpenedFn: () => boolean) {\n return (input$: Observable<boolean>) => {\n let pending = null;\n const filteredInput$ = input$.pipe(\n map(open => ({open})), filter(event => {\n const currentlyOpen = isOpenedFn();\n if (currentlyOpen !== event.open && (!pending || pending.open === currentlyOpen)) {\n pending = event;\n return true;\n }\n if (pending && pending.open !== event.open) {\n pending = null;\n }\n return false;\n }),\n share());\n const delayedOpen$ = filteredInput$.pipe(filter(event => event.open), delayOrNoop(openDelay));\n const delayedClose$ = filteredInput$.pipe(filter(event => !event.open), delayOrNoop(closeDelay));\n return merge(delayedOpen$, delayedClose$)\n .pipe(\n filter(event => {\n if (event === pending) {\n pending = null;\n return event.open !== isOpenedFn();\n }\n return false;\n }),\n map(event => event.open));\n };\n}\n\nexport function listenToTriggers(\n renderer: any, nativeElement: any, triggers: string, isOpenedFn: () => boolean, openFn, closeFn, openDelay = 0,\n closeDelay = 0) {\n const parsedTriggers = parseTriggers(triggers);\n\n if (parsedTriggers.length === 1 && parsedTriggers[0].isManual()) {\n return () => {};\n }\n\n const subscription = observeTriggers(renderer, nativeElement, parsedTriggers, isOpenedFn)\n .pipe(triggerDelay(openDelay, closeDelay, isOpenedFn))\n .subscribe(open => (open ? openFn() : closeFn()));\n\n return () => subscription.unsubscribe();\n}\n","import {Injectable} from '@angular/core';\nimport {PlacementArray} from '../util/positioning';\n\n/**\n * A configuration service for the [`NgbPopover`](#/components/popover/api#NgbPopover) component.\n *\n * You can inject this service, typically in your root component, and customize the values of its properties in\n * order to provide default values for all the popovers used in the application.\n */\n@Injectable({providedIn: 'root'})\nexport class NgbPopoverConfig {\n autoClose: boolean | 'inside' | 'outside' = true;\n placement: PlacementArray = 'auto';\n triggers = 'click';\n container: string;\n disablePopover = false;\n popoverClass: string;\n openDelay = 0;\n closeDelay = 0;\n}\n","import {\n Component,\n Directive,\n Input,\n Output,\n EventEmitter,\n ChangeDetectionStrategy,\n OnInit,\n OnDestroy,\n OnChanges,\n Inject,\n Injector,\n Renderer2,\n ComponentRef,\n ElementRef,\n TemplateRef,\n ViewContainerRef,\n ComponentFactoryResolver,\n NgZone,\n SimpleChanges,\n ViewEncapsulation,\n ChangeDetectorRef,\n ApplicationRef\n} from '@angular/core';\nimport {DOCUMENT} from '@angular/common';\n\nimport {listenToTriggers} from '../util/triggers';\nimport {ngbAutoClose} from '../util/autoclose';\nimport {positionElements, PlacementArray} from '../util/positioning';\nimport {PopupService} from '../util/popup';\n\nimport {NgbPopoverConfig} from './popover-config';\n\nlet nextId = 0;\n\n@Component({\n selector: 'ngb-popover-window',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {'[class]': '\"popover\" + (popoverClass ? \" \" + popoverClass : \"\")', 'role': 'tooltip', '[id]': 'id'},\n template: `\n <div class=\"arrow\"></div>\n <h3 class=\"popover-header\" *ngIf=\"title != null\">\n <ng-template #simpleTitle>{{title}}</ng-template>\n <ng-template [ngTemplateOutlet]=\"isTitleTemplate() ? title : simpleTitle\" [ngTemplateOutletContext]=\"context\"></ng-template>\n </h3>\n <div class=\"popover-body\"><ng-content></ng-content></div>`,\n styleUrls: ['./popover.scss']\n})\nexport class NgbPopoverWindow {\n @Input() title: undefined | string | TemplateRef<any>;\n @Input() id: string;\n @Input() popoverClass: string;\n @Input() context: any;\n\n isTitleTemplate() { return this.title instanceof TemplateRef; }\n}\n\n/**\n * A lightweight and extensible directive for fancy popover creation.\n */\n@Directive({selector: '[ngbPopover]', exportAs: 'ngbPopover'})\nexport class NgbPopover implements OnInit, OnDestroy, OnChanges {\n /**\n * Indicates whether the popover should be closed on `Escape` key and inside/outside clicks:\n *\n * * `true` - closes on both outside and inside clicks as well as `Escape` presses\n * * `false` - disables the autoClose feature (NB: triggers still apply)\n * * `\"inside\"` - closes on inside clicks as well as Escape presses\n * * `\"outside\"` - closes on outside clicks (sometimes also achievable through triggers)\n * as well as `Escape` presses\n *\n * @since 3.0.0\n */\n @Input() autoClose: boolean | 'inside' | 'outside';\n\n /**\n * The string content or a `TemplateRef` for the content to be displayed in the popover.\n *\n * If the title and the content are empty, the popover won't open.\n */\n @Input() ngbPopover: string | TemplateRef<any>;\n\n /**\n * The title of the popover.\n *\n * If the title and the content are empty, the popover won't open.\n */\n @Input() popoverTitle: string | TemplateRef<any>;\n\n /**\n * The preferred placement of the popover.\n *\n * Possible values are `\"top\"`, `\"top-left\"`, `\"top-right\"`, `\"bottom\"`, `\"bottom-left\"`,\n * `\"bottom-right\"`, `\"left\"`, `\"left-top\"`, `\"left-bottom\"`, `\"right\"`, `\"right-top\"`,\n * `\"right-bottom\"`\n *\n * Accepts an array of strings or a string with space separated possible values.\n *\n * The default order of preference is `\"auto\"` (same as the sequence above).\n *\n * Please see the [positioning overview](#/positioning) for more details.\n */\n @Input() placement: PlacementArray;\n\n /**\n * Specifies events that should trigger the tooltip.\n *\n * Supports a space separated list of event names.\n * For more details see the [triggers demo](#/components/popover/examples#triggers).\n */\n @Input() triggers: string;\n\n /**\n * A selector specifying the element the popover should be appended to.\n *\n * Currently only supports `body`.\n */\n @Input() container: string;\n\n /**\n * If `true`, popover is disabled and won't be displayed.\n *\n * @since 1.1.0\n */\n @Input() disablePopover: boolean;\n\n /**\n * An optional class applied to the popover window element.\n *\n * @since 2.2.0\n */\n @Input() popoverClass: string;\n\n /**\n * The opening delay in ms. Works only for \"non-manual\" opening triggers defined by the `triggers` input.\n *\n * @since 4.1.0\n */\n @Input() openDelay: number;\n\n /**\n * The closing delay in ms. Works only for \"non-manual\" opening triggers defined by the `triggers` input.\n *\n * @since 4.1.0\n */\n @Input() closeDelay: number;\n\n /**\n * An event emitted when the popover is shown. Contains no payload.\n */\n @Output() shown = new EventEmitter<void>();\n\n /**\n * An event emitted when the popover is hidden. Contains no payload.\n */\n @Output() hidden = new EventEmitter<void>();\n\n private _ngbPopoverWindowId = `ngb-popover-${nextId++}`;\n private _popupService: PopupService<NgbPopoverWindow>;\n private _windowRef: ComponentRef<NgbPopoverWindow>;\n private _unregisterListenersFn;\n private _zoneSubscription: any;\n private _isDisabled(): boolean {\n if (this.disablePopover) {\n return true;\n }\n if (!this.ngbPopover && !this.popoverTitle) {\n return true;\n }\n return false;\n }\n\n constructor(\n private _elementRef: ElementRef<HTMLElement>, private _renderer: Renderer2, injector: Injector,\n componentFactoryResolver: ComponentFactoryResolver, viewContainerRef: ViewContainerRef, config: NgbPopoverConfig,\n private _ngZone: NgZone, @Inject(DOCUMENT) private _document: any, private _changeDetector: ChangeDetectorRef,\n private _applicationRef: ApplicationRef) {\n this.autoClose = config.autoClose;\n this.placement = config.placement;\n this.triggers = config.triggers;\n this.container = config.container;\n this.disablePopover = config.disablePopover;\n this.popoverClass = config.popoverClass;\n this.openDelay = config.openDelay;\n this.closeDelay = config.closeDelay;\n this._popupService = new PopupService<NgbPopoverWindow>(\n NgbPopoverWindow, injector, viewContainerRef, _renderer, componentFactoryResolver, _applicationRef);\n\n this._zoneSubscription = _ngZone.onStable.subscribe(() => {\n if (this._windowRef) {\n positionElements(\n this._elementRef.nativeElement, this._windowRef.location.nativeElement, this.placement,\n this.container === 'body', 'bs-popover');\n }\n });\n }\n\n /**\n * Opens the popover.\n *\n * This is considered to be a \"manual\" triggering.\n * The `context` is an optional value to be injected into the popover template when it is created.\n */\n open(context?: any) {\n if (!this._windowRef && !this._isDisabled()) {\n this._windowRef = this._popupService.open(this.ngbPopover, context);\n this._windowRef.instance.title = this.popoverTitle;\n this._windowRef.instance.context = context;\n this._windowRef.instance.popoverClass = this.popoverClass;\n this._windowRef.instance.id = this._ngbPopoverWindowId;\n\n this._renderer.setAttribute(this._elementRef.nativeElement, 'aria-describedby', this._ngbPopoverWindowId);\n\n if (this.container === 'body') {\n this._document.querySelector(this.container).appendChild(this._windowRef.location.nativeElement);\n }\n\n // We need to detect changes, because we don't know where .open() might be called from.\n // Ex. opening popover from one of lifecycle hooks that run after the CD\n // (say from ngAfterViewInit) will result in 'ExpressionHasChanged' exception\n this._windowRef.changeDetectorRef.detectChanges();\n\n // We need to mark for check, because popover won't work inside the OnPush component.\n // Ex. when we use expression like `{{ popover.isOpen() : 'opened' : 'closed' }}`\n // inside the template of an OnPush component and we change the popover from\n // open -> closed, the expression in question won't be updated unless we explicitly\n // mark the parent component to be checked.\n this._windowRef.changeDetectorRef.markForCheck();\n\n ngbAutoClose(\n this._ngZone, this._document, this.autoClose, () => this.close(), this.hidden,\n [this._windowRef.location.nativeElement]);\n this.shown.emit();\n }\n }\n\n /**\n * Closes the popover.\n *\n * This is considered to be a \"manual\" triggering of the popover.\n */\n close(): void {\n if (this._windowRef) {\n this._renderer.removeAttribute(this._elementRef.nativeElement, 'aria-describedby');\n this._popupService.close();\n this._windowRef = null;\n this.hidden.emit();\n this._changeDetector.markForCheck();\n }\n }\n\n /**\n * Toggles the popover.\n *\n * This is considered to be a \"manual\" triggering of the popover.\n */\n toggle(): void {\n if (this._windowRef) {\n this.close();\n } else {\n this.open();\n }\n }\n\n /**\n * Returns `true`, if the popover is currently shown.\n */\n isOpen(): boolean { return this._windowRef != null; }\n\n ngOnInit() {\n this._unregisterListenersFn = listenToTriggers(\n this._renderer, this._elementRef.nativeElement, this.triggers, this.isOpen.bind(this), this.open.bind(this),\n this.close.bind(this), +this.openDelay, +this.closeDelay);\n }\n\n ngOnChanges(changes: SimpleChanges) {\n // close popover if title and content become empty, or disablePopover set to true\n if ((changes['ngbPopover'] || changes['popoverTitle'] || changes['disablePopover']) && this._isDisabled()) {\n this.close();\n }\n }\n\n ngOnDestroy() {\n this.close();\n // This check is needed as it might happen that ngOnDestroy is called before ngOnInit\n // under certain conditions, see: https://github.com/ng-bootstrap/ng-bootstrap/issues/2199\n if (this._unregisterListenersFn) {\n this._unregisterListenersFn();\n }\n this._zoneSubscription.unsubscribe();\n }\n}\n","import {NgModule, ModuleWithProviders} from '@angular/core';\n\nimport {NgbPopover, NgbPopoverWindow} from './popover';\nimport {CommonModule} from '@angular/common';\n\nexport {NgbPopover} from './popover';\nexport {NgbPopoverConfig} from './popover-config';\nexport {Placement} from '../util/positioning';\n\n@NgModule({\n declarations: [NgbPopover, NgbPopoverWindow],\n exports: [NgbPopover],\n imports: [CommonModule],\n entryComponents: [NgbPopoverWindow]\n})\nexport class NgbPopoverModule {\n /**\n * Importing with '.forRoot()' is no longer necessary, you can simply import the module.\n * Will be removed in 4.0.0.\n *\n * @deprecated 3.0.0\n */\n static forRoot(): ModuleWithProviders { return {ngModule: NgbPopoverModule}; }\n}\n","import {Injectable} from '@angular/core';\n\n/**\n * A configuration service for the [`NgbProgressbar`](#/components/progressbar/api#NgbProgressbar) component.\n *\n * You can inject this service, typically in your root component, and customize the values of its properties in\n * order to provide default values for all the progress bars used in the application.\n */\n@Injectable({providedIn: 'root'})\nexport class NgbProgressbarConfig {\n max = 100;\n animated = false;\n striped = false;\n type: string;\n showValue = false;\n height: string;\n}\n","import {Component, Input, ChangeDetectionStrategy} from '@angular/core';\nimport {getValueInRange} from '../util/util';\nimport {NgbProgressbarConfig} from './progressbar-config';\n\n/**\n * A directive that provides feedback on the progress of a workflow or an action.\n */\n@Component({\n selector: 'ngb-progressbar',\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <div class=\"progress\" [style.height]=\"height\">\n <div class=\"progress-bar{{type ? ' bg-' + type : ''}}{{animated ? ' progress-bar-animated' : ''}}{{striped ?\n ' progress-bar-striped' : ''}}\" role=\"progressbar\" [style.width.%]=\"getPercentValue()\"\n [attr.aria-valuenow]=\"getValue()\" aria-valuemin=\"0\" [attr.aria-valuemax]=\"max\">\n <span *ngIf=\"showValue\" i18n=\"@@ngb.progressbar.value\">{{getPercentValue()}}%</span><ng-content></ng-content>\n </div>\n </div>\n `\n})\nexport class NgbProgressbar {\n /**\n * The maximal value to be displayed in the progressbar.\n */\n @Input() max: number;\n\n /**\n * If `true`, the stripes on the progressbar are animated.\n *\n * Takes effect only for browsers supporting CSS3 animations, and if `striped` is `true`.\n */\n @Input() animated: boolean;\n\n /**\n * If `true`, the progress bars will be displayed as striped.\n */\n @Input() striped: boolean;\n\n /**\n * If `true`, the current percentage will be shown in the `xx%` format.\n */\n @Input() showValue: boolean;\n\n /**\n * The type of the progress bar.\n *\n * Currently Bootstrap supports `\"success\"`, `\"info\"`, `\"warning\"` or `\"danger\"`.\n */\n @Input() type: string;\n\n /**\n * The current value for the progress bar.\n *\n * Should be in the `[0, max]` range.\n */\n @Input() value = 0;\n\n /**\n * THe height of the progress bar.\n *\n * Accepts any valid CSS height values, ex. `\"2rem\"`\n */\n @Input() height: string;\n\n constructor(config: NgbProgressbarConfig) {\n this.max = config.max;\n this.animated = config.animated;\n this.striped = config.striped;\n this.type = config.type;\n this.showValue = config.showValue;\n this.height = config.height;\n }\n\n getValue() { return getValueInRange(this.value, this.max); }\n\n getPercentValue() { return 100 * this.getValue() / this.max; }\n}\n","import {NgModule, ModuleWithProviders} from '@angular/core';\nimport {CommonModule} from '@angular/common';\n\nimport {NgbProgressbar} from './progressbar';\n\nexport {NgbProgressbar} from './progressbar';\nexport {NgbProgressbarConfig} from './progressbar-config';\n\n@NgModule({declarations: [NgbProgressbar], exports: [NgbProgressbar], imports: [CommonModule]})\nexport class NgbProgressbarModule {\n /**\n * Importing with '.forRoot()' is no longer necessary, you can simply import the module.\n * Will be removed in 4.0.0.\n *\n * @deprecated 3.0.0\n */\n static forRoot(): ModuleWithProviders { return {ngModule: NgbProgressbarModule}; }\n}\n","import {Injectable} from '@angular/core';\n\n/**\n * A configuration service for the [`NgbRating`](#/components/rating/api#NgbRating) component.\n *\n * You can inject this service, typically in your root component, and customize the values of its properties in\n * order to provide default values for all the ratings used in the application.\n */\n@Injectable({providedIn: 'root'})\nexport class NgbRatingConfig {\n max = 10;\n readonly = false;\n resettable = false;\n}\n","import {\n Component,\n ChangeDetectionStrategy,\n Input,\n Output,\n EventEmitter,\n OnInit,\n TemplateRef,\n OnChanges,\n SimpleChanges,\n ContentChild,\n forwardRef,\n ChangeDetectorRef\n} from '@angular/core';\nimport {NgbRatingConfig} from './rating-config';\nimport {getValueInRange} from '../util/util';\nimport {Key} from '../util/key';\nimport {ControlValueAccessor, NG_VALUE_ACCESSOR} from '@angular/forms';\n\n/**\n * The context for the custom star display template defined in the `starTemplate`.\n */\nexport interface StarTemplateContext {\n /**\n * The star fill percentage, an integer in the `[0, 100]` range.\n */\n fill: number;\n\n /**\n * Index of the star, starts with `0`.\n */\n index: number;\n}\n\nconst NGB_RATING_VALUE_ACCESSOR = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => NgbRating),\n multi: true\n};\n\n/**\n * A directive that helps visualising and interacting with a star rating bar.\n */\n@Component({\n selector: 'ngb-rating',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n 'class': 'd-inline-flex',\n 'tabindex': '0',\n 'role': 'slider',\n 'aria-valuemin': '0',\n '[attr.aria-valuemax]': 'max',\n '[attr.aria-valuenow]': 'nextRate',\n '[attr.aria-valuetext]': 'ariaValueText()',\n '[attr.aria-disabled]': 'readonly ? true : null',\n '(blur)': 'handleBlur()',\n '(keydown)': 'handleKeyDown($event)',\n '(mouseleave)': 'reset()'\n },\n template: `\n <ng-template #t let-fill=\"fill\">{{ fill === 100 ? '&#9733;' : '&#9734;' }}</ng-template>\n <ng-template ngFor [ngForOf]=\"contexts\" let-index=\"index\">\n <span class=\"sr-only\">({{ index < nextRate ? '*' : ' ' }})</span>\n <span (mouseenter)=\"enter(index + 1)\" (click)=\"handleClick(index + 1)\" [style.cursor]=\"readonly || disabled ? 'default' : 'pointer'\">\n <ng-template [ngTemplateOutlet]=\"starTemplate || starTemplateFromContent || t\" [ngTemplateOutletContext]=\"contexts[index]\">\n </ng-template>\n </span>\n </ng-template>\n `,\n providers: [NGB_RATING_VALUE_ACCESSOR]\n})\nexport class NgbRating implements ControlValueAccessor,\n OnInit, OnChanges {\n contexts: StarTemplateContext[] = [];\n disabled = false;\n nextRate: number;\n\n\n /**\n * The maximal rating that can be given.\n */\n @Input() max: number;\n\n /**\n * The current rating. Could be a decimal value like `3.75`.\n */\n @Input() rate: number;\n\n /**\n * If `true`, the rating can't be changed.\n */\n @Input() readonly: boolean;\n\n /**\n * If `true`, the rating can be reset to `0` by mouse clicking currently set rating.\n */\n @Input() resettable: boolean;\n\n /**\n * The template to override the way each star is displayed.\n *\n * Alternatively put an `<ng-template>` as the only child of your `<ngb-rating>` element\n */\n @Input() starTemplate: TemplateRef<StarTemplateContext>;\n @ContentChild(TemplateRef) starTemplateFromContent: TemplateRef<StarTemplateContext>;\n\n /**\n * An event emitted when the user is hovering over a given rating.\n *\n * Event payload equals to the rating being hovered over.\n */\n @Output() hover = new EventEmitter<number>();\n\n /**\n * An event emitted when the user stops hovering over a given rating.\n *\n * Event payload equals to the rating of the last item being hovered over.\n */\n @Output() leave = new EventEmitter<number>();\n\n /**\n * An event emitted when the user selects a new rating.\n *\n * Event payload equals to the newly selected rating.\n */\n @Output() rateChange = new EventEmitter<number>(true);\n\n onChange = (_: any) => {};\n onTouched = () => {};\n\n constructor(config: NgbRatingConfig, private _changeDetectorRef: ChangeDetectorRef) {\n this.max = config.max;\n this.readonly = config.readonly;\n }\n\n ariaValueText() { return `${this.nextRate} out of ${this.max}`; }\n\n enter(value: number): void {\n if (!this.readonly && !this.disabled) {\n this._updateState(value);\n }\n this.hover.emit(value);\n }\n\n handleBlur() { this.onTouched(); }\n\n handleClick(value: number) { this.update(this.resettable && this.rate === value ? 0 : value); }\n\n handleKeyDown(event: KeyboardEvent) {\n // tslint:disable-next-line:deprecation\n switch (event.which) {\n case Key.ArrowDown:\n case Key.ArrowLeft:\n this.update(this.rate - 1);\n break;\n case Key.ArrowUp:\n case Key.ArrowRight:\n this.update(this.rate + 1);\n break;\n case Key.Home:\n this.update(0);\n break;\n case Key.End:\n this.update(this.max);\n break;\n default:\n return;\n }\n\n // note 'return' in default case\n event.preventDefault();\n }\n\n ngOnChanges(changes: SimpleChanges) {\n if (changes['rate']) {\n this.update(this.rate);\n }\n }\n\n ngOnInit(): void {\n this.contexts = Array.from({length: this.max}, (v, k) => ({fill: 0, index: k}));\n this._updateState(this.rate);\n }\n\n registerOnChange(fn: (value: any) => any): void { this.onChange = fn; }\n\n registerOnTouched(fn: () => any): void { this.onTouched = fn; }\n\n reset(): void {\n this.leave.emit(this.nextRate);\n this._updateState(this.rate);\n }\n\n setDisabledState(isDisabled: boolean) { this.disabled = isDisabled; }\n\n update(value: number, internalChange = true): void {\n const newRate = getValueInRange(value, this.max, 0);\n if (!this.readonly && !this.disabled && this.rate !== newRate) {\n this.rate = newRate;\n this.rateChange.emit(this.rate);\n }\n if (internalChange) {\n this.onChange(this.rate);\n this.onTouched();\n }\n this._updateState(this.rate);\n }\n\n writeValue(value) {\n this.update(value, false);\n this._changeDetectorRef.markForCheck();\n }\n\n private _getFillValue(index: number): number {\n const diff = this.nextRate - index;\n\n if (diff >= 1) {\n return 100;\n }\n if (diff < 1 && diff > 0) {\n return parseInt((diff * 100).toFixed(2), 10);\n }\n\n return 0;\n }\n\n private _updateState(nextValue: number) {\n this.nextRate = nextValue;\n this.contexts.forEach((context, index) => context.fill = this._getFillValue(index));\n }\n}\n","import {NgModule, ModuleWithProviders} from '@angular/core';\nimport {CommonModule} from '@angular/common';\n\nimport {NgbRating} from './rating';\n\nexport {NgbRating} from './rating';\nexport {NgbRatingConfig} from './rating-config';\n\n@NgModule({declarations: [NgbRating], exports: [NgbRating], imports: [CommonModule]})\nexport class NgbRatingModule {\n /**\n * Importing with '.forRoot()' is no longer necessary, you can simply import the module.\n * Will be removed in 4.0.0.\n *\n * @deprecated 3.0.0\n */\n static forRoot(): ModuleWithProviders { return {ngModule: NgbRatingModule}; }\n}\n","import {Injectable} from '@angular/core';\n\n/**\n * A configuration service for the [`NgbTabset`](#/components/tabset/api#NgbTabset) component.\n *\n * You can inject this service, typically in your root component, and customize the values of its properties in\n * order to provide default values for all the tabsets used in the application.\n */\n@Injectable({providedIn: 'root'})\nexport class NgbTabsetConfig {\n justify: 'start' | 'center' | 'end' | 'fill' | 'justified' = 'start';\n orientation: 'horizontal' | 'vertical' = 'horizontal';\n type: 'tabs' | 'pills' = 'tabs';\n}\n","import {\n Component,\n Input,\n ContentChildren,\n QueryList,\n Directive,\n TemplateRef,\n AfterContentChecked,\n Output,\n EventEmitter\n} from '@angular/core';\nimport {NgbTabsetConfig} from './tabset-config';\n\nlet nextId = 0;\n\n/**\n * A directive to wrap tab titles that need to contain HTML markup or other directives.\n *\n * Alternatively you could use the `NgbTab.title` input for string titles.\n */\n@Directive({selector: 'ng-template[ngbTabTitle]'})\nexport class NgbTabTitle {\n constructor(public templateRef: TemplateRef<any>) {}\n}\n\n/**\n * A directive to wrap content to be displayed in a tab.\n */\n@Directive({selector: 'ng-template[ngbTabContent]'})\nexport class NgbTabContent {\n constructor(public templateRef: TemplateRef<any>) {}\n}\n\n/**\n * A directive representing an individual tab.\n */\n@Directive({selector: 'ngb-tab'})\nexport class NgbTab implements AfterContentChecked {\n /**\n * The tab identifier.\n *\n * Must be unique for the entire document for proper accessibility support.\n */\n @Input() id = `ngb-tab-${nextId++}`;\n\n /**\n * The tab title.\n *\n * Use the [`NgbTabTitle`](#/components/tabset/api#NgbTabTitle) directive for non-string titles.\n */\n @Input() title: string;\n\n /**\n * If `true`, the current tab is disabled and can't be toggled.\n */\n @Input() disabled = false;\n\n titleTpl: NgbTabTitle | null;\n contentTpl: NgbTabContent | null;\n\n @ContentChildren(NgbTabTitle, {descendants: false}) titleTpls: QueryList<NgbTabTitle>;\n @ContentChildren(NgbTabContent, {descendants: false}) contentTpls: QueryList<NgbTabContent>;\n\n ngAfterContentChecked() {\n // We are using @ContentChildren instead of @ContentChild as in the Angular version being used\n // only @ContentChildren allows us to specify the {descendants: false} option.\n // Without {descendants: false} we are hitting bugs described in:\n // https://github.com/ng-bootstrap/ng-bootstrap/issues/2240\n this.titleTpl = this.titleTpls.first;\n this.contentTpl = this.contentTpls.first;\n }\n}\n\n/**\n * The payload of the change event fired right before the tab change.\n */\nexport interface NgbTabChangeEvent {\n /**\n * The id of the currently active tab.\n */\n activeId: string;\n\n /**\n * The id of the newly selected tab.\n */\n nextId: string;\n\n /**\n * Calling this function will prevent tab switching.\n */\n preventDefault: () => void;\n}\n\n/**\n * A component that makes it easy to create tabbed interface.\n */\n@Component({\n selector: 'ngb-tabset',\n exportAs: 'ngbTabset',\n template: `\n <ul [class]=\"'nav nav-' + type + (orientation == 'horizontal'? ' ' + justifyClass : ' flex-column')\" role=\"tablist\">\n <li class=\"nav-item\" *ngFor=\"let tab of tabs\">\n <a [id]=\"tab.id\" class=\"nav-link\" [class.active]=\"tab.id === activeId\" [class.disabled]=\"tab.disabled\"\n href (click)=\"select(tab.id); $event.preventDefault()\" role=\"tab\" [attr.tabindex]=\"(tab.disabled ? '-1': undefined)\"\n [attr.aria-controls]=\"(!destroyOnHide || tab.id === activeId ? tab.id + '-panel' : null)\"\n [attr.aria-expanded]=\"tab.id === activeId\" [attr.aria-disabled]=\"tab.disabled\">\n {{tab.title}}<ng-template [ngTemplateOutlet]=\"tab.titleTpl?.templateRef\"></ng-template>\n </a>\n </li>\n </ul>\n <div class=\"tab-content\">\n <ng-template ngFor let-tab [ngForOf]=\"tabs\">\n <div\n class=\"tab-pane {{tab.id === activeId ? 'active' : null}}\"\n *ngIf=\"!destroyOnHide || tab.id === activeId\"\n role=\"tabpanel\"\n [attr.aria-labelledby]=\"tab.id\" id=\"{{tab.id}}-panel\"\n [attr.aria-expanded]=\"tab.id === activeId\">\n <ng-template [ngTemplateOutlet]=\"tab.contentTpl?.templateRef\"></ng-template>\n </div>\n </ng-template>\n </div>\n `\n})\nexport class NgbTabset implements AfterContentChecked {\n justifyClass: string;\n\n @ContentChildren(NgbTab) tabs: QueryList<NgbTab>;\n\n /**\n * The identifier of the tab that should be opened **initially**.\n *\n * For subsequent tab switches use the `.select()` method and the `(tabChange)` event.\n */\n @Input() activeId: string;\n\n /**\n * If `true`, non-visible tabs content will be removed from DOM. Otherwise it will just be hidden.\n */\n @Input() destroyOnHide = true;\n\n /**\n * The horizontal alignment of the tabs with flexbox utilities.\n */\n @Input()\n set justify(className: 'start' | 'center' | 'end' | 'fill' | 'justified') {\n if (className === 'fill' || className === 'justified') {\n this.justifyClass = `nav-${className}`;\n } else {\n this.justifyClass = `justify-content-${className}`;\n }\n }\n\n /**\n * The orientation of the tabset.\n */\n @Input() orientation: 'horizontal' | 'vertical';\n\n /**\n * Type of navigation to be used for tabs.\n *\n * Currently Bootstrap supports only `\"tabs\"` and `\"pills\"`.\n *\n * Since `3.0.0` can also be an arbitrary string (ex. for custom themes).\n */\n @Input() type: 'tabs' | 'pills' | string;\n\n /**\n * A tab change event emitted right before the tab change happens.\n *\n * See [`NgbTabChangeEvent`](#/components/tabset/api#NgbTabChangeEvent) for payload details.\n */\n @Output() tabChange = new EventEmitter<NgbTabChangeEvent>();\n\n constructor(config: NgbTabsetConfig) {\n this.type = config.type;\n this.justify = config.justify;\n this.orientation = config.orientation;\n }\n\n /**\n * Selects the tab with the given id and shows its associated content panel.\n *\n * Any other tab that was previously selected becomes unselected and its associated pane is removed from DOM or\n * hidden depending on the `destroyOnHide` value.\n */\n select(tabId: string) {\n let selectedTab = this._getTabById(tabId);\n if (selectedTab && !selectedTab.disabled && this.activeId !== selectedTab.id) {\n let defaultPrevented = false;\n\n this.tabChange.emit(\n {activeId: this.activeId, nextId: selectedTab.id, preventDefault: () => { defaultPrevented = true; }});\n\n if (!defaultPrevented) {\n this.activeId = selectedTab.id;\n }\n }\n }\n\n ngAfterContentChecked() {\n // auto-correct activeId that might have been set incorrectly as input\n let activeTab = this._getTabById(this.activeId);\n this.activeId = activeTab ? activeTab.id : (this.tabs.length ? this.tabs.first.id : null);\n }\n\n private _getTabById(id: string): NgbTab {\n let tabsWithId: NgbTab[] = this.tabs.filter(tab => tab.id === id);\n return tabsWithId.length ? tabsWithId[0] : null;\n }\n}\n","import {NgModule, ModuleWithProviders} from '@angular/core';\nimport {CommonModule} from '@angular/common';\n\nimport {NgbTabset, NgbTab, NgbTabContent, NgbTabTitle} from './tabset';\n\nexport {NgbTabset, NgbTab, NgbTabContent, NgbTabTitle, NgbTabChangeEvent} from './tabset';\nexport {NgbTabsetConfig} from './tabset-config';\n\nconst NGB_TABSET_DIRECTIVES = [NgbTabset, NgbTab, NgbTabContent, NgbTabTitle];\n\n@NgModule({declarations: NGB_TABSET_DIRECTIVES, exports: NGB_TABSET_DIRECTIVES, imports: [CommonModule]})\nexport class NgbTabsetModule {\n /**\n * Importing with '.forRoot()' is no longer necessary, you can simply import the module.\n * Will be removed in 4.0.0.\n *\n * @deprecated 3.0.0\n */\n static forRoot(): ModuleWithProviders { return {ngModule: NgbTabsetModule}; }\n}\n","import {isNumber, toInteger} from '../util/util';\n\nexport class NgbTime {\n hour: number;\n minute: number;\n second: number;\n\n constructor(hour?: number, minute?: number, second?: number) {\n this.hour = toInteger(hour);\n this.minute = toInteger(minute);\n this.second = toInteger(second);\n }\n\n changeHour(step = 1) { this.updateHour((isNaN(this.hour) ? 0 : this.hour) + step); }\n\n updateHour(hour: number) {\n if (isNumber(hour)) {\n this.hour = (hour < 0 ? 24 + hour : hour) % 24;\n } else {\n this.hour = NaN;\n }\n }\n\n changeMinute(step = 1) { this.updateMinute((isNaN(this.minute) ? 0 : this.minute) + step); }\n\n updateMinute(minute: number) {\n if (isNumber(minute)) {\n this.minute = minute % 60 < 0 ? 60 + minute % 60 : minute % 60;\n this.changeHour(Math.floor(minute / 60));\n } else {\n this.minute = NaN;\n }\n }\n\n changeSecond(step = 1) { this.updateSecond((isNaN(this.second) ? 0 : this.second) + step); }\n\n updateSecond(second: number) {\n if (isNumber(second)) {\n this.second = second < 0 ? 60 + second % 60 : second % 60;\n this.changeMinute(Math.floor(second / 60));\n } else {\n this.second = NaN;\n }\n }\n\n isValid(checkSecs = true) {\n return isNumber(this.hour) && isNumber(this.minute) && (checkSecs ? isNumber(this.second) : true);\n }\n\n toString() { return `${this.hour || 0}:${this.minute || 0}:${this.second || 0}`; }\n}\n","import {Injectable} from '@angular/core';\n\n/**\n * A configuration service for the [`NgbTimepicker`](#/components/timepicker/api#NgbTimepicker) component.\n *\n * You can inject this service, typically in your root component, and customize the values of its properties in\n * order to provide default values for all the timepickers used in the application.\n */\n@Injectable({providedIn: 'root'})\nexport class NgbTimepickerConfig {\n meridian = false;\n spinners = true;\n seconds = false;\n hourStep = 1;\n minuteStep = 1;\n secondStep = 1;\n disabled = false;\n readonlyInputs = false;\n size: 'small' | 'medium' | 'large' = 'medium';\n}\n","import {Injectable} from '@angular/core';\nimport {NgbTimeStruct} from './ngb-time-struct';\nimport {isInteger} from '../util/util';\n\nexport function NGB_DATEPICKER_TIME_ADAPTER_FACTORY() {\n return new NgbTimeStructAdapter();\n}\n\n/**\n * An abstract service that does the conversion between the internal timepicker `NgbTimeStruct` model and\n * any provided user time model `T`, ex. a string, a native date, etc.\n *\n * The adapter is used **only** for conversion when binding timepicker to a form control,\n * ex. `[(ngModel)]=\"userTimeModel\"`. Here `userTimeModel` can be of any type.\n *\n * The default timepicker implementation assumes we use `NgbTimeStruct` as a user model.\n *\n * See the [custom time adapter demo](#/components/timepicker/examples#adapter) for an example.\n *\n * @since 2.2.0\n */\n@Injectable({providedIn: 'root', useFactory: NGB_DATEPICKER_TIME_ADAPTER_FACTORY})\nexport abstract class NgbTimeAdapter<T> {\n /**\n * Converts a user-model time of type `T` to an `NgbTimeStruct` for internal use.\n */\n abstract fromModel(value: T): NgbTimeStruct;\n\n /**\n * Converts an internal `NgbTimeStruct` time to a user-model time of type `T`.\n */\n abstract toModel(time: NgbTimeStruct): T;\n}\n\n@Injectable()\nexport class NgbTimeStructAdapter extends NgbTimeAdapter<NgbTimeStruct> {\n /**\n * Converts a NgbTimeStruct value into NgbTimeStruct value\n */\n fromModel(time: NgbTimeStruct): NgbTimeStruct {\n return (time && isInteger(time.hour) && isInteger(time.minute)) ?\n {hour: time.hour, minute: time.minute, second: isInteger(time.second) ? time.second : null} :\n null;\n }\n\n /**\n * Converts a NgbTimeStruct value into NgbTimeStruct value\n */\n toModel(time: NgbTimeStruct): NgbTimeStruct {\n return (time && isInteger(time.hour) && isInteger(time.minute)) ?\n {hour: time.hour, minute: time.minute, second: isInteger(time.second) ? time.second : null} :\n null;\n }\n}\n","import {\n ChangeDetectorRef,\n Component,\n forwardRef,\n Input,\n OnChanges,\n SimpleChanges,\n ViewEncapsulation\n} from '@angular/core';\nimport {ControlValueAccessor, NG_VALUE_ACCESSOR} from '@angular/forms';\n\nimport {isInteger, isNumber, padNumber, toInteger} from '../util/util';\nimport {NgbTime} from './ngb-time';\nimport {NgbTimepickerConfig} from './timepicker-config';\nimport {NgbTimeAdapter} from './ngb-time-adapter';\n\nconst NGB_TIMEPICKER_VALUE_ACCESSOR = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => NgbTimepicker),\n multi: true\n};\n\n/**\n * A directive that helps with wth picking hours, minutes and seconds.\n */\n@Component({\n selector: 'ngb-timepicker',\n encapsulation: ViewEncapsulation.None,\n styleUrls: ['./timepicker.scss'],\n template: `\n <fieldset [disabled]=\"disabled\" [class.disabled]=\"disabled\">\n <div class=\"ngb-tp\">\n <div class=\"ngb-tp-input-container ngb-tp-hour\">\n <button *ngIf=\"spinners\" tabindex=\"-1\" type=\"button\" (click)=\"changeHour(hourStep)\"\n class=\"btn btn-link\" [class.btn-sm]=\"isSmallSize\" [class.btn-lg]=\"isLargeSize\" [class.disabled]=\"disabled\"\n [disabled]=\"disabled\">\n <span class=\"chevron ngb-tp-chevron\"></span>\n <span class=\"sr-only\" i18n=\"@@ngb.timepicker.increment-hours\">Increment hours</span>\n </button>\n <input type=\"text\" class=\"ngb-tp-input form-control\" [class.form-control-sm]=\"isSmallSize\" [class.form-control-lg]=\"isLargeSize\"\n maxlength=\"2\" placeholder=\"HH\" i18n-placeholder=\"@@ngb.timepicker.HH\"\n [value]=\"formatHour(model?.hour)\" (change)=\"updateHour($event.target.value)\"\n [readOnly]=\"readonlyInputs\" [disabled]=\"disabled\" aria-label=\"Hours\" i18n-aria-label=\"@@ngb.timepicker.hours\"\n (keydown.ArrowUp)=\"changeHour(hourStep); $event.preventDefault()\"\n (keydown.ArrowDown)=\"changeHour(-hourStep); $event.preventDefault()\">\n <button *ngIf=\"spinners\" tabindex=\"-1\" type=\"button\" (click)=\"changeHour(-hourStep)\"\n class=\"btn btn-link\" [class.btn-sm]=\"isSmallSize\" [class.btn-lg]=\"isLargeSize\" [class.disabled]=\"disabled\"\n [disabled]=\"disabled\">\n <span class=\"chevron ngb-tp-chevron bottom\"></span>\n <span class=\"sr-only\" i18n=\"@@ngb.timepicker.decrement-hours\">Decrement hours</span>\n </button>\n </div>\n <div class=\"ngb-tp-spacer\">:</div>\n <div class=\"ngb-tp-input-container ngb-tp-minute\">\n <button *ngIf=\"spinners\" tabindex=\"-1\" type=\"button\" (click)=\"changeMinute(minuteStep)\"\n class=\"btn btn-link\" [class.btn-sm]=\"isSmallSize\" [class.btn-lg]=\"isLargeSize\" [class.disabled]=\"disabled\"\n [disabled]=\"disabled\">\n <span class=\"chevron ngb-tp-chevron\"></span>\n <span class=\"sr-only\" i18n=\"@@ngb.timepicker.increment-minutes\">Increment minutes</span>\n </button>\n <input type=\"text\" class=\"ngb-tp-input form-control\" [class.form-control-sm]=\"isSmallSize\" [class.form-control-lg]=\"isLargeSize\"\n maxlength=\"2\" placeholder=\"MM\" i18n-placeholder=\"@@ngb.timepicker.MM\"\n [value]=\"formatMinSec(model?.minute)\" (change)=\"updateMinute($event.target.value)\"\n [readOnly]=\"readonlyInputs\" [disabled]=\"disabled\" aria-label=\"Minutes\" i18n-aria-label=\"@@ngb.timepicker.minutes\"\n (keydown.ArrowUp)=\"changeMinute(minuteStep); $event.preventDefault()\"\n (keydown.ArrowDown)=\"changeMinute(-minuteStep); $event.preventDefault()\">\n <button *ngIf=\"spinners\" tabindex=\"-1\" type=\"button\" (click)=\"changeMinute(-minuteStep)\"\n class=\"btn btn-link\" [class.btn-sm]=\"isSmallSize\" [class.btn-lg]=\"isLargeSize\" [class.disabled]=\"disabled\"\n [disabled]=\"disabled\">\n <span class=\"chevron ngb-tp-chevron bottom\"></span>\n <span class=\"sr-only\" i18n=\"@@ngb.timepicker.decrement-minutes\">Decrement minutes</span>\n </button>\n </div>\n <div *ngIf=\"seconds\" class=\"ngb-tp-spacer\">:</div>\n <div *ngIf=\"seconds\" class=\"ngb-tp-input-container ngb-tp-second\">\n <button *ngIf=\"spinners\" tabindex=\"-1\" type=\"button\" (click)=\"changeSecond(secondStep)\"\n class=\"btn btn-link\" [class.btn-sm]=\"isSmallSize\" [class.btn-lg]=\"isLargeSize\" [class.disabled]=\"disabled\"\n [disabled]=\"disabled\">\n <span class=\"chevron ngb-tp-chevron\"></span>\n <span class=\"sr-only\" i18n=\"@@ngb.timepicker.increment-seconds\">Increment seconds</span>\n </button>\n <input type=\"text\" class=\"ngb-tp-input form-control\" [class.form-control-sm]=\"isSmallSize\" [class.form-control-lg]=\"isLargeSize\"\n maxlength=\"2\" placeholder=\"SS\" i18n-placeholder=\"@@ngb.timepicker.SS\"\n [value]=\"formatMinSec(model?.second)\" (change)=\"updateSecond($event.target.value)\"\n [readOnly]=\"readonlyInputs\" [disabled]=\"disabled\" aria-label=\"Seconds\" i18n-aria-label=\"@@ngb.timepicker.seconds\"\n (keydown.ArrowUp)=\"changeSecond(secondStep); $event.preventDefault()\"\n (keydown.ArrowDown)=\"changeSecond(-secondStep); $event.preventDefault()\">\n <button *ngIf=\"spinners\" tabindex=\"-1\" type=\"button\" (click)=\"changeSecond(-secondStep)\"\n class=\"btn btn-link\" [class.btn-sm]=\"isSmallSize\" [class.btn-lg]=\"isLargeSize\" [class.disabled]=\"disabled\"\n [disabled]=\"disabled\">\n <span class=\"chevron ngb-tp-chevron bottom\"></span>\n <span class=\"sr-only\" i18n=\"@@ngb.timepicker.decrement-seconds\">Decrement seconds</span>\n </button>\n </div>\n <div *ngIf=\"meridian\" class=\"ngb-tp-spacer\"></div>\n <div *ngIf=\"meridian\" class=\"ngb-tp-meridian\">\n <button type=\"button\" class=\"btn btn-outline-primary\" [class.btn-sm]=\"isSmallSize\" [class.btn-lg]=\"isLargeSize\"\n [disabled]=\"disabled\" [class.disabled]=\"disabled\"\n (click)=\"toggleMeridian()\">\n <ng-container *ngIf=\"model?.hour >= 12; else am\" i18n=\"@@ngb.timepicker.PM\">PM</ng-container>\n <ng-template #am i18n=\"@@ngb.timepicker.AM\">AM</ng-template>\n </button>\n </div>\n </div>\n </fieldset>\n `,\n providers: [NGB_TIMEPICKER_VALUE_ACCESSOR]\n})\nexport class NgbTimepicker implements ControlValueAccessor,\n OnChanges {\n disabled: boolean;\n model: NgbTime;\n\n private _hourStep: number;\n private _minuteStep: number;\n private _secondStep: number;\n\n /**\n * Whether to display 12H or 24H mode.\n */\n @Input() meridian: boolean;\n\n /**\n * If `true`, the spinners above and below inputs are visible.\n */\n @Input() spinners: boolean;\n\n /**\n * If `true`, it is possible to select seconds.\n */\n @Input() seconds: boolean;\n\n /**\n * The number of hours to add/subtract when clicking hour spinners.\n */\n @Input()\n set hourStep(step: number) {\n this._hourStep = isInteger(step) ? step : this._config.hourStep;\n }\n\n get hourStep(): number { return this._hourStep; }\n\n /**\n * The number of minutes to add/subtract when clicking minute spinners.\n */\n @Input()\n set minuteStep(step: number) {\n this._minuteStep = isInteger(step) ? step : this._config.minuteStep;\n }\n\n get minuteStep(): number { return this._minuteStep; }\n\n /**\n * The number of seconds to add/subtract when clicking second spinners.\n */\n @Input()\n set secondStep(step: number) {\n this._secondStep = isInteger(step) ? step : this._config.secondStep;\n }\n\n get secondStep(): number { return this._secondStep; }\n\n /**\n * If `true`, the timepicker is readonly and can't be changed.\n */\n @Input() readonlyInputs: boolean;\n\n /**\n * The size of inputs and buttons.\n */\n @Input() size: 'small' | 'medium' | 'large';\n\n constructor(\n private readonly _config: NgbTimepickerConfig, private _ngbTimeAdapter: NgbTimeAdapter<any>,\n private _cd: ChangeDetectorRef) {\n this.meridian = _config.meridian;\n this.spinners = _config.spinners;\n this.seconds = _config.seconds;\n this.hourStep = _config.hourStep;\n this.minuteStep = _config.minuteStep;\n this.secondStep = _config.secondStep;\n this.disabled = _config.disabled;\n this.readonlyInputs = _config.readonlyInputs;\n this.size = _config.size;\n }\n\n onChange = (_: any) => {};\n onTouched = () => {};\n\n writeValue(value) {\n const structValue = this._ngbTimeAdapter.fromModel(value);\n this.model = structValue ? new NgbTime(structValue.hour, structValue.minute, structValue.second) : new NgbTime();\n if (!this.seconds && (!structValue || !isNumber(structValue.second))) {\n this.model.second = 0;\n }\n this._cd.markForCheck();\n }\n\n registerOnChange(fn: (value: any) => any): void { this.onChange = fn; }\n\n registerOnTouched(fn: () => any): void { this.onTouched = fn; }\n\n setDisabledState(isDisabled: boolean) { this.disabled = isDisabled; }\n\n changeHour(step: number) {\n this.model.changeHour(step);\n this.propagateModelChange();\n }\n\n changeMinute(step: number) {\n this.model.changeMinute(step);\n this.propagateModelChange();\n }\n\n changeSecond(step: number) {\n this.model.changeSecond(step);\n this.propagateModelChange();\n }\n\n updateHour(newVal: string) {\n const isPM = this.model.hour >= 12;\n const enteredHour = toInteger(newVal);\n if (this.meridian && (isPM && enteredHour < 12 || !isPM && enteredHour === 12)) {\n this.model.updateHour(enteredHour + 12);\n } else {\n this.model.updateHour(enteredHour);\n }\n this.propagateModelChange();\n }\n\n updateMinute(newVal: string) {\n this.model.updateMinute(toInteger(newVal));\n this.propagateModelChange();\n }\n\n updateSecond(newVal: string) {\n this.model.updateSecond(toInteger(newVal));\n this.propagateModelChange();\n }\n\n toggleMeridian() {\n if (this.meridian) {\n this.changeHour(12);\n }\n }\n\n formatHour(value: number) {\n if (isNumber(value)) {\n if (this.meridian) {\n return padNumber(value % 12 === 0 ? 12 : value % 12);\n } else {\n return padNumber(value % 24);\n }\n } else {\n return padNumber(NaN);\n }\n }\n\n formatMinSec(value: number) { return padNumber(value); }\n\n get isSmallSize(): boolean { return this.size === 'small'; }\n\n get isLargeSize(): boolean { return this.size === 'large'; }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes['seconds'] && !this.seconds && this.model && !isNumber(this.model.second)) {\n this.model.second = 0;\n this.propagateModelChange(false);\n }\n }\n\n private propagateModelChange(touched = true) {\n if (touched) {\n this.onTouched();\n }\n if (this.model.isValid(this.seconds)) {\n this.onChange(\n this._ngbTimeAdapter.toModel({hour: this.model.hour, minute: this.model.minute, second: this.model.second}));\n } else {\n this.onChange(this._ngbTimeAdapter.toModel(null));\n }\n }\n}\n","import {NgModule, ModuleWithProviders} from '@angular/core';\nimport {CommonModule} from '@angular/common';\n\nimport {NgbTimepicker} from './timepicker';\n\nexport {NgbTimepicker} from './timepicker';\nexport {NgbTimepickerConfig} from './timepicker-config';\nexport {NgbTimeStruct} from './ngb-time-struct';\nexport {NgbTimeAdapter} from './ngb-time-adapter';\n\n@NgModule({declarations: [NgbTimepicker], exports: [NgbTimepicker], imports: [CommonModule]})\nexport class NgbTimepickerModule {\n /**\n * Importing with '.forRoot()' is no longer necessary, you can simply import the module.\n * Will be removed in 4.0.0.\n *\n * @deprecated 3.0.0\n */\n static forRoot(): ModuleWithProviders { return {ngModule: NgbTimepickerModule}; }\n}\n","import {Injectable} from '@angular/core';\nimport {PlacementArray} from '../util/positioning';\n\n/**\n * A configuration service for the [`NgbTooltip`](#/components/tooltip/api#NgbTooltip) component.\n *\n * You can inject this service, typically in your root component, and customize the values of its properties in\n * order to provide default values for all the tooltips used in the application.\n */\n@Injectable({providedIn: 'root'})\nexport class NgbTooltipConfig {\n autoClose: boolean | 'inside' | 'outside' = true;\n placement: PlacementArray = 'auto';\n triggers = 'hover focus';\n container: string;\n disableTooltip = false;\n tooltipClass: string;\n openDelay = 0;\n closeDelay = 0;\n}\n","import {\n Component,\n Directive,\n Input,\n Output,\n EventEmitter,\n ChangeDetectionStrategy,\n OnInit,\n OnDestroy,\n Inject,\n Injector,\n Renderer2,\n ComponentRef,\n ElementRef,\n TemplateRef,\n ViewContainerRef,\n ComponentFactoryResolver,\n NgZone,\n ViewEncapsulation,\n ChangeDetectorRef,\n ApplicationRef\n} from '@angular/core';\nimport {DOCUMENT} from '@angular/common';\n\nimport {listenToTriggers} from '../util/triggers';\nimport {ngbAutoClose} from '../util/autoclose';\nimport {positionElements, PlacementArray} from '../util/positioning';\nimport {PopupService} from '../util/popup';\n\nimport {NgbTooltipConfig} from './tooltip-config';\n\nlet nextId = 0;\n\n@Component({\n selector: 'ngb-tooltip-window',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {'[class]': '\"tooltip show\" + (tooltipClass ? \" \" + tooltipClass : \"\")', 'role': 'tooltip', '[id]': 'id'},\n template: `<div class=\"arrow\"></div><div class=\"tooltip-inner\"><ng-content></ng-content></div>`,\n styleUrls: ['./tooltip.scss']\n})\nexport class NgbTooltipWindow {\n @Input() id: string;\n @Input() tooltipClass: string;\n}\n\n/**\n * A lightweight and extensible directive for fancy tooltip creation.\n */\n@Directive({selector: '[ngbTooltip]', exportAs: 'ngbTooltip'})\nexport class NgbTooltip implements OnInit, OnDestroy {\n /**\n * Indicates whether the tooltip should be closed on `Escape` key and inside/outside clicks:\n *\n * * `true` - closes on both outside and inside clicks as well as `Escape` presses\n * * `false` - disables the autoClose feature (NB: triggers still apply)\n * * `\"inside\"` - closes on inside clicks as well as Escape presses\n * * `\"outside\"` - closes on outside clicks (sometimes also achievable through triggers)\n * as well as `Escape` presses\n *\n * @since 3.0.0\n */\n @Input() autoClose: boolean | 'inside' | 'outside';\n\n /**\n * The preferred placement of the tooltip.\n *\n * Possible values are `\"top\"`, `\"top-left\"`, `\"top-right\"`, `\"bottom\"`, `\"bottom-left\"`,\n * `\"bottom-right\"`, `\"left\"`, `\"left-top\"`, `\"left-bottom\"`, `\"right\"`, `\"right-top\"`,\n * `\"right-bottom\"`\n *\n * Accepts an array of strings or a string with space separated possible values.\n *\n * The default order of preference is `\"auto\"` (same as the sequence above).\n *\n * Please see the [positioning overview](#/positioning) for more details.\n */\n @Input() placement: PlacementArray;\n\n /**\n * Specifies events that should trigger the tooltip.\n *\n * Supports a space separated list of event names.\n * For more details see the [triggers demo](#/components/tooltip/examples#triggers).\n */\n @Input() triggers: string;\n\n /**\n * A selector specifying the element the tooltip should be appended to.\n *\n * Currently only supports `\"body\"`.\n */\n @Input() container: string;\n\n /**\n * If `true`, tooltip is disabled and won't be displayed.\n *\n * @since 1.1.0\n */\n @Input() disableTooltip: boolean;\n\n /**\n * An optional class applied to the tooltip window element.\n *\n * @since 3.2.0\n */\n @Input() tooltipClass: string;\n\n /**\n * The opening delay in ms. Works only for \"non-manual\" opening triggers defined by the `triggers` input.\n *\n * @since 4.1.0\n */\n @Input() openDelay: number;\n\n /**\n * The closing delay in ms. Works only for \"non-manual\" opening triggers defined by the `triggers` input.\n *\n * @since 4.1.0\n */\n @Input() closeDelay: number;\n\n /**\n * An event emitted when the tooltip is shown. Contains no payload.\n */\n @Output() shown = new EventEmitter();\n /**\n * An event emitted when the popover is hidden. Contains no payload.\n */\n @Output() hidden = new EventEmitter();\n\n private _ngbTooltip: string | TemplateRef<any>;\n private _ngbTooltipWindowId = `ngb-tooltip-${nextId++}`;\n private _popupService: PopupService<NgbTooltipWindow>;\n private _windowRef: ComponentRef<NgbTooltipWindow>;\n private _unregisterListenersFn;\n private _zoneSubscription: any;\n\n constructor(\n private _elementRef: ElementRef<HTMLElement>, private _renderer: Renderer2, injector: Injector,\n componentFactoryResolver: ComponentFactoryResolver, viewContainerRef: ViewContainerRef, config: NgbTooltipConfig,\n private _ngZone: NgZone, @Inject(DOCUMENT) private _document: any, private _changeDetector: ChangeDetectorRef,\n private _applicationRef: ApplicationRef) {\n this.autoClose = config.autoClose;\n this.placement = config.placement;\n this.triggers = config.triggers;\n this.container = config.container;\n this.disableTooltip = config.disableTooltip;\n this.tooltipClass = config.tooltipClass;\n this.openDelay = config.openDelay;\n this.closeDelay = config.closeDelay;\n this._popupService = new PopupService<NgbTooltipWindow>(\n NgbTooltipWindow, injector, viewContainerRef, _renderer, componentFactoryResolver, _applicationRef);\n\n this._zoneSubscription = _ngZone.onStable.subscribe(() => {\n if (this._windowRef) {\n positionElements(\n this._elementRef.nativeElement, this._windowRef.location.nativeElement, this.placement,\n this.container === 'body', 'bs-tooltip');\n }\n });\n }\n\n /**\n * The string content or a `TemplateRef` for the content to be displayed in the tooltip.\n *\n * If the content if falsy, the tooltip won't open.\n */\n @Input()\n set ngbTooltip(value: string | TemplateRef<any>) {\n this._ngbTooltip = value;\n if (!value && this._windowRef) {\n this.close();\n }\n }\n\n get ngbTooltip() { return this._ngbTooltip; }\n\n /**\n * Opens the tooltip.\n *\n * This is considered to be a \"manual\" triggering.\n * The `context` is an optional value to be injected into the tooltip template when it is created.\n */\n open(context?: any) {\n if (!this._windowRef && this._ngbTooltip && !this.disableTooltip) {\n this._windowRef = this._popupService.open(this._ngbTooltip, context);\n this._windowRef.instance.tooltipClass = this.tooltipClass;\n this._windowRef.instance.id = this._ngbTooltipWindowId;\n\n this._renderer.setAttribute(this._elementRef.nativeElement, 'aria-describedby', this._ngbTooltipWindowId);\n\n if (this.container === 'body') {\n this._document.querySelector(this.container).appendChild(this._windowRef.location.nativeElement);\n }\n\n // We need to detect changes, because we don't know where .open() might be called from.\n // Ex. opening tooltip from one of lifecycle hooks that run after the CD\n // (say from ngAfterViewInit) will result in 'ExpressionHasChanged' exception\n this._windowRef.changeDetectorRef.detectChanges();\n\n // We need to mark for check, because tooltip won't work inside the OnPush component.\n // Ex. when we use expression like `{{ tooltip.isOpen() : 'opened' : 'closed' }}`\n // inside the template of an OnPush component and we change the tooltip from\n // open -> closed, the expression in question won't be updated unless we explicitly\n // mark the parent component to be checked.\n this._windowRef.changeDetectorRef.markForCheck();\n\n ngbAutoClose(\n this._ngZone, this._document, this.autoClose, () => this.close(), this.hidden,\n [this._windowRef.location.nativeElement]);\n\n this.shown.emit();\n }\n }\n\n /**\n * Closes the tooltip.\n *\n * This is considered to be a \"manual\" triggering of the tooltip.\n */\n close(): void {\n if (this._windowRef != null) {\n this._renderer.removeAttribute(this._elementRef.nativeElement, 'aria-describedby');\n this._popupService.close();\n this._windowRef = null;\n this.hidden.emit();\n this._changeDetector.markForCheck();\n }\n }\n\n /**\n * Toggles the tooltip.\n *\n * This is considered to be a \"manual\" triggering of the tooltip.\n */\n toggle(): void {\n if (this._windowRef) {\n this.close();\n } else {\n this.open();\n }\n }\n\n /**\n * Returns `true`, if the popover is currently shown.\n */\n isOpen(): boolean { return this._windowRef != null; }\n\n ngOnInit() {\n this._unregisterListenersFn = listenToTriggers(\n this._renderer, this._elementRef.nativeElement, this.triggers, this.isOpen.bind(this), this.open.bind(this),\n this.close.bind(this), +this.openDelay, +this.closeDelay);\n }\n\n ngOnDestroy() {\n this.close();\n // This check is needed as it might happen that ngOnDestroy is called before ngOnInit\n // under certain conditions, see: https://github.com/ng-bootstrap/ng-bootstrap/issues/2199\n if (this._unregisterListenersFn) {\n this._unregisterListenersFn();\n }\n this._zoneSubscription.unsubscribe();\n }\n}\n","import {NgModule, ModuleWithProviders} from '@angular/core';\n\nimport {NgbTooltip, NgbTooltipWindow} from './tooltip';\n\nexport {NgbTooltipConfig} from './tooltip-config';\nexport {NgbTooltip} from './tooltip';\nexport {Placement} from '../util/positioning';\n\n@NgModule({declarations: [NgbTooltip, NgbTooltipWindow], exports: [NgbTooltip], entryComponents: [NgbTooltipWindow]})\nexport class NgbTooltipModule {\n /**\n * No need in forRoot anymore with tree-shakeable services\n *\n * @deprecated 3.0.0\n */\n static forRoot(): ModuleWithProviders { return {ngModule: NgbTooltipModule}; }\n}\n","import {Component, Input, OnChanges, ChangeDetectionStrategy, SimpleChanges, ViewEncapsulation} from '@angular/core';\nimport {regExpEscape, toString} from '../util/util';\n\n/**\n * A component that helps with text highlighting.\n *\n * If splits the `result` text into parts that contain the searched `term` and generates the HTML markup to simplify\n * highlighting:\n *\n * Ex. `result=\"Alaska\"` and `term=\"as\"` will produce `Al<span class=\"ngb-highlight\">as</span>ka`.\n */\n@Component({\n selector: 'ngb-highlight',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `<ng-template ngFor [ngForOf]=\"parts\" let-part let-isOdd=\"odd\">` +\n `<span *ngIf=\"isOdd; else even\" [class]=\"highlightClass\">{{part}}</span><ng-template #even>{{part}}</ng-template>` +\n `</ng-template>`, // template needs to be formatted in a certain way so we don't add empty text nodes\n styleUrls: ['./highlight.scss']\n})\nexport class NgbHighlight implements OnChanges {\n parts: string[];\n\n /**\n * The CSS class for `<span>` elements wrapping the `term` inside the `result`.\n */\n @Input() highlightClass = 'ngb-highlight';\n\n /**\n * The text highlighting is added to.\n *\n * If the `term` is found inside this text, it will be highlighted.\n * If the `term` contains array then all the items from it will be highlighted inside the text.\n */\n @Input() result: string;\n\n /**\n * The term or array of terms to be highlighted.\n * Since version `v4.2.0` term could be a `string[]`\n */\n @Input() term: string | string[];\n\n ngOnChanges(changes: SimpleChanges) {\n const resultStr = toString(this.result);\n if (!resultStr) {\n this.parts = [resultStr];\n return;\n }\n let resultTerms: string[] = Array.isArray(this.term) ? this.term.map(x => toString(x)) : [toString(this.term)];\n\n resultTerms = resultTerms.filter(x => x);\n if (!resultTerms.length) {\n this.parts = [resultStr];\n return;\n }\n\n const regexStr = `(${resultTerms.map(x => regExpEscape(x)).join('|')})`;\n this.parts = resultStr.split(new RegExp(regexStr, 'gmi'));\n }\n}\n","import {Component, Input, Output, EventEmitter, TemplateRef, OnInit} from '@angular/core';\n\nimport {toString} from '../util/util';\n\n/**\n * The context for the typeahead result template in case you want to override the default one.\n */\nexport interface ResultTemplateContext {\n /**\n * Your typeahead result item.\n */\n result: any;\n\n /**\n * Search term from the `<input>` used to get current result.\n */\n term: string;\n}\n\n@Component({\n selector: 'ngb-typeahead-window',\n exportAs: 'ngbTypeaheadWindow',\n host: {'(mousedown)': '$event.preventDefault()', 'class': 'dropdown-menu show', 'role': 'listbox', '[id]': 'id'},\n template: `\n <ng-template #rt let-result=\"result\" let-term=\"term\" let-formatter=\"formatter\">\n <ngb-highlight [result]=\"formatter(result)\" [term]=\"term\"></ngb-highlight>\n </ng-template>\n <ng-template ngFor [ngForOf]=\"results\" let-result let-idx=\"index\">\n <button type=\"button\" class=\"dropdown-item\" role=\"option\"\n [id]=\"id + '-' + idx\"\n [class.active]=\"idx === activeIdx\"\n (mouseenter)=\"markActive(idx)\"\n (click)=\"select(result)\">\n <ng-template [ngTemplateOutlet]=\"resultTemplate || rt\"\n [ngTemplateOutletContext]=\"{result: result, term: term, formatter: formatter}\"></ng-template>\n </button>\n </ng-template>\n `\n})\nexport class NgbTypeaheadWindow implements OnInit {\n activeIdx = 0;\n\n /**\n * The id for the typeahead window. The id should be unique and the same\n * as the associated typeahead's id.\n */\n @Input() id: string;\n\n /**\n * Flag indicating if the first row should be active initially\n */\n @Input() focusFirst = true;\n\n /**\n * Typeahead match results to be displayed\n */\n @Input() results;\n\n /**\n * Search term used to get current results\n */\n @Input() term: string;\n\n /**\n * A function used to format a given result before display. This function should return a formatted string without any\n * HTML markup\n */\n @Input() formatter = toString;\n\n /**\n * A template to override a matching result default display\n */\n @Input() resultTemplate: TemplateRef<ResultTemplateContext>;\n\n /**\n * Event raised when user selects a particular result row\n */\n @Output('select') selectEvent = new EventEmitter();\n\n @Output('activeChange') activeChangeEvent = new EventEmitter();\n\n hasActive() { return this.activeIdx > -1 && this.activeIdx < this.results.length; }\n\n getActive() { return this.results[this.activeIdx]; }\n\n markActive(activeIdx: number) {\n this.activeIdx = activeIdx;\n this._activeChanged();\n }\n\n next() {\n if (this.activeIdx === this.results.length - 1) {\n this.activeIdx = this.focusFirst ? (this.activeIdx + 1) % this.results.length : -1;\n } else {\n this.activeIdx++;\n }\n this._activeChanged();\n }\n\n prev() {\n if (this.activeIdx < 0) {\n this.activeIdx = this.results.length - 1;\n } else if (this.activeIdx === 0) {\n this.activeIdx = this.focusFirst ? this.results.length - 1 : -1;\n } else {\n this.activeIdx--;\n }\n this._activeChanged();\n }\n\n resetActive() {\n this.activeIdx = this.focusFirst ? 0 : -1;\n this._activeChanged();\n }\n\n select(item) { this.selectEvent.emit(item); }\n\n ngOnInit() { this.resetActive(); }\n\n private _activeChanged() {\n this.activeChangeEvent.emit(this.activeIdx >= 0 ? this.id + '-' + this.activeIdx : undefined);\n }\n}\n","import {Injectable, Inject, InjectionToken, OnDestroy} from '@angular/core';\nimport {DOCUMENT} from '@angular/common';\n\n\n\n// usefulness (and default value) of delay documented in Material's CDK\n// https://github.com/angular/material2/blob/6405da9b8e8532a7e5c854c920ee1815c275d734/src/cdk/a11y/live-announcer/live-announcer.ts#L50\nexport type ARIA_LIVE_DELAY_TYPE = number | null;\nexport const ARIA_LIVE_DELAY = new InjectionToken<ARIA_LIVE_DELAY_TYPE>(\n 'live announcer delay', {providedIn: 'root', factory: ARIA_LIVE_DELAY_FACTORY});\nexport function ARIA_LIVE_DELAY_FACTORY(): number {\n return 100;\n}\n\n\nfunction getLiveElement(document: any, lazyCreate = false): HTMLElement | null {\n let element = document.body.querySelector('#ngb-live') as HTMLElement;\n\n if (element == null && lazyCreate) {\n element = document.createElement('div');\n\n element.setAttribute('id', 'ngb-live');\n element.setAttribute('aria-live', 'polite');\n element.setAttribute('aria-atomic', 'true');\n\n element.classList.add('sr-only');\n\n document.body.appendChild(element);\n }\n\n return element;\n}\n\n\n\n@Injectable({providedIn: 'root'})\nexport class Live implements OnDestroy {\n constructor(@Inject(DOCUMENT) private _document: any, @Inject(ARIA_LIVE_DELAY) private _delay: any) {}\n\n ngOnDestroy() {\n const element = getLiveElement(this._document);\n if (element) {\n element.parentElement.removeChild(element);\n }\n }\n\n say(message: string) {\n const element = getLiveElement(this._document, true);\n const delay = this._delay;\n\n element.textContent = '';\n const setText = () => element.textContent = message;\n if (delay === null) {\n setText();\n } else {\n setTimeout(setText, delay);\n }\n }\n}\n","import {Injectable} from '@angular/core';\nimport {PlacementArray} from '../util/positioning';\n\n/**\n * A configuration service for the [`NgbTypeahead`](#/components/typeahead/api#NgbTypeahead) component.\n *\n * You can inject this service, typically in your root component, and customize the values of its properties in\n * order to provide default values for all the typeaheads used in the application.\n */\n@Injectable({providedIn: 'root'})\nexport class NgbTypeaheadConfig {\n container;\n editable = true;\n focusFirst = true;\n showHint = false;\n placement: PlacementArray = ['bottom-left', 'bottom-right', 'top-left', 'top-right'];\n}\n","import {\n ChangeDetectorRef,\n ComponentFactoryResolver,\n ComponentRef,\n Directive,\n ElementRef,\n EventEmitter,\n forwardRef,\n Inject,\n Injector,\n Input,\n NgZone,\n OnDestroy,\n OnInit,\n Output,\n Renderer2,\n TemplateRef,\n ViewContainerRef,\n ApplicationRef\n} from '@angular/core';\nimport {ControlValueAccessor, NG_VALUE_ACCESSOR} from '@angular/forms';\nimport {DOCUMENT} from '@angular/common';\nimport {BehaviorSubject, fromEvent, Observable, Subject, Subscription} from 'rxjs';\nimport {map, switchMap, tap} from 'rxjs/operators';\n\nimport {Live} from '../util/accessibility/live';\nimport {ngbAutoClose} from '../util/autoclose';\nimport {Key} from '../util/key';\nimport {PopupService} from '../util/popup';\nimport {PlacementArray, positionElements} from '../util/positioning';\nimport {isDefined, toString} from '../util/util';\n\nimport {NgbTypeaheadConfig} from './typeahead-config';\nimport {NgbTypeaheadWindow, ResultTemplateContext} from './typeahead-window';\n\n\nconst NGB_TYPEAHEAD_VALUE_ACCESSOR = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => NgbTypeahead),\n multi: true\n};\n\n/**\n * An event emitted right before an item is selected from the result list.\n */\nexport interface NgbTypeaheadSelectItemEvent {\n /**\n * The item from the result list about to be selected.\n */\n item: any;\n\n /**\n * Calling this function will prevent item selection from happening.\n */\n preventDefault: () => void;\n}\n\nlet nextWindowId = 0;\n\n/**\n * A directive providing a simple way of creating powerful typeaheads from any text input.\n */\n@Directive({\n selector: 'input[ngbTypeahead]',\n exportAs: 'ngbTypeahead',\n host: {\n '(blur)': 'handleBlur()',\n '[class.open]': 'isPopupOpen()',\n '(keydown)': 'handleKeyDown($event)',\n '[autocomplete]': 'autocomplete',\n 'autocapitalize': 'off',\n 'autocorrect': 'off',\n 'role': 'combobox',\n 'aria-multiline': 'false',\n '[attr.aria-autocomplete]': 'showHint ? \"both\" : \"list\"',\n '[attr.aria-activedescendant]': 'activeDescendant',\n '[attr.aria-owns]': 'isPopupOpen() ? popupId : null',\n '[attr.aria-expanded]': 'isPopupOpen()'\n },\n providers: [NGB_TYPEAHEAD_VALUE_ACCESSOR]\n})\nexport class NgbTypeahead implements ControlValueAccessor,\n OnInit, OnDestroy {\n private _popupService: PopupService<NgbTypeaheadWindow>;\n private _subscription: Subscription;\n private _closed$ = new Subject();\n private _inputValueBackup: string;\n private _valueChanges: Observable<string>;\n private _resubscribeTypeahead: BehaviorSubject<any>;\n private _windowRef: ComponentRef<NgbTypeaheadWindow>;\n private _zoneSubscription: any;\n\n /**\n * The value for the `autocomplete` attribute for the `<input>` element.\n *\n * Defaults to `\"off\"` to disable the native browser autocomplete, but you can override it if necessary.\n *\n * @since 2.1.0\n */\n @Input() autocomplete = 'off';\n\n /**\n * A selector specifying the element the typeahead popup will be appended to.\n *\n * Currently only supports `\"body\"`.\n */\n @Input() container: string;\n\n /**\n * If `true`, model values will not be restricted only to items selected from the popup.\n */\n @Input() editable: boolean;\n\n /**\n * If `true`, the first item in the result list will always stay focused while typing.\n */\n @Input() focusFirst: boolean;\n\n /**\n * The function that converts an item from the result list to a `string` to display in the `<input>` field.\n *\n * It is called when the user selects something in the popup or the model value changes, so the input needs to\n * be updated.\n */\n @Input() inputFormatter: (item: any) => string;\n\n /**\n * The function that converts a stream of text values from the `<input>` element to the stream of the array of items\n * to display in the typeahead popup.\n *\n * If the resulting observable emits a non-empty array - the popup will be shown. If it emits an empty array - the\n * popup will be closed.\n *\n * See the [basic example](#/components/typeahead/examples#basic) for more details.\n *\n * Note that the `this` argument is `undefined` so you need to explicitly bind it to a desired \"this\" target.\n */\n @Input() ngbTypeahead: (text: Observable<string>) => Observable<any[]>;\n\n /**\n * The function that converts an item from the result list to a `string` to display in the popup.\n *\n * Must be provided, if your `ngbTypeahead` returns something other than `Observable<string[]>`.\n *\n * Alternatively for more complex markup in the popup you should use `resultTemplate`.\n */\n @Input() resultFormatter: (item: any) => string;\n\n /**\n * The template to override the way resulting items are displayed in the popup.\n *\n * See the [ResultTemplateContext](#/components/typeahead/api#ResultTemplateContext) for the template context.\n *\n * Also see the [template for results demo](#/components/typeahead/examples#template) for more details.\n */\n @Input() resultTemplate: TemplateRef<ResultTemplateContext>;\n\n /**\n * If `true`, will show the hint in the `<input>` when an item in the result list matches.\n */\n @Input() showHint: boolean;\n\n /**\n * The preferred placement of the typeahead.\n *\n * Possible values are `\"top\"`, `\"top-left\"`, `\"top-right\"`, `\"bottom\"`, `\"bottom-left\"`,\n * `\"bottom-right\"`, `\"left\"`, `\"left-top\"`, `\"left-bottom\"`, `\"right\"`, `\"right-top\"`,\n * `\"right-bottom\"`\n *\n * Accepts an array of strings or a string with space separated possible values.\n *\n * The default order of preference is `\"bottom-left bottom-right top-left top-right\"`\n *\n * Please see the [positioning overview](#/positioning) for more details.\n */\n @Input() placement: PlacementArray = 'bottom-left';\n\n /**\n * An event emitted right before an item is selected from the result list.\n *\n * Event payload is of type [`NgbTypeaheadSelectItemEvent`](#/components/typeahead/api#NgbTypeaheadSelectItemEvent).\n */\n @Output() selectItem = new EventEmitter<NgbTypeaheadSelectItemEvent>();\n\n activeDescendant: string;\n popupId = `ngb-typeahead-${nextWindowId++}`;\n\n private _onTouched = () => {};\n private _onChange = (_: any) => {};\n\n constructor(\n private _elementRef: ElementRef<HTMLInputElement>, private _viewContainerRef: ViewContainerRef,\n private _renderer: Renderer2, private _injector: Injector, componentFactoryResolver: ComponentFactoryResolver,\n config: NgbTypeaheadConfig, ngZone: NgZone, private _live: Live, @Inject(DOCUMENT) private _document: any,\n private _ngZone: NgZone, private _changeDetector: ChangeDetectorRef, private _applicationRef: ApplicationRef) {\n this.container = config.container;\n this.editable = config.editable;\n this.focusFirst = config.focusFirst;\n this.showHint = config.showHint;\n this.placement = config.placement;\n\n this._valueChanges = fromEvent<Event>(_elementRef.nativeElement, 'input')\n .pipe(map($event => ($event.target as HTMLInputElement).value));\n\n this._resubscribeTypeahead = new BehaviorSubject(null);\n\n this._popupService = new PopupService<NgbTypeaheadWindow>(\n NgbTypeaheadWindow, _injector, _viewContainerRef, _renderer, componentFactoryResolver, _applicationRef);\n\n this._zoneSubscription = ngZone.onStable.subscribe(() => {\n if (this.isPopupOpen()) {\n positionElements(\n this._elementRef.nativeElement, this._windowRef.location.nativeElement, this.placement,\n this.container === 'body');\n }\n });\n }\n\n ngOnInit(): void {\n const inputValues$ = this._valueChanges.pipe(tap(value => {\n this._inputValueBackup = this.showHint ? value : null;\n if (this.editable) {\n this._onChange(value);\n }\n }));\n const results$ = inputValues$.pipe(this.ngbTypeahead);\n const processedResults$ = results$.pipe(tap(() => {\n if (!this.editable) {\n this._onChange(undefined);\n }\n }));\n const userInput$ = this._resubscribeTypeahead.pipe(switchMap(() => processedResults$));\n this._subscription = this._subscribeToUserInput(userInput$);\n }\n\n ngOnDestroy(): void {\n this._closePopup();\n this._unsubscribeFromUserInput();\n this._zoneSubscription.unsubscribe();\n }\n\n registerOnChange(fn: (value: any) => any): void { this._onChange = fn; }\n\n registerOnTouched(fn: () => any): void { this._onTouched = fn; }\n\n writeValue(value) {\n this._writeInputValue(this._formatItemForInput(value));\n if (this.showHint) {\n this._inputValueBackup = value;\n }\n }\n\n setDisabledState(isDisabled: boolean): void {\n this._renderer.setProperty(this._elementRef.nativeElement, 'disabled', isDisabled);\n }\n\n /**\n * Dismisses typeahead popup window\n */\n dismissPopup() {\n if (this.isPopupOpen()) {\n this._resubscribeTypeahead.next(null);\n this._closePopup();\n if (this.showHint && this._inputValueBackup !== null) {\n this._writeInputValue(this._inputValueBackup);\n }\n this._changeDetector.markForCheck();\n }\n }\n\n /**\n * Returns true if the typeahead popup window is displayed\n */\n isPopupOpen() { return this._windowRef != null; }\n\n handleBlur() {\n this._resubscribeTypeahead.next(null);\n this._onTouched();\n }\n\n handleKeyDown(event: KeyboardEvent) {\n if (!this.isPopupOpen()) {\n return;\n }\n\n // tslint:disable-next-line:deprecation\n switch (event.which) {\n case Key.ArrowDown:\n event.preventDefault();\n this._windowRef.instance.next();\n this._showHint();\n break;\n case Key.ArrowUp:\n event.preventDefault();\n this._windowRef.instance.prev();\n this._showHint();\n break;\n case Key.Enter:\n case Key.Tab:\n const result = this._windowRef.instance.getActive();\n if (isDefined(result)) {\n event.preventDefault();\n event.stopPropagation();\n this._selectResult(result);\n }\n this._closePopup();\n break;\n }\n }\n\n private _openPopup() {\n if (!this.isPopupOpen()) {\n this._inputValueBackup = this._elementRef.nativeElement.value;\n this._windowRef = this._popupService.open();\n this._windowRef.instance.id = this.popupId;\n this._windowRef.instance.selectEvent.subscribe((result: any) => this._selectResultClosePopup(result));\n this._windowRef.instance.activeChangeEvent.subscribe((activeId: string) => this.activeDescendant = activeId);\n\n if (this.container === 'body') {\n window.document.querySelector(this.container).appendChild(this._windowRef.location.nativeElement);\n }\n\n this._changeDetector.markForCheck();\n\n ngbAutoClose(\n this._ngZone, this._document, 'outside', () => this.dismissPopup(), this._closed$,\n [this._elementRef.nativeElement, this._windowRef.location.nativeElement]);\n }\n }\n\n private _closePopup() {\n this._closed$.next();\n this._popupService.close();\n this._windowRef = null;\n this.activeDescendant = undefined;\n }\n\n private _selectResult(result: any) {\n let defaultPrevented = false;\n this.selectItem.emit({item: result, preventDefault: () => { defaultPrevented = true; }});\n this._resubscribeTypeahead.next(null);\n\n if (!defaultPrevented) {\n this.writeValue(result);\n this._onChange(result);\n }\n }\n\n private _selectResultClosePopup(result: any) {\n this._selectResult(result);\n this._closePopup();\n }\n\n private _showHint() {\n if (this.showHint && this._windowRef.instance.hasActive() && this._inputValueBackup != null) {\n const userInputLowerCase = this._inputValueBackup.toLowerCase();\n const formattedVal = this._formatItemForInput(this._windowRef.instance.getActive());\n\n if (userInputLowerCase === formattedVal.substr(0, this._inputValueBackup.length).toLowerCase()) {\n this._writeInputValue(this._inputValueBackup + formattedVal.substr(this._inputValueBackup.length));\n this._elementRef.nativeElement['setSelectionRange'].apply(\n this._elementRef.nativeElement, [this._inputValueBackup.length, formattedVal.length]);\n } else {\n this._writeInputValue(formattedVal);\n }\n }\n }\n\n private _formatItemForInput(item: any): string {\n return item != null && this.inputFormatter ? this.inputFormatter(item) : toString(item);\n }\n\n private _writeInputValue(value: string): void {\n this._renderer.setProperty(this._elementRef.nativeElement, 'value', toString(value));\n }\n\n private _subscribeToUserInput(userInput$: Observable<any[]>): Subscription {\n return userInput$.subscribe((results) => {\n if (!results || results.length === 0) {\n this._closePopup();\n } else {\n this._openPopup();\n this._windowRef.instance.focusFirst = this.focusFirst;\n this._windowRef.instance.results = results;\n this._windowRef.instance.term = this._elementRef.nativeElement.value;\n if (this.resultFormatter) {\n this._windowRef.instance.formatter = this.resultFormatter;\n }\n if (this.resultTemplate) {\n this._windowRef.instance.resultTemplate = this.resultTemplate;\n }\n this._windowRef.instance.resetActive();\n\n // The observable stream we are subscribing to might have async steps\n // and if a component containing typeahead is using the OnPush strategy\n // the change detection turn wouldn't be invoked automatically.\n this._windowRef.changeDetectorRef.detectChanges();\n\n this._showHint();\n }\n\n // live announcer\n const count = results ? results.length : 0;\n this._live.say(count === 0 ? 'No results available' : `${count} result${count === 1 ? '' : 's'} available`);\n });\n }\n\n private _unsubscribeFromUserInput() {\n if (this._subscription) {\n this._subscription.unsubscribe();\n }\n this._subscription = null;\n }\n}\n","import {NgModule, ModuleWithProviders} from '@angular/core';\nimport {CommonModule} from '@angular/common';\n\nimport {NgbHighlight} from './highlight';\nimport {NgbTypeaheadWindow} from './typeahead-window';\nimport {NgbTypeahead} from './typeahead';\n\nexport {NgbHighlight} from './highlight';\nexport {NgbTypeaheadWindow} from './typeahead-window';\nexport {NgbTypeaheadConfig} from './typeahead-config';\nexport {NgbTypeahead, NgbTypeaheadSelectItemEvent} from './typeahead';\n\n@NgModule({\n declarations: [NgbTypeahead, NgbHighlight, NgbTypeaheadWindow],\n exports: [NgbTypeahead, NgbHighlight],\n imports: [CommonModule],\n entryComponents: [NgbTypeaheadWindow]\n})\nexport class NgbTypeaheadModule {\n /**\n * Importing with '.forRoot()' is no longer necessary, you can simply import the module.\n * Will be removed in 4.0.0.\n *\n * @deprecated 3.0.0\n */\n static forRoot(): ModuleWithProviders { return {ngModule: NgbTypeaheadModule}; }\n}\n","import {NgModule, ModuleWithProviders} from '@angular/core';\n\nimport {NgbAccordionModule} from './accordion/accordion.module';\nimport {NgbAlertModule} from './alert/alert.module';\nimport {NgbButtonsModule} from './buttons/buttons.module';\nimport {NgbCarouselModule} from './carousel/carousel.module';\nimport {NgbCollapseModule} from './collapse/collapse.module';\nimport {NgbDatepickerModule} from './datepicker/datepicker.module';\nimport {NgbDropdownModule} from './dropdown/dropdown.module';\nimport {NgbModalModule} from './modal/modal.module';\nimport {NgbPaginationModule} from './pagination/pagination.module';\nimport {NgbPopoverModule} from './popover/popover.module';\nimport {NgbProgressbarModule} from './progressbar/progressbar.module';\nimport {NgbRatingModule} from './rating/rating.module';\nimport {NgbTabsetModule} from './tabset/tabset.module';\nimport {NgbTimepickerModule} from './timepicker/timepicker.module';\nimport {NgbTooltipModule} from './tooltip/tooltip.module';\nimport {NgbTypeaheadModule} from './typeahead/typeahead.module';\n\nexport {\n NgbAccordionModule,\n NgbPanelChangeEvent,\n NgbAccordionConfig,\n NgbAccordion,\n NgbPanel,\n NgbPanelTitle,\n NgbPanelContent,\n NgbPanelHeader,\n NgbPanelHeaderContext,\n NgbPanelToggle\n} from './accordion/accordion.module';\nexport {NgbAlertModule, NgbAlertConfig, NgbAlert} from './alert/alert.module';\nexport {NgbButtonsModule, NgbButtonLabel, NgbCheckBox, NgbRadio, NgbRadioGroup} from './buttons/buttons.module';\nexport {NgbCarouselModule, NgbCarouselConfig, NgbCarousel, NgbSlide} from './carousel/carousel.module';\nexport {NgbCollapseModule, NgbCollapse} from './collapse/collapse.module';\nexport {\n NgbCalendar,\n NgbPeriod,\n NgbCalendarGregorian,\n NgbCalendarIslamicCivil,\n NgbCalendarIslamicUmalqura,\n NgbCalendarHebrew,\n NgbCalendarPersian,\n NgbDatepickerModule,\n NgbDatepickerI18n,\n NgbDatepickerI18nHebrew,\n NgbDatepickerConfig,\n NgbDatepickerNavigateEvent,\n NgbDateStruct,\n NgbDate,\n NgbDateParserFormatter,\n NgbDateAdapter,\n NgbDateNativeAdapter,\n NgbDateNativeUTCAdapter,\n NgbDatepicker,\n NgbInputDatepicker\n} from './datepicker/datepicker.module';\nexport {\n NgbDropdownModule,\n NgbDropdownAnchor,\n NgbDropdownConfig,\n NgbDropdownItem,\n NgbDropdownMenu,\n NgbDropdownToggle,\n NgbDropdown\n} from './dropdown/dropdown.module';\nexport {\n NgbModalModule,\n NgbModal,\n NgbModalConfig,\n NgbModalOptions,\n NgbActiveModal,\n NgbModalRef,\n ModalDismissReasons\n} from './modal/modal.module';\nexport {\n NgbPaginationModule,\n NgbPaginationConfig,\n NgbPagination,\n NgbPaginationEllipsis,\n NgbPaginationFirst,\n NgbPaginationLast,\n NgbPaginationNext,\n NgbPaginationNumber,\n NgbPaginationPrevious\n} from './pagination/pagination.module';\nexport {NgbPopoverModule, NgbPopoverConfig, NgbPopover} from './popover/popover.module';\nexport {NgbProgressbarModule, NgbProgressbarConfig, NgbProgressbar} from './progressbar/progressbar.module';\nexport {NgbRatingModule, NgbRatingConfig, NgbRating} from './rating/rating.module';\nexport {\n NgbTabsetModule,\n NgbTabChangeEvent,\n NgbTabsetConfig,\n NgbTabset,\n NgbTab,\n NgbTabContent,\n NgbTabTitle\n} from './tabset/tabset.module';\nexport {\n NgbTimepickerModule,\n NgbTimepickerConfig,\n NgbTimeStruct,\n NgbTimepicker,\n NgbTimeAdapter\n} from './timepicker/timepicker.module';\nexport {NgbTooltipModule, NgbTooltipConfig, NgbTooltip} from './tooltip/tooltip.module';\nexport {\n NgbHighlight,\n NgbTypeaheadModule,\n NgbTypeaheadConfig,\n NgbTypeaheadSelectItemEvent,\n NgbTypeahead\n} from './typeahead/typeahead.module';\n\nexport {Placement} from './util/positioning';\n\nconst NGB_MODULES = [\n NgbAccordionModule, NgbAlertModule, NgbButtonsModule, NgbCarouselModule, NgbCollapseModule, NgbDatepickerModule,\n NgbDropdownModule, NgbModalModule, NgbPaginationModule, NgbPopoverModule, NgbProgressbarModule, NgbRatingModule,\n NgbTabsetModule, NgbTimepickerModule, NgbTooltipModule, NgbTypeaheadModule\n];\n\n@NgModule({imports: NGB_MODULES, exports: NGB_MODULES})\nexport class NgbModule {\n /**\n * Importing with '.forRoot()' is no longer necessary, you can simply import the module.\n * Will be removed in 4.0.0.\n *\n * @deprecated 3.0.0\n */\n static forRoot(): ModuleWithProviders { return {ngModule: NgbModule}; }\n}\n"],"names":["nextId","tslib_1.__extends","tslib_1.__values","NGB_DATEPICKER_VALUE_ACCESSOR","mod","GREGORIAN_EPOCH","isGregorianLeapYear","fromGregorian","toGregorian","delay"],"mappings":";;;;;;;;;;;;;;;AAAA,SAAgB,SAAS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